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.13046v1 | 2023-02-25T10:08:23 | 2023-02-25T10:08:23 | In Search of Deep Learning Architectures for Load Forecasting: A
Comparative Analysis and the Impact of the Covid-19 Pandemic on Model
Performance | In power grids, short-term load forecasting (STLF) is crucial as it
contributes to the optimization of their reliability, emissions, and costs,
while it enables the participation of energy companies in the energy market.
STLF is a challenging task, due to the complex demand of active and reactive
power from multiple types of electrical loads and their dependence on numerous
exogenous variables. Amongst them, special circumstances, such as the COVID-19
pandemic, can often be the reason behind distribution shifts of load series.
This work conducts a comparative study of Deep Learning (DL) architectures,
namely Neural Basis Expansion Analysis Time Series Forecasting (N-BEATS), Long
Short-Term Memory (LSTM), and Temporal Convolutional Networks (TCN), with
respect to forecasting accuracy and training sustainability, meanwhile
examining their out-of-distribution generalization capabilities during the
COVID-19 pandemic era. A Pattern Sequence Forecasting (PSF) model is used as
baseline. The case study focuses on day-ahead forecasts for the Portuguese
national 15-minute resolution net load time series. The results can be
leveraged by energy companies and network operators (i) to reinforce their
forecasting toolkit with state-of-the-art DL models; (ii) to become aware of
the serious consequences of crisis events on model performance; (iii) as a
high-level model evaluation, deployment, and sustainability guide within a
smart grid context. | [
"Sotiris Pelekis",
"Evangelos Karakolis",
"Francisco Silva",
"Vasileios Schoinas",
"Spiros Mouzakitis",
"Georgios Kormpakis",
"Nuno Amaro",
"John Psarras"
] | 10.1109/IISA56318.2022.9904363 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1109/IISA56318.2022.9904363",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13046v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13046v1",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"2022 13th International Conference on Information, Intelligence,\n Systems & Applications (IISA)"
] | {
"@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
5
2
]
G
L
.
s
c
[
1
v
6
4
0
3
1
.
2
0
3
2
:
v
i
X
r
a
In Search of Deep Learning Architectures for Load
Forecasting: A Comparative Analysis and the
Impact of the Covid-19 Pandemic on Model
Performance
Sotiris Pelekis
Decision Support Systems Laboratory
National Technical University of
Athens, ICCS, Greece
0000-0002-9259-9115
Evangelos Karakolis
Decision Support Systems Laboratory
National Technical University of
Athens, ICCS, Greece
0000-0003-2833-3088
Francisco Silva
R&D NESTER
Lisbon, Portugal
[email protected]
Vasileios Schoinas
Decision Support Systems Laboratory
National Technical University of
Athens, Greece
0000-0001-9809-6220
Spiros Mouzakitis
Decision Support Systems Laboratory
National Technical University of
Athens, ICCS, Greece
0000-0001-9616-447X
Georgios Kormpakis
Decision Support Systems Laboratory
National Technical University of
Athens, ICCS, Greece
0000-0003-4052-4549
Nuno Amaro
R&D NESTER
Lisbon, Portugal
[email protected]
John Psarras
Decision Support Systems Laboratory
National Technical University of
Athens, ICCS, Greece
[email protected]
Abstract-In power grids, short-term load forecasting (STLF)
is crucial as it contributes to the optimization of their reliability,
emissions, and costs, while it enables the participation of energy
companies in the energy market. STLF is a challenging task, due
to the complex demand of active and reactive power from mul-
tiple types of electrical loads and their dependence on numerous
exogenous variables. Amongst them, special circumstances-such
as the COVID-19 pandemic-can often be the reason behind
distribution shifts of load series. This work conducts a compara-
tive study of Deep Learning (DL) architectures-namely Neural
Basis Expansion Analysis Time Series Forecasting (N-BEATS),
Long Short-Term Memory (LSTM), and Temporal Convolutional
Networks (TCN)-with respect to forecasting accuracy and train-
ing sustainability, meanwhile examining their out-of-distribution
generalization capabilities during the COVID-19 pandemic era.
A Pattern Sequence Forecasting (PSF) model is used as baseline.
The case study focuses on day-ahead forecasts for the Portuguese
national 15-minute resolution net load time series. The results can
be leveraged by energy companies and network operators (i) to
reinforce their forecasting toolkit with state-of-the-art DL models;
(ii) to become aware of the serious consequences of crisis events
on model performance; (iii) as a high-level model evaluation,
deployment, and sustainability guide within a smart grid context.
Index Terms-COVID-19, Deep Learning, LSTM, MLOps, N-
BEATS, Out-of-Distribution Generalization, Short-Term Load
Forecasting, Smart Grid, Sustainability, Temporal Convolution,
Forecasting
I. INTRODUCTION
A. Background
Electricity load forecasts are crucial in assuring the devel-
opment and optimal operation of power systems, which have
always been a significant challenge for any country regardless
of their economical state. Load forecasts, both at demand and
generation side, can serve in maintaining the balance between
load and generation, the economic power dispatch, storage
scheduling, network planning and expansion of power grids.
Recently, this task is becoming even more popular [1] and
important, especially for European countries as the energy
crisis has reached an unprecedented peak with geopolitical
extensions. According to the European Union's Institute for
Security Studies [2] the balance between the security, afford-
ability and sustainability dimensions of the energy "trilemma"
has come under serious strain and governments often resort
to disparate measures, impeding the progress of the global
energy and climate change agenda [3]. Considering the urge
to face this energy crisis, the integration of smart grids and
the high penetration of renewable energy sources (RES) has
been considered as the only way forward [4].
The stochasticity of RES, along with the privatization and
deregulation of electricity market pose severe uncertainties in
electricity load forecasts. Additionally, energy demand patterns
depend on numerous external variables such as the weather
© 2022 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or
future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for
resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
conditions, energy prices [5], seasonal factors and social activ-
ities leading to complex correlations and therefore demanding
modelling for Load Forecasting (LF). The COVID-19 global
health emergency is a bright example of an occasion that
radically altered the patterns social activities for a long time
and therefore power systems operation and electricity demand
patterns [6]. These distribution shifts are projected on the
patterns of time series and definitely require either dedicated
handling depending on the nature of the utilized forecasting
technique [7], [8]. This variety of factors and events, form a
multiparametric and complex problem calling for innovative
and rigorous LF solutions with out-of-distribution generaliza-
tion capabilities [9].
Fortunately, the smart grid paradigm is, essentially, wide
open to innovative approaches enabling the integration and
exploitation of real-time and data-centric solutions powered
by Information and Communication Technologies (ICT) such
as Big Data, Internet of Things (IoT), Artificial Intelligence
(AI) and lately Machine Learning Operations (MLOps) [10]
towards harmonized network operation [11], [12]. Such tech-
nologies, and especially MLOps, have the potential to revo-
lutionize the energy sector by establishing a new paradigm
in load forecasting (LF) that goes beyond conventional model
development processes. In this context, automated and contin-
uous model training, evaluation, validation and deployment are
expected to replace the manual processes of the conventional
Machine Learning (ML) lifecycle, leading to faster and more
efficient decision making for network operators and generally
Electrical Power and Energy System (EPES) stakeholders.
LF is divided into four major categories based on the
forecasting horizon. Very short-term load forecasting (VSTLF)
addresses forecast horizons of a few minutes to a few hours.
It is mainly used for real-time control and demand response.
Electricity demand forecasts of one day to one week ahead
are known as Short-Term Load Forecasting (STLF). The
resolution of such forecasts ranges from 15-minute to hourly
and mainly serves for day-to-day operations of utilities and
participation in the electricity market. Medium-term load
forecasting (MTLF) involves demand forecasts of a week up
to a year ahead and is mainly used for maintenance scheduling
and planning of fuel purchases as well as energy trading and
revenue assessment for the utilities. Finally, long-term load
forecasting (LTLF) may involve time horizons up to 20 years
ahead and is usually linked to grid development and strategical
planning [13]. ML based STLF forms the core task of this
study and therefore the focus of the rest of this paper is shifted
towards this direction.
B. Related Work
Over the years, various forecasting approaches have been
proposed in literature for load forecasting, and specifically
Short-Term Load Forecasting (STLF). However, the studies
have been inconclusive regarding the superiority of a specific
technique as different solutions exhibit varying robustness,
complexity and requirements for computational resources. Ad-
ditionally, each time series and each forecasting technique ex-
hibit their unique characteristics depending on the use case in
question and the scope of the analysis. Forecasting models can
be divided into two basic categories, namely: (a) conventional
statistical methods and basic ML methods, b) advanced, state-
of-the-art methods that usually include Deep Learning (DL)
and, very commonly, hybrid setups. Conventional methods
usually serve as baselines.
Statistical models like linear regression have been widely
used for STLF [14], [15]. Specifically, Dudek in [16] com-
bined them with pattern-based techniques. Simpler models like
the Box-Jenkins method [17], Exponential Smoothing (ES)
[18], and nonparametric regression [19] are also common in
literature. ARIMA models [20] and their variations, such as
ARIMAX [21] and SARIMA [22], have also been an option
for STLF. Techniques like decomposition [23] are rarely used
alone, however they are often met in hybrid models [24],
such as Wavelet transformation [25]. Conventional methods
can also include simple ML approaches. These models usually
are Feed-Forward Artificial Neural Networks (ANN) [26],
[27] and Support Vector Machines (SVM) [28], [29]. Self-
Organising Maps (SOM) [30], regression trees [31], random
forests (RF) [32], gradient boosting regression trees (GBRT)
[33] and Kalman filtering [34] have been also proposed for
STLF. Ultimately, clustering approaches have proven to be
very efficient in predicting load profiles [35]. Conventional
models sometimes fail to model the nonlinear relationship
between weather and load or are susceptible to outliers [36],
however they offer simplicity and robustness [37], and can
serve as baselines.
More advanced and state-of-the art-models very often in-
clude hybrid and ensemble models. Genetic algorithms (GA)
have been widely used in order to minimize training time
[38], [39] and select training parameters for Genetic Algo-
rithm Neural Network (GA-NN) hybrid models [40], [41].
Fuzzy logic (FL) [34], [37] ensembled with other models
is used for better and faster handling of very long time-
series [42]. Convolutional Neural Network (CNN)-Recurrent
Neural Network (RNN) hybrids are often used to better
correlate load patterns with weather conditions [43], [44].
ANNs can be trained from an Artificial Immune System
model mainly for hyper-parameter optimization [45], [46].
Additional fields of research include extreme learning machine
[47], sequence-to-sequence models and specifically encoder-
decoder architectures [48]–[50]. These advanced techniques
can also have various applications in more specific problems
like transmission system loads for special days, such as New
Years' Eve or Easter [37], or even special loads like data center
consumption [40].
C. Contribution
The high-level objective of this paper is STLF at Transmis-
sion System Operator (TSO) level. Specifically, we examine
day-ahead forecasts of 15-minute resolution (96 timesteps-
ahead predictions) for the net load time series of the Por-
tuguese transmission system. Specifically, the purpose of this
paper is to perform an extensive comparison of DL archi-
tectures, namely Neural Basis Expansion Analysis Time Se-
ries Forecasting (N-BEATS) [51], Long Short-Term Memory
Recurrent NNs (LSTM) [52] and Temporal Convolutional
Networks (TCN) [53]. An averaging and a stacking ensemble
of PSF estimators [35] serve as baseline models. Moreover,
we attempt to demonstrate the effects of the COVID-19 global
emergency that initiated in early 2020 on the performance of
the employed models by alternating their training, validation,
and testing periods accordingly. Ultimately, motivated by the
capabilities of the smart grid for integration of ICT tech-
nologies and automation we also propose a high-level model
deployment scheme targeted for production environments and
production systems of network operators.
and special events. An initial step of data transformations
was thus performed leading to additional variables, from now
on referred to as temporal covariates. Temporal covariates
are synthetic variables that encode the timely characteristics
of each time step and can be used as predictors enriching
the input feature space of the forecasting problem. Table I
lists the specific temporal covariates accompanied by their
modelling approach. A very common encoding approach is
through sinusoidal and cosinusoidal transformations as they
can reproduce the continuousness periodicity of time. Both
temporal
transformations need to be included in the final
covariates to avoid getting the same values for different time
moments due to their nonmonotonic nature.
D. Structure of the Article
The rest of the paper is organized as follows. Section II
describes our methodological approach, including the utilized
methods, architectures, and the proposed evaluation and de-
ployment scheme. Section III summarizes the results of the
forecasting models, in terms of accuracy and sustainability,
also discussing the effects of the pandemic on them, followed
by concluding remarks and future work in Section IV.
II. METHODOLOGY
This section presents the followed methodology for address-
ing the common stages of an ML lifecycle. Specifically, the
stages described are (i) data collection, wrangling and transfor-
mations; (ii) exploratory analysis of the dataset; (iii) selection
of ML and DL architectures along with their development
process and model validation; (iv) an evaluation framework
tailored to the requirements of production smart grid envi-
ronment and finally (v) a proposed conceptual framework for
models' deployment to production based on the principles of
MLOps.
A. Data Collection and Feature Extraction
The main part of the dataset consisted of the Portuguese net
energy demand time series at a 15-minute resolution. Such data
are publicly available online. Except for performing a compar-
ative analysis of state-of-the-art ML models in forecasting the
Portuguese load at day-ahead level, the aim of this study is also
to observe the effects of the COVID-19 pandemic on model
performance. Therefore, collected net load data from 2009 to
2020 were utilized, as they permit to experiment with different
whole year test sets that either referred (2020) or not (2019) to
time periods related with the global health emergency. Some
common operations that were applied before proceeding to
transformations and feature engineering, are: (i) removal of
duplicate entries (mainly caused by changes between standard
and daylight saving time) and (ii) filling missing data (very
few cases that were handled with linear interpolation).
Autoregressive models can predict future values of a time
series by looking back at its past values. However, as already
discussed, various exogenous variables can affect its patterns,
therefore holding predicting power. Amongst them, we decided
to model the time in an attempt to capture seasonal factors
TABLE I
CHARACTERISTICS OF INTRODUCED TEMPORAL COVARIATES
Time
Feature
Year
Month
Day of Year
Day of Week
Week of Year
Holiday
Periodicity
-
Yearly
Yearly
Weekly
Yearly
Yearly
Encoding
Method
Integer
Sine & Cosine
Sine & Cosine
Sine & Cosine
Sine & Cosine
Boolean
Number of
Derived Covariates
1
2
2
2
2
1
B. Exploratory Data Analysis
Following data wrangling and feature engineering, several
data exploratory analytics and insights were extracted for the
dataset. These analytics mainly contribute to visualize and
understand the basic patterns of the load series along with
the pandemic's effects on the time series profile, motivating
the COVID-19 related analysis. All statistics range from
2017 to 2020, highlighting the distribution shift of the load
time series during the lockdown period, which began on
17th of March 2020 and lasted until the 3rd of May 2020
when a gradual relaxation of measures was applied. Fig. 1
illustrates the alteration of the distribution of load values
within 2020 compared to previous years, denoting a general
load reduction, smoothing and transition to a unimodal rather
than bimodal yearly distribution. Fig. 2 illustrates the total
monthly load values for all years of interest, pinpointing a
harsh and unprecedented decrease during the lockdown which
is highly expected due to the commercial, tourism and food
industries of the country being closed and the corporate ones
shifting to the Work from Home paradigm. Fig. 3 clearly
depicts the alteration of average daily profiles with respect to
mostly their magnitude yet their shape as well. In summary,
all observations imply that any conventional model being
trained on the historical values of the Portuguese load series is
expected to fail to completely adapt to the distributions shift
caused by the pandemic, leading to dips in performance and
increased errors while predicting 2020. This factor subjects to
further investigation within the present study.
C. Model Selection
In this section we present the ML and DL models employed
within our experimentation.
PSF. The Pattern Sequence Forecast algorithm (PSF) in-
troduced by Martinez-Alvarez et al. in [35], is a univariate
time-series forecasting approach based on the similarity be-
tween pattern sequences. It consists in two distinct steps: the
clustering step, in which time-series patterns are grouped, and
the predictive step, which leverages on the cluster models to
generate forecasts. PSF therefore treats training data as a set
of cluster labels, using their sequencing to find and match
windows of similar sequencing and combining them into a
single forecast.
LSTM. Unlike standard feedforward neural networks,
RNNs have feedback connections that render them appro-
priate for processing sequential data. Long short-term mem-
ory (LSTM) is an extension of the conventional RNN that
came to solve the vanishing gradient problem, mitigating
the inability to learn long range dependencies [52]. LSTMs
have been widely used for short-term load forecasting tasks.
A very common approach of employing LSTMs is through
encoder-decoder setups-instead of fully recurrent architec-
tures-especially for sequence-to-sequence tasks, and there-
fore were utilized for the multi-step horizon forecasts of the
present study (96 forecast steps) [48]–[50].
N-BEATS is a neural network that was first described in a
2019 article by Oreshkin et al. in [51]. The authors reported
that N-BEATS outperformed the M4 forecast competition
winner by 3%. The M4 winner was a hybrid between a recur-
rent neural network and Holt-Winters exponential smoothing,
whereas N-BEATS implements a "pure" deep neural architec-
ture. N-BEATS treats forecasting as a non-linear multivariate
regression problem. It comprises a very deep stack of fully
connected non-linear neural regressor blocks interconnected
with doubly residual links. N-BEATS has already been vali-
dated on mid-term energy forecasting tasks [54]. However, our
case study tasks fall within the scope of STLF, hence opening
a new perspective for validating the architecture on this task.
TCN is a CNN that consists of dilated, causal 1-dimensional
convolutional layers with the same input and output lengths
and was first proposed in [53] as a solution for time series
forecasting tasks. The authors reported that a simple convo-
lutional architecture is more effective across diverse sequence
modelling tasks than recurrent architectures such as LSTMs
and GRUs. TCNs have been recently validated for STLF tasks
[55], [56] and are employed throughout our case study.
D. Model Training
The aim of the training process has been the creation of
models for day-ahead forecasting at 15-minute resolution for
the net electricity demand of the Portuguese transmission
system. In this context, the selected ML and DL methods were
trained for multiple combinations of hyperparameters allowing
to select the optimal architecture for each method, as described
in detail in Table II. Additionally to the hyperparameters of
the table, an experimentation on different lookback window
values took place, namely 384 (3 days), 672 (7 days), and
960 (10 days) timesteps. Note that the number of layers of
the TCN architectures are set to "auto" as they are adjusted
Fig. 1. Histogram of the 15-minute load values for the years 2017-2020.
Fig. 2. Average monthly load for the years 2017-2020.
Fig. 3. Average daily load profiles for the years 2017-2020.
at each training round to ensure full receptive field coverage
based on Eq. 11.
n = logb
(cid:18) (l − 1) * (b − 1)
(k − 1)
(cid:19)
+ 1
(1)
where n represents the number of convolutional layers, l the
length of the lookback window, b the dilation base, and k the
kernel size. For the training of the PSF baseline models several
instances were obtained for different pattern window lengths
and underlying clustering algorithms,
including K-Means,
SOM, and Gaussian Mixture Models. Each of the baseline
algorithms was optimized using the Silhouette Index. The final
optimized PSF models were used to create ensemble forecasts,
using both averaging and stacking ensemble techniques, with
SVR as the meta-learning algorithm. Model training took place
on a laptop with an AMD Ryzen 9 4900H CPU, an NVIDIA
RTX2060 6GB GPU, and 24GB RAM.
TABLE II
MODEL FLAVORS ORDERED BY INCREASING COMPLEXITY OF DEEP
LEARNING ARCHITECTURE HYPERPARAMETERS
Base
Model
N-BEATS
Encoder –
Decoder LSTM
TCN
PSF
Architectural Properties per Model Flavor
Property Name
Number of stacks
Number of blocks
Number of layers
Layer widths
Expansion coefficient dim.
Recurrent layers
Hidden dimension
Dropout
Learning rate
Kernel size
Number of filters
Dilation base
Convolutional layers
Ensemble Method
Flavor 0
20
1
4
64
5
1
20
0
0.0008
3
3
2
auto
Averaging
Flavor 1
30
1
4
512
5
2
64
0
0.001
5
5
3
auto
SVR
The dataset split was as follows: (i) training set: 2009-
2017 (ii) validation set: 2018 (iii) test set: 2019. Subsequently,
the best models from the previous step were retrained to
investigate the effect of the COVID-19 load distribution shifts
on model performance. For this purpose, the dataset split was
modified for the test set to include the pandemic period as
follows: (i) training set: 2009-2018 (ii) validation set: 2019 (iii)
test set: 2020. The results of the experiments are summarized
in the section III.
With respect to temporal covariates, the N-BEATS model
them as: (i) indicated in [51], [54];
was trained without
(ii) it was observed that its performance was systematically
lower when the covariates were included in the model. On
the contrary, LSTMs and TCNs are trained and evaluated
including the temporal covariates for the opposite reason.
Temporal covariates are not applicable to the PSF method.
E. Model Validation and Evaluation Framework
Regarding model validation and evaluation,
in our case
every DL model was: (i) trained on the predefined training
1https://unit8.com/resources/temporal-convolutional-networks-and-
forecasting/
set; (ii) validated on the validation set to discover the best
hyperparameters; (iii) and evaluated on the remaining and pre-
viously unseen test set. With respect to performance measures,
various forecast errors are common in forecasting applications
including the Mean Absolute Error (MAE), the Mean Squared
Error (MSE), the Mean Absolute Percentage Error (MAPE),
the Root Mean Square Error (RMSE), the Symmetric Mean
Absolute Percentage Error (SMAPE), and the Mean Absolute
Scaled Error (MASE) [57]. We use MAPE (Eq. 2) as a widely
accepted choice for STLF benchmarks.
M AP E =
1
m
m
(cid:88)
i=1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Yt − Ft
Yt
(cid:12)
(cid:12)
(cid:12)
(cid:12)
* 100(%)
(2)
where m represents the number of samples, Yt and Ft stand for
the actual data values and forecasted data values, respectively.
Regarding the calculation of MAPE-as our experimen-
tation is aimed for smart grid applications and deployment
to production-we opted for a backtesting approach. Back-
testing refers to the periodical updating of a model's history
depending on its forecasting horizon. To elaborate more, let
us suppose a TSO that aims to participate in the Portuguese
daily energy market. Every day, a 96-step-ahead (day-ahead)
forecast is required. However, at the end of the forecasted
day, the ground truth values of the series are already known
and thus can be fed to the model to update its lookback
window for day-ahead inference. Hence, the proposed DL
models are validated and evaluated following this approach,
which is however not applicable to the PSF method.
F. High-Level Deployment Framework
As previously discussed, the proposed deployment frame-
work can be part of a TSO smart grid system that is used for
producing daily load forecasts in an automated manner. At this
deployment stage, it is important that the model's performance
is constantly monitored by being evaluated on newly ingested
data. Dips in performance possibly indicate that the entire
training process may need to be repeated to update the model
to incorporate new trends. Fig. 4 illustrates this concept within
a smart grid application.
III. RESULTS
This section presents the results of our study. Python and
MLflow [10] were used to set up the experimentation pipeline
and keep track of of the performed experiments.
A. Results of the Comparative Analysis
The results of the comparative analysis for the 2009-2019
experimentation period (training set: 2009-2017, validation
set: 2018, test set: 2019) are shown in Table III. They refer
both to model accuracies (MAPE) and GPU training times
as such a measurement can be a good indicator of envi-
ronmental friendliness and sustainability. Specifically, the N-
BEATS architecture clearly outperforms the LSTM and TCN
architectures from both perspectives with Model 4 achieving
the lowest MAPE at a relatively low GPU time. Moreover,
regarding TCN and LSTM it can be concluded that a lookback
TABLE III
MODEL TRAINING AND EVALUATION RESULTS FOR THE 2009-2019
PERIOD
Architecture
Performance
Model
Family
Model
ID
Flavor
l
MAPE
Epochs
PSF
N-BEATS
LSTM
TCN
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
0
1
0
0
0
1
1
1
0
0
0
1
1
1
0
0
0
1
1
1
-
-
384
672
960
384
672
960
384
672
960
384
672
960
384
672
960
384
672
960
3.333
3.581
2.245
2.212
2.001
2.305
2.315
2.179
2.437
2.57
2.56
2.212
2.087
2.201
2.525
2.409
2.413
2.293
2.243
2.268
-
-
51
43
71
23
31
37
261
141
149
35
43
41
127
145
117
123
99
89
GPU
Time
(h)
0
0
1.10
1.00
1.49
0.94
1.04
1.18
5.85
3.67
3.85
1.19
1.98
2.15
3.06
3.44
3.04
2.70
2.58
2.39
accuracy decrease proving to be the most robust choice for
the distribution shift observed during the lockdown period.
A potential interpretation of this result can be that the TCN
model exhibited a relative "underfitting" compared to the other
models for the testing period of 2019; and underfitted models
usually tend to estimate less accurately the target distribution,
however they are less affected by potential distribution shifts,
which is the case for 2020.
IV. CONCLUSIONS AND FUTURE WORK
Power grids have been undergoing an unprecedented change
during the last few years, integrating RES and new tech-
nologies such Big Data and ML. In this context, STLF
is a multiparametric task of great importance as it allows
for harmonized grid operation and participation of EPES
stakeholders in the energy market. In the meanwhile of this
smart grid evolution, the COVID-19 global health emergency
triggered socioeconomic phenomena that led to distribution
shifts of energy demand, demonstrating the need for rig-
orous forecasting models and out-of-distribution generaliza-
tion. The present work focuses on comparing three state-of-
the-art DL architectures-namely N-BEATS, encoder-decoder
LSTM, and TCN-in terms of accuracy and sustainability, also
examining their robustness during the pandemic period.
During the pre-pandemic period, it has been demonstrated
that N-BEATS outperforms both the other architectures lever-
aging a relatively simple architecture, while also exhibiting
acceptable GPU times and hence sustainability. Nonetheless,
it is significantly affected by the load distribution shifts of
the pandemic leading to decreased accuracy when tested on
2020. The TCN architecture exhibits lower accuracy and
sustainability in general, however it demonstrates better out-
Fig. 4. High-level deployment framework for the STLF pipeline.
window (l) of 7 days (672 15-minute timesteps) is the best
option for higher accuracy. However,
the case
for N-BEATS which performs better for the 10-day lookback
window. Note here that all deep architectures outperform the
PSF baseline model in terms of accuracy at the cost-of
course-of significant GPU utilization.
this is not
As a general comment, larger and more complex neural
network architectures (flavor 1) on average result to fewer
epochs as they can fit
the datasets faster, denoting lower
GPU times and thus higher sustainability. In fact, except
for N-BEATS, deeper architectures lead as well to higher
accuracies, avoiding potential overfitting thanks to the early
stopping approach. Note here that a poor selection of neural
architecture-such as the flavor 0 of the LSTM family-can
lead to low accuracy and increased GPU times and eventually
higher electricity consumption during training.
B. Impact of the Pandemic on the Model Performance
To examine the impact of the COVID-19 global health
emergency on DL models' performance, the most accurate
setups from each DL model family from the experiments of
2009-2019 period (Model 4, 12 and 18) were retrained on
2009-2018 validated on 2019, and tested on 2020. Even though
the training dataset is larger by one year, a condition that is
usually beneficial for the accuracy of DL models, this is not
the case here as most models perform lower on average as
illustrated in Fig. 5. To get a more detailed insight on the
effects of the pandemic, the model errors are listed for each
season separately, revealing the most affected period by the
pandemic. Expectedly, during the spring and summer periods
the MAPE is significantly increased. Of course, the lockdown
period, which can be approximately projected to spring 2020
(also accounting for the post-lockdown measures) is linked
with larger errors, especially for the LSTM and N-BEATS
models. Nonetheless, the TCN model exhibits a much smaller
Fig. 5. Model errors per season for the years 2019 (normal year) and 2020 (COVID-19 global health emergency)
of-distribution generalization during the pandemic, as a poten-
tial result of underfitting the pre-pandemic training set. The
encoder-decoder LSTM proved to be highly sensitive to the
architecture depth and complexity, while it also failed to adapt
to the COVID-19 distribution shift. As a main conclusion, it
is always upon EPES stakeholders and their ML engineers to
decide on their architecture of preference for STLF tasks based
on their computational resources, error tolerance per season,
and readiness for model retraining in case of distribution shifts.
Hence, we would suggest TCN for those that need a "one-for-
all" solution without the constant necessity for monitoring and
retraining. On the contrary, we would suggest N-BEATS for
stakeholders that require state-of-the-art performance and high
sustainability at the cost of an automated monitoring process
as the one proposed in the deployment scheme of Fig. 4.
Future work includes: (i) the integration of weather vari-
ables-and specifically weather forecasts-in the models; (ii)
an exhaustive hyperparameter space search as long as High-
Performance Computers (HPC) become available; (iv) the
extensive search of rigorous setups-including DL ensem-
bles-that will allow for out-of-distribution generalization
without the compromise of underfitting during normal periods;
(v) a thorough study on the tradeoff between accuracy and
GPU times in terms of grid and environmental sustainability.
From a broader perspective, a future step could as well be the
extension of this experimentation to more European countries
alongside the development of a production ICT system for
automated and easily deployable STLF.
ACKNOWLEDGMENT
This work has been funded by the European Union's Hori-
zon 2020 research and innovation programme under the I-
NERGY project, Grant Agreement No 101016508.
REFERENCES
[1]
[2]
T. Hong, J. Xie, and J. Black, "Global energy forecasting competition
2017: Hierarchical probabilistic load forecasting," International Journal
of Forecasting, vol. 35, no. 4, pp. 1389–1399, Oct. 2019.
European Union Institute for Security Studies, Europe's energy crisis
conundrum, 2022.
[3] C. Fraune and M. Knodt, "Sustainable energy transformations in an age
of populism, post-truth politics, and local resistance," Energy Research
& Social Science, vol. 43, pp. 1–7, Sep. 2018.
[4] C. W. Su, K. Khan, M. Umar, and W. Zhang, "Does renewable energy
redefine geopolitical risks?" Energy Policy, vol. 158, p. 112 566, Nov.
2021.
E. Spiliotis, H. Doukas, V. Assimakopoulos, and F. Petropoulos,
"Forecasting week-ahead hourly electricity prices in Belgium with
statistical and machine learning methods," Mathematical Modelling of
Contemporary Electricity Markets, pp. 59–74, Jan. 2021.
[5]
[6] A. Navon, R. Machlev, D. Carmon, A. E. Onile, J. Belikov, and Y.
Levron, "Effects of the COVID-19 Pandemic on Energy Systems and
Electric Power Grids-A Review of the Challenges Ahead," Energies
2021, Vol. 14, Page 1056, vol. 14, no. 4, p. 1056, Feb. 2021.
[7] D. Obst, J. De Vilmarest, and Y. Goude, "Adaptive Methods for
Short-Term Electricity Load Forecasting during COVID-19 Lockdown
in France," IEEE Transactions on Power Systems, vol. 36, no. 5,
pp. 4754–4763, Sep. 2021.
[8] A. M. Tudose, I. I. Picioroaga, D. O. Sidea, C. Bulac, V. A. Boicea,
L. Fortuna, G. Chicco, A. Mazza, S. Musumeci, E. Pons, and A. Russo,
"Short-Term Load Forecasting Using Convolutional Neural Networks
in COVID-19 Context: The Romanian Case Study," Energies 2021,
Vol. 14, Page 4046, vol. 14, no. 13, p. 4046, Jul. 2021.
[9] M. Arjovsky, "Out of Distribution Generalization in Machine Learn-
[10]
ing," Ph.D. dissertation, New York University, 2020.
S. Alla and S. K. Adari, Beginning MLOps with MLFlow. Apress,
2021.
[11] V. Marinakis, H. Doukas, J. Tsapelas, S. Mouzakitis, ́A. Sicilia, L.
Madrazo, and S. Sgouridis, "From big data to smart energy services:
An application for intelligent energy management," Future Generation
Computer Systems, vol. 110, pp. 572–586, Sep. 2020.
[12] V. Marinakis, "Big Data for Energy Management and Energy-Efficient
Buildings," Energies 2020, Vol. 13, Page 1555, vol. 13, no. 7, p. 1555,
Mar. 2020.
[13] M. A. Hammad, B. Jereb, B. Rosi, and D. Dragan, "Methods and
Models for Electric Load Forecasting: A Comprehensive Review,"
Logistics & Sustainable Transport, vol. 11, no. 1, pp. 51–76, Feb.
2020.
S. M. Moghaddas-Tafreshi and M. Farhadi, "A linear regression-
based study for temperature sensitivity analysis of iran electrical load,"
[14]
in Proceedings of the IEEE International Conference on Industrial
Technology, 2008.
[15] B. Yildiz, J. I. Bilbao, and A. B. Sproul, A review and analysis
of regression and machine learning models on commercial building
electricity load forecasting, 2017.
[16] G. Dudek, "Pattern-based local linear regression models for short-term
load forecasting," Electric Power Systems Research, vol. 130, pp. 139–
147, Jan. 2016.
P. V ̈ah ̈akyla, E. Hakonen, and P. L ́eman, "Short-term forecasting
of grid load using Box-Jenkins techniques," International Journal of
Electrical Power & Energy Systems, vol. 2, no. 1, pp. 29–34, Jan.
1980.
[17]
[18] W. R. Christiaanse, "Short-term load forecasting using general ex-
ponential smoothing," IEEE Transactions On Power Apparatus and
Systems, no. 2, pp. 900–911, 1971.
[19] A. E. Clements, A. S. Hurn, and Z. Li, "Forecasting day-ahead elec-
tricity load using a multiple equation time series approach," European
Journal of Operational Research, vol. 251, no. 2, pp. 522–530, Jun.
2016.
[20] W. Li and Z. G. Zhang, "Based on time sequence of ARIMA model in
the application of short-term electricity load forecasting," in ICRCCS
2009 - 2009 International Conference on Research Challenges in
Computer Science, 2009, pp. 11–14.
[21] H. Cui and X. Peng, "Short-Term City Electric Load Forecasting with
Considering Temperature Effects: An Improved ARIMAX Model,"
Mathematical Problems in Engineering, vol. 2015, 2015.
[22] H. Musbah and M. El-Hawary, "SARIMA Model Forecasting of Short-
Term Electrical Load Data Augmented by Fast Fourier Transform
Seasonality Detection," Tech. Rep.
[24]
[25]
[23] N. Mohan, K. P. Soman, and S. Sachin Kumar, "A data-driven
strategy for short-term electric load forecasting using dynamic mode
decomposition model," Applied Energy, vol. 232, pp. 229–244, Dec.
2018.
S. Annamareddi, S. Gopinathan, and B. Dora, "A simple hybrid
model for short-term load forecasting," Journal of Engineering (United
Kingdom), vol. 2013, 2013.
T. Du, X. Wang, and X. Wang, "A combined model of wavelet
and neural network for short term load forecasting," in PowerCon
2002 - 2002 International Conference on Power System Technology,
Proceedings, vol. 4, Institute of Electrical and Electronics Engineers
Inc., 2002, pp. 2331–2335.
S. Fan, L. Chen, and W. J. Lee, "Short-term load forecasting using
comprehensive combination based on multimeteorological informa-
tion," IEEE Transactions on Industry Applications, vol. 45, no. 4,
pp. 1460–1466, 2009.
[26]
[27] D. Baczy ́nski and M. Parol, "Influence of artificial neural network
structure on quality of short-term electric energy consumption fore-
cast," in IEE Proceedings: Generation, Transmission and Distribution,
vol. 151, Mar. 2004, pp. 241–245.
[29]
[28] W. C. Hong, "Electric load forecasting by seasonal recurrent SVR (sup-
port vector regression) with chaotic artificial bee colony algorithm,"
Energy, vol. 36, no. 9, pp. 5568–5578, 2011.
J. X. Che and J. Z. Wang, "Short-term load forecasting using a kernel-
based support vector regression combination model," Applied Energy,
vol. 132, pp. 602–609, Nov. 2014.
S. Fan and L. Chen, "Short-term load forecasting based on an adaptive
hybrid method," IEEE Transactions on Power Systems, vol. 21, no. 1,
pp. 392–401, Feb. 2006.
[30]
[31] H. Mori and N. Kosemura, "Optimal regression tree based rule
discovery for short-term load forecasting," in Proceedings of the IEEE
Power Engineering Society Transmission and Distribution Conference,
vol. 2, 2001, pp. 421–426.
[32] G. Dudek, "Short-Term Load Forecasting Using Random Forests," Ad-
vances in Intelligent Systems and Computing, vol. 323, pp. 821–828,
2015.
S. Ben Taieb and R. J. Hyndman, "A gradient boosting approach
to the Kaggle load forecasting competition," International Journal of
Forecasting, vol. 30, no. 2, pp. 382–394, Apr. 2014.
[33]
[34] H. M. Al-Hamadi and S. A. Soliman, "Fuzzy short-term electric
load forecasting using Kalman filter," IEE Proceedings: Generation,
Transmission and Distribution, vol. 153, no. 2, pp. 217–227, Mar. 2006.
F. Mart ́ınez- ́Alvarez, A. Troncoso, J. C. Riquelme, and J. S. Aguilar
Ruiz, "Energy time series forecasting based on pattern sequence
[35]
[36]
similarity," IEEE Transactions on Knowledge and Data Engineering,
vol. 23, no. 8, pp. 1230–1243, 2011.
Z. Deng, B. Wang, Y. Xu, T. Xu, C. Liu, and Z. Zhu, "Multi-scale
convolutional neural network with time-cognition for multi-step short-
term load forecasting," IEEE Access, vol. 7, pp. 88 058–88 071, 2019.
[37] K. B. Song, Y. S. Baek, D. H. Hong, and G. Jang, "Short-term load
forecasting for the holidays using fuzzy linear regression method,"
IEEE Transactions on Power Systems, vol. 20, no. 1, pp. 96–101, Feb.
2005.
[38] G. C. Liao and T. P. Tsao, "Application of a fuzzy neural network
combined with a chaos genetic algorithm and simulated annealing
to short-term load forecasting," IEEE Transactions on Evolutionary
Computation, vol. 10, no. 3, pp. 330–340, Jun. 2006.
L. G. Chen, H. D. Chiang, N. Dong, and R. P. Liu, "Group-based
chaos genetic algorithm and non-linear ensemble of neural networks
for short-term load forecasting," IET Generation, Transmission and
Distribution, vol. 10, no. 6, pp. 1440–1447, Apr. 2016.
[39]
[41]
[40] A. Vesa, T. Cioara, I. Anghel, M. Antal, C. Pop, B. I. .-. Sustainability,
and U. 2020, "Energy flexibility prediction for data center engagement
in demand response programs," mdpi.com, vol. 12, no. 4, p. 1417,
2020.
S. Mishra and S. K. Patra, "Short term load forecasting using neural
network trained with genetic algorithm & particle swarm optimization,"
in Proceedings - 1st International Conference on Emerging Trends in
Engineering and Technology, ICETET 2008, 2008, pp. 606–611.
T. Senjyu, P. Mandal, K. Uezato, and T. Funabashi, "Next day load
curve forecasting using hybrid correction method," IEEE Transactions
on Power Systems, vol. 20, no. 1, pp. 102–109, Feb. 2005.
[42]
[44]
[43] M. Sajjad, Z. A. Khan, A. Ullah, T. Hussain, W. Ullah, M. Y. Lee, and
S. W. Baik, "A Novel CNN-GRU-Based Hybrid Approach for Short-
Term Residential Load Forecasting," IEEE Access, vol. 8, pp. 143 759–
143 768, 2020.
S. H. Rafi, N. Al-Masood, S. R. Deeba, and E. Hossain, "A short-term
load forecasting method using integrated CNN and LSTM network,"
IEEE Access, vol. 9, pp. 32 436–32 448, 2021.
L. Hernandez, C. Baladron, J. Aguiar, B. Carro, A. Sanchez-
Esguevillas, J. Lloret, D. Chinarro, J. Gomez-Sanz, and D. Cook,
"A multi-agent system architecture for smart grid management and
forecasting of energy demand in virtual power plants," IEEE Commu-
nications Magazine, vol. 51, no. 1, pp. 106–113, 2013.
[45]
[46] B. Farsi, M. Amayri, N. Bouguila, and U. Eicker, "On short-term load
forecasting using machine learning techniques and a novel parallel
deep LSTM-CNN approach," IEEE Access, vol. 9, pp. 31 191–31 212,
2021.
[48]
[49]
[50]
[47] R. Zhang, Z. Y. Dong, Y. Xu, K. Meng, and K. P. Wong, "Short-
term load forecasting of Australian national electricity market by
an ensemble model of extreme learning machine," IET Generation,
Transmission and Distribution, vol. 7, no. 4, pp. 391–397, 2013.
L. Sehovac and K. Grolinger, "Deep Learning for Load Forecasting:
Sequence to Sequence Recurrent Neural Networks with Attention,"
IEEE Access, vol. 8, pp. 36 411–36 426, 2020.
F. D. Rueda, J. D. Su ́arez, and A. D. R. Torres, "Short-term load
forecasting using encoder-decoder wavenet: Application to the french
grid," Energies, vol. 14, no. 9, May 2021.
S. Henselmeyer and M. Grzegorzek, "Short-term load forecasting using
an attended sequential encoder-stacked decoder model with online
training," Applied Sciences (Switzerland), vol. 11, no. 11, Jun. 2021.
[51] B. N. Oreshkin, D. Carpov, N. Chapados, and Y. Bengio, N-BEATS:
Neural basis expansion analysis for interpretable time series forecast-
ing, May 2019.
S. Hochreiter and J. Schmidhuber, "Long Short-Term Memory," Neural
Computation, 1997.
S. Bai, J. Z. Kolter, and V. Koltun, An Empirical Evaluation of Generic
Convolutional and Recurrent Networks for Sequence Modeling, Mar.
2018.
[53]
[52]
[54] B. N. Oreshkin, G. Dudek, P. Pełka, and E. Turkina, "N-BEATS neural
network for mid-term electricity load forecasting," Applied Energy,
vol. 293, p. 116 918, Jul. 2021.
L. Yin and J. Xie, "Multi-temporal-spatial-scale temporal convolution
network for short-term load forecasting of power systems," Applied
Energy, vol. 283, p. 116 328, Feb. 2021.
[55]
[56] X. Tang, H. Chen, W. Xiang, J. Yang, and M. Zou, "Short-Term Load
Forecasting Using Channel and Temporal Attention Based Temporal
Convolutional Network," Electric Power Systems Research, vol. 205,
p. 107 761, Apr. 2022.
[57] R. J. Hyndman and A. B. Koehler, "Another look at measures of
forecast accuracy," International Journal of Forecasting, vol. 22, no. 4,
pp. 679–688, Oct. 2006.
|
http://arxiv.org/abs/2302.13034v1 | 2023-02-25T09:11:57 | 2023-02-25T09:11:57 | Does Noise Affect Housing Prices? A Case Study in the Urban Area of
Thessaloniki | Real estate markets depend on various methods to predict housing prices,
including models that have been trained on datasets of residential or
commercial properties. Most studies endeavor to create more accurate machine
learning models by utilizing data such as basic property characteristics as
well as urban features like distances from amenities and road accessibility.
Even though environmental factors like noise pollution can potentially affect
prices, the research around this topic is limited. One of the reasons is the
lack of data. In this paper, we reconstruct and make publicly available a
general purpose noise pollution dataset based on published studies conducted by
the Hellenic Ministry of Environment and Energy for the city of Thessaloniki,
Greece. Then, we train ensemble machine learning models, like XGBoost, on
property data for different areas of Thessaloniki to investigate the way noise
influences prices through interpretability evaluation techniques. Our study
provides a new noise pollution dataset that not only demonstrates the impact
noise has on housing prices, but also indicates that the influence of noise on
prices significantly varies among different areas of the same city. | [
"Georgios Kamtziridis",
"Dimitris Vrakas",
"Grigorios Tsoumakas"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13034v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13034v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | Kamtziridis et al.
REGULAR ARTICLE
Does Noise Affect Housing Prices? A Case Study
in the Urban Area of Thessaloniki
Georgios Kamtziridis1*, Dimitris Vrakas1 and Grigorios Tsoumakas1
*Correspondence:
[email protected]
1Department of Informatics,
Aristotle University of
Thessaloniki, Thessaloniki, GR
Full list of author information is
available at the end of the article
3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
4
3
0
3
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Real estate markets depend on various methods to predict housing prices,
including models that have been trained on datasets of residential or commercial
properties. Most studies endeavor to create more accurate machine learning
models by utilizing data such as basic property characteristics as well as urban
features like distances from amenities and road accessibility. Even though
environmental factors like noise pollution can potentially affect prices, the
research around this topic is limited. One of the reasons is the lack of data. In
this paper, we reconstruct and make publicly available a general purpose noise
pollution dataset based on published studies conducted by the Hellenic Ministry
of Environment and Energy for the city of Thessaloniki, Greece. Then, we train
ensemble machine learning models, like XGBoost, on property data for different
areas of Thessaloniki to investigate the way noise influences prices through
interpretability evaluation techniques. Our study provides a new noise pollution
dataset that not only demonstrates the impact noise has on housing prices, but
also indicates that the influence of noise on prices significantly varies among
different areas of the same city.
Keywords: Housing Prices Prediction; Noise Pollution; Ensemble Models;
Interpretability
Introduction
The real estate market plays an important role in people's lives, from individuals
and families, to small businesses and large corporations. The process of purchas-
ing or renting a property, whether for residential or commercial purposes, mainly
depends on the economic and financial planning of a family or a company. Addition-
ally, it is strongly related to the macroeconomics and the financial stability of much
larger groups of people such as countries. Any sign of inconsistency or fluctuation in
the real estate market can provoke apprehension in the state, trigger an economic
recession or, ultimately, even lead to financial crises through housing bubble bursts.
The potential risks are well known to the concerned parties and more importantly
to governments that monitor the market on a regular basis. Banks have also in-
vested greatly in real estate in order to obtain accurate house pricing estimates for
mortgages and housing loans. These organizations often need to estimate the value
of a given property for auctions or damage control when clients are unable to pay
their debts. Besides states and organizations, property owners and investors should
have the right to access valuable insights about the value of their properties too.
This knowledge can increase the efficiency of managing assets or even help make
profitable property investments.
Kamtziridis et al.
Page 2 of 24
Property estimations are performed by human experts like real estate brokers and
engineers. This estimation process considers properties' features and amenities, as
well as external factors such as bus station density or distances to city centers.
These are combined with other metrics, like the House Price Index [1], which tracks
the changes in property prices, to arrive at a price estimate. During this process,
there is no way of quantifying the accuracy of prediction nor the importance of
each component that was included in the task. Therefore, the absence of confidence
increases the risk of the forthcoming decision, which can end up being financially
harmful.
In the contemporary world, the real estate market is represented mostly through
different web-based services. In each country, there are numerous websites with
vast amounts of properties available for renting or buying. These data have been
utilized in the past for different analyses, ranging from creating models capable of
predicting house prices based on their features to estimating prices over time in order
to understand their seasonality. There has been a lot of research on this topic over
the years, with big real estate datasets containing hundreds of properties being used
to train machine learning models with the ultimate goal of providing meaningful
price estimates. These datasets contain basic property features that are specific to
the building itself, such as location, size, floor level and heating type to name a few.
Moreover, they can incorporate other features related to the surrounding area of
the property, such as road network accessibility and distances from basic points of
interest. All these features contribute to the urban profile of a neighborhood, which
can directly or indirectly affect prices to a great extent. The importance of these
features and their correlation to the price estimates have been validated in previous
research [2, 3, 4, 5].
Environmental factors have not been taken into consideration in the literature
as much as they should have, despite their obvious role when selecting a property.
The two most popular are the air quality index and the noise pollution. The first
indicates the level of cleanliness in the air that influences the overall health of the
population in a given area. The second one is related to the actual noise caused by
road traffic, crowds, aviation and other factors such as the presence of night clubs or
manufacturing establishments. Although these two features play a major role in the
nature of a neighborhood, research on their impact on house prices remains largely
underexplored. To some extent, this is to be expected given the practical challenges
of gathering environmental data, such as expensive measuring and monitoring tools,
specialized software, and on-site orchestration of distributed sensors. Usually, these
studies are conducted by large corporations or state departments that subsequently
hold the data for internal use. Even when the results are made public, the raw data
that were collected and used in the experiments are typically not made available.
The impact of the real estate market on a country, in addition to the innovations
that can emerge through research in the field, highlights the potential profit of
such work. Being able to generate valuable environmental features of an urban area
and, then, use those in the housing price prediction problem can help individuals,
small and medium-sized businesses, all the way to large corporations, banks and
government experts make profitable decisions. Aside from profitability, it can shed
Kamtziridis et al.
Page 3 of 24
light on the various factors that influence prices. Knowing if and how the environ-
ment affects housing prices can assist urban planners to design more functional and
efficient cities.
In the first part of this paper, we extract environmental data, and more specifically
noise pollution, from published scientific studies. We focus on studies performed by
the Hellenic Ministry of Environment and Energy[1] for the urban area of Thessa-
loniki, Greece. The end results were published by the government with heat maps
demonstrating the spatial distribution of noise across the city. However, none of the
core noise measurements were made public, making any future use or contribution
to the field difficult. We have managed to overcome this limitation by meticulously
re-creating the sense of noise into a general-purpose and easy to use dataset.
In the second part of this work, we highlight the importance of noise in predicting
house prices. To verify this, we have used the property database of Openhouse[2],
which is a real estate platform operating in major cities of Greece and, mainly, in
the area of Thessaloniki. Since we need to create accurate models we choose to use
ensemble methods that proved to work well in the research literature. The property
and the noise data are used to create multiple models with distinct configurations,
exploring different aspects of the same problem.
The main contributions of this work are:
1 A new general-purpose sense-of-noise dataset, as well as a new housing price
dataset containing noise information for the area of Thessaloniki[3].
2 An extensive experimental evaluation of the contribution of noise in the prop-
erty price estimation process via ensemble models such as XGBoost [6] and
light gradient boosting [7] models.
Related Work
This section presents relevant research in the field of housing price prediction from
a data perspective. It is important to discuss key relevant work in order to better
understand the current state of the area, as well as to position this paper prop-
erly within the literature. We begin by outlining the basic solutions proposed along
the years on housing price estimates that take basic property features into consid-
eration. Then, we move to more advanced approaches, which incorporate various
environmental information and, eventually, focus on experiments based on noise
pollution.
Baldominos [3] studies the housing price prediction problem in the Salamanca
district of Madrid. With a collection of 2,266 properties from popular online sites
containing the fundamental characteristics, they test the correlation between the
features and the price to find out that size is the most important one. They use
these data to construct various regression models of different specifications, such as
support vector machines, multi-layer perceptrons and ensembles of regression trees,
all trying to predict prices given the features. The final results showcase the supe-
riority of the ensemble trees when compared to others. Imran [8] follows another
approach for the capital of Pakistan, Islamabad. Alongside the basic property char-
acteristics, they gather some features related to the surrounding area of a property.
[1]https://ypen.gov.gr/
[2]https://openhouse.gr
[3]https://github.com/gkamtzir/housing-prices-and-noise-thessaloniki
Kamtziridis et al.
Page 4 of 24
For instance, they attempt to include neighborhood related information through
binary values (yes/no) indicating the existence of core amenities and services like
hospitals, schools and entertainment. Although their experiments encapsulate many
features, the results show that besides the total size, the number of bedrooms and
bathrooms, also, radically influence the price, with support vector machines being
the best performing model.
Truong [5] focuses on the Beijing area by using the "Housing Price in Beijing"
dataset which contains more than 300,000 properties. Each property, apart from
its standard attributes, has various spatial information like distance from the city
center and subway accessibility. The exploratory analysis demonstrates direct corre-
lation between the location and the property price, since each district has a different
price range. Initially, random forest [9], XGBoost and lightweight gradient boost-
ing models were used for training. Then, the authors combine these to build a
stacked generalization model [10] by placing random forest and lightweight gradi-
ent boosting at the first level and XGBoost at the second one. This architecture
outperforms any of the individual ones in terms of accuracy, with a much higher
computational cost. Similarly, Xue [11] accumulates property data and urban de-
tails like bus and metro stations and routes, traffic and road network information
for the city of Xi'an, China. The urban data are preprocessed and new meaningful
indices are introduced. The property features and the new indices are utilized by
ensemble models to highlight the fact that size is, again, the most influential factor
in the matter of predicting prices. Additionally, they illustrate the importance of
the neighborhood of a property, because the next most important group of features
is related to the spatial indices. Along the same lines, Kang [12] engineers relevant
features from more generic urban characteristics like human mobility patterns and
socioeconomic data. They experiment with a gradient boosting ensemble in order to
analyze features' significance, where they come to the conclusion that some spatial
features can play a more decisive role when it comes to predicting prices. For exam-
ple, the prices of properties located near university campuses are mainly affected
by the distance to the campus rather than their total size.
Environmental conditions can, also, act on prices. Chiarazzo [13] gathers property
and air pollution data for the city of Taranto in Italy, which is marked as a high
environmental risk area due to its heavy industry. With feature selection and an
artificial neural network they put to the test the correlation of each feature through
an one-by-one elimination process. Interestingly, they state that sulfur dioxide con-
centration, one of the five major air pollutants, is the most determinant with respect
to price, ranking higher than other characteristics such as floor level and distance
to the city center. Shanghai is another industrialized city, where Zou [14] evaluates
the air pollution phenomenon in connection with property prices to quantify even
more their relation. A total of 27,608 properties in conjunction with air pollutants
are used as training data in a gradient boosting model which it attributes 1.6% in
terms of contribution. Under no circumstance, this percentage can be considered
as minimal, since a reduction of 1 μg/m3 in nitrogen dioxide increases the price by
roughly 278 Yuan per square meter.
Regarding noise pollution, there is much less research available attempting to cor-
relate house prices to noise levels. In general, noise pollution is measured in decibels,
Kamtziridis et al.
Page 5 of 24
where higher values suggest noisier environments. Blanco [15] uses hedonic models
to analyze the connection between prices and noise levels in three different areas
in the United Kingdom. They suggest that when evaluating properties with similar
amenities the presence or absence of noise affects people's choices. In particular, the
way noise impinges on prices differ depending on the area, where in some there is a
positive correlation and in others a negative one. Brandt [16] investigates the same
hypothesis in the city of Hamburg, Germany by combining multiple sources such
as road, air and rail traffic noise pollution with hedonic models too. They highlight
the non-linear relationship among noise and price by stating that price decreases
significantly lower in areas with low levels of noise, as opposed to high noise level
areas where the decrease is more remarkable. Contrary to Brandt's work, Szczepan-
ska [17] study the noise effect on two rather dissimilar locations, with reference to
noise, in the city of Olsztyn, Poland. They indicate the existence of linear correla-
tion between prices and noise pollution which underlines the notion that location
can influence the noise-price connection in great measure.
Tsao and Lu [18] collect property data from the Ministry of the Interior of Taiwan
for the city of Taoyuan and enhances them with a five year period of noise pollution
data from the international airport of Taoyuan. The authors investigate the way
aviation noise impacts the real estate market of the city, due to heavy air traffic in
lower altitudes, with hedonic models. The models indicate that as the number of
flights increases on top of an area, which translates to more noisy conditions, the
prices of the corresponding properties decrease noticeably. Moreover, they measure
the rate of price decline in certain decibel ranges and conclude that for roughly 65dB
of noise due to air traffic the decrease in price can get to 2,356USD, where for more
polluted areas the decline reaches the amount of 3,622USD. Similarly, Morano [19]
study the area of Bari, Italy in order to link noise pollution to house prices, with a
total of 200 properties and noise information from the Strategic Noise Map of Bari
as well as perceptual views for the quality of an area with regards to noise from
residents. To measure the effect of noise, they employ a variation of a data-driven
technique known as Evolutionary Polynomial Regression, or ERP [20], referred to
as ERP-MOGA [21] which utilize genetic algorithms. The final results outline the
negative correlation between prices and noise levels, where highly polluted areas
lead to cheaper housing.
The methodology of the research literature that experimented with the feature
of noise in the housing price prediction problem is presented in Table 1. Most
of them use the conventional hedonic model to predict prices and investigate the
contribution of noise. However, there are more advanced techniques available to
use in terms of predicting accuracy. Also, there are new practices regarding the
interpretability of the model that are able to investigate even further how noise
affects the real estate market of a city. These two points are the primary differences
of the current work.
Noise Data Reconstruction
As previously stated, noise data are difficult to obtain because they require special-
ized equipment for precise measurements, as well as urban environmental specialists
capable of completing a task of this complexity. These data must include geograph-
ical references in a form of a coordinate system, mapping points or blocks on a
Kamtziridis et al.
Page 6 of 24
Table 1: Prediction methods used in the literature when incorporating noise
Paper
Blanco [15]
Brandt [16]
Tsao and Lu [18]
Morano [19]
Method
Hedonic Price Model
Hedonic Price Model
Hedonic Price Model
ERP-MOGA
map to certain noise values in decibels. As far as we know, there is no such data
openly available for the urban area of Thessaloniki, Greece. However, there are offi-
cial studies of noise pollution for Thessaloniki orchestrated by the Hellenic Ministry
of Environment and Energy[4]. The studies were conducted in 2015 for three major
municipalities of the urban area of Thessaloniki, namely Thessaloniki, Neapoli and
Kalamaria, with specialized equipment capable of measuring ground noise caused
by factors like vehicles and crowds, while additionally calculating aviation noise
produced by airplanes landing to or taking off at the nearby airport. The duration
of the studies were set to 46 consecutive days, capturing noise pollution at least
once every hour or, in cases, every 15 minutes. The final results were illustrated
on a heatmap, where discrete colors represent different noise ranges of 5 decibel
intervals. For each municipality, the noise is segmented into daytime and nighttime
noise and, in both cases, the data accumulate the overall noise by taking into ac-
count both traffic and aviation disturbances. Additionally, for Kalamaria there is a
separate heatmap representing only the aviation noise.
Idea and Approach
The aforementioned studies did not make public the underlying data that were used
to create the provided heatmaps. To overcome this problem, we propose a process for
reconstructing the initial noise data with a small error. It is important to state that
heatmaps used discrete colors mapped to specific small ranges of decibels as shown
in Tables 2a and 2b. This means that each color represents the entire range without
changing its tone. The ultimate goal is to be able to create the exact same maps by
utilizing the reconstructed data. More specifically, the new dataset will contain the
noise, in decibels, of a point given its latitude and longitude coordinates.
Table 2: Mapping of Noise Ranges to Colors
(a) Thessaloniki & Neapoli Ranges
Range
[40, 45) dB
[45, 50) dB
[50, 55) dB
[55, 60) dB
[60, 65) dB
[65, 70) dB
[70, 75) dB
[75, 80) dB
80+ dB
Color (RGB)
[182, 254, 191]
[255, 255, 0]
[254, 196, 71]
[253, 103, 2]
[255, 51, 50]
[152, 0, 51]
[174, 155, 219]
[1, 0, 251]
[1, 1, 65]
(b) Kalamaria Ranges
Range
[35, 40) dB
[40, 45) dB
[45, 50) dB
[50, 55) dB
[55, 60) dB
[60, 65) dB
[65, 70) dB
[70, 75) dB
[75, 80) dB
80+ dB
Color (RGB)
[80, 167, 50]
[14, 113, 49]
[255, 243, 59]
[172, 121, 78]
[255, 94, 55]
[192, 23, 18]
[138, 18, 19]
[144, 14, 102]
[40, 115, 183]
[10, 65, 121]
It is obvious that an approximation of the noise levels can be extracted through
the maps' colors. However, there is no spatial information in order to map each pixel
[4]https://ypen.gov.gr/perivallon/thoryvos-aktinovolies/chartografisi-thoryvou-poleodomikon-sygkrotimaton/
Kamtziridis et al.
Page 7 of 24
to the corresponding place on a geographic map. To resolve this, we use a technique
called Georeferencing [22], which attempts to relate digital representations of maps,
like the ones in the noise studies, to a ground system of geographic coordinates.
Geographic Information System (GIS) software tools are used to perform this task.
In our case, we use an open-source GIS software called QGIS[5], where by selecting
a certain amount of points on the actual map and the corresponding points on the
heatmap, we manage to align the two and, eventually, enhance the heatmap with
spatial characteristics.
The next part of the reconstruction process maps every pixel of the image to
a noise value in decibels based on its color. Even though the provided heatmaps
incorporate only discrete colors with no fading effects, the pixel-by-pixel analysis
introduces resolution restrictions, where many pixels cannot be mapped to a color
due to transitioning effects. These cases are found for the most part at the borders
where one color switches to another, as depicted in Figure 1. To address this problem
we can compute the difference between the color of such pixels and the predefined
color ranges [23]. When this difference is sufficiently small, we can assign noise values
of the corresponding color. If this calculation is done properly, the reconstruction
error will be small and, therefore, the data will be more accurate.
Figure 1: Color transition effects at the border of decibel ranges (60,
65] and (65, 70] in Thessaloniki's original noise heatmaps
One way of proceeding with the calculation is by using the Euclidean distance
of the two RGB values. The RGB format consists of 3 separate values ranging
from 0 to 255 indicating the amount of red, green and blue in a pixel. State-of-the-
art solutions discourage this approach because it does not take into consideration
how different these colors are perceived by the human eye [24]. The transition
effects on an image aim to smooth the leap from one color to another in terms of
human eye perception, which highlights the need of another metric. To overcome
this issue, the International Commission on Illumination (CIE) proposed a new
method, called ∆E∗, able to handle the perceptual non-uniformities of colors, using
the LAB format to represent colors. Similarly to RGB, the LAB format makes use
of 3 separate numbers to identify colors. The first one is the Lightness, ranging from
[5]https://www.qgis.org/en/site/
Kamtziridis et al.
Page 8 of 24
0 to 100, with value 0 defining black and value 100 defining white. The second is the
"A" component representing greenness to redness scale, ranging from -128 to +127.
Finally, the third is the "B" component which represents blueness to yellowness
following the range of the previous component.
We used the most recent version of the ∆E∗ method, called CIELAB2000. The
color comparison result is a number, where 0 means a complete match and as
the number increases, the difference between the colors increases too. To use this
method, one must carefully select the threshold after which the two colors will
be considered to be non-matching. After running some experiments, we set the
threshold to 20. As a consequence of the discreteness of colors on the heatmaps,
the threshold is not considered to be that crucial in our scenario, because the main
goal is to differentiate between the predefined ranges. Essentially, when the color of
a pixel matches a color range, this pixel is assigned the corresponding noise value.
Since our intention is to correlate housing prices with human perceived noise, we
choose to represent each noise range with its arithmetic mean. So, if a pixel color
matches the color of the 50-55 range, it will receive 52.5 as its noise value. The final
result will be sufficient to describe the noise perception of an area if we take into
account the "3dB rule" in the field of Acoustics. The rule states that during an
increase of 3 decibels, the sound energy is doubled and, thus, it is accepted as the
smallest difference that can be easily heard by most people [25]. For instance, the
average human will rarely notice a transition from 50 to 51 decibels or between 60
and 61.
Process
The reconstruction process consists of two phases. In the first phase, we scan the
image pixel-by-pixel and assign to each pixel the appropriate coordinates, as well as
its color. During the second phase, we calculate the color difference of each pixel with
the predefined color ranges. It is clear that not all pixels are important due to the
transitioning effects we mentioned earlier. For example, in cases where two ranges
of radically different colors are adjacent on the map, the transitioning effect will add
some pixels in between that probably will not match any color range. Additionally,
there are cases where the initial studies could not accurately receive measurements,
like the inside of buildings and at the sea. These pixels are not matched to any of
the available noise ranges and, hence, are dropped to declutter the data. Table 3
gives the structure of the final dataset.
Table 3: Final dataset structure
Type
float
float
int
int
int
float
Range
[-90, 90]
[-180, 180]
[0, 255]
[0, 255]
[0, 255]
[0, 85]
Features
latitude
longitude
red
green
blue
noise
These datasets can be used to create heatmaps that resemble the initial ones.
Even though most parts of the images were removed in the process, the remaining
locations are still great in number. This can be verified by considering the dataset
Kamtziridis et al.
Page 9 of 24
size in terms of number of rows in the second column of Table 4. To plot that many
points on a single map is exceedingly difficult due to memory constraints. At the
same time, the datasets hold spatial information that is way too dense, making
them really hard to work with. The dataset supports an accuracy in latitude and
longitude values to at least 5 decimals which in actual distances translates to 1.1
meters. This level of detail is unnecessary and superfluous for the purposes of this
work. To minimize the density of information to more practical levels, we utilize
tessellation. Through this method, the map is segmented into separate same-sized
squared tiles. We chose to tessellate the map by keeping only the four decimal points
of the coordinates. Thus, the accuracy decreases to a resolution of 10 meters that
is more manageable and adequate for our case. We group the points based on this
rule and aggregate their noise using the arithmetic mean to create a representative
indicator for the noise level of the given tile. This technique alters the shape of the
dataset as shown in the third column of Table 4 and allows us to plot the results
on a map.
Table 4: Dataset shapes
Dataset
Thessaloniki & Neapoli (Day)
Thessaloniki & Neapoli (Night)
Kalamaria (Day)
Kalamaria (Night)
Kalamaria Aviation (Day)
Kalamaria Aviation (Night)
# Rows
3,312,310
3,157,730
21,606,947
20,355,609
21,843,537
21,831,157
# Rows (tessellated)
197,445
189,046
109,245
104,070
110,111
109,736
Reduction
94%
94%
99.4%
99.4%
99.4%
99.4%
Results for Thessaloniki and Neapoli
Figure 2 shows the average daily noise for the areas of Thessaloniki and Neapoli,
ranging from 40dB to almost 85dB, for both the original and the reconstructed
versions. The noisiest parts are the main roads and the intersections that can ac-
commodate large numbers of vehicles. The two most distinguishable examples are
the East and West entrances of the city where the noise can reach a level of 80dB.
Also, it is visible the way that the noise spreads almost equally around these highly
polluted spots, which, in fact, increase the noise pollution of the surrounding area.
Besides the road network, one more part of the city that is apparently noisy is the
port, which is very big in size and greatly active during both daytime and night-
time. Furthermore, the correlation between road size, which leads to high traffic,
and the noise pollution can be validated in urban areas with narrow streets. A very
useful example is the area of "Upper Town" marked in Figure 2, which is one of
the oldest parts of the city where due to the increased elevation and the rough
terrain the roads are extremely narrow. This fact, except the restrictions it imposes
on the number of vehicles that can pass simultaneously, makes access difficult and
not appealing to drivers. This is one reason why it is one of the quietest places in
Thessaloniki. Figure 3 shows the average nightly noise in the same area in which,
although the noisiest and quietest places remain the same, the noise pollution levels
are much lower.
Results for Kalamaria
As in the previous subsection, Figure 5 shows the average daily noise for the area
of Kalamaria. Once again, the noisiest places are the main roads, while the quietest
Kamtziridis et al.
Page 10 of 24
Figure 2: Average Daily Noise in Thessaloniki/Neapoli
(a) Reconstructed
(b) Original
Figure 3: Average Nightly Noise in Thessaloniki/Neapoli
(a) Reconstructed
(b) Original
are those surrounded by low traffic streets. The yellow color indicates regions with
the maximum noise levels such as the core intersections. Contrary to the heatmaps
of the other two municipalities where the noise was almost entirely driven by the
road network, in Kalamaria there are certain zones with little or no road network
that are very noisy. This is caused due to air traffic, since the airline routes pass over
the vicinity in relatively low altitude and the turbines generate noise that can reach
over 100dB [26]. This effect is more recognizable at night (see Figure 6). Despite the
fact that the road network has minimal traffic, some areas are noisier compared to
others. The noise generated by airplanes is shown in Figure 7 and 8. These figures
are zoomed in a bit to improve readability and distinguish the street layout. The
aviation data can be of great interest both in research and in industry, so in this
paper, we provide a separate dataset for the aviation noise.
Kamtziridis et al.
Page 11 of 24
Implementation and Experimentation
Property Data
Investigating the correlation and influence of noise in housing prices requires a real
world housing prices dataset. For the purposes of this paper, we have utilized Open-
house[6]. Openhouse is a real estate platform operating in major cities of Greece. It
contains high quality information for a wide range of properties, considering mul-
tiple aspects of them. Since Openhouse is a data oriented platform, paying critical
attention to their service, they have provided Thessaloniki's properties in order to
experiment with the noise data reconstructed in the previous section. The data refer
to residential properties offered for sale that were listed on the platform in October
2022. Each property has the features mentioned in Table 5.
Table 5: Openhouse Property Features
Feature
Size
NumberOfRooms
Latitude
Longitude
EnergyEfficiencyId
ConstructionDate
SubTypeId
FloorLevelId
BasicHeatingTypeId
DoorFrameTypeId
Type
Float
Int
Float
Float
Categorical
Datetime
Categorical
Categorical
Categorical
Categorical
Missing Values
0%
0%
0%
0%
0%
13.75%
0.17%
0.30%
30.71%
31.77%
Imputation
-
-
-
-
-
Mean
Mode
Rounded mean
Mode
Mode
The majority of the features are self-explanatory with the exception of 'Sub-
TypeId' and 'DoorFrameTypeId'. 'SubTypeId' refers to the structural subtype of
the residential property receiving values like 'apartment' and 'studio' among others.
'DoorFrameTypeId' corresponds to the type of door frames a property has, such
as 'synthetics' and 'aluminum' to name a few. We have performed an exploratory
data analysis on the given dataset to locate potential outliers and verify the overall
integrity. Outlier detection was done with the interquartile range (IQR) method.
Using IQR in the 'NumberOfRooms' feature led to an upper limit of 7 rooms, which
decreased the dataset size by no more than 1%. Similarly, in the 'Size' feature, the
upper limit was 300m2, which consequently reduced the size by almost 8%. Addi-
tionally, price outliers were removed too, by forcing a price range between 10,000
and 500,000 euros. Eventually, the filtered set consists of 2,014 properties. The miss-
ing values were filled according to Table 5, where different aggregations were used
depending on the data type. It must be noted that although 'DoorFrameTypeId'
and 'BasicHeatingTypeId' features are missing approximately 30% of their values,
they are considered of significant importance in the housing price prediction process
based on the domain knowledge provided by Openhouse. Therefore, we decided to
fill these too, and check their influence in practice. As far as the encoding of features,
the 'EnergyEfficiencyId' and 'FloorLevelId' were encoded using incremental indices
because they are ordinal categorical features. The other categorical features are
nominal so one-hot and binary encoding [27] were used and compared. The one-hot
encoding achieved better results and, thus, used in the following experiments.
[6]https://openhouse.gr
Kamtziridis et al.
Page 12 of 24
Experiments
To investigate the correlation between housing prices and noise we utilize tree-
based models that perform well in similar cases [5, 12, 14]. In particular, we use
decision trees, random forest, XGBoost and light gradient boosting models. To
verify the impact of noise we employ standard interpretability methods like feature
importance, partial dependence [28, 29] and permutation importance [30] plots.
To shed even more light on interpretability, we employ other advanced techniques
such as local interpretable model-agnostic explanations, or LIME, [31] and Shapley
additive explanations, or SHAP, [32]. The hyperparameter tuning for each model
was accomplished with Bayesian optimization [33], which outperformed grid search,
and 5-fold cross-validation.
The experiments were structured in three different axes. The first one corresponds
to the procedure followed to assign the appropriate noise value to each property of
the dataset. We choose to average the noise within a certain radius around each
property, where the actual radius distance is manually selected. The second one
refers to the main noise characteristics we can use when assigning a noise value to
a property. These characteristics are the following:
• One feature for the average day noise and one for the average night noise (I)
• One feature which averages both day and night noise (II)
• One feature for the average day noise (III)
• One feature for the average night noise (IV)
The third and last experimental component is the area where we examine the effect
of noise in pricing. The presence of noise can be translated differently depending on
the urban attributes of each part of a city. Good examples that demonstrate this
behavior are city centers, where the noise levels are usually increased compared to
other places in the same city as a consequence of the high road and pedestrian traffic.
In turn, the traffic is caused by the commercial nature of the center since most of
the provided services and amenities are located there. This, in fact, gives extra value
to the properties of this area which makes them more expensive. However, this is
not the case in other parts of the city. For instance, in the suburbs, where there are
mostly residential properties of families, the absence of noise is generally considered
to be a positive factor that can raise the prices. Taking these into consideration,
we focus on three different areas of Thessaloniki with contrasting urban features:
the city center (A), Triandria, Toumpa and Harilaou areas (B) and Kalamaria area
(C), as they are depicted in Figure 4. Another reason why we chose these areas is
their difference in terms of price-noise correlation. This is illustrated in Figure 9,
where the correlation between price per m2 and noise is plotted for the entire area
of interest as well as each individual area. Even though it is difficult to imply any
kind of correlation when looking at the entire area of Thessaloniki, that is not the
case for areas A and C, where their shapes indicate some sort of correlation. Area
B follows the pattern of Figure 9a and was chosen as a representative subset of the
entire area.
Results
The final results are organized into two different groups based on the noise radius
that was used. These radiuses were set to 100 and 50 meters. For each group all four
Kamtziridis et al.
Page 13 of 24
Figure 4: Areas of Thessaloniki
models were trained on the three areas of Thessaloniki for all four noise character-
istics described in the previous section. Due to the area segmentation, the number
of properties has declined, leading to a concern about the sufficiency of the train-
ing set. To make sure the data were enough to be able to make valid conclusions,
we plotted the learning curves of each model and verified that the curves reach
a plateau. Also, because of the large number of different experimental combina-
tions based on the experimentation axes we mentioned previously, we decided to
omit showcasing every examination of the noise characteristics and keep, only, the
one that performs the best. We should point out that when changing noise radius
there are circumstances where a property can end up without a noise value, espe-
cially when the radius decreases. In such cases, these properties are removed from
the dataset and this is why there seems to be inconsistencies in the results when
switching from one radius to another, even without incorporating the noise data.
Table 6: Results for radius set to 100m
A
C
B
MAE MAPE Noise MAE MAPE Noise MAE MAPE Noise
0.15
28919
0.144
28888
0.158
32572
0.173
31477
0.181
32519
0.182
31759
0.238
35264
0.25
31771
31511
30141
32752
31139
38922
40389
48802
52077
22504
19189
21618
22715
24259
24481
28966
30671
0.223
0.233
0.258
0.258
0.267
0.259
0.277
0.271
0.138
0.128
0.151
0.138
0.165
0.173
0.209
0.225
-
IV
-
IV
-
II
-
III
-
II
-
II
-
II
-
III
-
I
-
II
-
II
-
II
Model
XGBoost
XGBoost †
LGBM
LGBM †
RF
RF †
DT
DT †
†:Indicates the use of noise.
Bold text marks the best score across all models for a given area.
The results of Table 6, where the radius is set to 100 meters, indicate a clear
dominance of the XGBoost model in terms of both mean squared error (MAE) and
mean absolute percentage error (MAPE) values. The performance gain in each area
varies as well as the noise characteristics that are used. More precisely, in area A
there is no significant improvement, while in the other two areas noise improves both
scores radically. The LGBM model benefits from noise only in area C. The random
Kamtziridis et al.
Page 14 of 24
Table 7: Results for radius set to 50m
A
C
B
MAE MAPE Noise MAE MAPE Noise MAE MAPE Noise
0.15
28919
0.15
28001
0.158
32572
0.161
30216
0.182
31785
0.183
31380
0.27
35319
0.191
35453
22504
20858
21618
22408
24224
24028
33561
27756
31511
31370
32752
29872
38886
39626
48802
50290
0.223
0.229
0.258
0.241
0.256
0.254
0.279
0.271
0.138
0.132
0.151
0.13
0.165
0.168
0.209
0.209
-
III
-
III
-
IV
-
II
-
I
-
IV
-
I
-
III
-
I
-
III
-
II
-
III
Model
XGBoost
XGBoost †
LGBM
LGBM †
RF
RF †
DT
DT †
forest and decision tree models are unable to make use of noise with the exception of
area A where both are boosted. When the radius is set to 50 meters in Table 7, we
observe the same pattern where the hierarchy between the models remains the same.
The main differences appear to be the LGBM model that achieves finer results than
XGBoost in area C and, also, the decision tree which is crucially improved with the
use of noise in area B. Regarding the best performing models, even though setting
the radius to 50 meters can reduce the MAE in areas A and C, the MAPE does not
change remarkably. Furthermore, decreasing the radius exacerbates the results in
area B, so the radius switch does not necessarily enhance the overall performance
of the model.
To measure the extent by which noise increases model performance and inves-
tigate the correlation between noise and price through interpretability evaluation
methods, for the best performing models of each area, we plot the feature impor-
tance, permutation importance and partial dependence plots together with LIME
and SHAP plots. We must mention that in permutation importance plots the mea-
sure of importance in XGBoost refers to the average gain across all splits a feature
is used in, while in LGBM refers to the number of times a feature is used to split
the data.
Area A
For the center area of Thessaloniki XGBoost is the best performing model, when
radius is set to 50 meters. In this model, both average day and night noise are used
as features in the training. The average day noise is ranked in the feature impor-
tance plot of Figure 10 almost as high as the construction date, while the night
noise is located at a couple of ranks below. In the same plot, the 'SubTypeId 4',
which denotes properties classsified as studios, is marked as the most important fea-
ture. The partial dependence plot in Figure 11a shows that property prices increase
as the noise increases, which confirms the initial claim that city centers evaluate
noise positively, which most probably occurs due to their commerciality. This can
be verified by the LIME weights in Figure 13 where high noise values correspond to
bigger weights. SHAP values in the beeswarm of Figure 12 highlights this relation-
ship too, since the left hand-side is mostly colored with blue (low values), while the
right hand-side with red (high values). At last, in Figure 11b the night noise does
not appear to act on prices at the quieter areas. However, as we progress to noisier
parts, night noise has a negative impact on pricing. This is not strange because
during night time the commerciality factor is not that crucial.
Kamtziridis et al.
Page 15 of 24
Area B
For the Triandria, Toumpa and Harilaou areas the best results are demonstrated,
again, by XGBoost with a noise radius of 100 meters. As in the previous area, this
model utilizes both average day and night noise values. The night noise has similar
importance to features such as the location and the heating type as it is depicted
in Figure 14. In the same figure, the permutation importance plot showcases that
the overall noise affects at some degree the accuracy of the model. Even though, at
first, day and night noise do not seem to influence prices, after a certain threshold
in decibels they do have a negative effect on prices which contradicts the results
of area A. One of the possible reasons why noise does not cause price changes in
the initial decibel ranges is the fact that some parts of area B are close to the city
center and, hence, noise is not directly considered as a bad attribute. Once more
Figures 17 and 16 reinforces the previous findings about the generally negative
correlation between noise and price. It should be noted that area B is the only area
where setting the radius to 100 meters leads to better results when compared to
setting it to 50 meters. This differentiation can be attributed to the fact that area B
is the only one located far from the coastline. Seaside properties are notably more
expensive than the rest, which makes property prices' distribution less uniform.
In such scenarios, using a smaller radius can help the model recognize these non-
uniformities. Due to area's B distance from the sea, this does not occur, making the
selection of a bigger radius a better choice.
Area C
In the Kalamaria area, the LGBM model when trained with a noise radius of 50
meters while taking into consideration only the average day noise achieves the best
scores. The performance gain in terms of MAE is at approximately 2.880 euros and
for MAPE marginally over 2%. In particular, the noise is ranked almost as high
as 'Size' with regard to importance in Figure 18. This area is located far from the
center and as a consequence the noise appears to influence price negatively at most
noise ranges. In Figure 19a, the price declines almost linearly as we move to more
noisy parts of the area, while LIME weights in Figure 19b indicate the preference
of the model to assign higher prices to properties with relatively low surrounding
noise. Once more, the SHAP values of Figure 20 confirm the aforementioned ob-
servations, where high average day noise values cause price drops and low average
noises escalate prices. As far as the noise characteristic used, one plausible reason
why the model chooses to incorporate only the day noise is that contrary to the
previous areas, Kalamaria includes also the aviation noise. As it can be seen by
the corresponding heatmaps, aviation noise during night increases the overall noise
which at some extend narrows the gap between day and night noise. This means that
the two noise features are more correlated and, thus, one of them can potentially
be redundant.
Discussion and Conclusion
The main goal of this paper was to investigate how urban noise impacts residential
property prices in the area of Thessaloniki. Currently, there is no publicly available
spatial data regarding noise for the area of interest. Therefore, the first part of this
Kamtziridis et al.
Page 16 of 24
work attempts to create a general purpose dataset indicating the sense of noise
based on coordinates by taking advantage of official and public studies conducted
by the Hellenic Ministry of Environment and Energy.
This new dataset is combined with the properties of the Openhouse platform
to train tree-based machine learning models in order to verify the importance of
noise in housing price estimates. The assumption that noise might be translated
differently depending on the location of the property led us to focus the experiments
on three separate regions of Thessaloniki with dissimilar characteristics. XGBoost
and LGBM models attain the best results which first of all confirm that noise, as a
matter of fact, influences prices and, secondly, it can affect some locations positively
while others negatively. More specifically, property prices in the city center as well
as locations in its vicinity, do increase as noise increases, which is probably the
aftereffect of the overall commerciality of the area. In contrast, properties located
far from the center are impacted negatively by noise. This makes sense considering
that in decentralized areas, such as suburbs, there are mainly houses of families
where quietness is more appreciated.
Besides the further research that can be conducted around this topic with different
models, different property types and features, the newly reconstructed noise dataset
can be used wherever needed for commercial projects and researches that are, even,
not real estate related, since it is a general purpose sense of noise set.
Kamtziridis et al.
Page 17 of 24
Appendix A: Reconstructed Heatmaps
Figure 5: Average Daily Noise in Kalamaria
Figure 6: Average Nightly Noise in Kalamaria
Figure 7: Average Daily Aviation Noise in Kalamaria
Kamtziridis et al.
Page 18 of 24
Figure 8: Average Nightly Aviation Noise in Kalamaria
Appendix B: Correlation Plots
Figure 9: Correlation Between Price/m2 and Noise for Different Areas
(a) Entire Area of Thessaloniki
(b) Center (A)
(c) Triandria, Toumpa and Harilaou (B)
(d) Kalamaria (C)
Kamtziridis et al.
Page 19 of 24
Appendix C: Result Plots
Figure 10: Feature Importance & Permutation Importance for Area A
Figure 11: Partial Dependence Plots for Area A
(a) Day Noise
(b) Night Noise
Figure 12: SHAP Plot for Area A
Kamtziridis et al.
Page 20 of 24
Figure 13: LIME Plots for Area A
(a) Day Noise
(b) Night Noise
Figure 14: Feature Importance & Permutation Importance for Area B
Figure 15: Partial Dependence Plots for Area B
(a) Day Noise
(b) Night Noise
Kamtziridis et al.
Page 21 of 24
Figure 16: SHAP Plot for Area B
Figure 17: LIME Plots for Area B
(a) Day Noise
(b) Night Noise
Figure 18: Feature Importance & Permutation Importance for area C
Kamtziridis et al.
Page 22 of 24
Figure 19: Partial Dependence and LIME Plots for Area C
(a) Partial Dependence (day noise)
(b) LIME Weights (day noise)
Figure 20: SHAP Plot for Area C
Acknowledgements
The authors thank to Anna-Maria Feneri for her helpful comments.
Abbreviations
DT, Decision Trees; GIS, Geographic Information System; IQR, Interquartile Range; LGBM, Light Gradient
Boosting Models; LIME, Local Interpretable Model-Agnostic Explanations; MAPE, Mean Absolute Percentage
Error; MAE, Mean Absolute Error; RF, Random Forest; SHAP, Shapley Additive Explanations; XGBoost, Extreme
Gradient Boosting.
Competing interests
The authors declare that they have no competing interests.
Availability of data and materials
All data generated or analyzed during this study are included in this published article.
Authors' contributions
Conceptualization: GK, GT; Data collection: GK; Formal analysis: GK, Investigation: GK, Writing original
manuscript: GK, GT, DV. All authors read and approved the final manuscript.
Author details
1Department of Informatics, Aristotle University of Thessaloniki, Thessaloniki, GR. 2Department of Informatics,
Aristotle University of Thessaloniki, Thessaloniki, GR.
Kamtziridis et al.
Page 23 of 24
References
1. Truong, Q., Nguyen, M., Dang, H., Mei, B.: Housing price prediction via improved machine learning
techniques. Procedia Computer Science 174, 433–442 (2020). doi:10.1016/j.procs.2020.06.111. 2019
International Conference on Identification, Information and Knowledge in the Internet of Things
2. Nadai, M.D., Lepri, B.: The economic value of neighborhoods: Predicting real estate prices from the urban
environment. 2018 IEEE 5th International Conference on Data Science and Advanced Analytics (DSAA),
323–330 (2018)
3. Baldominos, A., Blanco, I., Moreno, A., Iturrarte, R., Bern ́ardez, ́O., Afonso, C.: Identifying real estate
opportunities using machine learning. Applied Sciences 8(11), 2321 (2018). doi:10.3390/app8112321
4. Park, B., Bae, J.K.: Using machine learning algorithms for housing price prediction: The case of fairfax county,
virginia housing data. Expert Systems with Applications 42(6), 2928–2934 (2015).
doi:10.1016/j.eswa.2014.11.040
5. Truong, Q., Nguyen, M., Dang, H., Mei, B.: Housing price prediction via improved machine learning
techniques. Procedia Computer Science 174, 433–442 (2020). doi:10.1016/j.procs.2020.06.111. 2019
International Conference on Identification, Information and Knowledge in the Internet of Things
6. Chen, T., Guestrin, C.: XGBoost. In: Proceedings of the 22nd ACM SIGKDD International Conference on
Knowledge Discovery and Data Mining. ACM, ??? (2016). doi:10.1145/2939672.2939785.
https://doi.org/10.1145%2F2939672.2939785
7. Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., Liu, T.-Y.: Lightgbm: A highly efficient
gradient boosting decision tree. In: Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R.,
Vishwanathan, S., Garnett, R. (eds.) Advances in Neural Information Processing Systems, vol. 30. Curran
Associates, Inc., ??? (2017).
https://proceedings.neurips.cc/paper/2017/file/6449f44a102fde848669bdd9eb6b76fa-Paper.pdf
Imran, Zaman, U., Waqar, M., Zaman, A.: Using machine learning algorithms for housing price prediction: The
case of islamabad housing data. Fundamenta Informaticae 1, 11–23 (2021). doi:10.22995/scmi.2021.1.1.03
8.
9. Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001). doi:10.1023/A:1010933404324
10. Wolpert, D.H.: Stacked generalization. Neural Networks 5(2), 241–259 (1992).
doi:10.1016/S0893-6080(05)80023-1
11. Xue, C., Ju, Y., Li, S., Zhou, Q., Liu, Q.: Research on accurate house price analysis by using gis technology and
transport accessibility: A case study of xi'an, china. Symmetry 12(8) (2020). doi:10.3390/sym12081329
12. Kang, Y., Zhang, F., Peng, W., Gao, S., Rao, J., Duarte, F., Ratti, C.: Understanding house price appreciation
using multi-source big geo-data and machine learning. Land Use Policy 111, 104919 (2021).
doi:10.1016/j.landusepol.2020.104919
13. Chiarazzo, V., Caggiani, L., Marinelli, M., Ottomanelli, M.: A neural network based model for real estate price
estimation considering environmental quality of property location. Transportation Research Procedia 3,
810–817 (2014). doi:10.1016/j.trpro.2014.10.067. 17th Meeting of the EURO Working Group on
Transportation, EWGT2014, 2-4 July 2014, Sevilla, Spain
14. Zou, G., Lai, Z., Li, Y., Liu, X., Li, W.: Exploring the nonlinear impact of air pollution on housing prices: A
machine learning approach. Economics of Transportation 31, 100272 (2022). doi:10.1016/j.ecotra.2022.100272
15. Blanco, J.C., Flindell, I.: Property prices in urban areas affected by road traffic noise. Applied Acoustics 72(4),
133–141 (2011). doi:10.1016/j.apacoust.2010.11.004
16. Brandt, S., Maennig, W.: Road noise exposure and residential property prices: Evidence from hamburg.
Transportation Research Part D: Transport and Environment 16(1), 23–30 (2011).
doi:10.1016/j.trd.2010.07.008
17. Szczepa ́nska, A., Senetra, A., Wasilewicz-Pszcz ́o(cid:32)lkowska, M.: The effect of road traffic noise on the prices of
residential property – a case study of the polish city of olsztyn. Transportation Research Part D: Transport and
Environment 36, 167–177 (2015). doi:10.1016/j.trd.2015.02.011
18. Tsao, H.-C., Lu, C.-J.: Assessing the impact of aviation noise on housing prices using new estimated noise
value: The case of taiwan taoyuan international airport. Sustainability 14(3) (2022). doi:10.3390/su14031713
19. Morano, P., Tajani, F., Di Liddo, F., Dar`o, M.: Economic evaluation of the indoor environmental quality of
buildings: The noise pollution effects on housing prices in the city of bari (italy). Buildings 11(5) (2021).
doi:10.3390/buildings11050213
20. Bruno, D.E., Barca, E., Goncalves, R.M., de Araujo Queiroz, H.A., Berardi, L., Passarella, G.: Linear and
evolutionary polynomial regression models to forecast coastal dynamics: Comparison and reliability assessment.
Geomorphology 300, 128–140 (2018). doi:10.1016/j.geomorph.2017.10.012
21. Giustolisi, O., Savic, D.: Advances in data-driven analyses and modelling using epr-moga. JOURNAL OF
HYDROINFORMATICS 11, 225–236 (2009). doi:10.2166/hydro.2009.017
22. Yao, X.A.: Georeferencing and geocoding. In: Kobayashi, A. (ed.) International Encyclopedia of Human
Geography (Second Edition), Second edition edn., pp. 111–117. Elsevier, Oxford (2020).
doi:10.1016/B978-0-08-102295-5.10548-7.
https://www.sciencedirect.com/science/article/pii/B9780081022955105487
23. Sharma, G., Wu, W., Dalal, E.N.: The ciede2000 color-difference formula: Implementation notes,
supplementary test data, and mathematical observations. Color Research and Application 30, 21–30 (2005)
24. Mokrzycki, W., Tatol, M.: Perceptual difference in l * a * b * color space as the base for object colour
identification. (2009). doi:10.13140/2.1.1160.2241
25. Long, M.: 3 - human perception and reaction to sound. In: Long, M. (ed.) Architectural Acoustics (Second
Edition), Second edition edn., pp. 81–127. Academic Press, Boston (2014).
doi:10.1016/B978-0-12-398258-2.00003-9.
https://www.sciencedirect.com/science/article/pii/B9780123982582000039
26. Konopka, W., Pawlaczyk-(cid:32)Luszczy ́nska, M., ́Sliwi ́nska-Kowalska, M.: The influence of jet engine noise on hearing
of technical staff. Med Pr 65, 583–92 (2014). doi:10.13075/mp.5893.00045
Kamtziridis et al.
Page 24 of 24
27. Potdar, K., Pardawala, T.S., Pai, C.D.: A comparative study of categorical variable encoding techniques for
neural network classifiers. International journal of computer applications 175(4), 7–9 (2017)
28. Hastie, T., Tibshirani, R., Friedman, J.: The Elements of Statistical Learning. Springer Series in Statistics.
Springer, New York, NY, USA (2001)
29. Greenwell, B.M., Boehmke, B.C., McCarthy, A.J.: A Simple and Effective Model-Based Variable Importance
Measure. arXiv (2018). doi:10.48550/ARXIV.1805.04755. https://arxiv.org/abs/1805.04755
30. Altmann, A., Tolosi, L., Sander, O., Lengauer, T.: Permutation importance: A corrected feature importance
measure. Bioinformatics (Oxford, England) 26, 1340–7 (2010). doi:10.1093/bioinformatics/btq134
31. Ribeiro, M.T., Singh, S., Guestrin, C.: "Why Should I Trust You?": Explaining the Predictions of Any Classifier.
arXiv (2016). doi:10.48550/ARXIV.1602.04938. https://arxiv.org/abs/1602.04938
32. Lundberg, S., Lee, S.-I.: A Unified Approach to Interpreting Model Predictions. arXiv (2017).
doi:10.48550/ARXIV.1705.07874. https://arxiv.org/abs/1705.07874
33. Snoek, J., Larochelle, H., Adams, R.P.: Practical Bayesian Optimization of Machine Learning Algorithms. arXiv
(2012). doi:10.48550/ARXIV.1206.2944. https://arxiv.org/abs/1206.2944
|
|
http://arxiv.org/abs/2302.13029v1 | 2023-02-25T09:03:05 | 2023-02-25T09:03:05 | MASS: Mobility-Aware Sensor Scheduling of Cooperative Perception for
Connected Automated Driving | Timely and reliable environment perception is fundamental to safe and
efficient automated driving. However, the perception of standalone intelligence
inevitably suffers from occlusions. A new paradigm, Cooperative Perception
(CP), comes to the rescue by sharing sensor data from another perspective,
i.e., from a cooperative vehicle (CoV). Due to the limited communication
bandwidth, it is essential to schedule the most beneficial CoV, considering
both the viewpoints and communication quality. Existing methods rely on the
exchange of meta-information, such as visibility maps, to predict the
perception gains from nearby vehicles, which induces extra communication and
processing overhead. In this paper, we propose a new approach, learning while
scheduling, for distributed scheduling of CP. The solution enables CoVs to
predict the perception gains using past observations, leveraging the temporal
continuity of perception gains. Specifically, we design a mobility-aware sensor
scheduling (MASS) algorithm based on the restless multi-armed bandit (RMAB)
theory to maximize the expected average perception gain. An upper bound on the
expected average learning regret is proved, which matches the lower bound of
any online algorithm up to a logarithmic factor. Extensive simulations are
carried out on realistic traffic traces. The results show that the proposed
MASS algorithm achieves the best average perception gain and improves recall by
up to 4.2 percentage points compared to other learning-based algorithms.
Finally, a case study on a trace of LiDAR frames qualitatively demonstrates the
superiority of adaptive exploration, the key element of the MASS algorithm. | [
"Yukuan Jia",
"Ruiqing Mao",
"Yuxuan Sun",
"Sheng Zhou",
"Zhisheng Niu"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13029v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13029v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.RO",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.RO",
"cs.LG",
"cs.NI"
] | 1
MASS: Mobility-Aware Sensor Scheduling of
Cooperative Perception for Connected
Automated Driving
Yukuan Jia, Ruiqing Mao, Yuxuan Sun, Member, IEEE, Sheng Zhou, Member, IEEE,
and Zhisheng Niu, Fellow, IEEE
3
2
0
2
b
e
F
5
2
]
O
R
.
s
c
[
1
v
9
2
0
3
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-Timely and reliable environment perception is fun-
damental to safe and efficient automated driving. However,
the perception of standalone intelligence inevitably suffers from
occlusions. A new paradigm, Cooperative Perception (CP), comes
to the rescue by sharing sensor data from another perspective,
i.e., from a cooperative vehicle (CoV). Due to the limited commu-
nication bandwidth, it is essential to schedule the most beneficial
CoV, considering both the viewpoints and communication quality.
Existing methods rely on the exchange of meta-information,
such as visibility maps, to predict the perception gains from
nearby vehicles, which induces extra communication and pro-
cessing overhead. In this paper, we propose a new approach,
learning while scheduling, for distributed scheduling of CP. The
solution enables CoVs to predict the perception gains using past
observations, leveraging the temporal continuity of perception
gains. Specifically, we design a mobility-aware sensor scheduling
(MASS) algorithm based on the restless multi-armed bandit
(RMAB) theory to maximize the expected average perception
gain. An upper bound on the expected average learning regret is
proved, which matches the lower bound of any online algorithm
up to a logarithmic factor. Extensive simulations are carried out
on realistic traffic traces. The results show that the proposed
MASS algorithm achieves the best average perception gain and
improves recall by up to 4.2 percentage points compared to
other learning-based algorithms. Finally, a case study on a trace
of LiDAR frames qualitatively demonstrates the superiority of
adaptive exploration, the key element of the MASS algorithm.
Index Terms-Cooperative perception, mobility-aware, sensor
scheduling, restless multi-armed bandit.
I. INTRODUCTION
Automated driving (AD) has received fast-growing atten-
tions in recent years. Among the enabling technologies of AD,
reliable and timely perception is the basis for safety and energy
efficiency. Much effort has been made to improve the object
detector, using state-of-the-art neural networks and multi-
modality sensors [2]–[5]. However, the standalone perception
has an intrinsic flaw because it can only provide line-of-sight
(LoS) information with onboard sensors, and thus the traffic
participants occluded in the blind zone cannot be detected.
Thanks to the Vehicle-to-Everything (V2X) communication
technology [6], vehicles can communicate with each other and
Yukuan Jia, Ruiqing Mao, Sheng Zhou, and Zhisheng Niu are with Beijing
National Research Center for Information Science and Technology, Depart-
ment of Electronic Engineering, Tsinghua University, China. Emails: {jyk20,
mrq20}@mails.tsinghua.edu.cn, {sheng.zhou, niuzhs}@tsinghua.edu.cn.
Yuxuan Sun is with School of Electronic and Information Engineering,
Beijing Jiaotong University, China. Email: [email protected]
Part of this work has been published in IEEE ICC 2022 [1].
a wide range of V2X applications are made possible, including
cooperative perception (CP). By exchanging sensor data with
other cooperative vehicles (CoVs), the occluded objects can be
detected, and the perception quality is essentially improved.
There are three levels of CP, namely raw-level, feature-level,
and object-level, differentiated by the type of the shared sensor
data. In its primitive form, object-level CP, only the list of
detected objects is broadcast to other CoVs. The messages
are relatively lightweight, but the loss of details in sensor
data causes difficulties in merging noisy, discrepant results
from multiple sources [7]. In the raw-level CP [8], [9], raw
sensor data such as LiDAR point clouds and images are
transmitted to other CoVs, which preserves complete context
information. However, the data volume to be transmitted in
the raw-level CP is extremely high. Feature-level CP [10],
[11] strikes a balance between the above two in terms of the
communication load, via extracting key features using neural
networks. As reported in Refs. [8], [12], there are hard objects
unrecognizable from any viewpoint alone but can be identified
only when the raw data are aggregated. This implies the
significance of context information and calls for an advanced
CP system framework where more comprehensive sensor data,
in raw-level or feature-level, are shared among CoVs.
Current research on CP has been focusing on designing
novel fusion architectures [11], [13], with limited attention
paid to practical challenges such as the scarce V2X com-
munication bandwidth and the high mobility of vehicles. For
Cellular-V2X technology, the allocated bandwidth is 20MHz
in China and 30MHz in US [14]. However, the real-time
streaming of high-definition video or LiDAR point clouds
takes several megabytes per second for one single link, which
is not scalable subject to the total bandwidth constraint. It is
hardly feasible for the V2X network to support raw-level or
feature-level sensor data broadcast by all CoVs. Therefore, the
scheduling of sensors in unicast CP, i.e., whom to cooperate
with, is a challenging and important problem yet to solve.
High mobility is another under-addressed issue in the litera-
ture of CP. When multiple CoVs are available, it is challenging
to accurately determine the perception gain of a viewpoint
due to unclear occlusion relationships, heterogeneous sensor
qualities, as well as the black-box nature of neural networks.
The movements of CoV also lead to a dynamic candidate CoV
set over time-varying network topologies. Many architectures
rely on extra metadata messages to gather clues about the
perception gain of additional sensors. For example, the future
trajectories [9] or confidence maps [13] are exchanged for
spatial reasoning and perception gain prediction. However,
the sensor viewpoints and wireless channels are time-varying,
making the prediction stale very quickly.
These challenges motivate our solution,
learning while
scheduling, in the framework of online learning. Specifically,
we harness the mobility and make scheduling decisions based
on the historical perception gains from other CoVs' sensor
data, with notably less scheduling overhead compared to
existing methods. This leads to a Multi-Armed Bandit (MAB)
typed problem, which requires exploring to learn about the
environment and simultaneously exploiting the empirically op-
timal action. Its basic form, with stationary reward distribution,
is well solved by the Upper Confidence Bound (UCB) algo-
rithm with performance guarantee [15]. The UCB algorithm
has been applied in a wide range of areas, including edge
computing [16] and mobility management [17] in wireless
networks. Our problem, on the other hand, falls within the
domain of Restless Multi-Armed Bandit (RMAB) [18], where
the rewards are constantly evolving due to mobility.
To deal with the RMAB problem, discounted UCB and
sliding-window UCB [19] are adapted from the classic
UCB algorithm by introducing forgetting mechanisms. An
activation-based policy is proposed for Brownian restless
bandit [20], which leverages statistical assumptions of re-
wards. Moreover, the Exp3 [21] algorithm combats adversarial
rewards that can change arbitrarily. However, none of the
existing methods is engaged with an ever-changing set of CoV
candidates, as is the case when CoVs have different destina-
tions. Our main contributions are summarized as follows:
1) We propose a learning while scheduling framework based
on the RMAB theory for the distributed scheduling of
decentralized CP. Our framework enjoys the advantage of
negligible communication and processing overhead, com-
pared to existing solutions that require frequent exchange
of meta-information.
2) A novel mobility-aware sensor scheduling (MASS) algo-
rithm is proposed to leverage the dynamics in perception
gains due to vehicular mobility. It is also proved that
MASS effectively balances exploration and exploitation
with a dynamic set of CoV candidates, where the learning
regret matches the lower bound of any online algorithm
up to a logarithmic factor.
3) Extensive simulations along with supporting empirical
studies are carried out, showing that the proposed MASS
algorithm outperforms other online scheduling policies. A
case study on a trace of LiDAR frames is also provided to
qualitatively illustrate the benefit of adaptive exploration,
which serves as the key element of MASS.
2
II. RELATED WORK
A. Dataflow of CP
There is a wide range of CP systems designed with different
architectures. In this subsection, we divide them into three
categories based on the dataflow of sensor data, namely
broadcast, centralized, and decentralized.
Broadcast. It is most straightforward to share one's sensor
data by broadcasting to its neighbor CoVs. The broadcast of
object-level data has been standardized as collective perception
message (CPM) [22] by ETSI, but suffers from poor scalability
due to severe wireless interference and processing burden in
the current C-V2X network [23]. Other new designs require
the broadcast of bird eye's view (BEV) features, and the
method of data fusion from multiple sources has been a
research focus. For example, DiscoNet [24] is a teacher-
student framework to learn the pose-aware, attention-based
merging via knowledge distillation, where raw-level CP guides
the feature-level CP. A vision transformer-based architecture is
proposed to capture the inter-agent relationships in V2X-ViT
[25]. V2VNet [11] leverages graph neural networks (GNN) to
achieve a multi-round aggregation of compressed feature data
among nearby CoVs. However, the volume of feature data still
poses a major challenge for the V2X network, particularly
subject to the limited data rate of broadcast transmission.
the RSU can broadcast
Centralized. Road side units (RSUs) are deployed in the
intelligent transportation system to provide a holistic, supe-
rior viewpoint from above, especially at urban intersections.
Therefore,
its detection results to
nearby CoVs. Following this idea, VIPS [26] specializes in
object fusion based on efficient matching of graph structures,
handling the time asynchrony and localization error. On the
other hand, the RSU can also serve as a fusion center to
aggregate CPMs from nearby CoVs and broadcast the merged
results [27]. Moreover, compressed raw point clouds and
features can also be transmitted to the edge server to perform
data fusion and detection, as in EMP [28] and VINet [29].
Although RSU is very effective in assisting perception, the
deployment is costly and it is impossible to cover everywhere.
Decentralized. Without a fusion center, the sensor data
are exchanged in a decentralized, on-demand, and unicast
manner among CoVs, which is more bandwidth-efficient than
broadcast. Decentralized CP can be realized in two different
ways. In one way, a global scheduler determines the communi-
cation topology among CoVs based on the estimated rewards
provided by the CoVs [9]. The transmission decision could
also be determined independently by the CoVs themselves
with locally available information [13]. In the following sub-
section, we review some recent works on the scheduling of
decentralized CP.
The rest of this paper proceeds as follows. We first brief
on the related works in Section II. Then the system model
and problem formulation are introduced in Section III. In
Section IV, the MASS algorithm is proposed, followed by the
performance analysis conducted in Section V. The experiment
results are presented in Section VI, and the paper is concluded
in Section VII.
B. Scheduling of Decentralized CP
Under network bandwidth constraints, the sensor scheduling
problem of CP arises naturally. AutoCast [9] predicts the vis-
ibility and relevance of detected objects to other CoVs, using
meta-information including their future trajectories. Then a
global scheduler allocates the communication bandwidth using
a greedy max-weight scheduler. Ref. [30] uses reinforcement
learning techniques to address the CoV association problem
by RSU, based on the CoVs' interest in locations. Similar to
the centralized architecture, these methods also rely on RSU
to coordinate the transmissions. Besides, Ref. [31] groups ve-
hicles into a cooperative platoon, incorporates task offloading
into CP, and solves the joint optimization problem. Recently,
the paradigm of multi-agent collaboration has been applied.
For example, When2com [32] applies a three-stage handshake
mechanism between any two CoVs to decide whether the
cooperation is necessary. Request maps are exchanged in
Where2com [13], which then utilizes spatial confidence to
determine the communication graph.
To summarize, the scheduling of decentralized CP depends
on spatial reasoning or attention mechanism, both of which
require extra communication and computation. In fact, timeli-
ness is one of the most crucial factor for environmental per-
ception in automated vehicles. Excessive cooperation results
in network latency, leading to severe performance drop due to
positional drifts [33]. In our previous work [1], an algorithm
is proposed to gradually learn the perception gain under the
quasi-stationary assumption, which enjoys negligible schedul-
ing overhead. While preserving the real-time advantage, this
paper deals with the dynamics of the perception gains due to
vehicular mobility, which is more practical.
III. SYSTEM MODEL AND PROBLEM FORMULATION
A. System Overview
We consider a connected automated driving scenario where
a number of CoVs are connected via the V2V network. For
safe and efficient self-driving, perception with timeliness and
high reliability is crucial to vehicles. In this system, CP is
supplementary to the standalone perception. As the basis,
standalone perception is carried out with only onboard sensors
and performs object detection at a high frequency to ensure
timeliness. On the other hand, CP merges the sensor data from
multiple sources with the local data to deal with blind areas
and long-tail cases. A CoV can simultaneously request sensor
data from others and transmit its sensor data to others on
demand.
Typically, the CoVs periodically broadcasts short beacon
messages such as Cooperative Awareness Messages (CAMs)
[34] that include vehicle states and other optional information.
To enable CP, a bit indicating sensor sharing functionality and
a list of indicators for available data formats are added to the
beacon message, thereby other CoVs can request sensor data in
a compatible data format. The sensor data formats can be raw
images, raw point clouds, or intermediate features extracted by
neural networks. To save the communication bandwidth, we
assume that the CoVs can receive sensor data from only one of
the peers at a time. Based on the received beacons, each CoV
sends a sensor request to one of the other CoVs for additional
sensor data to augment its perception. Furthermore, the amount
of communicated sensor data is subject to the available data
rate of wireless links.
In this work, we investigate the distributed sensor schedul-
ing problem in CP, where each CoV independently schedules
another CoV to transmit its sensor data, without the latency
3
Fig. 1.
Illustration of the sensor scheduling procedure in CP.
induced by coordination. Therefore, we focus on one particular
CoV and refer to it as the ego vehicle below. As illustrated in
Fig. 1, the ego vehicle (CoV 0) is driving on the street and
aims to detect the surrounding objects using a CP framework.
It receives beacon messages from three other CoVs, i.e., CoV
1 to 3, that can offer sensor data from different views and
identify them as candidates. The ego vehicle then decides to
schedule CoV 2 because it has a richer supplementary view
and a LoS communication link. Finally, the transmitted sensor
data are merged with the onboard sensor data and fed into
the detector. The optimality of sensor sharer is determined
by many factors, such as occlusion relationships, wireless
link states, sensor qualities and configurations. Therefore, it
is challenging to optimize scheduling decisions.
B. Procedure of CP
We consider a discrete-time system, with the length of a
time slot ∆t equal to the period of CP.
Candidate Discovery: At the beginning of time slot t,
the ego vehicle identifies the nearby CoVs that can offer
compatible formats of sensor data based on received beacon
messages. The ego vehicle then determines the set of candidate
sharers Vt by filtering the CoVs outside a specific range
to restrict the total number of candidates under Vmax. The
total bandwidth of V2X communications is denoted by W .
Depending on the network status and the use of other V2X
applications, the ratio of available communication resources
ηi(t) is typically time-varying and different across CoVs.
According to Shannon's formula, the data transmission rate
from CoV i to the ego vehicle at time slot t is expressed as
ri(t) = W ηi(t) log2
1 +
(cid:18)
(cid:19)
,
P hi(t)
σ2
n
(1)
where P is the transmit power, hi(t) denotes the channel gain
between CoV i and the ego vehicle, and σ2
n is the noise power.
Standalone Perception: At time slot t, the set of interested
objects in the proximity of the ego vehicle is denoted by Ot.
With onboard sensors, the ego vehicle captures a frame of
data X (t)
0 , which can be a raw image or a frame of LiDAR
point clouds. The part of the data that relate to object j ∈ Ot
is denoted by X (t)
0 . Then the sensor data are fed
into an object detector to obtain the detection results, i.e.,
Φ
0,j contains enough information
∈ {0, 1}. If X (t)
0,j ⊂ X (t)
X (t)
0,j
(cid:16)
(cid:17)
CoV 21Beacon1Beacon2RequestEgoVehicle(CoV0)CoV 1CoV 33Transmission1Beaconof object j for accurate classification and localization, the
= 1,
detector can correctly detect the object j, i.e., Φ
(cid:16)
(cid:17)
X (t)
0,j
(cid:17)
(cid:16)
X (t)
0,j
= 0. Particularly, if an interested object
(cid:16)
(cid:17)
X (t)
otherwise Φ
0,j
j is completely occluded, then X (t)
0,j = ∅ and Φ
= 0.
Cooperative Perception: With CP, the ego vehicle sched-
ules a candidate CoV i ∈ Vt and requests for its sensor
data that could be raw sensor data or features extracted from
neural networks. This additional sensor data can contain finer
textures of objects, provide a better perspective or even reveal
invisible objects from the ego view. Assume the CoVs are
well-synchronized with perfect pose information, then it is
very likely that the shared data could help identify missed
detections. To guarantee the timeliness of perception results,
the scheduled CoV has to compress the sensor data subject
to the transmission rate, otherwise the high latency would
compromise the benefit of CP. For example, the raw sensor
data are uniformly down-sampled to a lower resolution, while
fewer channels of the feature data are transmitted. More
efficient compression algorithms are beyond the scope of this
paper. Before transmission, the original sensor data X (t)
are
compressed to ̃X (t)
i
i
, satisfying
(cid:16) ̃X (t)
D
(cid:17)
i
≤ ri(t)∆t,
(2)
where D (*) denotes the data size in bits. Finally, the detection
0,j ∪ ̃X (t)
X (t)
∈ {0, 1} for CP with
result of object j is Φ
CoV i, where ̃X (t)
that relate to object j.
i,j denotes the part of compressed sensor data
(cid:16)
(cid:17)
i,j
unknown to the ego vehicle. Nevertheless, the perception gain
from CoV i can be calculated by
4
gi(t) = c0(t) − ci(t)
(cid:88)
(cid:16)
=
w(t)
j
1 − Φ
(cid:16)
X (t)
0,j
(cid:17)(cid:17)
(cid:16)
Φ
0,j ∪ ̃X (t)
X (t)
i,j
(cid:17)
.
(5)
j∈Ot
In other words, the gain is the sum of the weighted costs for
newly detected objects. However, this perception gain from the
scheduled CoV is available only when the detection is finished
at the end of a time slot.
C. Problem Formulation
Consider the ego vehicle driving on a trip over T time slots.
During the trip, other traffic participants travel alongside the
ego vehicle and form highly dynamic occlusion relationships
and volatile wireless links. Among them, the CoVs may come
close and leave at certain times during the trip. Consequently,
the set of candidate CoVs Vt and their perception gain gi(t)
are constantly evolving. The objective is to maximize the total
perception gain of cooperative perception by optimizing the
scheduling decisions of the ego vehicle. The sensor scheduling
problem is formulated as
max
a1,...,aT
1
T
T
(cid:88)
t=1
gat(t),
s.t. at ∈ Vt,
(6)
(7)
Perception Gain Evaluation: One of the usual metrics for
object detection is recall, defined as the number of detected
objects divided by the total number of objects. In the auto-
mated driving scenario, objects can have different importance
to the ego vehicle, and thus we consider the sum of importance
the
weight for missed objects in the metric. Specifically,
perception cost of standalone intelligence is given by
c0(t) =
(cid:88)
(cid:16)
w(t)
j
1 − Φ
(cid:17)(cid:17)
(cid:16)
X (t)
0,j
,
(3)
j∈Ot
where w(t)
is the importance weight of object j at time slot
j
t. The importance weights relate to the distance or the future
trajectory of the ego vehicle, and it is up to the implementation.
As a special case, minimizing the perception cost is equivalent
to maximizing the recall when the importance weights are
equal. With the shared data from the CoV i, the ego vehicle
performs CP to augment the standalone perception, and the
cost is
ci(t) =
(cid:88)
(cid:16)
w(t)
j
1 − Φ
(cid:16)
X (t)
0,j
(cid:17)(cid:17) (cid:16)
1 − Φ
(cid:16)
0,j ∪ ̃X (t)
X (t)
i,j
(cid:17)(cid:17)
.
j∈Ot
(4)
The cost of cooperative perception is determined by not only
the viewpoint but also the transmission rate that decides the
quality of shared data. A major challenge in the evaluation of
perception quality is that without the knowledge of ground
the actual perception costs c0(t) and ci(t) are
truths Ot,
where at is the optimization variable, representing the index
of the scheduled CoV in time slot t.
Note that there are some subtleties in this problem. Firstly,
since there is no complete information of everything on the
road, it is usually hard to directly estimate the gain gi(t) due to
unpredictable occlusions. Moreover, only the perception gain
of scheduled CoV, i.e., gat(t), is available at the end of time
slot t, while the other unscheduled CoVs are not observed.
Therefore, the offline optimal solution to (6), i.e.,
a∗
t = arg max
at∈Vt
gat(t),
(8)
is not feasible in practice.
Nevertheless, we seek to leverage the temporal continuity
of gi(t) and propose to learn the gains online from historical
observations ga1 (1), ga2(2), . . . , gat−1(t−1). Specifically, due
to the velocity limit, the relative positions among CoVs and
their perspectives cannot drift too much from time slot to
time slot. This type of problem falls in the category of the
restless multi-armed bandits (RMAB) [18], where the CoVs
correspond to the arms. The change of gi(t) from the last
observation requires the algorithm to schedule every candidate
CoV once in a while to gain knowledge of its latest perception
gain. This process is termed exploration. On the other hand,
the empirically optimal CoV should be scheduled frequently to
exploit the knowledge. The target is to learn and schedule the
optimal CoV a∗
t while balancing exploration and exploitation.
IV. MASS: MOBILITY-AWARE SENSOR SCHEDULING
ALGORITHM
In this section, we develop an online learning-based algo-
rithm to tackle the decentralized sensor scheduling problem in
CP. Compared with existing solutions, our algorithm considers
the dynamics of perception gains due to vehicular mobility and
has negligible communication and computation overhead.
It is well known that the Upper Confidence Bound (UCB)
algorithm [15] is an optimal solution to stationary multi-armed
bandits problems, where the rewards of arms have stationary
distributions. The UCB algorithm gradually eliminates the
randomness in the rewards and schedules the most promising
arm in each time slot. On the contrary, our problem deals
with dynamics rather than randomness. The intuition is that,
rather than shrinking the confidence bound with more trials,
we should enlarge the confidence bound for idle CoVs over
time in this problem.
We propose a low-complexity yet effective algorithm named
MASS, as described in Algorithm 1, to schedule CoVs to share
their sensor data. This algorithm maintains confidence bounds
of perception gains for all candidate CoVs and schedules
the CoV with the maximum upper confidence bound. The
confidence bounds are computed based on the historical obser-
vations and properties of the assumed underlying process gi(t).
Since the variation of perception gains is mainly influenced by
frequent blockages due to mobility, without loss of generality,
we approximate the increment of gi(t) by independent, nor-
mally distributed random variables. Therefore, the confidence
bound of a nearby CoV is proportional to the square root of
its idle time. The scale of confidence bounds is specified by a
parameter β that depends on the rate of change in gi(t) and the
confidence level. When β takes a larger value, the algorithm
is more aggressive in exploration.
In Algorithm 1, Line 2 is the CoV discovery phase, when
the ego vehicle determines the candidate set of available CoVs
with maximum size Vmax, based on beacon messages. In Lines
3-4, the newly available CoV is explored once by immediately
sending a sensor data request if one exists. Otherwise, in
Line 6, we calculate the upper confidence bound ̃gi(t) of
the perception gain for each CoV. Specifically, ˆgi is the last-
seen gain of CoV i, and the padding function depends on
the last-seen time τi and the parameter β. The motivation
for using the last-seen gain rather than all observations is
that dynamics is more significant than randomness due to the
mobility of vehicles, which will be shown in Section VI-B
through experiments. The key intuition is that the reward of
scheduling a CoV consists of its perception gain and the
knowledge of its exact gain at t. This knowledge is crucial
in the problem since the perception gain is highly dynamic.
We must ensure a moderate level of exploration to avoid
missing the optimal CoV. Therefore, in Line 7, the ego vehicle
optimistically schedules CoV at with the maximum upper
confidence bound. In Lines 9-12, the sensor data, compressed
if the transmission rate is inadequate, is then sent to the ego
vehicle for sensor fusion, detection, and evaluation. Finally,
the last-seen gain and last-seen time of CoV at are updated
for future scheduling.
5
Algorithm 1 MASS: Mobility-Aware Sensor Scheduling Al-
gorithm
Parameter: β
1: for t = 1, * * * , T do
2:
Determine the candidate set of available CoVs Vt.
if any CoV i ∈ Vt has not been scheduled then
Schedule CoV i, i.e., at = i.
else
Calculate the upper confidence bound for each CoV
i ∈ Vt:
̃gi(t) = ˆgi + β
t − τi.
(9)
√
Schedule the CoV at with the maximum upper con-
fidence bound, ties broken arbitrarily:
at = arg max
i∈Vt
̃gi(t).
(10)
end if
Send a request to CoV at for sensor data, compressed
subject to (2) if the transmission rate is inadequate.
Receive the sensor data, run the object detector, and
evaluate the perception gain gat(t) by (5).
Update the last-seen gain of CoV at:
3:
4:
5:
6:
7:
8:
9:
10:
11:
ˆgat = gat(t).
12:
Update the last-seen time of CoV at:
τat = t.
13: end for
(11)
(12)
Overhead Analysis: In the scheduling of decentralized
cooperative perception, frequent metadata message exchanges
and data processing introduces extra overhead. This inevitably
adds latency to the perception pipeline, which may compro-
mise the actual perception quality. We compare the com-
munication and computation overhead of our proposed al-
gorithm with existing centralized and distributed scheduling
methods. Assume there are N CoVs that request and provide
the sensor data simultaneously. In the MASS algorithm, the
few bits of data format information are piggybacked on the
periodically broadcast beacons. Consequently, there are totally
O(N 2) simple computations among N CoVs and negligible
communication overhead for scheduling decisions.
Conventional scheduling algorithms usually require much
more detailed perceptual state information of all CoVs. For
example, an RSU-based algorithm in [27] requires the visi-
bility grid states from all CoVs for global scheduling. This
procedure takes at least 2N extra messages to communicate
with the edge server and a computation load of O(GN 2) for
the deep reinforcement learning algorithm, where G is the
number of grids. On the other hand, Who2com [35] proposes
a handshake mechanism for distributed scheduling. Each CoV
first broadcasts a request message with compressed sensor
data, then computes the matching scores with the candidates'
message. It involves O(N 2) neural network attention opera-
tions and N 2 extra messages to feedback the scores before
initializing a connection. Similarly, Where2com [13] utilizes
confidence-aware spatial maps to decide the most beneficial
CoV. Although it reduces the communication amount with the
attention mechanism, multiple rounds of message exchange
and fusion process still take much time. By comparison, our
proposed MASS algorithm enjoys the advantage of low over-
head thanks to online learning, by harnessing the dynamics of
the perception gain.
V. PERFORMANCE ANALYSIS
In this section, we characterize the perception performance
of our proposed MASS algorithm in the fixed and dynamic
CoV candidate scenarios, respectively.
A. Assumptions
For theoretical analysis, we first normalize the perception
gain gi(t) to the fundamental interval [0, 1]:
Gi(t) = min{gi(t)/gmax, 1},
(13)
where gmax is a threshold to restrict the maximum possible
perception gain. We assume that Gi(t) independently follows
a Gaussian random walk with reflecting boundaries:
Gi(t + 1) = fI (Gi(t) + Xi(t)),
(14)
6
sublinear to T . Therefore, we define the expected average
learning regret of a scheduling algorithm A as
̄RA =
1
T
E [RA(T )],
(17)
where the expectation is taken over all sample paths of the
stochastic processes Gi(t). In the following subsections, we
derive the upper bounds on the expected learning regret of the
MASS algorithm under both fixed and dynamic CoV candidate
settings.
B. Bounds on Two Fixed Candidate CoVs
We first investigate a simplified problem by assuming there
are two fixed candidate CoVs, i.e., Vt = V = {1, 2}. As in
[20], define a function f to be well-behaved on an interval
[t1, t2] if
(18)
|f (t) − f (t(cid:48))| ≤ cf
(cid:112)|t − t(cid:48)|σ, ∀t, t(cid:48) ∈ [t1, t2] ∩ N,
σ )1/2 is a large enough constant
where cf = Θ(log 1
to
guarantee low violation probability. Furthermore, we define
a problem instance to be well-behaved near t if the per-
ception gains of all CoVs are well-behaved on the interval
[t − σ−2, t + σ−2]. Note that when t ≤ σ−2 or t ≥ T − σ−2,
the definition is on the interval [t − σ−2, t + σ−2] ∩ [0, T ].
Define Et as the event that the problem is well-behaved near
t. The following lemma bounds the violation probability of
well-behavedness.
where Xi(t) takes an i.i.d. sample from N (0, σ2), and
fI (x) =
(cid:40)
x(cid:48) < 1
x(cid:48),
2 − x(cid:48),
x(cid:48) ≥ 1,
Lemma 1. Let cf = 3(log 1
σ )1/2. For a problem instance, the
violation probability of the well-behavedness near t satisfies
(15)
P ( ̄Et) < O(σ2.4).
(19)
where x(cid:48) ≡ x (mod 2). In practice, the perception gain is
influenced by many factors, such as the instantaneous occlu-
sion status, available data rate, and time-varying importance
weights. Therefore, it is appropriate to regard the increment
of Gi(t) as Gaussian random variables by the central limit
theorem. The standard deviation of the increment σ reflects
the rate of change in the traffic environment. Generally, when
σ is smaller, better perception quality can be achieved since
the perception gains are less dynamic. In the analysis below,
we will measure the performance with respect to σ.
According to the dynamics (14), Gi(t) is ergodic and
has uniform stationary distribution on [0, 1]. Without
loss
of generality, we also assume that the initial states Gi(0)
follow the stationary distribution. In an RMAB problem,
the performance of an algorithm is usually measured by a
learning regret, defined as the performance loss compared to
the offline optimal solution. Given a specific problem instance,
the learning regret of a scheduling algorithm A by time slot
T is written as
RA(T ) =
T
(cid:88)
t=1
[G∗(t) − Gat(t)] ,
(16)
where G∗(t) = Ga∗
(t) is the normalized gain of the optimal
CoV. Since Gi(t) is constantly shifting during the trip, no
online algorithm can achieve an upper bound of learning regret
t
Proof. See Appendix A.
At time t, define the leader as the CoV with maximum last-
seen gain. Let H ∗(t) denote the gain of the leader, and τi(t)
denote the last-seen time of CoV i at time t. We divide the
average learning regret into two parts:
RA(T ) = R∗(T ) +
2
(cid:88)
i=1
Ri(T ),
(20)
where the first part denotes the gain difference between the
optimal CoV and the leader, i.e.,
R∗(T ) =
T
(cid:88)
t=1
[G∗(t) − H ∗(t)] ,
(21)
and the second part is the gain difference between the leader
and the scheduled CoV, i.e.,
Ri(T ) =
=
≤
T
(cid:88)
t=1
T
(cid:88)
t=1
T
(cid:88)
t=1
[H ∗(t) − Gat(t)]
I(at = i) [H ∗(t) − Gi(t)]
H ∗(τi(t)) − Gi(τi(t))
t − τi(t)
,
(22)
(23)
(24)
where we spread the regret incurred at time τi(t) over the
subsequent idle time.
We set the algorithm parameter β = 5cf , and provide
some basic deterministic properties of the proposed MASS
algorithm conditioned on Et.
Lemma 2. For a problem instance well-behaved near t, the
MASS algorithm has the following properties:
a) The optimal CoV at time t is scheduled no later than
t + 1.
b) The leader at time t is scheduled no later than t + 1.
c) The change of the leader's gain in one slot is lower
bounded by
H ∗(t + 1) − H ∗(t) ≥ −2cf σ.
(25)
d) The gain difference between the optimal CoV and the
leader is bounded by
G∗(t) − H ∗(t) < 5cf σ.
(26)
Proof. See Appendix B.
Let δi(t) = H ∗(t) − Gi(t). To bound Ri(T ), it is important
to characterize a relationship between δi(τi(t)) and t − τi(t).
Lemma 3. For a problem instance well-behaved near t, with
the MASS algorithm we have:
a) if CoV i is not optimal at t, then
t − τi(t) ≥ Ω(δi(t)/βσ)2,
δi(τi(t)) ≤ 2δi(t) + O(cf σ).
b) If CoV i is optimal at t, then
δi(τi(t)) ≤ O(cf σ).
Proof. See Appendix C.
(27)
(28)
(29)
The intuition behind Lemma 3 is that after scheduling a sub-
optimal CoV, the subsequent idle time is proportional to the
quadratic of the sub-optimality gap. It is important to note that
Lemma 2 and Lemma 3 are deterministic, conditioned on the
well-behavedness of the problem instance. Next, we deal with
the conditional probability and bound the expected learning
regret of the MASS algorithm with two fixed candidate CoVs.
Theorem 1 (Fixed Candidates). Let β = 15σ log σ−1. For
a sufficiently long trip T ≥ Ω(σ−2), the expected average
learning regret of MASS with two fixed candidate CoV is
bounded by
̄RMASS ≤ O (cid:0)σ2 log3(1/σ)(cid:1) .
(30)
Proof. See Appendix D.
Remark. This theorem utilizes the uniform stationary distribu-
tion of ergodic process Gi(t) to bound the expected average
learning regret. The key of the proof is that the gap between
two CoVs, G1(t)−G2(t), has a very high probability of being
much larger than σ. Then the expected regret can be bounded
using Lemma 3 by conditional probabilities. Note that the
expected average learning regret is lower bounded by O(σ2)
for any online algorithm [20]. Our algorithm is near-optimal
in the sense that our upper bound matches the lower bound
up to a logarithmic factor.
7
C. Bounds on Dynamic Candidate CoVs
During the trip, the candidate set of available CoVs Vt
changes occasionally. In the following algorithm, we will
divide the trip into periods by the arrival times of candidate
CoVs, and bound the regret in each period using Theorem 1.
Theorem 2 (Dynamic Candidates). Let β = 15σ log σ−1. For
a sufficient long trip T ≥ Ω(σ−2) with a dynamic candidate
CoV set satisfying |Vt| ≤ 2, the expected average learning
regret of MASS is bounded by
̄RMASS ≤ O (cid:0)σ2 log3(1/σ)(cid:1) + 2λ,
(31)
where λ is the arrival rate of candidate CoVs. When λ ≤
O (cid:0)σ2 log3(1/σ)(cid:1),
is
bounded by
the expected average learning regret
̄RMASS ≤ O (cid:0)σ2 log3(1/σ)(cid:1) .
(32)
Proof. See Appendix E.
It is much more difficult to prove the bound for any number
of candidate CoVs since it is hard to guarantee the basic
properties in Lemma 2 without extra constraints. A similar
algorithm with an activation mechanism is proposed in [20].
Specifically, when the upper confidence bound of a candidate
is larger than the last-seen gain of the leader, it is activated
until scheduled. The earliest activated candidate is scheduled
in odd-numbered time slots, while in even-numbered time
slots the leader is exploited. Although the additional rules
facilitate a bound for any number of candidate CoVs, this
algorithm is less efficient than our proposed MASS algorithm.
We will show through experiments in Section VI-B that this
algorithm compromises the regret performance. Moreover,
we also conjecture that the regret bound also exists for our
proposed MASS algorithm with any number of candidate
CoVs, described as follows.
Conjecture 1. Let β = 15σ log σ−1. For a sufficient long trip
T ≥ Ω(σ−2) with a dynamic candidate CoV set satisfying
|Vt| ≤ Vmax, the expected average learning regret of MASS is
bounded by
̄RMASS ≤ O (cid:0)Vmaxσ2 log3(1/σ)(cid:1) + 2λ.
(33)
where λ is the arrival rate of candidate CoVs. When λ ≤
O (cid:0)Vmaxσ2 log3(1/σ)(cid:1), the expected average learning regret
is bounded by
̄RMASS ≤ O (cid:0)Vmaxσ2 log3(1/σ)(cid:1) .
(34)
VI. EXPERIMENTS
In this section, we first conduct empirical studies on the
LiDAR-based object detection to characterize a relationship
between the input sensor data X and the output of the object
detector Φ(X ). Then based on the empirical model, extensive
simulations are conducted to evaluate the perception gain
of the proposed MASS algorithm, compared with baseline
algorithms. Finally, a case study is provided to compare the
behavior of different online algorithms qualitatively.
8
Fig. 3. The empirical probability of missing an object with respect to the
number of scanned points (in log scale).
increased as well in Fig. 2b. Our evaluation of the perception
gain depends on high precision since the gain is calculated
based on the additional detections from CP. Moreover,
it
is reasonable to observe the trade-off that when the score
threshold increases, the precision enhances while the recall
degrades. To strike a balance between recall and precision, in
the following experiments, the score threshold is set to 0.4.
With mean precision as high as 0.99 for CP, we can safely
approximate the perception gain from the newly detected
objects, neglecting the false positives.
Now turn to the relationship between the detection result
and the scanned LiDAR points of an object. As shown in Fig.
3, the ground-truth objects are binned based on the number
of points within the labeled 3D bounding boxes in log scale.
Then we fit the missed detection probability to the exponential
distribution and obtain the best fit with goodness R2 = 0.994.
The statistics implies that the empirical probability of missing
an object is approximately a power function of the number of
scanned points on the object, i.e.,
(cid:17)
(cid:17)
(cid:16)
(cid:16)
= 1
= e−0.4343 log2 NX = N −0.6265
,
P
Φ
(35)
X (t)
0,j
X
where NX denotes the number of points on an object.
Based on this observation, in the simulation of the following
subsection, we will assume the detection result of an object is
determined by the number of scanned points, neglecting other
factors. Therefore, for each object j ∈ Ot, a minimum number
of scanned points Nj are required for accurate detection,
representing the difficulty of the object. This assumption is
reasonable since a certain number of points are needed to
exhibit the texture and shape information of a particular object.
the object difficulty Nj follows a long-tail zeta
By (35),
random distribution with cumulative distribution function
FN (n) = n−0.6265.
(36)
Then with CP, the total number of points on an object is
increased, thus improving the chance of accurate detection.
B. Simulation with Detection Model
We first generate mobility traces in BEV using the micro-
scopic traffic simulator SUMO [40], highlighting the sensor
coverage and occlusion relationships. A Manhattan-like map
is created with a 4-by-4 grid, as shown in Fig. 4. The street is
bidirectional, with two lanes and a sidewalk in each direction,
(a)
(b)
Fig. 2. Performances of CP over standalone perception at different score
thresholds. (a) The mean recall. (b) The mean precision.
A. Empirical Studies on LiDAR-based Perception
We conduct 3D object detection experiments on an open-
source large-scale automated driving dataset, DOLPHINS
[36]. It is generated using the CARLA [37] traffic simulator,
with a realistic environment rendered in six different scenarios,
including intersections, highways, and T-junctions. The dataset
features the support for V2X, providing temporally-aligned
sensor data from the ego vehicle, a collaborative vehicle,
and an RSU. There are 42,376 frames of sensor data with
3D bounding box labels for cars and pedestrians. The ego
vehicle is required to detect all the other traffic participants,
including the occluded, within [-100m, 100m] in the driving
direction and [-40m, 40m] in the perpendicular direction. For
generality and robustness, we focus on the raw-level sensor
fusion, using point clouds scanned by LiDARs installed on
the top of vehicles. Based on the pose information, the raw
point clouds are merged after the coordinate transformation.
The dataset is randomly split into the training, validation, and
test sets with a 60%:20%:20% ratio. We adopt a popular
LiDAR-based 3D detection model, PointPillars [38], with
pillar size 0.16m×0.16m. The intersection-over-union (IoU)
threshold for accurate detection is set as 0.7 and 0.3 for cars
and pedestrians, respectively. With an open-source platform
OpenPCDet [39], we train the model for 200 epochs using the
one-cycle Adam optimizer.
We run the detection task on the test set and obtain mean
i.e., cars
recall and precision results over two categories,
and pedestrians. The score threshold for a positive detection
sweeps from 0.1 to 0.7. As shown in Fig. 2a,
the recall
is significantly improved by the supplementary view, which
shows the great potential of CP. Besides, the precision, defined
as the ratio of true detections to all detections, is slightly
0.10.20.30.40.50.60.7Score Threshold0.20.30.40.50.60.70.80.91Mean RecallCPStandalone Perception0.10.20.30.40.50.60.7Score Threshold0.650.70.750.80.850.90.951Mean PrecisionCPStandalone Perception1248163264128256512# of Scanned Points00.20.40.60.81Probability of Missing an Object9
TABLE I
SIMULATION PARAMETERS
Parameters
Values
Length of Time Slot
Number of Cars
CoV Ratio
Speed Limit of Cars
Turning Probabilities
Arrival Rate of Pedestrians
Speed of Pedestrians
0.1s
200
30%
50km/h
0.25 (Left), 0.25 (Right)
0.2 persons/s
1.2m/s
LiDAR-Related
# of Lasers
Vertical Field-of-view
Maximum Range
Height of Objects
Angular Resolution
Data Rate (64 channels)
16, 32, 64
26.8◦
100m
1.7m
0.09◦
33.27Mbps
V2X-Related
Carrier Frequency
Transmission Power
Noise Power Spectral Density
Receiver Noise Figure
Shadowing Fading Std. Dev.
Vehicle Blockage Loss
Channel Bandwidth
Available Comm. Resource Ratio
Transition Time of Resource Ratio
5.9GHz
23dBm
-174dBm/Hz
9dB
3dB (LOS, NLOSv), 4dB (NLOS)
max{0, N (5, 4)} dB
30MHz
1.2MHz, 6MHz, 30MHz
10s
Fig. 4. An illustration of the map created in SUMO with a zoomed snapshot
at an intersection.
and the side length of a block is 200 meters. The blocks
represent the space for buildings, which occludes the sight of
perpendicular directions, causing blind zones. The traffic flow
is controlled by the traffic lights at intersections, leading to
queues of cars waiting to enter the intersection as well as some
occlusions. While the total number of cars is fixed, pedestrians
are spawned randomly at the endpoints of each sidewalk and
move towards the other endpoint as destinations. Based on
the empirical modeling of perception in the subsection above,
we randomly assign the difficulties, the minimum number of
LiDAR points for correct detection, to each car and pedestrian.
We randomly select one vehicle as the ego vehicle, which
aims to perceive the other traffic participants within 100m
using CP. The importance weight of objects is calculated by
w(t)
j =
1,
2 − log10 d(t)
j ,
0,
d(t)
j ≤ 10,
10 < d(t)
d(t)
j ≥ 100,
j < 100,
(37)
where d(t)
is the distance between the object j and the ego
j
vehicle. Define CoV ratio as the proportion of CoVs with
sensor sharing functionality among vehicles on the road. Each
CoV, including the ego vehicle, is equipped with an omni-
directional LiDAR on the top. We simulate the laser scanning
process in the experiment, considering the blockage effect of
vehicles and buildings. During the trip, the CoVs within 100
meters from the ego vehicle are identified as candidates since
they are more likely to help reveal important objects.
Due to the decentralized congestion control (DCC) mecha-
nism of the V2X network [41], the LiDAR point clouds are
down-sampled when the communication bandwidth is inade-
quate. For each CoV, the evolution of available communication
resource ratio ηi(t) is modeled by independent Markov chains
with three states [42]. Besides, we adopt the V2V sidelink
channel models in 3GPP TR 37.885 [43], which introduces the
NLOSv state, in which the direct path is blocked by vehicles.
Unlike the conventional NLOS channel that assumes blockage
by larger objects such as buildings, the behavior of NLOSv
channel is closer to a LOS channel with extra attenuation. In
the urban setting, the pathloss of the LOS and the NLOSv
channels are specified by
P LLOS = 38.77 + 16.7 log10 d + 18.2 log10 fc,
(38)
where the NLoSv channel adds an extra blockage loss for each
vehicle. On the other hand, the pathloss of the NLOS channel
Fig. 5. A sample path on the evolution of perception gains of nearby CoVs.
The start point of a curve represents that a CoV is approaching the ego vehicle
and becomes a candidate. The end point represents that the CoV is no longer
a candidate.
is given by
P LNLOS = 36.85 + 30 log10 d + 18.9 log10 fc.
(39)
The simulation parameters are summarized in Table I. We
simulate for T = 104 time slots, corresponding to a trip of
1,000 seconds. An exemplary sample path of the perception
gains is plotted in Fig. 5.
In the following, we compare the proposed MASS algo-
rithm to four baselines: 1) Closest CoV is a naive policy
without regard to historical observations. It is supported by
the fact that the closest CoV usually has a good viewpoint
for closer objects which have greater importance weights,
and the pathloss is minimum. 2) In Periodic ETC (Periodic
Explore-Then-Commit), the time is divided into epochs of
1011121314151617181920Time (s)0123456Perception GainCoV 1CoV 2CoV 3CoV 4CoV 5TABLE II
SWEEPING PARAMETERS IN ALGORITHMS
Algorithm
Parameter
Range of Value
Closest CoV
Periodic ETC
SW-UCB
Earliest Activation
MASS
-
Epoch Length
Horizon Length
Scale of UCB β
Scale of UCB β
Scale of UCB β
-
{2,3,...101}
{5,10,20,30,40}
[10−1, 101] (log scale)
[10−1, 100.5] (log scale)
[10−0.9, 100.6] (log scale)
10
(a)
(b)
Fig. 6. The average regret of different scheduling policies with sweeping
algorithm parameters. The ranges of parameters for each algorithm are
specified in Table II. The optimal regrets of scheduling policies are marked
on the figure.
equal length. At the beginning of an epoch, each candidate is
explored once, then for the rest of the epoch, the CoV with the
maximum empirical perception gain is scheduled. 3) SW-UCB
(Sliding Window UCB) [19] is adapted from the classic UCB
algorithm, using the averaged observed rewards on a fixed-size
horizon rather than the infinite horizon. 4) Earliest Activated
[20] is another online algorithm for restless bandit problem.
It explores the earliest activated CoV in odd-numbered time
slots and exploits the leader in even-numbered time slots. For
a fair comparison, the algorithms are evaluated with sweeping
parameters, summarized in Table II.
Fig. 6 shows the average learning regret for sweeping
algorithm parameters. The average learning regret reflects
the perception cost difference to the offline optimal decision
across time. With reasonable parameters, all
the learning-
based algorithms, including SW-UCB, Earliest Activated, and
the proposed MASS algorithm, outperform the distance-based
policy, showing the benefit of learning from historical observa-
tions. Among the learning-based algorithms, MASS achieves
a uniformly better regret performance than other algorithms
in a wide range of parameter values. Furthermore, a well-
tuned parameter can minimize the average regret, shown by
the markers on the curves. The optimal parameter of the MASS
algorithm is influenced by the rate of change in the perception
gain, as stated in Section V.
Fig. 7 compares the average perception gain of scheduling
policies at optimal parameters during the trip under different
CoV ratios. We make three observations as follows. First, the
Fig. 7. Comparisons of scheduling algorithms under different CoV ratios. a)
The perception gain. b) The recall value.
perception gain generally increases when the CoV ratio is
higher. Typically, when there are more candidate CoVs, the
gain from the optimal CoV is higher, and thus the perfor-
mance is improved when the optimal CoV is exploited. With
different CoV ratios, the MASS algorithm has stable optimal
parameters around β ≈ 0.6, showing its robustness to the
number of candidates. Second, the MASS algorithm performs
uniformly the best with all CoV ratios. The perception gain
is improved by up to 49% compared to position-based policy
and 12% compared to other learning-based algorithms in high
CoV ratio settings. The advantage over SW-UCB implies
an essential finding that dynamics is more significant than
randomness due to the high-mobility nature of the automated
driving scenario. In contrast to the Periodic ETC algorithm
that explores regularly, MASS explores more efficiently by
adapting to the actual state. Finally, although the optimization
objective is not precisely aligned to the recall, the MASS
algorithm achieves the best perception performance. The recall
is improved by up to 4.2 percentage points compared to other
learning-based algorithms in the high CoV ratio setting, which
is a considerable gain in the context of automated driving.
C. Case Study: A Trace with LiDAR Frames
To further illustrate the benefits of adaptive exploration,
we conduct a case study with a CARLA-generated trace of
LiDAR frames. For a hundred frames, the LiDAR point clouds
from the ego vehicle and four other CoVs are simultaneously
recorded during a trip of 50 seconds. The trajectories of the
vehicles on the town map are shown in Fig. 8. In each time
102030405060708090100Index of Parameter in Algorithms00.20.40.60.811.21.41.61.82Average RegretClosest CoVPeriodic ETCSW-UCBEarliest ActivatedMASS [Proposed]10%30%50%70%CoV Ratio2.533.544.555.56Average Perception GainClosest CoVPeriodic ETCSW-UCBEarliest ActivatedMASS [Proposed]10%30%50%70%CoV Ratio70%72%74%76%78%80%82%Average RecallClosest CoVPeriodic ETCSW-UCBEarliest ActivatedMASS [Proposed]11
(a)
(b)
Fig. 10. Visualization of the merged point clouds and detection results. (a) The
merged point clouds when CoV 1 is scheduled by Closest CoV and Periodic
ETC algorithms. (b) The merged point clouds when CoV 2 is scheduled by
the proposed MASS algorithm.
Such a process takes full advantage of the information within
the historical detection results and learns to make optimal
decisions, which is the core intuition of our algorithm.
VII. CONCLUSION
In this paper, we have studied the scheduling of decen-
tralized cooperative perception within the RMAB framework,
fully considering the mobility of CoVs. A mobility-aware
sensor scheduling (MASS) algorithm has been proposed to
maximize the average perception gain, leveraging the temporal
continuity of perception gains. The MASS algorithm enables
each CoV to learn the perception gains from candidates in a
distributed manner, without the overhead of frequent meta-
information exchanges. An upper bound for the expected
average learning regret is provided that matches the lower
bound of any online algorithm up to a logarithmic factor. We
have evaluated the MASS algorithm under a realistic SUMO
trace, showing that the proposed algorithm can improve the
average perception gain by up to 12% and the recall by up
to 4.2 percentage points, compared to other learning-based
algorithms. Finally, a case study has been presented to show
the superiority of adaptive exploration from our proposed
algorithm.
For future work, we plan to extend the sensor scheduling
problem towards more sources, using the combinatorial multi-
armed bandit framework [44]. Note that the reward is then
non-linear since the perception gains of different sources
are not independent. Besides, we will study the uncertainty
reduction modeling of the perception gain [45] to incorporate
the influence of false positives in the perception performance.
APPENDIX A
PROOF OF LEMMA 1
Define the event
(cid:110)
E(i)
t,t(cid:48) =
|Gi(t) − Gi(t(cid:48))| ≤ cf
(cid:112)|t − t(cid:48)|σ
(cid:111)
.
Fig. 8. The trajectories of the ego vehicle and other CoVs on the CARLA
town map. The position of the ego vehicle is marked every 10 seconds.
Fig. 9. The comparison of moving average perception costs of different
scheduling algorithms.
slot, the ego vehicle identifies the CoVs within 100 meters
as candidates and selects a CoV to schedule. For sensor
fusion, the received point clouds are transformed into the
view of the ego vehicle and then appended together with
the onboard sensor data. Then it is feed into the 3D object
detector, PointPillars, to obtain the perception results. Several
representative algorithms are tested, including the one-shot
distance-based Closest CoV, the regularly exploring Periodic
ETC, and the adaptively exploring MASS algorithm. The
standalone perception and CP with the offline optimal CoV
serve as the upper and lower bounds for the perception cost,
respectively.
As shown in Fig. 9, the MASS algorithm achieves the best
perception quality, consistent with the simulation results. We
further visualize the merged point clouds and detection results,
as illustrated in Fig. 10. At around 38.0s, the ego vehicle is
leaving the roundabout, when two cars and one pedestrian are
invisible due to the blockage effect. The CoV 1 in front is
scheduled with the Closest CoV policy and the Periodic ETC
in the exploitation phase. However, as shown in Fig. 10(a),
there is no traffic in front, and thus the extra sensor has no
gain. Owing to the adaptive exploration, the MASS algorithm
is aware of the decrease in the leader's gain. Therefore, the
ego vehicle explores and quickly identifies CoV 2 as the new
leader since it reveals three additional objects in Fig. 10(b).
LegendEgoCoV 1CoV 2CoV 3CoV 410 sec20 sec30 sec40 sec50 sec50m100mScale0m0 sec01020304050Time (s)0.511.522.53Moving Average Perception CostStandalone PerceptionClosest CoVPeriodic ETC, =10sMASS [Proposed], =0.3Offline OptimalEgo VehicleCoV1(Scheduled)Missed TargetsEgo VehicleCoV2(Scheduled)Newly Detected12
2cf σ.
By assumption, Gi(t) − Gi(t(cid:48)) ∼ N (0, |t − t(cid:48)|σ2), thus
If CoV 1 is scheduled at t − 1, then
e−x2/2dx
G1(t + 1) − G2(t) ≥ G1(t + 1) − G1(t − 1) ≥ −
√
P (E(i)
t,t(cid:48)) = 1 − 2
(cid:90) ∞
1
2π
cf
= 1 − O (cid:0)log σ−1(cid:1)−1/2
e− 9
2 log σ−1
≥ 1 − O(σ4.4).
Then
2
(cid:89)
t+σ−2
(cid:89)
P (Et) ≥
P (E(i)
t,t(cid:48)) > 1 − O(σ2.4).
t(cid:48)=t−σ−2
Therefore, P ( ̄Et) < O(σ2.4).
i=1
APPENDIX B
PROOF OF LEMMA 2
In the proposed algorithm, the last-seen time τi(t) must
exist and satisfies t − τi(t) < σ−2. For simplicity, we denote
τi = τi(t) when there is no confusion.
a) Without loss of generality, we assume CoV 1 is optimal
at t. If CoV 2 is scheduled at time t, then at t + 1,
G1(τ1) + βσ
√
t − τ1 + 1 ≥ G1(t) − cf σ
√
+ βσ
t − τ1 + 1
√
t − τ1
> G2(t) + βσ.
Therefore, CoV 1 must be scheduled no later than t + 1.
b) Without loss of generality, we assume CoV 1 is the leader
at t. If CoV 1 is not scheduled at time t − 1, then
√
G1(τ1) + β
t − τ1 ≥ G2(t − 1) + βσ,
since G1(τ1) ≥ G2(t − 1), and the proof is completed.
Otherwise, we have CoV 1 scheduled at t − 1 and CoV 2
scheduled at t, then
G1(τ1) + βσ
√
t − τ1 − 1 ≥ G2(τ2) + βσ
√
t − τ2 − 1. (40)
i) If τ1 = t − 2, τ2 ≤ t − 3, then (40) implies
G1(t − 2) + βσ ≥ G2(τ2) + βσ
√
t − τ2 − 1.
Therefore, at time t + 1,
√
G1(t − 1) +
2βσ ≥ G1(t − 2) + cf σ +
> G2(t) + βσ.
√
2βσ
ii) If τ2 = t − 2, τ1 ≤ t − 3, then at time t + 1,
√
√
G1(t − 1) +
2βσ ≥ G2(t − 2) +
2βσ > G2(t) + βσ.
To sum up, CoV 1 is scheduled no later than t + 1.
c) The statement is trivially true if the leader stays the same
from t to t+1. Otherwise, Let CoV 1 be the leader at t+1, CoV
2 be the leader at t, H ∗(t + 1) − H ∗(t) = G1(t + 1) − G2(t).
i) Assume CoV 1 is scheduled at t, then CoV 2 must be
scheduled at t − 1. Therefore,
G1(t + 1) − G2(t) ≥ G1(t + 1) − G2(t − 1) − cf σ
If CoV 2 is scheduled at t − 1, then
√
G1(t + 1) − G2(t) ≥ G1(τ1) −
t − τ1 + 1cf σ − G2(t)
>
cf + β
β
≥ −2cf σ,
(G1(τ1) − G2(t)) − 2cf σ
where the second inequality is by (41).
d) Let CoV 1 be the optimal CoV at t−2, which is scheduled
at t(cid:48) ∈ {t − 2, t − 1}. Then either G1(t(cid:48)) ≤ H ∗(t(cid:48)) or CoV 1
becomes the new leader at t(cid:48) + 1. Either of them leads to
H ∗(t(cid:48) + 1) ≥ G1(t(cid:48)) − cf σ.
If t(cid:48) = t − 2, by c) we have
H ∗(t) ≥ H ∗(t − 1) − 2cf σ ≥ Gi(t − 2) − 3cf σ
= G∗(t − 2) − 3cf σ > G∗(t) − 5cf σ.
If t(cid:48) = t − 1,
H ∗(t) = Gi(t − 1) − cf σ = Gi(t − 2) − 2cf σ
= G∗(t − 2) − 2cf σ > G∗(t) − 4cf σ.
Therefore, G∗(t) − H ∗(t) < 5cf σ.
APPENDIX C
PROOF OF LEMMA 3
a) We focus on a sub-optimal CoV i and omit the subscript
i for simplicity. Since the problem instance is well-behaved
near t, for ∀t(cid:48) ∈ [t − σ−2, t + σ−2],
√
|G(t(cid:48)) − G(τ )| ≤ cf
|H ∗(t(cid:48)) − H ∗(τ )| ≤ cf
√
t(cid:48) − τ σ,
t(cid:48) − τ σ + 5cf σ.
Then
|δ(t(cid:48)) − δ(τ )| ≤ 2cf
√
t(cid:48) − τ σ + 5cf σ.
If δ(t) ≤ 20cf σ, then CoV i is scheduled soon and trivially
t − τ = O(1) = Θ(δi(t)/βσ)2,
δ(τ ) = O(cf σ) = δ(t) + O(cf σ),
which satisfies the condition. Otherwise, i) if δ(τ ) < δ(t)/2,
√
2cf
t − τ σ ≥ |δ(t) − δ(τ )| − 5cf σ ≥ δ/4,
and thus t − τ ≥ Θ(δ(t)/cf σ). ii) If δ(τ ) ≥ δ(t)/2, we have
for ∀t(cid:48) ∈ [τ, t + σ−2],
√
G(τ ) + βσ
t(cid:48) − τ = H ∗(τ ) − δ(τ ) + βσ
√
t(cid:48) − τ
≤ H ∗(t(cid:48)) − δ(t)/2 + (cf + β)σ
√
t(cid:48) − τ .
≥ G1(t + 1) − G1(t) − cf σ ≥ −2cf σ.
For any t(cid:48) satisfying t(cid:48) − t ≤ O(δ(t)/βσ)2,
ii) Assume CoV 2 is scheduled at t, we have
√
G1(τ1) +
t − τ1βσ ≤ G2(τ2) +
√
t − τ2βσ.
(41)
√
G(τ ) + βσ
t(cid:48) − τ ≤ H ∗(t(cid:48)) + βσ,
Therefore, t − τ ≥ Θ(δ(t)/βσ).
During the unscheduled time t(cid:48) ∈ (τ, t], we have
√
βσ
t(cid:48) − τ ≤ H ∗(t(cid:48)) + βσ − G(τ )
= δ(t(cid:48)) + G(t(cid:48)) − G(τ ) + βσ
√
≤ δ(t(cid:48)) + cf σ
t(cid:48) − τ + βσ,
√
and consequently δ(t(cid:48)) ≥ 4cf
|δ(t(cid:48)) − δ(τ )| ≤ 2cf
t(cid:48) − τ σ − βσ. Finally,
√
t(cid:48) − τ σ + O(cf σ)
≤ δ(t(cid:48))/2 + O(cf σ).
Let t(cid:48) = t, and we obtain δ(τ ) ≤ 2δ(t) + O(cf σ).
b) Assume the CoV 1 is optimal at t. Suppose τ1 < t − 2,
then CoV 2 is scheduled at t − 1. We have
√
√
G1(τ1) + β
t − τ1σ ≥ G1(t) + 4
≥ G2(t) + cf
3cf σ
√
2σ + βσ,
which contradicts the scheduling decision. Thus, τ1 ≥ t − 2,
and
√
δ1(τ1) ≤ 2
2cf σ + 5cf σ = O(cf σ).
APPENDIX D
PROOF OF THEOREM 1
We first bound the expectation of R∗(T ). By (26), define
the events
Ft = {G∗(t) − H ∗(t) ∈ (0, 5cf σ)} ,
̄Ft = {G∗(t) − H ∗(t) = 0} .
Since Gi(t) has uniform stationary distribution,
P (Ft) = P (|G1(t) − G2(t)| ∈ (0, 5cf σ)) ≤ O(cf σ),
and we obtain
E[G∗(t) − H ∗(t)] = E[G∗(t) − H ∗(t)|Et] * P (Et) + P ( ̄Et)
≤ E[G∗(t) − H ∗(t)|Et, Ft] * P (EtFt)
+ 0 * P (Et ̄Ft) + P ( ̄Et)
≤ O(cf σ)2 + O(σ2.4) ≤ O(cf σ)2.
Next we bound the the expectation of Ri(T ).
i) For sub-optimal CoV i, define the event Γ = {δi(t) =
δ, Gi(t) < G∗(t)}, and we have
E
(cid:20) δi(t)
t − τi(t)
(cid:21)
|Γ
≤ E
(cid:40)
≤
(cid:21)
|ΓEt
(cid:20) δi(t)
t − τi(t)
O (cid:0)(βσ)2/δ(cid:1) ,
O(cf σ),
+ 1 * P ( ̄Et|Γ)
δ > αcf σ,
δ < αcf σ,
where we use (27), (28) at the second inequality, and α is a
large enough constant. The distribution of δi(t) is bounded by
P (δi(t) ≤ δ|Gi(t) < G∗(t) = G∗)
≤P (G∗(t) − Gi(t) ≤ δ + O(cf σ)|Gi(t) < G∗) ≤
δ + O(cf σ)
G∗
.
Integrating over G∗,
P (δi(t) ≤ δ|Gi(t) < G∗(t)) =
(cid:90) 1
f (G∗)dG∗
0
δ + O(cf σ)
G∗
= (δ + O(cf σ)) * E[1/G∗]
≤ δ + O(cf σ).
13
Then,
E
(cid:20) δi(t)
t − τi(t)
|Gi(t) < G∗(t)
(cid:21)
≤ O(cf σ)2 +
(cid:90) 1
αcf σ
≤ O(σ2 log3(1/σ)).
(βσ)2
δ
dδ
ii) For optimal CoV i, define Λ = {Gi(t) = G∗(t)}.
(cid:20) δi(t)
t − τi(t)
≤ O(σ2 log2(1/σ)),
(cid:20) δi(t)
t − τi(t)
(cid:21)
|Ft, Λ
≤ E
|Λ
E
(cid:21)
* P (Ft) + 0 * P ( ̄Ft)
where the second inequality is by (29). To sum up,
(cid:34)
E
R∗(T ) +
(cid:35)
Ri(T )
2
(cid:88)
i=1
E
G∗(t) − H ∗(t) +
̄RMASS =
≤
1
T
1
T
(cid:34)
T
(cid:88)
t=3
δi(t)
t − τi(t)
(cid:35)
+
2
T
2
(cid:88)
i=1
≤ O(σ2 log3(1/σ)).
APPENDIX E
PROOF OF THEOREM 2
Denote the arrival
time of new candidates CoV i by
s1, s2, * * * , sN . We split the whole trip into periods [1, s1 −
the beginning of the i-th
1], [s1, s2 − 1], * * * , [sN , T ]. At
period si, if Gi(si) > Gj(si), we augment the period to
[τj(si), si+1 − 1] so that τj(t) exists within the period for
t > si + 1. Then by Lemma 2, CoV j is sub-optimal
during [τj(si), si − 2], otherwise CoV j should be scheduled
before si. Naturally, the scheduling decision is optimal at
[τj(si) + 1, si − 2]. Therefore, we compute the expected
learning regret inside the i-th period,
si+1−1
(cid:88)
(cid:34)
G∗(t) − H ∗(t) +
E
Ri ≤
t=si+1
(cid:35)
2
(cid:88)
i=1
δi(t)
t − τi(t)
+ 2.
(42)
To sum up, we obtain the average expected learning rate using
the results in the proof of Theorem 1,
̄RMASS =
≤
1
T
1
T
N
(cid:88)
i=1
N
(cid:88)
Ri
si+1−1
(cid:88)
(cid:34)
G∗(t) − H ∗(t) +
E
t=si+1
(cid:21)
i=1
(cid:20) 2N
T
+ E
(cid:35)
2
(cid:88)
i=1
δi(t)
t − τi(t)
≤ O (cid:0)σ2 log3(1/σ)(cid:1) + 2λ.
When λ ≤ O (cid:0)σ2 log3(1/σ)(cid:1), ̄RMASS ≤ O (cid:0)σ2 log3(1/σ)(cid:1) .
There is a final note that the number of candidates could be
less than two due to the departure of CoVs, when scheduling is
trivial. If |Vt| < 2 at the beginning of a period, then there is no
regret during the period. Otherwise, if any departure happens
inside the period, then there is no regret for the rest of the
period. In both cases, the regret is upper bounded by (42).
REFERENCES
[1] Y. Jia, R. Mao, Y. Sun, S. Zhou and Z. Niu, "Online V2X Scheduling for
Raw-Level Cooperative Perception," in Proc. IEEE Int. Conf. Commun.
(ICC), Seoul, South Korea, May 2022.
[2] Z. Li, W. Wang, H. Li, E. Xie, C. Sima, T. Lu, Q. Yu, J. Dai,
"BEVFormer: Learning Bird's-Eye-View Representation from Multi-
Camera Images via Spatiotemporal Transformers," in Proc. Eur. Conf.
Comput. Vis. (ECCV), Tel Aviv, Israel, Oct. 2022.
[3] X. Chen, H. Ma, J. Wan, B. Li, T. Xia, "Multi-view 3d object detection
network for autonomous driving," in Proc. IEEE Conf. Comput. Vis.
Pattern Recognit. (CVPR), Honolulu, USA, Jul. 2017.
[4] E. Arnold, O. Y. Al-Jarrah, M. Dianati, S. Fallah, D. Oxtoby and
A. Mouzakitis, "A Survey on 3D Object Detection Methods for Au-
tonomous Driving Applications," IEEE Trans. Intell. Transport. Syst.,
vol. 20, no. 10, pp. 3782-3795, Oct. 2019.
[5] D. Feng et al., "Deep Multi-Modal Object Detection and Semantic Seg-
mentation for Autonomous Driving: Datasets, Methods, and Challenges,"
IEEE Trans. Intell. Transport. Syst., vol. 22, no. 3, pp. 1341-1360, Mar.
2021.
[6] S. Zeadally, M. A. Javed, and E. B. Hamida, "Vehicular communications
for ITS: Standardization and challenges," IEEE Commun. Standards
Mag., vol. 4, no. 1, pp. 11–17, Mar. 2020.
[7] H. Liu, P. Ren, S. Jain, M. Murad, M. Gruteser and F. Bai, "FusionEye:
Perception Sharing for Connected Vehicles and its Bandwidth-Accuracy
Trade-offs," IEEE Int. Conf. on Sensing, Commun., and Netw. (SECON),
Boston, USA, Jun. 2019.
[8] Q. Chen, S. Tang, Q. Yang and S. Fu, "Cooper: Cooperative Perception
for Connected Autonomous Vehicles Based on 3D Point Clouds," in
Proc. IEEE Int. Conf. Distrib. Comput. Syst. (ICDCS), Dallas, USA,
Jul. 2019.
[9] H. Qiu, Huang P, Asavisanu N, X. Liu, K. Psounis, R. Govindan, "Au-
tocast: Scalable infrastructure-less cooperative perception for distributed
collaborative driving," in Proc. ACM Int. Conf. Mobile Syst., Appl., and
Services (MobiSys), Portland, USA, Jun. 2022.
[10] Q. Chen, X. Ma, S. Tang, J. Guo, Q. Yang, S. Fu, "F-cooper: Feature
based cooperative perception for autonomous vehicle edge computing
system using 3D point clouds," in Proc. ACM/IEEE Symp. Edge Comput.
(SEC), Washington DC, Nov 2019.
[11] T.-H. Wang, S. Manivasagam, M. Liang, B. Yang, W. Zeng, and R. Ur-
tasun, "V2VNet: Vehicle-to-vehicle communication for joint perception
and prediction," in Proc. Eur. Conf. Comput. Vision (ECCV), Glasgow,
United Kingdom, Aug. 2020.
[12] E. Arnold, M. Dianati, R. de Temple and S. Fallah, "Cooperative Percep-
tion for 3D Object Detection in Driving Scenarios Using Infrastructure
Sensors," IEEE Trans. Intell. Transport. Syst., vol. 23, no. 3, pp. 1852-
1864, Mar. 2022.
[13] Hu Y, Fang S, Lei Z, Y. Zhong, and S. Chen, "Where2comm:
Communication-efficient collaborative perception via spatial confidence
maps," in Proc. Neural Inf. Process. Syst. (NeurIPS), New Orleans, USA,
Nov. 2022.
[14] 5GAA Automotive Association, "Position paper on deployment
band configuration for C-V2X at 5.9 GHz in Europe", [Online].
Available: https://5gaa.org/content/uploads/2021/06/5GAA S-210019
Position-paper-on-European-deployment-band-configuration-for-C-V2X
final.pdf
[15] P Auer, N Cesa-Bianchi, P Fischer, "Finite-time analysis of the multi-
armed bandit problem," Machine Learning, vol. 47, no. 2, pp. 235-256,
Dec. 2022.
[16] Y. Sun et al., "Adaptive learning-based task offloading for vehicular
edge computing systems," IEEE Trans. Veh. Technol., vol. 68, no. 4, pp.
3061-3074, Apr. 2019.
[17] Y. Sun, S. Zhou, and J. Xu, "EMM: Energy-aware mobility management
for mobile edge computing in ultra dense networks," IEEE J. Sel. Areas
Commun.,, vol. 35, no. 11, pp. 2637-2646, Nov. 2017.
[18] P. Whittle, "Restless bandits: Activity allocation in a changing world,"
J. Appl. Probability, vol. 25, no. 2, pp. 287-298, Mar. 1988.
[19] G. Aur ́elien, and E. Moulines, "On upper-confidence bound policies for
switching bandit problems," in Proc. Int. Conf. Algorithmic Learning
Theory (ALT), Berlin, Germany, Oct. 2011.
[20] A. Slivkins and E. Upfal, "Adapting to a changing environment: the
brownian restless bandits," in Proc. Annu. Conf. Learn. Theory (COLT),
Helsinki, Finland, Jul. 2008.
[21] P. Auer, N. Cesa-Bianchi N, Y. Freund, and R. E. Schapire, "The
nonstochastic multiarmed bandit problem," SIAM J. Comput., vol. 32,
no. 1, pp. 48-77, 2002.
14
[22] ETSI, "Intelligent Transport Systems (ITS); Vehicular Communications;
Basic Set of Applications; Analysis of the Collective Perception Ser-
vice," ETSI TR 103 562, V2.1.1, 2019.
[23] K. Garlichs, H. -J. G ̈unther and L. C. Wolf, "Generation Rules for the
Collective Perception Service," in Proc. IEEE Veh. Netw. Conf. (VNC),
Los Angeles, USA, Dec. 2019.
[24] Y. Li, S. Ren, P. Wu, S. Chen, C. Feng, and W. Zhang, "Learning distilled
collaboration graph for multi-agent perception," in Advances in Neural
Information Processing Systems (NeurIPS), Dec. 2021.
[25] R. Xu, H. Xiang, Z. Tu, X. Xia, M. Yang, and J. Ma, "V2X-ViT: Vehicle-
to-everything cooperative perception with vision transformer," in Proc.
Eur. Conf. Comput. Vis. (ECCV), Tel Aviv, Israel, Oct. 2022.
[26] S. Shi, J. Cui, Z. Jiang, Z. Yan, G. Xing, J. Niu, and Z. Ouyang, "VIPS:
real-time perception fusion for infrastructure-assisted autonomous driv-
ing," in Proc. Int. Conf. Mobile Comput. Netw. (MobiCom), Sydney,
Australia, Oct. 2022.
[27] H. Xu and X. Liu, "Perception synergy optimization with deep reinforce-
ment learning for cooperative perception in C-V2V scenarios," Vehicular
Communications, vol. 38, 2022.
[28] X. Zhang, A. Zhang, J. Sun, X. Zhu, Y. E. Guo, F. Qian, and Z. M.
Mao, "EMP: Edge-assisted multi-vehicle perception," in Proc. Int. Conf.
Mobile Comput. Netw. (MobiCom), New Orleans, USA, Oct. 2021.
[29] Z. Bai, G. Wu, M. J. Barth, Y. Liu, E. A. Sisbot, and K. Oguchiet,
"VINet: Lightweight, Scalable, and Heterogeneous Cooperative Percep-
tion for 3D Object Detection," [Online]. Available: https://arxiv.org/abs/
2212.07060
[30] M. K. Abdel-Aziz, C. Perfecto, S. Samarakoon, M. Bennis, and W.
Saad, "Vehicular Cooperative Perception Through Action Branching and
Federated Reinforcement Learning," IEEE Trans. Commun., vol. 70, no.
2, pp. 891-903, Feb. 2022.
[31] H. Du, S. Leng, K. Zhang and L. Zhou, "Cooperative sensing and task
offloading for autonomous platoons," in Proc. IEEE Global Commun.
Conf. (GLOBECOM), Taipei, China, 2020.
[32] Y. Liu, J. Tian, N. Glaser, and Z. Kira, "When2com: Multi-agent
perception via communication graph grouping," in Proc. IEEE Conf.
Comput. Vis. Pattern Recognit. (CVPR), Virtual, Jun. 2020.
[33] H. Yu et al., "DAIR-V2X: A Large-Scale Dataset
for Vehicle-
Infrastructure Cooperative 3D Object Detection," in Proc. IEEE Conf.
Comput. Vis. Pattern Recognit. (CVPR), New Orleans, USA, Jun. 2022.
[34] ETSI, "Intelligent Transport Systems (ITS); Vehicular Communications;
Basic Set of Applications; Part 2: Specification of Cooperative Aware-
ness Basic Service," ETSI EN 302 637-2, V1.4.1, 2019.
[35] Y. Liu, J. Tian, C. Ma, N. Glaser, C. Kuo, and Z. Kira, "Who2com:
Collaborative perception via learnable handshake communication," in
Proc. IEEE Int. Conf. Robot. Autom. (ICRA), Paris, France, May 2020.
[36] R. Mao, J. Guo, Y. Jia, Y. Sun, S. Zhou, and Z. Niu, "DOLPHINS:
Dataset for Collaborative Perception enabled Harmonious and Intercon-
nected Self-driving," in Proc. Asian Conf. Comput. Vis. (ACCV), Macau
SAR, China, Dec. 2022.
[37] A. Dosovitskiy, G. Ros, F. Codevilla, A. Lopez, V. Koltun, "CARLA:
An open urban driving simulator," in Proc. Ann. Conf. Robot Learn.
(CoRL), Mountain View, USA, Nov. 2017.
[38] A. H. Lang, S. Vora, H. Caesar, L. Zhou, J. Yang, and O. Beijbom,
"Pointpillars: Fast encoders for object detection from point clouds," in
Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Long Beach,
USA, Jun. 2019.
[39] OpenPCDet Development Team, "Openpcdet: An opensource toolbox
for 3d object detection from point clouds," [Online]. Available: https:
//github.com/open-mmlab/OpenPCDet
[40] P. A. Lopez et al., "Microscopic Traffic Simulation using SUMO," in
Proc. IEEE Intell. Transport. Syst. Conf. (ITSC), Maui, USA, 2018.
[41] ETSI, "Decentralized Congestion Control Mechanisms for Intelligent
Transport Systems operating in the 5 GHz range; Access layer part,"
ETSI TS 102 687, V1.2.1, April 2018.
[42] B. McCarthy, A. O'Driscoll, "Congestion control in the cellular-V2X
sidelink," [Online]. Available: https://arxiv.org/abs/2106.04871
[43] 3GPP, "Study on evaluation methodology of new Vehicle-to-Everything
use cases for LTE and NR," 3GPP TR 37.885, v15.1.0, Sept. 2018.
[44] Y. Sun, S. Zhou, and Z. Niu, "Distributed task replication for vehicular
edge computing: Performance analysis and learning-based algorithm,"
IEEE Trans. Wireless Commun., vol. 20, no. 2, pp. 1138-1151, Feb.
2020.
[45] D. Feng, A. Harakeh, S. L. Waslander and K. Dietmayer, "A Review and
Comparative Study on Probabilistic Object Detection in Autonomous
Driving," in IEEE Trans. on Intell. Transport. Syst., vol. 23, no. 8, pp.
9961-9980, Aug. 2022.
|
|
http://arxiv.org/abs/2302.13028v1 | 2023-02-25T09:02:01 | 2023-02-25T09:02:01 | A Light-weight Deep Learning Model for Remote Sensing Image
Classification | In this paper, we present a high-performance and light-weight deep learning
model for Remote Sensing Image Classification (RSIC), the task of identifying
the aerial scene of a remote sensing image. To this end, we first valuate
various benchmark convolutional neural network (CNN) architectures: MobileNet
V1/V2, ResNet 50/151V2, InceptionV3/InceptionResNetV2, EfficientNet B0/B7,
DenseNet 121/201, ConNeXt Tiny/Large. Then, the best performing models are
selected to train a compact model in a teacher-student arrangement. The
knowledge distillation from the teacher aims to achieve high performance with
significantly reduced complexity. By conducting extensive experiments on the
NWPU-RESISC45 benchmark, our proposed teacher-student models outperforms the
state-of-the-art systems, and has potential to be applied on a wide rage of
edge devices. | [
"Lam Pham",
"Cam Le",
"Dat Ngo",
"Anh Nguyen",
"Jasmin Lampert",
"Alexander Schindler",
"Ian McLoughlin"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13028v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13028v1",
"@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"
] | 3
2
0
2
b
e
F
5
2
]
V
C
.
s
c
[
1
v
8
2
0
3
1
.
2
0
3
2
:
v
i
X
r
a
A Light-weight Deep Learning Model for Remote
Sensing Image Classification
Lam Pham*
Austrian Institute of Technology
Vienna, Austria
[email protected]
Cam Le*
HCM University of Technology
HCM, VietNam
[email protected]
Dat Ngo
University of Essex
Colchester, UK
[email protected]
Anh Nguyen
FPT Soft Company
HCM, VietNam
[email protected]
Jasmin Lampert
Austrian Institute of Technology
Vienna, Austria
[email protected]
Alexander Schindler
Austrian Institute of Technology
Vienna, Austria
[email protected]
Ian McLoughlin
Singapore Institute of Technology
Singapore
[email protected]
Abstract-In this paper, we present a high-performance
and light-weight deep learning model
for Remote Sens-
ing Image Classification (RSIC), the task of identifying the
aerial scene of a remote sensing image. To this end, we
first evaluate various benchmark convolutional neural net-
work (CNN) architectures: MobileNet V1/V2, ResNet 50/151V2,
InceptionV3/InceptionResNetV2, EfficientNet B0/B7, DenseNet
121/201, ConNeXt Tiny/Large. Then, the best performing models
are selected to train a compact model
in a teacher-student
arrangement. The knowledge distillation from the teacher aims to
achieve high performance with significantly reduced complexity.
By conducting extensive experiments on the NWPU-RESISC45
benchmark, our proposed teacher-student models outperforms
the state-of-the-art systems, and has potential to be applied on
a wide rage of edge devices.
Index Terms-Teacher-student model, convolutional neural
network (CNN), data augmentation, high-level features.
I. INTRODUCTION
Remote sensing image classification (RSIC) is a core task
for a range of real-world applications including land use classi-
fication, natural hazard assessment [1], scene-driven geospatial
object detection [2], and environmental monitoring [3]. The
task has therefore drawn much attention from the research
community in recent years, including in the area of datasets
and benchmarks. The earliest RSIC dataset, UCM [4], was pro-
posed in 2010. Subsequently, more challenging RSIC datasets
have been published, such as NWPU VHR-10 (2014) [5],
SAT6 (2015) [6], SIRI-WHU (2015) [7], AID (2017) [8],
OPTIMAL (2018) [9], NWPU-RESISC45 (2017) [10], etc.
Among these published datasets, NWPU-RESISC45 has the
largest number of classes, comprising 45 image scenes, each
of which is represented by 700 remote sensing images. Addi-
tionally, a wide range of classification models have been pub-
lished for RSIC tasks. Early systems used conventional image
processing techniques such as Texture Descriptors (TD) [11],
Local binary patterns (LBP) [12], Color Histogram (CH),
Histogram of Oriented Gradient (HOG) [13], Scale-Invariant
(*) Lam Pham and Cam Le made equal contribution to this paper.
Feature Transformation (SIFT) [14] to extract hand-crafted
features. Then, these features were classified by traditional ma-
chine learning based models such as Support Vector Machine
(SVM) [10], [15], Gaussian Mixture Model (GMM) [16],
etc. More recently proposed RSIC systems leveraged deep
learning based network architectures, which have proven to
be more effective compared to traditional machine learning
methods [17], [18]. Most deep learning based systems for
RSIC make use of Convolutional Neural Network (CNN)
based architectures such as ResNet [19], DenseNet [20],
EfficientNet [21] or Transformer [22]. Although deep learning
based RSIC systems have demonstrated the potential for very
good performance [23], these network architectures involve
large footprint models with a high number of trainable param-
eters [23]. This causes challenges to apply such deep learning
based RSIC models within edge devices [24]. In this paper, we
aim to develop a low footprint RSIC model which is capable
of achieving high-performance by leveraging the strength of
advanced high complexity models to achieve cutting-edge per-
formance. The resulting distilled student architecture achieves
a model size reduction of 98% at the cost of a 1.4% relative
drop in performance. Our main contributions are as follows:
(a) A mechanism to combine individual high-performing
CNN-based networks trained on the RSIC task, to inform a
single robust teacher network. Given the teacher, we apply a
teacher-student scheme to train the student. Using knowledge
distillation from the teacher, the student not only performs
well but is also a low complexity model. In this paper, we
propose a constraint of maximum 5 million trainable param-
eters for a low-complexity RSIC model. This is consistent
with the capability of typical edge devices. (b) We evaluate
our proposed teacher and student models on the NWPU-
RESISC45 benchmark [10]. Results reveal that the proposed
models outperform state-of-the-art systems with or without
considering the issue of complexity – demonstrating the ability
of the technique to enable implementation on a range of edge
devices.
Fig. 1.
technique.
Evaluation of benchmark networks using the transfer learning
II. THE THREE-PHASE PROCESS TO DEVELOP AND
ACHIEVE A HIGH-PERFORMANCE AND LOW-COMPLEXITY
RSIC MODEL
In this section, we describe the methods employed to
achieve a high-performance and low-complexity RSIC model,
which leverages a teacher-student arrangement [25]. In partic-
ular, the process comprises three main phases:
• Phase I: We first evaluate a wide range of benchmark
convolution neural network (CNN) based architectures.
Then, we select which networks (i.e. the best performance
models) to use for developing the teacher model, and
which network is used for the student model (i.e. the
student model not only performs well but also presents a
low footprint).
• Phase II: In this phase, the best performance models from
Phase I are used to develop the teacher. After training
the proposed teacher, the feature maps at the next to last
dense layer of the teacher are extracted. The extracted
feature maps are referred to as high-level features.
• Phase III: Finally, the student network, which selected
in Phase I, is trained with the high-level features (i.e.
via knowledge distillation from the teacher) to achieve a
high-performance and low-complexity RSIC model.
A. Phase I: Evaluate the benchmark neural networks to select
high-performance networks for the teacher and student
We assessed various convolutional neural network (CNN)
based architectures for both the teacher and the student
models by evaluating twelve different benchmark deep
convolutional neural networks: MobileNet, MobileNetV2,
ResNet50, Resnet151V2, InceptionV3, InceptionResNetV2,
DenseNet121, DenseNet201, EfficientNetB0, EfficientNetB7,
ConvNeXtTiny, and ConvNeXtLarge, all available in the Keras
library [26]. As the top of Figure 1 shows, the benchmark
networks are first trained with the ImageNet dataset [27],
referred to as the up-stream task. Then, the first layer to the
global pooling layer of these pre-trained networks are extracted
and combined with a Dense Layers block to perform the down-
stream RSIC task as shown at the bottom of Figure 1. In other
words, we apply a transfer learning method in which the first
Fig. 2. The Teacher model generated from individual high-performance
networks
layer to the global pooling layer, trained from the up-stream
task using the ImageNet dataset [27], are transferred to the
down-stream RSIC task. The Dense Layers block is considered
to house the adapting layers for the down-stream RSIC task.
We also apply data augmentation for the RSIC down-stream
task, namely Image Rotation [28] and Mixup [29], performed
on the remote sensing image input dataset. In particular, all
images in an original RSIC dataset are rotated using three
different angles: 90, 180, and 270°. Since three angles are
used, the augmented dataset is four times larger than the
original. Next, batches of 60 images are randomly selected
from the new dataset. For each batch, we apply the Mixup [29]
method to mix the images within one batch with random ratios.
Both Uniform and Beta distributions are used to generate the
mixup ratios, and we make use of both the rotation augmented
image database in addition to the new mixup images; as a
consequence the batch size increases by three times from 60
to 180 images.
Thanks to the use of Mixup [29] for data augmentation, the
labels will no longer be in one-hot encoding format. Therefore
we apply Kullback-Leibler divergence (KL) loss [30] instead
of Entropy loss to train the evaluating models, as in equation 1:
LossKL(Θ) =
B
(cid:88)
C
(cid:88)
b=1
c=1
ybc log
(cid:27)
(cid:26) ybc
ˆybc
+
λ
2
||Θ||2
2 ,
(1)
to 0.0001,
the constant λ is
where Θ presents trainable parameters,
empirically set
the number
of classes C, ybc and ˆybc denote expected and predicted
probabilities of an input image, respectively. Note that we
set the low learning rate to be 0.0001 and none of trainable
parameters are frozen during the training process.
the batch size B,
B. Phase II: Develop the teacher and extract high-level fea-
tures from the teacher
Given N high-performance models selected from Phase I,
we then develop and train the teacher architecture during this
phase. Again, we leverage parameter based transfer learning
techniques to develop the teacher as shown in Figure 2. In
particular, the first layer to the Dense Layer 01 of Dense Lay-
ers block from all N high-performance networks described in
Phase I are reused and then combined to generate a composite
high-level feature. If we consider N vectors en ∈ R512 as the
output of the Dense Layer 01, the Combination block used to
generate the composite high-level feature in Figure 2 by,
f (e1, e2, ..., eN) =
N
(cid:88)
n=1
en (cid:12) wi + b
(2)
Augmented Remote Sensing ImagesCNN-based BackboneDense LayersDense Layers....ImageNet Reused Trainable ParametersDown-stream TaskUp-stream TaskLayersSettingsOutputsDense Layer 01Dense Layer 02Fully Connected (512) –ReLU–Dropout (0.2)Fully Connected (C) -Softmax512CFirst Layer to Global Pooling Layer....MobileNetMobileNetV2...EfficientNetB0Augmented Remote Sensing ImagesCNN-based BackboneDense Layer 01....CNN-based BackboneDense Layer 01CNN-based BackboneDense Layer 01........CombinationFully Connected & Softmaxhigh-levelfeature..frozenfrozenfrozenfrozenfrozenfrozene1e2eNlearning rate of 0.0001 and no trainable parameters are frozen
during the student training phase.
III. EXPERIMENTS AND RESULTS
A. Dataset
In this paper, the benchmark dataset of NWPU-RESISC45
[10] is used to evaluate all state of the art and proposed models.
The dataset, which was collected from more than 100 different
countries and regions around the world, consists of 31,500
remote sensing images separated into 45 scene classes. Each
class comprises 700 RGB images with a resolution of 256 ×
256 × 3. To compare with state-of-the-art systems, we comply
with the original settings mentioned in [10]. We then split the
NWPU-RESISC45 dataset into Training and Testing sets with
two different ratios: 10%-90% and 20%-80%, respectively.
B. Evaluation metric
As the Accuracy (Acc.%) has been used as the main
metric to compare performance among the RSIC systems, we
also apply the metric in this paper. Additionally, as we aim
to achieve a low complexity model for the RSIC task, we
compute the number of trainable parameters (M) to compare
against state-of-the-art RSIC systems.
C. Experimental settings
We constructed our proposed deep learning networks with
Tensorflow using the Adam method [42] for optimization. The
training and evaluating processes are conducted on two Titan
RTX 24GB GPUs. The results presented in this paper are all
the average scores from 10 individual experimental runs.
D. Results and Discussions
As experimental results show in Table I, we can see that
ConvNeXt, EfficientNet, DenseNet based models are com-
petitive and outperform MobileNet, ResNet and Inception
based models. Particularly, the best network architectures of
ConvNeXtLarge and ConvNeXtTiny achieve 95.3% and 93.0%
accuracy, respectively. Around 2% worse than ConvNeXt-
Large, the performance of EfficientNetB7 and DenseNet201 on
the NWPU-RESSIC45 task are 93.6% and 93.3%, respectively.
Meanwhile, their smaller variants named DenseNet121 and
EfficientNetB0 achieve over 92% accuracy.
Although ConvNeXt, EfficientNet and DenseNet based
models perform well among the evaluating network architec-
tures, these involve large footprints. In particular, the three
best variants, namely ConvNeXtLarge, EfficientNetB7, and
DensNet201 have some of the largest parameter set sizes
of 196.6, 65.1, and 19.1 M, respectively. Among the Con-
vNeXt, EfficientNet and DenseNet variants, only Efficient-
NetB0 combines a relatively good accuracy of 92.3% with a
low complexity footprint (4.7 M parameters). As a result, we
select EfficientNetB0 as the foundation network for the student
model required in Phase III. We also note that DenseNet201,
EfficientNetB7 and ConvNeXtLarge perform better than 93%
and their general architectures are dissimilar to each other. We
Fig. 3. The student model with knowledge distillation from the teacher.
where wi, b ∈ R512 are weight and bias trainable pa-
rameters. The high-level feature is finally transferred into a
Fully Connected layer followed by a Softmax for classifying
to target classes. When we finish training the teacher model,
the high-level features are then extracted and used for the
knowledge distillation process to train the student in Phase
III which follows.
Data augmentation is used when training the teacher net-
work, however only Image Rotation [28] is applied at this and
thus the labels can remain in one-hot format, and Entropy loss
can be used to train the teacher model as in equation 3:
LossE(Θ) = −
B
(cid:88)
C
(cid:88)
b=1
c=1
ybc log {ˆybc} +
λ
2
||Θ||2
2 ,
(3)
where Θ are trainable parameters, the constant λ is set to
0.0001, the batch size B and the number of classes C, ybc and
ˆybc denote expected and predicted probabilities of a particular
image, respectively.
We again set
the low learning rate to 0.0001, and the
trainable parameters of the first layer to the Dense Layer 01 are
frozen when training the teacher. In other words, only trainable
parameters in the Combination block and in the finally Fully
Connected layer are updated during the training process.
C. Phase III: Train the student network to achieve high-
performance and low-complexity RSIC
From the results in Phase I, a network architecture, which
not only performs well but also presents a low footprint, is
selected and considered as the base student model. We then
train the student with the high-level features extracted from the
teacher mentioned in Phase II. As Figure 3 shows, the student
is trained with two loss functions. While the first Entropy loss
is used for the classification task, the Euclidean Distance loss
helps to ensure the high-level features of the student become
closer to the high-level features extracted from the teacher,
effectively guiding the feature discrimination ability of the
student. The ratio between both losses is empirically set to
0.5/0.5.
Regarding the data augmentation used to train the student,
only Image Rotation [28] is applied. We also set the low
..512-dimvectorsFC & Softmax..512-dimvectorsFC & SoftmaxEntropy lossEuclidean Distance lossHigh-levelTeacherStudentEntropy loss........Augmented ImagesAugmented ImagesCNN-based BackboneCNN-based BackboneCNN-based BackboneCNN-based BackboneDense Layer 01Dense Layer 01Dense Layer 01Combination........Featuree1e2eN....high performance&lowfootprinthigh performanceTABLE I
PERFORMANCE COMPARISON OF BENCHMARK CNN BASED NETWORK ARCHITECTURES ON
THE NWPU-RESISC45 TASK WITH A TRAINING/TESTING SPLIT OF 20/80.
Network
Accuracy (%)
Parameters (M)
Network
Accuracy (%)
Parameters (M)
MobileNetV2
88.0
2.9
DenseNet121
92.0
7.5
MobileNet
90.8
3.7
DenseNet201
93.3
19.1
ResNet50
91.8
24.6
EfficientNetB0
92.3
4.7
Resnet151V2
92.4
59.2
EfficientNetB7
93.6
65.1
InceptionV3
86.9
22.8
ConvNeXtTiny
93.0
27.5
InceptionResNetV2
90.5
55.1
ConvNeXtLarge
95.3
196.6
TABLE II
PERFORMANCE COMPARISON OF THE TEACHER (A COMBINATION OF
CONVNEXTLARGE,DENSENET201,EFFICIENTNETB7), THE STUDENT
(EFFICIENTNETB0) WITH VARIOUS SETTINGS, ON THE
NWPU-RESISC45 TASK WITH A TRAINING/TESTING SPLIT OF 20/80.
Network
Teacher
EfficientNetB0 (student)
EfficientNetB0+distillation
EfficientNetB0-6B+distillation
EfficientNetB0-5B+distillation
EfficientNetB0-4B+distillation
EfficientNetB0-3B+distillation
Parameters (M)
280.8
4.7
4.7
3.0
0.93
0.37
0.11
Accuracy (%)
96.2
92.3
94.8
94.4
93.5
91.3
85.6
TABLE III
PERFORMANCE (ACC.%) COMPARISON OF THE PROPOSE TEACHER
AGAINST STATE-OF-THE-ART RSIC SYSTEMS ON THE NWPU-RESISC45
BENCHMARK WITH TWO SPLIT ARRANGEMENTS, AND WITHOUT ANY
TRAINABLE PARAMETER SIZE CONSTRAINT.
Methods
MG-CAP [31]
EfficientNet-B3-aux [32]
ResNeXt-101 + MTL [33]
MBLANet [34]
GRMANet [35]
KFBNet [36]
CTNet [37]
TRS [22]
RSP-ViTAEv2-S-E100 [23]
Our system (Teacher)
10% training
90.8
91.1
91.9
92.3
93.2
93.1
93.9
93.1
94.4
94.6
20% training
93.0
93.8
94.2
94.6
94.7
95.1
95.4
95.6
95.6
96.2
therefore, select these three network architectures to generate
the teacher, as required in Phase II.
As Table II shows,
the teacher (i.e. a combination of
DenseNet201, EfficientNetB7 and ConvNeXtLarge) achieves
an accuracy of 96.2%, but with a very large footprint of
280.8 M parameters. Knowledge distillation from this capable
teacher into student EfficientNetB0 allows it to achieve an
accuracy of 94.8% while maintaining a low complexity of
4.7 M parameters. To propose a wide range of low com-
plexity models, we further evaluate variants of the student
EfficientNetB0 model. In particular, variants of the student
are generated by removing certain convolutional blocks in
the EfficientNetB0 backbone architecture to reduce complexity
further. EfficientNetB0-6B to EfficientNetB0-3B are variants
of EfficientNetB0 obtained by removing convolutional block
7 only, removing convolutional blocks 6 and 7, removing
all convolutional blocks from 5 to 7 and removing all con-
volutional blocks 4 to 7 inclusive. Experimental results in
Table II indicate that when the footprint of EfficientB0 based
students is reduced, the accuracy performance also tends to
decrease. However, we can achieve a very low complexity
TABLE IV
PERFORMANCE COMPARISON OF THE PROPOSED STUDENT AGAINST
STATE-OF-THE-ART SYSTEMS ON THE BENCHMARK NWPU-RESISC45
DATASET WITH TWO SPLIT SETTINGS AND A CONSTRAINT OF NO MORE
THAN 5M TRAINABLE PARAMETERS.
Methods
EfficientNet-B0-aux (≈ 5M) [32]
DMP-MobileNetV2 (3.47 M) [38]
BiMobileNet (2.52 M) [39]
SE-MDPMNet (5.17 M) [40]
LGRIN (4.63 M) [41]
Our system (Student+distillation)
10% training
90.0
90.3
91.9
91.8
91.9
93.3
20% training
92.9
93.1
93.9
94.1
94.4
94.8
model of 0.37 M parameters with a performance of 91.3%
from EfficientNetB0-4B, which opens the potential for RSIC
applications on a very wide range of edge devices.
Finally, we compare our proposed models to the state-
of-the-art RSIC systems basing on two criteria: (1) accu-
racy performance without any model complexity constraint
and (2) accuracy performance with a constraint of 5 M
trainable parameters maximum. As Table III shows, RSIC
performance with the first criterion reveals that our proposed
teacher (i.e. a combination of ConvNeXtLarge, DenseNet201,
and EfficientNetB7) outperforms the state-of-the-art systems,
achieving 94.6% and 96.2% for the training/testing settings
of 10/90 and 20/80, respectively. For the second criteria, i,e,
low-complexity RSIC models (< 5 M trainable parameters)
shown in Table IV, our proposed student with knowledge
distillation also outperforms the state-of-the-art systems on
both training/testing split arrangements, yielding results of
93.3% for a 10/90 split ratio and 94.8% for a 20/80 split ratio.
IV. CONCLUSION
This paper has presented, explored, and developed a range
of deep convolutional neural networks for the remote sens-
ing image classification (RSIC) task, and in particular con-
sidered model complexity. Through experimentation on the
NWPU-RESISC45 benchmark, we obtained two RSIC sys-
tems: (1) a teacher developed by combining ConvNeXtLarge,
DenseNet201, and EfficientNetB7 network architectures and;
(2) a low complexity student (just 4.7 M trainable parameters),
which leverages EfficientNetB0 via knowledge distillation
from the teacher. Our proposed RSIC systems outperform the
state of the art, whether complexity is constrained or not.
Additionally, a wide range of low- to very low-complexity
models using variants of EfficientNetB0 are proposed and
explored, which are feasible to apply on edge devices with
differing degrees of computational constraint.
[25] J. Gou, B. Yu, S. J. Maybank, and D. Tao, "Knowledge distillation: A
survey," International Journal of Computer Vision, vol. 129, pp. 1789–
1819, 2021.
[26] F. Chollet et al., "Keras," https://keras.io, 2015.
[27] O. R. et al., "ImageNet Large Scale Visual Recognition Challenge,"
International Journal of Computer Vision, no. 3, pp. 211–252, 2015.
[28] C. Shorten and T. M. Khoshgoftaar, "A survey on image data augmen-
tation for deep learning," Journal of big data, vol. 6, no. 1, pp. 1–48,
2019.
[29] K. Xu, D. Feng, H. Mi, B. Zhu, D. Wang, L. Zhang, H. Cai, and
S. Liu, "Mixup-based acoustic scene classification using multi-channel
convolutional neural network," in Pacific Rim Conference on Multimedia,
2018, pp. 14–23.
[30] S. Kullback and R. A. Leibler, "On information and sufficiency," The
annals of mathematical statistics, vol. 22, no. 1, pp. 79–86, 1951.
[31] S. Wang, Y. Guan, and L. Shao, "Multi-granularity canonical appearance
pooling for remote sensing scene classification," IEEE Transactions on
Image Processing, vol. 29, pp. 5396–5407, 2020.
[32] Y. Bazi, M. M. Al Rahhal, H. Alhichri, and N. Alajlan, "Simple yet
effective fine-tuning of deep CNNs using an auxiliary classification loss
for remote sensing scene classification," Remote Sensing, vol. 11, no. 24,
p. 2908, 2019.
[33] Z. Zhao, Z. Luo, J. Li, C. Chen, and Y. Piao, "When self-supervised
learning meets scene classification: Remote sensing scene classification
based on a multitask learning framework," Remote Sensing, vol. 12,
no. 20, p. 3276, 2020.
[34] S.-B. Chen, Q.-S. Wei, W.-Z. Wang, J. Tang, B. Luo, and Z.-Y. Wang,
"Remote sensing scene classification via multi-branch local attention
network," IEEE Transactions on Image Processing, vol. 31, pp. 99–109,
2021.
[35] B. Li, Y. Guo, J. Yang, L. Wang, Y. Wang, and W. An, "Gated recurrent
multiattention network for VHR remote sensing image classification,"
IEEE Transactions on Geoscience and Remote Sensing, vol. 60, pp. 1–
13, 2021.
[36] F. Li, R. Feng, W. Han, and L. Wang, "High-resolution remote sensing
image scene classification via key filter bank based on convolutional
neural network," IEEE Transactions on Geoscience and Remote Sensing,
vol. 58, no. 11, pp. 8077–8092, 2020.
[37] P. Deng, K. Xu, and H. Huang, "When CNNs meet vision transformer:
A joint framework for remote sensing scene classification," IEEE
Geoscience and Remote Sensing Letters, vol. 19, pp. 1–5, 2021.
[38] J. Hou, Z. Guo, Y. Wu, W. Diao, and Y. Feng, "Dmpconv: Decoupling
multi-branch pointwise convolutions for light-weight remote sensing
scene classification." ISPRS Annals of Photogrammetry, Remote Sensing
& Spatial Information Sciences, no. 3, 2022.
[39] D. Yu, Q. Xu, H. Guo, C. Zhao, Y. Lin, and D. Li, "An efficient
and lightweight convolutional neural network for remote sensing image
scene classification," Sensors, vol. 20, no. 7, p. 1999, 2020.
[40] B. Zhang, Y. Zhang, and S. Wang, "A lightweight and discriminative
model for remote sensing scene classification with multidilation pooling
module," IEEE Journal of Selected Topics in Applied Earth Observations
and Remote Sensing, vol. 12, no. 8, pp. 2636–2653, 2019.
[41] C. Xu, G. Zhu, and J. Shu, "A lightweight and robust
lie group-
convolutional neural networks joint representation for remote sensing
scene classification," IEEE Transactions on Geoscience and Remote
Sensing, vol. 60, pp. 1–15, 2021.
[42] D. P. Kingma and J. Ba, "Adam: A method for stochastic optimization,"
CoRR, vol. abs/1412.6980, 2015.
REFERENCES
[1] D. Poursanidis and N. Chrysoulakis, "Remote sensing, natural hazards
and the contribution of ESA sentinels missions," Remote Sensing Appli-
cations: Society and Environment, vol. 6, pp. 25–38, 2017.
[2] Q. Feng, J. Liu, and J. Gong, "UAV remote sensing for urban vegetation
mapping using random forest and texture analysis," Remote sensing,
vol. 7, no. 1, pp. 1074–1094, 2015.
[3] C. J. Van Westen, "Remote sensing and GIS for natural hazards
assessment and disaster risk management," Treatise on geomorphology,
vol. 3, pp. 259–298, 2013.
[4] Y. Yang and S. Newsam, "Bag-of-visual-words and spatial extensions
for land-use classification," in Proc. SIGSPATIAL, 2010, pp. 270–279.
[5] G. Cheng, J. Han, P. Zhou, and L. Guo, "Multi-class geospatial object
detection and geographic image classification based on collection of
part detectors," ISPRS Journal of Photogrammetry and Remote Sensing,
vol. 98, pp. 119–132, 2014.
[6] S. Basu, S. Ganguly, S. Mukhopadhyay, R. DiBiano, M. Karki, and
R. Nemani, "Deepsat: a learning framework for satellite imagery," in
Proc. SIGSPATIAL, 2015, pp. 1–10.
[7] B. Zhao, Y. Zhong, G.-S. Xia, and L. Zhang, "Dirichlet-derived multiple
topic scene classification model for high spatial resolution remote sens-
ing imagery," IEEE Transactions on Geoscience and Remote Sensing,
vol. 54, no. 4, pp. 2108–2123, 2015.
[8] G.-S. Xia, J. Hu, F. Hu, B. Shi, X. Bai, Y. Zhong, L. Zhang, and X. Lu,
"Aid: A benchmark data set for performance evaluation of aerial scene
classification," IEEE Transactions on Geoscience and Remote Sensing,
vol. 55, no. 7, pp. 3965–3981, 2017.
[9] Q. Wang, S. Liu, J. Chanussot, and X. Li, "Scene classification with
recurrent attention of VHR remote sensing images," IEEE Transactions
on Geoscience and Remote Sensing, vol. 57, no. 2, pp. 1155–1167, 2018.
[10] G. Cheng, J. Han, and X. Lu, "Remote sensing image scene classifi-
cation: Benchmark and state of the art," Proceedings of the IEEE, vol.
105, no. 10, pp. 1865–1883, 2017.
[11] B. S. Manjunath, J.-R. Ohm, V. V. Vasudevan, and A. Yamada, "Color
and texture descriptors," IEEE Transactions on circuits and systems for
video technology, vol. 11, no. 6, pp. 703–715, 2001.
[12] M. Pietik ̈ainen, "Local binary patterns," Scholarpedia, vol. 5, no. 3, p.
9775, 2010.
[13] N. Dalal and B. Triggs, "Histograms of oriented gradients for human
detection," in Proc. CVPR, 2005, pp. 886–893.
[14] G. Lowe, "Sift-the scale invariant feature transform," Int. J, vol. 2, no.
91-110, p. 2, 2004.
[15] P. Du, J. Xia, W. Zhang, K. Tan, Y. Liu, and S. Liu, "Multiple classifier
system for remote sensing image classification: A review," Sensors,
vol. 12, no. 4, pp. 4764–4792, 2012.
[16] F. Perronnin, J. S ́anchez, and T. Mensink, "Improving the Fisher kernel
for large-scale image classification," in Proc. ECCV, 2010, pp. 143–156.
[17] M. Mehmood, A. Shahzad, B. Zafar, A. Shabbir, and N. Ali, "Remote
sensing image classification: A comprehensive review and applications,"
Mathematical Problems in Engineering, vol. 2022, 2022.
[18] Y. Gu, Y. Wang, and Y. Li, "A survey on deep learning-driven remote
sensing image scene understanding: Scene classification, scene retrieval
and scene-guided object detection," Applied Sciences, vol. 9, no. 10, p.
2110, 2019.
[19] A. Shabbir, N. Ali, J. Ahmed, B. Zafar, A. Rasheed, M. Sajid, A. Ahmed,
and S. H. Dar, "Satellite and scene image classification based on
transfer learning and fine tuning of resnet50," Mathematical Problems
in Engineering, vol. 2021, 2021.
[20] W. Tong, W. Chen, W. Han, X. Li, and L. Wang, "Channel-attention-
based densenet network for remote sensing image scene classification,"
IEEE Journal of Selected Topics in Applied Earth Observations and
Remote Sensing, vol. 13, pp. 4121–4132, 2020.
[21] D. Zhang, Z. Liu, and X. Shi, "Transfer learning on efficientnet for
remote sensing image classification," in ICMCCE, 2020, pp. 2255–2258.
[22] J. Zhang, H. Zhao, and J. Li, "Trs: Transformers for remote sensing
scene classification," Remote Sensing, vol. 13, no. 20, p. 4143, 2021.
[23] D. Wang, J. Zhang, B. Du, G.-S. Xia, and D. Tao, "An empirical study
of remote sensing pretraining," IEEE Transactions on Geoscience and
Remote Sensing, 2022.
[24] Z. Sun, R. Sun, L. Lu, and A. Mislove, "Mind your weight (s): A large-
scale study on insufficient machine learning model protection in mobile
apps," in Proc. USENIX, 2021, pp. 1955–1972.
|
|
http://arxiv.org/abs/2302.13020v1 | 2023-02-25T08:16:21 | 2023-02-25T08:16:21 | DCLP: Neural Architecture Predictor with Curriculum Contrastive Learning | Neural predictors currently show great potential in the performance
evaluation phase of neural architecture search (NAS). Despite their efficiency
in the evaluation process, it is challenging to train the predictor with fewer
architecture evaluations for efficient NAS. However, most of the current
approaches are more concerned with improving the structure of the predictor to
solve this problem, while the full use of the information contained in
unlabeled data is less explored. To address this issue, we introduce a
contrastive learning framework with curriculum learning guidance for the neural
predictor called DCLP. To be specific, we develop a plan for the training order
of positive samples during pre-training through the proposed difficulty
measurer and training scheduler, and utilize the contrastive learner to learn
representations of data. Compared with existing predictors, we experimentally
demonstrate that DCLP has high accuracy and efficiency, and also shows an
encouraging ability to discover superior architectures in multiple search
spaces when combined with search strategies. | [
"Shenghe Zheng",
"Hongzhi Wang",
"Tianyu Mu"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13020v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13020v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | DCLP: Neural Architecture Predictor with Curriculum Contrastive Learning
Shenghe Zheng1 , Hongzhi Wang1,2 , Tianyu Mu1
1Harbin Institute of Technology
2Peng Cheng Laboratory
[email protected], {mutianyu, wangzh}@hit.edu.cn
3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
0
2
0
3
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Neural predictors currently show great potential in
the performance evaluation phase of neural archi-
tecture search (NAS). Despite their efficiency in
the evaluation process, it is challenging to train the
predictor with fewer architecture evaluations for
efficient NAS. However, most of the current ap-
proaches are more concerned with improving the
structure of the predictor to solve this problem,
while the full use of the information contained in
unlabeled data is less explored. To address this is-
sue, we introduce a contrastive learning framework
with curriculum learning guidance for the neural
predictor called DCLP. To be specific, we develop
a plan for the training order of positive samples
during pre-training through the proposed difficulty
measurer and training scheduler, and utilize the
contrastive learner to learn representations of data.
Compared with existing predictors, we experimen-
tally demonstrate that DCLP has high accuracy and
efficiency, and also shows an encouraging ability to
discover superior architectures in multiple search
spaces when combined with search strategies.
1 Introduction
Recently, Deep Neural Networks(DNNs) have achieved great
success in various fields, such as image classification [He et
al., 2016], machine translation [Vaswani et al., 2017], etc.
Since the performance of DNNs highly depends on the design
of neural architectures, the tremendous time consumption in
designing brings obstacles to the promotion of DNNs.
To cut the consumption for DNN design, Neural Architec-
ture Search(NAS) aims to automatically design architectures
for a given task, which has drawn significant interest [Zoph
and Le, 2016]. The typical process is that the estimation
method evaluates the performance of architectures sampled
from the search space to guide the search strategy in each it-
eration. However, the estimation is costly since it usually gets
the performance of networks after training them from scratch.
For instance, NASNet [Zoph et al., 2018] uses about 40,000
GPU hours to search on the CIFAR-10 dataset, which is unaf-
fordable for most practical applications. Due to the low cost,
predictor-based NAS has recently become popular [Tang et
al., 2020]. The predictor estimates DNNs directly and can re-
duce time consumption while providing satisfactory results.
However, using predictors leads to a problem in that the
predictor calls for many well-trained architectures as the
training set. As mentioned above, obtaining trained archi-
tectures is time-consuming. To reduce the dependence on
the training set, most previous works study the structure of
predictors, such as random forest [Sun et al., 2019], graph-
based method [Guo et al., 2019], etc. They focus on how to
use the labeled data better, but ignore the limited labeled data
only containing limited knowledge. Therefore these methods
still require a certain amount of labeled data to gain sufficient
knowledge, but in practice, NAS requires a predictor that re-
quires less labeled data and could achieve better results.
Currently, little effort has been made toward making good
use of unlabeled data that can be easily obtained at a mea-
ger cost but contain useful knowledge for neural network de-
sign. To make sufficient usage of unlabeled data, we propose
a self-supervised framework for neural predictor (DCLP) to
extract features from untrained architectures, which is effec-
tive for training a high-performance predictor. Inspired by the
broad application of contrastive learning in graphs and the in-
tuitive pretext task [Chen et al., 2020], which is suitable for
graphs, we introduce it into the predictor to gain knowledge
from unlabeled samples. To be specific, the basic idea of the
contrastive task is to train an encoder such that similar in-
stances(positive pairs) have similar embeddings, which leads
to transferable representations in a low cost.
Even though, unlike common graphs, the directed acyclic
graph (DAG) corresponding to the neural architecture has
specific features such as a smaller graph, adjacent nodes with
more different properties, etc. These features imply that the
contrastive learner needs to gain richer knowledge of smaller
and more difficult-to-learn graphs. Considering the difficulty,
existing methods that train positive data unplanned will result
in difficult convergence and poor generalization ability.
To better adapt the contrastive task to the neural predic-
tor, inspired by curriculum learning [Bengio et al., 2009], we
design a novel measurement for the difficulty of positive sam-
ples and control the order of data into training by the training
scheduler, which takes the difficulty as criteria. It minimizes
the empirical risk of positive data, giving predictors better
generalization ability and accelerating the training. After pre-
training, we use limited labeled data for fine-tuning, which is
Figure 1: The overall framework of DCLP. It can be divided into data preparation, pre-training, and fine-tuning.
a regression. Nevertheless, the typical loss function for re-
gression is too strict for NAS, which only needs to guarantee
the predicted ranking. Therefore, the fine-tuning innovatively
uses the performance rank as the optimization target.
Then, we combine DCLP with the search strategy to op-
timize NAS. By using designed learning curves enhanced
contrastive tasks to mine information from unlabeled data,
our pre-training approach can well learn the representation
of neural architectures. Moreover, using ranking as the opti-
mization target in fine-tuning helps to build a robust predictor.
Our contributions are summarized as follows:
• We introduce contrastive learning to the neural predictor
of NAS to fully use unlabeled data. This reduces the
labeled training data requirement of the predictor and
improves its generalization ability.
• We propose a novel curriculum learning method to guide
the contrastive task. DCLP efficiently combines curricu-
lum and contrastive learning, which can make the pre-
dictor converge faster and perform better in NAS.
• We change the target of the fine-tuning to the prediction
of the ranking, further reducing the demand for labeled
data and improving the predictor's robustness.
• We conduct comprehensive experiments, showing that
our method outperforms the state-of-the-art methods on
different NAS benchmarks and the actual NAS task.
2 Related Work
Neural Architecture Search (NAS): NAS is for auto-
matically designing neural architectures according to tasks.
The primary NAS includes methods based on reinforce-
ment learning [Zoph and Le, 2016] and evolutionary algo-
rithms [Xie and Yuille, 2017]. However, the problem is that
the sampled networks need to be evaluated in each iteration,
which is time-consuming [He et al., 2021]. To solve this
problem, the one-shot method [Cai et al., 2019] reduces the
evaluation cost by using the super-network. However, it is
still costly. Then in this work, we focus on predictor-based
NAS, a more efficient method.
Architecture preformance predictors: The predictor de-
creases the estimation cost by directly predicting the archi-
tectures' performance. PNAS [Cai et al., 2019] is the first
work introducing the predictor into NAS, which uses LSTM
as the predictor. Some works use random forest [Liu et al.,
2021] to predict performance, believing that few training data
are required by random forest. Because neural architectures
can be represented as graphs, the graph neural network(GNN)
is a popular method for the predictor [Ning et al., 2020]. The
above works only use labeled data, while unlabeled data can
be used to reduce the dependence on labeled data at a low
cost. For methods that use unlabeled data, semi-supervised
assessor [Tang et al., 2020] constructs an optimization func-
tion that uses both labeled and unlabeled data. Instead, our
model uses a more direct task to obtain the information in
the unlabeled data. GMAE [Jing et al., 2022] constructs a
GNN encoder and uses graph reconstruction as the pretext
task. The difference is that our method uses a contrastive task
for learning, achieving better results with less cost.
Contrastive learning: Contrastive learning is a self-
supervised method that has succeeded dramatically in nat-
[Devlin et al., 2019] and
ural language processing (NLP)
computer vision (CV) [He et al., 2020]. Contrastive learning
learns the representation of data by pulling the embeddings
of positive samples closer.
Curriculum learning: Curriculum learning [Bengio et al.,
2009] is a machine learning training method that imitates hu-
man learning by ordering the training order of data. Previous
works have demonstrated the ability of it to improve the gen-
eralization ability and training speed of models in the fields
of CV [Pentina et al., 2015] and NLP [Platanios et al., 2019].
We introduce it into neural network automatic design and
combine it with contrastive learning to better exert its effect.
3 Methodology
The main goal of this paper is to build a predictor for perfor-
mance estimation in NAS. To reduce the learning difficulty
while utilizing unlabeled data, we use a curriculum sampling
strategy to guide contrastive learning. As shown in Figure 1,
the positive data are generated by data augmentation, fol-
lowed by scoring the positive items using difficulty function
f (*), and we then use the scheduler O to control the training
order of positive data {Gk}K
i=1.
After that, the encoder explores data representation using the
k=1 and negative data{Ni}n
Edge PerturbationAttribute maskingSearch SpaceAugmentationTrainingSchedulerNegative samplesMemory BankPRE-TRAININGTask G1......SamplingSchedulerTask G2Task GtTask GT...scoreascorebscorexscoreyTask OrderingEncoderg(•)Positive sampleContrastiveLearnerTask ScoringPre-trainedPredictorPredictorRankTestDataFINE-TUNINGNegativePositiveMinimize distanceMaximize distanceHow contrastive learner learns from positive and negative samplesDATA PREPARATIONDifficultyMeasurerf(•)GaGbGxGyscore1score2scoretscoreTLabeledDataaccxaccyFigure 2: The DAG and matrixes correspond to a cell.
contrastive learner. Finally, fine-tuning is required as DCLP
needs to be applied to downstream tasks.
In this section,
we explain the encoding method in Section 3.1. Afterward,
the details of the components are described, including data
augmentation, the contrastive learning approach applied in
DCLP, the curriculum method, fine-tuning, and the search
method in Section 3.2 to 3.6, respectively.
3.1 Architecture Encoding
Before discussing how to train an effective predictor using
unlabeled data, we propose the format of the searched archi-
tectures and the structure of the predictor, which are suitable
for the estimation. Following the previous works [Zoph et
al., 2018], we use cells as the search unit. Each architecture
is composed of L-stacked cells. Each cell is represented as
a DAG G = {V, E}, where V = {vi}|V|
i=1 denotes the set
of nodes, and E ∈ R|V|×|V| is the adjacency matrix. Cells
have two formats. One is operation on nodes (OON), and
the other is operation on edges (OOE). Since OON is more
common, and OOE can be easily converted to OON, we use
OON as the default type in the following. As shown in Fig-
ure 2, in an OON cell, each node represents an operation, such
as max-pooling, and the edge ei→j indicates the information
flow from node i to node j.
After defining the basic unit of architecture, we design
an encoder for learning architecture's representation. Graph
Isomorphism Network (GIN) [Xu et al., 2019] is used as
the encoder since GIN is highly capable of identifying dif-
ferences in neural architectures, which is precisely what we
need. Considering a K-layer GIN, the propagation function
of the kth layer is as follows:
n = M LP k(hk−1
hk
n +
(cid:88)
hk−1
n(cid:48)
)
n(cid:48)∈N (n)
(1)
where hk
n is the embedding of the node vn at k-th layer, and
N (n) is the set of node adjacent to vn. Unlike other GNNs,
GIN does not have combined steps but keeps obtaining infor-
mation from adjacent nodes. Since we require a graph-level
feature, node-level features need to be integrated as follows:
hG = concat(readout({hk
n|n ∈ G})|k = 0, ..., K)
(2)
With the design of search space and encoder, we will dis-
cuss the training method for the encoder in Section 3.3.
3.2 Graph Augmentation
The purpose of augmentation is to generate valuable data that
does not exist in the dataset. The quality of augmentation
is critical for the generalization ability of contrastive learn-
ing. There are mainly four graph augmentation strategies: (1)
node dropping randomly discards nodes in the graph; (2) edge
perturbation adds or removes edges randomly; (3) attribute
masking modifies properties of nodes; (4) sub-graph samples
a sub-graph of the graph. We use augmentation to create data
while maintaining specific features. However, the DAG of
a neural cell is different from common graph data. Usually,
the sub-network of a neural architecture does not have fea-
ture similarity with the original one, which means that the
sub-graph method is unsuitable for neural networks.
For node dropping, in neural networks, an isolated opera-
tion with no nodes connected can be seen as removed from
the network. Since a node is often not related to many edges,
the deletion of a node n could be treated as the deletion of all
the edges with n as the vertex. Therefore, we only use two
augmentation strategies, i.e., edge perturbation and attribute
masking, to construct the positive set for contrastive learning.
Note that an augmentation configuration can produce many
data, e.g., masking 5% of attributes with multiple options. A
random sample from this data distribution is used as the pos-
itive sample in practice. Different augmentations will lead to
various difficulties in contrastive tasks, so specific training is
in demand, which will be discussed in Section 3.4.
3.3 Contrastive Learning
We design a concise contrastive model to make sufficient use
of unlabeled data. We know there are intrinsic connections
between untrained data in the search space. These connec-
tions contain features for designing neural networks. To learn
from them, we need to define a similarity estimation method
and target function for contrastive learning. We construct
structurally similar positive data for each architecture by aug-
mentation and believe that the similarity between structurally
similar networks is higher [Ying et al., 2019]. Assuming that
the representation of the network learned by the encoder is
z(g), we use the Radial Basis Function (RBF) [Er et al., 2002]
to define the similarity s between networks gi and gj:
s(gi, gj) = exp(−
d(z(gi), z(gj))
2σ2
)
(3)
where d(*, *) is the distance measurement (e.g., Euclidean dis-
tance), and σ is a scale factor. RBF maps items into a high-
dimensional space, allowing data that are hard to separate by
the contrastive learner to be separated in the projection space.
The contrastive task expects similar architectures to have
larger s. To ensure high accuracy on limited resources, we
introduce the memory bank [He et al., 2020] to save negative
samples. Since more negative samples often lead to better
learning [Chen et al., 2020], the memory bank can increase
negative data used at a time without increasing the compu-
tational resources to enlarge the batch size. InfoNCE loss is
used as the optimized target. Assuming that there are positive
pairs {q, k+}, the negative embeddings saved in the memory
bank are {ki}N
i=1 with the loss function as follows:
L = −log
exp(s(q * k+)/τ )
s(q * k+)/τ + (cid:80)N
i=1 exp(s(q * ki)/τ ))
(4)
where τ is the temperature parameter. Minimizing Eq.(4) im-
plies that the score of positive data is higher than negative
ones and allows the encoder to learn features from unlabeled
data. This is why we use contrastive learning.
inputConv1x1Conv3x3MaxPooloutput0110000011010100000100000Cell ArchitectureCell EncodingAdjacencyMatrix1000001000001000001000001InputConv 1x1Conv 3x3Max poolOutputAttributeMatrix3.4 Curriculum Learning
Compared to most common graph data, contrastive learning
on neural architectures aims to discover richer knowledge on
smaller graphs. The random training order of existing meth-
ods leads to simultaneous learning from complex and easy
data, which may result in the failure of convergence or over-
fitting [Chu et al., 2021]. Thus, we propose a novel sampling
approach by adopting curriculum learning to build an effi-
cient and better learner. The method is divided into two steps,
difficulty measurement and training scheduler. The training
scheduler uses the difficulty of data to plan the training order.
In this section, we will discuss these two steps respectively.
Difficulty Measurement
The difficulty function is defined to evaluate the difficulty of
each positive item. As mentioned in Section 3.2, positive
items are sampled from the related augmentation distribution,
so the augmentation distribution's difficulty can measure the
data's difficulty. The intuitive idea is that the greater the gap
between the augmented and original distribution, the harder
the positive data is for the contrastive learner. KL divergence
can measure the distance between distributions. Consider-
ing our task, we introduce Levenshtein Distance(LD) and use
LD(gi, ˆgi) between the sampling gi in the original distribu-
tion and its corresponding ˆgi in the augmentation distribution
to approximate the gap between two distributions. The details
are as follows.
It is argued that the positive data sampled from an augmen-
tation distribution is complex for the contrastive learner when
the KL divergence between the augmentation distribution q
and the original distribution p is large. Therefore, we define
the difficulty function of the positive distribution q concern-
ing the original distribution p as
S(p, q) =
(cid:90)
p(x)log
p(x)
q(x)
dx
(5)
Considering that it is costly to calculate the distance be-
tween two distributions directly, we use the LD to approxi-
mate the KL divergence. Given two DAGs Gi and Gj, LD
is the minimum editing number required to convert Gi to Gj
while each edit denotes modification in one place(edge per-
turbation or attribute masking). The reasonableness of this
approximation lies in that our goal is to measure the distance
between the augmented and original distribution. The gap be-
tween the two distributions is the gap between the properties
of the data sampled from the two distributions, and the latter
can be approximated by the structural distance [Ying et al.,
2019]. Since LD measures the difference in structure, we can
use LD between the corresponding data in the original and
augmented distribution to indicate the gap between the two
distributions, i.e., the KL divergence. Detailed explanations
of the reasons can be found in the supplementary material.
The difficulty of the augmented distribution π, is defined as:
S(π) =
LD(gi, ˆgi)
|gi| * |ˆgi|
(6)
where gi is an item sampled from the original distribution,
and ˆgi is the augmented result by π.
|gi| is the size of gi,
which can be measured by the number of edges.
Algorithm 1 Training procedure of DCLP
Input: Training set D, the number of iterations T , the aug-
mentation set π, GIN encoder f , difficulty function g,
training scheduler O
1: pre-training
2: Initialize model parameters θ with kaiming initialization
3: Randomly sample augementation distribution from π
i=1
without repeat,and get Π = {πi}T
i=1
zi ← f (Gi)
z(cid:48)
i ← f ((cid:101)πt(Gi))
fθ ← fθ − ∇fθ (LN CE)
4: Sort πi according to g(πi) by O, and get (cid:101)Π = {(cid:101)πi}T
5: for t = 1 to T do
6: Gi ← RandomSample(D)
7:
8:
9:
10: end for
11: fine-tuning
12: SF ← LimitedRandomSample(D)
13: L ← SelectedLossF unction(SF )
14: for t = 1 to T do
15:
16: end for
Output: the trained predictor fθ
fθ ← fθ − ∇fθ L
Training Scheduler
After defining the difficulty function, it is necessary to design
the training order of positive samples. This is about determin-
ing the order in which different augmentations are used. First,
we create data with various difficulties by different augmen-
tations and assume that the simplest augmented distribution
with difficulty value m and the hardest with value n. Here,
in contrast to the paradigm of sorting data from easy to hard
or hard to easy, we introduce a way that mixes complex and
simple data. In this way, the encoder can learn from the data
more smoothly to converge efficiently. The form of the dis-
tribution difficulty at each iteration Qt(x) is as follows:
Qt(x) = αtn + (1 − αt)m
where
αt = max {(At + b)sin(wt) + k, 0}
(7)
where t is the iteration number, A is positive. In brief, the
sorting approach is to keep inserting an easy distribution be-
tween two distributions as the overall difficulty rises. This is
the same as the learning curve of humans. As we know, if we
want to get good grades in exams, we must practice easy tasks
continuously, even while studying increasingly tricky topics.
Using this sampling strategy guided by curriculum learn-
ing, the encoder can be fully trained as the training data be-
comes progressively more challenging. Moreover, the in-
serted easy data avoid the overfitting that may occur when
the data gets harder, leading to faster and better convergence.
As shown in Algorithm 1, we use the difficulty measure-
ment to calculate the difficulty of each augmentation distri-
bution and sort them in order(Line 4). Since we perform aug-
mentations in this order, our positive data are sorted in this
order. Next, in Lines 6 to 13, we keep feeding the positive
samples into the contrastive learner for training.
3.5 Fine-Tuning
After pre-training, the encoder can extract features of an ar-
chitecture into a k-dimensional vector. To transfer the pre-
trained model to the NAS task, fine-tuning is in demand.
We develop a novel target function to reduce the labeled
training set requirement further. Since the predictor can be
treated as a regression model, the direct idea is to use the
mean squared error(MSE) between the predicted and actual
result as the loss function. However, NAS is to determine
some of the best architectures and does not care about the
absolute value of performance. Then, MSE, which forces the
model to learn absolute value, is too strict. Therefore, due
to its tough target and too little training data, MSE is easy to
cause overfitting. To overcome this problem, we propose two
optimization strategies as follows.
In short, they both take
predicted ranking into consideration.
MSE+normalization
The problem of MSE is that sometimes lower MSE is not
equivalent to better ranking accuracy. Since we pay more
attention to ranking, normalization can increase the gap be-
tween the performance value of two networks, making it eas-
ier to use MSE to learn their relative ranking relationship. It
is practical because by enlarging the gap between the per-
formance, misjudgment of the rank leads to a greater MSE.
Then, fine-tuning is improved by making lower MSE approx-
imately equivalent to a better ranking result. More details can
be found in the supporting material.
Ranking loss
Inspired by learning to rank [Burges, 2010], we use ListMLE
[Xia et al., 2008] to optimize the expectation of the predicted
ranking accuracy. This loss function is based on the label or-
der and only needs to maximize the probability that the rank-
ing of the prediction results is consistent with the target.
ListMLE is defined by the Plackett-Luce probability model
[Plackett, 1975]. In ListMLE, it is helpful to use o to repre-
sent the sorting result of the target, and S = {s1, s2, ...sn}
denotes the predicted accuracy of n architectures. Then the
predicted accuracy is sorted in the order of the actual labels
to obtain ˆS = {so1, so2 , ....son}. We only need to maximize
the probability of this ordering to make the predicted ranking
as close as possible to the actual results. Then, we construct
the loss function as follows:
L = −
n
(cid:88)
i=1
log
exp(soi)
j=i exp(soj )
(cid:80)n
(8)
Using the optimization target of ranking, the optimization
goal and the downstream task are aligned, which can improve
the model's fitness to NAS while reducing the required la-
beled training data.
3.6 Search Method
After fine-tuning, we use the predictor as the evaluation
method, which needs to be combined with a search strategy to
search for the optimal network. We enhance the top-k strat-
egy with DCLP. With fast estimation, this search method can
efficiently explore a large search space. Since the optimal
Algorithm 2 Predictor-based Search Strategy
Input: Search space A, fixed performance predictor f , the
number of iterations T , the number of architectures sam-
pled in the t-th iteration N t, the number of architectures
selected by predictor in each iteration K.
j
4:
5:
(cid:9)N t
j=1
1: Initialize t=0,an architecture set S=∅
2: for t = 1 to T do
3:
Randomly sample N t architectures St = (cid:8)at
from the search space A without repeat.
Evaluate items in St by trained predictor f , get ˆSt =
(cid:8)(at
,where y is the predicted performance.
Select top-k items from ˆSt according to y, get (cid:101)St =
(cid:8)(at
j)(cid:9)K
i > yt
j, yt
j=1
S ← S ∪ (cid:101)St.
j while i < j.
,where yt
j)(cid:9)N t
j, yt
6:
7: end for
8: Evaluate each architecture in S by training to obtain the
j=1
corresponding ground-truth Y
Output: the architecture a∗ with the best true performance.
networks are always selected within the exploration range, a
larger range is more likely to result in a better architecture.
In
The detailed strategies can be found in Algorithm 2.
brief, during each iteration, we randomly sample N networks
from the search space and select the top-k networks to add to
the candidate pool based on the predicted performance (Lines
4-6). After T iterations, k * T items in the candidate pool
are trained to obtain the actual performance (Line 8), from
which the optimal architecture is selected. Since both k and
T are small, only a few networks need to be trained, which
significantly reduces the cost of the search process.
4 Experiments
We evaluate the effectiveness of the proposed pre-training and
fine-tuning approach for NAS via extensive experiments on
both OON and OOE search space. Firstly, we introduce three
search spaces and evaluation metrics that have been widely
used. Next, in Section 4.2, we validate the superiority of the
predictor in NAS benchmarks. Then we combine the predic-
tor with the search strategy for experiments on NAS bench-
marks and verify our approach to the actual NAS task. Fi-
nally, in Section 4.4, we conduct some ablation experiments.
4.1 Datasets and Evaluation Metrics
NAS-Bench-101: This is a typical benchmark for NAS
with 423k unique convolutional architectures [Ying et al.,
2019]. Each architecture is restricted to the cell space. Each
cell can have up to 7 nodes and 9 edges. The intermediate
node can be one of 1x1 convolution, 3x3 convolution, and
3x3 max pooling, while each edge represents the information
flow between two nodes. This benchmark provides test accu-
racies on CIFAR-10 for all structures in the search space.
NAS-Bench-201:
It is another benchmark for NAS, which
is on OOE search space [Dong and Yang, 2020]. This search
space contains a total of 15,625 structures and provides the
Predictor
BOGCN [Shi et al., 2020]
GCN [Kipf, 2017]
HAAP [Liu et al., 2021]
GMAE [Jing et al., 2022]
GATES [Ning et al., 2020]
HOP [Chen et al., 2021b]
DCLP
150
300
N@5 N@10 N@5 N@10
1486
5925
74
258
95
383
55
147
38
102
12
52
1
12
3892
258
248
124
102
52
10
2578
92
129
71
38
16
2
Figure 3: The comparison between our method and the SOTA pre-
dictors with below 500 training samples on NAS-Bench-101.
performance of all architectures on CIFAR-10, CIFAR100,
and ImageNet-16-120. Each cell contains up to 4 nodes, and
the optional edge operations are: zeroize, skip connection,
conv 1 × 1, conv 3 × 3, and average pooling 3 × 3.
DARTS Search Space: The DARTS search space is a large
space [Liu et al., 2019], containing about 1018 structures,
which is also OOE. Each cell contains 7 nodes. Each edge
has the following possible operations: 3×3 and 5×5 separa-
ble convolutions, 3×3 and 5×5 dilated separable convolutions,
3×3 max pooling, 3×3 average pooling, and skip connection.
This is a widely used search space in real NAS tasks.
Evaluation Metrics: We use two metrics for the evaluation
of the performance of the predictor. The first is Kendall's
Tau [Sen, 1968], which is used to evaluate the ranking ac-
curacy between predicted and actual results. The closer to 1
means the closer the two sorted results are. The second is
N@K [Ning et al., 2020]. It denotes the best actual ranking
among the top-K items selected by the predictor. Kendall's
Tau shows the predictor's ability to sort the whole, and N@K
shows the predictor's sensitivity to optimal neural networks.
4.2 Predictor Evaluation
To measure the superiority of DCLP, we conduct experiments
on NAS-Bench-101 and NAS-Bench-201. Usually, predic-
tors with excellent Kendall's Tau and N@K are more likely
to discover outstanding networks. We compare DCLP with
other popular predictors to show that our approach can obtain
a better predictor. We use small labeled sets to deliver the
outstanding performance of DCLP on limited training sets.
As shown in Figure 3, we report Kendall's tau of different
predictors [Wei et al., 2021; Xu et al., 2021; Jing et al., 2022;
Wen et al., 2020] on various sizes training sets. DCLP offers
a clear advantage when the training set is small, especially
when the data is less than 100; it is about 0.05 higher than the
best predictor. The performance on small sets is our focus.
Our approach has advantages because the contrastive training
guided by curriculum helps the encoder learn a better feature
representation, enabling the predictor to achieve better results
with fewer labeled data.
Table 1 reports that DCLP shows the best N@K on NAS-
Bench-101 compared with other methods. When the training
Table 1: N@5 and N@10 of different predictors on NAS-Bench-
101, where all predictors are trained on 150 and 300 architectures.
predictor
HAAP [Liu et al., 2021]
GMAE [Jing et al., 2022]
HOP [Chen et al., 2021b]
Accuracy(%)
Ranking
93.69±0.22
93.98±0.15
94.09±0.11
1111(0.26%)
61(0.014%)
14(0.0033%)
DCLP
94.17±0.06
6(0.0014%)
Table 2: Classification accuracies on CIFAR-10 and the perfor-
mance ranking among all the architectures of NAS-Bench-101. 300
architectures are randomly selected as labeled training samples.
set is limited, DCLP has obvious superiority. This demon-
strates that our approach has a better generalization ability
to discover excellent results when the training set is small.
Moreover, for the efficiency of NAS, it is essential that a min-
imal training set can obtain a high-performance predictor.
4.3 Search Strategy Performance Evaluation
Compared with multiple NAS methods based on predictors, it
shows that DCLP can be well combined with search strategies
for efficient search. When it comes to the work of others, we
directly use open-source code in their works. Our setups are
reported in the supplementary materials. As in Section 4.2,
since we pay more attention to the predictor's performance on
the limited set, we use small sets for training in this section.
As shown in Table 2 and Table 3, we conducted experi-
ments on NAS-Bench-101 and all datasets of NAS-Bench-
201. Specifically, we compared the best accuracy and rank-
ing of the top 50 networks selected by different methods. Our
approach achieves the highest precision, and the found archi-
tecture is very close to the optimal one in the search space.
Moreover, experimental results show that our method has
an advantage over other predictor-based methods on small
training sets. This is because most of the predictors improve
the structure of the encoder while ignoring the use of un-
labeled data. However, the encoder can learn the general
features of neural networks from unlabeled data, which can
greatly reduce the need for labeled data in training.
Meanwhile, Table 4 shows experiments in the DARTS
space, demonstrating the superiority of DCLP over other pre-
dictors on actual NAS tasks.
4.4 Ablation Study
All ablation experiments in this section are performed on
NAS-Bench-101. We use Kendall's Tau as the performance
criterion for the predictor.
100150200250300350400Numberoflabeledtrainingsamples0.400.450.500.550.600.650.700.75Kendall'sTauE2EPPSSANAReNASNPNASGCNHAAPGMAEDCLP(Ours)predictor
GCN [Kipf, 2017]
HAAP [Liu et al., 2021]
GMAE [Jing et al., 2022]
HOP [Chen et al., 2021b]
DCLP
CIFAR-10
CIFAR-100
ImageNet-16-120
Accuracy(%)
93.60±0.32
93.75±0.17
94.03±0.11
94.1±0.12
94.34±0.03
Ranking
317(2.02%)
182(1.16%)
33(0.21%)
22(0.14%)
4(0.025%)
Accuracy(%)
70.61±0.28
71.08±0.19
72.56±0.16
72.64±0.11
73.2±0.3
Ranking
321(2.05%)
152(0.972%)
21(0.13%)
15(0.096%)
2(0.0128%)
Accuracy(%)
44.78±0.33
45.22±0.26
46.09±0.27
46.29±0.19
46.54±0.03
Ranking
292(1.87%)
147(0.94%)
29(0.19%)
16(0.1%)
3(0.0192%)
Table 3: Comparison with state-of-the-art NAS methods on NAS-Bench-201. 50 architectures are randomly selected as training data.
(a) With/without contrastive learning
(b) Choice of curriculum learning
(c) Choice of fine-tuning methods
Figure 4: The ablation of contrastive learning, curriculum learning, and fine-tuning targets on NAS-Bench-101.
Method
CTNAS [Chen et al., 2021a]
NOSH [Wang et al., 2021]
BANA [White et al., 2021]
CATE [Yan et al., 2021]
GMAE [Jing et al., 2022]
DCLP-NAS
Test error(%)
Params(M)
2.59±0.04
2.53±0.02
2.67±0.07
2.56±0.08
2.50±0.03
2.48±0.02
3.6
3.5
3.6
2.9
3.8
3.8
Table 4: The comparison of NAS algorithms in the DARTS search
space, and we use CIFAR-10 as the dataset.
With/Without contrastive learning: As shown in Fig-
ure 4(a), using contrastive learning for pre-training is much
better than training the predictor from scratch. This proves
that using the contrastive task to teach the encoder does learn
specific knowledge from unlabeled data, which is helpful in
the NAS task.
Choice of curriculum learning methods: As shown in
Figure 4(b), we compare the results without curriculum and
using different curriculum methods. It can be discovered that
the curriculum strategy has a tremendous influence on results.
It is also surprising that using inappropriate strategies brings
adverse effects. For example, learning from hard to easy is
worse than not using a curriculum. This is because judging
the similarity of neural networks is a hard task, even for ex-
perts. If the training is too difficult at the beginning, it is easy
to make the encoder pay more attention to the noise that often
appears in hard data, resulting in poor performance. The rea-
son for the ineffectiveness of learning without a curriculum is
that, in this case, the learner randomly selects data of different
difficulties to learn. As mentioned in Section 3.4, this is too
difficult for the learner to converge. The tasks from simple to
hard show excellent results, indicating that the overall trend
is correct. Still, since noise will inevitably be learned when
using complex data, some easy data is needed to optimize
parameters of the model. Therefore, using our method, the
predictor continuously cycles between hard and easy tasks,
avoiding excessive exploration of noise while ensuring the
ability to learn complex data for better performance.
Choice of fine-tuning targets: Figure 4(c) shows that
different fine-tuning targets significantly affect the results.
Among them, MSE+norm and ranking loss achieve compa-
rable results, much higher than the vanilla MSE. This is con-
sistent with the idea in Section 3.5. Moreover, since ranking
loss pays more attention to ranking, it is more reasonable than
MSE+norm. Therefore, when the size of training sets gradu-
ally increases, the ranking loss has certain advantages.
5 Conclusion
In this paper, we propose DCLP, a contrastive pre-training
approach with curriculum learning guidance, which enhances
the neural predictor of NAS. Specifically, we input the pos-
itive samples into the contrastive learner for pre-training in
sequence according to the scores of the difficulty measurer.
Moreover, in fine-tuning, we use a more reasonable target to
enhance the predictor's performance. It is demonstrated that
through our self-supervised pre-training, the dependence on
labeled training data can be reduced to realize an efficient
and accurate predictor-based NAS. We are sure that this pre-
training method can be used in combination with various pre-
dictors, which will be a promising approach for neural pre-
dictors in NAS and can bring vitality to the NAS community.
Our future work will focus on designing self-supervised pre-
text tasks more suitable for neural architectures to enhance
the performance of neural predictors.
50100Numberoflabeledtrainingsamples0.350.400.450.500.550.600.65Kendall'sTauwithoutwith100150200250300Numberoflabeledtrainingsamples0.400.450.500.550.600.650.700.75Kendall'sTauwithouteasy-to-hardhard-to-easyDCLP(Ours)100150200250300Numberoflabeledtrainingsamples0.450.500.550.600.650.700.75KendallTauMSEMSE+normRankingLossReferences
[Bengio et al., 2009] Yoshua Bengio,
J ́erˆome Louradour,
Ronan Collobert, and Jason Weston. Curriculum learn-
ing. In Proceedings of the 26th annual international con-
ference on machine learning, pages 41–48, 2009.
[Burges, 2010] Christopher JC Burges.
lambdarank to lambdamart: An overview.
11(23-581):81, 2010.
From ranknet to
Learning,
[Cai et al., 2019] Han Cai, Ligeng Zhu, and Song Han. Prox-
ylessNAS: Direct neural architecture search on target task
In International Conference on Learning
and hardware.
Representations, 2019.
[Chen et al., 2020] Ting Chen, Simon Kornblith, Moham-
mad Norouzi, and Geoffrey Hinton. A simple framework
In In-
for contrastive learning of visual representations.
ternational conference on machine learning, pages 1597–
1607. PMLR, 2020.
[Chen et al., 2021a] Yaofo Chen, Yong Guo, Qi Chen, Minli
Li, Wei Zeng, Yaowei Wang, and Mingkui Tan. Con-
trastive neural architecture search with neural architecture
comparators. In Proceedings of the IEEE/CVF Conference
on Computer Vision and Pattern Recognition, pages 9502–
9511, 2021.
[Chen et al., 2021b] Ziye Chen, Yibing Zhan, Baosheng Yu,
Mingming Gong, and Bo Du. Not all operations con-
tribute equally: Hierarchical operation-adaptive predic-
In Proceedings of the
tor for neural architecture search.
IEEE/CVF International Conference on Computer Vision,
pages 10508–10517, 2021.
[Chu et al., 2021] Guanyi Chu, Xiao Wang, Chuan Shi, and
Xunqiang Jiang. Cuco: Graph representation with cur-
riculum contrastive learning. In IJCAI, pages 2300–2306,
2021.
[Devlin et al., 2019] Jacob Devlin, Ming-Wei Chang, Ken-
ton Lee, and Kristina Toutanova. BERT: Pre-training of
deep bidirectional transformers for language understand-
ing. 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, Minneapo-
lis, Minnesota, June 2019. Association for Computational
Linguistics.
[Dong and Yang, 2020] Xuanyi Dong and Yi Yang. Nas-
bench-201: Extending the scope of reproducible neural ar-
chitecture search. In International Conference on Learn-
ing Representations, 2020.
[Er et al., 2002] Meng Joo Er, Shiqian Wu, Juwei Lu, and
Hock Lye Toh. Face recognition with radial basis func-
IEEE transactions on neural
tion (rbf) neural networks.
networks, 13(3):697–710, 2002.
[Guo et al., 2019] Yong Guo, Yin Zheng, Mingkui Tan,
Qi Chen, Jian Chen, Peilin Zhao, and Junzhou Huang. Nat:
Neural architecture transformer for accurate and compact
architectures. Advances in Neural Information Processing
Systems, 32, 2019.
[He et al., 2016] Kaiming He, Xiangyu Zhang, Shaoqing
Ren, and Jian Sun. Deep residual learning for image recog-
nition. In Proceedings of the IEEE conference on computer
vision and pattern recognition, pages 770–778, 2016.
[He et al., 2020] Kaiming He, Haoqi Fan, Yuxin Wu, Sain-
ing Xie, and Ross Girshick. Momentum contrast for unsu-
pervised visual representation learning. In Proceedings of
the IEEE/CVF conference on computer vision and pattern
recognition, pages 9729–9738, 2020.
[He et al., 2021] Xin He, Kaiyong Zhao, and Xiaowen Chu.
Automl: A survey of the state-of-the-art. Knowledge-
Based Systems, 212:106622, 2021.
[Jing et al., 2022] Kun Jing, Jungang Xu, and Pengfei Li.
Graph masked autoencoder enhanced predictor for neural
architecture search. In Lud De Raedt, editor, Proceedings
of the Thirty-First International Joint Conference on Ar-
tificial Intelligence, IJCAI-22, pages 3114–3120. Interna-
tional Joint Conferences on Artificial Intelligence Organi-
zation, 7 2022. Main Track.
[Kingma and Ba, 2014] Diederik P Kingma and Jimmy Ba.
arXiv
Adam: A method for stochastic optimization.
preprint arXiv:1412.6980, 2014.
[Kipf, 2017] Thomas N. Kipf. Semi-supervised classifica-
tion with graph convolutional networks. In International
Conference on Learning Representations, 2017.
[Liu et al., 2019] Hanxiao Liu, Karen Simonyan, and Yim-
ing Yang. DARTS: Differentiable architecture search.
In International Conference on Learning Representations,
2019.
[Liu et al., 2021] Yuqiao Liu, Yehui Tang, and Yanan Sun.
Homogeneous architecture augmentation for neural pre-
In Proceedings of the IEEE/CVF International
dictor.
Conference on Computer Vision, pages 12249–12258,
2021.
[Ning et al., 2020] Xuefei Ning, Yin Zheng, Tianchen Zhao,
Yu Wang, and Huazhong Yang. A generic graph-based
neural architecture encoding scheme for predictor-based
nas. In European Conference on Computer Vision, pages
189–204. Springer, 2020.
[Pentina et al., 2015] Anastasia Pentina, Viktoriia Sharman-
ska, and Christoph H Lampert. Curriculum learning of
In Proceedings of the IEEE Conference
multiple tasks.
on Computer Vision and Pattern Recognition, pages 5492–
5500, 2015.
[Plackett, 1975] Robin L Plackett. The analysis of permuta-
tions. Journal of the Royal Statistical Society: Series C
(Applied Statistics), 24(2):193–202, 1975.
[Platanios et al., 2019] Emmanouil Antonios
Platanios,
Otilia Stretcu, Graham Neubig, Barnabas Poczos, and
Tom Mitchell. Competence-based curriculum learning
In Proceedings of the
for neural machine translation.
2019 Conference of the North American Chapter of the
Association for Computational Linguistics: Human Lan-
guage Technologies, Volume 1 (Long and Short Papers),
pages 1162–1172, Minneapolis, Minnesota, June 2019.
Association for Computational Linguistics.
[Xu et al., 2019] Keyulu Xu, Weihua Hu, Jure Leskovec, and
Stefanie Jegelka. How powerful are graph neural net-
In International Conference on Learning Rep-
works?
resentations, 2019.
[Xu et al., 2021] Yixing Xu, Yunhe Wang, Kai Han, Yehui
Tang, Shangling Jui, Chunjing Xu, and Chang Xu. Re-
nas: Relativistic evaluation of neural architecture search.
In Proceedings of the IEEE/CVF Conference on Computer
Vision and Pattern Recognition, pages 4411–4420, 2021.
[Yan et al., 2021] Shen Yan, Kaiqiang Song, Fei Liu, and
Mi Zhang. Cate: Computation-aware neural architecture
encoding with transformers. In International Conference
on Machine Learning, pages 11670–11681. PMLR, 2021.
[Ying et al., 2019] Chris Ying, Aaron Klein, Eric Chris-
tiansen, Esteban Real, Kevin Murphy, and Frank Hutter.
Nas-bench-101: Towards reproducible neural architecture
search. In International Conference on Machine Learning,
pages 7105–7114. PMLR, 2019.
[Zoph and Le, 2016] Barret Zoph and Quoc V Le. Neural
arXiv
architecture search with reinforcement learning.
preprint arXiv:1611.01578, 2016.
[Zoph et al., 2018] Barret Zoph, Vijay Vasudevan, Jonathon
Shlens, and Quoc V Le. Learning transferable architec-
tures for scalable image recognition. In Proceedings of the
IEEE conference on computer vision and pattern recogni-
tion, pages 8697–8710, 2018.
[Sen, 1968] Pranab Kumar Sen. Estimates of the regression
coefficient based on kendall's tau. Journal of the American
statistical association, 63(324):1379–1389, 1968.
[Shi et al., 2020] Han Shi, Renjie Pi, Hang Xu, Zhenguo Li,
James Kwok, and Tong Zhang. Bridging the gap between
sample-based and one-shot neural architecture search with
bonas. Advances in Neural Information Processing Sys-
tems, 33:1808–1819, 2020.
[Sun et al., 2019] Yanan Sun, Handing Wang, Bing Xue,
Yaochu Jin, Gary G Yen, and Mengjie Zhang. Surrogate-
assisted evolutionary deep learning using an end-to-end
random forest-based performance predictor. IEEE Trans-
actions on Evolutionary Computation, 24(2):350–364,
2019.
[Tang et al., 2020] Yehui Tang, Yunhe Wang, Yixing Xu,
Hanting Chen, Boxin Shi, Chao Xu, Chunjing Xu, Qi Tian,
and Chang Xu. A semi-supervised assessor of neural ar-
chitectures. In proceedings of the IEEE/CVF conference
on computer vision and pattern recognition, pages 1810–
1819, 2020.
[Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki
Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
Łukasz Kaiser, and Illia Polosukhin. Attention is all you
need. Advances in neural information processing systems,
30, 2017.
[Wang et al., 2021] Ruochen Wang, Xiangning Chen, Min-
hao Cheng, Xiaocheng Tang, and Cho-Jui Hsieh. Rank-
nosh: Efficient predictor-based architecture search via
In Proceedings of the
non-uniform successive halving.
IEEE/CVF International Conference on Computer Vision,
pages 10377–10386, 2021.
[Wei et al., 2021] Chen Wei, Yiping Tang, Chuang
Niu Chuang Niu, Haihong Hu, Yue Wang, and Jimin
Liang. Self-supervised representation learning for evolu-
IEEE Computational
tionary neural architecture search.
Intelligence Magazine, 16(3):33–49, 2021.
[Wen et al., 2020] Wei Wen, Hanxiao Liu, Yiran Chen, Hai
Li, Gabriel Bender, and Pieter-Jan Kindermans. Neu-
ral predictor for neural architecture search. In European
Conference on Computer Vision, pages 660–676. Springer,
2020.
[White et al., 2021] Colin White, Willie Neiswanger, and
Yash Savani. Bananas: Bayesian optimization with neu-
In Pro-
ral architectures for neural architecture search.
ceedings of the AAAI Conference on Artificial Intelligence,
volume 35, pages 10293–10301, 2021.
[Xia et al., 2008] Fen Xia, Tie-Yan Liu, Jue Wang, Wen-
sheng Zhang, and Hang Li. Listwise approach to learn-
ing to rank: theory and algorithm. In Proceedings of the
25th international conference on Machine learning, pages
1192–1199, 2008.
[Xie and Yuille, 2017] Lingxi Xie and Alan Yuille. Genetic
cnn. In Proceedings of the IEEE international conference
on computer vision, pages 1379–1388, 2017.
Appendix A Code & Data
The code of DCLP and the datasets are provided as supple-
mentary materials. Due to the page size limitation and the
fact that the datasets used in this paper can be easily obtained
from GitHub, only the links to the open-source projects cor-
responding to the datasets are provided. As stated in the main
body, in all comparisons involving work with others, the code
and parameters of the others' work are used directly from the
open-source project.
Appendix B Implementation of DCLP
In this section, we introduce the structure of DCLP. The pre-
dictor first extracts features about the input neural architec-
ture and represents it as a vector. Then the feature vector is
mapped to the predicted performance by MLP. Since neural
architectures are described by DAGs, we use a three-layer
GIN network f (*) to extract features from the DAGs. After
f (*), each DAG is transformed into an N-dimensional fea-
ture representation, and the MLP layer g(*) transforms the N-
dimensional vector into the predicted performance. Figure 5
shows the detailed structure diagram of DCLP.
Note that the MLP layer g(*) only plays a role in the down-
stream prediction task, and the pre-training using contrastive
learning only needs to train the feature extraction ability.
Then the pre-training only involves learning the parameters
of f (*), which is the encoder mentioned in the main text. As-
sume that the positive sample pair is {q, k+} and the negative
sample embeddings saved in the memory bank are {ki}N
i=1.
The goal of the contrastive learner is to make the distance be-
tween f (q) and f (k+) as small as possible and the distance
between f (q) and ki as far as possible. In fine-tuning, the
MLP layer is added after the encoder, thus constituting the
complete predictor.
Appendix C Hyper-parameter Settings
We introduce the configuration information in two parts, pre-
training and fine-tuning.
In pre-training, we set the batch
size to 4096, the epoch to 50, the learning rate to 0.015, and
the output of the encoder to 128 dimensions, which is a suit-
able dimension for most neural cell sizes [Chu et al., 2021].
Meanwhile, we use an SGD optimizer to optimize the en-
coder according to the contrastive learning task.
In fine-tuning, we use a three-layer MLP as g(*), and the
curvature in LeakyReLU of g(*) is 0.02. The maximum epoch
is set to 200, and we can select early stopping when the loss
on the training set is no longer decreasing. The batch size is
dynamically set according to the number of labeled training
data; for example, when there are 100 labeled training data,
we set the batch size to 20. Adam optimizer [Kingma and Ba,
2014] is used to optimize fine-tuning tasks with a learning
rate of 0.005. Regarding other people's work, we directly uti-
lize the open-source code and the default parameters. Some
configurations specific to DARTS search space are described
in section E.2. We use RTX 3090 to implement DCLP.
Figure 5: The strcture of DCLP.
Appendix D Discussions
In this section, we discuss in more depth the rationality of
some of the approximations in the main text.
D.1 The structural differences
This section discusses the rationale for using structural dif-
ferences to approximate property differences in neural archi-
tectures. Although this approximation has certain limitations,
it is feasible in our mission. In our work, this approximation
is used in pre-training to measure the difficulty of an aug-
mentation. The goal of our task is to use the predictor to
map the neural network and its performance. To achieve this
goal, we use an encoder to extract the features of the neu-
ral architecture and encode it into an N-dimensional vector z,
which is the feature vector of the neural network. Then, we
utilize MLP to establish the mapping relationship between z
and its corresponding performance. Then the basic idea is
that the smaller the difference in the final performance val-
ues of the two architectures, the smaller the gap between the
corresponding feature vectors, i.e., the smaller the distance
between the features related to the two networks.
In Figure 6, we show that when the LD between the data
in the sampled neural network set is larger, i.e., the greater
the structural difference, the larger the variance of the net-
work's performance in the set. This shows that structural
diversity can reflect the difference in network performance
values within a specific range. That is to say, to a certain
degree, the smaller the structural difference, the closer the
performance of the neural architecture is, which is the closer
the characteristics of the neural network, as mentioned above.
Therefore, we can approximate the difference in features of
the neural architectures by the difference in their structures.
D.2 Why normalization is useful for MSE
In the main text, we have briefly discussed why normalization
has an optimal effect on MSE in our task, and this section will
discuss it in depth. MSE is not suitable for our fine-tuning be-
cause sometimes a tiny MSE value is different from high sort-
ing accuracy, and we pay more attention to sorting accuracy.
Suppose there are two architectures in the training set, and
the performance of each neural architecture is a float num-
ber between 0 and 1. If the performance difference between
the two networks is only 0.01, and the predictor evaluates the
performance of the two architectures as precisely the oppo-
site, the ranking of the two networks has changed. Still, the
MSE is tiny in this case. That is to say, the optimization goal
of vanilla MSE is not consistent with our need to make the
ranking accuracy as high as possible.
Encoder(GIN)f(•)MLP Layerg(•)Predicted ValuePredictor StructureFigure 6: The variance of performance values of the architecture set
with different LD on NASBench-101 and NASBench-201.
Figure 7: Distribution of architectures' performance values on NAS-
Bench-101 and NAS-Bench-201.
Note that, as shown in Figure 7, the neural network's per-
formance distribution in the search space is approximately
normal. It means there are few networks with excellent or
poor performance, and most performance is concentrated in
a range.
In this case, the performance gap between many
architectures is small; it is challenging to learn ranking infor-
mation using vanilla MSE. We use normalization to enhance
MSE, taking the Z-score as an example. It maps the origi-
nal performance distribution between 0 and 1 to a standard
normal distribution. The formula used is as follows:
x∗ =
x − x
σ
(9)
where x is the mean of the original performance, and σ is the
standard deviation. Supposing that there are two architectures
with performance xi, xj, |xi −xj| = δ in the original training
set, where δ is a small value, it may be pretty tricky to learn
the relative ranking relationship of these two data using MSE
directly, or there is already severe overfitting when we learn
it. After normalization, |x∗
i − x∗
σ , and σ ∈ (0, 1), since
σ is a positive number less than 1, the distance between two
similar performance is artificially enlarged. Then, suppose
the predictor predicts a deviation in the ranking of two net-
works with similar original performance. In that case, there is
a large gap between the normalization performance, so MSE
is also large. In this way, we approximately unify the opti-
mization target of MSE with the target for ranking accuracy,
so it is adequate to use MSE+normalization in our task.
j | = δ
Appendix E Additional Experimental Results
In this section, we mainly show some visualization results of
the performance of DCLP on NAS-Bench-101 and the DAG
representations of the structures searched on NAS-Bench-101
and DARTS search spaces.
E.1 Results on NAS-Bench-101
Figure 8 shows the results of a qualitative comparison with
Kendall's Tau [Sen, 1968]. We randomly sample 3k struc-
tures as the test set, where the x-axis represents the actual
ranking, and the y-axis represents the predicted ranking of the
(a) SSANA
(b) HAAP
(c) GMAE
(d) DCLP
Figure 8: Comparison with state-of-the-art methods on NAS-Bench-
101. 300 labeled architectures are used to train the neural predictors.
architecture. If the points are closer to the diagonal, the rank-
ing correlation is stronger, equivalent to a higher Kendall's
Tau. In this way, we can observe the performance of predic-
tors in a more intuitive way than using the values of Kendall's
tau. As seen in the figure, using 300 training data, our ap-
proach shows better results.
Figure 10 shows the visualization of the structures searched
on NAS-Bench-101 using 300 labeled training data by differ-
ent predictor-based methods.
E.2 Results on DARTS search space
In this section, we will describe differences when searching
in DARTS search space compared to NAS-Bench-101 and the
search results.
First, we introduce some configurations. Unlike NAS-
Bench-101, DARTS search space needs to search two cells:
normal and reduction cells. To get the results of the two cells
in one iteration, we superimpose the two cells together as one
23456LevenshteinDistance−2.8−2.7−2.6−2.5−2.4−2.3log(var)nasbench-101nasbench-201-cifar10nasbench-201-cifar100nasbench-201-ImageNet20406080100acc(%)0.000.050.100.150.200.25frequencynasbench-101-cifar10nasbench-201-cifar10nasbench-201-cifar100nasbench-201-Imagenet50010001500200025003000trueranking050010001500200025003000predictedranking50010001500200025003000trueranking050010001500200025003000predictedranking50010001500200025003000trueranking050010001500200025003000predictedranking50010001500200025003000trueranking050010001500200025003000predictedrankingFigure 9: Schematic diagram of the cell structure when searching in
DARTS space. The actual cell is more complex than that.
cell to search. Figure 9 is a brief schematic diagram.
Figure 11 shows the visualization of the optimal structure
searched on DARTS search space using the CIFAR10 dataset
by our approach. The main setup follows the DARTS hyper-
parameter setup shown in Table 5.
parameter
Search Evaluation
batch size
layers
learning rate
epochs
init channels
momentum
weight decay
auxiliary weight
drop path prob
cutout length
grad clip
96
8
0.025
50
32
0.9
0.0003
0.4
0.2
16
5
96
20
0.025
600
36
0.9
0.0003
0.4
0.2
16
5
Table 5: The DARTS setups during search and evaluation.
inputConv1x1Conv3x3MaxPooloutput0110000011010100000100000Cell ArchitectureCell EncodingAdjacencyMatrixAttributeMatrixNormal cellinputConv1x1Conv3x3MaxPooloutputReduction cell000000000000000000000000000000000000000000000000000110000001000100000100000in1x13x3MPoutin1x13x3MPoutDARTS ArchitectureinputConvNormalcellxNReductioncellNormalcellxNReductioncellNormalcellxNglobalPooloutputFigure 10: Visualization of the best network architectures selected by different methods. 300 architectures randomly selected from NAS-
Bench-101 are used as labeled examples.
(a) Normal Cell
(b) Reduction Cell
Figure 11: The best-discovered architecture on DARTS search space.
Out3x33x33x3In3x33x33x33x3MPIn3x3OutOut3x31x13x3In3x31x13x31x13x3InMPOut1x13x31x13x3InOutOutInInputOutOutput3x33x3 Conv1x11x1 ConvMPMax-Pool(a) Optimal(b) DCLP(c) HAAP(d) GMAE(e) HOPCk-2Ck-10123CkSkip connectSkip connectsep_conv_3x3sep_conv_3x3sep_conv_3x3sep_conv_3x3sep_conv_5x5sep_conv_5x5Ck-2Ck-10123CkSkip connectmax_pool_3x3max_pool_3x3max_pool_3x3Skip connectSkip connectdil_conv_5x5max_pool_3x3 |
|
http://arxiv.org/abs/2302.13019v1 | 2023-02-25T08:16:14 | 2023-02-25T08:16:14 | A Unified Framework for Soft Threshold Pruning | Soft threshold pruning is among the cutting-edge pruning methods with
state-of-the-art performance. However, previous methods either perform aimless
searching on the threshold scheduler or simply set the threshold trainable,
lacking theoretical explanation from a unified perspective. In this work, we
reformulate soft threshold pruning as an implicit optimization problem solved
using the Iterative Shrinkage-Thresholding Algorithm (ISTA), a classic method
from the fields of sparse recovery and compressed sensing. Under this
theoretical framework, all threshold tuning strategies proposed in previous
studies of soft threshold pruning are concluded as different styles of tuning
$L_1$-regularization term. We further derive an optimal threshold scheduler
through an in-depth study of threshold scheduling based on our framework. This
scheduler keeps $L_1$-regularization coefficient stable, implying a
time-invariant objective function from the perspective of optimization. In
principle, the derived pruning algorithm could sparsify any mathematical model
trained via SGD. We conduct extensive experiments and verify its
state-of-the-art performance on both Artificial Neural Networks (ResNet-50 and
MobileNet-V1) and Spiking Neural Networks (SEW ResNet-18) on ImageNet datasets.
On the basis of this framework, we derive a family of pruning methods,
including sparsify-during-training, early pruning, and pruning at
initialization. The code is available at https://github.com/Yanqi-Chen/LATS. | [
"Yanqi Chen",
"Zhengyu Ma",
"Wei Fang",
"Xiawu Zheng",
"Zhaofei Yu",
"Yonghong Tian"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13019v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13019v1",
"@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",
"cs.CV",
"cs.NE"
] | Published as a conference paper at ICLR 2023
A UNIFIED FRAMEWORK FOR SOFT THRESHOLD
PRUNING
Yanqi Chen1,3, Zhengyu Ma†3, Wei Fang1,3, Xiawu Zheng3, Zhaofei Yu1,2,3, Yonghong Tian†1,3
1National Engineering Research Center of Visual Technology, School of Computer Science,
Peking University; 2Institute for Artificial Intelligence, Peking University; 3Peng Cheng Laboratory
[email protected], [email protected]; (†Corresponding author)
ABSTRACT
Soft threshold pruning is among the cutting-edge pruning methods with state-of-
the-art performance1. However, previous methods either perform aimless search-
ing on the threshold scheduler or simply set the threshold trainable, lacking the-
oretical explanation from a unified perspective. In this work, we reformulate soft
threshold pruning as an implicit optimization problem solved using the Iterative
Shrinkage-Thresholding Algorithm (ISTA), a classic method from the fields of
sparse recovery and compressed sensing. Under this theoretical framework, all
threshold tuning strategies proposed in previous studies of soft threshold prun-
ing are concluded as different styles of tuning L1-regularization term. We fur-
ther derive an optimal threshold scheduler through an in-depth study of threshold
scheduling based on our framework. This scheduler keeps L1-regularization coef-
ficient stable, implying a time-invariant objective function from the perspective of
optimization. In principle, the derived pruning algorithm could sparsify any math-
ematical model trained via SGD. We conduct extensive experiments and verify its
state-of-the-art performance on both Artificial Neural Networks (ResNet-50 and
MobileNet-V1) and Spiking Neural Networks (SEW ResNet-18) on ImageNet
datasets. On the basis of this framework, we derive a family of pruning meth-
ods, including sparsify-during-training, early pruning, and pruning at initializa-
tion. The code is available at https://github.com/Yanqi-Chen/LATS.
1
INTRODUCTION
Pruning has been a thriving area of network compression. Since the day deep neural networks
stretch their tentacles to every corner of machine learning applications, the demand for shrinking
the size of network parameters has never stopped growing. Fewer parameters usually imply less
computing burden on resource-constrained hardware such as embedded devices or neuromorphic
chips. Some pioneering studies have revealed considerable redundancies in both Artificial Neural
Networks (ANNs) (Han et al., 2015; 2016; Wen et al., 2016; Liu et al., 2017) and Spiking Neural
Networks (SNNs) (Qi et al., 2018; Chen et al., 2021; Yin et al., 2021; Deng et al., 2021; Kundu
et al., 2021; Kim et al., 2022b).
In essence, pruning can be formulated as an optimization problem under constraint on L0 norm,
the number of nonzero components in network parameters. Assuming L is the loss function of
vectorized network weight w, we expect lower L0 norm (cid:107)w(cid:107)0 along with lower loss L(w). Despite
different formulations like hard constraints
3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
9
1
0
3
1
.
2
0
3
2
:
v
i
X
r
a
or soft constraints (penalized)
(cid:107)
(cid:107)w(cid:107)0;
c
L(w);
L
min
(w)
≤
min
w
0
≤
(cid:107)
K
min
w
{L(w) + μ(cid:107)w(cid:107)0},
(1)
(2)
(3)
1For example, STR (Kusupati et al., 2020) is the first to achieve >50% Top-1 accuracy of ImageNet on
ResNet-50 under >99% sparsity. STDS (Chen et al., 2022) is the first pruning algorithm achieving acceptable
performance degradation (∼ 3% under 88.8% sparsity) for spiking neural networks with 18+ layers.
1
Published as a conference paper at ICLR 2023
all these forms are without exception NP-Hard (Natarajan, 1995; Davis et al., 1997; Nguyen et al.,
2019). Relaxing L0 norm to Lp(0 < p < 1) norm will not make it more tractable for it is still
strongly NP-Hard (Ge et al., 2011). Nowadays, research on pruning and sparse optimization is
mainly focused on the L1-regularized problem, the tightest convex relaxation of L0 norm, which
dates back to a series of groundbreaking studies on compressed sensing (Donoho, 2006; Cand`es
et al., 2006). These researches technically allows us to solve L1-regularized problem as an alter-
native or, sometimes even an equivalent option (Cand`es, 2008) to confront L0 norm constraint. A
variety of modern methods such as magnitude-based pruning are still firmly rooted in solving the
L1 regularized optimization problem. Be that as it may, L1 regularization is mostly employed for
shrinking the magnitude of weight before the hard thresholding step, which has started to be replaced
by other sorts of novel regularization (Zhuang et al., 2020).
In the past few years, a new range of pruning methods based on soft threshold reparameterization of
weights has been developing gradually. The term "reparameterization" here refers to a specific map-
ping to network weights w from a latent space of hidden parameters θ. The "geometry" of latent
space could be designed for guiding actual weights w towards sparsity. In soft threshold prun-
ing, the mapping is an element-wise soft threshold function with time-variant threshold. Among
these studies, two representative ones are Soft Threshold weight Reparameterization (STR) (Kusu-
pati et al., 2020) and State Transition of Dendritic Spines (STDS) (Chen et al., 2022). They both
achieve the best performance of that time. STDS further demonstrates the analogy between soft
threshold mapping and a structure in biological neural systems, i.e., dendritic filopodia and ma-
ture dendritic spines. However, few researchers notice that soft threshold mapping also appear as
the shrinkage operator in the solution of LASSO (Tibshirani, 1996) when the design matrix is or-
thonormal. The studies on LASSO further derives the Iterative Shrinkage-Thresholding Algorithm
(ISTA) (Daubechies et al., 2004; Elad, 2006), which used to be popularized in sparse recovery and
compressed sensing. ISTA has many variants (Bioucas-Dias & Figueiredo, 2007; Beck & Teboulle,
2009b; Bayram & Selesnick, 2010) and has long been certified as an effective sparsification methods
in all sorts of fields like deep learning (He et al., 2017; Zhang et al., 2018; Bai et al., 2020), computer
vision (Beck & Teboulle, 2009a; Dong et al., 2013), medical imageology (Lustig et al., 2007; Otazo
et al., 2015) and geophysics (Herrmann & Hennenfent, 2008). Despite an abecedarian analysis on
the similarity between STDS and ISTA, many issues remains to be addressed, such as 1) the exact
equivalence between ISTA and the growing threshold in soft threshold pruning, 2) the necessity of
setting threshold trainable in STR, and 3) the way to improve existing methods without exhaustively
trying different tricks for scheduling threshold.
In this work, we proposed a theoretical framework serving as a bridge between the underlying L1-
regularized optimization problem and threshold scheduling. The bridge is built upon the key finding
that soft threshold pruning is an implicit ISTA for nonzero weights. Specifically, we prove that the
L1 coefficient in the underlying optimization problem is determined by both threshold and learning
rate. In this way, any threshold tuning strategy can now be interpreted as a scheme for tuning L1
penalty. We find that a time-invariant L1 coefficient lead to performance towering over previous
pruning studies. Moreover, we bring a strategy of tuning L1 penalty called continuation strategy
(Xiao & Zhang, 2012), which was once all the rage in the field of sparse optimization, to the field of
pruning. It derives broad categories of algorithms covering several tracks in the present taxonomy
of pruning. In brief, our contributions are summarized as follows:
• Theoretical cornerstone of threshold tuning strategy. To the best of our knowledge,
this is the first work interpreting increasing threshold as an ever-changing regularized term.
Under theoretical analysis, we present a unified framework for the local equivalence of
ISTA and soft threshold pruning. It enables us to make a comprehensive study on threshold
tuning using the classic method in sparse optimization.
• Learning rate adapted threshold scheduler. Through our proposed framework, we reveal
the strong relation between the learning rate scheduler and the threshold scheduler. Then
we show that an time-invariant L1 coefficient requires the changing of threshold being
proportional to the learning rate. The Learning rate Adapted Threshold Scheduler (LATS)
built upon L1 coefficient achieves a state-of-the-art performance-sparsity tradeoff on both
deep ANNs and SNNs.
• Sibling schedulers cover multiple tracks of pruning. We propose an early pruning al-
gorithm by translating the homotopy continuation algorithm into a pruning algorithm with
2
Published as a conference paper at ICLR 2023
our framework. It achieves indistinguishable performance to LATS as a conventional early
pruning method. Moreover, the algorithm in the pruning-at-initialization setting erases
some subsequent layers in ResNet and maintains the identity mapping, shrinking deep
ResNet to a shallow one.
2 RELATED WORKS
There has been a deluge of pruning algorithms emerged since the term "deep compression" was in-
vented. These various studies emphasize different points like granularity (structured or unstructured)
and stage of pruning (at initialization, during training, post training). The difference in granularity is
similar to that between LASSO and group LASSO. Empirically, unstructured pruning tends to reach
higher sparsity under the same accuracy degradation. For the pruning phase, sparsify during training
commonly lead to higher accuracy than early phase one, e.g., pruning at initialization. Moreover,
pruning during training is cheaper than post-training pruning when the overhead of dense training is
considered. Some most relevant works are introduced as follows.
Sparsify during training. The terminology sparsify-during-training (also called pruning-while-
learning, pruning-during-training) is mentioned in Hoefler et al. (2021), which refers to pruning and
training networks simultaneously including those iteratively pruned networks. Recent works in this
area includes STR (Kusupati et al., 2020), Top-KAST (Jayakumar et al., 2020), CS (Continuous
Sparsification) (Savarese et al., 2020), RigL (Evci et al., 2020), WoodFisher (Singh & Alistarh,
2020), PSGD (Kim et al., 2020), GraNet (Liu et al., 2021a), Powerprop (Schwarz et al., 2021),
ProbMask (Zhou et al., 2021), GPO (Wang et al., 2022), OptG (Zhang et al., 2022) and STDS (Chen
et al., 2022). Many of these works are based on the reparameterization of weights using either
binary mask or element-wise nonlinear mapping. The former choose to confront L0 constraint
directly while the latter are committed to adjusting the landscape of loss function around zero. Our
method is based on soft threshold reparameterization, which is piecewise linear and has an intrinsic
connection to the ISTA with L1 regularization.
Early pruning. We refer to a variant of sparsify-during-training as early pruning here, which only
exerts pruning to network in the early stage of training. It includes pruning at initialization, e.g.,
GraSP (Wang et al., 2020), SynFlow (Tanaka et al., 2020), SBP-SR (Hayou et al., 2021), ProsPr
(Alizadeh et al., 2022), and the conventional early pruning methods which stop pruning after several
epochs of training (You et al., 2020; Liu et al., 2021b; Rachwan et al., 2022). Most of these works
are inspired by the discovery of Lottery Ticket Hypothesis (LTH) (Frankle & Carbin, 2019) or SNIP
(Lee et al., 2019), if not both. LTH suggests we can find a sparse subnetwork with comparable
performance to the dense network after iterative retraining, while SNIP manages to train from an
initial sparse network. A wide array of criteria like connectivity sensitivity are taken for finding such
sparse networks in the early stage with promising accuracy after training.
3 PRELIMINARIES
Notation. We use |x| to denote the element-wise absolute value of x, and (cid:107)x(cid:107)p denotes the p-
norm of x. x (cid:12) y denotes the element-wise product of x and y. If not otherwise specified, the
superscript within parenthesis x(i) denotes x at i-th iteration of gradient descent. The element-wise
xi). The soft threshold mapping is also an
sigmoid function is denoted by σ(x)i := 1/(1 + e−
element-wise mapping defined by Sd(x)i := sign(xi) * max {|xi| − d, 0} with scalar threshold d.
3.1 SOFT THRESHOLD PRUNING
Basically, soft threshold pruning will iteratively execute following three core steps:
(i) Mapping hidden weight to actual weight w through the soft threshold mapping w(t) ←
Sd(θ(t)) during training, where θ is a trainable hidden weight with the same shape as w.
(ii) Training hidden weight θ through backpropagation in latent space
(iii) Growing threshold d pushes the term max {|θi| − d, 0} in Sd(θ) towards zero and thereby
enforces sparsity for w.
3
Published as a conference paper at ICLR 2023
Algorithm 1 The general form of soft threshold pruning algorithm coupled with vanilla SGD (STR
and STDS for instance).
Input: initialized network parameters w(0), threshold scheduler function g(
parameter sinit, loss function
(w), the number of training iterations T , L2 penalty λ.
), initial threshold d(0), final threshold D, initial learnable
*
L
w(0)
←
←
← ∇
sinit, d(0)
Output: trained sparse parameters w(T )
σ(s(0)), θ(0)
1: s(0)
←
2: for t = 0, 1, . . . , T
1 do
−
3:
(w(t)))
∆θ(t)
1
w(
θ
L
|
4:
η(t)(∆θ(t) + λθ(t))
θ(t)
θ(t+1)
η(t)(
s(t)
s(t+1)
5:
σ(s(t+1))g((t + 1)/T )
6:
d(t+1)
←
7:
← Sd(t+1) (θ(t+1))
w(t+1)
8: end for
9: return w(T )
←
←
>d(t)
−
−
s(
∇
D
(cid:12)
L
*
|
(w; s(t))) + λs(t))
(cid:46) Initialization of weight and threshold
(cid:46) Computing gradient with respect to hidden weight
(cid:46) Update hidden weight. η(t) is learning rate
(cid:46) Threshold training in STR
(cid:46) Update threshold
(cid:46) Update the actual weight
We provide a general form of soft threshold pruning as Algorithm 1, which is a prototype of both
STR and STDS. GPO change the mapping in line 7 to a convex combination of soft threshold and
identity mapping, leading to a slight difference. However, GPO only obtain marginal performance
improvement with respect to STR, and will soon degenerate to STR as discussed in Appendix C.
Therefore, the following of this paper are focused on STR and STDS. The differences between them
are concluded from two aspects.
Gradient computing. With the reparameterization mapping w(t) ← Sd(θ(t)), the forward step
includes mapping via θ → w and evaluating loss with w as the actual network weight. Hence,
gradient is backpropagated via path L → w → θ. The learning rule is thus used for updating θ
instead of w. Note that Sd is non-differentiable at ±d and has zero gradient in interval (−d, d). STR
takes advantage of the subgradient at ±d and leaves zero gradients as it is. STDS views Sd as an
identity mapping during backward, and provides a convergence analysis by approximating Sd using
a smooth surrogate ˆSd(x) = 1
α [ζ(α(x − d)) − ζ(−α(x + d))], where ζ(x) := log(1 + ex) denotes
the softplus function.
Threshold tuning. These studies spontaneously try manipulating threshold d for different sparsity.
STR assigns an independent threshold for each layer, resulting into a threshold vector d. Besides,
STR further parameterizes the threshold by another trainable parameter s. The mapping from s to
d is individually designed for CNN and RNN. Compared to STR, STDS set threshold manually by
introducing the threshold scheduler as d(t) = g(t/T ) * D, wherein scheduler function g : [0, 1] →
[0, 1] is increasing and satisfies g(0) = 0, g(1) = 1, T is the total training steps. The formulation
is based on the idea that increasing threshold from 0 to D could follow different paths. The final
threshold D is the only adjustable hyperparameter for different sparsity levels when g is given.
Larger D always leads to higher sparsity in practice.
The above techniques are summarized in Tab. 1.
Table 1: Techniques used in previous studies.
Method
Reparameterization mapping
w(θ, d)
Gradient of mapping
Threshold
Note
STR
(Kusupati et al., 2020)
GPO
(Wang et al., 2022)
STDS
(Chen et al., 2022)
w = Sd(θ)
Subgradient
d :=
(cid:26)σ(s),
es,
for CNN
for RNN
w = (1 − k)Sd(θ) + kθ
Gradient
d := σ(s)
w = Sd(θ)
1 (Viewed as identity)
d(t) = g(t/T ) * D
s is layer-wise
(global for STR-GS),
trainable,
and L2 regularized
s, k are layer-wise,
trainable,
and L2 regularized
g is increasing,
g(0) = 0, g(1) = 1
3.2
ITERATIVE SHRINKAGE-THRESHOLDING ALGORITHM
ISTA is
minx
Rn
general objective as minx
initially
(cid:8)(cid:107)Ax − b(cid:107)2
∈
derived
2 + r(x)(cid:9), where A ∈ Rm
from solving
linear
×
inverse
n and b ∈ Rm.
problem with
regularization
ISTA is later extended to
Rn {F (x) := f (x) + r(x)} with assumptions listed below
∈
4
Published as a conference paper at ICLR 2023
(i) Objective function f : Rn → R is continuous differentiable, and L-smooth, i.e., (cid:107)∇f (x)−
∇f (y)(cid:107)2 ≤ Lf (cid:107)x − y(cid:107)2, ∀x, y ∈ Rn, where Lf > 0 is the Lipschitz constant of ∇f .
(ii) Regularization function r : Rn → R is continuous convex and can be nonsmooth.
(iii) F is bounded from below.
Leave the regularization r(x) alone, applying vanilla SGD to f can be viewed as iteratively cal-
culating proximal regularization (Martinet, 1970) of the linearized f at x, which is suggested by
the following fact: x − η∇f (x) = arg miny{f (x) + (cid:104)y − x, ∇f (x)(cid:105) + 1
2}, where η
is explained as "stepsize" in optimization or "learning rate" in the context of deep learning. For a
given point x, F (y) can be approximated by expanding f to the quadratic term in a similar vein
2η (cid:107)y − x(cid:107)2
ˆFη(y; x) := f (x) + (cid:104)y − x, ∇f (x)(cid:105) +
1
2η
(cid:107)y − x(cid:107)2
2 + r(y),
The above problem admits a unique minimizer
arg min
y
ˆFη(y; x) = arg min
y
(cid:26) 1
2η
(cid:107)y − (x − η∇f (x))(cid:107)2
2 + r(y)
(cid:27)
(4)
(5)
.
2 (cid:107)y − x(cid:107)2
gives a upperbound of f (y), which is obtained by the descent lemma f (y) ≤
Note that η = 1
Lf
f (x) + (cid:104)y − x, ∇f (x)(cid:105) + Lf
It implies with proper choice of η, we
2 (Beck, 2017).
are virtually optimizing the upperbound of F (y) using minimizer in Eq. 5. The general form of
ˆFη(x; x(t)), which is also known as proximal
ISTA iteratively solves Eq. 5 as x(t+1) = arg minx
gradient methods (Combettes & Wajs, 2005). The detailed convergence analysis is presented in
vast optimization literature like FISTA (Beck & Teboulle, 2009b) and GIST (Gong et al., 2013).
For sparsity, we are interested in L1 regularization term r(x) = μ(cid:107)x(cid:107)1, μ > 0. Since L1 norm is
separable, we have a closed-form solution with element-wise soft threshold operation as
x(t+1) = Sμη(x(t) − η∇f (x(t))).
(6)
Eq. 6 gives the ISTA update rule under L1 regularization.
4 A FRAMEWORK FOR SOFT THRESHOLD PRUNING
In this part, we will formulate the growing threshold under soft threshold reparameterization as an
implicit ISTA. For simplicity, we assume the threshold is global across all parameters, which is
consistent with the setting of STDS and STR-GS, i.e., the global threshold version of STR. Hence,
we use scalar d rather than vector d in Algorithm 1 to denote the global threshold.
To begin with, we investigate the update rule of nonzero components in actual weight
θ(t+1) ← θ(t) − η(t)∇w(L(w(t))) (cid:12) ∇θ(w(θ(t), d(t))),
w(t+1) ← Sd(t+1) (θ(t+1)),
Line 4 in Algorithm 1,
Line 7 in Algorithm 1.
(7)
(8)
Assuming the sign of weight remains unchanged after an update, which happens when the gradient
has the opposite sign of weight or the gradient magnitude is sufficiently small, we have the following
Lemma:
Lemma 1 (Local update rule). The update rule in Eq. 7 and Eq. 8 implies the following update of a
nonzero component w(θ, d) in actual weight w
w(t+1) = Sd(t+1)
−
d(t) (w(t) − η(t)∇w(L(w(t)))).
(9)
The formal version and proof of Lemma 1 is given in Appendix A. Note that the form in Eq. 9 is
equivalent to the ISTA update rule with threshold equal to forward finite difference d(t+1) − d(t).
Recall Eq. 6, the corresponding optimization problem can be deduced as Theorem 1:
Theorem 1. Let L(w) be the loss function depending on the network weight w, which is further
reparamterized by hidden weight θ and threshold d as w(θ, d) = Sd(θ). When applying vanilla
5
Published as a conference paper at ICLR 2023
SGD to reparameterized nonzero weight, the update rule is locally equivalent to solving the follow-
ing problem using ISTA with penalty term
(cid:26)
min
w
F (w) := L(w) +
d(t+1) − d(t)
η(t)
(cid:27)
(cid:107)w(cid:107)1
,
(10)
where η(t), d(t) denotes the learning rate and threshold at the t-th iteration, respectively. The mag-
nitude of L1-penalty is the quotient of forward finite difference of threshold scheduler divided by
learning rate.
Theorem 1 serves as the glue holding the learning rate scheduler η(t), threshold d(t) and penalty μ(t)
together. It also to some extent justify the increasing threshold for a positive penalty term. Under
this framework, we further explain in Appendix B that the original STDS uses an improper threshold
scheduler. Moreover, the validity of training threshold is discussed in Appendix C.
5 FINDING OPTIMAL THRESHOLD SCHEDULER
In this part, we are devoted to evaluating some threshold schedulers based on our theoretical frame-
work and literature on sparse optimization. With the framework, any past strategy of tuning L1
penalty can be converted to a feasible pruning algorithm today.
5.1 LEARNING RATE ADAPTED THRESHOLD SCHEDULER
If the optimization problem in Theorem 1 is fixed, or in other words, the L1 penalty is invariant
μ(t) ≡ μ during learning, we can deduce a unique threshold scheduler LATS. In LATS, the change
on threshold d(t+1) − d(t) must be proportional to the learning rate η(t) during training.
Corollary 1 (Learning rate Adapted Threshold Scheduler). For fixed L1 regularized problem
min
w
{F (w) := L(w) + μ(cid:107)w(cid:107)1} ,
(11)
where μ > 0 is the time-independent L1 penalty coefficient, the threshold scheduler is governed by
1
t
(cid:80)
−
i=0
the learning rate scheduler as d(t) = d(0) + μ
η(i)
For the most frequently used testbed, ResNet-50 (He et al., 2016) on ImageNet dataset (Deng et al.,
2009), researchers usually use the cosine annealing learning rate scheduler (Loshchilov & Hutter,
2017) with ηmin = 0. Assuming the initial threshold is zero, simple algebra shows the definition of
corresponding LATS with a slight abuse of notation
d(n,b) = μηmax
(cid:32)
2n + 1 +
(cid:34)
B
4
1
2N π(cid:1)
sin (cid:0) 2n
−
sin π
2N
(cid:33)
+
(cid:16)
b
2
1 + cos
(cid:35)
(cid:17)
,
nπ
N
(12)
where the threshold d(n,b) depends on epoch id n and batch id b. Here n = 0, 1, . . . , N − 1 denotes
the current id of training epoch, and b = 1, 2, . . . , B denotes the batch id in n-th epoch. We elaborate
the detailed derivation of Eq. 12 in Appendix D.
5.2 SIMPLIFIED THRESHOLD SCHEDULER
Computation such as Eq. 12 is intricate for implementation. In effect, painstakingly coding LATS
according to given learning rate scheduler is not inevitable. To ease the computing burden, we turn
to replacing sum of learning rate with integration of learning rate function.
To be specific, assuming the learning rate scheduler can be expressed by η(n,b) = h(n/N ), the
simplified threshold scheduler is defined by
d(t) = d(N
1,B) *
−
T
(cid:82) t
0 h(x)dx
(cid:82) 1
0 h(x)dx
.
(13)
The simplification is loyal to the idea that the value of Riemann integral could be approximated by
rectangle method. Eq. 13 can be interpreted with scheduler form in STDS as d(t) = g(t/T ) * D
6
Published as a conference paper at ICLR 2023
with scheduler function g(x) = (cid:82) t
detailed derivation of Eq. 13 is given in Appendix D.
0 h(x)dx/ (cid:82) 1
T
0 h(x)dx and final threshold D = d(N
1,B). The
−
Now we have the Simplified LATS (S-LATS for short) for the cosine annealing learning rate sched-
uler h(x) = ηmax
2 (1 + cos(πx))
d(t) =
μηmaxT
2
*
(cid:82) t
T
0
(cid:82) 1
0
1
2 (1 + cos πx)dx
1
2 (1 + cos πx)dx
=
μηmaxT
2
(cid:20) 1
π
sin(
tπ
T
) +
(cid:21)
.
t
T
(14)
The final threshold is D = μηmaxT /2, which satisfies D ∝ μ. Tuning D is thus akin to changing
the magnitude of penalty. In the following discussion, we employ the final threshold D instead
of d(N
1,B) to lighten the notation. The threshold schedulers in the rest of this work will thus be
expressed in a unified form of d(t) = g(t/T ) * D. We evaluate LATS and S-LATS under identical
−
Table 2: Comparison of LATS and S-LATS when applied to ResNet-50 on ImageNet dataset.
Final threshold D
STDS + LATS
STDS + S-LATS
Sparsity (%) Top-1 Acc. (%)
Sparsity (%) Top-1 Acc. (%)
0.1
0.5
1.0
5.0
79.97
95.54
97.43
99.27
76.53
73.12
69.56
53.80
79.95
95.53
97.43
99.28
76.75
73.03
69.64
53.64
final thresholds D = 0.1, 0.5, 1.0, 5.0, which can be gleaned from Tab. 2. The results show LATS
and S-LATS are indistinguishable from accuracy and sparsity. Thus, we turn to a simplified threshold
scheduler in the following discussion.
5.3 CONTINUATION STRATEGY
Also known as "warm starting", continuation strategy is designated for accelerating convergence.
Similar to annealing of learning rate, continuation refers to gradually reducing L1 penalty during
learning.
It is also explained in Hale et al. (2008) as an analogue to the homotopy algorithms
in statistics. Continuation method used to serve as a common trick in abundant classic literature
concerning sparse optimization including GPSR (Figueiredo et al., 2007), fixed point continuation
method (Hale et al., 2008), SpaRSA (Wright et al., 2009) and NESTA (Becker et al., 2011).
5.3.1 PGH SCHEDULER
In the series works of proximal gradient homotopy (PGH) (Xiao & Zhang, 2012; 2013; Lin & Xiao,
2014), the researchers provide proof of geometric convergence rate when inducing exponentially
decaying L1 coefficient μ(t) = β t
T , where 0 < β < 1 is a constant. Considering our formulation
of soft threshold pruning in Theorem 1, PGH can be translated into the PGH scheduler (simplified
using Eq.13), which can be written as
d(t) = gPGH(t/T ) * D :=
(cid:82) t
T
0
(cid:82) 1
0
1
2 (1 + cos πx)βxdx
1
2 (1 + cos πx)βxdx
* D,
(15)
where the analytic form of gPGH is shown below
gPGH(x) =
π2 (βx − 1) + log2(β) (βx − 2) + log(β)βx(log(β) cos(πx) + π sin(πx))
π2(β − 1) − 2 log2(β)
.
(16)
5.3.2 LINK TO EARLY PRUNING
For the PGH scheduler, we interpolate β between 0 and 1 and get a series of different PGH sched-
ulers. As shown in Fig. 1, the increasing in threshold slows over time, which is caused by decaying
L1 penalty. For 0 < β < 1, if pruning is ignored when penalty is below a preset threshold, we get a
family of early pruning algorithms. They will stop pruning at different stages. Recall that the regular-
ized term is proportional to the forward finite difference and thus can be approximated by derivative,
for conventional early pruning, we regard g(cid:48)PGH(t/T ) < 0.1 as the termination criterion of pruning.
7
Published as a conference paper at ICLR 2023
There are two limit cases when β approaches 0 or 1. It is obvi-
ous that β → 1 leads to S-LATS for no decay is applied. When
β → 0, the penalty is always zero except for the beginning.
In
this case, PGH scheduler degenerates to a magnitude-based prun-
ing after weight initialization followed by a normal training stage.
This is also referred to as sparse-to-sparse training or pruning at
initialization method.
6 EXPERIMENTS
Figure 1: PGH schedulers un-
der different β.
In this section, we test proposed threshold scheduler S-LATS on both deep ANNs and SNNs. The
favorable performances against the previous studies are confirmed. In all experiments we switch
sparisty levels by changing D, which is equivalent to tuning L1 penalty coefficient. We also tune
hyperparameter β in PGH scheduler to maintain different phases of early pruning algorithm. Com-
pared to the dense baseline, no tuning on other training hyperparameters is needed, which minimize
the effort when applying to other networks.
6.1 S-LATS
S-LATS achieves state-of-the-art performances on both ANNs (ResNet-50, MobileNet-V1 (Howard
et al., 2017)) and SNNs (SEW ResNet-18 (Fang et al., 2021)). The results on ResNet-like networks
and MobileNet-V1 are illustrated in Fig. 2. We add Gradual Magnitude Pruning (GMP) (Zhu &
Gupta, 2017) into comparison for few recent studies are conducted on MobileNet-V1. Notably,
our method surges ahead of all the other baselines under <98% sparsity for pruning on ResNet-50,
which is shown in Tab. 3. It should be noted that the origin STDS excludes the last FC layer from
pruning in SNNs, while the results reported here are shown by rerunning it with the last layer pruned.
We also admit it fails to achieve comparable performance with a few baselines like OptG and in
Table 3: Comparison of ResNet-50 Top-1 accuracy on ImageNet in recent studies using 100 training
epochs. For some studies without strict control on sparsity, the closest sparsity is reported behind
the performance. Performance of S-LATS is averaged over three trials.
Method
Batch size
80%
90%
95%
Sparsity
96.5%
97.5%
98%
99%
STR
STR-GS
GraNet
ProbMask
OptG
WoodFisher
S-LATS
S-LATS
RigL (ERK)
Top-KAST
(Powerprop)
Top-KAST
(Powerprop+ERK)
256
256
256
256
256
256
256
1024
4096
4096
4096
76.19 (79.55)
-
76
-
-
76.73
76.57±0.15 (79.95)
76.61±0.25 (79.00)
75.1
74.31 (90.23)
74.13 (89.54)
74.5
74.68
74.28
75.26
75.43±0.17 (89.57)
75.87±0.15 (90.15)
73.0
70.40 (95.03)
-
72.3
71.5
72.38
72.16
73.20±0.09 (95.12)
74.29±0.28 (95.01)
69.7
67.22 (96.53)
-
70.5
-
70.85
-
71.48±0.13 (96.58)
72.80±0.18 (96.53)
67.2
-
-
-
-
-
-
69.49±0.18 (97.43)
70.78±0.09 (97.54)
-
61.46 (98.05)
62.17 (97.91)
-
66.83
67.2
65.47
67.25±0.19 (98.01)
69.15±0.13 (98.00)
-
51.82 (98.98)
-
-
61.07
62.1
-
58.39±0.25 (99.02)
61.90±0.18 (98.93)
-
76.24
76.76
75.23
75.74
73.25
-
-
-
-
-
-
-
-
-
extreme sparsity (≥99%), which suggests the theory might be imperfect under such conditions. An
ablation study shows S-LATS outperforms the default threshold scheduler of STDS, which is shown
in Appendix F.
Figure 2: Performance of several SOTA pruning strategies of ResNet-50 (Leftmost & Rightmost),
MobileNet-V1 (Middle left) and SEW ResNet-18 (Middle right) on ImageNet. All trials uses the
standard training setting (256 batch size) except the rightmost one, which uses an enlarged batch
size marked in parenthesis. Detailed layerwise sparsity and accuracy are given in Appendix I.
8
0.000.250.500.751.00x0.000.250.500.751.00gPGH(x)β=1e-10β=1e-05β=0.1S-LATS(β→1)β→080859095100Sparsity(%)505560657075Top-1Acc.(%)DenseAcc.S-LATSSTRSTR-GSGraNetOptGProbMaskWoodFisher75808590Sparsity(%)626466687072Top-1Acc.(%)DenseAcc.S-LATSSTRGMPWoodFisher60708090Sparsity(%)4045505560Top-1Acc.(%)DenseAcc.S-LATSSTDS(Sinesch.)ADMM80859095100Sparsity(%)505560657075Top-1Acc.(%)DenseAcc.(256)DenseAcc.(1024)S-LATS(256)S-LATS(1024)PPTopKAST(4096)PPTopKAST,ERK(4096)RigLERK(4096)Published as a conference paper at ICLR 2023
Pruning using large batch size. Powerprop (Schwarz et al., 2021), adopts a batch size of 4096 for
pruning of ResNet-50 and achieves fascinating performances under high sparsity. Hence, we explore
the large batch size setting. Due to limited resources, we only increase it to 1024 and enlarge the
learning rate correspondingly. The rightmost of Fig. 2 shows it indeed leads to higher performance,
which outperforms all other SOTA studies. Astonishingly, even though the performance of the dense
network slightly degrades, the accuracy of the sparse ones is improved overall. On the basis of the
above finding, we believe applying an even larger batch size, like 4096 used in Powerprop, to our
method may lead to top-notch performance tradeoff.
6.2 PGH SCHEDULER
10.
Conventional early pruning Our experiments of early pruning includes β = 0.1, 10−
The corresponding ending criteria t/T = 0.743, 0.382, 0.231 are given by numerical solution. It
indicates pruning roughly stops at the 74th, the 38th and the 23th epoch. The network using PGH
scheduler with smaller β converges faster to a sparse one, which is illustrated in the left of Fig. 3.
Surprisingly, we find in the middle of Fig. 3 that for different β, the datapoint of accuracy against
5, 10−
Figure 3: Overall sparsity during learning when final threshold D = 0.1 (Left). Performance
under different sparsity levels (Middle). Layerwise sparsity of PGH scheduler under pruning at
initialization setting β → 0 (Right).
sparsity almost lies on the curve of S-LATS. It suggests these schedulers have practically the same
performances as S-LATS, but with faster convergence to sparse networks. With the help of PGH
scheduler, we are able to find sparse networks earlier with negligible performance degradation.
Pruning at initialization We also try β → 0, which refers to increasing the threshold
to its maximum at the first iteration. Note that our method is agnostic about the structure
of network. Hence, some layers are completely pruned as shown in the right of Fig. 3,
wherein three consecutive layers
within a residual block tend to be
pruned simultaneously. However,
owing to the skip connection in
the feature can still pass
ResNet,
through shortcuts to the final FC
layer, and thus the whole networks
are still normally trained. The afore-
mentioned results are collected in Tab. 4.
Table 4: Results in pruning at initialization experiments.
Final threshold D
0.15
Overall sparsity (%)
Top-1 Acc. (%)
# Zeroed layers
95.64
62.22
27
87.16
74.69
0
93.11
68.23
9
90.00
72.89
9
0.13
0.11
0.1
7 CONCLUSION & DISCUSSION
In this work, we present a framework interpreting increasing threshold as a constantly changing
penalty term and reveal the underlying connection between soft threshold pruning and ISTA. We
also derive a couple of threshold schedulers, which achieve comparable performance to current
SOTA works and cover multiple tracks of pruning. It is worth noting that our method is agnostic
about the object of pruning. This design endows our method with versatility while treating weight
wheresoever equally, and yet becomes totally ignorant of nowadays pruning researches like spar-
sity budget allocation, e.g., Erd ̋os-R ́enyi (Mocanu et al., 2018) and Erd ̋os-R ́enyi-Kernel (ERK) (Evci
et al., 2020), or commonsense in this area like "Leave at least one path from input through out-
put". We believe our method can for sure further benefit from knowledge in the prosperous field of
network pruning.
9
020406080100Epoch20406080Sparsity(%)β=1e-10β=1e-5β=0.1S-LATS(β→1)80.082.585.087.590.092.595.097.5100.0Sparsity(%)505560657075Top-1Acc.(%)DenseAcc.β=1e-10β=1e-5β=0.1S-LATS(β→1)01020304050#Layer406080100LayerSparsity(%)D=0.1D=0.11D=0.13D=0.15Published as a conference paper at ICLR 2023
ACKNOWLEDGMENTS
This work is supported by grants from the National Key R&D Program of China under
Grant 2020AAA01035, the Key-Area Research Development Program of Guangdong Province
(2021B0101400002), and the National Natural Science Foundation of China under contract
No. 62088102, No. 62176003, No. 62006132, No. 62027804 and No. 61825101. The computing
resources of Pengcheng Cloudbrain are used in this research.
REFERENCES
Milad Alizadeh, Shyam A. Tailor, Luisa M Zintgraf, Joost van Amersfoort, Sebastian Farquhar,
Nicholas Donald Lane, and Yarin Gal. Prospect pruning: Finding trainable weights at initializa-
tion using meta-gradients. In International Conference on Learning Representations, 2022.
Haoli Bai, Jiaxiang Wu, Irwin King, and Michael Lyu. Few shot network compression via cross
distillation. Proceedings of the AAAI Conference on Artificial Intelligence, 34(04):3203–3210,
Apr. 2020.
Ilker Bayram and Ivan W. Selesnick. A subband adaptive iterative shrinkage/thresholding algorithm.
IEEE Transactions on Signal Processing, 58(3):1131–1143, 2010.
Amir Beck. First-Order Methods in Optimization, pp. 109. Society for Industrial and Applied
Mathematics, 2017.
Amir Beck and Marc Teboulle. Fast gradient-based algorithms for constrained total variation image
denoising and deblurring problems. IEEE Transactions on Image Processing, 18(11):2419–2434,
2009a.
Amir Beck and Marc Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse
problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009b.
Stephen Becker, J ́erˆome Bobin, and Emmanuel J. Cand`es. NESTA: A fast and accurate first-order
method for sparse recovery. SIAM Journal on Imaging Sciences, 4(1):1–39, 2011.
Yoshua Bengio, Nicholas L ́eonard, and Aaron Courville. Estimating or propagating gradients
through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013.
Jos ́E M. Bioucas-Dias and M ́Ario A. T. Figueiredo. A new TwIST: Two-step iterative shrink-
age/thresholding algorithms for image restoration. IEEE Transactions on Image Processing, 16
(12):2992–3004, 2007.
Emmanuel J. Cand`es. The restricted isometry property and its implications for compressed sensing.
Comptes Rendus Mathematique, 346(9):589–592, 2008.
Emmanuel J. Cand`es, Justin K. Romberg, and Terence Tao. Stable signal recovery from incomplete
and inaccurate measurements. Communications on Pure and Applied Mathematics, 59(8):1207–
1223, 2006.
Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L. Yuille.
Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and
fully connected crfs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(4):
834–848, 2018.
Yanqi Chen, Zhaofei Yu, Wei Fang, Tiejun Huang, and Yonghong Tian. Pruning of deep spiking
neural networks through gradient rewiring. In Proceedings of the Thirtieth International Joint
Conference on Artificial Intelligence, IJCAI-21, pp. 1713–1721, 2021.
Yanqi Chen, Zhaofei Yu, Wei Fang, Zhengyu Ma, Tiejun Huang, and Yonghong Tian. State transi-
tion of dendritic spines improves learning of sparse spiking neural networks. In Proceedings of
the 39th International Conference on Machine Learning, pp. 3701–3715, 2022.
Mark W Coffey. On some series representations of the Hurwitz zeta function. Journal of Computa-
tional and Applied Mathematics, 216(1):297–305, 2008.
10
Published as a conference paper at ICLR 2023
Patrick L. Combettes and Val ́erie R. Wajs. Signal recovery by proximal forward-backward splitting.
Multiscale Modeling & Simulation, 4(4):1168–1200, 2005.
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, 57(11):1413–1457, 2004.
Geoff Davis, Stephane Mallat, and Marco Avellaneda. Adaptive greedy approximations. Construc-
tive approximation, 13(1):57–98, 1997.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hier-
archical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition,
pp. 248–255, 2009.
Lei Deng, Yujie Wu, Yifan Hu, Ling Liang, Guoqi Li, Xing Hu, Yufei Ding, Peng Li, and Yuan Xie.
IEEE
Comprehensive snn compression using admm optimization and activity regularization.
Transactions on Neural Networks and Learning Systems, pp. 1–15, 2021.
Weisheng Dong, Lei Zhang, Guangming Shi, and Xin Li. Nonlocally centralized sparse representa-
tion for image restoration. IEEE Transactions on Image Processing, 22(4):1620–1630, 2013.
David L Donoho. Compressed sensing. IEEE Transactions on Information Theory, 52(4):1289–
1306, 2006.
Michael Elad. Why simple shrinkage is still relevant for redundant representations? IEEE Transac-
tions on Information Theory, 52(12):5559–5569, 2006.
Utku Evci, Trevor Gale, Jacob Menick, Pablo Samuel Castro, and Erich Elsen. Rigging the lottery:
In Proceedings of the 37th International Conference on Machine
Making all tickets winners.
Learning, pp. 2943–2952, 2020.
Wei Fang, Zhaofei Yu, Yanqi Chen, Tiejun Huang, Timoth ́ee Masquelier, and Yonghong Tian. Deep
In Advances in Neural Information Processing
residual learning in spiking neural networks.
Systems, pp. 21056–21069, 2021.
M ́Ario A. T. Figueiredo, Robert D. Nowak, and Stephen J. Wright. Gradient projection for sparse
reconstruction: Application to compressed sensing and other inverse problems. IEEE Journal of
Selected Topics in Signal Processing, 1(4):586–597, 2007.
Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural
networks. In International Conference on Learning Representations, 2019.
Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv
preprint arXiv:1902.09574, 2019.
Dongdong Ge, Xiaoye Jiang, and Yinyu Ye. A note on the complexity of Lp minimization. Mathe-
matical programming, 129(2):285–299, 2011.
Pinghua Gong, Changshui Zhang, Zhaosong Lu, Jianhua Huang, and Jieping Ye. A general itera-
tive shrinkage and thresholding algorithm for non-convex regularized optimization problems. In
Proceedings of the 30th International Conference on Machine Learning, pp. 37–45, 2013.
Elaine T. Hale, Wotao Yin, and Yin Zhang. Fixed-point continuation for (cid:96)1-minimization: Method-
ology and convergence. SIAM Journal on Optimization, 19(3):1107–1130, 2008.
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for
efficient neural network. In Advances in Neural Information Processing Systems, 2015.
Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks
with pruning, trained quantization and huffman coding. In International Conference on Learning
Representations, 2016.
Soufiane Hayou, Jean-Francois Ton, Arnaud Doucet, and Yee Whye Teh. Robust pruning at initial-
ization. In International Conference on Learning Representations, 2021.
11
Published as a conference paper at ICLR 2023
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog-
In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
nition.
(CVPR), 2016.
Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural net-
works. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Oct
2017.
Felix J. Herrmann and Gilles Hennenfent. Non-parametric seismic data recovery with curvelet
frames. Geophysical Journal International, 173(1):233–248, 04 2008.
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.
Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand,
Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for
mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
Carl Gustav Jacob Jacobi. De usu legitimo formulae summatoriae maclaurinianae. Journal f ̈ur die
reine und angewandte Mathematik, 12:263–272, 1834.
Siddhant Jayakumar, Razvan Pascanu, Jack Rae, Simon Osindero, and Erich Elsen. Top-kast: Top-k
always sparse training. In Advances in Neural Information Processing Systems, pp. 20744–20754,
2020.
Jangho Kim, KiYoon Yoo, and Nojun Kwak. Position-based scaled gradient for model quantization
and pruning. In Advances in Neural Information Processing Systems, pp. 20415–20426, 2020.
Youngeun Kim, Yuhang Li, Hyoungseob Park, Yeshwanth Venkatesha, and Priyadarshini Panda.
Neural architecture search for spiking neural networks. In Computer Vision – ECCV 2022, pp.
36–56, 2022a.
Youngeun Kim, Yuhang Li, Hyoungseob Park, Yeshwanth Venkatesha, Ruokai Yin, and
In Com-
Priyadarshini Panda. Exploring lottery ticket hypothesis in spiking neural networks.
puter Vision – ECCV 2022, pp. 102–120, 2022b.
Donald E Knuth. Johann faulhaber and sums of powers. Mathematics of Computation, 61(203):
277–294, 1993.
Souvik Kundu, Gourav Datta, Massoud Pedram, and Peter A. Beerel. Spike-thrift: Towards energy-
efficient deep spiking neural networks by limiting spiking activity via attention-guided compres-
sion. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision
(WACV), pp. 3953–3962, 2021.
Aditya Kusupati, Vivek Ramanujan, Raghav Somani, Mitchell Wortsman, Prateek Jain, Sham
Kakade, and Ali Farhadi. Soft threshold weight reparameterization for learnable sparsity.
In
Proceedings of the 37th International Conference on Machine Learning, pp. 5544–5555, 2020.
Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: single-shot network pruning based
on connection sensitivity. In International Conference on Learning Representations, 2019.
Qihang Lin and Lin Xiao. An adaptive accelerated proximal gradient method and its homotopy
In Proceedings of the 31st International Conference on
continuation for sparse optimization.
Machine Learning, pp. 73–81, 2014.
Shiwei Liu, Tianlong Chen, Xiaohan Chen, Zahra Atashgahi, Lu Yin, Huanyu Kou, Li Shen, Mykola
Pechenizkiy, Zhangyang Wang, and Decebal Constantin Mocanu. Sparse training via boosting
pruning plasticity with neuroregeneration. In Advances in Neural Information Processing Sys-
tems, pp. 9908–9922, 2021a.
Shiwei Liu, Lu Yin, Decebal Constantin Mocanu, and Mykola Pechenizkiy. Do we actually need
dense over-parameterization? in-time over-parameterization in sparse training. In Proceedings of
the 38th International Conference on Machine Learning, pp. 6989–7000, 2021b.
12
Published as a conference paper at ICLR 2023
Wei Liu, Andrew Rabinovich, and Alexander Berg. Parsenet: Looking wider to see better. arXiv
preprint arXiv:1506.04579, 2015.
Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learn-
In Proceedings of the IEEE
ing efficient convolutional networks through network slimming.
International Conference on Computer Vision (ICCV), 2017.
Ilya Loshchilov and Frank Hutter. SGDR: Stochastic gradient descent with warm restarts. In Inter-
national Conference on Learning Representations, 2017.
Michael Lustig, David Donoho, and John M. Pauly. Sparse MRI: The application of compressed
sensing for rapid MR imaging. Magnetic Resonance in Medicine, 58(6):1182–1195, 2007.
Wolfgang Maass. Networks of spiking neurons: The third generation of neural network models.
Neural Networks, 10(9):1659–1671, 1997.
Bernard Martinet. R ́egularisation d'in ́equations variationnelles par approximations successives. Re-
vue Francaise d'informatique et de Recherche operationelle, 4:154–158, 1970.
Paul A. Merolla, John V. Arthur, Rodrigo Alvarez-Icaza, Andrew S. Cassidy, Jun Sawada, Filipp
Akopyan, Bryan L. Jackson, Nabil Imam, Chen Guo, Yutaka Nakamura, Bernard Brezzo, Ivan
Vo, Steven K. Esser, Rathinakumar Appuswamy, Brian Taba, Arnon Amir, Myron D. Flickner,
William P. Risk, Rajit Manohar, and Dharmendra S. Modha. A million spiking-neuron integrated
circuit with a scalable communication network and interface. Science, 345(6197):668–673, 2014.
Decebal Constantin Mocanu, Elena Mocanu, Peter Stone, Phuong H Nguyen, Madeleine Gibescu,
and Antonio Liotta. Scalable training of artificial neural networks with adaptive sparse connec-
tivity inspired by network science. Nature communications, 9(1):1–12, 2018.
Byunggook Na, Jisoo Mok, Seongsik Park, Dongjin Lee, Hyeokjun Choe, and Sungroh Yoon. Au-
toSNN: Towards energy-efficient spiking neural networks. In Proceedings of the 39th Interna-
tional Conference on Machine Learning, pp. 16253–16269, 2022.
Balas Kausik Natarajan. Sparse approximate solutions to linear systems. SIAM Journal on Comput-
ing, 24(2):227–234, 1995.
Emre O. Neftci, Hesham Mostafa, and Friedemann Zenke. Surrogate gradient learning in spiking
neural networks: Bringing the power of gradient-based optimization to spiking neural networks.
IEEE Signal Processing Magazine, 36(6):51–63, 2019.
Thanh T Nguyen, Charles Soussen, J ́erˆoome Idier, and El-Hadi Djermoune. NP-hardness of (cid:96)0 mini-
mization problems: revision and extension to the non-negative setting. In 2019 13th International
conference on Sampling Theory and Applications (SampTA), pp. 1–4, 2019.
Ricardo Otazo, Emmanuel Cand`es, and Daniel K. Sodickson. Low-rank plus sparse matrix decom-
position for accelerated dynamic MRI with separation of background and dynamic components.
Magnetic Resonance in Medicine, 73(3):1125–1136, 2015.
Yu Qi, Jiangrong Shen, Yueming Wang, Huajin Tang, Hang Yu, Zhaohui Wu, and Gang Pan. Jointly
In Proceedings of
learning network connections and link weights in spiking neural networks.
the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18, pp. 1597–
1603, 2018.
John Rachwan, Daniel Z ̈ugner, Bertrand Charpentier, Simon Geisler, Morgane Ayle, and Stephan
G ̈unnemann. Winning the lottery ahead of time: Efficient early network pruning. In Proceedings
of the 39th International Conference on Machine Learning, pp. 18293–18309, 2022.
Pedro Savarese, Hugo Silva, and Michael Maire. Winning the lottery with continuous sparsification.
In Advances in Neural Information Processing Systems, pp. 11380–11390, 2020.
Jonathan Schwarz, Siddhant Jayakumar, Razvan Pascanu, Peter E Latham, and Yee Teh. Power-
propagation: A sparsity inducing weight reparameterisation. In Advances in Neural Information
Processing Systems, pp. 28889–28903, 2021.
13
Published as a conference paper at ICLR 2023
Sidak Pal Singh and Dan Alistarh. Woodfisher: Efficient second-order approximation for neural
network compression. In Advances in Neural Information Processing Systems, pp. 18098–18109,
2020.
Hidenori Tanaka, Daniel Kunin, Daniel L Yamins, and Surya Ganguli. Pruning neural networks
In Advances in Neural Information
without any data by iteratively conserving synaptic flow.
Processing Systems, pp. 6377–6389, 2020.
Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical
Society: Series B (Methodological), 58(1):267–288, 1996.
Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by
preserving gradient flow. In International Conference on Learning Representations, 2020.
Xiaodong Wang, Xianxian Zeng, Yun Zhang, Dong Li, and Weijun Yang. Learning soft threshold
for sparse reparameterization using gradual projection operators. Neurocomputing, 488:381–390,
2022.
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in
deep neural networks. In Advances in Neural Information Processing Systems, pp. 2082–2090,
2016.
Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the
IEEE, 78(10):1550–1560, 1990.
Stephen J. Wright, Robert D. Nowak, and M ́Ario A. T. Figueiredo. Sparse reconstruction by sepa-
rable approximation. IEEE Transactions on Signal Processing, 57(7):2479–2493, 2009.
Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. Spatio-temporal backpropagation for
training high-performance spiking neural networks. Frontiers in Neuroscience, 12:331, 2018.
Lin Xiao and Tong Zhang. A proximal-gradient homotopy method for the l1-regularized least-
In Proceedings of the 29th International Conference on Machine Learning
squares problem.
(ICML-12), pp. 839–846, 2012.
Lin Xiao and Tong Zhang. A proximal-gradient homotopy method for the sparse least-squares
problem. SIAM Journal on Optimization, 23(2):1062–1091, 2013.
Zeke Xie, Issei Sato, and Masashi Sugiyama. A diffusion theory for deep learning dynamics:
In International Conference on
Stochastic gradient descent exponentially favors flat minima.
Learning Representations, 2021.
Hang Yin, John Boaz Lee, Xiangnan Kong, Thomas Hartvigsen, and Sihong Xie. Energy-efficient
models for high-dimensional spike train classification using sparse spiking neural networks. In
Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp.
2017–2025, 2021.
Haoran You, Chaojian Li, Pengfei Xu, Yonggan Fu, Yue Wang, Xiaohan Chen, Richard G. Baraniuk,
Zhangyang Wang, and Yingyan Lin. Drawing early-bird tickets: Toward more efficient training
of deep networks. In International Conference on Learning Representations, 2020.
Dejiao Zhang, Haozhu Wang, Mario Figueiredo, and Laura Balzano. Learning to share: Simultane-
ous parameter tying and sparsification in deep learning. In International Conference on Learning
Representations, 2018.
Yuxin Zhang, Mingbao Lin, Mengzhao Chen, Zihan Xu, Fei Chao, Yunhan Shen, Ke Li, Yongjian
Wu, and Rongrong Ji. Optimizing gradient-driven criteria in network sparsity: Gradient is all you
need. arXiv preprint arXiv:2201.12826, 2022.
Xiao Zhou, Weizhong Zhang, Hang Xu, and Tong Zhang. Effective sparsification of neural networks
with global sparsity constraint. In Proceedings of the IEEE/CVF Conference on Computer Vision
and Pattern Recognition (CVPR), pp. 3599–3608, 2021.
14
Published as a conference paper at ICLR 2023
Michael Zhu and Suyog Gupta. To prune, or not to prune: exploring the efficacy of pruning for
model compression. arXiv preprint arXiv:1710.01878, 2017.
Tao Zhuang, Zhixuan Zhang, Yuheng Huang, Xiaoyi Zeng, Kai Shuang, and Xiang Li. Neuron-level
structured pruning using polarization regularizer. In Advances in Neural Information Processing
Systems, pp. 9865–9877, 2020.
A PROOF OF THEOREMS AND LEMMAS
For clarity, we restate the theorem or lemma in the main text again here.
Lemma 1 (Local update rule). The update rule below
θ(t+1) ← θ(t) − η(t)∇w(L(w(t))) (cid:12) ∇θ(w(θ(t), d(t)))
w(t+1) ← Sd(t+1)(θ(t+1))
imply the following update of any nonzero component w(θ, d) in actual weight w
w(t+1) = Sd(t+1)
−
d(t) (w(t) − η(t)∇w(L(w(t)))).
when |θ(t+1)| > d(t) and the sign condition sign(θ(t+1)) = sign(θ(t)) are met.
Proof. For any nonzero weight w(t) (cid:54)= 0, θ(t) = w(t) + d(t) sign(w(t)), using Eq. 17 we have
θ(t+1) = w(t) + d(t) sign(w(t)) − η(t)∇w(L(w(t)))
(17)
(18)
(19)
(20)
Let ̄w(t+1) := w(t) − η(t)∇w(L(w(t))) be the target point of vanilla SGD without regularization.
Recall Eq. 20, we have
̄w(t+1) = θ(t+1) − d(t) sign(w(t))
= sign(θ(t+1))|θ(t+1)| − sign(θ(t))d(t)
= sign(θ(t+1))|θ(t+1)| − sign(θ(t+1))d(t)
= sign(θ(t+1))(|θ(t+1)| − d(t)),
(21)
which has the same sign as θ(t+1). Now we have sign(w(t+1)) = sign(θ(t+1)) = sign(θ(t)) =
sign(w(t)) = sign( ̄w(t+1)).
To evaluate the updated weight, by Eq. 18, Eq. 20, Eq. 21 and the definition of soft threshold map-
ping, we derive
w(t+1) = sign(θ(t+1)) max{|w(t) + d(t) sign(w(t)) − η(t)∇w(L(w(t)))| − d(t+1), 0}
= sign(θ(t+1)) max{| ̄w(t+1) + d(t) sign( ̄w(t+1))| − d(t+1), 0}
= sign(θ(t+1)) max{| sign( ̄w(t+1))(| ̄w(t+1)| + d(t))| − d(t+1), 0}
= sign(θ(t+1)) max{| ̄w(t+1)| + d(t) − d(t+1), 0}
= sign( ̄w(t+1)) max{| ̄w(t+1)| − (d(t+1) − d(t)), 0}
d(t) (w(t) − η(t)∇w(L(w(t)))).
= Sd(t+1)
−
(22)
B ORIGINAL THRESHOLD SCHEDULER IN STDS
In STDS, the authors propose the Sine scheduler d(t) = 1
T ))D.
With the form of simplified threshold scheduler in Eq. 13, by Theorem 1, the corresponding penalty
2 (1+sin(π( t
2 (1−cos( tπ
2 )))D = 1
T − 1
15
Published as a conference paper at ICLR 2023
μ(t) has the form
μ(t) =
T ) − cos( (t+1)π
T
ηmax(1 + cos tπ
T )
T + π
sin( tπ
2T )
1 + cos tπ
T
*
d(t+1) − d(t)
η(t)
cos( tπ
= D *
=
2D sin π
T
ηmax
≈ C *
= C * tan(
sin( tπ
T )
1 + cos tπ
T
tπ
2T
)
)
(23)
It is a function of training progress t/T with constant C.
Investigate the function tan(x/2) on
interval (0, π), we have μ(x) is increasing from 0 to +∞, which implies μ can be sufficiently large
during training. The loss is thus insignificant compared to the regularization term in the last stage of
training and leads to performance degradation with respect to S-LATS.
C DISCUSSION ABOUT TRAINING THRESHOLD
In the main text, we propose a framework explaining the style of growth in threshold as an ever-
changing optimization problem. However, we only cover manually designed threshold schedulers.
We make a discussion here and show training threshold is not as easy as STR or GPO did. We will
show GPO and STR share the same discussion of training threshold since GPO will degenerate to
STR in a few training epochs. Moreover, we suggest not simply setting threshold trainable if one
really wants to investigate optimization of threshold.
C.1 L2 PENALTY DOMINATES EARLY TRAINING OF STR.
In the official codebase of STR, we notice the trainable sparse threshold is also together with weight
decay (L2 regularization λ(cid:107)s(cid:107)2
4. The initial value sinit is
usually set to negative number with large magnitude around −104 ∼ −103 for CNN trials. It is easy
to see the magnitude of L2 regularized term is around 0.01 ∼ 1 in the early stage of training.
2). λ is of magnitude around 10−
5 ∼ 10−
Take CNN for instance. For given loss function L and weight wl of the l-th layer, the gradient
passed to threshold sl can be estimated as
(cid:42)
∇sl L(wl(sl, θl)) =
∇wlL(wl),
(cid:43)
(cid:19)(cid:62)
(cid:18) ∂wl
∂sl
(cid:88)
=
∇wL(wl) * ∇sl (Sσ(sl)(θ))
(w,θ)
∈
(wl,θl)
= −σ(sl)(1 − σ(sl))
(cid:88)
∇wL(wl) * sign(θ)
(24)
(w,θ)
(wl,θl)
=0
∈
w
wherein each term of sum has magnitude less than 1
4 ∇wL(wl) since sigmoid function σ(x) is
bounded in (0, 1). Given that the stochastic gradient noise across parameters in wl admits to L ́evy
distribution (Xie et al., 2021), some negative and positive terms will balance each other, which makes
us wonder whether the regularization term dominates the training of threshold. Therefore, we com-
pare the gradient to L2 penalty by tracing the magnitude ratio of ∇sl L to λ|sl| during training of
ResNet-50 on ImageNet, which is shown in Fig. 4.
It is evident that the L2 penalty plays the leading role in the early stage rather than the gradient. We
even observe for several final layers, the penalty always dominates the training of threshold. The
update of s can thereby be rewritten to s(t+1) ≈ s(t)(1 − η(t)λ), where η(t) is the learning rate at the
16
(cid:54)
Published as a conference paper at ICLR 2023
Figure 4: Magnitude ratios of gradient to L2-regularization
using STR at 90.23% overall sparsity. Data within an epoch are averaged using geometric mean.
(cid:12)
(cid:12)
(cid:12) ∇sl L
λsl
(cid:12)
(cid:12)
(cid:12) in different layers when training
t-th iteration. Regardless of gradient, at the beginning of training, STR can be viewed as a special
case of threshold scheduler as follows
(cid:32)
d(t) = σ
sinit *
1
t
(cid:89)
−
i=0
(cid:33)
(1 − η(i)λ)
, t = 1, 2, . . .
(25)
By Theorem 1, the corresponding penalty can be derived by
μ(t) =
d(t+1) − d(t)
η(t)
=
=
σ(s(t+1)) − σ(s(t))
η(t)
σ(cid:48)( ̄s)(s(t+1) − s(t))
η(t)
σ(cid:48)( ̄s)s(t)η(t)λ
η(t)
= −σ(cid:48)( ̄s)s(t)λ
= −
(26)
where ̄s lies between s(t+1) and s(t). The existence of ̄s is shown by Lagrange's Mean Value
Theorem. It is rather difficult to analytically give the explicit expression of μ(t) since it relies on the
behavior of s, which has a dynamic decay rate 1 − η(t)λ.
Loosely speaking, we adopt the approximation ̄s ≈ s(t). We still cannot show the explicit form of
μ(t), but now we can investigate the trend of penalty by analyzing function μ(x) = −σ(cid:48)(x)x, which
x(x + 1) − x + 1 = 0.
is increasing in (−∞, γ). Here γ ≈ −1.5434 is the unique negative root of e−
In the early stage, s is a negative number with a much larger magnitude than γ. Based on the above,
μ is increasing in the early stage.
C.2 GPO: FALL BACK TO STR SHORTLY
It concludes STR is majorly influenced by L2 decay on s. We will see that GPO has a similar
behavior on k and GPO will degenerate to STR shortly after the training begins.
In GPO, the authors introduces another trainable parameter β in the reparameterization w = (1 −
6|β|. GPO starts from the identity mapping w = θ by initializing
k)Sd(θ) + kθ with k = 10−
17
020406080100Epoch0510|∇s(L)λs|conv1(layer1)020406080100Epoch0246layer1.2.conv2(layer10)020406080100Epoch024layer2.2.conv3(layer21)020406080100Epoch0123|∇s(L)λs|layer3.2.conv1(layer32)020406080100Epoch0.00.51.0layer4.2.conv2(layer52)020406080100Epoch0.00.51.0fc(layer54)Published as a conference paper at ICLR 2023
β = 106. The gradient passed to βl in the l-th layer is given by
(cid:43)
(cid:42)
∇βl L(wl(sl, βl, θl)) =
∇wl L(wl),
(cid:19)(cid:62)
(cid:18) ∂wl
∂βl
= 10−
6 sign(βl) *
(cid:88)
∇wL(wl) * (θ − Sd(θ))
(w,θ)
∈
(wl,θl)
(27)
Notice that θ − Sd(θ) =
(cid:26)θ,
d sign(θ),
|θ| < d
|θ| ≥ d
has magnitude not greater than d, which derives that
the gradient ∇wL(wl) are added with coefficient whose magnitude is below 10−
6d.
4. Since the initial β is 106, the
From the codebase of GPO, we confirm the weight decay on β is 10−
4 × 106 = 100 at the beginning of training. Recall
L2 regularized term is of magnitude around 10−
that d = σ(s) < 1, it is obvious that the gradient pass to β has a much smaller magnitude than the
L2 regularization. For this reason, the gradient can be ignored for k. Furthermore, k will shrink
exponentially to almost zero and the mapping in GPO will fall back to STR within a few epochs,
which can be seen by w = (1 − k)Sd(θ) + kθ ≈ Sd(θ).
C.3 FOCUS ON THRESHOLD SCHEDULER INSTEAD OF THE FINAL THRESHOLD.
Conventional wisdom suggests that when a parameter is set trainable, it will be optimized automat-
ically. This idea should only work for those directly determining the performance, e.g., weights in a
dense network. For pruning, authors of STDS find the differences in positions of performance versus
sparsity curve should be ascribed to the evolving patterns of the threshold. To verify this, we replace
the threshold training mechanism in STR and default scheduler in STDS by several schedulers with
the same final threshold D = 10−
3 (D = 0.5 for STDS) shown below
• Sine: d(t) = 1
2 (1 + sin(π( t
T − 1
2 )))D
• Linear: d(t) = t
T D
• Log2: d(t) = log2( t
T + 1)D
We conduct the training on ANN ResNet-50 for both methods, the results are shown in Tab. 5. It is
Table 5: Comparison of threshold schedulers when applied to ResNet-50 on ImageNet.
Scheduler
STR (D = 10−
Sparsity (%) Top-1 Acc. (%)
3)
STDS (D = 0.5)
Sparsity (%) Top-1 Acc. (%)
Sine
Linear
Log2
94.14
95.41
95.95
71.51
69.85
68.55
95.72
98.46
98.05
72.42
59.79
64.74
obvious that even though the final thresholds are set equally, the accuracy and overall sparsity vary
with the scheduler. In fact, simply setting threshold trainable indicates one only cares about whether
the final threshold is optimal, which turns out to be a tangential issue in soft threshold pruning.
The above results suggest the correct manner to manipulate threshold is pursuing a well-performed
scheduler. Even if one studies the learning of threshold, it should be concentrated on the optimiza-
tion of threshold scheduler, which may require tools in discrete-time optimal control. Due to the
complex coupling between constantly changing threshold and final performance, discussion based
on discrete-time optimal control is beyond the scope of this work.
D DETAILED DERIVATION FOR LATS AND S-LATS
In this part, we provide detailed derivations for LATS and S-LATS, which covers Eq. 12 and Eq. 13.
18
Published as a conference paper at ICLR 2023
D.1 LATS FOR COSINE ANNEALING SCHEDULER
In most of the deep learning applications, the training process includes the schedule of the learning
rate, which is also known as learning rate scheduler. Generally, the learning rate is updated at
the end of an epoch. Assuming there are N training epochs in total, each of which includes B
training mini-batches. The learning rate scheduler is defined as η(n,b) = h(n/N ), which evaluates
the learning rate at the b-th mini-batch in the n-th epoch. Here n = 0, 1, . . . , N − 1 denotes the
current id of the training epoch, and b = 1, 2, . . . , B denotes the batch id in n-th epoch. We denote
h : [0, 1] → R+ as the scheduler function for the learning rate. For cosine annealing scheduler with
ηmin = 0, we have
h(x) =
(1 + cos(πx))
(28)
ηmax
2
In Corollary 1, the threshold scheduler for LATS is obtained by d(t) = d(0) + μ (cid:80)t
i=0 η(i), where
d(t) is the threshold after t mini-batches from the beginning. Under the learning rate scheduler
described in Eq. 28, the threshold d(n,b) is shown by accumulating all previous learning rates, which
gives
−
1
d(n,b) = d(0,0) + μ
b * h(n/N ) + B
(cid:34)
(cid:35)
h(i/N )
1
n
(cid:88)
−
i=0
For cosine annealing learning rate scheduler, we have
d(n,b) = d(0,0) +
= d(0,0) +
(cid:34)
(cid:34)
μηmax
2
μηmax
2
b(1 + cos
b(1 + cos
nπ
N
nπ
N
) + B
1
n
(cid:88)
−
i=0
(1 + cos
(cid:35)
)
iπ
N
) + Bn + B
1
n
(cid:88)
−
i=0
cos
(cid:35)
iπ
N
To evaluate the sum of cos(iπ/N ), we give the following results
1
n
(cid:88)
−
(cid:18)
cos
iπ
N
sin
(cid:19)
π
2N
(cid:18)
sin
(cid:18) i
N
+
1
2N
(cid:19)
π − sin
(cid:18) i
N
−
1
2N
(cid:19)
(cid:19)
π
i=0
(cid:32) n
(cid:88)
1
(cid:88)
−
sin
(cid:18) 2i + 1
2N
(cid:19)
π
−
1
n
(cid:88)
−
sin
sin
(cid:18) 2i − 1
2N
(cid:19)
π
−
(cid:18) 2n − 1
2N
(cid:19)
π
+ sin
i=0
1
n
(cid:88)
−
i=0
π
2N
sin
(cid:19)
(cid:19)(cid:33)
(cid:18) 2i − 1
2N
π
(cid:19)(cid:33)
(cid:18) 2i − 1
2N
π
1
n
(cid:88)
−
i=0
cos
iπ
N
=
=
=
=
=
=
i=0
1
n
(cid:88)
−
1
2
(cid:32)n
i=0
1
sin π
2N
1
sin π
2N
1
2 sin π
2N
1
2 sin π
2N
i=1
sin
(cid:18)
1
2 sin π
2N
sin (cid:0) 2n
1
2
+
1
2N π(cid:1)
−
2 sin π
2N
.
(29)
(30)
(31)
Recall Eq. 30, we have
d(n,b) = d(0,0) +
(cid:34)
b(1 + cos
μηmax
2
= d(0,0) + μηmax
(cid:34)
b
2
(1 + cos
) + Bn + B
(cid:32)
1
2
+
(cid:32)
2n + 1 +
) +
B
4
nπ
N
nπ
N
When d(0,0) = 0, this gives LATS in the form of Eq. 12.
19
(cid:33)(cid:35)
sin (cid:0) 2n
1
2N π(cid:1)
−
2 sin π
2N
1
2N π(cid:1)
sin (cid:0) 2n
−
sin π
2N
(32)
(cid:33)(cid:35)
.
Published as a conference paper at ICLR 2023
D.2 THE DETAILED MOTIVATION OF S-LATS
The implementation of LATS is rather complicated and requires meticulous coding. Worse still, for
some learning rate schedulers, e.g., polynomial decay scheduler (Liu et al., 2015; Chen et al., 2018)
η(t) = ηmax
(cid:18)
1 −
(cid:19)κ
,
t
T
(33)
where κ > 0 is a constant (κ = 0.9 in aforementioned studies), the form of LATS cannot be reduced
like cosine annealing scheduler in most cases. To see this, we write the corresponding LATS as
d(t) = d(0) + μηmax
1
t
(cid:88)
−
(cid:18)
1 −
i=0
(cid:19)κ
.
i
T
(34)
Note that 1 − i
T makes up an arithmetic progression, and the threshold is the sum of their powers.
Simplifying the sums of powers of arithmetic progression requires the so-called Bernoulli number
(Jacobi, 1834; Knuth, 1993) when κ is integer. For a general κ > 0, the expression of Eq. 34 includes
the generalized harmonic numbers H (
k=1 kp, which is further based on the Hurwitz zeta
−
n
function (Coffey, 2008). In such case, we cannot analytically compute LATS, which forces us to do
the summation in Eq. 34. It thus brings about the accumulative error. In brief, we cannot expect
each learning rate scheduler corresponds to an analytical and simple form of LATS.
:= (cid:80)n
p)
To handle this, we turn to an approximation rather than precisely evaluating d(t). Returning to
Eq. 29, with d(0,0) ignored, we split the right hand side into two terms B (cid:80)n
i=0 h(i/N ) and b *
−
h(n/N ).
1
The first
term could be viewed as left Riemann sum in two steps 1) interpolate points
0, 1/N, 2/N, . . . , (n − 1)/N, n/N with constant spacing 1/N , the width of the rectangles 2) eval-
uate the sum of rectangle areas with height h(i/N ). It leads to the approximation of the Riemann
integral
B
1
n
(cid:88)
−
i=0
h(i/N ) = BN
1
n
(cid:88)
−
i=0
1
N
h(i/N ) ≈ BN
(cid:90) n/N
0
h(x)dx.
(35)
The second term match b/B part of a residual tiny rectangle
b * h(n/N ) = BN *
b
B
*
1
N
h(n/N )
(36)
integral
To sum up, Eq. 35 and Eq. 36 together make a numerical approximation of
BN (cid:82) n/N +b/BN
h(x)dx, which is shown schematically in Fig. 5. Note that we could write training
progress as t/T now, where t = Bn + b is the current iteration id and T = BN is the total training
iterations.
0
So far, we successfully replace the summation with integration. However, the current final threshold
is BN (cid:82) 1
1,B). To keep the final threshold d(T ) =
d(N
0 h(x)dx, which is different from the real one d(N
1,B), we normalize the integral as follows
−
−
d(t) = d(N
1,B) *
−
(cid:82) t
0 h(x)dx
T
(cid:82) 1
0 h(x)dx
.
(37)
For most learning rate scheduler functions, integration is much easier than summation. S-LATS
enables us to apply our pruning method on wider varieties of deep learning applications.
E PRUNING EXPERIMENTS ON MOBILENET-V1 USING S-LATS
Besides the ResNet-like structures mentioned in the main text, we also conduct experiments on
MobileNet-V1 (Howard et al., 2017) to show the power of our proposed methods S-LATS on the
lightweight network. To make a fair comparison, we choose those SOTA studies using the standard
20
Published as a conference paper at ICLR 2023
Figure 5: Explanation on numerical approximation of integral (cid:82) n/N +b/BN
h(x)dx. Cosine anneal-
ing learning rate scheduler is exemplified in a darker blue curve. The area of n cyan rectangles
corresponds to Eq. 35. The area of the tiny yellow rectangle is Eq. 36.
0
training setting, i.e., batch size of 256 and 100 training epochs. They include STR (Kusupati et al.,
2020), gradual pruning in WoodFisher (Singh & Alistarh, 2020), and a modern implementation
(Gale et al., 2019) of Gradual Magnitude Pruning (GMP) (Zhu & Gupta, 2017). Note that we do not
compare S-LATS to OptG, since OptG adopts 1.8× (180) training epochs, or the comparison would
be unfair.
The results are shown in Tab. 6. Apparently, our proposed method towers over previous sparsify-
during-training work. We elaborate on the sparsity budgets and the corresponding final thresholds
in Tab. 12 of Appendix I. The hyperparameters for training MobileNet-V1 are stated in Tab. 8 of
Appendix H.
Table 6: Performance comparison of MobileNet-V1 on ImageNet using standard training setting
(256 batch size, 100 epochs). The results of GMP are gleaned from the manuscripts of STR and
OptG. The accuracy of our method is averaged over three trials.
Method
Top-1 Acc. (%)
Sparsity (%)
Dense
GMP
STR
STR
WoodFisher
S-LATS
GMP
STR
STR
STR
WoodFisher
S-LATS
S-LATS
S-LATS
71.95
67.70
68.35
66.52
70.09
68.25±0.19
61.80
64.83
62.10
61.51
63.87
66.73±0.08
65.63±0.20
64.93±0.21
21
0
74.11
75.28
79.07
75.28
81.84
89.03
85.80
89.01
89.62
89.00
85.87
88.22
89.08
01N2N******n−1NnNn+1NnN+bBNTrainingProgress0.00.20.40.60.81.0LearningRateSchedulerh(*)Published as a conference paper at ICLR 2023
F ABLATION STUDY OF THRESHOLD SCHEDULER ON RESNET-50
F.1 REMOVE L2 DECAY FOR FAIR COMPARISON
To evaluate the performance gains brought by the threshold scheduler alone, the weight decay or L2
penalty must be removed. To explain this, recall line 4 in Algorithm 1, we know the update rule
of hidden weight θ is affected by both gradient and L2 penalty λ(cid:107)θ(cid:107)2. However, the analysis in
Lemma 1 is based on vanilla SGD without weight decay. To account for this inconsistency, let's first
investigate the influence of weight decay on the equivalent optimization problem.
In the presence of weight decay, the update rule described by Eq. 17 has an additional penalty term
as follows
θ(t+1) ← θ(t) − η(t)∇w(L(w(t))) (cid:12) ∇θ(w(θ(t), d(t))) − η(t)λθ(t)
Following derivation in Eq. 20, we have
θ(t+1) = w(t) + d(t) sign(w(t)) − η(t)∇w(L(w(t))) − η(t)λθ(t)
(38)
(39)
Similarly, we denote ̄w(t+1) := w(t) − η(t)∇w(L(w(t))) to be the target point of vanilla SGD
without regularization. With Eq. 39, we have
̄w(t+1) = θ(t+1) − d(t) sign(w(t))η(t) − λθ(t)
= sign(θ(t+1))|θ(t+1)| − sign(θ(t))d(t) − λ sign(θ(t))|θ(t)|
= sign(θ(t+1))|θ(t+1)| − sign(θ(t+1))d(t) − λ sign(θ(t))|θ(t)|
= sign(θ(t+1))(|θ(t+1)| − d(t) − λ|θ(t)|),
(40)
If ̄w(t+1) still satisfies the local relation that sign(w(t+1)) = sign(θ(t+1)) = sign(θ(t)) =
sign(w(t)) = sign( ̄w(t+1)), mimicking Eq. 22, we have
w(t+1) = Sd(t+1)
θ(t)
d(t)+λ
|
(w(t) − η(t)∇w(L(w(t)))).
|
Apparently, the L2 penalty of θ lies into the equivalent L1 penalty term of w in the ISTA rule,
making the analysis of the corresponding threshold scheduler intractable. Accordingly, we decide
to remove weight decay, i.e., and set λ to zero in the ablation study to prevent an unpredictable
threshold scheduler.
−
(41)
F.2 SINE SCHEDULER IN STDS VS S-LATS
After removing weight decay, we rerun the original STDS and our methods under several sparsity
levels (through changing D) while keeping the other hyperparameters and the batch size of 256. As
illustrated in Fig. 6, the results on ResNet-50 show our method clearly surpasses the original STDS
on the ImageNet dataset. A theoretical analysis is enclosed in Appendix B.
Figure 6: Performance comparison of original STDS and our method.
22
9495969798Sparsity(%)6668707274Top-1Acc.(%)STDS+S-LATSSTDS(Sinesch.)Published as a conference paper at ICLR 2023
G SPARSITY VS FIRING RATE IN SNNS
G.1 AN OVERVIEW OF SNNS
Spiking neural networks (SNNs) are honored as the third generation of neural network models
(Maass, 1997), derived from biological neural network modeling. SNNs are composed of spik-
ing neurons, which release spikes in binary form, and connections between neurons. The model
of spiking neurons is a dynamical system described by one or more ordinary differential equations
(ODE) and a firing threshold. The dynamical system is also called "subthreshold dynamics" in the
context of computational neuroscience. A spike is generated and passed to all postsynaptic spiking
neurons when the variable representing membrane potential exceeds the firing threshold. Today, the
most commonly used neuron model is the Leaky Integrate-and-Fire (LIF) model. Specifically, LIF
has the subthreshold dynamic as follows
τm
du(t)
dt
= −(u(t) − urest) +
(cid:88)
Iw,
(42)
where u(t) is the membrane potential at time t, urest is the resting potential, τm is the membrane
constant, I and w denote input spikes and input weights respectively. The firing behavior of LIF
neurons is depicted as an instantaneous jump of membrane potential shown below
lim
→
where uth, tf are the firing threshold and firing time respectively.
u(tf + ∆t) = urest, if u(tf ) ≥ uth,
∆t
0+
(43)
The ODE in Eq.42 can be discretized via the Euler method and transformed into an RNN-like itera-
tive computing manner as follows
u[t−] = u[t − 1] +
(cid:16)
1
τm
−(u[t − 1] − urest) +
(cid:88)
i
wiIi[t]
(cid:17)
,
s[t] = H(u[t−] − uth),
u[t] = s[t]urest + (1 − s[t])u[t−].
(44)
where u[t−], u[t] are the membrane potential before and after firing at timestep t respectively, H(*)
is the Heaviside step function modeling jump behavior when a spike is triggered. However, training
techniques in RNN, such as backpropagation through time (BPTT) (Werbos, 1990) cannot be di-
rectly applied to SNNs for the spiking behavior described by Heaviside is non-differentiable. Thanks
to the surrogate gradient method proposed in Wu et al. (2018); Neftci et al. (2019), researchers can
now incorporate BPTT into training of SNNs by switching to a "differentiable mode" of the Heav-
iside step function when computing gradient. It refers to replacing Heaviside step with a differen-
tiable surrogate function. Surrogate gradient resembles the straight-through estimator (Bengio et al.,
2013) closely in both computing style and ideology.
G.2 REDUCING SNNS COST ON NEUROMORPHIC HARDWARE
SNNs are considered energy efficient when deployed on a series of dedicated hardware, also known
as neuromorphic hardware or event-driven hardware. On these chips, the computation is triggered
only when there are incoming spikes and weights are nonzero (Merolla et al., 2014). For this reason,
there are three mainstream methods for alleviating the energy cost of a given SNN on neuromorphic
chips including 1) unstructured pruning of weights, 2) reducing the number of spikes, and 3) search-
ing for efficient SNN structures. The NAS studies on SNNs (Na et al., 2022; Kim et al., 2022a) are
not based on existing SNN structure, so we omit the discussion of NAS methods.
Many recent studies have made ample signs of progress on pruning and reducing spike counts. They
confirm there is a weak correlation between the number of spikes and weight sparsity (Deng et al.,
2021; Chen et al., 2022; Kim et al., 2022b). We also evaluate the spike counts of pruned SNNs.
Compared to the number of spikes, a more frequently used metric is average firing rate, which is
obtained by averaging the number of spikes across timesteps and spiking neurons. We collect the
average firing rate of each trial during inference using pruned SEW ResNet-18. We further provide
a plot of the average firing rate against the sparsity, which is shown in Fig. 7. The weak relationship
between the number of spikes and weight sparsity is manifested in the slightly decreased average
23
Published as a conference paper at ICLR 2023
Figure 7: The trend of average firing rate against sparsity.
firing rate. Despite a downward trend in the average firing rate, the relative magnitude of the decline
is trifling. It is consistent with previous observations and suggests pruning is an inefficient means of
reducing the number of spikes in SNNs.
In conclusion, pruning is an efficient way to induce weight sparsity and lower cost. However, we
should not expect the suppression of firing rates as a bonus.
H TRAINING HYPERPARAMETERS
We make the detailed setting in our experiments clear in Tab. 7, Tab. 8 and Tab. 9.
Table 7: ANN ResNet-50 hyperparameters.
Description
Notation
Value
# Epoch
Optimizer
Overall batch size
Max. learning rate
Learning rate scheduler
Warmup epochs
Label smoothing
Weight decay
Prune BN layers?
Prune first and last layers?
-
-
-
ηmax
-
-
-
λ
-
-
100
Momentum SGD (momentum = 0.875)
256
0.256
1024
0.512
Cosine annealing
5
0.1
3.05e-5 (0 for ablation study in Appendix F)
No
Yes
Description
Table 8: ANN MobileNet-V1 hyperparameters.
Value
Notation
# Epoch
Optimizer
Overall batch size
Max. learning rate
Learning rate scheduler
Warmup epochs
Label smoothing
Weight decay
Prune BN layers?
Prune first and last layers?
-
-
-
ηmax
-
-
-
λ
-
-
100
Momentum SGD (momentum = 0.875)
256
0.256
Cosine annealing
5
0.1
3.05e-5
No
Yes
24
020406080Sparsity(%)0.12750.13000.13250.13500.13750.1400Avg.FiringRatePublished as a conference paper at ICLR 2023
Description
Table 9: SNN SEW ResNet-18 hyperparameters.
Value
Notation
# Epoch
Optimizer
Overall batch size
Max. learning rate
Learning rate scheduler
Weight decay
Prune BN layers?
Prune first and last layers?
Simulation timesteps
SEW function
-
-
-
ηmax
-
λ
-
-
-
-
320
Momentum SGD (momentum = 0.9)
256
0.1
Cosine annealing
0
No
Yes
4
ADD
I SPARSITY BUDGETS
Table 10: Sparsity budgets of ResNet-50 using STDS + S-LATS on ImageNet (256 batch size).
Final threshold D
6.0
0.7
0.45
1.5
0.2
0.8
0.1
0.4
0.5
0.6
1.4
2.0
1.0
3.0
3.5
4.0
5.0
0.3
Top-1 Acc. (%)
76.75
75.52
74.50
73.75
73.18
73.03
72.04
71.47
70.81
69.64
67.47
67.02
64.20
60.35
58.88
56.79
53.64
50.41
Layer(s)
Overall
conv1
layer1.0.conv1
layer1.0.conv2
layer1.0.conv3
layer1.0.downsample.0
layer1.1.conv1
layer1.1.conv2
layer1.1.conv3
layer1.2.conv1
layer1.2.conv2
layer1.2.conv3
layer2.0.conv1
layer2.0.conv2
layer2.0.conv3
layer2.0.downsample.0
layer2.1.conv1
layer2.1.conv2
layer2.1.conv3
layer2.2.conv1
layer2.2.conv2
layer2.2.conv3
layer2.3.conv1
layer2.3.conv2
layer2.3.conv3
layer3.0.conv1
layer3.0.conv2
layer3.0.conv3
layer3.0.downsample.0
layer3.1.conv1
layer3.1.conv2
layer3.1.conv3
layer3.2.conv1
layer3.2.conv2
layer3.2.conv3
layer3.3.conv1
layer3.3.conv2
layer3.3.conv3
layer3.4.conv1
layer3.4.conv2
layer3.4.conv3
layer3.5.conv1
layer3.5.conv2
layer3.5.conv3
layer4.0.conv1
layer4.0.conv2
layer4.0.conv3
layer4.0.downsample.0
layer4.1.conv1
layer4.1.conv2
layer4.1.conv3
layer4.2.conv1
layer4.2.conv2
layer4.2.conv3
fc
79.95
89.57
92.99
94.60
95.12
95.53
96.13
96.58
96.94
97.43
98.01
98.11
98.48
98.89
99.02
99.13
99.28
99.39
Sparsity (%)
75.54
79.30
93.06
93.19
89.11
93.46
96.02
95.00
91.03
91.91
92.73
90.64
94.89
93.37
96.44
96.73
97.76
95.03
94.86
95.26
93.28
93.46
94.36
95.23
88.81
97.56
92.46
98.13
97.95
98.32
96.12
97.13
97.53
95.49
96.48
97.88
96.35
96.16
97.87
96.44
94.92
97.56
95.16
91.14
98.66
93.73
97.63
97.47
98.14
95.88
96.63
98.36
92.61
98.79
74.31
82.25
94.96
95.28
90.31
93.51
95.62
94.74
92.55
93.02
94.42
91.19
95.74
94.38
97.40
97.95
98.31
96.08
95.85
96.32
95.32
94.34
94.89
95.33
90.43
97.94
93.73
98.53
98.37
98.52
96.75
97.58
97.93
96.24
97.20
98.34
97.10
96.44
98.14
97.00
95.73
98.09
95.98
92.09
98.82
94.63
97.92
98.00
98.52
96.63
97.23
98.56
93.82
99.04
78.36
84.69
95.97
95.83
91.83
94.32
95.72
95.12
94.18
94.81
96.64
93.37
97.05
96.03
97.88
98.25
98.68
96.79
96.09
96.25
96.33
95.50
97.02
96.74
91.82
98.33
94.97
98.83
98.67
98.92
97.53
98.36
98.62
97.61
98.17
98.75
98.08
97.39
98.61
97.93
96.69
98.60
96.99
93.65
99.05
95.87
98.33
98.60
98.95
97.40
97.82
98.77
95.04
99.25
78.71
83.84
95.87
95.84
92.61
94.32
95.36
95.20
95.09
94.34
95.80
92.78
97.01
96.03
98.07
98.61
99.02
97.37
96.88
97.47
96.91
96.47
96.67
97.07
92.57
98.33
95.40
98.96
98.82
98.99
97.82
98.28
98.69
97.65
98.13
98.97
98.33
97.55
98.71
98.10
97.02
98.59
97.31
93.85
99.05
96.01
98.41
98.59
98.96
97.48
97.94
98.82
95.41
99.27
81.92
88.06
97.08
97.19
93.19
96.12
97.18
97.07
96.27
96.93
97.64
95.23
97.50
96.76
98.25
98.89
99.14
98.29
97.54
97.96
97.50
96.95
97.29
97.90
93.79
98.68
96.23
99.24
99.16
99.31
98.46
98.65
98.92
98.28
98.67
99.12
98.66
98.16
99.11
98.52
97.61
99.00
98.06
94.79
99.17
96.73
98.70
98.86
99.18
97.79
98.35
99.01
96.41
99.40
83.94
91.33
98.22
98.13
94.56
97.20
97.96
98.32
97.03
97.15
98.26
96.01
98.04
97.78
98.86
99.04
99.44
98.66
98.33
98.61
98.33
97.47
97.94
98.27
95.04
98.87
97.28
99.39
99.38
99.51
99.03
99.08
99.22
98.83
98.84
99.40
99.06
98.85
99.42
99.14
98.39
99.33
98.69
95.83
99.36
97.61
99.00
99.23
99.46
98.47
98.84
99.23
97.57
99.49
85.58
89.72
97.96
98.12
95.14
96.99
98.02
98.66
97.97
98.01
99.04
97.02
98.27
98.00
99.03
99.21
99.46
99.04
98.46
98.36
98.39
97.94
98.25
98.73
95.56
99.04
97.50
99.44
99.41
99.51
98.98
99.32
99.42
99.14
99.03
99.49
99.26
98.84
99.53
99.23
98.88
99.53
99.14
96.25
99.38
97.78
99.13
99.35
99.55
98.59
98.93
99.29
97.79
99.54
86.20
91.77
98.44
98.55
95.73
98.46
99.20
98.96
97.82
97.94
98.71
97.26
98.28
97.85
99.08
99.42
99.61
99.28
98.97
98.88
98.82
98.46
98.73
99.03
96.42
99.12
97.95
99.56
99.55
99.66
99.29
99.27
99.40
99.10
99.09
99.55
99.36
99.19
99.63
99.43
98.86
99.50
99.21
96.68
99.44
98.02
99.20
99.42
99.57
98.64
99.03
99.38
98.08
99.56
88.01
93.53
98.51
98.49
96.19
98.84
99.64
99.72
98.78
98.56
99.18
97.98
98.61
98.12
99.16
99.27
99.56
99.04
98.85
99.18
99.04
98.45
98.92
99.11
96.69
99.25
98.20
99.60
99.56
99.67
99.38
99.55
99.62
99.44
99.32
99.62
99.43
99.38
99.73
99.62
99.13
99.61
99.23
97.19
99.53
98.38
99.33
99.56
99.69
98.88
99.21
99.49
98.51
99.57
89.47
94.26
99.00
99.16
96.62
99.05
99.41
99.58
98.91
99.25
99.33
98.43
99.16
98.72
99.31
99.56
99.76
99.48
99.08
99.19
99.12
98.79
98.61
99.04
97.29
99.35
98.61
99.60
99.63
99.72
99.50
99.58
99.66
99.54
99.53
99.70
99.53
99.37
99.72
99.62
99.23
99.69
99.44
97.40
99.57
98.60
99.44
99.65
99.73
99.00
99.39
99.60
98.86
99.60
34.18
43.04
73.59
67.26
58.61
69.42
73.06
69.48
64.66
63.14
68.90
59.82
72.90
71.13
81.42
83.44
82.60
73.53
74.48
75.42
70.68
71.05
74.50
72.81
61.26
82.41
71.21
86.21
86.76
86.67
75.18
83.83
84.24
75.66
80.26
83.78
76.82
77.62
83.13
76.09
73.48
81.39
73.98
64.48
84.02
72.53
85.36
81.34
83.00
75.37
74.54
79.66
66.98
86.44
49.83
58.79
82.82
77.89
73.39
78.74
84.09
79.34
75.52
76.05
80.36
73.85
85.04
82.92
90.05
90.47
90.41
83.15
85.75
87.51
82.69
83.26
83.83
85.69
74.70
91.42
82.18
93.20
92.91
93.68
86.50
90.82
92.07
85.49
90.40
91.46
87.45
87.58
91.87
87.14
85.83
90.78
85.35
77.49
94.14
83.17
92.49
90.10
91.75
86.50
86.22
90.89
79.13
94.47
56.73
66.58
87.36
84.59
78.28
83.92
88.31
86.22
82.27
84.24
86.72
80.93
88.93
86.98
92.85
93.48
94.05
88.32
88.91
90.66
86.23
86.70
88.23
89.03
80.18
94.51
86.32
95.39
95.17
95.71
90.08
93.96
94.68
89.88
92.47
94.33
91.13
91.12
94.67
91.38
89.67
93.61
89.23
82.89
97.01
87.02
94.97
93.30
94.76
90.65
90.56
95.74
84.53
96.69
59.57
68.82
89.43
86.93
82.06
86.19
89.18
85.91
86.07
86.97
87.87
82.27
92.21
89.32
94.08
95.35
96.28
92.18
91.48
92.41
90.11
90.06
91.11
91.17
83.80
95.78
88.76
96.83
96.46
96.79
92.77
95.29
95.84
92.30
94.60
95.39
93.10
92.47
95.63
92.55
91.89
95.30
91.80
85.92
97.83
89.51
96.03
94.91
96.19
92.84
92.98
97.04
87.56
97.58
64.35
72.22
90.82
88.71
83.91
87.51
90.32
88.12
87.00
88.20
89.11
83.13
92.57
90.37
94.78
95.96
96.22
91.63
92.37
93.18
90.35
90.17
91.28
92.36
84.81
96.15
89.38
96.96
96.48
97.09
93.44
96.06
96.17
93.13
94.41
96.14
93.32
93.41
96.17
93.79
92.45
95.85
92.53
87.00
98.07
90.39
96.39
95.55
96.68
93.42
93.83
97.38
88.74
97.87
67.90
74.90
91.38
89.52
85.33
88.46
91.81
92.01
87.75
89.35
90.09
86.86
93.19
91.58
95.22
95.80
96.37
92.38
91.97
92.90
91.14
91.70
92.90
92.16
85.51
96.49
89.93
97.29
97.02
97.37
94.10
95.69
96.22
92.99
94.94
96.59
94.60
94.15
96.66
94.55
93.36
96.28
93.13
87.93
98.17
90.99
96.77
95.99
97.03
94.08
94.53
97.52
89.37
98.10
69.79
75.44
92.01
91.52
85.86
90.94
93.83
92.58
89.77
90.86
91.77
89.47
94.54
92.63
95.66
96.62
97.17
93.93
93.44
93.92
92.36
92.47
93.06
93.69
87.13
96.94
91.42
97.77
97.25
97.77
94.53
97.01
97.35
95.21
95.91
96.90
95.05
94.67
97.32
95.29
94.45
96.62
94.12
89.26
98.34
92.21
97.13
96.52
97.39
94.81
95.26
97.81
90.60
98.44
70.89
76.03
93.18
92.95
87.01
91.72
94.73
92.60
88.64
90.06
92.69
89.19
94.80
93.15
96.28
96.73
96.90
93.80
94.26
94.89
93.93
92.75
94.27
94.37
88.01
97.27
92.04
97.98
97.80
98.09
95.48
96.80
97.26
94.99
95.87
97.70
96.24
96.03
97.48
95.94
94.68
97.39
95.16
90.33
98.45
93.09
97.42
97.17
97.85
95.43
96.01
98.07
91.60
98.65
25
Published as a conference paper at ICLR 2023
Table 11: Sparsity budgets of ResNet-50 using STDS + S-LATS on ImageNet (1024 batch size).
Final threshold D
4.0
0.5
0.475
0.23
0.25
1.13
0.73
1.0
0.8
1.5
2.0
3.0
3.5
0.1
0.6
0.2
0.3
0.4
Top-1 Acc. (%)
76.61
76.15
75.97
75.88
75.58
74.90
74.61
74.04
73.68
72.84
72.73
71.67
70.68
69.20
67.16
63.81
61.72
60.40
Layer(s)
Overall
conv1
layer1.0.conv1
layer1.0.conv2
layer1.0.conv3
layer1.0.downsample.0
layer1.1.conv1
layer1.1.conv2
layer1.1.conv3
layer1.2.conv1
layer1.2.conv2
layer1.2.conv3
layer2.0.conv1
layer2.0.conv2
layer2.0.conv3
layer2.0.downsample.0
layer2.1.conv1
layer2.1.conv2
layer2.1.conv3
layer2.2.conv1
layer2.2.conv2
layer2.2.conv3
layer2.3.conv1
layer2.3.conv2
layer2.3.conv3
layer3.0.conv1
layer3.0.conv2
layer3.0.conv3
layer3.0.downsample.0
layer3.1.conv1
layer3.1.conv2
layer3.1.conv3
layer3.2.conv1
layer3.2.conv2
layer3.2.conv3
layer3.3.conv1
layer3.3.conv2
layer3.3.conv3
layer3.4.conv1
layer3.4.conv2
layer3.4.conv3
layer3.5.conv1
layer3.5.conv2
layer3.5.conv3
layer4.0.conv1
layer4.0.conv2
layer4.0.conv3
layer4.0.downsample.0
layer4.1.conv1
layer4.1.conv2
layer4.1.conv3
layer4.2.conv1
layer4.2.conv2
layer4.2.conv3
fc
79.00
88.81
90.15
90.92
92.34
94.19
95.01
95.25
95.93
96.53
96.78
97.30
97.54
98.00
98.38
98.79
98.93
99.04
Sparsity (%)
71.75
79.30
92.69
90.94
86.99
90.72
92.72
91.71
89.15
91.18
92.04
88.93
94.01
91.45
95.79
95.65
96.07
91.95
93.09
93.93
91.46
91.64
93.19
93.02
87.35
96.96
91.39
97.93
97.19
97.48
94.33
96.26
96.65
94.17
95.78
96.95
94.62
94.56
96.63
94.24
93.27
96.55
93.12
89.04
98.51
92.18
97.16
95.96
97.11
94.38
94.55
97.50
90.50
98.92
70.97
79.30
93.60
92.82
87.38
91.63
93.74
93.14
90.91
91.75
92.70
88.83
94.81
92.50
96.67
97.00
97.35
94.20
93.55
94.61
92.80
93.72
94.32
94.78
88.80
97.45
92.98
98.35
97.72
98.13
95.16
97.09
97.35
95.06
96.18
97.39
95.83
95.68
97.20
95.53
94.56
97.03
94.61
90.32
98.68
93.23
97.64
96.52
97.62
95.09
95.19
97.70
91.41
99.16
72.86
81.84
94.34
93.27
88.92
92.41
94.16
93.58
92.42
92.65
92.96
90.87
95.40
93.01
96.86
97.05
97.49
94.48
94.63
95.09
93.58
93.07
93.90
94.69
89.57
97.57
92.80
98.38
97.75
98.19
95.69
97.40
97.59
95.61
96.36
97.36
95.34
95.20
97.72
95.63
94.89
97.39
94.68
90.94
98.75
93.78
97.66
96.91
97.88
95.65
95.67
98.03
91.98
99.20
74.04
82.93
94.89
94.27
89.49
94.35
95.35
94.20
92.96
94.47
95.35
92.46
95.92
94.82
97.33
97.73
98.36
95.95
95.11
95.26
93.83
94.49
95.26
95.57
90.65
97.90
93.95
98.69
97.94
98.35
96.05
97.48
97.67
95.91
97.12
97.85
96.32
95.73
97.97
96.11
95.45
97.74
95.12
91.87
98.92
94.72
98.01
97.39
98.30
96.33
96.81
98.46
93.85
99.35
76.87
85.82
95.41
94.79
90.48
93.60
95.43
94.73
93.51
93.40
93.87
92.42
96.71
94.87
97.49
98.01
98.26
96.12
96.12
96.40
95.80
95.54
96.04
95.97
91.63
98.01
94.79
98.76
98.49
98.87
97.08
98.08
98.18
96.77
97.36
98.00
96.50
96.46
97.90
96.72
95.75
97.88
95.74
92.49
98.97
95.02
98.22
97.68
98.47
96.71
96.90
98.47
93.97
99.41
77.51
83.20
95.79
95.66
92.49
95.78
96.98
96.28
94.43
95.38
96.25
94.80
96.96
95.76
97.89
98.23
98.67
97.09
96.55
97.14
95.97
95.78
96.57
96.83
92.85
98.43
95.56
99.06
98.69
98.90
97.38
98.13
98.21
96.89
97.63
98.54
97.57
97.12
98.59
97.46
96.62
98.39
96.61
93.47
99.09
95.93
98.54
98.12
98.83
97.38
97.62
98.83
95.32
99.52
79.39
87.96
96.87
96.89
93.05
96.36
97.64
96.94
96.46
97.15
97.64
95.63
97.50
97.05
98.41
98.93
99.17
97.89
97.05
97.50
96.96
97.13
97.52
97.56
94.27
98.70
96.47
99.25
99.02
99.11
98.07
98.50
98.75
98.07
98.26
98.79
98.04
97.73
98.88
98.11
97.41
98.76
97.57
94.63
99.21
96.67
98.83
98.49
99.02
97.58
97.87
98.96
96.19
99.62
83.93
90.33
97.73
97.58
94.68
97.36
98.41
98.08
98.02
98.01
98.19
96.78
98.52
97.80
98.67
99.25
99.47
98.80
97.93
98.37
97.96
97.82
97.67
98.05
95.65
98.96
97.36
99.36
99.25
99.34
98.38
99.02
99.15
98.41
98.61
99.22
98.73
98.47
99.21
98.56
98.11
99.10
98.10
95.65
99.37
97.51
99.08
98.88
99.32
98.12
98.41
99.27
97.41
99.69
84.56
91.04
98.06
97.92
94.98
97.49
98.84
98.66
97.99
97.97
98.46
97.29
98.50
97.77
98.93
99.44
99.65
99.16
98.79
99.17
98.82
97.87
97.97
98.25
96.26
99.07
97.68
99.44
99.39
99.48
98.85
99.16
99.20
98.71
99.07
99.37
98.93
98.51
99.24
98.64
98.50
99.30
98.47
96.29
99.41
97.81
99.23
99.01
99.38
98.23
98.48
99.29
97.61
99.69
87.38
90.97
98.10
98.32
95.31
98.77
99.33
99.07
97.89
98.34
98.26
97.39
98.62
98.13
98.96
99.39
99.65
99.10
98.58
98.94
98.57
98.08
98.33
98.75
96.18
99.11
97.79
99.49
99.41
99.43
98.90
99.13
99.22
98.83
99.02
99.33
98.85
98.69
99.40
98.90
98.62
99.43
98.61
96.39
99.45
98.10
99.24
99.18
99.48
98.56
98.75
99.39
98.02
99.65
40.67
52.32
75.36
70.77
64.12
74.98
78.53
77.44
70.75
70.35
77.30
69.29
76.86
75.99
84.75
89.09
87.41
81.25
77.10
79.02
71.18
71.29
73.69
73.48
62.93
82.70
72.49
87.88
86.70
85.98
74.52
84.36
83.49
75.10
80.11
82.74
75.19
76.54
82.23
75.51
73.52
80.96
73.55
65.17
84.07
72.08
85.95
77.97
80.73
71.47
69.25
75.76
62.85
88.02
46.90
58.42
82.51
77.27
71.25
79.80
83.95
80.13
76.64
76.21
77.87
72.99
84.95
80.48
89.95
90.01
89.84
82.44
85.06
87.80
82.41
81.69
83.46
84.16
75.02
91.71
82.71
93.93
92.88
93.44
85.38
91.82
91.97
85.78
89.01
91.07
86.40
86.54
90.86
85.30
84.35
90.30
83.72
78.27
93.29
83.90
92.56
89.09
90.68
85.15
83.86
87.45
77.36
95.57
55.02
65.16
85.46
80.81
74.69
82.61
86.02
81.32
77.59
78.69
82.51
77.38
87.06
84.57
91.27
91.85
92.13
86.02
86.77
88.76
83.43
84.35
85.49
86.39
77.81
92.62
84.57
94.74
93.65
93.99
87.49
93.20
93.01
87.87
90.31
92.45
87.38
88.09
92.02
87.73
86.23
91.09
85.38
79.76
94.58
85.07
93.61
89.96
91.40
86.25
86.10
89.41
79.58
96.39
53.64
64.92
86.66
81.59
75.47
82.99
85.23
81.99
79.77
80.13
82.66
75.72
88.11
85.12
91.94
93.14
93.68
88.49
88.37
89.76
85.35
85.66
86.71
86.28
79.06
93.54
85.53
95.39
94.35
94.73
88.09
93.33
93.50
88.06
91.45
92.82
88.85
89.35
92.50
88.50
86.85
91.95
86.40
81.06
95.35
86.04
94.12
91.06
92.49
87.73
86.64
89.79
80.52
96.77
56.36
65.36
87.70
83.83
78.57
85.29
89.04
84.70
80.70
83.24
84.60
79.36
89.32
85.54
92.58
92.72
92.94
87.05
89.76
89.97
87.02
87.46
88.83
89.51
81.57
94.69
87.34
96.36
95.64
96.13
90.54
93.93
94.42
89.36
92.54
93.74
89.98
90.46
93.93
90.23
89.11
93.39
88.65
83.34
96.59
87.64
95.02
92.44
94.03
89.75
88.26
91.75
82.77
97.50
62.73
72.02
89.99
86.68
82.09
86.96
88.26
85.31
85.06
86.20
86.46
81.06
91.52
88.53
94.84
94.67
95.04
90.50
91.35
92.55
89.28
89.64
90.38
90.65
83.61
95.64
88.74
96.89
96.29
96.67
92.11
95.07
95.51
91.66
93.60
95.54
92.03
92.61
95.47
91.95
91.01
95.08
90.83
86.00
97.99
89.90
96.16
94.43
95.76
92.46
91.54
94.72
86.37
98.29
66.07
74.71
91.46
88.84
83.73
87.48
90.46
88.08
86.50
86.69
89.57
85.20
93.28
90.73
95.10
95.55
95.99
92.51
91.45
92.77
90.05
90.34
91.28
92.20
85.41
96.15
89.68
97.35
96.63
97.06
93.02
95.61
96.15
92.72
94.34
96.15
93.14
93.25
96.05
92.59
91.75
95.45
91.40
87.24
98.29
90.95
96.57
94.94
96.24
92.96
93.58
96.47
88.80
98.54
64.46
74.07
91.87
89.89
83.44
89.42
92.69
90.27
87.58
88.74
88.23
85.80
93.42
90.84
95.29
95.54
96.01
92.16
92.98
92.61
90.93
90.71
92.67
92.08
85.64
96.70
90.66
97.51
97.02
97.37
93.65
96.23
96.73
93.96
95.01
96.43
93.50
94.02
95.86
93.37
92.27
95.67
91.96
87.75
98.30
91.05
96.80
95.23
96.56
93.54
93.38
96.34
88.74
98.65
26
Published as a conference paper at ICLR 2023
Table 12: Sparsity budgets of MobileNet-V1 using STDS + S-LATS on ImageNet.
Final threshold D
0.4
0.6
0.8
0.9
Top-1 Acc. (%)
68.44
66.64
65.41
65.13
Layer(s)
Overall
model.0.0
model.1.0
model.1.3
model.2.0
model.2.3
model.3.0
model.3.3
model.4.0
model.4.3
model.5.0
model.5.3
model.6.0
model.6.3
model.7.0
model.7.3
model.8.0
model.8.3
model.9.0
model.9.3
model.10.0
model.10.3
model.11.0
model.11.3
model.12.0
model.12.3
model.13.0
model.13.3
fc
Sparsity (%)
81.84
85.87
88.22
89.08
51.39
46.53
60.45
11.28
52.82
23.96
53.38
2.69
62.50
20.70
68.64
15.32
79.08
24.80
81.65
35.72
81.10
40.06
79.38
33.88
75.01
26.52
71.13
10.44
80.64
43.65
82.10
92.40
62.27
62.85
76.76
21.70
61.65
25.43
59.64
5.64
68.58
26.26
74.57
20.49
84.26
29.28
86.53
40.89
85.35
42.73
84.02
40.41
80.66
28.56
77.06
13.24
84.83
46.79
85.47
95.25
57.06
54.86
67.63
18.75
61.56
26.04
64.90
8.94
72.97
29.34
78.17
20.40
87.14
34.44
89.26
48.55
88.22
46.59
87.30
42.99
83.84
31.77
80.75
14.67
87.28
48.35
87.57
96.54
55.90
56.94
68.51
18.23
68.92
31.86
67.77
5.38
75.10
31.38
79.69
25.00
87.85
37.83
90.23
48.59
89.20
50.85
87.97
45.33
85.23
31.42
82.36
16.06
88.15
49.09
88.36
96.93
27
Published as a conference paper at ICLR 2023
Table 13: Sparsity budgets of ResNet-50 using PGH scheduler in pruning at initialization setting on
ImageNet.
Final threshold D
0.1
0.11
0.13
0.15
Top-1 Acc. (%)
74.69
72.89
68.23
62.22
Layer(s)
Overall
conv1
layer1.0.conv1
layer1.0.conv2
layer1.0.conv3
layer1.0.downsample.0
layer1.1.conv1
layer1.1.conv2
layer1.1.conv3
layer1.2.conv1
layer1.2.conv2
layer1.2.conv3
layer2.0.conv1
layer2.0.conv2
layer2.0.conv3
layer2.0.downsample.0
layer2.1.conv1
layer2.1.conv2
layer2.1.conv3
layer2.2.conv1
layer2.2.conv2
layer2.2.conv3
layer2.3.conv1
layer2.3.conv2
layer2.3.conv3
layer3.0.conv1
layer3.0.conv2
layer3.0.conv3
layer3.0.downsample.0
layer3.1.conv1
layer3.1.conv2
layer3.1.conv3
layer3.2.conv1
layer3.2.conv2
layer3.2.conv3
layer3.3.conv1
layer3.3.conv2
layer3.3.conv3
layer3.4.conv1
layer3.4.conv2
layer3.4.conv3
layer3.5.conv1
layer3.5.conv2
layer3.5.conv3
layer4.0.conv1
layer4.0.conv2
layer4.0.conv3
layer4.0.downsample.0
layer4.1.conv1
layer4.1.conv2
layer4.1.conv3
layer4.2.conv1
layer4.2.conv2
layer4.2.conv3
fc
87.16
32.05
38.92
67.15
59.89
58.89
60.78
65.13
57.58
53.80
58.37
61.24
49.99
70.38
63.37
75.97
77.21
76.35
63.60
68.74
70.42
63.30
63.87
70.13
66.09
54.05
82.47
65.61
78.21
78.03
82.93
69.54
74.19
81.22
68.24
66.58
78.70
65.76
57.57
79.10
62.33
53.63
79.08
58.30
90.52
99.80
99.37
75.46
97.11
99.90
99.56
98.61
99.96
99.74
83.95
28
Sparsity (%)
90.00
93.11
95.64
33.48
38.70
67.55
60.16
61.24
63.04
64.05
55.88
55.80
59.34
62.34
49.88
69.61
61.13
74.72
75.13
74.61
60.96
66.52
69.81
60.06
59.87
68.83
62.03
54.86
89.52
82.20
71.87
78.40
92.45
87.02
72.72
89.29
82.87
63.63
88.28
80.80
59.99
88.66
80.67
58.43
88.88
80.30
100.00
100.00
100.00
79.81
100.00
100.00
100.00
100.00
100.00
100.00
82.61
34.66
37.48
66.07
57.60
64.05
61.00
60.48
49.53
51.01
55.33
60.16
45.61
72.09
59.27
70.28
66.76
73.73
58.64
56.07
69.10
54.06
44.49
67.57
49.41
76.17
99.25
98.40
54.37
79.45
98.20
96.55
89.19
99.56
99.03
88.10
99.54
99.00
75.83
98.66
97.62
78.13
99.04
98.32
100.00
100.00
100.00
86.40
100.00
100.00
100.00
100.00
100.00
100.00
81.69
34.75
33.89
59.91
49.34
60.72
53.19
54.98
42.51
43.32
51.22
48.72
42.38
86.96
82.79
59.11
59.39
86.70
81.81
49.60
87.02
83.67
43.37
86.60
82.74
100.00
100.00
100.00
53.19
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
91.34
100.00
100.00
100.00
100.00
100.00
100.00
86.05
Published as a conference paper at ICLR 2023
Table 14: Sparsity budgets of SEW ResNet-18 using STDS + S-LATS on ImageNet.
Final threshold D
0.5
1.0
2.0
3.0
5.0
7.0
10
15
20
Top-1 Acc. (%)
62.59
62.3
60.806
59.816
57.572
55.454
53.74
50.024
47.586
Layer(s)
Overall
conv1
layer1.0.conv1.0
layer1.0.conv2.0
layer1.1.conv1.0
layer1.1.conv2.0
layer2.0.conv1.0
layer2.0.conv2.0
layer2.0.downsample.0.0
layer2.1.conv1.0
layer2.1.conv2.0
layer3.0.conv1.0
layer3.0.conv2.0
layer3.0.downsample.0.0
layer3.1.conv1.0
layer3.1.conv2.0
layer4.0.conv1.0
layer4.0.conv2.0
layer4.0.downsample.0.0
layer4.1.conv1.0
layer4.1.conv2.0
fc
60.11
71.18
38.70
48.98
37.88
40.37
39.94
39.78
46.68
16.81
48.87
49.85
48.98
56.54
27.11
61.25
60.16
58.92
64.63
31.91
67.33
63.04
33.00
49.83
60.42
50.73
54.44
51.82
52.67
59.70
25.96
62.95
63.01
60.98
68.36
37.56
72.95
71.00
70.02
74.90
42.72
77.95
72.57
52.40
79.74
62.40
73.58
61.17
66.75
62.50
64.46
70.55
36.11
73.58
71.87
71.23
77.14
48.76
80.88
79.03
78.17
82.40
53.25
85.81
80.14
71.29
Sparsity (%)
83.75
66.90
76.98
66.69
72.12
67.47
68.41
74.26
41.39
77.19
77.04
75.30
81.23
54.21
83.91
82.63
82.08
85.93
58.97
89.57
84.08
79.66
88.11
73.93
82.13
71.79
77.59
73.18
74.30
79.64
47.29
81.24
81.44
80.16
86.21
61.76
87.98
86.38
86.23
89.74
65.57
93.42
88.71
86.71
89.96
79.44
86.19
76.28
80.65
77.47
77.91
83.32
54.48
84.64
84.69
83.48
88.38
66.29
89.96
88.59
88.38
91.58
69.29
95.61
91.79
89.96
92.57
80.71
87.39
79.39
84.02
80.40
81.07
85.99
59.00
87.51
87.65
85.91
91.20
70.50
91.59
90.49
90.44
93.27
72.34
96.99
94.04
92.52
94.30
85.43
90.02
82.53
86.53
84.16
83.65
88.92
63.48
89.59
90.72
88.49
93.05
75.62
93.66
92.50
92.65
95.14
75.55
97.89
95.35
94.95
95.21
86.90
91.90
84.40
87.84
85.53
85.84
90.62
67.22
91.89
91.80
90.02
94.38
79.10
94.48
93.61
93.86
95.96
77.45
98.38
96.01
96.27
Table 15: Sparsity budgets of SEW ResNet-18 using our implementation of original STDS (STDS
+ Sine scheduler) on ImageNet.
Final threshold D
0.6
0.8
1.5
3.0
5.0
Top-1 Acc. (%)
61.114
60.218
57.458
52.966
48.436
Layer(s)
Overall
conv1
layer1.0.conv1.0
layer1.0.conv2.0
layer1.1.conv1.0
layer1.1.conv2.0
layer2.0.conv1.0
layer2.0.conv2.0
layer2.0.downsample.0.0
layer2.1.conv1.0
layer2.1.conv2.0
layer3.0.conv1.0
layer3.0.conv2.0
layer3.0.downsample.0.0
layer3.1.conv1.0
layer3.1.conv2.0
layer4.0.conv1.0
layer4.0.conv2.0
layer4.0.downsample.0.0
layer4.1.conv1.0
layer4.1.conv2.0
fc
Sparsity (%)
85.91
68.15
81.65
73.62
79.27
73.35
75.50
80.13
49.60
82.47
80.92
80.11
85.20
62.14
87.89
86.32
86.30
88.43
63.96
90.74
84.09
77.07
90.62
79.49
88.07
79.45
84.19
79.39
80.44
85.38
58.87
87.28
86.52
86.17
89.69
70.68
91.36
90.13
90.59
92.07
71.63
94.64
88.96
90.62
93.19
85.71
91.37
83.24
87.55
84.28
85.06
88.55
64.78
89.96
89.55
88.89
92.33
76.31
93.57
92.28
92.95
93.92
75.94
96.62
92.32
95.18
76.06
48.07
61.37
56.20
56.73
58.62
58.34
66.05
28.70
68.32
68.65
68.04
74.94
44.28
78.62
76.93
76.41
80.60
49.57
82.60
77.17
46.12
79.91
53.99
69.80
62.73
64.55
65.86
66.05
72.17
36.28
74.54
73.85
73.05
79.00
50.82
82.50
80.73
80.41
83.84
55.31
85.81
79.68
56.43
29
|
|
http://arxiv.org/abs/2302.13007v3 | 2023-03-20T11:39:47 | 2023-02-25T06:58:16 | AugGPT: Leveraging ChatGPT for Text Data Augmentation | Text data augmentation is an effective strategy for overcoming the challenge
of limited sample sizes in many natural language processing (NLP) tasks. This
challenge is especially prominent in the few-shot learning scenario, where the
data in the target domain is generally much scarcer and of lowered quality. A
natural and widely-used strategy to mitigate such challenges is to perform data
augmentation to better capture the data invariance and increase the sample
size. However, current text data augmentation methods either can't ensure the
correct labeling of the generated data (lacking faithfulness) or can't ensure
sufficient diversity in the generated data (lacking compactness), or both.
Inspired by the recent success of large language models, especially the
development of ChatGPT, which demonstrated improved language comprehension
abilities, in this work, we propose a text data augmentation approach based on
ChatGPT (named AugGPT). AugGPT rephrases each sentence in the training samples
into multiple conceptually similar but semantically different samples. The
augmented samples can then be used in downstream model training. Experiment
results on few-shot learning text classification tasks show the superior
performance of the proposed AugGPT approach over state-of-the-art text data
augmentation methods in terms of testing accuracy and distribution of the
augmented samples. | [
"Haixing Dai",
"Zhengliang Liu",
"Wenxiong Liao",
"Xiaoke Huang",
"Yihan Cao",
"Zihao Wu",
"Lin Zhao",
"Shaochen Xu",
"Wei Liu",
"Ninghao Liu",
"Sheng Li",
"Dajiang Zhu",
"Hongmin Cai",
"Lichao Sun",
"Quanzheng Li",
"Dinggang Shen",
"Tianming Liu",
"Xiang Li"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13007v3",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13007v3",
"@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
0
2
]
L
C
.
s
c
[
3
v
7
0
0
3
1
.
2
0
3
2
:
v
i
X
r
a
1
AugGPT: Leveraging ChatGPT for Text Data
Augmentation
Haixing Dai∗, Zhengliang Liu∗, Wenxiong Liao∗, Xiaoke Huang, Yihan Cao, Zihao Wu, Lin Zhao,
Shaochen Xu, Wei Liu, Ninghao Liu, Sheng Li, Dajiang Zhu, Hongmin Cai, Lichao Sun, Quanzheng Li,
Dinggang Shen, Tianming Liu, and Xiang Li
Abstract-Text data augmentation is an effective strategy for overcoming the challenge of limited sample sizes in many natural language
processing (NLP) tasks. This challenge is especially prominent in the few-shot learning scenario, where the data in the target domain
is generally much scarcer and of lowered quality. A natural and widely-used strategy to mitigate such challenges is to perform data
augmentation to better capture the data invariance and increase the sample size. However, current text data augmentation methods
either can't ensure the correct labeling of the generated data (lacking faithfulness) or can't ensure sufficient diversity in the generated
data (lacking compactness), or both. Inspired by the recent success of large language models, especially the development of ChatGPT,
which demonstrated improved language comprehension abilities, in this work, we propose a text data augmentation approach based on
ChatGPT (named AugGPT). AugGPT rephrases each sentence in the training samples into multiple conceptually similar but semantically
different samples. The augmented samples can then be used in downstream model training. Experiment results on few-shot learning
text classification tasks show the superior performance of the proposed AugGPT approach over state-of-the-art text data augmentation
methods in terms of testing accuracy and distribution of the augmented samples.
Index Terms-Large language model, few-shot learning, natural language processing, data augmentation.
(cid:70)
1 INTRODUCTION
T HE effectiveness of natural language processing (NLP)
heavily relies on the quality and quantity of the train-
ing data. With limited training data available, which is a
common issue in practice due to privacy concerns or the
cost of annotations, it can be challenging to train an accu-
rate NLP model that generalizes well to unseen samples.
The challenge of training data insufficiency is especially
∗ These authors contributed equally to this paper.
•
• Haixing Dai, Zhengliang Liu, Zihao Wu, Lin Zhao, Shaochen Xu, Ning-
hao Liu, and Tianming Liu are with the School of Computing, University
of Georgia, Athens, GA, USA. (e-mail: {hd54134, zl18864 ,zw63397,
lin.zhao, shaochen.xu25, ninghao.liu, tliu}@uga.edu).
• Wenxiong Liao, Xiaoke Huang, Hongmin Cai
the
School of Computer Science and Engineering, South China Uni-
(e-mail: {[email protected],
versity of Technology, China.
[email protected], [email protected]).
are with
• Yihan Cao and Lichao Sun are with the Department of Computer Sci-
ence and Engineering, Lehigh University, Bethlehem, PA, USA. (e-mail:
{[email protected], [email protected]).
• Yihan Cao is also with the Heinz College of Information Systems and
Public Policy, Carnegie Mellon University, Pittsburgh, PA, USA (e-mail:
{email [email protected]).
• Wei Liu is with the Department of Radiation Oncology, Mayo Clinic,
•
Phoenix, AZ, USA. (e-mail: [email protected])
Sheng Li is with the School of Data Science, University of Virginia,
Charlottesville, VA, USA. (email: [email protected])
• Dajiang Zhu is with the Department of Computer Science and Engineer-
ing, The University of Texas at Arlington, Arlington, TX, USA. (e-mail:
[email protected])
• Quanzheng Li and Xiang Li are with the Department of Radiol-
ogy, Massachusetts General Hospital and Harvard Medical School,
[email protected], xian-
Boston, MA, USA.
[email protected])
(e-mail:
• Dinggang Shen is with the School of Biomedical Engineering, Shang-
haiTech University, Shanghai 201210, China. He is also with Shanghai
United Imaging Intelligence Co., Ltd., Shanghai 200230, China, and
Shanghai Clinical Research and Trial Center, Shanghai, 201210, China.
(e-mail: [email protected])
prominent in few-shot learning (FSL) scenarios, where the
model trained on the original (source) domain data is
expected to generalize from only a few examples in the
new (target) domain [1]. Many FSL methods have shown
promising results in overcoming this challenge in various
tasks. Existing FSL methods mainly focus on improving
the learning and generalization capability of the model via
better architectural design [2], [3], leveraging pre-trained
language models as the basis and then fine-tuning it using
limited samples [4] with meta-learning [2], [5] or prompt-
based methods [6], [7], [8], [9]. However, the performance of
these methods is still intrinsically limited by the data quality
and quantity in both the source and target domains.
Besides model development, text data augmentation can
also overcome the sample size limit and work together with
other FSL methods in NLP [10], [11]. Data augmentation
is usually model-agnostic and involves no change to the
underlying model architecture, which makes this approach
particularly practical and applicable to a wide range of
tasks. In NLP, there are several types of data augmentation
methods. Traditional text-level data augmentation methods
rely on direct operations on the existing sample base. Some
frequently used techniques include synonym replacement,
random deletion, and random insertion [12]. More recent
methods utilize language models to generate reliable sam-
ples for more effective data augmentation, including back-
translation [13] and word vector interpolation in the latent
space [14]. However, existing data augmentation methods
are limited in the accuracy and diversity of the generated
text data, and human annotation is still mandatory in many
application scenarios [12], [15], [16].
The advent of (very) large language models (LLMs) such
as the GPT family [6], [17] brings new opportunities for gen-
erating text samples that resemble human-labeled data [18],
which significantly alleviates the burden of human anno-
tators [19]. LLMs are trained in self-supervised manners,
which scale up with the amount of text corpus available in
the open domains. The large parameter space of LLMs also
allows them to store a large amount of knowledge, while
large-scale pre-training (e.g., the autoregressive objective in
training GPTs) enables LLMs to encode rich factual knowl-
edge for language generation even in very specific domains
[20]. Furthermore, the training of ChatGPT follows that
of Instruct-GPT [21], which utilizes reinforcement learning
with human feedback (RLHF), thus enabling it to produce
more informative and impartial responses to input.
Inspired by the success of language models in text
generation, we propose a new data augmentation method
named AugGPT, which leverages ChatGPT to generate aux-
iliary samples for few-shot text classification. We test the
performance of AugGPT via experiments on both general
domain and medical domain datasets. Performance compar-
ison of the proposed AugGPT approach with existing data
augmentation methods shows double-digit improvements
in sentence classification accuracy. Further investigation
into the faithfulness and compactness of the generated text
samples reveals that AugGPT can generate more diversified
augmented samples while simultaneously maintaining their
accuracy (i.e., semantic similarity to the original labels). We
envision that the development of LLMs will lead to human-
level annotation performance, thus revolutionizing the field
of few-shot learning and other tasks in NLP.
2 RELATED WORK
2.1 Data Augmentation
Data augmentation, the artificial generation of new text
through transformations, is widely used to improve model
training in text classification. In NLP, existing data aug-
mentation methods work at different granularity levels:
characters, words, sentences, and documents.
Data augmentation at the character level refers to the
randomly inserting, exchanging, replacing, or deleting of
characters in the text
[22], which improves the robustness
of the NLP model against noises. Another method called
optical character recognition (OCR) data augmentation gen-
erates new text by simulating the errors that occur when
using OCR tools to recognize text from pictures. Spelling
augmentation [23] deliberately misspells some frequently
misspelled words. Keyboard augmentation [22] simulates
random typo errors by replacing a selected key with another
key close to it on the QWERTY layout keyboard.
Data augmentation also works at the word level. Ran-
dom swap augmentation randomly exchanges two words
in the text, and random deletion augmentation randomly
deletes some words [24]. Synonym augmentation uses syn-
onym databases such as PPDB [25] to replace randomly
selected words [26]. WordNet [27] is also widely used as a
reference for synonym augmentation. These methods main-
tain semantic consistency and are suitable for text classifi-
cation tasks. Wang et al. [28] proposed a data augmentation
method based on word embeddings, replacing words with
their top-n similar words to create a new sentence. Different
2
pre-trained word embeddings are considered (e.g., Google-
News Lexical Embeddings [29]). This method is based on
the principle that words close to each other in the embed-
ding space often appear in similar contexts, which might
help with maintaining grammatical consistency.
However, a serious limitation of word embedding-based
methods is that close words in the embedding space are
not necessarily semantically similar, yet semantic changes
can affect the classification results. For example, "hot" and
"cold" usually appear in similar contexts, so their word em-
beddings are close, but they have exactly opposite seman-
tic meanings. The counter-fitting embedding augmentation
[30], [31] solves this problem by using a synonym dictio-
nary and an antonym dictionary to adjust the initial word
embeddings. Specifically, the distance between embeddings
of synonyms will be shortened, and the distance between
embeddings of antonyms will become enlarged.
Contextual augmentation [32], [33] is another word-
level data augmentation method, which uses masked lan-
guage models (MLMs) such as BERT [34], [35], DistilBERT
[36] and RoBERTA [37] to generate new text based on the
context. Specifically, they insert < mask > tokens in some
positions of the text, or replace some words in the text
with < mask > tokens, and then let the MLM predict
what words should be put in these masked positions. Since
MLMs are pre-trained on a large number of texts, contextual
augmentation can usually generate meaningful new texts.
Some text data augmentation methods work at the
sentence and document level. For example, back transla-
tion [38] uses translation models for data augmentation.
Specifically, the language model first translates the text into
another language and then translates it back to the original
language. Due to the randomness of the translation process,
the augmented text is different from the original text, but
semantic consistency is maintained. At the document level,
Gangal et al.
[39] proposed a method to paraphrase the
entire document to preserve document-level consistency.
In general, regardless of the granularity level or the text
generation backbone (i.e., rule-based or language models),
the goal of data augmentation is to produce sensible and
diverse new samples that maintain semantic consistency.
2.2 Few-shot Learning
Deep learning has achieved remarkable success in various
data-intensive applications. However, the performance of
deep models could be affected if the dataset size is small
in the downstream tasks. Few-shot Learning is a branch
of science that focuses on developing solutions to address
the challenge of small sample sizes [1], [40]. FSL research
aims to leverage prior knowledge to rapidly generalize to
new tasks that contain only a few labeled samples. A classic
application scenario for few-shot learning is when obtaining
supervised examples is difficult or not possible due to
privacy, safety, or ethical considerations. The development
of few-shot learning enables practitioners to improve the
efficiency and accuracy of text classification in various sce-
narios and deploy practical applications.
Recent advances in few-shot
learning have shown
promising results in overcoming the challenges of limited
training data for text classification. For example, a common
3
Fig. 1. The framework of AugGPT. a (top panel): First, we apply ChatGPT for data augmentation. We input samples of all classes into ChatGPT
and prompt ChatGPT to generate samples that preserves semantic consistency with existing labelled instance. b (bottom panel): In the next
step, we train a BERT-based sentence classifier on the few-shot samples and the generated data samples and evaluate the model's classification
performance.
approach in NLP is to use a pre-trained language model
such as BERT [4] as a starting point and then fine-tune it
with limited samples. Some of the most recent methodolog-
ical developments
[2], [41] approaches that have gained
traction include prompt-tuning [6], [7], [8], [9] and meta-
learning [2], [5]. In general, existing FSL methods target
either architectural design [2], [3], data augmentation [10],
[11] or the training process [42].
Despite the recent development of prompt-tuning and
meta-learning methods, they suffer from some major limi-
tations. For example, prompt engineering is a cumbersome
art that requires extensive experience and manual trial-and-
errors [43]. Meta-learning, on the other hand, suffers from
problems such as training instability [44], [45], [46] and sen-
sitivity to hyper-parameters [44], [45]. In addition, all these
FSL pipelines demand deep machine learning expertise and
acquaintance with complex model architectures and train-
ing strategies, which are not attainable by common prac-
titioners and general developers. As discussed in section
2.1, data augmentation is an effective solution for FSL and
can be combined with other FSL models. Thus, the AugGPT
method proposed in this paper, which has demonstrated the
capability to generate accurate and comprehensive training
samples, can overcome the issues of current FSL methods
and potentially change the landscape of few-shot learning
in NLP.
2.3 Very Large Language Models
model families, have revolutionized natural language pro-
cessing. Compared to previous methods, they deliver state-
of-the-art performance on a wide range of downstream tasks
and contribute to the rising popularity and democratization
of language models. In general, there are three classes of pre-
trained language models: autoregressive language models
(e.g., the decoder-based GPT), masked language models
(e.g., the encoder-based BERT), and encoder-decoder mod-
els(e.g., BART [48] and T5 [49]). These models typically
contain between 100M and 1B parameters [17].
In recent years, NLP communities have witnessed the
rise of very large language models such as GPT-3 (175B
parameters) [6], PaLM (540B parameters) [50], Bloom (176B
parameters) [51], OPT (up to 175B parameters) [52], and
the FLAN series (FLAN has 137B parameters) [53]. At their
core, these large language models are transformer models
inspired by BERT and GPT, albeit at a much larger scale.
Large language models aim to learn accurate latent fea-
ture representations of input text. These representations are
often context-dependent and domain-dependent. For exam-
ple, the vector representation of the word "treat" might be
vastly different between medical domains and the general
domain. For smaller pre-trained language models, it is often
necessary to continuously pre-train and fine-tune such mod-
els to attain acceptable performance [54]. However, very
large language models can potentially eliminate the need for
fine-tuning while maintaining competitive performance [6],
[18], [55].
Pre-trained language models (PLMs) based on the trans-
former architecture, such as the BERT [4] and GPT [47]
Existing studies indicate that pre-trained language mod-
els can help augment a dataset with new samples with
Original Text
The follow-up rate after 5 years was 85%.
This means that the maturation of calluses
was 27% faster in the LIPUS group.
Test Registration: IRCT.ir
IRCT2012071010230N1.
While behavioral and technological
interventions can lead to some modest
improvements in glycemic control,
these interventions have not performed
much better than conventional prevention
in achieving glycemic control.
TABLE 1
Generated Samples From ChatGPT on PubMed20K
4
Altered Text
1. The study showed a follow-up rate of 85% after 5 years.
2. The 5-year follow-up rate was found to be significantly high at 85%.
3. The participants had an impressive follow-up rate of 85% after 5 years.
4. The data indicated a follow-up rate of 85% 5 years post-study.
5. The 5-year follow-up rate was recorded as 85%, according to the findings.
6. The results of the study showed a follow-up rate of 85% after a 5-year period.
1. The LIPUS group showed a 27% acceleration in callus maturation.
2. The results revealed that the callus maturation process was 27% faster in the LIPUS group.
3. The study found that the callus maturation rate in the LIPUS group was 27% quicker.
4. Callus maturation was 27% more rapid in the LIPUS group compared to others.
5. The callus maturation process in the LIPUS group was 27% more efficient, according to the
results.
1. The trial was registered with the IRCT under the identifier IRCT2012071010230N1.
2. The study was officially registered with IRCT.ir, with the registration number
IRCT2012071010230N1.
3. The trial was documented with IRCT.ir with the identification code IRCT2012071010230N1.
4. IRCT.ir served as the official registrar for the trial, with the registration number
IRCT2012071010230N1.
5. The study was recorded with IRCT under the registration number IRCT2012071010230N1.
6. IRCT.ir recorded the trial with the identifier IRCT2012071010230N1.
1. The study found that although behavioral and technological interventions led to some
slight improvements in glycemic control, they were not significantly more effective
than typical care.
2. Despite the modest improvement in glycemic control through behavioral and
technological interventions, they did not perform better than the standard care.
3. The results showed that while behavioral and technological interventions resulted
in some minimal gains in glycemic control, they did not surpass the usual care in
achieving glycemic control.
4. Although behavioral and technological interventions showed some improvement
in glycemic control, they were not found to be significantly superior to the usual care.
5. The study showed that the usual care was not outperformed by behavioral and
technological interventions in terms of achieving glycemic control, despite some
small improvements.
similar semantic meaning [12], [16], which is of significant
practical value to real-world applications. In this study,
we aim to use ChatGPT, a popular LLM to conduct data
augmentation. ChatGPT is based on GPT-3 [6], which was
trained on massive web data with diverse and rich infor-
mation. Furthermore, ChatGPT was trained through Rein-
forcement learning from Human Feedback (RLHF). During
RLHF, human feedback is incorporated into the process of
generating and selecting the best results. More specifically,
a reward model is trained based on human annotators'
ranking or generated results. In turn, this reward model
rewards model outputs that are most aligned with human
preference and human values. We believe these innovations
make ChatGPT the best candidate for generating human-
level quality data samples.
2.4 ChatGPT: Present and Future
ChatGPT is a game changer in natural language processing.
For the first time in human history, the power of large
language models is accessible to the general public through
a user-friendly chatbot interface. In turn, this common acces-
sibility contributes to ChatGPT's unprecedented popularity.
ChatGPT has emerged as a general-purpose problem solver
for many NLP applications [56]. Qin et al. [56] evaluated
ChatGPT on a comprehensive set of NLP tasks, includ-
ing common benchmarks in natural language inference,
arithmetic reasoning, named entity recognition, sentiment
analysis, question answering, dialogue and summarization.
They conclude that ChatGPT excels in most tasks, except for
tasks that focus on specific details (e.g., sequence tagging).
ChatGPT is also a valuable solution for multilingual
tasks. A recent empirical study [57] reports that ChatGPT
excels at tasks involving high-resource languages (various
European languages and Chinese) and is comparable with
Google Translate, DeepL Translate and Tencent TranSmart.
Nonetheless, ChatGPT performs poorly on low-resource
languages and faces extra challenges handling distant lan-
guage translation (i.e., English-German translation is con-
sidered to be less "distant", compared to English-Hindi
translation). A later study [58] confirms that ChatGPT strug-
gles with low-resource languages, although the authors
observe that ChatGPT does better in understanding non-
Latin scripts than generating them.
In addition, it is also possible to use the purely text-
based ChatGPT to interact with multi-modal data. A group
of researchers [58] use HTML Canvas and Python Turtle
graphics as media for text-to-image generation. ChatGPT
can faithfully generate HTML and Python code, which
can be then used to generate desired images. The authors
designed a flag drawing task that required ChatGPT to
generate code that can generate country flags. It was found
that ChatGPT could generate better flags when the prompt
for code was preceded by a prompt that queries ChatGPT
for the flag's description. In other words, descriptive text
prompts could improve multimodal task performance.
Beyond computer science, ChatGPT can be readily ap-
plied to medical report generation and comprehension [59],
[60], education [61], [62], [63], rigorous math research [64]
and finance [65]. Overall, ChatGPT is a versatile tool that
promotes general AI usage.
However, researchers are also cautious about the possi-
ble negative impact of ChatGPT. Some of the more promi-
nent concerns are related to bias [66], [67], ethics [68], [69],
plagiarism [70], [71] and job replacement en masse [72], [73].
In response, a commentary published in Nature advocates
for urgent attention to accountability, open-source large
language models and societal embrace of AI [66].
3 DATASET
We first use an open domain dataset Amazon to verify the
effectiveness of our method. Then, we use clinical natural
language processing (clinical NLP) as the task and carry out
our experiments on two popular public benchmarks. Data
augmentation is particularly in demand in clinical NLP,
because the significant burden of expert annotation and
stringent privacy regulations make large-scale data labeling
infeasible. We will describe these datasets in detail in the
following sections.
3.1 Amazon dataset
Amazon [74], [75], [76] contains customer reviews from 24
product categories. The task is to classify reviews into their
respective product categories. Since the original Amazon
product dataset is proverbially large, we sample a subset
of 300 samples from each category.
3.2 Symptoms Dataset
This dataset is published on Kaggle1. It contains the audio
data of common medical symptom descriptions over 8
hours. We use the text transcripts corresponding to the au-
dio data and perform sample de-duplication, and use them
as model input. The dataset after preprocessing includes 231
samples of 7 symptom categories. Every example represents
a sentence describing the provided symptoms, and the task
is to classify the sentence into the corresponding symptoms.
3.3 PubMed20k Dataset
The PubMed20K dataset is an extensively utilized resource
in NLP and text mining research, comprising around 20,000
annotated scientific abstracts from the biomedical field.
These annotations encompass named entities, relationships
between entities, and various semantic roles, making the
dataset valuable for diverse NLP tasks such as named entity
recognition, relation extraction, and text classification. The
dataset originates from the PubMed database, which spans
a wide array of biomedical subjects. Owing to its substantial
size, variety, and high-quality annotations, PubMed20K has
emerged as a popular benchmark dataset for assessing the
performance of machine learning models in the realm of
biomedical NLP. The abstracts in the PubMed 20K dataset
undergo preprocessing and segmentation into individual
sentences. Each sentence is labeled with one of the following
five categories: background, objective, method, result, or
conclusion. The task is to map the input sentences to their
corresponding categories.
5
(cid:48)
Algorithm 1 The framework of AugGPT for few-shot text
classification.
Input: base dataset Db and novel dataset Dn
Initialize: Initialized pre-trained BERT model
Definition: D
and augmented dataset Daug
augmentation method based on ChatGPT
Parameters: Fine-tuning epochs of base dataset epochb, fine-
tuning epochs of FSL epochf
for epoch in epochb do
train(model, Db)
is the dataset with the base dataset Db
n , and chatGPT aug is the data
= chatGPT aug(Dn)
end for
Daug
n
for epoch in epochf do
train(model,Daug
n )
end for
4 METHOD
4.1 Overall Framework
Given a base dataset Db = {(xi, yi)}Nb
i=1 with a label
space yi ∈ Yb, a novel dataset Dn = {(xj, yj)}Nn
j=1 with
a label space yj ∈ Yn, and Yb ∩ Yn = ∅. In the few-shot
classification scenario, the base dataset Db has a relatively
larger set of labeled samples, while the novel dataset Dn
has only a few labeled samples. The performance of few-
shot learning is evaluated on the novel dataset. Our goal is
to train a model with both base and limited novel datasets,
while achieving satisfying generalizability on the novel
dataset.
The overall framework of AugGPT is shown in Fig 1,
and the training steps are shown in Algorithm 1. First of
all, we fine-tune BERT on Db. Then, the Daug
is generated
by data augmentation with ChatGPT. Finally, we fine-tune
BERT with Daug
n .
n
4.2 Data Augmentation with ChatGPT
Similar to GPT [47], GPT-2 [77], and GPT-3 [6], ChatGPT
belongs to the family of autoregressive language models and
uses transformer decoder blocks [78] as the model backbone.
During pre-training, ChatGPT is regarded as an un-
supervised distribution estimation from a set of samples
X = {x1, x2, ..., xn}, and sample xi composed of m tokens
is defined as xi = (s1, s2, ..., sm). The objective of pre-
training is to maximize the following likelihood:
L(xi) =
m
(cid:88)
i=1
log P (si|s1, ..., si−1; θ)
(1)
where θ represents the trainable parameters of ChatGPT.
The tokens are represented by token embedding and posi-
tion embedding:
h0 = xiWe + Wp
(2)
where We is the token embedding matrix and Wp is the
position embedding matrix. Then N transformer blocks are
used to extract the features of the sample:
hn = transf ormer blocks(hn−1)
(3)
1. https://www.kaggle.com/datasets/paultimothymooney/medical-
speech-transcription-and-intent
where n ∈ [1, N ].
Finally, the target token is predicted:
si = sof tmax(hN W T
e )
Specifically, ChatGPT is applied to rephrase each input
sentence into six additional sentences, thereby augmenting
the few-shot samples.
(4)
6
where hN is the output of top transformer blocks.
After pre-training, the developers of ChatGPT apply
Reinforcement Learning from Human Feedback (RLHF) [21]
to fine-tune the pre-trained language model. The RLHF
aligns language models with user intent on a wide range
of tasks by fine-tuning them according to human feedback.
The RLHF of ChatGPT contains three steps:
Supervised Fine-tuning (SFT): Unlike GPT, GPT-2, and
GPT-3, ChatGPT uses labeled data for further training. The
AI trainers play as users and AI assistants to build the
answers based on prompts. The answers with prompts are
used as supervised data for further training of the pre-
trained model. After further pre-training, a SFT model can
be obtained.
Reward Modeling (RM): Based on the SFT method, a
reward model is trained to take in a pair of prompt and
response, and output a scalar reward. Human labelers rank
the outputs from best to worst to build a ranking dataset.
The loss function between two outputs is defined as follows:
loss(θr) = E(x,yw,yl)∼Dc [log (σ (rθr (x, yw) − rθr (x, yl)))]
(5)
where θr is the parameters of reward model; x is the prompt,
yw is the preferred completion out of the pair of yw and yl;
Dc is the dataset of human comparisons.
Reinforcement Learning (RL): By using reward models,
ChatGPT can be fine-tuned using Proximal Policy Optimiza-
tion (PPO) [79]. In order to fix the performance degradation
on public NLP datasets, the RLHF mixes the pretraining
gradients into the PPO gradients, which is also known as
PPO-ptx:
φ
(cid:2)log (cid:0)πRL
(cid:2)rθr (x, y) − β log (cid:0)πRL
objective(φ) = γEx∼Dpretrain
E(x,y)∼DπRL
φ (x)(cid:1)(cid:3) +
φ (y | x)/θSFT(y | x)(cid:1)(cid:3)
(6)
where πRL
is the learned RL policy, θSFT is the supervised
trained model, and Dpretrain is the pretraining distribu-
tion. The γ is the pre-training loss coefficient that controls
the strength of pre-training gradients, and the β is the
KL (Kullback-Leibler) reward coefficient that controls the
strength of the KL penalty.
φ
Compared to previous data augmentation methods,
ChatGPT is more suitable for data augmentation for the
following reasons:
•
• ChatGPT is pre-trained on large-scale corpora, so it
has a broader semantic expression space, and is help-
ful to enhance the diversity of data augmentation.
Since the fine-tuning stage of ChatGPT introduces
a large number of manual annotation samples, the
language generated by ChatGPT is more in line with
human expression habits.
• Through reinforcement learning, ChatGPT can com-
pare the advantages and disadvantages of different
expressions and ensure that the generated data are
of high quality.
Under the BERT framework, we introduce ChatGPT as
the data augmentation tool for few-shot text classification.
4.3 Few-shot Text Classification
We apply BERT [80] to train a few-shot text classification
model. The output features h of the top layer of BERT can
be written as:
z = [zc, z1, z2, ..., zn],
(7)
where zc is the representation of the class-specific token
CLS. For text classification, zc is usually fed into a task-
specific classifier header for final prediction. However, in
the FSL scenario, it is difficult to achieve satisfactory perfor-
mance through BERT fine-tuning because the small scale of
few-shot samples will easily lead to over-fitting and lack of
generalization ability.
To effectively address the challenge of few-shot text
classification, many approaches have been proposed. Gen-
erally, there are four categories of methods for few-shot
text classification based on large language models: meta-
learning, prompt-tuning, model design, and data augmen-
tation. meta-learning refers to the process of learning to learn
with tasks that update meta-parameters
[2], [5]. Prompt-
based methods guide large language models to predict
correct results by designing templates [6], [7], [8], [9]. Model
design methods guide the model to learn from few-shot
samples by changing the structure of the model [81]. Data
augmentation uses similar characters [22], similar word
semantics [30], [31], or knowledge base [55], [82] to expand
samples. Our method directly data augmentation through
the language capabilities of large language models, which is
a simple and efficient data augmentation method.
Objective Function: Our objective function of few-shot
learning consists of two parts: cross entropy and contrastive
learning loss. We feed zc into a fully connected layer, the
classifier for the final prediction:
ˆy = W T
c zc + bc,
(8)
where Wc and bc are trainable parameters, and take cross-
entropy as one of the objective functions:
LCE = −
(cid:88)
C
(cid:88)
d∈D(cid:48)
c=1
ydc ln ˆydc,
(9)
where C is the output dimension, which is equal to the
union of label spaces of the base dataset and novel dataset,
and yd is the ground truth.
Then, to make full use of the prior knowledge in the
base dataset to guide the learning of the novel dataset, we
introduce the contrastive loss function to make the sample
representation of the same category more compact and the
sample representation of different categories more separate.
The contrastive loss between pairs of samples in the same
batch is defined as follows:
LCL = − log
(cid:80) ecos(vi,vi(cid:48) )
(cid:80) ecos(vi,vi(cid:48) ) + (cid:80) ecos(vi,vj )
,
(10)
(cid:48)
where vi and v
i are the zc of samples that belong to the same
category; vi and vj are the zc of samples belong to different
categories; cos(*; *) is the cosine similarity.
In the BERT fine-tuning stage on the base dataset, we
only use cross entropy as the objective function. In the
few-shot learning stage, we combine cross entropy and
contrastive learning loss as the objective function:
L = LCE + λLCL.
(11)
4.4 Baseline Methods
In the experiment section, we compare our method with
other popular data augmentation methods. For these meth-
ods, we use the implementation in open-source libraries
including, nlpaug [83] and textattack [84].
•
InsertCharAugmentation. This method inserts ran-
dom characters at random locations in text, which
improves the generalization ability of the model by
injecting noise into the data.
• SubstituteCharAugmentation. This method ran-
domly replaces selected characters with other ones.
• SwapCharAugmentation [22]. This method ran-
domly exchanges two characters.
• DeleteCharAugmentation. This method randomly
deletes characters.
• OCRAugmentation. OCRAugmentation simulates
possible errors during OCR recognition. For exam-
ple, OCR tool may wrongly identify "0" as "o", and
wrongly identify "I" as "l".
• SpellingAugmentation [23]. It creates new text by
deliberately misspelling some words. The method
uses a list of English words that are most likely to
be misspelled provided by Oxford Dictionary, for
example, misspelling "because" as "becouse".
• KeyboardAugmentation [22]. It simulates typo error
by replacing randomly selected characters with the
adjacent characters in the QWERTY layout keyboard.
For example, replacing 'g' with 'r', 't', 'y', 'f', 'h', 'v',
'b' or 'n'.
• SwapWordAug [24]. It randomly exchanges words
in text. This method is a submethod of Easy Data
Augmentation (EDA) proposed by Wei et al.
• DeleteWordAug. DeleteWordAug randomly deletes
words in the text, which is also a submethod of EDA.
• PPDBSynonymAug [26]. It replaces words with their
synonym in PPDB thesaurus. Synonym replacement
can ensure semantic consistency and is suitable for
classification tasks.
• WordNetSynonymAug. It replaces words with their
synonym in WordNet thesaurus.
•
• SubstituteWordByGoogleNewsEmbeddings [28]. It
replaces words with their top-n similar words in the
embedding space. The word embeddings used are
pre-trained with GoogleNews corpus.
InsertWordByGoogleNewsEmbeddings [83]. It ran-
domly selects word from vocabulary of GoogleNews
corpus and inserts it the random position of the text.
• CounterFittedEmbeddingAug [30], [31]. It replaces
words with their neighbors in counter-fitting em-
bedding space. Compared with GoogleNews word
vectors used by SubstituteWordByGoogleNewsEm-
beddings, counter-fitting embedding introduces the
constraint of synonyms and antonyms, that is, the
embedding between synonyms will be pulled closer,
and vice versa.
7
• ContextualWordAugUsingBert(Insert)
[33].
This method uses BERT to insert words based on
context, that is, add < mask > token at random
position of the input text, and then let BERT predict
the token at that position.
[32],
• ContextualWordAugUsingDistilBERT(Insert). This
method uses DistilBERT to replace BERT for predic-
tion, and the rest is the same as ContextualWordAu-
gUsingBert(Insert).
• ContextualWordAugUsingRoBERTA(Insert).
is
This method uses RoBERTA to replace BERT
for prediction, and the rest
the same as
ContextualWordAugUsingBert(Insert).
• ContextualWordAugUsingBert(Substitute).
This
method [32], [33] uses BERT to replace words based
on context, that is, replace randomly selected words
in text with < mask > token, and then let BERT
predict the token at that position.
• ContextualWordAugUsingDistilBERT(Substitute).
This method uses DistilBERT to replace BERT
for prediction, and the rest
the same as
ContextualWordAugUsingBert(Substitute).
is
• ContextualWordAugUsingRoBERTA(Substitute).
This method uses RoBERTA to replace BERT
for prediction, and the rest
the same as
ContextualWordAugUsingBert(Substitute).
is
• BackTranslationAug. The method [38] translates the
text into German and then into English, resulting
in a new text that is different from the original but
has the same semantics. We use wmt19-en-de and
facebook/wmt19-de-en language translation models
[85] developed by Facebook for translation.
4.5 Prompt Design
We have designed prompts for single-turn dialogue and
multi-turn dialogues. The prompts are shown in Fig 2. The
Amazon dataset use the multi-turn dialogues prompt for
data augmentation. The Symptoms and PubMed20K use the
single-turn dialogue prompt for data augmentation.
4.6 Evaluation Metrics
We employed cosine similarity and TransRate [86] as metrics
to assess the faithfulness (i.e., whether the generated data
samples are close to the original samples) and compactness
(i.e., whether samples of each class are compact enough for
good discrimination) of the augmented data.
4.6.1 Embedding Similarity
To evaluate the semantic similarity between the samples
generated by data augmentation methods and actual sam-
ples, we adopt embedding similarity between the generated
samples and the actual samples of the test dataset. Some
of the most common similarity metrics include Euclidean
distance, cosine similarity and dot product similarity. In this
study, we select cosine similarity to capture the distance re-
lationship in the latent space. The cosine similarity measures
the cosine value of the angle between two vectors. This
value increases when two vectors are more similar, and is
8
TABLE 2
Data Augmentation and Ablation Study. The BERT + C indicates BERT with contrastive loss.
Data Augmentation
Raw
BackTranslationAug
ContextualWordAugUsingBert(Insert)
ContextualWordAugUsingBert(Substitute)
ContextualWordAugUsingDistilBERT(Insert)
ContextualWordAugUsingDistilBERT(Substitute)
ContextualWordAugUsingRoBERTA(Insert)
ContextualWordAugUsingRoBERTA(Substitute)
CounterFittedEmbeddingAug
InsertCharAugmentation
InsertWordByGoogleNewsEmbeddings
KeyboardAugmentation
OCRAugmentation
PPDBSynonymAug
SpellingAugmentation
SubstituteCharAugmentation
SubstituteWordByGoogleNewsEmbeddings
SwapCharAugmentation
SwapWordAug
WordNetSynonymAug
ChatGPT (2-shot)
AugGPT
Amazon
Symptoms
PubMed20K
BERT
0.734
0.757
0.761
0.770
0.759
0.787
0.775
0.745
0.754
0.771
0.816
0.764
0.775
0.691
0.727
0.762
0.729
0.762
0.771
0.805
BERT + C
0.745
0.748
0.750
0.757
0.762
0.766
0.768
0.730
0.741
0.775
0.794
0.766
0.782
0.690
0.736
0.768
0.741
0.766
0.766
0.798
BERT
0.636
0.778
0.697
0.626
0.707
0.667
0.758
0.727
0.667
0.404
0.636
0.545
0.768
0.697
0.697
0.535
0.727
0.475
0.687
0.616
BERT + C
0.606
0.747
0.677
0.667
0.747
0.646
0.707
0.667
0.626
0.475
0.677
0.505
0.778
0.758
0.707
0.586
0.727
0.485
0.727
0.758
BERT
0.792
0.812
0.802
0.815
0.796
0.797
0.815
0.782
0.805
0.826
0.786
0.809
0.789
0.795
0.808
0.816
0.807
0.797
0.798
0.761
BERT + C
0.798
0.83
0.811
0.830
0.796
0.800
0.814
0.782
0.805
0.831
0.784
0.815
0.789
0.829
0.811
0.821
0.822
0.801
0.794
0.757
0.753
0.980
0.748
0.816
0.826
0.889
0.899
0.835
0.835
Fig. 2. Single-turn dialogue and multi-turn dialogues prompt
bounded by a range between 0 and 1. Since the pre-trained
language models without fine-tunning poorly to capture
semantic meaning, we fine-tunning the pre-trained BERT on
base dataset by BERT-flow [87] method, and finally apply
the fine-tunned BERT to get smaple embedding. The cosine
similarity metric is commonly used in NLP [88] and we
follow this convention.
cos(θ) =
A * B
(cid:107)A(cid:107)2 (cid:107)B(cid:107)2
,
(12)
where A and B denote the two embedding vectors in com-
parison, respectively.
identical, making it impossible to distinguish between the
data from different classes and preventing any classifier
from achieving better than random guessing. Thus, a higher
TransRate could indicate better learnability of the data. More
specifically, knowledge transfer from a source task Ts to a
target task Tt is measured as shown below:
T rRTs→Tt(g) = H(Z) − H(Z|Y ),
(13)
where Y represents the labels of augmented examples, and
Z denotes the latency embedding features extracted by the
pre-trained feature extractor g. T rR means the TransRate
value. H(*) denotes the Shannon entropy [89].
4.6.2 TransRate
4.7 Direct Classification Performance by ChatGPT
TransRate is a metric that quantifies transferability based
on the mutual information between the features extracted
by a pre-trained model and their labels, with a single pass
through the target data. The metric achieves a minimum
value when the data covariance matrices of all classes are
An interesting and important question about the utilization
of ChatGPT for text data augmentation would be how Chat-
GPT will perform when directly applied to FSL downstream
tasks. Thus, we developed tailored prompts for ChatGPT
to perform the classification tasks with integrated the API
Single-turn dialogueMulti-turn dialoguesPlease rephrase the following sentence: {text}You are a helpful assistant that rephrase text and make sentence smooth.Iwill give you a sample, please rephrase it, then give me 6 rephrased answers.Sure, please provide the sentence you would like me to rephrase.{text}SystemUserAssistant9
Fig. 3. We employed two evaluation metrics to assess the faithfulness and compactness of our newly augmented data. The top left plot displays
the cosine similarity metric and final accuracy of all data augmentation methods on the Symptoms dataset, and the bottom left plot shows the
TransRate metric and final accuracy of all data augmentation methods on the Symptoms dataset. In the middle and bottom panels, we plotted the
cosine similarity and TransRate values of all data augmentation methods on the Amazon and PubMed20K datasets, respectively. On the right side
of the picture, we listed all the augmented methods with different colors and shapes.
for prompting. For the Symptoms dataset, we employed
the following prompt instruction: "Given a person's health
description or symptom, predict the corresponding illness
from the following categories: CLASSES." Additionally, we
used "Description: DESCRIPTION. Typically, this symptom
corresponds to CLASS" as the prompt for each example in
the dataset. In this way, We can include few-shot examples
(in this work, we used two) to facilitate the model's adap-
tation to downstream tasks. We used similarly-designed
prompt instructions for the other two tasks and the corre-
sponding example prompt to implement the few-shot in-
context learning by ChatGPT.
5 EXPERIMENT RESULTS
In our experiments, we use BERT as the base model.
Firstly, we train our model on the base dataset to produce
the pre-trained model. Then we fine-tune the model with
the combination of few-shot samples and the augmented
samples generated from various data augmentation meth-
ods. Specifically, in all three FSL tasks, we perform 2-shot
learning, i.e., there would be two real samples used for
each class in the target domain. Afterward, We use those
samples to fine-tune the pre-trained models. To evaluate
the effectiveness of different data augmentation methods,
we apply two different settings. The first one is the vanilla
BERT model. In the second setting, we add a contrastive loss
to the training objective function. In our experiments on the
Symptoms dataset, we use a batch size of 8 for 150 epochs,
set the maximum sequence length to 25, λ as 1, and use a
learning rate of 4e-5. In our experiments on the PubMed20K
dataset, we adopt the same training configuration, with the
maximum sequence length set to 40. For all three tasks, we
will generate six augmented samples per class. Examples
of the augmented samples generated by AugGPT and other
selected baseline methods can be found in the appendix.
5.1 Classification Performance Comparison
Table 2 shows the accuracy of different data augmenta-
tion methods. As shown in Table 2, AugGPT achieves the
highest accuracy for Amazon, Symptoms and PubMed20K
datasets. For the Amazon dataset, AugGPT and InsertWord-
ByGoogleNewsEmbeddings achieve the best performance
for BERT, and AugGPT achieve the best performance for
BERT with contrastive loss. In the PubMed20K dataset, Aug-
GPT achieves 83.5% accuracy for both BERT and BERT with
contrastive loss, whereas without data augmentation, the
accuracy values are only 79.2% and 79.8%, respectively. For
the Symptoms dataset, the accuracy for BERT downstream
augmentation is only 63.6%, and 60.6% with contrastive loss.
However, our AugGPT approach significantly improves the
accuracy to 88.9% and 89.9%, respectively. These results
suggest that data augmentation using ChatGPT is more
effective in enhancing the performance of machine learning
models in various applications.
5.2 Evaluation of Augmented Datasets
In addition to the classification accuracy, we evaluate the
augmented data in the latent space and visualize the results
in Fig 3. Latent embeddings are evaluated using cosine
similarity and the TransRate metric (see section 4.6 for more
details). The horizontal axis represents the cosine similarity
values and Transrate values, and the vertical axis describes
the classification accuracy. Since embedded similarity mea-
sures the similarity between the generated data and the test
dataset, high similarity means that the generated data are
close to real input data and with higher faithfulness and
compactness. Higher TransRate indicates better learnability
of the data. Therefore, a higher TransRate score indicates
that the augmented data are of higher quality. The most
ideal candidate method should be positioned at the top-
right of the visualization. As shown in Fig 3, AugGPT pro-
(a) Symptoms(b) PubMed20K(c) Amazonduces high-quality samples in terms of both faithfulness and
compactness on the Symptoms dataset and the PubMed20K
dataset. On the open-domain Amazon dataset, AugGPT also
produces high-quality samples with a higher TransRate.
5.3 Performance Comparison with ChatGPT
Furthermore, we used ChatGPT to directly perform the
downstream text data classification tasks under a 5-shot
learning scheme. We used in-house designed instructions
with few-shot in-context examples to prompt ChatGPT as
described in 4.7. The performance of ChatGPT for the down-
stream tasks is listed in Table 2. The result reveals that state-
of-the-art large language models such as ChatGPT tend
to perform better on relatively easier tasks, for example,
identifying symptoms according to a one-sentence descrip-
tion. However, when it comes to complicated tasks such
like PubMed, model fine-tuning is still needed and could
achieve better performance compared to few-shot prompts.
6 CONCLUSION AND DISCUSSION
In this paper, we proposed a novel data augmentation
approach for few-shot classification. Unlike other methods,
our model expands the limited data at the semantic level
to enhance data consistency and robustness, which results
in a better performance than most of the current text data
augmentation methods. With the advancement of LLM and
its nature of a multi-task learner [77], we envision that a
series of tasks in NLP can be enhanced or even replaced in
a similar fashion.
Although AugGPT has shown promising results in data
augmentation, it has certain limitations. For example, when
recognizing and augmenting medical texts, AugGPT may
produce incorrect augmentation results due to the lack of
domain knowledge of ChatGPT. In future works, we will
investigate adapting the general-domain LLMs, such as
ChatGPT, to domain-specific data, such as medical texts, via
model fine-tuning, in-context learning (prompt engineer-
ing), knowledge distillation, style transfer, etc.
AugGPT has demonstrated that the augmentation re-
sults can effectively improve the performance of the down-
stream classification task. A promising direction for future
research is to investigate AugGPT against a wider range of
downstream tasks. For example, given the strong ability of
ChatGPT to extract key points and understand sentences,
it can be utilized in tasks such as text summarization.
Specifically, ChatGPT might be valuable for domain-specific
science paper summarization [90] and clinical report sum-
marization [91]. Publicly available domain-specific science
paper summarization datasets and clinical report datasets
are rare and often provided at small scales due to privacy
concerns and the need for expert knowledge to generate
annotated summaries. However, ChatGPT could address
this challenge by generating diverse augmented summa-
rization samples in different representation styles. The data
generated from ChatGPT are typically concise, which can be
valuable for further enhancing the generalization capabili-
ties of the trained model.
The dramatic rise of generative image models such as
DALLE2 [92] and Stable Diffusion [93] provides oppor-
tunities for applying AugGPT to few-shot learning tasks
10
Recent research shows that
in computer vision. For example, accurate language de-
scriptions may be used to guide the generative model to
generate images from text or to generate new images based
on existing images as a data augmentation method for few-
shot learning tasks, especially when combined with efficient
fine-tuning methods
[94], [95] such as LoRA for Stable
Diffusion. Thus, prior knowledge from a large language
model can facilitate faster domain adaptation and better
few-shot learning of generative models in computer vision.
large language models
(LLMs), such as GPT-3 and ChatGPT, are capable of solv-
ing Theory of Mind (ToM) tasks, which were previously
thought to be unique to humans [96]. While the ToM-like
capabilities of LLMs may be an unintended byproduct of
improved performance, the underlying connection between
cognitive science and the human brain is an area ripe for
exploration. Advancements in cognitive and brain science
can also be used to inspire and optimize the design of
LLMs. For example, it has been suggested that the activation
patterns of the neurons in the BERT model and those in
the human brain networks may share similarities and could
be coupled together [97]. This presents a promising new
direction for developing LLMs by utilizing prior knowledge
from brain science. As researchers continue to investigate
the connections between LLMs and the human brain, we
may discover new means to enhance the performance and
capabilities of AI systems, leading to exciting breakthroughs
in the field.
REFERENCES
[1] Y. Wang, Q. Yao, J. T. Kwok, and L. M. Ni, "Generalizing from a
few examples: A survey on few-shot learning," ACM computing
surveys (csur), vol. 53, no. 3, pp. 1–34, 2020.
[2] W. Yin, "Meta-learning for few-shot natural language processing:
A survey," arXiv preprint arXiv:2007.09604, 2020.
[3] C. Wang, J. Wang, M. Qiu, J. Huang, and M. Gao, "Transprompt:
Towards an automatic transferable prompting framework for few-
shot text classification," in Proceedings of the 2021 Conference on
Empirical Methods in Natural Language Processing, 2021, pp. 2792–
2802.
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "Bert: Pre-
training of deep bidirectional transformers for language under-
standing," arXiv preprint arXiv:1810.04805, 2018.
[4]
[5] H.-y. Lee, S.-W. Li, and N. T. Vu, "Meta learning for natural
language processing: A survey," arXiv preprint arXiv:2205.01500,
2022.
[6] T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhari-
wal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell et al., "Lan-
guage models are few-shot learners," Advances in neural informa-
tion processing systems, vol. 33, pp. 1877–1901, 2020.
[7] B. Lester, R. Al-Rfou, and N. Constant, "The power of scale
for parameter-efficient prompt tuning," in Proceedings of the 2021
Conference on Empirical Methods in Natural Language Processing,
2021, pp. 3045–3059.
[8] X. Han, W. Zhao, N. Ding, Z. Liu, and M. Sun, "Ptr: Prompt tuning
with rules for text classification," AI Open, vol. 3, pp. 182–192,
2022.
J. Wang, C. Wang, F. Luo, C. Tan, M. Qiu, F. Yang, Q. Shi, S. Huang,
and M. Gao, "Towards unified prompt tuning for few-shot text
classification," arXiv preprint arXiv:2205.05313, 2022.
[9]
[10] J. Wei and K. Zou, "Eda: Easy data augmentation techniques for
boosting performance on text classification tasks," arXiv preprint
arXiv:1901.11196, 2019.
[11] V. Kumar, H. Glaude, C. de Lichy, and W. Campbell, "A closer look
at feature space data augmentation for few-shot intent classifica-
tion," in Proceedings of the 2nd Workshop on Deep Learning Approaches
for Low-Resource NLP (DeepLo 2019), 2019, pp. 1–10.
[12] S. Y. Feng, V. Gangal, J. Wei, S. Chandar, S. Vosoughi, T. Mitamura,
and E. Hovy, "A survey of data augmentation approaches for nlp,"
arXiv preprint arXiv:2105.03075, 2021.
[13] R. Sennrich, B. Haddow, and A. Birch, "Improving neural ma-
chine translation models with monolingual data," arXiv preprint
arXiv:1511.06709, 2015.
[14] A. Jindal, A. G. Chowdhury, A. Didolkar, D. Jin, R. Sawhney,
and R. Shah, "Augmenting nlp models using latent feature in-
terpolations," in Proceedings of the 28th International Conference on
Computational Linguistics, 2020, pp. 6931–6936.
[15] C. Shorten, T. M. Khoshgoftaar, and B. Furht, "Text data augmen-
tation for deep learning," Journal of big Data, vol. 8, pp. 1–34, 2021.
[16] M. Bayer, M.-A. Kaufhold, and C. Reuter, "A survey on data
augmentation for text classification," ACM Computing Surveys,
vol. 55, no. 7, pp. 1–39, 2022.
[17] B. Min, H. Ross, E. Sulem, A. P. B. Veyseh, T. H. Nguyen, O. Sainz,
E. Agirre, I. Heinz, and D. Roth, "Recent advances in natural
language processing via large pre-trained language models: A
survey," arXiv preprint arXiv:2111.01243, 2021.
[18] C. Zhou, Q. Li, C. Li, J. Yu, Y. Liu, G. Wang, K. Zhang, C. Ji,
Q. Yan, L. He et al., "A comprehensive survey on pretrained
foundation models: A history from bert to chatgpt," arXiv preprint
arXiv:2302.09419, 2023.
[19] Z. Liu, M. He, Z. Jiang, Z. Wu, H. Dai, L. Zhang, S. Luo, T. Han,
X. Li, X. Jiang et al., "Survey on natural language processing in
medical image analysis." Zhong nan da xue xue bao. Yi xue ban=
Journal of Central South University. Medical Sciences, vol. 47, no. 8,
pp. 981–993, 2022.
[20] S. Wang, Z. Zhao, X. Ouyang, Q. Wang, and D. Shen, "Chatcad:
Interactive computer-aided diagnosis on medical image using
large language models," arXiv preprint arXiv:2302.07257, 2023.
[21] L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin,
C. Zhang, S. Agarwal, K. Slama, A. Gray et al., "Training language
models to follow instructions with human feedback," in Advances
in Neural Information Processing Systems, 2022.
[22] Y. Belinkov and Y. Bisk, "Synthetic and natural noise both break
neural machine translation," arXiv preprint arXiv:1711.02173, 2017.
[23] C. Coulombe, "Text Data Augmentation Made Simple By Lever-
aging NLP Cloud APIs," Dec. 2018.
[24] J. Wei and K. Zou, "EDA: Easy Data Augmentation Techniques for
Boosting Performance on Text Classification Tasks," in Proceedings
of the 2019 Conference on Empirical Methods in Natural Language Pro-
cessing and the 9th International Joint Conference on Natural Language
Processing (EMNLP-IJCNLP). Hong Kong, China: Association for
Computational Linguistics, Nov. 2019, pp. 6382–6388.
[25] E. Pavlick, P. Rastogi,
J. Ganitkevitch, B. Van Durme, and
C. Callison-Burch, "Ppdb 2.0: Better paraphrase ranking, fine-
grained entailment relations, word embeddings, and style classifi-
cation," in Proceedings of the 53rd Annual Meeting of the Association
for Computational Linguistics and the 7th International Joint Conference
on Natural Language Processing (Volume 2: Short Papers), 2015, pp.
425–430.
[26] T. Niu and M. Bansal, "Adversarial Over-Sensitivity and Over-
Stability Strategies for Dialogue Models," in Proceedings of the 22nd
Conference on Computational Natural Language Learning. Brussels,
Belgium: Association for Computational Linguistics, 2018, pp.
486–496.
[27] G. A. Miller, "Wordnet: a lexical database for english," Communi-
cations of the ACM, vol. 38, no. 11, pp. 39–41, 1995.
[28] W. Y. Wang and D. Yang, "That's so annoying!!!: A lexical and
frame-semantic embedding based data augmentation approach to
automatic categorization of annoying behaviors using# petpeeve
tweets," in Proceedings of the 2015 conference on empirical methods in
natural language processing, 2015, pp. 2557–2563.
[29] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean,
"Distributed representations of words and phrases and their
compositionality," Advances in neural information processing systems,
vol. 26, 2013.
[30] N. Mrkˇsi ́c, D. ́O S ́eaghdha, B. Thomson, M. Gaˇsi ́c, L. M. Rojas-
Barahona, P.-H. Su, D. Vandyke, T.-H. Wen, and S. Young,
"Counter-fitting Word Vectors to Linguistic Constraints," in Pro-
ceedings of the 2016 Conference of the North American Chapter of
the Association for Computational Linguistics: Human Language Tech-
nologies.
San Diego, California: Association for Computational
Linguistics, Jun. 2016, pp. 142–148.
11
ples," in Proceedings of the 2018 Conference on Empirical Methods in
Natural Language Processing.
Brussels, Belgium: Association for
Computational Linguistics, 2018, pp. 2890–2896.
[32] S. Kobayashi, "Contextual Augmentation: Data Augmentation by
Words with Paradigmatic Relations," in Proceedings of the 2018
Conference of the North American Chapter of the Association for Com-
putational Linguistics: Human Language Technologies, Volume 2 (Short
Papers). New Orleans, Louisiana: Association for Computational
Linguistics, Jun. 2018, pp. 452–457.
[33] V. Kumar, A. Choudhary, and E. Cho, "Data Augmentation Using
Pre-trained Transformer Models," arXiv preprint arXiv:2003.02245,
2020.
[34] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "BERT: Pre-
training of Deep Bidirectional Transformers for Language Under-
standing," May 2019.
[35] L. Sun, C. Xia, W. Yin, T. Liang, P. S. Yu, and L. He, "Mixup-
transformer: dynamic data augmentation for nlp tasks," arXiv
preprint arXiv:2010.02394, 2020.
[36] V. Sanh, L. Debut, J. Chaumond, and T. Wolf, "Distilbert, a distilled
version of bert: smaller, faster, cheaper and lighter," ArXiv, vol.
abs/1910.01108, 2019.
[37] Y. Liu, M. Ott, N. Goyal, J. Du, M. Joshi, D. Chen, O. Levy,
M. Lewis, L. Zettlemoyer, and V. Stoyanov, "Roberta: A ro-
bustly optimized bert pretraining approach," arXiv preprint
arXiv:1907.11692, 2019.
[38] R. Sennrich, B. Haddow, and A. Birch, "Improving Neural Ma-
chine Translation Models with Monolingual Data," in Proceedings
of the 54th Annual Meeting of the Association for Computational
Linguistics (Volume 1: Long Papers). Berlin, Germany: Association
for Computational Linguistics, Aug. 2016, pp. 86–96.
[39] V. Gangal, S. Y. Feng, M. Alikhani, T. Mitamura, and E. Hovy,
"Nareor: The narrative reordering problem," in Proceedings of the
AAAI Conference on Artificial Intelligence, vol. 36, no. 10, 2022, pp.
10 645–10 653.
[40] L. Fei-Fei, R. Fergus, and P. Perona, "One-shot learning of object
categories," IEEE transactions on pattern analysis and machine intelli-
gence, vol. 28, no. 4, pp. 594–611, 2006.
[41] Y. Ge, Y. Guo, Y.-C. Yang, M. A. Al-Garadi, and A. Sarker, "Few-
shot learning for medical text: A systematic review," arXiv preprint
arXiv:2204.14081, 2022.
[42] J. Wei, C. Huang, S. Vosoughi, Y. Cheng, and S. Xu, "Few-shot
text classification with triplet networks, data augmentation, and
curriculum learning," in Proceedings of the 2021 Conference of the
North American Chapter of the Association for Computational Linguis-
tics: Human Language Technologies, 2021, pp. 5493–5500.
[43] T. Gao, A. Fisch, and D. Chen, "Making pre-trained language
models better few-shot learners," 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), 2021, pp. 3816–3830.
[44] A. Antoniou, H. Edwards, and A. Storkey, "How to train your
maml," arXiv preprint arXiv:1810.09502, 2018.
[45] 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.
[46] X. Yao, J. Zhu, G. Huo, N. Xu, X. Liu, and C. Zhang, "Model-
agnostic multi-stage loss optimization meta learning," Interna-
tional Journal of Machine Learning and Cybernetics, vol. 12, no. 8,
pp. 2349–2363, 2021.
[47] A. Radford, K. Narasimhan, T. Salimans, I. Sutskever et al.,
"Improving language understanding by generative pre-training,"
2018.
[48] M. Lewis, Y. Liu, N. Goyal, M. Ghazvininejad, A. Mo-
hamed, O. Levy, V. Stoyanov, and L. Zettlemoyer, "Bart:
lan-
Denoising sequence-to-sequence pre-training for natural
guage generation, translation, and comprehension," arXiv preprint
arXiv:1910.13461, 2019.
[49] C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena,
Y. Zhou, W. Li, and P. J. Liu, "Exploring the limits of transfer
learning with a unified text-to-text transformer," The Journal of
Machine Learning Research, vol. 21, no. 1, pp. 5485–5551, 2020.
[50] A. Chowdhery, S. Narang, J. Devlin, M. Bosma, G. Mishra,
A. Roberts, P. Barham, H. W. Chung, C. Sutton, S. Gehrmann et al.,
"Palm: Scaling language modeling with pathways," arXiv preprint
arXiv:2204.02311, 2022.
[31] M. Alzantot, Y. Sharma, A. Elgohary, B.-J. Ho, M. Srivastava, and
K.-W. Chang, "Generating Natural Language Adversarial Exam-
[51] T. L. Scao, A. Fan, C. Akiki, E. Pavlick, S. Ili ́c, D. Hesslow,
R. Castagn ́e, A. S. Luccioni, F. Yvon, M. Gall ́e et al., "Bloom: A
176b-parameter open-access multilingual language model," arXiv
preprint arXiv:2211.05100, 2022.
in proceedings of the 25th international conference on world wide web,
2016, pp. 507–517.
12
[52] S. Zhang, S. Roller, N. Goyal, M. Artetxe, M. Chen, S. Chen,
C. Dewan, M. Diab, X. Li, X. V. Lin et al., "Opt: Open pre-trained
transformer language models," arXiv preprint arXiv:2205.01068,
2022.
[53] S. Longpre, L. Hou, T. Vu, A. Webson, H. W. Chung, Y. Tay,
D. Zhou, Q. V. Le, B. Zoph, J. Wei et al., "The flan collection:
Designing data and methods for effective instruction tuning,"
arXiv preprint arXiv:2301.13688, 2023.
[54] Y. Gu, R. Tinn, H. Cheng, M. Lucas, N. Usuyama, X. Liu, T. Nau-
mann, J. Gao, and H. Poon, "Domain-specific language model
pretraining for biomedical natural language processing," ACM
Transactions on Computing for Healthcare (HEALTH), vol. 3, no. 1,
pp. 1–23, 2021.
[55] S. Rezayi, H. Dai, Z. Liu, Z. Wu, A. Hebbar, A. H. Burns, L. Zhao,
D. Zhu, Q. Li, W. Liu et al., "Clinicalradiobert: Knowledge-infused
few shot learning for clinical notes named entity recognition," in
Machine Learning in Medical Imaging: 13th International Workshop,
MLMI 2022, Held in Conjunction with MICCAI 2022, Singapore,
September 18, 2022, Proceedings. Springer, 2022, pp. 269–278.
[56] C. Qin, A. Zhang, Z. Zhang, J. Chen, M. Yasunaga, and D. Yang,
"Is chatgpt a general-purpose natural language processing task
solver?" arXiv preprint arXiv:2302.06476, 2023.
[57] W. Jiao, W. Wang, J.-t. Huang, X. Wang, and Z. Tu, "Is chat-
gpt a good translator? a preliminary study," arXiv preprint
arXiv:2301.08745, 2023.
[58] Y. Bang, S. Cahyawijaya, N. Lee, W. Dai, D. Su, B. Wilie, H. Love-
nia, Z. Ji, T. Yu, W. Chung et al., "A multitask, multilingual,
multimodal evaluation of chatgpt on reasoning, hallucination, and
interactivity," arXiv preprint arXiv:2302.04023, 2023.
[59] Y. Shen, L. Heacock, J. Elias, K. D. Hentel, B. Reig, G. Shih, and
L. Moy, "Chatgpt and other large language models are double-
edged swords," p. 230163, 2023.
[60] F. Antaki, S. Touma, D. Milad, J. El-Khoury, and R. Duval, "Eval-
uating the performance of chatgpt in ophthalmology: An analysis
of its successes and shortcomings," medRxiv, pp. 2023–01, 2023.
[61] T. H. Kung, M. Cheatham, A. Medenilla, C. Sillos, L. De Leon,
C. Elepa ̃no, M. Madriaga, R. Aggabao, G. Diaz-Candido,
J. Maningo et al., "Performance of chatgpt on usmle: Potential for
ai-assisted medical education using large language models," PLOS
Digital Health, vol. 2, no. 2, p. e0000198, 2023.
[62] J. V. Pavlik, "Collaborating with chatgpt: Considering the im-
plications of generative artificial intelligence for journalism and
media education," Journalism & Mass Communication Educator, p.
10776958221149577, 2023.
[63] D. Baidoo-Anu and L. Owusu Ansah, "Education in the era of
generative artificial intelligence (ai): Understanding the potential
benefits of chatgpt in promoting teaching and learning," Available
at SSRN 4337484, 2023.
[64] S. Frieder, L. Pinchetti, R.-R. Griffiths, T. Salvatori, T. Lukasiewicz,
P. C. Petersen, A. Chevalier, and J. Berner, "Mathematical capabil-
ities of chatgpt," arXiv preprint arXiv:2301.13867, 2023.
[65] M. Dowling and B. Lucey, "Chatgpt for (finance) research: The
bananarama conjecture," Finance Research Letters, p. 103662, 2023.
[66] E. A. van Dis, J. Bollen, W. Zuidema, R. van Rooij, and C. L.
Bockting, "Chatgpt: five priorities for research," Nature, vol. 614,
no. 7947, pp. 224–226, 2023.
[67] R. W. McGee, "Is chat gpt biased against conservatives? an empir-
ical study," An Empirical Study (February 15, 2023), 2023.
[68] A. Blum, "Breaking chatgpt with dangerous questions under-
standing how chatgpt prioritizes safety, context, and obedience,"
2022.
[69] H. Y. Jabotinsky and R. Sarel, "Co-authoring with an ai? ethical
dilemmas and artificial intelligence," Ethical Dilemmas and Artificial
Intelligence (December 15, 2022), 2022.
[70] T. Susnjak, "Chatgpt: The end of online exam integrity?" arXiv
preprint arXiv:2212.09292, 2022.
[71] M. Khalil and E. Er, "Will chatgpt get you caught? rethinking of
plagiarism detection," arXiv preprint arXiv:2302.04335, 2023.
[72] D. Castelvecchi, "Are chatgpt and alphacode going to replace
programmers?" Nature, 2022.
[73] A. Zarifhonarvar, "Economics of chatgpt: A labor market view
on the occupational impact of artificial intelligence," Available at
SSRN 4350925, 2023.
[74] R. He and J. McAuley, "Ups and downs: Modeling the visual
evolution of fashion trends with one-class collaborative filtering,"
[75] Y. Bao, M. Wu, S. Chang, and R. Barzilay, "Few-shot
text
signatures," arXiv preprint
classification with distributional
arXiv:1908.06039, 2019.
[76] S. Wang, X. Liu, B. Liu, and D. Dong, "Sentence-aware adversarial
meta-learning for few-shot text classification," in Proceedings of the
29th International Conference on Computational Linguistics, 2022, pp.
4844–4852.
[77] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever et al.,
"Language models are unsupervised multitask learners," OpenAI
blog, vol. 1, no. 8, p. 9, 2019.
[78] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N.
Gomez, Ł. Kaiser, and I. Polosukhin, "Attention is all you need,"
Advances in neural information processing systems, vol. 30, 2017.
[79] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov,
preprint
"Proximal policy optimization algorithms,"
arXiv:1707.06347, 2017.
arXiv
[80] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "Bert: Pre-
training of deep bidirectional transformers for language under-
standing," in Proceedings of NAACL-HLT, 2019, pp. 4171–4186.
[81] W. Liao, Z. Liu, H. Dai, Z. Wu, Y. Zhang, X. Huang, Y. Chen,
X. Jiang, D. Zhu, T. Liu, S. Li, X. Li, and H. Cai, "Mask-guided bert
for few shot text classification," arXiv preprint arXiv:2302.10447,
2023.
[82] S. Rezayi, Z. Liu, Z. Wu, C. Dhakal, B. Ge, C. Zhen, T. Liu, and
S. Li, "Agribert: Knowledge-infused agricultural language models
for matching food and nutrition," International Joint Conference on
Artificial Intelligence, July 23-29, 2022, Vienna, Austria, 2022.
[83] E. Ma, "Nlp augmentation," https://github.com/makcedward/nlpaug,
2019.
[84] J. Morris, E. Lifland, J. Y. Yoo, J. Grigsby, D. Jin, and Y. Qi,
"Textattack: A framework for adversarial attacks, data augmen-
tation, and adversarial training in nlp," in Proceedings of the 2020
Conference on Empirical Methods in Natural Language Processing:
System Demonstrations, 2020, pp. 119–126.
[85] N. Ng, K. Yee, A. Baevski, M. Ott, M. Auli, and S. Edunov,
"Facebook fair's wmt19 news translation task submission," in
Proc. of WMT, 2020.
[86] L.-K. Huang, J. Huang, Y. Rong, Q. Yang, and Y. Wei, "Frustrat-
ingly easy transferability estimation," in International Conference
on Machine Learning. PMLR, 2022, pp. 9201–9225.
[87] B. Li, H. Zhou, J. He, M. Wang, Y. Yang, and L. Li, "On the sentence
embeddings from pre-trained language models," in Proceedings
of the 2020 Conference on Empirical Methods in Natural Language
Processing (EMNLP), 2020, pp. 9119–9130.
[88] J. Wang and Y. Dong, "Measurement of text similarity: a survey,"
Information, vol. 11, no. 9, p. 421, 2020.
[89] T. M. Cover, Elements of information theory.
John Wiley & Sons,
1999.
[90] X. Cai, S. Liu, J. Han, L. Yang, Z. Liu, and T. Liu, "Chestxraybert:
A pretrained language model for chest radiology report summa-
rization," IEEE Transactions on Multimedia, pp. 1–1, 2021.
[91] X. Cai, S. Liu, L. Yang, Y. Lu, J. Zhao, D. Shen, and T. Liu, "Covid-
sum: A linguistically enriched scibert-based summarization model
for covid-19 scientific papers," Journal of Biomedical Informatics, vol.
127, p. 103999, 2022.
[92] A. Ramesh, P. Dhariwal, A. Nichol, C. Chu, and M. Chen, "Hier-
archical text-conditional image generation with clip latents," arXiv
preprint arXiv:2204.06125, 2022.
[93] R. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer,
"High-resolution image synthesis with latent diffusion models,"
in Proceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition, 2022, pp. 10 684–10 695.
[94] E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang,
and W. Chen, "Lora: Low-rank adaptation of large language
models," arXiv preprint arXiv:2106.09685, 2021.
[95] N. Ruiz, Y. Li, V. Jampani, Y. Pritch, M. Rubinstein, and K. Aber-
man, "Dreambooth: Fine tuning text-to-image diffusion models
for subject-driven generation," arXiv preprint arXiv:2208.12242,
2022.
[96] M. Kosinski, "Theory of mind may have spontaneously emerged
in large language models," arXiv preprint arXiv:2302.02083, 2023.
[97] X. Liu, M. Zhou, G. Shi, Y. Du, L. Zhao, Z. Wu, D. Liu, T. Liu, and
X. Hu, "Coupling artificial neurons in bert and biological neurons
in the human brain," in Proceedings of the 37th AAAI Conference on
Artificial Intelligence, AAAI, 2023.
|
|
http://arxiv.org/abs/2302.13001v1 | 2023-02-25T06:26:56 | 2023-02-25T06:26:56 | Better Generative Replay for Continual Federated Learning | Federated learning is a technique that enables a centralized server to learn
from distributed clients via communications without accessing the client local
data. However, existing federated learning works mainly focus on a single task
scenario with static data. In this paper, we introduce the problem of continual
federated learning, where clients incrementally learn new tasks and history
data cannot be stored due to certain reasons, such as limited storage and data
retention policy. Generative replay based methods are effective for continual
learning without storing history data, but adapting them for this setting is
challenging. By analyzing the behaviors of clients during training, we find
that the unstable training process caused by distributed training on non-IID
data leads to a notable performance degradation. To address this problem, we
propose our FedCIL model with two simple but effective solutions: model
consolidation and consistency enforcement. Our experimental results on multiple
benchmark datasets demonstrate that our method significantly outperforms
baselines. | [
"Daiqing Qi",
"Handong Zhao",
"Sheng Li"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13001v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13001v1",
"@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
5
2
]
G
L
.
s
c
[
1
v
1
0
0
3
1
.
2
0
3
2
:
v
i
X
r
a
Published as a conference paper at ICLR 2023
BETTER GENERATIVE REPLAY FOR CONTINUAL
FEDERATED LEARNING
Daiqing Qi1, Handong Zhao2, Sheng Li1
1University of Virginia, 2Adobe Research
{daiqing.qi, shengli}@virginia.edu, [email protected]
ABSTRACT
Federated Learning (FL) aims to develop a centralized server that learns from
distributed clients via communications without accessing the clients' local data.
However, existing works mainly focus on federated learning in a single task sce-
nario. with static data. In this paper, we introduce the continual federated learning
(CFL) problem, where clients incrementally learn new tasks and history data can-
not be stored due to certain reasons, such as limited storage and data retention pol-
icy 1. Generative replay (GR) based methods are effective for continual learning
without storing history data. However, we fail when trying to intuitively adapt GR
models for this setting. By analyzing the behaviors of clients during training, we
find the unstable training process caused by distributed training on non-IID data
leads to a notable performance degradation. To address this problem, we propose
our FedCIL model with two simple but effective solutions: 1. model consolida-
tion and 2. consistency enforcement. Experimental results on multiple benchmark
datasets demonstrate that our method significantly outperforms baselines.
1
INTRODUCTION
Federated learning (McMahan et al., 2017) is an emerging topic in machine learning, where a pow-
erful global model is maintained via communications with distributed clients without access to their
local data. A typical challenge in federated learning is the non-IID data distribution (Zhao et al.,
2018; Zhu et al., 2021a), where the data distributions learnt by different clients are different (known
as heterogeneous federated learning). Recent methods (Li et al., 2020; Chen & Chao, 2020; Zhu
et al., 2021b) gain improvements in the typical federated learning setting, where the global model is
learning a single task and each client is trained locally on fixed data. However, in real-world appli-
cations, it is more practical that each client is continuously learning new tasks. Traditional federated
learning models fail to solve this problem.
In practice, history data are sometimes inaccessible considering privacy constraints (e.g., data pro-
tection under GDPR) or limited storage space (e.g., mobile devices with very limited space), and the
unavailability of previous data often leads to catastrophic forgetting (McCloskey & Cohen, 1989) in
many machine learning models. Continual learning (Thrun, 1995; Kumar & Daume III, 2012; Ru-
volo & Eaton, 2013) aims to develop an intelligent system that can continuously learn from new tasks
without forgetting learnt knowledge in the absence of previous data. Common continual learning
scenarios can be roughly divided into two scenarios (Van de Ven & Tolias, 2019): task incremental
learning (TIL) and class incremental learning (CIL) (Rebuffi et al., 2017). In both scenarios, the in-
telligent system is required to solve all tasks so far. In TIL, task-IDs of different task are accessible,
while in CIL, they are unavailable, which requires the system to infer task-IDs. The unavailability
of task-IDs makes the problem significantly harder.
In this paper, we propose a challenging and realistic problem, continual federated learning. More
specifically, we aim to deal with the class-incremental federated learning (CI-FL) problem. In this
setting, each client is continuously learning new classes from a sequence of tasks, and the centralized
server learns from the clients via communications. It is more difficult than the single FL or CIL,
because both the non-IID and catastrophic forgetting issues need to be addressed. Compared with
1https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32016R0679
1
Published as a conference paper at ICLR 2023
traditional continual learning settings that only involve one model, our problem is more complex
because there are multiple models including one server and many clients.
Owning to the success of generative replay ideas in continual learning, we propose to adopt Auxil-
iary Classifier GAN (ACGAN) (Odena et al., 2017), a generative adversarial network (GAN) with
an auxiliary classifier, as the base model for the server and clients. Then the generator of the model
can be used for generative replay to avoid forgetting. Interestingly, experiments show that a sim-
ple combination of ACGAN and FL algorithms fails to produce promising results. It is already
known that the unstable training process (Roth et al., 2017; Kang et al., 2021; Wu et al., 2020) and
imbalanced data can worsen the performance of generative models. We find that this phenomenon
becomes more severe in the context of federated learning, which leads to the failure of the intuitively
combined model.
To overcome these challenges, we propose a federated class-incremental learning (FedCIL) frame-
work. In FedCIL, the generator of ACGAN helps alleviate catastrophic forgetting by generating syn-
thetic data of previous distributions for replay, meanwhile, it benefits federated learning by transfer-
ring better global and local data distributions during the communications. Our model is also subject
to the privacy constraints in federated learning. During the communications, only model parameters
are transmitted. With the proposed global model consolidation and local consistency enforcement,
our model significantly outperforms baselines on benchmark datasets.
The main contributions of this paper are as follows:
• We introduce a challenging and practical problem of continual federated learning, i.e.,
class-incremental federated learning (CI-FL), where a global model continuously learns
from multiple clients that are incrementally learning new classes without memory buffers.
Subsequently, we propose generative replay (GR) based methods for this challenge.
• We empirically find the unstable learning process caused by distributed training on highly
non-IID data with popular federated learning algorithms can lead to a notable performance
degradation of GR based models. Motivated by this observation, we further propose to
solve the problem with model consolidation and consistency enforcement.
• We design new experimental settings and conduct comprehensive evacuations on bench-
mark datasets. The results demonstrate the effectiveness of our model.
2 RELATED WORK
Class-Incremental Learning. Class-incremental learning (CIL) (Rebuffi et al., 2017) is a hard
continual learning problem due to the unavailability of the task-IDs. Existing approaches to solve
the CIL problem can be divided into three categories (Ebrahimi et al., 2020), including the replay-
based methods (Rolnick et al., 2019; Chaudhry et al., 2019), structure-based methods (Yoon et al.,
2017), and regularization-based methods (Kirkpatrick et al., 2017; Aljundi et al., 2018). In addition,
the generative replay based methods (Shin et al., 2017; Wu et al., 2018) belong to the replay-based
methods, but they do not need a replay buffer for storing previous data.
Instead, an additional
generator is trained to capture the data distribution of data learnt so far, and it generates synthetic
data for replay when the real data becomes unavailable. The generative replay based methods have
obtained promising results on various CIL benchmarks, where storing data is not allowed (data-free).
Federated Learning. Federated learning has been extensively studied in recent years. We mainly
discuss the ones that involve generative models in this section. For instance, some recent federated
learning methods train a GAN across distributed resources (Zhang et al., 2021; Rasouli et al., 2020)
in a federated learning paradigm. They are subject to privacy constraints in that the parameters of the
GAN are shared instead of the real data. In our work, we also strictly follow the privacy constraints
by only transmitting GAN parameters.
Continual Learning and Federated Learning. So far, only few works lie in the intersection of
federated learning and continual learning. (Casado et al., 2020) discusses federated learning with
changing data distributions, but it only involves single-task scenario of federated learning. (Yoon
et al., 2021) introduces a federated continual learning setting from the perspective of continual learn-
ing. Our work is significantly different from it. First, the federated continual learning in (Yoon
et al., 2021) focuses on the performance of each single client, and thus it does not maintain a global
2
Published as a conference paper at ICLR 2023
model on the server side. Our objective is opposite to it in that we aim to develop a global model
that incrementally learns from the clients. Second, the method in (Yoon et al., 2021) focuses on the
task-incremental learning, where task-IDs are required for inference, while our work aims to deal
with the more challenging task of class-incremental learning, where task-IDs are not available. In
addition, (Usmanova et al., 2021), (Guo et al., 2021a) and (Hendryx et al., 2021) are also relevant
to our work, all of which have a global model that incrementally learns new classes. In particular,
federated reconnaissance (Hendryx et al., 2021) uses prototype networks for its proposed task. It
is different from our work in that, in federated reconnaissance, new classes maybe overlapped with
old classes, which is not allowed in the standard class incremental scenario. Also, it focuses on
few-shot learning and uses a buffer to store prototypes of learnt classes, which is not needed in our
framework. (Guo et al., 2021a) is similar to (Hendryx et al., 2021), which allows overlapped classes
among a client's private tasks. Thus it is inconsistent with the standard incremental learning (IL)
setting. (Usmanova et al., 2021) is different from us in the communication settings. (Dong et al.,
2022) uses a memory buffer to store old data, which decreases the difficulty to a large extend. We
focus on generative replay based continual learning methods which works with no memory buffers.
We further clarify the differences between our work and the most related methods in Appendix D.
3 PRELIMINARY
In this section, we first present the definitions of federated learning, class-incremental learning,
and our class-incremental federated learning (CI-FL). Then we clarify the differences between our
setting and existing work.
3.1 PROBLEM FORMULATION
Federated Learning (FL). A typical Federated Learning problem can be formalized by assuming
a set C = {C1, C2, ..., Cn} of n different clients, where each client Ck owns its private data Dk with
its corresponding task Tk, and a global model parameterized by θg is deployed on a centralized
server, which communicates with the clients during their training on their own local data. The aim
of FL is to learn a global model that minimizes its risk on each of the client tasks. where Lk is the
objective of Tk. On the other hand, we present the definition of class-incremental learning, which is
a challenging continual learning problem as task-IDs are not available.
Class-Incremental Learning (CIL). In class-incremental learning, a model sequentially learns
from a sequence of data distributions denoted as D = {D1, D2, ..., Dm}, where each Di is the
data distribution of the corresponding task T i and label space is Y i. During T t, all data distri-
butions {Di|i < t} will be unavailable, and the goal of CIL is to effectively learn from Dt, while
maintaining its performance on learnt tasks. After all m tasks, the model is expected to map samples
from D = {D1, D2, ..., Dm} to Y 1 ∪ Y 2... ∪ Y m without Task-IDs.
Class-Incremental Federated Learning (CI-FL). In Class-Incremental Federated Learning, each
client Ci sequentially learns from a series of m tasks locally (denoted as Ti = {T 1
i }) in a
class-incremental way, during which time, the clients communicate with global model on centralized
server. The goal of CI-FL is to maintain a global model that predicts all classes seen by all clients
so far.
i , ..., T m
i , T 2
3.2 DESIDERATA
We have some desiderata for our proposed setting, which makes our class-incremental federated
learning more general, realistic and challenging, compared with existing works. Discussions includ-
ing differences with existing works are available in Appendix D.
4 METHODOLOGY
We propose a new framework, FedCIL, for class-incremental federated learning, as shown in Fig. 1.
In this section, we first review ACGAN, which is adopted as the base model for server and clients.
Then we discuss an interesting observation, i.e., simply combining ACGAN and federated learning
algorithms fails to work well. Motivated by the findings, we finally present our FedCIL framework.
3
Published as a conference paper at ICLR 2023
Figure 1: Framework of our FedCIL. The left figure illustrates the model consolidation on the
server side. During each communication, the server model is first initialized from merged clients,
then consolidated with synthetic samples generated by client generators. The right figure illustrates
consistency enforcement on client side (client 1 for example), which is achieved by consistency loss
functions applied to the output logits of the classification module of the client.
4.1 ACGAN
Generative replay based methods are popular in a strict CIL setting, where storing data is not allowed
(data-free). DGR (Shin et al., 2017), a representative generative replay based method, trains a GAN
for replay in addition to the classification model. ACGAN (Odena et al., 2017) (Wu et al., 2018) is
better than DGR in that, it reduces the complexity of the model by integrating the the classifier and
the generative model as a single model. Besides, it enables conditional generation, which is crucial
for learning an unbiased classifier. Thus we choose ACGAN as the base model for each client.
In ACGAN, each sample is generated by providing the noise z and a class label c to the generator.
The objective function of the generator can be written as:
Lgen = min
θG
(cid:0)LG
gan(θ, X) + LG
ce(θ, X)(cid:1) ,
(1)
gan(θ, X) = −Ez∼pz,c∼pc [log(DθD (GθG(z, c)))] ,
LG
ce(θ, X) = −Ez∼pz,c∼pc [yc log(CθC (GθG (z, c)))] ,
LG
(3)
where C, D and G are the classification module, discriminator module and the generator, respec-
tively. Note that C and D share the feature extractor layers and only differ in the last out put layer.
LG
gan(θ, X) are respectively the standard cross-entropy loss for classification and the
generator loss in a typical GAN. X is the training dataset. θ denotes the overall parameters. θC,
θD, and θG are the parameters for classification module, discriminator module and the generator,
respectively. pc is the label distribution, and pz is the noise distribution. yc is the ground truth label.
The corresponding discriminator loss function is:
ce(θ, X) and LG
(2)
Ldis = min
θD,θC
(cid:0)LD
gan(θ, X) + LD
ce(θ, X)(cid:1) ,
gan(θ, X) = −E(x,c)∼X [log(DθD (x))] − Ez∼pz,c∼pc [log(1 − DθD (GθG(z, c)))],
LD
ce(θ, X) = −E(x,c)∼X [yc log(CθC (x))] − Ez∼pz,c∼pc [yc log(CθC (GθG (z, c)))] .
LD
Overall, we write the loss function of ACGAN as:
Lacgan(θ, X) = Lgen + Ldis.
(4)
(5)
(6)
(7)
When trained properly, The ACGAN can generate synthetic images while it can also give predictions
of real images.
4.2 WHY DOES INTUITIVE COMBINATION FAIL TO WORK WELL?
However, simply combining the ACGAN and a federated learning algorithm to adapt ACGAN to
heterogeneous federated learning yields unpromising results. The instability of ACGAN during
training, which is aggravated in the context of non-IID federated learning leads to the degradation
4
z ~ z ~θ3θ2θglobalCentralized ServerClient 1•••θglobalθglobalθ2θ3θ1θglobalθ1Client 2Client 3 c ~{'N', 'e', 'w' ...} c ~{'N', 'e', 'w' ...} Client 1 z ~ c ~ {'N' ...}Dataset Lc1Lc2Lc3logits z ~ c ~ {'N' ...}LlocalLserverPublished as a conference paper at ICLR 2023
(a) Classification loss
(b) Gradient Norm
Figure 2: The classification losses and gradient norms (i.e., Eq. (6)) of (1) ACGAN + FedProx, (2)
ACGAN (offline) and (3) FedCIL (Ours) of a randomly selected client during a period of training
on EMNIST.
of the model performance. Fig. 2 illustrates this phenomenon. In the simply combined model, the
classification loss experiences undesired peaks in each communication round, which impedes the
training of the generator in ACGAN.
In a single model scenario, the gradient exploding in the classifier of ACGAN have a negative impact
on the training of the generator, which appears more often when the classifier is not well-trained
yet, e.g., on the early training stage. When it happens, the classification loss from Eq.(6) comes into
dominance and breaks the balance between the classification loss from Eq.(6) and the discrimination
loss from Eq.(5). The generation ability will be limited due to such over-tilt since then. Finally
the generation ability is impaired, which impacts the quality of generative replay, leading to more
forgetting. Therefore, we need to prevent the classification loss from growing too high at the early
stages of each communication round.
The standard cross-entropy loss function is written as:
Lce = −Ex∼X [log(
exp(F (x)(cid:62)wy)
(cid:16)
(cid:80)c
j=1 exp
F (x)(cid:62) wj
(cid:17) )]
(8)
where x is the instance from the training data distribution X and y is its label, F is the feature
extractor and W = {w1, ..., wc} is the parameter set of the classifications layer. c is the number of
total classes.
Then the derivative of Eq.(8) w.r.t wk∈{1,2,...,c} is:
∂LCE
∂wk
= −Ex∼X [F (x)(1y=k − log(
exp(F ((x, y))(cid:62)wk)
(cid:16)
F (x)(cid:62) wj
j=1 exp
(cid:80)c
(cid:17) ))]
(9)
where 1y=k is the indicator function whose value equals to 1 if y = k else 0.
Eq.(9) indicates that the gradient norm of Lce is associated with the feature norm (i.e., the norm of
F (x)) and the classification possibilities. Thus the generation ability is more likely to degrade when
the classifier gives inaccurate predictions.
The way clients are trained in federated learning makes such degradation more often. In each com-
munication round, each local client first synchronizes parameters with the global model, which
worsens the performance of the classifier on its local dataset. According to Eq.(9), the gradient
norm tends to grow, which can lead to the gradient exploding. And the large values of LD
ce(θ, X)
from Eq.(6) break the balance between LD
ce(θ, X) and LD
ce(θ, X) limits
the generation ability and finally decreases the model performance, which relies on the quality of
generative replay. Moreover, the training process in federated learning consists of many commu-
nications rounds, which makes it worse because such degradation happens in early stages of every
communication round, throughout the whole training process.
gan(θ, X). The over-tilt to LD
Fig. 2 and 4 illustrates this process. At the beginning of each communication round, the classifi-
cation loss and FID score of ACGAN experiences an obviously peak if simply combining ACGAN
with a FL algorithm (FedProx is used in experiments). It is observed every 400 iterations as we set
local intention T = 400. In a single model scenario without federated learning, i.e., ACGAN (of-
fline), the loss is stable. Our model works in federated learning while the loss curve is comparable
5
Published as a conference paper at ICLR 2023
to ACGAN (offline). Note that ACGAN (offline) indicates the ideal case. Because in FL, clients are
synchronized with the server at every communication round and offline training is unavailable.
4.3 FEDCIL
To address the problems, we propose a new framework (Fig. 1) for class-incremental federated
learning. We denote all parameters of a single client model Ci as θi and that of the global model
G as θglobal. Clients sequentially learn a series of non-overlapped classes. Meanwhile, the server
communicates with the clients multiple rounds to learn all classes seen by all clients so far. During
each round, clients first learn the current or new classes from their own dataset for certain iterations.
Then the model parameters of selected clients are sent to the server, where the global model aggre-
gates the parameters and conduct a model consolidation to enrich itself with the knowledge from
different clients. Finally, the parameters of the global model are sent back the all clients.
Model consolidation. On the server side, the centralized server first receives the parameters (de-
noted by θ1, θ2, ...) sent by selected clients Cselected = {C1, C2, ...}. Then the parameters are merged
to initialize the global model. Note that in CI-FL setting, clients continuously learn new classes, thus
new output nodes are added to the global model if any of the clients learns new classes. In a practical
CI-FL setting, the local data of clients are usually non-IID and more importantly, new classes are
continuously collected and learnt by clients, thus simply merging the parameters often fails in such
case. We proposed to solve this problem by model consolidation. The global model is first initialized
with the merged parameters and an ensemble of classification heads from different clients. Then we
generate balanced synthetic data with collected generator parameters from selected clients. Finally
the global model is consolidated by the ACGAN loss function Lacgan with generated data:
Lserver = Lacgan(θglobal, X g),
where X g are synthetic data generated by collected generators this communication round and θglobal
is the parameter of the generator on the server.
(10)
Consistency enforcement. On the client side, each client owns three modules during the local
training: (1) a ACGAN (2) a copy of the generator of itself Gt−1
θG (yellow generator in Fig. 1) at the
end of last task (3) the global generator GθG
(red generator in Fig. 1) which it received in the
last communication. In local training, the client first initializes itself with received parameter θglobal
from the global model. During the training, the client is expected to effectively learn from new
classes while maintain its knowledge on learnt classes. For this purpose, Gt−1
θG generates samples
X g
t−1 conditioned on labels from previous tasks and they are mixed up with training data X to form
the input for ACGAN loss:
global
Llocal = Lacgan(θ, X g
t−1 ∪ X),
(11)
Although the classifier of a client is trained to give same predictions of the real images and the
synthetic images generated by generators if they have the same label, their features can be different
because their sources are different.
t−1, X g
Denote generated samples by the generator of current model, the generator from last task, and the
t−1 and X g
generator from received global model as X g
g and denote the real sample as X. Given
X g
g and X, to learn a better global model, their features are expected be close to each other
In this case, it is easier to reach a global optimality instead of
when their labels are the same.
sticking in a local optimality or diverges. We propose to achieve it by consistency enforcement,
i.e., aligning the their features produced by intermediate layers of the classifier. To make it simple,
instead of aligning features output by intermediate layers, we try to align their output logits by the
last layer, i.e., the classification layer, which is common in knowledge distillation. In this way, given
different images with the same label but from different generators or the real dataset, the classifier
tends to output similar distributions. Thus the classifier is more robust against images from different
distributions. We use consistency loss functions to ensure this:
Lc1 = min
θC
(−Exg
t−1∼X g
t−1,xg
g ∼X g
g
[DKL(f (θC, xg
t−1) || f (θC, xg
g ))])
Lc2 = min
θC
(−Ex∼X,xg
g ∼X g
g
[DKL(f (θC, x) || f (θC, xg
g ))]),
Lc3 = min
θC
(−Exg
g ∼xg
g ,y(xg
g )∼Y [DKL(f (θC, xg
g ) || y(xg
g ))]),
6
(12)
(13)
(14)
Published as a conference paper at ICLR 2023
Finally, the overall loss function for a client is:
Lc = Lc1 + Lc2 + Lc3,
Lclient = Llocal + Lc,
(15)
(16)
where DKL(P || Q) is the Kullback–Leibler divergence, a measure of how one probability distri-
bution Q is different from the second probability distribution P. θC is the parameter related to the
classification module and f (θC, x) are the softmaxed output logits of the classification head.
Eq.(13) can also be interpreted as using some soft labels for the classification task of real samples.
With proper soft label, the classification module can be trained more stably and has better general-
ization thus can have better performance(Phuong & Lampert, 2019). It is especially fitful for our
CI-FL setting because better generalization benefits both class incremental learning (Mirzadeh et al.,
2020) (Buzzega et al., 2020) and federated learning, where non-IID data requires better generaliza-
tion of the model. Intuitively, Eq.(14) can transfer knowledge from the global model to the client by
the generated data X g
global to enrich the client with global knowledge.
Privacy. To protect privacy in federated learning, only sharing parameters is a simple yet effective
solution. Related works that train a GAN across distributed resources (Zhang et al., 2021; Rasouli
et al., 2020) adopts this strategy. We also adopt this solution and mainly focus on addressing the
catastrophic forgetting problem in CI-FL. Some advanced methods like Private FL-GAN (Xin et al.,
2020), which specifically address the privacy issue, can be integrated into our framework if higher
levels of privacy are required.
5 EXPERIMENTS
5.1 DATASETS
Choice of Datasets. We adopt commonly used datasets for federated learning (FL) (Zhu et al.,
2021b), suggested by the LEAF benchmark (Caldas et al., 2018). Proper modifications are made
according to the definition of our CI-FL setting. For vision tasks, MNIST, EMINST and CelebA
are suggested. We do not use CelebA because it is built as a binary classification task in FL and
not suitable for continual learning setting. Besides, we add use CIFAR-10, which is a simple but
still challenging dataset in data-free class-incremental learning (CIL). They are simple datasets for
classification, but difficult and far from being solved in non-IID FL and CIL (Prabhu et al., 2020).
For all datasets: MNIST, EMINST-Letters, EMNIST-Balanced and CIFAR-10, we build 5 tasks
for each client with 2 classes every task. Details of datasets and data processing can be found in
Appendix A.
5.2 BASELINES
We compare our FedCIL approach with the following baselines, including two representative FL
models and three models for continual federated learning. Details of baselines can be found in
Appendix B. FedAvg (McMahan et al., 2017). FedProx (Li et al., 2020). A representative FL
model which is better at tackling heterogeneity in federated networks than FedAvg. FedLwF-
2T (Usmanova et al., 2021).
It exploits the idea of Learning without Forgetting(LwF) (Li &
Hoiem, 2017) in federated learning. FedProx/FedAvg+ACGAN Replay (Also referred as Fed-
Prox/FedAvg+ACGAN in the paper). It is a combination of FedProx/FedAvg and ACGAN. Fed-
Prox/FedAvg+DGR (Shin et al., 2017). It is a combination of FedProx/FedAvg and Deep Genera-
tive Replay (DGR) (Shin et al., 2017).
5.3 EXPERIMENTAL SETUP
Setting. We use five clients in all experiments and all of them participate in each communication
with the server, following related works (Usmanova et al., 2021) (Hendryx et al., 2021), where five
or less than five clients are used. In (Yoon et al., 2021), the same setting is also used on non-iid-50
dataset. Taking CIL into account when dealing with FL is very challenging, thus existing works and
our work adopt this setting to simplify the case for analysis.
7
Published as a conference paper at ICLR 2023
Table 1: Results on MNIST, EMNIST-Letters, EMNIST-Balanced and CIFAR-10. We report the
accuracy of the global model when all clients finish their training on all tasks, which is referred as
global accuracy.
Model
MNIST
EMNIST-L
EMNIST-B
CIFAR-10
FedAvg (McMahan et al., 2017)
FedProx (Li et al., 2020)
72.28 ± 0.82
72.84 ± 0.73
19.36 ± 0.95
19.69 ± 0.75
17.25 ± 0.25
17.74 ± 0.55
27.21 ± 2.39
27.43 ± 2.46
FedLwF-2T (Usmanova et al., 2021)
75.61 ± 0.93
23.91 ± 0.78
17.22 ± 0.90
27.02 ± 2.38
FedAvg+DGR
FedProx+DGR
97.46 ± 0.51
97.55 ± 0.48
71.92 ± 0.74
71.83 ± 0.65
63.55 ± 0.46
63.55 ± 0.27
37.93 ± 2.27
37.87 ± 2.47
FedAvg+ACGAN Replay
FedProx+ACGAN Replay
97.13 ± 0.35
97.38 ± 0.63
73.85 ± 0.17
73.91 ± 0.29
66.87 ± 0.79
66.19 ± 0.92
38.31 ± 2.64
38.34 ± 2.55
FedCIL (Ours)
99.13 ± 0.34
78.15 ± 0.30
73.12 ± 0.47
45.27 ± 2.42
(a) FedCIL (Ours)
(b) FedProx+DGR
(c) FedProx+AGCAN
Figure 3: The confusion matrices for the global model (classifier) on the server in FedCIL, Fed-
Prox+DGR and FedProx+ACGAN.
Configuration. Unless otherwise specified, we set local training iteration T = 400 and global
communication round R = 200 for all models. As we build five tasks for each client, there are 40
rounds per task. For each local iteration, we adopt mini-batch size B = 32 for MNIST, EMNIST-L,
EMNIST-B and B = 100 for CIFAR-10. The number of generated samples in a iteration is the
same as the mini-batch size. The backbone of the feature extractor is a 3-layer CNN and that of the
generator is a 4-layer CNN with batch normalization layers. The Adam optimizer is used with the
learning rate 1e-4. We run each experiment three times and report the mean and standard deviation.
5.4 RESULTS AND ANALYSIS
Table 1 shows the results on MNIST, EMNIST-Letters, EMNIST-Balanced and CIFAR-10. From
the results we can see catastrophic forgetting becomes more notable as the similarity between tasks
of different clients reduces. FedLwF-2T (Usmanova et al., 2021) outperforms FedAvg and FedProx
on MNIST and EMNIST-Letters. But on EMNIST-Letters and EMNIST-Balanced, with overlapped
classes becoming less or almost none, its performance drops significantly. FedProx/FedAvg+DGR
and FedProx/FedAvg+ACGAN Replay outperforms other baselines by a large margin, which is
more obvious when the setting becomes more difficult. Our model FedCIL further gains more
improvement compared to the two models. We further summarize how our proposed two methods
benefit continual federated learning and illustrate it with examples in Appendix E. More discussions
and results on FedCIL are available in Appendix F.
FedCIL learns better generators. To prevent forgetting, generative replay based methods exploit
a generator to generate data for replay. Thus the quality of generated images has an important
influence on the model performance. The generators of clients in our model generate better data than
others. As stated in the weakness of simple combination, directly training ACGAN in heterogeneous
federated learning setting with a FL algorithm leads to the performance degradation of generators.
This is because the sever-client synchronization in every communication round damages each
client's classification performance on its local dataset at the early training stages of each round.
Such classification accuracy decrease then lead to much larger classification loss according to Eq.
(9). Fig. 2 shows this phenomenon. The unexpected huge classification loss can break the bal-
ance between the losses from Eq. 5 and Eq. 6, thus model will overly tilt to the classification part.
Eventually it weakens the performance of generator.
8
Published as a conference paper at ICLR 2023
Figure 4: FID scores of ACGAN + FedProx,
ACGAN (offline) and ours. A random client is
selected during training on EMNIST.
Figure 5: Visualization of generated images
from clients in FedProx+AC-GAN (first row)
and FedCIL (second row).
From Fig. 2 it is observed that our model doesn't suffer from this problem. Our propose model con-
solidation and consistency enforcement effectively prevent the gradient exploding in early stages of
every communication round, which guarantees the stability of the generator. Fig. 5 shows the gen-
erated images by FedCIL and FedProx+ACGAN. It visualizes that generators in FedCIL generates
images of higher quality than FedProx+ACGAN. FID score can be a measurement of the quality of
generated images (lower is better). Fig. 4 shows that generators in our model is more stable and
have better FID score than FedProx+ACGAN during the training.
FedCIL learns less biased classifiers and generators. Fig. 3 shows the confusion matrices for the
global models in FedCIL, FedProx+DGR and FedProx+ACGAN on EMNIST-Letters. It is observed
that the global classifier in our model is less biased compared with two baselines. In our CI-FL
setting, each client is learning n classes with x instances for one class during a task. If some clients
are learning same classes, the proportion of this class will be larger than other classes. Thus when
the server and clients are synchronized, the server model is prone to be biased towards this class. Our
model consolidation on the server side can effectively alleviate this phenomenon by consolidating
the merged model with balanced generated data. In this way the knowledge on the less frequent
classes can be strengthened. On the client side, with Eq. 15, the global knowledge can be better
transferred to the local clients, preventing the local clients from overfitting to its local dataset.
FedCIL allows more effective server-client communication. Different from class-incremental
learning (CIL), where we only need to address the problem of catastrophic forgetting in a single
model, both server and clients models need to be considered in CI-FL. From the perspective of CIL,
each model can of course learn from the history state of itself. However, with other models available
in the CI-FL, they are also expected to learn from each other. Compared with FedProx+DGR,
where each client keeps a private GAN for generative replay and only synchronize classifiers with
the server model, the generators in FedCIL can effectively learn form others for better generation
ability. Thus the generative replay can be more effective and achieve better performance.
Table 2: Ablation study
Method
Full method
Ablate model consolidation (Eq. 10)
Ablate consistency enforcement (Eq. 15)
Ablate generative replay
Accuracy
78.15 ± 0.30
75.02 ± 0.41
73.91 ± 0.29
19.36 ± 0.95
Ablation Study. We perform ablation studies on EMNIST-Letters to evaluate the contribution of
each component. Table 2 proves the effectiveness of our proposed methods. Each module can
improve the model performance effectively. The results are consistent with our analysis above.
Influence of local iterations. We study how the local iterations T affects our model in Appendix C.
6 CONCLUSION
In this paper, we introduce a practical and challenging federated continual learning scenario, where
a centralized server continuously learns from clients that are incrementally learning new tasks from
a streaming of local data. Furthermore, we find simply adapting generative replay ideas into the
setting fails to work as expected. Then we analyze its weaknesses and propose a new model FedCIL
to address the problems. Experimental results on benchmark datasets manifest its effectiveness.
9
Continual Graph LearningResubmissionFedProx + ACGANFedCIL (Ours)c='0'c='H'c='B'Published as a conference paper at ICLR 2023
REFERENCES
Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars.
Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Confer-
ence on Computer Vision (ECCV), pp. 139–154, 2018.
Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, and Simone Calderara. Dark ex-
perience for general continual learning: a strong, simple baseline. Advances in neural information
processing systems, 33:15920–15930, 2020.
Sebastian Caldas, Sai Meher Karthik Duddu, Peter Wu, Tian Li, Jakub Koneˇcn`y, H Brendan McMa-
han, Virginia Smith, and Ameet Talwalkar. Leaf: A benchmark for federated settings. arXiv
preprint arXiv:1812.01097, 2018.
Fernando E Casado, Dylan Lema, Roberto Iglesias, Carlos V Regueiro, and Sen ́en Barro. Fed-
erated and continual learning for classification tasks in a society of devices. arXiv preprint
arXiv:2006.07129, 2020.
Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet K
Dokania, Philip HS Torr, and Marc'Aurelio Ranzato. On tiny episodic memories in continual
learning. arXiv preprint arXiv:1902.10486, 2019.
Hong-You Chen and Wei-Lun Chao. Fedbe: Making bayesian model ensemble applicable to feder-
ated learning. arXiv preprint arXiv:2009.01974, 2020.
Jiahua Dong, Lixu Wang, Zhen Fang, Gan Sun, Shichao Xu, Xiao Wang, and Qi Zhu. Federated
class-incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition, pp. 10164–10173, 2022.
Sayna Ebrahimi, Franziska Meier, Roberto Calandra, Trevor Darrell, and Marcus Rohrbach. Adver-
sarial continual learning. In European Conference on Computer Vision, pp. 386–402. Springer,
2020.
Yongxin Guo, Tao Lin, and Xiaoying Tang. A new analysis framework for federated learning on
time-evolving heterogeneous data. FL-ICML, 2021a.
Yongxin Guo, Tao Lin, and Xiaoying Tang. A new analysis framework for federated learning on
time-evolving heterogeneous data. 2021b.
Sean M Hendryx, Dharma Raj KC, Bradley Walls, and Clayton T Morrison. Federated reconnais-
sance: Efficient, distributed, class-incremental learning. NeurIPS Workshop on New Frontiers in
Federated Learning, 2021.
Geoffrey Hinton, Oriol Vinyals, Jeff Dean, et al. Distilling the knowledge in a neural network. arXiv
preprint arXiv:1503.02531, 2(7), 2015.
Minguk Kang, Woohyeon Shim, Minsu Cho, and Jaesik Park. Rebooting acgan: Auxiliary classifier
gans with stable training. Advances in Neural Information Processing Systems, 34:23505–23518,
2021.
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A
Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcom-
ing catastrophic forgetting in neural networks. Proceedings of the national academy of sciences,
114(13):3521–3526, 2017.
Abhishek Kumar and Hal Daume III. Learning task grouping and overlap in multi-task learning.
arXiv preprint arXiv:1206.6417, 2012.
Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith.
Federated optimization in heterogeneous networks. Proceedings of Machine Learning and Sys-
tems, 2:429–450, 2020.
Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis
and machine intelligence, 40(12):2935–2947, 2017.
10
Published as a conference paper at ICLR 2023
Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The
sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165.
Elsevier, 1989.
H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Ag ̈uera y Arcas.
Communication-efficient learning of deep networks from decentralized data, 2017.
Seyed Iman Mirzadeh, Mehrdad Farajtabar, Razvan Pascanu, and Hassan Ghasemzadeh. Under-
standing the role of training regimes in continual learning. Advances in Neural Information Pro-
cessing Systems, 33:7308–7320, 2020.
Augustus Odena, Christopher Olah, and Jonathon Shlens. Conditional image synthesis with aux-
iliary classifier gans. In International conference on machine learning, pp. 2642–2651. PMLR,
2017.
Mary Phuong and Christoph Lampert. Towards understanding knowledge distillation. In Interna-
tional Conference on Machine Learning, pp. 5142–5151. PMLR, 2019.
Ameya Prabhu, Philip HS Torr, and Puneet K Dokania. Gdumb: A simple approach that questions
In European conference on computer vision, pp. 524–540.
our progress in continual learning.
Springer, 2020.
Mohammad Rasouli, Tao Sun, and Ram Rajagopal. Fedgan: Federated generative adversarial net-
works for distributed data. arXiv preprint arXiv:2006.07228, 2020.
Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert.
icarl:
In Proceedings of the IEEE conference on
Incremental classifier and representation learning.
Computer Vision and Pattern Recognition, pp. 2001–2010, 2017.
David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy Lillicrap, and Gregory Wayne. Experience
replay for continual learning. Advances in Neural Information Processing Systems, 32, 2019.
Kevin Roth, Aurelien Lucchi, Sebastian Nowozin, and Thomas Hofmann. Stabilizing training of
generative adversarial networks through regularization. Advances in neural information process-
ing systems, 30, 2017.
Paul Ruvolo and Eric Eaton. Ella: An efficient lifelong learning algorithm. In International confer-
ence on machine learning, pp. 507–515. PMLR, 2013.
Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. Continual learning with deep generative
replay. Advances in neural information processing systems, 30, 2017.
Sebastian Thrun. Is learning the n-th thing any easier than learning the first? Advances in neural
information processing systems, 8, 1995.
Anastasiia Usmanova, Franc ̧ois Portet, Philippe Lalanda, and German Vega. A distillation-based
approach integrating continual learning and federated learning for pervasive services. IJCAI 3rd
Workshop on Continual and Multimodal Learning for Internet of Things, 2021.
Gido M Van de Ven and Andreas S Tolias. Three scenarios for continual learning. arXiv preprint
arXiv:1904.07734, 2019.
Chenshen Wu, Luis Herranz, Xialei Liu, Joost van de Weijer, Bogdan Raducanu, et al. Memory
replay gans: Learning to generate new categories without forgetting. Advances in Neural Infor-
mation Processing Systems, 31, 2018.
Yue Wu, Pan Zhou, Andrew G Wilson, Eric Xing, and Zhiting Hu. Improving gan training with
probability ratio clipping and sample reweighting. Advances in Neural Information Processing
Systems, 33:5729–5740, 2020.
Bangzhou Xin, Wei Yang, Yangyang Geng, Sheng Chen, Shaowei Wang, and Liusheng Huang.
Private fl-gan: Differential privacy synthetic data generation based on federated learning.
In
ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing
(ICASSP), pp. 2927–2931. IEEE, 2020.
11
Published as a conference paper at ICLR 2023
Kunran Xu, Lai Rui, Yishi Li, and Lin Gu. Feature normalized knowledge distillation for image
classification. In European Conference on Computer Vision, pp. 664–680. Springer, 2020.
Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. Lifelong learning with dynamically
expandable networks. arXiv preprint arXiv:1708.01547, 2017.
Jaehong Yoon, Wonyong Jeong, Giwoong Lee, Eunho Yang, and Sung Ju Hwang. Federated contin-
ual learning with weighted inter-client transfer. In International Conference on Machine Learn-
ing, pp. 12073–12086. PMLR, 2021.
Yikai Zhang, Hui Qu, Qi Chang, Huidong Liu, Dimitris Metaxas, and Chao Chen. Training
federated gans with theoretical guarantees: A universal aggregation approach. arXiv preprint
arXiv:2102.04655, 2021.
Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, and Vikas Chandra. Federated
learning with non-iid data. arXiv preprint arXiv:1806.00582, 2018.
Hangyu Zhu, Jinjin Xu, Shiqing Liu, and Yaochu Jin. Federated learning on non-iid data: A survey.
Neurocomputing, 465:371–390, 2021a.
Zhuangdi Zhu, Junyuan Hong, and Jiayu Zhou. Data-free knowledge distillation for heterogeneous
federated learning. In International Conference on Machine Learning, pp. 12878–12889. PMLR,
2021b.
A DATASET
• MNIST: It is a digit image classification dataset of 10 classes with a training set of 60,000
instances and a test set of 10,000 instances. We split instances of each class into non-
overlapped parts. Each client randomly picks up two classes without replacement to form
a task and it is repeated for five times for form a sequence of five classes. Note that for
any client, if a class already exists in any of its tasks, the client will not pick up this class
again. This ensures that for any client, a class will not appear more than once in its private
sequence, which is subject to the definition of class-incremental learning. In the setting,
classes from different clients are highly overlapped. Note that although it is highly over-
lapped from the overall view, however, during each task, clients are still learning different
tasks, the data is non-IID and it is still a challenging federated learning problem.
• EMNIST-Letters: It is a character classification dataset of 26 classes containing 145,600
instances. We process this dataset similar to MNIST and each client also randomly picks
up two classes to form a task and repeats five times in total. It is harder because classes
from different clients are less overlapped and the sever eventually learns more classes.
• EMNIST-Balanced: It is a digit and character classification dataset of 47 classes contain-
ing 131,600 instances. We follow the same steps to process this dataset. It is the hardest
because there are almost no overlapped classes from different clients and the server learns
more classes.
• CIFAR-10: It is an image classification dataset of 10 classes with 60,000 instances. The
process on this dateset is the same as MNIST.
Figure 6 illustrates the how we build tasks for clients.
B BASELINES
• FedAvg (McMahan et al., 2017) : It is a representative federated learning model, which
aggregates client parameters in each communication. It is a simply yet effective model for
federated learning.
• FedProx (Li et al., 2020) : It is also a representative federated learning model, which is
better at tackling heterogeneity in federated networks than FedAvg.
12
Published as a conference paper at ICLR 2023
Figure 6: Illustration of how to build tasks for clients. Different color represents different classes.
We split instances of each class into non-overlapped parts. Each client randomly picks up two
classes without replacement to form a task and it is repeated for five times for form a sequence of
five classes. Note that for a client, if a class already exists in any of its tasks, the client will not pick
up this class again. This ensures that for any client, a class will not appear more than once in its
private sequence, which is subject to the definition of class-incremental learning.
• FedLwF-2T (Usmanova et al., 2021). It uses the idea of Learning without Forgetting(LwF)
(Li & Hoiem, 2017) in federated learning. LwF keeps a copy of itself at the end of each task,
which acts as a teacher to remind the current model of previous knowledge via knowledge
distillation (Hinton et al., 2015). FedLwF-2T is similar to LwF and uses the global model
as the second teacher during the local training of the clients.
• FedProx/FedAvg+ACGAN Replay (Also referred as FedProx/FedAvg+ACGAN in the
paper). It is a combination of FedProx/FedAvg and ACGAN. Each client is an ACGAN
based model and uses generative replay (i.e., exploiting the samples generated by the gen-
erator of the ACGAN for replay to prevent forgetting) locally. The global model and the
clients are synchronized by FedProx or FedAvg.
• FedProx/FedAvg+DGR (Shin et al., 2017). It is a combination of FedProx/FedAvg and
Deep Generative Replay (DGR) (Shin et al., 2017). Each client consists of a GAN and a
classifier. The GAN is trained additionally for generative replay. The train process of a
client is the same as the process in (Shin et al., 2017). The global model and the clients (the
classifiers) are synchronized by FedProx or FedAvg.
Figure 7 illustrates our model and baselines.
Figure 7: Illustration of our model and baselines.
C INFLUENCE OF LOCAL ITERATIONS
To study how the number of local iterations affect our model, we experiment on EMNIST-Letters
with different local iterations from 50 to 1000. The accuracy curve tends to be more gentle as the
number of local iteration increases, which is helpful when the local training time is limited. We can
have a compromise between performance and speed according to different application scenarios.
13
Dataset•••Instanceslabels1234•••n1234•••n1234•••n1234•••n1234•••n1234•••nClient 11111••••••Client 212Task 112Task 2•••••••••: A batch of instances of a classiθ3θ2θglobalCentralized ServerClient 1•••θglobalθglobalθ2θ3θ1θglobalθ1Client 2Client 3Server side:Model ConsolidationClient side:Consistency Enforcementθ3θ2θglobalCentralized ServerClient 1•••θglobalθglobalθ2θ3θ1θglobalθ1Client 2Client 3θglobalCentralized ServerClient 1•••θglobalθglobalθ2θ3θ1θglobalθ1Client 2Client 3θGAN-1θ2θGAN-2θ3θGAN-3FedCIL (Ours)FedProx+ACGANFedProx+DGRPublished as a conference paper at ICLR 2023
Figure 8: Influence of different local iterations
D DESIDERATA
We have some desiderata for the proposed setting, which makes the class-incremental federated
learning more general, realistic and challenging, compared with existing works.
1. For a client, it is continuously learning new classes, and the learnt classes will be unavailable in
future tasks. We strictly follow a typical continual learning setting, in which there are no overlapped
classes among tasks, and thus more challenging. This is a significant difference from (Hendryx
et al., 2021) and (Guo et al., 2021b), where any instance only appears once but different instances
of the same class may appear in different tasks in the task sequence of a client.
2. For different clients, there may be overlapped classes in their respective private tasks. This is
practical because each client is learning their own tasks without communicating with each other.
Thus, it is reasonable that we do not put extra assumptions on the overall data distribution of all
clients.
3. The clients are not allowed to store previous data in a buffer, which is consistent with (Usmanova
et al., 2021) and (Yoon et al., 2021).
4. The clients are not allowed to communicate with each other at any time. To follow the privacy
constraints in typical federated learning, neither the raw data sharing between the server and the
clients nor among the clients is allowed.
5. At any given time-step t, the global model should be able to classify all classes that all clients
collected and learned so far. It means that the global model is dynamically updated all the time,
which makes it a powerful lifelong federated learning model. On the contrast, (Yoon et al., 2021)
learns client models and does not maintain a global model that discriminates all classes without
task-IDs.
6. The number of communication rounds should be flexible according to different settings. This
is different from (Usmanova et al., 2021), where a round of communication happens when a client
finishes its learning on a local dataset, which will be no longer available in the next round. Our
assumption is more general and follows a typical continual learning paradigm.
E CASE STUDY
In Section 4.2, we demonstrate when the generation ability of ACGAN degrades and how this phe-
nomenon is aggravated in the context of federated learning. To summarize, the performance of
ACGAN degrades when the gradient norm (Eq.(9)) grows too large and breaks the balance between
LD
ce(θ, X) limits the generation ability and finally de-
creases the model performance.
gan(θ, X). The over-tilt to LD
ce(θ, X) and LD
The gradient exploding happens in early stages of each local training (Fig. 2 and Fig. 4 ). According
to Eq.(9), the gradient norm is associated with 1. the predicted class probability distribution and 2.
feature norms. Our model consolidation and consistency enforcement are designed from the two
perspectives.
E.1 PREDICTED CLASS PROBABILITY DISTRIBUTION
The gradient norms of baseline models are very large at early stage of local training because the
predictions are highly inaccurate at the beginning. Received global model are directly merged from
14
Published as a conference paper at ICLR 2023
(a) FedCIL (Ours)
(b) FedProx+ACGAN Replay
Figure 9: Case study on EMNIST. We record the performance of each client (1-5) on its own local
dataset immediately after it receives the parameters from the global model. We plot this perfor-
mance of each client for several communication rounds during training.
clients from last round via FedAvg or FedProx. Empirically we find such merging hurts the local
performance of clients to a large extend and yields highly inaccurate predictions on local data,
leading to large gradient norms (Eq.(9)).
E.1.1 CASES: WHEN MERGED GLOBAL MODEL IS INACCURATE?
We conduct a case study, where we record the performance of each client on its own local dataset
after it receives the parameters from the global model. Higher performance at this moment indicates
lower gradient norms according to Eq.(9).
In Fig. 9, one client (C4) consistently behaves notably worse than others in the baseline model. In
fact it is common in baseline models and sometimes more than one clients behaves this way. And
the global model is biased towards some classes (Fig .3). We observe this phenomenon happens to
some of the clients in the following cases:
Imbalanced classes For instance, during the first task in EMNIST-L, Client 1 learns classes {18,
23}, Client 2 learns classes {10, 11}, Client 3 learns classes {15, 23}. In this case, after model
averaging on the server, performance on Client 2's local data is impaired and is notably worse than
others. Because Client 1 and Client 3 both learn from class 23, the merged model tends to be biased
towards class 23.
Different difficulty levels (a) For instance, during the second task in EMNIST-L, Client 4 learns
classes {14, 21}, none of which are learnt by other clients before. Client 1 learns classes {2, 20},
where class 2 is learnt by Client 3 in Client 3's previous task. In this case, the merged model has
worse performance on the Client 4's private task than on Client 1's. This is because the merged
model tends to be biased towards easier classes.
Different difficulty levels (b) On EMNIST-B, We also observe that, even when classes are balanced
and all incoming classes are not learnt by any of the clients, i.e., it is not one of the two mentioned
cases above, some clients still learn worse than others. We attribute it to the differences of the
inherit difficulty of different tasks. Clients that are learning more difficult tasks tend to have worse
performance on their local data immediately after receiving the merged global model from the server.
E.1.2 SOLUTIONS: HOW FEDCIL WORKS IN THE CASES?
In model consolidation, synthetic samples, which are used to consolidate the merged model, are gen-
erated by uploaded client models respectively before they are merged to a global model. Thus the
generated image quality is not affected by three cases above. Therefore, consolidating the merged
model with these high-quality synthetic images largely eliminates the model performance degrada-
tion caused by above cases. Besides, we generate balanced samples conditioned on classes, which
additionally helps to solve the class imbalance problem.
After our model consolidation, the server model is less biased towards different clients' tasks or
classes. Fig .3 and Fig. 9 illustrate our effectiveness towards this aspect. Our consistency enforce-
ment does the same thing, but from the perspective of client side: we distill the knowledge from the
global model to local clients by generating class-balanced samples with the global model.
15
Communication rounds (R)Accuracy0.500.550.600.650.700.750.80C1C2C3C4C5Communication rounds (R)Accuracy0.500.550.600.650.700.750.80C1C2C3C4C4Published as a conference paper at ICLR 2023
To summarize, in FedCIL, each client, which is initialized from the our better consolidated global
model, makes more accurate and consistent predictions at the early stage of the local training. It
largely prevents the ACGAN from the early gradient exploding problem.
E.2 FEATURE NORMS
According to Eq.(9), lower feature norms also help to reduce the gradient norms. Previous study (Xu
et al., 2020) reveals that knowledge distillation can help to reduce the overly high feature norms
caused by noisy samples.
From this perspective, the consistency enforcement, which is also a kind of knowledge distillation
in terms of form, can help to reduce the feature norm when training with noisy generated samples,
in addition to its benefits on learning less biased models mentioned in Section 4.3 and appendix E.1.
F DISCUSSIONS
F.1 DIFFERENCES WITH REACGAN
From a high-level view, Both ReACGAN Kang et al. (2021) and our method can stabilize the train-
ing process of ACGANs, but they are designed to solve entirely different problems with different
motivations. Thus it is not surprising that ReACGAN hardly helps to improve the model perfor-
mance in Tab. 3.
Model
FedAvg + DGR
FedAvg + ACGAN Replay
FedAvg + ReACGAN Replay
FedCIL (Ours)
Accuracy
63.55
66.19
65.87
73.12
Table 3: Model Performance with Difference GR Strategies on EMNIST-B.
ReACGAN stabilizes the offline training of one ACGAN by exploiting feature normalization and
relational information in the class-labeled dataset. It doesn't consider challenges from federated
learning and continual learning. In other words, it is neither a federated learning nor a continual
learning algorithm.
Instead, FedCIL stabilizes the distributed training of multiple ACGANs by
improving the server-side aggregation of client models and client-side feature learning (with the
help of the global model). Our model consolidation and consistency enforcement are designed for
the non-iid distribution and the catastrophic forgetting challenges in our continual federated learning
setting. ReACGGN is not designed for these purposes.
F.2 LOCAL PERFORMANCE
A typical federated learning scenario aim to learn a global model with distributed data, and thus
local performance is usually not considered in evaluation. We added experiments to see how the
private performance vary across different models. Tab 4 shows the results.
Model
FedProx + DGR
FedProx + ACGAN Replay
FedCIL (Ours)
Accuracy
85.97
86.40
88.73
Table 4: Local Model Performance on EMNIST-L.
16
Published as a conference paper at ICLR 2023
It is interesting that our model has higher average private accuracy on the client side. We agree
that in federated learning, better global accuracy often contradicts local accuracy. In the extreme
case, if each client only does local training without communications, it is more likely to have higher
performance on its own dataset with low global accuracy. Here we believe the continual learning
part plays an important role. Because our model better remembers previous knowledge, the extra
benefits from continual learning leads to its higher accuracy.
17
|
|
http://arxiv.org/abs/2302.13000v2 | 2023-08-26T06:20:33 | 2023-02-25T06:23:45 | Inaccurate Label Distribution Learning | Label distribution learning (LDL) trains a model to predict the relevance of
a set of labels (called label distribution (LD)) to an instance. The previous
LDL methods all assumed the LDs of the training instances are accurate.
However, annotating highly accurate LDs for training instances is
time-consuming and very expensive, and in reality the collected LD is usually
inaccurate and disturbed by annotating errors. For the first time, this paper
investigates the problem of inaccurate LDL, i.e., developing an LDL model with
noisy LDs. We assume that the noisy LD matrix is a linear combination of an
ideal LD matrix and a sparse noise matrix. Consequently, the problem of
inaccurate LDL becomes an inverse problem, where the objective is to recover
the ideal LD and noise matrices from the noisy LDs. We hypothesize that the
ideal LD matrix is low-rank due to the correlation of labels and utilize the
local geometric structure of instances captured by a graph to assist in
recovering the ideal LD. This is based on the premise that similar instances
are likely to share the same LD. The proposed model is finally formulated as a
graph-regularized low-rank and sparse decomposition problem and numerically
solved by the alternating direction method of multipliers. Furthermore, a
specialized objective function is utilized to induce a LD predictive model in
LDL, taking into account the recovered label distributions. Extensive
experiments conducted on multiple datasets from various real-world tasks
effectively demonstrate the efficacy of the proposed approach. \end{abstract} | [
"Zhiqiang Kou",
"Yuheng Jia",
"Jing Wang",
"Xin Geng"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13000v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13000v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
1
Inaccurate Label Distribution Learning
Zhiqiang Kou, Yuheng Jia, Member, IEEE, Jing Wang, Xin Geng, Senior Member, IEEE,
3
2
0
2
g
u
A
6
2
]
G
L
.
s
c
[
2
v
0
0
0
3
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-Label distribution learning (LDL) trains a model to
predict the relevance of a set of labels (called label distribution
(LD)) to an instance. The previous LDL methods all assumed the
LDs of the training instances are accurate. However, annotating
highly accurate LDs for training instances is time-consuming
and very expensive, and in reality the collected LD is usually
inaccurate and disturbed by annotating errors. For the first
time, this paper investigates the problem of inaccurate LDL,
i.e., developing an LDL model with noisy LDs. We assume that
the noisy LD matrix is a linear combination of an ideal LD
matrix and a sparse noise matrix. Consequently, the problem of
inaccurate LDL becomes an inverse problem, where the objective
is to recover the ideal LD and noise matrices from the noisy LDs.
We hypothesize that the ideal LD matrix is low-rank due to the
correlation of labels and utilize the local geometric structure of
instances captured by a graph to assist in recovering the ideal LD.
This is based on the premise that similar instances are likely to
share the same LD. The proposed model is finally formulated as
a graph-regularized low-rank and sparse decomposition problem
and numerically solved by the alternating direction method
of multipliers. Furthermore, a specialized objective function is
utilized to induce a LD predictive model in LDL, taking into
account the recovered label distributions. Extensive experiments
conducted on multiple datasets from various real-world tasks
effectively demonstrate the efficacy of the proposed approach.
Impact Statement-LDL has gained popularity among re-
searchers for addressing label ambiguity problems and yielding
promising results. It provides precise supervision information
for finer-grained predictions. However, accurate labeling of
training instances is time-consuming and expensive,
leading
to inaccuracies and noise in real-world scenarios. To address
this challenge, this paper introduces a novel method based
on graph-regularized low-rank and sparse decomposition. Our
method enhances model robustness against label distribution
noise, ensuring reliable performance in challenging conditions.
It has the potential to support various LDL methods, including
facial expression recognition, facial age estimation, and other
intelligent detection and recognition scenarios.
Index Terms-Label distribution learning, Inaccurate label
distribution learning, Multi-label learning, Noise label learning.
I. INTRODUCTION
L ABEL distribution learning (LDL) is an emerging topic
in machine learning. Different from the traditional single-
label learning and multi-label learning, which use binary value
to specify whether an instance is related to a certain label, LDL
solves the problem of to what degree a label can describe an
instance. This powerful learning paradigm is good at handling
label ambiguity and has many real-world applications, like
music classification [1], breast tumor cellularity assessment
[2], and facial age estimation [3].
The authors are with the School of Computer Science and Engineering,
Southeast University, Nanjing 211189, China, and also with the Key Labora-
tory of Computer Network and Information Integration (Southeast University),
Ministry of Education, Nanjing 211189, China.
Corresponding author: Xin Geng and Yuheng Jia.
Fig. 1: Illustration of the inaccurate label distribution learning prob-
lem. (a) denotes is a natural scene image, (b) and (c) denote the
correct label distribution and inaccurate label distribution, and (d)
indicates the label distribution recovered by the proposed method
from the inaccurate label distribution.
LDL was first proposed by Geng [4]. In LDL, the relative
importance of each label to an instance is called the description
degree, which is captured by a label distribution (LD). Fig.
1(a) shows a multi-label scene image, where "lake" has higher
importance than "cloud", and at the same time both of them
are positive labels, so it makes sense to know the description
degree of each label, which forms an LD as shown in Fig. 1(b).
Similar to other machine learning paradigms, in the training
phase of LDL, a training set with many instances and the
annotated LDs are given to train an LDL model. In the test
phase, the learned LDL model is used to predict the LD for
an unseen sample.
To solve the LDL problem, different models have been
proposed. For example, Jia et al. [5] used label correlations
on local samples and proposed two new LDL algorithms,
called GD-LDLSCL and Adam-LDL-SCL, respectively. In
order to solve the objective mismatch and improve the clas-
sification performance of LDL, Wang and Geng [6] proposed
the label distribution learning machine. To reduce the high
computational overhead of LDL, Tan et al [7] developed an
LDL algorithm based on stream learning with multiple output
regression, called MDLRML. To avoid the problem that LDL
treats data differently in the training stage and testing stage,
Wang et al. [8] proposed the re-weighting large margin label
distribution learning. Considering the label ranking relation-
ships, Jia et al. [9] introduced a ranking loss function to the
traditional LDL models.
Motivation: Although those LDL methods have achieved
great success in many applications, all of them assumed
that the LDs of the training instances are accurate, however,
mountaintreeskycloudlakeLabel distributionLabel distributionLabel distribution0.80.60.40.20.00.80.60.40.20.00.80.60.40.20.0mountaintreeskycloudlakemountaintreeskycloudlake(b) The ground truth LD (d) The recovered LD by our method(c) The inaccurate LD(a) A natural scene example
2
JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
precisely assigning an accurate LD to an instance is extremely
time-consuming and expensive. Therefore, in reality, the LDs
collected in the training set are usually inaccurate with many
noises, and inaccurate LDs become a common phenomenon
in LDL. For example, Fig. 1(b) shows the ground truth LD of
an instance, and Fig. 1(c) denotes the inaccurate LD, which
puts higher description degree to the label "colud" and lower
description degree to the label "lake". It is very important
to investigate how to construct a reliably LDL model with
inaccurate LDs, which unfortunately has been overlooked by
the previous researches.
In this paper, we study the problem of inaccurate label
distribution learning (ILDL), i.e., design an LDL model with
a training set annotated by inaccurate LD, for the first time.
Specifically, we assume that the inaccurate LD is the linear
combination of an ideal LD and a sparse noise. Then, the ILDL
problem can be treated as an inverse problem to separate the
ideal LD and the noise label from the inaccurate observations.
To this end, we collect the LDs of all the instances to construct
an LD matrix and assume that the ideal LD matrix is low-
rank, since the labels are usually correlated to each other
in multi-label learning [10], and the noise label matrix is
sparse due to the fact that the coarse labeling usually generates
only a small fraction of noise. Moreover, if two instances are
similar enough, their LDs should also be similar to each other.
Motivated by this observation, we use the local similarity
structure of the instrances to assist the recovery of the ideal
LD. Finally, we formalize the proposed model as a low-rank
and sparse decomposition problem with a graph regularization
(LSag) and solve it using the alternating direction method of
multipliers (ADMM) [11]. The recovered LD are taken into
consideration when inducing a LD predictive model for LDL,
achieved through the utilization of a specialized objective
function. Extensive experiments validate the advantage of our
approach over the state-of-the-art approaches.
We organize the rest of the paper as follows. First, related
works on LDL are briefly discussed. Second, technical details
of the proposed approach are introduced. Third, experimental
results of comparative studies are reported. Finally, we con-
clude this paper.
II. RELATED WORK
A. Lable Distribution Learning
As a new learning paradigm, LDL can better describe the
labeling degree of an instance than the traditional multi-label
learning. Accordingly, LDL has attracted a lot of attention. In
this section, we briefly review the researches in LDL.
The develop of LDL is inspired by solving various real-
world applications. For example,
in the early years, LDL
shined in facial age recognition task [12]. After that, Geng
[13] proposed an LDL-based head pose estimation algorithm,
which makes full use of the multi-label distribution infor-
mation. Zhou et al. [14] found that all facial expressions in
nature cannot be defined by a binary label, and accordingly,
they developed a facial emotion recognition algorithm based
on LDL. In addition, the idea of LDL has been applied to
the prediction of multi-component compositions of Martian
craters [15], age estimation of the speaker [16], indoor crowd
counting [17], and infant age estimation [18].
i.e.
Apart from the real-world applications, many researches
focus on developing an effective LDL model for general
purposes. We roughly divide the existing LDL algorithms into
three categories. The first category converts the LDL problem
transforming the
learning problem,
into a single-label
training samples into a set of weighted single-label samples.
The representative algorithms are PT-SVM and PT-Bayes [4],
which use the SVM algorithm and the Bayes classifier to
solve the transformed weighted single-label learning problem.
The second category is algorithm adaption, which extends
the traditional machine learning algorithms to deal with the
LDL problem. For example, the K-nearest neighbors (KNN)
classifier finds the top k neighbors of an instance and uses
the average labels of the top k neighbors as the prediction
of the LD of that
instance. Backpropagation (BP) neural
networks can directly minimizes the descriptive degree of the
final prediction through the BP algorithm. The last category
is specialized algorithms, such as IIS-LDL and BFGS-LDL
[12]. They formulated LDL as a regression problem and used
an improved iterative scaling algorithm and a quasi-Newton
method to solve the final regression problem, respectively.
As the LDs are usually annotated by different persons with
diverse levels of experience, assigning a precise description
degree to all instances is very challenging, and inaccurate LD
is a common phenomenon in LDL. However, the previous
researches all assumed the LD of the training set is accurate,
which cannot handle the inaccurate LDL problem. This paper
will investigate the inaccurate LDL problem for the first time.
III. THE PROPOSED METHOD
Notations: Let X = [x1, x2, . . . , xn] ∈ Rn×d denote
the feature matrix, and Y = {y1, y2, . . . , ym} be the label
space, where n, m, and d denote the number of instances,
the number of the labels and the dimension of features.
The training set of the LDL problem is represented as:
T = {(x1, d1) ,
(x2, d2) , . . . , (xn, dn)}, where di =
(cid:3) is the label distribution vector to the ith
(cid:2)dy1
, . . . , dym
, dy2
xi
xi
xi
sample xi. dy
xi indicates the importance degree of label y to xi,
which satisfies dy
y dy
x = 1. The LD matrix of
xi
all the instances is denoted as D = [d1, d2, . . . , dn] ∈ Rn×m.
LDL aims to learn a mapping function from T, which can
predict the LD for unseen instances.
∈ [0, 1] and (cid:80)
The traditional LDL approaches all assume that LD matrix
D is accurate, but considering the fact that precisely annotating
the LD for an instance is very costly, in reality, the collected
LD matrix is usually not accurate, which is polluted by
labeling noise. Directly training an LDL model with noisy
LD will certainly result in unsatisfactory performance. To this
end, this paper investigates the problem of inaccurate LDL,
which can construct a reliable LDL model from the noisy LD.
A. Low-rank and Sparse Decomposition of the Noisy Label
Distribution
To achieve inaccurate LDL, we assume that the observed
noisy LD matrix is the linear combination of an ideal LD
FIRST A. AUTHOR et al.: BARE DEMO OF IEEETAI.CLS FOR IEEE JOURNALS OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE
3
matrix and labeling error matrix, i.e.,
D = (cid:101)D + E,
(1)
where (cid:101)D ∈ Rn×m denotes the to be recovered ideal LD
matrix, E ∈ Rn×m represents the error term in the LD.
Accordingly, the inaccurate LDL problem becomes an inverse
problem, i.e., recovering the ideal LD matrix (cid:101)D and the error
matrix E from the inaccurate LD matrix D.
To solve the inverse problem, we need to leverage the
characteristics of the ideal LD matrix and error matrix. In
LDL, each instance has multiple valid labels, and the label
correlations exist in most multiple label learning problems.
Due to label correlations, the ideal LD matrix is supposed
to be low-rank. Note that the low-rankness of the LD matrix
has been verified in [10]. Besides, although the given LD is
not accurate, it is usually annotated by different persons with
some training on annotation, we assume that only minority
proportion of the LDs is inaccurate, and accordingly,
the
error matrix is sparse. Based on the above assumptions, the
proposed ILDL problem is preliminarily formulated as
rank( (cid:101)D) + α card(E)
min
(cid:101)D,E
s.t. D = (cid:101)D + E,
(2)
where rank( (cid:101)D) denotes the rank of the ideal LD matrix,
card(E) records the number of non-zero elements in E, and
α is the trade-off parameter. By solving Eq. (2), the noisy LD
matrix D will be decomposed to a low-rank ideal LD matrix
(cid:101)D and a sparse error term E.
B. Exploiting Instances Correlations by Adaptive Graph
Learning
The correlations among the instances are also important
for recovering the ideal LD, i.e. if two instances are close in
feature space, their ideal LDs should also be similar to each
other. In order to capture the similarity relationships of the
instances, we construct an adaptive graph A ∈ Rn×n as:
with the (i, i)-th element ˆAii = (cid:80)n
j=1 [(aij + aji) /2]. By
minimizing Eq. (4), two instances with similar feature repre-
sentations will tend to own the similar LDs.
C. Model Formulation
Combining the above priors, our model is formulated as:
rank( (cid:101)D) + α card(E) + β Tr
min
(cid:101)D,E
s.t. D = (cid:101)D + E,
(cid:16)
(cid:101)DL (cid:101)DT(cid:17)
(5)
where β is the trade-off parameter. As the rank function
rank(*) and the card function card(*) are both non-convex and
discrete, Eq. (5) is difficult to solve. Therefore, we relax those
two terms by the associated convex surrogates, i.e. nuclear
norm for rank(*) and l1 norm for card(*), and our model
finally becomes
α∥E∥1 + ∥ (cid:101)D∥∗ + β Tr
min
(cid:101)D,E
s.t. D = (cid:101)D + E.
(cid:16)
(cid:101)DL (cid:101)DT(cid:17)
(6)
By solving Eq. (6), we can recover an ideal LD and a sparse
error matrix from the noise LD. Then any LDL algorithms can
be applied on (cid:101)D to learn a reliable label distribution prediction
model.
D. Making Prediction
After solving Eqs. (3) and (6), a clean LD is learned, since
di is a real-valued quantity, multi-output support vector regres-
sion (MSVR) [19], [20] is utilized to address this scenario.
In this approach, a kernel regression model is employed to
parameterize the label distribution predictor:
min
ai
n
(cid:88)
j=1
(cid:18) 1
2
∥xi − xj∥2
2 aij + γa2
ij
(cid:19)
(3)
s.t. ai
T 1n = 1n, ∀i.j, 0 ≤ aij ≤ 1,
where aij is the (i, j)-th element of A, which represents the
similarity between xi and xj, 1n ∈ R1×n is an all ones vector
with size n, and γ > 0 is a trade-off parameter. The first term
in Eq. (3) ensures that aij is larger when xi and xj are similar
to each other. The second term of Eq. (3) avoids the trivial
solution, i.e., A becomes an identity matrix. The constraints of
Eq. (3) guarantee that the similarities among instances are non-
negative and the similarity matrix is normalized. After solving
Eq. (3), we use the similarity relationship A of samples to
guide the ideal LD recovery, i.e.,
min aij
(cid:13)
(cid:13)
(cid:13)(cid:101)di −(cid:101)dj
(cid:13)
2
(cid:13)
(cid:13)
= Tr
(cid:16)
(cid:101)DL (cid:101)DT(cid:17)
,
(4)
(cid:88)
i,j
where Tr(*) is the trace of a matrix. L = ˆA+(cid:0)A + A⊤(cid:1) /2 ∈
Rn×n is the graph Laplacian matrix, ˆA is a diagonal matrix
1
min
2
(Θ,b)
s.t ∀i, (cid:101)dj
i
∥Θ∥2
F + κl((Θ, b))
(cid:0)θ⊤
j φ (xi) + bj
(cid:1) ⩾ 0,
(7)
where Θ = [θ1, θ2, . . . , θq] and b = [b1, b2, . . . , bq]⊤ signify
the weight matrix and the bias vector of the regression
model, respectively. As indicated in Eq. (7), the first term
is responsible for regulating the complexity of the resulting
model. The second term represents the hinge loss, and its
specific definition is as follows: l((Θ, b) = max(0, ui − ε),
here ui = ∥ei∥ = (cid:112)e⊤
i ei with ei = (cid:101)di − Θ⊤φ (xi) − b.
The hinge loss generates an insensitive zone around the
estimation, determined by ε. In other words, any loss of
ui smaller than ε will be disregarded. The constraint
is
employed to maintain consistency between the signs of the
prediction and the ideal LD matrix (cid:101)dj
i . In order to facilitate the
optimization of the objective function, we relax the constraint
to: ∀i, (cid:101)dj
θ⊤
j φi =
i
− tr
(cid:0)θ⊤
(cid:17)
(cid:16)ˆL⊤ΘΦ
, where Φ = [φ1, φ2, . . . , φn].
(cid:1) ⩾ 0 = − (cid:80)n
j φ (xi) + bj
j=1 (cid:101)dj
xi
(cid:80)c
i=1
4
JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
E. Numerical Solution of Eq. (6)
F. Numerical Solution of Eq. (3)
We use ADMM to solve problem (6), which is good
at handling the equality constraints. First, we introduce an
intermediate variable Z ∈ Rn×m, and rewrite Eq. (6) as :
(cid:16)
(cid:101)DL (cid:101)DT(cid:17)
α∥E∥1 + ∥Z∥∗ + β Tr
min
(cid:101)D,E
s.t. D = (cid:101)D + E, (cid:101)D = Z.
Then, the augmented Lagrangian form of Eq. (8) is:
(cid:101)DL (cid:101)DT(cid:17)
(cid:16)
(cid:16)
μ
2
L( (cid:101)D,E,Z,Γ1,Γ2) = β Tr
+ ⟨Γ1, (cid:101)D + E − D⟩ +
2
2
F + ∥ (cid:101)D − Z∥
F
∥ (cid:101)D + E − D∥
(cid:17)
+α∥E∥1 +∥Z∥∗ +⟨Γ2, (cid:101)D − Z⟩
(9)
,
(8)
where Γ1 ∈ Rn×m, Γ2 ∈ Rn×m denote the Lagrangian mul-
tipliers, μ is a positive penalty parameter, ∥ * ∥2
F is Frobenius
norm, ⟨*⟩ denotes the inner product of two vectors. Eq. (9) can
be solved by alternately solving the following sub-problems:
1) Z-Subproblem is formulated as:
min
Z
∥Z∥∗ + ⟨Γ2, (cid:101)D − Z⟩ +
μ
2
∥ (cid:101)D − Z∥2
F .
(10)
Eq. (10) is a nuclear norm minimization problem, with
a closed-form solution, i.e, [21]
Zk+1 = J1/μ
(cid:18)
(cid:101)Dk+1 +
(cid:19)
,
Γk
2
μk
(11)
where J (*) is single value thresholding operator, which
firstly performs singular value decomposition on (cid:101)Dk+1+
2/μk = U ˆΣV⊤, and then the solution is given by
Γk
U ˆΣV⊤, where ˆΣii = max (0, Σii − 1/μ).
+ ⟨Γ1, (cid:101)D + E − D⟩
(cid:16)
2) (cid:101)D-Subproblem is formulated as:
(cid:101)DL (cid:101)DT(cid:17)
μ
2
min
(cid:101)D
+ ⟨Γ2, (cid:101)D − Z⟩ +
β Tr
(cid:16)
∥ (cid:101)D + E − D∥
2
2
.
F + ∥ (cid:101)D − Z∥
F
(12)
Eq. (12) can be solved by setting the first-order deriva-
tive to zero, i.e.,
(cid:17)
(cid:101)Dk+1 = −μk (ψ1 + ψ1) / (cid:0)2Lk + 2μkI(cid:1) .
2/μk, ψ2 = D − E − Γk
where ψ1 = Z − Γk
Rn×n is an all ones matrix.
3) E-Subproblem is represented as:
(13)
1/μk, I ∈
min
E
α∥E∥1 +⟨Γ1, (cid:101)D+E−D⟩+
μ
2
∥ (cid:101)D+E−D∥2
F .
(14)
Eq. (14) can be sloved by
(cid:18)
Ek+1 = δα/μ
D − (cid:101)Dk+1 +
(cid:19)
,
Γk
1
μk
(15)
where δα/μ(*) is the soft-thresholding operator [22]:
δω(a) = sgn(a) for |a| ≥ ω and zero otherwise.
4) The update multipliers and penalty parameter are up-
dated by
Γk+1
1 = Γk
2 = Γk
1 + μk (cid:16)
2 + μk (cid:16)
Γk+1
μk+1 = min (1.1μ, μmax) .
(cid:101)Dk+1 + Ek+1 − Dk+1(cid:17)
(cid:101)Dk+1 − Zk+1(cid:17)
To solve Eq. (3), we rewrite it as
(cid:13)
n
2
(cid:88)
(cid:13)
(cid:13)
(cid:13)
2
min
ai
1
4r
ai +
(cid:13)
(cid:13)
(cid:13)
(cid:13)
1
2
ui
j=1
aij
(17)
T 1n = 1n, ∀i.j, 0 ≤ aij ≤ 1,
s.t. ai
2 ∥xi − xj∥2. Eq. (17) can be solved column-
where uij = β
wisely, and the corresponding Lagrangian function of problem
(17) regarding the i-th column is
(cid:13)
(cid:13)
(cid:13)
(cid:13)
1
ai +
2
i 1n − 1(cid:1) − ρT
where π is a scalar and ρ is a Lagrangian coefficient vector.
According to the KKT conditions [23], we have
L (ai, π, ρ) =
− π (cid:0)aT
1
4r
i ai,
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
2
(18)
aij
ui
1
4r uj + aij − π − ρj = 0,
∀j,
ρj ≥ 0,
∀j,
∀j, aijρj = 0.
0 ≤ aij ≤ 1,
After solving the KKT conditions, we have
aj = (fj − ̄ρ)+
(19)
(20)
and f = p − 11T
n p + 1
n 1, and ̄ρ is the root
where ̄ρ = 1⊤ρ
n
of the following equation
n
(cid:88)
f ( ̄ρ) =
1
n
j=1
( ̄ρ − fij)+ − ̄ρ = 0.
(21)
Eq. (21) can be solved efficiently by the Newton method
̄ρt+1 = ̄ρt −
f ( ̄ρt)
f ′ ( ̄ρt)
,
(22)
where f ′(X) represents the partial derivative of X.
G. Numerical Solution of Eq. (7)
To minimize the objective function, we opt for an it-
erative quasi-Newton method called Iterative Re-Weighted
Least Square (IRWLS) [24]. Initially, the objective function is
approximated by its first-order Taylor expansion at the solution
of the current k-th iteration, denoted by Θ(k):
̃l (ui) = l
(cid:17)
(cid:16)
u(k)
i
+
dl
du
(cid:12)
(cid:12)
(cid:12)
(cid:12)u(k)
i
(cid:16)
(cid:17)⊤
e(k)
i
u(k)
i
(cid:16)
ei − e(k)
i
(cid:17)
(23)
and u(k)
where e(k)
are calculated using Θ(k) and b(k).
Subsequently, a quadratic approximation is further constructed
as:
i
i
̄l (ui) = l
(cid:17)
(cid:16)
u(k)
i
+
dl (ui)
dui
(cid:12)
(cid:12)
(cid:12)
(cid:12)u(k)
i
=
1
2
ξiu2
i + τ,
where
(cid:17)2
u2
i −
(cid:16)
u(k)
i
2u(k)
i
(16)
ξi =
1
u(k)
i
l (ui)
dui
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)u(k)
i
=
0
2
(cid:16)
u(k)
i < ε
u(k)
i ≥ ε
(cid:17)
u(k)
i −ε
u(k)
i
(24)
(25)
FIRST A. AUTHOR et al.: BARE DEMO OF IEEETAI.CLS FOR IEEE JOURNALS OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE
5
and τ is a constant term that does not rely on either Θ(k) or
b(k). By combining Eq. (7) and (24), our objective function
can be rewritten as:
min
(Θ,b)
1
2
∥Θ∥2
F +
1
2
n
(cid:88)
κ
ξiu2
i − ν tr
(cid:16)
(cid:17)
(cid:101)D⊤ΘΦ
F − ν tr
=
+
1
2
1
2
∥Θ∥2
(cid:18)(cid:16)
κ
(cid:16)
i=1
(cid:17)
(cid:101)D⊤ΘΦ
(cid:16)
(cid:17)
(cid:101)D − Θ⊤Φ
H
(cid:101)D − Θ⊤Φ
(26)
.
(cid:17)⊤(cid:19)
Here, H = [hij]n×n, where hij = ξiδij, and δij
is
the Kronecker's delta function. By setting the corresponding
gradient to zero:
∇Θ = κΦHΦ⊤Θ − κΦH (cid:101)D⊤ + νΦ (cid:101)D⊤ + Θ = 0
(27)
the solution is obtained as
Θs = (cid:0)κΦHΦ⊤ + I(cid:1)−1 (cid:16)
κΦHD⊤ − νΦ (cid:101)D⊤(cid:17)
(28)
Then, the solution for the next iteration, Θ(k+1), is obtained
using a line search algorithm with Θs and Θ(k). Finally, after
normalizing the prediction results, we obtain the predicted
label distribution. In addition, our method can also cooperate
with any LDL (Label Distribution Learning) algorithm. The
overall algorithm flowchart is shown in Algorithm 1.
IV. EXPERIMENTAL RESULTS AND ANALYSES
A. Datasets
In this section, we present the datasets employed in our ex-
periments to assess the performance of our proposed method.
A total of 15 datasets are utilized, and their details are provided
in Table I. The datasets encompass a broad spectrum of
domains, such as biology, film, facial expression analysis,
images from social media platforms, facial beauty perception,
and natural scene classification. This diverse assortment of
datasets enables us to evaluate the adaptability of our proposed
method across various application contexts.
The first, third, and fourth datasets, M2B [25] , SCUT-FBP
[26], and fbp5500 [27], focus on facial beauty perception.
For M2B and SCUT-FBP, the features and label distributions
are processed according to [28]. For fbp5500, we utilize the
ResNet [29] trained by the authors to extract 512-dimensional
features.
The second datasets, RAF-ML, pertains to facial expres-
sion recognition, with each image characterized by a 2000-
dimensional DBM-CNN feature and a 6-dimensional expres-
sion distribution [30]. To reduce the feature dimensionality, we
apply principal component analysis (PCA), resulting in 200-
dimensional features.
The sixth and seventh datasets, flickr-ldl and twitter-ldl
datasets [31]. These datasets comprise 10,045 and 10,700
images, respectively, annotated with 8 prevalent emotions.
Both logical labels and label distributions are provided for
these datasets. Image features are extracted utilizing VGGNet
and subsequently dimensionality-reduced to 200 using PCA.
Seventh and Eighth datasets : These datasets are related
to yeast, focusing on the budding yeast Saccharomyces cere-
visiae. Each dataset represents the results of distinct biological
Algorithm 1 The pseudo-code of the proposed method
Input:
T: the noisy training set {(xi, di) | 1 ≤ i ≤ n};
α, β: the trade-off parameters in the loss fuction (6);
x∗: the unseen instance to be predicted;
Output:
(cid:101)D, E: the recovered LD matrix and the noise LD matrix;
d∗:
approach;
the predicted LD for the unseen instance x∗ by our
Process:
1: Calculate the adaptive similarity graph A by solving Eq.
(3);
2: Calculate the graph Laplacian matrix L;
3: Initialize the n × m ideal LD matrix (cid:101)D=D;
4: Initialize the n × m noise LD matrix E = 0;
5: Initialize the n × m intermediate variable matrix Z=D;
6: repeat
7:
8:
9:
10:
Update (cid:101)D by solving Eq. (13);
Update E according to Eq. (15);
Update Z according to Eq. (11);
Update the Lagrangian multipliers and penalty param-
eter according to Eq. (16);
11: until convergence
12: return (cid:101)D, E;
13: Form
(cid:110)(cid:16)
the
xi, (cid:101)D(:, i)
(cid:17)
clean
| 1 ≤ i ≤ n
training
(cid:111)
;
set
(cid:98)T
=
14: Initialize the predictive model Θ(0), T=0;
15: repeat
16:
17:
18:
19: until convergence
Calculate Θ(s) via Eq. (28);
Update Θ(t+1) via line searching with Θ(t) and Θ(s)
t=t+1;
Output: The predictive LD of unseen instance Θ(x∗)
Index
1
2
3
4
5
6
7
8
9
10
11
12
Data sets
M2B
RAF-ML
SCUT-FBP
fbp5500
flickr-ldl
twitter-ldl
Yeast-cdc
Yeast-alpha
SBU-3DFE
Movie
s-JAFFE
Nature-scene
examples
1240
4908
1500
5500
11150
10040
2465
2465
2500
7755
213
2000
features
250
200
300
512
200
200
24
24
243
1869
243
294
labels
5
6
5
5
8
8
15
18
6
5
6
9
TABLE I: Details of the datasets.
experiments, involving a total of 2,465 yeast genes described
by a phylogenetic profile vector with 24 features. The expres-
sion level of each gene at different time points is represented
by the corresponding label's normalized description degree.
The ninth and eleventh datasets are s-JAFFE and SBU-
3DFE, are extended versions of widely-used facial expres-
sion databases, JAFFE [32] and BU 3DFE [33], respectively.
SJAFFE contains 213 grayscale images with 243-dimensional
LBP features [34]. Each image is scored by 60 individuals
6
JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
Measure
Chebyshev ↓
Formula
Dis1(d, ˆd) = maxj
(cid:115)
Clark
Dis2(d, ˆd) =
(cid:80)c
j=1
(cid:12)
(cid:12)
(cid:12)dj − ˆdj
(cid:12)
(cid:12)
(cid:12)
(dj − ˆdj)2
(dj + ˆdj)2
|dj − ˆdj|
dj + ˆdj
dj
ˆdj
j=1 dj ln
(cid:80)c
ˆdj
j=1 dj
(cid:113)(cid:80)c
Dis3(d, ˆd) = (cid:80)c
Dis4(d, ˆd) = (cid:80)c
j=1
Sim1(d, ˆd) =
j=1 d2
j
(cid:113)(cid:80)c
Dis5(d, ˆd) = 2|d∩ ˆd|
|d|+| ˆd|
(cid:16)
i min
Sim1(d, ˆd) = (cid:80)
(cid:17)
d, ˆd
ˆd2
j
j=1
Canberra ↓
Kullback-Leibler↓
cosine ↑
Sφrensen ↓
intersection↑
TABLE II: The distribution distance/similarity measures.
on six basic emotions, and the normalized average scores
create the label distribution. Similarly, SBU 3DFE consists
of 2,500 images scored by 23 individuals, resulting in a label
distribution version of the dataset.
The tenth dataset is a movie genre dataset contains informa-
tion about various movies and their associated genres. Features
are extracted from movie metadata, such as cast, director,
plot, and release year, resulting in a multi-dimensional feature
vector for each movie. The label distribution is determined by
calculating the proportions of each genre associated with the
movie.
The last dataset is natural scene dataset, which contains
2,000 images with inconsistent multi-label rankings. Ten hu-
man annotators ranked the images using nine possible labels. A
non-linear programming process transformed the inconsistent
rankings into label distributions, and a 294-dimensional feature
vector was extracted for each image.
B. Evaluation Metrics
In this study, we employ a combination of six metrics to
evaluate the performance of the LDL algorithms. These met-
rics comprise five distance-based measures and one similarity-
based measure, as follows:
Chebyshev↓ Clark↓ Kullback-Leibler
(KL)↓ Canberra↓
Sφren↓ Cosine↑ intersection↑. The formulas for these metrics
are provided in Table 2. In these formulas, d represents the
actual label distribution, and ˆd represents the predicted label
distribution for the i-th element. Lower values indicate better
performance for distance-based measures, while higher values
signify better performance for similarity-based measures.
C. Inaccurate LD Matrix Generation
To simulate the inaccurate LD, we added a controlled
Gaussian noise on the ground-truth LD matrix. Specifically,
we used the Matlab function randn() to generate a random
matrix of the same size as the ground-truth LD, and multiplied
the generated random matrix by the variance (b) and added
the mean (a) to construct the label error matrix. Then we
added the error matrix to the LD matrix, and normalized the
summarization as the noisy LD matrix.
D. Comparative Studies
1) Comparison with sota LDL algorithms: We compare our
approach with seven state-of-the-art label distribution learning
approaches, using parameter configurations suggested in their
respective literature:
• AA-BP [4]: AA-BP is a structure with a three-layer
network. The network outputs different units, and each
output unit represents the descriptive degree of the label.
• AA-KNN [4]: For each new instance xin AA-KNN, first
find its k nearest neighbors in the training set. Then,
calculate the mean of the label distribution of all k nearest
neighbors as the label distribution of x.
• PT-Bayes [4]: PT-Bayes transforms the LDL problem into
a single-label
learning problem, effectively converting
the training samples into a set of weighted single-label
samples. PT-Bayes then utilizes the Bayes classifier to
address the transformed weighted single-label learning
problem.
• LCLR [35]: LCLR reconstructs a new supervised label
distribution with global and local label-related informa-
tion. [λ1, λ2, λ3, λ4, and K are set to 0.0001, 0.001,
0.001, 0.001, and 4, respectively.]
• LDLSF [36]: LDLSF uses label-specific features to im-
prove label distribution learning performance. [M are
diagonal matrices in which all diagonal elements are 0.5,
ρ is set as 10−3]
• LDLLC [37]: LDLLC utilizes local label correlation to
make prediction distributions between similar instances
as close as possible.
• CPNN [12]: Conditional Probability Neural Network,
employs a three-layer neural network structure to learn
the distribution of labels.
• LDSVR [38]: LDSVR is to simultaneously fit a sigmoid
function to each component of the label distribution using
a multi-output support vector machine.
For our approach, trade-off parameters α and β are set as 0.05
and 0.05 in the recover part. In the predection part, trade-off
parameters κ and ν are set as 1 and 0.1. Table III and Table V
present detailed experimental results comparing the algorithms
using each evaluation metric. To analyze and statistically
compare the performance differences between algorithms, we
employ the Friedman test [39], which is a widely accepted
statistical test for multiple algorithms and a specific number
the average rank
of datasets. For each evaluation metric,
i=1 rj
of the j-th algorithm is calculated as Rj = 1
i ,
N
where rj
i represents the rank of the j-th algorithm on the i-th
dataset. Subsequently, the Friedman statistics FF , distributed
according to the F-distribution with (K −1) numerator degrees
of freedom and (K − 1)(N − 1) denominator degrees of
freedom, are computed as follows:
(cid:80)N
FF = (N −1)X 2
N (K−1)−X 2
F
(cid:104)(cid:80)K
j=1 R2
, where
(cid:105)
j − K(K+1)2
F
4
X 2
F = 12N
K(K+1)
(29)
Table IV summarizes the Friedman statistics FF for each
evaluation metric and the corresponding critical value at
significance level α = 0.05. As shown in Table IV,
the
FIRST A. AUTHOR et al.: BARE DEMO OF IEEETAI.CLS FOR IEEE JOURNALS OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE
7
data
M2B
RAF
SCUT
fbp5500
flickr
twitter
algorithm
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
chebyshev
0.7020±.0888
0.5596±.0338
0.4919±.0005
0.5421±.0000
0.4911±.0050
0.5050±.0043
0.4995±.0034
0.5917±.0007
0.4499±.0040
0.4080±.0006
0.3573±.0021
0.4000±.0216
0.4733±.0015
0.3454±.0017
0.3477±.0016
0.4984±.0028
0.5971±.0035
0.2846±.0040
0.3597±.1013
0.6356±.0338
0.6933±.1107
0.9317±.0338
0.3501±.0040
0.3412±.0033
0.3521±.0026
0.3927±.0014
0.2468±.0029
0.1829±.0014
0.3295±.0759
0.3968±.0014
0.3270±.0014
0.3377±.0180
0.3326±.0026
0.3334±.0016
0.3424±.0848
0.2733±.0014
0.1738±.0208
0.0680±.0147
0.8854±.0123
0.0637±.0022
0.8761±.0001
0.8797±.0001
0.8761±.0001
0.6004±.0029
0.0673±.0678
0.1733±.0077
0.0825±.0004
0.0976±.0041
0.0873±.0005
0.8754±.0048
0.8754±.0001
0.8755±.0000
0.5947±.0035
0.0854±.0048
clark
1.6817±.0924
1.5662±.0518
1.6775±.0080
1.6846±.0009
1.6459±.0055
1.6575±.0027
1.6489±.0028
2.0498±.0020
1.5743±.0040
1.6892±.0072
1.5698±.0011
1.1745±.0338
2.1164±.0009
1.5577±.0050
1.6051±.0036
1.6526±.0021
2.1911±.0857
1.4816±.0040
1.4320±.0014
1.6880±.0967
1.7230±.0807
2.6361±.0014
1.4539±.0052
1.4632±.0035
1.4627±.0037
1.5204±.0694
1.3507±.0050
1.3551±.0014
1.4446±.0014
1.5044±.0940
1.4421±.0812
1.4497±.0167
1.4497±.0689
1.4497±.0018
1.5953±.0014
1.3931±.0027
1.0952±.1007
0.3163±.0670
2.5295±.0570
0.2537±.0860
2.5554±.0010
2.5562±.0005
2.5574±.0004
2.2813±.0083
0.2691±.2703
1.1054±.0200
0.3483±.0008
0.4117±.0271
0.3250±.0080
2.6268±.0009
2.6267±.0007
2.6270±.0008
2.2634±.0085
0.3118±.0049
canberra
3.5446±.0007
3.2637±.0007
3.5298±.0148
3.5139±.0025
3.3909±.0152
3.4292±.0084
3.3974±.0098
4.4067±.0034
3.2218±.0090
3.7083±.0146
3.3801±.0036
2.3595±.0463
4.9538±.0125
3.3432±.0131
3.3787±.0102
3.4142±.0074
5.2174±.0362
3.0576±.0090
2.8959±.0014
3.6875±.0014
3.7820±.0014
7.3787±.0014
2.8097±.0132
2.8269±.0106
2.8317±.0095
3.0080±.0014
2.5022±.0140
2.4861±.0014
2.7604±.0014
2.9635±.0014
2.7538±.2398
2.7787±.0556
2.7798±.0014
2.7808±.0053
3.3559±.0014
2.5892±.0072
2.5672±.3154
0.7203±.1924
7.0966±.1667
0.5838±.2489
7.1757±.0029
7.1775±.0014
7.1816±.0011
6.1057±.0269
0.6256±.6275
2.5808±.0563
0.7879±.0019
0.9384±.0583
0.7427±.0148
7.3826±.0025
7.3824±.0022
7.3833±.0024
6.0445±.0292
0.7175±.0144
kldist
1.7782±.0022
0.7447±.0022
0.8785±.0032
1.6929±.0215
0.8058±.0323
0.8306±.0060
1.0626±.0338
1.5719±.0006
0.1592±.0085
0.2950±.0014
0.0803±.0458
0.5378±.0056
0.0760±.0009
0.5786±.0047
0.5882±.0048
0.5834±.0024
0.8998±.0105
0.0211±.0085
0.1961±.0017
0.1471±.0071
0.1903±.0021
0.6446±.0054
0.5677±.0065
0.5622±.0046
0.5726±.0041
0.2213±.0069
0.1842±.0113
0.0988±.0017
0.0981±.0016
0.1819±.0014
0.0900±.0014
0.5183±.0558
0.5184±.0027
0.5149±.0024
0.3005±.0030
0.0542±.0030
0.2797±.0017
0.0300±.0017
0.0257±.0017
0.0198±.0017
7.6130±.0259
7.5705±.0093
4.3153±.3001
1.3497±.0097
0.0220±.0222
0.4290±.0189
0.1228±.0004
0.1468±.0112
0.1112±.0032
5.6168±.0215
4.7922±.0003
4.7977±.0014
1.4410±.0103
0.0308±.0086
cosine
0.3246±.0003
0.7160±.0003
0.6083±.0015
0.5722±.0014
0.6576±.0056
0.6466±.0026
0.6546±.0023
0.5281±.0003
0.7312±.0035
0.5491±.0010
0.7137±.0016
0.6301±.0047
0.5561±.0002
0.7391±.0022
0.7335±.0029
0.6587±.0027
0.7248±.0113
0.8504±.0035
0.7618±.0762
0.6253±.0719
0.5101±.0557
0.5166±.0610
0.7434±.0032
0.7499±.0023
0.7425±.0021
0.6617±.0436
0.8469±.0023
0.8272±.0658
0.7862±.0499
0.6585±.0754
0.7922±.0612
0.7805±.0373
0.7854±.2293
0.7832±.0012
0.6586±.0747
0.8688±.0017
0.7915±.1874
0.9662±.0859
0.7183±.0713
0.9759±.1113
0.6780±.0013
0.6779±.0008
0.6750±.0004
0.4749±.0050
0.9733±.9730
0.7944±.0136
0.9558±.0003
0.9403±.0057
0.9583±.0015
0.5876±.0014
0.5867±.0011
0.5861±.0012
0.4692±.0044
0.9610±.0083
intersection
0.2742±.0693
0.4404±.0757
0.4071±.0021
0.3925±.0014
0.4523±.0043
0.4392±.0024
0.4499±.0024
0.4041±.0008
0.5246±.0021
0.4600±.0019
0.5421±.0021
0.6000±.0216
0.3334±.0010
0.5550±.0020
0.5511±.0021
0.4490±.0022
0.4029±.0236
0.6518±.0021
0.5443±.0748
0.3644±.0634
0.3067±.0744
0.3722±.0551
0.5604±.0030
0.5640±.0026
0.5578±.0019
0.5025±.0271
0.7033±.0024
0.6421±.0859
0.5884±.0376
0.5022±.0745
0.5905±.0609
0.5810±.0240
0.5861±.3806
0.5820±.0012
0.4508±.0475
0.6610±.0017
0.6963±.1936
0.9035±.1093
0.5095±.0937
0.9212±.1403
0.4642±.0016
0.4634±.0008
0.4608±.0006
0.3143±.0026
0.9161±.9157
0.6997±.0097
0.8919±.0003
0.8715±.0079
0.8979±.0021
0.3482±.0014
0.3482±.0012
0.3476±.0014
0.3190±.0030
0.9015±.0051
TABLE III: Comparison results (mean±std) measured by seven metrics.
Sφrensen
0.7258±.0693
0.5596±.0757
0.5929±.0021
0.6075±.0003
0.5477±.0043
0.5608±.0024
0.5501±.0024
0.5959±.0008
0.4754±.0021
0.5400±.0688
0.4579±.0002
0.5612±.0974
0.6666±.0782
0.4450±.0020
0.4489±.0021
0.5510±.0022
0.5971±.1247
0.3482±.0021
0.4557±.0748
0.6356±.0634
0.6933±.0744
0.8031±.0551
0.4396±.0030
0.4360±.0026
0.4422±.0019
0.4975±.0271
0.2967±.0024
0.3579±.0859
0.4116±.0376
0.4978±.0745
0.4095±.0609
0.4190±.0240
0.4139±.1711
0.4180±.0012
0.5492±.0475
0.3390±.0017
0.3037±.0556
0.0965±.0181
0.7962±.0115
0.0788±.0170
0.8042±.0002
0.8037±.0002
0.8048±.0001
0.6857±.0026
0.0839±.0843
0.3003±.0097
0.1081±.0003
0.1285±.0079
0.1021±.0021
0.8177±.0003
0.8181±.0002
0.8183±.0002
0.6810±.0030
0.0985±.0051
Evaluation metric
FF
Critical value (α = 0.05)
Chebyshev
Clark
KL-distance
Canberra
Cosine
Intersection
Sφrensen
29.841
28.9700
30.495
32.376
73.5598
73.559
30.102
15.51
TABLE IV: Summary of the Friedman statistics FF in terms of each
evaluation metric and the critical value at 0.05 significance level (#
comparing algorithms K = 9, # data sets N = 12).
indicators of all evaluation methods exceed the critical value,
i.e., the hypothesis that all algorithms perform the same is
rejected, indicating that the performance of the algorithms is
significantly different.
To further distinguish the performance among the com-
paring algorithms, a post-hoc test is necessary at this stage.
We employ the Bonferroni-Dunn test [40]. LSag is treated as
the control algorithm, and the difference between the average
ranks of IDI-LDL and one comparing algorithm is compared
with the critical difference (CD). If their difference is larger
than one CD (CD=2.994 with K = 9 and N = 12 at a
significance level of α = 0.05), the performance of LSag is
deemed to be significantly different from that of the comparing
algorithm.
8
JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
alpha
cdc
sja
SBU
MOVIE
NATURE
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
AA-BP
AA-KNN
CPNN
LDSVR
LCLR
LDLSF
LDLLC
PT-Bayes
OURS
chebyshev
0.0434±.0001
0.0275±.0401
0.0724±.0025
0.0294±.0029
0.0151±.0016
0.0151±.0023
0.0145±.0029
0.3875±.0015
0.0143±.0006
0.0669±.0024
0.0448±.0106
0.0620±.0058
0.0232±.0020
0.0168±.0020
0.0168±.0020
0.0164±.0024
0.2408±.0042
0.0161±.0028
0.4391±.0001
0.1646±.0001
0.1986±.0040
0.1716±.0795
0.1277±.0039
0.1240±.0051
0.1129±.0227
0.2714±.0584
0.0940±.0227
0.3012±.0040
0.2419±.0029
0.2689±.0053
0.2324±.0279
0.1345±.0027
0.1383±.0000
0.1400±.0023
0.3044±.0029
0.1270±.0001
0.1743±.0024
0.1695±.0007
0.1786±.0030
0.1807±.0016
0.1654±.0042
0.1735±.0028
0.1817±.0019
0.1850±.0011
0.1338±.0040
0.4040±.0104
0.3566±.0059
0.3818±.0064
0.3642±.0061
0.3583±.0036
0.3744±.0090
0.6816±.0027
0.4285±.0076
0.3177±.0030
clark
0.9215±.0005
0.5602±.0232
0.8629±.0018
0.5970±.0041
0.2412±.0011
0.2413±.0032
0.2252±.0033
2.0231±.0010
0.2201±.0028
1.0440±.0036
0.6288±.0276
1.4701±.0024
0.2772±.0036
0.2237±.0027
0.2236±.0036
0.2147±.0036
1.9271±.0135
0.2163±.0076
1.3493±.0004
0.5756±.0005
0.7276±.0040
0.6218±.0031
0.4430±.0057
0.4693±.0112
0.4690±.0731
0.7375±.0918
0.1893±.0731
1.1851±.0080
0.6145±.0033
0.8444±.0277
1.1012±.0238
0.4134±.0068
0.4112±.0008
0.4139±.0032
0.8913±.0033
0.3919±.0007
0.7322±.0036
0.7123±.0022
0.7414±.0088
0.7508±.0035
0.7093±.0135
0.7322±.0076
0.7552±.0063
0.7627±.0025
0.6105±.0080
2.5361±.0126
2.4758±.0096
2.5189±.0106
2.4766±.0074
2.4808±.0155
2.5772±.0234
2.8773±.0068
2.5436±.0073
2.4525±.0050
canberra
3.1670±.0014
1.9409±.0964
3.2067±.0088
1.9463±.0157
0.7946±.0031
0.7953±.0109
0.7344±.0083
7.6577±.0039
0.7446±.0057
2.5764±.0079
2.0304±.0790
4.6585±.0080
0.8296±.0144
0.6752±.0085
0.6748±.0144
0.6435±.0079
6.8458±.0342
0.6493±.0211
2.7821±.0011
1.0271±.0014
1.3999±.0090
1.1184±.0042
0.9331±.0080
0.9814±.0232
0.9822±.0878
1.4657±.0192
0.2903±.0878
2.7515±.0187
1.3260±.0083
1.9320±.0656
2.4310±.0621
0.9043±.0160
0.8998±.0024
0.9045±.0109
1.9535±.0083
0.8499±.0022
1.3920±.0079
1.3483±.0045
1.4142±.0182
1.4321±.0077
1.3432±.0342
1.3915±.0211
1.4398±.0174
1.4609±.0061
1.1399±.0187
7.1280±.0630
6.9364±.0399
7.1490±.0474
6.9645±.0277
6.8452±.0285
7.1752±.0513
8.4701±.0160
7.2272±.0297
6.7557±.0208
kldist
0.0885±.0093
0.0336±.0349
0.0933±.0045
0.0390±.0096
0.0070±.0036
0.0070±.0070
0.4233±.0054
0.6384±.0048
0.0063±.0006
0.1639±.0069
0.0543±.0199
0.2909±.0207
0.0094±.0091
0.0074±.0012
0.0074±.0091
0.9225±.0069
0.5819±.0023
0.0073±.0030
0.7564±61.4300
0.1006±.0093
0.1796±.0085
0.1175±.0061
0.0792±.0018
0.0754±.0039
4.4745±.0565
0.2256±.0168
0.0342±.0565
0.6154±1.5501
0.3355±.0054
0.3131±.0149
0.4319±.1620
0.0848±.0021
0.0840±.0014
0.0859±.0070
0.4238±.0054
0.0672±.0003
0.4005±.0069
0.3992±.0018
0.4299±.0108
0.4411±.0038
0.1683±.0023
0.1829±.0030
0.1976±.0135
0.4506±.0025
0.1464±1.5501
3.9933±.1458
3.7662±.0269
4.1641±.0636
3.9580±.0179
1.1300±.0068
1.7217±.0090
2.8957±.0021
3.9983±.0667
1.1300±.0067
cosine
0.9370±.0008
0.9691±.0252
0.9028±.0016
0.9652±.0028
0.9930±.0013
0.9930±.0093
0.9939±.0019
0.4843±.0016
0.9938±.0006
0.9139±.0021
0.9484±.0213
0.8524±.0011
0.9910±.0038
0.9928±.0011
0.9928±.0038
0.9933±.0021
0.6639±.0026
0.9942±.0019
0.5295±.0004
0.9024±.0008
0.8364±.0035
0.8917±.0016
0.9248±.0016
0.9309±.0037
0.9308±.0357
0.7842±.0190
0.9721±.0357
0.5961±.0037
0.8456±.0019
0.7359±.0077
0.7189±.0093
0.9179±.0022
0.9186±.0012
0.9169±.0093
0.6885±.0019
0.9288±.0011
0.8671±.0021
0.8775±.0007
0.8629±.0053
0.8593±.0020
0.8827±.0026
0.8704±.0019
0.8581±.0017
0.8564±.0009
0.9222±.0037
0.5036±.0254
0.6313±.0038
0.5343±.0166
0.5798±.0032
0.6766±.0047
0.6083±.0101
0.4247±.0022
0.5423±.0064
0.7158±.0020
intersection
0.8393±.0002
0.8955±.0811
0.8121±.0015
0.8947±.0021
0.9560±.0002
0.9560±.0032
0.9584±.0018
0.5185±.0009
0.9590±.0007
0.8433±.0017
0.8629±.0130
0.7283±.0013
0.9459±.0020
0.9555±.0011
0.9555±.0020
0.9576±.0017
0.5617±.0044
0.9578±.0021
0.5365±.0006
0.8354±.0008
0.7681±.0021
0.8284±.0015
0.8400±.0759
0.8381±.0043
0.8380±.0256
0.7286±.0557
0.9060±.0256
0.5337±.0036
0.6884±.0018
0.6558±.0089
0.6033±.0076
0.8384±.0028
0.8392±.0014
0.8381±.0032
0.6276±.0018
0.8485±.0012
0.7569±.0017
0.7596±.0008
0.7439±.0046
0.7398±.0018
0.7615±.0044
0.7501±.0021
0.7386±.0023
0.7357±.0011
0.8077±.0036
0.3678±.0175
0.3948±.0045
0.3388±.0087
0.3679±.0028
0.4662±.0055
0.4530±.0100
0.3069±.0028
0.3399±.0052
0.4749±.0023
TABLE V: Comparison results (mean±std) measured by seven metrics.
Sφrensen
0.1607±.0006
0.1045±.0028
0.1879±.0057
0.1053±.0006
0.0440±.0054
0.0440±.0033
0.0406±.0083
0.4815±.0018
0.0411±.0080
0.1567±.0028
0.1371±.0076
0.2717±.0030
0.0541±.0019
0.0445±.0021
0.0445±.0211
0.0424±.0028
0.4383±.0029
0.0428±.0019
0.4635±.0001
0.1926±.0002
0.2319±.0021
0.1716±.0012
0.1600±.0748
0.1619±.0043
0.1620±.1174
0.2714±.0782
0.0940±.0002
0.4663±.0036
0.2546±.0018
0.3442±.0089
0.3967±.0112
0.1616±.0028
0.1608±.0002
0.1619±.0033
0.3724±.0083
0.1515±.0002
0.2431±.0083
0.2404±.0008
0.2561±.0046
0.2602±.0018
0.2385±.0029
0.2499±.0054
0.2614±.0019
0.2643±.0011
0.1923±.0036
0.6322±.0175
0.6052±.0045
0.6612±.0087
0.6321±.0028
0.5338±.0055
0.5470±.0100
0.6931±.0028
0.6601±.0052
0.5251±.0023
Fig. 2: Performance of the proposed method as the trade-off parameter α and β vary on different data sets..
FIRST A. AUTHOR et al.: BARE DEMO OF IEEETAI.CLS FOR IEEE JOURNALS OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE
9
Fig. 3: Performance of the proposed method as the trade-off parameter κ and ν vary on different data sets.
Chebyshev
Clark
Canberra
kl
Cosine
Intersection
Sorensen
AA-BP
6.17
5.79
6.00
6.00
9.00
9.00
5.92
AA-KNN
4.67
4.00
4.25
3.67
8.00
8.00
4.67
CPNN
5.67
6.08
6.25
5.42
6.96
6.92
6.58
LDSVR
5.33
5.50
5.42
4.92
6.04
6.08
5.58
LCLR
4.00
4.00
3.67
5.33
5.00
5.00
3.92
LDLSF
4.54
5.13
4.67
4.58
4.00
3.96
4.17
LDLLC
5.38
5.33
5.50
6.67
2.96
3.04
5.33
PT-Bayes
7.83
7.67
7.83
7.17
2.04
2.00
7.42
Ours
1.42
1.50
1.42
1.25
1.00
1.00
1.42
TABLE VI: Average ranking of algorithms across 12 datasets under different metrics.
Fig. 5 presents the CD diagrams [39] for each evaluation
metric. In each sub-figure, the average rank of each comparing
algorithm is marked along the axis with lower ranks to the
right, and a thick line connects LSag and any comparing
algorithm if the difference between their average ranks is
less than one CD. Additionally, the average ranking of the
compared algorithms across 12 datasets is shown in Table
VI. Based on the above results, observations can be made as
follows:
• In 99.21% of the cases, our algorithm achieved the best
results. This can be attributed to the fact that traditional
algorithms such as AA-BP, AA-KNN, LDSVR, CPNN,
and PT-Bayes do not consider the presence of noise in the
label distribution, which can lead to incorrect guidance
for classifier learning.
• On the other hand, although LDLLC, LDL-SF, and LCLR
take label correlation into account,
to
address the noise issue in the label distribution. As a
result, the models they learn underperform.
they also fail
• Our algorithm consistently achieves the highest average
ranking, as it takes into account the noise present in the
label distribution, while other methods do not.
• Under the Chebyshev↓ metric, our algorithm is signifi-
cantly better than all other algorithms, except for LCLR.
Similar results can be observed under the Canberra↓ and
Sφren↓ metrics. For the Clark↓ metric, our algorithm
outperforms all algorithms except for AA-KNN, and this
performance is also replicated under the Kullback-Leibler
(KL)↓ and Cosine↑ metrics. Under the intersection↑ met-
ric, our algorithm is significantly better than LCLR, AA-
BP, AA-KNN, CPNN and LDSVR.
E. Further Analyses
1) Parameter sensitivity analysis: : The impact of different
hyper-parameters α and β in Eq. (6) on the prediction of
experimental results is shown in Figure 2. As depicted in
Figure 3, the trade-off parameters α and β, which control
the strength of error and preserving the instance correlation
topological structure, respectively, do indeed influence the
performance of our method. However, the proposed model
is quite robust to the those two hyper-parameters, i.e., the
Chebyshev distance and Sφrensen distance are relatively stable
as the parameter value changes within a reasonable range,
which serves as a desirable property in using the proposed
approach. Additionally, the impact of different parameters κ
and ν on the prediction results is illustrated in Figure 3. As
shown in Figure 3, parameters κ and ν, which control the
strength of the term between the error of the predicted results
and the recovered LD, and the term controlling the alignment
between the predicted LD and the ideal LD, respectively, do
indeed affect the performance of our method. However, our
method still remains stable within a certain range.
2) Visualizing Experimental Results : To better understand
our algorithm, we have visualized a portion of the prediction
results, as shown in Figure 4. The first column displays the
representative Label Distribution (LD) samples from M2B,
RAF-ML, Flickr, and Nature-Scene datasets. The second col-
umn to the last columns present the predicted LDs using
different algorithms. In each figure,
the x-axis represents
various labels, and the y-axis indicates the descriptiveness
of the corresponding labels. From Figure 4, we have the
following observations:
• When training with Inaccurate Label Distributions
(ILDs), algorithms such as AA-BP, CPNN, LSVR, and
LDLSF struggle to accurately predict the Label Distri-
10
JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
Fig. 4: Typical examples of the real and predicted label distributions, which measured by Chebyshev and KL.
Fig. 5: Comparison of LSag (control algorithm) against other comparing algorithms with the Bonferroni-Dunn test. Algorithms not connected
with LSag are considered to have significantly different performance from the control algorithm (significance level α= 0.05).
Ground-truth5labels6labels8labels9labelsAA-BP{0.5706,1.5774}{0.4882,6.1231} {0.0559, 0.0136} {0.2522 , 1.7744} AA-KNN{0.3549,0.5733}{0.3821,5.0595 } {0.1403, 0.0794}{0.3616, 2.8726} CPNN{0.4868,0.8435 }{0.4074,6.5634} {0.1281, 0.0604} {0.2119, 1.2820} LDSVR{0.5968, 1.3359}{0.3662 , 6.6401 } {0.1160 , 0.0468} {0.2944 , 2.0929} LCLR{0.3301, 0.8988}{0. 3696 , 5.0327} {0.1015, 0.0332} {0.2931, 2.0822} LDLSF{0.6065, 1.6051}{0.3774 , 5.0047} {0.1029, 0.0431} {0.3412, 2.4387} LDLLC{0.3314, 0.5502}{0.3866, 5.7304} {0.0559, 0.0105} {0.0224, 0.0025} PT-Bayes{0.3759,1.02961}{0.3614, 5.3512} {0.0195 , 0.0014} {0.2905, 3.9483} Ours{0.2566,0.54651}{0.2402,4.8232}{0.0100 ,0.0264}{0.0100,0.0126}(Chebyshev)(Clark)(Canberra)(KL)(S∅rensen)(Intersection)(Cosine)FIRST A. AUTHOR et al.: BARE DEMO OF IEEETAI.CLS FOR IEEE JOURNALS OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE
11
Chebyshev↓
F =AABP
F =AA-KNN
Dataset
Yeast-alpha
Yeast-cdc
s-JAFFE
F =CPNN
F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (GT) F -LSag F (I)
0.0101
0.3875
0.0750
0.0198
0.2408
0.0696
0.0667
0.2714
0.0839
0.1475
0.3044
SBU 3DFE 0.2981
2
1
Average rank
0.0193 0.1269
0.0232 0.1422
0.1716 0.1512
0.2324 0.0828
0.1207 0.0142
0.1147 0.0238
0.4391 0.0991
0.3012 0.2376
0.0275 0.0126
0.0448 0.0249
0.1646 0.0302
0.2419 0.0732
0.0724 0.0150
0.0620 0.0201
0.1986 0.2197
0.2689 0.1983
0.0843
0.0303
0.0796
0.1679
1
0.0217
0.0242
0.0883
0.1715
1
0.0117
0.0204
0.0828
0.2158
1
0.0767
0.1675
0.0828
0.2179
1
F =PT-Bayes
F =LDSVR
2
2
2
2
clark↓
F =AABP
F =AA-KNN
Dataset
Yeast-alpha
Yeast-cdc
s-JAFFE
F =CPNN
F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (GT) F -LSag F (I)
0.1816
0.3875
1.3956
0.2488
1.9271
1.5694
0.3026
0.7375
1.3260
0.5130
0.8913
SBU 3DFE 0.6008
2
1
Average rank
0.4174 1.9051
0.2772 1.4234
0.6218 0.3650
1.1012 0.6485
1.8428 0.2132
1.6540 0.2892
1.3493 0.6934
1.1851 0.3962
0.8629 0.2486
1.4701 0.2539
0.7276 0.6493
0.8444 0.5602
0.5602 0.1927
0.6288 0.3007
0.5756 0.3394
0.6145 0.4644
1.7023
0.4751
0.4982
0.9449
1
0.4554
0.5043
0.4760
0.4902
1
0.1765
0.2424
0.3650
0.6509
1
0.0767
1.4526
0.3650
0.6485
1
F =PT-Bayes
F =LDSVR
2
2
2
2
cosine↑
F =AABP
F =AA-KNN
Dataset
Yeast-alpha
Yeast-cdc
s-JAFFE
F =CPNN
F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (GT) F -LSag F (I)
0.9963
0.4843
0.8489
0.9929
0.6639
0.8267
0.9737
0.7842
0.6994
0.9222
0.6885
SBU 3DFE 0.8251
2
1
Average rank
0.9814 0.7442
0.9910 0.7867
0.8917 0.9710
0.7189 0.8454
0.9691 0.9958
0.9484 0.9894
0.9024 0.9759
0.8456 0.9265
0.9028 0.9937
0.8524 0.9925
0.8364 0.8563
0.7359 0.8832
0.7641 0.9949
0.7674 0.9902
0.5295 0.8110
0.5961 0.9572
0.8195
0.9717
0.9439
0.8927
1
0.9965
0.9933
0.9726
0.9139
1
0.9965
0.9933
0.9710
0.8456
1
0.8520
0.8703
0.9710
0.8454
1
F =PT-Bayes
F =LDSVR
2
2
2
2
Sφrensen↓
F =AABP
F =AA-KNN
Dataset
Yeast-alpha
Yeast-cdc
s-JAFFE
F =CPNN
F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (G) F -LSag F (I) F (GT) F -LSag F (I)
0.0353
0.4815
0.2340
0.0406
0.4383
0.2898
0.0912
0.2714
0.4115
0.1862
0.3724
SBU 3DFE 0.2175
2
1
Average rank
0.0811 0.3447
0.0541 0.3070
0.1716 0.0958
0.3967 0.2584
0.1045 0.0370
0.1371 0.0510
0.1926 0.0899
0.2546 0.1662
0.1879 0.0438
0.2717 0.0511
0.2319 0.2017
0.3442 0.2214
0.3569 0.0412
0.3179 0.0526
0.4635 0.2376
0.4663 0.1256
0.2946
0.0889
0.1699
0.2562
1
0.1010
0.1248
0.1646
0.1784
1
0.0327
0.0442
0.0958
0.2619
1
0.2399
0.2354
0.0958
0.2584
1
F =PT-Bayes
F =LDSVR
2
2
2
2
TABLE VII: Prediction results measured by (Chebyshev ↓, Clark↓, Cosine↑, Sφrensen ↓) for each compared algorithm on the controlled
dataset (with b=0.2). For the LDL algorithm F ∈ { AA-BP, AA-KNN, CPNN, LDSVR,PT-Bayes }, the performance of the F-LSag is
compared against that of F, F(G), F(I) represent LDL algorithm training with ground-truth LD and noise LD respectively.
clark↓
Chebyshev↓
Evaluation metric
F -LSag
vs
AA-BP win[4.88e-04] win[4.88e-04] win[4.88e-04] win[4.88e-04]
AA-KNN win[4.88e-04] win[4.88e-04] win[6.84e-03] win[4.88e-04]
CPNN win[4.88e-04] win[4.88e-04] win[4.88e-04] win[4.88e-04]
LDSVR win[1.46e-03] win[9.77e-04] win[9.77e-04] win[9.77e-04]
PT-Bayes win[4.88e-04] win[4.88e-04] win[4.88e-04] win[4.88e-04]
cosine↑
Sφren↓
F
TABLE VIII: Wilcoxon signed-rank test between F-LSag and F in
terms of (Chebyshev↓, clark↓, Cosine↑, Sφrensen↓ ). Significance
level α=0.05.
bution (LD) for unseen instances. Specifically, they fail
to capture the descriptiveness of each individual label
and the relative importance ranking among the label
descriptiveness.
• AA-KNN, LCLR, LDLLC, and PT-Bayes can capture the
relative magnitudes between different labels in their pre-
dictions; however, the descriptiveness of each individual
label is still inaccurate. This is because these algorithms
do not consider the noise present in the Label Distribution
(LD) while learning the model.
• Our algorithm not only accurately predicts the Label
Distribution (LD) for each instance but also effectively
predicts the ranking of descriptiveness corresponding to
different labels. This is because we consider the noise
present in the label distribution before learning the clas-
sification model.
F. Collaboration with ther LDL Algorithms
In this section, we discuss the scalability of our method,
specifically whether the performance of different LDL algo-
rithms can be improved when facing inaccurate label distribu-
tions by recovering the ideal LD through the recovery model.
The experimental setup is as follows. Prior to training, we
use our recovery model (Eq .(6)) to recover the ideal LD.
Then, we use the recovered LD for training and finally test
on the real data. Note that this setup is consistent with the
previous settings. The experimental results are presented in
Table VII. Here, we use 4 datasets to validate whether the
recovered LD can help other LDL algorithms improve their
performance when faced with ILD. Here, we used two human
face datasets, SJAFFE and SBU-3DFE, as well as two yeast
datasets, Yeast-alpha and Yeast-cdc. As shown in Table VII,
F(I) denotes the performance an LDL algorithm trained on the
noise LD, and F-LSag indicates the performance of that LDL
algorithm trained on the recovered LD by our approach. We
also show the performance of different LDL algorithms trained
on the ground-truth label distribution (i.e., F(G)), which can
be regarded as the performance upper bound. To analyze
whether there are statistical performance gaps among F(I) and
F-LSag, Wilcoxon signed-rank test [41], which is a widely-
accepted statistical test for comparisons of two algorithms
over several datasets, is employed. Table VIII summarizes the
statistical test results and the p-values. Based on the above
results, observations can be made as follows:
• Noisy LD can cause a significant degradation in the per-
formance for different LDL algorithms, so it is necessary
to address the issue of learning with ILD.
• F-LSag is statistically superior to the F in all cases (4
datasets and four metrics) , suggesting the effectiveness
of our approach. This is because accurate supervision
information can guide more precise model training.
• The performance of F-LSag is quite close to the F(I) on
12
JOURNAL OF IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 00, NO. 0, MONTH 2020
different LDL algorithms, indicating our approach can
recover high-quality LD from the noisy LD.
V. CONCLUSION
This paper investigates the problem of inaccurate label
distribution learning for the first time. To be specific, we
treat the noisy LD matrix as the liner combination of an
ideal LD matrix and an error label matrix, and separates them
by a novel adaptive graph-regularized low-rank and sparse
decomposition model. Then, we use ADMM to efficiently
optimize the proposed model. The recovered LD are taken into
consideration when inducing a LD predictive model for LDL,
achieved through the utilization of a specialized objective
function. Extensive experiments demonstrate that our method
can effectively address the ILDL problem.
REFERENCES
[1] M. Buisson, P. Alonso-Jim ́enez, and D. Bogdanov, "Ambiguity mod-
elling with label distribution learning for music classification," in Proc.
IEEE Int. Conf. Acoust. Speech Signal Process.
IEEE, 2022, pp. 611–
615.
[2] X. Li, X. Liang, G. Luo, W. Wang, K. Wang, and S. Li, "ULTRA:
uncertainty-aware label distribution learning for breast tumor cellularity
assessment," in Proc. Int. Conf. Med. Image Comput. Comput.-Assisted
Intervention, vol. 13433. Springer, 2022, pp. 303–312.
[3] X. Wen, B. Li, H. Guo, Z. Liu, G. Hu, M. Tang, and J. Wang, "Adaptive
variance based label distribution learning for facial age estimation," in
Proc. Eur. Conf. Comput. Vis. Springer, 2020, pp. 379–395.
[4] X. Geng, "Label distribution learning," IEEE Trans. Knowl Data Eng,
vol. 28, no. 7, pp. 1734–1748, 2016.
[5] X. Jia, Z. Li, X. Zheng, W. Li, and S.-J. Huang, "Label distribution
learning with label correlations on local samples," IEEE Trans. Knowl
Data Eng, vol. 33, no. 4, pp. 1619–1631, 2019.
[6] J. Wang and X. Geng, "Label distribution learning machine," in Proc.
Int. Conf. Mach. Learn. PMLR, 2021, pp. 10 749–10 759.
[7] C. Tan, S. Chen, G. Ji, and X. Geng, "Multilabel distribution learning
based on multioutput regression and manifold learning," IEEE Trans.
Cyb, 2020.
[8] J. Wang, X. Geng, and H. Xue, "Re-weighting large margin label
distribution learning for classification," IEEE Trans. Pattern Anal. Mach.
Intell., 2021.
[9] X. Jia, X. Shen, W. Li, Y. Lu, and J. Zhu, "Label distribution learning
by maintaining label ranking relation," IEEE Trans. Knowl Data Eng,
2021.
[10] M. Xu and Z.-H. Zhou, "Incomplete label distribution learning," in Proc.
Int. Joint Conf. Artif. Intell, 2017, pp. 3175–3181.
[11] S. Boyd, N. Parikh, E. Chu, B. Peleato, J. Eckstein et al., "Distributed
optimization and statistical learning via the alternating direction method
of multipliers," Foun. Trends. Mach. Learn, vol. 3, no. 1, pp. 1–122,
2011.
[12] X. Geng, C. Yin, and Z.-H. Zhou, "Facial age estimation by learning
from label distributions," IEEE Trans. Pattern Anal. Mach. Intell, vol. 35,
no. 10, pp. 2401–2412, 2013.
[13] X. Geng and Y. Xia, "Head pose estimation based on multivariate label
distribution," in Proc. IEEE Int. Conf. Comput. Vis., 2014, pp. 1837–
1842.
[18] D. Hu, H. Zhang, Z. Wu, W. Lin, G. Li, D. Shen, U. B. C. P.
Consortium et al., "Deep granular feature-label distribution learning
for neuroimaging-based infant age prediction," in Proc. Int. Conf. Med.
Image Comput. Comput.-Assisted Intervention.
Springer, 2019, pp.
149–157.
[19] W. Chung, J. Kim, H. Lee, and E. Kim, "General dimensional multiple-
output support vector regressions and their multiple kernel learning,"
IEEE Trans. Cyb, vol. 45, no. 11, pp. 2572–2584, 2014.
[20] F. P ́erez-Cruz, G. Camps-Valls, E. Soria-Olivas, J. J. P ́erez-Ruixo, A. R.
Figueiras-Vidal, and A. Art ́es-Rodr ́ıguez, "Multi-dimensional function
approximation and regression estimation," in Proc. Springer Int. Conf.
Madrid. Springer, 2002, pp. 757–762.
[21] J.-F. Cai, E. J. Cand`es, and Z. Shen, "A singular value thresholding
algorithm for matrix completion," SIAM J. Optim, vol. 20, no. 4, pp.
1956–1982, 2010.
[22] G. Liu, Z. Lin, and Y. Yu, "Robust subspace segmentation by low-rank
representation," in Proc. Int. Conf. Mach. Learn., 2010.
[23] S. Boyd, S. P. Boyd, and L. Vandenberghe, Convex optimization.
Cambridge university press, 2004.
[24] F. P ́erez-Cruz, A. Navia-V ́azquez, P. L. Alarc ́on-Diana, and A. Art ́es-
Rodr ́ıguez, "An irwls procedure for svr," in Proc. IEEE Eur. Signal
Process. Conf.
IEEE, 2000, pp. 1–4.
[25] T. V. Nguyen, S. Liu, B. Ni, J. Tan, Y. Rui, and S. Yan, "Sense beauty
via face, dressing, and/or voice," in Proc. Acm Int. Conf. Multimedia,
2012, pp. 239–248.
[26] D. Xie, L. Liang, L. Jin, J. Xu, and M. Li, "Scut-fbp: A benchmark
dataset for facial beauty perception," in Proc. IEEE Trans. Syst. Man
Cybern. Syst.
IEEE, 2015, pp. 1821–1826.
[27] L. Liang, L. Lin, L. Jin, D. Xie, and M. Li, "Scut-fbp5500: A diverse
benchmark dataset for multi-paradigm facial beauty prediction," in Proc.
Int. Conf. Pattern Recognit.
IEEE, 2018, pp. 1598–1603.
[28] Y. Ren and X. Geng, "Sense beauty by label distribution learning." in
Proc. Int. Joint Conf. Artif. Intell., 2017, pp. 2648–2654.
[29] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image
recognition," in Proc. IEEE Conf. Comput. Vis. Pattern Recognit, 2016,
pp. 770–778.
[30] S. Li and W. Deng, "Blended emotion in-the-wild: Multi-label facial
expression recognition using crowdsourced annotations and deep locality
feature learning," Int. Joun. Comput. Vis, vol. 127, no. 6-7, pp. 884–906,
2019.
[31] J. Yang, M. Sun, and X. Sun, "Learning visual sentiment distributions
via augmented conditional probability neural network," in Proc. AAAI
Conf. Artif. Intell, 2017.
[32] M. Lyons, S. Akamatsu, M. Kamachi, and J. Gyoba, "Coding facial
expressions with gabor wavelets," in Proc. IEEE int. conf. autom. face
. gesture. Recognit.
IEEE, 1998, pp. 200–205.
[33] L. Yin, X. Wei, Y. Sun, J. Wang, and M. J. Rosato, "A 3d facial
expression database for facial behavior research," in Proc. IEEE. Int.
conf. autom. face . gesture. Recognit.
IEEE, 2006.
[34] T. Ahonen, A. Hadid, and M. Pietikainen, "Face description with local
binary patterns: Application to face recognition," IEEE Trans. Pattern
Anal. Mach. Intell., vol. 28, no. 12, pp. 2037–2041, 2006.
[35] T. Ren, X. Jia, W. Li, and S. Zhao, "Label distribution learning with
label correlations via low-rank approximation," in Proc. Int. Joint Conf.
Artif. Intell, 2019, pp. 3325–3331.
[36] T. Ren, X. Jia, W. Li, L. Chen, and Z. Li, "Label distribution learning
with label-specific features." in IJCAI, 2019, pp. 3318–3324.
[37] X. Jia, W. Li, J. Liu, and Y. Zhang, "Label distribution learning by
exploiting label correlations," in Pro. Conf. Artif. Intell., vol. 32, no. 1,
2018.
[38] X. Geng and P. Hou, "Pre-release prediction of crowd opinion on movies
by label distribution learning." in Proc. Int. Joint Conf. Artif. Intell.
Citeseer, 2015, pp. 3511–3517.
[14] Y. Zhou, H. Xue, and X. Geng, "Emotion distribution recognition from
[39] J. Demˇsar, "Statistical comparisons of classifiers over multiple data sets,"
facial expressions," in Proc. ACM. Multimedia, 2015, pp. 1247–1250.
J Mach Learn Res, vol. 7, pp. 1–30, 2006.
[15] S. M. Morrison, F. Pan, O. C. Gagn ́e, A. Prabhu, A. Eleish, P. A. Fox,
R. T. Downs, T. F. Bristow, E. B. Rampe, D. F. Blake, D. T. Vaniman,
C. N. Achilles, D. W. Ming, A. S. Yen, A. H. Treiman, R. V. Morris, S. J.
Chipera, P. I. Craig, V. Tu, N. Castle, P. C. Sarrazin, D. J. D. Marais,
and R. M. Hazen, "Predicting multi-component mineral compositions in
gale crater, mars with label distribution learning," 2018.
[16] S. Si, J. Wang, J. Peng, and J. Xiao, "Towards speaker age estimation
with label distribution learning," in Proc. IEEE Int. Conf. Acoust. Speech
Signal Process.
IEEE, 2022, pp. 4618–4622.
[17] M. Ling and X. Geng, "Indoor crowd counting by mixture of gaussians
label distribution learning," IEEE Trans. Image Process, vol. 28, no. 11,
pp. 5691–5701, 2019.
[40] O. J. Dunn, "Multiple comparisons among means," J Am Stat Assoc,
vol. 56, no. 293, pp. 52–64, 1961.
[41] J. Demsar, "Statistical comparisons of classifiers over multiple data sets,"
J. Mach. Learn. Res., vol. 7, pp. 1–30, 2006.
|
|
http://arxiv.org/abs/2302.12991v1 | 2023-02-25T05:05:59 | 2023-02-25T05:05:59 | Generalization Bounds for Set-to-Set Matching with Negative Sampling | The problem of matching two sets of multiple elements, namely set-to-set
matching, has received a great deal of attention in recent years. In
particular, it has been reported that good experimental results can be obtained
by preparing a neural network as a matching function, especially in complex
cases where, for example, each element of the set is an image. However,
theoretical analysis of set-to-set matching with such black-box functions is
lacking. This paper aims to perform a generalization error analysis in
set-to-set matching to reveal the behavior of the model in that task. | [
"Masanari Kimura"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12991v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12991v1",
"@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
5
2
]
L
M
.
t
a
t
s
[
1
v
1
9
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Generalization Bounds for Set-to-Set Matching
with Negative Sampling
Masanari Kimura1[0000−0002−9953−3469]
ZOZO Research, Tokyo, Japan
[email protected]
Abstract. The problem of matching two sets of multiple elements, namely
set-to-set matching, has received a great deal of attention in recent years.
In particular, it has been reported that good experimental results can
be obtained by preparing a neural network as a matching function, es-
pecially in complex cases where, for example, each element of the set is
an image. However, theoretical analysis of set-to-set matching with such
black-box functions is lacking. This paper aims to perform a generaliza-
tion error analysis in set-to-set matching to reveal the behavior of the
model in that task.
Keywords: Set matching * Generalization bound * Neural networks
1
Introduction
The problem of matching two sets of multiple elements, namely set-to-set match-
ing, has received a great deal of attention in recent years [3,6,7,16]. The problem
is formalized as a task that, given two distinct sets, finds the goodness of match
between them. In particular, when the elements of the set are high-dimensional,
neural networks are used as the matching function [11]. Although these strate-
gies have been reported to work well experimentally, there is a lack of research
on their theoretical behavior. A mathematical understanding of the behavior of
the algorithm is an important issue since a lack of theoretical research hinders
the improvement of existing algorithms for set-to-set matching.
We aim to perform a generalization error analysis of set-to-set matching algo-
rithms in the context of statistical learning theory [15,14]. In particular, existing
deep learning-based set-to-set matching algorithms rely on negative sampling,
a procedure in which negative examples are randomly generated while learn-
ing process [11]. Therefore, we clarify the theoretical behavior of the set-to-set
matching algorithm with negative sampling.
2 Preliminaries
Let xn, ym ∈ X = Rd be d-dimensional feature vectors representing the features
of each individual item. Let X = {x1, . . . , xN } and Y = {y1, . . . , yM } be sets of
these feature vectors, where X , Y ∈ 2X and N, M ∈ N are sizes of the sets. The
2
M. Kimura
function f : 2X ×2X → R calculates a matching score between the two sets X and
Y. Guaranteeing the exchangeability of the set-to-set matching requires that the
matching function f (X , Y) is symmetric and invariant under any permutation
of items within each set as follows.
Definition 1 (Permutation Invariance). A set-input function f is said to be
permutation invariant if
f (X , Y) = f (πxX , πyY)
(1)
for permutations πx on {1, . . . , N } and πy on {1, . . . , M }.
Definition 2 (Permutation Equivariance). A map f : XN × XM → XN is
said to be permutation equivariant if
f (πxX , πyY) = πxf (X , Y)
(2)
for permutations πx and πy, where πx and πy are on {1, . . . , N } and {1, . . . , M },
respectively. Note that f is permutation invariant for permutations within Y.
Definition 3 (Symmetric Function). A map f : 2X × 2X → R is said to be
symmetric if
f (X , Y) = f (Y, X ).
(3)
Definition 4 (Two-Set-Permutation Equivariance). Given X (1) ∈ XN and
Z (2) ∈ XM , a map f : X∗ × X∗ → X∗ × X∗ is said to be two-set-permutation
equivariant if
pf (Z (1), Z (2)) = f (Z (p(1)), Z (p(2)))
(4)
for any permutation operator p exchanging the two sets, where X∗ = ∪∞
indicates a sequence of arbitrary length such as XN or XM .
n=0Xn
We consider tasks where the matching function f is used per pair of sets [18]
to select a correct matching. Given candidate pairs of sets (X , Y (k)), where
X , Y (k) ∈ 2X and k ∈ {1, . . . , K}, we choose Y (k∗) as a correct one so that
f (X , Y (k∗)) achieves the maximum score from amongst the K candidates.
2.1 Set-to-set matching with negative sampling
In real-world set-to-set matching problems, it is often the case that only positive
example set pairs can be obtained. Then, we consider training a model for set-
to-set matching with negative sampling. The learner is given positive examples
S+ = {(X , Y)}m+
i=1. Then, negative examples S− = {(X , Y)}m−
i=1 are generated
by randomly combining set pairs from the given sets. We assume that positive
and negative examples are drawn according to the underlying distribution p+
and p−, respectively. Given training sample set S = (S+, S−), the goal of set-
to-set matching with negative sampling is to learn a real-valued score function
Generalization Bounds for Set-to-Set Matching with Negative Sampling
3
f : 2X × 2X → R that ranks future positive pair (X , Y)+ higher than negative
pair (X , Y)−. Let (cid:96) be the loss function, which is defined as
(cid:96)(f, Z +, Z −) := φ(f (Z +) − f (Z −)),
(5)
where Z + = (X , Y)+, Z − = (X , Y)− and φ : R → R+ is a convex function.
Typical choices of φ include the logistic loss
φ(f (Z +) − f (Z −)) = log (cid:8)1 + exp(−(f (Z +) − f (Z −))(cid:9) .
(6)
Definition 5 (Expected set-to-set matching loss). Expected set-to-set match-
ing loss R(f ) is defined as
R(f ) := EZ+∼p+,Z−∼p−
(cid:2)(cid:96)(f, Z +, Z −)(cid:3) .
(7)
Definition 6 (Empirical set-to-set matching loss). Empirical set-to-set
matching loss ˆR(f ; S) is defined as
ˆR(f ; S) :=
1
m+m−
m+
(cid:88)
m++m−
(cid:88)
i=1
j=m++1
(cid:96)(f, Z +, Z −).
Here, we assume that φ has the Lipschitz property with respect to R, i.e.,
|φ(a) − φ(b)| ≤ L * |a − b| ,
where a, b ∈ R and L > 0 is a Lipschitz constant.
3 Margin bound for set-to-set matching
Our first result is based on the Rademacher complexity.
(8)
(9)
Definition 7 (Empirical Rademacher complexity). Let F be a family of
matching score functions. Then, the empirical Rademacher complexity of F with
respect to the sample S is defined as
ˆRS(F) := Eσ
(cid:34)
1
m
m
(cid:88)
i=1
sup
f ∈F
(cid:35)
σif (Zi)
.
(10)
Definition 8 (Rademacher complexity). Let p denote the distribution ac-
cording to which samples are drawn. For any integer m ≥ 1, the Rademacher
complexity of F is the expectation of the empirical Rademacher complexity over
all samples of size m drawn according to p:
Rm(F) := ES∼pm
(cid:104) ˆR(F)
(cid:105)
.
(11)
4
M. Kimura
Let p1 the marginal distribution of the first element of the pairs, and by
p2 the marginal distribution with respect to the second element of the pairs.
Similarly, S1 ∼ p1 and S2 ∼ p2. We denote by R1
m the Rademacher complexity
m(F) = E[ ˆRS1 (F)],
of F with respect to the marginal distribution p1, that is R1
and similarly R2
m(F) = E[ ˆRS2 (F)].
Here, we assume that the loss function is the following margin loss.
Definition 9. For any ρ > 0, the ρ-margin loss is the function (cid:96)ρ defined for
all z, z(cid:48) ∈ R by (cid:96)ρ(z, z(cid:48)) = φ(zz(cid:48)) with,
φρ(z) =
(ρ ≤ z)
0
1 − z/ρ (0 ≤ z ≤ ρ)
1
(z ≤ 0).
(12)
Lemma 1. Let Z ∈ R be any input space, and G be a family of functions map-
ping from Z to [0, 1]. Then, for any δ > 0, with probability at least 1 − δ, each
of the following holds for all g ∈ G:
E[g(z)] ≤
E[g(z)] ≤
1
m
1
m
m
(cid:88)
i=1
m
(cid:88)
i=1
g(zi) + 2Rm(G) +
(cid:115)
log 1
δ
2m
,
g(zi) + 2 ˆRS(G) + 3
(cid:115)
log 2
δ
2m
.
(13)
(14)
Proof. Let ψ(S) = supg∈G
we have
E[g] − 1
m
(cid:80)m
i=1 g(zi). Then, for two samples S and S(cid:48),
ψ(S(cid:48)) − ψ(S) ≤ sup
g∈G
g(zm) − g(z(cid:48)
m
m)
≤
1
m
.
where zm ∈ S and z(cid:48)
with probability at least 1 − δ/2, the following holds.
m ∈ S(cid:48). Then, by McDiarmid's inequality, for any δ > 0,
ψ(S) ≤ ES[ψ(S)] +
(cid:115)
log 2
δ
2m
.
Generalization Bounds for Set-to-Set Matching with Negative Sampling
5
We next bound the expectation of the right-hand side as follows.
ES[ψ(S)] = ES
(cid:34)
sup
g∈G
(cid:34)
E[g] −
(cid:35)
g(zi)
1
m
m
(cid:88)
i=1
≤ ES,S(cid:48)
sup
g∈G
(cid:34)
= Eσ,S,S(cid:48)
sup
g∈G
≤ Eσ,S(cid:48)
= 2Eσ,S
(cid:34)
sup
g∈G
(cid:34)
sup
g∈G
1
m
1
m
(cid:35)
(g(z(cid:48)
i) − g(zi))
1
m
m
(cid:88)
i=1
(cid:35)
σi(g(z(cid:48)
i) − g(zi))
1
m
m
(cid:88)
i=1
m
(cid:88)
(cid:35)
σig(z(cid:48)
i)
+ Eσ,S
i=1
m
(cid:88)
i=1
(cid:35)
σig(zi)
= 2Rm(G).
(cid:34)
1
m
m
(cid:88)
i=1
sup
g∈G
(cid:35)
−σig(zi)
Here, using again McDiarmid's inequality, with probability at least 1 − δ/2, the
following holds.
Rm(G) ≤ ˆRS(G) +
(cid:115)
log 2
δ
2m
.
Finally, we use the union bound which yields with probability at least 1 − δ:
φ(S) ≤ 2 ˆRS(G) + 3
(cid:115)
log 2
δ
2m
.
(15)
Theorem 1 (Margin bound for set-to-set matching). Let F be a set of
matching score functions. Fix ρ > 0. Then, for any δ > 0, with probability at
least 1 − δ over the choice of a sample S of size m, each of the following holds
for all f ∈ F:
R(f ) ≤ ˆRρ(f ) +
R(f ) ≤ ˆRρ(f ) +
2
ρ
2
ρ
(cid:0)R1
m(F) + R2
m(F)(cid:1) +
(cid:115)
,
(16)
(cid:16) ˆRS1 (F) + ˆRS2 (F)
(cid:17)
+ 3
.
(17)
log 1
δ
2m
(cid:115)
log 2
δ
2m
Proof. Let ̃F be the family of functions mapping (X×X)×{−1, +1} to R defined
by ̃F = {z = (Z (cid:48), Z), a) (cid:55)→ a[f (Z (cid:48)) − f (Z)] | f ∈ F}, where a ∈ {0, 1}. Consider
the family of functions ̃F = {φρ ◦ g | f ∈ ̃F} derived from ̃F which are taking
values in [0, 1]. By Lemma 1, for any δ > 0 with probability at least 1 − δ, for
all f ∈ F,
E (cid:2)φρ(a[f (Z +) − f (Z −)])(cid:3) ≤ ˆRρ(f ) + 2Rm(φρ ◦ ̃F) +
(cid:115)
log 1
δ
2m
.
(18)
6
M. Kimura
Since 1u≤0 ≤ φρ(u) for all u ∈ R, the generalization error R(f ) is a lower bound
on left-hand side, R(f ) = E[1a[f (Z(cid:48))−f (Z)]≤0] ≤ E[φρ(a[f (Z (cid:48)) − f (Z)])], and we
can write
R(f ) ≤ ˆRρ(f ) + 2Rm(φρ ◦ ̃F) +
(cid:115)
log 1
δ
2m
.
(19)
Here, we can show that Rm(φρ ◦ ̃F) ≤ 1
φρ. Then, Rm( ̃F) can be upper bounded as follows:
ρ Rm( ̃F) using the (1/ρ)-Lipschitzness of
Rm( ̃F) =
=
1
m
1
m
ES,σ
ES,σ
(cid:34)
(cid:34)
(cid:34)
sup
f ∈F
sup
f ∈F
(cid:35)
m
(cid:88)
i=1
m
(cid:88)
σiai(f (Z (cid:48)
i) − f (Zi))
(cid:35)
σi(f (Z (cid:48)
i) − f (Zi))
i=1
m
(cid:88)
1
m
ES,σ
σif (Z (cid:48)
≤
sup
f ∈F
i) + sup
f ∈F
i=1
i=1
= ES [RS2(F) + RS1 (F)] = Rp2
m (F) + Rp1
σif (Zi)
m (F).
m
(cid:88)
(cid:35)
4 RKHS bound for set-to-set matching
In this section, we consider more precise bounds that depend on the size of the
negative sample produced by negative sampling. Let S = ((X1, Y1), . . . , (Xm, Ym)) ∈
(X × X)m be a finite sample sequence, and m+ be the positive sample size. If
the positive proportion m+
m = α, then sample sequence S also can be denoted
by Sα.
Let RK be the reproducing kernel Hilbert space (RKHS) associated with the
kernel K, and Fr is defined as
Fr = {f ∈ RK | (cid:107)f (cid:107)K ≤ r}
(20)
for r > 0.
Theorem 2 (RKHS bound for set-to-set matching). Suppose Sα to be
any sample sequence of size m. Then, for any (cid:15) > 0 and f ∈ Fr,
(cid:26) α2(1 − α)2m(cid:15)2
2L2κ2r2
(cid:105)
(cid:104)
| ˆR(f ; Sα) − R(f )| ≥ (cid:15)
≤ 2 exp
PSα
(21)
(cid:27)
,
where κ := supx
(cid:112)K(x, x).
Proof. Denote S = (S+, S−) = {Z1, . . . , Zm} and
zi := z(Zi) :==
(cid:40)
+1
−1
(Zi ∈ S+),
(Zi ∈ S−).
(22)
Generalization Bounds for Set-to-Set Matching with Negative Sampling
7
Fig. 1. RKHS bound w.r.t. sample size m and positive ratio α.
First, for each 1 ≤ k ≤ m+ such that zi = +1, let (Zk, +1) be replaced by
k, +1) ∈ (X × X) × {−1, +1}, and we denote by Sk as this sample. Then,
(Z (cid:48)
| ˆR(f ; S) − ˆR(f ; Sk)| ≤
1
m+m−
≤
1
m+m−
m++m−
(cid:88)
j=m++1
m++m−
(cid:88)
j=m++1
|φ(f (Zk) − f (Zj)) − φ(f (Z (cid:48)
k) − f (Zj))|
L * |f (Zk) − f (Zj) − f (Z (cid:48)
k) + f (Zj)|
1
=
m+m− * m− * L * |f (Zk) − f (Z (cid:48)
Next, for each m+ + 1 ≤ k ≤ m such that zi = −1, let (Zl, −1) be replaced by
k, −1) ∈ (X × X) × {−1, +1} and we denote by ̄Sk as this sample. Similarly,
(Z (cid:48)
we have
k)| ≤
2L
m+ (cid:107)f (cid:107)∞.
| ˆR(f ; S) − ˆR(f ; ̄Sk)| ≤
2L
m+ (cid:107)f (cid:107)∞.
Finally, for each 1 ≤ k ≤ m+ such that zi = +1, let (Zk, +1) be replaced by
k, −1) ∈ (X × X) × {−1, +1}, and we denote by ̃Sk = ̄Sk ∪ {(Zm+1, −1)} as
(Z (cid:48)
this sample. Then, we have
| ˆR(f ; S) − ˆR(f ; ̃Sk)| ≤ Γ1 + Γ2,
where Γ1 = | ˆR(f ; S) − ˆR(f ; S ∪ {Zm+1, −1})| and Γ2 = | ˆR(f ; S ∪ {Zm+1, −1}) −
ˆR(f ; ̃Sk)|. Since Γ1 ≤ 2L
m−+1 (cid:107)f (cid:107)∞ and Γ2 ≤ 2L
m+ (cid:107)f (cid:107)∞, we have
| ˆR(f ; S) − ˆR(f ; ̃Sk)| ≤ 2L
(cid:18) 1
m+ +
1
m− + 1
(cid:19)
(cid:107)f (cid:107)∞.
(23)
Combining them and applying McDiarmid's inequality, we have the proof.
200040006000800010000m0.20.40.60.81.01.2|R(f)R(f;S)|=0.1=0.2=0.3=0.4=0.58
M. Kimura
Remark 1. Given m, (cid:15), L, we can find that the tight bound can be achieved when
α = 1
2 . This means that it is desirable the number of positive samples be equal
to the number of negative samples (See Figure 1).
Remark 2. For any δ > 0, with probability at least 1 − δ, we have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ˆR(f ; Sα) − R(f )
(cid:12)
(cid:12) ≤
Lκr
α(1 − α)
(cid:115)
2 log 2
δ
m
.
(24)
Remark 3. For Remark 2, Let m = m+ + m− and fix m+ ∈ N. Then, we have
the optimal negative sample size as (1 − α) = 2/3.
5 Conclusion and Discussion
In this paper, we performed a generalization error analysis in set-to-set matching
to reveal the behavior of the model in that task. Our analysis reveals what the
convergence rate of algorithms in set matching depend on the size of negative
sample. Future studies may include the following:
– Derivation of tighter bounds. There are many types of mathematical tools
for generalization error analysis of machine learning algorithms, and it is
known that the tightness of the bounds depends on which one is used. For
tighter bounds, it is useful to use mathematical tools not addressed in this
paper [1,9,8,10,2].
– Induction of novel set matching algorithms. It is expected to derive a novel
algorithm based on the discussion of generalized error analysis.
– The effect of data augmentation for generalization error of set-to-set match-
ing. Many data augmentation methods have been proposed to stabilize neu-
ral network learning, and theoretical analysis when these are used would be
useful [5,4,13,17,12].
References
1. Bartlett, P.L., Bousquet, O., Mendelson, S.: Local rademacher complexities. The
Annals of Statistics 33(4), 1497–1537 (2005)
2. Duchi, J.C., Jordan, M.I., Wainwright, M.J.: Local privacy and statistical minimax
rates. In: 2013 IEEE 54th Annual Symposium on Foundations of Computer Science.
pp. 429–438. IEEE (2013)
3. Iwata, T., Lloyd, J.R., Ghahramani, Z.: Unsupervised many-to-many object match-
ing for relational data. IEEE transactions on pattern analysis and machine intelli-
gence 38(3), 607–617 (2015)
4. Kimura, M.: Understanding test-time augmentation. In: International Conference
on Neural Information Processing. pp. 558–569. Springer (2021)
5. Kimura, M.: Why mixup improves the model performance. In: International Con-
ference on Artificial Neural Networks. pp. 275–286. Springer (2021)
6. Kimura, M., Nakamura, T., Saito, Y.: Shift15m: Multiobjective large-scale fashion
dataset with distributional shifts. arXiv preprint arXiv:2108.12992 (2021)
Generalization Bounds for Set-to-Set Matching with Negative Sampling
9
7. Lisanti, G., Martinel, N., Del Bimbo, A., Luca Foresti, G.: Group re-identification
via unsupervised transfer of sparse features encoding. In: Proceedings of the IEEE
International Conference on Computer Vision. pp. 2449–2458 (2017)
8. McAllester, D.A.: Pac-bayesian model averaging. In: Proceedings of the twelfth
annual conference on Computational learning theory. pp. 164–170 (1999)
9. McAllester, D.A.: Some pac-bayesian theorems. Machine Learning 37(3), 355–363
(1999)
10. Millar, P.W.: The minimax principle in asymptotic statistical theory. In: Ecole
d'Et ́e de Probabilit ́es de Saint-Flour XI-1981, pp. 75–265. Springer (1983)
11. Saito, Y., Nakamura, T., Hachiya, H., Fukumizu, K.: Exchangeable deep neural
networks for set-to-set matching and learning. In: European Conference on Com-
puter Vision. pp. 626–646. Springer (2020)
12. Shorten, C., Khoshgoftaar, T.M.: A survey on image data augmentation for deep
learning. Journal of big data 6(1), 1–48 (2019)
13. Van Dyk, D.A., Meng, X.L.: The art of data augmentation. Journal of Computa-
tional and Graphical Statistics 10(1), 1–50 (2001)
14. Vapnik, V.: The nature of statistical learning theory. Springer science & business
media (1999)
15. Vapnik, V.N.: An overview of statistical learning theory. IEEE transactions on
neural networks 10(5), 988–999 (1999)
16. Xiao, H., Lin, W., Sheng, B., Lu, K., Yan, J., Wang, J., Ding, E., Zhang, Y., Xiong,
H.: Group re-identification: Leveraging and integrating multi-grain information. In:
Proceedings of the 26th ACM international conference on Multimedia. pp. 192–200
(2018)
17. Zhong, Z., Zheng, L., Kang, G., Li, S., Yang, Y.: Random erasing data augmenta-
tion. In: Proceedings of the AAAI conference on artificial intelligence. vol. 34, pp.
13001–13008 (2020)
18. Zhu, P., Zhang, L., Zuo, W., Zhang, D.: From point to set: Extend the learning of
distance metrics. In: Proceedings of the IEEE international conference on computer
vision. pp. 2664–2671 (2013)
|
|
http://arxiv.org/abs/2302.12987v1 | 2023-02-25T04:48:48 | 2023-02-25T04:48:48 | Complementary to Multiple Labels: A Correlation-Aware Correction
Approach | \textit{Complementary label learning} (CLL) requires annotators to give
\emph{irrelevant} labels instead of relevant labels for instances. Currently,
CLL has shown its promising performance on multi-class data by estimating a
transition matrix. However, current multi-class CLL techniques cannot work well
on multi-labeled data since they assume each instance is associated with one
label while each multi-labeled instance is relevant to multiple labels. Here,
we show theoretically how the estimated transition matrix in multi-class CLL
could be distorted in multi-labeled cases as they ignore co-existing relevant
labels. Moreover, theoretical findings reveal that calculating a transition
matrix from label correlations in \textit{multi-labeled CLL} (ML-CLL) needs
multi-labeled data, while this is unavailable for ML-CLL. To solve this issue,
we propose a two-step method to estimate the transition matrix from candidate
labels. Specifically, we first estimate an initial transition matrix by
decomposing the multi-label problem into a series of binary classification
problems, then the initial transition matrix is corrected by label correlations
to enforce the addition of relationships among labels. We further show that the
proposal is classifier-consistent, and additionally introduce an MSE-based
regularizer to alleviate the tendency of BCE loss overfitting to noises.
Experimental results have demonstrated the effectiveness of the proposed
method. | [
"Yi Gao",
"Miao Xu",
"Min-Ling Zhang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12987v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12987v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | 3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
7
8
9
2
1
.
2
0
3
2
:
v
i
X
r
a
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
1
Complementary to Multiple Labels: A
Correlation-Aware Correction Approach
Yi Gao, Miao Xu, and Min-Ling Zhang, Senior Member, IEEE
Abstract-Complementary label learning (CLL) requires annotators to give irrelevant labels instead of relevant labels for instances.
Currently, CLL has shown its promising performance on multi-class data by estimating a transition matrix. However, current multi-class
CLL techniques cannot work well on multi-labeled data since they assume each instance is associated with one label while each
multi-labeled instance is relevant to multiple labels. Here, we show theoretically how the estimated transition matrix in multi-class CLL
could be distorted in multi-labeled cases as they ignore co-existing relevant labels. Moreover, theoretical findings reveal that calculating
a transition matrix from label correlations in multi-labeled CLL (ML-CLL) needs multi-labeled data, while this is unavailable for ML-CLL.
To solve this issue, we propose a two-step method to estimate the transition matrix from candidate labels. Specifically, we first estimate
an initial transition matrix by decomposing the multi-label problem into a series of binary classification problems, then the initial
transition matrix is corrected by label correlations to enforce the addition of relationships among labels. We further show that the
proposal is classifier-consistent, and additionally introduce an MSE-based regularizer to alleviate the tendency of BCE loss overfitting
to noises. Experimental results have demonstrated the effectiveness of the proposed method.
Index Terms-Complementary label learning, multi-label learning, transition matrix, label correlations.
(cid:70)
1 INTRODUCTION
In multi-label learning (MLL), each instance is associated with
a set of relevant labels, where the learned classifier aims to
predict all relevant labels of unseen instances [1], [2]. MLL
is widely used in many real-world applications, such as text
categorization [3], [4], image retrieval [5], etc. However, col-
lecting precisely multi-labeled data is laborious because of
the unknown number of relevant labels per instance and the
existence of complex semantic labels. For the example image
in Fig. 1, besides the label Architecture, there exist other
relevant labels whose accurate annotation needs one-by-one
checking of the whole label space; in addition, annotators
need special geographical and cultural domain knowledge
to accurately label the image as Paris.
To release the laborious of annotating multi-labeled data,
we explore the problem setting of multi-labeled CLL (ML-
CLL), where each instance is associated with a single com-
plementary label (an irrelevant label of the instance) instead
of multiple relevant labels. Providing such weakly super-
vised information will ease the labeling process in large
label space because selecting one complementary label is
low-cost and requires less domain knowledge than selecting
all relevant labels. One example of ML-CLL is given in Fig.
1 when selecting desert as the complementary label. Given
the complementary label, the goal of ML-CLL is still the
• Yi Gao is with the School of Cyber Science and Engineering, Southeast
University, Nanjing 210096, China and the Key Laboratory of Computer
Network and Information Integration (Southeast University), Ministry of
Education, China. E-mail: gao [email protected]
• Miao Xu is with The University of Queensland, Australia. E-mail:
[email protected]
• Min-Ling Zhang (corresponding author) is with the School of Computer
Science and Engineering,Southeast University, Nanjing 210096, China
and the Key Laboratory of Computer Network and Information Inte-
gration (Southeast University), Ministry of Education, China. E-mail:
[email protected]
Manuscript received April 19, 2005; revised August 26, 2015.
Fig. 1. An example of ML-CLL. The relevant labels of the image are
people, architecture, sky, plant, and Paris, while desert is the comple-
mentary label of this image. The label Paris is a complex semantic label,
because it is difficult to be directly identified without domain knowledge.
same as fully supervised MLL, i.e., learning a model that
can accurately predict multiple relevant labels for unseen
instances.
The setting of CLL was initially applied in the multi-class
learning task [6], [7], [8], [9], [10], [11], [12]. Previous multi-
class CLL approaches are based on an estimated transition
matrix that summarizes the probability of a label being
selected as a complementary label [6], [7], [8]. Although they
have achieved a promising performance on multi-class data,
they are restricted to the case where an instance is associated
with only one relevant label. In this case, multi-class CLL
approaches only consider the exclusive relationship among
labels, while these approaches ignore that labels can bear
other relationships in the multi-labeled case, especially the
co-occurrence of labels. In fact, relationships among labels
are crucial to solving ML-CLL problems since the selection
of a complementary label of an instance in MLL is the
combined result against multiple relevant labels rather than
against only a single relevant label. Misusing a technique
targeting against a single relevant label to the multiple rele-
vant labels case will result in a wrongly estimated transition
The relevant label setpeoplearchitectureskyComplementary labelNot "desert"Parisplant
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
matrix.
In this paper, we first theoretically analyze how the esti-
mation of the transition matrix using the current multi-class
CLL techniques could be distorted in multi-labeled cases.
According to these findings, we observe that estimating the
transition matrix in ML-CLL from label correlations needs to
know relevant labels of instances, while these are unavail-
able. To remove this pain, we propose a two-step method
to estimate the transition matrix in ML-CLL from candidate
labels which are the complement of complementary labels.
Our strategy includes: (1) estimating an initial transition
matrix by decomposing the multi-label problem into binary
classification problems; (2) using label correlations to correct
the initial transition matrix by enforcing the addition of
relationships among labels. The fast convergence of Cross-
Entropy (CE) loss benefits from focusing on instances that are
difficult to classify, which may result in CE loss overfitting
to noisy labeled data. As a type of CE loss, Binary CE (BCE)
loss has the same problem. The study of [13] indicates that
Mean square error (MSE) loss is less sensitive to noisy labels
than CE loss. As Binary CE (BCE) loss is a benchmark of our
approach, an MSE-based regularizer is further introduced to
alleviate the tendency of it overfitting to noises.
In addition, we show that our proposed ML-CLL can be
easily combined with learning from relevant labels, which
significantly extends the application scenario of the pro-
posed algorithm. This combination is particularly useful,
e.g. when labels are collected via crowdsourcing [14] where
crowdworkers are asked to randomly select a complemen-
tary label and one or more relevant labels for an instance.
Experimental results on various datasets demonstrate the ef-
fectiveness of the proposed approach. Especially in situation
when each instance is only equipped with a complementary
label and a relevant label, our proposal has superior per-
formance, even comparable with the performance on fully
supervised data. Our main contributions are summarized as
follows:
• We theoretically analyze the distortion of the transi-
tion matrix estimated by multi-class CLL in multi-
labeled cases, because multi-class CLL techniques
ignore the co-existence of relevant labels. Theoretical
findings reveal that multi-labeled data is indispens-
able for calculating the transition matrix from label
correlations.
• To solve the problem of unavailable multi-labeled
data, we propose a two-step method to estimate the
transition matrix from candidate labels. Moreover,
we show theoretically that the proposed approach
is classifier-consistent under a mild assumption.
• We introduce a practical strategy – MSE-based reg-
ularization – to alleviate the overfitting tendency of
BCE loss. Our empirical study shows that the pro-
posal obtains comparable performance with state-of-
the-art baselines, which proves the effectiveness of
our approach.
The rest of this paper are organized as follows. Section 2
briefly reviews related work of ML-CLL. Then we formalize
the ML-CLL problem in Section 3, analyze it theoretically
and describe our approach in Section 4. In Section 5, we
introduce an MSE-based regularization and show how to
adapt our method to bear an additional small amount of
relevant labels. The experimental results are given in Section
6 and we conclude in Section 7.
2
2 RELATED WORK
In this section, we will give a brief review of related work
of ML-CLL, including MLL, partial multi-label learning (PML)
and multi-class CLL.
2.1 Multi-Label Learning
MLL problems aim to train a classifier that can predict a
set of relevant labels for an unseen instance, where each
training instance is associated with multiple relevant labels
simultaneously. With the complexity of label correlation, the
previous studies can be grouped into three categories [15],
[16], [17], [18]: first-order approach [19], [20], [21], second-order
approach [22], [23] and high-order approach [24], [25]. To solve
MLL problems, the first-order approach decomposes MLL
problems into a set of binary classification problems [19],
[20]. However, these approaches ignore label correlations
among labels, which play a crucial role in MLL [15]. Af-
ter realizing the importance of label correlation, more and
more studies attempt to exploit it to improve MLL perfor-
mance. Among them, the second-order approach considers
the pairwise label correlations that refer to the relationship
between two labels. The kind of these approaches generally
transform MLL problems into bipartite ranking problems
by enforcing that relevant labels should be ranked higher
than irrelevant labels [23], [26], [27]. Beyond second-order
relationship, there exists more complex relationship be-
tween labels in many real-world scenarios. Therefore, many
approaches begin to exploit high-order label correlations to
handle the MLL problems recently [24], [28], [29], [30]. For
example, Zhao et al. [30] leverage variational autoencoder
to facilitate the learning process via exploiting high-order
correlations among labels, while Wang et al. and Xun et
al. [31], [32] both design special neural network blocks to
automatically extract label correlations to improve the label
prediction performance. Although high-order approaches
have the ability of stronger label correlation-modeling, they
may suffer from high computational cost comparing to first
and second-orders approaches [33].
2.2 Partial Multi-Label Learning
Due to that the fully supervised data is difficult to collect,
many reseachers tend to explore the weakly supervision
data form to alleviate the heavy load of labeled data col-
lection [34]. PML is a recently emerging weakly supervised
approch firstly proposed by Xie et al. [35]. In PML, each
training instance is associated with a set of candidate labels
that consist of relevant labels and irrelevant (noisy) labels
and the goal is to learn a classifier assigning a set of labels
accurately for unseen instances.
At the first glance, it seems that ML-CLL is an extreme
case of PML, such that all PML methods are also applicable
to ML-CLL. However, existing PML methods assume that
noisy only composes a small portion in the candidate la-
bels [33], [36], [37], [38], such that many approaches [33],
[37], [38] adopt matrix factorization matrix factorization to
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
tackle PML problems, which decompose the candidate label
matrix into the low-rank multi-label matrix and the sparse
noisy label matrix. Compared to PML, the studied ML-
CLL problem in this paper are target at the problem with
only one complementary label, resulting in a high-noise
PML problem on which the existing approaches can not be
applicable. We will demonstrate the performance difference
in the experimental part.
2.3 Multi-Class Complementary Label Learning
Currently, CLL problem is only considered in multi-class
learning, whose goal is to predict a single relevant label
per instance precisely from complementary labeled data.
Previous approaches can be roughly grouped into two cate-
gories: (1) modeling the generative relationship between the
complementary label and the relevant label [6], [7], [8], [12],
[39]; (2) modeling the probability of complementary labels
from the learned discriminative classifier directly [9], [10],
[11].
The first multi-class CLL method belongs to category
one. It models the generative relationship between com-
plementary labels and relevant labels, and uses a such
generative process to rewrite one-versus-all and pairwise
comparison loss functions to derive an unbiased risk esti-
mator [6]. Ishida et al. [7] realize that the method of [6]
is restricted to loss functions and propose a new method
which can use arbitrary losses and models. A typical way
to make use of the modeled generative process is through
a transition matrix, which summarizes the probabilities of a
label being complementary labels when relevant labels are
given. Then, approaches apply a transition matrix to recover
relevant labels from complementary labels [7], [8], [39].
Compared with [6], [7], transition matrix-based methods
can map more complex generative relationship rather than
uniform one only. Therefore, we tend to design a transition
matrix-based method to solve ML-CLL problem with a
different estimating way.
Differ from category one, approaches residing in cate-
gory two directly model the probabilities of complementary
labels from the learned classifier without the generative
relationship [9], [10], [11]. Chou et al. propose a surrogate
complementary loss framework based on complementary
labels providing negative feedback during the training pro-
cess [9]. Although its losses fail to derive an unbiased risk
estimator, it achieves good performance on the multi-class
CLL. In light of the property of the complementary label
that the predictive probability of the complementary label
is expected to approach zero, [10] and [11] propose a dis-
criminative solution by directly modeling the probabilities
of complementary labels from learned classifier to avoid
the generative assumption. Due to that multi-class CLL
approaches are designed for a single relevant label case,
which are not suitable for the ML-CLL case that an instance
is associated with multiple labels simultaneously. We will
demonstrate that in the experimental part.
3 PROBLEM SETUP
In MLL, let X be the feature space and Y = {l1, l2, . . . , lK}
be the finite label space with K possible class labels (K > 2).
3
A multi-label instance x ∈ X is equipped with a set of rele-
vant labels Y ⊆ Y. (x, Y ) is independently sampled from an
unknown joint probability distribution p(x, Y ). Here we ex-
clude the special cases of Y = ∅ nor Y to ensure relevant la-
bels and complementary labels both exist. For convenience,
we use a binary vector y = [y1, y2, . . . , yK] ∈ {0, 1}K to
denote Y , where yk = 1 indicates that lk ∈ Y is relevant to
i.i.d.∼ p(x, Y )
x and 0 otherwise. Suppose D = {(xi, yi)}n
is the training set with n instances. The goal of MLL is to
learn a multi-label classifier h : X → 2Y , which can predict
a set of relevant labels for any unseen instance. Instead of
learning h directly, most MLL methods tend to learn a real-
valued decision function f : X → RK via minimizing the
expected risk
i=1
RL(f ) = Ep(x,Y )[L(f (x), y)],
(1)
where L is a proper MLL loss function [30], such as BCE
loss. f (x) is usually interpreted as a probability vector:
f k(x) is the k-th entry of f (x) and predicts the confi-
dence score that label lk is relevant to x, i.e., if properly
normalized then p(yk = 1|x). Due to that p(x, Y ) is un-
known, the expected risk is usually approximated by the
(cid:80)n
empirical risk (cid:98)RL(f ) = 1
i=1 L(f (xi), yi). If denoting
n
the optimal classifier learned from the expected risk as f ∗,
i.e., f ∗ = argminf RL(f ), then (cid:98)f ∗ denotes the optimal
classifier learned by minimizing the empirical risk,
i.e.,
(cid:98)f ∗ = argminf (cid:98)RL(f ).
In ML-CLL studied in this paper, each training instance
is equipped with a single complementary label. The com-
plementary labeled instance (x, ̄y) ∈ (X , Y) is drawn from
an unknown joint probability distribution p(x, ̄y), where
̄y ∈ Y \ Y is a complementary label of x. ̄y can be presented
as a K-dimensional vector ̄y = [ ̄y1, ̄y2, . . . , ̄yK]. If label
lj is selected as the complementary label to x ( ̄y = lj),
then ̄yj is one and all other elements are zero in ̄y. We
utilize (cid:98)Y = Y \ ̄y to denote the candidate label set of x.
Let a K-dimension vector (cid:98)y = [(cid:98)y1, (cid:98)y2, . . . , (cid:98)yK] to be the
corresponding vector representation of subset (cid:98)Y , where all
elements are one except that the one corresponding to the
complementary label is set to be zero ( (cid:98)y = 1 − ̄y).
i=1
i.i.d.∼ p(x, ̄y) be the ML-CLL
training set with n instances. The expected risk of multi-
labeled CLL is defined over p(x, ̄y):
Let ̄D = {(xi, ̄yi)}n
R ̄L(f ) = Ep(x, ̄y)[ ̄L(f (x), ̄y)],
(2)
where ̄L denotes a ML-CLL loss, which will be proposed
later this paper. Similarly, the corresponding empirical risk
(cid:80)n
is described as (cid:98)R ̄L(f ) = 1
n
̄L(f (xi), ̄yi).
i=1
4 THE PROPOSED APPROACH
In this section, we first introduce the definition of the
transition matrix in MLL and analyze why the estimated
transition matrix using multi-class techniques is unsuitable
for ML-CLL. Then, we describe an advanced two-step way
to estimate the transition matrix in the MLL case. Finally,
we prove our approach is classifier-consistent with a mild
assumption.
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
4.1 Transition Matrix for ML-CLL
In ML-CLL, we start by introducing a transition matrix ̃T
that summarizes the probabilities for a complementary label
given a set of relevant labels. More specifically, the transition
matrix ̃T is defined as ̃Tkj = p( ̄yj = 1|Y = Ck) where
Ck ∈ Y (cid:48) = {2Y − ∅ − Y} (k ∈ [2K − 2]) is the k-th label
subset. If lj ∈ Ck, then ̃Tkj = 0 because the label lj has
no chance to be selected as the complementary label. In this
paper, we employ the same class-dependent assumption as
the multi-class CLL approach [8]: p( ̄y|Y, x) = p( ̄y|Y ) as ̄y
and x are conditionally independent given Y . Then we can
obtain the following equation:
p( ̄yj = 1|x) =
(cid:88)
p( ̄yj = 1|Y = C)p(Y = C|x),
C∈Y (cid:48),lj /∈C
(3)
where we assume the label lj is a complementary label of
x. Then, according to Eq.(3), p( ̄y|x) can be approximated
by p(Y |x) when the transition matrix ̃T is known. If con-
sidering all possible label subsets of Y (cid:48) as C, we have
̃T ∈ R(2K −2)×K , i.e., the size of ̃T depends on the size of the
power set of Y (cid:48). Practically, the power set of Y (cid:48) would be
computationally prohibitive and even impossible to store,
since 2K − 2 is an extremely large number when the number
of possible labels K is large. To solve this combinatorial
explosion problem, we explore a more practical way to
use an alternative lower-dimensional transition matrix to
replace the higher-dimensional one. We start investigating
the feasibility of the alternative lower-dimensional matrix
from Theorem 1.
Theorem 1. Given an instance x, suppose Y is the relevant label
set and the label lj is the complementary label which is randomly
selected. Then the following equality holds:
p( ̄yj = 1|x) =
(cid:88)
p( ̄yj = 1|Y = C)p(Y = C|x)
C∈Y (cid:48),lj /∈C
K
(cid:88)
≥
k=1,k(cid:54)=j
p( ̄yj = 1|yk = 1)p(yk = 1|x).
The second inequality holds because of addition rule of
probability. The detailed proof is in Appendix A. Theorem 1
shows that using T to approximate p( ̄y|x) is a lower bound
of using ̃T to approximate p( ̄y|x). Observed by Eq.(3), we
find that our main goal transforms from precisely predicting
the relevant label set Y of x to precisely predicting its
complementary label ̄y via the transition matrix ̃T. This
means that we need to maximize the predictive probability
of the complementary label of x, i.e., maximizing p( ̄y|x).
From this point of view, Theorem 1 theoretically shows
the feasibility of using a low-dimension transition matrix
to replace the high-dimension ̃T, because we optimize by
maximizing the lower bound of Eq.(3). Let T ∈ [0, 1]K×K
denote the lower-dimensional transition matrix, where the
(k, j)-th element of T is Tkj = p( ̄yj = 1|yk = 1), and
Tkj = 0 when k = j. Thus, we adopt the K × K matrix
T as the transition matrix in the following of the paper to
avoid the pain in computation and storage brought up by
the (2K − 2) × K matrix ̃T.
4
4.2 Distortion in Estimating the Transition Matrix
Before exploring how the transition matrix estimated by
multi-class CLL is distorted from that of ML-CLL, we first
introduce the transition matrix estimated by multi-class CLL
techniques. Suppose Q ∈ [0, 1]K×K be the transition matrix
estimated in multi-class CLL. Recalling the approach [8], it
estimates the transition matrix under a special assumption:
for each label lk, existing an anchor set Sx|lk ⊂ X such that
p(yk = 1|x) = 1 and p(yk(cid:48)
= 1|x) = 0 (lk(cid:48) ∈ Y \ {lk}).
With this assumption and regardless of label correlations,
the estimation of Qkj is p( ̄yj = 1|yk = 1) = p( ̄yj = 1|x) iff
x is sampled from Sx|lk , where Qkj is the k-th row and j-th
column element of Q.
To measure the distortion between T calculated in ML-
CLL and the estimated Q, we define their difference on the
complementary label lj of x as follows
(cid:96)j =
K
(cid:88)
k=1
|Tkj − Qkj|.
(4)
The larger value of (cid:80)K
j=1 (cid:96)j indicates that T deviates further
from Q. As we know, label correlations and co-occurred
multiple labels are key properties of MLL. Due to that the
correlations among labels are intricate, directly calculating
T from all label correlations will bring high computational
cost. For convenience, we give a simple case of MLL includ-
ing label correlations – at most two labels can co-occur for
an instance, and the rest of labels are mutually exclusive
– to facilitate us calculating T from label correlations and
explore the distortion of T and Q. We start to study the
above contents from the definition of mutually exclusive.
Definition 2. For any x ∈ X , only a label is relevant to x, i.e.
|Y | = 1, which labels are mutually exclusive.
Under the simple case in MLL, in Theorem 3, we state
how to estimate T directly from label correlations, and the
distortion of T and Q.
Theorem 3. Under a MLL scenario: suppose the labels lz1 , lz2 ∈
Y (z1, z2 ∈ [K], z1 (cid:54)= z2) are dependent, and the labels belonging
to Y \ {lz1 , lz2 } are mutually exclusive. For any x, its label set
Y ⊆ {lz1, lz2} and Y (cid:54)= ∅. Let the label lj (j ∈ [K], j (cid:54)= z1, z2)
be the complementary label of x ∈ X . Tz1j and Tz2j calculated
from label correlations satisfy
Tz1j =
Tz2j =
p( ̄yj = 1|x)
p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p(yz1 = 1|x)
p( ̄yj = 1|x)
p(yz1 = 1| ̄yj = 1, yz2 = 1, x)p(yz2 = 1|x)
,
,
where [K] denotes the integer set {1, 2, . . . , K}. The difference of
T and Q on the complementary label lj is
(cid:96)j ≥ 2(
1
ξ2 − 1)p( ̄yj = 1|x),
where ξ = max{p(yz2 = 1| ̄yj = 1, yz1 = 1, x), p(yz1 =
1| ̄yj = 1, yz2 = 1, x)}.
The proof is provided in Appendix B. From Theorem 3,
we can see that calculating the transition matrix from label
correlations is more complex than estimating one without
label correlations, and the relevant label sets of instances
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
need to be known. Moreover, Theorem 3 shows that there is
a distortion between T and Q, which widely exists in multi-
labeled cases since each multi-label instance is relevant to
multiple labels. The above learning scenario only considers
the pairwise label correlations, while there exists a more
complex relationship among labels. Similarly, under a realiz-
able computational cost, we construct another simple MLL
scenario with more complex label relationships to explore
factors that affect (cid:96)j in Corollary 4.
Corollary 4. Under a MLL scenario: there are m (m ≥ 2) labels
lz1, lz2 , . . . , lzm ∈ Y (z1, . . . , zm ∈ [K]) that are dependent,
while the labels belong to Y \ {lz1, lz2, . . . , lzm } are mutually
exclusive. For any x ∈ X , its relevant set Y ⊆ {lz1, lz2 . . . , lzm }
and Y (cid:54)= ∅. Suppose the label lj is the complementary label of x.
The difference (cid:96)j between T and Q has
(cid:96)j ≥ m(
1
ξm − 1)p( ̄yj = 1|x),
where ξ = max{p(yzm = 1| ̄yj = 1, yz1 = 1, . . . , yzm−1 =
1, x), p(yzm−1 = 1| ̄yj = 1, yz1 = 1, . . . , yzm−2 = 1, yzm =
1, x), . . . , p(yz1 = 1| ̄yj = 1, yz2 = 1, . . . , yzm = 1, x)} (ξ ∈
(0, 1]).
The proof is shown in Appendix C. According to Corollary
4, when label correlations are more complex, the distortion
of the transition matrix estimated by the multi-class CLL
approach is more serious as m increases. Meanwhile, it
demonstrates that the ML-CLL problem cannot be solved
by current techniques in multi-class CLL.
4.3 Estimation T with Label Correlations
As discussed above, calculating the transition matrix T
from label correlations needs instances whose relevant la-
bel sets are known. Moreover, calculating T is more and
more difficult as relationships among labels become more
complex by observing the results of T in Theorem 3 and
Corollary 4. Due to that multi-labeled data are unavailable
for our setting, we propose a two-step method to estimate
T from candidate labels, and it can reduce the complexi-
ties in calculating T from label correlations. This two-step
method includes: (1) computing an initial transition matrix
S ∈ [0, 1]K×K from candidate labels by decomposing the
multi-label problem into a series of binary classification
problem; (2) obtaining the final estimation of T by using
label correlations to correct S.
Computing an initial transition matrix S. Let Skj =
p( ̄yj = 1|(cid:98)yk = 1) be an initial transition probability, which
is a (k, j)-th element of S. We caulculate S from candidate
labels of instances. Multiplication theorem of probability 1
is applied to calculate Skj and ensure that the following
equation holds:
Skj = p( ̄yj = 1|(cid:98)yk = 1)
= p( ̄yj = 1|(cid:98)yk = 1)
(cid:90)
p(x| ̄yj = 1, (cid:98)yk = 1)dx
(5)
(cid:90)
=
p( ̄yj = 1|(cid:98)yk = 1, x)p(x|(cid:98)yk = 1)dx
1. p(x, ̄yj = 1, (cid:98)yk = 1) = p( ̄yj = 1|(cid:98)yk = 1, x)p(x|(cid:98)yk = 1)p((cid:98)yk =
1) = p( ̄yj = 1|(cid:98)yk = 1)p(x| ̄yj = 1, (cid:98)yk = 1)p((cid:98)yk = 1) ⇒ p( ̄yj = 1|(cid:98)yk =
1, x)p(x|(cid:98)yk = 1) = p( ̄yj = 1|(cid:98)yk = 1)p(x| ̄yj = 1, (cid:98)yk = 1)
5
Fig. 2. An example of correcting S with label correlations.
= Ep(x|(cid:98)yk=1)[p( ̄yj = 1|(cid:98)yk = 1, x)],
where j, k ∈ [K] and j (cid:54)= k. In practice, Ep(x|(cid:98)yk=1)[p( ̄yj =
1|(cid:98)yk = 1, x)] can be approximated by the expectation of
p( ̄yj = 1|(cid:98)yk = 1, x) over the conditional distribution
p(x|(cid:98)yk = 1). Assuming ̄y and (cid:98)Y are conditionally inde-
pendent given x, so p( ̄yj = 1|(cid:98)yk = 1, x) = p( ̄yj = 1|x). In-
tuitively, p( ̄yj = 1|x) can be approximated by the classifier
learned from ̄D to predict the probability of complementary
labels. Let Ak denote the subset of x in ̄D with (cid:98)yk = 1,
which satisfies the conditional distribution p(x|(cid:98)yk = 1).
Thus, Skj can be estimated by
Skj =
=
1
|Ak|
1
|Ak|
(cid:88)
x∈Ak
(cid:88)
x∈Ak
p( ̄yj = 1|(cid:98)yk = 1, x)
(6)
p( ̄yj = 1|x).
Estimating T with label correlations. The calculating
procedure of S lacks exactly supervised data. Observed
by the transition probabilities of T calculated from label
correlations in subsection 4.2, we can find that they are
affected by label correlations. Moreover, a label that is low-
co-occurred to the relevant labels could be preferentially
selected as the complementary label from the view of label
correlations. For example, considering water as the rele-
vant label; in this case, desert (low-co-occurred label) will
have a larger chance to be selected as the complementary
label compared to fish (high-co-occurred label). Motivated
by these findings, we use label correlations to correct the
initial matrix S to estimate T by enforcing the addition of
relationships among labels.
Suppose C ∈ [0, 1]K×K be a label correlation matrix,
where the element Ckj represents the correlation between
labels lk and lj. The value of Ckj is larger when the
correlation of labels lk and lj is stronger. Following [35],
[40], we adopt the co-occurrence rate of two candidate labels
as their correlations. Finally, the transition matrix T can be
estimated by (cid:98)T = SCT , where (cid:98)Tkj = 0 if k = j, and
normalizing T by row.
Fig. 2 is an example of refining procedure. As can be
seen from the Fig. 2, though the estimated initial probability
of p( ̄y2 = 1|(cid:98)y1 = 1) is higher than p( ̄y3 = 1|(cid:98)y1 = 1) in
S, the value of p( ̄y2 = 1|y1 = 1) is lower than p( ̄y3 =
1|y1 = 1) in (cid:98)T. This is because the labels l1 and l2 have a
strong correlation as shown in C, so the label l2 has a lower
chance to be selected as the complementary label for the
label l1. The corrected initial transition matrix S agrees with
our expectation on the low-co-occurred labels that tend to be
selected as complementary labels preferentially. In practice,
the estimation of T depends on p( ̄y|x), where the classifier
should perfectly model the probability of complementary
00.70.30.400.60.90.1000.180.420.0600.040.090.81000.90.10.900.60.10.60JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
labels. When data equipped with complementary labels is
sufficiently, the perfect model is capable of modeling p( ̄y|x).
4.4 A Classifier-Consistent Approach
According to the transition matrix T, we can derive the
probability of complementary labels from multi-label clas-
sifier. Let ̄f (x) ∈ RK be a complementary label classifier,
which is defined as
̄f (x) = TT f (x),
(7)
where ̄f (x) is applied to approximate p( ̄y|x), ̄f j(x) refers
to the j-th element of ̄f (x). ML-CLL problems aim to
recover a set of relevant labels per instance from a com-
plementary label. Since training instances are associated
with complementary labels, the common loss functions of
MLL are unsuitable for ML-CLL. Therefore, we define a
complementary loss function ̄L as
̄L(f (x), ̄y) = L( ̄f (x), ̄y) = L(TT f (x), ̄y).
(8)
Denote by f ∗
CL the minimizer of R ̄L(f ), the minimizer
CL of (cid:98)R ̄L(f ) is used to approximated f ∗
(cid:98)f ∗
CL. Recalling
the definition of classifier-consistent, if a classifier learned
by an approach finally converges to the optimal classifier
f ∗ learned in MLL as the number of instances increases,
then this approach is classifier-consistent [41], [42], [43]. We
derive our proposal is classifier-consistent based on a mild
assumption:
Assumption 5. Suppose the transition matrix T is invertible
and can perfectly recover the relationship between relevant labels
of x and its complementary label. Then, we have ̄y = TT y.
With Assumption 5, our approach trained on ̄L can be in-
ferred to be classifier-consistent, which is stated in Theorem
6. Naturally, Theorem 6 guarantees that the optimal classi-
fier learned from complementary labeled data converges to
the optimal one learned from fully supervised MLL.
Theorem 6. With Assumption 5, suppose the transition matrix
T is invertible, then the ML-CLL optimal classifier f ∗
CL converges
to the MLL optimal classifier f ∗, i.e., f ∗
CL = f ∗.
The proof is represented in Appendix D. Thanks to BCE loss
is a popular loss function in MLL, we adopt BCE loss as the
base in this paper, then ̄L is expressed as
̄L(f (x), ̄y) = − ̄ylog(TT f (x)) − (1 − ̄y)log(1 − TT f (x))),
(9)
where 1 denotes a K-dimensional vector with 1 for all
elements.
5 REGULARIZATION-BASED ENHANCEMENT
In this section, an MSE-based regularization of our approach
is described. And we attempt to combine a small amount of
relevant labels to explore more possibilities of our proposal.
5.1 An MSE-Based Regularization
Previous works indicate that CE loss always makes the
model focus on hard instances that are difficult to be clas-
sified precisely, while MSE loss and Mean Absolute Error
(MAE) loss are less sensitive to hard instances since they
6
Algorithm 1: MLCL Algorithm
Input:
̄D: the complementary-label training set
{(xi, ̄yi)}n
i=1;
E: the number of epochs;
A: an external stochastic optimization algorithm;
Output:
θ: model parameter for f (x; θ);
1 if T is unknown then
2
Train a classifier ̄f (x) with the sof tmax output
layer and Cross-Entropy loss on ̄D;
Fill S ∈ [0, 1]K×K with zeros;
for k = 1 to K do
num = 0;
for (xi, ̄yi) ∈ ̄D such that ̄yk
i = 0 do
num += 1;
Sk*+ = ̄f (xi); //add ̄f (xi) to k-th row of
S
end
Sk*/ = num;
3
4
5
6
7
8
9
10
11
end
(cid:98)T = SCT ;
12
13 end
14 for t = 1 to E do
15
Set gradient −∇θL;
Update θ by A;
16
17
18 end
Let L be the risk, L = 1
n
(cid:80)n
1
n
i=1(L( (cid:98)TT f (xi), ̄yi) +
(cid:80)n
̄L(f (xi), ̄yi) =
i=1
(cid:13)
(cid:13)
2
(cid:13) ̄yi − (cid:98)TT f (xi)
(cid:13)
(cid:13)
(cid:13)
);
F
treat per instance coequally [13], [44]. As this property,
the convergence rate of CE loss is superior to MSE loss
and MAE loss, whereas this property makes CE loss more
prone to the overfitting problem than MSE loss and MAE
loss when noisy labels present at training data [13], [44].
Actually, an excellent approach can converge quickly during
the training process, and shows good generalization ability
and robustness for unseen instances [11].
Obviously, BCE loss has a similar property to CE loss,
which results in an excellent convergence rate of ap-
proaches. Meanwhile, approaches based on BCE loss are
easy to suffer from the overfitting problem when using
noisy labeled data to learn. In fact, ML-CLL is a problem
setting with dense noisy labels, BCE loss may cause the
overfitting problem of a model in ML-CLL. To cope with this
problem, we introduce an MSE-based regularizer based on
MSE loss (i.e. (cid:96)2-norm regularization) to balance the robust
and convergence requirement of the proposed approach.
Hence, the MSE-based regularizer is defined as:
̄Lmse(f (x), ̄y) =
(cid:13)
(cid:13)
2
(cid:13) ̄y − TT f (x)
(cid:13)
(cid:13)
(cid:13)
F
.
(10)
Finally, we combine the complementary loss and the
MSE-based regularizer term, which leads to our target loss:
̄L(f (x), ̄y) = ̄L(f (x), ̄y) + β ̄Lmse(f (x), ̄y),
(11)
where β is the trade-off parameter and set as 1 (the selection
shown in Section 6). The all procedure of the proposed
approach (called MLCL) is shown in Algorithm 1.
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
7
TABLE 1
Statistics of datasets.
|S|
Datasets
2407
scene
2417
yeast
eurlex dc
8636
eurlex sm 13270
4194
corel5k
11103
corel16k
38912
bookmark
14784
delicious
dim(S) L(S) LCard(S)
294
103
5000
5000
499
120
2150
500
6
14
15
15
15
15
15
15
1.07
4.23
1.02
1.74
1.70
1.77
1.25
4.32
5.2 Incorporation of Relevant Labels
In many practical situations, we can use complementary
labels and relevant labels to learn more accurate classifiers,
which is highly practical implementation. To this end, mo-
tivated by [6], [45], let us design a reasonable combination
of the loss derived from complementary labeled data and
relevant labeled data:
̃L(f (x), ̄y, ̃y) = ̄L(f (x), ̄y) + (cid:107) ̃y − f (x)(cid:107)2
F ,
(12)
where ̃y = [ ̃y1, . . . , ̃y1] ∈ {0, 1}K denotes a binary vector
of relevant labels ̃Y of x, in which ̃y1 = 1 when the label
lk ∈ ̃Y . To provide more practicability, we do not restrict
given relevant labels ̃Y to must be equal to the set of relevant
labels Y , which means ̃Y ⊆ Y and ̃Y (cid:54)= ∅.
As explained in the instruction, we can naturally collect
data associated with complementary labels and relevant
labels via crowdsourcing [14]. Our loss function Eq.(12)
can leverage both kinds of labeled data to learn better
classifiers. We will experimentally show the usefulness of
this combination method in Section 6.
6 EXPERIMENTS
In this section, we will evaluate the effectiveness of MLCL,
where five common MLL criteria, including ranking loss,
hamming loss, one error, coverage and average precision, are
employed in this paper. The values of first four criteria are
smaller, the performance of approach is better. While the
value of average precision is greater, the better the perfor-
mance. The label set of x is predicted by Y = {lk|f k(x) >
0.5, 1 ≤ k ≤ K}. All experiments use PyTorch [46] and
NVIDIA TESLA K80 GPU to implement. The code will be
released after this paper has been accepted.
6.1 Experimental Settings
Datasets. We use eight widely-used MLL datasets, namely
corel5k, corel16k, delicious, eurlex dc, eurlex sm, yeast, book-
marks and scene, to our experiments2. Following [35], [36],
we adopt the same pre-processing to deal with the datasets.
More specifically, rare class labels are filtered out
for
datasets with more than 15 class labels, whose class labels
are kept under 15. Accordingly, instances that are relevant
with removed class labels are filtered out as well. Detailed
characteristics of these datasets are shown in Table 1.
Base models. The linear model is used as the base model.
Baselines. Two typical MLL approaches, ML-KNN [21]
and LIFT [47], are utilized as baselines, which deal with
2. Publicly available at http://mulan.sourceforge.net/datasets.
ML-CLL via regarding all possible labels in the candidate
label set as relevant labels for a training instance. Similarly,
three recent PML approaches are employed as comparing
approaches, including PML-lc [35], fpml [38] and PML-LRS
[37], which learn from training instances associated with
candidate labels. In addition, we employ a multi-class CLL
approach, called L-UW [10], as a baseline, which uses BEC
loss and sigmoid output layer instead of CE loss and softmax
output layer respectively to make L-UW suit for multi-
labeled data.
6.2 Comparison on Uniform Complementary Labels
Setup. Weight-decay is set as 1e − 4 and learning rate is
selected from {1e − 1, 1e − 2, 1e − 3} for all data sets.
We employ Adam [48] optimization method, and set the
number of batch-size and epoch as 256 and 200 respectively.
L-UW applies the same model and hyper-parameters as
ours. Here, we estimate T with a linear model. We use
Ten-fold cross-validation to evaluate experiments, where
training data is associated with complementary labels that
are generated by randomly selecting one of possible labels
excepting relevant labels (uniform complementary labels),
and test data is equipped with the set of relevant labels.
The mean metrics value and standard deviation (std) will be
reported as final experimental results for all approaches.
Results. Table 2 is utilized to report experimental re-
sults of various approaches on eight data sets equipped
with uniform complementary labels. ↑ / ↓ indicates the
larger/smaller the value, the better the performance.
According to reported results in Table 2, we can observe
that results of MLCL are superior or comparable perfor-
mance against baselines out of different data sets on five
criteria. Our approach achieves the best performance in
most cases. Specifically, the proposed approach outperforms
LIFT on eight datasets across all metrics. This is because
our approach is better at tackling the issue that training
data is associated with relevant labels and irrelevant la-
bels simultaneously than fully supervised MLL algorithms.
Furthermore, experimental results of PML-lc and PML-LRS
are inferior to ours in most cases, which demonstrate that
PML approaches are indeed inferior to our approach in
cases of dense noisy labels. Similarly, based on the results
of L-UW shown in Table 2, we observe that our approach
outperforms L-UW on almost all datasets and metrics other
than ranking loss and coverage on the delicious dataset. This
reflects that label correlations are important to solve ML-
CLL problems, which leads to the proposed approach taking
label correlations into account surpasses L-UW that ignores
label correlations.
6.3 Comparison on Biased Complementary Labels
Setup. To evaluate the effectiveness of our approach in dif-
ferent situations, we utilize training data with biased com-
plementary labels that are generated via the co-occurrence
rate of relevant labels. Specifically, we select a complemen-
tary label of an instance x from Y \ Y , and the selecting rule
follows: the class label with a lower co-occurrence rate has a
higher probability to be selected as a complementary label.
We adopt training data with biased complementary labels
to train the model, while test data is equipped with relevant
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
8
TABLE 2
Experimental results (mean ± std) on training data with uniform complementary labels. The best performance of each dataset is presented in
boldface, where •/◦ indicates whether MLCL is superior/inferior to baselines (with 5% t-test).
Methods
ML-KNN
LIFT
fpml
PML-lc
PML-LRS
L-UW
MLCL
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
.340±.032•
.247±.012•
.303±.016•
.336±.010•
.379±.034
.328±.047
.384±.006•
.398±.004•
.692±.030•
.297±.029•
.776±.031•
.689±.012•
.815±.048•
.736±.056
.801±.006•
.592±.018•
.820±.002•
.697±.012•
.932±.000•
.883±.001•
.886±.007•
.882±.009•
.917±.001•
.711±.003•
.299±.026•
.579±.018•
.285±.014•
.416±.010•
.473±.034
.430±.044
.359±.007•
.712±.006•
.543±.024•
.677±.019•
.412±.018•
.419±.010•
.355±.035•
.405±.050
.383±.007•
.487±.006•
.289±.020•
.298±.012•
.286±.016•
.346±.012•
.433±.037•
.392±.027•
.310±.007•
.383±.003•
.605±.023•
.284±.028•
.670±.013•
.679±.009•
.842±.056•
.789±.046•
.649±.016•
.533±.015•
.820±.003•
.697±.013•
.932±.000•
.883±.001•
.887±.007•
.882±.009•
.916±.001•
.711±.003•
.256±.017•
.649±.020•
.269±.015•
.427±.013•
.516±.035•
.488±.027•
.328±.008•
.703±.004•
.600±.017•
.636±.017•
.471±.012•
.421±.010•
.307±.038•
.350±.035•
.480±.010•
.511±.004•
Ranking loss ↓
.504±.025•
.233±.013•
.488±.033•
.488±.006•
.444±.026•
.420±.033•
.469±.019•
.438±.008•
.490±.025•
.251±.015•
.347±.025•
.436±.011•
.406±.075•
.457±.046•
.454±.036•
.445±.015•
One Error ↓
.815±.027•
.251±.025
.925±.016•
.872±.011•
.854±.035•
.816±.025•
.885±.020•
.618±.017•
.717±.021•
.583±.026•
.774±.015•
.662±.012
.811±.062•
.946±.028•
.798±.005•
.679±.011•
Hamming loss ↓
.819±.002•
.697±.013•
.118±.006•
.148±.005•
.887±.007•
.882±.009•
.420±.009•
.711±.003•
.251±.007
.268±.010•
.104±.002•
.138±.002
.155±.004
.177±.011◦
.123±.001◦
.394±.011•
Coverage ↓
.434±.021•
.553±.033•
.458±.031•
.569±.010•
.529±.028•
.513±.035•
.475±.019•
.726±.009•
.420±.021•
.506±.023
.326±.023•
.509±.013•
.492±.072
.537±.051•
.458±.035•
.695±.009•
Average Precision ↑
.417±.021•
.688±.017•
.232±.022•
.273±.006•
.297±.023•
.325±.022•
.267±.019•
.457±.006•
.465±.018•
.610±.016•
.373±.015•
.367±.009•
.330±.044•
.248±.026•
.329±.016•
.446±.010•
.258±.007◦
.464±.019•
.316±.011•
.332±.009•
.334±.009◦
.303±.005
.260±.004
.305±.002
.540±.023•
.738±.102•
.847±.010•
.731±.005•
.756±.010
.730±.000•
.584±.005•
.452±.007
.814±.000•
.316±.000•
.890±.039•
.825±.027•
.869±.002•
.862±.001•
.813±.001•
.459±.002•
.230±.006
.742±.027•
.298±.010•
.419±.010•
.429±.008
.405±.008
.280±.004
.609±.003◦
.637±.011•
.459±.032•
.346±.009•
.402±.005•
.397±.010
.424±.006
.534±.004•
.580±.002
.372±.028•
.214±.011
.598±.024•
.646±.015•
.367±.031
.303±.035
.303±.010•
.302±.006
.609±.041•
.251±.025
.837±.034•
.696±.008•
.769±.034
.693±.057
.590±.022•
.467±.023•
.518±.042•
.243±.010
.806±.015•
.773±.008•
.463±.018•
.423±.033•
.409±.014•
.369±.027•
.328±.022•
.525±.017
.334±.017•
.519±.008•
.457±.038
.407±.033
.292±.011•
.613±.006◦
.568±.026•
.712±.020
.250±.031•
.285±.009•
.371±.028
.437±.044
.506±.014•
.570±.009
.259±.030
.211±.013
.229±.026
.312±.014
.349±.035
.289±.042
.252±.013
.310±.003
.427±.018
.251±.023
.594±.035
.656±.029
.736±.065
.690±.056
.509±.012
.448±.016
.264±.027
.235±.008
.092±.005
.139±.005
.229±.068
.202±.067
.140±.004
.289±.004
.234±.025
.525±.021
.204±.023
.365±.014
.445±.048
.393±.042
.279±.011
.632±.007
.699±.017
.718±.019
.549±.025
.474±.017
.391±.037
.449±.049
.584±.013
.572±.005
label sets to evaluate the effectiveness of our approach. For
other experimental settings, we apply same settings with
Subsection 5.2.
Results. The mean and std of results on test data are
shown in Table 3. According to results shown in Table 3,
we can summarize the following impressive observations:
(1) MLCL achieves superior or comparable performance
to LIFT, fpml, PML-lc, PML-LRS and L-UW on different
data sets, which proves that the proposed approach can
predict the set of proper labels for unseen instances from
complementary labeled data; (2) Although MLCL fails to
achieve the best result on the scene dataset, our approach
is better than other baselines in the rest of datasets, which
indicates that our approach can effectively deal with ML-
CLL problems than others. These observations demonstrate
that the proposed method can both hold for the situation of
data with uniform and biased complementary labels.
6.4 Additional Experiments
Ablation experiments. We then explore the effect of dif-
ferent learning components on MLCL performance. Table 4
summarizes results of MLCL without the different compo-
nent, which trains on the data with uniform complementary
labels. In Table 4, without C refers to MLCL directly use the
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
9
TABLE 3
Experimental results (mean ± std) on training data with biased complementary labels. The best performance of each dataset is presented in
boldface, where •/◦ represents whether MLCL is superior/inferior to baselines (with 5% t-test).
Methods
ML-KNN
LIFT
fpml
PML-lc
PML-LRS
L-UW
MLCL
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
scene
yeast
eurlex dc
eurlex sm
corel5k
corel16k
bookmark
delicious
.086±.015◦
.240±.014•
.668±.009•
.364±.020•
.324±.038◦
.413±.063•
.567±.007•
.430±.005•
.228±.032◦
.330±.032•
.977±.005•
.699±.016•
.738±.067
.780±.061•
.906±.007•
.585±.012•
.088±.009◦
.697±.012•
.932±.000•
.883±.001•
.114±.008◦
.882±.009•
.917±.001•
.711±.003•
.086±.013◦
.551±.017•
.626±.008•
.432±.018•
.419±.055
.498±.052•
.565±.006•
.736±.004•
.860±.020◦
.670±.023•
.145±.005•
.405±.013•
.409±.040
.355±.054•
.219±.004•
.473±.006•
.319±.025
.297±.016•
.636±.021•
.392±.014•
.431±.030•
.431±.041•
.449±.042•
.413±.005•
.669±.043•
.280±.025•
.959±.014•
.753±.036•
.851±.038•
.827±.049•
.804±.037•
.557±.013•
.819±.002•
.697±.013•
.932±.000•
.883±.001•
.887±.007•
.882±.009•
.916±.001•
.711±.003•
.280±.020
.638±.028•
.596±.019•
.456±.014•
.515±.024•
.521±.038•
.455±.039•
.723±.005•
.559±.028•
.634±.016•
.166±.016•
.373±.016•
.300±.030•
.318±.033•
.320±.037•
.490±.006•
Ranking loss↓
.486±.027•
.227±.013•
.537±.015•
.499±.019•
.474±.028•
.454±.033•
.552±.018•
.452±.008•
.492±.019•
.248±.012•
.349±.028•
.447±.012•
.386±.047
.471±.068•
.491±.016•
.433±.011•
One Error↓
.803±.038•
.254±.028
.947±.008•
.886±.024•
.861±.034•
.837±.025•
.925±.008•
.617±.025•
.720±.018•
.583±.027•
.774±.015•
.664±.014
.828±.059•
.952±.021•
.792±.004•
.681±.012•
Hamming loss ↓
.820±.002•
.697±.013•
.118±.007•
.148±.005•
.887±.007•
.882±.009•
.419±.009•
.711±.003•
.252±.006
.268±.010•
.104±.002
.139±.002
.157±.003•
.178±.010
.122±.001◦
.388±.013•
Coverage↓
.420±.023•
.533±.012•
.504±.014•
.579±.015•
.555±.031•
.542±.035•
.553±.017•
.737±.008•
.420±.016•
.493±.025
.328±.026•
.520±.015•
.480±.041
.533±.066•
.492±.014•
.691±.009
Average Precision ↑
.428±.026•
.691±.022•
.201±.009•
.262±.016•
.282±.017•
.301±.024•
.212±.007•
.450±.008•
.462±.014•
.614±.015•
.371±.020•
.366±.010•
.325±.048•
.240±.030•
.320±.004•
.449±.010•
.258±.013◦
.454±.024•
.326±.009
.333±.009•
.357±.012
.375±.015
.244±.003•
.314±.003◦
.613±.017•
.546±.097•
.822±.004•
.737±.011•
.747±.016
.730±.000
.576±.003•
.434±.006◦
.814±.000•
.316±.000•
.889±.039•
.825±.027•
.869±.002•
.862±.001•
.813±.003•
.459±.002•
.229±.011◦
.723±.040•
.306±.009•
.418±.009•
.451±.013
.454±.018
.265±.003•
.625±.003◦
.608±.013
.500±.026•
.357±.005•
.400±.007•
.392±.017
.393±.054
.544±.003•
.581±.002◦
.368±.025•
.202±.012
.586±.036•
.641±.015•
.382±.033
.373±.029
.326±.008•
.349±.012◦
.696±.025•
.256±.025
.822±.038•
.704±.012•
.792±.039•
.731±.053
.635±.022•
.485±.016•
.523±.048•
.253±.017•
.799±.035•
.772±.009•
.498±.012•
.481±.028•
.549±.046•
.453±.015•
.321±.021•
.500±.018
.333±.018•
.512±.009•
.470±.036
.468±.030
.308±.013•
.671±.012◦
.529±.020•
.719±.020
.266±.031•
.282±.011•
.352±.032
.384±.036
.469±.014•
.544±.010
.326±.050
.199±.012
.308±.034
.316±.016
.358±.039
.357±.040
.211±.011
.360±.008
.553±.054
.254±.024
.695±.074
.650±.045
.752±.037
.707±.063
.502±.008
.463±.017
.290±.029
.239±.008
.109±.011
.138±.007
.208±.033
.207±.086
.146±.003
.304±.005
.286±.041
.498±.021
.274±.030
.362±.016
.449±.038
.453±.039
.231±.011
.688±.006
.618±.046
.726±.018
.456±.061
.482±.025
.380±.037
.407±.047
.599±.008
.544±.009
estimated initial transition matrix S to train, and without
̄Lmse indicates that MLCL only utilizes Eq.(9) to optimaze.
From results reported in Table 4, the performance of
MLCL surpasses that without different components in most
cases, which shows that two components, including using
label correlations to correct and an MSE-based regularizer,
are beneficial for our approach to improve the performance.
Especially, estimating T based on label correlations pushes
the proposed approach performance forward significantly
compared with that without C on most cases. Similarly,
an MSE-based regularizer brings significant benefits for our
approach, which demonstrates that an MSE-based regular-
izer balances the robustness and convergence rate of BCE
loss. These indicate that using label correlations to estimate
the transition matrix T and an MSE-based regularizer are
effective strategies to alleviate ML-CLL problems.
Trade-off parameter β. Table 5 reports the performance
of MLCL with varying β values that trade-off the comple-
mentary loss function ̄L and an MSE-based regularization
̄Lmse. Here, average precision is regarded as the criterion, and
the training data is with uniform complementary labels. β
is selected from the candidate value list {0.1, 0.3, 0.5, 0.8, 1}.
We can observe the best results of most datasets is achieved
at β = 1 and the performance drops when β takes a smaller
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
10
TABLE 4
Ablation experimental results (mean ± std) on training data with uniform complementary labels. The best performance is in boldface.
Methods
scene
yeast
eurlex dc
corel5k
scene
yeast
eurlex dc
corel5k
Uniform complementary labels
Biased complementary labels
MLCL
Without C
Without ̄Lmse
MLCL
Without C
Without ̄Lmse
MLCL
Without C
Without ̄Lmse
MLCL
Without C
Without ̄Lmse
MLCL
Without C
Without ̄Lmse
.264±.027
.290±.039
.510±.044
.259±.030
.282±.063
.379±.024
.427±.018
.474±.047
.607±.037
.234±.025
.255±.055
.334±.020
.699±.017
.671±.045
.566±.023
.235±.008
.421±.011
.229±.007
.211±.013
.419±.018
.216±.010
.251±.023
.633±.043
.250±.025
.525±.021
.683±.029
.527±.011
.718±.019
.472±.018
.711±.019
.092±.005
.109±.018
.509±.043
.229±.026
.277±.041
.303±.028
.594±.035
.708±.106
.740±.048
.204±.023
.247±.035
.249±.024
.549±.025
.469±.085
.426±.040
Hamming loss↓
.229±.068
.466±.025
.461±.053
.290±.029
.294±.029
.481±.047
Ranking loss↓
.349±.035
.487±.021
.362±.030
.326±.050
.348±.046
.353±.018
One error↓
.736±.065
.866±.019
.734±.058
.553±.054
.560±.042
.686±.013
Coverage↓
.445±.048
.565±.032
.451±.035
.286±.041
.306±.039
.310±.015
Average precision↑
.391±.037
.274±.014
.389±.041
.618±.046
.611±.038
.541±.013
.239±.008
.409±.012
.230±.009
.199±.012
.406±.016
.204±.011
.254±.024
.612±.051
.256±.025
.498±.021
.660±.023
.501±.015
.726±.018
.489±.015
.717±.020
.109±.011
.088±.004
.512±.046
.308±.034
.268±.024
.320±.025
.695±.074
.564±.029
.753±.044
.274±.030
.240±.023
.265±.022
.456±.061
.447±.021
.411±.034
.208±.033
.444±.031
.489±.036
.358±.039
.467±.026
.387±.027
.752±.037
.855±.027
.773±.068
.449±.038
.547±.031
.473±.023
.380±.037
.289±.022
.359±.050
TABLE 5
Parameter sensitivity analysis on uniform complementary-label data, where metric is average precision. The best performance is in boldface.
β
0.1
0.3
0.5
0.8
1
scene
.678±.017
.683±.015
.687±.016
.693±.016
.699±.017
yeast
.714±.019
.716±.018
.718±.018
.718±.018
.718±.019
eurlex dc
.545±.019
.549±.021
.547±.022
.541±.022
.549±.025
eurlex sm
.451±.025
.460±.021
.463±.016
.469±.018
.474±.017
corel5k
.374±.033
.378±.032
.385±.031
.387±.037
.391±.037
corel16k
.444±.046
.447±.047
.447±.048
.448±.048
.449±.049
bookmark
.565±.007
.579±.011
.583±.008
.582±.007
.584±.013
delicious
.554±.005
.565±.005
.575±.005
.572±.006
.572±.005
value. In general, a relatively large β (β ≤ 1) usually leads
to better performance than a small value. Therefore, we set
β = 1 for MLCL.
6.5 Combination of Complementary Labels and Rele-
vant Labels
Setup. Finally, we demonstrate the effectiveness of combin-
ing relevant labeled data and complementary labeled one.
The training data is associated with uniform complementary
labels and relevant labels simultaneously. More specifically,
an instance x is associated with a complementary label ̄y
and relevant labels ̃Y , where ̄y is uniformly selected and ̃Y
is randomly selected from the relevant label set Y of x (i.e.,
̃Y ⊆ Y ). Here, we set | ̃Y | = 1 that means each instance
only associated with a complementary label and a relevant
label. The other experimental settings are the same with
Subsection 5.2.
Results. We compare three methods: (1) the "Fully su-
pervised" method uses the linear model to train with the
fully supervised data, which is fully supervised MLL; (2)
the "CL" method refers to MLCL training with the uniform
complementary-label data; (3) the combination ("CL & RL")
method adopts the linear model with the loss function
Eq.(12) to train, where the training data is equipped with the
combination of complementary labels and relevant labels.
Table 6 reports the experimental results on five criteria.
We can see that the performance of "CL& RL" method is
much superior to "CL" method on all datasets over hamming
loss, ranking loss, one error, coverage and average precision,
such as "CL& RL" method outperforms "CL" method by a
large margin over average precision (+0.436 on eurlex dc and
+0.425 on eurlex sm). This demonstrates that the ML-CLL is
easily applied to fully supervised MLL scenarios, MLL with
missing labels [49], [50] or other MLL scenarios. Moreover,
"CL & RL" method achieves comparable performance to
"Fully supervised" method, which illustrates that ML-CLL
can get excellent results just via increasing a few additional
information. This is useful for application in the real world,
because ML-CLL can obtain good performance through less
expensive labeled data.
7 CONCLUSION
In this paper, we theoretically analyze the reason causing
why the estimated transition matrix in multi-class CLL is
distorted in ML-CLL. To alleviate the pain in directly calcu-
lating the transition matrix from complex label correlations
under multi-labeled data is unknown, we propose a two-
step method to estimate the transition matrix T in ML-
CLL, which adopts label correlations to correct an initial
transition matrix. Furthermore, we theoretically show that
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
11
TABLE 6
Experimental results (mean ± std) of five criteria."Fully supervised" is the linear model training with the fully supervised data (fully supervised
MLL). "CL" denotes each instance is associated with a complementary label sampled uniformly. "CL & RL" uses the linear model with the loss
function Eq.(12) to train, where each instance is equipped with a complementary label and a relevant label.
Datasets
scene
yeast
Fully supervised
CL
CL & RL
Fully supervised
CL
CL & RL
Fully supervised
CL
CL & RL
Fully supervised
CL
CL & RL
Fully supervised
CL
CL & RL
.120±.013
.264±.027
.124±.008
.075±.009
.259±.030
.082±.011
.222±.032
.427±.018
.229±.033
.077±.009
.234±.025
.084±.010
.868±.018
.699±.017
.860±.019
.208±.009
.235±.008
.225±.010
.169±.009
.211±.013
.191±.011
.223±.023
.251±.023
.255±.032
.451±.019
.525±.021
.474±.021
.760±.015
.718±.019
.734±.018
eurlex dc
eurlex sm
Hamming loss↓
.033±.001
.139±.005
.053±.002
Ranking loss↓
.019±.001
.312±.014
.044±.002
.004±.000
.092±.005
.005±.001
.003±.001
.229±.026
.005±.001
.019±.004
.594±.035
.022±.005
.004±.000
.204±.023
.006±.001
One Error↓
.069±.005
.656±.029
.098±.007
Coverage↓
.074±.002
.365±.014
.113±.004
Average Precision↑
.988±.003
.549±.025
.985±.004
.943±.004
.474±.017
.899±.004
corel5k
corel16k
bookmark
delicious
.198±.012
.229±.068
.178±.012
.258±.029
.349±.035
.268±.031
.627±.038
.736±.065
.639±.040
.347±.044
.445±.048
.363±.048
.494±.024
.391±.037
.485±.028
.196±.012
.202±.067
.172±.010
.222±.029
.289±.042
.227±.021
.588±.056
.690±.056
.600±.044
.315±.024
.393±.042
.326±.020
.530±.038
.449±.049
.523±.030
.098±.004
.140±.004
.085±.002
.090±.005
.252±.013
.102±.004
.313±.009
.509±.012
.324±.007
.112±.005
.279±.011
.125±.004
.766±.007
.584±.013
.753±.006
.276±.006
.289±.004
.285±.004
.226±.004
.310±.003
.267±.004
.340±.012
.448±.016
.398±.017
.527±.007
.632±.007
.564±.006
.662±.005
.572±.005
.618±.005
the proposed approach is classifier-consistent. Additionally,
due to MSE loss achieving a prominent robust, an MSE-
based regularizer is introduced to alleviate the tendency of
the fast convergent BCE loss overfitting to noises. Finally,
we show that our proposed ML-CLL can be easily combined
with relevant labels and the proposed method can achieve a
comparable performance to fully supervised MLL through
a few additional information.
REFERENCES
[1] M.-L. Zhang and Z.-H. Zhou, "A review on multi-label learning
algorithms," IEEE Trans. Knowl. Data Eng., vol. 26, no. 8, pp. 1819–
1837, 2014.
[2] M.-L. Zhang and L. Wu, "Lift: Multi-label learning with label-
specific features," IEEE Trans. Pattern Anal. Mach. Intell., vol. 37,
no. 1, pp. 107–120, 2015.
[3] T. N. Rubin, A. Chambers, P. Smyth, and M. Steyvers, "Statisti-
cal topic models for multi-label document classification," Mach.
Learn., vol. 88, no. 1-2, pp. 157–208, 2012.
[4] P.-J. Tang, M. Jiang, B. N. Xia, J. W. Pitera, J. Welser, and
N. V. Chawla, "Multi-label patent categorization with non-local
attention-based graph convolutional network," in Proceedings of the
34th Conference on Artificial Intelligence, York, NY, 2020, pp. 9024–
9031.
[5] A. Lambrecht and C. Tucker, "When does retargeting work? in-
formation specificity in online advertising," Journal of Marketing
research, vol. 50, no. 5, pp. 561–576, 2013.
[7] T.
[6] T. Ishida, G. Niu, W.-H. Hu, and M. Sugiyama, "Learning from
complementary labels," in Advances in Neural Information Process-
ing Systems 30, Long Beach, CA, 2017, pp. 5639–5649.
and M.
Sugiyama,
"Complementary-label learning for arbitrary losses and models,"
in Proceedings of the 36th International Conference on Machine Learn-
ing, ser. Proceedings of Machine Learning Research, Long Beach,
CA, 2019, pp. 2971–2980.
Ishida, G. Niu, A. K. Menon,
[8] X.-Y. Yu, T.-L. Liu, M.-M. Gong, and D.-C. Tao, "Learning with
biased complementary labels," in Proceedings of the 15th European
Conference on Computer Vision, Munich, Germany, 2018, pp. 69–85.
[9] Y.-T. Chou, G. Niu, H.-T. Lin, and M. Sugiyama, "Unbiased risk
estimators can mislead: A case study of learning with comple-
mentary labels," in Proceedings of the 37th International Conference
on Machine Learning, Virtual Event, 2020, pp. 1929–1938.
[10] Y. Gao and M.-L. Zhang, "Discriminative complementary-label
learning with weighted loss," in Proceedings of the 38th International
Conference on Machine Learning, Virtual Event, 2021, pp. 3587–3597.
[11] D.-B. Wang, L. Feng, and M.-L. Zhang, "Learning from comple-
mentary labels via partial-output consistency regularization," in
Proceedings of the Thirtieth International Joint Conference on Artificial
Intelligence, Virtual Event, 2021, pp. 3075–3081.
[12] L. Feng, T. Kaneko, B. Han, G. Niu, B. An, and M. Sugiyama,
"Learning with multiple complementary labels," in Proceedings of
the 37th International Conference on Machine Learning, Virtual Event,
2020, pp. 3072–3081.
[13] A. Ghosh, H. Kumar, and P. S. Sastry, "Robust loss functions under
label noise for deep neural networks," in Proceedings of the 31st
AAAI Conference on Artificial Intelligence, San Francisco, CA, 2017,
pp. 1919–1925.
[14] T. S. Sindlinger, "Crowdsourcing: why the power of the crowd is
driving the future of business," 2010.
[15] M.-L. Zhang and Z.-H. Zhou, "A review on multi-label learning
algorithms," IEEE Trans. Knowl. Data Eng., vol. 26, no. 8, pp. 1819–
1837, 2014.
[16] F. Wu, Z.-H. Wang, Z.-F. Zhang, Y. Yang, J.-B. Luo, W.-W. Zhu, and
Y.-T. Zhuang, "Weakly semi-supervised deep learning for multi-
label image annotation," IEEE Trans. Big Data, vol. 1, no. 3, pp.
109–122, 2015.
[17] S. S. Bucak, R. Jin, and A. K. Jain, "Multi-label learning with
incomplete class assignments," in The 24th IEEE Conference on
Computer Vision and Pattern Recognition, Colorado Springs, CO,
2011, pp. 2801–2808.
[18] W.-W. Liu, I. W. Tsang, and K. M ̈uller, "An easy-to-hard learning
paradigm for multiple classes and multiple labels," J. Mach. Learn.
Res., vol. 18, pp. 94:1–94:38, 2017.
[19] M.-L. Zhang, Y.-K. Li, X.-Y. Liu, and X. Geng, "Binary relevance for
multi-label learning: an overview," Frontiers Comput. Sci., vol. 12,
no. 2, pp. 191–202, 2018.
[20] M. R. Boutell, J.-B. Luo, X.-P. Shen, and C. M. Brown, "Learning
multi-label scene classification," Pattern Recognit., vol. 37, no. 9,
pp. 1757–1771, 2004.
[21] M.-L. Zhang and Z.-H. Zhou, "ML-KNN: A lazy learning ap-
proach to multi-label learning," Pattern Recognit., vol. 40, no. 7,
pp. 2038–2048, 2007.
[22] A. Elisseeff and J. Weston, "A kernel method for multi-labelled
classification," in Advances in Neural Information Processing Systems
14, Vancouver, Canada, 2001, pp. 681–687.
[23] J. F ̈urnkranz, E. H ̈ullermeier, E. Loza Menc ́ıa, and K. Brinker,
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
12
"Multilabel classification via calibrated label ranking," Machine
learning, vol. 73, no. 2, pp. 133–153, 2008.
in Neural Information Processing Systems 31, Montr ́eal, Canada,
2018, pp. 8792–8802.
[45] Y. Katsura and M. Uchida, "Bridging ordinary-label learning and
complementary-label learning," in Proceedings of the 12th Asian
Conference on Machine Learning, ser. Proceedings of Machine Learn-
ing Research, Bangkok, Thailand, 2020, pp. 161–176.
[46] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan,
T. Killeen, Z.-M. Lin, N. Gimelshein, L. Antiga, A. Desmaison,
A. K ̈opf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy,
B. Steiner, L. Fang, J.-J. Bai, and S. Chintala, "Pytorch: An impera-
tive style, high-performance deep learning library," in Advances in
Neural Information Processing Systems 32, Vancouver, Canada, 2019,
pp. 8024–8035.
[47] M.-L. Zhang and L. Wu, "Lift: Multi-label learning with label-
specific features," IEEE Trans. Pattern Anal. Mach. Intell., vol. 37,
no. 1, pp. 107–120, 2015.
[48] D. P. Kingma and J. Ba, "Adam: A method for stochastic optimiza-
tion," in Proceedings of the 3rd International Conference on Learning
Representations, San Diego, CA, 2015.
[49] L. Feng, J. Huang, S.-L. Shu, and B. An, "Regularized matrix
factorization for multilabel learning with missing labels," IEEE
Trans. Cybern., vol. 52, no. 5, pp. 3710–3721, 2022.
[50] C.-X. Wang, Y.-J. Lin, and J.-H. Liu, "Feature selection for multi-
label learning with missing labels," Appl. Intell., vol. 49, no. 8, pp.
3027–3042, 2019.
[24] J. Read, B. Pfahringer, G. Holmes, and E. Frank, "Classifier chains
for multi-label classification," Mach. Learn., vol. 85, no. 3, pp. 333–
359, 2011.
[25] G. Tsoumakas, I. Katakis, and I. P. Vlahavas, "Random k-labelsets
for multilabel classification," IEEE Trans. Knowl. Data Eng., vol. 23,
no. 7, pp. 1079–1089, 2011.
[26] M.-L. Zhang and Z.-H. Zhou, "Multilabel neural networks with
applications to functional genomics and text categorization," IEEE
transactions on Knowledge and Data Engineering, vol. 18, no. 10, pp.
1338–1351, 2006.
[27] Y.-C. Li, Y. Song, and J.-B. Luo, "Improving pairwise ranking
for multi-label image classification," in Proceedings of 2017 IEEE
conference on computer vision and pattern recognition, Honolulu, HI,
2017, pp. 3617–3625.
[28] S.-W. Ji, L. Tang, S.-P. Yu, and J.-P. Ye, "A shared-subspace learn-
ing framework for multi-label classification," ACM Trans. Knowl.
Discov. Data, vol. 4, no. 2, pp. 8:1–8:29, 2010.
[29] W. Gerych, T. Hartvigsen, L. Buquicchio, E. Agu, and E. A. Run-
densteiner, "Recurrent bayesian classifier chains for exact multi-
label classification," in Advances in Neural Information Processing
Systems 34, virtual event, 2021, pp. 15 981–15 992.
[30] W.-T. Zhao, S.-F. Kong, J.-W. Bai, D. Fink, and C. P. Gomes,
"HOT-VAE: learning high-order label correlation for multi-label
classification via attention-based variational autoencoders," in
Proceedings of 35th AAAI Conference on Artificial Intelligence, Virtual
Event, 2021, pp. 15 016–15 024.
[31] L.-C. Wang, Z.-M. Ding, S.-J. Han, J.-J. Han, C. Choi, and Y. Fu,
"Generative correlation discovery network for multi-label learn-
ing," in Proceedings of 2019 IEEE International Conference on Data
Mining, Beijing, China, 2019, pp. 588–597.
[32] G.-X. Xun, K. Jha, J.-H. Sun, and A.-D. Zhang, "Correlation net-
works for extreme multi-label text classification," in Proceedings
of 26th ACM SIGKDD Conference on Knowledge Discovery and Data
Mining, Virtual Event, 2020, pp. 1074–1082.
[33] L. Sun, S. Feng, J. Liu, G. Lyu, and C. Lang, "Global-local label
correlation for partial multi-label learning," IEEE Transactions on
Multimedia, vol. PP, no. 99, pp. 1–1, 2021.
[34] Z.-H. Zhou, "A brief introduction to weakly supervised learning,"
National science review, vol. 5, no. 1, pp. 44–53, 2018.
[35] M.-K. Xie and S.-J. Huang, "Partial multi-label learning," in Pro-
ceedings of the 32nd AAAI Conference on Artificial Intelligence, New
Orleans, LA, 2018, pp. 4302–4309.
[36] M.-K. Xie and S.-J. Huang, "Partial multi-label learning with noisy
label identification," in Proceedings of 34th AAAI Conference on
Artificial Intelligence, New York, NY, 2020, pp. 6454–6461.
[37] L.-J. Sun, S.-H. Feng, T. Wang, C.-Y. Lang, and Y. Jin, "Partial
multi-label learning by low-rank and sparse decomposition," in
Proceedings of the 33rd AAAI Conference on Artificial Intelligence,
Honolulu, HI, 2019, pp. 5016–5023.
[38] G.-X. Yu, X. Chen, C. Domeniconi, J. Wang, Z. Li, Z.-L. Zhang,
and X.-D. Wu, "Feature-induced partial multi-label learning," in
Proceedings of 2018 IEEE International Conference on Data Mining,
Singapore, 2018, pp. 1398–1403.
[39] Y.-W. Xu, M.-M. Gong, J.-X. Chen, T.-L. Liu, K. Zhang, and K. Bat-
manghelich, "Generative-discriminative complementary learn-
ing," in Proceedings of the 34th AAAI Conference on Artificial Intel-
ligence, New York, NY, 2020, pp. 6526–6533.
[40] S. Diplaris, G. Tsoumakas, P. A. Mitkas, and I. P. Vlahavas, "Pro-
tein classification with multiple algorithms," in Advances in 10th
Panhellenic Conference on Informatics, vol. 3746, Volos, Greece, 2005,
pp. 448–456.
[41] G. Patrini, A. Rozza, A. K. Menon, R. Nock, and L.-Z. Qu, "Making
deep neural networks robust to label noise: A loss correction
approach," in Proceedings of 2017 IEEE Conference on Computer
Vision and Pattern Recognition, Honolulu, HI, 2017, pp. 2233–2241.
[42] X.-B. Xia, T.-L. Liu, N.-N. Wang, B. Han, C. Gong, G. Niu, and
M. Sugiyama, "Are anchor points really indispensable in label-
noise learning?" in Advances in Neural Information Processing Sys-
tems 32, Vancouver, Canada, 2019, pp. 6835–6846.
[43] J.-Q. Lv, M. Xu, L. Feng, G. Niu, X. Geng, and M. Sugiyama, "Pro-
gressive identification of true labels for partial-label learning," in
Proceedings of the 37th International Conference on Machine Learning,
Virtual Event, 2020, pp. 6500–6510.
[44] Z.-L. Zhang and M. R. Sabuncu, "Generalized cross entropy loss
for training deep neural networks with noisy labels," in Advances
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
13
APPENDIX A
THE PROOF OF THEOREM 1
Theorem 1. Given an instance x, suppose Y is the relevant label set and the label lj is the complementary label which is randomly
selected. Then the following equality holds:
p( ̄yj = 1|x) =
(cid:88)
p( ̄yj = 1|Y = C)p(Y = C|x) ≥
C∈Y (cid:48),lj /∈C
K
(cid:88)
k=1,k(cid:54)=j
p( ̄yj = 1|yk = 1)p(yk = 1|x).
Proof. Firstly, we should introduce addition rule of probability: p(AB) = p(A) + p(B) − p(A ∪ B), so we have p(AB) ≥
p(A) + p(B). We start to prove the above inequlity. According to the assumption: p( ̄y|Y ) = p( ̄y|Y, x), we have
p( ̄yj = 1|x) =
(cid:88)
p( ̄yj = 1|Y = C)p(Y = C|x)
=
=
=
C∈Y (cid:48),lj /∈C
(cid:88)
C∈Y (cid:48),lj /∈C
(cid:88)
C∈Y (cid:48),lj /∈C
(cid:88)
C∈Y (cid:48),lj /∈C
p( ̄yj = 1|Y = C, x)p(Y = C|x)
p( ̄yj = 1, Y = C|x)
p(Y = C| ̄yj = 1, x)p( ̄yj = 1|x).
According to addition rule of probability, so we have
p( ̄yj = 1|x) ≥
(cid:88)
K
(cid:88)
C∈Y (cid:48),lj /∈C
k=1,k(cid:54)=j,lk∈C
p(yk = 1| ̄yj = 1, x) +
p(yk = 0| ̄yj = 1, x)
p( ̄yj = 1|x)
K
(cid:88)
k=1,lk /∈C
≥
=
=
=
=
≥
=
(cid:88)
K
(cid:88)
C∈Y (cid:48),lj /∈C
k=1,k(cid:54)=j,lk∈C
(cid:88)
K
(cid:88)
C∈Y (cid:48),lj /∈C
k=1,k(cid:54)=j,lk∈C
p(yk = 1| ̄yj = 1, x)p( ̄yj = 1|x)
∵
K
(cid:88)
k=1,lk /∈C
p(yk = 0| ̄yj = 1, x) ≥ 0
p( ̄yj = 1|yk = 1, x)p(yk = 1|x)
(cid:88)
K
(cid:88)
C∈Y (cid:48),lj /∈C
k=1,k(cid:54)=j
K
(cid:88)
(cid:88)
k=1,k(cid:54)=j
C∈Y (cid:48),lj /∈C
p( ̄yj = 1|yk = 1, x)p(yk = 1|x)
∵ p(yk = 1|x) = 0 if lk /∈ Y
p( ̄yj = 1|yk = 1, x)p(yk = 1|x)
K
(cid:88)
k=1,k(cid:54)=j
K
(cid:88)
k=1,k(cid:54)=j
K
(cid:88)
k=1,k(cid:54)=j
(2K−1 − 1)p( ̄yj = 1|yk = 1, x)p(yk = 1|x)
p( ̄yj = 1|yk = 1, x)p(yk = 1|x)
p( ̄yj = 1|yk = 1)p(yk = 1|x).
APPENDIX B
THE PROOF OF THEOREM 3
Theorem 3. Under a MLL scenario: suppose the labels lz1 , lz2 ∈ Y (z1, z2 ∈ [K], z1 (cid:54)= z2) are dependent, and the labels belonging
to Y \ {lz1 , lz2} are mutually exclusive. For any x ∈ X , its label set Y ⊆ {lz1 , lz2 } and Y (cid:54)= ∅. Let the label lj (j ∈ [K], j (cid:54)= z1, z2)
be the complementary label of x. Tz1j and Tz2j calculated from label correlations satisfy
Tz1j =
Tz2j =
p( ̄yj = 1|x)
p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p(yz1 = 1|x)
p( ̄yj = 1|x)
p(yz1 = 1| ̄yj = 1, yz2 = 1, x)p(yz2 = 1|x)
,
,
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
14
where [K] denotes the integer set {1, 2, . . . , K}. The difference of T and Q on the complementary label lj is
1
ξ2 − 1)p( ̄yj = 1|x),
where ξ = max{p(yz2 = 1| ̄yj = 1, yz1 = 1, x), p(yz1 = 1| ̄yj = 1, yz2 = 1, x)}.
(cid:96)j ≥ 2(
Proof. We start calculating the difference (cid:96)j from estimating the transition probabilities Tz1j and Tz1j. According to
Definition 2 and the description of Theorem 3, we have
p( ̄yj = 1|x) =
K
(cid:88)
k=1,k(cid:54)=j,z1,z2
p( ̄yj = 1|yk = 1, x)p(yk = 1|x) + p( ̄yj = 1|yz1 = 1, yz2 = 1, x)p(yz1 = 1, yz2 = 1|x)
+ p( ̄yj = 1|yz1 = 1, yz2 = 0, x)p(yz1 = 1, yz2 = 0|x) + p( ̄yj = 1|yz1 = 0, yz2 = 1, x)p(yz1 = 0, yz2 = 1|x)
+ p( ̄yj = 1|yz1 = 0, yz2 = 0, x)p(yz1 = 0, yz2 = 0|x)
K
(cid:88)
=
k=1,k(cid:54)=j,z1,z2
p( ̄yj = 1|yk = 1, x)p(yk = 1|x) + p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1, x)p(yz1 = 1|x)
+ p(yz1 = 1| ̄yj = 1, yz2 = 0, x)p( ̄yj = 1|yz2 = 0, x)p(yz2 = 0|x)
+ p(yz2 = 1| ̄yj = 1, yz1 = 0, x)p( ̄yj = 1|yz1 = 0, x)p(yz1 = 0|x)
+ p(yz2 = 0| ̄yj = 1, yz1 = 0, x)p( ̄yj = 1|yz1 = 0, x)p(yz1 = 0|x).
Based on the assumption of that ̄y and x are conditionally independent given Y , then we can have
p( ̄yj = 1|x) =
K
(cid:88)
k=1,k(cid:54)=j,z1,z2
p( ̄yj = 1|yk = 1)p(yk = 1|x) + p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1)p(yz1 = 1|x)
+ p(yz1 = 1| ̄yj = 1, yz2 = 0, x)p( ̄yj = 1|yz2 = 0)p(yz2 = 0|x)
+ p(yz2 = 1| ̄yj = 1, yz1 = 0, x)p( ̄yj = 1|yz1 = 0)p(yz1 = 0|x)
+ p(yz2 = 0| ̄yj = 1, yz1 = 0, x)p( ̄yj = 1|yz1 = 0)p(yz1 = 0|x).
Since p( ̄yj = 1|yz1 = 0) and p( ̄yj = 1|yz2 = 0) do not hold according to the definition of the transition matrix, and then
we can obtain
p( ̄yj = 1|x) =
K
(cid:88)
k=1,k(cid:54)=j,z1,z2
p( ̄yj = 1|yk = 1)p(yk = 1|x) + p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1)p(yz1 = 1|x)
= p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1)p(yz1 = 1|x)
∵ p(yk = 1|x) = 0 if lk /∈ Y
⇒ Tz1j = p( ̄yj = 1|yz1 = 1) =
p( ̄yj = 1|x)
p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p(yz1 = 1|x)
.
Similarly, we can get
Tz2j = p( ̄yj = 1|yz2 = 1) =
p( ̄yj = 1|x)
p(yz1 = 1| ̄yj = 1, yz2 = 1, x)p(yz2 = 1|x)
.
Next, we calculate the difference (cid:96)j. The rest elements of T*j are same as that estimated by multi-class CLL. According
the definition of (cid:96)j, we have
K
(cid:88)
(cid:96)j =
|Tkj − Qkj|
k=1
=
(cid:12)Tz1j + Tz2j − 2p( ̄yj = 1|x)(cid:12)
= (cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
p( ̄yj = 1|x)
p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p(yz1 = 1|x)
(cid:12)
1
(cid:12)
ξ2 − 1)p( ̄yj = 1|x)
(cid:12)
(cid:12)
1
ξ2 − 1)p( ̄yj = 1|x). ∵
1
ξ2 ≥ 1
= 2(
2(
≥
+
p( ̄yj = 1|x)
p(yz1 = 1| ̄yj = 1, yz2 = 1, x)p(yz2 = 1|x)
− 2p( ̄yj = 1|x)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Because 0 ≤ p(yz1 = 1|x) ≤ p(yz1 = 1| ̄yj = 1, yz2 = 1, x) ≤ 1 and 0 ≤ p(yz2 = 1|x) ≤ p(yz2 = 1| ̄yj = 1, yz1 = 1, x) ≤
1, ξ is defined as ξ = max{p(yz2 = 1| ̄yj = 1, yz1 = 1, x), p(yz1 = 1| ̄yj = 1, yz2 = 1, x)}, the above inequation holds.
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
15
APPENDIX C
THE PROOF OF COROLLARY 4
Corollary 4. Under a MLL scenario: there are m (m ≥ 2) labels lz1, lz2 , . . . , lzm ∈ Y (z1, . . . , zm ∈ [K]) that are dependent,
while the labels belong to Y \ {lz1, lz2, . . . , lzm} are mutually exclusive. For any x ∈ X , its relevant set Y ⊆ {lz1 , lz2 . . . , lzm} and
Y (cid:54)= ∅. Suppose the label lj is the complementary label of x. The difference (cid:96)j between T and Q has
(cid:96)j ≥ m(
1
ξm − 1)p( ̄yj = 1|x),
where ξ = max{p(yzm = 1| ̄yj = 1, yz1 = 1, . . . , yzm−1 = 1, x), p(yzm−1 = 1| ̄yj = 1, yz1 = 1, . . . , yzm−2 = 1, yzm =
1, x), . . . , p(yz1 = 1| ̄yj = 1, yz2 = 1, . . . , yzm = 1, x)} (ξ ∈ (0, 1]).
Proof. Here, we apply induction to get the difference as m increases. We start by computing the difference in the case of
m = 3. Suppose class labels lz1, lz2 , lz3 ∈ Y are dependent, while the rest of labels in the label space are mutually exclusive.
x is associated with Y ⊆ {lz1 , lz2, lz3} and Y (cid:54)= ∅. Then we calculate transition probabilities in T from label correlations
according to Theorem 3 as:
p( ̄yj = 1|x) =
K
(cid:88)
k=1,k(cid:54)=j,z1,z2,z3
p( ̄yj = 1|yk = 1, x)p(yk = 1|x) + p( ̄yj = 1, yz1 = 1, yz2 = 1, yz3 = 1|x)
= p( ̄yj = 1, yz1 = 1, yz2 = 1, yz3 = 1|x)
= p(yz3 = 1| ̄yj = 1, yz1 = 1, yz2 = 1, x)p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1, x)p(yz1 = 1|x)
= p(yz3 = 1| ̄yj = 1, yz1 = 1, yz2 = 1, x)p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1)p(yz1 = 1|x)
⇒ Tz1j = p( ̄yj = 1|yz1 = 1) =
p( ̄yj = 1|x)
p(yz3 = 1| ̄yj = 1, yz1 = 1, yz2 = 1, x)p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p(yz1 = 1|x)
.
Tz2j and Tz3j use the same way to estimate. Due to 0 ≤ p(yz1 = 1|x) ≤ p(yz1 = 1| ̄yj = 1, yz2 = 1, x) ≤ p(yz1 =
1| ̄yj = 1, yz2 = 1, yz3 = 1, x) ≤ 1, let ξ = max{p(yz3 = 1| ̄yj = 1, yz1 = 1, yz2 = 1, x), p(yz2 = 1| ̄yj = 1, yz1 = 1, yz3 =
1, x), p(yz1 = 1| ̄yj = 1, yz2 = 1, yz3 = 1, x)}, we can obtain
Similarly, we can compute Tz2j, Tz3j ≥ 1
Tz1j = p( ̄yj = 1|yz1 = 1) ≥
1
ξ3 p( ̄yj = 1|x).
ξ3 p( ̄yj = 1|x). Then the difference (cid:96)j is
K
(cid:88)
(cid:96)j =
|Tkj − Qkj|
k=1
= (cid:12)
(cid:12)Tz1j + Tz2j + Tz3j − 3p( ̄yj = 1|x)(cid:12)
(cid:12)
≥ 3(
1
ξ3 − 1)p( ̄yj = 1|x).
Similarly, for any m (0 < m < K), suppose class labels lz1, lz2 , . . . , lzm ∈ Y are strongly dependent, while the rest
of labels in the label space are mutually exclusive. x is associated with Y ⊆ {lz1 , lz2 , lz3} and Y (cid:54)= ∅. Then we calculate
transition probabilities from label correlations:
p( ̄yj = 1|x) =
K
(cid:88)
k=1,k(cid:54)=j,z1,...,zm
p( ̄yj = 1|yk = 1, x)p(yk = 1|x) + p( ̄yj = 1, yz1 = 1, . . . , yzm = 1|x)
= p( ̄yj = 1, yz1 = 1, . . . , yzs = 1|x)
= p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p( ̄yj = 1|yz1 = 1)p(yz1 = 1|x)Πm
i=3p(yzi = 1| ̄yj = 1, yz1 = 1, . . . , yzi−1 = 1, x)
⇒ Tz1j = p( ̄yj = 1|yz1 = 1) =
p(yz2 = 1| ̄yj = 1, yz1 = 1, x)p(yz1 = 1|x)Πm
i=3p(yzi = 1| ̄yj = 1, yz1 = 1, . . . , yzi−1 = 1, x)
p( ̄yj = 1|x)
.
As discussed above, Tz1j ≥ 1
ξm p( ̄yj = 1|x) since ξ = max{p(yzm = 1| ̄yj = 1, yz1 = 1, . . . , yzm−1 = 1, x), p(yzm−1 =
1| ̄yj = 1, yz1 = 1, . . . , yzm−2 = 1, yzm = 1, x), . . . , p(yz1 = 1| ̄yj = 1, yz2 = 1, . . . , yzm = 1, x)} (ξ ∈ (0, 1]). By the same
calculation way, we can obtain Tz2j, . . . , Tzmj ≥ 1
ξm p( ̄yj = 1|x). Based on induction, we can summarize the difference
(cid:96)j = (cid:80)K
k=1 |Tkj − Qkj| ≥ m( 1
ξm − 1)p( ̄yj = 1|x).
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015
16
APPENDIX D
THE PROOF OF THEOREM 6
Theorem 6. With Assumption 5, suppose the transition matrix T is invertible, then the ML-CLL optimal classifier f ∗
the MLL optimal classifier f ∗, i.e., f ∗
Proof. We prove f ∗ is also the optimal classifier for ML-CLL via substituting f ∗ into the ML-CLL risk:
CL = f ∗.
CL converges to
R ̄L(f ∗) = Ep(x, ̄y)[ ̄L(f ∗(x), ̄y)]
(cid:90) (cid:88)
=
̄L(f ∗(x), ̄y)p(x, ̄y)dx
̄y∈Y
(cid:90) (cid:88)
̄y∈Y
(cid:90) (cid:88)
̄y∈Y
(cid:90) (cid:88)
Y ∈Y
(cid:90) (cid:88)
=
=
=
=
L(TT f ∗(x), ̄y)
(cid:88)
Y ∈Y
p(Y | ̄y, x)p( ̄y, x)dx
L(TT f ∗(x), ̄y)p( ̄y|Y, x)p(Y, x)dx
(cid:88)
Y ∈Y
L(TT f ∗(x), ̄y)p(Y, x)dx
L(TT f ∗(x), T T y)p(Y, x)dx
Y ∈Y
= R(TT f ∗)
According to the proof of [8], f ∗
CL = TT f ∗. So we find the optimal f ∗ ensuring f ∗
CL = f ∗ when the transition matrix
T is invertible and Assumption 5 is satisfied.
|
|
http://arxiv.org/abs/2302.12983v1 | 2023-02-25T04:34:14 | 2023-02-25T04:34:14 | RipViz: Finding Rip Currents by Learning Pathline Behavior | We present a hybrid machine learning and flow analysis feature detection
method, RipViz, to extract rip currents from stationary videos. Rip currents
are dangerous strong currents that can drag beachgoers out to sea. Most people
are either unaware of them or do not know what they look like. In some
instances, even trained personnel such as lifeguards have difficulty
identifying them. RipViz produces a simple, easy to understand visualization of
rip location overlaid on the source video. With RipViz, we first obtain an
unsteady 2D vector field from the stationary video using optical flow. Movement
at each pixel is analyzed over time. At each seed point, sequences of short
pathlines, rather a single long pathline, are traced across the frames of the
video to better capture the quasi-periodic flow behavior of wave activity.
Because of the motion on the beach, the surf zone, and the surrounding areas,
these pathlines may still appear very cluttered and incomprehensible.
Furthermore, lay audiences are not familiar with pathlines and may not know how
to interpret them. To address this, we treat rip currents as a flow anomaly in
an otherwise normal flow. To learn about the normal flow behavior, we train an
LSTM autoencoder with pathline sequences from normal ocean, foreground, and
background movements. During test time, we use the trained LSTM autoencoder to
detect anomalous pathlines (i.e., those in the rip zone). The origination
points of such anomalous pathlines, over the course of the video, are then
presented as points within the rip zone. RipViz is fully automated and does not
require user input. Feedback from domain expert suggests that RipViz has the
potential for wider use. | [
"Akila de Silva",
"Mona Zhao",
"Donald Stewart",
"Fahim Hasan Khan",
"Gregory Dusek",
"James Davis",
"Alex Pang"
] | 10.1109/TVCG.2023.3243834 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1109/TVCG.2023.3243834",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12983v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12983v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.GR",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.GR",
"cs.CV",
"cs.LG",
"cs.MM"
] | © 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
RipViz:
Finding Rip Currents by Learning Pathline Behavior
Akila de Silva, Mona Zhao, Donald Stewart, Fahim Hasan Khan, Gregory Dusek, James Davis, and Alex Pang
3
2
0
2
b
e
F
5
2
]
R
G
.
s
c
[
1
v
3
8
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Fig. 1: Rip currents are deadly but remain invisible to many: We propose a feature detection method, RipViz, to make these
invisible rip currents visible. RipViz highlights locations of rip currents as a red region. This region is determined by finding seed
points that produce pathline sequences deviating from normal ocean flow. Non-experts and experts alike can use RipViz to visualize
rip currents.
Abstract-We present a hybrid machine learning and flow analysis feature detection method, RipViz, to extract rip currents from
stationary videos. Rip currents are dangerous strong currents that can drag beachgoers out to sea. Most people are either unaware
of them or do not know what they look like. In some instances, even trained personnel such as lifeguards have difficulty identifying
them. RipViz produces a simple, easy to understand visualization of rip location overlaid on the source video. With RipViz, we first
obtain an unsteady 2D vector field from the stationary video using optical flow. Movement at each pixel is analyzed over time. At each
seed point, sequences of short pathlines, rather a single long pathline, are traced across the frames of the video to better capture the
quasi-periodic flow behavior of wave activity. Because of the motion on the beach, the surf zone, and the surrounding areas, these
pathlines may still appear very cluttered and incomprehensible. Furthermore, lay audiences are not familiar with pathlines and may
not know how to interpret them. To address this, we treat rip currents as a flow anomaly in an otherwise normal flow. To learn about
the normal flow behavior, we train an LSTM autoencoder with pathline sequences from normal ocean, foreground, and background
movements. During test time, we use the trained LSTM autoencoder to detect anomalous pathlines (i.e., those in the rip zone). The
origination points of such anomalous pathlines, over the course of the video, are then presented as points within the rip zone. RipViz is
fully automated and does not require user input. Feedback from domain expert suggests that RipViz has the potential for wider use.
Index Terms-Flow visualization, 2D unsteady flow fields, pathlines, LSTM autoencoders, anomaly detection
1 INTRODUCTION
Rip currents are powerful, narrow channels of fast-moving water flow-
ing towards the sea from the nearshore [3, 6, 20, 27]. The speed of
seaward rips can be very strong, reaching two meters per second, faster
than an Olympic swimmer. They are a dangerous beach hazard that
most people do not recognize. As a result, there are thousands of
drownings each year due to rip currents globally [10, 25]. The goal of
this work is to improve public safety by helping the beachgoers see the
rip currents when they are present.
The mechanism for rip currents is an increase in the mean water
level, referred to as setup, which occurs when waves break against the
shore. This setup can vary along a shoreline depending on the amount
of water or height of breaking waves. Rip currents form as water tends
to flow from regions of high setup (larger waves) to regions of lower
setup (smaller waves), where currents converge to form a seaward
• Akila de Silva, Mona Zhao, Donald Stewart, Fahim Hasan Khan, James
Davis, Alex Pang is with UC Santa Cruz. E-mail: [email protected],
[email protected], [email protected], [email protected],
[email protected], [email protected]
• Gregory Dusek is with NOAA. E-mail: [email protected].
• Corresponding Authors : Akila de Silva and Alex Pang
Manuscript received 05 September 2022; revised 27 January 2023; accepted
04 February 2023. Digital Object Identifier: 10.1109/TVCG.2023.3243834
flowing rip.
Detecting rip currents with machine learning (ML) is challenging
because there are different types of rips, each with a different appear-
ance. The three major factors that lead to different types of rips are
the shape of the shoreline, the bathymetry, and hydrodynamic factors
(e.g., wave height and direction, tides). The combination of these lead
to rip currents with different visual signatures. Rips may also either be
transient or persistent in space and time. Detecting rip currents pose
unique challenges compared to detecting other objects such as cars,
or people, etc. Rips are amorphous without a well defined shape or
boundary, and are ephemeral without well defined temporal bounds.
Using an object detector, such as those included in a recent survey
[22], would require a substantial training dataset for each type of rip
current. To date, there are only two publicly available training datasets
for rip detection: individually labeled frames [11] and time averaged
images [29], both of the same type of rip current. There are no existing
training dataset for other types of rip.
By nature, rips always eventually flow seaward regardless of their
visual appearance. Therefore, we propose a novel hybrid approach
that incorporates flow analysis with ML for rip detection, rather than
relying on image colors. We also propose encoding rips as locations
with anomalous flow behavior, transforming the detection task into
differentiating normal from anomalous behavior. This greatly simplifies
the collection of training data since only a single dataset is needed.
1
ize dangerous rip currents.
In order to realize this, the following innovations are necessary:
• For flow fields with a quasi-periodic behavior, such as ocean flow,
working with a sequence of shorter pathlines is better than a
single long pathline.
• A weighted binary cross entropy, unlike the unweighted binary
cross entropy used in previous works, is more effective when
learning from sparsely distributed pathlines generated from ocean
flow.
2 RELATED WORK
Streamline Selection: Streamline selection and seed placement are
well studied in flow visualization. Sane et al. [39] provide a survey
of the body of work over the last two decades. These works share
overlapping goals with research on streamline clustering [5], and flow
simplification [23]. Each aims to produce an uncluttered presentation
of the flow field while still capturing the essential flow features and
behaviors. For example, Marchesin et al. [28] proposed dynamically
selecting a set of streamlines that leads to intelligible and uncluttered
streamline selection. Ma et al. [26] used an importance-driven approach
to view-dependent streamline selection that guarantees coherent stream-
line update when the view changes gradually. Yu et al. [44] proposed
hierarchical streamline bundles by producing streamlines near critical
points without enforcing dense seeding throughout the volume. They
grouped the streamlines to form a hierarchy from which they extracted
streamline bundles at different levels of detail. Tao et al. [41] proposed
two interrelated channels between candidate streamlines and sample
viewpoints. They selected streamlines by taking into account their con-
tribution to all sample viewpoints. However, the methods mentioned
above use handcrafted features to define the feature representation of
streamlines. Handcrafting features to represent pathlines in complex
unsteady flow fields, such as ocean flow fields, is a challenging task.
In contrast, the method presented in this paper learns complex feature
representations without the need for handcrafted features.
Deep Learning for Flow Visualization:
In recent years, the visual-
ization community has worked with ML in two ways: visualization to
understand the ML model, and use of ML in visualization tasks. On
the latter, particularly for flow visualization tasks, Berenjkoub et al. [2]
used U-net, a deep learning neural network, to identify vortex bound-
aries. Kim and G ̈unther [19] used a neural network to extract a steady
reference frame from an unsteady vector field. Han et al. [17] used
an autoencoder-based deep learning model, FlowNet, to learn feature
representations of streamlines in 3D steady flow fields which are then
used to cluster the streamlines. They used longer streamlines that were
integrated through the entire extent of the data. Furthermore, they used
one streamline per seed point. The work presented in this paper uses
a sequence of pathlines per seed point to learn the flow behavior from
noisy unsteady 2D flow fields. This work uses an LSTM autoencoder
to detect anomalous pathline sequences from noisy unsteady 2D flow
fields.
Rip Current Detection: Traditional rip current detection generally
involves in-situ instrumentation such as GPS-equipped drifters and
current meters [21, 27]. Remote sensing of rip currents is also possible
with aerial imaging of the spread of fluorescein dye in the rip zone
captured by drones, and the use of marine radar [16, 21]. These require
expensive equipment or a team of observers which makes them imprac-
tical for rip current monitoring or detection purposes. However, with
simple optical video capture such as from surf webcams, it is possible
to detect certain rip currents using a time-space (timestack) display or
a simulated long time exposure images (timex) display [18]. Timex im-
ages reveal rip locations as darker regions in the image that correspond
to deeper channels in the bathymetry where water may flow seaward.
In contrast, incoming water associated with the breaking waves in the
surf zone appear much brighter in timex images. This type of rip is
referred to as bathymetry controlled rips and are characterized by a
quiet region in the rip channel that is flanked by breaking waves on
Fig. 2: Long pathlines get cluttered making it difficult for ML to
learn: Left pane shows longer pathlines integrated over the entire
length of the video. Shorter pathlines, integrated over 900 time steps
are shown in the right pane. Longer pathlines are much more cluttered
and noisy, making it difficult for ML algorithms to learn its behavior.
Notice the relatively large amount of noisy pathlines in the sky and the
beach of the left pane. The pathlines are colored by age with yellow
representing most recent.
There are two existing approaches to detecting rip currents from
stationary videos. The first approach uses the appearance of rip currents
to detect them. This includes human experts analyzing time-averaged
(Timex) video or running automated object detectors [11, 29, 35, 36] to
detect rip currents. The second approach relies on flow analysis, where
the flow behavior of ocean waves is analyzed to detect rip currents.
Direction-based clustering of flow vectors [30, 34] and timelines [30]
placed parallel to the beach are used in this approach. While able to
detect weaker rip currents or those where the appearance is not obvious,
timelines require user input to specify their initial placement.
In this paper, we introduce RipViz, a fully automated, hybrid of deep
learning and flow analysis, feature detection method to find rip currents,
as shown in Figure 1. We first obtain the time varying flow field from
a stationary video using optical flow. We use pathline sequences to
capture the flow behavior. One could simply seed pathlines at every
point and trace each of them for the duration of the video. However,
due to the quasi-periodic nature of wave activity, this simple approach
produces too much clutter to be of much use as shown in Figure 2.
Furthermore, pathlines integrated over the full length of the video
accumulate more error, especially in noisy real world datasets. Instead,
we generate sequence of shorter pathlines for each seed point. By
staggering the initiation of pathlines, our expectation is that pathline
sequences outside the rip zone will behave differently. For example,
pathlines seeded in the surf zone where the waves are breaking will
have large variations in their trajectories. Pathlines seeded further out
to sea, on the beach, and sky would be fairly still. Pathlines seeded
within the rip zone will have less variations in their trajectories yet will
be different from the stationary ones.
In RipViz, we frame detecting rip currents as a flow anomaly
detection problem. An LSTM autoencoder with a custom weighted
loss function is used to learn the spatiotemporal features of pathline
sequences for normal ocean flow (i.e. not rip currents). The trained
LSTM autoencoder can predict anomalous pathline sequences (i.e.
rip currents) during test time. The origination points of anomalous
pathlines are identified and highlighted as a means of visualizing the
rip zone. Our target users are general public who are not familiar with
rip current dynamics nor visual analytic systems. Hence, our design for
the visualization output is to make it as simple and unambiguous as
possible.
The main contribution of this paper is:
• A hybrid feature detection method that combines machine learn-
ing and flow analysis techniques to automatically find and visual-
2
© 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
either side. Interpreting timex images require some domain expertise.
Maryan et al. [29] used a Viola-Jones framework to train their model on
timex images, and indicate the location of the rips via bounding boxes.
Likewise, Rashid et al. [35, 36] also used timex images but utilized
a modified version of the Tiny-Yolo V3 architecture. Similarly, Ellis
and McGill [12] used timex images in conjunction with environmental
information such as tides, wave height, and period to cluster offshore
movements to rip currents. However, their method produced false
positives in situations where non-water objects such as surfers, paddle
boarders, etc., are also moving offshore. Rather than working with
timex images, de Silva et al. [11] trained a Faster R-CNN model with a
accumulation buffer to detect bathymetry rips using individual frames
of the video. All of these methods detect bathymetry rips based on the
appearance of the sea state. However, in instances where appearance is
different or weak, these methods fail to detect rip currents.
An alternative approach is to detect rips based on the observed
behavior. Philip and Pang [34] obtained an unsteady flow field from
the video and hypothesized that the rip current is directly opposite the
dominant flow in the vector field due to the incoming wave motion.
They grouped vectors based on the direction and magnitude to visualize
the rip current. Mori et al. [30] used a similar approach to group vectors
and improved the visualization of the rip current by mapping direction
to color and magnitude to hue. In the same work, Mori et al. [30] also
used timelines to visualize rip currents. They placed timelines parallel
to the beach and observed its shape as it gets dragged by the rip current.
The work presented in this paper also uses optical video of the sea
state to detect rip currents. The underlying approach is also based on
the flow behavior, and hence not constrained to detecting bathymetry
rips. However, the presented methodology in this paper is the first to
propose combining ML and flow analysis to detect different types of
rip currents. Because detection is based on treating flow behavior in rip
currents as anomalous, the task of collecting and labeling training data
for an ML model is unified and simplified. In contrast, a standard ML
rip detection model would require a training data set for each type of
rip current – a costly and time consuming process.
Autoencoders: Autoencoders are a type of neural network that can
learn object representations without any supervision [7, 45]. Autoen-
coders are trained with a loss function that compares the input and
reconstructed output by using a reconstruction error. Long short term
memory (LSTM) autoencoders are a specialized type of autoencoder
that can learn from sequential data. These types of autoencoders are
equipped with LSTM layers that can learn how data is temporally
related. Furthermore, autoencoders are also used as anomaly detec-
tors [38]. For anomaly detection, autoencoders are first trained with
normal data. When presented with anomalous data, the trained autoen-
coder will produce a high reconstruction error. We exploit this property
to detect anomalous flow behavior.
The flow visualization community has used autoencoders to find
feature representations of objects that then can be used for clustering.
In their work, Han et al. [17] proposed to learn feature representation
of streamlines and stream surfaces of 3D steady flow fields by using an
autoencoder with a binary cross-entropy function. They then further
reduced the dimensionality of the features and used those to generate
clusters. However, their method does not learn how pathlines are
temporally related. Additionally, their unweighted binary cross entropy
loss function does not account for sparsely distributed pathlines. In our
work, we use an LSTM autoencoder with a custom weighted binary
cross-entropy loss function, to learn spatiotemporal behavior of sparsely
distributed pathline sequences from ocean scenes.
3 RIPVIZ
Identifying rip currents in complex and chaotic ocean flow is challeng-
ing. We first reconstructed a 2D unsteady flow field using optical flow
from ocean videos. Our method captured the ocean flow character-
istics by using short pathline sequences which are then represented
as stacks of binary images. We used an LSTM autoencoder to learn
spatiotemporal features of these pathline sequences. We trained our
model with pathline sequences of normal ocean flow using a custom
weighted binary cross-entropy function, suited for learning pathline
sequences of ocean flow. We then used this trained LSTM autoencoder
to identify pathline sequences of abnormal ocean flow or rip currents.
We visualized the rip currents by projecting the seed points of these
abnormal pathline sequences back onto the video frame and growing a
transparent red region around these points.
3.1 Flow Field Reconstruction
An unsteady 2D flow field is obtained from the stationary video using
optical flow. Many optical flow algorithms use the relative motion of
neighboring pixels between consecutive frames in the video to calculate
the local flow. We use Lucas-Kanade [24] sparse optical flow function
in the OpenCV library [14] to trace pathlines. We verified each inte-
gration step by comparing the forward and backward integration of the
flow field.
3.2 Sequence of Pathlines
Each pathline is represented by a 1D vector, p = {x1, y1, * * * , xn, yn},
where (xi, yi) is a point in the coordinate system of the video frame
and n is the length of the pathline. For the LSTM autoencoder to
learn about the pathlines, we transformed these pathlines into their
own 2D pathline-centric coordinate system. To do this, each pathline
is represented by an L × L binary image I, where each point in p
is translated to center the seed point in the binary image. For longer
pathlines that extend beyond L × L, we increased the size of the
binary image to accommodate these longer pathlines. We then resized
all of these larger binary images down to L × L. The reason why
all pathlines were not simply centered then resized to L × L is that
we need to differentiate pathlines that barely moved from their initial
seed position versus those that actually travelled beyond L × L. Also
note that by centering, the 2D representation of the pathlines are now
location agnostic. This combination allows us to compare pathlines
from different parts of the video to identify those with similar behavior.
As noted earlier, tracing pathlines over the entire length of a video
of quasi-periodic motion derived from noisy optical flow calculations
result in unusable cluttered flow representations. Instead, we reseeded
pathlines at the same seed point over regular time intervals to generate
pathline series of length S. We represented each pathline sequence as a
stack of binary images of size S × L × L associated with each seed
point.
3.3 LSTM Autoencoder
We used an LSTM autoencoder to learn from the pathline sequences.
The LSTM autoencoder consisted of two components, an encoder, and
a decoder, as shown in Figure 3. The encoder learns the spatiotemporal
features of the pathline sequence. The decoder reconstructs the pathline
sequence by using the learned spatiotemporal feature representation.
We specify the input layer of the LSTM autoencoder to expect path-
line sequences of shape S × L × L. The first and second layers of
the encoder are time-distributed 2D convolutional layers. These layers
consist of 128 and 64 convolutional filters, respectively. These layers
process each pathline of the sequence separately and learn the spatial
features of each pathline. The third and fourth layers are 2D convolu-
tional LSTM layers. Each layer consists of 64 and 32 convolutional
filters, respectively. These convolutional LSTM layers process the
sequence of pathlines together and learn the temporal features of the
pathline sequences. The first layer of the decoder is a convolutional
LSTM layer with 64 convolutional filters. The second and third lay-
ers of the decoder are time-distributed deconvolutional layers with 64,
and 128 respectively. The last layer of the LSTM autoencoder is a
time-distributed convolutional layer with 1 convolutional filter. Each
layer, except for the input and the output layers, is followed by a nor-
malization layer [1]. The input volume has no padding; therefore, we
set the stride of all layers to 1. The autoencoder outputs a sequence of
pathlines of shape S × L × L. For the hidden layers, we use the ReLU
activation [31]. For the output layer, we use the sigmoid activation.
In comparison to recent autoencoder based stream line selection
methods, our method not only learns the spatial features of each pathline
but also learns how each pathline is temporally related to other pathlines
in the same pathline sequence. Learning these spatio-temporal features
3
Fig. 3: RipViz pipeline: First, an optical flow field was generated from the input video (magnitude and direction of velocities are mapped to
value and hue, respectively.) Then pathline sequences were generated for each seed point in non-rip regions (only three seed points are shown)
where a new pathline is seeded at every frame. Finally, an LSTM autoencoder was trained with these pathline sequences generated from non-rip
regions. For rip detection, the trained LSTM autoencoder is used to detect anomalous pathline sequences by regularly seeding the video frame.
We then applied a region growing algorithm to the anomalous points to find the anomalous region, while filtering out singleton seeds.
allows our method to better learn about the quasi-periodic nature of the
chaotic ocean flow.
3.4 Weighted Loss Function
We trained the LSTM autoencoder by minimizing the difference be-
tween each training sample against the corresponding model prediction.
The loss function used to compute this difference is a weighted binary
cross-entropy loss function. Since each training sample is a pathline
sequence represented as a stack of binary images of size S × L × L,
we treat each sample as a binary volume where pi is 1 when the path-
line crosses that voxel and 0 otherwise. ˆpi is the corresponding value
from the predicted volume. The loss is calculated over all voxels (i.e.,
N = S × L × L ).
algorithm to generate a region. Isolated seeds without neighbors are
discarded. To visualize the rip zone, We projected this region back onto
the frames in the video as shown in Figure 1.
3.6 Network Training
We implemented our neural network in Tensorflow by using the Keras
application programming interface (API) [9]. We trained the network
using an NVIDIA Tesla A100 graphical processing unit (GPU). In the
training process, we initialized parameters in all layers of the neural
network using a normal distribution N (μ, σ2), where mean μ = 0 and
variance σ2 = 0.01. We applied the Adam optimizer [38] to update the
parameters with a learning rate of 10−6. We used the minibatch size of
10 and trained our model with 100 epochs.
L = −
1
N
i=1
N
(cid:88)
[w1 * pi log ˆpi + w0 * (1 − pi) log(1 − ˆpi)]
(1)
4 RESULTS AND DISCUSSION
w1 is weight assigned to voxels when pi = 1. w0 is weight assigned
to voxels when pi = 0.
In contrast, previous autoencoder based
neural network architectures used in flow visualization tasks used an
unweighted version of the same loss function (i.e., w1 = w0 = 1 ). We
found that a weighted binary cross-entropy function is better suited for
our application domain for reasons discussed in Section 4.2.
3.5 Detecting and Visualizing Rip Currents
During inference/test time, we calculated the reconstruction error for
each pathline sequence by using the loss function defined earlier. If the
error is larger than threshold T , we labeled those pathline sequences
as anomalous (i.e., rip currents). Otherwise, we labeled the sequences
as belonging to normal flow. We discuss how T was selected in Sec-
tion 4.2. Once the anomalous pathline sequences were found, the
corresponding seed points were connected by using a region growth
4
We describe our dataset, provide an analysis of the components and pa-
rameters used in RipViz, and present comparisons with other methods.
4.1 Dataset
Our dataset consists of 55 stationary videos. Each video is 1.5 to 4
minutes long and of size 1920 × 1080 pixels. We collected the data
from Salinas, Marina, and Davenport beaches in California in winter of
2022. We used either a tripod-mounted Canon EOS Rebel T7 DSLR
camera or a Samsung Android phone to acquire the data. We chose 4
videos to generate 16000 non-rip pathline sequences for training our
model by using the seeding strategy discussed in Section 4.2. Our
validation dataset consists of 12000 pathlines generated from three
videos. The remaining videos were used for testing. Note that our
training data does not include examples of each of the many types of rip
currents, only examples of normal ocean flow. This greatly simplifies
collection of training data. Each video was labeled under the guidance
Input VideoLSTM Autoencoder Optical Flow FieldGet Pathline Sequences For Each Seed Point from non-rip regions for trainingFind Seed Points Of Anomalous Pathline Sequences Output VideoRegion GrowthEncoderDecoder128864643264641281Time Distributed Convolutional LayersLSTM Convolutional LayersTime Distributed Deconvolutional Layers© 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
Fig. 4: Sparsely distributed pathlines in binary image: This figure
shows a collection of pathlines from our data. Notice the imbalance
in 0s (white) and 1s (black) in the binary images. The weighted loss
function, as described in Equation 1 allows the autoencoder to learn
with imbalanced data.
of the rip current expert. Pathlines seeded in the rip current area were
labeled as "rip" and others as "non-rip".
The framing of these videos, which includes the distance of camera
to the water and the focal length or zoom factor of the lens, is meant
to be representative of surf webcams (e.g. surfline.com) that might be
useful for rip current detection. Parameters such as integration length
n and binary image size L are based on such framing. Sensitivity of
these parameters on different framings are discussed in Section 4.2.
Note that we assume a stable video source and hence did not
perform any video stabilization. Wind can cause slight movements
of the camera, but also movements of grass, clouds, etc. Also, video
processing seldom work with raw video but rather on compressed
video. Deriving the optical flow field on compressed video may also
introduce some motion artifacts especially in highly compressed
regions such as the sky or empty sandy beaches. RipViz handles these
type of motion artifacts better than existing methods for our dataset.
4.2 Analysis of RipViz components
The RipViz method contains two important changes from prior meth-
ods: the use of a weighted loss function, and the use of a sequences of
pathlines rather than a single pathline. Without these changes we found
the ML fails to learn ocean flow. In addition, the method has param-
eters like detection threshold, T , and binary image size L which are
likely dependent on our specific application domain. In this section we
analyze each of these factors, showing that our changes are necessary,
and providing the method by which we determined parameters.
Threshold T : Threshold T is used to filter anomalous pathlines (i.e,
rip currents) based on the reconstruction error as discussed in Section
3.5. In order to find the optimal threshold T we calculated F1 score at
varying threshold values in a subset of our data. F1 score is defined as,
F1 =
2
1
recall +
1
precision
=
2
T P s + F P s+T P s
T P s
F N s+T P s
(2)
If a detected pathline falls within the expert annotated boundary of the
rip current, then it's counted as a TPs (true positive). Otherwise, it's
considered an FP (false positive). Suppose a pathline originating within
the rip current is not detected, then it's an FN (false negative). The
range of the F1 score is between 0 and 1. If most pathlines fall within
the rip current boundary, the score will be closer to 1, otherwise closer
to 0. We found that threshold, T = 1.0 produced the highest F1 score ,
and was used as T for the experiments in this paper.
Weights of the loss function w0 and w1: We reconstructed the flow
field from videos using optical flow. As discussed in Section 3.2, all
pathlines are represented in a binary image I. We observed that some
pathlines are short and do not extend far from the seed point, while
other pathlines are longer and travel farther from the seed point, as
shown in Figure 4. We needed the model to learn the distribution
of these shorter and longer pathlines because it allowed the model to
learn the normal flow behavior in an ocean scene. However, this leads
Fig. 5: F1 Scores for different combinations of w0 and w1: Notice
that the method does not converge when w0 and w1 are balanced. The
highest F1 score of 0.70 is achieved when w0 is set to 1 and w1 is set
to 40.
to an imbalance in the number of voxels with 1s and 0s, especially
for shorter pathlines. For the deep learning model to learn effectively
about these small features/pathlines, we needed to increase the weight
of the loss function when the target probability (pi) is 1. The loss
function, as described in Section 3.4, penalizes the model more for
making mistakes when predicting pixels with the target probability
1 in the training process. Using the weighted binary cross-entropy
function made the model better learn the distribution of shorter from
longer pathlines. In contrast, in FlowNet [17], the streamlines were well
spread out across their input volumes, making the use of a weighted
loss function unnecessary.
To find the optimal w0 and w1 for our application domain, we
randomly choose a small subset of pathline sequences, some short and
some long, to train models at different combinations of w0 and w1. We
trained each model for 100 epochs, using the same training conditions
specified in Section 3.6. For each trained model, we observed how many
voxels were correctly recreated. If the predicted probability for a voxel
with target probability of 1 is greater than 0.7, we marked that voxel as
TP; otherwise, it is considered to be FN. If the model predicted pathline
voxels in areas with no pathline, we marked that as FP. We calculated
the F1 score for each model with different weight combinations using
equation 2. We observed that non-uniform weighting is necessary, with
the highest F1 score generated when w0 = 1 and w1 = 40 as shown
in Figure 5. Note that using unweighted cross-entropy, as in previous
work, is the equivalent of setting w0 = w1 = 1. In this condition we
found that the model completely fails to learn ocean flow.
In some instances where the model did not converge, TPs were 0,
which resulted in an undefined F1 score. In such instances, we followed
the default reporting convention of Scikit-learn python library [33] and
reported those F1s as 0.00.
Pathline Length n and Sequence Length S:
In RipViz, we use
pathline sequences to learn flow behavior. In order to find the optimal
pathline length, n, and sequence length, S, for our application domain,
we trained multiple models while changing n and S, and observed
the F1 score as shown in Figure 6. We noticed two patterns from this
experiment. First, increasing the pathline length resulted in a higher
accuracy up to an optimal length; beyond this, the accuracy decreased.
Second, using a sequence of pathlines instead of a single pathline per
seed point produces more accurate results. We found that n = 900 and
S = 100 were optimal for our data set.
Size of binary image I = L × L: We represented each pathline in
a binary image as discussed in 3.2. We trained several models with
our training dataset where binary images were of different sizes as
shown in Figure 7. We compared each model by calculating the F1
score, similar to how F1 score was calculated for tuning Threshold
T . Our experiments indicated that small binary images (L × L =
5 × 5) cannot sufficiently capture the variations of pathline movements,
resulting in a lower F1 score. We also found that larger binary images
(L × L = 128 × 128) also resulted in a slightly lower F1 score.
Furthermore, larger binary images resulted in a high memory usage and
a longer training time. We found that L × L = 64 × 64 is sufficient
at capturing the variations of pathlines resulting in a high F1 score. In
our experiments we used L × L = 64 × 64 as the size of the binary
5
15101520253035404550w151w00.000.000.000.000.000.120.210.000.000.300.130.000.000.260.280.390.560.670.650.700.310.52Fig. 7: Binary image size (L × L): Notice that a binary image size of
64 × 64 produced the highest F1 score with least amount of computa-
tion.
Fig. 6: Pathline length (n) vs sequence length (S): F1 scores for dif-
ferent combinations of n nd S. The first column represents traditional
pathlines, while subsequent columns are for sequence of pathlines.
Notice that increasing the pathline length resulted in higher accuracy
up to an optimal length; beyond this, the accuracy decreased. Also
notice that using a sequence of pathlines over a single pathline per seed
point produced even more accurate results. We found that n = 900 and
S = 100 were optimal for our data set.
image I.
Seeding strategy: Various seeding strategies attempt to optimize
different goals such as aesthetics, clutter reduction, capturing flow
features, etc [39]. In this paper, the primary consideration for pathline
seeding take into account where one can have the highest return in
informational value regarding the water movement. Because most of
our training data and random beach images that one can find on the
web are taken in landscape mode, seeds are distributed uniformly along
the horizontal axis. Conversely, the water body is usually in the middle,
with the sky on top and the beach on the bottom halves of the framing.
We therefore use a Gaussian distribution of seeds along the vertical
axis. This is a form of importance sampling [4]. During the training
process, we use importance seeding to maximize pathlines that track
water movement, and reduce irrelevant information such as the beach or
cloud movement in the sky. During the testing process, we use regular
sampling since there is no guarantee that the test data will also be in
landscape mode.
4.3 Comparison with FlowNet using Single Long and Se-
quences of Short Pathlines
We compared RipViz with FlowNet [17], a deep learning based stream-
In FlowNet, 3D streamline features were
line clustering method.
learned by an autoencoder. These 3D streamlines were traced across
the full extent of the data. Additionally, they traced one streamline
per seed point. The trained autoencoder was used to generate 1D
representations of 3D streamlines. The dimensionality of these 1D
representations is further reduced by t-distributed stochastic neighbor
embedding (t-SNE) [43]. The resulting low dimensional vectors are
then clustered by using DBSCAN [13]. An interactive user interface
was used to find the desired clustering by changing the maximum dis-
tance between two feature descriptors (eps) and the minimum number
of samples in each cluster (ms).The autoencoder in FlowNet is trained
with a unweighted binary cross-entropy function (i.e., w0 = w1 = 1).
In order to compare with FlowNet, we transformed our long 2D
(a) Regular grid seeding
(b) Importance seeding
Fig. 8: Seeding strategies: We used regular grid to seed pathlines
when testing. For training we used importance seeding.
pathlines to 3D by adding a time axis as the z axis [42]. However,
since our pathlines are sparsely distributed in the 3D binary volume,
we found that the FlowNet model with the unweighted binary cross
entropy did not learn to differentiate the pathlines. Resulting in a
single cluster for all the pathlines. We show the clustering result in
Figure 9. Additionally, the training time was relatively long. A
proper comparison requires modification of FlowNet to work with our
application domain. The modifications are discussed in Appendix A.
We trained the modified FlowNet model with long pathlines, inte-
grated across the entirety of the video, and with single short pathlines
(n = 900). The output of the modified FlowNet is shown in Figure 9.
The first column shows a representative frame of each video. We see
that without modifications, FlowNet lumps all the pathlines into one
cluster. Both the modified FlowNet and RipViz, when fed with single
pathlines that run the entirety of the video, also fail to identify the rips.
When fed with shorter pathlines (n = 900), modified FlowNet start to
show signs of rip currents but includes significant FPs as well. Only,
when sequence of pathlines as used in RipViz do we see the rip currents
clearly.
In order to obtain a quantitative comparison between modified
FlowNet with shorter pathlines and RipViz, we calculated their F1
scores. If a seed point is flagged as as a rip by either method is within
the expert annotated rip current boundary then we mark it as TP, oth-
erwise we mark it as FP. If seed points within the rip are not selected
then we mark those points FN. We found that the F1 score for modified
FlowNet was 0.32 compared to the F1 score of 0.85 for RipViz as
shown in Table 1. We hypothesize the low F1 score for the modified
FlowNet was due to its high FP rate.
Furthermore, we found tuning the two hyperparamters eps and ms
for the clustering step was crucial in finding the appropriate clusters.
We noticed having some domain knowledge was helpful for the user
when exploring these two hyperparameters to find the ideal clustering.
In contrast, RipViz is automated and does not require any user input
during run time.
Both modified FlowNet and RipViz are based on autoencoders. How-
ever, RipViz learns how each pathline of the same seed point was related
in time by learning spatiotemporal features of pathline sequences. This
allows RipViz to learn ocean flow behavior more effectively. On the
6
11020406080100120140Sequence Length S110300700900130015001900230027003000Pathline Length n0.000.000.000.000.000.000.000.000.000.310.320.380.300.340.390.350.330.320.660.620.670.670.680.710.720.720.700.760.770.800.800.810.810.810.830.830.780.800.810.810.840.850.860.840.860.680.690.660.700.720.750.780.750.780.530.570.560.580.580.610.610.600.630.400.480.420.390.360.380.380.330.350.320.300.310.310.300.310.310.310.310.310.310.310.310.300.300.320.300.300.310.310.310.310.300.310.310.320.3111020406080100120140Sequence Length S5x532x3264X64128X128Binary Image Size LXL0.160.170.230.150.190.240.200.180.170.310.320.380.300.340.390.350.330.320.780.800.810.810.840.850.860.840.860.650.660.640.670.690.720.750.720.75© 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
Fig. 9: Comparison with FlowNet and different pathline parameters: The Video Frame column shows a representative frame of the video
clip while the Ground Truth column shows the expert's ground truth estimate. Notice that FlowNet without modifications (FlowNet Column)
incorrectly clusters all seed points into a single group. Both modified Flownet and RipViz when trained with longer pathlines were not able to
detect the rip current. When modified FlowNet was trained on single shorter pathlines (n = 900), we were able to find a cluster representing the
rip current but not as definitive. RipViz trained with shorter pathline sequences was able to detect the rip currents more precisely. Best viewed in
color.
7
Video FrameRipViz[Single Long Pathlines]modifiedFlowNet[Single Long Pathlines]Example 1Example 2Example 3Example 4Example 5Ground TruthFlowNet [Han et al.]modifiedFlowNet[Single Short Pathlines]Video FrameExample 1Example 2Example 3Example 4Example 5RipViz[Sequences of Short Pathlines]other hand, modified FlowNet does not learn how pathlines are related
in time. Therefore, we hypothesize that using pathline sequences is
better for learning quasi-periodic behavior, such as in ocean flow.
4.4 Comparison with existing rip detection methods
We compared RipViz with existing rip current detection methods as
shown in Figure 10. The first and second columns of Figure 10 show
a representative frame of the video and the expert drawn ground truth.
The remaining columns show the output of the object detector [11],
RipViz, filtered arrow glyphs [30], filtered color maps [30], and time-
lines [30], respectively.
4.4.1 Comparison with behavior based methods
Timelines: Mori et al. [30] proposed to use timelines to detect and
visualize rip currents. They placed timelines parallel to the beach and
traced the points on the timeline using optical flow to update its position.
They observed the shape of the timeline as it gets dragged by the rip
current. Timelines get deformed and extend to the rip channel above its
initial position, as shown in Figure 10.
However, the initial placement of the timeline is a major contributing
factor for timelines to be successful. All the timelines indicated in
Figure 10 are placed optimally. To compare the timeline method with
RipViz, we calculated the F1 score. If the timeline was able to visualize
the rip current in a video, then we counted it as TP, otherwise it is
counted as FN. We found that properly placed timelines can visualize
rip currents in most cases. However, the user has to specify the good
initial placement for each video. In contrast, RipViz is automated, and
no user input was needed during run time, as shown in Table 1.
Direction based clustering: Philip and Pang [34] hypothesized that
the rip current is directly opposite the dominant flow in the vector
field, which corresponds to the incoming wave direction. Places where
the vectors were opposing the majority flow are potential rip zones.
Areas with sufficiently large clusters of such vectors and large enough
magnitude were highlighted as rip zones.
Mori et al. [30] used a similar approach and mapped direction to
color and magnitude to hue for better visualization. As shown Filtered
Color Map column of Figure 10, the method can detect the location of
the rip current. However, this method also highlighted the swash zone,
the shallow part of the beach, as evident in examples 1-3. We found
that while the rip current was highlighted in most cases, the number of
false positive pixels tend to be high. In order to compare with RipViz,
we calculated the F1 score. As shown in Table 1 filtered color map
resulted in a F1 score of 0.28, due to its high false positive rate.
Mori et al. [30] also proposed arrow glyphs to visualize rip currents.
The output of this method is shown in Arrow Glyph column of Figure
10. We noticed that the arrow glyph method is more susceptible to
noise in the flow field compared to other methods and RipViz. This is
evident by the arrows projected on the sky and the beach although there
is a little movement on those parts of the video. Although arrow glyph
method highlighted the rip current in the majority of the videos, there
were also a large number of false positive detections. Similarly we
calculated the F1 score. As indicated in Table 1, filtered arrow glyph
had a F1 score of 0.16 due is relatively high false positive rate.
4.4.2 Comparison with appearance based methods
Object Detectors: de Silva et al. [11] used object detectors to detect
rip currents. They trained a deep learning based object detector, Faster
R-CNN [37], with images of rip currents. The images they used had
a clear visual signature for bathymetry controlled rip currents with a
darker region between breaking waves. Then they used the model to
predict the location of rip currents, by overlaying a bounding box on
the rip currents on videos. The output of the method is shown in the
Object Detector column of Figure 10.
We noticed that the object detector can detect parts of rip currents
as shown in examples 2-5 in Figure 10. However, rip currents have
different appearances [6]. As evident in example 1, it is possible for
an objector detector to miss the actual rip current location. In contrast,
RipViz is trained on pathlines that capture the behavior rather than
Method
Object Detector [11]
Timelines [30]
Filtered color map [30]
Filtered arrow glyph [30]
FlowNet [17]
modified FlowNet [single long pathlines]
modified FlowNet [single short pathlines]
RipViz [single long pathlines]
RipViz [sequence of short pathlines]
?
d
e
t
a
m
o
t
u
A
yes
no
yes
yes
no
no
no
yes
yes
e
r
o
c
S
1
F
0.43
0.72
0.28
0.16
0.16
0.19
0.32
0.08
0.85
Table 1: Results summary: Notice that RipViz has the highest F1
score, and does not rely on user input at run time.
appearance of rip currents. Hence, it was able to detect the rip current
in all the examples.
Furthermore, we noticed that bounding boxes only detects the gen-
eral area of the rip current. Sometimes the bounding boxes can cover
parts of the beach or miss parts of the rip especially with long elongated
rips. We also noticed that the information such as the curvature of the
rip current cannot be gleaned from bounding boxes alone. In order to
compare with RipViz, we calculated the F1 score. We counted how
many pixels were covered by the bounding box. Out of those, rip pixels
are counted as TP, the remaining pixels were counted as FP. If the
object detector does not predict a bounding box, then we counted the
pixels within the boundary as FN. As shown in Table 1, the bounding
boxes resulted in a F1 score of 0.43 compared to 0.85 for RipViz.
We attribute this lower F1 score to the large number of false positives
and false negatives generated respectively by the non-rip areas of the
bounding box and by part of the rip current not being covered by the
bounding box.
Additionally, we tested RipViz on other types of rip currents where
currently there are no published object detector available. In Figure 11,
we show a few examples of such rip current types. Experts categorize
the rip currents in the first and second row as sediment and structural
rips. However, as shown in Figure 11 RipViz could detect these rip
currents regardless of their appearance. More importantly, no additional
training data were needed for sediment and structural rips. Examples
3 and 4 illustrate two rip currents where object detectors failed due
to a lack of expected visual features. In these two examples, RipViz
detected the rip currents because it uses behavior rather than appearance
to detect rip currents.
4.5 Discoveries made by Experts using RipViz
Rip current researchers use their expert knowledge to identify the
boundary of rip currents by observing the appearance of visual fea-
tures such as gaps in breaking waves or sediment plumes. However,
sometimes parts of the rip current lack these visual features, making it
challenging for the expert to identify the entire extent of the rip current.
In contrast to appearance-based identification, RipViz uses the be-
havior of rip currents, not appearance, to detect rip currents. Experts
can use RipViz as a visualization tool to determine the entire boundary
of the rip current when visual features are lacking. In Figure 12, we
demonstrate a few use cases where the rip current expert's original
boundary estimate was updated after examining the visualization pro-
vided by RipViz. The updated boundaries now include feeder currents
near shore and what appears to be a circulating pattern farther offshore
in Discovery 1 and Discovery 3, as well as a weaker neighboring rip
that merged with the dominant rip in Discovery 2. Incidentally, Dis-
8
© 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
Fig. 10: Comparison with prior rip current detection methods: The Video Frame and Ground Truth columns show a representative frame of
the video clip and the expert ground truth estimate respectively. The remaining columns show object detector, timeline, colormap, arrow glyph,
and RipViz, respectively. Note that the timeline method requires user input to specify its initial placement, and that Filtered Arrow Glyphs did not
filter out erroneous glyphs from the sky, beach, and non-rip area of the water. Best viewed in color.
9
Video FrameRipVizObject Detector[de Silva et al.]Timeline[Mori et al.]Filtered Color Map[Mori et al.]Filtered Arrow Glyphs[Mori et al.]Example 1Example 2Example 3Example 4Example 5Ground TruthVideo FrameExample 1Example 2Example 3Example 4Example 5shown in Figure 13, we believe the parameters are still valid within 20-
30% change in camera framing. We found the F1 score to be 0.82±0.3
for all the examples, without much deviation.
5 SUMMARY AND REMARKS
As Ben Schneiderman succinctly captured in his quote: "The purpose
of visualization is insight, not pictures", our goal is to make apparent
what may not be visible to the untrained eyes. The focus of this work is
to first find the feature of interest (rip) and then present them in a simple,
easy to understand manner by highlighting their location directly on
the video. This capabality is encapsulated in RipViz, a hybrid feature
detection method that combined ML and flow analysis to extract rip
currents from stationary videos. We used shorter pathline sequences
to capture the flow behavior in a noisy quasi-periodic flow field. Then
we used an LSTM autoencoder to learn the behavior of normal ocean
pathline sequences. The trained model allowed us to label pathline
sequences belonging to rip currents as anomalous by comparing the
reconstruction error. By framing the rip detection problem as an anoma-
lous flow detection problem, the onerous task of finding and labeling
training datasets for each type of rip current is also greatly reduced.
The Visualization community has used deep learning methods to
learn flow behavior from pathlines. In particular, existing literature
uses autoencoders to learn from flow data. The authors use single long
pathlines/streamlines per seed point as input to their deep learning
models. However, straight-forward learning based on traditional
pathlines did not work for our application due to the quasi-periodic
flow fields such as those found near the surf zone. Therefore, we
adapted and innovated on the existing deep learning methods to use a
sequence of pathlines per seed point instead
The main contribution of this paper is:
• A hybrid feature detection method that combines machine learn-
ing and flow analysis techniques to automatically find and visual-
ize dangerous rip currents.
In order to realize this, the following innovations are necessary:
• For flow fields with a quasi-periodic behavior, such as ocean flow,
working with a sequence of shorter pathlines is better than a single
long pathline.
• A weighted binary cross entropy, unlike the unweighted binary
cross entropy used in previous works, is more effective when
learning from sparsely distributed pathlines generated from ocean
scenes.
A key assumption about the stationary videos is that the camera is
sufficiently close to the water in order for the optical flow algorithm
to pick up measurable velocities. For similar reasons, we assume that
the camera is pointed mostly seaward and not parallel to the beach.
Pointing the camera down a long stretch of beach will create an optical
flow that is not representative especially for points farther away from
the camera. Rectifying the frames prior to optical flow calculations
may extend the usable range a bit farther but does not justify the extra
computational cost. For these reasons, RipViz works best when the
camera is close to the water and pointed mostly seaward.
Our training data were videos from mostly uncrowded beaches. We
did study seed points along the path of a jogger. Such seed points
were not marked as anomalous. This is likely due to the fact that the
subsequent pathlines from the sequence marked the initial seed point as
mostly normal. We believe that seed points that are placed on surfers
or birds or other objects in the scene will likely be marked as normal as
well. We plan to study this further with more testing data.
Extensions and Future Works: Some of the contributions listed above
are not specific to rip current detection. We plan to investigate how
pathline sequences of unsteady flow fields coupled with the weighted
cross-entropy loss function can be used to distinguish between laminar
and non-laminar flows, and possibly train a model to detect vortices as
anomalous behavior.
Fig. 11: RipViz on novel rip current types: Examples 1 and 2 are
sediment rip and structural rip, respectively. Note that they have very
different visual characteristics compared to bathymetry rips. No pub-
lished object detectors exist for these two types of rips. However,
notice that RipViz could detect rip currents regardless of their varying
appearance. Examples 3 and 4 illustrate two rip currents where object
detectors failed due to a lack of expected visual features. In these
two examples, RipViz can still detect the rip current because it uses
behavior rather than appearance to detect rip currents. Best viewed in
color.
covery 1 and 3 both show circulating rips where the guidance from
beach signage to swim parallel to shore may not always work [27]. We
offer the complete table of discoveries made on our test data in the
supplementary materials.
4.6 User Study
We conducted a user study to better understand how non-experts can
use RipViz as a tool to become more aware of rip currents. We grouped
400 non-experts into two groups; one group was trained only with
beach warning signs of rip currents, the other group was trained with
RipViz. We then showed each participant a randomly picked video of
a rip current and asked them if there was a rip current present. In the
group trained with beach signs, 24% failed to recognize the existence
of the rip current in the video. In the group trained with RipViz, only
14% were unable to recognize the presence of the rip current in the
video.
We performed a second experiment to better understand if the par-
ticipants could locate the rip current within the video. Both groups
were given multiple choices of rip current boundary estimates and were
asked to pick the correct one. In the group trained with beach signs,
only 34% could choose the correct boundary. In the group trained
with RipViz, 78% could select the correct boundary. The non-experts
were acquired using Mechanical Turk [8, 32], with basic screening for
reliable workers, and paid $0.10-$0.20 per task.
4.7 Sensitivity to video framing
Some of the parameters are dependent on the camera framing which
would include distance of camera to the water and focal length or
zoom factor of the lens. Alternatively, we can think about the width
of the beach that is visible in the frame. We base our framing by
examining a number of existing surf webcams (e.g. webcoos.com) and
planned webcam installations. We experimented on how sensitive our
parameters are to changes in camera framing. In the Figure 13, we
show effects of varying the framing while keeping our current set of
parameters. Recall that during testing, we trace the same number of
seed points that are distributed in a regular grid. Based on the results
10
Example 1Input VideoGround Truth RipViz Example 3Example 2Example 4© 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
Fig. 12: Discoveries made by Experts using RipViz: Experts estimated the rip current boundary (Original Boundary Column) by observing
only the input video (Input Video Column). After examining the output of RipViz (RipViz Output column), the experts updated their original rip
current boundary estimate to include parts of the rip current that are not readily observable in the input video due to a lack of distinct visual
features (Updated Boundary column). In the supplementary materials, we included a complete table of discoveries made on our test data.Best
viewed in color.
Fig. 13: RipViz is less sensitive to different video framing: We changed the scale of the rip current feature by zooming in and out from the
original video, while keeping the aspect ratio of the video unchanged. Notice that for instances where the rip current feature is larger or smaller
than the training data (within reasonable bounds), RipViz was still able to detect the rip current feature.
We surmise that analysis using pathline sequences may also benefit
certain classes of flow data aside from those in this paper. In fact, we
are exploring that avenue and plan to report on the results in a separate
paper. In short, the particular needs of rip current detection led us to
develop the approach presented in this paper, and which also provides
another potential tool for the visualization community to study certain
classes of flow fields.
APPENDIX A: MODIFIED FLOWNET
Han et al. [17] proposed, FlowNet, a deep learning based method to
cluster and select streamlines. They first transformed each stream-
line into a 1D feature vector of length 1024. Then they used the
t-distributed stochastic neighbor embedding (t-SNE) [43] to reduce
the dimensionality of the 1D vector from 1024 to 2. The resulting
vectors are then clustered using DBSCAN [13], a density-based spatial
clustering method for applications with noise. The authors provided a
user interface to vary the clustering by changing the maximum distance
between two feature descriptors (eps) and the minimum number of
samples in each cluster (ms) in the DBSCAN algorithm.
We started with the FlowNet architecture for this work, but modified
it according to the requirements of our application. Their primary
focus was to cluster streamlines from 3D steady flow fields. Therefore,
the authors designed the deep neural network architecture to take in
a 3D streamline as input. However, in our application domain, the
pathlines are 2D. In order to adapt FlowNet to our application domain,
we changed the architecture of FlowNet to take in a 2D pathlines as
input. Likewise, we changed the original neural network architecture by
replacing 3D convolutional layers and 3D batch normalization layers,
respectively, with 2D convolutional layers and 2D batch normalization
layers to accommodate 2D pathlines. We also updated the input size
and output size of the fully connected layers accordingly. We kept the
same number of layers, same activation functions, and the same number
of convolutional filters as defined in the FlowNet paper. We refer to the
new neural network architecture as modified FlowNet.
We also found that the unweighted binary cross-entropy function
used in the FlowNet paper was insufficient to learn the variations
of pathlines of the ocean flow for reasons discussed in Section 4.2.
Therefore, we used the weighted binary cross-entropy loss function
defined in Section 3.4 when training the modified FlowNet. We trained
the modified FlowNet using the same approach as discussed in the
11
Input VideoOriginal BoundaryRipViz OutputUpdated BoundaryDiscovery 1Discovery 2Discovery 3No ZoomZoomed-in 10%Zoomed-in 20%Zoomed-in 30%Zoomed-out 10%Zoomed-out 20%Zoomed-out 30%Zoomed-out 40%InputGround TruthFig. 15: Visualization of noise in our dataset: Here we visualize two
pathline sequences, one seeded in the sky (left panel) and the other
on the beach (right panel). Each sequence consists of 10 pathlines.
We show the pathlines sequence at four integration time steps(n). We
expected these pathlines to be very short and remain closer to the seed
point. However, as the pathlines were integrated over a longer period
(n), they traveled far from the seed point, contradicting our expectation.
We attribute this to the accumulation of noise/error when integrating
over a longer period in a noisy real world dataset.
ACKNOWLEDGMENTS
This report was prepared in part as a result of work sponsored by the
Southeast Coastal Ocean Observing Regional Association (SECOORA)
with NOAA financial assistance award number NA20NOS0120220.
The statements, findings, conclusions, and recommendations are those
of the author(s) and do not necessarily reflect the views of SECOORA
or NOAA.
Fig. 14: Comparison of pathlines with and without noise: Mean
Squared Error (MSE) of pathlines calculated at varying lengths, aver-
aged over 200 randomly seeded pathlines. Notice that for both datasets
longer pathlines have higher MSE compared to shorter pathlines.
FlowNet paper [17].
We used the trained modified FlowNet to find 1D representations of
the pathlines by extracting the latent feature descriptor from the autoen-
coder. We reduced the dimensionality of the 1D vector by using t-SNE
to a vector with a length of 3. Then we clustered the resulting vectors
using DBSCAN, which requires the user to set the maximum distance
between two feature descriptors (eps) and the minimum number of
samples in each cluster (ms) before clustering. The cluster with the
largest overlap with the ground truth was selected.
APPENDIX B: MAKING THE CASE FOR SHORTER PATHLINES IN
NOISY DATASETS.
We estimated the flow field from videos using optical flow. We as-
sumed a small error/noise associated with the optical flow estimate.
Numerical integration, even well designed higher order methods, are
subject to accumulation of error. This problem is aggravated when one
is working with noisy datasets. For the case of pathline integration, we
hypothesized that shorter sequence of pathlines will be more accurate
in capturing the flow behavior in noisy flow fields than a single longer
pathline.
We used two synthetic datasets to indirectly verify our hypothesis:
the 2D unsteady Double Gyre dataset [40] and 2D Unsteady Four
Rotating Centers dataset [15].
We added noise at 5%, 10%, and 20% levels to each vector compo-
nent of each dataset. We compared the similarity of pathlines originat-
ing from the same seed point. We observed that shorter pathlines were
more similar to those without any noise. To quantify our observations,
we randomly seeded 200 pathlines in each dataset and traced those path-
lines. We calculated mean squared error (MSE) for pathlines at varying
lengths as shown in Figure 14. We observed that longer pathlines have
higher MSE compared to shorter pathlines. Therefore, we anticipate
that shorter pathlines will capture a more accurate representation of the
flow behavior in reconstructed noisy flow fields such as ours.
Additionally, we visualized how pathline sequences accumulate
errors due to noise over longer integration times as shown in Figure 15.
Here, we show two pathline sequences, one seeded in the sky and the
other on the beach. We expected these two pathline sequences to be
very short and remain closer to the seed point due to the lack of motion
around those seed points. However, as we integrate beyond 900 time
steps, we notice that the pathlines seem to travel far from the seed point
even though we don't see any visible motion on the video. We attribute
this to the accumulation of noise/error when integrating over a more
extended time. The noise can come from optical flow estimation or
video compression loss.
12
Xn = 9000n = 1500n = 2500n = 3500X© 2023 IEEE. This is the author's version of the article that has been published in IEEE Transactions on Visualization and
Computer Graphics. The final version of this record is available at: 10.1109/TVCG.2023.3243834
[25] J. B. Lushine. A study of rip current drownings and related weather factors.
National Weather Digest, pp. 13–19, 1991. 1
[26] J. Ma, C. Wang, and C.-K. Shene. Coherent view-dependent streamline
selection for importance-driven flow visualization. In Visualization and
Data Analysis 2013, vol. 8654, p. 865407. International Society for Optics
and Photonics, 2013. 2
[27] J. MacMahan, A. Reniers, J. Brown, R. Brander, E. Thornton, T. Stanton,
J. Brown, and W. Carey. An Introduction to Rip Currents Based on
Field Observations. Journal of Coastal Research, 27(4), 2011. doi: 10.
2112/JCOASTRES-D-11-00024.1 1, 2, 10
[28] S. Marchesin, C.-K. Chen, C. Ho, and K.-L. Ma. View-dependent stream-
lines for 3D vector fields. IEEE Transactions on Visualization and Com-
puter Graphics, 16(6):1578–1586, 2010. 2
[29] C. Maryan, M. T. Hoque, C. Michael, E. Ioup, and M. Abdelguerfi. Ma-
chine learning applications in detecting rip channels from images. Applied
Soft Computing, 78:84–93, 2019. 1, 2, 3
[30] I. Mori, A. De Silva, G. Dusek, J. Davis, and A. Pang. Flow-based rip
current detection and visualization. IEEE Access, 2022. 2, 3, 8
[31] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltz-
mann machines. In Icml, 2010. 3
[32] G. Paolacci, J. Chandler, and P. G. Ipeirotis. Running experiments on
amazon mechanical turk. Judgment and Decision making, 5(5):411–419,
2010. 10
[33] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel,
M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, et al. Scikit-learn:
Machine learning in python. the Journal of machine Learning research,
12:2825–2830, 2011. 5
[34] S. Philip and A. Pang. Detecting and visualizing rip current using optical
flow. In EuroVis (Short Papers), pp. 19–23, 2016. 2, 3, 8
[35] A. H. Rashid, I. Razzak, M. Tanveer, and A. Robles-Kelly. RipNet: A
lightweight one-class deep neural network for the identification of RIP
currents. In Communications in Computer and Information Science, pp.
172–179. Springer International Publishing, 2020. doi: 10.1007/978-3
-030-63823-8 21 2, 3
[36] A. H. Rashid, I. Razzak, M. Tanveer, and A. Robles-Kelly. RipDet: A fast
and lightweight deep neural network for rip currents detection. In 2021
International Joint Conference on Neural Networks (IJCNN). IEEE, jul
2021. doi: 10.1109/ijcnn52387.2021.9533849 2, 3
[37] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards real-
time object detection with region proposal networks. Advances in neural
information processing systems, 28, 2015. 8
[38] M. Ribeiro, A. E. Lazzaretti, and H. S. Lopes. A study of deep convolu-
tional auto-encoders for anomaly detection in videos. Pattern Recognition
Letters, 105:13–22, 2018. 3
[39] S. Sane, R. Bujack, C. Garth, and H. Childs. A survey of seed place-
ment and streamline selection techniques. Computer Graphics Forum,
39(3):785–809, 2020. doi: 10.1111/cgf.14036 2, 6
[40] S. C. Shadden, F. Lekien, and J. E. Marsden. Definition and properties
of Lagrangian coherent structures from finite-time Lyapunov exponents
in two-dimensional aperiodic flows. Physica D: Nonlinear Phenomena,
212(3-4):271–304, 2005. doi: 10.1016/j.physd.2005.10.007 12
[41] J. Tao, J. Ma, C. Wang, and C.-K. Shene. A unified approach to streamline
selection and viewpoint selection for 3d flow visualization. IEEE Trans-
actions on Visualization and Computer Graphics, 19(3):393–406, 2012.
2
[42] H. Theisel and H.-P. Seidel. Feature flow fields. In Proceedings of the
symposium on Data visualisation 2003, pp. 141–148, 2003. 6
[43] L. Van der Maaten and G. Hinton. Visualizing data using t-SNE. Journal
of machine learning research, 9(11), 2008. 6, 11
[44] H. Yu, C. Wang, C.-K. Shene, and J. H. Chen. Hierarchical streamline
bundles. IEEE Transactions on Visualization and Computer Graphics,
18(8):1353–1367, 2011. 2
[45] J. Zhai, S. Zhang, J. Chen, and Q. He. Autoencoder and its various variants.
In 2018 IEEE International Conference on Systems, Man, and Cybernetics
(SMC), pp. 415–419, 2018. doi: 10.1109/SMC.2018.00080 3
REFERENCES
[1] J. L. Ba, J. R. Kiros, and G. E. Hinton. Layer normalization. arXiv preprint
arXiv:1607.06450, 2016. 3
[2] M. Berenjkoub, G. Chen, and T. G ̈unther. Vortex boundary identifica-
In 2020 IEEE Visualization
tion using convolutional neural network.
Conference (VIS), pp. 261–265. IEEE, 2020. 2
[3] A. J. Bowen. Rip currents: Theoretical investigations. Journal of Geo-
physical Research, 74(23):5467–5478, 1969. 1
[4] K. Burger, P. Kondratieva, J. Kruger, and R. Westermann. Importance-
driven particle techniques for flow visualization. In 2008 IEEE Pacific
Visualization Symposium, pp. 71–78. IEEE, 2008. 6
[5] B. S. Carmo, Y. H. P. Ng, A. Pr ̈ugel-Bennett, and G.-Z. Yang. A data
clustering and streamline reduction method for 3d mr flow vector field
simplification. In C. Barillot, D. R. Haynor, and P. Hellier, eds., Medical
Image Computing and Computer-Assisted Intervention – MICCAI 2004,
pp. 451–458. Springer Berlin Heidelberg, Berlin, Heidelberg, 2004. 2
[6] B. Castelle, T. Scott, R. Brander, and R. McCarroll. Rip current types,
circulation and hazard. Earth-Science Reviews, 163:1–21, 2016. 1, 8
[7] J. Chen, B. Xie, H. Zhang, and J. Zhai. Deep autoencoders in pattern
recognition: a survey. In Bio-inspired computing models and algorithms,
pp. 229–255. World Scientific, 2019. 3
[8] J. J. Chen, N. J. Menezes, A. D. Bradley, and T. North. Opportunities for
crowdsourcing research on amazon mechanical turk. Interfaces, 5(3):1,
2011. 10
[9] F. Chollet et al. Keras, 2015. 4
[10] A. H. da F. Klein, G. G. Santana, F. L. Diehl, and J. T. de Menezes.
Analysis of hazards associated with sea bathing: Results of five years work
in oceanic beaches of Santa Catarina state, Southern Brazil. Journal of
Coastal Research, pp. 107–116, 2003. 1
[11] A. de Silva, I. Mori, G. Dusek, J. Davis, and A. Pang. Automated rip
current detection with region based convolutional neural networks. Coastal
Engineering, 166:103859, 2021. 1, 2, 3, 8
[12] S. Ellis and S. McGill. Rip current and channel detection using surfcams
and optical flow. Shore & Beach, 90(1):50–58, 08 2022. 3
[13] M. Ester, H.-P. Kriegel, J. Sander, X. Xu, et al. A density-based algorithm
In kdd,
for discovering clusters in large spatial databases with noise.
vol. 96, pp. 226–231, 1996. 6, 11
[14] B. Gary and A. Kaehle. Opencv. Dr. Dobb's journal of software tools, 3,
2000. 3
[15] T. G ̈unther, M. Gross, and H. Theisel. Generic objective vortices for
flow visualization. ACM Transactions on Graphics (Proc. SIGGRAPH),
36(4):141:1–141:11, 2017. 12
[16] M. Haller, D. Honegger, and P. Catal ́an. Rip current observations via
marine radar. Journal of Waterway Port Coastal and Ocean Engineering,
140:115–124, 03 2014. doi: 10.1061/(ASCE)WW.1943-5460.0000229 2
[17] J. Han, J. Tao, and C. Wang. Flownet: A deep learning framework
for clustering and selection of streamlines and stream surfaces. IEEE
transactions on visualization and computer graphics, 26(4):1732–1744,
2018. 2, 3, 5, 6, 8, 11, 12
[18] R. Holman and M. Haller. Remote sensing of the nearshore. Annual re-
view of marine science, 5, 12 2011. doi: 10.1146/annurev-marine-121211
-172408 2
[19] B. Kim and T. G ̈unther. Robust reference frame extraction from unsteady
2d vector fields with convolutional neural networks. In Computer Graphics
Forum, vol. 38, pp. 285–295. Wiley Online Library, 2019. 2
[20] S. Leatherman and J. Fletemeyer, eds. Rip Currents: Beach Safety, Physi-
cal Oceanography, and Wave Modeling (1st ed.). CRC Press, 2011. doi:
10.1201/b10916 1
[21] S. Leatherman and S. Leatherman. Techniques for detecting and measuring
rip currents. International Journal of Earth Science and Geophysics (ISSN:
2631-5033), 3(1), 2017. doi: DOI: 10.35840/2631-5033/1814 2
[22] L. Liu, W. Ouyang, X. Wang, P. Fieguth, J. Chen, X. Liu, and
M. Pietik ̈ainen. Deep learning for generic object detection: A survey.
International Journal of Computer Vision, 128(2):261–318, 2020. doi: 10.
1007/s11263-019-01247-4 1
[23] S. Lodha, J. Renteria, and K. Roskin. Topology preserving compression
of 2d vector fields. In Proceedings Visualization 2000. VIS 2000 (Cat.
No.00CH37145), pp. 343–350, 2000. doi: 10.1109/VISUAL.2000.885714
2
[24] B. Lucas and T. Kanade. An iterative image registration technique with an
application to stereo vision. International Joint Conference on Artificial
Intelligence, pp. 674–679, 1981. 3
13
|
http://arxiv.org/abs/2302.12977v3 | 2023-08-31T01:28:35 | 2023-02-25T04:12:30 | Fair Attribute Completion on Graph with Missing Attributes | Tackling unfairness in graph learning models is a challenging task, as the
unfairness issues on graphs involve both attributes and topological structures.
Existing work on fair graph learning simply assumes that attributes of all
nodes are available for model training and then makes fair predictions. In
practice, however, the attributes of some nodes might not be accessible due to
missing data or privacy concerns, which makes fair graph learning even more
challenging. In this paper, we propose FairAC, a fair attribute completion
method, to complement missing information and learn fair node embeddings for
graphs with missing attributes. FairAC adopts an attention mechanism to deal
with the attribute missing problem and meanwhile, it mitigates two types of
unfairness, i.e., feature unfairness from attributes and topological unfairness
due to attribute completion. FairAC can work on various types of homogeneous
graphs and generate fair embeddings for them and thus can be applied to most
downstream tasks to improve their fairness performance. To our best knowledge,
FairAC is the first method that jointly addresses the graph attribution
completion and graph unfairness problems. Experimental results on benchmark
datasets show that our method achieves better fairness performance with less
sacrifice in accuracy, compared with the state-of-the-art methods of fair graph
learning. Code is available at: https://github.com/donglgcn/FairAC. | [
"Dongliang Guo",
"Zhixuan Chu",
"Sheng Li"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12977v3",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12977v3",
"@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
g
u
A
1
3
]
G
L
.
s
c
[
3
v
7
7
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Published as a conference paper at ICLR 2023
FAIR ATTRIBUTE COMPLETION ON GRAPH WITH
MISSING ATTRIBUTES
Dongliang Guo1, Zhixuan Chu2∗, Sheng Li3,1
1University of Georgia, 2Ant Group, 3University of Virginia
[email protected], [email protected], [email protected]
ABSTRACT
Tackling unfairness in graph learning models is a challenging task, as the unfair-
ness issues on graphs involve both attributes and topological structures. Exist-
ing work on fair graph learning simply assumes that attributes of all nodes are
available for model training and then makes fair predictions. In practice, how-
ever, the attributes of some nodes might not be accessible due to missing data
or privacy concerns, which makes fair graph learning even more challenging. In
this paper, we propose FairAC, a fair attribute completion method, to comple-
ment missing information and learn fair node embeddings for graphs with miss-
ing attributes. FairAC adopts an attention mechanism to deal with the attribute
missing problem and meanwhile, it mitigates two types of unfairness, i.e., fea-
ture unfairness from attributes and topological unfairness due to attribute com-
pletion. FairAC can work on various types of homogeneous graphs and generate
fair embeddings for them and thus can be applied to most downstream tasks to
improve their fairness performance. To our best knowledge, FairAC is the first
method that jointly addresses the graph attribution completion and graph unfair-
ness problems. Experimental results on benchmark datasets show that our method
achieves better fairness performance with less sacrifice in accuracy, compared
with the state-of-the-art methods of fair graph learning. Code is available at:
https://github.com/donglgcn/FairAC.
1
INTRODUCTION
Graphs, such as social networks, biomedical networks, and traffic networks, are commonly ob-
served in many real-world applications. A lot of graph-based machine learning methods have been
proposed in the past decades, and they have shown promising performance in tasks like node simi-
larity measurement, node classification, graph regression, and community detection. In recent years,
graph neural networks (GNNs) have been actively studied (Scarselli et al., 2008; Wu et al., 2020;
Jiang et al., 2019; 2020; Zhu et al., 2021c;b;a; Hua et al., 2020; Chu et al., 2021), which can model
graphs with high-dimensional attributes in the non-Euclidean space and have achieved great success
in many areas such as recommender systems (Sheu et al., 2021). However, it has been observed that
many graphs are biased, and thus GNNs trained on the biased graphs may be unfair with respect
to certain sensitive attributes such as demographic groups. For example, in a social network, if the
users with the same gender have more active connections, the GNNs tend to pay more attention
to such gender information and lead to gender bias by recommending more friends to a user with
the same gender identity while ignoring other attributes like interests. And from the data privacy
perspective, it is possible to infer one's sensitive information from the results given by GNNs (Sun
et al., 2018). In a time when GNNs are widely deployed in the real world, this severe unfairness is
unacceptable. Thus, fairness in graph learning emerges and becomes notable very recently.
Existing work on fair graph learning mainly focuses on the pre-processing, in-processing, and post-
processing steps in the graph learning pipeline in order to mitigate the unfairness issues. The pre-
processing approaches modify the original data to conceal sensitive attributes. Fairwalk (Rahman
et al., 2019) is a representative pre-processing method, which enforces each group of neighboring
nodes an equal chance to be chosen in the sampling process. In many in-processing methods, the
∗Corresponding author
1
Published as a conference paper at ICLR 2023
most popular way is to add a sensitive discriminator as a constraint, in order to filter out sensitive
information from original data. For example, FairGNN (Dai & Wang, 2021) adopts a sensitive
classifier to filter node embeddings. CFC (Bose & Hamilton, 2019) directly adds a filter layer
to deal with unfairness issues. The post-processing methods directly force the final prediction to
satisfy fairness constraints, such as (Hardt et al., 2016).
When the graphs have complete node attributes, existing fair graph learning methods could obtain
promising performance on both fairness and accuracy. However, in practice, graphs may contain
nodes whose attributes are entirely missing due to various reasons (e.g., newly added nodes, and
data privacy concerns). Taking social networks as an example, a newly registered user may have
incomplete profiles. Given such incomplete graphs, existing fair graph learning methods would
fail, as they assume all the nodes have attributes for model training. Although FairGNN (Dai &
Wang, 2021) also involves the missing attribute problem, it only assumes that a part of the sensitive
attributes are missing. To the best of our knowledge, addressing the unfairness issue on graphs
with some nodes whose attributes are entirely missing has not been investigated before. Another
relevant topic is graph attribute completion (Jin et al., 2021; Chen et al., 2020). It mainly focuses
on completing a precise graph but ignores the unfairness issues. In this work, we aim to jointly
complete a graph with missing attributes and mitigate unfairness at both feature and topology levels.
In this paper, we study the new problem of learning fair embeddings for graphs with missing at-
tributes. Specifically, we aim to address two major challenges: (1) how to obtain meaningful node
embeddings for graphs with missing attributes, and (2) how to enhance fairness of node embeddings
with respect to sensitive attributes. To address these two challenges, we propose a Fair Attribute
Completion (FairAC) framework. For the first challenge, we adopt an autoencoder to obtain feature
embeddings for nodes with attributes and meanwhile we adopt an attention mechanism to aggregate
feature information of nodes with missing attributes from their direct neighbors. Then, we address
the second challenge by mitigating two types of unfairness, i.e., feature unfairness and topological
unfairness. We adopt a sensitive discriminator to regulate embeddings and create a bias-free graph.
The main contributions of this paper are as follows: (1) We present a new problem of achieving
fairness on a graph with missing attributes. Different from the existing work, we assume that the
attributes of some nodes are entirely missing. (2) We propose a new framework, FairAC, for fair
graph attribute completion, which jointly addresses unfairness issues from the feature and topology
perspectives. (3) FairAC is a generic approach to complete fair graph attributes, and thus can be used
in many graph-based downstream tasks. (4) Extensive experiments on benchmark datasets demon-
strate the effectiveness of FairAC in eliminating unfairness and maintaining comparable accuracy.
2 RELATED WORK
2.1 FAIRNESS IN GRAPH LEARNING
Recent work promotes fairness in graph-based machine learning (Bose & Hamilton, 2019; Rah-
man et al., 2019; Dai & Wang, 2021; Wang et al., 2022). They can be roughly divided into three
categories, i.e., the pre-processing methods, in-processing methods, and post-processing methods.
The pre-processing methods are applied before training downstream tasks by modifying train-
ing data. For instance, Fairwalk (Rahman et al., 2019) improves the sampling procedure of
node2vec (Grover & Leskovec, 2016). Our FairAC framework can be viewed as a pre-processing
method, as it seeks to complete node attributes and use them as input of graph neural networks.
However, our problem is much harder than existing problems, because the attributes of some nodes
in the graph are entirely missing, including both the sensitive ones and non-sensitive ones. Given
an input graph with missing attributes, FairAC generates fair and complete feature embeddings and
thus can be applied to many downstream tasks, such as node classification, link prediction (Liben-
Nowell & Kleinberg, 2007; Taskar et al., 2003), PageRank (Haveliwala, 2003), etc. Graph learning
models trained on the refined feature embeddings would make fair predictions in downstream tasks.
There are plenty of fair graph learning methods as in-processing solutions. Some work focus on
dealing with unfairness issues on graphs with complete features. For example, GEAR (Ma et al.,
2022) mitigates graph unfairness by counterfactual graph augmentation and an adversarial learning
method to learn sensitive-invariant embeddings. However, in order to generate counterfactual sub-
2
Published as a conference paper at ICLR 2023
Figure 1: Overview of our FairAC framework. FairAC is composed of three major modules, i.e.,
an autoencoder for embedding nodes, an attributes completion module, and sensitive classifiers for
mitigating feature unfairness and topological unfairness. The solid circles indicate nodes with full
attributes, while the empty circles indicate nodes without any attributes.
graphs, they need precise and entire features for every node. In other words, it cannot work well if
it encounters a graph with full missing nodes since it cannot generate counterfactual subgraph based
on a blank node. But we can deal with the situation. The most related work is FairGNN (Dai &
Wang, 2021). Different from the majority of problem settings on graph fairness. It learns fair GNNs
for node classification in a graph where only a limited number of nodes are provided with sensitive
attributes. FairGNN adopts a sensitive classifier to predict the missing sensitive labels. After that,
it employs a classic adversarial model to mitigate unfairness.Specifically, a sensitive discriminator
aims to predict the known or estimated sensitive attributes, while a GNN model tries to fool the
sensitive discriminator and meanwhile predicts node labels. However, it cannot predict sensitive
information if a node misses all features in the first place and thus will fail to achieve its final goal.
Our FairAC can get rid of the problem because we recover the node embeddings from their neigh-
bors. FairAC learns attention between neighbors according to existing full attribute nodes, so we
can recover the node embeddings for missing nodes from their neighbors by aggregating the embed-
dings of neighbors. With the help of the adversarial learning method, it can also remove sensitive
information. In addition to attribute completion, we have also designed novel de-biasing strategies
to mitigate feature unfairness and topological unfairness.
2.2 ATTRIBUTION COMPLETION ON GRAPHS
The problem of missing attributes is ubiquitous in reality. Several methods (Liao et al., 2016; You
et al., 2020; Chen et al., 2020; He et al., 2022; Jin et al., 2021; 2022; Tu et al., 2022; Taguchi et al.,
2021) have been proposed to address this problem. GRAPE (You et al., 2020) tackles the problem
of missing attributes in tabular data using a graph-based approach. SAT (Chen et al., 2020) assumes
that the topology representation and attributes share a common latent space, and thus the missing
attributes can be recovered by aligning the paired latent space. He et al. (2022) and Jin et al. (2021)
extend such problem settings to heterogeneous graphs. HGNN-AC (Jin et al., 2021) is an end-to-end
model, which does not recover the original attributes but generates attribute representations that have
sufficient information for the final prediction task. It is worth noting that existing methods on graph
attribute completion only focus on the attribute completion accuracy or performance of downstream
tasks, but none of them takes fairness into consideration. Instead, our work pays attention to the
unfairness issue in graph learning, and we aim to generate fair feature embeddings for each node
by attribute completion, which contain the majority of information inherited from original attributes
but disentangle the sensitive information.
3 METHODOLOGY
3.1 PROBLEM DEFINITION
Let G = (V, E, X ) denote an undirected graph, where V = {v1, v2, ..., vN } is the set of N nodes,
E ⊆ V × V is the set of undirected edges in the graph, X ∈ RN ×D is the node attribute matrix,
3
Published as a conference paper at ICLR 2023
classifier
Cs,
Attribute
completion
fAE,
Sensitive
Autoencoder
Algorithm 1 FairAC framework algorithm
Input: G = (V, E, X ), S
Output:
fAC
1: Obtain topological embedding T with DeepWalk
2: repeat
3:
4:
5:
6:
7:
8:
9:
10: until convergence
11: return fAE, Cs, fAC
Obtain the feature embeddings H with fAE
Optimize the Cs by Equation 6
Optimize fAE to mitigate feature unfairness by loss LF
Divide V + into Vkeep and Vdrop based on α
Obtain the feature embeddings of nodes with missing attributes Vdrop by fAC
Optimize fAC to achieve attribute completion by loss LC
Optimize fAC to mitigate topological unfairness by loss LT
and D is the dimension of attributes. A ∈ RN ×N is the adjacency matrix of the graph G, where
Aij = 1 if nodes vi and vj are connected; otherwise, Aij = 0. In addition, S = {s1, s2, ..., sN }
denotes a set of sensitive attributes (e.g., age or gender) of N nodes, and Y = {y1, y2, ..., yN }
denotes the node labels. The goal of fair graph learning is to make fair predictions of node labels
with respect to the sensitive attribute, which is usually measured by certain fairness notations like
statistical parity (Dwork et al., 2012) and equal opportunity (Hardt et al., 2016). Statistical Parity
and Equal Opportunity are two group fairness definitions. Their detailed formulations are presented
below. The label y denotes the ground-truth node label, and the sensitive attribute s indicates one's
sensitive group. For example, for binary node classification task, y only has two labels. Here we
consider two sensitive groups, i.e. s ∈ {0, 1}.
• Statistical Parity (Dwork et al., 2012). It refers to the equal acceptance rate, which can be
formulated as:
P (ˆy|s = 0) = P (ˆy|s = 1),
(1)
where P (*) denotes the probability that * occurs.
• Equal Opportunity (Hardt et al., 2016). It means the probability of a node in a positive
class being classified as a positive outcome should be equal for both sensitive group nodes.
It mathematically requires an equal true positive rate for each subgroup.
P (ˆy = 1|y = 1, s = 0) = P (ˆy = 1|y = 1, s = 1).
(2)
In this work, we mainly focus on addressing unfairness issues on graphs with missing attributes, i.e.,
attributes of some nodes are totally missing. Let V + denote the set of nodes whose attributes are
available, and V − denote the set of nodes whose attributes are missing, V = {V +, V −}. If vi ∈ V −,
both Xi and si are unavailable during model training.
With the notations given below, the fair attribute completion problem is formally defined as:
Problem 1. Given a graph G = (V, E, X ), where node set V + ∈ V with the corresponding attributes
available and the corresponding sensitive attributes in S, learn a fair attribute completion model to
generate fair feature embeddings H for each node in V, i.e.,
f (G, S) → H,
(3)
where f is the function we aim to learn. H should exclude any sensitive information while preserve
non-sensitive information.
3.2 FAIR ATTRIBUTE COMPLETION (FAIRAC) FRAMEWORK
We propose a fair attribute completion (FairAC) framework to address Problem 1. Existing fair
graph learning methods tackle unfairness issues by training fair graph neural networks in an end-
to-end fashion, but they cannot effectively handle graphs that are severely biased due to missing
attributes. Our FairAC framework, as a data-centric approach, deals with the unfairness issue from
4
Published as a conference paper at ICLR 2023
a new perspective, by explicitly debiasing the graph with feature unfairness mitigation and fairness-
aware attribute completion. Eventually, FairAC generates fair embeddings for all nodes including
the ones without any attributes. The training algorithms are shown in Algorithm 1.
To train the graph attribute completion model, we follow the setting in (Jin et al., 2021) and divide
the nodes with attributes (i.e., V +) into two sets: Vkeep and Vdrop. For nodes in Vkeep, we keep
their attributes, while for nodes in Vdrop, we temporally drop their attributes and try to recover
them using our attribute completion model. Although the nodes are randomly assigned to Vkeep
and Vdrop, the proportion of Vdrop is consistent with the attribute missing rate α of graph G, i.e.,
α = |V −|
|V| = |Vdrop|
|V +|
.
Different from existing work on fair graph learning, we consider unfairness from two sources. The
first one is from node features. For example, we can roughly infer one's sensitive information, like
gender, from some non-sensitive attributes like hobbies. It means that non-sensitive attributes may
imply sensitive attributes and thus lead to unfairness in model prediction. We adopt a sensitive
discriminator to mitigate feature unfairness. The other source is topological unfairness introduced
by graph topological embeddings and node attribute completion. To deal with the topological un-
fairness, we force the estimated feature embeddings to fool the sensitive discriminator, by updating
attention parameters during the attribute completion process.
As illustrated in Figure 1, our FairAC framework first mitigates feature unfairness for nodes with
attributes (i.e., Vkeep) by removing sensitive information implicitly contained in non-sensitive at-
tributes with an auto-encoder and sensitive classifier (Section 3.2.1). For nodes without features
(i.e., Vdrop), FairAC performs attribute completion with an attention mechanism (Section 3.2.2) and
meanwhile mitigates the topological unfairness (Section 3.2.3). Finally, the FairAC model trained
on Vkeep and Vdrop can be used to infer fair embeddings for nodes in V −.
The overall loss function of FairAC is formulated as:
L = LF + LC + βLT ,
(4)
where LF represents the loss for mitigating feature unfairness, LC is the loss for attribute comple-
tion, and LT is the loss for mitigating topological unfairness. β is a trade-off hyperparameter.
3.2.1 MITIGATING FEATURE UNFAIRNESS
The nodes in Vkeep have full attributes X , while some attributes may implicitly encode information
about sensitive attributes S and thus lead to unfair predictions. To address this issue, FairAC aims
to encode the attributes X⟩ of node i into a fair feature embedding Hi. Specifically, we use a
simple autoencoder framework together with a sensitive classifier. The autoencoder maps Xi into
embedding Hi, and meanwhile the sensitive classifier Cs is trained in an adversarial way, such that
the embeddings are invariant to sensitive attributes.
Autoencoder. The autoencoder contains an encoder fE and a decoder fD. fE encodes the original
attributes Xi to feature embeddings Hi, i.e., Hi = fE(Xi), and fD reconstructs attributes from the
latent embeddings, i.e., ˆXi = fD(Hi), where the reconstructed attributes ˆX should be close to Xi as
possible. The loss function of the autoencoder is written as:
Lae =
1
|Vkeep|
(cid:88)
(cid:113)
( ˆXi − Xi)2.
i∈Vkeep|
(5)
Sensitive classifier The sensitive classifier Cs is a simple multilayer perceptron (MLP) model. It
takes the feature embedding Hi as input and predicts the sensitive attribute ˆsi, i.e., ˆsi = Cs(Hi).
When the sensitive attributes are binary, we can use the binary cross entropy loss to optimize Cs:
LCs = −
1
|Vkeep|
(cid:88)
i∈Vkeep
si log ˆsi + (1 − si) log (1 − ˆsi).
(6)
With the sensitive classifier Cs, we could leverage it to adversarially train the autoencoder, such
that fE is able to generate fair feature embeddings that can fool Cs. The loss LF is written as:
LF = Lae − βLCs .
5
Published as a conference paper at ICLR 2023
3.2.2 COMPLETING NODE EMBEDDINGS VIA ATTENTION MECHANISM
For nodes without attributes (Vdrop), FairAC makes use of topological embeddings and completes
the node embeddings Hdrop with an attention mechanism.
Topological embeddings. Recent studies reveal that the topology of graphs has similar semantic
information as the attributes (Chen et al., 2020; McPherson et al., 2001; Pei et al., 2020; Zhu et al.,
2020). Inspired by this observation, we assume that the nodes' topological information can reflect
the relationship between nodes' attributes and the attributes of their neighbors. There are a lot of
off-the-shelf node topological embedding methods, such as DeepWalk (Perozzi et al., 2014) and
node2vec (Grover & Leskovec, 2016). For simplicity, we adopt the DeepWalk method to extract
topological embeddings for nodes in V.
Attention mechanism. For graphs with missing attributes, a commonly used strategy is to use
average attributes of the one-hop neighbors. This strategy works in some cases, however, simply
averaging information from neighbors might be biased, as the results might be dominated by some
high-degree nodes. In fact, different neighbors should have varying contributions to the aggregation
process in the context of fairness. To this end, FairAC adopts an attention mechanism (Vaswani
et al., 2017) to learn the influence of different neighbors or edges with the awareness of fairness, and
then aggregates attributes information for nodes in Vdrop.
Given a pair of nodes (u, v) which are neighbors, the contribution of node v is the attention attu,v,
which is defined as: attu,v = Attention(Tu, Tv), where Tu, Tv are the topological embeddings of
nodes u and v, respectively. Specifically, we only focus on the neighbor pairs and ignore those node
pairs that are not directly connected. Attention(*, *) denotes the attention between two topological
embeddings, i.e., Attention(Tu, Tv) = σ(T T
u W Tv), where W is the learnable parametric matrix,
and σ is an activation function. After we get all the attention scores between one node and its
neighbors, we can get the coefficient of each pair by applying the softmax function:
cu,v = softmax(attu,v) =
exp(attu,v)
(cid:80)
s∈Nu
exp(attu,s)
,
(7)
where cu,v is the coefficient of node pair (u, v), and Nu is the set of neighbors of node u. For node u,
FairAC calculates its feature embedding ˆHu by the weighted aggregation with multi-head attention:
ˆHu =
1
K
K
(cid:88)
(cid:88)
k=1
s∈Nu
cu,sHs,
(8)
where K is the number of attention heads. The loss for attribute completion with topological em-
bedding and attention mechanism is formulated as:
LC =
1
|Vdrop|
(cid:88)
(cid:113)
( ˆHi − Hi)2.
i∈Vdrop|
(9)
3.2.3 MITIGATING TOPOLOGICAL UNFAIRNESS
The attribute completion procedure may introduce topological unfairness since we assume that
topology information is similar to attributes relation. It is possible that the completed feature em-
beddings of Vdrop would be unfair with respect to sensitive attributes S. To address this issue,
FairAC leverages sensitive classifier Cs to help mitigate topological unfairness by further updating
the attention parameter matrix W and thus obtaining fair feature embeddings H. Inspired by (Gong
et al., 2020), we expect that the feature embeddings can fool the sensitive classifier Cs to predict the
probability distribution close to the uniform distribution over the sensitive category, by minimizing
the loss:
LT = −
si log ˆsi + (1 − si) log (1 − ˆsi).
(10)
1
|Vdrop|
(cid:88)
i∈Vdrop
3.3 FAIRAC FOR NODE CLASSIFICATION
The proposed FairAC framework could be viewed as a generic data debiasing approach, which
achieves fairness-aware attribute completion and node embedding for graphs with missing attributes.
6
Published as a conference paper at ICLR 2023
Table 1: Comparisons of our FairAC method and baselines on three graphs. M refers to missing or
not. M is true means that some nodes' attributes are entirely missing and the ratio is controlled by α.
Otherwise, full attributes are provided. The attribute missing rate α is set to 0.3. GCN and FairGNN
are trained on averaging attribute completed graphs. Bold fonts denote the best results.
Dataset
NBA
Pokec-z
Pokec-n
Acc ↑
Method
GCN
ALFR
ALFR-e
Debias
Debias-e
FCGE
FairGNN
M
✓ 70.66±0.24
64.3±1.3
×
66.0±0.4
×
63.1±1.1
×
65.6±2.4
×
×
66.0±1.5
✓ 70.73±0.44
FairAC (Ours) ✓ 70.66±0.73
GCN
ALFR
ALFR-e
Debias
Debias-e
FCGE
FairGNN
✓
67.4±0.88
×
65.4±0.3
×
68.0±0.6
×
65.2±0.7
×
67.5±0.7
65.9±0.2
×
✓ 66.54±0.45
FairAC (Ours) ✓ 66.94±0.14
GCN
ALFR
ALFR-e
Debias
Debias-e
FCGE
FairGNN
✓ 66.12±0.88
63.1±0.6
×
66.2±0.4
×
62.6±1.1
×
65.6±2.4
×
×
64.8±1.5
✓ 68.54±0.45
FairAC (Ours) ✓ 66.35±0.24
AUC ↑
74.23±0.63
71.5±0.3
72.9±1.0
71.3±0.7
72.9±1.2
73.6±1.5
76.77±0.1
74.44±0.67
72.04±1.78
71.3±0.3
74.0±0.7
71.4±0.6
74.2±0.7
71.0±0.2
70.10±0.07
72.87±0.13
71.5±0.1
67.7±0.5
71.9±1.0
67.9±0.7
71.7±1.2
69.5±1.5
70.10±0.07
72.32±0.08
∆SP ↓
3.43±2.44
2.3±0.9
4.7±1.8
2.5±1.5
5.3±0.9
2.9±1.0
0.95±0.7
0.28±0.25
1.96±0.64
2.8±0.5
5.8±0.4
1.9±0.6
4.7±1.0
3.1±0.5
0.95±0.70
0.19±0.07
0.46±0.1
3.05±0.5
4.1±1.8
2.4±1.5
3.6±0.9
4.1±1.0
0.76±0.15
0.27±0.12
∆EO ↓
2.74±0.67
3.2±1.5
4.7±1.7
3.1±1.9
3.1±1.3
3.0±1.2
1.63±0.67
0.63±0.34
4.17±0.54
1.1±0.4
2.8±0.8
1.9±0.4
3.0±1.4
1.7±0.6
1.63±0.67
0.12±0.07
1.41±0.14
3.9±0.6
4.6±1.7
2.6±1.9
4.4±1.3
5.5±1.2
0.48±0.09
0.14±0.11
∆SP +∆EO ↓
6.16±3.1
5.5±2.4
9.4±3.4
5.6±3.4
8.4±2.2
5.9±2.2
2.58±1.37
0.91±0.59
6.12±1.18
3.9±0.9
8.6±1.2
3.8±1.0
7.7±2.4
4.8±1.1
2.58±0.57
0.31±0.14
1.87±0.24
3.95±1.1
8.7±3.5
5.0±3.4
8.0±2.2
9.6±2.2
1.24±0.24
0.41±0.23
It can be easily integrated with many existing graph neural networks (e.g., GCN (Kipf & Welling,
2016), GAT (Veliˇckovi ́c et al., 2018), and GraphSAGE (Hamilton et al., 2017)) for tasks like node
classification. In this work, we choose the basic GCN model for node classification and assess how
FairAC enhances model performance in terms of accuracy and fairness.
4 EXPERIMENTS
In this section, we evaluate the performance of the proposed FairAC framework on three benchmark
datasets in terms of node classification accuracy and fairness w.r.t. sensitive attributes. We compare
FairAC with other baseline methods in settings with various sensitive attributes or different attribute
missing rates. Ablation studies are also provided and discussed.
4.1 DATASETS AND SETTINGS
Datasets. In the experiments, we use three public graph datasets, NBA, Pokec-z, and Pokec-n. A
detailed description is shown in supplementary materials.
Baselines. We compare our FairAC method with the following baseline methods: GCN (Kipf &
Welling, 2016), ALFR (Edwards & Storkey, 2015), ALFR-e, Debias (Zhang et al., 2018), Debias-
e, FCGE (Bose & Hamilton, 2019), and FairGNN (Dai & Wang, 2021). ALFR-e concatenates the
feature embeddings produced by ALFR with topological embeddings learned by DeepWalk (Perozzi
et al., 2014). Debias-e also concatenates the topological embeddings learned by DeepWalk with
feature embeddings learned by Debias. FairGNN is an end-to-end debias method which aims to
mitigate unfairness in label prediction task. GCN and FairGNN uses the average attribute completion
method, while other baselines use original complete attributes.
Evaluation Metrics. We evaluate the proposed framework with respect to two aspects: classifica-
tion performance and fairness performance. For classification, we use accuracy and AUC scores.As
7
Published as a conference paper at ICLR 2023
Table 2: Comparisons of our method with the baselines on pokec-z dataset with four levels of
attribute missing rates α. FairAC generates fair and complete node features, and then GCN is trained
for node classification. BaseAC is a simplified version of FairAC, which only has the attention-based
attribute completion module, but does not contain the module for mitigating feature unfairness and
topological unfairness. Bold fonts denote the best results.
α
0.1
0.3
0.5
0.8
Method
GCN
FairGNN
BaseAC (Ours)
FairAC (Ours)
GCN
FairGNN
BaseAC (Ours)
FairAC (Ours)
GCN
FairGNN
BaseAC (Ours)
FairAC (Ours)
GCN
FairGNN
BaseAC (Ours)
FairAC (Ours)
Acc (%)↑ AUC (%)↑ ∆SP (%)↓ ∆EO (%)↓ ∆SP +∆EO ↓
66.10
69.37
66.37
66.33
67.40
66.54
66.10
66.94
66.41
66.25
66.13
66.45
66.99
66.60
66.06
66.10
69.14
76.93
69.34
69.35
72.04
70.10
69.67
72.87
70.14
70.13
69.93
72.95
73.13
71.35
71.21
71.66
0.88
0.17
0.07
0.14
1.96
0.95
0.78
0.19
0.07
0.47
0.38
0.14
0.57
0.94
0.08
0.01
0.20
0.29
1.46
0.37
4.17
1.63
1.57
0.12
2.11
1.71
1.60
1.06
1.74
0.09
2.20
0.69
1.08
0.46
1.53
0.51
6.12
2.58
2.35
0.31
2.18
2.18
1.98
1.20
2.31
1.03
2.28
0.70
for fairness, we adopt ∆SP and ∆EO as evaluation metrics, which can be defined as:
∆SP = P (ˆy|s = 0) − P (ˆy|s = 1),
∆EO = P (ˆy = 1|y = 1, s = 0) − P (ˆy = 1|y = 1, s = 1).
(11)
(12)
The smaller ∆SP and ∆EO are, the more fair the model is. In addition, we use ∆SP +∆EO as an
overall indicator of a model's performance on fairness.
4.2 RESULTS AND ANALYSIS
4.2.1 UNFAIRNESS ISSUES IN GRAPH NEURAL NETWORKS
According to the results showed in Table 1, they reveal several unfairness issues in Graph Neural
Networks. We divided them into two categories.
• Feature unfairness Feature unfairness is that some non-sensitive attributes could infer
sensitive information. Hence, some Graph Neural Networks may learn this relation and
make unfair prediction. In most cases, ALFR and Debias and FCGE have better fairness
performance than GCN method. It is as expected because the non-sensitive features may
contain proxy variables of sensitive attributes which would lead to biased prediction. Thus,
ALFR and Debias methods that try to break up these connections are able to mitigate
feature unfairness and obtain better fairness performance. These results further prove the
existence of feature unfairness.
• Topological unfairness Topological unfairness is sourced from graph structure. In other
words, edges in graph, i.e.
the misrepresentation due to the connection(Mehrabi et al.,
2021) can bring topological unfairness. From the experiments, ALFR-e and Debias-e have
worse fairness performance than ALFR and Debias, respectively. It shows that although
graph structure can improve the classification performance, it will bring topological unfair-
ness consequently. The worse performance on fairness verifies that topological unfairness
exists in GNNs and graph topological information could magnify the discrimination.
8
Published as a conference paper at ICLR 2023
4.2.2 EFFECTIVENESS OF FAIRAC ON MITIGATING FEATURE AND TOPOLOGICAL
UNFAIRNESS
The results of our FairAC method and baselines in terms of the node classification accuracy and
fairness metrics on three datasets are shown in Table 1. The best results are shown in bold. Generally
speaking, we have the following observations. (1). The proposed method FairAC shows comparable
classification performance with these baselines, GCN and FairGNN. This suggests that our attribute
completion method is able to preserve useful information contained in the original attributes. (2).
FairAC outperforms all baselines regarding fairness metrics, especially in ∆SP +∆EO. FairAC
outperform baselines that focus on mitigate feature fairness, like ALFR, which proves that FairAC
also mitigate topological unfairness. Besides, it is better than those who take topological fairness
into consideration, like FCGE, which also validates the effectiveness of FairAC. FairGNN also has
good performance on fairness, because it adopts a discriminator to deal with the unfairness issue.
Our method performs better than FairGNN in most cases. For example, our FairAC method can
significantly improve the performance in terms of the fairness metric ∆SP + ∆EO, i.e., 65%, 87%,
and 67% improvement over FairGNN on the NBA, pokec-z, pokec-n datasets, respectively. Overall,
the results in Table 1 validate the effectiveness of FairAC in mitigating unfairness issues.
4.3 ABLATION STUDIES
Attribute missing rate
In our proposed framework, the attribute missing rate indicates the in-
tegrity of node attribute matrix, which has a great impact on model performance. Here we investigate
the performance of our FairAC method and baselines on dealing with graphs with varying degrees of
missing attributes. In particular, we set the attribute missing rate to 0.1, 0.3, 0.5 and 0.8, and evaluate
FairAC and baselines on the pokec-z dataset. The detailed results are presented in Table 2. From the
table, we have the following observation that with varying values of α, FairAC is able to maintain
its high fairness performance. Especially when α reaches 0.8, FairAC can greatly outperform other
methods. It proves that FairAC is effective even if the attributes are largely missing.
The effectiveness of adversarial learning A key module in FairAC is adversarial learning, which
is used to mitigate feature unfairness and topological unfairness. To investigate the contribution of
adversarial learning in FairAC, we implement a BaseAC model, which only has the attention-based
attribute completion module, but does not contain the adversarial learning loss terms. Comparing
BaseAC with FairAC in Table 2, we can find that the fairness performance drops desperately when
the adversarial training loss is removed. Since BaseAC does not have an adversarial discrimina-
tor to regulate feature encoder as well as attribute completion parameters, it is unable to mitigate
unfairness. Overall, the results confirm the effectiveness of the adversarial learning module.
Parameter analysis We investigate how the hy-
perparameters affect the performance of FairAC.
The most important hyperparameter in FairAC is β,
which adjusts the trade-off between fairness and at-
tribute completion. We report the results with differ-
ent hyperparameter values. We set β to 0.2, 0.4, 0.7,
0.8 and 0 that is equivalent to the BaseAC. We also
fix other hyperparameters by setting α to 0.3. As
shown in Figure 2, we can find that, as β increases,
the fairness performance improves while the accu-
racy of node classification slightly declined. There-
fore, it validates our assumption that there is a trade-
off between fairness and attribute completion, and
our FairAC is able to enhance fairness without com-
promising too much on accuracy.
5 CONCLUSIONS
Figure 2: Accuracy and ∆SP +∆EO of
FairAC when varying β on Pokec-z dataset
with α = 0.3.
In this paper, we presented a novel problem, i.e., fair attribute completion on graphs with missing
attributes. To address this problem, we proposed the FairAC framework, which jointly completes the
9
Published as a conference paper at ICLR 2023
missing features and mitigates unfairness. FairAC leverages the attention mechanism to complete
missing attributes and adopts a sensitive classifier to mitigate implicit feature unfairness as well as
topological unfairness on graphs. Experimental results on three real-world datasets demonstrate the
superiority of the proposed FairAC framework over baselines in terms of both node classification
performance and fairness performance. As a generic fair graph attributes completion approach,
FairAC can also be used in other graph-based downstream tasks, such as link prediction, graph
regression, pagerank, and clustering.
ACKNOWLEDGEMENT
This research is supported by the Cisco Faculty Award and Adobe Data Science Research Award.
REFERENCES
Avishek Bose and William Hamilton. Compositional fairness constraints for graph embeddings. In
International Conference on Machine Learning, pp. 715–724. PMLR, 2019.
Xu Chen, Siheng Chen, Jiangchao Yao, Huangjie Zheng, Ya Zhang, and Ivor W Tsang. Learning
on attribute-missing graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence,
2020.
Zhixuan Chu, Stephen L Rathbun, and Sheng Li. Graph infomax adversarial learning for treatment
effect estimation with networked observational data. In Proceedings of the 27th ACM SIGKDD
Conference on Knowledge Discovery & Data Mining, pp. 176–184, 2021.
Enyan Dai and Suhang Wang. Say no to the discrimination: Learning fair graph neural networks with
limited sensitive attribute information. In Proceedings of the 14th ACM International Conference
on Web Search and Data Mining, pp. 680–688, 2021.
Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel. Fairness
through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Con-
ference, pp. 214–226, 2012.
Harrison Edwards and Amos Storkey. Censoring representations with an adversary, 2015. URL
https://arxiv.org/abs/1511.05897.
Sixue Gong, Xiaoming Liu, and Anil K Jain. Jointly de-biasing face recognition and demographic
attribute estimation. In European Conference on Computer Vision, pp. 330–347. Springer, 2020.
Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings
of the 22nd ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 855–864,
2016.
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs.
Advances in Neural Information Processing Systems, 30, 2017.
Moritz Hardt, Eric Price, and Nati Srebro. Equality of opportunity in supervised learning. Advances
in Neural Information Processing Systems, 29, 2016.
Taher H Haveliwala. Topic-sensitive pagerank: A context-sensitive ranking algorithm for web
search. IEEE Transactions on Knowledge and Data Engineering, 15(4):784–796, 2003.
Dongxiao He, Chundong Liang, Cuiying Huo, Zhiyong Feng, Di Jin, Liang Yang, and Weixiong
Zhang. Analyzing heterogeneous networks with missing attributes by unsupervised contrastive
learning. IEEE Transactions on Neural Networks and Learning Systems, 2022.
Yuncheng Hua, Yuan-Fang Li, Guilin Qi, Wei Wu, Jingyao Zhang, and Daiqing Qi. Less is more:
Data-efficient complex question answering over knowledge bases. Journal of Web Semantics, 65:
100612, 2020.
Xiaodong Jiang, Pengsheng Ji, and Sheng Li. Censnet: convolution with edge-node switching in
graph neural networks. In Proceedings of the 28th International Joint Conference on Artificial
Intelligence, pp. 2656–2662, 2019.
10
Published as a conference paper at ICLR 2023
Xiaodong Jiang, Ronghang Zhu, Pengsheng Ji, and Sheng Li. Co-embedding of nodes and edges
with graph neural networks. IEEE Transactions on Pattern Analysis and Machine Intelligence,
2020.
Di Jin, Cuiying Huo, Chundong Liang, and Liang Yang. Heterogeneous graph neural network via
attribute completion. In Proceedings of the Web Conference 2021, pp. 391–400, 2021.
Di Jin, Rui Wang, Tao Wang, Dongxiao He, Weiping Ding, Yuxiao Huang, Longbiao Wang, and
Witold Pedrycz. Amer: A new attribute-missing network embedding approach. IEEE Transac-
tions on Cybernetics, pp. 1–14, 2022. doi: 10.1109/TCYB.2022.3166539.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint
arXiv:1412.6980, 2014.
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional net-
works. arXiv preprint arXiv:1609.02907, 2016.
Lizi Liao, Qirong Ho, Jing Jiang, and Ee-Peng Lim. Slr: A scalable latent role model for attribute
completion and tie prediction in social networks. In 2016 IEEE 32nd International Conference
on Data Engineering (ICDE), pp. 1062–1073. IEEE, 2016.
David Liben-Nowell and Jon Kleinberg. The link-prediction problem for social networks. Journal
of the American society for information science and technology, 58(7):1019–1031, 2007.
Jing Ma, Ruocheng Guo, Mengting Wan, Longqi Yang, Aidong Zhang, and Jundong Li. Learning
fair node representations with graph counterfactual fairness. In Proceedings of the Fifteenth ACM
International Conference on Web Search and Data Mining, pp. 695–703, 2022.
Miller McPherson, Lynn Smith-Lovin, and James M Cook. Birds of a feather: Homophily in social
networks. Annual review of sociology, 27(1):415–444, 2001.
Ninareh Mehrabi, Fred Morstatter, Nripsuta Saxena, Kristina Lerman, and Aram Galstyan. A survey
on bias and fairness in machine learning. ACM Computing Surveys (CSUR), 54(6):1–35, 2021.
Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. Geom-gcn: Geometric
graph convolutional networks. arXiv preprint arXiv:2002.05287, 2020.
Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social represen-
tations. In Proceedings of the 20th ACM SIGKDD Conference on Knowledge Discovery & Data
Mining, pp. 701–710, 2014.
Tahleen Rahman, Bartlomiej Surma, Michael Backes, and Yang Zhang. Fairwalk: Towards fair
graph embedding. In Proceedings of the Twenty-Eighth International Joint Conference on Arti-
ficial Intelligence, IJCAI-19, pp. 3289–3295. International Joint Conferences on Artificial Intel-
ligence Organization, 7 2019. doi: 10.24963/ijcai.2019/456. URL https://doi.org/10.
24963/ijcai.2019/456.
Benedek Rozemberczki, Oliver Kiss, and Rik Sarkar. Karate Club: An API Oriented Open-source
Python Framework for Unsupervised Learning on Graphs. In Proceedings of the 29th ACM Inter-
national Conference on Information and Knowledge Management (CIKM '20), pp. 3125–3132.
ACM, 2020.
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini.
The graph neural network model. IEEE Transactions on Neural Networks and Learning Systems,
20(1):61–80, 2008.
Heng-Shiou Sheu, Zhixuan Chu, Daiqing Qi, and Sheng Li. Knowledge-guided article embedding
refinement for session-based news recommendation. IEEE Transactions on Neural Networks and
Learning Systems, 33(12):7921–7927, 2021.
Lichao Sun, Yingtong Dou, Carl Yang, Ji Wang, Philip S Yu, Lifang He, and Bo Li. Adversarial
attack and defense on graph data: A survey. arXiv preprint arXiv:1812.10528, 2018.
11
Published as a conference paper at ICLR 2023
Hibiki Taguchi, Xin Liu, and Tsuyoshi Murata. Graph convolutional networks for graphs containing
missing features. Future Generation Computer Systems, 117:155–168, 2021.
Lubos Takac and Michal Zabovsky. Data analysis in public social networks. In International scien-
tific conference and international workshop present day trends of innovations, volume 1. Present
Day Trends of Innovations Lamza Poland, 2012.
Ben Taskar, Ming-Fai Wong, Pieter Abbeel, and Daphne Koller. Link prediction in relational data.
Advances in Neural Information Processing Systems, 16, 2003.
Wenxuan Tu, Sihang Zhou, Xinwang Liu, Yue Liu, Zhiping Cai, En Zhu, Changwang Zhang, and
Jieren Cheng. Initializing then refining: A simple graph attribute imputation network. In Lud De
Raedt (ed.), Proceedings of the Thirty-First International Joint Conference on Artificial Intelli-
gence, IJCAI-22, pp. 3494–3500. International Joint Conferences on Artificial Intelligence Or-
ganization, 7 2022. doi: 10.24963/ijcai.2022/485. URL https://doi.org/10.24963/
ijcai.2022/485. Main Track.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in Neural Informa-
tion Processing Systems, 30, 2017.
Petar Veliˇckovi ́c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li`o, and Yoshua
Bengio. Graph attention networks. In International Conference on Learning Representations,
2018. URL https://openreview.net/forum?id=rJXMpikCZ.
Nan Wang, Lu Lin, Jundong Li, and Hongning Wang. Unbiased graph embedding with biased graph
observations. In Proceedings of the ACM Web Conference 2022, pp. 1423–1433, 2022.
Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and S Yu Philip. A
comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and
Learning Systems, 32(1):4–24, 2020.
Jiaxuan You, Xiaobai Ma, Yi Ding, Mykel J Kochenderfer, and Jure Leskovec. Handling missing
data with graph representation learning. Advances in Neural Information Processing Systems, 33:
19075–19087, 2020.
Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. Mitigating unwanted biases with adver-
sarial learning. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, pp.
335–340, 2018.
Jiong Zhu, Yujun Yan, Lingxiao Zhao, Mark Heimann, Leman Akoglu, and Danai Koutra. Beyond
homophily in graph neural networks: Current limitations and effective designs. Advances in
Neural Information Processing Systems, 33:7793–7804, 2020.
Ronghang Zhu, Xiaodong Jiang, Jiasen Lu, and Sheng Li. Cross-domain graph convolutions for ad-
versarial unsupervised domain adaptation. IEEE Transactions on Neural Networks and Learning
Systems, 2021a.
Ronghang Zhu, Xiaodong Jiang, Jiasen Lu, and Sheng Li. Transferable feature learning on graphs
across visual domains. In 2021 IEEE International Conference on Multimedia and Expo (ICME),
pp. 1–6. IEEE, 2021b.
Ronghang Zhu, Zhiqiang Tao, Yaliang Li, and Sheng Li. Automated graph learning via popula-
tion based self-tuning gcn. In Proceedings of the 44th International ACM SIGIR Conference on
Research and Development in Information Retrieval, pp. 2096–2100, 2021c.
12
Published as a conference paper at ICLR 2023
Table 3: Statistics of three graph datasets.
Dataset
NBA Pokec-z
Pokec-n
# of nodes
# of edges
Density
403
16,570
0.10228
67,797
882,765
0.00019
66,569
729,129
0.00016
A APPENDIX
A.1 DATASETS AND SETTINGS
In the experiments, we use three public graph datasets, NBA, Pokec-z, and Pokec-n.
Datasets.
The detailed explanation is shown in supplementary materials. The NBA dataset (Dai & Wang,
2021) is extended from a Kaggle dataset containing around 400 NBA basketball players. It provides
the performance statistics of those players in the 2016-2017 season and their personal profiles, e.g.,
nationality, age, and salary. Their relationships are obtained from Twitter. We use their nationality,
whether one is U.S. player or oversea player, as the sensitive attribute. The node label is binary,
indicating whether the salary of the player is over median or not. Pokec (Takac & Zabovsky, 2012)
is an online social network in Slovakia, which contains millions of anonymized data of users. It
has a variety of attributes, such as gender, age, education, region, etc. Based on the region where
users belong to, (Dai & Wang, 2021) sampled two datasets named as: Pokec-z and Pokec-n. In our
experiments, we consider the region or gender as sensitive attribute, and working field as label for
node classification. The statistics of three datasets are summarized in supplementary materials. The
statistics of three datasets are summarized in Table 3.
Baselines. We compare our FairAC method with the following baseline methods:
• GCN (Kipf & Welling, 2016) with average attribute completion. GCN is a classical
graph neural network model, which has obtained very promising performance in numerous
In the
applications. The standard GCN cannot handle graphs with missing attributes.
experiments, we use the average attribute completion strategy to preprocess the feature
matrix, by using the averaged attributes of one's neighbors to approximate the missing
attributes. After average attribute completion, GCN takes the graph with completed feature
matrix as inputs to learn node embeddings and predict node labels.
• ALFR (Edwards & Storkey, 2015) with full attributes. This is a pre-processing method.
It utilize a discriminator to remove the sensitive feature information in feature embeddings
produced by an Autoencoder. Since this method need full sensitive attributes and full fea-
tures, we give them complete information. In other words, the missing rate α is set to
0.
• ALFR-e with full attributes. Based on ALFR, ALFR-e utilize the topological informa-
tion. It concatenates the feature embeddings produced by ALFR with topological embed-
dings learned by DeepWalk (Perozzi et al., 2014). It also relys on complete information.
• Debias (Zhang et al., 2018) with full attributes. This is an in-processing method. It
applies a discriminator on node classifier in order to make the probability distribution be
the same w.r.t. sensitive attribute. Since the discriminator needs the full sensitive attributes,
we provide full node features.
• Debias-e with full attributes. Similar to ALFR-e. It also concatenates the topological
embeddings learned by DeepWalk (Perozzi et al., 2014) with feature embeddings learned
by Debias.
• FCGE (Bose & Hamilton, 2019) with full attributes. It learns fair node embeddings in
graph without node features through edge prediction only. An discriminator is also applied
to mitigate sensitive information in topological perspective.
• FairGNN (Dai & Wang, 2021) with average attribute completion. Although FairGNN
trains a sensitive attribute discriminator as an adversarial regularizer to enhance the fairness
13
Published as a conference paper at ICLR 2023
Table 4: Comparisons of our method with the baselines on pokec-n dataset with three levels of
attribute missing rates α. FairAC generates fair and complete node features, and then GAT is trained
for node classification. Bold fonts denote the best results.
α
0.3
0.5
0.7
Method
GAT
FairGNN
FairAC (Ours)
GAT
FairGNN
FairAC (Ours)
GAT
FairGNN
FairAC (Ours)
Acc (%)↑ AUC (%)↑ ∆SP (%)↓ ∆EO (%)↓ ∆SP +∆EO ↓
67.77
66.55
67.25
68.59
68.09
66.36
67.59
62.36
66.64
73.57
68.64
72.96
73.97
72.22
70.66
71.62
67.99
69.59
1.02
0.45
0.23
0.30
0.81
0.09
3.69
2.95
0.18
3.38
0.99
0.10
1.96
1.55
0.32
7.15
3.55
4.19
3.40
1.44
0.33
2.26
2.36
0.41
10.84
6.50
4.37
of GNNs, it still cannot deal with graphs with missing attributes. Thus, we use the average
attribute completion method to complete the feature matrix, and then train a FairGNN
model for node classification.
Implementation Details. Each dataset is randomly split into 75%/25% training/test set as (Dai
& Wang, 2021). Besides, we randomly drop node attributes based on the attribute missing rate,
α, which means the attributes of α × |V| nodes will be unavailable. For each datasets, we choose
a specific attribute as the sensitive attribute. In particular, region, and nation are selected as the
sensitive attribute for the pokec, and nba datasets, respectively. Unless otherwise specified, we
generate 128-dimension node embeddings and set the attribute missing rate α to 0.3, and set the
hyperparameters of FairAC as: β = 1 for pokec-z and nba datasets, and β = 0.5 for pokec-n
dataset. We adopt Adam (Kingma & Ba, 2014) with the learning rate of 0.001 and weight decay as
1e − 5. We adopt the DeepWalk (Perozzi et al., 2014) method to generate topological embedding
for each node. Specifically, we use the DeepWalk implementation provided by the Karate Club
library (Rozemberczki et al., 2020). We set walk length as 100, embedding dimension as 64, window
size as 5, and epochs as 10. To evaluate fairness of compared methods, we follow the widely used
evaluation protocol in fair graph learning and set a threshold for accuracy, because there is a trade-off
between accuracy and fairness. Since we mainly focus on the fairness metric, we set the accuracy
threshold that all methods can satisfy. we evaluated our models three times and calculated the mean
and standard deviation(std). We estimate the std of ∆SP + ∆EO by adding std of ∆SP and ∆EO,
because for some methods, we use the reported data from (Dai & Wang, 2021) which does not
provide the metric.
A.2 ADDITIONAL EXPERIMENTS
Evaluations on GAT (Veliˇckovi ́c et al., 2018) model. As discussed in the main paper, the pro-
posed FairAC method can be easily integrated with existing graph neural networks. Extensive re-
sults in Section 4 of the main paper demonstrate that the combination of FairAC and GCN performs
very well. In this section, we integrate FairAC with another representative graph neural network
model, GAT (Veliˇckovi ́c et al., 2018). The results of our method and two main baselines in terms
of the node classification accuracy and fairness metrics are shown in Table 4. In these experiments,
FairAC generates fair and complete node features, and then GAT is trained for node classification.
We also investigate the performance of our FairAC method and baselines on dealing with graphs
with varying degrees of missing attributes. We set the attribute missing rate to 0.1, 0.3, 0.5 and 0.7,
and evaluate FairAC and baselines on the Pokec-n dataset. In addition, we set β to 1.0. The best
results are shown in bold. Generally speaking, we have the following observations. (1). The pro-
posed method FairAC shows comparable classification performance with two baselines, GAT and
FairGNN. This suggests that our attribute completion method is able to work well under different
downstream models. It further demonstrates that FairAC can preserve useful information implied
in the original attributes. (2). FairAC has comparable results with two baselines regarding fairness
14
Published as a conference paper at ICLR 2023
metrics. Especially when α is greater than 0.3, FairAC can greatly outperform other methods, which
proves that FairAC is effective even if the attributes are largely missing. Overall, the results in Table
4 validate the effectiveness of FairAC in mitigating unfairness issues and show the compatibility
with varying downstream models.
15
|
|
http://arxiv.org/abs/2302.12973v1 | 2023-02-25T03:37:00 | 2023-02-25T03:37:00 | Attention-based Spatial-Temporal Graph Convolutional Recurrent Networks
for Traffic Forecasting | Traffic forecasting is one of the most fundamental problems in transportation
science and artificial intelligence. The key challenge is to effectively model
complex spatial-temporal dependencies and correlations in modern traffic data.
Existing methods, however, cannot accurately model both long-term and
short-term temporal correlations simultaneously, limiting their expressive
power on complex spatial-temporal patterns. In this paper, we propose a novel
spatial-temporal neural network framework: Attention-based Spatial-Temporal
Graph Convolutional Recurrent Network (ASTGCRN), which consists of a graph
convolutional recurrent module (GCRN) and a global attention module. In
particular, GCRN integrates gated recurrent units and adaptive graph
convolutional networks for dynamically learning graph structures and capturing
spatial dependencies and local temporal relationships. To effectively extract
global temporal dependencies, we design a temporal attention layer and
implement it as three independent modules based on multi-head self-attention,
transformer, and informer respectively. Extensive experiments on five real
traffic datasets have demonstrated the excellent predictive performance of all
our three models with all their average MAE, RMSE and MAPE across the test
datasets lower than the baseline methods. | [
"Haiyang Liu",
"Chunjiang Zhu",
"Detian Zhang",
"Qing Li"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12973v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12973v1",
"@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
5
2
]
G
L
.
s
c
[
1
v
3
7
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Attention Based Spatial-Temporal Graph Convolutional Recurrent Networks
for Traffic Forecasting
Haiyang Liu1 , Chunjiang Zhu2 , Detian Zhang1∗ and Qing Li3
1Institute of Artificial Intelligence, Department of Computer Science and Technology, Soochow
University, Suzhou, China.
2Department of Computer Science, University of North Carolina at Greensboro, Greensboro, NC, USA.
3Department of Computing, The Hong Kong Polytechnic University, Hong Kong, China.
[email protected], [email protected], [email protected],
[email protected]
Abstract
Traffic forecasting is one of the most fundamen-
tal problems in transportation science and artifi-
cial intelligence. The key challenge is to effec-
tively model complex spatial-temporal dependen-
cies and correlations in modern traffic data. Ex-
isting methods, however, cannot accurately model
both long-term and short-term temporal corre-
limiting their expressive
lations simultaneously,
power on complex spatial-temporal patterns. In this
paper, we propose a novel spatial-temporal neu-
ral network framework: Attention-based Spatial-
Temporal Graph Convolutional Recurrent Network
(ASTGCRN), which consists of a graph convolu-
tional recurrent module (GCRN) and a global atten-
tion module. In particular, GCRN integrates gated
recurrent units and adaptive graph convolutional
networks for dynamically learning graph structures
and capturing spatial dependencies and local tem-
poral relationships. To effectively extract global
temporal dependencies, we design a temporal at-
tention layer and implement it as three independent
modules based on multi-head self-attention, trans-
former, and informer respectively. Extensive ex-
periments on five real traffic datasets have demon-
strated the excellent predictive performance of all
our three models with all their average MAE, RMSE
and MAPE across the test datasets lower than the
baseline methods.
1 Introduction
With the development of urbanization, the diversification of
transportation modes and the increasing number of trans-
portation vehicles (cabs, electric vehicles, shared bicycles,
etc.) have put tremendous pressure on urban transportation
systems, which has led to large-scale traffic congestions that
have become a common phenomenon. Traffic congestion has
brought serious economic and environmental impacts to cities
in various countries, and early intervention in traffic systems
∗Corresponding author: [email protected]
based on traffic forecasting is one of the effective ways to alle-
viate traffic congestion. By accurately predicting future traf-
fic conditions, it provides a reference basis for urban traffic
managers to make proper decisions in advance and improve
traffic efficiency.
Traffic forecasting is challenging since traffic data are com-
plex, highly dynamic, and correlated in both spatial and tem-
poral dimensions. Traffic congestion on one road segment
can impact traffic flow on spatially close road segments, and
traffic conditions (e.g., traffic flow or speed) on the same road
segment at different time points can have significant fluctua-
tions. How to fully capture the spatial-temporal dependencies
of modern traffic data and accurately predict future informa-
tion is an important problem in traffic forecasting.
Recently, deep learning has dominated the field of traffic
forecasting due to their capability to model complex non-
linear patterns in traffic data. Many works used different
deep learning networks to model dynamic local and global
spatial-temporal dependencies and achieve promising predic-
tion performance. On the one hand, they often used Re-
current Neural Networks (RNN) and the variants such as
Long Short-Term Memory (LSTM) [Hochreiter and Schmid-
huber, 1997] and Gated Recurrent Units (GRU) [Cho et al.,
2014] for temporal dependency modeling [Li et al., 2018;
Bai et al., 2019; Bai et al., 2020; Chen et al., 2021]. Some
other studies used Convolutional Neural Networks (CNN)
[Yu et al., 2018; Wu et al., 2020; Zhang et al., 2020;
Huang et al., 2020] or attention mechanisms [Guo et al.,
2019; Zheng et al., 2020] to efficiently extract temporal fea-
tures in traffic data. On the other hand, Graph Convolu-
tional Networks (GCNs) [Li et al., 2018; Wu et al., 2019;
Song et al., 2020; Li and Zhu, 2021] are widely used to cap-
ture complex spatial features and dependencies in traffic road
network data.
However, RNN/LSTM/GRU-based models can only indi-
rectly model sequential temporal dependencies, and their in-
ternal cyclic operations make them difficult to capture long-
term global dependencies [Li et al., 2021]. To capture global
information, CNN-based models [Yu et al., 2018; Wu et al.,
2019] stack multiple layers of spatial-temporal modules but
they may lose local information. The attention mechanism,
though effective in capturing global dependencies, is not good
at making short-term predictions [Zheng et al., 2020]. Most
of the previous attention-based methods [Guo et al., 2019;
Guo et al., 2021] also have complex structures and thus high
computational complexity. For instance in [Guo et al., 2021],
the prediction of architectures built by multi-layer encoder
and decoder, though excellent, is much slower than most
prediction models by 1 or 2 orders of magnitude. Further-
more, most of the current GCN-based methods [Geng et al.,
2019] need to pre-define a static graph based on inter-node
distances or similarity to capture spatial information. How-
ever, the constructed graph needs to satisfy the static assump-
tion of the road network, and cannot effectively capture com-
plex dynamic spatial dependencies. Moreover, it is difficult
to adapt graph-structure-based spatial modeling in various
spatial-temporal prediction domains without prior knowledge
(e.g., inter-node distances). Therefore, effectively capturing
dynamic spatial-temporal correlations and fully considering
long-term and short-term dependencies are crucial to further
improve the prediction performance.
To fully capture local and global spatial-temporal depen-
dencies from traffic data, in this paper we propose a novel
spatial-temporal neural network framework: Attention-based
Spatial-temporal Graph Convolutional Recurrent Network
(ASTGCRN). It consists of a graph convolution recurrent
module (GCRN) and a global attention module. In particu-
lar, GCRN integrates GRU and adaptive graph convolutional
networks for dynamically learning graph structures and cap-
turing complex spatial dependencies and local temporal re-
lationships. To effectively extract global temporal dependen-
cies, we design a temporal attention layer and implement it
by three modules based on multi-head self-attention, trans-
former, and informer respectively.
Our main contributions are summarized as follows:
• We develop a novel spatial-temporal neural network
framework, called ASTGCRN, that can effectively model
dynamic local and global spatial-temporal dependencies
in a traffic road network.
• In ASTGCRN, we devise an adaptive graph convolu-
tional network with signals at different depths convo-
luted and then incorporate it into the GRU. The obtained
GRU with adaptive graph convolution (GCRN) can well
capture the dynamic graph structures, spatial features,
and local temporal dependencies.
• We propose a general attention layer that accepts in-
puts from GCRN at different time points and captures
the global temporal dependencies. We implement the
layer using multi-head self-attention, transformer, and
informer to generate three respective models.
• Extensive experiments have been performed on five real-
world traffic datasets to demonstrate the superior perfor-
mance of all our three models compared with the current
state of the art. In particular, our model with transformer
improves the average MAE, RMSE, and MAPE (across
the tested datasets) by 0.11, 0.30, and 0.28, respectively.
We carry out an additional experiment to show the gen-
eralizability of our proposed models to other spatial-
temporal learning tasks.
2 Related Work
2.1 Traffic Forecasting
Traffic forecasting originated from univariate time series fore-
casting. Early statistical methods include Historical Average
(HA), Vector Auto-Regressive (VAR) [Zivot and Wang, 2006]
and Auto-Regressive Integrated Moving Average (ARIMA)
[Lee and Fambro, 1999; Williams and Hoel, 2003], with the
ARIMA family of models the most popular. However, most of
these methods are linear, need to satisfy stationary assump-
tions, and cannot handle complex non-linear spatial-temporal
data.
With the rise of deep learning, it has gradually domi-
nated the field of traffic forecasting by virtue of the ability
to capture complex non-linear patterns in spatial-temporal
data. RNN-based and CNN-based deep learning methods
are the two mainstream directions for modeling temporal de-
pendence. Early RNN-based methods such as DCRNN [Li
et al., 2018] used an encoder-decoder architecture with pre-
sampling to capture temporal dependencies, but the autore-
gressive computation is difficult to focus on long-term corre-
lations effectively. Later, the attention mechanism has been
used to improve predictive performance [Guo et al., 2019;
Zheng et al., 2020; Wang et al., 2020; Guo et al., 2021].
In CNN-based approaches, the combination of 1-D tempo-
ral convolution TCN and graph convolution [Yu et al., 2018;
Wu et al., 2019] are commonly used. But CNN-based mod-
els require stacking multiple layers to expand the percep-
tual field. The emergence of GCNs has enabled deep learn-
ing models to handle non-Euclidean data and capture im-
plicit spatial dependencies, and they have been widely used
for spatial data modeling [Huang et al., 2020; Song et al.,
2020]. The static graphs pre-defined according to the dis-
tance or similarity between nodes cannot fully reflect the
road network information, and cannot make dynamic ad-
justments during the training process to effectively capture
complex spatial dependencies. Current research overcame
the limitations of convolutional networks based on static
graphs or single graphs, and more adaptive graph or dynamic
graph building strategies [Wu et al., 2020; Bai et al., 2020;
Lan et al., 2022] were proposed.
In addition to the above methods, differential equations
have also been applied to improve traffic forecasting. [Fang
et al., 2021] capture spatial-temporal dynamics through a
tensor-based Ordinary Differential Equation (ODE) alterna-
[Choi et al., 2022]
tive to graph convolutional networks.
introduced Neural Control Differential Equations (NCDEs)
into traffic prediction, which designed two NCDEs for tempo-
ral processing and spatial processing respectively. Although
there are dense methods for spatial-temporal modeling, most
of them lack the capability to focus on both long-term and
short-term temporal correlations, which results in the limita-
tions of capturing temporal dependencies and road network
dynamics.
2.2 Graph Convolutional Networks
Graph convolution networks can be separated into spectral
domain graph convolution and spatial domain graph convolu-
tion. In the field of traffic prediction, spectral domain graph
convolution has been widely used to capture the spatial cor-
relation between traffic series. [Bruna et al., 2013] for the
first time proposed spectral domain graph convolution based
on spectral graph theory. The spatial domain signal is con-
verted to the spectral domain by Fourier transform, and then
the convolution result is inverted to the spatial domain after
completing the convolution operation. The specific formula
is defined as follows:
gθ (cid:63)G x = g(L)x = U gθ(Λ)U Tx,
(1)
2 LD− 1
j=1A1j, * * * , (cid:80)N
In the equation, (cid:63)G denotes the graph convolution opera-
tion between the convolution kernel gθ and the input sig-
nal x and L = D− 1
2 = U ΛU T ∈ RN ×N is the
symmetric normalized graph Laplacian matrix, where D =
diag((cid:80)N
j=1AN j) ∈ RN ×N is the diagonal
degree matrix and L = D − A is the graph Laplacian matrix.
U is the Fourier basis of G and Λ is the diagonal matrix of L
eigenvalues. However, the eigenvalue decomposition of the
Laplacian matrix in Eq. (1) requires expensive computations.
For this reason, [Defferrard et al., 2016] uses the Chebyshev
polynomial to replace the convolution kernel gθ in the spec-
tral domain:
gθ (cid:63)G x = g(L)x =
K−1
(cid:88)
k=0
βkTk( ˆL)x,
(2)
where [β0, β1, . . . , βK−1] are the learnable parameters, and
K ≥ 1 is the number of convolution kernels. ChebNet does
not require eigenvalue decomposition of Laplacian matrices,
but uses Chebyshev polynomials T0( ˆL) = In, T1( ˆL) = ˆL,
and Tn+1( ˆL) = 2 ˆLTn( ˆL) − Tn−1( ˆL). Here ˆL = 2
L −
In is the scaled Laplacian matrix, where λmax is the largest
eigenvalue and In is the identity matrix. When K = 2 ,
ChebNet is simplified to GCN [Kipf and Welling, 2016].
λmax
2.3 Attention Mechanism
Attention mechanism draws on the human selective visual at-
tention mechanism, and its core goal is to select the infor-
mation that is more critical to the current task from a large
amount of information. It has been verified to be very effec-
tive in capturing long-range dependencies in numerous tasks
[Bahdanau et al., 2014; Hu et al., 2018]. Among various at-
tention mechanisms, the Scaled Dot-Product Attention is one
of the most widely used methods. As defined below, it cal-
culates the dot product between the query and the key, and
d (the dimension of the query and the key) to
divides it by
preserve the stability of the gradient.
√
Att(Q, K, V ) = sof tmax(
QK T
√
d
)V,
(3)
where Q ∈ RT ×dq , K ∈ RT ×dk , and V ∈ RT ×dv are query,
key and value, and dq = dk = d and dv are their dimen-
sion. Transformer [Vaswani et al., 2017] abandons tradi-
tional architectures such as RNN or CNN, and is based on
encoder-decoder, which effectively solves the problem that
RNN cannot be easily parallelized and CNN cannot efficiently
capture long-term dependencies. Taking this advantage,
Figure 1: Detailed framework of the ASTGCRN model.
Transformer achieves state-of-the-art performance on multi-
ple NLP and CV tasks [Radford et al., 2019; Bai et al., 2021;
Lin et al., 2021]. Informer [Zhou et al., 2021] improves the
Transformer and is used to improve the prediction problem of
long sequences.
3 Methodology
In this section, we first give a mathematical definition of the
traffic prediction problem, and then detail the two main mod-
ules of the ASTGCRN framework: GCRN and the attention
layer. Finally we outline the overall design of this framework.
3.1 Problem Definition
The traffic prediction task can be formulated as a multi-step
time series prediction problem that utilizes historical traffic
data and prior knowledge of N locations (e.g., traffic sensors)
on a road network to predict future traffic conditions. Typi-
cally, prior knowledge refers to the road network represented
as a graph G = (V, E, A), where V is a set of N = |V | nodes
representing different locations on the road network, E is a
set of edges, and A ∈ RN×N is the weighted adjacency ma-
trix representing the proximity between nodes (e.g., the road
network between nodes). We can formulate the traffic pre-
diction problem as learning a function F to predict the graph
signals Y (t+1):(t+T ) ∈ RT ×N ×C of the next T steps based
×N ×C
on the past T
and G:
steps graph signals X (t−T
+1):t ∈ RT
(cid:48)
(cid:48)
(cid:48)
(cid:48)
[X (t−T
+1):t, G] FΘ−→ [X (t+1):(t+T )],
(4)
where Θ denotes all the learnable parameters in the model.
3.2 Adaptive Graph Convolution
For traffic data in a road network, the dependencies between
different nodes may change over time, and the pre-defined
graph structure cannot contain complete spatial dependency
information. Inspired by the adaptive adjacency matrix [Wu
et al., 2019; Bai et al., 2020; Chen et al., 2021], we generate
T1( ˆL) in Eq. (2) by randomly initializing a learnable node
embedding Eφ ∈ RN ×De , where De denotes the size of the
node embedding:
T1( ˆL) = ˆL = sof tmax(Eφ * ET
φ )
(5)
Attention Layer Output LayerGRUNode Embedding(N, d)AGCNsInputOutputSoftmaxFigure 2: The Graph Convolution Recurrent Module.
To explore the hidden spatial correlations between node do-
mains at different depths, we concatenate Tk( ˆL) at different
depths as a tensor ̃Tφ = [I, T1( ˆL), T2( ˆL), . . . , TK−1( ˆL)]T ∈
RK×N ×N and generalize to high-dimensional graph signals
X ∈ RN ×Cin . Let Cin and Cout represent the number of
input and output channels, respectively. Then the graph con-
volution formula in Eq. (2) can be refined as:
gθ (cid:63)G x = g(L)x = ̃TφXΨ,
where the learnable parameters Ψ ∈ RK×Cin×Cout. How-
ever, the parameters shared by all nodes have limitations in
capturing spatial dependencies [Bai et al., 2020]. Instead, we
assign independent parameters to each node to get the pa-
rameters ˆΨ ∈ RN ×K×Cin×Cout, which can more effectively
capture the hidden information in different nodes. We fur-
ther avoid overfitting and high spatial complexity problems
by matrix factorization. That is to learn two smaller parame-
ters to generate ˆΨ = EφW , where Eφ ∈ RN ×De is the node
embedding dictionary and W ∈ RDe×K×Cin×Cout are the
learnable weights. Our adaptive graph convolution formula
can be expressed as:
(6)
gθ (cid:63)G x = g(L)x = ̃TφXEφW ∈ RN ×Cout
(7)
3.3 GRU with Adaptive Graph Convolution
GRU is a simplified version of LSTM with multiple GRU-
Cell modules and generally provides the same performance
as LSTM but is significantly faster to compute. To further
discover the spatial-temporal correlation between time series,
we replace the MLP layers in GRU with adaptive graph con-
volution operation, named GCRN. The computation of GCRN
is given as follows:
zt = σ( ̃Tφ[X t, ht−1]EφWz + Eφbz),
rt = σ( ̃Tφ[X t, ht−1]EφWr + Eφbr),
̃ht = tanh( ̃Tφ[X t, rt (cid:12) ht−1]EφW ̃h + Eφb ̃h),
ht = zt (cid:12) ht−1 + (1 − zt) (cid:12) ̃ht,
(8)
where Wz, Wr, W ̃h, bz, br and b ̃h are learnable parameters,
σ and tanh are two activation functions, i.e., the Sigmoid
function and the Tanh function. The [X t, ht−1] and ht are
the input and output at time step t, respectively. The network
architecture of GCRN is plotted in Figure 2.
3.4 The Attention Layer
GCRN can effectively capture sequential dependencies, but
its structural characteristics limit its ability to capture long-
distance temporal information. For the traffic prediction task,
Figure 3: The Attention Layer.
the global temporal dependence clearly has a significant im-
pact on the learning performance. Self-attention directly con-
nects two time steps through dot product calculation, which
greatly shortens the distance between long-distance depen-
dent features, and improves the parallelization of computa-
tion, making it easier to capture long-term dependencies in
traffic data. Therefore, we propose three independent mod-
ules for the self-attention mechanism, namely, the multi-
headed self-attention module, the transformer module, and
the informer module, in order to directly capture global tem-
poral dependencies. In the following three subsections, we
will explain these three modules in detail.
Multi-Head Self-Attention Module. Multi-head attention
is to learn the dependencies of different patterns in parallel
with multiple sets of queries, keys and values (where each
set is regarded as an attention head), and then concatenate
the learned multiple relationships as the output. We use a
self-attentive mechanism to construct the multi-headed atten-
tion module. Specifically, Qo = HoWq, Ko = HoWk and
Vo = HoWv are derived from the same matrix Ho by linear
transformation. Here Ho ∈ RN ×T ×Cout is the output result
of the GCRN module, and Wq ∈ RCout×dq , Wk ∈ RCout×dk
and Wv ∈ RCout×dv are the learnable parameters of the lin-
ear projection. For multi-head self-attention mechanism, the
formula can be stated as:
M HSelf Att = Concat(head1, . . . , headh)Wo,
where headi = Att(Qo, Ko, Vo)
= sof tmax(
T
QoKo
√
d
)Vo.
(9)
Transformer Module. The Transformer module (see Figure
3(a)) contains a multi-head self-attention layer and two feed-
forward neural networks. For self-attention, each position of
the input sequence is equally inner product, which results in
the loss of sequential information. We use a fixed position
encoding [Vaswani et al., 2017] to address this flaw:
P Et(2c) = sin(t/10002c/Cout),
P Et(2c + 1) = cos(t/10002c/Cout ),
(10)
where t is the relative position of each sequence (time step)
of the input and c represents the dimension. In order to bet-
ter identify the relative positional relationship between se-
quences, Ho and position encoding are combined to generate
AGCN1-AGCNrzAddHadamand ProductSigmoid(a) Transformer Module(b) Informer ModulePositionalEncodingAdd & Layer NormFeed Forward LayerFeed Forward LayerAdd & Layer NormMulti-Head ProbSparse Self-AttentionPositionalEncodingAdd & Layer NormFeed Forward LayerFeed Forward LayerAdd & Layer NormMulti-Head Self-AttentionH
(cid:48)
o ∈ RN ×T ×Cout:
H
(cid:48)
o[:, t, :] = Ho[:, t, :] + P Et
(11)
(cid:48)
After combining the location encoding, H
o is fed as input into
the multi-headed self-attentive layer for remote relationship
capture, and then the output state is passed to the two fully
connected layers. Layer normalization and residual connec-
tivity are used in both sub-layers. Finally, Transformer mod-
ule outputs the result Ha ∈ RN ×T ×Cout.
Informer Module. According to Eq. (9), the traditional self-
attention mechanism requires two dot products and O(T 2)
space complexity. The sequence lengths of queries and keys
are equal in self-attention computation, i.e., Tq = Tk = T .
After finding that most of the dot products have minimal
attention and the main attention is focused on only a few
dot products, [Zhou et al., 2021] proposed ProbSparse self-
attention. ProbSparse self-attention selects only the more im-
portant queries to reduce the computational complexity, i.e.,
by measuring the dilution of the queries and then selecting
only the top-u queries with u = c * lnT for constant c. The
query dilution evaluation formula is as follows:
̄M (qi, Ko) = max
j
(cid:40)
(cid:41)
−
qikT
j√
d
1
T
T
(cid:88)
j=1
qikT
j√
d
(12)
where qi and ki represent the i-th row in Qo and Ko respec-
tively. To compute ̄M , only U = T ln T dot product pairs
are randomly selected, and the other pairs are filled with ze-
ros. In this way, the time and space complexity are reduced to
only O(T ln T ). Therefore, we construct a new module called
Informer module (see Figure 3(b)) by using ProbSparse self-
attention to replace the normal self-attention mechanism of
Transformer module. It selects top-u query according to ̄M
to generate sparse matrix Qspa
. Then the Multi-head Prob-
o
Sparse self-attention can be expressed as:
M HP robSelf Att = Concat(head1, . . . , headh)Wo,
where headi = Att(Qspa
o
= sof tmax(
, Ko, Vo)
Qspa
o Ko
√
d
T
)Vo.
(13)
(cid:48)
3.5 Framework of ASTGCRN
As in Figure 1, our ASTGCRN framework uses GCRN and
attention mechanisms. First, we take the historical data
+1):t ∈ RT ×N ×C input to the GCRN module to pro-
X (t−T
duce an output Ho ∈ RN ×T ×Cout. Then Ho is used as the in-
put of the attention layer to get the output Ha ∈ RN ×T ×Cout.
Finally, the next T-step of data Y (t+1):(t+T ) ∈ RT ×N ×1 is
output after two fully connected layers.
We choose the L1 loss to formulate the objective function
and minimize the training error by back propagation. Specif-
ically, the loss function is defined as follows.
Loss =
1
T
T −1
(cid:88)
( ˆY t − Y t)
(14)
t=0
where ˆY is the real traffic data, Y is the predicted data, and T
is the total predicted time steps.
Datasets
Nodes
Samples
Unit
Time Span
PEMSD3
PEMSD4
PEMSD7
PEMSD8
PEMSD7(M)
DND-US
358
307
883
170
228
53
26, 208
16, 992
28, 224
17, 856
12, 672
313
5 mins
5 mins
5 mins
5 mins
5 mins
1 week
3 months
2 months
3 months
2 months
2 months
6 years
Table 1: Statistics of the tested datasets
4 Experimental Results
In this section, we present the results of the extensive experi-
ments we have performed. We start by describing the experi-
mental setups and then discuss the prediction results obtained
in the baseline settings. Finally, the ablation study and the
effects of hyperparameter tuning are provided.
Datasets. We evaluate the performance of the developed
models on five widely used traffic prediction datasets col-
lected by Caltrans Performance Measure System (PeMS)
[Chen et al., 2001], namely PEMSD3, PEMSD4, PEMSD7,
PEMSD8, and PEMSD7(M) [Fang et al., 2021; Choi et al.,
2022]. The traffic data are aggregated into 5-minute time in-
tervals, i.e., 288 data points per day. In addition, we construct
a new US natural death dataset DND-US to study the general-
izability of our method to other spatial-temporal data. It con-
tains weekly natural deaths for 53 (autonomous) states in the
US for the six years from 2014 to 2020. Following existing
works [Bai et al., 2020], the Z-score normalization method is
adopted to normalize the input data to make the training pro-
cess more stable. Detailed statistics for the tested datasets are
summarized in Table 1.
Baseline Methods. We compare our models with the follow-
ing baseline methods:
• Traditional time series forecasting methods, Historical
Average (HA), ARIMA [Williams and Hoel, 2003], VAR
[Zivot and Wang, 2006], and SVR [Drucker et al., 1996];
• RNN-based models: FC-LSTM [Sutskever et al., 2014],
DCRNN [Li et al., 2018], AGCRN [Bai et al., 2020], and
Z-GCNETs [Chen et al., 2021];
• CNN-based methods: STGCN [Yu et al., 2018], Graph
WaveNet [Wu et al., 2019], MSTGCN, LSGCN [Huang
et al., 2020], STSGCN [Song et al., 2020], and STFGNN
[Li and Zhu, 2021];
• Attention-based models: ASTGCN(r) [Guo et al., 2019],
ASTGNN [Guo et al., 2021], and DSTAGNN [Lan et al.,
2022];
• Other types of models: STGODE [Fang et al., 2021] and
STG-NCDE [Choi et al., 2022].
More details on the above baseline methods can be found in
Appendix A.
Experimental Settings. All datasets are split into training
set, validation set and test set in the ratio of 6:2:2. Our model
and all baseline methods use the 12 historical continuous time
steps as input to predict the data for the next 12 continuous
time steps.
Our models are implemented based on the Pytorch frame-
work, and all the experiments are performed on an NVIDIA
GeForce GTX 1080 TI GPU with 11G memory. The fol-
lowing hyperparameters are configured based on the models'
PEMSD7
RMSE MAPE MAE
PEMSD8
RMSE MAPE MAE RMSE MAPE
PEMSD7(M)
Model
HA
ARIMA
VAR
SVR
FC-LSTM
DCRNN
AGCRN
Z-GCNETs
STGCN
Graph WaveNet
MSTGCN
LSGCN
STSGCN
STFGNN
ASTGCN(r)
ASTGNN
DSTAGNN
STGODE
STG-NCDE
MAE
31.58
35.41
23.65
20.73
21.33
17.99
15.98
16.64
17.55
19.12
19.54
17.94
17.48
16.77
17.34
15.65
15.57
16.50
15.57
PEMSD3
RMSE MAPE
52.39
47.59
38.26
34.97
35.11
30.31
28.25
28.15
30.42
32.77
31.93
29.85
29.21
28.34
29.56
25.77
27.21
27.84
27.09
33.78%
33.78%
24.51%
20.63%
23.33%
18.34%
15.23%
16.39%
17.34%
18.89%
23.86%
16.98%
16.78%
16.30%
17.21%
15.66%
14.68%
16.69%
15.06%
PEMSD4
RMSE MAPE
59.24
48.80
38.61
41.82
40.65
33.44
32.26
31.61
34.89
39.66
37.21
33.86
33.65
32.51
35.22
30.71
31.46
32.82
31.09
27.88%
24.18%
17.24%
18.95%
18.23%
14.17%
12.97%
12.78%
13.83%
17.29%
14.33%
13.18%
13.90%
16.77%
16.56%
15.56%
12.70%
13.77%
12.76%
MAE
38.03
33.73
24.54
27.23
26.77
21.22
19.83
19.50
21.16
24.89
23.96
21.53
21.19
20.48
22.93
18.73
19.30
20.84
19.21
MAE
45.12
38.17
50.22
32.49
29.98
25.22
22.37
21.77
25.33
26.39
29.00
27.31
24.26
23.46
24.01
20.58
21.42
22.59
20.53
65.64
59.27
75.63
44.54
45.94
38.61
36.55
35.17
39.34
41.50
43.73
41.46
39.03
36.60
37.87
34.72
34.51
37.54
33.84
24.51% 34.86
19.46% 31.09
32.22% 19.19
19.20% 22.00
13.20% 23.09
11.82% 16.82
15.95
9.12%
9.25%
15.76
11.21% 17.50
11.97% 18.28
14.30% 19.00
11.98% 17.73
10.21% 17.13
9.21%
16.94
10.73% 18.25
15.00
8.52%
9.01%
15.67
10.14% 16.81
15.45
8.80%
59.24
44.32
29.81
33.85
35.17
26.36
25.22
25.11
27.09
30.05
29.15
26.76
26.80
26.25
28.06
24.59
24.77
25.97
24.81
27.88% 4.59
22.73% 7.27
13.10% 4.25
14.23% 3.33
14.99% 4.16
10.92% 3.83
10.09% 2.79
10.01% 2.75
11.29% 3.86
12.15% 3.19
12.38% 3.54
11.20% 3.05
10.96% 3.01
10.60% 2.90
11.64% 3.14
2.98
9.49%
9.94%
2.75
10.62% 2.97
2.68
9.92%
8.63
13.20
7.61
6.63
7.51
7.18
5.54
5.62
6.79
6.24
6.14
5.98
5.93
5.79
6.18
6.05
5.53
5.66
5.39
5.36
5.30*
5.32
14.35%
15.38%
10.28%
8.53%
10.10%
9.81%
7.02%
6.89%
10.06%
8.02%
9.00%
7.62%
7.55%
7.23%
8.12%
7.52%
6.93%
7.36%
6.76%
6.72%
6.60%*
6.66%
A-ASTGCRN
I-ASTGCRN
T-ASTGCRN
15.06
15.06
14.90*
26.71
26.40
26.01*
13.83%*
19.30
13.91% 19.15*
14.17% 19.21
30.92
30.80*
31.05
12.91% 20.42*
20.81
12.89%
20.53
12.67%*
33.81
33.83
33.75*
15.46
8.54%*
8.95%
15.26
8.73% 15.14*
24.54
24.53
24.24*
2.66
9.89%
9.65% 2.63*
2.63*
9.63%*
Table 2: Performance comparison of different models on the tested datasets. Underlined results are the current state of the art among the
existing methods. Our three models outperform almost all the baseline methods, as shown in bold font. Results marked with ∗ are the best
prediction performance we achieve. The prediction of ASTGNN is good but much slower than most prediction models by 1 or 2 orders of
magnitude!
performance on the validation dataset: we train the model
with 300 epochs at a learning rate of 0.003 using the Adam
optimizer [Kingma and Ba, 2014] and an early stop strategy
with a patience number of 15. The batch size is 64 for all
the datasets except for the PEMSD7 dataset where the batch
size is set to 16. The number of GCRN layers is 2, where
the number of hidden units per layer are in {32, 64}, and the
number of convolutional kernels K = 2. The weight de-
cay coefficients are varied in {0, 0.0001, * * * , 0.001}, and the
node embedding dimension De are varied in {2, 4, 6, 8, 10}.
The details of the hyperparameter tuning are in Appendix B.
Three common prediction metrics, Mean Absolute Error
(MAE), Root Mean Square Error (RMSE), and Mean Abso-
lute Percentage Error (MAPE), are used to measure the traffic
forecasting performance of the tested methods.
(Their for-
mal definitions are given in Appendix C.) In the discussions
below, we refer to our specific ASTGCRN models based on
the Multi-head self-attention module, Transformer module,
and Informer module as A-ASTGCRN, T-ASTGCRN, and I-
ASTGCRN, respectively.
4.1 Experimental Results
Table 2 shows the prediction performance of our three mod-
els together with the nineteen baseline methods on the five
tested datasets. Remarkably, our three models outperform al-
most all the baseline methods in prediction on all the datasets
and, in some settings, achieve comparable performance with
ASTGNN. Table 4 lists the training time (s/epoch) and infer-
ence time (s/epoch) of our models, as well as several recent
and best-performing baselines on the PEMSD4 dataset. It is
worth noting that the currently top-performing baselines AST-
GNN, DSTAGNN, and STG-NCDE have run-time slower than
the proposed models often by 1 to 2 orders of magnitude.
The overall prediction results of traditional statistical meth-
Model
MAE
RMSE
MAPE(%)
AGCRN
ASTGNN
Z-GCNETs
DSTAGNN
STG-NCDE
15.38 (106.2%)
14.59 (100.8%)
15.28 (105.5%)
14.94 (103.2%)
14.69 (101.5%)
25.56 (106.2%)
24.37 (101.2%)
25.13 (104.4%)
24.70 (102.6%)
24.44 (101.5%)
10.89 (105.0%)
11.35 (108.6%)
11.06 (106.7%)
10.65 (102.7%)
10.66 (102.8%)
A-ASTGCRN 14.58 (100.7%)
I-ASTGCRN 14.58 (100.7%)
T-ASTGCRN 14.48 (100.0%)
24.27 (100.8%)
24.17 (100.4%)
24.07 (100.0%)
10.38 (100.1%)
10.40 (100.3%)
10.37 (100.0%)
Table 3: Mean performance metrics for several competitive methods
by averaging over all the tested datasets. The relative performance
with respect to our T-ASTGCRN method is given in parentheses.
Model
Training
Inference
STGODE
Z-GCNETs
ASTGNN
DSTAGNN
STG-NCDE
A-ASTGCRN
I-ASTGCRN
T-ASTGCRN
111.77
63.34
658.41
242.57
1318.35
45.12
58.84
54.80
12.19
7.40
156.56
14.64
93.77
5.18
6.51
5.62
Table 4: Computation time on PEMSD4.
ods (including HA, ARIMA, VR, and SVR) are not satisfactory
because of its limited ability to handle non-linear data. Their
prediction performance is worse than deep learning meth-
ods by large margins. RNN-based methods such as DCRNN,
AGCRN, and Z-GCNRTs suffer from the limitation of RNNs
that cannot successfully capture long-term temporal depen-
dence and produce worse results than our methods. CNN-
based models such as STGCN, Graph WaveNet, STSGCN,
STFGCN, and STGODE, have either worse or comparable
performance compared to RNN-based methods in our empir-
Dataset
Model
MAE
RMSE MAPE
Dataset
K MAE RMSE MAPE
Training
Inference Memory
DND-US
105.97
AGCRN
47.49
DSTAGNN
47.70
STG-NCDE
A-ASTGCRN
39.33
I-ASTGCRN 38.79*
40.60
T-ASTGCRN
325.09
73.37
77.30
62.86*
66.99
66.28
7.49%
7.47%
6.13%
5.36%
5.16%*
5.43%
Table 5: Forecasting performance of several competitive methods on
DND-US
Model
A-ANN
I-ANN
T-ANN
STGCRN
A-ASTGCRN(s)
I-ASTGCRN(s)
T-ASTGCRN(s)
A-ASTGCRN
I-ASTGCRN
T-ASTGCRN
MAE
29.39
20.63
20.55
17.69
17.41
17.38
17.39
15.06
15.06
14.90*
PEMSD3
RMSE MAPE
PEMSD4
RMSE MAPE
MAE
45.59
33.93
34.40
30.53
29.49
29.37
29.52
26.71
26.40
26.01*
35.99
28.00%
26.39
20.37%
26.02
20.38%
21.21
16.76%
22.29
16.00%
22.14
16.63%
22.01
15.85%
13.83%*
19.30
13.91% 19.15*
19.21
14.17%
52.52
40.65
40.04
34.00
35.20
35.06
34.92
30.92
30.80*
31.05
26.36%
17.79%
17.74%
14.01%
14.88%
14.80%
14.59%
12.91%
12.89%
12.67%*
Table 6: Ablation experiments on PEMSD3 and PEMSD4
ical study. They get the 1-D CNN by temporal information,
but the size of the convolutional kernel prevents them from
capturing the complete long-term temporal correlation. AST-
GCN, ASTGNN and DSTAGNN all use the temporal atten-
tion module, they all enhance the information capture abil-
ity by stacking multi-layer modules, but this also leads to
their lack of local feature capture ability and huge training
cost. Furthermore, they are applicable to the task without
providing prior knowledge. STG-NCDE achieves currently
best performance in multiple datasets. But their temporal
NCDE using only the fully connected operation cannot pay
full attention to the temporal information. Table 3 presents
the average values of MAE, RMSE, and MAPE across all
five datasets for our three models and several top-performing
baselines. All our three methods consistently achieve a bet-
ter average performance while T-ASTGCRN obtains the best
prediction accuracy on average. This is possibly due to that
T-ASTGCRN introduces position encoding to retain position
information while keeping all attention information generated
by dot product computation without discarding any of them.
To test the generalizability of our proposed models to other
spatial-temporal learning tasks, we perform an additional ex-
periment on the DND-US dataset to predict the number of
natural deaths in each US state. As shown in Table 5, all
our three models again outperform several competitive base-
line methods with significant margins. We also visualize and
compare the prediction results with the true numbers at dif-
ferent weeks. It can be seen that our models can capture the
main trend of natural death and predict the trend of the data
more accurately. The details can be found in Appendix D.
4.2 Ablation and Parameter Study
Ablation Study. We refer to the model without an attention
layer as STGCRN, and the A-ASTGCRN, I-ASTGCRN and T-
ASTGCRN without the GCRN layer as A-ANN, I-ANN and
T-ANN, respectively. Also, A-ASTGCRN(s), I-ASTGCRN(s)
and T-ASTGCRN(s) are variant models that use static graphs
PEMSD3
PEMSD4
1
2
3
1
2
3
15.24
14.90
15.33
19.40
19.21
19.22
26.46
26.01
27.04
31.19
31.05
31.07
88.94
15.10%
14.17% 95.80
13.92% 121.40
48.72
13.00%
12.67% 54.80
66.43
12.84%
9.95
10.22
13.39
5.24
5.62
7.12
6497
7555
8535
6355
7319
8137
Table 7: Effect of convolution kernel number K on T-ASTGCRN.
(a) Effects of varied weight de-
cay value
Figure 4: Effects of hyperparameter tuning on T-ASTGCRN in
PEMSD7(M)
(b) Effects of varied node em-
bedding dimension (De)
for graph convolution. Table 6 shows the ablation experi-
mental results on the PEMSD3 and PEMSD4 datasets.
It
shows that the performance of STGCRN drops to that of a
normal CNN based approach, and the spatial modeling abil-
ity of the static graph is much less than that of the adaptive
adjacency matrix. Moreover, the performance of the models
with only the attention layer is extremely poor, especially for
A-ANN, which drops significantly and becomes similar as the
traditional statistical methods. The attention module is cru-
cial for capturing long-term temporal dependencies in traf-
fic data, further enhancing the modeling of spatial-temporal
dependencies. But, only focusing on long-term time depen-
dence using the attention module and removing GRU that
uses adaptive graph convolution would damage the predic-
tion performance. More detailed results are provided in the
Appendix E.
Parameter Study. To investigate the effects of hyperparam-
eters on the prediction results, we conduct a series of experi-
ments on the main hyperparameters. Figure 7 shows the pre-
diction performance and training cost for varying the num-
ber of convolution kernels K on the PEMSD3 and PEMSD4
datasets. From the experimental results, we can see that
with K = 1, the graph convolution is simplified to a unit
matrix-based implementation, which does not enable effec-
tive information transfer between nodes. A larger convolu-
tion depth does not improve the prediction performance, but
instead incurs longer training time and memory cost. There-
fore, for our model and dataset, we set K to 2. Meanwhile,
Figure 4 shows the MAE and RMSE values of T-ASTGCRN
in the PEMSD7(M) dataset when varying the weight decay
and node embedding dimension De. It can be seen that in-
creasing the weight decay and node embedding dimension
appropriately can improve the prediction performance of T-
ASTGCRN. However, the weight decay should not be too
high, as otherwise the performance of the model could be
significantly reduced. When the weight decay is 0.0004 and
De = 10, the two performance metrics reach their lowest
values.
5 Conclusion
In this paper, we design an attention-based spatial-temporal
graph convolutional recurrent network framework for traffic
prediction. We instantiate the framework with three attention
modules based on Multi-head self-attention, Transformer and
Informer, all of which, in particular the Transformer-based
module, can well capture long-term temporal dependence and
incorporate with the spatial and short-term temporal features
by the GCRN module. Extensive experiments confirm the ef-
fectiveness of all our three models in improving the prediction
performance. We believe that the design ideas of Transformer
and Informer can bring new research thrusts in the field of
traffic forecasting.
References
[Bahdanau et al., 2014] Dzmitry Bahdanau, Kyunghyun
Cho, and Yoshua Bengio. Neural machine translation
by jointly learning to align and translate. arXiv preprint
arXiv:1409.0473, 2014.
[Bai et al., 2019] Lei Bai, Lina Yao, Salil S Kanhere, Zheng
Yang, Jing Chu, and Xianzhi Wang. Passenger demand
forecasting with multi-task convolutional recurrent neural
networks. In Pacific-Asia Conference on Knowledge Dis-
covery and Data Mining, pages 29–42. Springer, 2019.
[Bai et al., 2020] Lei Bai, Lina Yao, Can Li, Xianzhi Wang,
and Can Wang. Adaptive graph convolutional recurrent
network for traffic forecasting. Advances in Neural Infor-
mation Processing Systems, 33:17804–17815, 2020.
[Bai et al., 2021] He Bai, Peng Shi, Jimmy Lin, Yuqing Xie,
Luchen Tan, Kun Xiong, Wen Gao, and Ming Li. Sega-
tron: Segment-aware transformer for language modeling
In Proceedings of the AAAI Confer-
and understanding.
ence on Artificial Intelligence, volume 35, pages 12526–
12534, 2021.
[Bruna et al., 2013] Joan Bruna, Wojciech Zaremba, Arthur
Spectral networks and lo-
arXiv preprint
Szlam, and Yann LeCun.
cally connected networks on graphs.
arXiv:1312.6203, 2013.
[Chen et al., 2001] Chao Chen, Karl Petty, Alexander Sk-
abardonis, Pravin Varaiya, and Zhanfeng Jia. Freeway per-
formance measurement system: mining loop detector data.
Transportation Research Record, 1748(1):96–102, 2001.
[Chen et al., 2021] Yuzhou Chen, Ignacio Segovia, and Yu-
lia R Gel. Z-gcnets: time zigzags at graph convolutional
networks for time series forecasting. In International Con-
ference on Machine Learning, pages 1684–1694. PMLR,
2021.
[Cho et al., 2014] Kyunghyun Cho, Bart Van Merri ̈enboer,
Dzmitry Bahdanau, and Yoshua Bengio. On the proper-
ties of neural machine translation: Encoder-decoder ap-
proaches. arXiv preprint arXiv:1409.1259, 2014.
[Choi et al., 2022] Jeongwhan Choi, Hwangyong Choi, Jee-
hyun Hwang, and Noseong Park. Graph neural controlled
differential equations for traffic forecasting. In Proceed-
ings of the AAAI Conference on Artificial Intelligence, vol-
ume 36, pages 6367–6374, 2022.
[Defferrard et al., 2016] Micha ̈el Defferrard, Xavier Bres-
son, and Pierre Vandergheynst. Convolutional neural
networks on graphs with fast localized spectral filtering.
Advances in neural information processing systems, 29,
2016.
[Drucker et al., 1996] Harris Drucker, Christopher J Burges,
Linda Kaufman, Alex Smola, and Vladimir Vapnik. Sup-
port vector regression machines. Advances in neural in-
formation processing systems, 9, 1996.
[Fang et al., 2021] Zheng Fang, Qingqing Long, Guojie
Song, and Kunqing Xie. Spatial-temporal graph ode net-
works for traffic flow forecasting. In Proceedings of the
27th ACM SIGKDD Conference on Knowledge Discovery
& Data Mining, pages 364–373, 2021.
[Geng et al., 2019] Xu Geng, Yaguang Li, Leye Wang,
Lingyu Zhang, Qiang Yang, Jieping Ye, and Yan Liu.
Spatiotemporal multi-graph convolution network for ride-
hailing demand forecasting. In Proceedings of the AAAI
conference on artificial intelligence, volume 33, pages
3656–3663, 2019.
[Guo et al., 2019] Shengnan Guo, Youfang Lin, Ning Feng,
Chao Song, and Huaiyu Wan. Attention based spatial-
temporal graph convolutional networks for traffic flow
In Proceedings of the AAAI conference on
forecasting.
artificial intelligence, volume 33, pages 922–929, 2019.
[Guo et al., 2021] Shengnan Guo, Youfang Lin, Huaiyu
Wan, Xiucheng Li, and Gao Cong. Learning dynamics
and heterogeneity of spatial-temporal graph data for traffic
forecasting. IEEE Transactions on Knowledge and Data
Engineering, 2021.
[Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and
J ̈urgen Schmidhuber. Long short-term memory. Neural
computation, 9(8):1735–1780, 1997.
[Hu et al., 2018] Jie Hu, Li Shen, and Gang Sun. Squeeze-
and-excitation networks. In Proceedings of the IEEE con-
ference on computer vision and pattern recognition, pages
7132–7141, 2018.
[Huang et al., 2020] Rongzhou Huang, Chuyin Huang,
Yubao Liu, Genan Dai, and Weiyang Kong. Lsgcn: Long
short-term traffic prediction with graph convolutional
networks. In IJCAI, pages 2355–2361, 2020.
[Kingma and Ba, 2014] Diederik P Kingma and Jimmy Ba.
arXiv
Adam: A method for stochastic optimization.
preprint arXiv:1412.6980, 2014.
[Kipf and Welling, 2016] Thomas N Kipf and Max Welling.
Semi-supervised classification with graph convolutional
networks. arXiv preprint arXiv:1609.02907, 2016.
[Lan et al., 2022] Shiyong Lan, Yitong Ma, Weikang Huang,
Wenwu Wang, Hongyu Yang, and Pyang Li. Dstagnn:
Dynamic spatial-temporal aware graph neural network for
[Wu et al., 2019] Zonghan Wu, Shirui Pan, Guodong Long,
Jing Jiang, and Chengqi Zhang. Graph wavenet for deep
In Proceedings of the
spatial-temporal graph modeling.
28th International Joint Conference on Artificial Intelli-
gence, pages 1907–1913, 2019.
[Wu et al., 2020] Zonghan Wu, Shirui Pan, Guodong Long,
Jing Jiang, Xiaojun Chang, and Chengqi Zhang. Con-
necting the dots: Multivariate time series forecasting with
graph neural networks. In Proceedings of the 26th ACM
SIGKDD international conference on knowledge discov-
ery & data mining, pages 753–763, 2020.
[Yu et al., 2018] Bing Yu, Haoteng Yin, and Zhanxing Zhu.
Spatio-temporal graph convolutional networks: a deep
learning framework for traffic forecasting. In Proceedings
of the 27th International Joint Conference on Artificial In-
telligence, pages 3634–3640, 2018.
[Zhang et al., 2020] Qi Zhang, Jianlong Chang, Gaofeng
Meng, Shiming Xiang, and Chunhong Pan.
Spatio-
temporal graph structure learning for traffic forecasting. In
Proceedings of the AAAI Conference on Artificial Intelli-
gence, volume 34, pages 1177–1185, 2020.
[Zheng et al., 2020] Chuanpan Zheng, Xiaoliang Fan,
Cheng Wang, and Jianzhong Qi. Gman: A graph multi-
attention network for traffic prediction. In Proceedings of
the AAAI conference on artificial intelligence, volume 34,
pages 1234–1241, 2020.
[Zhou et al., 2021] Haoyi Zhou, Shanghang Zhang, Jieqi
Peng, Shuai Zhang, Jianxin Li, Hui Xiong, and Wancai
Informer: Beyond efficient transformer for long
Zhang.
In Proceedings of the
sequence time-series forecasting.
AAAI Conference on Artificial Intelligence, volume 35,
pages 11106–11115, 2021.
[Zivot and Wang, 2006] Eric Zivot and Jiahui Wang. Vector
autoregressive models for multivariate time series. Mod-
eling financial time series with S-PLUS®, pages 385–429,
2006.
In International Conference on
traffic flow forecasting.
Machine Learning, pages 11906–11917. PMLR, 2022.
[Lee and Fambro, 1999] Sangsoo Lee and Daniel B Fambro.
Application of subset autoregressive integrated moving av-
erage model for short-term freeway traffic volume fore-
casting. Transportation research record, 1678(1):179–
188, 1999.
[Li and Zhu, 2021] Mengzhang Li and Zhanxing Zhu.
Spatial-temporal fusion graph neural networks for traffic
flow forecasting. In Proceedings of the AAAI conference
on artificial intelligence, volume 35, pages 4189–4196,
2021.
[Li et al., 2018] Yaguang Li, Rose Yu, Cyrus Shahabi, and
Yan Liu. Diffusion convolutional recurrent neural net-
In International
work: Data-driven traffic forecasting.
Conference on Learning Representations (ICLR '18),
2018.
[Li et al., 2021] Fuxian Li, Jie Feng, Huan Yan, Guangyin
Jin, Fan Yang, Funing Sun, Depeng Jin, and Yong Li.
Dynamic graph convolutional recurrent network for traffic
prediction: Benchmark and solution. ACM Transactions
on Knowledge Discovery from Data (TKDD), 2021.
[Lin et al., 2021] Kevin Lin, Lijuan Wang, and Zicheng Liu.
End-to-end human pose and mesh reconstruction with
In Proceedings of the IEEE/CVF Confer-
transformers.
ence on Computer Vision and Pattern Recognition, pages
1954–1963, 2021.
[Radford et al., 2019] 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.
[Song et al., 2020] Chao Song, Youfang Lin, Shengnan Guo,
and Huaiyu Wan. Spatial-temporal synchronous graph
convolutional networks: A new framework for spatial-
temporal network data forecasting. In Proceedings of the
AAAI Conference on Artificial Intelligence, volume 34,
pages 914–921, 2020.
[Sutskever et al., 2014] Ilya Sutskever, Oriol Vinyals, and
Quoc V Le. Sequence to sequence learning with neural
networks. Advances in neural information processing sys-
tems, 27, 2014.
[Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki
Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
Łukasz Kaiser, and Illia Polosukhin. Attention is all you
need. Advances in neural information processing systems,
30, 2017.
[Wang et al., 2020] Xiaoyang Wang, Yao Ma, Yiqi Wang,
Wei Jin, Xin Wang, Jiliang Tang, Caiyan Jia, and Jian Yu.
Traffic flow prediction via spatial temporal graph neural
In Proceedings of The Web Conference 2020,
network.
pages 1082–1092, 2020.
[Williams and Hoel, 2003] Billy M Williams and Lester A
Hoel. Modeling and forecasting vehicular traffic flow
as a seasonal arima process: Theoretical basis and em-
Journal of transportation engineering,
pirical results.
129(6):664–672, 2003.
A Baselines Information
We compare our models with the following baseline models:
• HA: Historical Average models traffic flow as a periodic
process and uses the average of historical traffic flow (eg,
the same time in previous weeks) to predict future traffic
flow.
• ARIMA: Auto-Regressive Integrated Moving Average
method, which is a widely used model for time series
forecasting [Williams and Hoel, 2003].
• VAR: Vector Auto-Regression is a statistical model that
captures the relationship of multiple variables over time
[Zivot and Wang, 2006].
• SVR: Support Vector Regression is a traditional time se-
ries forecasting model that uses a linear support vector
machine for regression tasks [Drucker et al., 1996].
• FC-LSTM: LSTM network with fully connected hidden
units, which is a network model that can effectively cap-
ture time dependencies [Sutskever et al., 2014].
• DCRNN: Diffusion Convolutional Recurrent Neural
Network, which captures spatial and temporal depen-
dencies using diffuse graph convolution and encoder-
decoder network architecture, respectively [Li et al.,
2018].
• STGCN: Spatial-Temporal Graph Convolutional Net-
work, which combines graph convolution and 1D con-
volution to capture spatial-temporal correlations [Yu et
al., 2018].
• Graph WaveNet: Graph WaveNet introduces an adap-
tive adjacency matrix and combines diffuse graph con-
volution with 1D convolution [Wu et al., 2019].
• ASTGCN(r): Attention Based Spatial-Temporal Graph
Convolutional Networks, which fuses spatial atten-
tion and temporal attention mechanisms with spatial-
temporal convolution to capture dynamic spatial-
temporal features. we use the latest components to en-
sure the fairness of the comparison [Guo et al., 2019].
• MSTGCN: Multi-Component Spatial-Temporal Graph
Convolution Networks, which are ASTGCN(r) that dis-
card the spatial-temporal attention mechanism.
• LSGCN: Long Short-term Graph Convolutional Net-
works, which proposes a new graph attention network
and integrates it with graph convolution into a spatial
gated block [Huang et al., 2020].
• STSGCN: Spatial-Temporal Synchronous Graph Con-
volutional Networks, which enables the model to ef-
ficiently extract localized spatial-temporal correlations
through a well-designed local spatial-temporal subgraph
module [Song et al., 2020].
• AGCRN: Adaptive Graph Convolutional Recurrent Net-
work, which augments traditional graph convolution
with adaptive graph generation and node adaptive pa-
rameter learning, and is integrated into a recurrent neu-
ral network to capture more complex spatial-temporal
correlations [Bai et al., 2020].
• STFGNN: Spatial-Temporal Fusion Graph Neural Net-
works, which designs a new spatial-temporal fusion
graph module and assembles it in parallel with 1D con-
volution module to capture both local and global spatial-
temporal dependencies [Li and Zhu, 2021].
• ASTGNN: Attention based Spatial-Temporal Graph
Neural Network, which proposes a new method for
spatial-temporal modeling of traffic data dynamics, tak-
ing into account the periodicity and spatial heterogeneity
of traffic data [Guo et al., 2021].
• STGODE: Spatial-Temporal Graph Ordinary Differen-
tial Equation Networks, which captures spatial-temporal
dynamics through a tensor-based ordinary differential
equation (ODE) [Fang et al., 2021].
• Z-GCNETs: Time Zigzags at Graph Convolutional Net-
works, which introduces the concept of Zigzag persis-
tence to time-aware graph convolutional networks [Chen
et al., 2021].
• STG-NCDE: Spatial-Temporal Graph Neural Con-
trolled Differential Equation, which designs two NCDEs
for temporal processing and spatial processing and inte-
grates them into a single framework [Choi et al., 2022].
• DSTAGNN: Dynamic Spatial-Temporal Aware Graph
Neural Network, which proposes a new dynamic spatial-
temporal awareness graph to replace the predefined
static graph used by traditional graph convolution [Lan
et al., 2022].
B Best Hyperparameters
Following are the hyperparameter configurations for our three
attention-based spatial-temporal graph convolutional recur-
rent neural networks (i.e., A-ASTGCRN, T-ASTGCRN, I-
STGCRN) to achieve optimal performance on each dataset:
• A-ASTGCRN: In the PEMSD3 dataset, the dataset batch
size is 64, the weight decay coefficient is 0.0009 and
the node embedding dimension is 10; in the PEMSD4
dataset, the dataset batch size is 64, the weight decay
coefficient is 0.0004 and the node embedding dimen-
sion is 4; in the PEMSD7 dataset, the dataset batch size
is 16, the weight decay coefficient is 0.0003 and node
embedding dimension of 10; in the PEMSD8 dataset,
the dataset batch size is 64, the weight decay factor is
0.0001 and the node embedding dimension is 2; in the
PEMSD7(M) dataset, the dataset batch size is 64, the
weight decay factor is 0.0008 and the node embedding
dimension is 10, in the DND-US dataset, the dataset
batch size is 8, the weight decay factor is 0.0001 and
the node embedding dimension is 10.
• T-ASTGCRN: In the PEMSD3 dataset, the dataset batch
size is 64, the weight decay coefficient is 0.0009 and
the node embedding dimension is 10; in the PEMSD4
dataset, the dataset batch size is 64, the weight decay
coefficient is 0.001 and the node embedding dimension
is 10; in the PEMSD7 dataset, the dataset batch size
is 16, the weight decay coefficient is 0.0003 and node
embedding dimension of 10; in the PEMSD8 dataset,
Model
AGCRN
DSTAGNN
STG-NCDE
MAE
104.57
40.83
46.81
37.51
A-ASTGCRN
I-ASTGCRN
35.29
T-ASTGCRN 34.20*
3 week
RMSE MAPE MAE
6 week
RMSE MAPE MAE
12 week
RMSE MAPE
322.01
65.58
75.06
60.77
59.99
55.48*
7.37% 101.26
44.42
6.58%
45.56
6.14%
5.21% 38.17
4.91%*
35.67*
4.93% 40.49
311.41
65.88
72.18
58.62*
61.93
65.20
7.32% 115.46
59.32
7.31%
50.02
5.93%
5.26% 43.70*
4.87%*
46.23
5.40% 48.34
347.93
89.61
83.80
72.16*
80.44
78.87
7.99%
8.72%
6.23%
5.74%*
5.78%
6.09%
Table 8: Forecasting results on DND-US.
the dataset batch size is 64, the weight decay factor is
0.0004 and the node embedding dimension is 2; in the
PEMSD7(M) dataset, the dataset batch size is 64, the
weight decay factor is 0.0004 and the node embedding
dimension is 10, in the DND-US dataset, the dataset
batch size is 8, the weight decay factor is 0.0001 and
the node embedding dimension is 10.
• I-ASTGCRN: In the PEMSD3 dataset, the dataset batch
size is 64, the weight decay coefficient is 0.0005 and the
node embedding dimension is 8; in the PEMSD4 dataset,
the dataset batch size is 64, the weight decay coefficient
is 0.0004 and the node embedding dimension is 4; in the
PEMSD7 dataset, the dataset batch size is 16, the weight
decay coefficient is 0.0005 and node embedding dimen-
sion of 10; in the PEMSD8 dataset, the dataset batch size
is 64, the weight decay factor is 0.001 and the node em-
bedding dimension is 2. in the PEMSD7(M) dataset, the
dataset batch size is 64, the weight decay factor is 0.0004
and the node embedding dimension is 10, in the DND-
US dataset, the dataset batch size is 8, the weight decay
factor is 0.0001 and the node embedding dimension is
10.
The learning rate on all datasets is 0.003, and the number
of convolution kernels K = 2. The GCRN number of layers
is 2, where the number of hidden units per layer in the traffic
datasets is 64, while that in DND-US is 32.
C Prediction Metrics
We use three common metrics to evaluate the performance of
all models: Mean Absolute Error (MAE), Root Mean Square
Error (RMSE), Mean Absolute Percent Error (MAPE). Their
formal definitions are as follows:
T
(cid:88)
MAE( ˆY , Y ) =
|ˆyi − yi|
RMSE( ˆY , Y ) =
1
T
T
(cid:88)
i=1
(ˆyi − yi)2
(15)
MAPE( ˆY , Y ) =
100%
T
T
(cid:88)
i=1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ˆyi − yi
ˆyi
(cid:12)
(cid:12)
(cid:12)
(cid:12)
where ˆY = ˆy1, ˆy2, . . . , ˆyT is the real traffic data, Y =
y1, y2, . . . , yT is the predicted data, and T is the predicted
time step. In our experiments, T = 12.
i=1
1
T
(cid:118)
(cid:117)
(cid:117)
(cid:116)
D Case Study on DND-US
To test the generalizability of our proposed model for differ-
ent spatial-temporal learning tasks, we conduct an additional
experiment on the US natural death dataset DND-US and an-
alyzed the results in detail. We use weekly natural death data
from 01/04/2014 to 12/28/2019 for 53 states or autonomous
states in the United States and divide them into training,
testing, and prediction sets in the ratio of 6:2:2. Both our
model and baseline methods use 12 consecutive time steps
(12 weeks) of data to predict the next 12 consecutive time
steps of data. Table 8 shows the comparative performance of
different methods for predicting week 3, week 6, and week
12, where all our three models outperform the other three
competitive baseline methods.
Accurate prediction of mortality trends and numbers helps
governments to evaluate their impact in advance and design
effective public health policies. Taking node 13 (Illinois) as
an example, Figure 4(a) illustrates the prediction results of
our three models for week 3 (with suffix 3), week 6 (with
suffix 6), and week 12 (with suffix 12). As shown in the fig-
ure, the trends predicted by our models well match the real
numbers. To observe the performance difference between our
model and baseline methods more clearly, we visualize and
compare our representative method T-ASTGCRN with sev-
eral baseline methods. Figures 5(b), 5(c), and 5(d) show their
prediction results for week 3, week 6, and week 12, respec-
tively. It can be seen that our T-ASTGCRN can capture the
main trend of natural death and predict the trend of the data
more accurately. Compared with T-ASTGCRN, the prediction
results of the baseline methods are much different from the
true values and have significant delays in data changes.
E Ablation Experiments
We plot the detailed values of MAE of different horizons for
our methods on the PEMSD3 and PEMSD4 in Figure 6. It
shows that the MAE values of STGCRN become closer to
the three models as the predicted horizon increases. The au-
toregressive feature of the GRU model allows more spatial-
temporal information to be pooled in the later time horizons,
so that long-term prediction appears to be better than short-
term prediction. But the performance of STGCRN lags be-
hind the three attention-based models at all time horizons.
F Hyperparameters Analysis
Figures 7, 8 and 9 show the visualization results of hyper-
parametric experiments for A-STGCRN, I-ASTGCRN and T-
ASTGCRN that we did not report in the main text, respec-
tively.
(a) Forecast results for week 3, week 6, and week 12
(b) Forecast results for week 3 of T-ASTGCRN and baseline methods
(c) Forecast results for week 6 of T-ASTGCRN and baseline
methods
(d) Forecast results for week 12 of T-ASTGCRN and baseline
methods
Figure 5: Visualization of forecast results for node 13 (Illinois) on DND-US
(a) MAE on PEMSD3
(b) RMSE on PEMSD3
(c) MAPE on PEMSD3
(d) MAE on PEMSD4
(e) RMSE on PEMSD4
(f) MAPE on PEMSD4
Figure 6: Prediction performance at each horizon
(a)
of
Effects
weight decay on PEMSD3
(b)
of
Effects
weight decay on PEMSD4
(c)
of
Effects
weight decay on PEMSD7
(d)
of
Effects
weight decay on PEMSD8
(e) Effects of weight decay on
PEMSD7(M)
(f) Effects of node embed-
ding dimension (De) on
PEMSD3
(g) Effects of node embed-
ding dimension (De) on
PEMSD4
(h) Effects of node embed-
ding dimension (De) on
PEMSD7
(i) Effects of node embed-
ding dimension (De) on
PEMSD8
(j) Effects of node embed-
ding dimension (De) on
PEMSD7(M)
Figure 7: Hyperparameter experiments of A-ASTGCRN
(a)
of
Effects
weight decay on PEMSD3
(b)
of
Effects
weight decay on PEMSD4
(c)
of
Effects
weight decay on PEMSD7
(d)
of
Effects
weight decay on PEMSD8
(e) Effects of weight decay on
PEMSD7(M)
(f) Effects of node embed-
ding dimension (De) on
PEMSD3
(g) Effects of node embed-
ding dimension (De) on
PEMSD4
(h) Effects of node embed-
ding dimension (De) on
PEMSD7
(i) Effects of node embed-
ding dimension (De) on
PEMSD8
(j) Effects of node embed-
ding dimension (De) on
PEMSD7(M)
Figure 8: Hyperparameter experiments of I-ASTGCRN
(a) Effects of weight decay on
PEMSD3
(b) Effects of weight decay on
PEMSD4
(c) Effects of weight decay on
PEMSD7
(d) Effects of weight decay on
PEMSD8
(e) Effects of node embedding di-
mension (De) on PEMSD3
(f) Effects of node embedding di-
mension (De) on PEMSD4
(g) Effects of node embedding di-
mension (De) on PEMSD7
(h) Effects of node embedding di-
mension (De) on PEMSD8
Figure 9: Hyperparameter experiments of T-ASTGCRN
|
|
http://arxiv.org/abs/2302.12972v1 | 2023-02-25T03:33:26 | 2023-02-25T03:33:26 | A Preliminary Study on Pattern Reconstruction for Optimal Storage of
Wearable Sensor Data | Efficient querying and retrieval of healthcare data is posing a critical
challenge today with numerous connected devices continuously generating
petabytes of images, text, and internet of things (IoT) sensor data. One
approach to efficiently store the healthcare data is to extract the relevant
and representative features and store only those features instead of the
continuous streaming data. However, it raises a question as to the amount of
information content we can retain from the data and if we can reconstruct the
pseudo-original data when needed. By facilitating relevant and representative
feature extraction, storage and reconstruction of near original pattern, we aim
to address some of the challenges faced by the explosion of the streaming data.
We present a preliminary study, where we explored multiple autoencoders for
concise feature extraction and reconstruction for human activity recognition
(HAR) sensor data. Our Multi-Layer Perceptron (MLP) deep autoencoder achieved a
storage reduction of 90.18% compared to the three other implemented
autoencoders namely convolutional autoencoder, Long-Short Term Memory (LSTM)
autoencoder, and convolutional LSTM autoencoder which achieved storage
reductions of 11.18%, 49.99%, and 72.35% respectively. Encoded features from
the autoencoders have smaller size and dimensions which help to reduce the
storage space. For higher dimensions of the representation, storage reduction
was low. But retention of relevant information was high, which was validated by
classification performed on the reconstructed data. | [
"Sazia Mahfuz",
"Farhana Zulkernine"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12972v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12972v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | 3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
2
7
9
2
1
.
2
0
3
2
:
v
i
X
r
a
A Preliminary Study on Pattern Reconstruction for
Optimal Storage of Wearable Sensor Data
Sazia Mahfuz and Farhana Zulkernine
School of Computing
Queen's University
Kingston, ON K7L2N8, Canada
{sazia.mahfuz, farhana.zulkernine}@queensu.ca
Abstract
Efficient querying and retrieval of healthcare data is posing a critical challenge
today with numerous connected devices continuously generating petabytes of im-
ages, text, and internet of things (IoT) sensor data. One approach to efficiently
store the healthcare data is to extract the relevant and representative features and
store only those features instead of the continuous streaming data. However, it
raises a question as to the amount of information content we can retain from the
data and if we can reconstruct the pseudo-original data when needed. By facil-
itating relevant and representative feature extraction, storage and reconstruction
of near original pattern, we aim to address some of the challenges faced by the
explosion of the streaming data. We present a preliminary study, where we ex-
plored multiple autoencoders for concise feature extraction and reconstruction for
human activity recognition (HAR) sensor data. Our Multi-Layer Perceptron (MLP)
deep autoencoder achieved a storage reduction of 90.18% compared to the three
other implemented autoencoders namely convolutional autoencoder, Long-Short
Term Memory (LSTM) autoencoder, and convolutional LSTM autoencoder which
achieved storage reductions of 11.18%, 49.99%, and 72.35% respectively. Encoded
features from the autoencoders have smaller size and dimensions which help to
reduce the storage space. For higher dimensions of the representation, storage
reduction was low. But retention of relevant information was high, which was
validated by classification performed on the reconstructed data.
1
Introduction
Streaming data is growing exponentially. Forbes reports that, by 2025, the quantity of data will
double every 12 hours [5]. Also in one of their recent reports they stated that "RBC Capital Market
projects that: by 2025, the compound annual growth rate of data for healthcare will reach 36%" [4].
A high portion of the healthcare streaming data comes from the internet of things (IoT) i.e., numerous
connected devices on the Internet. This explosion in IoT data has presented a critical challenge in
effective data storage and management for query, analysis, and decision support [7, 11, 12].
Especially during the COVID peiod, tele-health, contact tracing, outbreak tracking, virus testing,
remote work, and medical research have resulted in an explosion of healthcare data which has
exceeded all previous estimates about growth of data [4]. Declining cost of storage allowed businesses
and general users to store all the data. However, the exponential growth in healthcare data and the
large volume of stored data is posing challenges in managing, retrieving, linking and extracting usable
knowledge from the data for efficient decision support.
The above challenges motivated us to explore effective means of knowledge representation. In this
paper, we propose a method that can allow storage reduction while retaining useful information for
Preprint. Under review.
decision support, specifically for performing a classification task. Specifically, we address three
research questions, a) how can the characteristic features can be extracted from streaming data using
machine learning models, b) how can the extracted representative features be stored for reducing
storage, and c) how can a pseudo-original representation be reconstructed from the stored concise
representative features for decision support such as performing a simple classification task?
We trained multiple autoencoder models to learn important data features while minimizing recon-
struction loss. We validate our approach for Human Activity Recognition (HAR) use case scenario
using streaming IoT data [1].
1.1 Contributions
The contributions of this research work are as follows:
• Storage reduction using the concise representative features instead of he whole incoming
data.
• Validation of the usability of the stored concise data by reconstructing a pseudo-original
data from the stored representative features and applying it to a classification task instead of
the original data.
1.2 Organization of the Paper
The paper is organized into the following sections. Section 2 discusses the related work for storage
reduction of IoT data as well as time-series data reconstruction using autoencoders. Section 3 presents
the description, results, and discussion of the performed experiments. Section 4 discusses the validity
threats for this research work. Finally, section 5 discusses the final thoughts and conclusion of the
research work.
2 Related Work
Rani et al. [9] discussed the different storage optimization techniques for IoT data [9]. Moreover,
according to Correa et al. [3], lossy Data Compression (DC) techniques can be better alternatives to
the lossless ones as they are computationally less complex as well as provide a better compression
ratio. In their paper, they discussed a category of lossy compression techniques which was based on
the machine learning models using artificial neural network (ANN) architectures. For our research
work, we focus only on this category as there is an increasing use of ANNs in IoT scenarios to
implement smart devices, paving a way to fulfilling the concept of smart cities.
2.1 Autoencoders
Reconstructing and generating of text, image, and other types of data has come a long way since
its advent due to the progress and widespread application of deep learning using ANNs. Just by
itself, the area of image reconstruction in generating high-quality images from corrupted, noisy, or
low-quality images has opened the door to a whole myriad of applications. Though the training of
the deep learning models requires a large amount of data, now we are also living in an era of big data
where data is available in abundance. We focus on autoencoders for the reconstruction of IoT data for
their increasing and versatile use in reconstructing and generating other types of data like image.
We focus on autoencoders - a well-known type of ANN for unsupervised learning - to reconstruct
IoT data. Autoencoders are considered to be popular in the area of data reconstruction and data
generation for different types of data such as images. We base our work on four specific types of
autoencoders, namely Multi-layer perceptron (MLP) deep autoencoder, convolutional autonencoder,
Long-short term memory (LSTM), and convolutional LSTM autoencoder. The justification behind
using MLP deep autoencoder is its simple architecture compared to the other models. The remaining
autoencoders have been chosen based on their application on time-series data.
Sagheer and Kotb [10] and Nguyen et al. [8] [10, 8] showed that LSTM autoencoder works better in
modeling time-series data. Again in the work of Zhang et al. [13], they used multi-scale (resolution)
signature matrices to characterize multiple levels of the system statuses in different time steps for their
time-series data. Given the signature matrices, a convolutional encoder was employed to encode the
2
Table 1: Details of UCI HAR dataset
No.
jects
30
of Sub-
Age Range
No. of Activi-
ties
No. of Sam-
ples
19-48
6
10299
time series correlations and an attention based Convolutional Long-Short Term Memory (ConvLSTM)
network was developed to capture the temporal patterns. Finally, based upon the feature maps which
encode the time-series correlations and temporal information, a convolutional decoder was used to
reconstruct the input signature matrices and the residual signature matrices were further utilized to
detect and diagnose anomalies. This approach was validated using synthetic dataset and real power
plant dataset.
3
Implementation
We have saved the concise representation from the encoder part of a trained autoencoder. Four
models implemented for the reconstruction component are MLP deep autoencoder, convolutional
autoencoder, LSTM autoencoder, and convolutional LSTM autoencoder.
The experiments have been run on Google Colab using GPU hardware accelerator in runtime. The
dataset used has been UCI HAR data [1]. We choose this dataset because of its simplicity and
widespread use [6? , 2]. The UCI HAR dataset contains 6 activity classes (WALKING, WALK-
ING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING). 30 volunteers
have performed the six activities wearing a smartphone (Samsung Galaxy S II) on the waist. Using
the smartphone's embedded accelerometer and gyroscope, 3-axial linear acceleration and 3-axial
angular velocity at a constant rate of 50Hz had been captured. Pre-processing has been done by
applying noise filters on the accelerometer and gyroscope signals. Then they have been sampled in
fixed-width sliding windows of 2.56 sec and 50% overlap (128 readings/window). Details of the
dataset characteristics are shown in Table 1.
3.1 Validation
The validation is done based on the classification accuracy for the reconstructed data using the
convolutional LSTM classifier. We choose convolutional LSTM classifier for our validation as
this model has proved to be effective in classifying time-series data [13].The storage reduction in
percentage is considered to determine the useability of the approach for the optimum storage of the
wearable sensor data.
The convolutional LSTM classifier consists of 9 layers in the following order: TimeDis-
tributed(conv1D (64)) -> TimeDistributed (conv1D (64)) -> DropOut (0.5) -> MaxPooling1D ->
Flatten -> LSTM (100) -> DropOut (0.6) -> Dense (100) -> Dense (6).
All of the conv1D and Dense layers have ReLU as the activation function except for the last Dense
layer, which has SoftMax activation function. The learning rate is set to 0.00001. Categorical
cross-entropy is used as the loss function, and the batch size is set to 16. The classifier achieves a
training accuracy of 96.16% after 150 epochs.
3.2 Experimentation
We run the experiments as follows: The deep autoencoders have, first, been trained on the same
training data as the convolutional LSTM classifier. The concise representations have, then, been saved
from the encoder layers of the deep autoencoders. The saved representations have, next, been loaded
from the storage and reconstructed using the decoder parts of the autoencoders. The reconstructed
representations have, finally, been fed into the convolutional LSTM classifier.
• Experiment 1: The first experiment is performed with a simple MLP deep autoencoder.
Even though its architecture is simple, it has achieved reasonable results in comparison
to the other models. The MLP encoder has 5 layers consisting of 512, 256, 128, 64, 32
3
neurons, respectively. The MLP decoder has 5 layers consisting of 64, 128, 256, 512, 1152
neurons, respectively. All layers use Rectified Linear Unit (ReLU) as the activation function
except for the last layer in the decoder which, uses Sigmoid activation function. For this
experiment, the dataset has been normalized to the range between 0 and 1. The dataset has
also been modified such that the sliding windows have been flattened.
The default learning rate of ADAM optimizer is 0.001. MSE is used as the loss function,
and the batch size is set to 128. Fixed validation data has been used. The recorded validation
loss is 0.0038 for 20 epochs.
• Experiment 2: The second experiment is performed with a convolutional deep autoencoder.
The convolutional encoder consists of 6 layers in the following order: conv2D (16) ->
MaxPooling2D -> conv2D (32) -> MaxPooling2D -> conv2D (64).
The decoder consists of 7 layers in the following order: conv2D (64) -> UpSampling2D ->
conv2D (32) -> UpSampling2D -> conv2D (16) -> conv2D (1). The activation function of
all of the layers is ReLU except for the last layer in the decoder, which uses linear activation
function.
We use the default learning rate of ADAM optimizer, which is 0.001. MSE is used as the
loss function, and the batch size is set to 16. Fixed validation data has been used. This
setting has recorded a validation loss of 0.0024 after 150 epochs.
• Experiment 3: The third experiment is performed with a LSTM deep autoencoder. Figure
1 shows the information flow between the LSTM autoencoder and the classifier.
Figure 1: LSTM autoencoder
The activation function for all layers is ReLU, except for the last layer of the decoder, which
uses linear activation function.
The learning rate is set to 0.0001. Clip value is set to 0.5. For the Adam optimizer, if the
clip value is not set, then a problem of exploding gradient appears, resulting in NaN values
for the reconstruction loss. When the clip value is set to 0.5, that means the gradient value is
also set to 0.5 for the cases where a gradient value is less than -0.5, or more than 0.5. MSE
is used as the loss function. The reconstruction loss is 0.0221 after 300 epochs.
• Experiment 4: The fourth experiment is performed with a convolutional LSTM deep au-
toencoder. The encoder consists of 5 layers in the following order: TimeDistributed (conv1D
(64)) -> TimeDistributed (conv1D (64)) -> MaxPooling1D -> Flatten -> LSTM (100).
The decoder consists of 8 layers in the following order: RepeatVector (4) -> LSTM (100) ->
RepeatVector (4) -> Reshape -> TimeDistributed (conv1D (64)) -> TimeDistributed (conv1D
(64)) -> TimeDistributed (conv1D (1)) -> TimeDistributed(Dense(9)). The activation func-
tion that is used by all of the conv1D and LSTM layers is ReLU, except for the last two
layers in the decoder, which uses linear activation functions.
The default learning rate of ADAM optimizer that has been used is 0.001. Decay in the
learning rate is set to 0.000001. MSE is used as the loss function, and the batch size is set to
16. The training/validation split ratio that has been used is 0.8/0.2. The validation loss is
0.0593 after 100 epochs.
4
Table 2: Storage Reduction for the UCI HAR data
Dataset: UCI HAR data
Reconstruction
Loss (MSE)
Accuracy (%) on
the classifier
Exp. 1: MLP deep autoencoder
Exp. 2: Convolutional deep autoen-
coder
Exp. 3: LSTM autoencoder
Exp. 4: Convolutional LSTM au-
toencoder
0.0038
0.0024
0.0221
0.0593
24
95.28
52.01
46.12
Storage
Reduction
(%)
90.18
11.18
49.99
72.35
Results The storage space is calculated using the st_size attribute from the Python function os.stat().
The attribute returns the file size in Bytes. So it was divided by 1e+6 to determine the storage space
in MB.
The results for the four experiments for the representation and the reconstruction components are
discussed below. For all of the experiments, the storage size for the training data is 67.75MB.
• Experiment 1: The saved representation storage size is reduced to 1.84MB.
• Experiment 2: The saved representation storage size is reduced to 60.228MB.
• Experiment 3: The saved representation storage size is reduced to 33.88MB.
• Experiment 4: The saved representation storage size is reduced to 18.738MB.
Table 2 shows the results of the comparison of the storage reduction achieved for the different
experiments.
3.3 Discussion
When the concise representation is taken from the encoder part of an autoencoder, it provides the
option for reconstructing a pseudo-original data which is comparable to the original data. The classi-
fication performance of the reconstructed pseudo-original data depends on the size and dimension of
the concise representation. For higher dimensions of the concise representation, the classification
performance is higher as it has been demonstrated for convolutional autoencoder. The storage reduc-
tion for this specific case wasn't as good as the other options though. But if a good balance is found
for the storage reduction, then this approach is better for meeting the requirements of both storage
reduction and reconstruction of the pseudo-original data.
4 Threats to Validity
The approach has not been validated for real life streaming data yet. This work does not consider
the issue of concept drift for the streaming data either. No ablation study has been done on the
implemented models.
5 Conclusion
Healthcare data is constantly growing, even more so in the recent years with the rise in remote health
monitoring systems and the connected wearable sensor data. If efficient storage reduction techniques
for the streaming data are not adopted, then response time to the remote health monitoring systems
will eventually become slower. Our approach to storing the representative concise features rather than
the whole incoming data provides a prospect to overcome the challenges raised by the growing need
of the fast response time for the remote healthcare monitoring systems. Through our empirical study
of the pattern reconstruction, we have found that the efficacy of the concise representation depended
on the dimension and size of the representation. Further exploration and experimentation is needed to
verify the preliminary findings found in this research work.
5
References
[1] D. Anguita, Alessandro Ghio, L. Oneto, Xavier Parra, and Jorge Luis Reyes-Ortiz. A public
domain dataset for human activity recognition using smartphones. In ESANN, 2013.
[2] Hongkai Chen, Sazia Mahfuz, and Farhana Zulkernine. Smart phone based human activity
recognition. In Proceedings of the 2019 IEEE international conference on bioinformatics and
biomedicine, pages 2525–2532, 2019. ISBN 78-1-7281-1867-3/19.
[3] Juan David Arias Correa, Alex Sandro Roschildt Pinto, and Carlos Montez. Lossy data
compression for iot sensors: A review. Internet of Things, 19:100516, 2022. ISSN 2542-6605.
doi: https://doi.org/10.1016/j.iot.2022.100516. URL https://www.sciencedirect.com/
science/article/pii/S2542660522000208.
[4] Nick Culbertson. The skyrocketing volume of healthcare data makes privacy imperative,
URL https://www.forbes.com/sites/forbestechcouncil/2021/08/06/
2021.
the-skyrocketing-volume-of-healthcare-data-makes-privacy-imperative/
?sh=68010f156555. Retrieved on September, 2022.
[5] Barry Libert and Megan Beck.
plosion, 2019.
leaders-need-ai-to-keep-pace-with-data/. Retrieved on July 04, 2019.
to keep pace with the data ex-
URL https://www.forbes.com/sites/barrylibert/2019/03/26/
Leaders need ai
[6] Sazia Mahfuz, Haruna Isah, Farhana H. Zulkernine, and Peter Nicholls. Detecting irregular
patterns in iot streaming data for fall detection. 2018 IEEE 9th Annual Information Technology,
Electronics and Mobile Communication Conference (IEMCON), pages 588–594, 2018.
[7] Stacey McDaniel. What(cid:48)s behind the iot data explosion?, 2019. URL https://www.talend.
com/resources/iot-data/. Retrieved on July 03, 2019.
[8] H.D. Nguyen, K.P. Tran, S. Thomassey, and M. Hamad. Forecasting and anomaly de-
tection approaches using lstm and lstm autoencoder techniques with the applications in
supply chain management. International Journal of Information Management, 57:102282,
2021. ISSN 0268-4012. doi: https://doi.org/10.1016/j.ijinfomgt.2020.102282. URL https:
//www.sciencedirect.com/science/article/pii/S026840122031481X.
[9] Ridhima Rani, Meenu Khurana, Deepika Sharma, and Aditi Moudgil. Comparative study
In 2021 International
on various storage optimization techniques in iot-cloud ecosystem.
Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE),
pages 659–663, 2021. doi: 10.1109/ICACITE51222.2021.9404625.
[10] Alaa Sagheer and Mostafa Kotb. Unsupervised pre-training of a deep lstm-based stacked
autoencoder for multivariate time series forecasting problems. Scientific Reports, 9:19038, 12
2019. doi: 10.1038/s41598-019-55320-6.
[11] Priceonomics Data
iot
Studio.
The
iot
data market?,
the
the-iot-data-explosion-how-big-is-the-iot-data/.
2019.
2019.
data
URL
is
explosion:
https://priceonomics.com/
Retrieved on July 03,
How big
[12] Charles Towers-Clark.
iot and ai, part one: Three sides of the same
coin, 2019. URL https://www.forbes.com/sites/charlestowersclark/2019/02/
15/big-data-iot-and-ai-part-one-three-sides-of-the-same-coin/. Retrieved
on July 04, 2019.
Big data,
[13] Chuxu Zhang, Dongjin Song, Yuncong Chen, Xinyang Feng, Cristian Lumezanu, Wei
Cheng, Jingchao Ni, Bo Zong, Haifeng Chen, and Nitesh Chawla. A deep neural network
for unsupervised anomaly detection and diagnosis in multivariate time series data. Pro-
ceedings of the AAAI Conference on Artificial Intelligence, 33:1409–1416, 07 2019. doi:
10.1609/aaai.v33i01.33011409.
6
|
|
http://arxiv.org/abs/2302.14056v1 | 2023-02-25T03:03:53 | 2023-02-25T03:03:53 | Online Sparse Streaming Feature Selection Using Adapted Classification | Traditional feature selections need to know the feature space before
learning, and online streaming feature selection (OSFS) is proposed to process
streaming features on the fly. Existing methods divide features into relevance
or irrelevance without missing data, and deleting irrelevant features may lead
to in-formation loss. Motivated by this, we focus on completing the streaming
feature matrix and division of feature correlation and propose online sparse
streaming feature selection based on adapted classification (OS2FS-AC). This
study uses Latent Factor Analysis (LFA) to pre-estimate missed data. Besides,
we use the adaptive method to obtain the threshold, divide the features into
strongly relevant, weakly relevant, and irrelevant features, and then divide
weak relevance with more information. Experimental results on ten real-world
data sets demonstrate that OS2FS-AC performs better than state-of-the-art
algo-rithms. | [
"RuiYang Xu",
"Di Wu",
"Xin Luo"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.14056v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.14056v1",
"@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"
] | Online Sparse Streaming Feature Selection Using
Adapted Classification
RuiYang Xu, Di Wu, Member, IEEE, Xin Luo, Senior Member, IEEE,
1
1Abstract-Traditional feature selections need to know the fea-
ture space before learning, and online streaming feature selec-
tion (OSFS) is proposed to process streaming features on the fly.
Existing methods divide features into relevance or irrelevance
without missing data, and deleting irrelevant features may lead
to information loss. Motivated by this, we focus on completing
the streaming feature matrix and division of feature correlation
and propose online sparse streaming feature selection based on
adapted classification (OS2FS-AC). This study uses Latent Fac-
tor Analysis (LFA) to pre-estimate missed data. Besides, we use
the adaptive method to obtain the threshold, divide the features
into strongly relevant, weakly relevant, and irrelevant features,
and then divide weak relevance with more information. Exper-
imental results on ten real-world data sets demonstrate that
OS2FS-AC performs better than state-of-the-art algorithms.
Keywords-Online feature selection, sparse streaming feature,
latent factor analysis, three-way decision.
I. INTRODUCTION
W
ITH the rapid development of information technology,
the degree of interaction between data is gradually
increasing [58], which increases data volume, fast growth
rate, and diverse structure, resulting in the characteristics of
multi-level, multi-granularity, multi-modality, and heteroge-
neity. Accordingly, artificial intelligence, communication,
and storage technology are facing challenges [1]-[4]. For
high-dimensional data, how to select appropriate features
receive wide attention [5], [6].
Traditional feature selection methods focus on the filter [7]
[8], wrapper [9], and embedded [10] [11], in which feature
space is predefined or known. However, the feature space
cannot predict in advance and may grow or even be infinite
on the fly [12]-[14]. Therefore, many methods are proposed
to deal with deals with streaming feature in an online man-
ner. Two typical methods of streaming feature selection are
OSFS [15] and SAOLA [16]. OSFS selects the weak rele-
vance but non-redundancy and strong relevance features and
contains two significant parts: online correlation analysis
and online redundancy analysis. SAOLA considers the pair-
wise relationship of features calculated by mutual infor-
mation in high-dimensional data. Therefore, many scholars
proposed selected features methods applied to streaming
features. However, existing streaming feature selection
methods are applied in streaming features without miss data,
and they may perform badly for sparse streaming features.
In practical applications, there are missing values in large-
scale data. With the increase in data characteristics, some
data cannot be collected, and the probability of missing data
R. Xu is with School of Computer Science and Technology, Chongqing
University of Posts and Telecommunications, Chongqing, 400065, China (e-
mail: [email protected]).
D. Wu and X. Luo are with the College of Computer and Information
Science, Southwest University, Chongqing 400715, China (e-mail:
[email protected]; [email protected]).
will increase. In bioinformatics, because of the limitation of
cell sequencing technology, it is difficult to analyze the
measured values of genes and cells when they reach a spe-
cific value [17]. ICU patient data is missing due to human
factors and equipment failure [18]. In addition, data storage
and conversion will also cause data loss [19]-[20]. Motivated
by this, many scholars put forward the method of sparse
matrix completion [21]-[26]. Wu et al. [27] proposed an
online feature selection algorithm to complete the sparse
matrix, named LOSSA. This method completes the sparse
matrix, but there is always some error between the complet-
ed matrix and the actual value, which will reduce the accura-
cy of the feature selection. It is necessary to process the
completed data to minimize the influence of errors on fea-
ture selection [28]-[31].
Existing approaches to online correlation analysis focus
on removing irrelevant features and cannot classify features
into weak relevance. Weak relevance is misclassified as an
irrelevance and can not be recovered after deletion. Com-
plete matrices with errors are more likely to be misclassified,
and the accuracy of the LOSSA algorithm will be reduced.
Inspired by the philosophy of three-way decision (3WD)
[32], we can divide features into tri-partitions: selecting,
discarding, and delaying. Weakly relevant features are di-
vided into delayed decisions and waiting for more infor-
mation.
Aiming to solve the above problems, we propose online
sparse streaming feature selection via adapted classification
(OS2FS-AC), shown as Figure 1. We focus on selecting the
weak relevance but non-redundancy and strong relevance
features from sparse streaming data. Combined with the la-
tent factor analysis (LFA) model, estimating the miss data.
And then, based on the central idea of 'thinking in three,' the
OS2FS-AC automatically updates the values of and to
develop online correlation analysis. We summarize our main
contributions can be summarized as follows:
a) The state-of-the-art competing online streaming feature
selection algorithms usually use conventional methods such
as zero-filling or average-filling when dealing with missing
data. A significant gap between the completed data and the
actual value affects the feature selection result. We use the
LFA model to complete missing data to reduce the error.
b) In the correlation analysis, the correlation near the signifi-
cance level may be misclassified, and the features will be
discarded directly and cannot be used and selected again.
To solve this problem, we require the three-way decision to
put the weakly relevant features into the boundary region,
waiting for sufficient conditions.
c) We handle the self-adaption strategy to update the correla-
tion threshold automatically. The thresholds dynamically
divided the features into strong relevance, weak relevance,
and irrelevance, improving correlation division accuracy.
d) To investigate the effectiveness between OS2FS-AC and six
existing OSFS methods, we conduct experimental compari-
sons on 14 real-world microarray data sets. The experi-
mental results indicate our new method performs better on
predictive accuracy.
2
The existing online correlation analysis can only be divid-
ed into irrelevance and relevance (including strong and weak
relevance). Still, it cannot distinguish between strong and
weak relevance. Considering the correlation of features, we
use the Markov blanket for redundancy analysis, which is
given as follows:
Definition 3 (Markov blanket [15]): Supposed X
M C , satis-
(
X
fy:
is a Markov blanket for C , namely
F
)
(1)
We can remove redundant features of strong and weak
D F X P C X D
,
P C X
,
.
relevance using the Markov blanket.
B. Three-way decision (3WD)
In this paper, we adopt the three-way decision(3WD) to
analyze the relevance of features, so taking a brief introduc-
tion to the 3WD. The core idea of 3WD is 'thinking in
three,' that is, dividing a set into three regions.
,
{
POS BND NEG
}
Definition 4 (Three-way decision [32]): Given a finite
non-empty set W , which can be divided into tri-partitions
, satisfies the following conditions:
a)
b)
POS BND
POS NEG
.
POS BND NEG W
These three regions can be totally ordered or partially or-
dered. It is possible to use one evaluation, two evaluation, or
three evaluation models to construct the tri-partitions.
,
BND NEG
;
,
,
:
e W
Definition 5 (Three-way Classification [32]): Assume that
an evaluation
,
( )e x denotes
the evaluation value of x . Let a pair of thresholds (
)
,
R , with ) divide three regions according to
(
the following rules:
R on W , where
(
)
,
Fig.1. Flowchart of OS2FS-AC to achieve OS2FS.
POS
( ,
]
( )
e
II. PRELIMINARIES
A. Online Streaming Feature Selection
Given streaming features set
F
F F
{ ,
1
2
,
,
F
t
}
, at
timestamp (
t t
{1, 2,
,
})t
, features
F
t
[
f
1,
t
,
f
2,
t
,
,
f
,
N t
]T
with N instance. The point is to choose the weak relevance
but non-redundancy and strong relevance features on the fly.
We first define conditional independence as follows.
Definition 1 (Conditional independence [15]): Assuming
,
}t
F , t
,
, satisfy:
t l
,
two distinct features
conditionally independent on a subset S
F
lF F
,t
l ,
{1, 2,
P F F S
t
(
,
l
)
P F S
t
(
)
or
P F F S
t
(
,
l
)
P F S
l
(
)
.
In terms of conditional independence, we define strongly
relevant, weakly relevant, and irrelevant features of class
attribute
as follows:
,
]T
C c c
[
2
c
,
,
N
1
Definition 2 (Strongly Relevant, Weakly Relevant, and Ir-
relevant Feature, OSFS [15]): At time stamp t , the inflow
of a feature
tF .
tF is strongly relevant to C , if
).
,
P C S
(
)
F
S
F
{ }t
tF is weakly relevant to C , if
).
,
P C S
(
)
F
S
F
{ }t
c) A feature
P C S F
t
,
tF is irrelevant to C , if
P C S
.
F
S
t
F
s.t.
a) A feature
s.t.
P C S F
t
(
b) A feature
s.t.
P C S F
t
(
x W e x
;
BND
(
,
)
( )
e
x W
e x
NEG
[
, )
( )
e
x W e x
;
.
,
,
where
POS BND NEG represent positive, boundary, and
negative region. 3WD applies different strategies depending
on the characteristics of the three regions to improve deci-
sion-making effectiveness.
III. PROPOSED ALGORITHM
A. Problem of OS2FS-AC
t
t
F
' ,
2
,
' }
1 |
the
F
loss
t N
| /
, where the known values of
Missing data of F is sparse streaming
rate of
,
F F
' { ' ,
1
features
'tF
is
t ,
denotes the cardinality of the set, represents the total loss
rate of
'tF with
'F . At time stamp t , we get a new feature
miss data. The challenge of streaming feature selection is to
, so OS2FS-AC
POS
select a minimum subset
aims to minimize the decision cost of selected features.
'tF is
F
{ ' }
t
1
t
For developing the sparse streaming features selection,
three main difficulties need to be overcome: (1) how to use
the LFA model to complete a sparse feature matrix with min-
imum error; (2) how to make an adaptive correlation analy-
sis with the three-way decision; (3) how to analyze the re-
dundancy of different related attributes.
In this article, we adopt Fisher's Z-test to calculate corre-
lation between continuous features for completed streaming
feature matrix U . Given a feature subset S , the independ-
tF and Y can be computed as fol-
ence between features
lows:
1
1
F Y
t
F F
t
t
F YS
t
F YS
t
F YS
t
YY
Σ
Σ
(2)
P F Y S
,
t
Σ
1
Under the null hypothesis of the conditional independ-
ence between C and
returned by Fish-
er's Z-test to measure conditional independence and a signif-
icance level, judges the correlation of a feature, dividing
tF into relevance or irrelevance. If
, feature
features
tF is divided into the relevant feature set ; on the contrary,
if , then feature
tF is divided into irrelevant feature
set .
tF , with
value
B. OS2FS-AC
To make OS2FS-AC as flexible as possible to improve ex-
isting OSFS algorithms to handle OS2FS, we design its pro-
cessing flow, as shown in Fig. 1. OS2FS-AC has three phas-
es. Phase I pre-processes sparse streaming features to com-
plete their missing data. Phase II performs online correlation
analysis. Next, Phase III performs online redundancy analy-
sis.
1) Phase I Complete streaming feature matrix
With the continuous inflow of streaming features, a buffer
is a temporarily stored feature. After the feature dimension
reaches a specific value, the missing data in the buffer will
t L , supposing
be completed. From time stamp t to
N LU
buffer , denoted by
sparse streaming feature flow in
, where N represents the sam-
U
,
ple size, and the column number is L . Use LFA [33]-[39]
model to supplement the miss data of
buffer relying
on the known data.
F F
{ ' ,
t
N LU
'
1
t L
F
1
}
'
t
1
,
denote as
Definition 6 (LFA [40], [41]). The known data in sparse
U , and the rank-h approximation
matrix W ZU
T
U PQ
for U is estimated depending on the U ; that is,
the predicted missing value of two latent factor matrices
W hP and
Z hQ is obtained by training, and h is the latent
factor dimension;
W Z
|,|
LFA model tries to build a low-rank approximation
min{|
|}
h
.
,
1
'
t
}
F
,
'
t L
1
F F
{ ' ,
t
to a sparse streaming feature
U
matrix U . Commonly, to obtain matrix P and Q from
U , the minimum loss function is constructed by Euclidean
distance between U and U ; we have
(
P Q
,
)
1
2
f
n j
,
U
f
n j
,
h
k
1
p q
k
n,
j k
,
2
L
,
(3)
where
f is the known value,
,n j
U
,n kp
is the n -th row
and k -th column of P , and
,j kq is the j -th row and k -th
t L
,
n
,
1}
N
1,
1, 2,
,
,
j
t t
{ ,
. L is a regularization scheme to avoid
column of Q ,
h
1, 2,
k
,
3
overfitting. The
2L scheme is used to improve the generali-
zation ability [42]-[46], and the calculation formula is formu-
lated by:
L
(
2
P
2
F
Q
2
F
),
(4)
where
F
computes the Frobenius norm, is the Hadmard
product, and denotes the regularization parameter.
Based on formula (3) and (4), predict the miss data acord-
ing to the known value is given by:
f
n j
,
U
1
2
f
n j
,
h
k
1
p q
k
n,
j k
,
2
2
h
k
1
2
p
n k
,
h
k
1
q
2
j k
,
2
(5)
The loss function of the n -th element
f
,'n j
of
' jF :
2
h
h
h
k
f
1
j k
,
n j
,
n j
,
1
2
p q
n k
,
2
We use stochastic gradient descent (SGD) to solve the
loss function [47]-[50], calculate the gradient of the loss
function to the sum of parameters, and update it in the nega-
. The for-
tive gradient direction of parameters
and
(6)
2
p
n k
,
2
j k
,
q
1
1
.
k
k
,n kp
,j kq
mula of
,n kp
and
,j kq
:
n k
,
n k
,
p
p
q
q
j k
,
j k
,
n j
,
u
n k
,
n j
,
u
n k
,
(7)
.
In terms of formulas (6) and (7), the partial derivative of
the loss function is obtained:
p
,
n k
p
,
n k
q
,
j k
f
,
n j
h
k
1
p q
,
n k
,
j k
p
,
n k
(8)
h
,
n j
k
f
1
,
j k
,
j k
,
n k
q
p
q
p q
,
n k
q
,
j k
where is the learning rate, and two late factor matrices P
and Q are trained with the estimation of the minimum errors
on the known value, then
T
U PQ
. To make the formula
(8) more concise, the error between the predicted value and
,
j k
.
the actual value is recorded as
err
,
n j
f
,
n j
h
k
1
p q
,
m k
,
j k
,
that is,
p
n k
,
p
n k
,
q err
,
j k
p err
n k
,
n j
,
n j
,
p
n k
,
q
, .
j k
(9)
q
j k
,
q
j k
,
2) Phase II Online correlation analysis
Pa and
Most of the existing correlation analysis methods use two-
way decision(2WD);
Ea represent two actions of
acceptance and rejection, which needs to analyze the feature
relevance immediately. However, the fluctuation of feature
relevance near the threshold will lead to misclassifica-
tion. Three-way decision moves the misclassified samples in
2WD to the boundary region as much as possible and waits
for the information to further process the features of the
boundary region. Compared with relevant feature and irrele-
vant feature, we use a new option to effectively improve the
accuracy of feature selection. Action Ba is a delayed deci-
(
re-divides feature
sion, so the action set
into strong relevance, weak relevance, or irrelevance. The
A a a a
,
P
E
)
,
B
(
B
,
,
,
,
r
PP
r
EP
)
A a a a
,
describes the problem of feature
action set
E
P
] is
relevance partition, and the relevance feature set [
divided into three partitions. Different divisions will cause
the corresponding cost in this process, and
de-
r
BP
a a a ,
,
notes the costs incurred for applying strategies
P
B
respectively, when a feature belongs to the relevant feature
set . Analogously,
denotes the costs incurred
,
r
EE
a a a , respectively, when a fea-
,
for applying strategies
P
ture belongs to the irrelevant feature set . We assume
misclassification costs are more than the correct classifica-
tion, that is, PP
and EE
matrix is shown in the Table I.
[51]. The cost
r
PE
r
BE
r
EP
r
BP
r
BE
r
PE
r
r
,
,
B
E
E
,
Action
pa
Ba
Ea
TABLE I COST MATRIX.
Cost Function
PPr
BPr
EPr
PEr
BEr
EEr
The relevance between feature
Dep
F
( ,
)t
class attribute C is
, and the irrelevance between feature
F
(
Dep
)t
,
tF and class attribute C is
tF and
. Accordingly, the expected
a a a be com-
P
E
,
,
B
cost associated with applying strategies
puted by:
(
(
R a F
|
P
t
R a F
|
B
t
R a F
t
R a
(
E
| [
)
)
)
F
t
])(
(
|
,
,
r Dep
BP
r Dep
PP
r Dep
EP
{ ,
, })
P B E
(
{ ,
,
,
F
t
F
t
F
t
,
r Dep
BE
r Dep
PE
denote the cost of feature
r Dep
EE
,
,
F
t
F
t
F
t
,
.
tF
when taking action
a
P B E
, })
.
where
According to the Bayesian decision rule, induced by the
minimum-cost decision rules, the decision rules can be given
by:
P): If
and
])
])
])
])
,
(
[
(
(
[
R a F
E
t
[
R a F
P
t
R a F
B
t
[
(
, then feature
tF is divided into strong
t
R a F
t
P
POS
feature relevance, so we define the cardinal number of the
above six conditions as follows:
4
Action
pa
Ba
Ea
TABLE II CARDINAL NUMBER.
Cost Function
t
PPm
t
BPm
t
EPm
t
PEm
t
BEm
t
EEm
,
,
where action
a a a divide the features in set into the
B
P
m m m , respectively. Similarly, ac-
total number of
a a a divide the features in set into the total
P
tion
t
EP
t
BP
t
PP
,
,
E
E
,
,
B
number of
m m m , respectively.
,
,
t
PE
t
BE
t
EE
Obviously, at time stamp t , the decision cost of three-
EP EP
t
r m
BP BP
t
r m
BE BE
way correlation analysis can be computed as:
t
t
r m
r m
PE PE
PP PP
t
COST r m
t
For convenience, extending from the assumptions of [51],
we define the cost for the right classification as zero, that is,
. Based on formula (10), predict the miss data
r
PP
according to the known value, and the cost function is given
by:
t
r m
EE EE
(10)
r
0
NN
.
COST
t
mis
t
r m
EP
EP
r m
EP
where
COST
t
tion cost,
classification cost.
COST
t
del
t
r m
PE
PE
r m
PE
t
EP
r m
BP
t
BP
t
PE
r m
BE
t
r m
BE
BE
t
r m
BP
BP
denote the misclassifica-
(11)
,
t
BE
denote the delayed
,
r
PE
r
PE
r
PP
=
Three-way correlation analysis needs to be divided in
terms of the threshold value, and the initial threshold value
, is calculated according to the literature [52]:
r
BE
r
EE
r
BE
r
BP
r
EE
r
EP
To ensure the accuracy of feature relevance division, it is
essential to set appropriate thresholds (
t at every
tF and
moment. Finding an optimal threshold for feature
meeting the threshold with the lowest risk cost in decision-
making, the problem of solving threshold parameters be-
comes an optimization problem, namely:
(12)
=
r
BP
r
BE
r
BE
)
,
.
t
decide
F
t
relevance;
B): If
(
decide
F
t
evance;
E): If
(
decide
vance.
[
])
R a F
B
t
BND
t
[
(
])
R a F
P
t
, then feature
and
R a F
B
t
(
[
])
R a F
E
t
(
[
])
,
tF is divided into weak rel-
COST
t
.
arg min
,
t
t
(13)
[
])
R a F
E
t
F NEG
t
t
[
(
])
and
R a F
t
P
, then feature
R a F
B
t
[
(
])
R a F
E
t
[
(
])
,
tF is divided into irrele-
In addition, the decision rules procedure suggests the fol-
lowing simplified feature relevance classification rules:
a)
, then feature
, decide
POS
,
t
tF is
(
(
F
t
,
Dep
Dep
F
)t
If
divided into strong relevance;
If <
F
F
)t
t
tF is divided into weak relevance;
, decide
If
F
)t
is divided into irrelevance.
, decide
Dep
(
,
t
b)
c)
BND
t
, then feature
F NEG
t
, then feature
tF
And then, consider the cost of the three-way decision of
t
,
)
the
We use a simulated annealing algorithm to solve the opti-
mal threshold. Calculate the initial threshold according to
formula (12), and automatically update
threshold
(
t in each iteration. If the threshold update reduces or
COST unchanged, the threshold is
keeps the decision cost
t
updated; otherwise, the threshold update is accepted with a
certain probability, and the iterative process is repeated until
the minimum decision cost is reached. The algorithm is giv-
en in Table III. In this algorithm, The temperature change is
regulates the
nowT
temperature.
*
nowT delta
, where
delta
0.95
TABLE III THREE-WAY CORRELATION THRESHOLD ALGORITHM BASED ON
SIMULATED ANNEALING.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
initialize
r
r
,
PP BP EP PE
r
r
,
,
,
r
BE
,
r
EE
; initT , minT , delta
get a streaming feature
initT
nowT
tF at time stamp t
initialize
initialize
,t
t according to (12)
COST according to (11)
t
,
new
t
new
t
t
t
while nowT minT
update
,
t
new
t
new
if 0
new
t
new
t
1
calculate
nowCOST according to ()
t
else
update
end if
if
COST
t
t until 0
new
t
new
,
new
t
new
t
1
nowCOST
t
0
COST
t
nowCOST
t
new
new
,
t
t
t
t
else
if
random rand
.
exp(
res/ ( *
k nowT
))
COST
t
nowCOST
t
new
new
,
t
t
t
t
end if
end if
nowT
end while
nowT delta
*
3) Phase III Online redundancy analysis
After online correlation analysis, we need to carry on a
redundant analysis depending on the correlation of features,
returned by Fisher's Z-test to calculate
relying on
value
conditional dependence
Ind C F X . At time stamp t ,
(
)
,
|
t
F
(
X
let
M C
(
t , with correlation analysis, a feature
)tM C represents a Markov blanket of C at time stamp
tF is relevant to C , if
, which con-
)
P C F
(
tF is a redundant feature. Based on the Markov
cludes that
blanket, we propose proposition 1 to judge whether attrib-
utes are redundant.
P C F X
|
, s.t.
)
)
(
,
F
F
|
t
t
Proposition 1. For strongly relevant feature
to
POS and conduct a redundancy analysis between
t
features in
POS ; if
t
X
F
then the feature
POS
t
s.t.
P C F X
,
t
P C X
F
,
F
(14)
tF is redundant can be discarded. For weak-
ly relevant feature
X
POS
F
then the feature
t
1t
tF , when
P C F X
POS is not an empty set, if
P C X
F
1
tF is non-redundant and added to
s.t.
,
,
F
t
(15)
POS .
POS is an empty set, the weakly relevant feature
POS is not an empty set, then
are analyzed for
BND until
t
POS
When
tF is put into
the feature
F
i
BND
t
1t
F
and
1t
1
t
t
j
redundancy.
Non-redundant features are added into
POS , which may
t
POS , so
lead to the redundancy of the original features in
t
we propose proposition 2 to check the redundancy of the
other features in
POS .
t
tF , add them
tF and
Proposition 2. At time point, if a feature
(
t
)
M F M C
(
,
X M C
F
t
)
P C X
F
t
,
,F
M C
P C
F
t
X
F
s.t.
(16)
5
tF flow in,
then {
}FX is redundant and should be deleted from
POS .
t
IV. EXPERIMENTS AND RESULTS
A. General Settings
Datasets. In this section, we use 10 real-world data sets
form DNA microarray data, NIPS 2003 data, public microar-
ray data and studies in [53], [54] as show in Table IV.
TABLE IV THE DETAILS OF SELECTED DATASETS.
Mark
Dataset
#(Features) #(Instances) #(Class)
D1
D2
D3
D4
D5
D6
D7
D8
D9
D10
USPS
Colon
SRBCT
Lung
Prostate
Leukemia
Lungcancer
SMK-CAN-187
Madelon
HAPT
1500
2001
2309
3313
6033
7071
12534
19993
501
561
242
62
83
83
102
72
181
187
2600
10929
2
2
4
5
2
2
2
2
6
12
Baselines. We choose five state-of-the-art streaming fea-
ture selections to validate our algorithm performance, in-
cluding Fast-OSFS [15], SAOLA [16], SFS-FI [55], OSSFS-
DD [56], and LOSSA [27]. Besides, we adopt three basic
classifiers, SVM, KNN, and random forest, to evaluate the
validity of feature selection. Table V summarizes the param-
eters set to the values of these classifiers and algorithms.
These algorithms are conducted on MATLAB [57] We per-
form 5-fold cross-validation in our experiments, where 4/5
data is the training set, and 1/5 data is the test set. Repeating
each data ten times and reporting the predictive accuracy,
mean number of selected features, and the running time. All
experiments are implemented on a personal computer (Intel
i7 2.40-GHz CPU, RAM 16GB).
TABLE V ALL THE PARAMETERS USED IN THE EXPERIMENTS.
Mark Algorithm Parameter
M1
M2
M3
M4
M5
OS2FS-AC
Fast-OSFS
SAOLA
SFS-FI
OSSFS-DD
M6
LOSSA
/
KNN
Z test, Alpha is 0.05.
Z test, Alpha is 0.05.
Z test, Alpha is 0.05.
Z test, Alpha is 0.05,
0.05.
k ,
n
2.35%*
2
of attributes)
Z test, Alpha is 0.05,
SB
The neighbors are 3.
k ,
3
10
N
2
1
( n is number
0.01
,
0.01
,
Experimental Designs. We compared the OS2FS-AC al-
gorithm with the algorithms above on sparse streaming fea-
tures with 10% missing data. The default setting is:
, and the cost matrix
5L ,
0.01
0.01
h
10
,
,
10
adopted by our algorithm is
BPr ,
. To further check the perfor-
PEr
mance of the different algorithms, we conduct the Friedman
test at a 95% significance level under the null hypothesis.
PPr
,
1
EPr
EEr
BEr
10
,
,
,
0
1
0
6
B. OS2FS-AC vs. Online Streaming Feature Selection
Methods
From Table VI, we can see OS2FS-AC gets lower average
ranks and higher average accuracy than other algorithms in
the cases of KNN, SVM, and random forest. And we have
the following observations:
a) OS2FS-AC Versus Fast-OSFS: For example, on data
sets HAPT, SFS-FI selects 102 features while getting
lower accuracy than OS2FS-AC. The main reason is that
Fast-OSFS incompletes sparse matrix and employs two-
way classification on correlation analysis that causes
misclassification, leading to inferior accuracy perfor-
mance.
b) OS2FS-AC Versus SAOLA: SAOLA only considers the
feature relationships between two features, which caus-
es some vital information loss. However, with the full
use of the LFA model and three-way decision, OS2FS-
AC can always select the critical informative features on
the fly while having better predictive accuracy.
c) OS2FS-AC Versus SFS-FI: SFS-FI can not select any
features for 10% missing data sets and only select the
first features on some data sets, such as Lungcancer and
SMK-CAN-187, causing the loss of critical information.
Therefore, SFS-FI cannot handle sparse streaming fea-
tures well.
d) OS2FS-AC Versus OSSFS-DD: OSSFS-DD only has a
predictive accuracy of around 0.9 on Leukemia and 0.2
on Madelon. The unsteady average accuracy is that the
OSSFS-DD algorithm also adopts three-way classifica-
tion in correlation analysis, but the threshold is only dy-
namically updated by calculation. Unlike the automatic
updating of the threshold in this paper, the updating
method of OS2FS-AC is universal. This demonstrates
that OS2FS-AC is more stable than OSSFS-DD.
e) OS2FS-AC Versus LOSSA: Though the sparse matrix is
completed, LOSSA uses the two-way classification for
correlation analysis that cannot select features well.
Meanwhile, it does not deal with redundancy between a
new feature and selected features, which causes lower
average accuracy.
TABLE VI USING THE SELECTED FEATURES (RECORDED IN TABLE V) TO TRAIN A CLASSIFIER FIRST AND THE TESTING ITS ACCURACY (%), α=0.1.
Models/Datasets
D1
D2
D3
D4
D5
D6
D7
D8
D9
D10
Average
KNN
M1
M2
M3
M4
M5
M6
88.46±0.43 84.97±0.20 85.56±3.24 88.23±1.40 94.54±1.71 98.90±0.77 98.89±0.31 70.14±2.78 58.10±0.50 77.56±0.36 84.54±1.17
86.80±0.27 77.94±2.46 81.93±0.70 81.13±0.85 92.04±1.68 98.33±0.05 98.07±0.33 79.27±1.73 56.40±0.14 71.38±0.08 82.33±0.83
82.61±0.49 80.96±2.89 82.88±2.00 82.06±0.79 91.88±0.55 98.74±0.00 98.45±0.00 86.37±1.62 54.47±0.45 59.52±0.34 81.80±0.91
74.41±0.59 64.51±0.68 57.49±0.79 63.70±1.03 73.51±3.46 34.65±0.20 87.69±1.80 61.78±1.07 49.76±0.22 50.10±0.37 61.76±1.02
74.01±0.60 62.46±0.52 53.43±1.32 75.87±2.00 55.10±1.76 97.36±0.77 97.19±0.97 66.75±2.35 49.69±0.42 25.60±0.30 65.75±1.10
85.47±0.56 74.32±0.74 82.66±1.87 78.34±0.49 90.77±2.04 96.93±0.00 98.12±0.01 68.99±1.36 54.77±0.17 72.40±0.18 80.28±0.74
^Rank
1.20
2.80
2.60
5.40
5.50
3.50
V. CONCLUSIONS
In this article, we study the problem of sparse streaming
feature selection and propose a new online sparse streaming
feature selection method via adapted classification (OS2FS-
AC). The LFA model supplements the sparse matrix. At the
same time, the attributes are divided into strong relevance,
weak relevance, and irrelevant, with the help of three-way
decisions, improving the accuracy of feature selection. In
our further work, we will further study the method of
completing a sparse matrix and combine various methods to
carry out online sparse streaming feature selection.
REFERENCES
[1] X. Luo, Hao Wu, Zhi Wang, Jianjun Wang, and Deyu Meng, "A Novel
Approach to Large-Scale Dynamically Weighted Directed Network
Representation," IEEE Transactions on Pattern Analysis and Machine
Intelligence, 2022, 44(12): 9756-9773.
[2] S. Li, M. Zhou, X. Luo, and Z. -H. You, "Distributed Winner-Take-All
in Dynamic Networks," IEEE Transactions on Automatic Control, vol.
62, no. 2, pp. 577-589, 2017.
[3] S. Li, M. Zhou and X. Luo, "Modified Primal-Dual Neural Networks
for Motion Control of Redundant Manipulators With Dynamic Rejec-
tion of Harmonic Noises," IEEE Transactions on Neural Networks and
Learning Systems, vol. 29, no. 10, pp. 4791-4801, 2018.
[4] S. Li, Z. -H. You, H. Guo, X. Luo, and Z. -Q. Zhao, "Inverse-Free
Extreme Learning Machine With Optimal Information Updating," IEEE
Transactions on Cybernetics, vol. 46, no. 5, pp. 1229-1241, 2016.
[5] G. Chandrashekar, and F. Sahin, "A survey on feature selection meth-
ods," Computers and Electrical Engineering, vol. 40, no. 1, pp. 16-28,
2014.
[6] S. Alelyani, J. Tang, and H. Liu, "Feature selection for clustering: a
review," Data Clustering, pp. 29-60: Chapman and Hall/CRC, 2018.
[7] P. P. Kundu and S. Mitra, "Feature selection through message passing,"
IEEE Trans. Cybern., vol. 47, no. 12, pp. 4356–4366, 2017.
[8] Y. Yang, D. Chen, H. Wang, and X. Wang, "Incremental perspective for
feature selection based on fuzzy rough sets," IEEE Trans. Fuzzy Syst.,
vol. 26, no. 3, pp. 1257–1273, Jun. 2018.
[9] X. Xue, M. Yao, and Z. Wu, "A novel ensemble-based wrapper method
for feature selection using extreme learning machine and genetic
algorithm," Knowl. Inf. Syst., vol. 57, no. 2, pp. 389–412, 2018.
[10] H. Liu and H. Motoda, Computational Methods of Feature Selection.
London, U.K.: Chapman & Hall, 2007.
[11] B. Xue, M. Zhang, W. N. Browne, and X. Yao, "A survey on
evolutionary computation approaches to feature selection," IEEE Trans.
Evol. Comput., vol. 20, no. 4, pp. 606–626, 2016.
[12] J. Ni, H. Fei, W. Fan, and X. Zhang, "Automated medical diagnosis by
ranking clusters across the symptom-disease network," In Proceedings
of the 2017 IEEE International Conference on Data Mining, 2017, pp.
1009-1014.
[13] G. Ditzler, J. LaBarck, J. Ritchie, G. Rosen, and R. Polikar,
"Extensions to online feature selection using bagging and boosting,"
IEEE Trans. Neural Netw. Learn. Syst., vol. 29, no. 9, pp. 4504–4509,
2018.
[14] Y. Shen, C. Wu, C. Liu, Y. Wu, and N. Xiong, "Oriented feature selec-
tion SVM applied to cancer prediction in precision medicine," IEEE
Access, vol. 6, pp. 48510-48521, 2018.
[15] X. Wu, K. Yu, W. Ding, H. Wang, and X. Zhu, "Online feature selection
with streaming features," IEEE Transactions on Pattern Analysis and
Machine Intelligence, vol. 35, no. 5, pp. 1178-1192, 2013.
[16] K. Yu, X. Wu, W. Ding, and J. Pei, "Scalable and accurate online fea-
ture selection for big data," ACM Transactions on Knowledge Discov-
ery from Data, vol. 11, no. 2, pp. 16, 2016.
[17] M. B. Badsha, R. Li, B. X. Liu, et al. "Imputation of single-cell gene
expression with an autoencoder neural network," Quantitative Biology,
vol. 8, no. 1, pp. 78-94, 2020.
[18] A. Idri,H, Benhar,J. L. Fernández-Alemán,et al. "A systematic
map of medical data preprocessing in knowledge discovery," Computer
Methods and Programs Biomedicine,vol. 162, pp. 69-85, 2018.
[19] N. Zeng, P. Wu, Z. Wang, H. Li, W. Liu, X. Liu, "A small-sized object
detection oriented multi-scale feature fusion approach with application
to defect detection," IEEE Transactions on Instrumentation and Meas-
urement, vol. 71, article no. 3507014, 2022.
[20] H. Li, P. Wu, N. Zeng, Y. Liu, Fuad E. Alsaadi, "A Survey on Parameter
Identification, State Estimation and Data Analytics for Lateral Flow
Immunoassay: from Systems Science Perspective," International Jour-
nal of Systems Science, DOI:10.1080/00207721.2022.2083262.
[21] X. Luo, Y. Yuan, S. L. Chen, N. Y. Zeng, and Z. D. Wang, "Position-
Transitional Particle Swarm Optimization-Incorporated Latent Factor
Analysis," IEEE Transactions on Knowledge and Data Engineering,
vol. 34, no. 8, pp. 3958-3970, 2022.
[41] X. Y. Shi, Q. He, X. Luo, Y. A. Bai, and M. S. Shang, "Large-scale and
Scalable Latent Factor Analysis via Distributed Alternative Stochastic
Gradient Descent for Recommender Systems," IEEE Transactions on
Big Data, vol. 8, no. 2, pp. 420-431, 2022.
[22] X. Luo, H. Wu, and Z. C. Li, "NeuLFT: A Novel Approach to Nonline-
ar Canonical Polyadic Decomposition on High-Dimensional Incom-
plete Tensors," IEEE Transactions on Knowledge and Data Engineer-
ing, DOI: 10.1109/TKDE.2022.3176466.
[42] D. Wu, P. Zhang, Y. He, and X. Luo, "A Double-Space and Double-
Norm Ensembled Latent Factor Model for Highly Accurate Web Ser-
vice QoS Prediction," IEEE Transactions on Services Computing, DOI:
10.1109/TSC.2022.3178543.
7
[23] X. Luo, Yue Zhou, Zhigang Liu, and MengChu Zhou, "Fast and Accu-
rate Non-negative Latent Factor Analysis on High-dimensional and
Sparse Matrices in Recommender Systems," IEEE Transactions on
Knowledge and Data Engineering, DOI: 10.1109/TKDE.2021.3125252.
[24] D. Wu, X. Luo, M. S. Shang, Y. He, G. Y. Wang, and X. D. Wu, "A
Data-Characteristic-Aware Latent Factor Model for Web Services QoS
Prediction," IEEE Transactions on Knowledge and Data Engineering,
vol. 34, no. 6, pp. 2525-2538, 2022.
[25] X. Luo, Y. R. Zhong, Z. D. Wang, and M. Z. Li, "An Alternating-
direction-method of Multipliers-Incorporated Approach to Symmetric
Non-negative Latent Factor Analysis," IEEE Transactions on Neural
Networks and Learning Systems, DOI: 10.1109/TNNLS.2021.3125774.
[26] X. Luo, Y. Zhou, Z. G. Liu, L. Hu, and M. C. Zhou, "Generalized
Nesterov's Acceleration-incorporated, Non-negative and Adaptive La-
tent Factor Analysis," IEEE Transactions on Services Computing, vol.
15, no.5, pp. 2809-2823, 2022.
[27] D. Wu, Y. He, X. Luo, and M. Zhou, "A Latent Factor Analysis-Based
Approach to Online Sparse Streaming Feature Selection," IEEE Trans-
actions on Systems, Man, and Cybernetics: Systems, vol. 52, no. 11, pp.
6744-6758, 2022.
[28] X. Luo, M. C. Zhou, Z. D. Wang, Y. N. Xia, and Q. S. Zhu, "An Effec-
tive Scheme for QoS Estimation via Alternating Direction Method-
Based Matrix Factorization," IEEE Transactions on Services Compu-
ting, vol. 12, no. 4, pp. 503-518, 2019.
[43] H. Wu, X. Luo, and M. C. Zhou, "Advancing Non-negative Latent
Factorization of Tensors with Diversified Regularizations," IEEE
Transactions on Services Computing, vol. 15, no. 3, pp. 1334-1344,
2022.
[44] D. Wu, X. Luo, M. S. Shang, Y. He, G. Y. Wang, and M. C. Zhou, "A
Deep Latent Factor Model for High-Dimensional and Sparse Matrices
in Recommender Systems," IEEE Transactions on System Man Cyber-
netics: Systems, vol. 51, no. 7, pp. 4285-4296, 2021.
[45] W. L. Li, X. Luo, H. Q. Yuan, and M. C. Zhou, "A Momentum-
accelerated Hessian-vector-based Latent Factor Analysis Model," IEEE
Transactions
Services
DOI:
10.1109/TSC.2022.3177316.
Computing,
on
[46] W. L. Li, Q. He, X. Luo, and Z. D. Wang, "Assimilating Second-Order
Information for Building Non-Negative Latent Factor Analysis-Based
Recommenders," IEEE Transactions on System Man Cybernetics: Sys-
tems, vol. 52, no.1, pp. 485-497, 2021.
[47] J. Z. Fang, Z. D. Wang, W. B. Liu, S. Lauria, N. Y. Zeng, C. Prieto, F.
Sikstrom, and X. H. Liu, "A New Particle Swarm Optimization Algo-
rithm for Outlier Detection: Industrial Data Clustering in Wire Arc Ad-
ditive Manufacturing," IEEE Transactions on Automation Science and
Engineering, DOI:10.1109/TASE.2022.3230080.
[48] L Jin, L Wei, S Li, "Gradient-based differential neural-solution to time-
dependent nonlinear optimization," IEEE Transactions on Automatic
Control, vol, 68, no. 1, pp. 620-627, 2023.
[29] F. H. Bi, X. Luo, B. Shen, H. L. Dong, and Z. D. Wang, "Proximal
Alternating-Direction-Method-of-Multipliers-Incorporated Nonnega-
tive Latent Factor Analysis," IEEE/CAA Journal of Automatica Sinica,
DOI: 10.1109/JAS.2023.123474.
[49] X. Luo, W Qin, A. Dong, K. Sedraoui, and M. C. Zhou, "Efficient and
High-quality Recommendations via Momentum-incorporated Parallel
Stochastic Gradient Descent-based Learning," IEEE/CAA Journal of
Automatica Sinica, vol. 8, no. 3, pp. 402-411, 2021.
[50] M. Liu, L. Chen, X. Du, L. Jin and M. Shang, "Activated Gradients for
Deep Neural Networks," IEEE Transactions on Neural Networks and
Learning Systems, doi: 10.1109/TNNLS.2021.3106044.
[51] Y. Y. Yao, "The superiority of three-way decision in probabilistic rough
set models," Information Sciences, vol. 181, pp. 1080-1096, 2011.
[52] Y. Y. Yao, "Three-way decision with probabilistic rough sets," Infor-
mation Sciences, vol. 180, no. 3, pp. 341–353, 2010.
[53] A. Rosenwald, G. Wright, W. C. Chan, J. M. Connors, E. Campo, R. I.
Fisher, R. D. Gascoyne, H. K. Muller-Hermelink, E. B. Smeland, and J.
M. Giltnane, "The use of molecular profiling to predict survival after
chemotherapy for diffuse large-B-cell lymphoma," New England Jour-
nal of Medicine, vol. 346, no. 25, pp. 1937-1947, 2002.
[54] O. Chapelle, B. Scholkopf, and A. Zien, "Semi-supervised learning
(Chapelle, O. et al., Eds.; 2006)[Book reviews]," IEEE Transactions on
Neural Networks, vol. 20, no. 3, pp. 542-542, 2009.
[55] P. Zhou, P. P. Li, S. Zhao, and X. D. Wu, "Feature Interaction for
Streaming Feature Selection," IEEE Transactions on Neural Networks
and Learning Systems, vol. 32, no. 10, pp. 4691-4702, 2021.
[56] P. Zhou, S. Zhao, Y. T. Yan and X. D. Wu, "Online Scalable Streaming
Feature Selection via Dynamic Decision," Association for Computing
Machinery, vol. 16, no. 5, pp. 1556-4681, 2022.
[57] K. Yu, W. Ding, and X. D. Wu, "LOFS: Library of online streaming
feature selection," Knowledge-Based Systems, vol. 113, pp. 1–3, 2016.
[58] D. Wu, B. Sun, and M. Shang, Hyperparameter Learning for Deep
Learning-based Recommender Systems, IEEE Transactions on Services
Computing, 2023. doi: 10.1109/TSC.2023.3234623.
[30] D. Wu, M. S. Shang, X. Luo, and Z. D. Wang, "An L1-and-L2-norm-
oriented Latent Factor Model for Recommender Systems," IEEE
Transactions on Neural Networks and Learning Systems, vol. 33, no.
10, pp. 5775-5788, 2022.
[31] D. Wu, X. Luo, Y. He and M. C. Zhou, "A Prediction-sampling-based
Multilayer-structured Latent Factor Model for Accurate Representation
to High-dimensional and Sparse Data," IEEE Transactions on Neural
Networks and Learning Systems, DOI: 10.1109/TNNLS.2022.3200009
[32]Y. Y. Yao, "The geometry of three-way decision," Applied Intelligence,
pp. 1–28, 2021.
[33] F. H. Bi, T. T. He, Y. T. Xie, and Xin Luo, "Two-Stream Graph Convo-
lutional Network-Incorporated Latent Feature Analysis," IEEE Trans-
actions on Services Computing, DOI: 10.1109/TSC.2023.3241659.
[34] J. Chen, X. Luo, and M. C. Zhou, "Hierarchical Particle Swarm Opti-
mization-incorporated Latent Factor Analysis for Large-Scale Incom-
plete Matrices," IEEE Transactions on Big Data, vol. 8, no. 6, pp.
1524-1536, 2022.
[35] Y. Yuan, X. Luo, M. S. Shang, and Z. D. Wang, "A Kalman-Filter-
Incorporated Latent Factor Analysis Model for Temporally Dynamic
on Cybernetics, DOI:
Sparse Data,"
10.1109/TCYB.2022.3185117.
IEEE Transactions
[36] X. Luo, M. C. Zhou, S. Li, Z. H. You, Y. N. Xia, and Q. S. Zhu, "A
Nonnegative Latent Factor Model for Large-Scale Sparse Matrices in
Recommender Systems via Alternating Direction Method," IEEE
Transactions on Neural Networks and Learning Systems, vol. 27, no.3,
pp. 524-537, 2016.
[37] Z. G. Liu, X. Luo, and M. C. Zhou, "Symmetry and Graph Bi-
regularized Non-Negative Matrix Factorization for Precise Community
Detection," IEEE Transactions on Automation Science and Engineer-
ing, DOI: 10.1109/TASE.2023.3240335.
[38] X. Luo, J. P. Sun, Z. D. Wang, S. Li, and M. S. Shang, "Symmetric and
Non-negative Latent Factor Models for Undirected, High Dimensional
and Sparse Networks in Industrial Applications," IEEE Transactions on
Industrial Informatics, vol. 13, no. 6, pp. 3098-3107, 2017.
[39] D. Wu, Q. He, X. Luo, M. S. Shang, Y. He, and G. Y. Wang, "A Poste-
rior-neighborhood-regularized Latent Factor Model for Highly Accu-
rate Web Service QoS Prediction," IEEE Transactions on Services
Computing, vol. 15, no. 2, pp. 793-805, 2022.
[40] D. Wu, and X. Luo, "Robust Latent Factor Analysis for Precise Repre-
sentation of High-dimensional and Sparse Data," IEEE/CAA Journal of
Automatica Sinica, vol. 8, no. 4, pp. 796-805, 2021.
|
|
http://arxiv.org/abs/2302.12961v1 | 2023-02-25T02:20:59 | 2023-02-25T02:20:59 | Locale Encoding For Scalable Multilingual Keyword Spotting Models | A Multilingual Keyword Spotting (KWS) system detects spokenkeywords over
multiple locales. Conventional monolingual KWSapproaches do not scale well to
multilingual scenarios because ofhigh development/maintenance costs and lack of
resource sharing.To overcome this limit, we propose two locale-conditioned
universalmodels with locale feature concatenation and feature-wise
linearmodulation (FiLM). We compare these models with two baselinemethods:
locale-specific monolingual KWS, and a single universalmodel trained over all
data. Experiments over 10 localized languagedatasets show that
locale-conditioned models substantially improveaccuracy over baseline methods
across all locales in different noiseconditions.FiLMperformed the best,
improving on average FRRby 61% (relative) compared to monolingual KWS models of
similarsizes. | [
"Pai Zhu",
"Hyun Jin Park",
"Alex Park",
"Angelo Scorza Scarpati",
"Ignacio Lopez Moreno"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12961v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12961v1",
"@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"
] | LOCALE ENCODING FOR SCALABLE MULTILINGUAL KEYWORD SPOTTING MODELS
Pai Zhu, Hyun Jin Park, Alex Park, Angelo Scorza Scarpati, Ignacio Lopez Moreno
Google LLC, Mountain View, CA, U.S.A
{paizhu,hjpark,axpk,angelos,elnota}@google.com
3
2
0
2
b
e
F
5
2
]
L
C
.
s
c
[
1
v
1
6
9
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
A Multilingual Keyword Spotting (KWS) system detects spoken
keywords over multiple locales. Conventional monolingual KWS
approaches do not scale well to multilingual scenarios because of
high development/maintenance costs and lack of resource sharing.
To overcome this limit, we propose two locale-conditioned universal
models with locale feature concatenation and feature-wise linear
modulation (FiLM). We compare these models with two baseline
methods: locale-specific monolingual KWS, and a single universal
model trained over all data. Experiments over 10 localized language
datasets show that locale-conditioned models substantially improve
accuracy over baseline methods across all locales in different noise
conditions. FiLM performed the best, improving on average FRR
by 61% (relative) compared to monolingual KWS models of similar
sizes.
Index Terms- Multilingual Keyword detection, Keyword spot-
ting, Locale Encoding, Locale Conditioning.
1. INTRODUCTION
Production-grade keyword-spotting (KWS) systems are trained to
recognize keywords from a continuous stream of speech. They op-
erate in a resource-constrained, noisy environment.
Previously, research on this problem has focused on issues like
noise robustness, reducing dependency on data volume and label
quality, minimizing computing cost, and improving detection accu-
racy [1–12]. Most of the cited research addresses keyword spot-
ting in a single specific language (locale). But for production-grade
systems, it is highly important to scale up systems to support numer-
ous international languages. Similar to efforts in multilingual speech
recognition [13] and multilingual speaker recognition [14], a univer-
sal multilingual KWS model will not only drastically reduce the cost
of training, but also largely simplifies the model deployment process
and maintenance cost.
In this paper, we discuss and explore a scalable approach to
creating KWS models that cover numerous international languages
while minimizing the cost of development at reasonable quality.
For the multilingual keyword spotting problem, we want to de-
velop localized model(s) which can detect a desired keyword in var-
ious languages. A na ̈ıve approach is to just develop a monolingual
KWS model, and repeat the same process for other languages, sim-
ply switching out the training data and localized keyword. This pro-
cess will yield a set of N locale specific models given N locales.
It can serve as a simple baseline, with the drawback of having high
maintenance costs and limited use of shared linguistic information
across all of the training data. Locale-specific data pre-processing
and model training costs scale linearly with the number of locales,
which can be prohibitive for tens or hundreds of locales. Moreover,
many common properties of acoustic data are likely helpful across
all locales, and are not exploited by the repeated monolingual ap-
proach.
To overcome these limitations, we consider three new ap-
proaches for sharing information between locales, while minimizing
development costs relative to the baseline. First, we consider a fully
universal model, which is a single model trained with union of data
from all locales. Second, we propose two locale-conditioned uni-
versal models based on different conditioning methods: Concat and
FiLM. With the Concat method, a locale encoding is concatenated
to the output of intermediate layer connecting encoder and decoder.
With the FiLM (Feature-wise Linear Modulation) [15] method, a
locale encoding is used to modulate the same intermediate layer out-
put. A locale conditioned universal model is a single model trained
with all locales data together, but requiring the locale identity as
an auxiliary input. We compare these locale conditioned multilin-
gual KWS methods with monolingual individual KWS method and
fully shared universal model. The rest of the paper is organized as
follows: we discuss related works in Section 2, and describe the
proposed approach in Section 3. We discuss the experimental setup
and the result in Sections 4 and 5, and conclude in Section 6.
2. RELATED WORK AND BACKGROUND
2.1. Related Work
In [16], multilingual KWS was explored by merging acousti-
cally similar phonemes from two languages, and building a shared
phoneme encoder based on HMM-NN. In [17, 18], a bottleneck fea-
ture encoder was trained to detect the union of phonemes from mul-
tiple languages to address multilingual KWS. More recently, [19]
showed that multilingual KWS models can benefit from learning
shared embedding features. [20] also trained an embedding model
using multilingual data which is shown to generalize to unseen lan-
guages in few-shot setup. A common theme in these related works
was the idea of learning shared representations that can generalize
across locales, but not explicitly providing the locale information as
an input. In [21, 22], the authors showed that conditioning an ASR
model with a one-hot locale encoding information is highly effective
for multilingual generalization of the ASR model. With this work
serving as inspiration, we proposes new locale-conditioned KWS
approaches, which use shared parameters across different locales
and also allow conditioning by an auxiliary locale encoding input.
2.2. Baseline Model Architecture
For all models in this paper, we use an encoder-decoder architec-
ture consisting of an encoder network (4 convolutional layers) fol-
lowed by a decoder network (3 convolutional layers) [2–4]. Note the
convolution layers here are simplified versions described more fully
in [2, 23]. We refer to the connection between encoder and decoder
Fig. 1. Different approaches of multilingual keyword spotting compared in this paper
networks as the bottleneck layer, which projects the final encoder
convolution layer output to a dimension matching the input to de-
coder network. We use P to describe the encoder logits which are
the outputs of this bottleneck layer.
The baseline encoder-decoder model is trained in a supervised
manner, with training examples (x, y) where x is a sequence of in-
put spectral feature vectors, and y is a sequence of target labels for
encoder and decoder logits. We use cross-entropy loss following [2]
for the baseline and proposed models.
3. PROPOSED METHOD
Fig.1 summarizes 3 different scaling approaches to multilingual key-
word spotting problem. Fig.1 (a) shows a simple repetition approach
where we repeat training of N individual models using localized
data for each locale. Fig.1 (b) shows a fully shared model approach
where we train a single model with training data from all locales.
Fig.1 (c) shows a locale conditioned model approach where we train
a single model with training data from all locales and correspond-
ing locale information. Throughout this paper, we denote (X, Y )
as a composite sequence defined as ((xi, yi)|i = 1..k), given orig-
inal feature sequence X = (xi|i = 1..k) and label sequence Y =
(yi|i = 1..k) of length k. Xl and Yl denote feature and label se-
quences from locale l respectively.
3.1. Locale Specific Models
A locale specific model for locale l can be defined as Ml = f (x; θl)
where x is the input features, and θl is the set of trainable parameters
for each Ml (See Fig.1-a). Such models can be trained by minimiz-
ing the expected losses per each model,
θl = argmin E(x,y)[Loss(f (x; θl), y)]
where (x, y) ∈ (Xl, Yl) , l ∈ {1..N }
(1)
Here, we use E∗[. . .] to denote expectation over ∗.
3.2. Fully Shared Universal Model
A fully shared universal model can be defined as Muniv = f (x; θuniv)
where θuniv is a single set of parameters shared across all locales
(see Fig.1-b). In this case, there will be only a single model trained
on the pooled data,
θuniv = argmin E(x,y)[Loss(f (x; θuniv), y)]
where (x, y) ∈
(cid:91)
(Xl, Yl)
(2)
l=1..N
3.3. Locale Conditioned Universal Model
A locale conditioned model can be described similarly to the pre-
viously defined universal model, Mcond = f (x, l; θcond), except for
the additional locale encoding input, l. As with θuniv, the θcond are
shared across all locales (see Fig.1-c).
θcond =argmin E(x,y,l)[Loss(f (x, l; θcond), y)]
where (x, y) ∈ (Xl, Yl), l ∈ {1..N }
(3)
We experiment with two methods for locale conditioning: concate-
nation (Concat), and modulation (FiLM).
3.3.1. Concatenation
As shown in Fig.2 (middle), each training example (i.e. utterance)
comes with a locale index, l ∈ {1..N }, denoting the utterance locale
origin. We represent locales as one-hot vectors, L, with length N .
The locale index position will have value 1 and elsewhere are 0. With
the Concat approach, we simply concatenate L with the encoder
logits, P , and use the resulting combined tensor as the input to the
decoder network. The extra size introduced to the model is N × D1
where D1 is the first decoder layer input dimension.
3.3.2. Modulation
Another approach to conditioning is to use the locale information to
modulate the existing encoder logits. Feature-wise Linear Modula-
tion (FiLM) [15] learns to adaptively influence the neural network
output by applying an affine transform to the network's intermediate
features based on an external input. In this case, the external input
is the one-hot encoded locale L as defined in Section 3.3.1, and the
intermediate features are the above mentioned encoder logits P .
Formally, FiLM learns element-wise modulation (scale) and bias
(shift) functions which can be implemented as simple learnable pro-
jection layers, f and h, respectively. As shown in Fig. 2 (right), f
projects L to create a modulation factor, γ, and h projects L to create
a bias factor, β. Both γ and β have the same dimension as P , the
Fig. 2. Fully shared universal model (left), locale concatenation model architecture (middle) and locale FiLM model architecture (right)
encoder logits. The conditioning is then applied on P to produce the
modulated input to the decoder network,
ian), KO-KR (Korean), NL-NL (Dutch), PT-BR (Brazilian Por-
tuguese), SV-SE (Swedish), TH-TH (Thai).
P mod = FiLM(P |γ, β) = γ * P + β
(4)
where * denotes elementwise multiplication. The number of ex-
tra parameters introduced with f and h is 2 × M × N where M is
the size of encoder logits and N is the number of locales.
4. EXPERIMENTAL SETUP
4.1. Train and Eval Datasets
Our dataset consists of 1.2 billion anonymized utterances from real-
world queries collected in accordance with Google Privacy and AI
principles [24, 25]. Utterances containing localized versions of key-
word phrase "Ok Google" or "Hey Google" are referred to as posi-
tive data. Negative utterances are collected from queries triggered by
tactile (push-button) and hence do not contain the keyword phrases.
Data is divided into training and evaluation sets as in [4]. The
training set consists of 838M positive and 435M negative utterances.
The training set has been supplemented with different transforma-
tions and noises producing 25 new replicas for each utterance [2,26].
The evaluation set contains 6M positive utterances divided into 5M
regular positive utterances and 1M challenging positive utterances
based on SNR. The evaluation set also contains 5k hours of negative
audio used to determine the operating point threshold needed for a
given FA/hour level.
4.2. Metrics
We evaluate False Reject Rate (FRR), which is the number of posi-
tive utterances rejected by the model divided by the number of pos-
itive utterances. Similarly we measure False Acceptance Per Hour
(FAh) which is the number of false detections divided by the number
of negative audio hours. We measure FRR in positive sets with var-
ious noise conditions and FAh in negative sets at various threshold
levels as mentioned in Section 4.1. We compare model performances
by FRR values at a consistent FAh level (0.17/hour) and their FRR-
FAh curve plots with the area of interest 0-0.5 FAh.
4.3. Training Details
• Locales: The locales in our experiments include : DA-DK(Danish),
DE-DE (German), ES-ES (Spanish), FR-FR (French), IT-IT (Ital-
• Target keywords: Localized versions of 'OK Google' and 'Hey
Google'.
• Train environment: Tensorflow/Lingvo [27] is used.
• Input feature and labels: Stacked 40d spectral energy is used
as the input feature x. Target labels y are derived from force-
alignment as described in [2]. We merge similarly sounding
phonemes over different languages for encoder labels.
• Train loss/steps: Cross entropy is used as loss for encoder and
decoder following [2]. We train for 3M∼8M steps until loss con-
verges to a stable level.
• Model size: We experiment with various model sizes: Regular
(MR) with 330K parameters [2], Large (ML) with 1.4M parame-
ters, and XLarge (MXL) with 2.4M parameters.
• Dimension of encoder logits: |P |=32
5. RESULTS
As discussed above, the baseline models include locale specific
models, with each independently trained with their own locale data,
and a fully shared universal model trained with mixed locale data.
The experimental models integrated the locale encoding into the
network in through Concat and FiLM approaches mentioned in Sec-
tion 3.3. FRRs are reported based on the threshold determined at a
constant FAh mentioned in Section 4.2.
Table 1 shows FRR results for the above models in both regu-
lar and challenging acoustic condition evaluation sets. We also plot
FRR-FAh curves for selected locales in Fig 3. Noticeably, Some lo-
cales have bad locale specific models due to the low volume or poor
label quality of the data. This is particularly true of smaller locales
such as DA DK and SV SE, which have an order of magnitude of
less training data than large locales such as ES ES and TH TH. We
observe improved metrics on these underrepresented locales with the
universal model because the paucity of training data is compensated
for by data from other locales, leading to less over-fitting.
For many other locales, the universal model has poorer results
than the locale specific model, most likely because less relevant
training data from other locales can harm specialization when there
is sufficient data to get reasonable locale-specific performance.
Eval-reg
Eval-chall
Locale-name
Locale Specific Models
Universal Model
Locale Concat Model
Locale FiLM Model
Locale Specific Models
Universal Model
Locale Concat Model
Locale FiLM Model
DA DK DE DE
2.49
4.66
2.97
2.16
24.65
45.17
28.47
17.17
22.61
6.15
1.92
1.62
51.19
44.05
16.39
12.33
ES ES
5.67
10.89
11.16
4.65
28.84
48.73
40.81
21.82
FR FR
8.47
10.66
14.07
7.26
38.45
50.12
43.75
20.65
IT IT KO KR NL NL
5.81
11.57
6.09
4.69
10.05
6.34
1.18
5.29
3.95
2.58
6.29
3.25
19.57
55.52
29.75
20.37
46.33
31.38
6.21
31.55
20.41
10.52
30.47
16.37
PT BR
6.92
7.58
2.53
2.38
31.99
35.92
13.41
13.51
SV SE
19.35
14.89
4.79
4.20
52.60
48.64
24.83
20.72
TH TH AVERAGE
9.21
8.26
5.10
3.60
34.26
40.49
24.21
17.21
3.10
6.64
3.13
1.66
10.09
34.20
16.25
8.53
Table 1. FRRs (%) of different models in 10 locale datasets with regular (Eval-reg) and challenging (Eval-chall) acoustic conditions, from
the 330K params model MR. The thresholds are chosen to have the same targeted FAh (0.17) in the negative audio set.
Eval-reg
Eval-chall
Locale-name
Locale Specific Models
Universal Model
Locale Concat Model
Locale FiLM Model
Locale Specific Models
Universal Model
Locale Concat Model
Locale FiLM Model
DA DK DE DE
2.58
3.29
2.03
1.51
25.76
30.79
16.27
14.05
9.74
3.59
1.64
1.94
28.84
28.54
14.65
14.05
ES ES
4.63
7.47
5.41
5.81
25.94
37.61
22.61
23.68
FR FR
7.09
8.13
6.31
4.93
34.68
32.11
20.62
17.96
IT IT KO KR NL NL
8.59
7.97
4.72
2.19
6.23
4.27
0.85
7.32
2.78
1.02
4.50
1.93
22.53
46.91
24.80
11.29
32.20
22.90
3.80
28.94
13.72
3.83
23.09
10.92
PT BR
6.66
4.31
2.25
1.79
31.38
21.26
11.09
9.48
SV SE
7.80
8.44
4.51
3.37
25.84
32.96
19.40
18.15
TH TH AVERAGE
6.65
5.28
3.49
2.83
28.90
27.41
16.04
14.24
6.70
4.87
1.76
1.53
22.31
24.45
9.35
7.24
Table 2. FRRs (%) of different models in 10 locale datasets with regular (Eval-reg) and challenging (Eval-chall) acoustic conditions, from
the 1.4M params model ML. The thresholds are chosen to have the same targeted FAh (0.17) in the negative audio set.
Fig. 3. FRR-FAh plots for ES ES and IT IT under regular and challenging acoustic conditions for 330k params model MR. The false reject
per instance (FRR) and false accept per hour (FAh) are computed from positive and negative audio sets respectively in Section 4.1. Note the
dotted blue vertical line represents the targeted 0.17 FAh and its intersections with curves show relevant FRR values in Table 1.
In both acoustic conditions, locale-conditioned models achieved
significantly better results than locale-specific models and the uni-
versal model. On the one hand, the locale encoding models enhanced
the training data volume from cross locale mixing. But unlike the
universal model, the locale encoding networks is trained to selec-
tively focus on data relevant to the locale whose input is provided.
We find that FiLM consistently outperforms Concat, and conjec-
ture that it is due to improved efficiency in learning locale similari-
ties. In the concatenative approach, the locale encoding network is
trained with the combined input consisting of encoder logits and lo-
cale encoding so that forward propagation is interfered undesirably.
In FiLM, the locale encoding network takes only locale encoding as
input and the learned weights can be used to compare locale similar-
ities by calculating correlation matrix.
Large model ML gives enhanced learning capacity hence the
locale specific model and universal model have boosted results in
Table 2. The locale encoding approaches further improved the re-
sults for different acoustic conditions. We also experimented with
an even bigger size MXL, but models in general have slight worse
results than ML, possibly due to over-fitting.
6. CONCLUSION
This paper introduced two new approaches for training multilingual
KWS models - locale conditioned universal model with concatena-
tion and FiLM modulation approaches. Experiments show that both
approaches significantly outperform locale-specific models and the
fully shared universal model across 10 different language datasets
in various acoustic conditions. Experiments with larger model sizes
also show consistent improvements by the proposed approaches.
The FiLM approach achieves the best results given the efficient way
learning cross-locale similarities. Result in Table 1 shows that FiLM
based approach reduced average FRR by as much as 61% relatively
compared to locale specific models. The idea can be extended to
other cross domain scenarios to utilize data efficiently when training.
7. REFERENCES
[1] T. Sainath and C. Parada, "Convolutional neural networks for
small-footprint keyword spotting.," in Proceedings of Annual
Conference of the International Speech Communication Asso-
ciation (Interspeech), 2015, pp. 1478–1482.
[2] Raziel Alvarez and Hyun Jin Park,
"End-to-end Stream-
ing Keyword Spotting," ICASSP 2019 - 2019 IEEE Interna-
tional Conference on Acoustics, Speech and Signal Processing
(ICASSP), pp. 6336–6340, 2019.
[3] Hyun Jin Park, Patrick Violette, and Niranjan Subrahmanya,
"Learning to detect keyword parts and whole by smoothed max
pooling," ICASSP 2020 - 2020 IEEE International Confer-
ence on Acoustics, Speech and Signal Processing (ICASSP),
pp. 7899 – 7903, 2020.
[4] Hyun Jin Park, Pai Zhu, Ignacio Lopez Moreno, and Niran-
jan Subrahmanya, "Noisy student-teacher training for robust
keyword spotting," Interspeech 2021, pp. 331–335, 2021.
[5] S. Panchapagesan, M. Sun, A. Khare, S. Matsoukas, A. Man-
dal, B. Hoffmeister, and S. Vitaladevuni, "Multi-task learning
and weighted cross-entropy for DNN-based keyword spotting,"
in Interspeech, 2016.
[6] Siddharth Sigtia, John Bridle, Hywel Richards, Pascal Clark,
Erik Marchi, and Vineet Garg, "Progressive voice trigger de-
tection: Accuracy vs latency," in ICASSP 2021 - 2021 IEEE
International Conference on Acoustics, Speech and Signal Pro-
cessing (ICASSP), 2021, pp. 6843–6847.
[7] Siri Team,
Voice
https://machinelearning.apple.com/2017/
10/01/hey-siri.html, 2017, Accessed: 2018-10-06.
"Hey Siri: An On-device DNN-powered
Assistant,"
Personal
Apple's
Trigger
for
[8] Geng-Shen Fu, Thibaud Senechal, Aaron Challenner, and
Tao Zhang, "Unified speculation, detection, and verification
in ICASSP 2022 - 2022 IEEE Interna-
keyword spotting,"
tional Conference on Acoustics, Speech and Signal Processing
(ICASSP), 2022, pp. 7557–7561.
[9] Yueyue Na, Ziteng Wang, Liang Wang, and Qiang Fu, "Joint
ego-noise suppression and keyword spotting on sweeping
robots," in ICASSP 2022 - 2022 IEEE International Confer-
ence on Acoustics, Speech and Signal Processing (ICASSP),
2022, pp. 7547–7551.
[10] Qu Yang, Qi Liu, and Haizhou Li, "Deep residual spiking
neural network for keyword spotting in low-resource settings,"
in Interspeech, 2022.
[11] Andrew Hard, Kurt Partridge, Neng Chen, Sean Augenstein,
Aishanee Shah, Hyun Jin Park, Alex Park, Sara Ng, Jes-
sica Nguyen, Ignacio Lopez-Moreno, Rajiv Mathews, and
Franc ̧oise Beaufays, "Production federated keyword spotting
via distillation, filtering, and joint federated-centralized train-
ing," in Interspeech, 2022.
[12] Waseem Gharbieh, Jinmiao Huang, Qianhui Wan, Han Suk
Shim, and Hyun Chul Lee, "Dyconvmixer: Dynamic convolu-
tion mixer architecture for open-vocabulary keyword spotting,"
in Interspeech, 2022.
[13] Bo Li, Ruoming Pang, Yu Zhang, Tara N Sainath, Trevor
Strohman, Parisa Haghani, Yun Zhu, Brian Farris, Neeraj Gaur,
and Manasa Prasad, "Massively multilingual asr: A lifelong
learning solution," in ICASSP. IEEE, 2022, pp. 6397–6401.
[14] Roza Chojnacka, Jason Pelecanos, Quan Wang, and Igna-
cio Lopez Moreno,
"Speakerstew: Scaling to many lan-
guages with a triaged multilingual text-dependent and text-
in Interspeech,
independent speaker verification system,"
2021.
[15] Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin,
and Aaron Courville, "FiLM: Visual reasoning with a general
conditioning layer," in Proceedings of the AAAI Conference on
Artificial Intelligence, 2018, vol. 32.
[16] CP Santhosh Kumar and VP Mohandas, "Keyword spotting
in multilingual environments," International Journal of Com-
puter and Electrical Engineering, vol. 2, no. 6, pp. 1025, 2010.
[17] Raghav Menon, Herman Kamper, John Quinn, and Thomas R.
Niesler, "Fast asr-free and almost zero-resource keyword spot-
ting using dtw and cnns for humanitarian monitoring," in In-
terspeech, 2018.
[18] Raghav Menon, Herman Kamper, Ewald van der Westhuizen,
John Quinn, and Thomas R. Niesler,
"Feature exploration
for almost zero-resource asr-free keyword spotting using a
multilingual bottleneck extractor and correspondence autoen-
coders," in Interspeech, 2019.
[19] Abhijeet Awasthi, Kevin Kilgour, and Hassan Rom, "Teach-
ing keyword spotters to spot new keywords with limited exam-
ples," in Interspeech, 2021.
[20] Mark Mazumder, Colby Banbury, Josh Meyer, Pete Warden,
and Vijay Janapa Reddi, "Few-Shot Keyword Spotting in Any
Language," in Proc. Interspeech 2021, 2021, pp. 4214–4218.
[21] Shubham Toshniwal, Tara N. Sainath, Ron J. Weiss, Bo Li, Pe-
dro J. Moreno, Eugene Weinstein, and Kanishka Rao, "Mul-
tilingual speech recognition with a single end-to-end model,"
2018 IEEE International Conference on Acoustics, Speech and
Signal Processing (ICASSP), pp. 4904–4908, 2018.
[22] Anjuli Kannan, Arindrima Datta, Tara N. Sainath, Eugene We-
instein, Bhuvana Ramabhadran, Yonghui Wu, Ankur Bapna,
Z. Chen, and Seungjin Lee, "Large-scale multilingual speech
recognition with a streaming end-to-end model," ArXiv, vol.
abs/1909.05330, 2019.
[23] P. Nakkiran, R. Alvarez, R. Prabhavalkar, and C. Parada,
"Compressing deep neural networks using a rank-constrained
in Proceedings of Annual Conference of the In-
topology,"
ternational Speech Communication Association (Interspeech),
2015, pp. 1473–1477.
[24] "Google's
privacy
principles,"
https://
googleblog.blogspot.com/2010/01/
googles-privacy-principles.html,
2022-10-17.
Accessed:
[25] "Artificial intelligence at Google: Our principles," https://
ai.google/principles, Accessed: 2022-10-17.
[26] Chanwoo Kim, Ehsan Variani, Arun Narayanan, and Michiel
Bacchiani, "Efficient implementation of the room simulator
for training deep neural network acoustic models," CoRR, vol.
abs/1712.03439, 2017.
[27] Jonathan Shen et al.,
"Lingvo: a modular and scalable
framework for sequence-to-sequence modeling," ArXiv, vol.
abs/1902.08295, 2019.
|
|
http://arxiv.org/abs/2302.12959v1 | 2023-02-25T02:06:15 | 2023-02-25T02:06:15 | Chaotic Variational Auto encoder-based Adversarial Machine Learning | Machine Learning (ML) has become the new contrivance in almost every field.
This makes them a target of fraudsters by various adversary attacks, thereby
hindering the performance of ML models. Evasion and Data-Poison-based attacks
are well acclaimed, especially in finance, healthcare, etc. This motivated us
to propose a novel computationally less expensive attack mechanism based on the
adversarial sample generation by Variational Auto Encoder (VAE). It is well
known that Wavelet Neural Network (WNN) is considered computationally efficient
in solving image and audio processing, speech recognition, and time-series
forecasting. This paper proposed VAE-Deep-Wavelet Neural Network
(VAE-Deep-WNN), where Encoder and Decoder employ WNN networks. Further, we
proposed chaotic variants of both VAE with Multi-layer perceptron (MLP) and
Deep-WNN and named them C-VAE-MLP and C-VAE-Deep-WNN, respectively. Here, we
employed a Logistic map to generate random noise in the latent space. In this
paper, we performed VAE-based adversary sample generation and applied it to
various problems related to finance and cybersecurity domain-related problems
such as loan default, credit card fraud, and churn modelling, etc., We
performed both Evasion and Data-Poison attacks on Logistic Regression (LR) and
Decision Tree (DT) models. The results indicated that VAE-Deep-WNN outperformed
the rest in the majority of the datasets and models. However, its chaotic
variant C-VAE-Deep-WNN performed almost similarly to VAE-Deep-WNN in the
majority of the datasets. | [
"Pavan Venkata Sainadh Reddy",
"Yelleti Vivek",
"Gopi Pranay",
"Vadlamani Ravi"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12959v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12959v1",
"@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",
"68T01, 68M25",
"I.2.6; K.6.5"
] | Chaotic Variational Auto encoder-based Adversarial
Machine Learning
Pavan Venkata Sainadh Reddy1,2, Yelleti Vivek1, Gopi Pranay1, Vadlamani Ravi1,
1Centre for Artificial Intelligence and Machine Learning
Institute For Development And Research In Banking Technology(IDRBT),
Castle Hills Road #1, Masab Tank, Hyderabad 500076, India
2School of Computer Science And Information Sciences,
University of Hyderabad, Hyderabad 500046, India.
[email protected]; [email protected] ; [email protected]; [email protected]
Abstract
Machine Learning (ML) has become the new contrivance in almost every field. This makes them a target
of fraudsters by various adversary attacks, thereby hindering the performance of ML models. Evasion and
Data-Poison-based attacks are well acclaimed, especially in finance, healthcare, etc. This motivated us to
propose a novel computationally less expensive attack mechanism based on the adversarial sample
generation by Variational Auto Encoder (VAE). It is well known that Wavelet Neural Network (WNN) is
considered computationally efficient in solving image and audio processing, speech recognition, and time-
series forecasting. This paper proposed VAE-Deep-Wavelet Neural Network (VAE-Deep-WNN), where
Encoder and Decoder employ WNN networks. Further, we proposed chaotic variants of both VAE with
Multi-layer perceptron (MLP) and Deep-WNN and named them C-VAE-MLP and C-VAE-Deep-WNN,
respectively. Here, we employed a Logistic map to generate random noise in the latent space. In this paper,
we performed VAE-based adversary sample generation and applied it to various problems related to finance
and cybersecurity domain-related problems such as loan default, credit card fraud, and churn modelling,
etc., We performed both Evasion and Data-Poison attacks on Logistic Regression (LR) and Decision Tree
(DT) models. The results indicated that VAE-Deep-WNN outperformed the rest in the majority of the
datasets and models. However, its chaotic variant C-VAE-Deep-WNN performed almost similarly to VAE-
Deep-WNN in the majority of the datasets.
Keywords
WNN, VAE-Deep-WNN, Evasion Attack, Data-Poison Attack, Chaotic Maps
Corresponding Author
1
AML Attacks
White Box
Black Box
Data-Poison
Attack
Evasion attack
Other Attacks
1. Introduction
Figure 1. Taxonomy of AML Attacks
Nowadays, adversaries are consciously trying to dwindle the Machine Learning (ML) models' performance
by using various techniques. Hence, along with gaining accuracy, maintaining the models' robustness
gained a lot of attention from practitioners and researchers. A classical example is Email spam filters where
the adversary tries to tailor the Email to avoid spam detection. This could depreciate the performance of the
model thereby affecting trust and confidence. In such cases, one could employ various defense techniques
which could increase the models' robustness. This gave birth to a new field called Adversarial Machine
Learning (AML).
AML is broadly categorized into two different branches viz., attacks and defenses. Attack
techniques (refer to Fig. 1) aim to trick the machine learning models into false training by synthesizing the
input. On the other hand, the defenses' primary goal is to make machine learning classifiers aware of these
types of attacks. Without limiting to the above classical example, this is very prominent in other fields such
as intrusion detection, insider threat detection, and adversary samples to induce bias in the chatbots, etc.,
This is more prevalent in the fields such as finance, health care, etc., Attacks are categorized into two
different types: (i) White box and (ii) Black box attacks respectively. The following assumptions are made
in White-box attacks: (i) access to the data, and (ii) the underlying ML model is known and has access to
it. However, the black box doesn't have access to either of them. A white box is further divided into data
Data-Poison attack and Evasion based on the nature of attacking during the training phase or test phase. To
perform data Data-Poison attacker has the access to training data which is used to generate synthetic
2
samples (Chakraborty et al., 2018) and later used to misclassify the model. However, attackers having
access to test data are perturbed and utilized to decrease the model performance is called an Evasion attack
(Chakraborty et al., 2018).
According to a Gartner survey, "Application leaders must anticipate and prepare to mitigate
potential risks of data corruption, model theft, and adversarial samples", in its first report on adversarial
machine learning. Kumar et al. (2020) took a survey which is conducted on 28 industries, ten out of 28
enterprises picked the Data-Poison attack (refer to Fig. 1) that would most affect them and Only 3 industries
use secure machine learning which is robust to AML. This shows how AML is associated with and can
affect the real world. Owing to its importance and popularity, we focused on the current study's data Data-
Poison and Evasion attack. In a recent report by the Global Risk Institute, they discussed the attacks on
ML in Finance are trading, fraud detection, robo-advising, (Rubstov, 2022) and Natural language
Processing where they mentioned replacing a single word in a text sentiment analysis by its synonym can
make the model from 99% positive to 100% negative (Morris et al., 2022). Recently, Data-Poison attacks
are on the Tay chatbot, which is for communication with users on Twitter and is also designed to retrain
with Twitter users' data to get better engagement. In less than 24 hours, Tay learned from normal behavior
to unethical behavior. "Microsoft claimed Tay has been attacked by internet trolls and thereby noticed that
"the system had insufficient filters and began to feed profane and offensive tweets into Tay's machine
learning algorithm" (Centre for long-term CyberSecurity Berkeley1).
The original data can be perturbed by various means such as: adding noise, using generative models
such as Variational Auto Encoder (VAE), Generative adversarial network (GAN), etc., Among them,
generating attack samples from a generative model is quite a popular and effective technique. GAN is
relatively highly complex and prone to unstable training(Saxena et al., 2021), on the other hand, VAE is
relatively less complex and training is also relatively faster when compared to that of GANs. Further, in the
context of AML, VAE is left unexplored. Owing to its advantages and simple-to-use motivated us to
propose VAE-based white-box attacks and applied to various financial-related problems such as churn
modeling, loan default, credit card fraud detection, and other cyber security problems like distributed denial
of service (DDoS) attacks, and intrusion detection systems.
Multi-layer perceptron (MLP) is often used in VAEs' encoder and decoder. Wavelet Neural
Network (WNN) is used as an alternative for MLP with lesser parameters and faster training, better
functional learning, function approximation, faster conversion rate, and better non-linear function
approximation (Venkatesh et al. 2022). However, deeper layers could also be added, called Deep-WNN
(Said et al 2016). This motivated us to utilize and propose a novel architecture, VAE-Deep-WNN, where
1 https://cltc.berkeley.edu/aml/
3
WNN is in both the encoder and decoder. Recently, Chaotic VAE (Gangadhar et al., 2022), is proposed and
applied to one class classification (OCC) to perform insurance fraud detection. Taking inspiration from the
authors, we proposed Chaotic VAE variants in the context of AML. We designed the corresponding chaotic
variants of VAE-MLP and VAE-Deep-WNN and named them C-VAE-MLP and C-VAE-Deep-WNN
respectively. All of these models will be discussed in detail in the latter sections. Consequently, all of these
models are utilized to perform data Data-Poison attack and Evasion attack respectively, and compared the
performance thereof.
The major contributions of the current research study are as follows:
Proposed VAE-Deep-WNN to generate adversary samples and performed Evasion and Data-
Poison attacks on Logistic Regression and Decision Tree models.
Proposed Chaotic inspired variant, C-VAE-Deep-WNN and C-VAE-MLP to perform attacks.
Further, compared the performance of the above models with VAE-MLP.
Validated the proposed models in financial and cyber security domain-related problems.
The rest of the paper is organized as follows: In Section 2, we review up-to-date relevant papers. In Section
3, we described the base models VAE, C-VAE, and WNN followed by the proposed methodology. In
Section 4, we presented the description of the datasets. Section 5 discusses the results and draws some
comparisons between the models. In Section 6, we discuss conclusions and future work on the
methodologies.
2. Literature Review
Machine learning-based malware analysis techniques are used in various fields like windows malware,
android malware for classifying evasive and growing malware threats, however, a small perturbation leads
to misclassifying the malicious threats (Aryal et al., 2022). Adversarial attacks are divided into active and
passive attacks where the active attacks (Sadeghi et al., 2020), tend to disturb the learning algorithm and
corrupt the data which yields bad model performance. Early attacks are performed by modifying only a
small portion of training data, however, recent attacks instead focus on accessing all data and modifying all
the data at once (Shen et al., 2019, Fowl et al., 2021).
Adversarial examples are malicious samples in which when added a small perturbation to the
original samples makes the machine learning models misclassify. Alexey et al. (2017) proposed the Fast
gradient signed method (FGSM) and Basic Iterative Method (BIM), to generate adversarial examples on
image datasets. Further, they proposed adversarial training for defenses. The image dataset is constructed
4
from a cell phone camera and applied their attacks on the Inception v3 image classification neural network.
To the best of our knowledge, Ballet et al. (2019) first illustrated the usage of adversarial examples and
adversarial attacks on tabular data like German Credit, Australian Credit, Default Credit Card, and Club
Loan datasets using their proposed method LowProFool to generate adversarial samples.
Adversarial examples are generated on Variational AutoEncoder and Generative Adversarial
Network (VAE-GAN) (JernejKos et al., 2017), where the attacker/adversary inputs the original data, and
the output of that model is taken as the adversarial example. VAE-GAN generates the adversarial examples
and is used to make images misclassify. The output of these generative models is nearer to the input data
but not the exact data which is the method they are using to perform the adversarial attack. Xiao et al. (2019)
proposed the advGAN i.e., Generative adversarial Network for generating the adversarial examples and
performed adversarial attacks on semi-white-box (gray-box) and black-box settings for image datasets.
Wang et al. (2021) proposed Man-in-the-Middle Attack against an ML classifier using generative
models, here they proposed VAE to generate the adversarial examples primarily using Decoder in a black-
box setting against image datasets. Yerlikaya and Bahtiyar (2022) performed a Data-Poisoning attack by
injecting adversarial data into training datasets using Random-label flipping and Distance-based label
flipping on four datasets namely Breast-cancer, Instagram-spam-filter, Botnet-detection and Android
malware on machine learning algorithms for the first time.
Tabassi et al., (2019), defined an Evasion attack, where the attacker tries to solve the constraint
optimization problem like gradient descent to find a small input perturbation that causes a large change in
the cost function and which results in output misclassification. Chakraborty et al., (2018) illustrated a data
modification attack is a white/gray-box attack that instead of an injection of malicious data directly changes
the data on the whole itself.
Cartella et al. (2021) illustrated the Zoo attack on the Fraud Detection dataset for the first time and
tried making the fraud class the non-fraud class on the XG-Boost algorithm. They generated adversary
samples using the Generic Adversarial Algorithm i.e., Harford et al. (2021) proposed the usage of VAE in
the generator of the gradient adversarial transformation network (GATN) to enhance the quality of
adversarial samples and performed an attack on (1-NN DTW 1- Nearest Neighbour Dynamic Time
Wrapping.) and Fully convolution Network (FCN) and performed attacks on the time series datasets.
PuVAE (Purifying Variational AutoEncoder) is a method proposed by Hwang et al. (2020) to purify
adversarial examples. This method takes the closest projection of the adversarial example as determining it
as the purified samples i.e., the PuVAE outputs the nearest estimation of those images and adversarial
images get distance measured and whichever gets less distance is taken as the pure image instead of the
adversarial image.
5
Xiang et al. (2021), proposed a Wavelet-VAE structure to reconstruct an input image and generate
adversarial examples by modifying the latent code by adding the perturbation. By first training wavelet-
VAE for learning the latent distribution of the input image and then fixing the parameters of the models
and encoding the target image to obtain latent distribution and performed attacks against 5 state-of-the-art
models VGG19, ResNet-152, DenseNet-201, InceptionV3, and Inception-ResNet V2.
Willetts et al. (2021) talked in the paper about improving the robustness of the VAE for adversarial
attacks by applying a margin on a VAE's input space within and using disentangled sample generation
which is robust to the perturbation. The anomaly detection and online abnormal detection are based on the
deep neural network (Xu et al ., 2020) performed a data-poisoning attack on the RNN-based anomaly
detection and made the model obsolete by using the general discrete adversarial sample generation using
the FGSM method.
Our current research work is different in the following aspects:
To the best of our knowledge, this is the first-of-its-kind study focused on VAE-based
attacks in the financial domain and in the context of tabular datasets.
Further, we proposed VAE-Deep-WNN for adversary sample generation. However, Xiang
et al. (2021) proposed VAE-WNN for image regeneration they didn't perform any sort of
adversarial attacks.
We proposed Chaotic VAE with MLP and Deep-WNN variants and performed Evasion
and Data-Poison attacks.
3. Proposed Methodology
In this section, we discuss the VAE, and C-VAE variants of MLP and WNN employed for data Data-Poison
and Evasion attacks.
3.1 Overview Of Techniques
3.1.1 Variational AutoEncoder
It is a deep generative model that uses neural networks to capture the input data distribution proposed by
Kingma and Welling, (2013). VAE comprises both an encoder and a decoder. It is regarded as the second
generation of the Autoencoder where the aim of the network is not only reducing the dimensions but also
learning data distribution and regenerating the data from the latent space. The encoder's aim is to learn the
data encoding through reduction to latent space. The decoder's aim is to regenerate the data from that latent
6
space. Then the backpropagation is applied in the form of a loss function to get the network better at the
data regeneration nearer to the actual data. The loss function used in the backpropagation comprises the
loss between generated dataset and the original dataset and the KL divergence for a better approximation
of the generated dataset to the original dataset refers to Eq. 1.
Lvae = − DKL[q(z|x)||p(z)] + Eq[log p (x|z)]. (1)
Where 'DKL' is kl-divergence(generated data q(z|x).
.
.
.
.
X
.
.
Z
.
.
.
.
.
.
z = μ + σ ∗ ε
.
ε =
Logistic map(0, 1)
ε =
X′
Figure 2. Chaotic-Variational Autoencoderz
3.1.2 Chaos Theory
Chaotic (Weggins et al., 1963) is defined as "A dynamical system which depends on small dependence on
the initial conditions with a closed invariant set (which consists of more than one orbit) will be Chaotic".
This says that chaotic systems are highly affected even with a small change in the initial conditions. This
chaotic behavior can be modeled using non-linear dynamic maps called chaotic maps. Mainly chaos has
two properties: ergodicity i.e., the system cannot be reduced into two or more subsets and intrinsically
stochastic nature.
7
Recently, Chaotic maps are being used effectively in Feature subset selection problem (Vivek et
al., 2022), handling imbalance (Kate et al., 2022), in handling the one-class classification (OCC)
(Gangadhar et al., 2022). In our paper, we utilized a Logistic map which is one of the popular Chaotic maps,
and solved various problems (Vivek et al., 2022, Kate et al., 2022, Gangadhar et al., 2022).
Logistic map: It is a discrete map of a polynomial equation (refer to Eq. 2) of degree 2. It uses the previous
values to generate the next numbers. The nature of the logistic map is decided by λ. The logistic map
exhibits chaotic behavior when λ [3.56, 4]. In the current settings, we used 'λ' as 4.
xt+1 = λ ∗ ( xt ∗ (1 − xt ))
(2)
3.2 Deep Wavelet Neural Network
Wavelet Neural Networks (WNN), hidden units called wavelons, are primarily based on wave processing
having parameters that are used in wavelet analysis. WNN has more success rate than Neural Networks in
the fields like Wave Synthesis, Speech Processing, etc. Further, Wavelet neural network is also better at
function learning, and the convergence rate is also faster (Zhang et al., 1995). Formally, there are two
different operations that are extensively used in signal processing (i) Translation and (ii) Dilation.
Table 1. Wavelet Functions and properties
Sl.No
1
Wavelet Functions
Morelet (Chauhan et al., 2019)
Gaussian (Chauhan et al., 2019)
Mexican-hat (Wang et al., 2013)
Shannon (Wang et al., 2013)
Equation
f(x) = cos(1.75x) ∗ exp (−
x2
2
)
f(x) =
2
√3
f(x) = exp(−x2)
∗ π−0.25 ∗ (1 − x2) ∗ exp (−
x2
2
)
sin π(x − 0.5) − sin 2π(x − 0.5)
π(x − 0.5)
GGW (Gilbert, Gutierrez, Wang)
(Wang et al., 2013)
sin 3x + sin(0.3x) + sin(0.03x)
2
3
4
5
In general, WNN consists of three layers: one input layer and one hidden layer, and one output
layer. But, researchers (Said et al., 2016) enabled to use of multiple hidden layers and proposed Deep WNN.
They applied it for image classification, which yielded better results than single-layered architecture. When
multiple hidden layers are used, then it is treated as Deep-WNN, which enables it to capture the underlying
complex patterns in a better way than single-layered WNN. WNN uses backpropagation to update its
weights.
8
Unlike, MLP, and WNN, there are separate activation functions (refer to Table 1) called Wavelet
Functions, such as Morlet Function, Gauss Function, Mexican Hat Function, etc. This helps to capture
underlying non-linear complex patterns.
3.3 Proposed VAE-Deep-WNN
The proposed VAE-Deep-WNN also has three different components as VAE encoder, decoder, and latent
space, this proposed architecture is different from the VAE in both encoder and decoder parts i.e., the
network of both encoder and decoder has to change its internal neural nets with wavelet layers with
wavelons and different sets of activation functions.
Encoder
Decoder
r
e
y
a
L
t
u
p
n
I
1
r
e
y
a
L
N
N
W
n
W
n
W
z = μ + σ ∗ ε
1
r
e
y
a
L
N
N
W
n
r
e
y
a
L
N
N
W
r
e
y
a
L
t
u
p
t
u
O
ε ~N(0,1)
ε ~LM(0,1)
*M1
*M2
*M1 -> VAE-MLP,VAE-Deep-WNN and *M2 -> C-VAE-MLP,C-VAE-Deep-WNN
N(0,1) ~ Normal Distribution(0,1) and LM(0,1) ~ Logistic-Map(0,1)
Figure 3. VAE-Deep-WNN / C-VAE-Deep-WNN Architecture
3.3.1 Encoder
In the encoder for each data point from the input is multiplied by the weight and subtracted by the translation
divided by dilation parameters then applies wavelet function, as described in the Deep-WNN we used more
than hidden wavelet layers in VAE depicted in Fig.3. It takes training dataset as the input with the size of
n ∗ f, where n is the number of samples and f is the number of features. Suppose the encoder is built with
two hidden layers, this network of the encoder has two additional parameters translation and dilation and
the equation is given in Eq. 3.
9
encoder(x) = f (
∑
n1
j=0
f(wj
wixi−bi
ai
)− bj
∑
n
i=0
aj
) (3)
where f is the wavelet function w represents the weights, bi is the translation and ai is dilation, i,j represents
the size of features
3.3.2 Latent Space
As in the encoder, the data point is reduced to latent dimension with μ, σ from this ' z' is calculated is
given by Eq. 4.
z = μ + σ ∗ ε (4)
Where μ is mean , σ is standard deviation, ε is random noise from the Normal distribution N~(0,1).
The above Eq.3. is reparameterization of the data coming from the encoder i.e., μ, σ and 'ε' is data
generator. For every new generation of normal data distribution we need mean and sigma of that particular
normal distribution and a random number generator.
3.3.3.Decoder
Now, from the latent space vector 'z' the decoder layer reproduces the data using the same number of
hidden layers and wavelons. The layers start in the decoder is a mirage of the encoder in reverse, is given
in Eq. 5.
∑
decoder(z) = f (
n
i=0
∑
n1
j=0
f(wi
wjzj−bj
aj
)− bi
ai
) (5)
Wavelons and Wavelet Hidden Layer
Structure
(
∑ wx − b
a
)
.
.
.
(
∑ wx − b
a
)
Figure 4. Wavelet Neural Network hidden layer representation
10
3.4 Proposed Chaotic-VAE-Deep-WNN
In VAE, there is the flexibility that we can use different distributions in the epsilon part in the
reparameterization of the network, based on our need, it is also discussed in Kingma and Welling (2013).
The major difference VAE-Deep-WNN and C-VAE-Deep-WNN is the introduction of chaotic maps in the
latent space. The Reparameterization part of the VAE model is where the changes take place with respect
to the VAE-WNN. The 'ε' which is multiplied by 'σ' is generally the standard normal distribution ~N(0,1)
due to the fact the input data is normalized between (0,1).
3.4.1 Encoder
The encoder is same as the VAE-Deep-WNN that given input is multiplied by weights and subtracted by
translation and divided by the dilation parameter (refer to Eq. 3).
3.4.2 Decoder
The decoder is also same as the VAE-Deep-WNN, here from calculated 'z' this part tries to reproduce the
data from the latent distribution (refer to Eq. 4).
3.4.3 Latent distribution
This section is where this model is changed from the VAE-Deep-WNN, generally the 'ε'(epsilon) from the
reparameterization equation (refer to Eq. 5). the noise is the normal distribution between (0,1) because to
use it as the generator of the new distribution of the data, as described in (Kingma and Welling 2013) the
noise can changed as per requirement and (Gangadhar et al., 2022) used Logistic map to generate chaotic
number for 'ε' in C-VAE Here the usage Logistic map (0,1) in epsilon to change of the model method of
reproduction of the data.
3.5 Attack Methodology
In this work we performed two attacks: (i) Evasion attack, (ii) Data-Poison Attack.
3.5.1 Evasion Attack Methodology
Assuming that the attacks environment is white-box i.e., as described by (Biggio et al., 2017) that to be
assumed that adversary had perfect knowledge about the victim's model, for this attack method the
adversary can change the test time samples. The whole process is as follows, using stratified random
sampling the dataset is divided into two sets named Xtrain, Xtest with the ratio of 70:30. Then we normalize
the Xtrain using MIN-MAX-scaler for scaling of the data to range between (0,1), we used five datasets refer
to table 3. Assumed we are in white-box environment and able to access the datasets out of three datasets
needed the use of oversampling due to class imbalance using SMOTE. Fore adversarial sample generation
X′ the generative model needs to be trained, here we trained it using Xtrain refer to Algorithm 3. for VAE
the process starts as follows, in the case of VAE-MLP and C-VAE, the weights are initialized and in the
case of VAE-Deep-WNN and C-VAE-Deep-WNN, along with weight initialization, translation and dilation
11
parameters is also done. All of these are randomly initialized by using normal distribution N~(0,1). For C-
VAE and C-VAE-Deep-WNN the seed value for the chaotic map is fixed.
Algorithm 1. Pseudocode for Evasion attack using VAE and its variants
Input: X: dataset L: number of epochs, lr: Learning Rate, mom: Momentum
Output: AUCevasion
1. Xtrain, Xtest ← Divide the dataset into train and test data
2.
Normalize the train and test datasets
'
3. Xtrain
← Apply Oversampling technique in the case of imbalanced
datasets. i.e., SMOTE
4. MLmodel ← Get trained Machine Learning model
# ADVERSARIAL SAMPLE GENERATION
5. X′ ← Generate Data using VAE / C-VAE with MLP or WNN using Xtest
by calling Algorithm 3.
6. Use generated . X′ to validate . MLmodel
7. AUCevasion ← Compute AUC score
8. Return AUCevasion
After initialization, the training of the encoder with VAE models described in the Algorithm 3.,
based on the variant the adding of the noise in the reparameterization part is changed from Random Normal
Distribution(0,1) to Logistic map(0,1) based the normal and chaotic variants. From which decoder starts
reproducing the data, after each epoch the loss is calculated between regenerated data and the original data
(refer to Eq. 1). Thus calculated loss is used for the backpropagation, if we use regular neural network only
weights gets updated with respect to the learning rate/momentum and optimizer used refer to table 3., but
in the wavelet neural network there are two additional parameters i.e., translation and dilation also gets
updated rest of the process is same as the regular neural network's backpropagation and This process
continues until the epochs complete.
12
Generative
Model
Perturbed Test
Set
Dataset
Training set
ML classifier
Test phase
Test set
Figure 5. Schematic diagram of Evasion Attack
Since the generative model is trained now we need to feed to the training set/test set based on the
attack type and the trained generative model gives the adversarial sample X′. In this attack test set is given
as the input to get the adversarial test-set. The victim machine learning classifier is considered since we are
using binary classification datasets refer to table 2., now the victim's model is trained using original training
dataset and validated using the adversarial test set generated using VAE and its variants inplace of the
original test set then calculation of AUC using the formula refer to Eq. 6. And got the AUC score of the
attack's performance and the victim's model original performance needed to be checked using the original
test set for validation and calculating the AUC score using formula refer to Eq .6. Refer to schematic
diagram Figure. 5. For the representation of the whole process.
3.5.2 Data-Poison Attack Method
This attack is also assumed to be white-box and the adversary has the perfect knowledge of the data and
data distribution of the victim's model, the whole process up to adversarial sample generation is the same
as the Evasion attack methodology, the parameters for VAE-MLP, C-VAE like weights are initialized using
a random normal distribution(0,1) and the initial seed for the chaotic variant needs to be fixed and for the
VAE-Deep-WNN and C-VAE-Deep-WNN the additional parameters translation and dilation needs to
initialized using random normal distribution (0,1).
13
Algorithm 2. Pseudocode for Data-Poison attack using VAE and its variants
Input: X: dataset, L: number of epochs, lr: Learning Rate, mom: Momentum
Output: AUCpoison
1. Xtrain, Xtest ← Divide the dataset into train and test data
2.
Normalize the train and test datasets
'
3. Xtrain
← Apply Oversampling technique in the case of imbalanced
datasets. i.e., SMOTE
4. MLmodel ← Get Machine Learning model
5.
X′ ← Generate Data using VAE / C-VAE with MLP or WNN using
Xtrain by calling Algorithm 3.)
6. Train derived . MLmodel using X′
7. Validate the performance of MLmodel using Xtest
8. AUCpoison ← Compute AUC score
Generative Model
Perturbed Training
Set
Dataset
Training set
ML Classifier
Test-Set
Test-
Phase
Figure 6. Schematic diagram of Data-Poison Attack
Oversampling using SMOTE is applied based on the dataset's imbalanceness. From which
regeneration of data starts, and loss refer to Eq. 1. is calculated after each epoch. Based on the loss the
14
backpropagation with respect to weights in the VAE and C-VAE and weights, translation, and dilation for
the VAE-Deep-WNN and C-VAE-Deep-WNN.
For the adversarial sample generation same as the above section the generative model VAE and its
variants is trained using the training set and this trained VAE model given the original Xtrain as the input
and adversarial samples is generated as the output. Since we are using the binary classification datasets the
Victim model is considered as the classification based model the victim model is trained on the original
dataset and validated on the original test set, for which the AUC score is calculated using the formula refer
to Eq . 6. , and these scores considered as before attack scores and the model is retrained using modified
adversarial training set X′ by adversary, given as the training dataset to the victim model and validated on
the original test set, for which the AUC score is calculated using the formula refer to Eq . 6. , for four
variants is collected is, and these values are considered as After attack's AUC, the whole process
represented using the schematic diagram refer to Fig. 6.
Algorithm 3. Pseudocode of the adversarial sample generation using VAE and its variants
Input: Xtrain: training dataset, Xtest: test dataset, L: number of epochs, lr: Learning
Rate, mom: Momentum
Output: M[φ,θ]: trained model, Attack_X': perturbed data
1. M[φ,θ] ← Ø // initialize the Generative model (C-VAE, VAE);
2.
for k is 1 to L do
a.
x ← Randomly obtain the dataset from Xtrain
b. ε ← Train the Encoder model
c. ρ ← Generate random noise by using Logistic Map
d. ζ ← Train the Decoder model by using chaotic random noise and Z
e. Calculate Loss (refer to Eq. 2)
f.
Perform Backpropagation
// update model M[φ,θ] parameters
3. end for
4.
5.
′ ←Test the trained model, M[φ,θ] performance on Xtest
Xtest
X′ ← Generate the adversary sample dataset usingM[φ,θ] and Xtrain or Xtest
depending on the type of attack.
15
4. Dataset Description
In the current study, we evaluated the performance of the proposed models with VAE-MLP on five datasets
associated with the financial and cyber security domains. All the datasets are presented in Table 1. All of
them are binary classification datasets, and the corresponding disparities are also presented.
Table 2. Datasets Description
Datasets Name
Bank-Churn
Credit-card Default
Loan-Default
CICIDS-2018
CICDDOS-2019-DNS
No of
classes
2
2
2
2
2
No of Samples
10,000
30,000
30,000
2,00,000
50,00,000
No of
Features
12
23
25
66
88
Downloaded
from
Kaggle2
Kaggle
Kaggle
CIC3
CIC
Further, bank churn and loan default datasets are balanced and the rest of the datasets are highly
imbalanced. We incorporated Synthetic Minority Oversampling Technique (SMOTE) to handle the
imbalance problem. The dataset is divided into training and test datasets in 70:30 proportion with a stratified
random sampling method.
Table 3. Hyperparameters for all Techniques
Model
Hyperparameters
VAE-MLP /
C-VAE-MLP
VAE-Deep-WNN /
C-VAE-Deep-WNN
Epochs:[100,200,500,1000,1400,1500,1800]
#Number of hidden layers :[1,2,3,4]
Learning rate :[0.0001,0.001,0.01,0.05]
Momentum :[0.001,0.01]
Activations:['relu',' Tanh']
Optimizers :[' Adam',' Adagrad',' SGD']
Latent-Dimensions :[2,3,4,8]
Epochs:[100,200,500,1000,1400,1500,1800]
#Number of hidden layers :[1,2,3,4]
Learning rate :[0.0001,0.001,0.01,0.05]
Momentum :[0.001,0.01]
Wavelet-Functions:['Morlet',' Gaussian',' Mexican-hat',' Shannon','ggw']
Optimizers :[' Adam',' Adagrad',' SGD']
Latent-dimensions:[2,3,4,6,8]
5. Results and Discussion
In this section, we will thoroughly investigate the performance of the VAE and C-VAE variants with MLP
and WNN in Evasion and Data-Poison attacks. The hyperparameters with which the models are trained are
2 https://www.kaggle.com/datasets ;
3 https://www.unb.ca/cic/datasets/index.html ;
16
presented in Table 3. First, we will discuss the Evasion attack followed by the Data-Poison attack. As
discussed earlier, we employed stratified random sampling and maintained the proportion as 70:30 for the
training and test dataset. And Normalized the training set and test set with the use of Min-max-scaler for
re-scaling the data between (0,1) and SMOTE is also employed wherever applicable. In our study, we
performed analysis on two different ML techniques viz., Logistic Regression (LR), and Decision Tree (DT)
respectively. These two models are chosen because these models are chosen to be effective and efficient
while handling tabular datasets (vivek et al., 2022). It is a known fact that the Area under the receiver
operator characteristic curve (AUC) is robust to imbalance. Hence, we considered AUC as the metric in
analyzing the performance of the models.
5.1 Classification Models
5.1.1 Logistic regression
Logistic Regression (LR), employs a supervised classification technique for the binary classification task.
LR is also known as the logit model, since it estimates the probability of an event occurring such as being
fraudulent or legitimate, churned out or non-churn customer, etc. LR assumes that all the features are
independent of each other. Even though this is a simple model yet most of the time it is proven to be
effective when applied to tabular datasets.
5.1.2 Decision Tree
DT (Breiman et al., 1984) is one of the most powerful techniques used to solve various machine-learning
tasks such as classification, and regression. DT generates a tree structure based on the training data
comprising internal and leaf nodes. Each internal node serves as the classification rule, and each leaf node
denotes a class label. The following are a few of the advantages of DT: handling missing values, automated
feature selection, and handling both categorical and numerical features. The splitting of the root nodes is
based on different criteria such as Gini, entropy etc., and DT generates a set of rules which makes it easily
interpretable. Hence, DT is considered as the white box model. This model is more popular to be described
in detail.
5.2 Evaluation Metric
In the current work, AUC is chosen to be the evaluation metric. AUC is proven to be a robust measure
while handling unbalanced datasets and is an average of specificity and sensitivity. The mathematical
representation of AUC is given in Eq. (6). Sensitivity (refer to Eq. (7)) is the ratio of the positive samples
17
that are truly predicted to be positive to all the positive samples. Specificity (refer to Eq. (8)) is the ratio of
the negative samples that are truly predicted to be negative to all the negative samples.
Where,
and
AUC =
(Sensitivity + Specificity)
2
Sensitivity =
Specificity =
TP
TP + FN
TN
TN + FP
(6)
(7)
(8)
Where TP is a true positive, FN is a false negative, TN is a true negative, and FP is a false positive.
5.3 Evasion Attack
Now, we will discuss the AUC attained by various ML models after performing an Evasion attack by using
various generative models. The results are presented in Table 4. As we know, an Evasion attack is
performed during the test phase. Hence, by using Algorithm 1, we generated Evasion samples by using test
data. Thus generated adversary samples are used to attack LR and DT, respectively. The corresponding
results are presented in Table 4. It is desired that post-attack, the AUC should get decreased. The higher the
decrease in AUC, the better the generative model can generate the Evasion samples.
Table 4. AUC attained by various models after performing an Evasion attack
Dataset
Model
Bank-Churn
Loan-Default
Credit-Card
CICIDS-2018
DDOS-DNS-2019
LR
DT
LR
DT
LR
DT
LR
DT
LR
DT
Before
Attack
0.5670
0.6742
0.5996
0.665
0.88
0.9002
0.975
0.9832
0.805
1.0
VAE-MLP VAE-Deep-
C-VAE-MLP C-VAE-Deep-
After Attack
0.5071
0.6016
0.5003
0.493
0.545
0.5223
0.582
0.5273
0.5351
0.5245
WNN
0.4981
0.4764
0.505
0.456
0.510
0.5006
0.4993
0.4795
0.5223
0.4977
0.5076
0.5529
0.5747
0.5687
0.5168
0.4997
0.5798
0.49123
0.5465
0.556
WNN
0.5049
0.4862
0.5017
0.4657
0.510
0.501
0.5131
0.4877
0.4957
0.4997
The results indicate that all the generative models can affect the model performance with the
generated dataset. Among the models, WNN variants outperformed the MLP variants in all of the datasets
concerning all of the models. Especially, VAE-Deep-WNN affected the AUC most number of times than
its corresponding C-VAE-Deep-WNN. Interestingly, the AUC after the attack is similar for both VAE-
18
WNN and C-VAE-Deep-WNN in most of the cases, yet the former outperformed the latter in the majority
of the datasets. However, in the loan default dataset, VAE-MLP performed the best, yet the difference
between the next best, i.e., C-VAE-Deep-WNN, is minimal (0.1%). Among all of the VAE variants, C-
VAE-MLP performed the worst.
5.4 Data-Poison Attack
Now, we will discuss the AUC attained by various ML models after performing a Data-Poison attack using
various generative models. The results are presented in Table 5. As we know, a Data-Poison attack is
performed during the training phase. Hence, by using Algorithm 2, we generated adversarial samples by
using training data. Here also, the generated adversary samples are used to attack LR and DT, and the results
are presented in Table 3. Same as earlier, here also, the decrease in AUC is desired after performing a Data-
Poison attack. The results indicate that WNN variants outperformed the MLP variants in all of the datasets
concerning all of the models. Further, all of the VAE variants affected AUC with a great percentage which
empirically proves that the actual attack happened. Likewise previous Evasion attacks, VAE-Deep-WNN
affected the AUC most number of times than its corresponding chaotic variant, viz., C-VAE-Deep-WNN.
Interestingly, C-VAE-Deep-WNN performed the worst in DDOS-DNS 2019 dataset, where the difference
in performance concerning VAE-Deep-WNN is 10%. Except in this case, in all the other datasets with all
of the models, VAE-Deep-WNN and C-VAE-Deep-WNN performed almost similarly.
Table 5. AUC attained by various models after performing a Data-Poison attack
Dataset
Model
Bank-Churn
Loan-Default
Credit-Card
CICIDS-2018
DDOS-DNS-2019
LR
DT
LR
DT
LR
DT
LR
DT
LR
DT
Before
Attack
0.567
0.6742
0.5996
0.665
0.88
0.9002
0.975
0.9832
0.805
1.0
VAE-MLP VAE-Deep-
C-VAE-MLP C-VAE-Deep-
After Attack
0.5018
0.5735
0.5634
0.4926
0.50109
0.492
0.5840
0.5321
0.625
0.6341
WNN
0.4981
0.513
0.505
0.456
0.5102
0.5006
0.4993
0.4795
0.5223
0.4977
0.5212
0.4892
0.5750
0.5038
0.5852
0.5214
0.5798
0.5021
0.6104
0.6231
WNN
0.5
0.4539
0.5017
0.4931
0.53363
0.5353
0.5002
0.4862
0.5102
0.5987
Whereas in the credit-card fraud dataset, VAE-MLP performed the best concerning both LR and
DT, the difference between the next best, i.e., C-VAE-Deep-WNN, is very minimal (0.1%) in either of the
cases. Among all of the VAE variants, C-VAE-MLP performed the worst. It is observed that the Bank-
Churn and Loan-Default the AUC drop is almost around 20% from before and after attack , if we observe
19
the rest of three datasets the percentage drop is almost nearly around 50% which is making the machine
learning model from correct prediction to making the model falsely predicting one class to other.
As discussed in the literature survey before that, the WNN is better at function learning and
approximation(Zhang et al., 1995) and Harfold et al. (2022) also illustrated that inducing VAE in their
adversarial sample generator enhanced the adversarial sample quality; in this current work, the results also
indicated the same strengthening the fact that VAE-WNN combined can produce the quality adversarial
samples. Given the Chaotic maps-based models recently shown by (Vivek et al., 2022)(Kate et al., 2022)
better performed, we also implemented the same with VAE-Deep-WNN for possible better enhancement
of the adversarial sample generation though it is shown not so better results than the VAE-Deep-WNN, out
of total four variants of VAE is used to generate adversarial sample C-VAE-Deep-WNN outperformed the
VAE, C-VAE-MLP shown it is better at the generation of the adversarial samples than these two variants.
In the experimentation stage, we used numerous hyperparameters related to wavelets and VAE refer to
table 3. The usage of different wavelet functions changed adversarial sample quality and attacks's
performance rapidly, out of all wavelet functions overall the morlet wavelet function performed better
irrespective of datasets. Due to the wavelet function's no symmetry (Wang et al., 2013) behaviour is the
primary reason of the better performance in the attacks.
6. Conclusion & Future work
This is a first-of-its-kind method, where we utilized VAE for adversarial sample generation and performed
Evasion and Data-Poison attack on financial and cybersecurity domain. We further proposed VAE-Deep-
WNN and chaotic based C-VAE-Deep-WNN, for the adversarial sample generation. Among all of the
generative models, VAE-Deep-WNN outperformed the rest the majority of the time. However, its chaotic
variant C-VAE-Deep-WNN performed almost similar or better than VAE-most of the datasets.In future,
we will perform the same VAE based attacks on time series, images, and regression problems. Further, we
can perform the proposed attacks on other machine learning models such as Multi-layer perceptron(MLP),
Boosting and Bagging Models.
References
Huang, L., Joseph, A. D., Nelson, B., Rubinstein, B. I., & Tygar, J. D. (2011, October). Adversarial machine
learning. In Proceedings of the 4th ACM workshop on Security and artificial intelligence (pp. 43-
58). https://doi.org/10.1145/2046684.2046692
Tabassi, E., Burns, K. J., Hadjimichael, M., Molina-Markham, A. D., & Sexton, J. T. (2019). A taxonomy
20
and terminology of adversarial machine learning. NIST IR, 2019, 1-29.
Long, T., Gao, Q., Xu, L., & Zhou, Z. (2022). A survey on adversarial attacks in computer vision:
Taxonomy, visualization and future directions. Computers & Security, 102847.
https://doi.org/10.1016/j.cose.2022.102847
Chakraborty, A., Alam, M., Dey, V., Chattopadhyay, A., & Mukhopadhyay, D. (2018). Adversarial attacks
and defences: A survey. arXiv preprint arXiv:1810.00069.
https://doi.org/10.6028/NIST.IR.8269-draft
Duan, Y., Zou, J., Zhou, X., Zhang, W., He, Z., Zhan, D., ... & Pan, Z. (2022). Adversarial attack via
dual-stage network erosion. Computers & Security, 122, 102888.
https://doi.org/10.1016/j.cose.2022.102888
Hwang, U., Park, J., Jang, H., Yoon, S., & Cho, N. I. (2019). Puvae: A variational autoencoder to purify
adversarial examples. IEEE Access, 7, 126582-12https://doi.org/10.1109/ACCESS.2019.2939352
Tabacof, P., Tavares, J., & Valle, E. (2016). Adversarial images for variational autoencoders. arXiv preprint
arXiv:1612.00155.
Qiu, S., Liu, Q., Zhou, S., & Wu, C. (2019). Review of artificial intelligence adversarial attack and defense
technologies. Applied Sciences, 9(5), 909. https://doi.org/10.3390/app9050909
Lowd, D., Meek, C., & Domingos, P. (2007). Foundations of adversarial machine learning.
Kos, J., Fischer, I., & Song, D. (2018, May). Adversarial examples for generative models. In 2018 ieee
security and privacy workshops (spw) (pp. 36-42). IEEE. https://doi.org/10.1109/SPW.2018.00014
Yu, M., & Sun, S. (2022). FE-DaST: Fast and effective data-free substitute training for black-box
adversarial attacks. Computers & Security, 113, 102555.
https://doi.org/10.1016/j.cose.2021.102555
Li, X., & Ji, S. (2020). Defense-vae: A fast and accurate defense against adversarial attacks. In Machine
Learning and Knowledge Discovery in Databases: International Workshops of ECML PKDD 2019,
Würzburg, Germany, September 16–20, 2019, Proceedings, Part II (pp. 191-207). Springer
International Publishing. https://doi.org/10.1007/978-3-030-43887-6_15
Cartella, Francesco, et al. "Adversarial attacks for tabular data: Application to fraud detection and
imbalanced data." arXiv preprint arXiv:2101.08030 (2021).
Gangadhar, K. S. N. V. K., Kumar, B. A., Vivek, Y., & Ravi, V. (2022). Chaotic Variational Auto Encoder
based One Class Classifier for Insurance Fraud Detection. arXiv preprint arXiv:2212.07802.
Vivek, Y., Ravi, V., & Krishna, P. R. (2022). Scalable feature subset selection for big data using parallel
hybrid evolutionary algorithm based wrapper under apache spark environment. Cluster Computing,
1-35. https://doi.org/10.1007/s10586-022-03725-w
Sun, H., Zhu, T., Zhang, Z., Xiong, D. J., & Zhou, W. (2021). Adversarial attacks against deep generative
21
models
on
data:
a
survey.
arXiv
preprint
arXiv:2112.00247.
https://doi.org/10.1109/TKDE.2021.3130903
Vivek, Y., Ravi, V., & Radhakrishna, P. (2022). Feature subset selection for big data via Chaotic Binary
Differential Evolution under Apache Spark. arXiv preprint arXiv:2202.03795.
Sarveswararao, V., Ravi, V., & Vivek, Y. (2023). ATM cash demand forecasting in an Indian bank with
chaos and hybrid deep learning networks. Expert Systems with Applications, 211, 118645.
https://doi.org/10.1016/j.eswa.2022.118645
Aihara, K., Takabe, T., & Toyoda, M. (1990). Chaotic neural networks. Physics Letters A, 144, 333-340.
https://doi.org/10.1016/0375-9601%2890%2990136-C
Zhang, J., Walter, G. G., Miao, Y., & Lee, W. N. W. (1995). Wavelet neural networks for function learning.
IEEE transactions on Signal Processing, 43(6), 1485-1497. https://doi.org/10.1109/78.388860
Zhang, Q., & Benveniste, A. (1992). Wavelet networks. IEEE transactions on Neural Networks, 3(6), 889-
898. https://doi.org/10.1109/72.165591
Said, S., Jemai, O., Hassairi, S., Ejbali, R., Zaied, M., & Amar, C. B. (2016, October). Deep wavelet
network for image classification. In 2016 IEEE International conference on systems, man, and
cybernetics (SMC) (pp. 000922-000927). IEEE. https://doi.org/10.1109/SMC.2016.7844359
Appiah, B., Qin, Z., Abra, A. M., & Kanpogninge, A. J. A. (2021). Decision tree pairwise metric learning
against adversarial attacks. Computers & Security, 106, 102268.
https://doi.org/10.1016/j.cose.2021.102268
Chauhan, N., Ravi, V., & Chandra, D. K. (2009). Differential evolution trained wavelet neural networks:
Application to bankruptcy prediction in banks. Expert Systems with Applications, 36(4), 7659-
7665. https://doi.org/10.1016/j.eswa.2008.09.019
Venkatesh, E. H., Vivek, Y., Ravi, V., & Shankar, O. S. (2022). Parallel and Streaming Wavelet Neural
Networks
for Classification and Regression under Apache Spark. arXiv preprint
arXiv:2209.03056.
Xiao, C., Li, B., Zhu, J. Y., He, W., Liu, M., & Song, D. (2018). Generating adversarial examples with
adversarial networks. arXiv preprint arXiv:1801.02610.
Yang, Z., Liu, X., Li, T., Wu, D., Wang, J., Zhao, Y., & Han, H. (2022). A systematic literature review of
methods and datasets for anomaly-based network intrusion detection. Computers & Security,
102675. https://doi.org/10.1016/j.cose.2022.102675
Aryal, K., Gupta, M., & Abdelsalam, M. (2021). A survey on adversarial attacks for malware analysis.
arXiv preprint arXiv:2111.08223.
Sadeghi, K., Banerjee, A., & Gupta, S. K. (2020). A system-driven taxonomy of attacks and defenses in
22
adversarial machine learning. IEEE transactions on emerging topics in computational intelligence,
4(4), 450-467. https://doi.org/10.1109/TETCI.2020.2968933
Kurakin, A., Goodfellow, I. J., & Bengio, S. (2018). Adversarial examples in the physical world. In
Artificial intelligence safety and security (pp. 99-112). Chapman and Hall/CRC.
Wang, D., Li, C., Wen, S., Nepal, S., & Xiang, Y. (2020). Man-in-the-middle attacks against machine
learning classifiers via malicious generative models. IEEE Transactions on Dependable and Secure
Computing, 18(5), 2074-2087. https://doi.org/10.1109/TDSC.2020.3021008
Xiang, W., Liu, C., & Zheng, S. (2021). Improving Visual Quality of Unrestricted Adversarial Examples
with Wavelet-VAE. arXiv preprint arXiv:2108.11032.
Camuto, A., Willetts, M., Roberts, S., Holmes, C., & Rainforth, T. (2021, March). Towards a theoretical
understanding of the robustness of variational autoencoders. In International Conference on
Artificial Intelligence and Statistics (pp. 3565-3573). PMLR.
Kingma,D & Welling, M. (2019), "An Introduction to Variational Autoencoders", Foundations and
Trends® in Machine Learning: Vol. 12: No. 4, pp 307-392. http://dx.doi.org/10.1561/2200000056
Kate, P., Ravi, V., & Gangwar, A. (2022). FinGAN: Chaotic generative adversarial network for analytical
customer relationship management in banking and insurance. Neural Computing and Applications,
1-14. https://doi.org/10.1007/s00521-022-07968-x
Wang, G., Guo, L., & Duan, H. (2013). Wavelet neural network using multiple wavelet functions in target
threat assessment. The Scientific World Journal, 2013. https://doi.org/10.1155/2013/632437
Harford, S., Karim, F., & Darabi, H. (2021). Generating adversarial samples on multivariate time series
using variational autoencoders. IEEE/CAA Journal of Automatica Sinica, 8(9), 1523-1538.
https://doi.org/10.1109/JAS.2021.1004108
Xu, J., Wen, Y., Yang, C., & Meng, D. (2020, December). An approach for poisoning attacks against rnn-
based cyber anomaly detection. In 2020 IEEE 19th International Conference on Trust, Security
and Privacy
in Computing and Communications (TrustCom) (pp. 1680-1687). IEEE.
https://doi.org/10.1109/TrustCom50675.2020.00231
Yerlikaya, F. A., & Bahtiyar, Ş. (2022). Data poisoning attacks against machine learning algorithms. Expert
Systems with Applications, 208, 118101. https://doi.org/10.1016/j.eswa.2022.118101
Biggio, B., Corona, I., Maiorca, D., Nelson, B., Šrndić, N., Laskov, P., ... & Roli, F. (2013). Evasion attacks
against machine learning at test time. In Machine Learning and Knowledge Discovery in
Databases: European Conference, ECML PKDD 2013, Prague, Czech Republic, September 23-
27, 2013, Proceedings, Part
III 13
(pp. 387-402). Springer Berlin Heidelberg.
https://doi.org/10.1007/978-3-642-40994-3_25
Breiman, L., Friedman, J., Olshen, R., & Stone, C. (1984). Cart. Classification and regression trees.
23
Saxena, D., & Cao, J. (2021). Generative adversarial networks (GANs) challenges, solutions, and
future directions. ACM Computing Surveys (CSUR), 54(3), 1-42.
https://doi.org/10.1145/3446374
24
|
|
http://arxiv.org/abs/2302.12949v1 | 2023-02-25T01:18:48 | 2023-02-25T01:18:48 | DeepOHeat: Operator Learning-based Ultra-fast Thermal Simulation in
3D-IC Design | Thermal issue is a major concern in 3D integrated circuit (IC) design.
Thermal optimization of 3D IC often requires massive expensive PDE simulations.
Neural network-based thermal prediction models can perform real-time prediction
for many unseen new designs. However, existing works either solve 2D
temperature fields only or do not generalize well to new designs with unseen
design configurations (e.g., heat sources and boundary conditions). In this
paper, for the first time, we propose DeepOHeat, a physics-aware operator
learning framework to predict the temperature field of a family of heat
equations with multiple parametric or non-parametric design configurations.
This framework learns a functional map from the function space of multiple key
PDE configurations (e.g., boundary conditions, power maps, heat transfer
coefficients) to the function space of the corresponding solution (i.e.,
temperature fields), enabling fast thermal analysis and optimization by
changing key design configurations (rather than just some parameters). We test
DeepOHeat on some industrial design cases and compare it against Celsius 3D
from Cadence Design Systems. Our results show that, for the unseen testing
cases, a well-trained DeepOHeat can produce accurate results with $1000\times$
to $300000\times$ speedup. | [
"Ziyue Liu",
"Yixing Li",
"Jing Hu",
"Xinling Yu",
"Shinyu Shiau",
"Xin Ai",
"Zhiyu Zeng",
"Zheng Zhang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12949v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12949v1",
"@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"
] | DeepOHeat: Operator Learning-based Ultra-fast
Thermal Simulation in 3D-IC Design
Ziyue Liu1, Yixing Li2, Jing Hu3, Xinling Yu1, Shinyu Shiau3, Xin Ai3, Zhiyu Zeng2 and Zheng Zhang1
1University of California at Santa Barbara, Santa Barbara, CA. Email: {ziyueliu, xyu644, zzhang01}@ucsb.edu
2 Cadence Design Systems, Austin, TX. Email: {yixingli, zzeng}@cadence.com
3 Cadence Design Systems, San Jose, CA. Email: {jinghu, shinyu, nathanai}@cadence.com
3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
9
4
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-Thermal issue is a major concern in 3D integrated
circuit (IC) design. Thermal optimization of 3D IC often re-
quires massive expensive PDE simulations. Neural network-based
thermal prediction models can perform real-time prediction for
many unseen new designs. However, existing works either solve
2D temperature fields only or do not generalize well to new
designs with unseen design configurations (e.g., heat sources and
boundary conditions). In this paper, for the first time, we propose
DeepOHeat, a physics-aware operator learning framework to
predict the temperature field of a family of heat equations with
multiple parametric or non-parametric design configurations.
This framework learns a functional map from the function space
of multiple key PDE configurations (e.g., boundary conditions,
power maps, heat transfer coefficients) to the function space
of the corresponding solution (i.e., temperature fields), enabling
fast thermal analysis and optimization by changing key design
configurations (rather than just some parameters). We test
DeepOHeat on some industrial design cases and compare it
against Celsius 3D from Cadence Design Systems. Our results
show that, for the unseen testing cases, a well-trained DeepOHeat
can produce accurate results with 1000× to 300000× speedup.
Index Terms-3D IC, thermal simulation, operator learning,
deep learning
I. INTRODUCTION AND RELATED WORK
The increasing transistor density on a silicon chip has led to
high power and heat density. The excessive heat can affect the
normal performance, reliability, and lifespan of semiconductor
chips. Due to the multiple stacked active silicon layers, 3D
IC design suffers from much higher power density [1]–[3].
Meanwhile, the increased complexity of 3D chips introduces
extra design configurations and system parameters and hence
prolongs the design cycle. Consequently, chip thermal opti-
mization, which provides the optimal thermal-aware floorplan
at an early stage, has become an important step in the 3D IC
design flow. Detailed and fast thermal simulators are needed
in various thermal-aware design optimization tools.
Discretization-based PDE solvers, such as finite-element
and finite-difference methods, have been widely used for
3D chip thermal analysis. The finite-element method (FEM),
though computationally expensive, provides the best accuracy
and flexibility [3], and is mostly used in commercial solvers
such as Celsius, ANSYS, and COMSOL. The finite-difference
methods (FDM) are simpler to implement and are widely
used in open-source solvers [4]–[6]. These thermal simulators
provide accurate temperature estimations but cost extensive
computational resources. Once a new design is generated,
designers need to re-run many simulations to optimize the
design case, which can be unaffordable for complicated tasks.
Some surrogate models have been developed to reduce the cost
of thermal prediction. For instance, model-order reduction [7],
[8] can accelerate each time-domain simulation via reducing
the number of state variables in a dynamic system. Data-driven
regression methods [9], [10] can model the dependence on
certain design parameters in a specified range, but the training
step often needs massive high-resolution PDE simulation
data. Neither technique can capture the dependence of the
temperature field on key PDE configurations (e.g., boundary
conditions, non-parametric heat source configurations).
Neural network-based methods can perform real-time pre-
dictions for unseen data. Several data-driven [11]–[13] and
physics-informed neural network-based (PINN) methods [14],
[15] have been proposed. However, these existing works either
fail to solve 3D full-chip temperature fields, lack generaliza-
tion to different PDE configurations, or need to be combined
with traditional solvers or additional computations. For exam-
ple, the data-driven method in [11] needs to be combined with
a coarse thermal profile obtained by a traditional FEM-based
method. The ML-based transient thermal solver in [12] needs
to be combined with convolution operations. The autoencoder-
decoder-based methods in [13], [14] are not applicable to 3D
volumetric power maps. The PINN-based approach in [15]
only takes input from geometric parameters rather than general
configurations, such as boundary conditions and power maps.
Paper Contributions. We propose the DeepOHeat frame-
work, which leverages recent advances in operator learning,
as an end-to-end thermal solver for ultra-fast 3D chip thermal
prediction under various (both parametric and non-parametric)
PDE configurations. Our contributions are as follows:
• For the first time, an end-to-end operator learning-based 3D
IC thermal simulator is proposed to solve a family of heat
equations under various PDE configurations.
• We propose a modular approach that encodes the PDE con-
figurations of 3D IC designs, including arbitrarily stacked
cuboidal geometry,
individually defined boundary condi-
tions, 2D/3D power maps, and full-chip flexible material
conductivity distribution.
• The proposed DeepOHeat achieves 1000× to 300000×
speed up with satisfactory accuracy when compared against
Celsius 3D, a FEM-based commercial solver.
II. BACKGROUND: THERMAL SIMULATION IN 3D IC
Here we provide a brief overview of thermal simulation
in the context of 3D IC design. Thermal simulation aims to
predict the temperature field of a given object (chip) S by
solving the heat conduction PDE globally. The 3D governing
PDE is written as
(cid:18)
(cid:19)
(cid:18)
(cid:19)
(cid:18)
(cid:19)
k
k
k
+
+
∂T
∂y1
∂T
∂y3
∂
∂y3
∂T
∂y2
∂
∂y2
∂
∂y1
+qV = ρcp
∂T
∂t
(1)
where T and qV represent the temperature and the rate of inter-
nally generated energy per unit volume at any spatial-temporal
location (y1, y2, y3, t) ≡ (y, t). Here k, ρ, cp are material-
specific properties of S denoting material conductivity, mass
density, and heat capacity, respectively.
,
We focus on the static temperature field for isotropic materi-
dt = 0:
als (i.e., ky1 =ky2 =ky3=k), and simplify (1) by setting dT
k * ∇2T + qV = 0,
(2)
in which ∇2 stands for the laplacian operator. We then solve
(2), with appropriately defined boundary conditions in the
context of 3D IC design, for various chip designs to find the
optimal design by thresholding the temperature field.
III. MODULAR CHIP CONFIGURATIONS FOR THERMAL
ANALYSIS
Without loss of generality, we model the geometry of a chip
as single or multiple stacked rectangular cuboid(s) as shown in
Fig. 1. For each cuboid, its temperature field depends on some
key design configurations which include, but are not limited
to, material/geometric parameters.
The first family of design configurations is the boundary
condition (BC) for each individual surface that is exposed to
the environment. We consider the following types of BCs:
• Dirichlet: the temperature field on a surface is fixed as qd:
T = qd.
• Neumann: the temperature flux on a surface is fixed
− k
∂T
∂yi
= qn,
(3)
(4)
where qn represents the local heat flux density at the surface.
• Adiabatic: a special case of Neumann BC when qn is 0
everywhere. This indicates a perfectly insulated surface.
• Convection: also known as Newton BC. This BC corre-
sponds to a balance between heat conduction and convection
in the same direction at the surface:
− k *
∂T
∂yi
= h(T − Tamb).
(5)
Here h and Tamb stand for the heat transfer coefficient at
the surface and the ambient temperature.
The second family of key design configurations are the
locations and intensity of external/internal heat sources. This
work considers the following two types of heat sources:
Fig. 1: Schematic figures of chip designs in thermal simulation.
The left one shows a general single cuboid chip model, of
which the right one is a concrete implementation.
• Surface/2D power: defined by the Neumann BC (4) when
qn is positive somewhere. Such qn is referred to as a
surface/2D power map.
• Volumetric/3D power: defined by the heat equation (2)
when qV is positive somewhere. Such qV is referred to as
a volumetric/3D power map.
We now present the thermal chip designs by several in-
dependent modular configurations as shown in Fig. 1. The
left figure shows a general single cuboid chip with different
BCs defined on each surface. The BC for the top surface also
defines a 2D power map. The uniform blue color for the dots
inside the cuboid indicates homogeneously distributed conduc-
tivity without any internal heat source. As a comparison, the
right figure indicates a concrete implementation. In this model,
we have volumetric power shown as the red dots in the middle
layer of the bottom cuboid with adiabatic BCs on all side
surfaces and convection BCs on the top and bottom surfaces.
The different colors applied to the convection surfaces and the
internal blue dots indicate different heat transfer coefficients
and inhomogeneously distributed conductivity.
The above design configurations can change the PDE struc-
ture and temperature field of a 3D IC significantly. Many of
them are described as functions instead of parameters, and they
cannot be handled by traditional machine learning techniques.
IV. THE DEEPOHEAT FRAMEWORK
Now we present DeepOHeat: a self-supervised operator
learning-based neural thermal solver enabling ultra-fast ther-
mal prediction. DeepOHeat takes functions that characterize
key design configurations (e.g., power maps, boundary condi-
tions, domain of interest) rather than just material or geometric
parameters as inputs to predict temperature fields in real time.
The key ideas of DeepOHeat are shown in Fig. 2.
A. Learning the Solution Dependence on Multiple PDE Con-
figurations via a Multi-input DeepONet
For succinct notations, we denote the heat equation of
interest (2) in the following general format
N (s(u1, u2, . . . , uk)(y)) = 0.
(6)
Here N is a symbolic representation of the simplified heat
equation (2). We denote the temperature field, i.e., the solution
Fig. 2: The proposed DeepOHeat framework.
function of this PDE, as s. A concrete temperature field is de-
termined by a certain chip design specified by various config-
urations such as a power map and BCs. We present in general
k design configurations of interest (i.e., PDE configurations),
both parametric and non-parametric, as u1, u2, . . . , uk. Given
specific PDE configurations {ui}k
i=1, the temperature field on
the domain of interest is then evaluated on the corresponding
spatial coordinates y, yielding the final formal representation
as s(u1, u2, . . . , uk)(y).
To avoid any potential confusion, we emphasize that each
ui, i = 1, 2, . . . , k, no matter which representation form it
is represented as a function instead of a parameter
uses,
in DeepOHeat. Therefore, DeepOHeat is designed to learn a
functional map Gθ (θ denote all the neural network parameters
in DeepOHeat, i.e., weights and bias) that maps the function
space spanned by the PDE configurations {ui}k
i=1, denoted by
U : U1 × U2 × * * * × Uk, to the corresponding function space
S spanned by its temperature field s(u1, u2, . . . , uk)(y), i.e.,
Gθ : U → S.
(7)
Such a map means that, a well-trained DeepOHeat is capable
of accurately predicting the temperature field given any unseen
design drawn from the same PDE configurations space U. To
learn this functional map, we leverage recent works in operator
learning, DeepONets [16] and multi-input DeepONets [17].
Encoding Design Configurations as Input Functions
of DeepOHeat. We consider the general case that k PDE
configurations are considered. Correspondingly, we will have k
different input functions. For the ith configuration, we consider
a random sample u(j)
drawn from its function space Ui. This
function (e.g., a 2D power map) is identified by its values
on fixed locations (x1, x2, . . . , xm) (e.g., some grid points of
a surface), and is then fed as an m-dimensional vector into
the ith sub-network block, namely the ith "branch net" [16].
Repeating this process for all k design configurations, we
then have k different input functions and the corresponding
i
branch nets. All these configurations are from a certain design
thus share the same domain of interest. we then input all the
coordinates sampled from this simulation domain into another
sub-network, namely the "trunk net". To effectively learn the
high-frequency information of the temperature field, we also
apply a Fourier features mapping [18] to the first layer of the
trunk net, which is shown inside the dashed red box in the
trunk net part of Fig. 2.
Example. We consider the example shown in the left part
of Fig. 2. We see that for this single-cuboid chip, we define
a 2D power map on the top surface. The power map that can
have an arbitrary layout of heat sources, is with no doubt a
non-parametric function. We identify this 2D power map by its
values on equispaced grid points, which naturally form a two-
dimensional matrix as shown in Fig. 2. We then flatten this
matrix to a vector and feed it into the first branch net. If we
consider a 3D power map, everything will be exactly the same
except it will be identified by its values on three-dimensional
equispaced grid points. Meanwhile, we define a convection
BC on the bottom surface of the chip with a uniform HTC
distribution of value hb. In this case, the HTC on the bottom
surface can be seen as a constant function therefore only one
grid point is needed to identify this configuration. We then
input hb into the second branch net. Note that hb should still
be regarded as a function that has a parametric format instead
of a parameter. If the surface has an inhomogeneous HTC
distribution, one can simply encode it similarly as we encode a
2D power map. For the side surfaces of the chip, other BCs are
defined accordingly and encoded as other DeepOHeat inputs
or just fixed invariant configurations.
With k defined PDE configuration inputs and the domain
coordinates, we have in total k branch nets and one trunk net,
each of which outputs a q-dimensional feature vector. We then
follow the ideas in [17] to combine all these output features
via Hadamard (element-wise) product and then sum up the
resulting vector to a scalar output that represents the predicted
temperature field, denoted as T = Gθ(u1, u2, . . . , uk)(y).
B. Training DeepOHeat via Physics-Informed Loss
Now we explain how to train the DeepOHeat network.
According to [16], a DeepONet is generally trained via a data-
driven approach, in which data triplets (y, {ui}k
i=1, s) need
to be collected via massive runs of numerical simulation. For
relatively complicated chip designs, a single FEM simulation
might cost hours or even days to complete. Therefore, large-
scale data collection is practically prohibitive in this context.
Instead, we follow the idea from a recent approach [19], which
leveraged the ideas from physics-informed neural networks
(PINNs) [20] to train a single-input DeepONet for solving
parametric PDEs. We extend their work to handle multi-input
scenarios as shown on the right of Fig. 2.
Again we consider the aforementioned general case where
k chip design configurations are considered. For the ith
configuration ui, we first index all the coordinates that are
located in its designated regions, such as a boundary surface,
denoted as yi. Then on yi, we impose a physics constraint
Li. If ui represents a power map, we denote Li as
Li = (cid:107)P (Gθ(u1, u2, . . . , uk)(yi))(cid:107) .
For a 2D power map, P is a symbolic representation of the
Neumann BC (4). For a 3D power map, P will represent the
heat equation (2) with non-zero qV . If ui represents a general
BC, such as convection or Dirichlet BC, we denote Li as
(8)
Li = (cid:107)Bi (Gθ(u1, u2, . . . , uk)(yi))(cid:107) ,
where Bi denotes the formulation of the corresponding BC.
For the entire domain of interest, we impose the PDE con-
straint, except for the region where a 3D power map is
imposed, as
(9)
Lr = (cid:107)N (Gθ(u1, u2, . . . , uk)(y))(cid:107) .
(10)
We then obtain the total loss as
Ltotal = Lr +
k
(cid:88)
i=1
Li.
(11)
We train DeepOHeat by minimizing the total loss via gradient
descent based on automatic differentiation algorithms [21].
V. EXPERIMENTS
In this section, we present two implementations of the pro-
posed DeepOHeat and compare our results with Celsius 3D, a
state-of-the-art numerical solver for 3D chip thermal analysis
from Cadence Design Systems. Our results demonstrate that,
for any unseen designs, a well-trained DeepOHeat is capable
of producing satisfactory results with at least 1000× speedup.
A. 2D Power Map Configuration on The Top Surface
As the power map controls the heat generation in a certain
chip design, the prediction performance of DeepOHeat on
unseen new power maps are of major interest. For illustration,
here we focus solely on optimizing a 2D power map by
training a single-input DeepOHeat.
1) Problem setup: We consider a 21 × 21 × 11 mesh
grid-based single-cuboid geometry which represents a 1mm ×
1mm × 0.5mm chip in practice. This geometry is similar to
the one shown in the left of Fig. 1 and has in total of 4851
grid points. We define a 2D power map on the top surface,
in which a one-unit power corresponds to a 0.00625(mW )
power in real-world settings. We define Adiabatic BC on all
side surfaces and convection BC on the bottom surface with
HTC = 500W/(m2K) and Tamb = 298.15(K). A homoge-
neous thermal conductivity k = 0.1W/(mK) is assigned to
the entire domain and no volumetric power is applied.
2) Generating training power maps: We sample all the
training power maps from a two-dimensional standard Gaus-
sian random field (GRF) with the length scale parameter equal
to 0.3. The length scale controls the smoothness of the sampled
functions. We choose 0.3 in this example to generate relatively
smooth power maps as shown on the left of Fig. 4. One
can also tune this parameter to generate training power maps
similar to those in specific optimization tasks. Corresponding
to our 21 × 21 mesh grids on the top surface, we identify each
power map by its values on these coordinates formatted as
a matrix of the same size. We then flatten these matrices to
vectors of length 441 as the input of the branch net.
3) DeepOHeat settings: In this example, we use a 9-layer
branch net with 256 neurons per layer combined with a 6-
layer trunk net with 128 neurons per layer. The first layer
of the trunk net is a Fourier features mapping [18] where
its coefficients are sampled from a normal distribution with
zero mean and 2π standard deviation. The input dimensions
of the branch net and the trunk net are 441 and 3, which
correspond to the dimensions of the encoded power map and
the 3D spatial coordinates, respectively. The output dimensions
of the two sub-networks are both 128. We set all the activation
functions as the "Swish" function proposed by Ramachandra
et al. [22]. We find in experiments that Swish yields relatively
better results compared to other popular activation functions
used in PINNs, such as Sine and Tanh.
4) Training settings: We train this DeepOHeat by 10000
iterations to guarantee convergence, which takes 10 hours on
a single Tesla V100 GPU. In each iteration, 50 input functions
are sampled from the given GRF and fed into the branch net.
For each function, the 4851 mesh grid points of the entire
simulation domain are fed into the trunk net. We therefore
have a 242550×441 input for the branch net and a 242550×3
input for the trunk net. We choose the initial learning rate as
1e-3 and decay the learning rate by 0.9× every 500 iterations.
5) Test settings: We aim to compare the predicted temper-
ature fields with Celsius 3D element-wisely on unseen new
power maps. There exists a minor discrepancy between the
power maps of Celsius 3D and DeepOHeat. As shown in
the middle of Fig. 4, the power maps in Celsius 3D are tile-
based, different from the grid-based ones in DeepOHeat. To
accommodate these realistic power maps used in Celsius 3D,
we interpolate the 20 × 20 tile-based power maps to 21 × 21
grid-based power maps, as shown in the middle and right of
Fig. 4. Such a transformation not only enables DeepOHeat
Fig. 3: Predicted temperature fields for different 2D power maps defined on the top surface.
Fig. 4: Left: a power map for training; Middle and right: test
power maps for Celsius 3D and for DeepOHeat, respectively.
TABLE I: Mean and peak errors for all power maps
MAPE (%)
PAPE (%)
p1
0.03
0.10
p2
0.03
0.20
p3
0.02
0.24
p4
0.05
0.38
p5
0.14
0.52
p6
0.04
0.49
p7
0.13
0.71
p8
0.07
0.66
p9
0.16
1.00
p10
0.08
0.40
to accept almost the same realistic power maps as in Celsius
3D but also smooths out these discretely defined power maps.
As the ones we used for training are all continuous functions,
using the smoothed rather than discrete power maps for testing,
in a heuristics sense, would have lower generalization errors.
6) Results: All the results of this example are shown in
Fig. 3. From the left to the right, we gradually increase the
complexity of the unseen test power maps. We simply refer
them to as p1, p2, . . . , p10 and report
their mean absolute
percentage errors (MAPEs) and peak absolute percentage
errors (PAPEs) in Table. I. We see that DeepOHeat is capable
of predicting the temperature fields for all these unseen test
power maps with satisfactory accuracy. Moreover, we want
to highlight the strong generalization power of DeepOHeat.
All these power maps, though most of which are composed
of heat blocks, are quite different from the training power
maps. Specifically, the last power map p10 can be seen as
a very wiggly function in this context. We see that p10 has
multiple small-sized heat sources and one of them is also given
a relatively large power. For such a complicated power map,
DeepOHeat still yields satisfactory predictions at the most part
of the domain, except for mildly overestimated temperatures
Fig. 5: Temperature fields under different HTC configurations.
at the regions between those small-sized heat sources.
7) Speedup:
In this example, Celsius 3D costs approxi-
mately 5min for a single simulation on an Intel Xeon Gold
6148 CPU. The post-training prediction time for DeepOHeat is
0.1s on the same CPU and 0.001s on a Tesla V100 GPU, which
correspond to a 3000× and 300000× speedup, respectively.
For a larger-scale or more complicated design,
the com-
putational cost for FEM-based solvers will rapidly increase
while remaining unchanged for DeepOHeat. We expect more
significant speed-up in realistic thermal optimization tasks.
B. HTC Configurations on Both Top and Bottom Surfaces
DeepOHeat can predict the thermal behaviors influenced by
multiple design configurations. To demonstrate this, we build
a dual-input DeepOHeat to predict the temperature field of a
3D IC influenced by the HTCs on two surfaces simultaneously.
In this example, we avoid introducing detailed settings instead
focus on those that are different from the previous example.
We consider a similar cuboid chip geometry with the size
of 1mm × 1mm × 0.55mm but all 7000 points are randomly
sampled inside (on) the entire domain. We don't use mesh
because we don't have mesh-based encoding for this example.
We define convection BCs for both top and bottom surfaces
and assume HTCs are constantly distributed. We define a
single-layer uniform volumetric power with a thickness of
0.05mm and the value of 0.000625(W ). The settings for side
surfaces and thermal conductivity are the same as before.
In each iteration, we sample 20 i.i.d samples uniformly from
a squared area [333.33, 1000] × [333.33, 1000] (W/m2K),
corresponding to 20 different HTCs for both two surfaces.
For each sampled HTC tuple, we randomly draw a new set
of coordinates from the simulation domain. Combining these,
we have two 140000 × 1 inputs for the two branch nets and a
140000 × 3 input for the trunk net.
In this example, we use relatively simpler networks for the
two branch nets, each of which contains 5 fully-connected
layers with only 20 neurons per layer. The trunk net still has
6 layers with 128 neurons per layer and a Fourier features
mapping defined in the first layer with a π standard deviation
this time. The output dimensions for all sub-networks are 50.
After training DeepOHeat for 5000 iterations (about 2
hours), we evaluate its performance on some unseen values
sampled from the same 2D region. For example, we pick
two sets of HTCs, (1000, 333.33) and (500, 500), as the test
cases and show the corresponding results in each row of
Fig. 5. Although different HTCs make only slight differences,
DeepOHeat still yields accurate predictions in both cases. As
shown by the color bars in Fig. 5, the differences in the
predicted maximal and minimal temperatures between Celsius
3D and DeepOHeat are within 0.1(K). In the first case where
HTC = 1000 on the top surface and HTC = 333.33 on the
bottom surface (first row in Fig. 5), the MAPE and PAPE of
DeepOHeat are 0.032% and 0.043%. In the second case where
HTC = 500 on both two surfaces (second row in Fig. 5), the
MAPE and PAPE of DeepOHeat are 0.011% and 0.025%.
Celsius 3D costs around 2min for a single simulation on
the aforementioned CPU. The runtime for DeepOHeat remains
unchanged. Therefore the speed up in this example is 1200×
and 120000× on CPU and GPU, respectively.
VI. CONCLUSION
In this work, for the first time, we have introduced a physics-
aware operator learning framework, named DeepOHeat, to
perform ultra-fast 3D chip thermal prediction under multiple
chip design configurations. We have proposed a modular chip
thermal model to encode various chip geometries, power maps,
and boundary conditions. We have applied a physics-informed
multi-input DeepONet to seamlessly solve a family of heat
take multiple BCs and the power map as
equations that
input configurations with no data supervision required. The
experiments on two specific tasks show that a well-trained
DeepOHeat can predict
the temperature fields on unseen
new chip designs with high accuracy while no noticeable
simulation time is required. In the future, we will further
investigate how DeepOHeat performs in more complicated
geometries and in optimizing 3D power maps.
REFERENCES
[1] H. Delaram, A. Dastfan, and M. Norouzi, "Optimal thermal placement
and loss estimation for power electronic modules," IEEE Trans. Comp.,
Packag. and Manufacturing Tech., vol. 8, no. 2, pp. 236–243, 2018.
[2] K. Cao, J. Zhou, T. Wei, M. Chen, S. Hu, and K. Li, "A survey of
optimization techniques for thermal-aware 3D processors," Journal of
Systems Architecture, vol. 97, pp. 397–415, 2019.
[3] H. Sultan, A. Chauhan, and S. R. Sarangi, "A survey of chip-level
thermal simulators," ACM Comput. Surv., vol. 52, no. 2, pp. 1–35, 2019.
[4] A. Sridhar, A. Vincenzi, M. Ruggiero, T. Brunschwiler, and D. Atienza,
"3D-ICE: Fast compact transient thermal modeling for 3D ICs with
inter-tier liquid cooling," in Proc. ICCAD, 2010, pp. 463–470.
[5] P. Li, L. T. Pileggi, M. Asheghi, and R. Chandra, "Efficient full-chip
thermal modeling and analysis," in ICCAD, 2004, pp. 319–326.
[6] --, "IC thermal simulation and modeling via efficient multigrid-based
approaches," IEEE Trans. CAD Integr. Circuits Syst., vol. 25, no. 9, pp.
1763–1776, 2006.
[7] T.-Y. Wang and C. C.-P. Chen, "SPICE-compatible thermal simulation
with lumped circuit modeling for thermal reliability analysis based
on modeling order reduction," in International Symposium on Signals,
Circuits and Systems, 2004, pp. 357–362.
[8] J. Xie and M. Swaminathan, "System-level thermal modeling using
nonconformal domain decomposition and model-order reduction," IEEE
Trans. CPMT, vol. 4, no. 1, pp. 66–76, 2013.
[9] S. K. Samal, S. Panth, K. Samadi, M. Saeidi, Y. Du, and S. K.
Lim, "Adaptive regression-based thermal modeling and optimization for
monolithic 3-D ICs," IEEE Transactions on Computer-Aided Design of
Integrated Circuits and Systems, vol. 35, no. 10, pp. 1707–1720, 2016.
[10] S. K. Samal, S. Panth, K. Samadi, M. Saedi, Y. Du, and S. K. Lim,
"Fast and accurate thermal modeling and optimization for monolithic
3D ICs," in Proc. Design Automation Conference, 2014, pp. 1–6.
[11] J. Wen, S. Pan, N. Chang, W.-T. Chuang, W. Xia, D. Zhu, A. Kumar,
E.-C. Yang, K. Srinivasan, and Y.-S. Li, "Dnn-based fast static on-chip
thermal solver," in Semiconductor Thermal Measurement, Modeling &
Management Symposium, 2020, pp. 65–75.
[12] A. Kumar, N. Chang, D. Geb, H. He, S. Pan, J. Wen, S. Asgari,
M. Abarham, and C. Ortiz, "Ml-based fast on-chip transient thermal
simulation for heterogeneous 2.5 d/3D IC designs," in International
Symposium on VLSI Design, Automation and Test, 2022, pp. 1–8.
[13] R. Ranade, H. He, J. Pathak, N. Chang, A. Kumar, and J. Wen, "A
thermal machine learning solver for chip simulation," in ACM/IEEE
Workshop on Machine Learning for CAD, 2022, pp. 111–117.
[14] H. He and J. Pathak, "An unsupervised learning approach to solving heat
equations on chip based on auto encoder and image gradient," arXiv
preprint arXiv:2007.09684, 2020.
[15] O. Hennigh, S. Narasimhan, M. A. Nabian, A. Subramaniam,
K. Tangsali, Z. Fang, M. Rietmann, W. Byeon, and S. Choudhry, "Nvidia
simnetTM: An ai-accelerated multi-physics simulation framework," in Int.
Conf. Computational Science. Springer, 2021, pp. 447–461.
[16] L. Lu, P. Jin, G. Pang, Z. Zhang, and G. E. Karniadakis, "Learning
nonlinear operators via deeponet based on the universal approximation
theorem of operators," Nature Machine Intelligence, vol. 3, no. 3, pp.
218–229, 2021.
[17] P. Jin, S. Meng, and L. Lu, "Mionet: Learning multiple-input operators
via tensor product," arXiv preprint arXiv:2202.06137, 2022.
[18] M. Tancik, P. Srinivasan, B. Mildenhall, S. Fridovich-Keil, N. Raghavan,
U. Singhal, R. Ramamoorthi, J. Barron, and R. Ng, "Fourier features let
networks learn high frequency functions in low dimensional domains,"
Advances in Neural Information Processing Systems, vol. 33, pp. 7537–
7547, 2020.
[19] S. Wang, H. Wang, and P. Perdikaris, "Learning the solution operator
of parametric partial differential equations with physics-informed deep-
onets," Science advances, vol. 7, no. 40, p. eabi8605.
[20] M. Raissi, P. Perdikaris, and G. E. Karniadakis, "Physics-informed
neural networks: A deep learning framework for solving forward and
inverse problems involving nonlinear partial differential equations,"
Journal of Computational physics, vol. 378, pp. 686–707, 2019.
[21] A. G. Baydin, B. A. Pearlmutter, A. A. Radul, and J. M. Siskind,
"Automatic differentiation in machine learning: a survey," Journal of
Marchine Learning Research, vol. 18, pp. 1–43, 2018.
[22] P. Ramachandran, B. Zoph, and Q. V. Le, "Searching for activation
functions," arXiv preprint arXiv:1710.05941, 2017.
|
|
http://arxiv.org/abs/2302.12948v2 | 2023-05-12T23:50:47 | 2023-02-25T01:18:09 | Agile Modeling: From Concept to Classifier in Minutes | The application of computer vision to nuanced subjective use cases is
growing. While crowdsourcing has served the vision community well for most
objective tasks (such as labeling a "zebra"), it now falters on tasks where
there is substantial subjectivity in the concept (such as identifying "gourmet
tuna"). However, empowering any user to develop a classifier for their concept
is technically difficult: users are neither machine learning experts, nor have
the patience to label thousands of examples. In reaction, we introduce the
problem of Agile Modeling: the process of turning any subjective visual concept
into a computer vision model through a real-time user-in-the-loop interactions.
We instantiate an Agile Modeling prototype for image classification and show
through a user study (N=14) that users can create classifiers with minimal
effort under 30 minutes. We compare this user driven process with the
traditional crowdsourcing paradigm and find that the crowd's notion often
differs from that of the user's, especially as the concepts become more
subjective. Finally, we scale our experiments with simulations of users
training classifiers for ImageNet21k categories to further demonstrate the
efficacy. | [
"Otilia Stretcu",
"Edward Vendrow",
"Kenji Hata",
"Krishnamurthy Viswanathan",
"Vittorio Ferrari",
"Sasan Tavakkol",
"Wenlei Zhou",
"Aditya Avinash",
"Enming Luo",
"Neil Gordon Alldrin",
"MohammadHossein Bateni",
"Gabriel Berger",
"Andrew Bunner",
"Chun-Ta Lu",
"Javier A Rey",
"Giulia DeSalvo",
"Ranjay Krishna",
"Ariel Fuxman"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12948v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12948v2",
"@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",
"cs.CV"
] | 3
2
0
2
y
a
M
2
1
]
G
L
.
s
c
[
2
v
8
4
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Agile Modeling: From Concept to Classifier in Minutes
Otilia Stretcu* 1, Edward Vendrow* 1,2, Kenji Hata* 1, Krishnamurthy Viswanathan1,
Vittorio Ferrari1, Sasan Tavakkol1, Wenlei Zhou1, Aditya Avinash1, Enming Luo1,
Neil Gordon Alldrin1, MohammadHossein Bateni1, Gabriel Berger1, Andrew Bunner1,
Chun-Ta Lu1, Javier Rey1, Giulia DeSalvo1, Ranjay Krishna3, Ariel Fuxman1
1 Google Research,
2 Stanford University,
3 University of Washington
Contact: [email protected], [email protected]
Abstract
The application of computer vision to nuanced subjec-
tive use cases is growing. While crowdsourcing has served
the vision community well for most objective tasks (such as
labeling a "zebra"), it now falters on tasks where there is
substantial subjectivity in the concept (such as identifying
"gourmet tuna"). However, empowering any user to de-
velop a classifier for their concept is technically difficult:
users are neither machine learning experts nor have the pa-
tience to label thousands of examples. In reaction, we intro-
duce the problem of Agile Modeling: the process of turning
any subjective visual concept into a computer vision model
through a real-time user-in-the-loop interactions. We in-
stantiate an Agile Modeling prototype for image classifi-
cation and show through a user study (N=14) that users
can create classifiers with minimal effort under 30 minutes.
We compare this user driven process with the traditional
crowdsourcing paradigm and find that the crowd's notion
often differs from that of the user's, especially as the con-
cepts become more subjective. Finally, we scale our ex-
periments with simulations of users training classifiers for
ImageNet21k categories to further demonstrate the efficacy.
1. Introduction
Whose voices, and therefore, whose labels should an im-
age classifier learn from? In computer vision today, the an-
swer to this question is often left implicit in the data col-
lection process. Concepts are defined by researchers before
curating a dataset [13]. Decisions for which images con-
stitute positive versus negative instances are conducted by
majority vote of crowd workers annotating this pre-defined
set of categories [32, 57]. An algorithm then trains on this
aggregated ground truth, learning to predict labels that rep-
resent the crowd's majoritarian consensus.
As computer vision matures, its application to nuanced,
*Equal contribution.
Figure 1: Visual concepts can be nuanced and subjec-
tive, differing from how a majoritarian crowd might label
a concept. For example, a graduate student may think that
well-prepared tuna sandwiches are considered gourmet
tuna, but sushi chef might disagree.
subjective use cases is burgeoning. While crowdsourcing
has served the vision community well on many objective
tasks (e.g. identifying ImageNet [13] concepts like "zebra",
"tiger"), it now falters on tasks where there is substantial
subjectivity [21]. Everyday people want to scale their own
decision-making on concepts others may find difficult to
emulate: for example, in Figure 1, a sushi chef might covet
a classifier to source gourmet tuna for inspiration. Major-
ity vote by crowd workers may not converge to the same
definition of what makes a tuna dish gourmet.
This paper highlights the need for user-centric ap-
proaches to developing real-world classifiers for these sub-
jective concepts. To define this problem space, we recog-
nize the following challenges. First, concepts are subjec-
tive, requiring users to be embedded in the data curation
process. Second, users are usually not machine learning ex-
perts; we need interactive systems that elicit the subjective
decision boundary from the user. Third, users don't have
the patience nor resources to sift through the thousands of
training instances that is typical for most image classifica-
tion datasets [13, 35, 29]-for example, ImageNet anno-
tated over 160M images to arrive at their final 14M version.
In order to tackle these challenges, we introduce the
1
SandwichesareNOTgourmet.Thissandwichlookselegant.
problem of Agile Modeling: the process of turning any vi-
sual concept into a computer vision model through a real-
time user-in-the-loop process. Just as software engineer-
ing matured from prescribed procedure to "agile" software
packages augmenting millions of people to become soft-
ware engineers, Agile Modeling aims to empower anyone
to create personal, subjective vision models. It formalizes
the process by which a user can initialize and interactively
guide the training process while minimizing the time and ef-
fort required to obtain a model. With the emergent few-shot
learning capabilities of vision foundation models [46, 24],
now is the right time to begin formalizing and developing
Agile Modeling systems.
We instantiate an Agile Modeling prototype for im-
age classification to highlight the importance of involving
the user-in-the-loop when developing subjective classifiers.
Our prototype allows users to bootstrap the learning pro-
cess with a single language description of their concept
(e.g. "gourmet tuna") by leveraging vision-language foun-
dation models [46, 24]. Next, our prototype uses active
learning to identify instances that if labeled would maxi-
mally improve classifier performance. These few instances
are surfaced to the user, who is only asked to identify which
instances are positive, something they can do even without
a background in machine learning. This iterative process
continues with more active learning steps until the user is
satisfied with their classifier's performance.
Our contributions are:
1. We formulate the Agile Modeling problem, which puts
users at the center of the image classification process.
2. We demonstrate that a real-time prototype can be built
by leveraging SOTA image-text co-embeddings for
fast image retrieval and model training. With our opti-
mizations, each round of active learning operates over
over 10M images and can be performed on a single
desktop CPU in a few minutes. In under 5 minutes,
user-created models outperform zero-shot classifiers.
3. In a setting that mimics real-world conditions, we
compare models trained with labels from real users
versus crowd raters. We find that the value of a user
increases when the concept is nuanced or difficult.
4. We verify the results of the user study with a simulated
experiment of 100 more concepts in ImageNet21k.
2. Related work
Our work draws inspiration from human-in-the-loop,
personalization, few-shot, and active learning.
Building models with humans-in-the-loop. Involving hu-
mans in the training process has a long history in crowd-
sourcing [15, 1, 42, 17], in developmental robotics [59, 28,
36], and even in computer vision [31, 11, 67, 30, 41] and is
recently all the rage in large language modeling [40]. How-
ever, all these methods are primarily focused on improv-
ing model behavior. In other words, they ask "how can we
leverage human feedback or interactions to make a better
model?" In comparison, we take a user-centric approach
and ask, "how can we design a system that can empower
users to develop models that reflect their needs?"
With this framing in mind, our closest related work be-
longs comes from the systems community [43, 47, 63, 39].
Tropel [43] automated the process of large-scale annotation
by having users provide a single positive example; and ask-
ing the crowd to determine whether other images are similar
to it. For subjective concepts, particularly those with multi-
ple visual modes, a single image may be insufficient to con-
vey the meaning of the concept to the crowd. Others such
as Snorkel [47, 63] circumvented large-scale crowd label-
ing through the use of expert-designed labeling functions to
automatically annotate a large, unlabeled dataset. However,
in computer vision, large datasets of images contain meta-
data that is independent of the semantics captured within the
photo [60]. With the recent emergent few-shot capabilities
in large vision models, its now time to tackle the human-in-
the-loop challenges through a modeling lens appropriate for
the computer vision community. Our prototype can train a
model using active learning on millions of images on a sin-
gle CPU in a matter of minutes.
Personalization in computer vision. Although personal-
ization [26, 7, 20] is an existing topic in building classifi-
cation, detection, and image synthesis, these methods are
often devoid of real user interactions, and test their resul-
tant models on standard vision datasets. Conversely, we run
a study with real users, focus on real-world sized datasets
and on new, subjective concepts.
Zero and few-shot learning. Since users have a limited
patience for labeling, Agile Modeling aims to minimize
the amount of labeling required, opting for few-shot solu-
tions [62, 64, 56, 4, 38]. Luckily, with the recent few-shot
properties in vision-language models (found for example in
CLIP [46] and ALIGN [24]), it is now possible to bootstrap
classifiers with language descriptions [45]. Besides func-
tioning as a baseline, good representations have shown to
similarly bootstrap active learning [61]. We demonstrate
that a few minutes of annotation by users can lead to size-
able gains over these zero-shot classifiers.
Real-time active learning. Usually few-shot learning can
only get you so far, especially for subjective concepts where
a single language description or a single prototype is un-
likely to capture the variance in the concept. Therefore, it-
erative approaches like active learning provide an appropri-
ate formalism to maximize information about the concept
while minimizing labels [55, 5]. Active learning methods
derive their name by "actively" asking users to annotate
data which the model currently finds most uncertain [33]
2
Figure 2: Overview of the Agile Modeling framework. Starting with a concept in the mind of the user, the system guides
the user into first defining the concept through a few text phrases, automatically expands these to small subset of images,
followed by one or more rounds of real-time active learning on a large corpus, where the user only needs to rate images.
or believes is most representative of the unlabeled set [54]
or both [2, 6]. Unfortunately, most of these methods require
expensive pre-processing, reducing their utility in most real-
world applications [12]. Methods to speed up active learn-
ing limit the search for informative data points [8] or use
low-performing proxy models for data selection [9] or use
heuristics [54, 44]. We show that performing model up-
dates and ranking images on cached co-embedding features
is a scalable and effective way to conduct active learning.
3. Agile Modeling
A user comes to the Agile Modeling system with just
a subjective concept in mind-in our running example,
gourmet tuna. First we lay out the high level Agile Mod-
eling problem framework and then describe how we instan-
tiate a prototype of this framework.
3.1. The framework
As shown in Figure 2, the Agile Modeling framework
guides the user through the creation of a image classifier
through the following steps:
1. Concept definition. The user describes the concept us-
ing text phrases. They are allowed to specify both posi-
tive phrases, which can describe the concept as a whole
or specific visual modes, as well as negative phrases,
which are related but not necessarily part of the con-
cept (e.g. canned tuna is not gourmet).
2. Text-to-image expansion and image selection. The text
phrases are used to mine relevant images from a large
unlabeled dataset of images for the user to rate.
3. Rating. The user rates these images through a rat-
ing tool, specifying whether each image is either
positive or negative for the concept of interest.
4. Model training. The rated images are used to train a
binary classifier for the concept. This is handled auto-
matically by the system.
5. Active learning. The initial model can be improved
very quickly via one or more rounds of active learning.
This consists of 3 repeated steps: (1) the framework in-
vokes an algorithm to select from millions of unlabeled
images to rate; (2) the user rates these images; (3) the
system retrains the classifier with all the available la-
beled data. The whole active learning procedure oper-
ates on millions of images and returns a new model in
under 3 minutes (measured in Section 4.3.1).
The user's input is used for only two types of tasks,
which require no machine learning experience: first in pro-
viding the text phrases and second in rating images. Every-
thing else, including data selection and model training, is
performed automatically. With such an automated process,
users do not need to hire an machine learning or computer
vision engineer to build their classifiers.
3.2. The prototype
We focus our prototype on the core north star task of im-
age classification [16]. One of the main challenges of Agile
Modeling is to enable the user to effectively transfer their
subjective interpretation of a concept into an operational
machine learning model. For our image classification task,
Agile Modeling seeks to turn this arbitrary concept into a
well-curated training dataset of images. We assume that
that the user only has access to a large, unlabeled dataset,
which is something that is easily available through the in-
ternet [46]. Our aim is to select and label a small subset of
this large dataset and use it as training data.
Concept definition. Users initiate the Agile Modeling pro-
cess by expressing their concept in words. For example, the
user might come in and simply say gourmet tuna. How-
ever, users can preemptively also provide more than a sin-
gle phrase. They can also produce negative descriptions of
what their concept is not. They can clarify that canned
tuna is not gourmet. Through our interactions with users,
we find that expressing the concept in terms of both pos-
3
ImageAnnotationbyUser?UnlabeledImagesSelectedImagesText-to-ImageExpansionImageSelectionUser-providedQueriesPositiveNegative"gourmettuna""tunasushi""searedtuna""cannedtuna""tunasandwich""tunafish"Large-scaleUnlabeledImagesActiveLearningModelTrainingTrainedModelitive and negative phrases is an effective way of mining
positive and hard negative examples for training. The posi-
tive phrases allow the user to express both the concept as a
whole (e.g. gourmet tuna) and specific visual modes of it
(e.g. seared tuna, tuna sushi). The negative phrases
are important in finding negative examples that could be
easily confused by raters.
Text-to-image expansion and image selection.
The
phrases provided by the user are used to identify a first set of
relevant training images. To achieve this, we take advantage
of recent, powerful image-text models, such as CLIP [46]
and ALIGN [24]. We co-embed both the unlabeled image
dataset and the text phrases provided by the user into the
same space, and perform a nearest-neighbors search to re-
trieve 100 images nearest to each text embedding. We use
an existing nearest-neighbors implementation [66, 22] that
is extremely fast due to its hybrid solution of trees and quan-
tization. From the set of all nearest neighbors, we randomly
sample 100 images for the user to rate. We do this for both
positive and negative phrases, since the negative texts are
helpful in identifying hard negative examples.
Data labeling by user. The selected images are shown to
the user for labeling. In our experiments, we created a sim-
ple user interface where the user is shown one image at
a time and is asked to select whether it is positive or
negative. The median time for our users to rate a single
image was 1.7 ± 0.5 seconds. Since users rate 100 images
per annotation round, they spend approximately 3 minutes
before a new model is trained.
Model training. We train our binary image classifier us-
ing all previously labeled data. This setup is challenging
because there is little data available to train a generalizable
model, and the entire training process must be fast to en-
able real-time engagement with the user waiting for the next
phase of images. The lack of large-scale data suggests the
use of few-shot techniques created to tackle low data scenar-
ios, such as meta-learning [65, 23, 18] or prototype meth-
ods [58], however most such approaches are too slow for
a real-time user interaction. While the study of real-time
few-shot methods is an interesting problem for future in-
stantiations of the Agile Modeling framework, we adopted
another solution that helps us address both challenges: we
again take advantage of powerful pretrained models like
CLIP and ALIGN to train a small multilayer perceptron
(MLP), with only 1-3 layers, on top of image embeddings
provided by such large pretrained models. These embed-
dings bring much needed external information to address
the low data challenge while allowing us to train a low-
capacity model that can be trained fast and is less prone
to overfitting. Model architectures and training details are
described in Section 4.
Active learning (AL). We improve the classifier in the tra-
ditional model-based active learning fashion: (1) we use the
current model to run inference on a large unlabeled pool of
data, (2) we carefully select a batch of images that should
be useful in improving the model, (3) we rate these images,
(4) we retrain the model. This process can be repeated one
or more times to iteratively improve performance. When
selecting samples to rate, state-of-the-art AL methods gen-
erally optimize for improving the model fastest [48]. How-
ever, when the user is the rater, we have a real-time con-
straint to minimize the user-perceived latency. Therefore,
AL methods that rely on heavy optimization strategies can-
not be used. In our solution, we adopt a well-known and
fast method called uncertainty sampling or margin sam-
pling [10, 51, 34], which selects images for which the model
is uncertain. Specifically, given a model with parame-
ters θ and a sample x, we define the uncertainty score as
Pθ(ˆy1|x) − Pθ(ˆy2|x), where ˆy1 and ˆy2 are the highest and
second-highest probabilities predicted by the model. Note
there are other definitions of uncertainty such as least confi-
dence and entropy, but since we are in a binary classification
setting, all of these definitions are mathematically equiv-
alent. We run one or more rounds of AL, the number of
rounds is determined by the time the user has.
4. Experiments with real users
We run user studies with real users in the loop, and show
that: (1) In only 5 minutes, the performance of an Agile
model can exceed that of state-of-the-art zero-shot models
based on CLIP and ALIGN by at least 3% AUC PR (Sec-
tion 4.3.1); (2) For hard, nuanced concepts, Agile mod-
els trained with user annotations outperform those trained
with crowd annotations even when crowd raters annotate
5x more data (Section 4.3.2); (3) Smaller active learning
batch sizes perform better than larger ones, but there is an
efficiency trade-off (Section 4.4); (4) Agile models using
ALIGN embeddings outperform does using CLIP through-
out model iterations (Section 4.4);
4.1. Choosing subjective concepts
Concepts. For our user studies we select a list of 14 novel
concepts, spanning different degrees of ambiguity and diffi-
culty. The list ranges from more objective concepts such as
pie chart, in-ear headphones or single sneaker
on white background, to more subjective ones such as
gourmet tuna, healthy dish, or home fragrance.
We found that our concepts cover a large spread over the
visual space; we measure this spread using the average pair-
wise cosine distance between the concept text embeddings
(using CLIP). For our 14 concepts, the average pairwise co-
sine distance was 0.73 ± 0.13. In comparison, ImageNet's
average pairwise cosine distance was 0.35 ± 0.11. The full
list of concepts is included in Appendix A, along with the
4
Step
Time
User rates 100 images
AL on 10M images
Training a new model
2 min 49 sec ± 58 sec
58.6 sec ± 0.8 sec
23.1 sec ± 0.2 sec
Table 1: The average and standard deviation of the time it
takes per step in our Agile Modeling instantiation. Rating
time was measured by taking the average median time of an
user to rate one image during the experiments used in this
paper. To measure time for AL and model training, they
were each run 10 times.
queries provided by the users.
Workflow. We provide users with only the concept name
and a brief description, but allow them to define the full
interpretation. For instance, one of our users, who was pro-
vided with the concept stop-sign, limited its interpreta-
tion to only real-world stop-signs: only stop signs in traffic
were considered positive, while stop-sign drawings, stick-
ers, or posters were considered negative1.
Participants. When collecting data for the experiments,
we sourced 14 volunteer users to interact with our system.
Each participant built a different concept. None of the users
performed any machine learning engineering tasks. Our ex-
periments indicate that it takes participants 2 minutes and
49 seconds on average to label 100 images, as shown in Ta-
ble 1. Our participants were adults that spanned a variety
of age ranges (18-54), gender identities (male, female), and
ethnicities (White, Asian, and Middle Eastern).
Data sources. Since our prototype requires an unlabeled
source of images from which to source training labels, we
use the LAION-400M dataset [53], due to its large size and
comprehensive construction based on the large Common
Crawl web corpus. We throw away the text associated with
the images. We remove duplicate URLs and split imags into
a 100M training and 100M testing images. All Agile mod-
els trained use data exclusively from the unlabeled training
split, including during nearest neighbor search, active learn-
ing, and training. For evaluation, we only use data from the
100M test set, where each concept's evaluation set consists
of a subset of this data rated by the user.
4.2. Experimental setup
Models and training. All models are multilayer percep-
trons (MLP) that take image representations from a frozen
pretrained model as input and contain one or more hidden
layers. For the first active learning step, we use a smaller
MLP with 1 hidden layer of 16 units to prevent overfitting,
while all active learning rounds and final model have 3 hid-
den layers of size 128. All training details, including opti-
1This definition was inspired by a self-driving car application, where a
car should only react to real stop signs, not those on posters or ads.
Figure 3: Model performance per amount of samples rated
by the user (AUC PR mean and standard error over all con-
cepts). Each • corresponds to an active learning round.
mizer, learning rate, etc., can be found in Appendix C.
Baselines. One baseline we compare against is zero-shot
learning, which corresponds to zero effort from the user. We
implement a zero-shot baseline that scores an image by the
cosine similarity between the image embedding and the text
embedding of the desired concept. We also compare against
a recently released active learning algorithm for learning
rare vision categories [39]. This system is the most rele-
vant related work. We replace our active learning algorithm
with theirs and compare the performance in Section 4.4.
Evaluation protocol. To evaluate the models trained with
the Agile Modeling prototype, we require an appropriate
test set. Ideally, the user would provide a comprehensive
test set-for example, ImageNet holds out a test set from
their collected data [49]. However, since our users are vol-
unteers with limited annotation time, they cannot feasibly
label the entire LAION-400M dataset or its 100M test split.
Additionally, since we are considering rare concepts, label-
ing a random subset of unlabeled images is unlikely to yield
enough positives. To address these problems, we ran strat-
ified sampling on each model, which divides images based
on their model score into 10 strata ranging from [0, 0.1) to
[0.9, 1.0]. In each strata, we hash each image URL to a 64-
bit integer using the pseudorandom function SipHash [3]
and include the 20 images with the lowest hashes in the
evaluation set. Each model contributes equally to final test
set. The final evaluation set has over 500 images per cate-
gory with approximately 50% positive rate. The full details
of the evaluation set distribution and acknowledgement of
its potential biases can be found in Appendix E.
Other hyperparameters. The text-to-image expansion ex-
pands each user-provided query to 100 nearest-neighbor im-
ages. Next, the image selection stage randomly selects a to-
tal of 100 images from all queries, leading to an initial train-
ing set of 100 samples for the first model. Users are asked
5
0100200300400500600Number of samples rated0.500.550.600.650.700.75AUC PRagile (CLIP)agile (ALIGN)zero-shot (CLIP)zero-shot (ALIGN)(a) Hard concepts – per # samples rated
(b) Easy concepts – per # samples rated
(c) All concepts – per # samples rated
Figure 4: Performance per # samples rated by the user or crowd. AUC PR mean and standard error over subsets of concepts:
hardest for the zero-shot model (left), easiest for the zero-shot model (middle), all (right). Each • represents an AL round.
Figure 5: Model performance per concept for zero-shot and user-in-the-loop Agile models on CLIP and ALIGN embeddings.
to perform 5 rounds of active learning, rating 100 images
per step. These hyperparameters were chosen based on two
held-out concepts, and the ablation results in Section 4.4.
4.3. Results
4.3.1 Users produce classifiers in minutes
A key value proposition of Agile Modeling is that the user
should be able to train a model in minutes. We now report
the feasibility of this proposition.
Measuring Time. The time it takes per for each step of the
framework is detailed in Table 1. Our proposed Agile Mod-
eling implementation trains one initial model and conducts
five active learning rounds, taking 24 minutes on average to
generate a final model.
Comparison with zero-shot. We start by comparing
against zero-shot classification, which corresponds to a
scenario with minimal effort from the user.
In Fig-
ure 3, we present the performance our instantiations of
the Agile Modeling framework against a zero-shot base-
line across two image-text co-embeddings: CLIP [46] and
ALIGN [24]. We find that the zero-shot performance is
roughly on par as a supervised model trained on 100 labeled
examples by the user. However, after the user spends a few
more minutes rating (i.e., as the number of user ratings in-
creases from 100 to 600), the resulting supervised model
outperforms zero-shot.
User time versus performance. To measure the trade-off
between user time versus model performance, we show in
Figure 3 the AUC PR of the model across active learning
rounds. We include additional metrics in Appendix G. We
include results for both CLIP and ALIGN representations as
input to our classifiers. We also compare against the respec-
tive zero-shot models using CLIP and ALIGN, which are
considered the zero effort case. For both types of represen-
tations, we see a steeper increase in performance for the first
3 active learning rounds, after which the performance starts
to plateau, consistent with existing literature applying active
learning to computer vision tasks [25].
Interestingly, for
CLIP representations, the initial model trained on only 100
images performs worse than the zero-shot baseline, but the
zero-shot model is outperformed with just one round of ac-
tive learning. We do not see this effect on ALIGN represen-
tations, where even 100 samples are enough to outperform
the zero-shot model-perhaps because ALIGN representa-
tions are more effective. We compare CLIP and ALIGN in
more detail in Section 4.4. Importantly, We show that with
only 5 minutes of the user's time (Table 1), we can obtain
a model that outperforms the zero-shot baseline by at least
3%. After 24 minutes, this performance gain grows to 16%.
4.3.2 Value of users in the loop versus crowd workers
We now study the value of empowering users to train mod-
els by themselves. In particular, we address the following
6
050010001500200025003000Numberofsamplesrated0.4500.4750.5000.5250.5500.5750.6000.625AUCPRUser-100Crowd-100Crowd-500050010001500200025003000Numberofsamplesrated0.600.650.700.750.80AUCPRUser-100Crowd-100Crowd-500050010001500200025003000Numberofsamplesrated0.5000.5250.5500.5750.6000.6250.6500.6750.700AUCPRUser-100Crowd-100Crowd-500healthy dishblock towerdancehand-pointingastronautsingle sneaker on white backgroundhome-fragranceemergency servicestop signgourmet tunaarts and craftspie-chartin-ear-headphoneshair-coloring0.40.50.60.70.80.9AUC PRzero-shot (CLIP)agile (CLIP)zero-shot (ALIGN)agile (ALIGN)Figure 6: Model performance for two active learning meth-
ods: margin and the approach of [39] (margin & positive
mining). Each • corresponds to an AL round. We show the
AUC PR mean and standard error over all concepts.
Figure 7: Model performance during active learning with
3 AL batch sizes: small (50), medium (100), large (200).
Each • corresponds to an AL round. We show the AUC PR
mean and standard error over all concepts.
question: Are there concepts for which a user-centered Ag-
ile framework leads to better performance?
Users have an advantage over crowd raters in their abil-
ity to rate images according to their subjective specifica-
tions. However, this subjectivity, or "concept difficulty"
varies by concept: if a concept is universally understood,
the advantage diminishes. Conversely, complex, nuanced
concepts are harder for crowd workers to accurately label.
To take this into consideration, we first partition the con-
cepts into two datasets based on their difficulty, using zero-
shot performance as a proxy for concept difficulty. The 7
concepts that admit the highest zero-shot performance are
considered "easy," while the remaining 7 concepts are con-
sidered "hard." The specific groups can be found in Ap-
pendix H. Notice that the "difficult" concepts include more
subjective concepts such as gourmet tuna (as illustrated
in Figure 1), or with multiple and ambiguous modes such as
healthy dish; whereas the "easy" concepts include sim-
ple, self-explanatory concepts such as dance or single
sneaker on white background.
We then evaluate models trained by three sets of raters:
1. User-100: Users rate 100 images for the initial model
and every AL round (total 600 images).
2. Crowd-100: Crowd workers rate 100 images for the
initial model and every AL round (total 600 images).
3. Crowd-500: Crowd workers rate 500 images for the
initial model and every AL round (total 3000 images).
The only difference in the configurations above is who
the raters are (user or crowd) and the total number of ratings.
For crowd ratings, having clear instructions is crucial for
accurate results, but obtaining them is a non-trivial task in
the machine learning process [19, 14]. In this experiment,
crowd workers read instructions created by the users, who
noted difficult cases that they found during labeling. Details
about the crowd instructions can be found in Appendix B.
age performance for the "hard", "easy" and all concepts as
a function of the number of rated samples, using CLIP em-
beddings. Per-concept results can be found in Appendix F.
On hard concepts, models trained with users (User-100)
outperform models trained with crowd raters, even when
5× more ratings are obtained from the crowd (Crowd-500).
This suggests that Agile Modeling is particularly useful for
harder, more nuanced and subjective concepts.
4.4. Ablation studies
Although our main contribution is introducing the prob-
lem of Agile Modeling, instantiating our prototype explores
a number of design decisions. In this section, we lay out
how these designs change the outcome.
Active learning method. Throughout the paper, we instan-
tiate the active learning component with the well-known
margin method [50]. We now compare it to the active learn-
ing method used in Mullapudi et al [39]. We ran a version of
our instantiation of the Agile framework where we replace
margin with the margin+positive mining strategy chosen by
[39] and described in Section 3.2. The performance of the
two methods per AL round is shown in Figure 11. Interest-
ingly, despite the fact that Mullapudi et al. [39] introduced
this hybrid approach to improve upon margin sampling, in
this setting the two methods perform similarly across all AL
rounds. We see the same effect on most concepts when in-
specting on a per-concept basis in Appendix G. One po-
tential explanation for this is that the initial model trained
before AL is already good enough (perhaps due to the pow-
erful CLIP embeddings) for margin sampling to produce a
dataset balanced in terms of positive and negative, and thus
explicitly mining easy positives as in [39] is not particu-
larly useful. Since the two methods perform equivalently,
we opted for the simpler and more efficient margin in the
rest of the experiments.
We plot the results in Figure 4, which shows the aver-
Active learning batch size. Our prototype asks the user
7
100200300400500600Number of samples rated0.500.550.600.650.70AUC PRmarginmargin & positive mining100200300400500600700Number of samples rated0.5250.5500.5750.6000.6250.6500.6750.700AUC PRsmall (batch size = 50)medium (batch size = 100)large (batch size = 200)to annotate images across 5 rounds of active learning, 100
images per round. However, we can simultaneously change
the number of images rated per round and the number of
active learning rounds the user conducts. We evaluate the
downstream effects of changing active learning batch size
and number of rounds on model performance and time
spent. We consider 3 batch sizes: small (50 images/batch),
medium (100 images/batch), large (200 images/batch). We
run repeated rounds of active learning with each of these
settings, retraining the model after each round using CLIP
representations. The results in Figure 7 show that, for a
fixed amount of images rated, smaller batch sizes are better
than larger, especially so in the beginning. This result is ex-
pected, because for a fixed rating budget, the smaller batch
setting has the chance to update the model more frequently.
While these results suggest that we should opt for a smaller
batch size, there is still a trade-off between user time and
performance, even when we have the same total number of
samples rated. That is because model training takes about
1-2 minutes during which the user is idle, and so smaller
batch sizes lead to longer time investment from the users.
As a good compromise, we chose 100 as our batch size.
Stronger pretrained model
improves performance.
Since our system leverages image-text co-embeddings to
find relevant images and quickly train classifiers, a logi-
cal question is: how does changing the underlying embed-
ding change the performance of the classifier? To do this,
we compare CLIP versus ALIGN as the underlying embed-
ding by replacing our pre-cached CLIP embeddings with
ALIGN. We find that, with ALIGN, the AUROC of the final
Agile model increased from 0.72 to 0.80 with a relative gain
of 11.5%. The AUPR increased from 0.68 to 0.76, a relative
gain of 13.1%. Furthermore, as Figure 5 demonstrates, both
the ALIGN zero-shot and Agile models outperform their
CLIP counterparts for almost every concept. This shows
that building stronger image-text co-embeddings is founda-
tional to improving the Agile Modeling process.
5. Experiments with ImageNet21k
Our user study validates the Agile Modeling framework
on a small number of concepts over a web-scale unlabelled
dataset. Now, we confirm that our framework can be effec-
tively applied across a larger number of concepts to achieve
significant improvements over zero-shot baselines. Due to
the scale of this experiment, we simulate the user annota-
tions using a fully-labeled dataset.
Experimental setup. We use the ImageNet21k dataset [13]
which contains 21k classes and over 14M images. Out of
these we select a subset of both easy and difficult classes, as
described below. Each class corresponds to a binary clas-
sification problem as before. We apply the Agile Modeling
framework with the ImageNet21k training set as the unla-
Figure 8: Model performance per amount of samples on
ImageNet21k for both easy and hard classes (AUC PR mean
and std error over classes). Each • represents an AL round.
beled data pool, and the test set for evaluation. Ground-truth
class labels included in the dataset simulate a user providing
ratings. Since the Agile Modeling process starts at concept
definition with no labeled data, we use the class name and
its corresponding WordNet [37] description as positive text
phrases in the text-to-image expansion step. As before, we
use a batch size of 100 and 5 rounds of active learning. We
use ALIGN embeddings.
Concept selection. We use a subset of 100 of the 21k con-
cepts for evaluation. 50 "easy" concepts are selected at ran-
dom from the ImageNet 1000 class list. Additionally, we
aim to replicate the ambiguity and difficulty of our origi-
nal concepts by carefully selecting 50 further concepts with
the following criteria based the WordNet lexicographical hi-
erarchy: (1) 2-20 hyponyms, to ensure visual variety, (2)
more than 1 lemma, to ensure ambiguity, (3) not an animal
or plant, which have objective descriptions. Of the 546 re-
maining concepts, our 50 "hard" concepts are selected at
random. The full list of chosen concepts is in Appendix J.
Results. In Figure 8 we show the results of applying the
Agile Modeling framework to ImageNet21k. We see a sim-
ilar trend to our user experiments, with significant improve-
ments over zero-shot baselines as well as continued im-
provement with each active learning round. We further ob-
serve that the "easy" concepts attained higher scores after
the Agile Modeling process than the "hard" concepts. The
zero-shot baseline differed significantly between the "easy"
and "hard" concepts with scores of 0.29 and 0.11, respec-
tively. The equivalent of 30 minutes of human work yields
a 20% boost in AUC PR over the zero-shot baseline.
6. Discussion & conclusion
We formalized the Agile Modeling problem to turn any
visual concept from an idea into a trained image classi-
fier. We promote the notion of incorporating the user-in-
the-loop, by supporting users with interactions that do not
require any machine learning experience. We show that by
8
using the latest advances in image-text pretrained models,
we are able to initialize, train, and perform active learning
in just a few minutes, enabling real-time user interaction for
rapid model creation in less than 30 minutes. Via a simple
prototype, we demonstrate the value of users over crowd
labelers in generating classifiers for subjective user-defined
concepts. We hope that our work showcases the opportuni-
ties and challenges of Agile Modeling and encourages fu-
ture efforts.
References
[1] Saleema Amershi, Maya Cakmak, William Bradley Knox,
and Todd Kulesza. Power to the people: The role of humans
in interactive machine learning. Ai Magazine, 35(4):105–
120, 2014. 2
[2] Jordan T Ash, Chicheng Zhang, Akshay Krishnamurthy,
John Langford, and Alekh Agarwal. Deep batch active learn-
ing by diverse, uncertain gradient lower bounds. In Interna-
tional Conference on Learning Representations, 2019. 3
[3] Jean-Philippe Aumasson and Daniel J Bernstein. Siphash: a
fast short-input prf. In International Conference on Cryptol-
ogy in India, pages 489–508. Springer, 2012. 5
[4] Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad
Norouzi, and Geoffrey E Hinton. Big self-supervised mod-
els are strong semi-supervised learners. Advances in neural
information processing systems, 33:22243–22255, 2020. 2
[5] Galen Chuang, Giulia DeSalvo, Lazaros Karydas, Jean-
Francois Kagy, Afshin Rostamizadeh, and A Theeraphol.
Active learning empirical study. In NeurIPS 2019 Workshop
on Learning with Rich Experience: Integration of Learning
Paradigms, 2019. 2
[6] Gui Citovsky, Giulia DeSalvo, Claudio Gentile, Lazaros
Karydas, Anand Rajagopalan, Afshin Rostamizadeh, and
Sanjiv Kumar. Batch active learning at scale. In Advances in
Neural Information Processing Systems, 2021. 3
[7] Niv Cohen, Rinon Gal, Eli A Meirom, Gal Chechik, and
Yuval Atzmon. "this is my unicorn, fluffy": Personalizing
frozen vision-language representations. In Computer Vision–
ECCV 2022: 17th European Conference, Tel Aviv, Israel,
October 23–27, 2022, Proceedings, Part XX, pages 558–577.
Springer, 2022. 2
[8] Cody Coleman, Edward Chou, Julian Katz-Samuels, Sean
Culatana, Peter Bailis, Alexander C Berg, Robert Nowak,
Roshan Sumbaly, Matei Zaharia, and I Zeki Yalniz. Simi-
larity search for efficient active learning and search of rare
concepts. In Proceedings of the AAAI Conference on Artifi-
cial Intelligence, volume 36, pages 6402–6410, 2022. 3
[9] Cody Coleman, Christopher Yeh, Stephen Mussmann, Baha-
ran Mirzasoleiman, Peter Bailis, Percy Liang, Jure Leskovec,
and Matei Zaharia. Selection via proxy: Efficient data se-
lection for deep learning. arXiv preprint arXiv:1906.11829,
2019. 3
[10] Aron Culotta and Andrew McCallum. Reducing labeling ef-
fort for structured prediction tasks. In AAAI, volume 5, pages
746–751, 2005. 4
[11] Maureen Daum, Enhao Zhang, Dong He, Magdalena Bal-
azinska, Brandon Haynes, Ranjay Krishna, Apryle Craig,
and Aaron Wirsing. Vocal: Video organization and inter-
active compositional analytics. In 12th Annual Conference
on Innovative Data Systems Research (CIDR'22), 2022. 2
[12] Maureen Daum, Enhao Zhang, Dong He, Brandon Haynes,
Ranjay Krishna, and Magdalena Balazinska. Vocalexplore:
Pay-as-you-go video data exploration and model building.
arXiv preprint arXiv:2301.00929, 2023. 3
[13] 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. 1, 8
[14] Steven Dow, Anand Kulkarni, Scott Klemmer, and Bj ̈orn
In
Hartmann. Shepherding the crowd yields better work.
Proceedings of the ACM 2012 conference on computer sup-
ported cooperative work, pages 1013–1022, 2012. 7
[15] Jerry Alan Fails and Dan R Olsen Jr.
Interactive machine
learning. In Proceedings of the 8th international conference
on Intelligent user interfaces, pages 39–45, 2003. 2
[16] Li Fei-Fei and Ranjay Krishna. Searching for computer vi-
sion north stars. Daedalus, 151(2):85–99, 2022. 3
[17] Rebecca Fiebrink, Perry R Cook, and Dan Trueman. Play-
along mapping of musical controllers. In ICMC, 2009. 2
[18] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-
agnostic meta-learning for fast adaptation of deep networks.
In International Conference on Machine Learning, pages
1126–1135. PMLR, 2017. 4
[19] Ujwal Gadiraju, Jie Yang, and Alessandro Bozzon. Clarity is
a worthwhile quality: On the role of task clarity in microtask
crowdsourcing. In Proceedings of the 28th ACM conference
on hypertext and social media, pages 5–14, 2017. 7
[20] Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patash-
nik, Amit H Bermano, Gal Chechik, and Daniel Cohen-
Or. An image is worth one word: Personalizing text-to-
image generation using textual inversion. arXiv preprint
arXiv:2208.01618, 2022. 2
[21] Mitchell L Gordon, Kaitlyn Zhou, Kayur Patel, Tatsunori
Hashimoto, and Michael S Bernstein. The disagreement de-
convolution: Bringing machine learning performance met-
In Proceedings of the 2021 CHI
rics in line with reality.
Conference on Human Factors in Computing Systems, pages
1–14, 2021. 1
[22] Ruiqi Guo, Sanjiv Kumar, Krzysztof Choromanski, and
David Simcha.
inner product
search. In Artificial intelligence and statistics, pages 482–
490. PMLR, 2016. 4
Quantization based fast
[23] Sepp Hochreiter, A Steven Younger, and Peter R Conwell.
In International
Learning to learn using gradient descent.
Conference on Artificial Neural Networks, pages 87–94.
Springer, 2001. 4
[24] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh,
Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom
Duerig. Scaling up visual and vision-language representa-
In International
tion learning with noisy text supervision.
Conference on Machine Learning, pages 4904–4916. PMLR,
2021. 2, 4, 6
9
[25] Siddharth Karamcheti, Ranjay Krishna, Li Fei-Fei, and
Christopher D Manning. Mind your outliers!
investigat-
ing the negative impact of outliers on active learning for
visual question answering. In Proceedings of the 59th An-
nual Meeting of the Association for Computational Linguis-
tics and the 11th International Joint Conference on Natural
Language Processing (Volume 1: Long Papers), pages 7265–
7281, 2021. 6
[26] Mina Khan, P Srivatsa, Advait Rane, Shriram Chenniappa,
Asadali Hazariwala, and Pattie Maes. Personalizing pre-
trained models. arXiv preprint arXiv:2106.01499, 2021. 2
[27] Diederik P. Kingma and Jimmy Ba. Adam: A method for
stochastic optimization. In Yoshua Bengio and Yann LeCun,
editors, 3rd International Conference on Learning Represen-
tations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015,
Conference Track Proceedings, 2015. 13
[28] W Bradley Knox and Peter Stone. Learning non-myopically
from human-generated reward. In Proceedings of the 2013
international conference on Intelligent user interfaces, pages
191–202, 2013. 2
[29] Ivan Krasin, Tom Duerig, Neil Alldrin, Andreas Veit, Sami
Abu-El-Haija, Serge Belongie, David Cai, Zheyun Feng,
Vittorio Ferrari, Victor Gomes, Abhinav Gupta, Dhyanesh
Narayanan, Chen Sun, Gal Chechik, and Kevin Murphy.
Openimages: A public dataset for large-scale multi-label
and multi-class image classification. Dataset available from
https://github.com/openimages, 2016. 1
[30] Ranjay Krishna, Mitchell Gordon, Li Fei-Fei, and Michael
Bernstein. Visual intelligence through human interaction.
Artificial Intelligence for Human Computer Interaction: A
Modern Approach, pages 257–314, 2021. 2
[31] Ranjay Krishna, Donsuk Lee, Li Fei-Fei, and Michael S
Bernstein. Socially situated artificial intelligence enables
learning from human interaction. Proceedings of the Na-
tional Academy of Sciences, 119(39):e2115730119, 2022. 2
[32] Matthew Lease. On quality control and machine learning
In Workshops at the Twenty-Fifth AAAI
in crowdsourcing.
Conference on Artificial Intelligence. Citeseer, 2011. 1
[33] David Lewis and William Gale. A sequential algorithm for
training text classifiers. In ACM SIGIR Conference on Re-
search and Development in Information Retrieval, 1994. 2
[34] David D Lewis. A sequential algorithm for training text clas-
sifiers: Corrigendum and additional data. In Acm Sigir Fo-
rum, volume 29, pages 13–19. ACM New York, NY, USA,
1995. 4
[35] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays,
Pietro Perona, Deva Ramanan, Piotr Doll ́ar, and C Lawrence
Zitnick. Microsoft COCO: common objects in context. In
European Conference on Computer Vision, pages 740–755.
Springer, 2014. 1
[36] Robert Loftin, Bei Peng, James MacGlashan, Michael L
Littman, Matthew E Taylor, Jeff Huang, and David L
Roberts. Learning behaviors via human-delivered discrete
feedback: modeling implicit feedback strategies to speed
up learning. Autonomous agents and multi-agent systems,
30:30–59, 2016. 2
[38] Ravi Teja Mullapudi, Fait Poms, William R Mark, Deva Ra-
manan, and Kayvon Fatahalian. Background splitting: Find-
ing rare classes in a sea of background. In Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, pages 8043–8052, 2021. 2
[39] Ravi Teja Mullapudi, Fait Poms, William R Mark, Deva Ra-
manan, and Kayvon Fatahalian. Learning rare category clas-
sifiers on a tight labeling budget. In IEEE/CVF International
Conference on Computer Vision, pages 8423–8432, 2021. 2,
5, 7, 13, 14, 15, 16
[40] Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L
Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agar-
wal, Katarina Slama, Alex Ray, et al. Training language
models to follow instructions with human feedback. arXiv
preprint arXiv:2203.02155, 2022. 2
[41] Junwon Park, Ranjay Krishna, Pranav Khadpe, Li Fei-Fei,
and Michael Bernstein. Ai-based request augmentation to
increase crowdsourcing participation. In Proceedings of the
AAAI Conference on Human Computation and Crowdsourc-
ing, volume 7, pages 115–124, 2019. 2
[42] Kayur Patel, Naomi Bancroft, Steven M Drucker, James Fog-
arty, Amy J Ko, and James Landay. Gestalt: integrated sup-
port for implementation and analysis in machine learning. In
Proceedings of the 23nd annual ACM symposium on User
interface software and technology, pages 37–46, 2010. 2
[43] Genevieve Patterson, Grant Van Horn, Serge Belongie,
Pietro Perona, and James Hays. Tropel: Crowdsourcing de-
tectors with minimal training. In Third AAAI Conference on
Human Computation and Crowdsourcing, 2015. 2
[44] Robert Pinsler,
Jonathan Gordon, Eric Nalisnick, and
Jos ́e Miguel Hern ́andez-Lobato. Bayesian batch active learn-
ing as sparse subset approximation. Advances in neural in-
formation processing systems, 32, 2019. 3
[45] Sarah Pratt, Rosanne Liu, and Ali Farhadi. What does a
platypus look like? generating customized prompts for zero-
shot image classification. arXiv preprint arXiv:2209.03320,
2022. 2
[46] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya
Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,
Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learn-
ing transferable visual models from natural language super-
vision. In International Conference on Machine Learning,
pages 8748–8763. PMLR, 2021. 2, 3, 4, 6
[47] A Ratner, S.H Bach, H Ehrenberg, J Fries, S Wu, and C Re.
Snorkel: Rapid training data creation with weak supervision.
In VLDB Endowment, pages 269–282, 2017. 2
[48] Pengzhen Ren, Yun Xiao, Xiaojun Chang, Po-Yao Huang,
Zhihui Li, Brij B Gupta, Xiaojiang Chen, and Xin Wang.
A survey of deep active learning. ACM computing surveys
(CSUR), 54(9):1–40, 2021. 4
[49] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, San-
jeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy,
Aditya Khosla, Michael Bernstein, et al.
Imagenet large
scale visual recognition challenge. International journal of
computer vision, 115(3):211–252, 2015. 5
[37] George A Miller. Wordnet: a lexical database for english.
Communications of the ACM, 38(11):39–41, 1995. 8
[50] Decomain C Scheffer, T and S Wrobel. Active hidden
In Interna-
markov models for information extraction.
10
[64] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan
Wierstra, et al. Matching networks for one shot learning. Ad-
vances in neural information processing systems, 29, 2016.
2
[65] Yaqing Wang, Quanming Yao, James T Kwok, and Lionel M
Ni. Generalizing from a few examples: A survey on few-
shot learning. ACM Computing Surveys (CSUR), 53(3):1–34,
2020. 4
[66] Xiang Wu, Ruiqi Guo, Ananda Theertha Suresh, Sanjiv Ku-
mar, Daniel N Holtmann-Rice, David Simcha, and Felix Yu.
Multiscale quantization for fast similarity search. Advances
in neural information processing systems, 30, 2017. 4
[67] Enhao Zhang, Maureen Daum, Dong He, Brandon Haynes,
Ranjay Krishna, and Magdalena Balazinska. Equi-vocal:
Synthesizing queries for compositional video events from
limited user interactions. arXiv preprint arXiv:2301.00929,
2023. 2
tional Conference on Advances in Intelligent Data Analysis
(CAIDA), page 309–318, 2001. 7, 13
[51] Tobias Scheffer, Christian Decomain, and Stefan Wrobel.
Active hidden markov models for information extraction. In
International Symposium on Intelligent Data Analysis, pages
309–318. Springer, 2001. 4
[52] Christoph Schuhmann, Romain Beaumont, Richard Vencu,
Cade Gordon, Ross Wightman, Mehdi Cherti, Theo
Coombes, Aarush Katta, Clayton Mullis, Mitchell Worts-
man, et al. Laion-5b: An open large-scale dataset for
training next generation image-text models. arXiv preprint
arXiv:2210.08402, 2022. 15
[53] 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. 5
[54] Ozan Sener and Silvio Savarese. Active learning for convolu-
tional neural networks: A core-set approach. arXiv preprint
arXiv:1708.00489, 2017. 3
[55] Burr Settles. Active learning literature survey. computer sci-
ences technical report 1648, University of Wisconsin, Madi-
son, 2010. 2
[56] Yanyao Shen, Hyokun Yun, Zachary C Lipton, Yakov Kron-
rod, and Animashree Anandkumar. Deep active learning for
named entity recognition. arXiv preprint arXiv:1707.05928,
2017. 2
[57] Victor S Sheng, Foster Provost, and Panagiotis G Ipeirotis.
Get another label? improving data quality and data mining
In Proceedings of the 14th
using multiple, noisy labelers.
ACM SIGKDD international conference on Knowledge dis-
covery and data mining, pages 614–622, 2008. 1
[58] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical
networks for few-shot learning. Advances in Neural Infor-
mation Processing Systems, 30, 2017. 4
[59] Andrea L Thomaz and Cynthia Breazeal. Teachable robots:
Understanding human teaching behavior to build more effec-
tive robot learners. Artificial Intelligence, 172(6-7):716–737,
2008. 2
[60] Bart Thomee, David A Shamma, Gerald Friedland, Ben-
jamin 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. 2
[61] Yonglong Tian, Yue Wang, Dilip Krishnan, Joshua B Tenen-
baum, and Phillip Isola. Rethinking few-shot image classi-
fication: a good embedding is all you need? In European
Conference on Computer Vision, pages 266–282. Springer,
2020. 2
[62] Eleni Triantafillou, Tyler Zhu, Vincent Dumoulin, Pascal
Lamblin, Utku Evci, Kelvin Xu, Ross Goroshin, Carles
Gelada, Kevin Swersky, Pierre-Antoine Manzagol, et al.
Meta-dataset: A dataset of datasets for learning to learn from
few examples. arXiv preprint arXiv:1903.03096, 2019. 2
[63] Paroma Varma, Bryan D He, Payal Bajaj, Nishith Khand-
wala, Imon Banerjee, Daniel Rubin, and Christopher R ́e. In-
ferring generative model structure with static analysis. Ad-
vances in neural information processing systems, 30, 2017.
2
11
A. Concepts
We provide the full list of concepts, along with the text
phrases provided by the users. Each concept name was au-
tomatically added to the list of positive text phrases.
1. gourmet tuna
(a) Positive text phrases:
tuna sushi, seared tuna,
tuna sashimi
(b) Negative text phrases:
two sneakers on white
background, leather shoe
9. dance
(a) Positive text phrases: ballet,
tango, ballroom
dancing, classical dancing, professional dance
(b) Negative text phrases: sports, fitness, zumba, ice
skating
(b) Negative text phrases: canned tuna, tuna sand-
10. hand pointing
wich, tuna fish, tuna fishing
2. emergency service
(a) Positive text phrases: firefighting, paramedic,
ambulance, disaster worker, search and rescue
(b) Negative text phrases:
construction, crossing
guard, military
3. healthy dish
(a) Positive text phrases: hand pointing, meeting
with pointing hand, cartoon hand pointing, point-
ing at screen
(b) Negative text phrases: thumbs up, finger gesture,
hands, sign language
11. astronaut
(a) Positive text phrases: female astronaut, space-
(a) Positive text phrases: salad, fish dish, vegetables,
craft crew, space traveler
healthy food
(b) Negative text phrases: fast food, fried food, sug-
ary food, fatty food
4. in-ear headphones
(a) Positive text phrases: in-ear headphones, airpods,
earbuds
(b) Negative text phrases:
earrings, bone head-
phones, over-ear headphones
5. hair coloring
(a) Positive text phrases: hair coloring service, hair
coloring before and after
(b) Negative text phrases: hair coloring product
6. arts and crafts
(a) Positive text phrases: kids crafts, scrapbooking,
(b) Negative text phrases: spacecraft, space warrior,
scuba diver
12. stop sign
(a) Positive text phrases: stop sign in traffic, stop
sign held by a construction worker, stop sign on
a bus, stop sign on the road, outdoor stop sign,
stop sign in the wild
(b) Negative text phrases:
indoor stop sign, slow
sign, traffic light sign, stop sign on a poster, stop
sign on the wall, cartoon stop sign, stop sign only
13. pie chart
(a) Positive text phrases: pie-chart
(b) Negative text phrases: pie, bar chart, plot
hand made decorations
14. block tower
(b) Negative text phrases: museum art, professional
painting, sculptures
7. home fragrance
(a) Positive text phrases: home fragrance flickr,
scented candles, air freshener, air freshener flickr,
room fragrance, room fragrance flickr, scent sa-
chet, potpourri, potpourri flickr
(b) Negative text phrases: birthday candles, birthday
candles flickr, religious candles, religious can-
dles flickr, car freshener, car freshener flickr, per-
fume, perfume flickr
8. single sneaker on white background
(a) Positive text phrases: one sneaker on white back-
ground
(a) Positive text phrases: toy tower
(b) Negative text phrases: tower block, building
B. Crowd task design
Crowd workers are onboarded to the binary image clas-
sification task then given batches of images to label, where
each batch contains images from the same concept type to
minimize cross-concept mislabeling. In Figure 9 we show
the task we present to crowd workers for image classifica-
tion. The template contains the image to classify, as well
as a description of the image concept and a set of positive
and negative examples created by the user who created the
concept. Each image is sent to three crowd workers and the
label is decided by majority vote.
12
E. Evaluation strategy
Because we are eliciting the concept from users, only
they can correctly label every image. Therefore, when gen-
erating an evaluation set, the annotations must come from
the user. However, since our users are real people with real
time restrictions, this means that we cannot ask them to ex-
haustively rate a large evaluation set. We target less than
1000 images for each concept's evaluation set.
E.1. Proposed evaluation strategies
Figure 9: An example template we use for crowd labeling.
We considered the following strategies for evaluation:
C. Experimental details
All models are trained using binary cross-entropy loss,
a dropout rate of 0.5 and weight decay regularization with
weight 1 × 10−4. We use the Adam optimizer [27] with
learning rate 1 × 10−4 and train for 10 epochs. To prevent
overtriggering by the trained classifier, we sample 500k ran-
dom images from the unlabeled set and automatically label
them negative. During training, we upsample our labeled
positives to be half the training set, while labeled negatives
and the random negatives are each a quarter of the training
set. All hyperparameters have been chosen on 2 held-out
concepts.
D. Active Learning
Active learning method. Throughout the paper, we in-
stantiate the active learning component with the well-known
margin method [50]. We now compare it to the active learn-
ing method used in Mullapudi et al [39]. We ran a version of
our instantiation of the Agile framework where we replace
margin with the margin+positive mining strategy chosen by
[39] and described in Section 3.2. The performance of the
two methods per AL round is shown in Figure 11. Inter-
estingly, despite the fact that Mullapudi et al. [39] intro-
duced this hybrid approach to improve upon margin sam-
pling, in this setting, on average, the two methods perform
similarly across all AL rounds. We see the same effect on
most concepts, when we inspect this on a per-concept ba-
sis in Appendix G. One potential explanation for this is that
the initial model trained before AL is already good enough
(perhaps due to the powerful CLIP embeddings) for margin
sampling to produce a dataset balanced in terms of positive
and negative, and thus explicitly mining easy positives as
in [39] is not particularly useful. Since the two methods
perform equivalently, while margin being simpler and more
efficient, we opted for margin in the rest of the experiments.
Labeling the entire unlabeled set. The most accurate
evaluation metric is to label the entire unlabeled set. How-
ever, this is infeasible, as the user would have to label hun-
dreds of millions of images.
Random sampling from unlabeled set. To reduce the
number of images to label, we could randomly sample until
we hit a desired amount. However, since most of the con-
cepts are rare (< 0.1% of the total amount of data), this
means our evaluation set would have very few positives.
Holdout of training data. As the user labels new ground
truth, hold out a fraction of it for evaluation. The benefit
is that the user does not have to label any extra data. The
main detriment is that the evaluation set comes from the
exact same distribution as the training set, leading to over-
estimates of performance, as there are no new visual modes
in the evaluation set.
Random sampling at fixed prediction frequencies.
Choose a set of operating points. For each operating point
randomly sample K images with score higher than that op-
erating point. The operating points can be selected as the
model prediction frequency-for example, we can calcu-
late precision of the highest confidence 100, 1000, and
10000 predictions. The metric that will be directly com-
parable across models is precision vs prediction frequency.
To minimize rating cost we can use the deterministic hash
approach. The main problem is that the choice of operat-
ing points varies depending on the particular class. Classes
that are rare or harder to correctly predict may need stricter
operating points than common and easy classes. Further-
more, with this approach we cannot compute a PR curve,
just some metrics at specific operating points.
Stratified sampling without weights [our chosen ap-
proach]. Collect new evaluation images by (1) calculat-
ing model scores, (2) bucketing the images by model score
(e.g., [0, 0.1), [0.1, 0.2),..., [0.8, 0.9), [0.9, 1]), (3) rating
13
Figure 10: Results per concept comparing user model performance versus crowd. We show the AUC PR (y-axis) per number
of samples rated (x-axis) for each of the three active learning experimental settings: user (batch size = 100), crowd (batch
size = 100), and crowd (batch size = 500).
the models. The main limitations of this method are:
1. Stratified sampling requires good bucket boundaries to
work well, which is not guaranteed.
2. The metric will be biased since samples selected from
buckets with a smaller number of candidates (such as
the [0.9, 1] bucket) will have more influence than sam-
ples from buckets with lots of candidates (e.g. the [0,
0.1) bucket).
3. Merging image sets from multiple models may bias to-
wards the models make common predictions. How-
ever, we hope that pseudorandom hashing selects the
same images and prevents this from occurring.
Stratified sampling with weights. This involves the
same process as stratified sampling without weights, but
whenever computing a metric, you weigh the sample by the
distribution of scores it came from. This unbiases sampling
from each strata, but for very large buckets (e.g., the [0, 0.1)
bucket), the weight would be extremely large. This means
that predicting incorrectly on any of these images overpow-
ers all correct predictions on other buckets.
Based on the pros and cons of all these approaches, we
chose stratified sampling without weights for our experi-
Figure 11: Model performance for two active learning
methods: margin and the approach of [39] (margin & posi-
tive mining). Each • corresponds to an AL round. We show
the AUC PR mean and standard error over all concepts.
k examples per bucket. To minimize any bias towards any
particular model, we can repeat this process to retrieve an
evaluation set per model and merge to get the final evalua-
tion set. Additionally, we can use a deterministic hash in-
stead of random sampling to encourage high overlap across
the images chosen to save on the total rating budget. The
major upside is that, using a small number of images rated,
we can get a relatively balanced dataset of positives and
negatives, while also mining for hard examples to stress test
14
0.50.6healthydish0.60.7emergencyservice0.80.9hair-coloring0.70.8pie-chart0.60.7singlesneakeronwhitebackground0.50.60.7astronaut0.40.5gourmettuna0.60.7in-ear-headphones0.60.7dance0.50.6home-fragrance0.40.5hand-pointing0.700.75artsandcrafts01000200030000.60.7stopsign01000200030000.50.6blocktowerUser-100Crowd-100Crowd-500100200300400500600Number of samples rated0.500.550.600.650.70AUC PRmarginmargin & positive miningments, which we believe is most representative for our prob-
lem setting.
E.2. Evaluation set statistics
In Table 2, we show that our stratified sampling method
chooses a tractable number of images to rate, while keeping
the positive and negative count relatively balanced.
Concept Name
# Images Pos. Rate
arts and crafts
astronaut
block tower
dance
emergency service
gourmet tuna
hair-coloring
hand-pointing
healthy dish
home-fragrance
in-ear-headphones
pie-chart
single sneaker on white background
stop sign
707
637
669
730
675
576
645
832
633
716
687
594
556
704
0.66
0.36
0.36
0.47
0.50
0.27
0.67
0.34
0.36
0.39
0.42
0.42
0.49
0.44
Table 2: Statistics showing the number of images and the
positive rate in each concept's evaluation set.
the threshold 0.5 is not a good choice, because the cosine
similarities for both positive and negative are often smaller
than this. In fact, [52] did an analysis of the right choice
of threshold based on a human inspection on LAION-5B,
and they recommend using the threshold 0.28 when using
CLIP embeddings; we also use this threshold. We similarly
chose 0.2 as a threshold when using ALIGN based on our
own inspection.
Based on the results in Figure 12, we noticed the same
(1) the perfor-
consistent observations with all metrics:
mance increases with every active learning round; (2) the
performance increase is faster in the beginning, and starting
to plateau in the later AL rounds; (3) the models based in
ALIGN embeddings are consistently better than those using
CLIP.
G.2. Margin versus Margin + Positive Mining
We show in detail the results per concept for the two
active learning strategies considered in our paper: margin
sampling and the margin sampling + positive mining of
[39]. The results are show in Figure 13. We observe that for
the majority of the concepts the two methods are very close.
Some exceptions include the concepts healthy dish and
hand pointing for which margin performs better, while
for block tower margin + positive mining works better.
Overall it is not clear that one method is significantly better
than the other.
F. User-in-the-loop vs crowd raters
H. Concept difficulty
We include additional results comparing active learning
with the user in the loop with active learning using crowd
raters. Figure 10 shows detailed results, per concept, for
the three experimental settings User-100, Crowd-100
and Crowd-500 described in Section 4.3.2. We can notice
how for difficult concepts (according to the difficulty scores
in Appendix H) such as healthy dish, the performance
of the user models far exceeds that of the crowd raters, with
far less samples. On the other hand, for easy concepts such
as hair coloring the models trained with more data from
crowd raters end up superseding the best user model.
G. Additional active learning results
G.1. Additional metrics
We include here additional active learning results, mea-
suring the amount of rating by user versus model perfor-
mance. Figure 12 shows the results in terms of AUC ROC,
F1 score, and accuracy. Note that, unlike AUC PR and AUC
ROC, for computing the F1 score and accuracy one must
choose a threshold on the model prediction score that deter-
mines whether a sample is on the positive or negative side
of the decision boundary. For our trained MLP models, we
used the common 0.5 threshold. For the zero-shot models,
To be unbiased with respect to who the rater is-whether
it is the user or crowd raters-we decided to measure con-
cept difficulty as the performance of a zero-shot model. We
show the performance of the zero-shot model using CLIP
embeddings for each concept, measured in terms of AUC
PR on the test set, in Table 3.
With these scores, we can group the top 7 easiest and top
7 hardest concepts:
• top 7 easiest concepts:
in-ear-headphones,
white background,
hair-coloring, arts and crafts
emergency service,
single sneaker on
pie-chart,
dance,
• top 7 hardest concepts: gourmet tuna, healthy
dish, hand-pointing, astronaut, block tower,
home-fragrance, stop sign
I. Augmenting user labeling with crowd ratings
One natural question to ask is what happens if we com-
bine the benefits from doing active learning (AL) with users
with those of AL with crowd raters. We considered such a
setting. For each concept, we took the model trained af-
ter 5 rounds of AL with the user (setting User-100 in
15
(a) Area under the receiver-operator curve.
(b) F1 score.
(c) Accuracy.
Figure 12: Model performance per amount of samples rated by the user. Mean and standard error over all concepts, for
multiple metrics.
Figure 13: Results per concept for margin vs margin & positive mining of [39]. The each figure shows the AUC PR (on
y-axis) for each active learning round (on x-axis) for the two methods.
(a) AUC PR.
(b) AUC ROC.
(c) F1 score.
Figure 14: Model performance per amount of samples rated by the user and/or crowd raters. We also display an additional
experimental setting User-100 + Crowd-500, where 5 rounds of user AL with batch size 100 are continued with another
round of AL with crowd raters, with batch size 500. Mean and standard error over all concepts, for multiple metrics.
16
0100200300400500600Number of samples rated0.600.650.700.750.80AUC ROCagile (CLIP)agile (ALIGN)zero-shot (CLIP)zero-shot (ALIGN)0100200300400500600Number of samples rated0.20.30.40.50.6F1agile (CLIP)agile (ALIGN)zero-shot (CLIP)zero-shot (ALIGN)0100200300400500600Number of samples rated0.5500.5750.6000.6250.6500.6750.7000.725Accuracyagile (CLIP)agile (ALIGN)zero-shot (CLIP)zero-shot (ALIGN)0.450.500.550.60healthy dish0.600.650.70emergency service0.750.800.850.90hair-coloring0.600.650.700.75single sneaker on white background0.50.60.7astronaut0.40.50.6gourmet tuna0.550.600.650.70dance0.500.550.600.65home-fragrance1002003004005006000.400.450.50hand-pointing1002003004005006000.700.720.740.760.78arts and crafts1002003004005006000.600.650.700.750.80stop sign1002003004005006000.450.500.550.600.65block towermarginmargin & positive mining050010001500200025003000Numberofsamplesrated0.5000.5250.5500.5750.6000.6250.6500.6750.700AUCPRUser-100Crowd-100Crowd-500User-100+Crowd-500050010001500200025003000Numberofsamplesrated0.600.620.640.660.680.700.720.74AUCROCUser-100Crowd-100Crowd-500User-100+Crowd-500050010001500200025003000Numberofsamplesrated0.20.30.40.50.6F1User-100Crowd-100Crowd-500User-100+Crowd-500Concept
gourmet tuna
healthy dish
hand-pointing
astronaut
block tower
home-fragrance
stop sign
emergency service
in-ear-headphones
single sneaker on white background
dance
pie-chart
hair-coloring
arts and crafts
Score
0.37
0.46
0.47
0.48
0.49
0.50
0.51
0.53
0.55
0.56
0.61
0.66
0.73
0.74
Table 3: Difficulty score per concept, estimated as AUC PR
of the zero-shot model using CLIP embeddings.
Section 4.3.2) and we used it for another round of active
learning with a larger batch size (500), this time rated by
crowd workers. The results are shown in Figure 14, where
we named this setting User-100 + Crowd-500.
With additional data from the crowd raters, the model
shows further improvements.
J. ImageNet21k experiment details
We use these concepts in our ImageNet21k experiments:
50 easy concepts:
50 hard concepts:
1. dive (n00442981)
2. fishing (n00453935)
3. buffer (n02911485)
4. caparison (n02955540)
5. capsule (n02957755)
6. cartridge holder
(n02973017)
7. case (n02975212)
8. catch (n02982599)
9. cellblock (n02992032)
10. chime (n03017168)
11. detector (n03181293)
12. filter (n03340009)
13. floor (n03365991)
14. game (n03413828)
15. glider (n03439814)
16. grapnel (n03454211)
17. handcart (n03484083)
18. holder (n03525454)
ironing (n03585875)
19.
20.
jail (n03592245)
21. mat (n03727837)
22. module (n03779000)
23. power saw (n03996145)
24. radio (n04041544)
25. religious residence
(n04073948)
thermostat (n04422875)
26. sleeve (n04236702)
27. spring (n04288272)
28.
29. weld (n04571958)
30. winder (n04586581)
31. pink (n04970916)
32. cracker (n07681926)
33. cress (n07732747)
34. mash (n07805254)
35. pepper (n07815588)
36. mustard (n07819480)
37. sage (n07820497)
38. savory (n07820814)
39. curd (n07850083)
40. dough (n07860988)
41. fondue (n07867883)
42. hash (n07869391)
43. Irish (n07907161)
44. sour (n07918028)
45. herb tea (n07933891)
46.
top (n08663860)
47. bank (n09213565)
48. hollow (n09305031)
49. roulette (n13908580)
50. culture medium
(n14899328)
1. tree frog (n00442981)
2. harvestman (n00453935)
3. coucal (n02911485)
4. king penguin
(n02955540)
5. Irish wolfhound
(n02957755)
6. komondor (n02973017)
7. German shepherd
(n02975212)
8. bull mastiff (n02982599)
9. Newfoundland
(n02992032)
10. white wolf (n03017168)
11. ladybug (n03181293)
12. rhinoceros beetle
(n03340009)
13. leafhopper (n03365991)
14. baboon (n03413828)
15. marmoset (n03439814)
16. Madagascar cat
(n03454211)
17. analog clock (n03484083)
18. apiary (n03525454)
19. bathtub (n03585875)
20. bookcase (n03592245)
21. CD player (n03727837)
22. chain mail (n03779000)
23. chest (n03996145)
24. cornet (n04041544)
25. desk (n04073948)
26. desktop computer
(n04236702)
letter opener (n04422875)
27. gondola (n04288272)
28.
29. microwave (n04571958)
30. nail (n04586581)
31. patio (n04970916)
32. pickup (n07681926)
33. plane (n07732747)
34. pot (n07805254)
35. purse (n07815588)
36. racket (n07819480)
37. snowplow (n07820497)
38. sombrero (n07820814)
39. stopwatch (n07850083)
40. strainer (n07860988)
theater curtain
41.
(n07867883)
ice cream (n07869391)
42.
43. pretzel (n07907161)
44. cauliflower (n07918028)
45. acorn squash (n07933891)
46.
lemon (n08663860)
47. pizza (n09213565)
48. burrito (n09305031)
49. hen-of-the-woods
(n13908580)
50. ear (n14899328)
17
|
|
http://arxiv.org/abs/2302.12940v1 | 2023-02-25T00:19:49 | 2023-02-25T00:19:49 | Exponential Hardness of Reinforcement Learning with Linear Function
Approximation | A fundamental question in reinforcement learning theory is: suppose the
optimal value functions are linear in given features, can we learn them
efficiently? This problem's counterpart in supervised learning, linear
regression, can be solved both statistically and computationally efficiently.
Therefore, it was quite surprising when a recent work
\cite{kane2022computational} showed a computational-statistical gap for linear
reinforcement learning: even though there are polynomial sample-complexity
algorithms, unless NP = RP, there are no polynomial time algorithms for this
setting.
In this work, we build on their result to show a computational lower bound,
which is exponential in feature dimension and horizon, for linear reinforcement
learning under the Randomized Exponential Time Hypothesis. To prove this we
build a round-based game where in each round the learner is searching for an
unknown vector in a unit hypercube. The rewards in this game are chosen such
that if the learner achieves large reward, then the learner's actions can be
used to simulate solving a variant of 3-SAT, where (a) each variable shows up
in a bounded number of clauses (b) if an instance has no solutions then it also
has no solutions that satisfy more than (1-$\epsilon$)-fraction of clauses. We
use standard reductions to show this 3-SAT variant is approximately as hard as
3-SAT. Finally, we also show a lower bound optimized for horizon dependence
that almost matches the best known upper bound of $\exp(\sqrt{H})$. | [
"Daniel Kane",
"Sihan Liu",
"Shachar Lovett",
"Gaurav Mahajan",
"Csaba Szepesvári",
"Gellért Weisz"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12940v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12940v1",
"@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",
"cs.CC"
] | Exponential Hardness of Reinforcement Learning with Linear
Function Approximation
Daniel Kane*
University of California, San Diego
[email protected]
Sihan Liu
University of California, San Diego
[email protected]
Shachar Lovett†
University of California, San Diego
[email protected]
Gaurav Mahajan
University of California, San Diego
[email protected]
Csaba Szepesv ́ari‡
DeepMind, London, UK
University of Alberta, Edmonton, Canada
[email protected]
Gell ́ert Weisz
DeepMind, London, UK
University College London, London, UK
[email protected]
February 28, 2023
Abstract
A fundamental question in reinforcement learning theory is: suppose the optimal value functions
are linear in given features, can we learn them efficiently? This problem's counterpart in supervised
learning, linear regression, can be solved both statistically and computationally efficiently. Therefore, it
was quite surprising when a recent work [KLLM22] showed a computational-statistical gap for linear
reinforcement learning: even though there are polynomial sample-complexity algorithms, unless NP =
RP, there are no polynomial time algorithms for this setting.
In this work, we build on their result to show a computational lower bound, which is exponential
in feature dimension and horizon, for linear reinforcement learning under the Randomized Exponen-
tial Time Hypothesis. To prove this we build a round-based game where in each round the learner is
searching for an unknown vector in a unit hypercube. The rewards in this game are chosen such that
if the learner achieves large reward, then the learner's actions can be used to simulate solving a variant
of 3-SAT, where (a) each variable shows up in a bounded number of clauses (b) if an instance has no
solutions then it also has no solutions that satisfy more than (1-ǫ)-fraction of clauses. We use standard
reductions to show this 3-SAT variant is approximately as hard as 3-SAT. Finally, we also show a lower
bound optimized for horizon dependence that almost matches the best known upper bound of exp(√H).
3
2
0
2
b
e
F
5
2
]
G
L
.
s
c
[
1
v
0
4
9
2
1
.
2
0
3
2
:
v
i
X
r
a
*Supported by NSF Award CCF-1553288 (CAREER) and a Sloan Research Fellowship.
†Supported by NSF Awards DMS-1953928 and CCF-2006443.
‡Supported by NSERC, Amii, and the Canada AI Research Chair program.
1
3
3
4
5
6
9
. . . . . .
9
. . . . . . 11
. . . . . . 16
22
24
Contents
1 Introduction
2 Our Contributions
2.1 Preliminaries
. . . . .
2.2 Exponential lower bound for LINEAR-3-RL . . .
. . . . . .
. . . . .
. . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . .
. . . . .
. . . . . .
. . . . . .
3 Proof Overview
4 Lower Bound Construction
4.1 From 3-CNF formulas to 3-action MDPs
. . . . . .
4.2 Linear Value Function . . . .
4.3 RL algorithm to SAT algorithm . . . . .
. . . .
. . . . .
. . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . .
. . . . .
. . . . .
A Hardness of Approximate SAT with gap and few clauses
B Upper Bounds
2
1 Introduction
Efficiently exploring and planning in environments with large state spaces is a central problem in reinforce-
ment learning. Recently, there has been a lot of success in applying function approximation to classical
reinforcement learning algorithms leading to state-of-the-art results in various practical applications.
This has also led to a growing interest of the reinforcement learning (RL) theory community to design
and analyze efficient algorithms for the large state space regime.
In this regime, the goal is to design
algorithms whose complexity does not polynomially depend on the size of the state space. Since, this is
impossible when we do not make any assumptions about the environment, much effort has been spent on
finding minimal assumptions under which an optimal policy can be found efficiently: State Aggregation
[Li09, DRZ20], Linear qπ [DKWY20, LSW20, YHAY+22, WGKS22], Linear MDPs [YW19, JYWJ20],
Linear Mixture MDPs [MJTS20, AJS+20, ZHG21], Reactive POMDPs [KAL16], Block MDPs [DKJ+19],
FLAMBE [AKKS20], Reactive PSRs [LSS01], Linear Bellman Complete [Mun05, ZLKB20], Bellman rank
[JKA+16], Witness rank [SJK+19], Bilinear Classes [DKL+21], Bellman Eluder [JLM21] and Decision-
Estimation Coefficient [FKQR21].
One such minimal assumption that came out of this line of work is RL with linear function approxima-
tion: when the optimal value function (either Q∗, or V ∗, or both) can be obtained as the linear combination
of finitely many, known basis functions. When both the optimal value functions Q∗ and V ∗ satisfy this as-
sumption (called linear Q∗&V ∗ henceforth), there are two sample efficient algorithms in the literature whose
sample complexities are polynomial in the number of basis functions d and horizon H. First, the algorithm
by [DKL+21] additionally assumes that the basis functions' values can be known and pre-processed for the
whole state-action space. Second, TensorPlan [WAJ+21, WSG22] replaces this with an implicit assump-
tion that the number of actions is a small constant (as its sample complexity is exponential in this number).
[WAS21, WSG22] showed sample complexity lower bounds exponential in min(d, H) that imply statistical
hardness of finding a near-optimal policy when the number of actions is polynomial in d and the values of
basis functions are only revealed for the sampled states. This indicates that one of the two aforementioned
additional assumptions are required for a sample efficient algorithm. However, even when both additional
assumptions are met, these works leave finding a computationally efficient algorithm for this setting as an
important open question.
A recent work [KLLM22] made progress on this question by showing a computational-statistical gap
in RL with linear function approximation: unless NP=RP, there is no polynomial time algorithm even for
the easiest setting of linear Q∗&V ∗, deterministic transition, stochastic rewards and 2 actions. This is
surprising because if we also assume that the rewards are deterministic, then this problem can be solved in
O(dH) time [WVR17]. Therefore, the result of [KLLM22] showed that adding noise in rewards can lead
to computational intractability (similar transition happens for sample complexity if the number of actions
is unrestricted [WAS21, WSG22]). However, the lower bound of [KLLM22] is not tight: they showed a
quasi-polynomial lower bound in d whereas the best known upper bounds are exponential in min(d, H)
[DLMW20].
2 Our Contributions
In this work, we provide almost matching exponential computational lower bounds for RL with linear func-
tion approximation. Before stating our main results, we first need to state some key definitions that we use
throughout the paper.
3
2.1 Preliminaries
,
A
S × A 7→
S × A 7→ S
is the state space,
is the action space, R :
Markov Decision Process (MDP). We begin by defining the framework for reinforcement learning, a
Markov Decision Process (MDP). We define a deterministic transition MDP as a tuple M = (
, R, P ),
∆([0, 1]) is the stochastic reward function,1
where
S
is the deterministic transition function. Such an MDP M gives rise to a discrete time
and P :
sequential decision process where an agent starts from a starting state S0 ∈ S
. Then, at each time t, the
R(St, At) and transitions to next
agent at some current state St, takes action At, receiving reward Rt ∼
. In H-horizon problems
state St+1 = P (St, At). This goes on until the agent reaches the end state
is of length of at most H, and the sets
each such trajectory/path from the starting state s0 to an end state
of states
H. The goal of
the decision making agent is to maximize the sum of the total expected rewards it receives along such a
trajectory. As it turns out, the total expected reward regardless the initial state is achievable by following a
and following π means that in step
deterministic, stationary policy, which is given by some map π :
t if the state is St, the action taken is At = π(St). Given a policy π and a state-action pair (s, a)
,
we let
⊥ ∈ S
St that are reachable after t steps (taking any actions) are disjoint for 0
∈ S × A
S 7→ A
A
⊥
≤
≤
S
t
V π(s) = E
τ
1
−
"
t=0
X
R(St, At)
S0 = s, π
|
#
, Qπ(s, a) = E
τ
1
−
denote the total expected reward where S1, A1, . . . Sτ
MDP M and τ is the first time when policy π reaches the end state
that τ
⊥
H. We use Q∗ and V ∗ to denote the optimal value functions
Qπ(s, a) ,
V ∗(s) = sup
1, Aτ
≤
V π(s) , Q∗(s, a) = sup
π
−
−
π
R(St, At)
|
S0 = s, A0 = a, π
#
"
t=0
X
1 are obtained by executing policy π in the
where it always holds
, that is Sτ =
⊥
s
∈ S
, a
∈ A
)
S ⊔
Rd if for all state s and action a, V ∗(s) =
We say that the optimal value functions V ∗ and Q∗ can be written as a linear function of d-dimensional
features ψ :
θ, ψ(s, a)
(
S × A
i
h
In our construction, linear V ∗ implies linear Q∗ for
for some fixed θ
∈
ψ(s, a) = ψ(P (s, a)) as (i) in deterministic transition MDPs, Q∗(s, a) = r(s, a) + V ∗(P (s, a)), (ii) in our
construction, rewards are 0 everywhere except at the leaves and (iii) the reward at the leaves does not depend
on the action.
Rd independent of s and a.2
and Q∗(s, a) =
θ, ψ(s)
i
h
→
Computational Problems. We next introduce 3-SAT, a satisfiability problem for 3-CNF formulas. In a
3-SAT problem, we are given as input, a 3-CNF formula φ with v variables and O(v) clauses and our goal
is to decide if φ is satisfiable.
Complexity problem 3-SAT
Input: A 3-CNF formula φ with v variables and O(v) clauses
Goal:
Decide whether the formula is satisfiable.
The focus of this work is the computational RL problem, LINEAR-k-RL. In a LINEAR-k-RL prob-
lem with feature dimension d, we are given access to a deterministic MDP M with k actions and horizon
H = O(d) such that the optimal value functions Q∗ and V ∗ can be written as a linear function of the d-
dimensional features ψ. Our goal is to output a good policy, which we define as any policy π that satisfies
1/8, where V π and V ∗ refers to the value of the policy π and optimal policy, respectively, at a
V π > V ∗ −
fixed starting state and is always in [0, H] 3. From now on, we always assume that the number of actions is
1∆([0, 1]) denotes the set of all distributions over the interval [0, 1].
2Above, ⊔ means taking the disjoint union of the arguments.
3In our constructions, we satisfy the more stringent condition that V ∗ ∈ [0, 1].
4
k = 3.
Complexity problem LINEAR-k-RL
Oracle: a deterministic MDP M with k actions, optimal value functions V ∗ and Q∗ linear in d
Goal:
dimensional features ψ, horizon H and state space of size at most exp(poly(d)).
find policy π such that V π > V ∗ −
1/8.
We now describe how the algorithm interacts with the MDP. We assume that the algorithm has access
to the state and action spaces (which can be taken as subsets of integers), as well as random access to the
associated (i) reward function R, (ii) transition function P and (iii) features ψ. For all these functions, the
algorithm provides a state s and action a (if needed) and receives a random sample from the distribution
R(s, a) (for the reward function), the state P (s, a) (for the transition function), features ψ(s) and ψ(s, a)
(for the features). We assume that each call accrues constant runtime and input/output for these functions
are of size polynomial in feature dimension d.
We will often talk about randomized algorithm A solving a problem in time t with error probability p.
By this we mean (i) A runs in time O(t); (ii) for satisfiability problems, it returns YES on positive input
instances with probability at least 1
p and returns NO on negative input instances with probability 1; and
−
(iii) for an RL problem, it returns a good policy with probability at least 1
p.
−
2.2 Exponential lower bound for LINEAR-3-RL
In this paper, we present computational lower bound under a strengthening of the NP
= RP conjecture, the
Randomized Exponential Time Hypothesis (rETH) [DHM+14], which asserts that probabilistic algorithms
can not decide if a given 3-SAT problem with v variables and O(v) clauses is satisfiable in sub-exponential
time.
Definition 2.1 (Randomized Exponential Time Hypothesis (rETH)). There is a constant c > 0 such that
no randomized algorithm can decide 3-SAT with v variables in time 2cv with error probability 1/3.
The Randomized Exponential Time Hypothesis along with many variants motivated by the Exponential
Time Hypothesis [IP01] has been influential in discovering hardness results for a variety of problems see, e.g.
[CFK+15, Wil19]. Under the Randomized Exponential Time Hypothesis, our main result is an exponential
computational lower bound for learning good policies in deterministic MDPs with linear optimal value
functions.
Theorem 2.2 (Exponential
there is no
randomized algorithm that solves LINEAR-3-RL with feature dimension d and horizon H in time
exp( ̃O(min(d1/4, H 1/4))) with probability at least 9/10, where ̃O hides polylog(d) and polylog(H) fac-
tors.
in horizon and dimension lower bound). Under rETH,
) is the correct complexity measure here. To see this, we note
A few remarks are in order. Firstly, min(
*
that this problem can be solved in time exp( ̃O(min(d, √H))) (we prove these upper bounds in Appendix B)
and therefore if either dimension d or horizon H is constant, we can solve this problem efficiently in the
other parameter. Secondly, this is the first exponential computational lower bound for this setting as the
previous best known result [KLLM22] produces at best a quasi-polynomial lower bound, even assuming
rETH.
In terms of horizon H, there is still a gap between the exp( ̃Ω(H 1/4)) lower bound in Theorem 2.2
and the exp( ̃O(√H)) upper bound. We next show a lower bound optimized for horizon H which almost
matches this upper bound.
5
6
Theorem 2.3 (Almost matching horizon lower bound). Under rETH, there is no randomized algorithm
H log H in time exp( ̃O(√H)) with
that solves LINEAR-3-RL with horizon H and feature dimension d
probability at least 9/10, where ̃O hides polylog(H) factors.
≥
We now discuss some open questions. Even though the lower bound in Theorem 2.3 almost matches the
upper bound in terms of horizon H, it requires the feature dimension to be at least quasi-polynomial in H.
We leave it as an open question if the above result also holds when d = poly(H). Another important direc-
tion is understanding the complexity in terms of dimension d i.e. a lower bound optimized for dimension d.
Our proof for Theorem 2.2 can be modified to show exp(d) lower bound for H = exp(d). Does the result
also hold true for H = poly(d)?
Related Work. We already discussed the large body of work giving statistical efficient algorithms for RL
under various assumptions. Complementing them is work giving statistical lower bounds for RL with linear
function approximation when the number of actions grows. Concretely, the works of [WAS21, WSG22,
WWK21] showed sample complexity lower bounds exponential in min(d, H) that imply statistical hardness
of finding a near-optimal policy, when the number of actions grow with the number of basis functions and
the values of basis functions are only revealed for the sampled states. Furthermore, there are recent works
[GMR22a, GMR22b, USL+22] on designing quasipolynomial-time end-to-end algorithm for learning in
"observable" POMDPs (our lower bound result refute existence of similar quasipolynomial-time algorithms
for linear Q∗ and V ∗ assumption.)
Remainder of this paper.
In Section 3, we present a brief overview of the main technical ideas in the
lower bound construction. In Section 4, we describe in detail our exponential lower bound constructions
and prove our main theorems. In Appendix A we use standard reductions to show that under the randomized
Exponential Time Hypothesis, a gap version of SAT that we use in the reduction is computationally hard.
In Appendix B we give algorithms for RL which are exponential in min(d, √H), showing that our lower
bound is close to optimal.
3 Proof Overview
The high-level idea of the previous lower bound of [KLLM22] was the following. The authors design an
v which constitutes a satisfying
MDP that forces the learner to search for an unknown vector w∗ in
0, 1
}
{
solution of a given SAT formula φ.
In particular, each state in the MDP corresponds to an assignment
and the learner at the state can flip one variable appearing in the first unsatisfying clause of the formula
(assuming some canonical ordering of the clauses). Rewards are given when the learner either reaches
a satisfying assignment or the end of the horizon. The rewards are designed in such a way that (i) the
learner is incentivized for finding w∗ quickly but (ii) unable to exploit much information from the rewards
to accelerate the searching process. As a result, the task becomes as hard as solving the original SAT
problem.
One bottleneck of the above approach is that the reward is only uninformative if the algorithm plays the
game for fewer than quasi-polynomially many times. After that, there is a decent chance that the algorithm
could obtain extra information from the reward structure which may significantly simplify the task. We
follow the same high level idea of embedding hard (variants of) SAT instances into a linear-RL problem. Yet,
we make significant modifications to the transition and reward structure of the MDP such that the algorithm
can hardly obtain any useful information from the rewards unless it plays the game for exponentially many
times.
In essence, we ensure the rewards given at the end of the horizon are uninformative by making it a
Bernoulli variable with exponentially small mean. If so, the learner with high probability sees only 0 in the
6
Complexity problem (b, ǫ)- GAP-3-SAT
Input: A 3-CNF formula φ with v variables and O(v) clauses with the following promise:
(1) each variable is in at most b clauses, and (2) either φ is satisfiable or any assignment
leaves at least ǫ-fraction of clauses unsatisfied.
Decide whether the formula is satisfiable.
Goal:
end unless it plays the game for a large number of times. As a warm-up, one could imagine an MDP with
actions and transitions identical to that from [KLLM22]. Yet, we modify the reward to be exp(
number of
dist(w, w∗)) at any terminal state w. This makes sure the (expected) reward given at the end
steps thus far
of the horizon is always exponentially small. Unfortunately, the value function induced will be of the same
exponential function, and hence cannot be written as a linear function of some low-dimensional features
depending only on the state.
−
−
n
i=1 gi(number of flips taken in round i)
Round Based Game. One way to fix this is by turning the game into a round based game. We divide the
search into rounds and in each round, the variables are shown sequentially for the learner to decide whether
to flip a variable it or not. Then, if the learner terminates at the n-th round, we make the reward function
gn+1(dist(w, w∗)) for some carefully chosen low-degree
roughly
and monotonically decreasing polynomials gi. Now, consider the greedy policy which tries to decrease
the distance to w∗ whenever possible. Since the greedy policy can always reach w∗ within one (entire)
j<i gj(number of flips in
round, the value function of such strategy at the beginning of round i will be
round j)
gi(dist(w, w∗)). Since only the last term depends on w and w∗, we get that the value function is
essentially a low-degree polynomial in w and w∗, which can indeed be written as a linear function of some
state-dependent low-dimensional feature vectors. See Lemma 4.5 for details.
Q
Q
∗
*
However, in order to ensure that this is the optimal strategy, we will need to define the gi very precisely
so that making a flip in the current round is always better than deferring it to future rounds. Essentially this
means that the logarithmic derivative of gj should be smaller than the logarithmic derivative of gi for j > i.
Ideally, we would like to make gi(x) = exp(
ci x) for some increasing sequence of ci, which would then
make the above property trivially true. However, since gi must be a polynomial, we will instead make it a
Taylor approximation to this exponential function around x = 0. As long as we can make the error in this
Taylor approximation small relative to the difference in logarithmic derivatives of exp(
x), it remains
advantageous for the agent to take additional steps in earlier rounds. Fortunately, this is indeed achievable
using a low-degree Taylor approximation. See Claim 4.7 and Lemma 4.8 for details of the argument.
ci *
−
−
Flips Enforcement. While the round-based game does ensure the linearity of the value function, the re-
ward given at the end of the horizon is not necessarily small. Since gi(x) is taken to be the Taylor approxi-
mation of exp(
x) around x = 0, gi(0) will be 1. Consequently, if the learner chooses to flip nothing,
it may receive a huge reward in the end, allowing the algorithm to extract information from the reward
structure.
ci *
−
To prevent this, we will offer the learner a bundle of variables in the first step of each round so that it
must flip one of the given variables. A caveat of doing so is that we want at least one variable to be indeed
erroneous so that flipping it results in the correct truth assignment to it and hence the greedy policy is still
well-defined and optimal. Fortunately, this is guaranteed if we simply give the variables appearing in any of
the unsatisfied clauses.
This allows us to force the algorithm to make at least one flip. In order to make the rewards diminish
at a faster rate, we take the idea further: we keep presenting the learner with unsatisfied clauses involving
7
variables that have not yet been flipped. Only after running out of such clauses, we start to go through the
rest of the variables and give the learner the choice to skip flips.
)
0
,
0
,
0
,
1
,
0
(
=
=
)
i
(
w
a
1
b = 0
c
=
1
)
0
,
0
,
1
,
1
,
0
(
=
w
1
=
a
)
1
,
0
,
1
,
1
,
0
(
=
w
e = 1
d
=
1
a = 0
a
=
1
)
1
,
1
,
1
,
1
,
0
(
=
)
1
+
i
(
w
B
d = 1
d
=
0
B
A
0
=
b
b
=
1
Stage I
Stage II
Round i
b
d
∨
∧
(c
c)
e)
∨ ¬
Figure 1: Example mechanics of the MDP for round i. The MDP consists of h consecutive rounds, of
which only round i is shown. Nodes are states with their assignment w labeled where it changes, and
edges are actions where the label represents the setting of some variable. The satisfiability problem is
e), for variables a to e that have
(a
assignment of w(i) at the start of the round. For illustrative simplicity, note that this problem does not belong
to (b, ǫ)- GAP-3-SAT. The first two steps form Stage I as there is an unsatisfied clause consisting of only free
variables. The second stage allows to change any of the remaining free variables one by one. Transitions
are deterministic. Rewards are always zero except for termination conditions A and B, where the reward is
Bernoulli. A: the assignment satisfies at least (1
ǫ) fraction of clauses. B: only if i is the last round, the
game is terminated at the end of the round.
∨ ¬
∨ ¬
∨ ¬
∨ ¬
(a
(a
(a
e)
c)
−
∧
∨
∨
∨
∨
∧
∧
d
b
b
We would like to require that we can find many such clauses. Of course this is not possible to guar-
antee in a general SAT instance. However, we show there is a special family of 3-SAT instances so that
finding assignments where one would quickly run out of such unsatisfied clauses is computationally hard.
In particular, we use some standard reductions to show that 3-SAT is approximately as hard as what we call
GAP-3-SAT where (a) each variable shows up in a bounded number of clauses (b) if there are no solutions
then there are no solutions that satisfy a (1-ǫ)-fraction of clauses. Note that (b) above implies that it is hard
to find any assignment satisfying a (1-ǫ)-fraction of clauses, and (a) says that flipping a variable can only
remove a constant number of unsatisfied clauses from consideration. In particular, if each variable appears
in at most b clauses, then any computationally efficient algorithm will never run out of unsatisfied clauses
in the first ǫ
(total number of clauses/b) steps. This ensures that the reward at the horizon is exponentially
small in the number of rounds.
∗
8
4 Lower Bound Construction
In this section, we will prove the following computational lower bound for LINEAR-3-RL under rETH.
Proposition 4.1. Let v
∈
Z+ be sufficiently large. Suppose d, H
Z+ satisfy either
∈
1. d = v4
*
2. d = exp
polylog(v) and H = Θ(v4), or
log2 v
*
polyloglog(v)
and H = Θ(v2).
Then, under rETH, no randomized algorithm can solve LINEAR-3-RL with feature dimension d and time
horizon H in time exp(v/ polylog(v)) with error probability 1/10.
(cid:0)
(cid:1)
Our main theorems, Theorem 2.2 and Theorem 2.3, follow from Proposition 4.1 by writing v as a
function of d and H.
4.1 From 3-CNF formulas to 3-action MDPs
−
Recall that in (b, ǫ)-GAP-3-SAT, we are given as input a 3-CNF formula φ on v variables where (1) each
variable is guaranteed to occur in at most b clauses and (2) the formula is either satisfiable or any assignment
satisfies at most (1
ǫ)-fraction of the clauses (the formula is guaranteed to fall in one of these two cases).
Furthermore, we may assume that the number of clauses is at least v. By Proposition 4.11, we know
deciding whether φ is satisfiable must take time that is exponential in v under rETH when b, ǫ are set to be
two absolute constants. Our goal is to construct an MDP parametrized by φ so that learning a near optimal
policy for the MDP is as hard as solving (b, ǫ)-GAP-3-SAT. When the formula is satisfiable, additionally
the MDP will have an extra parameter w∗ which is chosen to be an arbitrary satisfying assignment of the
formula.
To consolidate the two results in Proposition 4.1, in our reduction, we construct the MDP with two
v2p and time
additional "degree parameters" p, q
vq where α is a small enough absolute constant to be determined later. In particular, the
horizon H = α
hard instance for the first result is obtained by setting p = 2, q = 4 and the hard instance for the second
result is obtained by setting p = 2 log v, q = 2.
Z+. The MDP will have feature dimension d = 2
∈
*
*
State Action Transition. The time steps are divided into h := H/v rounds where each round consists of
v steps. In each round, the MDP maintains a set of "used variables", initialized to be the empty set at the
beginning of each round. We will call unused variables as "free variables". One round is further divided
into two stages as follows:
1. In each step of the first stage, the agent is given one unsatisfied 3-SAT clause with only free variables
and asked which of the three variables should be flipped. Then, the variable chosen by the algorithm
will be added to the set of used variables. The first stage ends (and the second stage starts) when we
run out of unsatisfied clauses with only free variables.
2. In the second stage, the MDP presents each of the remaining free variables sequentially to the agent
and asks whether the variable should be flipped. After each step, regardless of whether the algorithm
decides to flip the variable or not, the variable presented will be added to the set of used variables.
Note that each round has exactly v steps since there are v variables in the formula and each step marks one
of them as used.
9
Termination Condition. The MDP terminates if it reaches the last level, or if more than a (1
ǫ)-fraction
of the clauses are satisfied. We make a couple of observations related to the termination conditions. First,
if the MDP terminates before reaching the last level, the algorithm has essentially solved the underlying
GAP-3-SAT problem since this means there exists an assignment that satisfies more than (1
ǫ)-fraction of
the clauses. Secondly, the termination condition ensures that, at the beginning of each round, there are at
least an ǫ-fraction of unsatisfied clauses. Since each variable appears in at most b clauses, we will never run
out of unsatisfied clauses with only free variables in the first ǫ
(total number of clauses/b) steps.
−
−
*
Size of state space. The number of states necessary for a round and an assignment is at most O(3v): the
transitions within a round form a tree of branching factor at most 3 and height at most v (see fig. 1). There
are h = H/v rounds, the whole transition structure is a tree, hence the total number of states is at most
O((3v)h) = exp(poly(v, H)).
Rewards. Rewards are given only when the MDP terminates and are different depending on whether the
formula is satisfiable or not. When the formula is not satisfiable, the reward is 0 everywhere. In the rest
v. When the formula is satisfiable, we
of the discussion, we will think of assignments as vectors in
1, 1
}
need to keep track of the assignment at the beginning of each round and denote them as w(1), w(2) . . . , w(n)
(note that the algorithm starts at the first state with the assignment w(1)), on which the final reward depends.
The reward depends only on the history w(1), w(2) . . . , w(n), the current assignment w and the optimal
assignment w∗ and is given by Ber(r(w(1), w(2) . . . , w(n), w)) where r(
) is the expected reward function
*
and the Bernoulli distribution Ber(ρ) is 1 with probability ρ and 0 with probability 1
ρ. Before specifying
−
), we introduce the concept of an extended assignment.
the expected reward function r(
*
{−
Definition 4.2 (Extended Assignment). Let S be the set of free variables. Then, the extended assignment
S.
of w under S, denoted as ext(w, S) is given by ext(w, S)i = w∗i for i
S and ext(w, S)i = wi for i
∈
6∈
In plain language, the extended assignment is the assignment derived from w after correcting all the free
variables to agree with w∗. We note that dependence of the reward function on the extended assignment
is crucial to ensure that the value functions associated to the greedy policy are linear functions, which will
become relevant later. Now we are ready to define expected reward function r(
) in terms of the historic
*
, w(n) reached by the agent at the end of past rounds, the current assignment w reached
assignments w(1),
by the agent and the set of free variables S when the MDP terminates.
* * *
Z+ be the two degree parameters. Let Tp : R
Definition 4.3 (Expected Reward). Let p, q
) at zero:
degree-p Taylor approximation of the exponential function exp(
*
∈
R+ be the
7→
Tp(x) =
xi
i!
.
p
Xi=0
Then, we define expected reward function r(w(1), w(2) . . . , w(n), w, S) as
n
1
−
Yi=1
where the polynomial gi : R
7→
gi(dist(w(i), w(i+1)))
gn(dist(w(n), ext(w, S)))
*
gn+1(dist(ext(w, S), w∗)),
(1)
! *
R for round i is defined as
gi(x) = Tp
x
(3
−
vq
1
i/h)
−
As noted in the proof overview, the polynomials gi are chosen to ensure that the optimal policy prefers going
towards w∗ as fast as possible and using a low degree Taylor approximation ensures the value function for
the optimal policy can be written as a linear function of low dimensional features.
−
(cid:19)
(cid:18)
*
.
(2)
10
4.2 Linear Value Function
When the underlying formula is unsatisfiable, any policy is optimal since the reward is constantly 0. When
the formula is satisfiable, we will show that the "greedy policy" is optimal.
Definition 4.4 (Greedy Policy). We say a policy is greedy if at every state it chooses any action that de-
creases the distance to w∗ whenever possible. If not, it tries to not increase the distance to w∗.
Notice that based on our setup of the MDP greedy policies exist:
in the first stage of a round, the
algorithm is given an unsatisfied clause so there is at least one variable in the clause that can be flipped to
decrease the distance from the current assignment to w∗; in the second stage, the algorithm is given variables
one at a time and it can always choose to not flip the variable if the current assignment already agrees with
w∗ on the variable.
We first discuss the value function V π associated to a greedy policy π. Given a state with current
assignment w and a set S of free variables, we define the following concepts that will be useful in the
v be the masking vector such that m(S)i = 1 if the i-th variable is in S
discussion. Let m(S)
0, 1
}
and m(S)i = 0 otherwise. Moreover, let 1 denote the all-one vector and
the point-wise multiplication
operator. Then, we define
∈ {
◦
distS,free(w, w∗) = dist(w
distS,used(w, w∗) = dist(w
◦
◦
m(S), w∗
(1
◦
m(S)), w∗
m(S))
−
(1
◦
−
m(S)))
Moreover, since the Hamming distance dist(a, b) for two vectors a, b
In other words, distS,used(w, w∗) and distS,free(w, w∗) are the number of used and free variables respectively
where the current assignment differs from w∗. Note that distS,used(w, w∗) + distS,free(w, w∗) = dist(w, w∗).
v is linear in both a
1, 1
}
and b (as dist(a, b) = (v
)/2), this implies distS,free(w, w∗) and distS,used(w, w∗) can be written as a
i
linear function of w∗ and some state specific parameters depending on the current assignment w and the set
of free variables S only. This allows us to show that the value functions for the greedy policy can also be
written as linear functions of w∗ and some state specific parameters.
∈ {−
a, b
− h
Lemma 4.5. When φ is satisfiable, the greedy policy's value at state s with round history w(1), . . . , w(n),
current assignment w and the set of free variables S, is given by
V π(s) =
n
1
−
Yi=1
gi(dist(w(i), w(i+1)))
*
gn(dist(w(n), w) + distS,free(w, w∗))
gn+1(distS,used(w, w∗)).
(3)
*
As a result, there exists features ψ(s), ψ(s, a)
state s and action a; and θ
function of features ψ i.e. V π(s) =
Rd with feature dimension d
2v2p depending only on
Rd depending only on w∗ such that V π and Qπ can be written as a linear
.
θ, ψ(s, a)
i
h
and Qπ(s, a) =
θ, ψ(s)
i
h
≤
∈
∈
Proof. The first claim follows from the fact that the greedy policy will choose an action that will decrease
the distance between the current assignment and the optimal assignment w∗ used by the MDP whenever
there is such an action. As a result, starting from a state s, it will flip all the free variables where w and
w∗ differ in the current round, and then flip all the used variables where w and w∗ differ in the next round.
Upon reaching w∗, the final reward received will be exactly Equation (3) with no intermediate rewards.
Following the greedy policy may fail to reach w∗. The only way this can happen is when the MDP
ǫ)-fraction of the clauses is satisfied, or when we reached a final state
terminates early: when more than (1
in the last round. In such cases, the reward received depends on the extended assignment of the terminal
state. From Definitions 4.2 and 4.3 it follows that the reward received is the same than the reward would
−
11
have been if the MDP were not to terminate at that point. Hence, the reward received is still consistent with
Equation (3).
⊂
| ≤
S
|
2p
i=0 vi
[v] of size
2p, and its value is θS =
To prove the second claim, we follow a similar approach as in the proof of Proposition 10 in [KLLM22].
In particular, we will show that V π(s) can be written as a polynomial of degree at most 2p in w∗. To see
why this is enough, we set θ to be all monomials in w∗ of degree at most 2p. That is, each coordinate of θ
S w∗i . We set ψ(s) to be the
corresponds to a multiset S
∈
corresponding coefficients in the polynomial V π. Then, we can write V π(s) =
. Since, there are
θ, ψ(s)
i
h
2v2p many coefficients we can set the feature dimension as d = 2v2p.
at most
Finally, we prove that V π(s) can be written as a polynomial of degree at most 2p in w∗. First recall
that distS,free(w, w∗) and distS,used(w, w∗) can be written as a linear function of w∗ and some state specific
parameters w(n), w and S. Moreover, dist(w(n), w) is independent of w∗ and only depends on w(n) and w.
) in the expression that: (i) for i < n it is independent of w∗;
Then the fact is proven by noting for each gi(
*
, it is a degree-p polynomial in dist(w(n), w), distS,free(w, w∗) and distS,used(w, w∗).
and (ii) for i
n, n+1
}
Finally, note that linear V π implies linear Qπ in deterministic MDPs for ψ(s, a) = ψ(P (s, a)), since by
definition, in MDPs with deterministic transition, Qπ(s, a) = r(s, a) + V π(P (s, a)) and the rewards in our
MDPs are zero, except for the last stage where the rewards do not depend on the action.
∈ {
P
Q
≤
i
We now prove some structural properties of the polynomials gi. First, we will show that if a policy makes
a "reasonable" number of flips in a round, then the value function decreases by a multiplicative factor. This
) function around zero.
follows from gi being (an appropriate degree) Taylor approximation of exp(
*
Claim 4.6. The polynomials gi defined in Equation (2) are bounded:
gi(x)
1
4 ≤
. Moreover, gi is monotonically decreasing.
1, . . . , h
}
ǫ
6bvq
−
≤
1
−
2
∈ {
for all ǫ
v
b *
≤
Proof. For simplicity let
≤
x
v and i
z =
1
vq
−
x
(3
*
−
.
i/h)
For the range of values of x we are interested in and since q
≥
fact that gi is a Taylor approximation, we can upper bound gi by
2, it follows that z
gi(x) = Tp (
−
z) =
z)j
(
−
j! ≤
p
Xj=0
≤
1
1
−
−
z
2
ǫ
6bvq
2 .
−
On the other hand, we can lower bound gi(x) as follows:
1/2. Then, using the
≤
(as p
≥
2 and z
1/2)
≤
(as x
v)
ǫ
b *
≥
gi(x) = exp (
−
z)
−
∞
Xj=p+1
z)j
(
−
j! ≥
exp
1
2
(cid:19)
−
(cid:18)
1
−
2p(p + 1)! ≥
1
4
,
(4)
where the first inequality again follows from z
inequality holds as long as p
1.
≥
1/2 and summation of geometric series and the last
≤
Next, we argue gi(x) is monotonically decreasing. We do so by showing the derivative of gi(x) is
negative. For this, we calculate
d
dx
gi(x) =
d
dx
z
(cid:18)
*
(cid:19)
(cid:18)
d
dz
Tp(
−
z)
=
(cid:19)
p
1
−
−
Xj=0 (cid:18)
z)j
(
−
j!
.
(cid:19)
12
Similar to Equation (4), we have
p
1
−
Xj=0 (cid:18)
z)j
(
−
j!
exp
1
2
−
(cid:18)
≥
(cid:19)
−
2p
(cid:19)
1
1p!
−
> 0
whenever p
≥
2. Therefore, d
dx gi(x) < 0 which implies that gi(x) is monotonically decreasing.
Next, we will show that the polynomials are designed such that correcting variables (where w and w∗
differ) in round i is always better than correcting variables in round i + 1. In particular, suppose we have
flipped c bits in the i-th round and d bits in the (i + 1)-th round. We then want to show that gi(c)
gi(c
≤
Taylor approximation which depends on the choice of p is relatively small.
≥
v. To prove this, we need to show that the error from
gi+1(d + 1) for any 1
gi+1(d)
v and 0
1)
≤
≤
−
≤
d
c
*
*
Claim 4.7. For any two polynomials gi, gi+1 defined in Equation (2), let
where i
, 0
1, . . . , h
}
∈ {
≤
c, d
≤
v and x =
fi,c,d(x) = gi(c + x)
gi+1(d
x).
−
*
. Then, for large enough v,
1, 2, . . . , d
}
{
fi,c,d(x
fi,c,d(x)
1).
≥
−
Proof. Consider the function ˆfi,c,d(
) defined as
*
ˆfi,c,d(x) = exp
1
vq
−
−
(cid:18)
To prove our claim, we will show that
c + x
(3
−
*
exp
i/h)
*
(cid:19)
−
vq
1
−
(cid:18)
*
x
(i + 1)/h)
d
(3
−
−
ˆfi,c,d(x)
ˆfi,c,d(x
−
1)
Ω
≥
−
fi,c,d(x)
|
−
ˆfi,c,d(x)
|
= O
(cid:18)
(cid:18)
α
1
v2q
*
1
v2q
2
−
,
2
−
(cid:19)
,
(cid:19)
.
(cid:19)
(5)
(6)
(7)
vq and h = H/v.
where to recall α in Equation (6) is the parameter in the time horizon factor, i.e. H = α
Then, our claim follows from the inequalities above as long as α is set to be a sufficiently small constant.
We first prove Equation (6). For this, we will show that the derivative of ˆfi,c,d(x) is not only positive but
lower bounded by Ω(1/α
v2q
*
−
2). The derivative of ˆf (
) is given by
*
*
ˆf ′i,c,d(x) = ˆfi,c,d(x)
*
vq
1
−
(3h
*
−
h
i)
*
(3h
i
−
−
.
1)
(8)
Notice that we always have
ˆfi,c,d(x)
exp
≥
2v
vq
−
1
−
exp
*
v
vq
−
−
= exp
1
3
vq
−
2
−
(cid:18)
≥
(cid:19)
Ω(1),
(cid:18)
where the first step follows from 0
have ˆfi,c,d(x)
derivatives by
(cid:16)
v and i
≤
Ω(1). Combining this with h := α
(cid:19)
c, d, x
≤
≥
∈ {
vq
−
*
(cid:17)
2. We hence
1, . . . , h
}
1 and Equation (8), we can lower bound the
and last step from q
≥
ˆf ′i,c,d(x)
Ω
≥
1
v2q
.
2
−
(cid:19)
α
(cid:18)
*
13
Since ˆfi,c,d is a convex function, this proves Equation (6).
Next, we prove Equation (7). Recall that
gi(y) = Tp
y
−
(3
−
i/h)
(cid:19)
1
vq
−
(cid:18)
*
where Tp is the degree-p Taylor approximation of the exponential function. Then, for 0
y
≤
≤
2v we have
gi(y)
exp
−
(cid:18)
In addition, for y
(cid:12)
(cid:12)
(cid:12)
(cid:12)
y
(3
−
vq
1
−
*
−
0 we have
≥
O
≤
1
vq
−
(cid:18)
*
y
(3
i/h)
(cid:19)
−
p+1
O
! ≤
v(q
2)
*
−
(cid:18)
1
(p+1)
.
(9)
2p+1
(cid:19)
*
i/h)
(cid:19)(cid:12)
(cid:12)
(cid:12)
(cid:12)
exp(
−
y/(vq
−
1
(3
*
−
i/h)) < 1.
(10)
Substituting Equations (9) and (10) into Equation (5) then gives
fi,c,d(x) =
exp
O
±
v(q
2)
*
−
1
(p+1)
−
vq
(cid:18)
−
(cid:18)
exp
−
vq
−
(cid:18)
(cid:18)
= ˆfi,c,d(x)
1
*
O
1
c + x
(3
*
d
(3
−
−
i/h)
(cid:19)
−
x
(i + 1)/h)
1
(p+1)
(cid:18)
O
(cid:18)
.
(cid:19)
±
(cid:19)
2p+1
*
±
v(q
(cid:18)
2)
*
−
2p+1
*
(cid:19)(cid:19)
*
1
(p+1)
v(q
2)
*
−
2p+1
*
(cid:19)(cid:19)
For both settings of p and q we consider, p = 2; q = 4 for the first result or p = 2 log v; q = 2 for the second
result, this implies
fi,c,d(x)
|
−
ˆfi,c,d(x)
| ≤
O
v(q
2)
*
−
(cid:18)
1
(p+1)
= O
1
v2q
−
2
.
(cid:19)
(cid:18)
2p+1
(cid:19)
*
Using above recursively, we can show that any greedy policy is an optimal policy in our MDPs. This is
important because this in conjunction with Lemma 4.5 implies that the optimal value functions V ∗ and Q∗
can be written as a linear function of some features depending only on states s and action a.
Lemma 4.8. Any greedy policy as defined in Definition 4.4 is optimal.
1
Proof. Let π be the greedy policy and consider some other policy ̃π. We show the reward received by the
greedy policy π is no worse than ̃π starting from an arbitrary state scurr with assignment wcurr, free variables
Scurr and round history w(1), . . . , w(n). Notice that the final rewards of both ̃π and π will have the term
n
i=1 gi(dist(w(i), w(i+1))). We abbreviate the term as G so that we can focus on comparing the
G :=
−
remaining terms.
Q
Suppose ̃π terminates in the (n+l)-th round. In particular, assume it terminates on the state ̃s with round
history w(1), . . . , w(n), ̃w(n+1), . . . , ̃w(n+l), free variables ̃S and terminal assignment ̃w. For notational
.4 Then, the value of ̃π starting from wcurr (also the
convenience, we will denote ̃w(n+l+1) = ext
reward of the state ̃s) can be written as
(cid:17)
̃w, ̃S
(cid:16)
V ̃π(scurr) = G
n+l
*
Yi=n
gi
dist( ̃w(i), ̃w(i+1))
(cid:17)
(cid:16)
*
gn+l+1
dist
̃w(n+l+1), w∗
.
(11)
(cid:16)
(cid:16)
(cid:17)(cid:17)
4Notice it could be that the terminal state ̃s is in the same round as scurr. In that case, we have l = 0.
14
First, we argue that it is never beneficial for ̃π to terminate in rounds after the (n + 1)-th round. More
formally, we will show
n+l
Yi=n
gi(dist( ̃w(i), ̃w(i+1)))
*
gn+l+1(dist( ̃w(n+l+1), w∗))
gn
≤
̃w(n), ̃w(n+1)
(cid:16)
*
(cid:17)
gn+1
̃w(n+1), w∗
.
(12)
(cid:16)
(cid:17)
Using Claim 4.7, we have
gn+l
dist( ̃w(n+l), ̃w(n+l+1))
(cid:18)
gn+l
≤
(cid:18)
gn+l+1
dist( ̃w(n+l+1), w∗)
(cid:18)
(cid:19)
*
(cid:19)
dist( ̃w(n+l), ̃w(n+l+1)) + dist( ̃w(n+l+1), w∗)
(cid:19)
gn+l+1(0)
*
≤
gn+l
dist( ̃w(n+l), w∗)
,
(cid:18)
(cid:19)
where the last inequality follows from gn+l+1(0) = 1, the triangle inequality used with dist(
) and that
*
) is monotonically decreasing (Claim 4.6). This then shows that
gn+l(
*
n+l
n+l
1
−
gn+l+1(dist( ̃w(n+l+1), w∗))
gi(dist( ̃w(i), ̃w(i+1)))
*
≤
gn+l(dist( ̃w(n+l), w∗)).
gi(dist( ̃w(i), ̃w(i+1)))
*
Yi=n
We can then do induction on l to get Equation (12). Substituting Equation (12) into Equation (11) then gives
Yi=n
V ̃π(s)
G
*
≤
gn
dist
w(n), ̃w(n+1)
(cid:16)
*
(cid:17)(cid:17)
(cid:16)
gn+1
dist
̃w(n+1), w∗
(cid:16)
(cid:17)(cid:17)
(cid:16)
.
(13)
We then proceed to argue the expression above is upper bounded by V π. Notice that by the triangle inequal-
ity, for any ̃w(n+1) it holds that
dist(wcurr, ̃w(n+1)) + dist( ̃w(n+1), w∗)
dist(wcurr, w∗) .
≥
On the other hand, we always have
dist(wcurr, w∗) = distScurr,used(wcurr, w∗) + distScurr,free(wcurr, w∗).
Combining the two and rearranging the terms then gives
dist(wcurr, ̃w(n+1)) + dist( ̃w(n+1), w∗)
distScurr,free(wcurr, w∗)
−
≥
distScurr,used(wcurr, w∗)
(14)
Now, we will use case analysis based on the relative sizes of dist(wcurr, ̃w(n+1)) and distScurr,free(wcurr, w∗).
We first consider the case dist(wcurr, ̃w(n+1))
distScurr,free(wcurr, w∗). In this case we have
≤
dist( ̃w(n+1), w∗)
(cid:17)
(cid:16)
gn+1
gn+1
gn
dist(w(n), ̃w(n+1))
(cid:16)
(cid:17)
= gn
*
dist(w(n), wcurr) + dist(wcurr, ̃w(n+1))
*
(cid:17)
dist(w(n), wcurr) + distScurr,free(wcurr, w∗)
(cid:17)
dist( ̃w(n+1), w∗) + dist(wcurr, ̃w(n+1))
−
(cid:16)
dist(w(n), wcurr) + distScurr,free(wcurr, w∗)
(cid:17)
(cid:16)
gn
≤
(cid:16)
gn+1
*
gn
≤
(cid:16)
dist( ̃w(n+1), w∗)
(cid:17)
(cid:16)
distScurr,free(wcurr, w∗)
gn+1
*
(cid:16)
distScurr,used(wcurr, w∗)
(cid:17)
,
(cid:17)
where the first inequality follows from Claim 4.7 and the second inequality follows from gn is a monotoni-
cally decreasing function (Claim 4.6) and Equation (14).
15
Now, we consider the other remaining case when dist(wcurr, ̃w(n+1)) > distScurr,free(wcurr, w∗). Denote
M as the set of free variables on which wcurr and w∗ agree but wcurr and ̃w(n+1) disagree. In other words,
these are the variables mistakenly flipped by the policy ̃π on the path from wcurr to ̃w(n+1). Since ̃w(n+1), w∗
disagree on these variables, these variables must be flipped again on the path from ̃w(n+1) to w∗. We can then
M and ̄wi = ̃w(n+1)
consider the alternative path wcurr
for i
→
M . Then, it is easy to see that
w∗ for ̄w satisfying ̄wi 6
= ̃w(n+1)
i
for i
→
̄w
∈
i
6∈
gn(dist(w(n), wcurr) + dist(wcurr, ̃w(n+1)))
gn(dist(w(n), wcurr) + dist(wcurr, ̄w))
gn+1(dist( ̃w(n+1), w∗))
*
gn+1(dist( ̄w, w∗))
≤
*
since gn(
distScurr,free(wcurr, w∗)
) is monotonically decreasing. Moreover, now we have dist(wcurr, ̄w)
*
since the variables flipped are restricted to be the ones on which wcurr and w∗ do not agree. Hence, the proof
is reduced to the first case.
≤
4.3 RL algorithm to SAT algorithm
Following the approach taken in previous lower bound [KLLM22], we now build a randomized algorithm
ARL for the RL problem. In particular, we build an "ap-
ASAT for 3-SAT using a randomized algorithm
proximate" simulator ̄Mφ for the MDP oracle Mφ. The simulator ̄Mφ is exactly the MDP Mφ in terms of
the transition function and features associated with the MDP Mφ, but differs in the reward function at the
last layer which is always 0 for the simulator ̄Mφ. With the purposed modification, we can execute each call
to simulator ̄Mφ in time poly(d).
Algorithm. On input 3-CNF formula φ,
ARL replacing each call to MDP oracle
ASAT runs the algorithm
Mφ with the corresponding call to simulator ̄Mφ. Recall that the output for the RL algorithm in our setting
ARL ends on
(deterministic transition MDP) is a sequence of actions. If the sequence of actions returned by
a state with an assignment w that satisfies more than (1
ASAT terminates the
simulation immediately and outputs YES. If
ARL throughout the simulation never finds any state associated
ASAT outputs NO.
with such an assignment,
ǫ)-fraction of the clauses,
−
Correctness. To complete our reduction, we will show the following:
(i) If algorithm
ARL outputs a policy π such that V π > V ∗ −
outputs YES if φ is satisfiable and NO otherwise.
1/8, then
ASAT on 3-CNF formula φ
(ii) If
ARL with access to MDP oracle Mφ outputs a policy π such that V π > V ∗ −
probability 1/10, then
with respect to Mφ with error probability 1/8 (namely, even though
simulator ̄Mφ, the returned policy is guaranteed to do well on the true MDP Mφ).
ARL with access to simulator ̄Mφ outputs a policy π such that V π > V ∗ −
1/8 with error
1/8
ARL is interacting with the
Recalling that if φ is not satisfiable, any policy is optimal, the above two claims establish that
ASAT solves
GAP-3-SAT with error probability
ARL succeeds on MDP Mφ, then
1/8. We start by proving that if
ASAT succeeds on 3-CNF formula φ. This follows from the fact that any good policy in the MDP Mφ must
reach a state with the assignment w∗, the satisfying assignment which is arbitrarily chosen to construct Mφ.
≤
Proposition 4.9. Assume that α, b, ǫ are constants and that v is large enough. Then, if φ is satisfiable and
ARL running on Mφ returns a policy π satisfying V π > V ∗ −
1/8 then π ends on an assignment that
ǫ)-fraction of clauses.
satisfies at least a (1
−
16
Proof. Take a satisfiable formula φ. The optimal value in this case is at least 1/4. Indeed, by Lemma 4.8,
the greedy policy is optimal, its value is g1(dist(w, w∗)) and thus by Claim 4.6,
V ∗ = g1(dist(w, w∗))
1
4
.
≥
−
We now argue by contraposition: Assume that π does not end on an assignment that satisfies at least
ǫ)-fraction of clauses. Let w(1), . . . , w(h), ̄w denote the sequence of assignments obtained by π:
a (1
w(1) = w, and w(i+1) is the assignment at the end of round 1
1 and ̄w is the final assignment.
Recall in each round the MDP has two stages. In the first stage, the agent is presented unsatisfied clauses
made up of only free variables. By our construction, the first stage is of length at least ǫv/b. It follows that
dist(w(i), w(i+1))
ǫv/b since the policies are not allowed to undo any flips. We can then upper bound the
reward obtained at the end by
≤
−
≤
≥
h
i
h
Yi=1
gi(dist(w(i), w(i+1)))
gh+1(dist( ̄w, w∗))
*
h
≤
Yi=1
gi(ǫv/b)
≤
1
(cid:16)
−
ǫ
6bvq
2
−
h
(cid:17)
exp(
−
≤
cv),
where c = Θ(αǫ/b), the first inequality follows dist(w(i), w(i+1))
and the third follows from 1
x
V π > V ∗ −
1/8
state which satisfied at least a (1
1/8, and v is large enough so that exp(
ǫ)-fraction of clauses.
e−
−
≥
−
≤
x that holds for all x and our choice of h = αvq
≥
ǫv/b, the second from Claim 4.6,
1. Therefore, if
cv) < 1/8, then the policy π has to end on a
−
−
Next, we show that the behavior of
ARL is about the same even if it is run on the simulator ̄Mφ. In
particular, given
ARL will be
ARL runs in sub-exponential time and succeeds on Mφ, we could argue
provided about the same information when it is executed on ̄Mφ and on Mφ and therefore would succeed
on the outputs of simulator ̄Mφ albeit with a smaller constant probability.
1/8 with respect to Mφ with error probability 1/8.
ARL with access to MDP oracle Mφ runs in time T and outputs a policy π such
1/8 with error probability 1/10. Further, assume that the expected reward at the last layer
ARL with access to simulator ̄Mφ, still running in time T , outputs
Proposition 4.10. Suppose
that V π > V ∗ −
of Mφ is upper bounded by 1/(5T ). Then
a policy π such that V π > V ∗ −
Proof. Let PrMφ and Pr ̄Mφ denote the distribution on the observed rewards and output policies induced
ARL when running on access to MDP oracle Mφ and simulator ̄Mφ respectively. Let
by the algorithm
Ri denote the reward received on the last layer at the end of i-th trajectory and N be the total number of
trajectories sampled by algorithm
ARL when running on access to MDP oracle Mφ. By our assumption,
ARL runs in time T and therefore N
≤
ASAT will terminate the
ARL ever reaches a satisfying assignment,
We remark that if the algorithm
simulation immediately, returning YES. Before reaching a satisfying assignment,
ARL may only receive
rewards from the last layer. Since the expected reward at the last layer in the MDP Mφ is upper bounded by
T states on last layer, we get by the
1/(5T ) by our assumption, and the algorithm only visits at most N
union bound that with high probability all the rewards at the last level are zero. More precisely, we have
T .
≤
[Ri = 0
i
[N ]]
1
T /(5T )
Pr
Mφ
≥
ARL succeeds with access to Mφ (or ̄Mφ) if the output policy π satisfies V π > V ∗ −
We say that
respect to Mφ after running for time at most T . Using the above reasoning and the assumption that
succeeds with access to MDP oracle Mφ with probability 9/10 implies
−
≥
∈
∀
1/8 with
ARL
4
5
.
Pr
Mφ
[
ARL succeeds with access to Mφ |
Ri = 0
[N ]]
i
∀
∈
≥
1
5
9
10 −
4
5
=
7
8
.
17
Note that the marginal distributions PrMφ and Pr ̄Mφ conditioned on Ri = 0
because MDP oracle ̄Mφ and simulator Mφ may only differ on last layer rewards before
satisfying assignment. This implies
[N ] are exactly the same
ARL reaches a
∈
∀
i
Pr
̄Mφ
(cid:2)
= Pr
Mφ
ARL succeeds with access to ̄Mφ |
ARL succeeds with access to Mφ |
[
Ri = 0
i
∀
Ri = 0
[N ]
(cid:3)
[N ]]
∈
∈
i
∀
Since, Pr ̄Mφ [Ri = 0
i
∀
∈
[N ]] = 1, we conclude that
Pr
̄Mφ
ARL succeeds with access to ̄Mφ
(cid:2)
7
8
.
≥
(cid:3)
We next prove using standard reductions that (b, ǫ)- GAP-3-SAT is approximately as hard as 3-SAT.
Proposition 4.11. Under rETH, there exists constants b, ǫ, c > 0 such that no randomized algorithm can
solve (b, ǫ)- GAP-3-SAT with v variables in time exp(cv/ polylog(v)) with error probability 1/8.
We provide a proof in Appendix A. Now, we are ready to prove our main result, Proposition 4.1. For
this, we demonstrate how one could reduce a (b, ǫ)- GAP-3-SAT instance into an MDP instance.
Z+, suppose there exists
Proof of Proposition 4.1. Set p = 2, q = 4 or p = 2 log v and q = 2. For any v
∈
and H = Θ (vq)
an algorithm
ARL which can solve LINEAR-3-RL with feature dimension d = Θ
with error probability 1/10 and runs in time exp(c1 *
v/ polylog(v)) for c1 < min(1/2, c/2) where c is
(cid:0)
the constant from Proposition 4.11. Then, we claim we can build another algorithm
ASAT which can solve
(b, ǫ)- GAP-3-SAT with error probability 1/8 in time exp(cv/ polylog(v)) . Note that this would contradict
Proposition 4.11 under rETH and hence prove our proposition.
v2p
(cid:1)
Let φ be the 3-CNF formula of a (b, ǫ)- GAP-3-SAT instance containing v variables and at least v
clauses. Then, by definition, each variable appears in at most b clauses. Furthermore, φ is guaranteed to
either be satisfiable or that at least an ǫ-fraction of the clauses are not satisfiable under any assignment. To
decide between the two cases, we first build an MDP Mφ (parameterized by the two positive integers p, q)
1 rounds and the polynomials
as described in Section 4.1. In particular, the MDP is designed to have αvq
gi will be a degree-p Taylor approximations as specified in Equation (2). As α, b, ǫ are absolute constants,
we ignore the dependence on them below.
−
We will proceed to bound the time horizon and the feature dimension of Mφ respectively. Since
each round consists of v steps, the horizon is H = Θ(vq). Furthermore, by Lemma 4.5, the value function
for the greedy policy can be written as a linear function of a feature vector of size Θ
. By Lemma 4.8,
v2p
the greedy policy is optimal. Hence, the feature dimension of the MDP is d = Θ
(cid:0)
(cid:1)
Next, as noted in the proof of Proposition 4.9, for any policy π which terminates on the last level,
(cid:0)
v). Let ̄Mφ be the MDP that differs from Mφ
the expected reward is always upper bounded by exp(
only with respect to the rewards received at the end of the horizon (the rewards of ̄Mφ are consistently 0).
Then, by Proposition 4.10 and small exp(
ARL, when ran for at most
v/ polylog(v)) time (as c1 < 1/2) on the simulator of ̄Mφ, will still output a good policy ̃π with
exp(c1 *
respect to Mφ with probability at least 7/8.
v) reward noted above, we know
v2p
.
−
−
(cid:1)
By Proposition 4.9, if
ARL succeeds and φ is satisfiable, then the policy ̃π will terminate on a satisfy-
ing assignment. Hence, we can just check the path obtained by running policy ̃π to decide whether φ is
satisfiable, which takes at most poly(v) time.
Hence, the existence of such an algorithm
v/ polylog(v))
time implies the existence of another algorithm which can solve the (b, ǫ)- GAP-3-SAT problem in time
exp(c1v/ polylog(v)) + poly(v)
ARL which runs in time at most exp(c1 *
exp(cv/ polylog(v)).
≤
18
References
[AJS+20] Alex Ayoub, Zeyu Jia, Csaba Szepesvari, Mengdi Wang, and Lin F Yang. Model-based rein-
forcement learning with value-targeted regression. arXiv:2006.01107, 2020.
[AKKS20] Alekh Agarwal, Sham Kakade, Akshay Krishnamurthy, and Wen Sun. Flambe: Structural
complexity and representation learning of low rank mdps. arXiv preprint arXiv:2006.10814,
2020.
[CFK+15] Marek Cygan, Fedor Fomin, Lukasz Kowalik, Daniel Lokshtanov, D ́aniel Marx, Marcin
Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Lower Bounds Based on the Exponential-
Time Hypothesis, pages 467–521. Springer, 07 2015.
[DHM+14] Holger Dell, Thore Husfeldt, D ́aniel Marx, Nina Taslaman, and Martin Wahl ́en. Exponential
time complexity of the permanent and the tutte polynomial. ACM Trans. Algorithms, 10(4),
2014.
[DKJ+19] Simon S Du, Akshay Krishnamurthy, Nan Jiang, Alekh Agarwal, Miroslav Dud ́ık, and John
Langford. Provably efficient RL with rich observations via latent state decoding. In Interna-
tional Conference on Machine Learning, 2019.
[DKL+21] Simon Du, Sham Kakade, Jason Lee, Shachar Lovett, Gaurav Mahajan, Wen Sun, and Ru-
osong Wang. Bilinear classes: A structural framework for provable generalization in rl. In
Proceedings of the 38th International Conference on Machine Learning, volume 139, pages
2826–2836, 18–24 Jul 2021.
[DKWY20] Simon S Du, Sham M Kakade, Ruosong Wang, and Lin F Yang. Is a good representation suf-
ficient for sample efficient reinforcement learning? In International Conference on Learning
Representations, 2020.
[DLMW20] Simon S Du, Jason D Lee, Gaurav Mahajan, and Ruosong Wang. Agnostic Q-learning with
function approximation in deterministic systems: Tight bounds on approximation error and
sample complexity. In Advances in Neural Information Processing Systems, 2020.
[DRZ20] Shi Dong, Benjamin Van Roy, and Zhengyuan Zhou. Provably efficient reinforcement learning
with aggregated states, 2020.
[FKQR21] Dylan J Foster, Sham M Kakade, Jian Qian, and Alexander Rakhlin. The statistical complexity
of interactive decision making. arXiv preprint arXiv:2112.13487, 2021.
[GMR22a] Noah Golowich, Ankur Moitra, and Dhruv Rohatgi. Learning in observable pomdps, without
computationally intractable oracles. arXiv preprint arXiv:2206.03446, 2022.
[GMR22b] Noah Golowich, Ankur Moitra, and Dhruv Rohatgi. Planning in observable pomdps in
quasipolynomial time. arXiv preprint arXiv:2201.04735, 2022.
[IP01] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. J. Comput. Syst.
Sci., 62(2):367–375, 2001.
[JKA+16] Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, John Langford, and Robert E. Schapire.
Contextual decision processes with low bellman rank are pac-learnable, 2016.
19
[JLM21] Chi Jin, Qinghua Liu, and Sobhan Miryoosefi. Bellman eluder dimension: New rich classes
of rl problems, and sample-efficient algorithms. arXiv preprint arXiv:2102.00815, 2021.
[JYWJ20] Chi Jin, Zhuoran Yang, Zhaoran Wang, and Michael I Jordan. Provably efficient reinforcement
learning with linear function approximation. In Conference on Learning Theory, 2020.
[KAL16] Akshay Krishnamurthy, Alekh Agarwal, and John Langford. Pac reinforcement learning with
rich observations. In Proceedings of the 30th International Conference on Neural Information
Processing Systems, pages 1848–1856, 2016.
[KLLM22] Daniel Kane, Sihan Liu, Shachar Lovett, and Gaurav Mahajan. Computational-statistical gaps
in reinforcement learning. arXiv preprint arXiv:2202.05444, 2022.
[Li09] Lihong Li. A Unifying Framework for Computational Reinforcement Learning Theory. PhD
thesis, Rutgers University, USA, 2009. AAI3386797.
[LSS01] Michael L Littman, Richard S Sutton, and Satinder P Singh. Predictive representations of
state. In NIPS, volume 14, page 30, 2001.
[LSW20] Tor Lattimore, Csaba Szepesvari, and Gellert Weisz. Learning with good feature representa-
tions in bandits and in rl with a generative model. In International Conference on Machine
Learning, 2020.
[MJTS20] Aditya Modi, Nan Jiang, Ambuj Tewari, and Satinder Singh. Sample complexity of rein-
In Conference on Artificial
forcement learning using linearly combined model ensembles.
Intelligence and Statistics, 2020.
[MR08] Dana Moshkovitz and Ran Raz. Two-query pcp with subconstant error. Journal of the ACM
(JACM), 57(5):1–29, 2008.
[Mun05] R ́emi Munos. Error bounds for approximate value iteration. In Proceedings of the National
Conference on Artificial Intelligence, volume 20, page 1006. Menlo Park, CA; Cambridge,
MA; London; AAAI Press; MIT Press; 1999, 2005.
[PY91] Christos H Papadimitriou and Mihalis Yannakakis. Optimization, approximation, and com-
plexity classes. Journal of computer and system sciences, 43(3):425–440, 1991.
[SJK+19] Wen Sun, Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, and John Langford. Model-
based RL in contextual decision processes: PAC bounds and exponential improvements over
model-free approaches. In Conference on Learning Theory, 2019.
[USL+22] Masatoshi Uehara, Ayush Sekhari, Jason D Lee, Nathan Kallus, and Wen Sun. Computation-
ally efficient pac rl in pomdps with latent determinism and conditional embeddings. arXiv
preprint arXiv:2206.12081, 2022.
[WAJ+21] Gell ́ert Weisz, Philip Amortila, Barnab ́as Janzer, Yasin Abbasi-Yadkori, Nan Jiang, and Csaba
Szepesv ́ari. On query-efficient planning in mdps under linear realizability of the optimal state-
value function, 2021.
[WAS21] Gell ́ert Weisz, Philip Amortila, and Csaba Szepesv ́ari. Exponential lower bounds for plan-
ning in mdps with linearly-realizable optimal action-value functions. In Algorithmic Learning
Theory, pages 1237–1264. PMLR, 2021.
20
[WGKS22] Gell ́ert Weisz, Andr ́as Gy ̈orgy, Tadashi Kozuno, and Csaba Szepesv ́ari. Confident approxi-
mate policy iteration for efficient local planning in qπ-realizable mdps. In Advances in Neural
Information Processing Systems, 2022.
[Wil19] Virginia Vassilevska Williams. On some fine-grained questions in algorithms and complexity.
Proceedings of the International Congress of Mathematicians (ICM 2018), 2019.
[WSG22] Gell ́ert Weisz, Csaba Szepesv ́ari, and Andr ́as Gy ̈orgy. Tensorplan and the few actions lower
bound for planning in mdps under linear realizability of optimal value functions. In Interna-
tional Conference on Algorithmic Learning Theory, pages 1097–1137. PMLR, 2022.
[WVR17] Zheng Wen and Benjamin Van Roy. Efficient reinforcement learning in deterministic systems
with value function generalization. Mathematics of Operations Research, 42(3):762–782,
2017.
[WWK21] Yuanhao Wang, Ruosong Wang, and Sham M. Kakade. An exponential lower bound for
linearly-realizable mdps with constant suboptimality gap, 2021.
[YHAY+22] Dong Yin, Botao Hao, Yasin Abbasi-Yadkori, Nevena Lazi ́c, and Csaba Szepesv ́ari. Efficient
local planning with linear function approximation. In International Conference on Algorith-
mic Learning Theory, pages 1165–1192. PMLR, 2022.
[YW19] Lin Yang and Mengdi Wang. Sample-optimal parametric Q-learning using linearly additive
features. In International Conference on Machine Learning, 2019.
[ZHG21] Dongruo Zhou, Jiafan He, and Quanquan Gu. Provably efficient reinforcement learning for
discounted mdps with feature mapping. In International Conference on Machine Learning,
pages 12793–12802, 2021.
[ZLKB20] Andrea Zanette, Alessandro Lazaric, Mykel Kochenderfer, and Emma Brunskill. Learning
near optimal policies with low inherent bellman error, 2020.
21
A Hardness of Approximate SAT with gap and few clauses
In this section, we prove the following:
Proposition A.1. Under rETH, there exists constants b, ǫ, c > 0 such that no randomized algorithm can
solve (b, ǫ)- GAP-3-SAT with v variables in time exp(cv/ polylog(v)) with error probability 1/8.
To prove this, we will look at another problem: ǫ- GAP-3-SAT. This is similar to (b, ǫ)- GAP-3-SAT ex-
cept it does not put any constraints on how many clauses a variable can be in. Through standard technique,
one can show that ǫ- GAP-3-SAT is also hard. In particular, its hardness is shown in [MR08] and relies on
a certain version of the Probabilistic Checkable Proof (PCP) theorem.
Theorem A.2 (Reduction from 3-SAT to GAP-3-SAT). Solving 3-SAT on inputs of size n can be reduced
to distinguishing between the case that a 3-CNF formula of size n
polylog(n) is satisfiable and the case
that only 1
ǫ fraction of its clauses are satisfiable for some constant ǫ > 0.
*
−
For completeness, we provide a proof for the above theorem. We first review some basic concepts about
the PCP theorem. Given a statement (for example, whether a SAT instance is satisfiable), a PCP verifier
is granted query access to a proof constructed for the statement over an alphabet Σ and asked to decide
whether the statement is true. A PCP verifier has several important parameters.
• Completeness c: The minimal probability that the verifier accepts a correct proof.
• Soundness ǫ: The maximal probability that the verifier accepts a proof for an incorrect theorem.
• Queries q: The number of queries made by the verifier to the proof.
• Size m: The length of the proof.
• Randomness r: The number of random bits used by the verifier.
• Alphabet Σ: The alphabet used by the proof.
We denote by PCPc,ǫ[r, q]Σ the class of languages that have a PCP verifier with completeness c, soundness
s, randomness r, and q queries to a proof over alphabet Σ. Moreover, the PCP verifier is only allowed
to do a two query projection test. In a two query-projection test, the verifier is only allowed to make two
queries. Upon seeing the answer to the first query, the verifier either immediately rejects, or it has uniquely
determined answer to the second query on which it accepts. Our starting point is the following theorem from
[MR08].
Theorem A.3 (Theorem 7 from [MR08]). There exists a constant ǫ > 0 and an alphabet Σ of constant
size, such that 3-SAT
ǫ[log n + O(log log n), 2]Σ.
P CP1,1
∈
−
Complexity problem ǫ- GAP-3-SAT
Input: A gap parameter ǫ > 0 and a 3-CNF formula φ with v variables and O(v) clauses such
that the either (i) φ is satisfiable or (ii) any assignment leaves at least an ǫ-fraction of
the clauses unsatisfied where ǫ > 0.
Decide whether the formula is satisfiable.
Goal:
22
Proof of Theorem A.2. Given a 3-CNF formula ψ with size n, the goal is to use the verifier in the above
theorem to construct a different 3-SAT instance φ with size O(n polylog n) such that (i) φ is satisfiable if ψ
is satisfiable; and (ii) at least an ǫ fraction of the clauses in φ are not satisfiable under any assignment if ψ is
not satisfiable.
Notice that we can without loss of generality assume the verifier is deterministic if we assume it also
takes r := log n + O(log log n) random bits as input. Fix a random bit string, the verifier reads at most
2 characters from the proof. Since there are at most 2r = n polylog n different random bit strings, we
can without loss of generality assume the proof is of size at most T := 2n polylog n. The first step of the
construction is to create T variables
Σ represent the queries responses given
, xT }
to the verifier. We will create a SAT formula for each of the 2r random bit strings and the final construction
will be simply the concatenation of all the SAT formulas with the "AND" logical operator. Fix an arbitrary
r. We can then compute the first position the verifier will read. We can denote it as
random string q
0, 1
}
l1(q). There will be a subset of values R(q)
R(q). If
Σ that the verifier will reject immediately xl1(q) ∈
the verifier does not reject immediately, the verifier could branch off to do different things based on the value
of xl1(q). Suppose, xl1(q) = σ
R(q). We can then compute the second position the verifier will read,
\
which we denote as l2(q, σ), and the "right" character the verifier is expecting, which we denote as f (q, σ).
, xT satisfies that
Then, we know that the verifier will accept if and only if the proof, represented by x1,
where xi ∈
x1, x2,
{
∈ {
* * *
⊆
Σ
∈
* * *
xl1(q) = σ
∧
xl2(q,σ) = f (q, σ)
.
Σ
[σ
\
∈
R
(cid:1)
(cid:0)
(cid:0)
Since Σ is of constant size, it is easy to see that one can use a binary encoding for Σ and convert the
above statement into a 3-CNF formula of constant size. In addition, there are at most n polylog n binary
strings q. Hence, the overall 3-CNF formula φ is of size O(n polylog n). We know that the verifier would
reject with probability at least ǫ if the original sat instance ψ is not satisfiable. Hence, at least an ǫ fraction
of the sub-formulas of φ will not be satisfied under any assignment (which can be interpreted as the binary
encoding of the given proof). On the other hand, if ψ is satisfiable, it then holds every sub-formula of φ is
satisfiable since the verifier always accepts under the "correct" proof.
(cid:1)
If one has an algorithm which can distinguish between the cases that ǫ-fraction of φ cannot be satisfied
under any assignment versus φ is satisfiable, one can then decide the satisfiability of ψ.
We are interested in (b, ǫ)
GAP-3-SAT, which is a restricted version of ǫ- GAP-3-SAT, where each
variable is promised to appear in at most b clauses for some constant b. One can show that approximating
(b, ǫ)
GAP-3-SAT is also hard through a reduction given in [PY91].
−
Proposition A.4 (Adapted from Proof of Theorem 2 in [PY91]). For some constant integer b = O(1),
there is a polynomial time transformation which maps a 3-CNF formula φ to another 3-CNF formula ψ over
the same set of variables such that
−
1. Each variable appears in at most b clauses in ψ.
2. If φ is satisfiable, then ψ is also satisfiable.
3. Let
,
φ
|
|
ψ
|
|
denotes the number of clauses in φ, ψ respectively. Then,
φ
|
| ≤ |
ψ
O(1)
.
φ
|
* |
| ≤
4. Let max(φ), max(ψ) denote the maximum number of clauses satisfiable in φ and ψ respectively. It
holds max(ψ)
max(φ) +
≤
ψ
|
| − |
.
φ
|
Proof of Proposition A.1. Proposition A.4 states there is an efficient algorithm translating an ǫ- GAP-3-
(0, 1).
SAT instance consisting of m clauses into an (b, α
Hence, if there is no sub-exponential algorithm for the computational problem ǫ1- GAP-3-SAT for some
constant ǫ1 ∈
(0, 1), there is no sub-exponential algorithm for (b, ǫ2)- GAP-3-SAT either for some constant
b and ǫ2 ∈
(0, ǫ1). Combining Theorem A.2 and Proposition A.4 proves our claim.
ǫ)- GAP-3-SAT instance for some constant α
∈
*
23
B Upper Bounds
In both of the upper bounds, the final policy computed by our algorithms is of the following form: at the
state s, we have some estimations ̃Q(s, a) for each a
ǫ and the policy
̃Q(s, a). We claim the policy induced is nearly optimal as long as ǫ
always chooses the action a = argmaxa
is sufficiently small. The formal statement is given below.
̃Q(s, a)
|
Q∗(s, a)
such that
∈ A
| ≤
−
Lemma B.1. For any state action pair (s, a), let ̃Q(s, a) be an approximation of Q∗(s, a) satisfying
̃Q(s, a)
ǫ/(2H). Then, consider the policy π such that at the state s, it always chooses
|
| ≤
̃Q(s, a). Then, it holds V π(s)
the action a = argmaxa
ǫ for any state.
Q∗(s, a)
V ∗(s)
−
Proof. We claim π is a policy satisfying that V π(s)
h/H for any state s in the MDP
such that there are still h steps remaining. We show this via induction on the number of steps remaining.
Suppose s is a state right before the last step. Then, V ∗(s) = Q∗(s, a∗) for a∗ = argmaxa Q∗(s, a∗) and
V π(s) = Q∗(s, a′) for a′ = argmaxa
ǫ/(2H)
and since a′ = argmaxa
̃Q(s, a). By our assumption, we have V π(s)
̃Q(s, a), we then further have
̃Q(s, a′)
≥
−
≥
−
ǫ
*
≥
−
V ∗(s)
V π(s)
≥
̃Q(s, a∗)
−
ǫ/(2H)
≥
Q∗(s, a∗)
−
ǫ/H = V ∗(s)
ǫ/H.
−
̃Q(s, a) and
Now, consider a state s such that there are (h + 1) steps remaining. Still, let a′ = argmaxa
a∗ = argmaxa Q∗(s, a∗). Furthermore, let s′ = P (s, a′) be the next state after applying a′. We then have
V ∗(s) = Q∗(s, a∗) and V π(s) = E [R(s, a′)] + V π(s′). We then have
V π(s) = E
E
+ V π(s′)
+ V ∗(s′)
ǫh/H
R(s, a′)
R(s, a′)
(cid:2)
(cid:3)
≥
= Q∗(s, a′)
(cid:2)
̃Q(s, a′)
̃Q(s, a∗)
≥
−
≥
(cid:3)
−
ǫh/H
ǫh/H
−
ǫ/(2H)
ǫ/(2H)
−
−
ǫh/H
−
Q∗(s, a∗)
≥
= V ∗(s)
ǫh/H
−
−
ǫ(h + 1)/H
−
ǫ/H
(The choice of a∗ = argmax
a
(Definition of the policy π)
(Inductive Hypothesis)
(Definition of Q∗, V ∗)
(Assumption about ̃Q)
̃Q(s, a))
(Choice of a′ = argmax
a
(Assumption about ̃Q)
Q∗(s, a) and the definition of Q∗, V ∗).
This then gives us V π(s)
V ∗(s)
−
≥
ǫ for any state since there are in total H steps in the MDP.
We first prove a computational upper bound which is exponential in the feature dimension d. On a high
level, we discretize the parameter space that θ∗ may lie in to create a policy cover which allows us to search
for the best in class by estimating the value of each policy.
Proposition B.2. Assume the Linear MDP has a constant number of actions, feature dimension d and
time Horizon H. Furthermore, assume the featuer vectors satisfy
1 for all state action
pairs and
(0, 1). There is an algorithm which
k
log (Hd/ǫ)) time for some sufficiently large constant c and finds a policy π such that
takes exp (c
V π(s)
1 for the optimal parameter θ∗. Let ǫ
ε with probability 9/10.
ψ(s, a)
k
k2 ≤
∈
θ∗k2 ≤
d
*
*
V ∗(s)
−
≥
Proof. Let θ∗ denote the unknown parameters of the optimal Q∗ function, i.e. Q∗(s, a) =
Suppose we can find such a θ
√d). We note that this implies
Rd satisfying
ε/(2H
.
θ∗, ψ(s, a)
i
h
∈
θ
k
−
θ∗k2 ≤
Q∗(s, a)
i −
| ≤
*
θ, ψ(s, a)
|h
ε/(2H).
(15)
24
≥
−
Then, consider the policy π(θ) such that at state s it always chooses the action a = argmaxah
Lemma B.1, it holds V π(θ)(s)
ǫ for any state s.
V ∗(s)
. By
θ, ψ(s, a)
i
Now, let S
θ
S k
∈
Rd be the set of vectors that form an ǫ/(2H√d)-cover of the d-dimensional unit sphere,
1. Through a standard combinatorial
θ∗k2 ≤
log (Hd/ǫ)) for some sufficiently large
S such that π(θ) is nearly optimal,
i.e. minθ
θ∗k2 ≤
construction, there exists such a cover S with size
d
*
*
constant c. From the argument above, we know there must be some θ
i.e. V π(θ)(s)
ǫ for any state s.
ǫ/(2H√d) for any θ∗ satisfying
k
exp (c
∈
−
S
|
| ≤
∈
V ∗(s)
≥
−
Our strategy is simple: we will try π(θ) for all θ
S in a brute-force manner and estimate the expected
∈
reward of the induced trajectory up to accuracy ǫ. Notice that the maximum reward collected by any tra-
log(1/δ) many times, we
jectory is at most H. Hence, if we visit the same trajectory with poly(H, 1/ǫ)
δ. We
can then compute an estimation of its expected reward up to accuracy ǫ with probability at least 1
can take δ = 1
S
S
|
with probability at least 9/10. Condition on that, we can then choose θ such that it maximizes our empirical
estimations of V π(θ)(s0). Then, it is easy to see that such a π(θ) must satisfy V π(θ)(s0)
2ǫ.
Now, since to simulating the interaction of one trajectory takes time at most poly(d, H), the total runtime is
bounded by
so that by union bound our estimation for V π(θ)(s0) is accurate up to error ǫ for all θ
V ∗(s0)
≥
−
−
∈
*
|
poly(d, H)
*
poly(H, 1/ǫ)
S
log(1/
|
)
|
*
S
* |
| ≤
exp (c
d
*
*
log (Hd/ǫ))
for some sufficiently large constant c.
To prove a horizon upper bound, we build on results of previous work [DLMW20]. This upper bound
was originally personally communicated to the authors by Ruosong Wang. We only add it here for com-
pleteness. We first give a high level overview of the differences. The proof is almost exactly the same except
we now divide the steps of the MDP into √H "rounds". We will brute force search in the rounds for the
optimal policy and use the basis constructed in previous work [DLMW20] to ensure error only grows by a
factor of √d. We next prove this in more detail.
Proposition B.3 (Ruosong Wang, personal communication). Assume the Linear MDP has a constant
number of actions, feature dimension d and time Horizon H. Furthermore, assume the featuer vectors
(0, 1).
satisfy
2 time for some sufficiently large constant c and
1 for the optimal parameter θ∗. Let ǫ
1 for all state action pairs and
θ∗k2 ≤
/ǫ−
ψ(s, a)
∈
k
k2 ≤
There is an algorithm which takes exp
finds a policy π such that V π(s)
c
V ∗(s)
(cid:16)
k
√H log d
ε.
(cid:17)
*
−
≥
Proof. Given an arbitrary state s, suppose there is a procedure that runs in time
T := exp
c
√H log d
2
/ǫ−
*
(cid:16)
(cid:17)
log(1/δ)
*
and computes an estimation of ̃Q(s, a) for each action a
probability at least 1
V π(s0)
will perform the following steps iteratively:
ǫ/(2H) with
such that
δ. Then, we claim we can design an algorithm which outputs a policy π such that
−
ǫ for the initial state s0 with probability at least 9/10. Starting at the state s = s0, we
̃Q(s, a)
|
Q∗(s, a)
V ∗(s0)
∈ A
| ≤
−
≥
−
1. For the current state s, compute the estimations ̃Q(s, a).
2. Choose a = argmaxa
̃Q(s, a) and then updates s to be the next state after applying action a.
The above process goes on for at most H iterations. Hence, our estimations ̃Q(s, a) are accurate in all
iterations with probability at least 9/10 if we set δ = 1/(10H). By Lemma B.1, it then holds the resulting
policy is nearly-optimal starting from the initial state s0. Moreover, the algorithm runs in time H
O(T ),
which is within the desired runtime.
*
25
̃Q(s, a)
a
|
{
*
∈
∈
∈
1}
Bh
∈ A}
. Note that
√H level, i.e. there is a trajectory going from s0 to s in h
To finish the proof, we then describe our procedure for computing the estimations
for
a state s. We will describe the procedure for just the initial state s0 as computing the estimations for other
states can be done similarly. To do so, we divide the time steps of the MDP into √H rounds. For each round
√H, we build a set of vectors Bh that correspond to the "basis" of some larger set of feature vectors
h
√H steps.
ψ(s, a) where s is a state on the h
*
The step is similar to previous work [DLMW20] and proceeds as follows. Let B0 =
ψ(s0, a) : a
A
}
{
∈
: Let ̄Bh =
where a is the set of all actions. Then, we construct Bh recursively from Bh
ψ(si, ai)
1 =
{
}
−
̄Bh
̄Bh| ≤ |A| * |
. Next, we set Bh ⊂
A and ψ(si, ai)
Bh
ψ(P (si, ai), a) : a
1|
{
|
as any maximal subset of independent vectors of ̄Bh. Note here
d. Moreover, since
1
ψ(s, a)
Bh| ≤
k2 ≤
k
|
Bh|
√d where
by assumption, any ψ(s, a)
α
i=1 αi *
k2 ≤
ψ(si, ai) are the base vectors in Bh.
hǫ using at most
∈
time. We show this via induction on h. Notice that for any state s on the last
O
level (which are 1 step from termination) and action a
, the function Q∗(s, a) is simply the expected
(cid:17)
reward E [R(s, a)] since the MDP terminates immediately afterwards. Hence, we can follow the same
trajectory and sample from R(s, a) for multiple times and compute an empirical mean ̄R(s, a). Suppose
(2d)√H samples from R(s, a) for a sufficiently large constant C. It then
we take C
BH|
* |
√Hǫ with probability
E[R(s, a)]
follows from standard concentration inequalities that
BH with probability at least
). By the union bound, this holds for all φ(s, a)
at least 1
B√H, we can compute an estimator for for Q∗(s, a) with accuracy
1
[√H], we can learn Q∗ on the basis Bh to accuracy (2d)−
We claim that for any h
exp(√H
̄Bh can then be written as
ψ(si, ai) satisfying
̄R(s, a)
|
2 log(H
| ≤
∈
(2d)−
log d)
∈ A
/δ)
ε−
ǫ−
P
−
∈
(cid:16)
k
−
−
2
*
*
*
*
|
−
δ/ (H
BH|
* |
δ/H. Therefore, for all φ(s, a)
√H in time at most
∈
−
(2d)−
C
ε−
2 log(H
*
BH|
* |
/δ)
*
(2d)√H
(cid:16)
for some large enough constant c.
BH | *
* |
poly(d, H)
≤
(cid:17)
√H
*
*
exp
c
(cid:16)
log d
ǫ−
2 log(1/δ)
(cid:17)
1 to accuracy d−
Assume we have already learned Q∗ on the basis Bh to accuracy d−
hǫ. We will see how we can use
h+1ǫ. Still, consider a single state-action
the information to estimate Q∗ on the basis Bh
Rs,a,√H be the set of states reachable from s within √H many
pair (s, a) such that φ(s, a)
Rs,a,√H is a subset of ̄Bh by our construction). In other
steps condition on that the first step is a (notice that
√H)-th level such that there is a trajectory going from s
words, each state s′ in
Rs,a,√H is a state in the (h
to s′ beginning with the action a. We will without loss of generality assume that each state s′ has a unique
trajectory starting from s: If there are two different trajectories leading to the same state s′, we can create
two copies of s′ and index them by the unique trajectory that leads to them.
1. Let
Bh
∈
−
−
*
We know there must exist some state s∗ ∈ Rs,a,√H and a∗ ∈ A
such that Q∗(s, a) is equal to the sum of
the expected rewards collected from the trajectory from s to s∗ and Q(s∗, a∗). We will denote by κ(s, s′) the
expected reward collected from the path going from s to s′ for s′ ∈ Rs,a,√H . Our goal is then to compute
(i) an estimation for each κ(s, s′) where s′ ∈ Rs,a,√H and (ii) an estimation for each Q∗(s′, a′) where
h,
s′ ∈ Rs,a,√H and a′ ∈
2−
*
h+1.
we can then take the optimal combination of s′, a′ to get an estimation of Q∗(s, a) up to accuracy (2d)−
To get an estimation of κ(s, s′), the expected reward collected from a trajectory, we can just visit the
√H, it then follow from standard concentration that if we
A. It is easy to see if we can compute both (i) and (ii) up to accuracy d−
h+1
trajectory for multiple times. Since κ(s, s′)
visit the trajectory for
≤
2 log(H
C
H
*
*
ε−
* |Rs,a,√H|
/δ)
(2d)h
*
many times where C is a sufficiently large constant, then we can estimate all κ(s, s′) up to the desired
Rs,a,√H.
accuracy with high probability. There are at most
√H) many states in
√H = exp(log
|A| *
|A|
26
Since we visit a trajectory C
at most
*
H
*
ε−
2 log(H
* |Rs,a,√H|
/δ)
*
(2d)h times, estimating each κ(s, s′) takes time
exp(log
exp
≤
(cid:16)
√H)
C
H
|A| *
c
√H
*
*
*
(cid:16)
log d
*
ǫ−
(cid:17)
2 log(1/δ)
ε−
2 log(H
* |Rs,a,√H|
/δ)
(2d)h
*
*
poly(d, H)
*
(cid:17)
for some sufficiently large constant c.
A, we will take advantage of the
fact that we already have estimations of Q∗ on the basis in Bh. In particular, we can express ψ(s′, a′) =
To get an estimation of Q∗(s′, a′) where s′ ∈ Rs,a,√H and a′ ∈
Bh|
i=1 αi *
ψ(si, ai) for ψ(si, ai) being the basis in Bh. By linearity, we then have
|
P
Q∗(s′, a′) =
Bh|
|
Xi=1
Q∗(si, ai).
αi *
(16)
k
α
k2 ≤
√d. On the other hand, by the inductive hypothesis, we have an estimation of
On one hand, we have
ǫ. If we simply plugin our estimation for Q∗(si, ai) into Equation (16)
each Q∗(si, ai) up to accuracy (2d)−
*
to compute our estimation for Q∗(s′, a′), we then have the error is at most d
ǫ by
the Cauchy Schwarz's Inequality, which is the desired bound. Computing the estimation for one Q∗(s′, a′)
many pairs of (s′, a′), this part takes
takes poly(d) time. Since there are at most exp(log
time at most exp
for some sufficiently large constant c.
√H + log d
(2d)−
√H)
* |A|
|A| *
d−
2−
h+1
≤
c
ǫ
h
h
h
*
*
*
*
(cid:16)
By induction, this then gives us a way to approximate Q∗ on B0 =
(cid:17)(cid:17)
c
with high probability. Moreover, the entire process runs in time exp
sufficiently large constant c.
(cid:16)
(cid:16)
φ(s0, a) : a
{
√H
log d
*
*
(cid:17)
up to accuracy ǫ
A
}
2 log(1/δ) for some
∈
ǫ−
*
27
|
|
http://arxiv.org/abs/2302.12926v1 | 2023-02-24T22:52:17 | 2023-02-24T22:52:17 | Map-and-Conquer: Energy-Efficient Mapping of Dynamic Neural Nets onto
Heterogeneous MPSoCs | Heterogeneous MPSoCs comprise diverse processing units of varying compute
capabilities. To date, the mapping strategies of neural networks (NNs) onto
such systems are yet to exploit the full potential of processing parallelism,
made possible through both the intrinsic NNs' structure and underlying hardware
composition. In this paper, we propose a novel framework to effectively map NNs
onto heterogeneous MPSoCs in a manner that enables them to leverage the
underlying processing concurrency. Specifically, our approach identifies an
optimal partitioning scheme of the NN along its `width' dimension, which
facilitates deployment of concurrent NN blocks onto different hardware
computing units. Additionally, our approach contributes a novel scheme to
deploy partitioned NNs onto the MPSoC as dynamic multi-exit networks for
additional performance gains. Our experiments on a standard MPSoC platform have
yielded dynamic mapping configurations that are 2.1x more energy-efficient than
the GPU-only mapping while incurring 1.7x less latency than DLA-only mapping. | [
"Halima Bouzidi",
"Mohanad Odema",
"Hamza Ouarnoughi",
"Smail Niar",
"Mohammad Abdullah Al Faruque"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12926v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12926v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.DC",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.DC",
"cs.AR",
"cs.LG"
] | Map-and-Conquer: Energy-Efficient Mapping of
Dynamic Neural Nets onto Heterogeneous MPSoCs
Halima Bouzidi∗§, Mohanad Odema†§, Hamza Ouarnoughi∗, Smail Niar∗, Mohammad Abdullah Al Faruque†
∗LAMIH/UMR CNRS, Universit ́e Polytechnique Hauts-de-France, Valenciennes, France
†Department of Electrical Engineering and Computer Science, University of California, Irvine, USA
∗{firstname.lastname}@uphf.fr
†{modema, alfaruqu}@uci.edu
3
2
0
2
b
e
F
4
2
]
C
D
.
s
c
[
1
v
6
2
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-Heterogeneous MPSoCs comprise diverse processing
units of varying compute capabilities. To date, the mapping
strategies of neural networks (NNs) onto such systems are yet
to exploit the full potential of processing parallelism, made
possible through both the intrinsic NNs' structure and underlying
hardware composition. In this paper, we propose a novel frame-
work to effectively map NNs onto heterogeneous MPSoCs in a
manner that enables them to leverage the underlying processing
concurrency. Specifically, our approach identifies an optimal
partitioning scheme of the NN along its 'width' dimension,
which facilitates deployment of concurrent NN blocks onto
different hardware computing units. Additionally, our approach
contributes a novel scheme to deploy partitioned NNs onto the
MPSoC as dynamic multi-exit networks for additional perfor-
mance gains. Our experiments on a standard MPSoC platform
have yielded dynamic mapping configurations that are 2.1x more
energy-efficient than the GPU-only mapping while incurring 1.7x
less latency than DLA-only mapping.
Index Terms-dynamic neural networks, heterogeneous MP-
SoCs, computation mapping, hardware scaling, DVFS
I. INTRODUCTION
The hardware era has witnessed the emergence of vari-
ous computing devices, from powerful GPUs to tiny Micro-
controllers. To meet the requirements of compute-intensive
applications, such as Deep Learning workloads, MPSoCs are
designed to incorporate heterogeneous computing units (CU)
within the same die, typically sharing the same system mem-
ory (DRAM). This hardware architecture paradigm enables
the collaborative usage of multiple CUs to accelerate different
operations of the same application, hence providing energy
savings and performance benefits. However, the causality be-
tween the hardware heterogeneity of MPSoC and the obtained
performance for similar and different operations remains an
open research question. Indeed, some CUs (e.g., GPUs) can
offer high execution speedup at the cost of being energy-
hungry, while others, such as NPUs, are power-friendly at
the cost of being slow. Conventional deployment schemes
lack a holistic overview of how heterogeneous CUs may
behave regarding various computing workloads. In addition,
the systematic approach of considering a single CU to deploy
an entire application is suboptimal since it overlooks opportu-
nities for further performance gains through maximizing the
utilization of the MPSoC's hardware resources.
Latest research has shed light on the computation mapping
problem for MPSoC by providing comprehensive modeling
§ Denotes Equal Contribution
This work was partially supported by the NSF under award CCF-2140154.
methodologies in [1]–[4] to characterize computing workloads
performances. The resulting models are typically used to
map computations onto CUs in a sequential pipeline fashion.
However, for workloads exhibiting a high degree of paral-
lelism, such as Neural Networks (N N ), there's still room
for improvement by refashioning the execution pipeline into
parallel stages running concurrently on different CUs, espe-
cially considering the inherent capacity for concurrency within
N N layers such as convolutional and multi-head self-attention
layers [5]. Prior works [5]–[8] have considered the computa-
tion parallelism on model, data, and task levels. Nevertheless,
most works focus on model training rather than inference.
Although substantial studies exist for distributed edge devices,
few studies have contemplated the case of MPSoCs.
On the other hand, recent works have started to explore the
prospect of partitioning the N N model itself into separate
computing stages that can be invoked in a dynamic manner,
where simpler inputs can be classified at earlier model stages
(i.e., early-exiting), whereas the latter stages are instantiated
for more complex inputs. For instance, S2DNAS [9] demon-
strated the benefits from partitioning a model along its width
dimension (i.e., layer's channels), and deploying the model as
a multi-exit neural network with support for parallelism. Still,
studying mapping such parallel neural network components
onto a heterogeneous MPSoC for dynamic inference is lacking.
Fig. 1. Performance comparison between different mapping and deployment
options for Visformer [10] on Cifar100 and AGX Xavier MPSoC
A. Motivational example
Figure 1 illustrates the underlying performance tradeoffs
obtained from deploying an N N onto a heterogeneous MP-
SoC. Specifically, the example compares different mapping
approaches for a Visformer architecture [10] (from the Vision-
Transformers class of N N ) onto an AGX Xavier MPSoC with
a single GPU and two deep learning accelerators (DLAs). As
shown in the left subfigure, mapping the Visformer entirely to
either hardware computing unit, namely GPU-Only and DLA-
Only, yields a sub-optimal performance: with regards to energy
197543159156930175Energy SavingsNo FmapReuse40% less
consumption for the former, and with regards to execution
latency for the latter. As an alternative, we implemented
a distributed static mapping strategy that aims to harvest
the best of both worlds – GPU's speed and DLA's energy
efficiency. More so, we implement the mapping strategy to
exploit the underlying parallelism through partitioning the
Visformer along its width dimension (i.e., the attention layer
heads), and distributing them along the CUs. Mildly, the static
mapping strategy leads to performance improvements over its
single-mapping counterpart with regards to each component's
deficient metric (42.6% speedup over DLA-Only and 11.1%
energy gains over GPU-only). Accordingly, we alter our
implementation to attain a dynamic version of this mapping,
namely Map-Conquer, where the Visformer is deployed as a
multi-exit neural network on the MPSoC, leading to substantial
performance gains due to the nature of dynamic inference.
In fact, this dynamic mapping strategy dominates the DLA
with respect to both the latency (44.4% speedup) and energy
efficiency (14.5% gain). Still, one deficit from such distributed
mapping strategies is the additional inter-CU overheads experi-
enced across the MPSoC. In the right sub-figure, we show that
adopting a dynamic strategy can also aid in alleviating such
burden compared to the static mapping approach. Particularly,
our approach identifies the key feature subset from each stage,
and only involves those in any needed inter-CUs exchanges,
denoted by Fmap Reuse. This scheme leads to 40% less
Fmap Reuse compared to static mapping (which exchanges
all needed features) at the expense of 0.5% accuracy drop.
B. Novel Contributions
We provide the following novel contributions in this paper
• We present Map-and-Conquer, an energy-efficient execu-
tion scheme for Dynamic N N on MPSoCs.
• We leverage model-parallelism along the "width" dimen-
sion to partition the N N to multiple inference stages that
can be run dynamically and concurrently on the MPSoC.
• We derive a comprehensive system model to characterize
the performance of the concurrent inference stages on
heterogeneous CUs with support for DVFS features.
• We design an optimization framework to provide the best
partitioning and mapping strategies for Dynamic N N on
the available CUs of the MPSoC.
• On the NVIDIA Jetson AGX Xavier MPSoC and vari-
ous N N architectures, our experiments demonstrate that
Map-and-Conquer can achieve up to ∼ 2.1x more energy-
efficiency than the GPU-only mapping while incurring
∼ 1.7x less latency than DLA-only mapping, all while
preserving the desired level of accuracy.
[11] or width [9]. Recently, early-exiting is emerging to Vision
Transformers (ViT) as they exhibit many computation redun-
dancies [12], [13]. For instance, MIA-Former [13] dynamically
adapts the number of heads in attention layers. This latter
approach can also be exploited for model partitioning, as it
represents the width in ViT. However, most existing works
still need to catch the hardware dimension when designing a
dynamic ViT, which is a vital factor given their complexity.
B. Computation mapping on MPSoCs
Recent MPSoCs contain diverse heterogeneous CUs that
usually share system memory, making them more flexible
for collaborative execution. Recent works have explored this
specificity of MPSoC to optimize the execution of N N .
AxoNN and MEPHESTO [2]–[4] propose modeling strategies
to characterize execution latency and energy consumption for
computation mapping on the AGX Xavier MPSoC. Jedi [14]
provides a framework built upon TensorRT to accelerate N N
via model parallelism to maximize throughput for batched
inference. [15], [16] proposes evolutionary-based scheduling
for NN layers on heterogeneous MPSoCs with DVFS by
exploiting both data and model parallelism to optimize the
throughput. DistrEdge [8] provides a detailed analysis of
different model parallelism schemes for distributed computing
over edge devices. However, none of the prior works have
considered the design of dynamic NN in the computation
mapping problem for collaborative execution on MPSoCs.
To the best of our knowledge, our work is the first to address
the problem of dynamic N N design and mapping onto het-
erogeneous MPSoC in a collaborative manner. Thus exploiting
N N dynamicity, MPSoC heterogeneity, and reconfigurability
(DVFS) for an energy-efficient execution on MPSocS. Table I
highlights the key differences between related works and Ours.
TABLE I
COMPARISON BETWEEN RELATED-WORKS AND OURS
Related Work
AxoNN [4]
Jedi [14]
DistrEdge [8]
Kang et al. [15]
S2DNAS [9]
HADAS [17]
Edgebert [18]
Ours
Early
Exiting
Model
Parallelism
x
x
x
x
x
x
x
x
x
Collaborative
execution
x
x
x
x
x
DVFS
x
x
x
x
x
Training
free
x
x
x
x
x
x
III. SYSTEM MODEL
In this section, we model the components needed to conduct
a static-to-dynamic transformation of N N , and characterize its
performance overheads when executing on the heterogeneous
MPSoC accordingly.
II. RELATED WORKS
A. Dynamic Transformation of NNs on MPSoC
A. Dynamic Neural Networks
Dynamic Neural Networks serve as attractive solutions to
scale computation according to the input complexity, providing
latency speedup and energy gains. Incorporating dynamicity
into NN inference has been widely studied for CNN archi-
tectures through early-exiting along the architecture's depth
Consider an unaltered basic neural network, N N , consti-
tuting a sequence of n computational layers as follows:
N N = Ln ◦ Ln−1 ◦ ... ◦ L1
(1)
in which each computing layer, Lj, consists of weight param-
eter matrices whose count represents the 'width' of the layer.
Without losing generality, we refer to these weight matrices
here as 'channels', such as those in a convolutional N N .
Therefore, we can define the jth layer as:
Lj = {C j
1, C j
2, ..., C j
W }
(2)
represents the ith channel
in which C j
in the jth layer.
i
Now, consider an SoC that comprises M computing units
CU = {CU 1, CU 2, ..., CU M }, the goal is to devise a strategy
to partition every Lj into M subsets according to its width
dimension (i.e., the channels), and thus, Lj is redefined as:
Lj = {lj
1, lj
2, ..., lj
M }
(3)
which enables every contiguous subset of channels, lj
m, to be
mapped onto one of the computing units, CU m ∈ CU. In this
sense, we define two operations to characterize this mapping
problem: (i) Partitioning; to divide layers and generate the
subsets lj
m, and (ii) Concatenation; to reuse the generated
intermediate features, F j
m, in set of the immediate next layer
in all subsequent stages, {lj+1
m+1:M }. In accordance, we define
two parameter matrices to characterize these operations:
Fig. 2. Transformation of N Nstatic into N Ndyn based on s and I, and
mapping N Ndyn onto a MPSoC with multiple CU s
P =
p1
* * *
1
...
. . .
p1
M * * *
pn
1
...
pn
M
, I =
I 1
* * *
1
...
. . .
I 1
M * * *
I n
1
...
I n
M
(4)
Fig. 3. Concurrent execution of S2 and S1 considering timing dependencies
B. Distributed Performance Modelling for Dynamic Inference
where P is the partitioning matrix in which every pj
i represents
the fraction of channels in a layer Lj (equation 2) are to be
assigned to lj
i . I is an indicator matrix in which I j
i ∈ {0, 1}
indicates whether the intermediate features, F j
i , are to be used
in the j + 1 layers in the following stages. Figure 2 provides
an illustration for how these matrices govern the partitioning
and concatenation operations of a neural network. As shown,
each CU m on the SoC can host a unique sequence of channel
subsets, which we denote as a stage, Si, given as:
Si = ln
i ◦ ln−1
i
◦ ... ◦ l1
i
and ultimately, we obtain the following set of stages:
S = {S1, S2, ..., SM }
(5)
(6)
if we augment each stage Si with an exit at its tail (e.g., a
classifier layer), each stage can now act as a separate inference
sub-model, to be invoked based on some established runtime
criteria during deployment (e.g., input processing difficulty).
Lastly, we define an additional vector, M, to parameterize
the mapping of stages onto the SoC: Si → CU m ∀ Si ∈
S, CU m ∈ CU. M can by given as:
M = [π1, . . . , πM ] s.t. πk (cid:54)= πk(cid:48) ∀ 1 ≤ k ≤ k(cid:48) ≤ M (7)
in which every entry πk is one CU m ∈ CU to whom Sk is
mapped. The condition is for enforcing that no two stages are
mapped onto the same CU m.
Here, we model the dynamic inference execution overheads
given the partitioned deployment of a model on a heteroge-
neous MPSoC with regards to latency and energy consumption.
Given the scope of this work, we assume ideal input mapping
in which the number of stages needed to process an input
sample i is known apriori. In practice, input mappings can be
determined using runtime controllers as those stated in [17].
Execution Latency. Let τ j
i denotes the execution latency over-
head of sublayer lj
i in Si. We first aim to derive an expression
for the latency overhead of every stage, denoted by TSi. At
this point, we highlight that stages are indexed by the order
of their execution. For example, S2 is only instantiated if S1
is deemed insufficient to terminate the processing. Thus, there
exists inter-stage dependencies of Si on its predecessors S1:i−1
(as indicated by Ii) whose overheads need to be accounted for,
especially when stages are mapped onto different hardware
units. To avoid the demerits of a sequential execution model,
we leverage the underlying separation of the compute units and
propose a concurrent model of execution that considers these
dependencies. Specifically, any sublayer lj
i in an 'instantiated'
Si can immediately proceed to execute its inputs once all of its
required input features, {(F j−1
}, are readily
available within its local vicinity. From here, we can give the
cumulative latency overhead at lj
i + max{T j−1
i = τ j
T j
i by:
k + uj−1
k→i | Ik = 1 ∀ 1 ≤ k < i}
(8)
where the second term captures the maximum cumulative la-
tency experienced in a previous layer from all stages preceding
1:i−1) ∪ F j−1
1:i−1 * I j−1
, T j−1
i
i
CU1CU1CU2CU3S1S3S2CUm: Compute Unit Si: stage : split ratio : Indicator3CU1CU2stallNo dependence on S1Fig. 4.
Illustration of data movement and feature storage on the MPSoC
Si. Thus, T j
i captures the cumulative latency estimate in stage
i at j while accounting for inter-stage dependencies, while
k→i is the data transmission overhead of the features F j−1
uj−1
to the local buffer of the computing resource assigned to Si
(See Figure 3 for an illustrative example). Given n layers in
Si, the execution latency of Si can be estimated:
k
TSi = T n
i
(9)
Energy Consumption. For every CU m ∈ CU, we first
characterize its power consumption as follows:
Pm = P s
m + P d
m(θm) ≈ α + β * θm
(10)
m and P d
P s
m are the static and dynamic components, respec-
tively. The latter is parameterized by the scaling factor θm
based on the supported DVFS features on CU m, where αm and
βm are constants. From here, the energy required to complete
processing at sublayer lj
i during inference is given by:
i = τ j
ej
i * Pm
and as such the total energy consumed by Si is:
ESi =
n
(cid:88)
j=1
ej
i
(11)
(12)
Overall Characterization. Under the concurrent model of
execution, the overall performance characterization is given
by the following two equations:
TP,I,M,θ = max{TSi ∀ Si ∈ S}
EP,I,M,θ =
M (cid:48)
(cid:88)
i=1
ESi s.t. 1 ≤ i ≤ M (cid:48) ≤ M
(13)
(14)
where for a dynamic inference on a MPSoC, described through
the parameters choices of (P, I, M, θ), its execution latency is
the maximum from all its stages due to concurrency, whereas
its energy consumption is the aggregation of energy consumed
by the M (cid:48) 'instantiated' stages to process an input sample.
IV. PROBLEM FORMULATION
Let Π = (P, I, M, θ) combine all parameters that char-
acterize a neural network's mapping onto an MPSoC. Our
main optimization goal is to find the ideal parameters that can
enhance a performance objective, P, given a set of constraints:
Π∗ = min
Π
P(Π)
(15)
s.t. TΠ∗ < T T RG, EΠ∗ < ET RG, sizeΠ∗ (F, I) < M
Fig. 5. Overview of our proposed optimization framework
where T T RG and ET RG are the respective target latency and
energy constraints as set by the practitioner. The constraint
sizeΠ(F, I) < M is to bound the size of the intermediate
features that need to be made readily available for the duration
of the inference (denoted as F), for they are limited by the
MPSoC's shared memory size, M (see Figure 4). P is kept
generic and can be tuned to the designers' objectives.
V. PROPOSED FRAMEWORK
In this section, we propose an optimization framework to
solve the mapping problem. Figure 5 gives an overview of our
framework, whose key components are detailed below.
A. Search Space
Here we describe how to generate a search space, X of
mapping strategy parameters, namely the space of (P, I, M, θ).
Firstly, given a pretrained N N and an MPSoC with M CUs,
we can generate X based on the N N 's layer specifications
and the MPSoC's underlying hardware composition. For the
former, the attainable depth and width parameters of every
layer Lj ∈ N N define the (P, I) parameter matrices. For
the latter, M = |CU| specifies its mapping space and the
total number of inference stages. Lastly, θ is specified through
the hardware reconfiguration parameters (DVFS). For instance,
the mapping search space complexity of one layer from the
Visformer [10] is O(1.5×105) = O(83 ×3!×50), considering
8 channel partitioning ratios, M = 3, and |θ| = 50.
B. Performance Objectives
Next, a performance objective needs to be designated as
P for the main optimization function in equation (15), to be
specifically used for the candidate mapping evaluation. For our
case, we used the following expression for P:
P = (
Accbase
AccSM
M
(cid:88)
) × (
i=1
TSi * Ni) × (
M
(cid:88)
i=1
ES1:i * Ni)
(16)
In which Accbase is the baseline accuracy of the pretrained
N N model; AccSM is the accuracy of the last stage of the
dynamic version of N N as its base accuracy. The aforemen-
tioned terms are included to ensure that no accuracy drops
ensue when a model's structure changes through the I matrix.
Ni represents the number of input samples -from the validation
dataset- correctly classified at Si, given that every prior stage
misclassifies them. TSi
is the latency experienced by the
MPSoC at stage Si based on equation (9); ES1:i is the energy
consumed by the system as the result of executing i stages of
the model – each Ei is evaluated as in equation (12).
Shared Memory: MStored for subsequent stagesS1exitactivateactivateterminateterminateterminateEachCU can activateor terminateCU2CU1CU3S2exitS3exitSearch Space: Const.:M, TTRG, ETRGMPSoCNNAcc.Lat.ErgyObjectives: PMutation & CrossoverEvaluateHW Performance CharacterizationElite SelectionChannel RankingRankingsPEvaluationConst. FilterN1:MTABLE II
PERFORMANCES BREAKDOWN OF THE PARETO OPTIMAL MODELS
OBTAINED BY MAP-AND-CONQUER AND THE BASELINES
Opt.
Strategy
NN
Implment.
TOP-1 Acc
(%)
Avg. Enrg.
(mJ)
Avg. Lat.
(ms)
Fmap. reuse.
(%)
Visformer (ViT-based Architecture)
None
No Fmap
Constr.
75% Fmap
Constr.
50% Fmap
Constr.
None
No Fmap
Constr.
75% Fmap
Constr.
50% Fmap
Constr.
GPU
DLA
Ours-L
Ours-E
Ours-L
Ours-E
Ours-L
Ours-E
GPU
DLA
Ours-L
Ours-E
Ours-L
Ours-E
Ours-L
Ours-E
88.09
86.12
87.58
84.64
87.67
82.69
84.16
197.35
69.22
108.44
59.21
102.67
65.12
116.00
82.44
15.01
53.71
25.58
30.40
24.65
29.46
24.51
32.70
VGG19 (CNN-based Architecture)
80.55
84.81
84.63
84.76
82.64
84.62
82.53
630.11
164.89
251.63
153.97
247.34
136.31
250.80
136.41
25.23
114.41
25.67
34.02
26.07
37.22
25.83
37.24
-
-
68.75
61.25
65.00
75.00
50.00
50.00
-
-
52.94
70.58
64.70
47.05
50.00
50.00
C. Search Algorithm
We develop an evolutionary-based algorithm to effectively
explore the search space. Following the workflow in Figure
5, every new search iteration entails a new population, say
X (cid:48)
i ⊂ X. Then for every configuration Π ∈ X (cid:48), its corre-
sponding dynamic N N and hardware settings are evaluated
using a predefined objective function, P. Based on results,
configurations that do not meet the search constraints (e.g.,
memory usage) are omitted, whereas the remaining ones are
ranked according to P, and a subset of elite configurations is
taken for a mutation and crossover stage to obtain the new
population X (cid:48)
i+1. Once the search budget expires, a Pareto set
in calculated from all the generated populations from which
the ideal dynamic mapping strategy is extracted.
D. Channel Partitioning and Reordering
Before a candidate configuration Π ∈ X (cid:48) is evaluated on the
objective function P , the N N should be partitioned according
to the ratios in P. Yet to maximize performance when parti-
tioning, the width channels in each model layer are arranged
according to their degree of importance. The logic being that
given the sampled partitioning matrix P for a configuration Π,
it would be beneficial to assign the most important channels in
the layer to the earlier inference stages for dynamic inference.
This would enable numerous samples to terminate processing
prematurely if deemed feasible, which will consequently aid
in enhancing the dynamic inference performance of the N N
with regards to experienced latency and energy on the MPSoC.
This reordering method is feasible as all channels within the
same layer share the same dimensions. Channel ranking is
widely used for network pruning, and we follow the approach
in [19] to estimate each channel's importance.
E. Performance Evaluation
ej
i of each layer j mapped onto stage i (also CU i) based on
input configurations while abiding by any inter-stage execution
dependencies, and taking into account the computation cost
and feature map communication overheads. Hence, a predictor
(XGBoost [20] in our case) is first trained on a benchmarked
dataset of diverse layer specifications, deployment hardware
and DVFS settings. Afterwards, the predictor is deployed to
characterize the performance of each model sampled within
the population, providing estimates for its base latency, τ j
i ,
and energy consumption, ej
i . In our case, we use the TensorRT
library to first evaluate performance overheads on a layer-wise
granularity, construct the dataset, and then deploy the predictor
to provide hardware evaluations to involved models.
VI. EXPERIMENTS
A. Experimental Setup
Our experiments are conducted on the MPSoC provided by
NVIDIA: Jetson AGX Xavier. This platform embeds CPU,
GPU, and DLA cores on the same chip, sharing the same
system memory. To run the N N workloads on the DLA, we
use TensorRT and ONNX to build inference engines from the
PyTorch model. As N N s, we use Visformer [10] as ViT-based
architecture and VGG19 [21] as CNN-based architecture to
validate our approach for both cases. The dataset used for
accuracy assessment is CIFAR100. Regarding the optimiza-
tion framework, we run the optimization algorithm for 200
generations, each with a population size of 60, resulting in
12K overall evaluations. Furthermore, the evaluation step is
performed on a cluster of 12 GPUs taking up to ∼ 10 GPU
hours to run the entire optimization process.
B. Search Process Analysis
In this section, we analyze the results of the search process
conducted by our framework under two main cases: 1) When
no constraint is set to limit the feature map reuse between
inference stages, 2) When only less than 75%, 50% of feature
maps can be reused, respectively. In Figure 6, we show the
optimization results for each case. Firstly, we observe that
most of the explored configurations achieve a good tradeoff
between DLA energy efficiency and GPU latency speedup.
Furthermore, under the same baseline accuracy of Visformer,
we notice an energy gain up to ∼ 2.1x compared to the
GPU-only mapping with latency (cid:53) 30ms. Similarly, a latency
speedup up to ∼ 1.7x compared to the DLA-only mapping,
with comparable energy efficiency. Secondly, we can notice
an accuracy drop of ∼ 6% when setting up hard constraints
on the feature map reuse (See the 50% case). Hence, defining
the optimal inter-stages concatenation strategy that determines
the feature maps reuse ratio is crucial to maintain the desired
level of accuracy while minimizing inter-CUs dependencies.
Once a model is transformed to its dynamic version through
P and I, the hardware measurements needed for the perfor-
mance evaluation of each N N in equation (16) need to be
estimated for each input sample. One way to achieve this is
through surrogate models, which are able to predict τ j
i and
C. Pareto Optimal Models Analysis
In this section, we delve further into the performance break-
down of the Pareto optimal models obtained from the three
search strategies. We select the most energy-oriented models
and compare them with the baseline Visformer mapped entirely
Fig. 6. Results of three different search strategies: Left) No constraint is set on the Fmap Reuse. Middle) Under a constraint of reusing only less than 75%
of feature maps. Right) Under a constraint of reusing only less than 50% of feature maps. All the results are reported for Visformer on the AGX Xavier
MPSoC. In the three plots, we highlight the configurations that exhibit the highest latency-energy tradeoff while preserving less than 0.5% drop in accuracy
Fig. 7. Comparison between the most energy-oriented models selected from
the obtained Pareto sets by each search strategy and the baseline on DLA
on the DLA. Figure 7 and Table II detail the obtained results.
By exploring neural network dynamicity and concurrency on
heterogeneous CUs, our models achieve better latency-energy
tradeoff, providing latency speedup of ∼ 1.83x and up to
∼ 14.4% of energy gain as shown in the left sub-figure.
In addition, the correlation between feature maps reuse and
accuracy is highlighted in the right sub-figure. Reducing the
feature maps reuse across stages decreases the inter-CUs data
transmission at the cost of accuracy drops. However, some
models can achieve comparable accuracy to the baseline while
only reusing 60% of the necessary feature maps (See No
constr. and 75% constr. cases)
D. Generalization to other architecture
To further demonstrate our approach's applicability, we
evaluate our optimization framework on a typical CNN ar-
chitecture, VGG19. Table II details the obtained results. Re-
garding the baseline performances, VGG19 depicts a high
energy consumption on GPU and slow execution latency on
DLA. This is explained by its many weights and large feature
maps, which entail high memory footprints for both CUs.
Moreover, the large number of weights may exhibit a high
degree of redundancy. Our approach has exploited these two
properties of VGG19 well, resulting in up to ∼ 4.62x energy
gain and ∼ 4.44x latency speedup. Furthermore, according
to our analysis, more than 80% of samples were correctly
classified in earlier stages with fewer channels, which results
in considerable latency and energy gains.
VII. CONCLUSION
along the width, hardware mapping, and DVFS. Map-and-
Conquer's awareness of the N N dynamicity and hardware
computing units capabilities allows it to realize better per-
formance trade-off over conventional single-platform mapping
schemes. On CIFAR-100 and the AGX Xavier MPSoC, Map-
and-Conquer achieved up to 2.1x energy gains over GPU-only
mapping and up to 1.7x speedup over DLA-only mapping.
REFERENCES
[1] Y. Song et al., "Sara: Self-aware resource allocation for heterogeneous
mpsocs," in DAC, 2018.
[2] M. A. H. Monil et al., "Mephesto: Modeling energy-performance in
heterogeneous socs and their trade-offs," in PACT, 2020, pp. 413–425.
[3] Y. Xu et al., "Pccs: Processor-centric contention-aware slowdown model
for heterogeneous system-on-chips," in MICRO, 2021.
[4] I. Dagli et al., "AxoNN: energy-aware execution of neural network
inference on multi-accelerator heterogeneous SoCs," in Proceedings of
the 59th ACM/IEEE Design Automation Conference (DAC), 2022.
[5] R. Hadidi et al., "Toward collaborative inferencing of deep neural net-
works on internet-of-things devices," IEEE Internet of Things Journal,
vol. 7, no. 6, pp. 4950–4960, 2020.
[6] J. Mao et al., "Modnn: Local distributed mobile computing system
for deep neural network," in Design, Automation & Test in Europe
Conference & Exhibition (DATE), 2017.
[7] E. Shamsa et al., "Goal-driven autonomy for efficient on-chip resource
management: Transforming objectives to goals," in Design, Automation
& Test in Europe Conference & Exhibition (DATE), 2019.
[8] X. Hou et al., "Distredge: Speeding up convolutional neural network
inference on distributed edge devices," in IPDPS.
IEEE, 2022.
[9] Z. Yuan et al., "S2dnas: Transforming static cnn model for dynamic
inference via neural architecture search," in ECCV. Springer, 2020.
[10] Z. Chen et al., "Visformer: The vision-friendly transformer," in Proc. of
the IEEE/CVF international conference on computer vision, 2021.
[11] S. Teerapittayanon et al., "Branchynet: Fast inference via early exiting
from deep neural networks," in ICPR, 2016.
[12] Y. Rao et al., "Dynamicvit: Efficient vision transformers with dynamic
token sparsification," NeurIPS, vol. 34, 2021.
[13] Z. Yu et al., "Mia-former: Efficient and robust vision transformers via
multi-grained input-adaptation," in AAAI, vol. 36, no. 8, 2022.
[14] E. Jeong et al., "Tensorrt-based framework and optimization methodol-
ogy for deep learning inference on jetson boards," ACM Transactions
on Embedded Computing Systems (TECS), 2022.
[15] D. Kang et al., "Scheduling of deep learning applications onto hetero-
geneous processors in an embedded device," IEEE Access, vol. 8, 2020.
[16] S.-C. Kao et al., "Gamma: Automating the hw mapping of dnn models
on accelerators via genetic algorithm," in ICCAD.
IEEE, 2020.
[17] H. Bouzidi et al., "HADAS: Hardware-Aware Dynamic Neural Archi-
tecture Search for Edge Performance Scaling," in Design, Automation
& Test in Europe Conference & Exhibition (DATE), 2023.
[18] T. Tambe and al., "Edgebert: Sentence-level energy optimizations for
latency-aware multi-task nlp inference," in MICRO, 2021.
[19] P. Molchanov et al., "Importance estimation for neural network pruning,"
in CVPR, 2019.
We have presented Map-and-Conquer, an energy-efficient
execution scheme for dynamic neural networks on heteroge-
neous MPSoCs by jointly optimizing the model partitioning
[20] T. Chen and C. Guestrin, "Xgboost: A scalable tree boosting system,"
ser. KDD '16, 2016.
[21] K. Simonyan and A. Zisserman, "Very deep convolutional networks for
large-scale image recognition," in ICLR, Y. Bengio et al., Eds., 2015.
No reuse const.75%reuse const.50% reuse const.2.1x1.7x1.6x1.5x1.6x1.4x14.4% less energyup to 1.83xSpeedup40% less than static |
|
http://arxiv.org/abs/2302.12923v1 | 2023-02-24T22:46:16 | 2023-02-24T22:46:16 | Automatic Classification of Symmetry of Hemithoraces in Canine and
Feline Radiographs | Purpose: Thoracic radiographs are commonly used to evaluate patients with
confirmed or suspected thoracic pathology. Proper patient positioning is more
challenging in canine and feline radiography than in humans due to less patient
cooperation and body shape variation. Improper patient positioning during
radiograph acquisition has the potential to lead to a misdiagnosis.
Asymmetrical hemithoraces are one of the indications of obliquity for which we
propose an automatic classification method.
Approach: We propose a hemithoraces segmentation method based on
Convolutional Neural Networks (CNNs) and active contours. We utilized the U-Net
model to segment the ribs and spine and then utilized active contours to find
left and right hemithoraces. We then extracted features from the left and right
hemithoraces to train an ensemble classifier which includes Support Vector
Machine, Gradient Boosting and Multi-Layer Perceptron. Five-fold
cross-validation was used, thorax segmentation was evaluated by Intersection
over Union (IoU), and symmetry classification was evaluated using Precision,
Recall, Area under Curve and F1 score.
Results: Classification of symmetry for 900 radiographs reported an F1 score
of 82.8% . To test the robustness of the proposed thorax segmentation method to
underexposure and overexposure, we synthetically corrupted properly exposed
radiographs and evaluated results using IoU. The results showed that the models
IoU for underexposure and overexposure dropped by 2.1% and 1.2%, respectively.
Conclusions: Our results indicate that the proposed thorax segmentation
method is robust to poor exposure radiographs. The proposed thorax segmentation
method can be applied to human radiography with minimal changes. | [
"Peyman Tahghighi",
"Nicole Norena",
"Eran Ukwatta",
"Ryan B Appleby",
"Amin Komeili"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12923v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12923v1",
"@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"
] | 3
2
0
2
b
e
F
4
2
]
V
I
.
s
s
e
e
[
1
v
3
2
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Automatic Classification of Symmetry of Hemithoraces in Canine
and Feline Radiographs
Peyman Tahghighia, *, Nicole Norenab, Eran Ukwattaa, Ryan B Applebyb, Amin Komeilic
aSchool of Engineering, University of Guelph, Guelph, Ontario
bDepartment of Clinical Studies, Ontario Veterinary College, University of Guelph, Guelph, Ontario
cDepartment of Biomedical Engineering, University of Calgary, Calgary, Alberta
Abstract.
Purpose: Thoracic radiographs are commonly used to evaluate patients with confirmed or suspected thoracic pathol-
ogy. Proper patient positioning is more challenging in canine and feline radiography than in humans due to less patient
cooperation and body shape variation. Improper patient positioning during radiograph acquisition has the potential to
lead to a misdiagnosis. Asymmetrical hemithoraces are one of the indications of obliquity for which we propose an
automatic classification method.
Approach: We propose a hemithoraces segmentation method based on Convolutional Neural Networks (CNNs) and
active contours. We utilized the U-Net model to segment the ribs and spine and then utilized active contours to find
left and right hemithoraces. We then extracted features from the left and right hemithoraces to train an ensemble
classifier which includes Support Vector Machine, Gradient Boosting and Multi-Layer Perceptron. Five-fold cross-
validation was used, thorax segmentation was evaluated by Intersection over Union (IoU), and symmetry classification
was evaluated using Precision, Recall, Area under Curve and F1 score.
Results: Classification of symmetry for 900 radiographs reported an F1 score of 82.8%. To test the robustness of
the proposed thorax segmentation method to underexposure and overexposure, we synthetically corrupted properly
exposed radiographs and evaluated results using IoU. The results showed that the model's IoU for underexposure and
overexposure dropped by 2.1%, 1.2% and, respectively.
Conclusions: Our results indicate that the proposed thorax segmentation method is robust to poor exposure radio-
graphs. The proposed thorax segmentation method can be applied to human radiography with minimal changes.
Keywords: Convolutional neural network, Veterinary, Machine learning, Radiology, Thorax.
*Peyman Tahghighi, [email protected]
1 Introduction
Thoracic radiography is an important diagnostic in companion animal medicine, routinely used for
diagnosing cardiopulmonary disorders as well as the staging of neoplasms in dogs and cats. Radio-
graphs must be of diagnostic quality to provide clinical utility to the veterinarian. The quality of
the radiographs is heavily dependent on operator experience in acquisition and patient-related fac-
tors. Positioning errors are common, especially those where the patient is rotated.1 In the authors'
experience, radiographs from general practices are inappropriately positioned approximately 30%
of the time. Correcting positioning errors during image acquisition can improve diagnostic quality
1
and is considered to be a key element in reducing errors in radiograph interpretation. While it is
common practice to inspect the image quality visually, the day-to-day challenges sometimes make
this difficult to perform effectively. Therefore, a method for digital positioning error recognition
would be valuable in clinical veterinary practice.
The ventrodorsal (VD) and dorsoventral (DV) radiographs are common projections of the tho-
rax and are acquired in all thoracic radiograph studies. Patient positioning is aimed at collimating
the animal so that the anatomy of the target organ is accurately captured in the radiograph. In a
properly positioned VD or DV radiograph, the hemithoraces look nearly symmetrical,1, 2 and severe
deviation from this symmetry indicates that the patient has rotated during the positioning process.
Fig. 1 illustrates symmetric and asymmetric radiographs.
In the asymmetric radiographs Fig.
1b, the shape and size of the left and right hemithoraces highly differ, whereas, in the symmetric
radiographs Fig. 1a, these two regions are almost identical.
Deep learning methods have been extensively applied to canine radiographs in recent years for
classification tasks. For instance, Yoon et al.3 used the Bag of Words combined with Convolutional
Neural Networks (CNNs) to detect normal and abnormal canine thoracic radiographs, and used
cardiomegaly as a metric of abnormality. Tonia et al.4 proposed an automatic sorting of canine
radiographs by view and region. They heavily considered prediction time and memory limits in
their work and proposed a novel lightweight CNN architecture based on ideas from SqueezeNet5
and Depthwise CNNs.6 Most recently, Banzato et al.7 utilized DenseNet-121,8 and ResNet-509
to classify the lateral thoracic radiographs into 8 different findings such as cardiomegaly, alveolar
pattern and bronchial pattern. In their work, they removed radiographs with positioning errors
or poor image quality and used the whole radiograph as the input to the network without any
prior segmentation. ResNet-50 achieved better classification results and for four classes such as
2
(a) Symmetric
(b) Asymmetric
Fig 1: Examples of symmetric (a) and asymmetric hemithoraces (b) in canine and feline radio-
graphs.
cardiomegaly and pleural effusion, the Area Under Curve (AUC) of their model was similar to or
higher than that reported in similar studies on humans.
The problem of lung symmetry detection has already been studied in human chest radiogra-
phy.10, 11 Santosh et al.11 utilized lung symmetry in human chest radiography to detect pulmonary
abnormalities. They extracted different features based on edge, texture and shape and combined
Random Forest, Multi-Layer Perceptron (MLP) and Bayesian Network models to classify lungs
into symmetric or asymmetric classes. Their study did not consider chest segmentation, and the
chest segmentations of both hemithoraces were provided beforehand. Furthermore, they did not
examine the varying exposure conditions that may result from poor image acquisition.
3
In the present study, we propose a novel method to segment hemithoraces by segmenting the
ribs and the spine from canine and feline VD and DV radiographs. We then utilized the segmented
ribs and fit an active contour to form the thorax region. The segmented spine was then used as
a symmetry line to divide the segmented thorax into left and right hemithoraces contours. To
compare left and right hemithoraces for making the final symmetry classification decision, we
extracted seven features which captured shape and size from both sides. Finally, we utilized these
features for training Support Vector Machines (SVM), Gradient Boost Classifier (GBC)12 and MLP
models and made the final classification decision by majority voting.
To the best of our knowledge, this is the first research study proposing a method for segment-
ing hemithoraces and classifying symmetry in canine and feline radiography. We evaluated our
approach on a dataset of 900 canine and feline radiographs from DV and VD views acquired at the
Ontario Veterinary College (OVC) and labelled by an expert veterinary radiologist. Additionally,
to prove that exposure setting or obstruction of the lungs does not affect the output of our model,
we extensively compared the segmentation of the thorax in these scenarios with the ground-truth
segmentation to study the drop in performance.
The main contributions of the present work are:
• Proposing a novel thorax segmentation method by segmenting the ribs and the spine and
then fitting a snake to the rib region. This thorax segmentation method could be adopted for
human chest radiography.
• Proposing a method to classify symmetry in canine and feline radiography, which could also
be used for image acquisition quality control.
• Performing extensive analysis on the performance of the proposed method under different
4
Fig 2: Automated symmetry assessment pipeline. First, a U-Net model masks the ribs and spine,
then an active contour is fitted to the ribs to identify the thorax region. Afterwards, the thorax mask
is divided into left and right regions, which form left and right hemithoraces. Finally, features are
extracted from both hemithoraces for the final classification.
exposure settings to test its robustness to these extreme conditions and provide a detailed
comparison.
2 Method
The pipeline for our symmetry classification method is shown in Fig. 2. Our method automatically
segments left and right hemithoraces and then uses them to make classification decisions. This
section first explains the hemithoraces segmentation method, followed by feature extraction and
classification. The proposed method for the segmentation of the ribs is not sensitive to the appear-
ance of the lung in the radiograph and would function properly as long as the first sternal ribs and
the last pair of floating ribs are presented on both left and right hemithoraces.
2.1 Hemithoraces segmentation
We started by segmenting the ribs and the spine using a U-Net13 model. This architecture consists
of a series of convolutional blocks in an encoder-decoder fashion. Each encoder layer extracts
5
U-NetU-NetShape feature extractionClassificationInput imageRibs and spine segmentationDivide ribs using spine and fit active contourfeatures and downsizes the image by half until the bottleneck layer is obtained after this layer, the
decoder stream or the upstream starts, where on each step, we upsampled the input features to
finally reach an image with the same width and height as the input. The main point in the upstream
section is the presence of skip connections9 to avoid vanishing gradients and improve gradient
flow. Here, we concatenated features on the same level from the encoder and decoder before
upsampling. Finally, U-Net generates a mask with the same width and height as the input image.
We used pre-trained weights from ImageNet14 to increase training speed and faster convergence.
After segmenting the spine and ribs to detect left and right hemithoraces, we used active con-
tours(deformable snakes)15 to find the thorax region. Since the segmented ribs can be considered
as the approximate shape of the thorax boundary, we used the active contour method as they are
designed to solve problems where the approximate shape of the boundary is known, and it pre-
serves the topology. Specifically, the top-most rib, bottom-most rib, and the endpoints on the left
and right of each rib approximately specify the thorax region for our method. An elastic snake is
a contour represented parametrically as v(s) = (x(s), y(s)), where x(s) and y(s) are coordinates
along the contour and s ∈ [0, 1], which will be used to minimize an energy function consisting of
internal energy (Einternal) and external energy (Eexternal). The internal energy generally controls
the shape of the snake itself and consists of elasticity and stiffness as described in below equation:
Einternal(v(s)) = α(s)|
dv
ds
|2 + β(s)|
d2v
ds2 |2
(1)
where the elasticity term| dv
ds |2 controls the length of the snake, and stiffness term | d2v
ds2 |2 con-
trols its curvature or how much it is allowed to bend to fit existing boundaries. External energy
describes how well the curve matches the image data locally. A simple external energy function
6
was described based on a first-order gradient of the image I as:
Eexternal(v(s)) = −|∇I(x, y)|2
The total energy of the snake is the sum of its external and internal energy:
Esnake =
(cid:90) 1
0
Einternal(v(s)) + Eexternal(v(s))ds
(2)
(3)
To optimize this function using gradient descent, we needed an initial guess. In this study, we
used a rectangle as the initial shape, which is minimal and covers all four corners of the segmented
ribs outputted by the U-Net model. After segmenting the thorax, we used the spine as the symmetry
line to divide the thorax mask into left and right regions. This step is represented in Fig. 2.
2.2 Shape feature extraction
After segmenting left and right hemithoraces separately, we focused on extracting distinctive fea-
tures from both contours to be used in an ensemble of SVM, GBC and MLP. The low-level shape
features16 and shape histograms that were extracted include:
• Area: For a segmented hemithorax region s ∈ R2, s = (xi, yi)i=1,...,N , it returns a scalar
specifying the number of pixels inside the segmented hemithorax.
• Perimeter: For a segmented hemithorax region s ∈ R2, s = (xi, yi)i=1,...,N , it returns the
number of pixels over the region's boundary.
• Centroid horizontal distance (cxo): The center of mass of the segmented hemithorax s ∈ R2
s = (xi, yi)i=1,...,N or its centroid co = (xo, yo) can simply be expressed as xo = (cid:80)N
i=0
xi
N ,
7
Fig 3: The first-rib-width (wx) index is calculated by measuring the distance in pixels, along the
x-axis, between the spine midline (shown by the yellow line) and the endpoints of first ribs on left
and right hemithoraces (shown by green dotted circles). Subscripts r and l represent the feature
measured in the right and left hemithoraces, respectively.
yo = (cid:80)N
i=0
yi
N . To compare the centroid horizontal distance of the left and right hemithoraces,
we found the distance on the x-axis from each centroid to the closest point on the spine.
• First-rib-width (wx): This feature compares the distance of the first rib endpoints on the left
and right hemithoraces to the spine midline in pixels. As shown in Fig. 3, to calculate this
value, we found the top left point on the left hemithorax and the top right point on the right
hemithorax, which represents the end point of the first left ribs and first right rib, respectively,
and calculated their euclidean distance to the spine midline. Red arrows show this distance
on both the right and left sides in Fig. 3, and green dotted circles delineate the endpoints.
• Contour density plot. Suppose X = {x(i, j)|1 ≤ i ≤ h, 1 ≤ j ≤ w} of size w × h denote
the image containing segmented left or right hemithorax region where x(i, j) denotes the
graylevel value at location (i, j), we can calculate the horizontal and vertical histogram of
8
the image using below equation:
Hj =
Wi =
w
(cid:88)
i
w
(cid:88)
j
x(i, j)
x(i, j)
(4)
After calculating vertical and horizontal histograms of both left and right hemithoraces using
the above equation, we used Jenson-Shannon Divergence (JSD) and intersection to compare
the vertical and horizontal histograms between the left and right regions. The JSD for two
probability distributions of H1 and H2 is defined as
JSD(H1, H2) =
1
2
KL(H1, M ) +
1
2
where M =
KL(H2, M )
1
2
(H1 + H2)
KL(H1, H2) =
(cid:88)
X
H1(X) log
H1(X)
H2(X)
(5)
where KL represents kullback-leibler divergence. The intersection between two histograms
can be defined as
d(H1, H2) =
(cid:88)
X
min(H1(X), H2(X))
(6)
• Intersection over Union (IoU). In order to measure how two contours match each other, we
could find their overlap. However, we could not simply flip the left hemithorax and find
its IoU with the right one since hemithoraces do not always happen in the center of the
radiograph. Henceforth, we registered the left hemithorax to the right hemithorax using
9
Fig 4: Horizontal and vertical histograms of a hemithorax. We compute this histogram for both
left and right hemithoraces and then find their similarity using JSD and intersection as defined in
equation 5 and 6.
translation and then we found IoU using the below equation:
IoU =
lef t ∩ right
lef t ∪ right
(7)
To quantify symmetry, we used a similarity index sim(rL, rR) for 6 extracted features from
left and right hemithoraces, where rL and rR are features in the left and right hemithoraces, re-
spectively. We did not use the similarity index for the IoU feature since it is already in the range
of [0, 1]. For low-level shape features such as area, perimeter, centroid horizontal distance and
first-rib -width, we defined the similarity index as below, which is a ratio in the range of [0, 1]. The
similarity index of 1 and 0 represents pure symmetry and asymmetry, respectively.
sim(rL, rR) =
min(rL, rR)
max(rL, rR)
(8)
10
2.3 Classification of symmetry
After encoding the radiograph with seven features and calculating their corresponding similarity
index, we used an ensemble of three classifiers, SVM, MLP and GBC, for canine and feline radio-
graph symmetry classification.
SVM aims to find a hyperplane in an N-dimensional space that distinctly classifies the data
points. It transforms data using a kernel function to a space where data can be separated using
a line. The choice of the kernel is of utmost importance because it has a direct impact on the
performance of the model. Common kernels for training an SVM model include Radial Basis
Functions (RBF) and polynomial functions of different degrees. To find the best kernel, we used
five-fold cross-validation.
MLP uses a series of connected neurons to pass information in a feed-forward fashion to make
classification decisions. To tune the MLP model for the best classification decision, we then uti-
lized errors made on each sample and updated each neuron's weight and bias using an optimization
technique such as Gradient Descent. The MLP has several hyperparameters to tune, such as learn-
ing rate, regularization term, number of hidden units, network depth, and more. In the present
study, we used five-fold cross-validation to find the best set of hyperparameters.
GBC uses the same dataset to generate many decision trees, each to decrease previous errors.
At each step, decision trees were built using the errors our model had made thus far. The fi-
nal decision for a gradient boost classifier is the sum of the decisions of all the decision trees it
generated, each multiplied by a factor called the learning rate. In this model, the learning rate,
maximum number of decision trees and maximum depth in each decision tree are among the many
hyperparameters that were tuned by five-fold cross-validation.
11
We used an ensemble of the three above-mentioned methods to make the final symmetry clas-
sification decision. Each model's hyperparameters were tuned independently and then merged to
form the final ensemble model.
3 Experiments
3.1 Dataset
Since there was no public dataset available for this task, a dataset of 900 VD and DV radiographs
of dogs and cats was retrieved from the OVC database. Radiographs were acquired from various
computed radiography and direct digital radiography systems at referral practices (primary care
clinics) and at OVC. Images were provided to the OVC in either JPEG or DICOM format and
stored in the Picture Archiving and Communication System (PACS) provided by AGFA,17 with the
patient file and any onsite imaging. To gather the dataset of this study, radiographs were exported
as JPEG and anonymized either by removal of patient data from the images prior to exportation or
through blurring data burned into the image as was present in many images from referral practices.
Among 900 radiographs, 270 represented an asymmetric thorax, while the rest of them contained a
symmetric thorax. Note that for training and evaluating our model, we did not exclude overexposed
or underexposed radiographs.
3.2 Implementation details
Our proposed method was implemented in Python, and our deep learning models were imple-
mented using the Pytroch library.18 The model was trained on an NVIDIA RTX3090 24GB GPU
and an AMD Ryzen 9 5950X CPU @ 3.4 GHz ×16. All models were trained with a batch size
of 2 and resized to size 1024 x 1024. We used the AdamW optimizer19 with an initial learning
12
rate of 0.0001. We used early stopping to avoid overfitting. Our model was evaluated using 5-fold
cross-validation with a fixed split across all experiments. We initialized our model weights with a
pre-trained model on ImageNet.14 Considering hyperparameters, for training segmentation model
loss, we used focal loss20 with α = 0.8 and Tversky loss21 with α = 2.0 and β = 2.0. For the MLP
symmetry classification model, we used 50 neurons in three hidden layers, adam solver, and ReLu
as the activation function. For the GBC model, we used 100 estimators, each with a maximum
depth of 3 and a learning rate of 0.1. For the SVM symmetry classification model, we used an
RBF kernel with γ = 0.01 and C = 0.1.
3.3 Experimental design
This section describes the performance evaluation of the proposed thorax segmentation method un-
der poor exposure settings or when part of the lung is completely obscured or missing. We applied
a set of transformations on test radiographs on each fold and performed three tests: underexposure
test, overexposure test and obstruction test. The exposure settings of properly exposed radiographs
(as labelled by an expert veterinary radiologist) were synthetically altered by performing a gamma
transformation using the equation below, where γ was sampled using a uniform distribution in the
range of [0.2, 0.5] and [2.0, 5.0] to simulate underexposed and overexposed radiographs, respec-
tively.
I(x, y) = I(x, y)γ
(9)
After applying the gamma transformation, we added gaussian noise with μ = 0 and σ ∈ [0, 10].
The results following the application of these transformations on two different radiographs are
shown in Fig. 5. To obscure the lungs for the obstruction test, we used ground-truth segmentation
for the thorax achieved by fitting an active contour to the ground-truth ribs and fitted an ellipse
13
to it. Then, we randomly divided major and minor axis lengths by values in the range [2, 4] and
overlapped them with the original image to simulate obscured lungs. Figure 5 shows the results of
applying this process to two different radiographs. Note that, for this experiment, we only applied
these transformations to the test set of each fold.
To evaluate the performance of the proposed method, we applied a direct segmentation method
for segmenting hemithoraces and compared its outcome with the proposed method using the IoU
metric between the ground-truth left and right hemithoraces and the models' prediction. In the
direct segmentation approach, we directly utilized hemithoraces masks, which we obtained by
fitting active contour to ground-truth rib labels, to train a deep learning model that directly outputs
both hemithoraces by feeding a radiograph as an input. The U-Net model and the same training
scheme with slight modifications were used for the direct segmentation method.
4 Results
4.1 Thorax segmentation
A side-by-side comparison of the prediction of the proposed model and the direct segmentation
method is provided in Fig. 6. In the first row, the radiograph is underexposed and obscured. Even
though part of the ribs is completely obstructed, our model could still recover the entire shape
of hemithoraces, while the direct segmentation method failed to recover the whole shape. This is
because the active contour model aligned the shape to the edges of the image and was less sensitive
to the object's internal structure. The same pattern also happened for images in the second and third
rows. The proposed model effectively segmented the hemithoraces when the boundary of the ribs
is visible in the radiograph.
14
(a) Input
(b) Overexposed
(c) Underexposed
(d) Obscured
Fig 5: Examples of two normal radiographs with their corresponding synthetic overexposed, un-
derexposed, and obscured transformation.
As can be seen in Table 1, our proposed method achieved a slightly higher IoU compared to
the direct segmentation method when using normal radiographs. Note that here, The term nor-
mal refers to radiographs within the test that are not overexposed or underexposed as labelled by
a radiology expert. However, the IoU difference between the proposed and direct segmentation
methods was higher with 2.04% and 1.16% when we used the underexposed and overexposed
radiographs, respectively. The most significant difference between our proposed and direct seg-
mentation method occurred when we obscured part of the hemithoraces with a difference of 6.1%.
Additionally, the IoU of our model only dropped by 3.31% when we obstructed lungs, while the
IoU of the direct segmentation method dropped by 8.35% after introducing the obstruction (Table
1). Overall, our proposed method worked better than the direct segmentation approach, mainly
15
when the radiograph provided was either overexposed or underexposed.
Table 1: Comparison between the conventional direct segmentation and proposed segmentation
methods using normal, underexposed, overexposed, and obscured radiographs.
Radiograph type
Normal
Underexposed
Overexposed
Obscured
IoU
Proposed model Direct segmentation
Difference
94.72
91.89
92.57
91.41
93.66
89.85
91.41
85.31
1.06
2.04
1.16
6.1
4.2 Symmetry detection
Table 2 provides the SVM, GBC and MLP model results across five-folds, with MLP resulting
in the best performance. Employing an ensemble of three models and majority voting increases
precision, recall, F1, and Area Under Curve (AUC) compared to base model values (Table 2).
Additionally, the confusion matrix for the ensemble model is provided in Fig. 7. As can be seen,
across all test examples in all folds, our model predicted 209 asymmetric cases correctly out of 270
available cases. Additionally, among all 237 predicted cases as asymmetric, only 28 radiographs
were incorrectly classified.
Table 2: Results of symmetry classification using the SVM, MLP, gradient boost, and ensemble
models.
Model
SVM
MLP
GBC
Ensemble Model
Fold 1
Fold 2
Fold 3
Fold 4
Fold 5
Overall
Metric
Precision Recall F1
Area Under Curve (AUC)
81.36
85.41
82.19
96.66
83.21
84.61
89.18
87.87
88.30
74.98
76.33
75.65
86.66
75.85
72.25
75.00
78.63
77.67
78.03
80.61
78.78
91.22
80.47
77.94
81.48
82.99
82.82
80.25
84.37
83.12
93.32
82.66
81.54
85.64
83.34
85.3
16
(a) Input
(b) Obscured ribs
(c) Proposed method
(d) Direct segmentation
Fig 6: Comparison between the hemithoraces segmentation outputs of the proposed model and a
conventional direct segmentation method on 3 sample radiographs obstructed synthetically.
17
Fig 7: Confusion matrix for ensemble model
The proposed active contour method could be applied in two manners to mask the right and
left hemithoraces. The first approach (one-snake) includes applying the active contour to the entire
segmented ribs to create the thorax region and then dividing the masked thorax using the spine
method. The second method (two-snakes) is to first divide the segmented ribs into the left and
right partitions using the spine and then fit an active contour to each side separately to mask the
left and right hemithoraces regions. We compared the classification result of these two approaches
in Table 3, where the one-snake performed better than the two-snakes in both F1 and AUC metrics,
in addition to computational advantage. In fact, in the two-snakes approach, two active contour
models should be applied, one on the left and one on the right rib partitions, while in the one-snake
method, we only need to apply the active contour once.
Besides the computational efficiency of the proposed method, fitting active contour to all of
the ribs can automatically fill any internal artifacts. This is investigated in Fig. 8, where the
middle region of the ribs was manually obscured, and the hemithoraces were masked using the
one-snake and two-snakes methods. Results of the two-snakes method showed that the segmented
18
Table 3: Masking the left and right hemithoraces using two approaches: (1) the proposed method
where the thorax was obtained by applying an active contour to the entire ribs, and the resulted
region then was divided into the left and right hemithoraces, and (2) two-snakes method where the
left and right ribs were treated by two active contours separately.
Metric
Model
(1) one-snake
(2) two-snake
F1
82.82
79.25
AUC
85.3
82.69
(a) Input
(e) Our result
(c) Obscured ribs
Fig 8: Comparison between the results of our one-snake model and the two-snake method.
(d) Two-snake result
(b) Ribs
hemithoraces are significantly affected by the obstruction of the ribs, and this model could not fully
recover the thorax shape, as can be seen in Fig. 8d. However, our proposed model recovered the
thorax shape, and missing rib regions did not affect the output, as shown in Fig. 8e.
5 Discussion and conclusion
In this study, we introduced a novel thorax segmentation method for canine and feline VD and
DV radiographs and utilized it to classify the symmetry of hemithoraces. The experimental results
suggest that the proposed method for segmenting the thorax performs well under poor exposure
settings and even when parts of the lungs are obscured. This ability came from the nature of fitting
an active contour to a shape in which our snake is attracted to the image gradient and maintains the
topology of the segmentation.
In thoracic radiography, the air-filled lungs are lucent regions (dark) relative to the soft tissue
and bone within and surrounding the thoracic cavity. For symmetry classification, as studied by
Santosh et al.,11 one possible solution is to label lungs based on their opacity (dark regions inside
19
the thorax) in both VD and DV radiographs instead of segmenting the whole hemithoraces, as we
proposed in this work. Then, use the masks to train an end-to-end segmentation model using these
labels as supervision; we call this model a direct segmentation of lungs. However, this method has
two major drawbacks:
• Thoracic diseases can alter the expected opacity of the lungs. For example, patients with
pneumonia or heart failure will have an increased opacity of their lungs and patients with
pleural effusion will have increased opacity in the pleural space. Increased opacity in these
regions may make it hard for the direct segmentation method to segment lungs due to the
absence of the dark regions in the thorax that are typically indicative of lungs. Two examples
of this scenario are represented in Fig. 9a.
• Lungs in underexposed radiographs may appear too bright or have increased noise. Two
examples of underexposure are provided in Fig. 9b.
An ensemble of MLP, SVM and GBC models allowed us to analyze and look at the features
from different perspectives as a result of using different learning processes that improved the out-
come. GBC, similar to a random forest, creates an ensemble of trees, each of which is weighed
by a weight metric. The MLP uses a series of connected neurons, in which each layer transforms
input data to a new space before making the final classification decision. The SVM tries to find a
decision boundary between the points by first finding the distance between each data point using an
RBF and then minimizing SVM loss. One limitation of our methods was that radiographs with an
obscured spine were not tested in our model. However, since the spine's shape is relatively easy to
estimate, even if a part of it is not visible, we can utilize the segmented part to recover an estimate
of its full shape. Another drawback of the proposed method is that fitting an active contour might
20
(a) Example of radiographs with thoracic diseases causing lungs to appear bright.
(b) Examples of underexposed radiographs which cause lungs to appear bright.
Fig 9: Examples of radiographs that the direct segmentation method would fail to segment the
thorax. (a) The left lung lobes are affected by an increased opacity due to bronchopneumonia. (b)
radiographs are underexposed, leading to a more white and grainy appearance of the pulmonary
parenchyma.
be time-consuming and is proportional to the resolution of the image. In fact, in active contour
fitting, we have to consider all pixels and iteratively optimize the objective function. Thus a higher
resolution radiograph with a higher number of pixels requires more steps to optimize the active
contour. Evaluations on the test set showed that the average time to output an active contour on a
radiograph of size 1024x1024 pixels is 3.0±0.5 seconds.
In future works, we will utilize the proposed method for symmetry classification to develop
an automatic quality classification for canine thoracic radiographs, where asymmetric left and
right hemithoraces are an indication of poor collimation. Therefore, the developed model can be
21
incorporated into a larger model which analyzes and classifies the collimation of a given thoracic
radiograph.
Disclosures
The authors declare that there are no conflicts of interest related to this article.
References
1 T. Axam, "Diagnostic imaging for technicians: Positioning and technique for thoracic and
abdominal," in Veterinary Nursing Education, (2017).
2 K. Alexander, "Reducing error in radiographic interpretation," Can Vet J 51, 533–536 (2010).
3 Y. Yoon, T. Hwang, and H. Lee, "Prediction of radiographic abnormalities by the use of
bag-of-features and convolutional neural networks," Vet J 237, 43–48 (2018).
4 M. A. Tonima, F. Esfahani, A. DeHart, et al., "Lightweight combinational machine learning
algorithm for sorting canine torso radiographs," in 2021 4th IEEE International Conference
on Industrial Cyber-Physical Systems (ICPS), 347–352 (2021).
5 F. N.
Iandola, M. W. Moskewicz, K. Ashraf,
et al.,
"Squeezenet:
Alexnet-
level
accuracy with 50x fewer parameters
and <0.5mb model
size," ArXiv
https://doi.org/10.48550/arXiv.1602.07360 (2016).
6 A. G. Howard, M. Zhu, B. Chen, et al., "Mobilenets: Efficient convolutional neural networks
for mobile vision applications," ArXiv https://doi.org/10.48550/arXiv.1704.04861 (2017).
7 T. Banzato, M. Wodzinski, S. Burti, et al., "Automatic classification of canine thoracic radio-
graphs using deep learning," Scientific Reports 11 (2021).
22
8 G. Huang, Z. Liu, L. V. D. Maaten, et al., "Densely connected convolutional networks," in
2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2261–2269,
IEEE Computer Society, (Los Alamitos, CA, USA) (2017).
9 K. He, X. Zhang, S. Ren, et al., "Deep residual learning for image recognition," 2016 IEEE
Conference on Computer Vision and Pattern Recognition (CVPR) , 770–778 (2015).
10 C. Vinhais and A. Campilho, "Optimal detection of symmetry axis in digital chest x-ray im-
ages," in Pattern Recognition and Image Analysis, F. J. Perales, A. J. C. Campilho, N. P. de la
Blanca, et al., Eds., 1082–1089, Springer Berlin Heidelberg, (Berlin, Heidelberg) (2003).
11 K. C. Santosh and S. Antani, "Automated chest X-Ray screening: Can lung region symmetry
help detect pulmonary abnormalities?," IEEE Trans Med Imaging 37, 1168–1177 (2018).
12 J. H. Friedman, "Greedy function approximation: A gradient boosting machine.," The Annals
of Statistics 29(5), 1189 – 1232 (2001).
13 O. Ronneberger, P. Fischer, and T. Brox, "U-net: Convolutional networks for biomedical
image segmentation," in Medical Image Computing and Computer-Assisted Intervention –
MICCAI 2015, N. Navab, J. Hornegger, W. M. Wells, et al., Eds., 234–241, Springer Interna-
tional Publishing, (Cham) (2015).
14 J. Deng, W. Dong, R. Socher, et al., "Imagenet: A large-scale hierarchical image database,"
in 2009 IEEE conference on computer vision and pattern recognition, 248–255, IEEE (2009).
15 M. Kass, A. Witkin, and D. Terzopoulos, "Snakes: Active contour models," International
Journal of Computer Vision 1, 321–331 (1988).
16 A. Karargyris, J. Siegelman, D. Tzortzis, et al., "Combination of texture and shape features
23
to detect pulmonary abnormalities in digital chest x-rays," International Journal of Computer
Assisted Radiology and Surgery 11, 99–106 (2016).
17 "Agfa." https://www.agfa.com/corporate/.
18 A. Paszke, S. Gross, S. Chintala, et al., "Automatic differentiation in pytorch," in NIPS 2017
Workshop on Autodiff, (2017).
19 I. Loshchilov and F. Hutter, "Decoupled weight decay regularization," in International Con-
ference on Learning Representations, (2019).
20 T.-Y. Lin, P. Goyal, R. Girshick, et al., "Focal loss for dense object detection," IEEE Trans-
actions on Pattern Analysis and Machine Intelligence 42(2), 318–327 (2020).
21 S. S. M. Salehi, D. Erdogmus, and A. Gholipour, "Tversky loss function for image segmenta-
tion using 3d fully convolutional deep networks," in Machine Learning in Medical Imaging,
Q. Wang, Y. Shi, H.-I. Suk, et al., Eds., 379–387, Springer International Publishing, (Cham)
(2017).
Biographies of the authors are not available.
24
|
|
http://arxiv.org/abs/2302.12921v2 | 2023-02-28T02:28:41 | 2023-02-24T22:38:54 | Pre-Finetuning for Few-Shot Emotional Speech Recognition | Speech models have long been known to overfit individual speakers for many
classification tasks. This leads to poor generalization in settings where the
speakers are out-of-domain or out-of-distribution, as is common in production
environments. We view speaker adaptation as a few-shot learning problem and
propose investigating transfer learning approaches inspired by recent success
with pre-trained models in natural language tasks. We propose pre-finetuning
speech models on difficult tasks to distill knowledge into few-shot downstream
classification objectives. We pre-finetune Wav2Vec2.0 on every permutation of
four multiclass emotional speech recognition corpora and evaluate our
pre-finetuned models through 33,600 few-shot fine-tuning trials on the
Emotional Speech Dataset. | [
"Maximillian Chen",
"Zhou Yu"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12921v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12921v2",
"@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",
"cs.SD",
"eess.AS"
] | Pre-Finetuning for Few-Shot Emotional Speech Recognition
Maximillian Chen, Zhou Yu
Columbia University
[email protected], [email protected]
3
2
0
2
b
e
F
8
2
]
L
C
.
s
c
[
2
v
1
2
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Speech models have long been known to overfit individual
speakers for many classification tasks. This leads to poor gen-
eralization in settings where the speakers are out-of-domain or
out-of-distribution, as is common in production environments.
We view speaker adaptation as a few-shot learning problem
and propose investigating transfer learning approaches inspired
by recent success with pre-trained models in natural language
tasks. We propose pre-finetuning speech models on difficult
tasks to distill knowledge into few-shot downstream classifica-
tion objectives. We pre-finetune Wav2Vec2.0 on every permu-
tation of four multiclass emotional speech recognition corpora
and evaluate our pre-finetuned models through 33,600 few-shot
fine-tuning trials on the Emotional Speech Dataset.
Index Terms: emotion recognition, low resource learning, pre-
finetuning, transfer learning
1. Introduction
Speech models tend to generalize poorly to out-of-distribution
speakers due to a phenomenon called speaker overfitting [1, 2,
3]. Speaker overfitting can be problematic when deploying sys-
tems in production environments. There, speakers typically do
not exist in training corpora, and thus it takes time to amass suf-
ficient amounts of training data. This motivates systems which
can adapt to individual speakers "on-the-fly" with little data.
To this end, out-of-domain speaker adaptation can be
viewed as a few-shot learning problem [3].
In low resource
data settings, learning can be difficult, particularly with the
regularization used in typical speaker-invariant learning ap-
proaches [3, 4]. However, in recent years, many approaches
to few-shot learning have found success with transfer learning,
leveraging pre-trained models which have learned representa-
tions from multiple corpora [5, 6, 7]. But, these pretraining
corpora are not necessarily relevant to target downstream tasks.
This has motivated recent work to propose an additional step
between pre-training and downstream fine-tuning called pre-
finetuning [5]. While most work has examined pre-finetuning
with multi-task learning, [8] found that large-scale multi-task
pre-finetuning performance can nearly be matched by only us-
ing corpora from tasks that match the type of the eventual down-
stream task.
Overall, pre-finetuning has been studied extensively and
successfully in natural language processing tasks, but our study
is the first to attempt pre-finetuning for any speech or audio
processing task. We reason this is due to the comparatively
higher number of tasks and datasets with accessible licensing
for natural language. Additionally, many language tasks are
easily cross-compatible during transfer learning (e.g. every pre-
training task for T5 is trained using textual inputs and outputs
Figure 1: Workflow of pre-finetuning an emotion recognition
model. Wav2Vec2.0 is initialized with a separate linear classi-
fication head for each pre-finetuning dataset in order to ensure
the correct output space. Pre-finetuning tasks are continuously
randomly sampled, and each instance is mapped to the corre-
sponding classification head. Each task's loss is computed sep-
arately and averaged during validation.
without needing to adapt the model or loss function [9]). Here,
we consider the few-shot1 emotional speech recognition task.
We pre-finetune a separate model using every member of the
power set of four large emotional speech corpora according
to the workflow in Figure 1.2 We evaluate our pre-finetuned
models across 33,600 controlled few-shot classification experi-
ments. We contribute ablations and analyses into how different
experimental conditions affect pre-finetuning efficacy.
2. Related Work
Pre-trained models have been a successful case study of transfer
learning for low resource tasks. When scaled to billions of pa-
rameters, pre-trained models have been able to generalize pre-
trained knowledge to downstream tasks through few-shot in-
context learning, taking the form of both downstream task mod-
els (e.g. [7, 10, 11, 12]) and models for synthetic data generation
(e.g. [13, 14, 15, 16]) in natural language tasks. However, capa-
bilities such as in-context learning typically only appear through
this tradeoff with model size, as they only emerge when us-
ing sufficiently large models. To date, pre-trained speech mod-
els have rarely been scaled to the same extent. The largest
model is BigSSL with eight billion parameters [17], whereas
recent work on in-context learning for low-resource language
data augmentation has used models with a minimum size of six
billion [13, 18, 16], and often reaching model sizes as large as
1We use as few as two downstream training examples.
2Code at https://github.com/maxlchen/Speech-PreFinetuning
Task SamplerData Loader 1Data Loader 2Data Loader n...Pre-trainedWav2Vec2.0 ClassificationHead 1ClassificationHead 2ClassificationHead n...SpeakingTurnTask 1PredictionsTask 2PredictionsTaskn Predictions...Task 1 LossTask 2 LossTask n Loss...Average of Losses
175 billion parameters [18]. Smaller pre-trained models lack
the same expansive pre-trained representations found in large
models, making it impractical to perform in-context learning
or generate high-quality synthetic data. However, due to their
smaller size, it is more feasible to perform fine-tuning to directly
transfer knowledge to downstream tasks.
But, fine-tuning still is impractical when there is not a suffi-
cient amount of data. Recent work proposed an additional learn-
ing step between pre-training and fine-tuning to better facilitate
knowledge distillation: pre-finetuning [5]. They pre-finetuned
the base and large variants of BART [19] and RoBERTa [20] us-
ing large-scale multitask corpora. Follow-up work found that it
was more efficient to do single-task pre-finetuning than to have
a diverse set of corpora [8]. With the right corpora selection,
pre-finetuning has potential to help with few-shot learning prob-
lems [21] such as speaker adaptation, but to date it has yet to be
explored in any speech processing task.
Traditional approaches to speaker adaptation focus on in-
variance using adversarial learning or regularization. [22] pro-
posed a network to jointly learn a speaker classifier and senone
discriminator through adversarial multitask learning. Several
works have investigated using KL divergence-based regulariza-
tion (e.g. [23, 24]). Other studies used gradient reversal layers
to regularize learning gains from individual speakers [25]. But,
these approaches often still require large amounts of training
data and are not as applicable to low resource settings [22, 4].
The overall success with using pre-trained models in few-
shot learning and increasing popularity of pre-trained speech
models such as Wav2Vec2.0 [26] and HuBERT [27] naturally
motivates the exploration of pre-finetuning for few-shot speaker
adaptation. The most similar lines of work examine multi-task
learning for speech processing [28, 29, 30], which also involves
learning representations from multiple data sources. However,
the key difference compared to our setting is that classic mul-
titask learning involves training a model to learn a representa-
tion shared between a target downstream task and any auxiliary
tasks simultaneously [31]. This requires sufficient downstream
data. Pre-finetuning is a form of multitask learning which in-
stead takes place during an intermediate step dedicated to learn-
ing an auxiliary task representation, which in turn can be used as
a close initialization for a low-resource downstream task. Our
work is the first to examine pre-finetuning speech models. We
ground our study in the context of few-shot speaker adaptation
for emotional speech recognition, and draw upon findings from
[8] in our selection of pre-finetuning corpora.
3. Methodology
3.1. Corpora Selection
In this study, we focus on adapting speakers for emotion recog-
nition as our downstream task. As such, we chose four large, di-
verse pre-finetuning corpora that each fall within the category of
emotional speech recognition. MSP-IMPROV contains 8,438
improvised speaking turns from four emotions (happy, sadness,
anger, neutral) [32]. MSP-PODCAST contains 100 hours of
speech from 62,140 from speaking turns collected from podcast
recordings [33]. Each turn is annotated with one of nine cate-
gorical emotion labels (anger, happiness, sadness, disgust, sur-
prised, fear, contempt, neutral, other). The Mandarin Affective
Speech (Mandarin AS) corpus contains 25,636 utterances from
68 unique speakers, with annotations according to five emotion
labels (anger, elation, neutral, panic, sadness) [34, 35]. The
IEMOCAP benchmark contains 12 hours of audio consisting
of 10,039 total turns from ten unique speakers, with nine dif-
ferent emotion labels (anger, happiness, excitement, sadness,
frustration, fear, surprise, other, neutral). All corpora consist
of English speech other than Mandarin AS, which consists of
Mandarin speech.
3.2. Pre-Finetuning in Speech
In this work, we pre-finetune base Wav2Vec2.0 (94.4M param-
eters), inspired the workflow used by [8] with language mod-
els. As depicted in Figure 1, we initialize one linear classifi-
cation head for each of our pre-finetuning tasks, appropriately
setting the output space. For each training step, we load an
instance from a randomly sampled pre-finetuning task and map
the loaded instance to the corresponding classification head. We
compute a scaled loss for each task separately, as in [5, 8]. The
scaled loss is given as Li(xi,yi,θ)
for a model parameterized by
θ, where Li(xi, yi, θ) is the loss for training instance i, and n(i)
is the size of the output space for the prediction task of instance
i [5]. During validation, we average the taskwise losses, which
helps prevents the model from overfitting to individual tasks
during pre-finetuning. We pre-finetune for up to 200 epochs
with early stopping after three epochs without improvement.
ln n(i)
We pre-finetuned each model j on one of the combina-
tions of corpora from the power set3 of the corpora in Sec-
tion 3.1. That is, each combination is a set of corpora Cj
where 0 ≤ |Cj| ≤ 4 and j ∈ {1..16}. This includes a
base Wav2Vec2.0 model without any pre-finetuning as a base-
line (i.e., when |Cj| = 0). We additionally attempted to use
standard emotion recognition baselines [36] such as the Com-
ParE 2016 automatic paralinguistic feature extractor [37] with
a dense artificial neural network, but these approaches cannot
surpass the performance of constant prediction. This highlights
the difficulty of the few-shot version of this task. All exper-
iments are run using individual NVIDIA RTX A6000 GPUs.
We use the HuggingFace Transformers [38] and PyTorch [39]
packages.
3.3. Downstream Finetuning
To model speaker adaptation as few-shot learning, we perform
downstream finetuning on emotion recognition for each indi-
vidual speaker in the Emotional Speech Dataset (ESD; [40]).
There are 10 English speakers and 10 Mandarin speakers.
Each study participant was a native speaker of their respec-
tive language. Each utterance contains neutrally worded lan-
guage and is categorized as either Happy, Sad, Surprised, An-
gry, or Neutral. We perform binary emotion classification for
each emotion4 for each speaker under seven few-shot settings,
k ∈ {2, 4, 8, 16, 24, 32, 64}, where k is the number of avail-
able training examples. For each few-shot setting, we randomly
sample k
2 negative training instances. We con-
duct three trials for each downstream condition. Each trial runs
for up to 200 epochs, with 30 epochs of early stopping patience.
2 positive and k
4. Experimental Results
Accounting for the 16 combinations of pre-finetuned models
and all fine-tuning conditions, we evaluated the effects of pre-
finetuning across 33,600 downstream model fine-tuning trials.
3We use 1 + (cid:80)4
4The targets are whether or not an instance matches a specific emo-
(cid:1) = 16 different models downstream.
(cid:0)4
r
r=1
tion, e.g. Happy/Not Happy, Sad/Not Sad, etc.
Figure 2: Comparison of downstream task performance of mod-
els pre-finetuned on varying numbers of corpora. Each line de-
picts change in mean and standard error of F1 Macro.
Figure 3: Average difference in Macro F1 resulting from pre-
finetuning on each corpus compared to the Wav2Vec2.0 base-
line. Differences shown are aggregations controlling for the
number of few-shot examples, each speaker, and each emotion.
4.1. Effect of Number of Pre-Finetuning Corpora
In Figure 2 we demonstrated the effect of varying the number
of corpora (n) used during pre-finetuning in the low-resource
setting. Each line represents one few-shot condition (k). Each
point represents the average test set F1 score of pre-finetuned
models for a particular pre-finetuning corpus size for all down-
stream classification tasks under few-shot condition k. The
shading around each line represents the region of standard er-
ror surrounding the mean. We observe a few patterns. In six of
the seven few-shot settings, using only one pre-finetuning cor-
pus may hurt performance compared to direct fine-tuning with-
out a pre-finetuning step, which is consistent with the "critical
point" for pre-finetuning utility, as discussed in [5]. However,
in the most extreme case with k = 2, even using just one pre-
finetuning corpus still yields performance improvements over
the baseline. After n = 1, we witness continuous improvements
in average performance as n increases. However we typically
see the largest improvements from n = 1 to n = 2. We exam-
ine possible reasons by ablating the pre-finetuning corpora.
4.2. Ablation on Individual Corpus Contributions
We attempt
to quantify how much each individual pre-
finetuning corpus contributes to changes in downstream classifi-
cation performance. We controlled for each speaker, each emo-
tion, and each few-shot condition for fair comparisons. Then,
under each of these controlled settings, we compute the average
F1 score across all model trials for which pre-finetuning set Cj
includes each corpus c, subtracted by the average performance
of the no-prefinetuning baseline. For each of these controlled
settings, we calculated the change in average F1 scores for each
pre-finetuning corpus compared to baseline Wav2Vec2.0.
Figure 3 illustrates these differentials aggregated across
speakers and emotions, and stratified by each few-shot setting.
We consistently see that models pre-finetuned on combinations
of corpora which include MSP-PODCAST results in the most
improvements over baseline performance on average, whereas
IEMOCAP results in the least improvements. In the k = 32
and k = 64 few-shot data settings, pre-finetuning on IEMO-
CAP actually hurts performance on average. This is also true
of MSP-IMPROV in one setting, but MSP-IMPROV is also the
second most useful corpus for pre-finetuning in the two most ex-
treme few-shot data settings. The Mandarin Affective Speech
corpus consistently positively contributes to performance im-
provements, on average. However, the fact that certain corpora
Table 1: Average Macro F1 from pre-finetuning on each indi-
vidual corpus (F1in) compared to F1 from pre-finetuning on all
but that corpus (F1ex). F1 is aggregated controlling for the
number of few-shot examples, each speaker, and each emotion.
k
2
4
8
Corpus
F1in
F1ex
∆
IEMOCAP
Mandarin AS
MSP-IMPROV
MSP-PODCAST
IEMOCAP
Mandarin AS
MSP-IMPROV
MSP-PODCAST
IEMOCAP
Mandarin AS
MSP-IMPROV
MSP-PODCAST
0.5048
0.5812
0.5233
0.6150
0.5447
0.6495
0.5623
0.7010
0.5816
0.7040
0.6021
0.7640
0.6232
0.6445
0.6299
0.6272
0.7054
0.7160
0.7030
0.6990
0.7747
0.7862
0.7783
0.7549
-0.1184
-0.0633
-0.1066
-0.0122
-0.1607
-0.0665
-0.1407
0.0020
-0.1931
-0.0822
-0.1762
0.0091
hurt performance overall may explain why there tends to be a
large improvement in performance from n = 1 to n = 2.
4.3. Ablation on Pre-Finetuning Corpus Inclusion
We further attempted to isolate the contributions of individual
corpora by examining the effect of including and excluding in-
dividual corpora in the extreme few-shot settings. That is, for
each individual pre-finetuning corpus c from the set of all cor-
pora C, we compared models pre-finetuned on Cj = C \ {c}
and Cj = {c}. As in Section 4.2, we aggregated performances
controlled for speakers, emotions, and few-shot settings, to en-
sure for fair direct comparisons.
In Table 15, we see patterns mostly consistent with the anal-
ysis of corpora contributions in Figure 3. F 1in is the aggregated
performance of the model trained on Cj = {c} and F 1ex is
the performance of the model traied on Cj = C \ {c}. MSP-
PODCAST is the only corpus which has any positive differen-
tials when compared to pre-finetuning on all other corpora. For
all few-shot settings, MSP-PODCAST has the highest differen-
tial, followed by Mandarin AS, MSP-IMPROV, and IEMOCAP.
5We see the same patterns at k ∈ {16, 24, 32, 64}. We omit these
results due to space constraints. F 1in for MSP-PODCAST at k = 64
is 0.9126 whereas F 1ex is 0.9108.
01234Number of Pre-Finetuning Corpora0.50.60.70.80.9Macro F1k = 2k = 4k = 8k = 16k = 24k = 32k = 640.020.000.020.040.060.08Avg. Baseline F1 Improvement24816243264Downstream ExamplesIEMOCAPMandarin ASMSP-IMPROVMSP-PODCASTFigure 4: Effect of number of training examples using during fine-tuning for the baseline model with no pre-finetuning (No PFT), and
the model pre-finetuned on all four corpora (All PFT). Results are stratified by emotion. Left: classification results on native English
speech. Right: classification results on native Mandarin speech.
4.4. Scaling Downstream Training Data Sizes
From Figure 2 and Figure 3, it is clear that the most performance
improvements arise from the fewest-resource setting (k = 2
downstream training examples), but we do see performance im-
provements in higher resource settings when pre-finetuning on
all four corpora. We take a deeper look into these performance
improvements to further understand the ceiling and limits of
this pre-finetuning approach. In Figure 4, we compare the per-
formance of the full pre-finetuning setting against the no pre-
finetuning baseline in all of our data settings, stratified by indi-
vidual emotions and separated by speakers' native language.
For both the English and Mandarin speakers, we see that
using pre-finetuning yields higher performance on average than
the baseline for all few-shot data settings for all emotions ex-
cept for "Surprise." This may be due to the fact that whereas
the other four emotions are relatively common, Surprise is not
as well-represented in the pre-finetuning corpora. Surprise is
only represented explicitly by MSP-PODCAST and IEMOCAP.
Overall, we do see that pre-finetuning can boost classification
performance substantially, but the performance gains generally
taper off substantially after k = 24.
5. Discussion
While conventional wisdom suggests that pre-finetuning must
be performed on large-scale corpora [5], we actually show that it
is possible to achieve strong results in the few-shot setting with
small-scale pre-finetuning. We do observe that downstream task
performance may improve further as more pre-finetuning cor-
pora are used. In this study we only used four corpora due to
licensing and computational constraints, but our findings war-
rant examining the upside of more corpora. A larger set may
delay the onset of the diminishing returns seen in Figure 4.
We also see that the finding of a critical point in number
of pre-finetuning corpora prior to witnessing performance im-
provements from [5] may hold true for speech tasks. We hy-
pothesize that this is likely because models such as Wav2Vec2.0
adapt well to downstream fine-tuning due to their general
representations learned during their masked pre-training pro-
cess [26], while pre-finetuning on too few corpora may cause
such models to lose some of their generality. We also see that
MSP-PODCAST appears to contribute the most to improve-
ments in downstream task performance. This may be due to
the fact that simply is the largest corpus, both in terms of num-
ber of training instances and number of emotions covered. This
is despite averaging task-specific losses during pre-finetuning.
Our experimental results reveal that the fewer the number
of available downstream training examples, the more valuable
pre-finetuned representations are. The k = 2 setting is the only
context in which there is not a number of pre-finetuning corpora
which results in a performance decrease on average compared to
Wav2Vec2.0 without pre-finetuning (Figure 2). Moreover, Fig-
ure 2 and Figure 3 shows that the performance improvements
over the baseline generally seem smaller the greater the number
of training examples available, indicating that pre-finetuning
most helps performance in the extreme low-resource settings,
which reflects the initial stages of personalized speaker adapta-
tion. This experimental setup and approach to speaker adapta-
tion is also unconstrained by language. Our pre-finetuned mod-
els adapt to each speaker individually regardless of whether they
speak English or Mandarin.
In this study, we held the model choice fixed, but our
workflow is compatible with any pre-trained model. Base
Wav2Vec2.0 is comparable in size to the base variants of
RoBERTa and BART, so it
is likely that using a larger
Wav2Vec2.0 would result in improvements following similar
patterns to those language models. While a benefit of pre-
finetuning is that we can achieve strong performance using a
small model and limited downstream data, we would likely see
further performance improvements using larger models.
6. Conclusion
This work is the first to examine pre-finetuning on speech pro-
cessing tasks. We see large performance improvements in ex-
treme few-shot data settings, including boosting performance
from near random to over 0.600 F1 using k = 2 training exam-
ples. We contribute an in-depth controlled analysis of several
experimental factors including ablations of pre-finetuning cor-
pora, motivating applying pre-finetuning to other speech pro-
cessing tasks with more models and pre-finetuning corpora.
24816243264Number of Training Instances0.50.60.70.80.9Macro F1EnglishAngry (No PFT)Happy (No PFT)Neutral (No PFT)Sad (No PFT)Surprise (No PFT)Angry (All PFT)Happy (All PFT)Neutral (All PFT)Sad (All PFT)Surprise (All PFT)24816243264Number of Training Instances0.50.60.70.80.91.0Macro F1MandarinAngry (No PFT)Happy (No PFT)Neutral (No PFT)Sad (No PFT)Surprise (No PFT)Angry (All PFT)Happy (All PFT)Neutral (All PFT)Sad (All PFT)Surprise (All PFT)[23] M. Kim et al., "Regularized speaker adaptation of kl-hmm for
dysarthric speech recognition," IEEE Transactions on Neural Sys-
tems and Rehabilitation Engineering, vol. 25, no. 9, pp. 1581–
1591, 2017.
[24] C. Liu et al., "Investigations on speaker adaptation of lstm rnn
models for speech recognition," in 2016 IEEE International Con-
ference on Acoustics, Speech and Signal Processing (ICASSP).
IEEE, 2016, pp. 5020–5024.
[25] Y. Yin et al., "Speaker-invariant adversarial domain adaptation for
emotion recognition," in ICMI, 2020, pp. 481–490.
[26] A. Baevski et al., "wav2vec 2.0: A framework for self-supervised
learning of speech representations," NeurIPS, vol. 33, pp. 12 449–
12 460, 2020.
[27] W.-N. Hsu et al., "Hubert: Self-supervised speech representation
learning by masked prediction of hidden units," IEEE/ACM Trans-
actions on Audio, Speech, and Language Processing, vol. 29, pp.
3451–3460, 2021.
[28] D. Chen and B. K.-W. Mak, "Multitask learning of deep neu-
ral networks for low-resource speech recognition," IEEE/ACM
Transactions on Audio, Speech, and Language Processing,
vol. 23, no. 7, pp. 1172–1183, 2015.
[29] X. Cai et al., "Speech emotion recognition with multi-task learn-
ing." in Interspeech, vol. 2021, 2021, pp. 4508–4512.
[30] Q. Meeus et al., "Multitask learning for low resource spoken lan-
guage understanding," 2022-09-18.
[31] G. Pironkov et al., "Multi-task learning for speech recognition: an
overview." in ESANN, 2016.
[32] C. Busso et al., "Msp-improv: An acted corpus of dyadic interac-
tions to study emotion perception," IEEE Transactions on Affec-
tive Computing, vol. 8, no. 1, pp. 67–80, 2016.
[33] R. Lotfian and C. Busso, "Building naturalistic emotionally bal-
anced speech corpus by retrieving emotional speech from existing
podcast recordings," IEEE Transactions on Affective Computing,
vol. 10, no. 4, pp. 471–483, 2017.
[34] Y. Yang et al., "Mandarin affective speech," LDC2007S09, 2007.
[35] T. Wu et al., "Masc: A speech corpus in mandarin for emotion
analysis and affective speaker recognition," in 2006 IEEE Odyssey
- The Speaker and Language Recognition Workshop, 2006, pp. 1–
5.
[36] J. Zhang et al., "Multimodal deception detection using automati-
cally extracted acoustic, visual, and lexical features." 2020.
[37] B. Schuller et al., "The interspeech 2016 computational paralin-
guistics challenge: Deception, sincerity & native language," in
Interspeech, vol. 8.
ISCA, 2016, pp. 2001–2005.
[38] T. Wolf et al., "Transformers: State-of-the-art natural language
processing," in EMNLP, 2020, pp. 38–45.
[39] A. Paszke et al., "Pytorch: An imperative style, high-performance
deep learning library," Advances in neural information processing
systems, vol. 32, 2019.
[40] K. Zhou et al., "Seen and unseen emotional style transfer for voice
conversion with a new emotional speech dataset," in ICASSP.
IEEE, 2021, pp. 920–924.
7. Acknowledgements
This work is supported by a DARPA PTG grant. We thank Ta-
Chung Chi for helpful feedback.
8. References
[1] J.-w. Jung et al., "Avoiding speaker overfitting in end-to-end dnns
using raw waveform for text-independent speaker verification," in
Interspeech, 2018.
[2] G. Pironkov et al., "Speaker-aware long short-term memory
IEEE,
multi-task learning for speech recognition," in EUSIPCO.
2016, pp. 1911–1915.
[3] T. Wang et al., "Spoken content and voice factorization for few-
shot speaker adaptation." in INTERSPEECH, 2020, pp. 796–800.
[4] J. Zhao et al., "Speech emotion recognition using deep 1d & 2d
cnn lstm networks," Biomedical signal processing and control,
vol. 47, pp. 312–323, 2019.
[5] A. Aghajanyan et al., "Muppet: Massive multi-task representa-
tions with pre-finetuning," in EMNLP, Nov. 2021, pp. 5799–5811.
[6] T. Gao et al., "Making pre-trained language models better few-
shot learners," in ACL-IJCNLP, 2021, pp. 3816–3830.
[7] T. Brown et al., "Language models are few-shot
learners,"
NeurIPS, vol. 33, pp. 1877–1901, 2020.
[8] V. Padmakumar et al., "Exploring the role of task transferability
in large-scale multi-task learning," in NAACL 2022, Jul. 2022, pp.
2542–2550.
[9] C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena,
Y. Zhou, W. Li, and P. J. Liu, "Exploring the limits of transfer
learning with a unified text-to-text transformer," The Journal of
Machine Learning Research, vol. 21, no. 1, pp. 5485–5551, 2020.
[10] P. Liu et al., "Pre-train, prompt, and predict: A systematic sur-
vey of prompting methods in natural language processing," ACM
Computing Surveys, vol. 55, no. 9, pp. 1–35, 2023.
[11] S. Min et al., "Rethinking the role of demonstrations: What makes
in-context learning work?" in EMNLP, 2022.
[12] J. Wei et al., "Emergent abilities of large language models,"
TMLR, 2022.
[13] M. Chen et al., "Weakly supervised data augmentation through
prompting for dialogue understanding," in NeurIPS 2022 Work-
shop on Synthetic Data for Empowering ML Research.
[14] J. Liu et al., "Low-resource ner by data augmentation with
prompting," in IJCAI, 2022, pp. 4252–4258.
[15] Y. Meng et al., "Generating training data with language models:
Towards zero-shot language understanding," in NeurIPS, 2022.
[16] M. Chen et al., "PLACES: Prompting language models for social
conversation synthesis," in Findings of EACL, 2023.
[17] Y. Zhang et al., "Bigssl: Exploring the frontier of large-scale
semi-supervised learning for automatic speech recognition," IEEE
Journal of Selected Topics in Signal Processing, vol. 16, no. 6, pp.
1519–1532, 2022.
[18] G. Sahu et al., "Data augmentation for intent classification with
off-the-shelf large language models," in 4th Workshop on NLP for
Conversational AI, 2022, pp. 47–57.
[19] M. Lewis et al., "BART: Denoising sequence-to-sequence pre-
training for natural language generation, translation, and compre-
hension," in ACL, Jul. 2020, pp. 7871–7880.
[20] Y. Liu et al., "Roberta: A robustly optimized bert pretraining ap-
proach," arXiv preprint arXiv:1907.11692, 2019.
[21] J. Ma et al., "Label semantics for few shot named entity recogni-
tion," in Findings of ACL, 2022, pp. 1956–1971.
[22] Z. Meng et al., "Speaker-invariant training via adversarial learn-
ing," in ICASSP.
IEEE, 2018, pp. 5969–5973.
|
|
http://arxiv.org/abs/2302.12918v1 | 2023-02-24T22:14:39 | 2023-02-24T22:14:39 | Deep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems | Our work focuses on anomaly detection in cyber-physical systems. Prior
literature has three limitations: (1) Failing to capture long-delayed patterns
in system anomalies; (2) Ignoring dynamic changes in sensor connections; (3)
The curse of high-dimensional data samples. These limit the detection
performance and usefulness of existing works. To address them, we propose a new
approach called deep graph stream support vector data description (SVDD) for
anomaly detection. Specifically, we first use a transformer to preserve both
short and long temporal patterns of monitoring data in temporal embeddings.
Then we cluster these embeddings according to sensor type and utilize them to
estimate the change in connectivity between various sensors to construct a new
weighted graph. The temporal embeddings are mapped to the new graph as node
attributes to form weighted attributed graph. We input the graph into a
variational graph auto-encoder model to learn final spatio-temporal
representation. Finally, we learn a hypersphere that encompasses normal
embeddings and predict the system status by calculating the distances between
the hypersphere and data samples. Extensive experiments validate the
superiority of our model, which improves F1-score by 35.87%, AUC by 19.32%,
while being 32 times faster than the best baseline at training and inference. | [
"Ehtesamul Azim",
"Dongjie Wang",
"Yanjie Fu"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12918v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12918v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | 3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
8
1
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Deep Graph Stream SVDD: Anomaly Detection
in Cyber-Physical Systems
Ehtesamul Azim, Dongjie Wang, and Yanjie Fu
Department of Computer Science
University of Central Florida, Orlando, FL 32826, USA
{azim.ehtesam,wangdongjie}@knights.ucf.edu, [email protected]
Abstract. Our work focuses on anomaly detection in cyber-physical
systems. Prior literature has three limitations: (1) Failing to capture
long-delayed patterns in system anomalies; (2) Ignoring dynamic changes
in sensor connections; (3) The curse of high-dimensional data samples.
These limit the detection performance and usefulness of existing works.
To address them, we propose a new approach called deep graph stream
support vector data description (SVDD) for anomaly detection. Specif-
ically, we first use a transformer to preserve both short and long tem-
poral patterns of monitoring data in temporal embeddings. Then we
cluster these embeddings according to sensor type and utilize them to
estimate the change in connectivity between various sensors to construct
a new weighted graph. The temporal embeddings are mapped to the
new graph as node attributes to form weighted attributed graph. We
input the graph into a variational graph auto-encoder model to learn fi-
nal spatio-temporal representation. Finally, we learn a hypersphere that
encompasses normal embeddings and predict the system status by calcu-
lating the distances between the hypersphere and data samples. Exten-
sive experiments validate the superiority of our model, which improves
F1-score by 35.87%, AUC by 19.32%, while being 32 times faster than
the best baseline at training and inference.
1
Introduction
Cyber-physical systems (CPS) have been deployed everywhere and play a signif-
icant role in the real world, including smart grids, robotics systems, water treat-
ment networks, etc. Due to their complex dependencies and relationships, these
systems are vulnerable to abnormal system events (e.g., cyberattacks, system
exceptions), which can cause catastrophic failures and expensive costs. In 2021,
hackers infiltrated Florida's water treatment plants and boosted the sodium hy-
droxide level in the water supply by 100 times of the normal level [3]. This may
endanger the physical health of all Floridians. To maintain stable and safe CPS,
considerable research effort has been devoted to effectively detect anomalies in
such systems using sensor monitoring data [19,16].
Prior literature partially resolve this problem- however, there are three issues
restricting their practicality and detection performance. Issue 1: long-delayed
patterns. The malfunctioning effects of abnormal system events often do not
2
Ehtesam et al.
manifest immediately. Kravchik et al. employed LSTM to predict future values
based on past values and assessed the system status using prediction errors[5].
But, constrained by the capability of LSTM, it is hard to capture long-delayed
patterns, which may lead to suboptimal detection performance. How can we
sufficiently capture such long-delayed patterns? Issue 2: dynamic changes in
sensor-sensor influence. Besides long-delayed patterns, the malfunctioning
effects may propagate to other sensors. Wang et al. captured such propagation
patterns in water treatment networks by integrating the sensor-sensor connec-
tivity graph for cyber-attack detection [17]. However, the sensor-sensor influence
may shift as the time series changes due to system failures. Ignoring such dy-
namics may result in failing to identify propagation patterns and cause poor
detection performance. How can we consider such dynamic sensor-sensor influ-
ence? Issue 3: high-dimensional data samples. Considering the labeled data
sparsity issue in CPS, existing works focus on unsupervised or semi-supervised
setting [17,10]. But traditional models like One-Class SVM are too shallow to
fit high-dimensional data samples. They have substantial time costs for feature
engineering and model learning. How can we improve the learning efficiency of
anomaly detection in high-dimensional scenarios?
To address these, we aim to effectively capture spatial-temporal dynamics
in high-dimensional sensor monitoring data. In CPS, sensors can be viewed as
nodes, and their physical connections resemble a graph. Considering that the
monitoring data of each sensor changes over time and that the monitoring data
of various sensors influences one another, we model them using a graph stream
structure. Based on that, we propose a new framework called Deep Graph Stream
Support Vector Data Description (DGS-SVDD). Specifically, to capture long-
delayed patterns, we first develop a temporal embedding module based on trans-
former [15]. This module is used to extract these patterns from individual sensor
monitoring data and embed them in low-dimensional vectors. Then, to compre-
hend dynamic changes in sensor-sensor connection, we estimate the influence
between sensors using the previously learned temporal embedding of sensors.
The estimated weight matrix is integrated with the sensor-sensor physically con-
nected graph to produce an enhanced graph. We map the temporal embeddings
to each node in the enhanced graph as its attributes to form a new attributed
graph. After that, we input this graph into the variational graph auto-encoder
(VGAE) [4] to preserve all information as final spatial-temporal embeddings.
Moreover, to effectively detect anomalies in high-dimensional data, we adopt
deep learning to learn the hypersphere that encompasses normal embeddings.
The distances between the hypersphere and data samples are calculated to be
criteria to predict the system status at each time segment. Finally, we conduct
extensive experiments on a real-world dataset to validate the superiority of our
work. In particular, compared to the best baseline model, DGS-SVDD improves
F1-score by 35.87% and AUC by 19.32%, while accelerating model training and
inference by 32 times.
Deep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems
3
2 Preliminaries
2.1 Definitions
Definition 1. Graph Stream. A graph object Gi describes the monitoring
values of the Cyber-Physical System at timestamp i. It can be defined as Gi =
(V,E,ti) where V is the vertex (i.e., sensor) set with a size of n; E is the edge set
with a size of m, and each edge indicates the physical connectivity between any
two sensors; ti is a list that contains the monitoring value of n sensors at the i-th
timestamp. A graph stream is a collection of graph objects over the temporal
dimension. The graph stream with the length of Lx at the t-th time segment can
be defined as Xt = [Gi, Gi+1, * * * Gi+Lx−1].
Definition 2. Weighted Attributed Graph. The edge set E of each graph
object in the graph stream Xt does not change over time, which is a binary
edge set that reflects the physical connectivity between sensors. However, the
correlations between different sensors may change as system failures happen. To
capture such dynamics, we use ̃Gt = (V, ̃Et, Ut) to denote the weighted attributed
graph at the t-th time segment. In the graph, V is the same as the graph object
in the graph stream, which is the vertex (i.e., sensor) set with a size of n; ̃Et is the
weighted edge set, in which each item indicates the weighted influence calculated
from the temporal information between two sensors; Ut is the attributes of each
vertex, which is also the temporal embedding of each node at the current time
segment. Thus, ̃Gt contains the spatial-temporal information of the system.
2.2 Problem Statement
Our goal is to detect anomalies in cyber-physical systems at each time segment.
Formally, assuming that the graph stream data at the t-th segment is Xt, the
corresponding system status is yt. We aim to find an outlier detection function
that learns the mapping relation between Xt and yt, denoted by f (Xt) → yt.
Here, yt is a binary constant whose value is 1 if the system status is abnormal
and 0 otherwise.
3 Methodology
In this section, we give an overview of our framework and then describe each
technical part in detail.
3.1 Framework Overview
Figure 1 shows an overview of our framework, named DGS-SVDD. Specifically,
we start by feeding the DGS-SVDD model the graph stream data for one time
segment. In the model, we first analyze the graph stream data by adopting the
transformer-based temporal embedding module to extract temporal dependen-
cies. Then, we use the learnt temporal embedding to estimate the dynamics
4
Ehtesam et al.
Fig. 1: An overview of our framework. There are four key compo-
nents: transformer-based temporal embedding module, weighted
attributed graph generator, VGAE-based spatiotemporal em-
bedding module, and SVDD-based outlier detector.
of sensor-sensor influence and combine it with information about the topologi-
cal structure of the graph stream data to generate weighted attributed graphs.
We then input the graph into the variational graph autoencoder (VGAE)-based
spatial embedding module to get the spatial-temporal embeddings. Finally, we
estimate the boundary of the embeddings of normal data using deep learning
and support vector data description (SVDD), and predict the system status by
measuring how far away the embedding sample is from the boundary.
3.2 Embedding temporal patterns of the graph stream data
The temporal patterns of sensors may evolve over time if abnormal system events
occur. We create a temporal embedding module that uses a transformer in a
predictive manner to capture such patterns for accurate anomaly detection. To
illustrate the following calculation process, we use the graph stream data Xt
at the t-th time segment as an example. We ignore the topological structure of
the graph stream data at first during the temporal embedding learning process.
Thus, we collect the time series data in Xt to form a temporal matrix Tt =
[t1, t2, * * * , tLx ], such that Tt ∈ Rn×Lx , where n is the number of sensors and
Lx is the length of the time segment.
The temporal embedding module consists of an encoder and a decoder. For
the encoder part, we input Tt into it for learning enhanced temporal embedding
Ut. Specifically, we first use the multi-head attention mechanism to calculate
the attention matrices between Tt and itself for enhancing the temporal patterns
among different sensors by information sharing. Considering that the calculation
process in each head is the same, we take head1 as an example to illustrate. To
obtain the self-attention matrix Attn(Tt, Tt), we input Tt into head1, which can
be formulated as follows,
Attn(Tt, Tt) = softmax(
(Tt * WQ
t )(Tt * WK
√
t )(cid:62)
Lx
) * (Tt * WV
t )
(1)
........Graph stream dataS1S2....................S1S2SnSn.....................S1S2SnTime-series Data Segments........S1S2...............S1S2SnSn.....................S1S2Sn..........TemporalEmbeddingsSensor/Devicetype informationWeightedattributedgraphgeneratorS1SnS2S1SnS2S1SnS2S1SnS2..............................................................................................................................VGAE based spatiotemporalembeddingmodule.........SVDD normal/anomaly0010.........10normalnormalnormalnormalattackattackSpatio-temporalEmbeddingsWeighted Attributed GraphsTransformerbased temporalembeddingmodule............................................................................U1U2U3UnU1U2U3Unr1r2r3rnr1r2r3rn10normalattack0normalDeep Graph Stream SVDD........S1S2....................S1S2SnSn........................Deep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems
5
t ∈ RLx×d, WQ
t ∈ RLx×d are the weight matrix for
t ∈ RLx×d, and WV
where WK
√
Lx is the scaling factor. Assuming
"key", "query" and "value" embeddings;
that we have h heads, we concatenate the learned attention matrix together
in order to capture the temporal patterns of monitoring data from different
perspectives. The calculation process can be defined as follows:
T(cid:48)
t = Concat(Attn1
t , Attn2
t , * * * , Attnh
t ) * WO
t
(2)
t ∈ Rhd×dmodel is the weight matrix and T(cid:48)
t ∈ Rn×dmodel. After that,
where WO
we input T(cid:48)
t into a fully connected feed-forward network constructed by two
linear layers to obtain the enhanced embedding Ut ∈ Rn×dmodel. The calculation
process can be defined as follows:
Ut = T(cid:48)
t + Relu(T(cid:48)
t * W1
t + b1
t ) * W2
t + b2
t
(3)
t and W2
where W1
tion is Rdmodel×dmodel; b1
information is Rn×dmodel.
t are the weight matrix respectively and their shape informa-
t are the bias item respectively and their shape
t and b2
For the decoder part, we input the learned embedding Ut into a prediction
layer to predict the monitoring value of the future time segment. The prediction
process can be defined as follows:
ˇTt+1 = Ut * Wp
t + bp
t
(4)
where ˇTt+1 ∈ Rn×Lx is the prediction value of the next time segment; Wp
t ∈
Rdmodel×Lx is the weight matrix and bp
t ∈ Rn×Lx is the bias item. During the
optimization process, we minimize the difference between the prediction ˇTt+1
and the real monitoring value Tt+1. The optimization objective can be defined
as follows
Lx(cid:88)
min
||Tt+1 − ˇTt+1||2
(5)
When the model converges, we have preserved temporal patterns of monitoring
data in the temporal embedding Ut.
t=1
3.3 Generating dynamic weighted attributed graphs
In CPS, different sensors connect with each other, which forms a sensor-sensor
graph. As a result, the malfunctioning effects of system abnormal events may
propagate over time following the graph structure. But, the sensor-sensor influ-
ence is not static and may vary as the monitoring data changes are caused by
system anomaly events. To capture such dynamics, we want to build up weighted
attributed graphs using sensor-type information and learned temporal embed-
dings. For simplicity, we take the graph stream data of t-th time segment Xt as
an example to illustrate the following calculation process.
Specifically, the adjacency matrix of Xt is A ∈ Rn×n, which reflects the phys-
ical connectivity between different sensors. A[i, j] = 1 when sensor i and j are
6
Ehtesam et al.
directly connected and A[i, j] = 0 otherwise. From section 3.2, we have obtained
the temporal embedding Ut ∈ Rn×dmodel , each row of which represents the tem-
poral embedding for each sensor. We assume that the sensors belonging to the
same type have similar changing patterns when confronted with system anomaly
events. Thus, we want to capture this characteristic by integrating sensor type
information into the adjacency matrix. We calculate the sensor type embedding
by averaging the temporal embedding of sensors belonging to the type. After
that, we construct a type-type similarity matrix Ct ∈ Rk×k by calculating the
cosine similarity between each pair of sensor types, k being the number of sensor
types. Moreover, we construct the similarity matrix ˇCt ∈ Rn×n by mapping Ct
to each element position of A. For instance, if sensor 1 belongs to type 2 and
sensor 2 belongs to type 3, we update ˇCt[1, 2] with Ct[2, 3]. We then introduce
the dynamic property to the adjacency matrix A through element-wise multi-
plication between A and ˇCt. Each temporal embedding of this time segment is
mapped to the weighted graph as the node attributes according to sensor infor-
mation. The obtained weighted attributed graph ̃Gt contains all spatial-temporal
information of CPS for the t-th time segment. The topological influence of this
graph may change over time.
3.4 Representation learning for weighted attributed graph
To make the outlier detection model easily comprehend the information of Gt,
we develop a representation learning module based on variational graph autoen-
coder (VGAE). For simplicity, we use Gt to illustrate the representation learning
process. For Gt = (V, ̃Et, Ut) , the adjacency matrix is ̃At made up by V and ̃Et,
and the feature matrix is Ut.
Specifically, this module follows the encoder-decoder paradigm. The encoder
includes two Graph Convolutional Network(GCN) layers. The first GCN layer
takes Ut and ̃At as inputs and outputs a lower dimensional feature matrix ˆUt.
The calculation process can be represented as follows:
ˆUt = Relu( ˆD−1/2
t
̃At ˆD−1/2
t Ut ̃W0)
(6)
where ˆDt is the diagonal degree matrix of G(cid:116) and ̃W0 is the weight matrix of the
first GCN layer. The second GCN layer estimates the distribution of the graph
embeddings. Assuming that such embeddings conform to the normal distribution
N (μt, δt), we need to estimate the mean μt and variance δt of the distribution.
Thus, the encoding process of the second GCN layer can be formulated as follows:
μt, log(δ2
t ) = Relu( ˆD−1/2
t At ˆD−1/2
t
ˆUt ̃W1)
(7)
where ̃W1 is the weight matrix of the second GCN layer. Then, we use the
reparameterization technique to mimic the sample operation to obtain the graph
embedding rt, which can be represented as follows:
rt = μt + δt × (cid:15)t
(8)
Deep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems
7
where (cid:15)t is the random variable vector, which is sampled from N (0, I). Here,
N (0, I) represents the high-dimensional standard normal distribution.
The decoder part aims to reconstruct the adjacency matrix of the graph using
rt, which can be defined as follows:
ˆAt = σ(rtrt
(cid:62))
(9)
where ˆAt is the reconstructed adjacency matrix and rtrt
(cid:62)||cos θ.
During the optimization process, we aim to minimize two objectives: 1) the
divergence between the prior embedding distribution N (0, I) and the estimated
embedding distribution N (μt, δt); 2) the difference between the adjacency ma-
trix At and the reconstructed adjacency matrix ̃At; Thus, the optimization
objective function is as follows:
(cid:62) = ||rt|| ||rt
min
T
(cid:88)
t=1
KL[q(rt|Ut, At)||p(rt)]
(cid:125)
(cid:123)(cid:122)
(cid:124)
KL divergance between q(.) and p(.)
+
Loss between At and ˆAt
(cid:122)
(cid:123)
(cid:125)(cid:124)
||At − ˆAt||2
(10)
where KL refers to the Kullback-Leibler divergence; q(.|.) is the estimated em-
bedding distribution and p(.) is the prior embedding distribution. When the
model converges, the graph embedding rt ∈ Rn×demb contains spatiotemporal
patterns of the monitoring data for the t-th time segment.
3.5 One-Class Detection with SVDD
Considering the sparsity issue of labeled anomaly data in CPS, anomaly detec-
tion is done in an unsupervised setting. Inspired by deep SVDD [14], we aim
to learn a hypersphere that encircles most of the normal data, with data sam-
ples located beyond it being anomalous. Due to the complex nonlinear relations
among the monitoring data, we use deep neural networks to approximate this
hypersphere.
Specifically, through the above procedure, we collecte the spatiotemporal em-
bedding of all time segments, denoted by [r1, r2, * * * , rT ]. We input them into
multi-layer neural networks to estimate the non-linear hypersphere. Our goal is
to minimize the volume of this data-enclosing hypersphere. The optimization
objective can be defined as follows:
T
(cid:88)
||φ(rt; W) − c||2
+
min
W
1
n
(cid:124)
t=1
(cid:123)(cid:122)
Average sum of weights, using
squared error, for all normal
training instances (from T segments)
(cid:125)
Regularization item
(cid:125)(cid:124)
(cid:123)
||W||2
F
(cid:122)
λ
2
(11)
where W is the set of weight matrix of each neural network layer; φ(rt; W) maps
rt to the non-linear hidden representation space; c is the predefined hypersphere
8
Ehtesam et al.
center; λ is the weight decay regularizer. The first term of the equation aims to
find the most suitable hypersphere that has the closest distance to the center c.
The second term is to reduce the complexity of W, which avoids overfitting. As
the model converges, we get the network parameter for a trained model, W ∗.
During the testing stage, given the embedding of a test sample ro, we input
it into the well-trained neural networks to get the new representation. Then, we
calculate the anomaly score of the sample based on the distance between it and
the center of the hypersphere. The process can be formulated as follows:
s(ro) = ||φ(ro; W ∗) − c||2
(12)
After that, we compare the score with our predefined threshold to assess the
abnormal status of each time segment in CPS.
4 Experiments
We conduct extensive experiments to validate the efficacy and efficiency of our
framework (DGS-SVDD) and the necessity of each technical component.
4.1 Experimental Settings
Data Description We adopt the SWaT dataset [11], from the Singapore Uni-
versity of Technology and Design in our experiments. This dataset was collected
from a water treatment testbed that contains 51 sensors and actuators. The col-
lection process continued for 11 days. The system's status was normal for the
first 7 days and for the final 4 days, it was attacked by a cyber-attack model.
The statistical information of the SWaT dataset is shown in Table 1. Our goal is
to detect attack anomalies as precisely as feasible. We only use the normal data
to train our model. After the training phase, we validate the capability of our
model by detecting the status of the testing data that contains both normal and
anomalous data.
Table 1: Statistics of SWaT Dataset
Data Type Feature Number Total Items Anomaly Number Normal/Anomaly
Normal
Anomalous
51
51
496800
449919
0
53900
-
7:1
Evaluation Metrics We evaluate the model performance in terms of precision,
recall, area under the receiver operating characteristic curve (ROC/AUC), and
F1-score. We adopt the point-adjust way to calculate these metrics. In partic-
ular, abnormal observations typically occur in succession to generate anomaly
segments and an anomaly alert can be triggered inside any subset of a real win-
dow for anomalies. Therefore, if one of the observations in an actual anomaly
segment is detected as abnormal, we would consider the time points of the entire
segment to have been accurately detected.
Deep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems
9
Baseline Models To make the comparison objective, we input the spatial-
temporal embedding vector rt into baseline models instead of the original data.
There are seven baselines in our work: KNN [12]: calculates the anomaly score of
each sample according to the anomaly situation of its K nearest neighborhoods.
Isolation-Forest[8]: estimates the average path length (anomaly score) from the
root node to the terminating node for isolating a data sample using a collection of
trees.LODA[13]: collects a list of weak anomaly detectors to produce a stronger
one. LODA can process sequential data flow and is robust to missing data.
LOF[2]: measures the anomalous status of each sample based on its local density.
If the density is low, the sample is abnormal; otherwise, it is normal. ABOD[6]: is
an angle-based outlier detector. If a data sample is located in the same direction
of more than K data samples, it is an outlier; otherwise it is normal data. OC-
SVM[9]: finds a hyperplane to divide normal and abnormal data through kernel
functions.. GANomaly[1]: utilizes an encoder-decoder-encoder architecture. It
evaluates the anomaly status of each sample by calculating the difference between
the output embedding of two encoders.
Table 2: Experimental Results on SWaT dataset
Method
OC-SVM
Isolation-Forest
LOF
KNN
ABOD
GANomaly
LODA
DGS-SVDD
Precision (%) Recall (%) F1-score (%) AUC (%)
34.11
35.42
15.81
15.24
14.2
42.12
75.25
94.17
68.23
81.67
93.88
96.77
97.93
67.87
38.13
82.33
45.48
49.42
27.06
26.37
24.81
51.98
50.61
87.85
75
80
63
61
58
68.64
67.1
87.96
4.2 Experimental Results
Overall Performance Table 2 shows experimental results on the SWaT dataset,
with the best scores highlighted in bold. As can be seen, DGS-SVDD outper-
forms other baseline models in the majority of evaluation metrics. Compared
with the second-best baseline, DGS-SVDD improves precision by 19%, F1-score
by 36% and AUC by 8%. This observation validates that DGS-SVDD is effec-
tive to detect anomalies accurately. The underlying driver for the success of our
model is that DGS-SVDD can capture long-delayed temporal patterns and dy-
namic sensor-sensor influences in CPS. Another interesting observation is that
the detection performance of distance-based or angle-based outlier detectors is
poor. A possible reason is that these geometrical measurements are vulnerable
to high-dimensional data samples.
Ablation Study To study the individual contribution of each component of
DGS-SVDD, we perform ablation studies, the findings of which are summarized
in Table 3 where bold indicates the best score. We build four variations of the
10
Ehtesam et al.
DGS-SVDD model: 1) We feed unprocessed raw data into SVDD; 2) We only
capture temporal patterns; 3) We capture the dynamics of sensor-sensor im-
pact and spatial patterns in CPS; 4) We capture spatial-temporal patterns in
CPS but discard the dynamics of sensor-sensor influence. We can find that DGS-
SVDD outperforms its variants by a significant margin. The observation validates
that each technical component of our work is indispensable. Another interest-
ing observation is that removing the temporal embedding module dramatically
degrades the detection performance, rendering the temporal embedding module
the highest significance. Results from the final experiment show that capturing
the dynamics of sensor-sensor influence really boosts model performance.
Table 3: Ablation Study of DGS-SVDD
Transformer-based Temporal
Embedding Module
(cid:55)
(cid:51)
(cid:55)
(cid:51)
(cid:51)
Method
Weighted Attributed
Graph Generator
(cid:55)
(cid:55)
(cid:51)
(cid:55)
(cid:51)
VGAE-based Spatiotemporal
Embedding Module
(cid:55)
(cid:55)
(cid:51)
(cid:51)
(cid:51)
Precision (%) Recall (%) F1-score (%) AUC (%)
4.61
69.98
12.16
87.79
94.17
12.45
64.75
99.99
76.68
82.33
6.74
67.26
21.68
81.86
87.75
18.55
78.14
18.22
82.45
87.96
Robustness Check and Parameter Sensitivity Figure 2 shows the ex-
perimental results for robustness check and parameter sensitivity analysis. To
check the model's robustness, we train DGS-SVDD on different percentages of
the training data, starting from 10% to 100%. We can find that DGS-SVDD
is stable when confronted with different training data from Figure 2(a). But,
compared with other percentages, DGS-SVDD achieves the best performance
when we train it on 50% training data. In addition, we vary the dimension of
the final spatial-temporal embedding in order to check its impacts. From Fig-
ure 2(b) and 2(c), we can find that DGS-SVDD is barely sensitive to the the
sliding window length and dimension of the spatiotemporal embeddings. This
observation validates that DGS-SVDD is robust to the dimension parameters.
A possible reason is that our representation learning module has sufficiently
captured spatial-temporal patterns of monitoring data for anomaly detection.
(a) Varying size of
training data
sliding time window
Fig. 2: Experimental results for robustness check and parameter sensitivity
(b) Varying length of
(c) Varying length of
final embedding
Study of Time Cost We conduct six folds cross-validation to evaluate the time
costs of different models. Figure 3 illustrates the comparison results. We can find
that DGS-SVDD can be trained at a time competitive with simple models like
10255075100(%) of training data used for training0.700.750.800.850.900.951.00Evaluation metric scoresPrecisionRecallF1-scoreAUC10255075100Length of overlapping sliding time window0.700.750.800.850.900.951.00Evaluation metric scoresPrecisionRecallF1-scoreAUC581216Dimension of learnt representation0.700.750.800.850.900.951.00Evaluation metric scoresPrecisionRecallF1-scoreAUCDeep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems
11
(a) Training time cost
(b) Testing time cost
Fig. 3: Comparison of different models in terms of training and testing time cost
OC-SVM or LOF while outperforming them by a huge margin as seen from
Table 2. This shows that DGS-SVDD effectively learns the representation of
each time segment of the graph stream data. Another important observation is
that the testing time of DGS-SVDD is consistent with the simpler baselines.
A potential reason is that the network parameter W ∗, as discussed in section
3.5, completely characterizes our one-class classifier. This allows fast testing by
simply evaluating the network φ with learnt parameters W ∗.
5 Related Work
Anomaly Detection in Cyber-Physical Systems. Numerous existing liter-
ature have studied the exploitation of temporal and spatial relationships in data
streams from CPS to detect anomalous points [5]. For instance, [5,7] adopts
a convolutional layer as the first layer of a Convolutional Neural Network to
obtain correlations of multiple sensors in a sliding time window. Further, the
extracted features are fed to subsequent layers to generate output scores. [7]
proposed a GAN-based framework to capture the spatial-temporal correlation
in multidimensional data. Both generator and discriminator are utilized to detect
anomalies by reconstruction and discrimination errors.
Outlier detection with Deep SVDD. After being introduced in [14], deep
SVDD and its many variants have been used for deep outlier detection. [18] de-
signed deep structure preservation SVDD by integrating deep feature extraction
with the data structure preservation. [20] proposed a Deep SVDD-VAE, where
VAE is used to reconstruct the input sequences while a spherical discriminative
boundary is learned with the latent representations simultaneously, based on
SVDD. Although these models have been successfully applied to detect anoma-
lies in the domain of computer vision, this domain lacks temporal and spatial
dependencies prevalent in graph stream data generated from CPS.
6 Conclusion
We propose DGS-SVDD, a structured anomaly detection framework for cyber-
physical systems using graph stream data. To this end, we integrate spatiotem-
12
Ehtesam et al.
poral patterns, modeling dynamic characteristics, deep representation learning,
and one-class detection with SVDD. Transformer-based encoder-decoder archi-
tecture is used to preserve the temporal dependencies within a time segment.
The temporal embedding and the predefined connectivity of the CPS are then
used to generate weighted attributed graphs from which the fused spatiotempo-
ral embedding is learned by a spatial embedding module. A deep neural network,
integrated with one-class SVDD is then used to group the normal data points
in a hypersphere from the learnt representations. Finally, we conduct extensive
experiments on the SWaT dataset to illustrate the superiority of our method as
it delivers 35.87% and 19.32% improvement in F1-score and AUC respectively.
For future work, we wish to integrate a connectivity learning policy into the
transformer so that it just does not learn the temporal representation, rather
it also models the dynamic influence among sensors. The code can be publicly
accessed at https://github.com/ehtesam3154/dgs svdd.
References
1. Akcay, S., Atapour-Abarghouei, A., Breckon, T.P.: Ganomaly: Semi-supervised
anomaly detection via adversarial training. In: Asian conference on computer vi-
sion. pp. 622–637. Springer (2018)
2. Breunig, M.M., Kriegel, H.P., Ng, R.T., Sander, J.: Lof: identifying density-based
local outliers. In: Proceedings of the 2000 ACM SIGMOD international conference
on Management of data. pp. 93–104 (2000)
3. Jenni Bergal: Florida hack exposes danger
to water
systems
(2021),
https://www.pewtrusts.org/en/research-and-analysis/blogs/stateline/
2021/03/10/florida-hack-exposes-danger-to-water-systems
4. Kipf, T.N., Welling, M.: Variational graph auto-encoders. arXiv preprint
arXiv:1611.07308 (2016)
5. Kravchik, M., Shabtai, A.: Detecting cyber attacks in industrial control systems
using convolutional neural networks. In: Proceedings of the 2018 workshop on
cyber-physical systems security and privacy. pp. 72–83 (2018)
6. Kriegel, H.P., Schubert, M., Zimek, A.: Angle-based outlier detection in high-
dimensional data. In: Proceedings of the 14th ACM SIGKDD international con-
ference on Knowledge discovery and data mining. pp. 444–452 (2008)
7. Li, D., Chen, D., Jin, B., Shi, L., Goh, J., Ng, S.K.: Mad-gan: Multivariate anomaly
detection for time series data with generative adversarial networks. In: Interna-
tional conference on artificial neural networks. pp. 703–716. Springer (2019)
8. Liu, F.T., Ting, K.M., Zhou, Z.H.: Isolation forest. In: 2008 eighth ieee interna-
tional conference on data mining. pp. 413–422. IEEE (2008)
9. Manevitz, L.M., Yousef, M.: One-class svms for document classification. Journal
of machine Learning research 2(Dec), 139–154 (2001)
10. Mart ́ı, L., Sanchez-Pi, N., Molina, J.M., Garcia, A.C.B.: Anomaly detection based
on sensor data in petroleum industry applications. Sensors 15(2), 2774–2797 (2015)
11. Mathur, A.P., Tippenhauer, N.O.: Swat: A water treatment testbed for research
and training on ics security. In: 2016 international workshop on cyber-physical
systems for smart water networks (CySWater). pp. 31–36. IEEE (2016)
12. Peterson, L.E.: K-nearest neighbor. Scholarpedia 4(2), 1883 (2009)
Deep Graph Stream SVDD: Anomaly Detection in Cyber-Physical Systems
13
13. Pevn`y, T.: Loda: Lightweight on-line detector of anomalies. Machine Learning
102(2), 275–304 (2016)
14. Ruff, L., Vandermeulen, R., Goernitz, N., Deecke, L., Siddiqui, S.A., Binder, A.,
M ̈uller, E., Kloft, M.: Deep one-class classification. In: International conference on
machine learning. pp. 4393–4402. PMLR (2018)
15. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser,
L., Polosukhin, I.: Attention is all you need. CoRR abs/1706.03762 (2017), http:
//arxiv.org/abs/1706.03762
16. Wang, D., Chen, Z., Ni, J., Tong, L., Wang, Z., Fu, Y., Chen, H.: Hierarchical graph
neural networks for causal discovery and root cause localization. arXiv preprint
arXiv:2302.01987 (2023)
17. Wang, D., Wang, P., Zhou, J., Sun, L., Du, B., Fu, Y.: Defending water treatment
networks: Exploiting spatio-temporal effects for cyber attack detection. In: 2020
IEEE International Conference on Data Mining (ICDM). pp. 32–41. IEEE (2020)
18. Zhang, Z., Deng, X.: Anomaly detection using improved deep svdd model with
data structure preservation. Pattern Recognition Letters 148, 1–6 (2021)
19. Zhou, X., Liang, W., Shimizu, S., Ma, J., Jin, Q.: Siamese neural network based
few-shot learning for anomaly detection in industrial cyber-physical systems. IEEE
Transactions on Industrial Informatics 17(8), 5790–5798 (2020)
20. Zhou, Y., Liang, X., Zhang, W., Zhang, L., Song, X.: Vae-based deep svdd for
anomaly detection. Neurocomputing 453, 131–140 (2021)
|
|
http://arxiv.org/abs/2302.12910v1 | 2023-02-24T21:56:03 | 2023-02-24T21:56:03 | Imputing Knowledge Tracing Data with Subject-Based Training via LSTM
Variational Autoencoders Frameworks | The issue of missing data poses a great challenge on boosting performance and
application of deep learning models in the {\em Knowledge Tracing} (KT)
problem. However, there has been the lack of understanding on the issue in the
literature. %are not sufficient studies tackling this problem. In this work, to
address this challenge, we adopt a subject-based training method to split and
impute data by student IDs instead of row number splitting which we call
non-subject based training. The benefit of subject-based training can retain
the complete sequence for each student and hence achieve efficient training.
Further, we leverage two existing deep generative frameworks, namely
variational Autoencoders (VAE) and Longitudinal Variational Autoencoders (LVAE)
frameworks and build LSTM kernels into them to form LSTM-VAE and LSTM LVAE
(noted as VAE and LVAE for simplicity) models to generate quality data. In
LVAE, a Gaussian Process (GP) model is trained to disentangle the correlation
between the subject (i.e., student) descriptor information (e.g., age, gender)
and the latent space. The paper finally compare the model performance between
training the original data and training the data imputed with generated data
from non-subject based model VAE-NS and subject-based training models (i.e.,
VAE and LVAE). We demonstrate that the generated data from LSTM-VAE and
LSTM-LVAE can boost the original model performance by about 50%. Moreover, the
original model just needs 10% more student data to surpass the original
performance if the prediction model is small and 50\% more data if the
prediction model is large with our proposed frameworks. | [
"Jia Tracy Shen",
"Dongwon Lee"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12910v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12910v1",
"@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"
] | Imputing Knowledge Tracing Data with Subject-Based Training via LSTM
Variational Autoencoders Frameworks
Jia Tracy Shen
Dongwon Lee
The Pennsylvania State University, USA
{jqs5443, dongwon}@psu.edu
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
0
1
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
The issue of missing data poses a great challenge on boost-
ing performance and application of deep learning models in
the Knowledge Tracing (KT) problem. However, there has
been the lack of understanding on the issue in the litera-
ture. In this work, to address this challenge, we adopt a
subject-based training method to split and impute data by stu-
dent IDs instead of row number splitting which we call non-
subject based training. The benefit of subject-based training
can retain the complete sequence for each student and hence
achieve efficient training. Further, we leverage two exist-
ing deep generative frameworks, namely variational Autoen-
coders (VAE) and Longitudinal Variational Autoencoders
(LVAE) frameworks and build LSTM kernels into them to
form LSTM-VAE and LSTM LVAE (noted as VAE and LVAE
for simplicity) models to generate quality data. In LVAE, a
Gaussian Process (GP) model is trained to disentangle the
correlation between the subject (i.e., student) descriptor in-
formation (e.g., age, gender) and the latent space. The paper
finally compare the model performance between training the
original data and training the data imputed with generated
data from non-subject based model VAE-NS and subject-
based training models (i.e., VAE and LVAE). We demon-
strate that the generated data from LSTM-VAE and LSTM-
LVAE can boost the original model performance by about
50%. Moreover, the original model just needs 10% more stu-
dent data to surpass the original performance if the prediction
model is small and 50% more data if the prediction model is
large with our proposed frameworks.
1
Introduction
Knowledge tracing (KT) as a student modeling technique
has been widely used to predict and trace students' knowl-
edge state during their learning processes. In recent years,
with the huge success that deep learning has brought to the
field, there are many KT algorithms that can predict indi-
viduals' knowledge state to a decent extent. However, the
sparseness of students' exercise data represented by miss-
ing values still limits the models' performance and applica-
tion (Swamy et al. 2018). About half of the existing pub-
lications use public data sets (Dai et al. 2021), which can
not be available for huge amount due to administration cost.
Copyright © 2023, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.
Researchers could opt for other private data sets that how-
ever may not even have the sizable volume as the public data
sets. Besides, many deep learning algorithms including the
state-of-art (SOTA) KT algorithms need huge and diverse
amount of training data to obtain decent performances. On
the other hand, it is unavoidable to see the missing values
in KT data because of two reasons: (i) data is missed com-
pletely at random (MCAR) where the probability of missing
data is independent on its own value and on other observ-
able values (Roderick J. A. Little 2002). For example, due to
COVID, we have many students missing exams; (ii) the data
is missed not at random (MNAR), which indicates the reason
for a missing value can depend on other variables but also on
the value that is missing. For example, if a student performs
poorly on the English subject and often miss exams in other
subjects, his missed records in English quizzes can be at-
tributed to other known reasons. Moreover, KT data is a type
of longitudinal data, all collected repeatedly over time for
each subject (ie., student). Such data contains both depen-
dent and independent variables. For example, the dependent
variables in KT data can comprise time-varying measure-
ments per subject (e.g., response correctness, time taken per
question), whereas independent variables are time-invariant
subject descriptors (e.g., grade, gender, gifted or not) (see
the illustration in Figure 1). Analyzing such data is challeng-
ing as it often includes high-dimensional time [in]variant
variables with missing values. Despite that missing data in
KT field is ubiquitous and poses challenges on achieving
better model results, there are very few studies researching
on effective approaches to tackle the missing data issue in
KT field. Our work is one of the few studies to address such
challenge.
To that end, we suppose a deep generative model such
as Variational Autoencoders (VAE) (Kingma and Welling
2019) could effectively generate data for the missing val-
ues because of its superiority over other generative models
(e.g., Generative Adversarial Networks) in time series data
generation (Le, Wang, and Lee 2020; F ̈ahrmann et al. 2022).
Furthermore, given the challenge arisen from the longitudi-
nal KT data, we make two hypotheses: (i) a training style
that can reflect the subject longitudinal nature could entail
more effective training; (ii) the information from subject de-
scriptors could potentially represent the latent space better
and help improve the quality on the data generation. To vali-
form a LSTM-LVAE framework to showcase the superi-
ority of training additional subject descriptors for better
latent space representation
• We demonstrate the robustness of only using a fraction
of the generated data to boost the original model perfor-
mance
2 Method
We propose two deep generative frameworks: LSTM-VAE
and LSTM-LVAE. The both frameworks use subject-based
training. We explain the details as follows.
2.1 Problem setting
According to Ramchandran et al. 2021, let D be the dimen-
sionality of the observed data, P be the number of unique
students, np be the total number of longitudinal samples
from student p, and N = (cid:80)P
p=1 np be the total number
of samples. Therefore, the longitudinal samples for student
p are denoted as Yp = [yp
]T , where each sample
1, ..., yp
np
yp
t ∈ Y and Y = RD. The subject descriptors for students
are represented as Xp = [xp
1, ..., xp
t ∈ X and
np
X = RQ, Q be the number of descriptors. The latent space
is then denoted as Z = RL and a latent embedding for all
N samples as Z = [z1, ..., zN ]T ∈ RN ×L with L being
the number of latent dimensions. To generate data, a joint
generative model is then parameterized by w = {ψ, θ} as
pw(y, z) = pψ(y|z)pθ(z). Therefore, if the latent variable z
is known, it will be easy to infer y and hence generate the
desired data.
]T , where xp
2.2 VAE and LVAE
To infer the latent variable z given y, the posterior distri-
bution is pw(z|y) = pψ(y|z)pθ(z)/pw(y) and is generally
intractable due to the marginalization over the latent space
pw(y) = (cid:82) pψ(y|z)pθ(z)dz. Therefore, Variational Auto-
Encoder (Kingma and Welling 2019) introduced the approx-
imated version posterior, noted as qφ(z|y) instead of the true
posterior pw(z|y) and fit the approximate inference model
by maximizing the Evidence Lower Bound (ELBO) of the
marginal log-likelihood w.r.t. φ:
log pw(Y ) ≥ L(φ, ψ, θ; Y )
(cid:44) Eqφ[log pψ(Y |Z)] − DKL(qφ(Z|Y )||pθ(Z)) → max
φ
,
where Eqφ[log pψ(Y |Z)] is a reconstruction error, mea-
suring the difference between the input and the encoded-
decoded data. and DKL denotes the Kullback-Leibler
Divergence (KLD), measuring the divergence between
qφ(Z|Y ) and pθ(Z). In practice, we minimize the neg-
ative ELBO: DKL(qφ(Z|Y )||pθ(Z) − Eqφ[log pψ(Y |Z)],
where all the parameters are learned simultaneously to-
gether: L(φ, ψ, θ; Y ) → minφ,ψ,θ.
When facing the longitudinal data, Ramchandran et al.
hypothesize z has relationship with both Y and X and for-
mulate the generative model as
pw(Y |X) =
(cid:90)
Z
pψ(Y |Z, X)pθ(Z|X)dZ
Figure 1: An Illustration of the Longitudinal (student) Data
in KT Field. 'p': student p. 'P': total # of students.
date hypothesis (i), we develop a subject-based training style
where we split and impute data by student IDs to reflect
the longitudinal nature of the subjects. The benefit of do-
ing so is to maintain the complete sequence for each student
whereas splitting by row number could separate the individ-
ual sequence and entail inefficient training. Thus, applying
subject-based training on top of VAE framework could po-
tentially address the challenge. To validate hypothesis (ii),
we leverage a module from the existing Longitudinal VAE
(LVAE) (Ramchandran et al. 2021) framework called addi-
tive multi-output Gaussian Process (GP) prior that can ex-
trapolate the correlation between time-invariant subject de-
scriptors and the latent space to enhance the latent variable
learning. Given the longitudinal nature of the LVAE frame-
work, a subject-based training can be naturally applied to
LVAE to boost data generation quality. Furthermore, we
build LSTM kernels to both VAE and LVAE frameworks
because LSTMs are good at extrapolating the temporal re-
lationship from multi-variate time series data (Pearlmutter
1989; Giles, Kuhn, and Williams 1994). With the gener-
ated data from the proposed frameworks, we will be able to
impute them back for retraining and evaluate the effective-
ness of the imputed data on boosting the original model per-
formance. Besides, we are also interested to discover how
robust our generated data can be on boosting the original
model performance, e.g., by only applying a fraction of the
generated data.
Thus, this work attempts to make the following contribu-
tions:
• Overcoming the issue of the missing KT data, we con-
duct subject-based training on KT data via LSTM-VAE
framework
• Leveraging the additive GP prior module from LVAE, we
Figure 2: Overview of the methodology proposed in this work.
(cid:89)
(cid:90)
=
Z
pψ(yn|zn)pθ(Z|X)dZ,
where pψ(yn|zn) is normally distributed probabilistic de-
coder and pθ(Z|X) is defined by the multi-output additive
GP prior that regulates the joint structure of Z with de-
scriptors X. The Additive GP is a Gaussian process prior
as f (x) ∼ GP (μ(x), K(x, x(cid:48)|θ)), where μ(x) ∈ RL is the
mean (assumed as 0) and K(x, x(cid:48)|θ) is a matrix-valued pos-
itive definite cross-covariance function (CCF). Based on the
practice of Cheng et al., LVAE constructs the additive GP
components with squared exponential CFs (from continuous
variables), categorical CFs (from categorical covariates),the
interaction CFs (the product of the categorical and squared
exponential CFs) and the product of the squared exponential
CFs and the binary CFs. Finally, the ELBO function changes
to the following after factoring the descriptors X:
log pw(Y |X) ≥ L(φ, ψ, θ; Y, X)
(cid:44) Eqφ[log pψ(Y |Z)] − DKL(qφ(Z|Y )||pθ(Z|X) → max
.
φ
LVAE differentiates from VAE in that it hypothesizes there
exists a relationship between X and the latent space Z and
uses an additive multi-output Gaussian Prior to extract that
relationship.
2.3 Generative Frameworks
Based on above solutions, two generative frameworks are
developed (see in Figure 2). It has 4 phases: (i) input phase
that pre-processes data; (ii) generative phase where data gets
generated via the generative model framework; (iii) predic-
tion phase where we predict target variable for the generated
data; (iv) retraining phase, where we combine the original
data and generated data to retrain for donwstream prediction
task.
From the figure, after input phase (i), we see that the data
gets separated into two sets: (a) time-varying data (noted
as Y = {y1, ..., yn}); (b) time-invariant subject descriptors
(noted as X = {x1, ..., xn}). The time-varying data yn goes
through a min-max scaler, a typical time series data normal-
ization method (Yu et al. 2021), and enters the LSTM en-
coder to generate μ and log σz for the latent distribution
Zt. The time-invariant subject descriptors Xn on the other
hand are only fed into the Additive GP prior module to train
for the approximated GP prior with its output merging into
the latent space Zt. Next, the decoder samples on the la-
tent distribution and reconstructs data ˆYn, namely encoded-
decoded data, based on the latent features from Zt. Here, we
name the generative framework that only includes the en-
coder and decoder as LSTM-VAE and the framework that
includes encoder, decoder and the additive GP prior module
as LSTM-LVAE. We omit LSTM prefix for simplicity. After
that, we compare Yn to ˆYn for evaluation via ELBO. VAE
assigns the equal weight for both reconstruction and KLD
errors whereas LVAE assigns a weight to KLD to regularize
further. Once we have good generation quality, we generate
data on the missing data which has all the subject descriptor
information but missing on all the time-varying features.
Before entering phase (iii), we conduct initial prediction
on the original data via models that work well with multi-
Figure 3: An Illustration of Split by IDs vs. Row Number
variate time series data: LSTM, adaRNN and Transformer.
Similar to LSTM, adaRNN (i.e., adaptive RNN) (Du et al.
2021) is a recurrent neural network but based on the Gated
Recurrent Unit that comprises two gates (i.e., reset gate and
update gate). It usually trains faster than LSTM and easy to
modify and works better if the sequence is not too long. Be-
cause some KT data could present non-sequential character-
istics, we include the adapted version of the original Trans-
former model (Vaswani et al. 2017), whose attention mecha-
nism and positional embedding are great for non-sequential
data. To evaluate these models, we use Root Mean Square
Error (RMSE) as our target variable is continuous (i.e., score
rate, the possible score obtained per question divides the to-
tal scores obtained per student). After the initial round of
prediction is performed, we conduct phase (iii) by selecting
the best predicting model to predict the target variable for
the generated data from phase (ii). In phase (iv), we impute
the fraction of 10/20/30/50/80/100% of the generated data
(with target variable) back to the original data and retrain
for the downstream predictive task.
2.4 Subject-based Training
Besides the generative frameworks, this work also takes a
new training strategy, that is, subject-based training. We re-
fer subject-based training to a style where data are split and
imputed back by student IDs instead of row number. We call
the training using row-number splitting as non-subject based
training. For example, in subject-based setting, 70% of stu-
dent IDs are extracted as training data and 10% student IDs
are extracted as validation data whereas in non-subject based
setting, 70% of total rows are extracted as training data and
10% total rows are extracted as validation data) (see the il-
lustration in Figure 3). We see the split points by IDs are
not the same as splitting by row number. It indicates there is
chance that the sequence of certain students will be cut into
two pieces, leaving them into two different sets (e.g, val and
test). If we split the data by student IDs, we can impute the
generated data back to the original data via IDs and keep the
learning sequence relevant and complete for each student. If
we opt for row-number splitting, the student's original se-
quence will be interfered and not be trained appropriately.
Figure 4: An illustration of KT data sequence aligning pro-
cess and 3 Padding Strategy.
knowledge tracing data by utilizing VAE and LVAE; (b) pre-
dict the target variable for the generated data using the best
model obtained from the KT prediction task; (c) merge the
generated data with the original data to retrain for model per-
formance. The second experiment is to validate the robust-
ness of imputed data on boosting the original model perfor-
mance. More specifically, we add a fraction of the generated
data in the cadence of 10%, 20%, 30%, 50%, 80%, 100%
during the retraining phase to examine the boosting effect.
3.1 Data sets
To achieve above, we need to apply our model onto the data
sets that have subject descriptors so that we can use LSTM-
LVAE model to generate missing data. Unfortunately, the
public data sets (e.g., ASSISTment datasets, Junyi, STAT-
ICS, EdNet, etc) in KT field do not contain subject descrip-
tor information such as the student's grade level, gifted or
not. This is also why the renowned deep learning models
such as DKT, DKVMN, NPA, SAINTS (Minn et al. 2018;
Zhang et al. 2017; Pandey and Karypis 2019; Shin et al.
2021) are not included in the chapter because most of these
models are generated for single variable KT data or take data
feature as hyper-parameters. Thus, we use the two private
multivariate KT data sets from K12.com platform (an online
K-Grade 12 education platform). They are : (1) Grade 10 ge-
ometry course (noted as Geom) quiz answering data set with
average sequence length of 150 time steps; (2) Grade 11 al-
gebra II (noted as Alg2) quiz answering data set with aver-
age sequence length of 150 time steps. Each data set contains
11 temporal features (i.e. sequence number, assessment du-
ration, attempts per question, total attempts, question diffi-
culty, item difficulty, standard difficulty, question reference,
item reference, standard id, question type) from July 2017
to June 2019 and 7 subject descriptors that define the stu-
dent profiles (i.e., school ID, special ED, student id, free
reduced lunch, gifted talented, grade level, score rate). The
Geom data set contains 3,265 total students with 412,397
observed instances whereas the Alg2 data has 2,110 total
students with 277,548 observed instances.
3 Experiments
In this section, we carry out two major experiments. The first
experiment is to generate the data and impute back to the
original data for retraining. It has three steps: (a) generate
Identify Missing Values
3.2
In practice, it is hard to identify the missing steps each stu-
dent has because their learning experience varies. Thus, we
develop a regime where we first find all the quiz times of
a school where the student is located and then fill up the
missing times by comparing to the school's full quiz tak-
ing schedule. For example, if school A has 100 quiz times
but student A only has 60 records, we fill out the remain-
ing 40 quiz time steps based on the event time variable. This
approach is a bit rigorous, assuming all the students are re-
quired to test for the same number of quizzes if they are in
the same school and skipping any quiz is considered as a
missing step. In reality, there might be scenarios where stu-
dents are allowed to skip, which is complex to study and
hence we use this approach as it is straightforward. With
that, we are able to retrieve the missing time steps before
and after the current temporal steps for all the students. As
the students are known, this missing data has all the subject
descriptor information.
3.3 Data Processing
To conduct the training for generation, we split the data by
0.5/0.1/0.2/0.2 for train/val/test/generate and 0.7/0.1/0.2 for
train/val/test during downstream prediction (see in Table 1).
Note that the generation set with a ratio of 0.2 is used to
evaluate the quality of generation whereas the generated set
we use to impute back to the original data is generated from
missing data. Based on the above missing data identification
regime, we are able to identify 3,233 out of 3,265 total stu-
dents who have a total of 799,408 missed instances from the
Geom course and 2,057 out of 2,110 students who have a
total of 516,884 missed instances from the Alg2 course (see
in Table 1). Because all the ratios are applied to both sub-
ject and non-subject based training, the generated data from
missing values will be imputed back to the original data via
IDs in the subject-based training and via row number in the
non-subject based training in the splits of train/val/test. Both
training styles align data to a fixed sequence length which is
due to the model input requirement of 3D dimensions (i.e.,
batch size * sequence length * number of dimensions). This
also aligns with the typical data processing technique for
KT model training (Pardos and Heffernan 2011; Lee et al.
2019; Pandey and Karypis 2019). If the actual student learn-
ing sequence is longer than the fixed sequence length, we
cut the part where it exceeds. If the sequence is shorter than
the fixed sequence, we pad it (see in Figure 4). We use three
padding strategies to find an optimal model performance: (a)
zero paddding; (b) ffill; (c) bfill. Ffill pads forward with the
last value 'v' whereas bfill pads backward with the first value
'w' (see in Figure 4). Bfill in practice assumes that a student
gets the same quiz result in his missed quiz as his first quiz
result whereas ffill assumes that a student gets the same quiz
result in his missed quiz as his last quiz result. Zero-padding
just simply assumes that a student gets zero in his missing
quiz.
3.4 Generation and Imputation
We train three generative models: VAE-NS (non-subject),
VAE (subject-based) and LVAE (subject-based) to generate
missing data. Since LVAE is only possible to train if we have
descriptor information, which relies on student ID informa-
tion, we do not apply non-subject training for LVAE. After
data is generated for all the missing data, we impute back the
Table 1: Data Statistics for Geom and Alg2 Data. * is Down-
stream Task Split
Split Part (Ratio)
Train (0.5)
Validate (0.1)
Test (0.2)
Generation (0.2)
Data Total
Train* (0.7)
Validate* (0.1)
Test* (0.2)
Data Total*
Missing Train (0.7)
Missing Validate (0.1)
Missing Test (0.2)
Missing Data Total
Geometry (Geom)
Algebra II (Alg2)
# Student
1,633
326
653
653
3,265
2,286
326
653
3,265
2,256
322
645
3,223
# of Rows
215,632
42,259
82,707
71,799
412,397
287,431
42,259
71,799
412,397
559,586
79,941
159,882
799,408
# Student
1,055
211
422
422
2,110
1,477
211
422
2,110
1,440
206
411
2,057
# of Rows
137,409
30,652
60,709
48,778
277,548
186,187
30,652
60,709
277,548
361,819
51,688
103,377
516,884
Figure 5: An Illustration of the Data Imputation Process.
generated data from VAE-NS by the row-number splits and
impute the generated data from VAE and LVAE by ID splits
(see in Figure 5). We do not only impute back the generated
data to the train set because we believe the data augmenta-
tion on all the train, val and test sets will make the model
performance harder to improve than we only augment the
train set but leave the test set the same.
3.5 Downstream Prediction
There are two rounds of downstream predictions. The ini-
tial round is conducted on the original data using the three
padding strategies to find the best performance model so that
we can use it to predict the target variable for the generate
data. The second round is a retraining round where we im-
pute back the generated data using the best padding strat-
egy. The second round has two parts: (i) we conduct the re-
training on the combined data that contains all the generated
data and the original data by IDs (for VAE, LVAE) and by
row number (for VAE-NS); (ii) we conduct retraining on the
combined data with a fraction (i.e., 10/20/30/50/80/100%)
of the generated data and the original data only by IDs (for
VAE, LVAE) because VAE-NS does not show salient im-
provement with the data it generates.
Table 2: Average RMSE by Padding Strategy, Models and
Data sets. The boldface represents the best performance.
Avg. RMSE
Bfill
Ffill
Zero
Geometry (Geom)
Algebra II (Alg2)
adaRNN
0.50734
0.51946
0.48160
LSTM Transformer
0.47665
0.47664
0.47702
0.48613
0.49713
0.40208
adaRNN
0.52034
0.51895
0.48860
LSTM Transformer
0.48967
0.48995
0.49173
0.49463
0.49632
0.45138
Table 3: Average RMSE by Generative Models for Predic-
tion Tasks. The bold face represents the best performance.
Avg. RMSE
Original
VAE-NS
VAE
LVAE
Geometry (Geom)
Algebra II (Alg2)
adaRNN
0.48160
0.58251
0.26570
0.26226
LSTM Transformer
0.47664
0.48030
0.26559
0.26185
0.40208
0.37090
0.32902
0.28913
adaRNN
0.48860
0.49388
0.30304
0.29470
LSTM Transformer
0.49173
0.48989
0.27293
0.27326
0.45138
0.34071
0.35260
0.35911
4 Results
4.1 Evaluating the Quality of the Generated Data
We exhaustively train three generative models (i.e., VAE-
NS, VAE and LVAE) until its loss stops improving with dif-
ferent sets of hyper-parameter tuning to reach the best re-
sult. We observe that VAE-NS model is hard to converge
and stops early with final loss of around 13.4349 for Alg2
data set and 0.6282 for geom data set. VAE is able to de-
crease loss to 0.2652 for Alg2 data set and 0.2661 for geom
data set. LVAE however can decrease loss to 0.2291 for alg2
data and 0.1863 for geom data set with the latent dimension
as 64 and hidden dimension as 128. Figure 6 selects the 'as-
sessment duration' feature to compare the data distribution
between original data and generated data by VAE-NS, VAE
and LVAE. We can tell that the Geom generated data for
the feature 'assessment duration' from VAE-NS sways the
farthest from the original data whereas the generated data
from VAE and LVAE are closer to the original data distribu-
tion with LVAE slightly better. The same case applies to the
Alg2 data. The plot also shows that generally both VAE and
LVAE can reconstruct data closely to the original data dis-
tribution, indicating that we are safe to use such generated
data for downstream prediction tasks.
4.2 Evaluating the Effectiveness of the Imputed
Data
Before we impute the generated data, we conduct the first
round of downstream prediction via three models (i.e.,
LSTM, adaRNN and Transformer) by three padding strate-
gies (i.e., bfill, ffill and zero padding) to select the best
model performance as the baseline original data model per-
formance. We run 10 random seeds for each model, padding
strategy and data set. Table 2 shows the detailed average
RMSE for each model by padding schemes. We see that
adaRNN and Transformer model obtain the best perfor-
mances when padded with zero whereas LSTM model ob-
tains its best performance via ffill padding for Geom data
and bfill for Alg2 data. We then use the best performing
model to predict target variable for the generated data and
impute back the generated data (with the target variable) to
the original data set for retraining.
We observe the retrained model performance surpasses
(a) Geom Data Set
(b) Alg2 Data Set
Figure 6: 'Assessment Duration' Feature Distribution Com-
parison Between Original Data and Generated Data
the original model performance by big margins (see in Table
3). From the table on column 1 under Geom data, we observe
the retrained adaRNN model performance using the gener-
ated data from VAE is 0.26570, almost about 50% lower
than the original model performance of 0.48160 in RMSE.
Oppositely, the retrained model performance using the gen-
erated data from VAE-NS has RMSE of 0.58251, which is
higher than the original model RMSE. This might indicate
the generated data from non-subject based training perturbs
the original data and creates negative gain. Further, we no-
tice the model performance of using generated data from
LVAE is even slightly better than VAE with a lower average
RMSE of 0.26226. This phenomenon is present across the
three models for Geom data. For Alg2 data, we also observe
superior performance from both VAE and LVAE. However,
the retrained model using generated data from VAE seems
to perform slightly better than the one with LVAE generated
data. Figure 7 visually presents the sharp drop of the average
(a) Geom Data Set
(a) Geom Data Set
(b) Alg2 Data Set
(b) Alg2 Data Set
Figure 7: Average Retraining RMSE Using Generated Data
From Different Models. The error bar shows the min. and
max. of the 10 random seeds.
Figure 8: Average RMSE by % of Imputed Data vs. Original
Data.
RMSE after imputing the generated data from both VAE and
LVAE models.
4.3 Evaluating the Robustness of the Imputed
Data
Once we learn that imputed data can boost original model
performance to a significant extent, we further experiment
to validate the robustness of the imputed data. More specif-
ically, we impute the number of students in the fraction
of 10%, 20%, 30%, 50%, 80%, 100% back to their origi-
nal train/val/test sets. The choice of percentage increments
in number of students are arbitrary but all the students are
linked back via their IDs to the original train/val/test sets.
It is designed this way so that it is harder for the retrained
model to outperform the original model as the number of
students in the train/val/test set are still the same but with
longer sequences. Figure 8 showcases the effectiveness of
adding different fractions of students to boost the original
model performance. For LSTM and adaRNN model, we ob-
serve that the model performance starts to boost after imput-
ing only 10% of student IDs back. As the percentage gets
higher, we see higher boosting. For Transformer model, it
starts to boost after imputing 50% of student IDs back. This
confirms a known fact that large models such as Transformer
model needs more data to boost its performance. In general,
imputing data based on the subjects can boost the model to
a great extent.
5 Summary
In conclusion, to augment missing data in KT field, we first
identified missing values by school testing schedules and
then we train two deep generative models (i.e., VAE and
LVAE) to generate quality data in the subject-based setting
for imputation. With the imputed data, we are able to boost
the original model by almost 50% in average RMSE. In ad-
dition, we validate the robustness of the imputed data and
observe that only 10% of students data are needed to boost
the original model performance for small to medium models
such as LSTM and adaRNN and 50% of students data are
needed to boost large models such as Transformer. In future,
we plan to test the effectiveness of training using the varying
length, instead of fixed length, on the model performance.
6 Acknowledgments
The work was mainly supported by NSF awards (1940076).
Meanwhile, K12/Stride does not release student-level data
to external research, but does use such data to continually
improve the learning experience for students served in K12-
powered schools. The authors are grateful to K12 for al-
lowing its internal researchers to align research questions of
general academic interest and publish some of those learn-
ings.
References
Cheng, L.; Ramchandran, S.; Vatanen, T.; Lietz ́en, N.; La-
hesmaa, R.; Vehtari, A.; and L ̈ahdesm ̈aki, H. 2019. An ad-
ditive Gaussian process regression model for interpretable
non-parametric analysis of longitudinal data. Nature Com-
munications.
Dai, M.; Hung, J.-L.; Du, X.; Tang, H.; and Li, H. 2021.
Knowledge Tracing: A view of Available Technologies.
Journal of Educational Technology Development and Ex-
change, 14(2).
Yu, M.; Xu, F.; Hu, W.; Sun, J.; and Cervone, G. 2021. Using
Long Short-Term Memory (LSTM) and Internet of Things
(IoT) for localized surface temperature forecasting in an ur-
ban environment.
Zhang, J.; Shi, X.; King, I.; and Yeung, D.-Y. 2017. Dy-
namic Key-Value Memory Networks for Knowledge Trac-
ing. In Int'l World Wide Web Conference Committee. ISBN
9781450349130.
An introduc-
ISBN
Du, Y.; Wang, J.; Feng, W.; Pan, S.; Qin, T.; Xu, R.; and
Wang, C. 2021. AdaRNN: Adaptive Learning and Forecast-
In Proc. Int' Conf. Information and
ing for Time Series.
Knowledge Management. ISBN 9781450384469.
F ̈ahrmann, D.; Damer, N.; Kirchbuchner, F.; Kuijper, A.;
Choras, M.; and Pawlicki, M. 2022. Lightweight Long
Short-Term Memory Variational Auto-Encoder for Multi-
variate Time Series Anomaly Detection in Industrial Control
Systems. Sensors.
Giles, C. L.; Kuhn, G. M.; and Williams, R. J. 1994. Neural
Networks: Theory and Applications. In IEEE Transactions
on Neural Networks, volume 45, 89–90. IEEE.
Kingma, D. P.; and Welling, M. 2019.
tion to variational autoencoders, volume 12.
9781680835502.
Le, T.; Wang, S.; and Lee, D. 2020. GRACE: Gener-
ating Concise and Informative Contrastive Sample to Ex-
plain Neural Network Model's Prediction. In KDD. ISBN
9781450379984.
Lee, Y.; Choi, Y.; Cho, J.; Fabbri, A. R.; Loh, H.; Hwang,
C.; Lee, Y.; Kim, S.-W.; and Radev, D. 2019. Creating A
Neural Pedagogical Agent by Jointly Learning to Review
and Assess. In arXiv preprint arXiv:1906.10910v2.
Minn, S.; Yu, Y.; Desmarais, M. C.; Zhu, F.; and Vie, A.
2018. Deep Knowledge Tracing and Dynamic Student Clas-
In IEEE International
sification for Knowledge Tracing.
Conference on Data Mining.
Pandey, S.; and Karypis, G. 2019. A Self-Attentive model
for Knowledge Tracing. In Proc. Int'l Conf. on Educational
Data Mining.
Pardos, Z. A.; and Heffernan, N. T. 2011. KT-IDEM: Intro-
ducing Item Difficulty to the Knowledge Tracing Model. In
International Conference on User Modeling, Adaption and
Personalization.
Pearlmutter, B. A. 1989. Learning state space trajectories in
recurrent neural networks. In International JointConference
on Neural Network, 365–372.
Ramchandran, S.; Tikhonov, G.; Kujanp ̈a ̈a, K.; Koskinen,
M.; and L ̈ahdesm ̈aki, H. 2021. Longitudinal Variational Au-
In Proceedings of the 24th International Con-
toencoder.
ference on Artificial Intelligence and Statistics (AISTATS),
volume 130.
Roderick J. A. Little, D. B. R. 2002. Statistical Analysis with
Missing Data.
Shin, D.; Shim, Y.; Yu, H.; Lee, S.; Kim, B.; and Choi, Y.
2021. SAINT+: Integrating Temporal Features for EdNet
Correctness Prediction. In Proc. Conf. Learning Analytics
and Knowledge. ISBN 978-1-4503-8935-8.
Swamy, V.; Guo, A.; Lau, S.; Wu, W.; Wu, M.; Pardos, Z.;
and Culler, D. 2018. Deep knowledge tracing for free-form
student code progression, volume 10948 LNAI. Springer
International Publishing. ISBN 9783319938455.
Vaswani, A.; Brain, G.; Shazeer, N.; Parmar, N.; Uszkoreit,
J.; Jones, L.; Gomez, A. N.; Kaiser, L.; and Polosukhin, I.
In Proc.Conf. Neural
2017. Attention Is All You Need.
Information Processing Systems.
|
|
http://arxiv.org/abs/2302.12909v2 | 2023-06-29T16:22:34 | 2023-02-24T21:50:02 | Differentially Private Algorithms for the Stochastic Saddle Point
Problem with Optimal Rates for the Strong Gap | We show that convex-concave Lipschitz stochastic saddle point problems (also
known as stochastic minimax optimization) can be solved under the constraint of
$(\epsilon,\delta)$-differential privacy with \emph{strong (primal-dual) gap}
rate of $\tilde O\big(\frac{1}{\sqrt{n}} + \frac{\sqrt{d}}{n\epsilon}\big)$,
where $n$ is the dataset size and $d$ is the dimension of the problem. This
rate is nearly optimal, based on existing lower bounds in differentially
private stochastic optimization. Specifically, we prove a tight upper bound on
the strong gap via novel implementation and analysis of the recursive
regularization technique repurposed for saddle point problems. We show that
this rate can be attained with
$O\big(\min\big\{\frac{n^2\epsilon^{1.5}}{\sqrt{d}}, n^{3/2}\big\}\big)$
gradient complexity, and $\tilde{O}(n)$ gradient complexity if the loss
function is smooth. As a byproduct of our method, we develop a general
algorithm that, given a black-box access to a subroutine satisfying a certain
$\alpha$ primal-dual accuracy guarantee with respect to the empirical
objective, gives a solution to the stochastic saddle point problem with a
strong gap of $\tilde{O}(\alpha+\frac{1}{\sqrt{n}})$. We show that this
$\alpha$-accuracy condition is satisfied by standard algorithms for the
empirical saddle point problem such as the proximal point method and the
stochastic gradient descent ascent algorithm. Further, we show that even for
simple problems it is possible for an algorithm to have zero weak gap and
suffer from $\Omega(1)$ strong gap. We also show that there exists a
fundamental tradeoff between stability and accuracy. Specifically, we show that
any $\Delta$-stable algorithm has empirical gap $\Omega\big(\frac{1}{\Delta
n}\big)$, and that this bound is tight. This result also holds also more
specifically for empirical risk minimization problems and may be of independent
interest. | [
"Raef Bassily",
"Cristóbal Guzmán",
"Michael Menart"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12909v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12909v2",
"@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",
"math.OC",
"stat.ML"
] | 3
2
0
2
n
u
J
9
2
]
G
L
.
s
c
[
2
v
9
0
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Differentially Private Algorithms for the Stochastic Saddle
Point Problem with Optimal Rates for the Strong Gap
Raef Bassily*
Crist ́obal Guzm ́an †
Michael Menart ‡
June 30, 2023
Abstract
1
(cid:1)
(cid:0)
nǫ
min
, n3/2
n2ǫ1.5
√d
√n + √d
We show that convex-concave Lipschitz stochastic saddle point problems (also known as stochastic
minimax optimization) can be solved under the constraint of (ǫ, δ)-differential privacy with strong (primal-
dual) gap rate of ̃O
, where n is the dataset size and d is the dimension of the problem. This rate
is nearly optimal, based on existing lower bounds in differentially private stochastic convex optimization.
Specifically, we prove a tight upper bound on the strong gap via novel implementation and analysis of
the recursive regularization technique repurposed for saddle point problems. We show that this rate can
gradient complexity, and ̃O(n) gradient complexity if the loss
be attained with O
function is smooth. As a byproduct of our method, we develop a general algorithm that, given a black-box
access to a subroutine satisfying a certain α primal-dual accuracy guarantee with respect to the empirical
objective, gives a solution to the stochastic saddle point problem with a strong gap of ̃O(α + 1
√n ). We
show that this α-accuracy condition is satisfied by standard algorithms for the empirical saddle point
problem such as the proximal point method and the stochastic gradient descent ascent algorithm. Finally,
to emphasize the importance of the strong gap as a convergence criterion compared to the weaker notion of
primal-dual gap, commonly known as the weak gap, we show that even for simple problems it is possible
for an algorithm to have zero weak gap and suffer from Ω(1) strong gap. We also show that there exists
a fundamental tradeoff between stability and accuracy. Specifically, we show that any ∆-stable algorithm
has empirical gap Ω
, and that this bound is tight. This result also holds also more specifically for
empirical risk minimization problems and may be of independent interest.
1
∆n
(cid:9)(cid:1)
(cid:8)
(cid:0)
(cid:0)
(cid:1)
1 Introduction
Stochastic (convex-concave) saddle point problems (SSP)1 (also referred to in the literature as stochastic
minimax optimization problems) are an increasingly important model for modern machine learning, arising
in areas such as stochastic optimization [NJLS09, JNT11, ZL15], robust statistics [YLMJ21], and algorith-
mic fairness [MSS19, WM19].
*Department of Computer Science & Engineering and the Translational Data Analytics Institute (TDAI), The Ohio State University,
[email protected]
†Institute for Mathematical and Computational Engineering, Faculty of Mathematics and School of Engineering, Pontificia Univer-
sidad Cat ́olica de Chile, [email protected]
‡Department of Computer Science & Engineering, The Ohio State University, [email protected]
1In this work, we will exclusively focus on the case where the function of interest for the stochastic saddle-point problem is convex-
concave, and therefore we will omit it from the problem denomination.
1
On the other hand, the reliance of modern machine learning on large datasets has led to concerns of user
privacy. These concerns in turn have led to a variety of privacy standards, of which differential privacy (DP)
has become the premier standard. However, for a variety of machine learning problems it is known that their
differentially-private counterparts have provably worse rates. As such, characterizing the fundamental cost
of differential privacy has become an important problem.
Currently, the theory of solving SSPs under differential privacy has major limitations, compared to its
non-private counterpart. To illustrate this point, we need to discuss the notions of accuracy used in the
literature. In SSPs, the goal is to find an approximate solution of the problem
min
w
∈W
max
Θ
θ
∈
n
(w, θ) := Ex
F
D
∼D
[f (w, θ; x)]
,
(1)
o
where
D
algorithm
with output [
and weak gap2, defined respectively as
Aw(S),
A
Aθ(S)]
is an unknown distribution for which we have access to an i.i.d. sample S. Given a (randomized)
Θ, two studied measures of performance are the strong
∈ W ×
Gap(
Gapweak(
) = E
,S
A
) = E
A
A
A (cid:20)
(cid:20)
max
Θ
θ
∈
F
max
θ
∈
Θ {
D
Aw(S), θ)
(
} −
min
∈W {
w
F
D
(w,
Aθ(S))
E
S
n
[F
D
Aw(S), θ)]
(
E
S
min
w
∈W n
−
o
(w,
[F
D
,
}
(cid:21)
Aθ(S))]
(2)
(3)
.
o(cid:21)
It is easy to see that the strong gap upper bounds the weak gap, and thus it is a stronger accuracy measure.
On the other hand, even for simple problems, the difference between these measures can be Ω(1); a fact we
elaborate on in Section 5. We also note that the strong gap has a clear game-theoretic interpretation: if we
Aθ(S) as the actions of two players in a (stochastic) zero-sum game, the strong gap
consider
upper bounds the most profitable unilateral deviation for either of the two players. In game theory this is
known as an approximate Nash equilibrium. By contrast, there is no general guarantee associated with the
weak gap.
Aw(S) and
Non-privately, it is known how to achieve optimal rates w.r.t. the strong gap, and those rates are similar
to those established for stochastic convex optimization (SCO) [NJLS09, JNT11]. However, for DP methods
optimal rates are only known for the weak gap [BG23, YHL+22, ZTOH22]. In a nutshell, the main limitation
of these approaches is that –in order to amplify privacy– they make multiple passes over the data (e.g., by
sampling with replacement stochastic gradients from the dataset), and the existing theory of generalization
for SSPs is much more limited than it is for SCO [ZHWZ21, LYYY21, OPZZ22]. Our approach largely
circumvents the current limitations of generalization theory for SSPs, providing the first nearly-optimal
rates for the strong gap in DP-SSP.
1.1 Contributions
In this work, we establish the optimal rates on the strong gap for DP-SSP. In the following, we let n be the
number of samples, d be the dimension, and ǫ, δ be the privacy parameters. Our main result is an (ǫ, δ)-
√n + √d
DP algorithm for SSP whose strong gap is ̃O
. This rate is nearly optimal, due to matching
lower bounds for differentially private SCO [BST14, BFTT19]. These minimization lower bounds hold for
saddle point problems since minimization problems are a special case of saddle point problems when Θ is
constrained to be a singleton. For non-smooth loss function, we show this rate can be obtained in gradient
nǫ
(cid:0)
(cid:1)
1
2The weak gap is sometimes stated with E
stability implies generalization result used in various works.
A
[*] taken inside the max. However [BG23] showed this was not necessary to obtain the
2
min
. This improves even upon the previous best known running time for
complexity O
achieving analogous rates on the weak gap, which was n5/2 [YHL+22]. Furthermore, we show that if the
loss function is smooth, this rate can be achieved in nearly linear gradient complexity.
(cid:9)(cid:1)
(cid:8)
(cid:0)
n2ǫ1.5
√d
, n3/2
In order to obtain an upper bound for this problem, we present a novel analysis of the recursive regular-
ization algorithm of [AZ18]. Our work is the first to show how the sequential regularization approach can be
repurposed to provide an algorithmic framework for attaining optimal strong gap guarantees for DP-SSP. As
a byproduct of our analysis, we show that empirical saddle point solvers which satisfy a certain α accuracy
guarantee can be used as a black box to obtain an ̃O (α + 1/√n) guarantee on the strong (population) gap.
This class of algorithms includes common techniques such as the proximal point method, the extragradient
method, and stochastic gradient descent ascent (SGDA) [MOP20, Nem04, JNT11]. This fact may be of in-
terest independent of differential privacy, as to the best of our knowledge, existing algorithms which achieve
the optimal 1/√n rate on the strong population gap rely crucially on a one-pass structure which optimizes
the population gap directly [NJLS09].
Under the additional assumption that the loss function is smooth, we show that it is possible to use recur-
sive regularization to obtain the optimal strong gap rate in nearly linear time. We here leverage accelerated
algorithms for smooth and strongly convex/strongly concave loss functions [PB16, JST22].
Our results stand in contrast to previous work on DP-SSPs, which has achieved optimal rates only for
the weak gap and has crucially relied on "stability implies generalization" results for the weak gap. In
this vein, we prove that even for simple problems, the strong and weak gap may differ by Θ(1). We also
elucidate the challenges of extending existing techniques to strong gap guarantees by showing a fundamental
tradeoff between stability and empirical accuracy. Specifically, we show that even for the more specific case
of empirical risk minimization, any algorithm which is ∆-uniform argument stable algorithm must have
. We also show this bound is tight, and note that it may be of independent interest.
empirical risk Ω
Such a tradeoff was also investigated by [CJY18], but their result only implies such a tradeoff for the specific
case of ∆ = 1
√n and their proof technique is unrelated to ours.
1
∆n
(cid:1)
(cid:0)
1.2 Related Work
Differentially private stochastic optimization has been extensively studied for over a decade [JKT12, BST14,
JT14, TTZ15, BFTT19, FKT20a, AFKT21, BGN21]. Among such problems, stochastic convex minimiza-
tion (where problem parameters are measured in the l2-norm) is perhaps the most widely studied, where it
is known the optimal rate is ̃O( 1
nǫ ) [BFTT19, BST14]. Further, under smoothness assumptions such
rates can be obtained in linear (in the sample size) gradient complexity [FKT20b]. Without smoothness, no
linear time algorithms which achieve the optimal rates are known [KLL21].
√n + √d
The study of stochastic saddle point problems under differential privacy is comparatively newer. In the
non-private setting, optimal O(1/√n) guarantees on the strong gap have been known as far back as [NY78].
Under privacy (without strong convexity/strong concavity), optimal rates are known only for the weak gap.
These rates ̃O( 1
nǫ ) have been obtained by several works [BG23, YHL+22, ZTOH22]. The work of
[ZTOH22] additionally showed that under smoothness assumptions such a result could be obtained in near
linear gradient complexity by leveraging accelerated methods [JST22, PB16]. All of these results are for
the weak gap and they rely crucially on the fact that, for the weak gap, ∆-stability implies ∆-generalization
[ZHWZ21].
√n + √d
By contrast, for the strong gap (without strong convexity/strong concavity assumptions), the best stability
implies generalization result is a √∆ bound obtained by [OPZZ22] provided the loss is smooth. As a result
of this discrepancy, known bounds on the strong gap under privacy are worse. The best known rates for the
3
d1/4
√nǫ ,
1
n1/3 + √d
(cid:16)
(cid:16)
n2/3ǫ
min
[BG23]. This rate was obtained through of mixture of noisy
strong gap are O
stochastic extragradient and noisy inexact proximal point methods, avoiding stability arguments altogether
and instead relying on one-pass algorithms which optimize the population loss directly. Without smoothness,
we are not aware of any work which provides bounds on the strong gap under privacy, but one may note that
a straightforward implementation of one-pass noisy SGDA leads to a rate of O
in this setting. We
give these details in Appendix A.2 and note this same algorithm establishes the optimal rate for SSPs under
local differential privacy.
√d
√nǫ
(cid:17)(cid:17)
(cid:0)
(cid:1)
Finally, under the stringent assumptions of μ-strong convexity/strong concavity (μ-SC/SC) and smooth-
ness with constant condition number, κ, optimal rates on the strong gap have been obtained [ZTOH22].
μn + d
was achieved by leveraging the fact that ∆
Under these assumptions, the optimal rate of O
stability implies κ∆ generalization [ZHWZ21]. The lower bound for this rate comes from lower bounds for
the minimization setting [HK14, BFTT19].
μn2ǫ2
(cid:0)
(cid:1)
1
2 Preliminaries
D
k * k
and the dual parameter space Θ be compact convex sets such that
Throughout, we consider the space Rd endowed with the standard l2 norm
. Let the primal param-
Rd for some
eter space
W
. Consider the stochastic saddle-point problem
d > 0. Let
given in equation (1) for some loss function f that is convex w.r.t. w and concave w.r.t. θ. We define the
[f (w, θ; x)] and FS(w, θ) =
corresponding population loss and empirical loss functions as F
be some distribution over data domain
x
S f (w, θ; x) respectively. For some B > 0 we assume that maxu,u′
1
B. To sim-
n
plify notation, for vectors w
Θ, we will use [w, θ] to denote their concatenation, noting [w, θ]
is a vector in Rd. We primarily consider the case where f is L-Lipschitz, but will also consider the additional
assumption of β-smoothness for certain results3. Specifically, these assumptions are that
and
θ1, θ2 ∈
∀
w1, w2 ∈ W
∀
(w, θ) = E
∼D
and θ
W ×
∈ W
Θ k
k ≤
∈W×
Θ:
P
u′
⊂
−
Θ
X
∈
u
D
∈
x
Lipschitzness:
Smoothness:
|
f (w1, θ1; x)
∇[w,θ]f (w1, θ1; x)
−
f (w2, θ2; x)
L
[w1, θ1]
| ≤
k
− ∇[w,θ]f (w2, θ2; x)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
[w2, θ2]
β
k
[w1, θ1]
k
−
≤
[w2, θ2]
.
k
−
Under such assumptions (in fact, smoothness is not necessary), a solution for problem (1) always exists
[Sio58], which we will call as a saddle point onwards. Further, given an SSP (1), we will denote a saddle
point as [w∗, θ∗].
Gap functions
In addition to the strong and weak gap functions defined in equations (2) and (3), it will
be useful to define the following gap function expressed as a function of the parameter vector instead of the
algorithm,
Gap( ̄w, ̄θ) = maxθ
( ̄w, θ)
F
.
} −
We have the following useful fact regarding
D
∈
F
Θ {
(w, ̄θ)
minw
Gap (see Appendix A for a proof).
∈W
D
(cid:8)
(cid:9)
d
Fact 1. If f is L-Lipschitz then
Gap is √2L-Lipschitz.
d
Note the strong gap can be written as an expectation of the gap function. Further, since the gap func-
tion is zero if and only if ( ̄w, ̄θ) is a solution for problem (1), the strong gap is considered the most suit-
able measure of accuracy for SSPs [NOR10, JNT11]. We also define the empirical gap as, GapS(
) =
d
A
3Throughout, any properties for f are considered as a function of [w, θ]. No assumptions about f w.r.t. x are made.
4
E
∈
FS(
Θ {
[maxθ
Aw(S), θ)
] . We will consider at various points the notion of
Aθ(S))
}
A
generalization error with respect to the strong/weak gap, which refers to difference between the strong/weak
gap and the empirical gap. Note that because the empirical gap treats the dataset as a fixed quantity, there
are not differing strong and weak versions of the empirical gap.
FS(w,
minw
∈W {
} −
(w, θ) = Ex
Saddle Operator Define the saddle operator as g(w, θ; x) = [
−∇θf (w, θ; x)]. Similarly
S g(w, θ; x). Note that the assumption on the
define G
smoothness of f implies the Lipschitzness of g. We note that since the saddle operator can be computed using
one computation of the gradient, we refer indistinctly to saddle operator complexity or gradient complexity
when discussing the running time of our algorithms.
[g(w, θ; x)] and GS(w, θ) = 1
n
∇wf (w, θ; x),
P
∼D
D
∈
x
Stability We will also use the notion of uniform argument stability frequently in our analysis [BE02].
Definition 1. A randomized algorithm
pair of adjacent datasets S, S′
7→ W ×
[
kA
A fact we will use is that the (constrained) regularized saddle-point is stable. Specifically, for some
Θ satisfies ∆-uniform argument stability if for any
(S)
:
X
n it holds that E
A
(S′)
k
− A
∈ X
∆.
A
≤
]
n
ˆw
∈ W
, ˆθ
Θ, and λ
∈
≥
0 consider the regularized objective function
(w, θ)
1
n
7→
S
Xz
∈
f (w, θ; z) +
λ
2 k
w
ˆw
−
2
k
−
λ
2 k
θ
2.
ˆθ
k
−
(4)
It is easy to see that his problem has a unique saddle point. The mapping which selects its output according
the unique solution of (4) has the following stability property.
Lemma 1. [ZHWZ21, Lemma 1] The algorithm which outputs the regularized saddle point with parameters
λ > 0, ˆw
-uniform argument stable w.r.t. S.
and ˆθ
Θ, is
2L
λn
∈ W
∈
In addition to the stability of the regularized saddle point, we will also frequently use the following fact.
(cid:1)
(cid:0)
Lemma 2. [ZHWZ21, Theorem 1] Let h :
Θ
h
Gap
. For any [w, θ]
gap function
h
Gap
(w, θ).
2
λ
d
∈ W ×
W ×
Θ it holds that
7→
R be λ-SC/SC with saddle point [w∗, θ∗] and
[w, θ]
k
−
[w∗, θ∗]
2
2(h(w,θ
k
≤
h(w
∗
,θ))
∗
)
−
λ
≤
d
Differential Privacy (DP) [DMNS06]: An algorithm
S and S′ differing in one data point and all events
eǫP (
) + δ.
(S′)
E
A
∈ E
is (ǫ, δ)-differentially private if for all datasets
A
in the range of the
, we have, P (
(S)
A
)
∈ E
≤
A
3 From Empirical Saddle Point to Strong Gap Guarantee via Recur-
sive Regularization
Our approach for obtaining near optimal rates on the strong gap leverages the recursive regularization tech-
nique of [AZ18]. In addition to adapting this algorithm to fit SSP problems, we also provide a novel analysis
which differs substantially from the analysis presented in previous work [FSS+19, ABG+22].
Our recursive regularization algorithm works by solving a series of regularized objectives, f (1), ..., f (T ),
with increasingly large regularization parameters. Specifically, after solving the t'th objective to obtain
5
Algorithm 1 Recursive Regularization:
Require: Dataset S
R
n, loss function f , subroutine
∈ X
set diameter B, Lipschitz constant L.
1: Let n′ = n/ log2(n), and T = log2( L
2: Let S1, ..., ST be a disjoint partition of S with each St of size n′ (which is always possible due to the
Bλ ).
A
≥
emp, regularization parameter λ
L
B√n , constraint
condition on λ)
3: Let [ ̄w0, ̄θ0] be any point in
4: Define function (w, θ, x)
5: for t = 1 to T do
[ ̄wt, ̄θt] =
6:
emp
Define (w, θ, x)
A
7→
7:
8: end for
9: Output: [ ̄wT , ̄θT ]
(cid:0)
7→
Θ
W ×
f (1)(w, θ; x) = f (w, θ; x) + 2λ
St, f t, [ ̄wt
1, ̄θt
−
1], B
2t
f (t+1)(w, θ; x) = f (t)(w, θ; x) + 2t+1λ
(cid:1)
−
w
k
−
2
̄w0k
−
2λ
θ
2
̄θ0
−
w
k
−
2
̄wtk
−
(cid:13)
(cid:13)
2t+1λ
(cid:13)
(cid:13)
2
̄θt
θ
−
(cid:13)
(cid:13)
(cid:13)
(cid:13)
[ ̄wt, ̄θt], the algorithm creates a new objective which is f (t+1)(w, θ; x) = f (t)(w, θ; x)+2t+1λ
2t+1λ
the strong convexity parameter is larger.
−
2 for the subsequent round. Notice that each subsequent objective is easier in the sense that
̄wtk
̄θt
−
−
w
k
θ
2
Our analysis will leverage the fact that approximate solutions to intermediate objectives do not need to
obtain good bounds on the strong gap for the regularization parameter to be increased. This is in contrast
to, for example, the iterative regularization technique of [ZTOH22], which finds [w, θ] that satisfies a near
optimal (weak) gap bound before adding noise.
(cid:13)
(cid:13)
(cid:13)
(cid:13)
Empirical Subroutine Recursive regularization utilizes a subroutine,
emp, which is roughly an approxi-
mate empirical saddle point solver. In addition to a dataset and Lipschitz loss function,
emp takes as input
an initial point and a bound, ˆD, on the expected distance between the initial point and the saddle point of
the empirical loss defined over the input dataset. At round t
2t , allowing
the algorithm to obtain increasingly strong accuracy guarantees for each subproblem. Note also it can be
[T ], f (t) is O(L)-Lipschitz due the scaling of the regularization. Specifically, the
verified that for all t
∈
accuracy guarantee of interest is the following.
[T ] this distance is bounded by B
A
A
∈
′
n
, loss function f ′, and an initial point [w′, θ′],
emp satisfies ˆα-relative accuracy w.r.t. the empirical saddle point [w∗S′ , θ∗S′ ] of F ′S′ (w, θ) =
emp satis-
Definition 2 ( ˆα-relative accuracy). Given a dataset S′
we say that
1
x
n
fies E
P
S′ f ′(w, θ; x) if,
∈
F ′S′ ( ̄w, θ∗S′ )
ˆD > 0, whenever E [
∀
ˆD, the output [ ̄w, ̄θ] of
[w∗S′ , θ∗S′]
[w′, θ′]
ˆD ˆα.
∈ X
A
A
≤
−
k
k
]
A
The relative accuracy guarantee for
emp differs from the more standard gap guarantee, and is not neces-
sarily implied by a bound on the empirical gap. The motivation for this notion of accuracy is twofold. First,
when the loss function is additionally SC/SC, this guarantee is sufficient to provide a bound on the distance
between the output of
emp and the saddle point, which will play a crucial role in our convergence proof for
Algorithm 1. Second, while it is certainly true that a bound on the empirical gap implies the same bound
on E
, for any given [w, θ], it is not necessarily the case that the gap itself may enjoy
a bound that is proportional to the initial distance to the saddle point4. The reason is that the gap function
A
FS(w, ̄θ)
FS( ̄w, θ)
−
(cid:3)
(cid:2)
(cid:2)
−
F ′S′ (w∗S′ , ̄θ)
(cid:3)
≤
4[FO20, Theorem 4] claims such a bound on the primal risk, but this is due to a misapplication of [MOP20, Lemma 2].
6
is defined by a supremum that is taken w.r.t. the whole feasible set
Θ, and thus the information of the
evaluation of the objective w.r.t. particular points is lost. However, it is usually the case that saddle point
Θ, and
solvers provide a bound of the form FS( ̄w, θ)
some initial point [w′, θ′]
Θ. Algorithms such as the proximal point method, extragradient method,
and SGDA (with appropriately tuned learning rate) satisfy this condition, and thus satisfy the condition for
relative accuracy [MOP20, Nem04, JNT11].
ˆα, for all [w, θ]
FS(w, ̄θ)
∈ W ×
[w′, θ′]
∈ W ×
[w, θ]
W ×
≤ k
−
−
k
Guarantees of Recursive Regularization Given such an algorithm, recursive regularization achieves the
following guarantee.
Theorem 1. Let
n′ = n
A
emp satisfy ˆα-relative accuracy for any (5L)-Lipschitz loss function and dataset of size
log(n) . Then Algorithm 1, run with
emp as a subroutine and λ = 48
B
ˆα + L
√n′
, satisfies
A
Gap(
) = O
R
log(n)B ˆα +
log3/2(n)BL
√n
(cid:16)
.
!
(cid:17)
Recall that B is a bound on the diameter of the constraint set. In the following, we will sketch the proof of
this theorem and highlight key lemmas. We defer the full proof to Appendix B.2. For simplicity, let us here
consider the case where ˆα = 0. A crucial aspect of our proof is that we avoid the need to bound the strong
T
t=1 . Instead, we bound the strong gap of the expected iterates, where the
gap of the actual iterates,
−
expectation is taken with respect to St. More concretely, consider some t
be the algorithm
B
∈
1], B
which on input [ ̄wt
is deterministic and
2t )
(cid:3)
St,
A
data independent. As a result, it is possible to prove bounds on the strong gap of
̄wt}
{
1] outputs
[T ] and let
. Note
emp(St, f t, [ ̄wt
1, ̄θt
−
1, ̄θt
−
A
(cid:2)
E
B
emp
−
−
1
.
Lemma 3. Let S
∼ D
n. For any ∆-uniform argument stable algorithm
A
B
, it holds that
Gap
E
,S
(cid:18)
A
[
Aw(S)] , E
,S
A
[
Aθ(S)]
≤
(cid:19)
Gapweak(
)
≤
A
E
S
[GapS(
)] + ∆L.
A
d
The proof follows straightforwardly from an application of Jensen's inequality and the "stability implies
generalization" result for the weak gap [LYYY21, Theorem 1]. We give full details in Appendix B.1. Note
that, for this discussion, the LHS of the above is equal to Gap(
) when we apply this lemma to the data
batch St and subroutine
In fact, running
. This
in turn can be accomplished using the fact that bounded stability implies bounded variance. Concretely, we
use the vector valued version of McDiarmid's inequality.
is infeasible. Instead, we show that the output
emp is close to the output of
emp.
A
A
B
B
B
Lemma 4. [RPHST+18, Lemma 6] 5 Let
to S
n. Then its output satisfies E
be deterministic ∆-uniform argument stable stable with respect
A
(S)
A
E ˆS
( ˆS)
2
n
n∆2.
−
∼D
∼ D
Observe that the exact empirical saddle point is a deterministic quantity conditioned on the randomness
-stability of the empir-
L2
22tλ2n′ .
emp
[f (t)(w, θ; x)] is at
h(cid:13)
(cid:13)
of the t'th empirical objective. Using the fact that (2tλ)-regularization implies
ical saddle point in conjunction with the above lemma, we obtain a (conditional) variance bound of
Under the setting of λ = Ω( L
(at round t) is O( B
B√n′ ), we can ultimately prove that the distance between the output of
(w, θ) := Ex
2t ). Since the strong gap of
L
2tλn′
A
(cid:2)
(cid:3)(cid:13)
(cid:13)
and
A
≤
i
(cid:0)
(cid:1)
with respect to F (t)
D
B
∼D
B
5Although stated therein for the distance, the last step of their proof shows a squared distance bound can be obtained.
7
D
(cid:1)
(cid:0)
B
1/2
√2tλn′
1
√2tλ
= O( B
most ∆L = L2
2tλn′ by Lemma 3 (recall we here assume ˆα = 0 for simplicity) and F (t)
is (2t+1λ)-SC/SC, the
must in turn be close to the population saddle point. Specifically, this distance is also bounded
output of
2t ). Thus we ultimately have that the distance between [ ̄wt, ̄θt] and the
= L
∆L
as
2tλ
population saddle point of F (t)
2t ). These ideas also lead
D
to a bound E
2t ), although the argument in this case is more technical and
−
thus deferred to the full proof.
(cid:2)(cid:13)
(cid:13)
The upshot of this analysis is that as the level of regularization increases, the distance of the iter-
ates to the their respective population minimizers decreases in kind. One consequence of this fact is that
[ ̄wT , ̄θT ]
, and thus by the Lipschitzness of the gap function, the output of recur-
sive regularization has a gap bound close to that of [w∗T , θ∗T ]. Turning now towards the utility of [w∗T , θ∗T ],
(cid:13)
(cid:13)
using the fact that F
, [w∗t , θ∗t ], satisfies E
[ ̄wt, ̄θt]
(cid:17)
(cid:13)
(cid:13)
is convex-concave we have
[w∗t+1, θ∗t+1]
[w∗T , θ∗T ]
[ ̄wt, ̄θt]
[w∗t , θ∗t ]
= O( B
= O( B
= ̃O
B
√n
(cid:2)(cid:13)
(cid:13)
(cid:13)
(cid:3)
(cid:13)
(cid:13)
(cid:3)
(cid:13)
−
−
(cid:16)
D
Gap(w∗T , θ∗T )
≤
w′
max
,θ′
∈W
∈
G
D
Θ {h
(w∗T , θ∗T ), [w∗T , θ∗T ]
[w′, θ′]
.
i}
−
Further, an expression for G
d
be obtained using the definition of F (T )
:
D
D
G
D
(w∗T , θ∗T ) = G(T )
D
(w∗T , θ∗T )
2λ
−
1
T
t=0 2t+1([w∗T ,
−
θ∗T ]
−
−
[ ̄wt,
−
̄θt]),
is the saddle operator of F (T )
where G(T )
D
inequality, the triangle inequality, and the fact that [w∗T , θ∗T ] is the exact saddle point of F (T )
a bound on the gap in terms of the distances discussed previously.
. Plugging the latter into the former and using Cauchy-Schwarz
, one can obtain
D
D
P
E
Gap(w∗T , θ∗T )
h
i
1
(i)
−
T
d
4B
≤
2t
E
*
λ
"
≤
4B
E
*
λ
"
T
1
−
t=0
X
[w∗t+1, θ∗t+1]
t=0
X
1
2tλE
(cid:13)
(cid:13)
[w∗t+1, θ∗t+1]
T
−
(ii)
= O
B
T
t=0
X
1
−
2tλ
= O
B
t=0
X
(cid:2)(cid:13)
(cid:13)
B
2t + B
T
1
−
r=1
X
2tλ
B
2t
!
#
(cid:13)
(cid:13)
[w∗r+1, θ∗r+1]
2t
[w∗T , θ∗T ]
[ ̄wt, ̄θt]
−
(cid:13)
(cid:13)
[ ̄wt, ̄θt]
−
(cid:13)
(cid:13)
[ ̄wt, ̄θt]
−
T
1
−
+
r=t+1
X
T
−
+ B
(cid:13)
(cid:13)
1
2tλE
(cid:13)
(cid:3)
(cid:13)
T λB2
= O
t=1
X
= O
[ ̄wt, ̄θt]
(cid:2)(cid:13)
(cid:13)
log2(n)BL
√n′
(cid:18)
−
,
(cid:19)
[w∗r , θ∗r ]
−
!#
(cid:13)
(cid:13)
[w∗t , θ∗t ]
!
(cid:3)
(cid:13)
(cid:13)
(cid:0)
where step (i) comes from a triangle inequality and step (ii) is obtained from a series of algebraic manipu-
lations which are expanded upon in the full proof. Finally, in the case where ˆα > 0, extra steps are required
emp to the exact saddle point of F (t)
f (t)(w, θ; x).
to bound the distance of output of
This is accomplished using the SC/SC property of F (t)
emp.
S and the ˆα-relative accuracy guarantee of
S (w, θ) := 1
n′
A
St
(cid:1)
∈
x
P
A
4 Optimal Strong Gap Rate for DP-SSP
With the guarantees of recursive regularization established, what remains is to show there exist (ǫ, δ)-DP
algorithms which achieve a sufficient accuracy on the empirical objective. Note this suffices to make the
entire recursive regularization algorithm private.
8
Theorem 2. Let
emp used in Algorithm 1 be (ǫ, δ)-DP. Then Algorithm 1 is (ǫ, δ)-DP.
A
This follows simply from post processing the parallel composition theorem for differential privacy, since
each run of
emp is run on a disjoint partition of the dataset.
A
4.1 Efficient algorithm for the non-smooth setting
In the non-smooth setting, one can obtain optimal rates on the empirical gap using noisy stochastic gradi-
ent descent ascent (noisy SGDA). We give this algorithm in detail in Appendix C.2. More briefly, noisy
SGDA starts at [w0, θ0]
Θ and takes parameters T, η > 0, where T is the number of itera-
tions and η is the learning rate. New iterates are obtained via the update rule [wt+1, θt+1] = [wt, θt]
g(wt, θt; x) + ξt, where ξ0, ..., ξT
η
Mt|
|
sampled uniformly with replacement from S. The algorithm then returns the average iterate, 1
T
Noisy SGDA can be used to obtain the following result.
−
1 are i.i.d. Gaussian noise vectors and Mt is a minibatch
T
t=0 [wt, θt].
−
∈ W ×
P
Mt
−
∈
x
1
P
Lemma 5. There
log(n)L√d log(1/δ)
nǫ
ˆα = O
(cid:18)
exists an (ǫ, δ)-DP algorithm which satisfies
n3/2
log3/2(n)
n2ǫ1.5
log2(n)√d log(1/δ)
and runs in O
min
,
(cid:19)
(cid:18)
(cid:26)
ˆα-relative accuracy with
gradient evaluations.
(cid:27)(cid:19)
Applying Theorem 1 then yields a near optimal rate on the strong gap.
Corollary 1. There exists an Algorithm,
O
n2ǫ1.5
log(n)√d log(1/δ)
, n3/2
√log(n)
min
R
, and satisfies
, which is (ǫ, δ)-DP, has gradient evaluations bounded by
(cid:0)
(cid:8)
(cid:9)(cid:1)
Gap(
) = O
R
log3/2(n)BL
√n
+
log2(n)BL
d log(1/δ)
nǫ
p
.
!
4.2 Near linear time algorithm for the smooth setting
In the smooth setting, we can achieve the optimal rate in nearly linear time. Our result leverages accelerated
algorithms for smooth and strongly convex-strongly concave saddle point problems [JST22, PB16].
Θ
7→
W ×
W 7→
R and hθ : Θ
R be β-smooth and α > 0. Let
Lemma 6. ([JST22, Theorem 3, Corollary 41]) Let f :
R be c1μ-strongly convex and c2μ-smooth functions for some μ > 0
both hw :
hθ(θ). Then
and constants c1, c2. Consider the objective Fh(w, θ; S) =
there exists an algorithm which finds an approximate saddle point of Fh with empirical gap at most α in
O
× X 7→
T
t=1 f (w, θ; S) + hw(w)
gradient evaluations, where κ = O(n + √n(1 + β/μ)).
Given this, we consider the following implementation of
κ log(κ) log( κBL
α )
(cid:1)
point of F (t)(w, θ) = 1
x
n
∈
[ ˆwt, ˆθt]
that E
[w∗S,t, θ∗S,t]
k
from [JST22] referenced above. Then output [ ̄wt, ̄θt] = [ ˆwt, ˆθt] + ξt where ξt ∼ N
h
8L√log(2/δ)
2tλn′ǫ
. This implementation gives us the following result.
emp. Define [w∗S,t, θ∗S,t] to be the saddle
[T ], find a point [ ˆwt, ˆθt] such
2. We can find this point efficiently using the algorithm
(0, Idσ2
t ) and σt =
f (t)(w, θ; x) for all t
[T ]. At round t
L
2tλn′
δ
5 *
St
2
P
P
A
−
−
≤
∈
∈
k
i
(cid:1)
(cid:0)
(cid:0)
9
Theorem 3. Let
emp be as described above. Then Algorithm 1 is (ǫ, δ)-DP and when run with λ =
L
√n′ +
48
B
(cid:18)
A
L√d log(2/δ)
n′ǫ
satisfies
(cid:19)
Gap(
) = O
R
log3/2(n)BL
√n
+
log2(n)BL
d log(1/δ)
nǫ
p
,
!
and runs in at most O (κ log(κ) log(κn/δ) log(n)) gradient evaluations with κ = O (n + nβB/L).
proof of Theorem 3. In the following, we start by proving the privacy guarantee. Then, we prove the utility
guarantee, and finish by verifying the running time of the algorithm.
∈
[w∗S,t, θ∗S,t]
[T ] and fix [w1, θ1], ..., [wt
Privacy Guarantee: Consider any t
ularized saddle point at round t, [w∗S,t, θ∗S,t], is then
E
1]. The stability of the reg-
emp guarantees that
2tλn′ , we have by Markov's inequality that with probability at least
k
2 , generating [ ˆwt, ˆθt] sat-
h
−
ensures the round
isfies
is (ǫ, δ)-DP. Parallel composition then ensures the entire algorithm is (ǫ, δ)-DP since each phase acts on a
disjoint partition of the dataset.
[ ˆwt, ˆθt]
δ
2 that
2L
2tλn′ uniform argument stability. Thus Gaussian noise of scale σt =
2tλn′ . Thus with probability at least 1
−
2tλn′ by Lemma 1. Since
8L√log(2/δ)
2tλn′ǫ
−
[ ˆwt, ˆθt]
i
[w∗S,t, θ∗S,t]
δ
5 *
1, θt
k ≤
A
≤
−
−
k
1
k
−
L
L
L
δ
Utility Guarantee: We now turn to the accuracy guarantee. Specifically, we leverage the generalized con-
vergence guarantee of Algorithm 1 given by Theorem 5 in Appendix B. This theorem guarantees that so
long as the distance condition E
[T ], one obtains
) = O(log(n)B2λ). That is, after the distance guarantee is established, the
convergence guarantee Gap(
h(cid:13)
(cid:13)
rest of the analysis (i.e. the proof of Theorem 5) follows the same lines as in the non-smooth case. Note
under the setting of λ in Theorem 3 we have
B2
22t is satisfied for all t
[w∗S,t, θ∗S,t]
[ ̄wt, ̄θt]
12
*
(cid:13)
(cid:13)
R
≤
−
∈
i
2
Gap(
) = O(log(n)B2λ) = O
R
log3/2(n)BL
√n
+
log2(n)BL
d log(2/δ)
nǫ
p
.
!
Thus all that remains is to show that the distance condition, E
[ ̄wt, ̄θt]
[w∗S,t, θ∗S,t]
2
−
B2
22t , is
12
*
≤
satisfied for all t
[T ]. In this regard we have,
∈
[ ̄wt, ̄θt]
E
h(cid:13)
(cid:13)
[w∗S,t, θ∗S,t]
2
−
≤
E
[ ̄wt, ̄θt]
i
(cid:13)
(cid:13)
k
h
dσ2
t +
h(cid:13)
(cid:13)
2 +
[ ˆwt, ˆθt]
k
−
2
[ ˆwt, ˆθt]
k
−
(cid:13)
(cid:13)
[w∗S,t, θ∗S,t]
i
2
k
i
L
2tλn′ (cid:19)
(cid:18)
64dL2 log(2/δ)
22tλ2(n′)2ǫ2 +
For the first inequality, observe that the noise vector is uncorrelated with the vectors, [ ˆwt, ˆθt] and [w∗S,t, θ∗S,t].
Further,
For
the second inequality note E
22t .
δ
5 *
22t ≤
= E
B2
B2
12
25
[ ˆwt, ˆθt]
[ ̄wt, ̄θt]
= dσ2
t .
≤
≤
2
2
*
*
E
[ ˆwt, ˆθt]
[w∗S,t, θ∗S,t]
2
k
−
k
h
ity comes from the settings of σt and the fact that λ > 48L
i
emp. The third inequal-
B√n′ . The last inequality uses the fact that
(cid:3)
A
ξtk
is bounded due to the chosen implementation of
k
(cid:2)
k
h
−
k
i
λ >
48L√d log(2/δ)
Bn′ǫ
.
10
[ ˆwt, ˆθt]
L
2tλn′
k
h
δ
5 *
λ
(cid:0)
(cid:1)
25 *
δ2
25 *
Running Time: One can ensure that overall algorithm runs in nearly linear time by leveraging accelerated
methods to find the point [ ˆw, ˆθt]. The description of
[T ], one has
emp requires that at each phase t
2, which by Lemma 2 is satisfied if the empirical gap is at most
E
2
A
∈
−
2
[w∗S,t, θ∗S,t]
k
L2
= δ2
≤
i
δ
5 *
L
2tλn′
22tλ(n′)2 . For simplicity, we observe that
(cid:1)
(cid:0)
L2
22tλn′
2 = Ω
(cid:18)
δ2L2
22T λ(n′)2
= Ω
(cid:19)
(cid:18)
1
t
k=0 2k+1
−
B2λ2
L2
δ2L2
λ(n′)2
= Ω
δ2BL
n2.5
(cid:19)
(cid:18)
2, hθ(θ) = λ
(cid:19)
1
t
k=0 2k+1
−
We now apply Lemma 6 with hw(w) = λ
μ = 2tλ and α = c3δ2BL
t is O
implementation of
running time bound of O (κ log(κ) log(κn/δ] log(n)), where κ = O (n + nβB/L).
2,
̄wkk
̄wkk
for some sufficiently small constant c3. This gives that the running time of phase
, where κt = O (n + √nβ/[2tλ])) = O (n + nβB/L). Running this
Bλ ) = O(log(n)), giving the claimed
emp each phase incurs an extra factor of T = log( L
n2.5
κt log(κt) log(κtn2.5/δ2]
w
k
P
P
A
−
−
w
k
(cid:1)
(cid:0)
5 On the Limitations of Previous Approaches
Prior work into DP SSPs has largely focused on the weak gap criteria. In this section, we provide further
investigation into both the importance and challenges of bounding the strong gap over the weak gap. We start
by considering a natural question. Do there exist cases where the strong and weak gap differ substantially?
We answer this question affirmatively in the following.
Proposition 1. There exists a convex-concave function f with range [
Gap(
) = 2.
Gapweak(
)
A
−
A
1, +1] and algorithm
such that
A
−
Our construction shows that this result holds even for a simple one dimensional bilinear problem.
Proof. Consider the loss function f (w, θ; x) = wθ, where w, θ, x
be the uniform distribu-
∈
which outputs ̄w as the mode of the first
tion over
x1, . . . , xn} ∼ D
half of the samples in S and similarly ̄θ is set as the mode of the second half of the samples in S 6. Note ̄w
and ̄θ are independent and distributed uniformly over
(under the randomness from
n consider the algorithm
1, 1]. Let
. For
1
}
{±
A
−
D
).
{
[
Now, since
is a deterministic function of the dataset, the randomness in ̄w, ̄θ comes only from S. Thus
D
A
for the weak gap we have max
minw
[
∈
−
1,1]{
wE
S
̄θ
}
1,1]{
E
S
[ ̄wθ]
min
[
w
−
∈
0. However,
} −
1,1]{
one
θ
[
∈
=
−
which evaluates to maxθ
∈
}
[
can
(cid:2)
(cid:3)
see
for
the
strong
[ ̄w] θ
E
S
1,1]{
−
gap we
} −
have
1
}
w ̄θ
{±
E
S
(cid:3)
E
1,1] {
S
w
θ = sgn( ̄w) and w =
max
[
−
∈
(cid:2)
} −
̄wθ
(cid:20)
θ
w ̄θ
= E
S
min
[
1,1]
−
∈
sgn( ̄θ) in the maximization and minimization operators.
(cid:12)
(cid:3)
(cid:12)
−
|
(cid:2)
+
̄w
(cid:9)
(cid:8)
(cid:12)
(cid:12)
(cid:21)
|
̄θ
= 2, where the first equality comes from evaluating
Observe that the generalization error w.r.t. the strong gap of this algorithm is always 0 because the loss
function does not depend on the random sample from
. The discrepancy between the gaps instead comes
from the fact that having the expectation w.r.t. S inside the max/min changes the function over which the
dual/primal adversary is maximizing/minimizing. Specifically, note here that the weak gap measures the
̄wθ for ̄w = 0, but note ̄w = 0 does not occur for any realization
ability of θ to maximize the function θ
of the dataset S.
7→
D
6Without much loss of generality, we assume that n is divisible by 2 but not by 4, so that the mode of each half of the data are
well-defined and belong to {−1, +1}.
11
One might further observe that a key attribute of this construction is the high variance of the parameter
vectors. One can show such behavior is in fact necessary to see such a separation; the full proof of the
following is statement is given in Appendix D.1.
Proposition 2. Let
A
Lipschitz it holds that Gap(
be an algorithm such that E
,S
A
Lτ.
Gapweak(
)
A
≤
)
A
−
(S)
A
(cid:20)(cid:13)
(cid:13)
(cid:13)
E ˆS
∼D
n,
−
AA
2
( ˆS)
(cid:13)
(cid:13)
(cid:13)
τ 2, then if f is L-
≤
(cid:21)
Tradeoff between Accuracy and Stability An additional consequence of Proposition 2 (in conjunction
with Lemma 4) is that ∆-uniform argument stability implies √n∆L generalization bound w.r.t. the strong
gap that does not rely on smoothness (in contrast to the √Lβ∆ bound of [OPZZ22] which does). We leave
determining tight bounds for stability implies generalization on the strong gap as an interesting direction
for future work. In this section however, we show that stronger upper bounds are likely necessary to obtain
a more direct algorithm for DP-SSPs. In fact, our key result holds even for empirical risk minimization
n, consider the problem of minimizing the excess
(ERM) problems. That is, for f :
empirical risk FS(w)
S f (w; x). We have the following.
W × X 7→
, where FS(w) = 1
FS(w)
n
}
R and S
minw
∈W {
∈ X
−
x
∈
Theorem 4. For any (possibly randomized) algorithm
there exists a 0-smooth L-Lipschitz loss function, f :
E[FS(
provided ∆
(S))
A
B2L
∆n
FS(w)
{
] = Ω
}
A
min
w
∈W
−
n
:
X
P
7→ W
W × X 7→
B
√min
≥
{
n,d
}
(cid:16)
(cid:17)
which is ∆-uniform argument stable,
R, and dataset S
n such that
.
∈ X
The proof can be found in Appendix D.2. Lemma 1 shows this bound is tight for both ERM and em-
pirical saddle point problems. Generalization bounds are only useful when it is possible to obtain good
empirical performance. Thus, the implication of this bound is that generalization error which is O(∆) is
necessary to obtain the optimal O (1/√n) statistical rate. To elaborate, let H(∆) characterize some (poten-
tially suboptimal) generalization bound for ∆ stable algorithms and assume H(∆) = ω(∆). To then bound
the sum of empirical risk and generalization error, Theorem 4 implies FS(
(S))
FS(w∗) + H(∆) =
√n (i.e. not optimal) for any
Ω
∆.
(cid:0)
. Note the RHS is asymptotically larger than 1
1
∆n + H(∆)
(cid:1)
1
∆n + ∆
(cid:1)
= ω
A
−
(cid:0)
Acknowledgements
RB's and MM's research is supported by NSF CAREER Award 2144532 and NSF Award AF-1908281.
CG's research was partially supported by INRIA Associate Teams project, FONDECYT 1210362 grant,
ANID Anillo ACT210005 grant, and National Center for Artificial Intelligence CENIA FB210017, Basal
ANID.
References
[ABG+22] Raman Arora, Raef Bassily, Crist ́obal Guzm ́an, Michael Menart, and Enayat Ullah. Dif-
ferentially private generalized linear models revisited. In Advances in Neural Information
Processing Systems, volume 35. Curran Associates, Inc., 2022.
[ACG+16] Martin Abadi, Andy Chu, Ian Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Tal-
war, and Li Zhang. Deep learning with differential privacy. CCS '16, page 308–318, New
York, NY, USA, 2016. Association for Computing Machinery.
12
[AFKT21] Hilal Asi, Vitaly Feldman, Tomer Koren, and Kunal Talwar. Private stochastic convex opti-
mization: Optimal rates in l1 geometry. In International Conference on Machine Learning,
2021.
[AZ18] Zeyuan Allen-Zhu. How to make the gradients small stochastically: Even faster convex and
nonconvex sgd. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and
R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran
Associates, Inc., 2018.
[BE02] Olivier Bousquet and Andr ́e Elisseeff. Stability and generalization. The Journal of Machine
Learning Research, 2:499–526, 2002.
[BFTT19] Raef Bassily, Vitaly Feldman, Kunal Talwar, and Abhradeep Guha Thakurta. Private stochas-
tic convex optimization with optimal rates. In Hanna M. Wallach, Hugo Larochelle, Alina
Beygelzimer, Florence d'Alch ́e-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in
Neural Information Processing Systems 32: Annual Conference on Neural Information Pro-
cessing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages
11279–11288, 2019.
[BG23] Digvijay Boob and Crist ́obal Guzm ́an. Optimal algorithms for differentially private stochastic
monotone variational inequalities and saddle-point problems. Mathematical Programming,
pages 1–43, 2023.
[BGN21] Raef Bassily, Cristobal Guzman, and Anupama Nandi. Non-euclidean differentially private
stochastic convex optimization. In Mikhail Belkin and Samory Kpotufe, editors, Proceedings
of Thirty Fourth Conference on Learning Theory, volume 134 of Proceedings of Machine
Learning Research, pages 474–499. PMLR, 15–19 Aug 2021.
[BST14] Raef Bassily, Adam Smith, and Abhradeep Thakurta. Private empirical risk minimization:
Efficient algorithms and tight error bounds. In IEEE 55th Annual Symposium on Foundations
of Computer Science (FOCS 2014). (arXiv preprint arXiv:1405.7085), pages 464–473. 2014.
[CJY18] Yuansi Chen, Chi Jin, and Bin Yu. Stability and convergence trade-off of iterative optimiza-
tion algorithms, 2018.
[DJW13] John C. Duchi, Michael I. Jordan, and Martin J. Wainwright. Local privacy and statistical
minimax rates. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science,
pages 429–438, 2013.
[DMNS06] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to
sensitivity in private data analysis. In Theory of cryptography conference, pages 265–284.
Springer, 2006.
[FKT20a] Vitaly Feldman, Tomer Koren, and Kunal Talwar. Private stochastic convex optimization:
optimal rates in linear time. In Proceedings of the 52nd Annual ACM SIGACT Symposium on
Theory of Computing, pages 439–449, 2020.
[FKT20b] Vitaly Feldman, Tomer Koren, and Kunal Talwar. Private stochastic convex optimization:
Optimal rates in linear time. In Proceedings of the 52nd Annual ACM SIGACT Symposium on
Theory of Computing, STOC 2020, page 439–449, New York, NY, USA, 2020. Association
for Computing Machinery.
13
[FO20] Farzan Farnia and Asuman E. Ozdaglar. Train simultaneously, generalize better: Stability of
gradient-based minimax learners. In International Conference on Machine Learning, 2020.
[FSS+19] Dylan J. Foster, Ayush Sekhari, Ohad Shamir, Nathan Srebro, Karthik Sridharan, and Blake
Woodworth. The complexity of making the gradient small in stochastic convex optimization.
In Alina Beygelzimer and Daniel Hsu, editors, Proceedings of the Thirty-Second Conference
on Learning Theory, volume 99 of Proceedings of Machine Learning Research, pages 1319–
1345. PMLR, 25–28 Jun 2019.
[HK14] Elad Hazan and Satyen Kale. Beyond the regret minimization barrier: Optimal algo-
rithms for stochastic strongly-convex optimization. Journal of Machine Learning Research,
15(71):2489–2512, 2014.
[JKT12] Prateek Jain, Pravesh Kothari, and Abhradeep Thakurta. Differentially private online learn-
ing. In 25th Annual Conference on Learning Theory (COLT), pages 24.1–24.34, 2012.
[JNT11] Anatoli Juditsky, Arkadi Nemirovski, and Claire Tauvel. Solving variational inequalities with
stochastic mirror-prox algorithm. Stochastic Systems, 1(1):17 – 58, 2011.
[JST22] Yujia Jin, Aaron Sidford, and Kevin Tian. Sharper rates for separable minimax and finite
sum optimization via primal-dual extragradient methods. In Po-Ling Loh and Maxim Ra-
ginsky, editors, Proceedings of Thirty Fifth Conference on Learning Theory, volume 178 of
Proceedings of Machine Learning Research, pages 4362–4415. PMLR, 02–05 Jul 2022.
[JT14] Prateek Jain and Abhradeep Thakurta. (near) dimension independent risk bounds for differ-
entially private learning. In ICML, 2014.
[KLL21] Janardhan Kulkarni, Yin Tat Lee, and Daogao Liu. Private non-smooth erm and sco in sub-
quadratic steps. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman
Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages
4053–4064. Curran Associates, Inc., 2021.
[LYYY21] Yunwen Lei, Zhenhuan Yang, Tianbao Yang, and Yiming Ying. Stability and generalization
of stochastic gradient methods for minimax problems. In Marina Meila and Tong Zhang,
editors, Proceedings of the 38th International Conference on Machine Learning, volume 139
of Proceedings of Machine Learning Research, pages 6175–6186. PMLR, 18–24 Jul 2021.
[MOP20] Aryan Mokhtari, Asuman E. Ozdaglar, and Sarath Pattathil. Convergence rate of o(1/k) for
optimistic gradient and extragradient methods in smooth convex-concave saddle point prob-
lems. SIAM Journal on Optimization, 30(4):3230–3251, 2020.
[MSS19] Mehryar Mohri, Gary Sivek, and Ananda Theertha Suresh. Agnostic federated learning. In
Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th Interna-
tional Conference on Machine Learning, volume 97 of Proceedings of Machine Learning
Research, pages 4615–4625. PMLR, 09–15 Jun 2019.
[Nem04] Arkadi Nemirovski. Prox-method with rate of convergence o(1/t) for variational inequali-
ties with lipschitz continuous monotone operators and smooth convex-concave saddle point
problems. SIAM Journal on Optimization, 15(1):229–251, 2004.
14
[NJLS09] Arkadi Nemirovski, Anatoli Juditsky, Guanghui Lan, and And Shapiro. Robust stochas-
tic approximation approach to stochastic programming. Society for Industrial and Applied
Mathematics, 19:1574–1609, 01 2009.
[NOR10] Arkadi Nemirovski, Shmuel Onn, and Uriel G. Rothblum. Accuracy certificates for compu-
tational problems with convex structure. Math. Oper. Res., 35(1):52–78, 2010.
[NY78] Arkadi Nemirovski and D Yudin. On cezari's convergence of the steepest descent method for
approximating saddle point of convex-concave functions. In Soviet Mathematics. Doklady,
volume 19, pages 258–269, 1978.
[OPZZ22] Asuman Ozdaglar, Sarath Pattathil, Jiawei Zhang, and Kaiqing Zhang. What is a good metric
to study generalization of minimax learners? In Advances in Neural Information Processing
Systems, volume 35. Curran Associates, Inc., 2022.
[PB16] Balamurugan Palaniappan and Francis Bach. Stochastic variance reduction methods for
In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett,
saddle-point problems.
editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates,
Inc., 2016.
[RPHST+18] Omar Rivasplata, Emilio Parrado-Hernandez, John S Shawe-Taylor, Shiliang Sun, and Csaba
In
Szepesvari. Pac-bayes bounds for stable algorithms with instance-dependent priors.
S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, ed-
itors, Advances in Neural Information Processing Systems, volume 31. Curran Associates,
Inc., 2018.
[Sio58] Maurice Sion. On general minimax theorems. Pacific Journal of Mathematics, 8(1):171 –
176, 1958.
[TTZ15] Kunal Talwar, Abhradeep Thakurta, and Li Zhang. Nearly optimal private lasso. In NIPS,
2015.
[WM19] Robert Williamson and Aditya Menon. Fairness risk measures. In International Conference
on Machine Learning, pages 6786–6797. PMLR, 2019.
[YHL+22] Zhenhuan Yang, Shu Hu, Yunwen Lei, Kush R Vashney, Siwei Lyu, and Yiming Ying. Dif-
ferentially private sgda for minimax problems. In James Cussens and Kun Zhang, editors,
Proceedings of the Thirty-Eighth Conference on Uncertainty in Artificial Intelligence, vol-
ume 180 of Proceedings of Machine Learning Research, pages 2192–2202. PMLR, 01–05
Aug 2022.
[YLMJ21] Yaodong Yu, Tianyi Lin, Eric Mazumdar, and Michael I. Jordan. Fast distributionally robust
learning with variance reduced min-max optimization. CoRR, abs/2104.13326, 2021.
[ZHWZ21] Junyu Zhang, Mingyi Hong, Mengdi Wang, and Shuzhong Zhang. Generalization bounds
for stochastic saddle point problems.
In Arindam Banerjee and Kenji Fukumizu, editors,
Proceedings of The 24th International Conference on Artificial Intelligence and Statistics,
volume 130 of Proceedings of Machine Learning Research, pages 568–576. PMLR, 13–15
Apr 2021.
15
[ZL15] Yuchen Zhang and Xiao Lin. Stochastic primal-dual coordinate method for regularized em-
pirical risk minimization. In International Conference on Machine Learning, pages 353–361.
PMLR, 2015.
[ZTOH22] Liang Zhang, Kiran Koshy Thekumparampil, Sewoong Oh, and Niao He. Bring your own
algorithm for optimal differentially private stochastic minimax optimization. In Advances in
Neural Information Processing Systems, volume 35. Curran Associates, Inc., 2022.
16
A Supporting Proofs from Preliminaries
A.1 Lipschitzness of the Gap Function
proof of Fact 1. For any [ ̄w, ̄θ], [ ̄w′, ̄θ′]
Θ we have
∈ W ×
Gap( ̄w, ̄θ)
Gap( ̄w′, ̄θ′) = sup
w,θ
−
d
d
≤
≤
≤
(cid:8)
sup
w,θ
(cid:8)
L sup
w,θ
√2L
k
( ̄w, θ)
( ̄w, θ)
F
D
F
D
F
D
F
D
−
−
(w, ̄θ)
−
sup
w,θ
(cid:9)
( ̄w′, θ) + F
D
D
(cid:8)
(w, ̄θ′)
F
D
−
F
( ̄w′, θ)
F
−
D
(w, ̄θ)
(w, ̄θ′)
(cid:9)
̄w
k
−
(cid:8)
[ ̄w, ̄θ]
̄w′
+
k
k
[ ̄w′, ̄θ′]
−
,
k
̄θ′
−
̄θ
k
(cid:9)
(cid:9)
where we used in the last inequality that a + b
√2√a2 + b2.
≤
A.2 Local Privacy
In the case of local differential privacy (LDP), a simple implementation of noisy SGDA (see Appendix C.1)
suffices to obtain the optimal rate. We defer the reader to [DJW13] for a discussion of LDP and the matching
lower bound. Consider the implementation of SGDA which defines the saddle estimator as
∇t = g(wt
−
1, θt
−
1; xt) + ξt
where ξt ∼ N
we have the following.
(0, Idσ) and σ =
L√log(1/δ)
ǫ
and xt is sampled without replacement from S. By Lemma 9
Corollary 2. Let T = n. Then the algorithm described above, denoted as
, is (ǫ, δ)-LDP and if η =
B
√nd log(1/δ)Lǫ
the average iterate, [ ̄w, ̄θ], satisfies Gap(
) = O
A
(cid:18)
A
BL√d log(1/δ)
√nǫ
.
(cid:19)
B Missing Results from Section 3
B.1 Proof of Lemma 3
The first inequality follows from an application of Jensen's inequality.
Gap
[
E
,S
(cid:18)
A
d
= max
Θ
θ
∈
(cid:26)
F
,S
Aw(S)] , E
E
n,
ˆS
A
D
∼D
Aw
≤
max
ˆS
Θ
θ
∈
= Gapweak(
(cid:26)
(cid:16)
E
n,
∼D
).
A
F
D
Aw
h
[
Aθ(S)]
(cid:19)
Aw( ˆS)
i
h
Aw( ˆS), θ)
(
, θ
−
min
w
∈W (cid:26)
(cid:17)(cid:27)
F
D
w,
ˆS
E
n,
∼D
Aθ
−
min
w
∈W (cid:26)
ˆS
∼D
F
(w,
D
Aθ
h
i(cid:27)
(cid:16)
E
n,
Aθ( ˆS)
h
Aθ( ˆS))
i (cid:17)(cid:27)
i(cid:27)
The second inequality in the theorem statement then follows from stability implies generalization result for
the weak gap, for which we provide a restatement below.
17
Lemma 7. [LYYY21, Theorem 1], [BG23, Proposition 2.1] Let the loss function f be L-Lipschitz and the
algorithm
be ∆-uniform argument stable. Then Gapweak(
)] + ∆L.
[GapS(
)
A
≤
E
S
A
A
B.2 Convergence of Recursive Regularization
In this section we prove the following more general statement of Theorem 1, which will be useful later.
Theorem 5. Let λ
[w∗S,t, θ∗S,t]
E
[ ̄wt, ̄θt]
h(cid:13)
(cid:13)
−
≥
2
i
(cid:13)
(cid:13)
48L
B√n′ and
B2
22t . Then Recursive Regularization satisfies
emp be such that
for all
A
t
≤
12
*
[T ]
it holds
that
∈
Gap(
) = O
R
log(n)B2λ
(cid:16)
(cid:17)
To prove this result, it will be helpful to first show several intermediate results. We start by defining
Ft is the sigma algebra induced by all
several useful quantities. Define
randomness up to [ ̄wt, ̄θt]. For every t
T
t=0 as the filtration where
[T ] we define
{Ft}
∈
(w, θ) := E
∼D
S (w, θ) := 1
n
x
f (t)(w, θ; x)
;
(cid:3)
S f (t)(w, θ; x);
(cid:2)
x
∈
P
• [w∗t , θ∗t ] : saddle point of F (t)
D
• [w∗S,t, θ∗S,t] : saddle point of F (t)
• [
wt,
θt] := E
[w∗S,t, θ∗S,t]
•
•
(t)
e
e
Gap
h
( ̄w, ̄θ) := max
Θ
θ
∈
(t)
d
Gap
S ( ̄w, ̄θ) := max
θ
Θ
∈
n
n
;
1
Ft
−
(cid:12)
(cid:12)
F (t)
(cid:12)
D
i
( ̄w, θ)
F (t)
St
( ̄w, θ)
F (t)
D
F (t)
St
min
w
∈W n
min
w
∈W n
−
−
o
o
o
(w, ̄θ)
o
(w, ̄θ)
: the gap function w.r.t. F (t)
D
; and,
: the empirical gap function.
d
We now establish two distance inequalities which will be used when analyzing the final gap bound in
Theorem 5. The first inequality above bounds the distance of the output of the t-th round to the minimizer of
F (t)
to the most recent regularization
D
point.
. The second inequality bounds the distance of the minimizer of F (t)
D
Lemma 8. Assume the conditions of Theorem 5 hold. Then for every t
[T ], the following holds
∈
P.1 E
[ ̄wt, ̄θt]
2
[w∗t , θ∗t ]
−
≤
(cid:2)(cid:13)
(cid:13)
t := E
P.2 B2
[w∗t , θ∗t ]
(cid:13)
(cid:3)
(cid:13)
[ ̄wt
−
−
h(cid:13)
(cid:13)
1, ̄θt
1]
−
E
[ ̄wt, ̄θt]
[w∗t , θ∗t ]
2
(cid:13)
(cid:13)
[w∗t , θ∗t ]
−
E
i
−
B2
22t ; and,
≤
[ ̄wt
−
1, ̄θt
−
1]
2
B2
22(t−1) .
≤
(cid:2)(cid:13)
(cid:13)
Proof. We will prove both properties via induction on B1, ..., BT . Specifically, for each t
[T ] we
will introduce three terms Et, Ft, Gt, and show that these terms are bounded if the bound on Bt holds
1 are bounded. Property P.1 is then established as a result of the
and that Bt holds if Et
fact that E
3(Et + Ft + Gt). Note that B1 holds as the base case because
1, Gt
2
∈
−
i
(cid:13)
(cid:13)
2
≤
(cid:13)
(cid:3)
(cid:13)
h(cid:13)
(cid:13)
[ ̄wt, ̄θt]
−
[ ̄w0, ̄θ0]
1, Ft
−
−
[w∗t , θ∗t ]
2
i
B2.
(cid:13)
(cid:13)
≤
≤
i
(cid:13)
(cid:13)
h(cid:13)
[w∗1, θ∗1]
(cid:13)
−
E
h(cid:13)
(cid:13)
18
Property P.1: We here prove that if Bt is sufficiently bounded, then Et, Ft, Gt are bounded where for
t
[T ] we define
∈
Et = E
[ ̄wt, ̄θt] − [w∗S,t, θ∗S,t]
2
, Ft = E
[w∗S,t, θ∗S,t] − [
wt,
θt]
2
, Gt =
h(cid:13)
(cid:13)
(cid:13)
(cid:13)
Additionally, this will establish property P.1 because for any t
i
(cid:20)(cid:13)
(cid:13)
(cid:13)
(cid:21)
(cid:13)
(cid:13)
(cid:13)
e
e
[T ] it holds that,
∈
E
1
2tλ
(t)
Gap
wt,
θt
.
h
d
(cid:16)
e
e
(cid:17)i
(5)
E
[ ̄wt, ̄θt]
[w∗t , θ∗t ]
2
−
h(cid:13)
(cid:13)
3
≤
3
≤
E
[ ̄wt, ̄θt]
h(cid:13)
(cid:13)
E
[ ̄wt, ̄θt]
h(cid:13)
(cid:13)
−
−
|
Et
{z
i
(cid:13)
(cid:13)
[w∗S,t, θ∗S,t]
2
+ E
[w∗S,t, θ∗S,t]
(cid:13)
(cid:13)
[w∗S,t, θ∗S,t]
i
2
+ E
(cid:20)(cid:13)
(cid:13)
(cid:13)
[w∗S,t, θ∗S,t]
i
(cid:13)
(cid:13)
(cid:20)(cid:13)
(cid:13)
(cid:13)
}
2
[
wt,
θt]
+ E
(cid:21)
2
(cid:13)
(cid:13)
e
(cid:13)
θt]
+
e
wt,
[
[
(cid:20)(cid:13)
(cid:13)
1
(cid:13)
E
2tλ
−
−
Ft
e
e
(cid:21)
(cid:13)
(cid:13)
(cid:13)
wt,
θt]
−
[w∗t , θ∗t ]
e
e
Gap
(t)
(cid:20)
d
Gt
wt,
θt
(cid:16)
e
e
(cid:21) !
.
!
(6)
2
(cid:13)
(cid:13)
(cid:13)
(cid:17)(cid:21)
}
|
The second inequality comes from the strong convexity-strong concavity of the loss.
{z
}
|
{z
Bounding Et: We have that Et is bounded by the assumption made in the statement of Theorem 5.
L2
≤
22tλ2n′ ≤
2304
2
(cid:21)
B2L2
22t(L/√n′)2n′
=
B2
2304
*
22t .
*
(7)
The first inequality comes from the stability of the regularized minimizer and Lemma 4. The second in-
equality comes from the setting of λ
48L
Bounding Ft:
E
[w∗S,t, θ∗S,t]
(cid:20)(cid:13)
(cid:13)
(cid:13)
[
wt,
θt]
−
(cid:13)
(cid:13)
(cid:13)
e
e
B√n′ .
≥
Bounding Gt: We have
1
2tλ
E
(t)
Gap
wt,
θt
=
(cid:20)
d
(cid:17)(cid:21)
(cid:16)
e
e
≤
=
1
2tλ
1
2tλ
E
E
(t)
Gap
E
w∗S,t|Ft
−
1
, E
(cid:20)
E
(cid:20)
E
(cid:16)
(t)
d
Gap
S
(cid:2)
w∗S,t, θ∗S,t
1
Ft
−
(cid:21)(cid:21)
1
θ∗S,t|Ft
−
L2
2tλn′
+
(cid:2)
(cid:21)(cid:21)
(cid:3)(cid:17) (cid:12)
(cid:12)
(cid:12)
(cid:17)
(cid:3)
Ft
−
1
(cid:1) (cid:12)
(cid:12)
(cid:12)
(cid:20)
(cid:20)
(cid:16)
L2
22tλ2n′ ≤
B2
d
2304
(cid:0)
22t .
The first equality comes from the definition of [
*
θt]. The first inequality comes from Lemma 3, where
wt,
we consider the algorithm stated in the lemma to be the algorithm which outputs the exact regularized
minimizer. Note this algorithm is L2
2tλn′ stable. The second equality comes from the fact that [w∗S,t, θ∗S,t] is
the exact empirical saddle point. The final inequality uses the same analysis as in Eqn. (7).
e
e
We thus have a final bound 3(Et + Ft + Gt)
B2
22t .
≤
19
Property P.2: Now assume Bt
−
1 holds. We have
E
[w∗t , θ∗t ] − [ ̄wt
1, ̄θt
1]
−
−
2
≤ 2E
h(cid:13)
(cid:13)
i
(cid:13)
(cid:13)
≤ 2E
[w∗t , θ∗t ] − [
wt
1,
θt
1]
−
−
[w∗t , θ∗t ] − [
e
wt
e
θt
1,
−
−
e
e
(cid:13)
(cid:13)
(cid:13)
1]
(cid:13)
(cid:13)
(cid:13)
(cid:20)(cid:13)
(cid:13)
(cid:13)
(cid:20)(cid:13)
(cid:13)
(cid:13)
2
(cid:21)
2
(cid:21)
+ 2E
wt
[
−
1,
wt
−
1] − [ ̄wt
1, ̄θt
1]
−
−
2
+ 4Et
(cid:2)(cid:13)
(cid:13)
1 + 4Ft
−
e
1.
e
−
(cid:3)
(cid:13)
(cid:13)
(8)
−
1 and Ft
Above Et
lowing. First, note that the primal function F (t)(
*
∇wF (t)
w
(w∗t , θ∗t ), w∗t −
0. Similar facts hold for
≤
−
D
1 are as defined in (5). We bound the remaining squared distance term in the fol-
it holds that
, θ∗t ) is strongly convex and
w
∀
). Thus we have
∈ W
F (t)(w∗t ,
*
−
D
E
2
= E
−
wt
k
h
1 −
w∗t k
(w∗t , θ∗t ) + F (t)
e
D
(cid:13)
(cid:13)
(cid:13)
−
(cid:21)
F (t)
D
2 +
θ∗t −
k
θt
−
1k
2
(w∗t , θ∗t )
i
(w∗t ,
e
F (t)
D
−
θt
1)
−
1, θ∗t )
1)
F (t
−
D
−
(w∗t ,
1)
θt
−
+
wt
k
−
1 −
̄wt
−
2
1k
e
−
(cid:17)
e
e
−
2 +
e
θt
−
1 −
k
wt
(
−
e
1, θ∗t )
−
2
̄θt
1k
−
F (t
−
D
i
1)
(w∗t ,
1)
θt
−
+
[
wt
−
1,
1]
θt
−
[ ̄wt
−
1, ̄θt
−
1]
−
1)
e
wt
(
−
1, θ∗t )
1)
F (t
−
D
−
(w∗t ,
e
θt
−
(cid:13)
(cid:13)
e
(cid:13)
+ 2Et
−
e
1 + 2Ft
1
−
(cid:17)
1)
(cid:17)(cid:21)
(cid:17)(cid:21)
θ∗t −
(cid:13)
(cid:13)
2
̄θt
−
1
(cid:13)
(cid:13)
2
(cid:21)
(cid:13)
(cid:13)
(cid:13)
E
[w∗t , θ∗t ]
[
wt
−
1,
1]
θt
−
−
e
1, θ∗t )
−
F (t)
e
wt
(
D
(cid:16)
F (t
−
D
1)
wt
(
e
1
2tλ
1
2tλ
(cid:16)
w∗t −
1
2tλ
1
2tλ
(cid:20)
(cid:20)
(cid:20)(cid:13)
(cid:13)
E
(cid:13)
≤
(cid:20)
= E
h
− k
E
E
E
1
2
≤
≤
≤
≤
1k
1)
̄wt
−
F (t
−
D
(cid:16)
F (t
−
D
(cid:16)
1
2t
1λ
−
(t
−
e
Gap
1)
wt
(
−
1,
1)
θt
−
(cid:19)(cid:21)
e
+ 2Et
1 + 2Ft
−
1
−
2
(cid:20)
Gt
−
(cid:18)
*
1 + 2Et
d
1 + 2Ft
−
1.
e
e
−
The second inequality comes from removing the negative norm terms. The third inequality comes from the
1, as given in
definition of Et
1. The second to last inequality comes from the definition of Gt
−
Eqn. (5). Plugging this result into (8) and using the previously established bounds on Et
1, Ft
1
(which hold under the assumed bound on Bt
1) we have
1 and Ft
1, Gt
−
−
−
−
−
−
E
[w∗t , θ∗t ]
h(cid:13)
(cid:13)
[ ̄wt
−
1, ̄θt
−
1]
−
2
i
(cid:13)
(cid:13)
1
2
Gt
−
≤
1 + 6Et
−
1 + 6Ft
−
1 ≤
B2
22(t
−
1) .
20
We now turn to analyzing the utility of the algorithm to complete the proof.
proof of Theorem 5. Using the fact that
Gap is √2L-Lipschitz and property P.1, we have
E
Gap( ̄wT , ̄θT )
h
d
−
d
Gap(w∗T , θ∗T )
i
d
√2LE
[ ̄wT , ̄θT ]
[w∗T , θ∗T ]
−
√2BL
(cid:2)(cid:13)
(cid:13)
2T ≤
√2B2λ.
(cid:13)
(cid:3)
(cid:13)
≤
≤
(9)
What remains is showing E
arg max
w
∈W
F
D
(w∗T , θ). Using the fact that F
is convex-concave we have
Gap(w∗T , θ∗T )
h
i
d
D
is ̃O(B ˆα + BL
√n′ ). Let w′ = arg min
F
D
(w, θ∗T ) and θ′ =
θ
Θ
∈
Gap(w∗T , θ∗T ) = F
D
(w∗T , θ′)
F
D
−
(w′, θ∗T )
G
D
≤ h
(w∗T , θ∗T ), [w∗T , θ∗T ]
[w′, θ′]
i
−
d
where G
saddle operator for F (T )
D
we have
is the population loss saddle operator. Further by the definition of F (T ) and denoting G(T )
D
(10)
as the
D
G
D
(w∗T , θ∗T ) = G(T )
D
(w∗T , θ∗T )
2λ
−
T
1
−
t=0
X
2t+1([w∗T ,
θ∗T ]
−
−
[ ̄wt,
−
̄θt])
Thus plugging the above into Eqn. (10) we have
Gap(w∗T , θ∗T )
≤
d
(w∗T , θ∗T ), [w∗T , θ∗T ]
−
[w′, θ′]
2t+1([w∗T ,
θ∗T ]
−
−
[ ̄wt,
E
−
̄θt]), [w∗T , θ∗T ]
2t+1([w∗T ,
θ∗T ]
−
−
[ ̄wt,
−
̄θt]), [w∗T , θ∗T ]
−
−
[w′, θ′]
(cid:29)
[w′, θ′]
(cid:29)
G(T )
D
D
2λ
−
(cid:28)
T
1
−
t=0
P
1
T
−
2λ
(cid:28)
T
t=0
P
1
−
≤ −
2Bλ
≤
= 2Bλ
2t+1
[w∗T ,
θ∗T ]
−
−
[ ̄wt,
−
̄θt]
(cid:13)
(cid:13)
[w∗T , θ∗T ]
2t+1
(cid:13)
(cid:13)
[ ̄wt, ̄θt]
.
−
(cid:13)
(cid:13)
(cid:13)
(cid:13)
t=0
P
1
T
−
t=0
P
Above, the second inequality comes from the first order optimally conditions for [w∗T , θ∗T ], the third from
Cauchy Schwartz and a triangle inequality. The final equality uses the definition of the Euclidean norm and
b)2.
the fact that for any a, b
b))2 = (a
R, (
a
∈
−
−
(
−
−
21
Taking the expectation on both sides of the above we have the following derivation,
E
Gap(w∗T , θ∗T )
h
d
(i)
≤ 4BE
λ
−
T
1
"
2t+1
[w∗T , θ∗T ] − [ ̄wt, ̄θt]
≤ 2BE
i
λ
"
T
1
−
t=0
X
2t
[w∗t+1, θ∗t+1] − [ ̄wt, ̄θt]
(cid:13)
(cid:13)
T
1
−
+
(cid:13)
(cid:13)
[w∗t+1, θ∗t+1] − [ ̄wt, ̄θt]
(cid:13)
(cid:13)
+
r=t+1
X
1
T
−
#
(cid:13)
(cid:13)
(cid:13)
(cid:13)
[w∗t+1, θ∗t+1] − [ ̄wt, ̄θt]
(cid:13)
(cid:13)
+ λ
r=t+1
X
1
−
T
(cid:13)
(cid:13)
2t
T
1
−
t=0
X
1
T
−
t=0
X
1
T
−
2t
2t
k[w∗r+1, θ∗r+1] − [w∗r , θ∗r ]k
!#
[w∗r+1, θ∗r+1] − [ ̄wr, ̄θr]
+
[ ̄wr, ̄θr] − [w∗r , θ∗r ]
(cid:13)
(cid:13)
(cid:13)
(cid:13)
!#
(cid:13)
(cid:13)
[w∗r+1, θ∗r+1] − [ ̄wr, ̄θr]
+
[ ̄wr, ̄θr] − [w∗r , θ∗r ]
t=0
X
T
−
λ
1
(cid:13)
(cid:13)
2t
(cid:13)
(cid:13)
[w∗t+1, θ∗t+1] − [ ̄wt, ̄θt]
t=0
X
T
−
+ λ
1
r
r=t+1
X
1
−
2t
(cid:0)(cid:13)
(cid:13)
[w∗r+1, θ∗r+1] − [ ̄wr, ̄θr]
(cid:13)
(cid:13)
+
(cid:13)
(cid:13)
[ ̄wr, ̄θr] − [w∗r , θ∗r ]
t=0
X
1
−
2t
(cid:13)
(cid:13)
[w∗t+1, θ∗t+1] − [ ̄wt, ̄θt]
(cid:13)
(cid:13)
+ λ
r=1
X
1
−
T
t=0
X
[w∗r+1, θ∗r+1] − [ ̄wr, ̄θr]
(cid:0)(cid:13)
(cid:13)
+
(cid:13)
(cid:13)
(cid:13)
(cid:13)
[ ̄wr, ̄θr] − [w∗r , θ∗r ]
r
1
−
(cid:13)
(cid:13)
2t
r=1
X
(cid:0)(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
t=0
X
(cid:1)
(cid:13)
(cid:13)
#
(cid:1)
(cid:13)
(cid:13)
#
(cid:1)
#
≤ 4BE
λ
"
= 4BE
λ
"
(ii)
= 4BE
"
T
= 4BE
λ
"
(iii)
≤ 4B
λ
t=0
X
1
T
−
(cid:13)
(cid:13)
2t
T
t=0
X
1
−
2t
≤ 4B
λ
(cid:13)
(cid:13)
r
1
−
T
1
−
+ λ
2B
2r
B
2t
(cid:19)
(cid:18)
B
2t
T
+ λ
r=1 (cid:18)
X
1
−
(cid:19)
t=0
X
2 * 2r
B
2r
−
1
(cid:19)
1
−
!
2t
!
T
1
−
= 4λ
(cid:18)
t=0
X
B2 + 8λ
(cid:19)
1
T
−
r=1 (cid:18)
X
B2
t=0
X
≤ 12T λB2
r=1
X
(11)
Above, (i) and the following inequality both come from the triangle inequality. Equality (ii) is obtained by
rearranging the sums. Inequality (iii) comes from applying properties P.1 and P.2 proved above. The last
equality comes from the setting of λ and T .
Now using this result in conjunction with Eqn. (9) we have
Gap(
) = √2λB2 + 12T λB2 = O
log(n)B2λ
.
R
Above we use the fact that T = log( L
Bλ ) and λ
≥
L
(cid:0)
B√n′ , and thus T = O(log(n)).
(cid:1)
Finally, we prove Theorem 1 leveraging the relative accuracy assumption.
Proof of Theorem 1. First, observe that under the setting of λ = 48
B
ˆα + L
√n′
used in the theorem state-
ment that log(n)B2λ = O
condition required by Theorem 5 holds. That is, we now show that if
[ ̄wt, ̄θt]
(cid:16)
[T ] it holds that E
log(n)B ˆα + log3/2(n)BL
for all t
[w∗S,t, θ∗S,t]
B2
22t .
√n
(cid:17)
2
(cid:16)
A
≤
12
*
∈
. Thus what remains is to show that the distance
emp satisfies ˆα-relative accuracy, then
(cid:17)
To prove this property, we must leverage the induction argument made by Lemma 8. Specifically, to
i
(cid:13)
(cid:13)
t = E
[T ], assume B2
22(t−1) (recall
prove the condition holds for some t
[w∗t , θ∗t ]
h(cid:13)
(cid:13)
[ ̄wt
B2
1]
2
1, ̄θt
−
−
−
≤
−
∈
(cid:2)(cid:13)
(cid:13)
22
(cid:13)
(cid:3)
(cid:13)
the base case for t = 1 trivially holds). As shown in the proof of Lemma 8, this implies that the quantities
22t . We thus have
Ft, Gt (as defined in 5) are bounded by
E
[ ̄wt, ̄θt]
h(cid:13)
(cid:13)
[w∗S,t, θ∗S,t]
−
2
i
(cid:13)
(cid:13)
E
B2
2304
*
F (t)
S ( ̄wt, θ∗S,t)
h
ˆαE
[w∗S,t, θ∗S,t]
(i)
≤
(ii)
k
(cid:2)
k
(cid:2)
≤
ˆαE
≤
(iii)
F (t)
S (w∗S,t, ̄θt)
i
[ ̄wt
−
1, ̄θt
−
1]
k
−
2tλ
−
2tλ
[w∗S,t, θ∗S,t]
−
[w∗t , θ∗t ]
+
k
2tλ
(cid:3)
[w∗t , θ∗t ]
k
[ ̄wt
−
1, ̄θt
−
1]
k
−
(cid:3)
(√Ft + √Gt + Bt)ˆα
2tλ
where Bt is as defined in property P.2. Inequality (i) comes from Lemma 2. Inequality (ii) comes from the
ˆα-relative accuracy assumption on
emp, and the fact that each f (t) is 2L-Lipschitz. That is, observe
22t ,
1λ ≤
2B ˆα
2t2t
(12)
12
(iv)
≤
≤
−
*
B2
A
max
∈W×
Θ
w,θ
∇
f (t)(w, θ, x)
(cid:13)
(cid:13)
(cid:13)
≤
Xk=0
Inequality (iii) comes from a triangle inequality and the definition of Ft, Gt and Bt. Inequality (iv)
comes from the induction hypothesis (specifically property P.2) and the bounds on Ft and Gt established
above. The last inequality in Eqn. (12) comes from the setting λ
48 ˆα/B.
(cid:13)
(cid:13)
(cid:13)
1
t
−
L + 2
B2k+1λ
L + 4B2T λ
5L
≤
≤
≥
C Missing Results from Section 4
C.1 Stochastic Gradient Descent Ascent (SGDA)
Θ
7→
W ×
R have saddle operator G :
Let F :
W ×
7→
SGDA algorithm in the following manner. Let T, η
0. Let [w0, θ0] be any vector in
W ×
the following update rule. For t
∇t be a random vector (which may depend on
and [w0, θ0], ..., [wt
1) conditional on [wt
1, θt
has bounded variance. We define
Rd and associated strong gap GapF . We define the
Θ. SGDA uses
∇1, ...,
1, θt
1]) that is a unbiased estimate of G(wt
∇t
1
−
1] and
1] let
1, θt
[T
≥
−
Θ
∈
−
−
−
−
−
−
[wt, θt] = Π
W×
Θ ([wt
−
1, θt
1]
η
∇t) ,
t
[T
1]
−
∈
−
Θ. The output of SGDA is defined to be
−
where Π
W×
Θ is the orthogonal projection onto
W ×
[ ̄w, ̄θ] =
1
T
T
−
1
[wt, θt].
t=0
X
We have the following result for the convergence of SGDA.
(13)
(14)
Lemma 9. Assume
algorithm,
k∇t −
, that is SGDA run with parameters T, η > 0 satisfies for any w
h
∇t] = G(wt, θt) and E
1] that E [
t
∀
[T
−
∈
A
G(wt, θt)
k
and θ
∈ W
2
i
∈
≤
Θ,
τ 2, then the
E
F ( ̄w, θ)
F (w, ̄θ)
−
[w0, θ0]
k
−
2ηT
≤
[w, θ]
2
k
+
η
2
(cid:2)
(cid:3)
L2 + τ 2
(cid:0)
(cid:1)
23
This result is somewhat implicit in [YHL+22, Lemma 3], but for completeness we provide a short proof
here.
Proof. By the convexity-concavity of F we have for any [w, θ]
Θ that
F (wt, θ)
F (w, θt)
−
≤ h
∈ W ×
G(wt, θt), [wt, θt]
[w, θ]
i
−
and thus taking the expectation (conditional on [wt, θt]) and using the fact that each
∇t is unbiased we have
E [F (wt, θ)
F (w, θt)]
−
≤
E [
∇t] , [wt, θt]
−
[w, θ]
.
2 and the fact that the projection is nonexpansive, we have
D
E
Using 2
a, b
h
i
E [F (wt, θ)
−
=
a
2 +
k
k
k
F (w, θt)]
b
2
k
− k
a
b
k
−
G(wt, θt)
k
2
− ∇tk
(cid:17)(cid:21)
E
≤
= E
E
≤
1
2η
1
2η
1
2η
(cid:20)
(cid:20)
(cid:20)
k
(cid:16)
k
(cid:16)
k
(cid:16)
[wt, θt]
[wt, θt]
[wt, θt]
[w, θ]
2
k
− k
[w, θ]
2
k
− k
[w, θ]
2
k
− k
−
−
−
[wt+1, θt+1]
[wt+1, θt+1]
[wt+1, θt+1]
k
k
2
(cid:17)
2
(cid:17)
2
[w, θ]
[w, θ]
[w, θ]
k
−
−
−
+
+
2
η
2 k∇tk
η
2
(cid:21)
2 +
G(wt, θt)
k
k
+
L2 + τ 2
,
(cid:16)
η
2
where in the first equality we use that E[
stochastic oracle.
(cid:17)(cid:21)
G(wt, θt), G(wt, θt)
h
(cid:0)
− ∇ti
(cid:1)
] = 0, due to the unbiasedness of the
Summing over all T iterations and taking the average we obtain for the average iterate, ̄w, ̄θ, and any
[w, θ]
∈ W ×
Θ that
E
F
"
1
T
(cid:16)
T
1
−
t=0
X
wt, θ
F
w,
(cid:16)
−
(cid:17)
1
T
T
θt
# ≤
(cid:17)
s=1
X
≤
T
−
1
[F (wt, θ)
E
1
T
"
t=0
X
[w0, θ0]
k
F (w, θt)]
−
#
−
2ηT
[w, θ]
2
k
+
η
2
L2 + τ 2
(cid:0)
(cid:1)
C.2 Private algorithm for the empirical gap (Noisy SGDA)
We here provide an implementation of SGDA (see Appendix C.1 above) which is differentially private and
ǫ
yields convergence guarantees for the empirical gap. Let M1, ..., MT each be a batch of m = max
4T , 1
samples, each sampled uniformly with replacement from S. Let σ2 = c0T L2 log(1/δ)
for some universal con-
(cid:9)
stant c0 and ξ1, . . . , ξT each be sampled i.i.d. from
(0, Idσ2). We define
n2ǫ2
p
n
(cid:8)
N
∇t =
1
m
Mt
Xx
∈
g(wt
−
1, θt
−
1; x) + ξt.
Notice that
operator, GS, for some finite τ .
∇t as defined above satisfies the assumptions for Lemma 9 with respect to the empirical saddle
We have the following result for SGDA run with this stochastic oracle.
24
Theorem 6. Let [w, θ]
with
∇1, . . . ,
has gradient complexity O
Θ such that E [
∈ W ×
k
∇T as described above, T = min
min
n2ǫ1.5
√d log(1/δ)
(cid:18)
(cid:26)
n
, n3/2
o
, and satisfies
(cid:27)(cid:19)
[w0, θ0]
[w, θ]
]
−
n2ǫ2
32d log(1/δ)
n
8 ,
≤
k
, and η =
ˆD. Let
A
ˆD
L√T
be the algorithm SGDA run
. Algorithm
is (ǫ, δ)-DP,
A
E
FS( ̄w, θ)
−
FS(w, ̄θ)
= O
(cid:2)
(cid:3)
ˆDL
d log(1/δ)
nǫ
p
+
ˆDL
√n !
.
The proof of the utility guarantee follows directly from applying Lemma 9 with τ = O(L + √dσ) =
O(L). The proof of the privacy guarantee relies on the moments accountant analysis, for which we provide
the following restatement.
Theorem 7 ([ACG+16, KLL21]). Let ǫ, δ
, and let h1, ..., hT :
over some domain
L. Let σ
Y
∈
Y 7→
∈
, t
[T ],
∈ Y
ht(y)
any y
≥
batches of size B1, .., Bt of size b uniformly at random and outputs 1
b
gt ∼ N
(0, Iσ2), is (ǫ, δ)-DP.
and T
k2 ≤
≥
k
cL√T log(1/δ)
nǫ
n2ǫ
b2 . Then the algorithm which samples
[T ] where
ht(y) + gt for all t
∈
y
Bt
∈
P
(0, 1] and c be a universal constant. Let D
n be a dataset
Rd be a series of (possibly adaptive) queries such that for
∈ Y
It can be verified for the described noisy SGDA implementation that σ
and thus the algorithm is (ǫ, δ)-DP.
c1L√T log(1/δ)
nǫ
and T
n2ǫ
m2
≥
≥
D Missing Result from Section 5
D.1 Low variance and weak gap implies strong gap
proof of Proposition 2. Consider the virtual algorithm,
A
algorithm is deterministic and does not depend on any specific dataset drawn from
function at the output of
is bounded by the weak gap of
. We have
A h
∼D
D
B
n,
ˆS
,
(
A
) =
E
w,
= [
θ]. Note this
( ˆS)
i
. We first show that gap
e
D
e
B
Gap(
B
,
(
A
D
d
A
F
min
∈W {
w
, θ
} −
Aw( ˆS)
h
i
Aw( ˆS), θ)
(
(cid:17)(cid:27)
)) = max
θ
Θ {
F
D
∈
,
Bw(
(
A
D
), θ)
(w,
,
Bθ(
A
D
))
}
D
= max
Θ
θ
∈
F
D
(cid:26)
≤
max
ˆS
Θ
θ
∈
= Gapweak(
(cid:26)
∼D
),
A
E
n,
ˆS
(cid:16)
E
n,
∼D
Aw
F
D
Aw
h
−
F
min
w
∈W (cid:26)
D
w,
ˆS
E
n,
∼D
Aθ
−
min
w
∈W (cid:26)
ˆS
∼D
F
(w,
D
Aθ
h
i(cid:27)
(cid:16)
E
n,
Aθ( ˆS)
h
Aθ( ˆS))
i (cid:17)(cid:27)
i(cid:27)
(15)
where the second equality follows from the definition of
ity.
B
and the inequality follows from Jensen's inequal-
Now by the assumption that
is low variance, we have
A
2
E
,S
A
(S)
kA
h
,
(
A
)
k
D
− B
2
i
(S)
A
= E
,S "(cid:13)
A
(cid:13)
(cid:13)
(cid:13)
E
ˆS
∼D
n,
−
25
( ˆS)
A
A h
i(cid:13)
(cid:13)
(cid:13)
(cid:13)
τ 2.
# ≤
(16)
Thus using the Lipschitzness of
Gap we obtain
Gap(
)
A
−
Gapweak(
) = E
S,
d
A
Gap(
Gap(
d
Aw(S),
Aθ(S))
i
Aw(S),
Aθ(S))
i
]
)
,
(
(S)
≤
k
A
− B
D
−
−
[
d
kA
A h
E
S,
A h
L E
S,
A
≤
≤
Gapweak(
)
A
Gap(
B
,
(
A
D
))
Lτ.
d
The first inequality comes from Eqn. (15). The second inequality comes from the Lipschitzness of the gap
function. The third inequality comes from Eqn. (16). Thus we ultimately have
D.2 Stability-Risk Tradeoff
Gap(
)
A
≤
Gapweak(
) + Lτ.
A
(17)
proof of Theorem 4. Let f (w; x) =
K. For any σ
and define U =
1
}
standard basis vector. We will denote F (w; Sσ) = 1
n
w, x
i
h
∈
U define Sσ =
{±
. Let 0 < K < min
{
n, d
}
Lσ1e1, ..., LσKeK, 0, ..., 0
{
}
Sσ f (w; x). Note that
x
∈
be a parameter to be chosen later
, where ej is the j'th
w∗σ = arg min
w
∈W
P
F (w; Sσ)
}
{
=
B
√K
σjej.
−
[K]
Xj
∈
Further, for any σ
U , F (w∗σ; Sσ) =
∈
BL√K
n
.
−
By Yao's minimax principle, it suffices to consider deterministic algorithms and lower bound the ex-
pected risk w.r.t. some distribution over the packing. Considering the uniform distribution over the packing
and setting K = B2
∆2 we have
E
Unif(U)
σ
∼
[F (
(Sσ); Sσ)
A
F (w∗σ; Sσ)] =
−
1
U
|
σ
| X
U
∈
F (
(Sσ); Sσ) +
A
BL√K
n
(i)
=
=
=
(ii)
≥
=
=
n
n
|
1
U
|
1
U
n
|
1
U
n
1
n
1
U
|
σ
| X
U
∈
1
U
| Xj
∈
σ
U
[K] X
∈
[K]
Xj
∈
LσjA
(Sσ)j +
1
n
LσjA
(Sσ)j +
BL
√K
BL
√K
[K]
Xj
∈
L
| Xj
∈
σ
[K] X
∈
U:σj =1
(Sσ)j − A
A
(cid:0)
(Sσ−j )j
+
2BL
√K
(cid:1)
L∆ +
−
2BL
√K
BL
√K
| Xj
∈
σ
[K] X
∈
U:σj =1
σ
[K] X
∈
U:σj =1
|
| Xj
∈
BL√K
2n
26
where (i) comes from the definition of the loss function and the fact that the dataset consists of K standard
basis vectors (up to sign) and n
(i.e.
(Sσ−j )j − A
A
n = B2L
that BL√K
∆n .
K zero vectors and (ii) comes from the ∆ = B
√K
(Sσ−j )j ≥ −
A
∆). Finally, note that by the setting of K
stability property of
(Sσ)j − A
(Sσ)j ≤
−
∆ =
⇒ A
27
|
|
http://arxiv.org/abs/2302.12906v2 | 2023-03-28T11:17:58 | 2023-02-24T21:25:07 | Generative Invertible Quantum Neural Networks | Invertible Neural Networks (INN) have become established tools for the
simulation and generation of highly complex data. We propose a quantum-gate
algorithm for a Quantum Invertible Neural Network (QINN) and apply it to the
LHC data of jet-associated production of a Z-boson that decays into leptons, a
standard candle process for particle collider precision measurements. We
compare the QINN's performance for different loss functions and training
scenarios. For this task, we find that a hybrid QINN matches the performance of
a significantly larger purely classical INN in learning and generating complex
data. | [
"Armand Rousselot",
"Michael Spannowsky"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12906v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12906v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "hep-ph",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"hep-ph",
"cs.AI",
"cs.LG",
"quant-ph"
] | 3
2
0
2
r
a
M
8
2
]
h
p
-
p
e
h
[
2
v
6
0
9
2
1
.
2
0
3
2
:
v
i
X
r
a
SciPost Physics
Submission
Generative Invertible Quantum Neural Networks
Armand Rousselot1(cid:63) and Michael Spannowsky2 †
1 Interdisciplinary Center for Scientific Computing, Universität Heidelberg, Germany
2 Institute for Particle Physics Phenomenology, Department of Physics, Durham University, DH1
3LE, United Kingdom
(cid:63) [email protected]
March 29, 2023
Abstract
Invertible Neural Networks (INN) have become established tools for the simulation and
generation of highly complex data. We propose a quantum-gate algorithm for a Quantum
Invertible Neural Network (QINN) and apply it to the LHC data of jet-associated production
of a Z-boson that decays into leptons, a standard candle process for particle collider preci-
sion measurements. We compare the QINN's performance for different loss functions and
training scenarios. For this task, we find that a hybrid QINN matches the performance of a
significantly larger purely classical INN in learning and generating complex data.
1 Introduction
Generative modelling has been a field of particular interest in machine learning research, be-
ing vastly improved by successful model architectures, including Variational Autoencoders (VAE),
Generative Adversarial Networks (GAN) and Invertible Neural Networks (INN) [1–3]. Among
other applications, their use in event generation has been extensively investigated [4–6]. Their
advantages over the Markov chain Monte Carlo (MCMC) techniques [7–11], which had so far
established themselves as the leading LHC simulation and interpretation methods go beyond an
increase of inference speed. Furthermore, generative models can be trained end-to-end, allow-
ing for a much more comprehensive range of applications such as unfolding [12–14], anomaly
detection [15–19] and many more [20].
However, the large parameter space of these Neural Networks (NN), which allows them to
model complex interactions, also leads to a massive demand for computing resources. The size
of popular NN architectures has long reached the boundary of computational feasibility. Quan-
tum Machine Learning (QML) introduces the power of quantum computing to the existing foun-
dation of machine learning to establish and then exploit the quantum advantage for a perfor-
mance increase exclusive to quantum algorithms. While gate-based quantum computing differs
significantly from classical computing, many equivalents to aforementioned classical generative
networks have already been constructed, including Quantum Autoencoders [21] and Quantum
GANs [22–27]. The notable exception is INNs [28, 29], which have not yet been transferred to
the realm of QML. Such networks would be a desirable addition to the array of Quantum Neural
Networks (QNN). While tractability of the Jacobian determinant in classical INNs enables them to
perform density estimation, which intrinsically prevents mode collapse, the full Jacobian matrix
†Our code is available at: https://gitlab.com/RussellA/quantumML/
1
SciPost Physics
Submission
can usually not be computed efficiently [30]. A fully tractable Jacobian in INNs, available for
QNNs, would allow efficient learning of the principal data manifolds [31–34], opening up oppor-
tunities for interpretable representation learning and new insights into underlying processes.
Coupling-based INN architectures have empirically shown to be more resilient to the vanishing-
gradient problem [28], which lets them directly benefit from deep architectures with many pa-
rameters. However, many of the INN applications listed so far already require considerable re-
sources for training. Current research suggests that quantum models could circumvent this need
for an immense parameter space. They outclass regular NNs in terms of expressivity, being able
to represent the same transformations with substantially fewer parameters [35–39]. This theo-
retical groundwork is bolstered by several instances of specifically constructed QML circuits pre-
senting significantly more efficient solutions than classically possible to specially designed prob-
lems [40–43]. QNNs have already been successfully applied to relatively limited high-energy
physics problems [21, 25, 44–46, 46–51], along non-QML approaches [52–56]. However, to our
knowledge, there has not yet been an attempt to construct an invertible QNN that can be used as
a density estimator through its invertibility for generative tasks.
With this work, we aim to fill the remaining gap of a quantum equivalent to classical INNs,
developing a Quantum Invertible Neural Network (QINN). We show how each step in the QNN
pipeline can be designed to be invertible and showcase the ability of a simulated network to
estimate the density of distributions. As a proof-of-principle, we apply our model to complex
simulated LHC data for one of the most important and most studied high-energy physics processes,
pp → Z j → (cid:96)+(cid:96)−
j ,
and show its capability to reconstruct the invariant mass MZ . While currently available noisy
intermediate-scale quantum computers (NISQ) cannot support models required for even basic
generative tasks, the concept of inverting QNNs still shows promise in light of the aforementioned
theoretical and simulation-based results, documenting their increased expressivity. As we will
confirm in our experiments, QINNs have the potential to express the same set of transformations
as classical INNs with much fewer parameters.
This study is structured as follows: In Sec. 2 we provide a short review of classical Invertible
Neural Networks. Then, Sec. 3 is dedicated to our proposal for a Quantum Invertible Neural
Network based on quantum-gate algorithms and outlining its technical challenges. Next, we apply
the QINN to simulated LHC data in Sec. 4. We offer a brief summary and conclusions
2 Classical Invertible Neural Networks
To illustrate the advantages of invertible models and to benchmark the performance of the QINN,
we first present the architecture of a classical INN. As we will see in the following section, we
can train any model to perform density estimation as long as it fulfils the Jacobian determi-
nant's requirements of invertibility and availability. To meet these requirements, the INNs are
constructed using coupling blocks, see Fig. 1. Each coupling block splits the data vector in two
halves x = [u, v]T along the feature dimension, transforming one half at a time. The parameters
for this transformation are predicted by a small model, e.g. a neural network, based on the other
half of the data. The transformation used as a benchmark in this work are cubic spline coupling
blocks [57]. However, we will introduce affine coupling blocks first as a simpler example.
The affine coupling block performs an element-wise linear transformation on one half u, with
2
SciPost Physics
Submission
Spline Coupling
u
Affine Coupling
x
NN
v
ˆx
Figure 1: Layout of a coupling block. The input is split into two halves along the feature
dimension. One half is used as neural network input to predict parameters for either an
affine or a spline transformation of the other. In the end, both halves are fused again.
The blue lines illustrate example coupling transformations of both block types, based on
the network output (black knots). The orange line shows the inverse transformation.
3
SciPost Physics
Submission
parameters s(v), t(v) predicted by a neural network from the other half v
(cid:21)
(cid:20)ˆu
ˆv
=
(cid:21)
(cid:20)u (cid:12) es(v) + t(v)
v
.
The inverse is now trivially given by
(cid:21)
(cid:20)u
v
=
(cid:20)(ˆu − t(ˆv)) (cid:12) e−s(ˆv)
ˆv
(cid:21)
.
(1)
(2)
In each layer the Jacobian is an upper triangular matrix, as the transformation of ui only depends
on v and ui
J =
(cid:19)
(cid:18)
diag es(v) finite
0
(cid:73)
.
(3)
◦ f2
) det J( f2
) = det J( f1
Therefore the Jacobian determinant can be calculated and using det J( f1
),
the Jacobian determinant for the entire network can be assembled from all blocks individually.
In this configuration of the coupling block, the lower half v stays unchanged. After each block, a
unitary soft-permutation matrix is applied to the data vector to mitigate this fact. Since this matrix
is invertible and the Jacobian determinant is 1, this does not influence the network prerequisites.
The spline coupling block is functionally similar, except that the transformation performed in
each block is a cubic spline of u, predicted from v. Given several buckets, ξ − 1 (hyperparameter),
the coupling block subnetwork predicts 2ξ + 2 parameters for each ui. These parameters serve as
anchor points for a cubic spline on ui, meaning x, y coordinates for ξ bucket boundaries (ensuring
< yi+1) and two values to define the slope of the interpolating spline in the
that xi
two outer anchor points. Since each bucket is simply a monotonous cubic function of u, the
whole transformation is invertible, and the same argument for the triangularity of the Jacobian
from the affine coupling blocks still holds. Spline couplings trade increased computation time for
higher expressivity per parameter, which is why we choose them for the comparison to QINNs
in Sec. 4. We implement these networks in PYTORCH using the FREIA module [58], where finer
implementation details can be found.
< xi+1, yi
2.1 Density Estimation using Invertible Models
We aim to train the model to estimate the density of some given training data with distribution
p(x). This is achieved by learning a bijective mapping f , defined by network parameters θ , from
some desired distribution p(x), x ∈ Rn to a normal distribution
f (x ∼ p(x)|θ ) ∼ (cid:78) n
0,1
(z).
(4)
With an invertible network function f , new data can straightforwardly be generated from the
desired distribution by sampling x ∼ f −1(z ∼ (cid:78) n
(z)|θ ) =: p(x|θ ). To construct a loss function,
0,1
we can use the change of variables formula
p(x|θ ) = (cid:78) n
0,1
( f (x|θ ))
(cid:12)
(cid:12)
det
(cid:12)
(cid:12)
(cid:129) ∂ f
∂ x
(cid:139)(cid:12)
(cid:12)
(cid:12)
(cid:12)
.
(5)
The training objective is to find the network parameters θ which maximise the probability of
observing the training data from our model f
4
SciPost Physics
Submission
max
θ
p(θ |x) ∝ p(x|θ )p(θ ).
(6)
We can transform this expression to obtain a loss function, by minimizing the negative log likeli-
hood, and substitute Equation 5 for p(x|θ ). Finally we assume a gaussian prior on p(θ ) = exp(τθ 2)1
and write J = det
to get the loss function
(cid:138)
(cid:128) ∂ f
∂ x
(cid:76) = (cid:69)
(cid:20) || f (x|θ )||2
2
2
(cid:21)
− log |J|
+ τ||θ ||2
2.
(7)
Therefore all we need to train a model to perform density estimation is invertibility and the
ability to calculate its Jacobian determinant w.r.t. the input x.
2.2 Maximum Mean Discrepancy
We can improve targeted observables by using a so-called Maximum Mean Discrepancy (MMD)
loss [59]. MMD estimates the distance of two given distributions in some Reproducing Kernel
Hilbert Space. In our case we want to minimize the distance d(p(φ(x)), p(φ( f −1(z|θ ))) given
some features of our choice φ. MMD approximates this distance given samples from the two
distributions X ∼ p(x) and Y ∼ p( f −1(z|θ )) and a function φ
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
(cid:76) 2
M M D
=
1
|X |
(cid:88)
x∈X
φ(x) − 1
|Y |
(cid:88)
y∈Y
(cid:88)
1
|X |2
x∈X
x (cid:48)∈X
φ(x)T φ(x
(cid:48)) + 1
|Y |2
=
(cid:12)
(cid:12)
2
(cid:12)
(cid:12)
φ( y)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
2
(cid:88)
φ( y)T φ( y
(cid:88)
y∈Y
y (cid:48)∈Y
(8)
(cid:48)) − 2
1
|X ||Y |
(cid:88)
(cid:88)
x∈X
y∈Y
φ(x)T φ( y).
Since all appearances of φ involve the inner product φ T (*)φ(*) we can use the kernel trick to
substitute them with a matching kernel k that calculates the induced vector product < *, * >φ
(cid:76) 2
M M D
=< X , X >φ + < Y, Y >φ −2 < X , Y >φ
= k(X , X ) + k(Y, Y ) − 2k(X , Y ).
(9)
The kernel should be selected according to the distributions that are being compared. Since a
Gaussian-like distribution is generally a sufficient approximation in most cases, we use the gaus-
sian kernel function
kgauss
(x, y) = exp
(cid:18)
−
||x − y||2
2
2σ2
(cid:19)
.
(10)
In our experiments we will also apply a MMD to the invariant mass of a Z-Boson MZ . In this case,
since it has a Breit-Wigner distribution we use the corresponding kernel
kBreit-Wigner
(x, y) =
σ2
σ2 + ||x − y||2
2
.
(11)
1In our experiments we found it sufficient to set τ = 0 for quantum parameters, which indicates a uniform weight
prior on the qubit rotation angles.
5
SciPost Physics
State Preparation
Layer 1
Layer 2
|0〉
R y
(x1
)
Rot(θ )
|0〉
R y
(x2
)
Rot(θ )
|0〉
R y
(x3
)
Rot(θ )
Rot(θ )
Rot(θ )
Rot(θ )
Submission
Measurement
y1
y2
y3
Figure 2: An overview of the model circuit. We show a three-qubit, two-layer model
following the hardware efficient ansatz from [61]. The state preparation uses angle
encoding, where each feature is encoded on its qubit. The learnable parameters of the
model circuit are the rotation angles θ in each layer.
The parameter σ determines the width of the kernel. Choosing this width correctly is of-
2 then k(x, y) (cid:39) 0 and if
ten more important than the correct kernel shape.
σ (cid:29) ||x − y||
2 then k(x, y) (cid:39) 1. In both cases, (cid:76)
M M D will be very close to zero, and the gradi-
ent will vanish. While methods exist that adaptively change σ over the training to fit the model
distribution, another easy and effective way is to use multiple kernels of different widths.
If σ (cid:28) ||x − y||
Classical INNs generally do not benefit greatly from an additional MMD loss for the overall
training apart from improving specifically targeted observables. However, we found that applying
MMD on both the latent and input sides of the QINN to all training observables, even simulta-
neously to train a gaussian latent and the target input distribution, significantly improves perfor-
mance.
3 Invertible Quantum Neural Networks
As we will illustrate in this section, QNNs lend themselves well to being inverted, requiring very
few modifications from their most basic form. For example, the underlying architecture of a circuit-
centric QNN [60] can be split into three distinct parts, state preparation, model circuit and mea-
surement as seen in Fig. 2.
State preparation transforms a given data point x = (x1, . . . , xn
)T from the classical domain
into a quantum state |x〉. One of the simplest methods to achieve this is angle encoding, in which
each input dimension is interpreted as an angle for a qubit rotation. Therefore, the number
of qubits is fixed as the number of feature dimensions n. The entire dataset is first scaled to
(cid:82)n → [0, π]n. Next, we apply a global linear transformation to the input with trainable param-
eters a ∈ [0, 1]n ; b ∈ [0, 1 − a]n, clipped to prevent x /∈ [0, π]. We obtain a quantum state by
defining a state preparation operator Sx
(x), which acts on the initial state
= R y
|x〉 = Sx
|0〉⊗n =
n
(cid:79)
i=1
cos(xi
) |0〉 + sin(xi
) |1〉 .
(12)
When performed this way, inverting the state preparation is straightforward since simply measur-
ing P(qubit i = 1) gives 〈x|σ
) =⇒ arcsin (cid:0)(cid:198)〈x|σ
|x〉 = sin2(xi
|x〉(cid:1) = xi.
z,i
z,i
6
SciPost Physics
Submission
F
H
|0〉
|x〉
g(y)
U
n
n
H
| y〉
| ̃y〉
SWAP
Figure 3: The SWAP-test, comparing a state | y〉 = U |x〉 created in the forward direction
to | ̃y〉 = g( y) created by the ISP. The CSWAP gate acts pairwise on the wires, i.e. y1 is
swapped with ̃y1, etc.
The model circuit is the quantum analogue of a classical neural network, mapping the prepared
state to the output state |x〉 (cid:55)→ U |x〉 =: | y〉. The circuit comprises modular layers U = Ul . . . U1.
Each layer starts with a rotation gate for each qubit Rot(φ, θ , η) parameterized by trainable
weights [61]. Afterwards, the qubits are entangled by applying CNOT gates between each adjacent
pair of qubits and from the last to the first qubit. The entire model circuit can be straightforwardly
inverted by applying the adjoint to each layer in the reverse order
The adjoint operation to each of the gates is simple to obtain
U † = (Ul . . . U1
)† = U †
1 . . . U †
l .
Rot †(φ, θ , η) = Rot(−η, −θ , −φ)
C N OT †(i, j) = C N OT (i, j).
(13)
(14)
(15)
Finally we measure P(qubit i = 1) for all n qubits and apply another trainable global linear
transformation with parameters c, d ∈ (cid:82)n
| y〉 (cid:55)→ c 〈 y|σ
z
| y〉 + d.
(16)
Inverting the final measurement is not directly possible, as many different states can lead to the
same expectation value (cid:69)[ y]. Note that the model function can still be bijective if no two created
states yield the same (cid:69)[ y]. Since the network input is x ∈ Rn the set of created final states only
exists in a S ⊆ (cid:67)2n
, s.t. dim S = n subspace of the state space. However, we need to ensure that S
does not share any (cid:69)[ y], as well as find the proper method to perform the inverse state preparation
(ISP) for each data point.
3.1 Inverse State Preparation
Given a model circuit U and a data point y that arose from measuring | y〉 = U |x〉, it is infeasible
to search for an ISP method that creates | y〉 from y. Therefore we instead aim to train the model
circuit U in a way such that for a given fixed ISP g, the state | y〉 before the measurement and
| y〉) are as close as possible. We evaluate the fidelity, measuring the "closeness" of
| ̃y〉 := g(〈 y|σ
z
two quantum states [62],
F = 〈 ̃y| y〉 ,
(17)
7
SciPost Physics
Submission
using the SWAP-Test shown in Fig. 3. Which side of the model we perform the SWAP-Test on does
not matter, as the operator U is unitary. We train the entire model, the model circuit and all ISP
parameters, to adhere to F (cid:39) 1 for the loss function
While the model is invertible if the fidelity F (cid:39) 1, the opposite is not necessarily true. In fact
for a given circuit U we can find exponentially many different states | ̃y〉 such that
(cid:76)
F
= λ
F
(log(F )).
(18)
̃x := 〈 ̃y|Uσ⊗n
z U †| ̃y〉 = x.
(19)
Thus, it seems more natural to define the invertibility loss directly on ̃x. We construct an alterna-
tive loss function which only trains the model to adhere to ̃x (cid:39) x
(cid:76)
M S E
= λ
M S E
(x − ̃x)2.
(20)
We compare both loss functions quantitatively in Sec. 4.
While one can select any ISP method of one's choosing, a fixed ISP will often be too restrictive
in practice. We, therefore, allow the model to learn its ISP by creating a separate module which is
only called in the inverse direction, mapping a measurement y to the quantum state | y〉 = g( y),
see Fig. 4. This module combines a small classical neural network gC with a quantum neural
network gQ. First, the neural network predicts 3n angles ψ from y
gC(cid:55)→ ψ ∈ (cid:82)3n,
y
(21)
which serve as inputs for the Rot gates. The quantum state prepared in this way is then further
transformed by the quantum neural network to create the input for the (inverse) model circuit
ψ Rot
(cid:55)→ |ψ〉
gQ(cid:55)→ | ̃y〉 .
(22)
With these additional steps, we can ensure that the model is trained to be invertible. Furthermore,
as explained in Sec. 2.1, the model's Jacobian needs to be tractable for density estimation. For
the QINN, it can be obtained in a similar way that the gradients are calculated by using parameter
shift rules [63, 64].
The potential of a QINN is twofold. Firstly, a QINN provides the ability to compute the full
Jacobian matrix. Unlike classical INNs, which only allow for efficient computation of the Jacobian
determinant [30], a full Jacobian would open up opportunities for a new array of applications.
There has been extensive research into efficient learning of the principal data manifolds in dis-
tributions [31–34], yet it remains a challenging and computationally expensive task in higher
dimensions. Exploiting the full Jacobian of a QINN to encode the principal manifolds in selected
latent variables would come at very little additional cost. This advantage of QINNs could pave the
way towards learning interpretable representations and new insights into underlying processes.
The second advantage of a QINN lies in the increased expressive power provided by quantum
models, which extensive theoretical work has documented [35–38]. There has been consider-
able effort to define quantum equivalents of multiple generative models in the current machine
learning landscape [65]. Sometimes, simulation of distributions created by quantum circuits is
not efficiently possible with classical methods [66]. For example, the authors of [67] show an
advantage in learning density estimation via samples with Quantum Circuit Born Machines [68]
using Clifford group gates [69]. Even though QINNs operate fundamentally differently, since
we marginalize over the measured state distribution, there remains reason to assume increased
expressivity of a QINN over the classical counterpart, which we aim to further establish by the
experiments shown in Sec. 4.
8
SciPost Physics
Submission
Measure
| y〉
y
gQ
Rot(ψ1)
...
Rot(ψn)
ψ1
y , ψ1
z
z , ψ1
...
z , ψn
ψn
y , ψn
z
gC
Inverse State Preparation
Figure 4: A diagram of the learnable ISP method. To map a measurement back to a
quantum state, first a NN predicts 3n angles, which serve as state preparation for |ψ〉,
which is then transformed further by a separate QNN that recreates | y〉.
4 Application to High Energy Physics
We evaluate the performance of the QINN by learning to generate events of the LHC process
pp → Z j → (cid:96)+(cid:96)−
j.
(23)
We simulate 100k events using MADGRAPH5 [70] with generator-level cuts for the transverse mo-
mentum and the rapidity of the leptons of 15 GeV < pT,(cid:96)±< 150 GeV and η(cid:96)± < 4.5 as well as the
< 1900 GeV. The data sample is split into a training, a validation and
energy of the Z-Boson EZ
a test sample following the split of 37.5%/12.5%/50%.
We compare the two methods of training invertibility described in Sec. 3.1, the fidelity of the
quantum states and a mean squared error. Finally, we train a classical INN with the spline cou-
pling block architecture presented in Sec. 2 and compare the performance based on the number of
model parameters required. The setup of all models and hyperparameters can be found in Table
1. We implement the training pipeline with PYTORCH [71], where we use PENNYLANE [72] to im-
plement the QINN and FREIA [58] for the classical INN. We train all networks on the observables
pT,(cid:96)±, ∆φ(cid:96)(cid:96), η(cid:96)±, which we can use to reconstruct the Z-Boson. The models are trained for 200
epochs with an MMD loss as described in Sec. 2.2 on the MZ distribution, which significantly im-
proves the results in this observable for all models. The MMD loss on input and latent observables
for the QINN are used throughout the entire training process.
9
SciPost Physics
Submission
Hyperparameter
LR scheduling
Maximum LR
Start/Final LR factors
Epochs
Batch size
1, β
ADAM β
2
# Spline bins
# Coupling blocks
Layers per block
Hidden dimension
# Forward quantum layers
# ISP quantum layers
# ISP NN layers
# ISP hidden dimension
M M D (input/latent)
MZ
F /M SE
λ
λ
λ
MMD kernel widths
# Trainable parameters
QINN
1cycle [73]
10−3
4 * 10−2/10−4
200
128
0.9, 0.9
-
-
-
-
12
8
3
32
INN
same
same
same
same
same
0.5, 0.9
5/8/8
6/9/10
3/3/3
8/12/24
-
-
-
-
1.0/0.5
0.375
10.0
[0.02, 0.1, 0.4, 1, 5]
2k (QNN ∼ 300, NN ∼ 1.7k)
-
0.5
-
same
2k/6k/16k
Table 1: Hyperparameters for the QINN and INN used for training and setup. The hyper-
parameters for the INN were chosen such that the performance of the QINN and the INN
were comparable while keeping the number of trainable parameters as low as possible.
4.1 Comparing Fidelity and Mean Squared Error for the loss function
To decide which of the loss functions for invertibility is more advantageous for the QINN, we
perform experiments with the same hyperparameters, only changing the loss. A comparison of
the results is shown in Fig. 5. While both results are similar in performance of MZ , the fidelity loss
creates significant artefacts in the ∆R(cid:96)+,(cid:96)− distribution whenever we use the MMD loss necessary
to improve MZ . This aligns with the intuition of the MSE loss allowing for a more flexible choice
of ISP. We, therefore, proceed with the MSE loss for invertibility throughout the rest of this work.
10
SciPost Physics
Submission
Figure 5: MZ and ∆R(cid:96)+,(cid:96)− of the Z reconstructed from the leptons as generated by the
QINN with Fidelity and MSE loss for invertibility. True shows the distribution of the
entire test set.
4.2 Classical INN versus Quantum INN
We choose three INN sizes: 2k parameters to match the QINN in parameter number, 6k and 16k
parameters to approximately lower- and upper-bound the QINN performance. In Fig. 6, we first
compare correlations of low-level observables between the QINN and the 16k INN. While both
networks cannot learn the px double peak structure due to their limited size, they both show no
problems learning the hard pT cuts. Furthermore, the QINN shows no additional signs of deterio-
ration or artefacts in the low-level observables that may have arisen from underparameterization
apart from the ones also present in the INN.
11
10−310−210−1normalizedTrueQINNMSEQINNFidelity6080100120MZ[GeV]0.751.25ModelTrue10−510−410−310−210−1normalizedTrueQINNMSEQINNFidelity1234567∆R'+'−0.751.25ModelTrueSciPost Physics
Submission
Figure 6: 2d correlations of selected (cid:96)± observables. We show the distribution in the
dataset (left) the one generated by the QINN (center) and the one generated by the 16k
parameter INN (right).
The networks' ability to capture high-dimensional correlations can be tested by reconstructing
the Z-Boson observables, specifically the invariant mass MZ from the generated leptons. We show
these reconstructed results in Fig. 7.
It is immediately apparent that the 2k parameter INN is
nowhere as expressive as the QINN. In fact, the QINN even outperforms the 16k parameter INN
at reconstructing the sharp peak of the MZ distribution, though it does not match the tails of the
shown distributions as well as the 16k INN. Comparing the QINN to the 6k INN, it arguably even
outperforms a classical network three times its size. With an average deviation of the reconstructed
observables of || ̃x−x
|| < 2.1%, we can also determine that the MMD loss does not dominate the
x
optimization process and the QINN does learn to perform an invertible transformation.
In conclusion, we find the performance of the QINN to be equivalent to that of a classical INN
with around 3 − 8 times the number of parameters on this 5 dim task, with most of the QINN
parameter count still being attributed to the classical NN.
5 Conclusion
Generative modelling has become increasingly important for simulating complex data in various
science areas. In recent years, neural network techniques, such as Variational Autoencoders, Gen-
12
−1000100px,'+[GeV]−1000100py,'+[GeV]Reference−1000100px,'+[GeV]−1000100py,'+[GeV]QINN2k−1000100px,'+[GeV]−1000100py,'+[GeV]INN16k10−610−510−4densityofevents−1000100px,'+[GeV]−100001000pz,'+[GeV]Reference−1000100px,'+[GeV]−100001000pz,'+[GeV]QINN2k−1000100px,'+[GeV]−100001000pz,'+[GeV]INN16k10−610−5densityofevents−1000100px,'+[GeV]−1000100px,'−[GeV]Reference−1000100px,'+[GeV]−1000100px,'−[GeV]QINN2k−1000100px,'+[GeV]−1000100px,'−[GeV]INN16k10−610−510−4densityofeventsSciPost Physics
Submission
Figure 7: MZ and ∆R(cid:96)+,(cid:96)− of the Z reconstructed from the leptons as generated by the
QINN and the reference INNs. True shows the distribution of the entire test set.
erative Adversarial Networks and Invertible Neural Networks, have received attention, showing
promising outcomes. At the same time, algorithms designed for quantum computers have opened
a new avenue to expand on existing classical neural network structures. For example, quantum-
gate algorithm-based Quantum Variational Autoencoders and Quantum Generative Adversarial
Networks have been studied thoroughly. They have been shown empirically to match or even
outperform their classical counterparts on specific tasks or when limiting the size of the classical
network, thereby indicating that QNNs can offer a larger expressivity or faster and more robust
network training.
In this work, we proposed a novel approach for Quantum Invertible Neural Networks and
highlighted their use as density estimators in generative tasks. By applying the QINN to the sim-
ulation of final states of the LHC process pp → Z j → (cid:96)+(cid:96)− j, we showed its ability to reconstruct
the Z-Boson with significantly fewer parameters than classical INNs. Our model combines the
conventional QNN architecture, consisting of the trinity of state preparation variational quantum
circuit and measurement, with a classical-quantum hybrid network for learning an Inverse State
Preparation. Furthermore, we demonstrate how the combined model can be trained to invert the
quantum measurement of the QNN, allowing for a reversible transformation. Through the prop-
erty of having the entire network Jacobian at one's disposal, performing density estimation with
QNNs could lead to new insights and better understanding of the modelled generative processes.
The hybrid QINN with 2k trainable parameters, most of which originate in the classical network
part, showed to be more expressive than its entirely classical counterpart, thereby evidencing a
gain in expressivity due to the inclusion of the quantum circuit. This encouraging result motivates
the detailed future study and employment of QINNs in complex generative tasks.
Acknowledgements
We thank Tilman Plehn for valuable discussions and encouragement during this project.
13
10−310−210−1normalizedTrueQINN2kINN2kINN6kINN16k60708090100110120130MZ[GeV]0.751.25ModelTrue10−510−410−310−210−1normalizedTrueQINN2kINN2kINN6kINN16k1234567∆R'+'−0.751.25ModelTrueSciPost Physics
References
Submission
[1] D. P. Kingma and M. Welling, Auto-encoding variational bayes,
In 2nd International Con-
ference on Learning Representations, ICLR 2014 - Conference Track Proceedings. International
Conference on Learning Representations, ICLR (2014), 1312.6114.
[2] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville
and Y. Bengio, Generative adversarial nets,
In Advances in Neural Information Process-
ing Systems, vol. 3, pp. 2672–2680. Neural information processing systems foundation,
doi:10.3156/jsoft.29.5_177_2 (2014), 1406.2661.
[3] L. Dinh, D. Krueger and Y. Bengio, NICE: Non-linear Independent Components Estimation
(2014), doi:10.48550/arxiv.1410.8516, 1410.8516.
[4] C. Gao, S. Hoeche, J. Isaacson, C. Krause and H. Schulz, Event Generation with Normalizing
Flows (2020), 2001.10028.
[5] A. Butter, T. Plehn and R. Winterhalder, How to GAN LHC Events, SciPost Physics 7(6) (2019),
doi:10.21468/SciPostPhys.7.6.075, 1907.03764.
[6] A. Butter, T. Heimel, S. Hummerich, T. Krebs, T. Plehn, A. Rousselot and S. Vent, Generative
Networks for Precision Enthusiasts (2021), 2110.13632.
[7] D. E. Soper and M. Spannowsky, Finding physics signals with shower deconstruction, Phys.
Rev. D 84, 074002 (2011), doi:10.1103/PhysRevD.84.074002, 1102.3480.
[8] D. E. Soper and M. Spannowsky, Finding top quarks with shower deconstruction, Phys. Rev.
D 87, 054012 (2013), doi:10.1103/PhysRevD.87.054012, 1211.3140.
[9] D. E. Soper and M. Spannowsky, Finding physics signals with event deconstruction, Phys. Rev.
D 89(9), 094005 (2014), doi:10.1103/PhysRevD.89.094005, 1402.1189.
[10] J. Brehmer, F. Kling, I. Espejo and K. Cranmer, MadMiner: Machine learning-based inference
for particle physics, Comput. Softw. Big Sci. 4(1), 3 (2020), doi:10.1007/s41781-020-0035-
2, 1907.10621.
[11] A. Butter, T. Plehn, S. Schumann, S. Badger, S. Caron, K. Cranmer, F. A. Di Bello, E. Dreyer,
S. Forte, S. Ganguly, D. Gonçalves, E. Gross et al., Machine Learning and LHC Event Generation
(2022), 2203.07460.
[12] M. Bellagente, A. Butter, G. Kasieczka, T. Plehn and R. Winterhalder, How to GAN away
Detector Effects (2019), 1912.00477.
[13] M. Bellagente, A. Butter, G. Kasieczka, T. Plehn, A. Rousselot, R. Winterhalder, L. Ardizzone
and U. Köthe, Invertible Networks or Partons to Detector and Back Again, SciPost Physics 9(5)
(2020), doi:10.21468/SciPostPhys.9.5.074, 2006.06685.
[14] M. Arratia, D. Britzger, O. Long and B. Nachman, Optimizing observables with ma-
JINST 17(07), P07009 (2022), doi:10.1088/1748-
chine learning for better unfolding,
0221/17/07/P07009, 2203.16722.
14
SciPost Physics
Submission
[15] M. Farina, Y. Nakai and D. Shih, Searching for New Physics with Deep Autoencoders, Phys.
Rev. D 101(7), 075021 (2020), doi:10.1103/PhysRevD.101.075021, 1808.08992.
[16] A. A. Pol, V. Berger, C. Germain, G. Cerminara and M. Pierini, Anomaly detection with con-
ditional variational autoencoders, In Proceedings - 18th IEEE International Conference on Ma-
chine Learning and Applications, ICMLA 2019, pp. 1651–1657. Institute of Electrical and
Electronics Engineers Inc., ISBN 9781728145495, doi:10.1109/ICMLA.2019.00270 (2019),
2010.05531.
[17] A. Blance, M. Spannowsky and P. Waite, Adversarially-trained autoencoders for robust un-
supervised new physics searches, JHEP 10, 047 (2019), doi:10.1007/JHEP10(2019)047,
1905.10384.
[18] B. Nachman and D. Shih, Anomaly detection with density estimation, Physical Review D
101(7), 075042 (2020), doi:10.1103/PhysRevD.101.075042, 2001.04990.
[19] T. Finke, M. Krämer, A. Morandini, A. Mück and I. Oleksiyuk, Autoencoders for unsupervised
anomaly detection in high energy physics, Journal of High Energy Physics 2021(6), 1 (2021),
doi:10.1007/JHEP06(2021)161, 2104.09051.
[20] A. Butter and T. Plehn, Generative Networks for LHC Events, chap. Chapter 7, pp. 191–240,
doi:10.1142/9789811234033_0007.
[21] V. S. Ngairangbam, M. Spannowsky and M. Takeuchi,
energy physics using a quantum autoencoder,
doi:10.1103/PhysRevD.105.095004, 2112.04958.
Anomaly detection in high-
Physical Review D 105(9) (2021),
[22] M. Y. Niu, A. Zlokapa, M. Broughton, S. Boixo, M. Mohseni, V. Smelyanskyi and H. Neven,
Entangling Quantum Generative Adversarial Networks (2021), 2105.00080.
[23] H.-L. Huang, Y. Du, M. Gong, Y. Zhao, Y. Wu, C. Wang, S. Li, F. Liang, J. Lin, Y. Xu, R. Yang,
T. Liu et al., Experimental Quantum Generative Adversarial Networks for Image Generation,
Physical Review Applied 16(2) (2020), doi:10.1103/PhysRevApplied.16.024051, 2010.
06201.
[24] S. Nguemto and V. Leyton-Ortega, Re-QGAN: an optimized adversarial quantum circuit learn-
ing framework (2022), 2208.02165.
[25] C. Bravo-Prieto, J. Baglio, M. Cè, A. Francis, D. M. Grabowska and S. Carrazza, Style-based
quantum generative adversarial networks for Monte Carlo events, Quantum 6, 777 (2022),
doi:10.22331/q-2022-08-17-777, 2110.06933.
[26] K. Beer and G. Müller, Dissipative quantum generative adversarial networks (2021), 2112.
06088.
[27] C. Chu, G. Skipper, M. Swany and F. Chen, IQGAN: Robust Quantum Generative Adversarial
Network for Image Synthesis On NISQ Devices (2022), 2210.16857.
[28] L. Ardizzone, J. Kruse, S. Wirkert, D. Rahner, E. W. Pellegrini, R. S. Klessen, L. Maier-Hein,
C. Rother and U. Köthe, Analyzing Inverse Problems with Invertible Neural Networks (2018),
1808.04730.
15
SciPost Physics
Submission
[29] L. Ardizzone, C. Lüth, J. Kruse, C. Rother and U. Köthe, Guided Image Generation with
Conditional Invertible Neural Networks (2019), 1907.02392.
[30] L. Dinh, J. Sohl-Dickstein and S. Bengio, Density estimation using real NVP, In International
Conference on Learning Representations (2017).
[31] E. Cunningham, A. D. Cobb and S. Jha, Principal component flows,
In K. Chaudhuri,
S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato, eds., Proceedings of the 39th Interna-
tional Conference on Machine Learning, vol. 162 of Proceedings of Machine Learning Research,
pp. 4492–4519. PMLR (2022).
[32] A. L. Caterini, G. Loaiza-Ganem, G. Pleiss and J. P. Cunningham, Rectangular flows for man-
In ICML Workshop on Invertible Neural Networks, Normalizing Flows, and
ifold learning,
Explicit Likelihood Models (2021).
[33] T. G. L. Nguyen, L. Ardizzone and U. Köthe, Training invertible neural networks as autoen-
coders, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial In-
telligence and Lecture Notes in Bioinformatics) 11824 LNCS, 442 (2019), doi:10.1007/978-
3-030-33676-9_31.
[34] S. Li, H. Lin, Z. Zang, L. Wu, J. Xia and S. Z. Li, Invertible manifold learning for dimension
reduction,
In N. Oliver, F. Pérez-Cruz, S. Kramer, J. Read and J. A. Lozano, eds., Machine
Learning and Knowledge Discovery in Databases. Research Track, pp. 713–728. Springer Inter-
national Publishing, Cham, ISBN 978-3-030-86523-8 (2021).
[35] Y. Du, M.-H. Hsieh, T. Liu and D. Tao, The Expressive Power of Parameterized Quantum Circuits,
Physical Review Research 2(3) (2018), doi:10.1103/PhysRevResearch.2.033125, 1810.
11922.
[36] Y. Wu, J. Yao, P. Zhang and H. Zhai, Expressivity of quantum neural networks, Physical Review
Research 3(3), L032049 (2021), doi:10.1103/PhysRevResearch.3.L032049, 2101.04273.
[37] Y. Du, Z. Tu, X. Yuan and D. Tao,
Variational Quantum Algorithms,
doi:10.1103/PhysRevLett.128.080506, 2104.09961.
Efficient Measure for the Expressivity of
Physical Review Letters 128(8), 080506 (2022),
[38] H. Shen, P. Zhang, Y.-Z. You and H. Zhai, Information Scrambling in Quantum Neural Net-
works, Physical Review Letters 124(20) (2019), doi:10.1103/PhysRevLett.124.200504,
1909.11887.
[39] Y. Du, Z. Tu, B. Wu, X. Yuan and D. Tao, Power of Quantum Generative Learning (2022),
2205.04730.
[40] S. Arunachalam and R. de Wolf, A Survey of Quantum Learning Theory (2017), 1701.06806.
[41] R. Sweke, J. P. Seifert, D. Hangleiter and J. Eisert, On the quantum versus classical learnability
of discrete distributions, Quantum 5, 417 (2021), doi:10.22331/Q-2021-03-23-417, 2007.
14451.
[42] Y. Liu, S. Arunachalam and K. Temme, A rigorous and robust quantum speed-up in supervised
machine learning, Nature Physics 17(9), 1013 (2021), doi:10.1038/s41567-021-01287-z,
2010.02174.
16
SciPost Physics
Submission
[43] J. Y. Araz and M. Spannowsky, Classical versus Quantum: comparing Tensor Network-based
Quantum Circuits on LHC data (2022), 2202.10471.
[44] A. Blance and M. Spannowsky,
ing a Variational Quantum Classifier,
doi:10.1007/JHEP02(2021)212, 2010.07335.
Quantum Machine Learning for Particle Physics us-
Journal of High Energy Physics 2021(2) (2020),
[45] S. Alvi, C. Bauer and B. Nachman, Quantum Anomaly Detection for Collider Physics (2022),
2206.08391.
[46] J. Y. Araz and M. Spannowsky, Quantum-probabilistic Hamiltonian learning for generative
modelling & anomaly detection (2022), 2211.03803.
[47] S. L. Wu, S. Sun, W. Guan, C. Zhou, J. Chan, C. L. Cheng, T. Pham, Y. Qian, A. Z. Wang,
R. Zhang, M. Livny, J. Glick et al., Application of quantum machine learning using the quantum
kernel algorithm on high energy physics analysis at the LHC, Physical Review Research 3(3)
(2021), doi:10.1103/physrevresearch.3.033221.
[48] S. L. Wu, J. Chan, W. Guan, S. Sun, A. Wang, C. Zhou, M. Livny, F. Carminati, A. D. Meglio,
A. C. Y. Li, J. Lykken, P. Spentzouris et al., Application of quantum machine learning using
the quantum variational classifier method to high energy physics analysis at the LHC on IBM
quantum computer simulator and hardware with 10 qubits, Journal of Physics G: Nuclear and
Particle Physics 48(12), 125003 (2021), doi:10.1088/1361-6471/ac1391.
[49] K. Anna, W. Wo ́zniak, V. Belis, E. Puljak, P. Barkoutsos, G. Dissertori, M. Grossi, M. Pierini,
F. Reiter, I. Tavernelli and S. Vallecorsa, Quantum anomaly detection in the latent space of
proton collision events at the LHC (2023), doi:10.48550/arxiv.2301.10780, 2301.10780.
[50] J. Schuhmacher, L. Boggia, V. Belis, E. Puljak, M. Grossi, M. Pierini, S. Vallecorsa, F. Tacchino,
P. Barkoutsos and I. Tavernelli, Unravelling physics beyond the standard model with classical
and quantum anomaly detection (2023), doi:10.48550/arxiv.2301.10787, 2301.10787.
[51] V. Belis, S. González-Castillo, C. Reissel, S. Vallecorsa, E. F. Combarro, G. Dissertori and
F. Reiter, Higgs analysis with quantum classifiers, EPJ Web of Conferences 251, 03070 (2021),
doi:10.1051/EPJCONF/202125103070, 2104.07692.
[52] Z. Davoudi, N. M. Linke and G. Pagano, Toward simulating quantum field theories with con-
trolled phonon-ion dynamics: A hybrid analog-digital approach, Physical Review Research
3(4) (2021), doi:10.1103/physrevresearch.3.043072.
[53] T. Li, X. Guo, W. K. Lai, X. Liu, E. Wang, H. Xing, D.-B. Zhang and S.-L. Z. and, Par-
Physical Review D 105(11) (2022),
tonic collinear structure by quantum computing,
doi:10.1103/physrevd.105.l111502.
[54] K. Bepari, S. Malik, M. Spannowsky and S. Williams, Towards a quantum computing al-
gorithm for helicity amplitudes and parton showers, Physical Review D 103(7) (2021),
doi:10.1103/physrevd.103.076020.
[55] I. Georgescu, S. Ashhab and F. Nori, Quantum simulation, Reviews of Modern Physics 86(1),
153 (2014), doi:10.1103/revmodphys.86.153.
17
SciPost Physics
Submission
[56] K. Bepari, S. Malik, M. Spannowsky and S. Williams, Quantum walk approach to simulating
parton showers, Physical Review D 106(5) (2022), doi:10.1103/physrevd.106.056002.
[57] C. Durkan, A. Bekasov, I. Murray and G. Papamakarios, Neural Spline Flows (2019), 1906.
04032.
[58] L. Ardizzone, T. Bungert, F. Draxler, U. Köthe, J. Kruse, R. Schmier and P. Sorrenson, Frame-
work for Easily Invertible Architectures (FrEIA).
[59] A. Gretton, K. Borgwardt, M. Rasch, B. Schölkopf and A. J. Smola, A Kernel Two-Sample Test,
The Journal of Machine Learning Research 13, 723 (2012).
[60] M. Schuld, A. Bocharov, K. M. Svore and N. Wiebe, Circuit-centric quantum classifiers, Phys-
ical Review A 101(3), 032308 (2020), doi:10.1103/PhysRevA.101.032308, 1804.00633.
[61] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow and J. M. Gambetta,
Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets,
Nature 549(7671), 242 (2017), doi:10.1038/nature23879, 1704.05018.
[62] M. M. Wilde, Quantum information theory, vol. 9781107034259, Cambridge University
Press, ISBN 9781139525343, doi:10.1017/CBO9781139525343 (2007).
[63] M. Schuld, V. Bergholm, C. Gogolin, J. Izaac and N. Killoran, Evaluating analytic gradients on
quantum hardware, Physical Review A 99(3) (2018), doi:10.1103/PhysRevA.99.032331,
1811.11184.
[64] K. Mitarai, M. Negoro, M. Kitagawa and K. Fujii, Quantum Circuit Learning, Physical Review
A 98(3) (2018), doi:10.1103/PhysRevA.98.032309, 1803.00745.
[65] J. Tian et al., Recent Advances for Quantum Neural Networks in Generative Learning (2022),
2206.03066.
[66] M. J. Bremner, R. Jozsa and D. J. Shepherd, Classical simulation of commuting quantum
computations implies collapse of the polynomial hierarchy, In Proceedings of the Royal Society
A: Mathematical, Physical and Engineering Sciences, vol. 467, pp. 459–472. Royal Society,
doi:10.1098/rspa.2010.0301 (2011), 1005.1407.
[67] M. Hinsche, M. Ioannou, A. Nietner, J. Haferkamp, Y. Quek, D. Hangleiter, J.-P. Seifert, J. Eis-
ert and R. Sweke, Learnability of the output distributions of local quantum circuits (2021),
2110.05517.
[68] S. Cheng, J. Chen and L. Wang, Information Perspective to Probabilistic Modeling: Boltzmann
Machines versus Born Machines, Entropy 20(8), 583 (2018), doi:10.3390/e20080583.
[69] D. Gottesman, Theory of fault-tolerant quantum computation, Physical Review A - Atomic,
Molecular, and Optical Physics 57(1), 127 (1998), doi:10.1103/PhysRevA.57.127, 9702029.
[70] J. Alwall, R. Frederix, S. Frixione, V. Hirschi, F. Maltoni, O. Mattelaer, H. S. Shao, T. Stelzer,
P. Torrielli and M. Zaro, The automated computation of tree-level and next-to-leading order
differential cross sections, and their matching to parton shower simulations, Journal of High
Energy Physics 2014(7) (2014), doi:10.1007/JHEP07(2014)079, 1405.0301.
18
SciPost Physics
Submission
[71] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin,
N. Gimelshein, L. Antiga, A. Desmaison, A. Köpf et al., PyTorch: An Imperative Style, High-
Performance Deep Learning Library (2019), 1912.01703.
[72] V. Bergholm, J. Izaac, M. Schuld, C. Gogolin, S. Ahmed, V. Ajith, M. S. Alam, G. Alonso-
Linaje, B. AkashNarayanan, A. Asadi, J. M. Arrazola, U. Azad et al., PennyLane: Automatic
differentiation of hybrid quantum-classical computations (2018), 1811.04968.
[73] L. N. Smith and N. Topin, Super-Convergence: Very Fast Training of Neural Networks Using
Large Learning Rates (2017), 1708.07120.
19
|
|
http://arxiv.org/abs/2302.12902v2 | 2023-06-13T15:16:55 | 2023-02-24T21:20:18 | The Dormant Neuron Phenomenon in Deep Reinforcement Learning | In this work we identify the dormant neuron phenomenon in deep reinforcement
learning, where an agent's network suffers from an increasing number of
inactive neurons, thereby affecting network expressivity. We demonstrate the
presence of this phenomenon across a variety of algorithms and environments,
and highlight its effect on learning. To address this issue, we propose a
simple and effective method (ReDo) that Recycles Dormant neurons throughout
training. Our experiments demonstrate that ReDo maintains the expressive power
of networks by reducing the number of dormant neurons and results in improved
performance. | [
"Ghada Sokar",
"Rishabh Agarwal",
"Pablo Samuel Castro",
"Utku Evci"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12902v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12902v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Ghada Sokar 1 2 Rishabh Agarwal 3 4 Pablo Samuel Castro 3 * Utku Evci 3 *
3
2
0
2
n
u
J
3
1
]
G
L
.
s
c
[
2
v
2
0
9
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
In this work we identify the dormant neuron phe-
nomenon in deep reinforcement learning, where
an agent's network suffers from an increasing
number of inactive neurons, thereby affecting
network expressivity. We demonstrate the pres-
ence of this phenomenon across a variety of algo-
rithms and environments, and highlight its effect
on learning. To address this issue, we propose a
simple and effective method (ReDo) that Recycles
Dormant neurons throughout training. Our ex-
periments demonstrate that ReDo maintains the
expressive power of networks by reducing the
number of dormant neurons and results in im-
proved performance.
1. Introduction
The use of deep neural networks as function approximators
for value-based reinforcement learning (RL) has been one
of the core elements that has enabled scaling RL to complex
decision-making problems (Mnih et al., 2015; Silver et al.,
2016; Bellemare et al., 2020). However, their use can lead
to training difficulties that are not present in traditional RL
settings. Numerous improvements have been integrated with
RL methods to address training instability, such as the use
of target networks, prioritized experience replay, multi-step
targets, among others (Hessel et al., 2018). In parallel, there
have been recent efforts devoted to better understanding
the behavior of deep neural networks under the learning
dynamics of RL (van Hasselt et al., 2018; Fu et al., 2019;
Kumar et al., 2021a; Bengio et al., 2020; Lyle et al., 2021;
Ara ́ujo et al., 2021).
Recent work in so-called "scaling laws" for supervised learn-
ing problems suggest that, in these settings, there is a pos-
*Equal advising 1Eindhoven University of Technology, The
Netherlands 2Work done while the author was intern at Google
DeepMind 3Google DeepMind 4Mila. Correspondence to: Ghada
Sokar <[email protected]>, Rishabh Agarwal < rishabhagar-
[email protected]>, Pablo Samuel Castro <[email protected]>,
Utku Evci <[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. Sample efficiency curves for DQN, with a replay ratio of
1, when using network resets (Nikishin et al., 2022), weight decay
(WD), and our proposed ReDo. Shaded regions show 95% CIs.
The figure shows interquartile mean (IQM) human-normalized
scores over the course of training, aggregated across 17 Atari
games and 5 runs per game. Among all algorithms, DQN+ReDo
performs the best.
itive correlation between performance and the number of
parameters (Hestness et al., 2017; Kaplan et al., 2020; Zhai
et al., 2022). In RL, however, there is evidence that the
networks lose their expressivity and ability to fit new targets
over time, despite being over-parameterized (Kumar et al.,
2021a; Lyle et al., 2021); this issue has been partly mitigated
by perturbing the learned parameters. Igl et al. (2020) and
Nikishin et al. (2022) periodically reset some, or all, of the
layers of an agent's neural networks, leading to improved
performance. These approaches, however, are somewhat
drastic: reinitializing the weights can cause the network
to "forget" previously learned knowledge and require many
gradient updates to recover.
In this work, we seek to understand the underlying reasons
behind the loss of expressivity during the training of RL
agents. The observed decrease in the learning ability over
time raises the following question: Do RL agents use neural
network parameters to their full potential? To answer this,
we analyze neuron activity throughout training and track dor-
mant neurons: neurons that have become practically inactive
through low activations. Our analyses reveal that the num-
ber of dormant neurons increases as training progresses, an
effect we coin the "dormant neuron phenomenon". Specif-
ically, we find that while agents start the training with a
246810Number of Frames (in millions)0.00.20.40.6IQM Normalized ScoreDQNDQN + ReDoDQN + ResetDQN + WD
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
small number of dormant neurons, this number increases as
training progresses. The effect is exacerbated by the number
of gradient updates taken per data collection step. This is
in contrast with supervised learning, where the number of
dormant neurons remains low throughout training.
We demonstrate the presence of the dormant neuron phe-
nomenon across different algorithms and domains: in two
value-based algorithms on the Arcade Learning Environ-
ment (Bellemare et al., 2013) (DQN (Mnih et al., 2015)
and DrQ(ε) (Yarats et al., 2021; Agarwal et al., 2021)), and
with an actor-critic method (SAC (Haarnoja et al., 2018))
evaluated on the MuJoCo suite (Todorov et al., 2012). To
address this issue, we propose Recycling Dormant neu-
rons (ReDo), a simple and effective method to avoid network
under-utilization during training without sacrificing previ-
ously learned knowledge: we explicitly limit the spread
of dormant neurons by "recycling" them to an active state.
ReDo consistently maintains the capacity of the network
throughout training and improves the agent's performance
(see Figure 1). Our contributions in this work can be sum-
marized as follows:
• We demonstrate the existence of the dormant neuron
phenomenon in deep RL.
• We investigate the underlying causes of this phe-
nomenon and show its negative effect on the learning
ability of deep RL agents.
• We propose Recycling Dormant neurons (ReDo), a sim-
ple method to reduce the number of dormant neurons
and maintain network expressivity during training.
• We demonstrate the effectiveness of ReDo in maximiz-
ing network utilization and improving performance.
2. Background
We consider a Markov decision process (Puterman, 2014),
M = ⟨S, A, R, P, γ⟩, defined by a state space S, an action
space A, a reward function R : S × A → R, a transition
probability distribution P(s′|s, a) indicating the probability
of transitioning to state s′ after taking action a from state s,
and a discounting factor γ ∈ [0, 1). An agent's behaviour
is formalized as a policy π : S → Dist(A); given any
state s ∈ S and action a ∈ A, the value of choosing a
from s and following π afterwards is given by Qπ(s, a) =
E[(cid:80)∞
t=0 γtR(st, at)]. The goal in RL is to find a policy π∗
that maximizes this value: for any π, Qπ∗
:= Q∗ ≥ Qπ.
1992), from which batches are sampled to update the pa-
rameters of Qθ using gradient descent. The optimization
performed aims to minimize the temporal difference loss
(Sutton, 1988): L = Qθ(s, a) − QT
θ (s, a)
is the bootstrap target [R(s, a)+γ maxa′∈A Q ̃θ(s′, a′)] and
Q ̃θ is a delayed version of Qθ that is known as the target
network.
θ (s, a); here, QT
The number of gradient updates performed per environment
step is known as the replay ratio. This is a key design choice
that has a substantial impact on performance (Van Hasselt
et al., 2019; Fedus et al., 2020; Kumar et al., 2021b; Nikishin
et al., 2022). Increasing the replay ratio can increase the
sample-efficiency of RL agents as more parameter updates
per sampled trajectory are performed. However, prior works
have shown that training agents with a high replay ratio can
cause training instabilities, ultimately resulting in decreased
agent performance (Nikishin et al., 2022).
One important aspect of reinforcement learning, when con-
trasted with supervised learning, is that RL agents train on
highly non-stationary data, where the non-stationarity is
coming in a few forms (Igl et al., 2020), but we focus on
two of the most salient ones.
Input data non-stationarity: The data the agent trains on
is collected in an online manner by interacting with the en-
vironment using its current policy π; this data is then used
to update the policy, which affects the distribution of future
samples.
Target non-stationarity: The learning target used by RL
agents is based on its own estimate Q ̃θ, which is changing
as learning progresses.
3. The Dormant Neuron Phenomenon
Prior work has highlighted the fact that networks used in
online RL tend to lose their expressive ability; in this section
we demonstrate that dormant neurons play an important role
in this finding.
Definition 3.1. Given an input distribution D, let hl
i (x)
denote the activation of neuron i in layer l under input
x ∈ D and H l be the number of neurons in layer l. We
define the score of a neuron i (in layer l) via the normalized
average of its activation as follows:
sl
i =
1
H l
Ex∈D|hl
i (x)|
Ex∈D|hl
k∈h
(cid:80)
k(x)|
(1)
We say a neuron i in layer l is τ -dormant if sl
i ≤ τ .
In deep reinforcement learning, the Q-function is repre-
sented using a neural network Qθ with parameters θ. During
training, an agent interacts with the environment and col-
lects trajectories of the form (s, a, r, s′) ∈ S × A × R × S.
These samples are typically stored in a replay buffer (Lin,
We normalize the scores such that they sum to 1 within a
layer. This makes the comparison of neurons in different
layers possible. The threshold τ allows us to detect neurons
with low activations. Even though these low activation
neurons could, in theory, impact the learned functions when
2
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 2. The percentage of dormant neurons increases throughout
training for DQN agents.
recycled, their impact is expected to be less than the neurons
with high activations.
Definition 3.2. An algorithm exhibits the dormant neuron
phenomenon if the number of τ -dormant neurons in its
neural network increases steadily throughout training.
An algorithm exhibiting the dormant neuron phenomenon
is not using its network's capacity to its full potential, and
this under-utilization worsens over time.
The remainder of this section focuses first on demonstrat-
ing that RL agents suffer from the dormant neuron phe-
nomenon, and then on understanding the underlying causes
for it. Specifically, we analyze DQN (Mnih et al., 2015),
a foundational agent on which most modern value-based
agents are based. To do so, we run our evaluations on the
Arcade Learning Environment (Bellemare et al., 2013) us-
ing 5 independent seeds for each experiment, and reporting
95% confidence intervals. For clarity, we focus our analyses
on two representative games (DemonAttack and Asterix),
but include others in the appendix. In these initial analyses
we focus solely on τ = 0 dormancy, but loosen this thresh-
old when benchmarking our algorithm in sections 4 and 5.
Additionally, we present analyses on an actor-critic method
(SAC (Haarnoja et al., 2018)) and a modern sample-efficient
agent (DrQ(ε) (Yarats et al., 2021)) in Appendix B.
The dormant neuron phenomenon is present in deep RL
agents. We begin our analyses by tracking the number
of dormant neurons during DQN training. In Figure 2, we
observe that the percentage of dormant neurons steadily
increases throughout training. This observation is consistent
across different algorithms and environments, as can be seen
in Appendix B.
Target non-stationarity exacerbates dormant neurons.
We hypothesize that the non-stationarity of training deep
RL agents is one of the causes for the dormant neuron
phenomenon. To evaluate this hypothesis, we consider two
supervised learning scenarios using the standard CIFAR-10
dataset (Krizhevsky et al., 2009): (1) training a network with
fixed targets, and (2) training a network with non-stationary
Figure 3. Percentage of dormant neurons when training on CIFAR-
10 with fixed and non-stationary targets. Averaged over 3 indepen-
dent seeds with shaded areas reporting 95% confidence intervals.
The percentage of dormant neurons increases with non-stationary
targets.
Figure 4. Offline RL. Dormant neurons throughout training with
standard moving targets and fixed (random) targets. The phe-
nomenon is still present in offline RL, where the training data is
fixed.
targets, where the labels are shuffled throughout training
(see Appendix A for details). As Figure 3 shows, the number
of dormant neurons decreases over time with fixed targets,
but increases over time with non-stationary targets. Indeed,
the sharp increases in the figure correspond to the points
in training when the labels are shuffled. These findings
suggest that the continuously changing targets in deep RL
are a significant factor for the presence of the phenomenon.
Input non-stationarity does not appear to be a major
factor. To investigate whether the non-stationarity due
to online data collection plays a role in exacerbating the
phenomenon, we measure the number of dormant neurons
in the offline RL setting, where an agent is trained on a
fixed dataset (we used the dataset provided by Agarwal et al.
(2020)). In Figure 4 we can see that the phenomenon re-
mains in this setting, suggesting that input non-stationary
is not one of the primary contributing factors. To further
analyze the source of dormant neurons in this setting, we
train RL agents with fixed random targets (ablating the non-
stationarity in inputs and targets). The decrease in the num-
3
0123456Gradient steps (x106)051015202530Dormant neurons [%]DemonAttack0123456Gradient steps (x106)51015202530Dormant neurons [%]Asterix020406080100Epochs01020304050Dormant neurons [%]Fixed targetsNon-stationary targets0123456Gradient steps (×106)5101520253035Dormant neurons [%]DemonAttackFixed TargetsNon-Stationary Targets0123456Gradient steps (×106)01020304050Dormant neurons [%]AsterixThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 5. The overlap coefficient of dormant neurons throughout
training. There is an increase in the number of dormant neurons
that remain dormant.
Figure 7. The rate of increase in dormant neurons with varying
replay ratio (RR) (left). As the replay ratio increases, the number
of dormant neurons also increases. The higher percentage of
dormant neurons correlates with the performance drop that occurs
when the replay ratio is increased (right).
Figure 6. Pruning dormant neurons during training does not affect
the performance of an agent.
ber of dormant neurons observed in this case (Figure 4)
supports our hypothesis that target non-stationarity in RL
training is the primary source of the dormant neuron phe-
nomenon.
Dormant neurons remain dormant. To investigate
whether dormant neurons "reactivate" as training progresses,
we track the overlap in the set of dormant neurons. Figure 5
plots the overlap coefficient between the set of dormant neu-
rons in the penultimate layer at the current iteration, and
the historical set of dormant neurons.1 The increase shown
in the figure strongly suggests that once a neuron becomes
dormant, it remains that way for the rest of training. To fur-
ther investigate this, we explicitly prune any neuron found
dormant throughout training, to check whether their removal
affects the agent's overall performance. As Figure 6 shows,
their removal does not affect the agent's performance, fur-
ther confirming that dormant neurons remain dormant.
More gradient updates leads to more dormant neurons.
Although an increase in replay ratio can seem appealing
from a data-efficiency point of view (as more gradient up-
dates per environment step are taken), it has been shown to
cause overfitting and performance collapse (Kumar et al.,
2021a; Nikishin et al., 2022). In Figure 7 we measure neu-
1The overlap coefficient between two sets X and Y is defined
as overlap(X, Y ) = |X∩Y |
min(|X|,|Y |) .
4
Figure 8. A pretrained network that exhibits dormant neurons has
less ability than a randomly initialized network to fit a fixed target.
Results are averaged over 5 seeds.
ron dormancy while varying the replay ratio, and observe
a strong correlation between replay ratio and the fraction
of neurons turning dormant. Although difficult to assert
conclusively, this finding could account for the difficulty in
training RL agents with higher replay ratios; indeed, we will
demonstrate in Section 5 that recycling dormant neurons
and activating them can mitigate this instability, leading to
better results.
Dormant neurons make learning new tasks more diffi-
cult. We directly examine the effect of dormant neurons
on an RL network's ability to learn new tasks. To do so,
we train a DQN agent with a replay ratio of 1 (this agent
exhibits a high level of dormant neurons as observed in
Figure 7). Next we fine-tune this network by distilling it
towards a well performing DQN agent's network, using a
traditional regression loss and compare this with a randomly
initialized agent trained using the same loss. In Figure 8 we
see that the pre-trained network, which starts with a high
level of dormant neurons, shows degrading performance
throughout training; in contrast, the randomly initialized
baseline is able to continuously improve. Further, while
the baseline network maintains a stable level of dormant
neurons, the number of dormant neurons in the pre-trained
0123456Gradient steps (×106)203040506070Overlap coefficient [%]DemonAttack0123456Gradient steps (×106)304050607080Overlap coefficient [%]Asterix010203040Number of Frames (x106)010002000300040005000Average returnDemonAttackStandardPruning010203040Number of Frames (x106)10002000300040005000Average returnAsterixStandardPruning0510152025303540Number of Frames (x106)01020304050Dormant neurons [%]DemonAttackRR=0.25RR=0.5RR=1RR=2010203040Number of Frames (x106)010002000300040005000Average returnDemonAttack0100200300400500Gradient Steps (×100)101100LossDemonAttackRandomPretrained (RR=1)0100200300400500Gradient Steps (×100)20406080100Dormant neurons [%]DemonAttackThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Algorithm 1 ReDo
Input: Network parameters θ, threshold τ , training steps
T , frequency F
for t = 1 to to T do
Update θ with regular RL loss
if t mod F == 0 then
for each neuron i do
i ≤ τ then
Reinitialize input weights of neuron i
Set outgoing weights of neuron i to 0
if sl
end if
end for
end if
end for
mild decrease in the number of dormant neurons, but the
phenomenon is still present.
5. Empirical Evaluations
Agents, architectures, and environments. We evaluate
DQN on 17 games from the Arcade Learning Environment
(Bellemare et al., 2013) (as used in (Kumar et al., 2021a;b)
to study the loss of network expressivity). We study two
different architectures: the default CNN used by Mnih et al.
(2015), and the ResNet architecture used by the IMPALA
agent (Espeholt et al., 2018).
Additionally, we evaluate DrQ(ε) (Yarats et al., 2021; Agar-
wal et al., 2021) on the 26 games used in the Atari 100K
benchmark (Kaiser et al., 2019), and SAC (Haarnoja et al.,
2018) on four MuJoCo environments (Todorov et al., 2012).
Implementation details. All our experiments and imple-
mentations were conducted using the Dopamine framework
(Castro et al., 2018)2. For agents trained with ReDo, we use
a threshold of τ = 0.1, unless otherwise noted, as we found
this gave a better performance than using a threshold of 0
or 0.025. When aggregating results across multiple games,
we report the Interquantile Mean (IQM), recommended by
Agarwal et al. (2021) as a more statistically reliable alterna-
tive to median or mean, using 5 independent seeds for each
DQN experiment, 10 for the DrQ and SAC experiments,
and reporting 95% stratified bootstrap confidence intervals.
5.1. Consequences for Sample Efficiency
Figure 9. Evaluation of ReDo's effectiveness (with τ = 0.025)
in reducing dormant neurons (left) and improving performance
(right) on DQN (with RR = 0.25).
network continues to increase throughout training.
4. Recycling Dormant Neurons (ReDo)
Our analyses in Section 3, which demonstrates the existence
of the dormant neuron phenomenon in online RL, suggests
these dormant neurons may have a role to play in the dimin-
ished expressivity highlighted by Kumar et al. (2021a) and
Lyle et al. (2021). To account for this, we propose to recycle
dormant neurons periodically during training (ReDo).
The main idea of ReDo, outlined in Algorithm 1, is rather
simple: during regular training, periodically check in all
layers whether any neurons are τ -dormant; for these, reini-
tialize their incoming weights and zero out the outgoing
weights. The incoming weights are initialized using the
original weight distribution. Note that if τ is 0, we are effec-
tively leaving the network's output unchanged; if τ is small,
the output of the network is only slightly changed.
Figure 9 showcases the effectiveness of ReDo in dramati-
cally reducing the number of dormant neurons, which also
results in improved agent performance. Before diving into a
deeper empirical evaluation of our method in Section 5, we
discuss some algorithmic alternatives we considered when
designing ReDo.
Alternate recycling strategies. We considered other re-
cycling strategies, such as scaling the incoming connections
using the mean of the norm of non-dormant neurons. How-
ever, this strategy performed similarly to using initial weight
distribution. Similarly, alternative initialization strategies
like initializing outgoing connections randomly resulted in
similar or worse returns. Results of these investigations are
shared in Appendix C.2.
Are ReLUs to blame? RL networks typically use ReLU
activations, which can saturate at zero outputs, and hence
zero gradients. To investigate whether the issue is specific to
the use of ReLUs, in Appendix C.1 we measured the number
of dormant neurons and resulting performance when using
a different activation function. We observed that there is a
Motivated by our finding that higher replay ratios exacerbate
dormant neurons and lead to poor performance (Figure 7),
we investigate whether ReDo can help mitigate these. To
2Code is available at
https://github.com/google/dopamine/tree/
master/dopamine/labs/redo
5
0.00.51.01.52.02.5Gradient steps (x106)05101520253035Dormant neurons [%]DemonAttackDQNDQN + ReDo010203040Number of Frames (x106)02000400060008000Average returnDemonAttackThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 10. Evaluating the effect of increased replay ratio with and without ReDo. From left to right: DQN with default settings, DQN
with n-step of 3, DQN with the ResNet architecture, and DrQ(ε). We report results using 5 seeds, while DrQ(ε) use 10 seeds; error bars
report 95% confidence intervals.
do so, we report the IQM for four replay ratio values: 0.25
(default for DQN), 0.5, 1, and 2 when training with and
without ReDo. Since increasing the replay ratio increases
the training time and cost, we train DQN for 10M frames,
as opposed to the regular 200M. As the leftmost plot in Fig-
ure 10 demonstrates, ReDo is able to avoid the performance
collapse when increasing replay ratios, and even to benefit
from the higher replay ratios when trained with ReDo.
Impact on multi-step learning.
In the center-left plot of
Figure 10 we added n-step returns with a value of n = 3
(Sutton & Barto, 2018). While this change results in a
general improvement in DQN's performance, it still suffers
from performance collapse with higher replay ratios; ReDo
mitigates this and improves performance across all values.
Varying architectures. To evaluate ReDo's impact on
different network architectures, in the center-right plot of
Figure 10 we replace the default CNN architecture used by
DQN with the ResNet architecture used by the IMPALA
agent (Espeholt et al., 2018). We see a similar trend: ReDo
enables the agent to make better use of higher replay ratios,
resulting in improved performance.
Varying agents. We evaluate on a sample-efficient value-
based agent DrQ(ε) (Yarats et al., 2021; Agarwal et al.,
2021)) on the Atari 100K benchmark in the rightmost plot
of Figure 10. In this setting, we train for 400K steps, where
we can see the effect of dormant neurons on performance,
and study the following replay ratio values: 1 (default),
2, 4, 8. Once again, we observe ReDo's effectiveness in
improving performance at higher replay ratios.
In the rest of this section, we do further analyses to under-
stand the improved performance of ReDo and how it fares
against related methods. We perform this study on a DQN
agent trained with a replay ratio of 1 using the default CNN
architecture.
5.2. Learning Rate Scaling
An important point to consider is that the default learning
rate may not be optimal for higher replay ratios. Intuitively,
Figure 11. Effect of reduced learning rate in high replay ratio set-
ting. Scaling learning rate helps, but does not solve the dormant
neuron problem. Aggregated results across 17 games (left) and the
percentage of dormant neurons during training on DemonAttack
(right).
performing more gradient updates would suggest a reduced
learning rate would be more beneficial. To evaluate this, we
decrease the learning rate by a factor of four when using a
replay ratio of 1 (four times the default value). Figure 11
confirms that a lower learning rate reduces the number of
dormant neurons and improves performance. However, per-
centage of dormant neurons is still high and using ReDo
with a high replay ratio and the default learning rate obtains
the best performance.
5.3. Is Over-parameterization Enough?
Lyle et al. (2021) and Fu et al. (2019) suggest sufficiently
over-parameterized networks can fit new targets over time;
this raises the question of whether over-parameterization
can help address the dormant neuron phenomenon. To in-
vestigate this, we increase the size of the DQN network
by doubling and quadrupling the width of its layers (both
the convolutional and fully connected). The left plot in
Figure 12 shows that larger networks have at most a mild
positive effect on the performance of DQN, and the result-
ing performance is still far inferior to that obtained when
using ReDo with the default width. Furthermore, training
with ReDo seems to improve as the network size increases,
suggesting that the agent is able to better exploit network
parameters, compared to when training without ReDo.
6
0.250.512Replay ratio0.10.20.30.40.50.6IQMDQNDQNDQN + ReDo0.250.512Replay ratio0.30.40.50.60.70.8IQMDQN0.250.512Replay ratio0.20.40.60.81.0IQMDQN (ResNet)1248Replay ratio0.350.400.450.500.550.600.65IQMDrQ()Baseline+ReDo+Low-LR0.00.20.40.6IQM0.00.51.01.52.02.5Gradient steps (×106)01020304050Dormant [%] (=0.1)DemonAttackBaseline+ReDo+Low-LRThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 12. Performance of DQN trained with RR = 1 using dif-
ferent network width. Increasing the width of the network slightly
improves the performance. Yet, the performance gain does not
reach the gain obtained by ReDo. ReDo improves the performance
across different network sizes.
Figure 13. Comparison of the performance for ReDo and two dif-
ferent regularization methods (Reset (Nikishin et al., 2022) and
weight decay (WD)) when integrated with training DQN agents.
Aggregated results across 17 games (left) and the learning curve
on DemonAttack (right).
An interesting finding in the right plot in Figure 12 is that
the percentage of dormant neurons is similar across the
varying widths. As expected, the use of ReDo dramatically
reduces this number for all values. This finding is somewhat
at odds with that from Sankararaman et al. (2020). They
demonstrated that, in supervised learning settings, increas-
ing the width decreases the gradient confusion and leads to
faster training. If this observation would also hold in RL,
we would expect to see the percentage of dormant neurons
decrease in larger models.
5.4. Comparison with Related Methods
Nikishin et al. (2022) also observed performance collapse
when increasing the replay ratio, but attributed this to overfit-
ting to early samples (an effect they refer to as the "primacy
bias"). To mitigate this, they proposed periodically resetting
the network, which can be seen as a form of regularization.
We compare the performance of ReDo against theirs, which
periodically resets only the penultimate layer for Atari en-
vironments. Additionally, we compare to adding weight
decay, as this is a simpler, but related, form of regulariza-
tion. It is worth highlighting that Nikishin et al. (2022)
also found high values of replay ratio to be more amenable
7
Figure 14. Comparison of the performance of SAC agents with
ReDo and two different regularization methods (Reset (Nikishin
et al., 2022) and weight decay (WD)). See Figure 20 for other
environments.
to their method. As Figure 13 illustrates, weight decay is
comparable to periodic resets, but ReDo is superior to both.
We continue our comparison with resets and weight decay
on two MuJoCo environments with the SAC agent (Haarnoja
et al., 2018). As Figure 14 shows, ReDo is the only method
that does not suffer a performance degradation. The results
on other environments can be seen in Appendix B.
5.5. Neuron Selection Strategies
Finally, we compare our strategy for selecting the neurons
that will be recycled (Section 3) against two alternatives:
(1) Random: neurons are selected randomly, and (2) In-
verse ReDo: neurons with the highest scores according to
Equation 1 are selected. To ensure a fair comparison, the
number of recycled neurons is a fixed percentage for all
methods, occurring every 1000 steps. The percentage of
neurons to recycle follows a cosine schedule starting at 0.1
and ending at 0. As Figure 15 shows, recycling active or
random neurons hinders learning and causes performance
collapse.
6. Related Work
Function approximators in RL. The use of over-
parameterized neural networks as function approximators
was instrumental to some of the successes in RL, such as
achieving superhuman performance on Atari 2600 games
(Mnih et al., 2015) and continuous control (Lillicrap et al.,
2016). Recent works observe a change in the network's ca-
pacity over the course of training, which affects the agent's
performance. Kumar et al. (2021a;b) show that the ex-
pressivity of the network decreases gradually due to boot-
strapping. Gulcehre et al. (2022) investigate the sources
of expressivity loss in offline RL and observe that under-
paramterization emerges with prolonged training. Lyle et al.
(2021) demonstrate that RL agents lose their ability to fit
new target functions over time, due to the non-stationary
in the targets. Similar observations have been found, re-
ferred to as plasticity loss, in the continual learning setting
124Width0.30.40.50.60.70.8IQMDQNDQNDQN + ReDo0.00.51.01.52.02.5Gradient steps (×106)01020304050Dormant [%] (=0.1)DemonAttackwidth124DQNDQN + ReDoDQN + ResetDQN + WD0.00.20.40.6IQM02468Number of Frames (×106)010002000300040005000Average returnDQN - DemonAttackDQNDQN + ReDoDQN + ResetDQN + WD0.00.20.40.60.81.0Enviroment steps (x106)010002000300040005000Average returnAnt-v2SACSAC + ReDoSAC + ResetSAC + WD0.00.20.40.60.81.0Enviroment steps (x106)020004000600080001000012000Average returnHalfCheetah-v2SACSAC + ReDoSAC + ResetSAC + WDThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
requires many gradient updates. Similar to our approach,
Dohare et al. (2021) adapt the stochastic gradient descent by
resetting the smallest utility features for continual learning.
We compare their utility metric to the one used by ReDo in
Appendix C.4 and observe similar or worse performance.
Neural network growing. A related research direction is
to prune and grow the architecture of a neural network. On
the growing front, Evci et al. (2021) and Dai et al. (2019)
proposed gradient-based strategies to grow new neurons in
dense and sparse networks, respectively. Yoon et al. (2018)
and Wu et al. (2019) proposed methods to split existing
neurons. Zhou et al. (2012) adds new neurons and merges
similar features for online learning.
7. Discussion and Conclusion
In this work we identified the dormant neuron phenomenon
whereby, during training, an RL agent's neural network
exhibits an increase in the number of neurons with little-
or-no activation. We demonstrated that this phenomenon
is present across a variety of algorithms and domains, and
provided evidence that it does result in reduced expressivity
and inability to adapt to new tasks.
Interestingly, studies in neuroscience have found similar
types of dormant neurons (precursors) in the adult brain of
several mammalian species, including humans (Benedetti
& Couillard-Despres, 2022), albeit with different dynamics.
Certain brain neurons start off as dormant during embryonic
development, and progressively awaken with age, eventually
becoming mature and functionally integrated as excitatory
neurons (Rotheneichner et al., 2018; Benedetti et al., 2020;
Benedetti & Couillard-Despres, 2022). Contrastingly, the
dormant neurons we investigate here emerge over time and
exacerbate with more gradient updates.
To overcome this issue, we proposed a simple method
(ReDo) to maintain network utilization throughout training
by periodic recycling of dormant neurons. The simplic-
ity of ReDo allows for easy integration with existing RL
algorithms. Our experiments suggest that this can lead to im-
proved performance. Indeed, the results in Figure 10 and 12
suggest that ReDo can be an important component in being
able to successfully scale RL networks in a sample-efficient
manner.
Limitations and future work. Although the simple ap-
proach of recycling neurons we introduced yielded good
results, it is possible that better approaches exist. For ex-
ample, ReDo reduces dormant neurons significantly but it
doesn't completely eliminate them. Further research on
initialization and optimization of the recycled capacity can
address this and lead to improved performance. Addition-
ally, the dormancy threshold is a hyperparameter that re-
Figure 15. Comparison of different strategies for selecting the neu-
rons that will be recycled. Recycling neurons with the highest
score (Inverse ReDo) or random neurons causes performance col-
lapse.
where the data distribution is changing over time (Berariu
et al., 2021; Dohare et al., 2021). These observations call
for better understanding how RL learning dynamics affect
the capacity of their neural networks.
There is a recent line of work investigating network topolo-
gies by using sparse neural networks in online (Graesser
et al., 2022; Sokar et al., 2022; Tan et al., 2022) and of-
fline RL (Arnob et al., 2021). They show up to 90% of
the network's weights can be removed with minimal loss in
performance. This suggests that RL agents are not using the
capacity of the network to its full potential.
Generalization in RL. RL agents are prone to overfitting,
whether it is to training environments, reducing their ability
to generalize to unseen environments (Kirk et al., 2021),
or to early training samples, which degrades later training
performance (Fu et al., 2019; Nikishin et al., 2022). Tech-
niques such as regularization (Hiraoka et al., 2021; Wang
et al., 2020), ensembles (Chen et al., 2020), or data augmen-
tation (Fan et al., 2021; Janner et al., 2019; Hansen et al.,
2021) have been adopted to account for overfitting.
Another line of work addresses generalization via re-
initializing a subset or all of the weights of a neural network
during training. This technique is mainly explored in super-
vised learning (Taha et al., 2021; Zhou et al., 2021; Alabdul-
mohsin et al., 2021; Zaidi et al., 2022), transfer learning (Li
et al., 2020), and online learning (Ash & Adams, 2020). A
few recent works have explored this for RL: Igl et al. (2020)
periodically reset an agent's full network and then performs
distillation from the pre-reset network. Nikishin et al. (2022)
(already discussed in Figure 13) periodically resets the last
layers of an agent's network. Despite its performance gains,
fully resetting some or all layers can lead to the agent "for-
getting" prior learned knowledge. The authors account for
this by using a sufficiently large replay buffer, so as to never
discard any observed experience; this, however, makes it
difficult to scale to environments with more environment in-
teractions. Further, recovering performance after each reset
8
02468Number of Frames (×106)05001000150020002500300035004000Average returnDQN - DemonAttackReDoRandomInverse ReDo02468Number of Frames (×106)5001000150020002500Average returnDQN - AsterixThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
quires tuning; having an adaptive threshold over the course
of training could improve performance even further. Fi-
nally, further investigation into the relationship between
the task's complexity, network capacity, and the dormant
neuron phenomenon would provide a more comprehensive
understanding.
Similarly to the findings of Graesser et al. (2022), this work
suggests there are important gains to be had by investigat-
ing the network architectures and topologies used for deep
reinforcement learning. Moreover, the observed network's
behavior during training (i.e.
the change in the network
capacity utilization), which differs from supervised learn-
ing, indicates a need to explore optimization techniques
specific to reinforcement learning due to its unique learning
dynamics.
Societal impact. Although the work presented here is
mostly of an academic nature, it aids in the development of
more capable autonomous agents. While our contributions
do not directly contribute to any negative societal impacts,
we urge the community to consider these when building on
our research.
Acknowledgements
We would like to thank Max Schwarzer, Karolina Dziu-
gaite, Marc G. Bellemare, Johan S. Obando-Ceron, Laura
Graesser, Sara Hooker and Evgenii Nikishin, as well as the
rest of the Brain Montreal team for their feedback on this
work. We would also like to thank the Python community
(Van Rossum & Drake Jr, 1995; Oliphant, 2007) for devel-
oping tools that enabled this work, including NumPy (Harris
et al., 2020), Matplotlib (Hunter, 2007) and JAX (Bradbury
et al., 2018).
References
2021. URL https://openreview.net/forum?
id=Ws4v7nSqqb.
Arnob, S. Y., Ohib, R., Plis, S., and Precup, D. Single-shot
pruning for offline reinforcement learning. arXiv preprint
arXiv:2112.15579, 2021.
Ash, J. and Adams, R. P. On warm-starting neural network
training. Advances in Neural Information Processing
Systems, 33:3884–3894, 2020.
Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M.
The arcade learning environment: An evaluation plat-
form for general agents. Journal of Artificial Intelligence
Research, 47:253–279, 2013.
Bellemare, M. G., Candido, S., Castro, P. S., Gong, J.,
Machado, M. C., Moitra, S., Ponda, S. S., and Wang, Z.
Autonomous navigation of stratospheric balloons using
reinforcement learning. Nature, 588(7836):77–82, 2020.
Benedetti, B. and Couillard-Despres, S. Why would the
brain need dormant neuronal precursors? Frontiers in
Neuroscience, 16, 2022.
Benedetti, B., Dannehl, D., K ̈onig, R., Coviello, S.,
Kreutzer, C., Zaunmair, P., Jakubecova, D., Weiger, T. M.,
Aigner, L., Nacher, J., et al. Functional integration of
neuronal precursors in the adult murine piriform cortex.
Cerebral cortex, 30(3):1499–1515, 2020.
Bengio, E., Pineau, J., and Precup, D.
Interference and
generalization in temporal difference learning. In Inter-
national Conference on Machine Learning, pp. 767–777.
PMLR, 2020.
Berariu, T., Czarnecki, W., De, S., Bornschein, J., Smith,
S. L., Pascanu, R., and Clopath, C. A study on the plas-
ticity of neural networks. CoRR, abs/2106.00042, 2021.
URL https://arxiv.org/abs/2106.00042.
Agarwal, R., Schuurmans, D., and Norouzi, M. An opti-
mistic perspective on offline reinforcement learning. In
International Conference on Machine Learning, pp. 104–
114. PMLR, 2020.
Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary,
C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J.,
Wanderman-Milne, S., et al. Jax: composable transfor-
mations of python+ numpy programs. 2018.
Agarwal, R., Schwarzer, M., Castro, P. S., Courville, A. C.,
and Bellemare, M. Deep reinforcement learning at the
edge of the statistical precipice. Advances in neural in-
formation processing systems, 34:29304–29320, 2021.
Alabdulmohsin, I., Maennel, H., and Keysers, D. The im-
pact of reinitialization on generalization in convolutional
neural networks. arXiv preprint arXiv:2109.00267, 2021.
Castro, P. S., Moitra, S., Gelada, C., Kumar, S., and Belle-
mare, M. G. Dopamine: A Research Framework for
Deep Reinforcement Learning. 2018. URL http:
//arxiv.org/abs/1812.06110.
Chen, X., Wang, C., Zhou, Z., and Ross, K. W. Randomized
ensembled double q-learning: Learning fast without a
model. In International Conference on Learning Repre-
sentations, 2020.
Ara ́ujo, J. G. M., Ceron, J. S. O., and Castro, P. S. Lifting
the veil on hyper-parameters for value-based deep rein-
forcement learning. In Deep RL Workshop NeurIPS 2021,
Dai, X., Yin, H., and Jha, N. K. Nest: A neural network syn-
thesis tool based on a grow-and-prune paradigm. IEEE
Transactions on Computers, 68(10):1487–1497, 2019.
9
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Dohare, S., Mahmood, A. R., and Sutton, R. S. Continual
backprop: Stochastic gradient descent with persistent
randomness. arXiv preprint arXiv:2108.06325, 2021.
Espeholt, L., Soyer, H., Munos, R., Simonyan, K., Mnih,
V., Ward, T., Doron, Y., Firoiu, V., Harley, T., Dunning,
I., et al. Impala: Scalable distributed deep-rl with im-
portance weighted actor-learner architectures. In Interna-
tional conference on machine learning, pp. 1407–1416.
PMLR, 2018.
Evci, U., van Merrienboer, B., Unterthiner, T., Pedregosa, F.,
and Vladymyrov, M. Gradmax: Growing neural networks
using gradient information. In International Conference
on Learning Representations, 2021.
Fan, L., Wang, G., Huang, D.-A., Yu, Z., Fei-Fei, L., Zhu,
Y., and Anandkumar, A. Secant: Self-expert cloning for
zero-shot generalization of visual policies. In Interna-
tional Conference on Machine Learning, pp. 3088–3099.
PMLR, 2021.
Fedus, W., Ramachandran, P., Agarwal, R., Bengio, Y.,
Larochelle, H., Rowland, M., and Dabney, W. Revisiting
fundamentals of experience replay. In International Con-
ference on Machine Learning, pp. 3061–3071. PMLR,
2020.
Hansen, N., Su, H., and Wang, X.
Stabilizing deep
q-learning with convnets and vision transformers
under data augmentation.
In Ranzato, M., Beygelz-
imer, A., Dauphin, Y., Liang, P., and Vaughan, J. W.
(eds.), Advances in Neural Information Processing
Systems, volume 34, pp. 3680–3693. Curran Asso-
ciates, Inc., 2021. URL https://proceedings.
neurips.cc/paper/2021/file/
1e0f65eb20acbfb27ee05ddc000b50ec-Paper.
pdf.
Harris, C. R., Millman, K. J., Van Der Walt, S. J., Gommers,
R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J.,
Berg, S., Smith, N. J., et al. Array programming with
numpy. Nature, 585(7825):357–362, 2020.
Hessel, M., Modayil, J., Van Hasselt, H., Schaul, T., Ostro-
vski, G., Dabney, W., Horgan, D., Piot, B., Azar, M., and
Silver, D. Rainbow: Combining improvements in deep re-
inforcement learning. In Thirty-second AAAI conference
on artificial intelligence, 2018.
Hestness, J., Narang, S., Ardalani, N., Diamos, G., Jun, H.,
Kianinejad, H., Patwary, M., Ali, M., Yang, Y., and Zhou,
Y. Deep learning scaling is predictable, empirically. arXiv
preprint arXiv:1712.00409, 2017.
Fu, J., Kumar, A., Soh, M., and Levine, S. Diagnosing
bottlenecks in deep q-learning algorithms. In Interna-
tional Conference on Machine Learning, pp. 2021–2030.
PMLR, 2019.
Hiraoka, T., Imagawa, T., Hashimoto, T., Onishi, T., and
Tsuruoka, Y. Dropout q-functions for doubly efficient
reinforcement learning. In International Conference on
Learning Representations, 2021.
Graesser, L., Evci, U., Elsen, E., and Castro, P. S. The
state of sparse training in deep reinforcement learning.
In International Conference on Machine Learning, pp.
7766–7792. PMLR, 2022.
Guadarrama, S., Korattikara, A., Ramirez, O., Castro, P.,
Holly, E., Fishman, S., Wang, K., Gonina, E., Wu,
N., Kokiopoulou, E., Sbaiz, L., Smith, J., Bart ́ok, G.,
Berent, J., Harris, C., Vanhoucke, V., and Brevdo, E.
TF-Agents: A library for reinforcement learning in
tensorflow. https://github.com/tensorflow/
URL https://github.com/
agents, 2018.
tensorflow/agents.
[Online; accessed 25-June-
2019].
Gulcehre, C., Srinivasan, S., Sygnowski, J., Ostrovski, G.,
Farajtabar, M., Hoffman, M., Pascanu, R., and Doucet,
A. An empirical study of implicit regularization in deep
offline rl. arXiv preprint arXiv:2207.02099, 2022.
Haarnoja, T., Zhou, A., Abbeel, P., and Levine, S. Soft
actor-critic: Off-policy maximum entropy deep reinforce-
ment learning with a stochastic actor. In International
conference on machine learning, pp. 1861–1870. PMLR,
2018.
Hunter, J. D. Matplotlib: A 2d graphics environment. Com-
puting in science & engineering, 9(03):90–95, 2007.
Igl, M., Farquhar, G., Luketina, J., Boehmer, W., and White-
son, S. Transient non-stationarity and generalisation in
deep reinforcement learning. In International Conference
on Learning Representations, 2020.
Janner, M., Fu, J., Zhang, M., and Levine, S. When to trust
your model: Model-based policy optimization. Advances
in Neural Information Processing Systems, 32, 2019.
Kaiser, Ł., Babaeizadeh, M., Miłos, P., Osi ́nski, B., Camp-
bell, R. H., Czechowski, K., Erhan, D., Finn, C., Koza-
kowski, P., Levine, S., et al. Model based reinforcement
learning for atari. In International Conference on Learn-
ing Representations, 2019.
Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B.,
Chess, B., Child, R., Gray, S., Radford, A., Wu, J., and
Amodei, D. Scaling laws for neural language models.
arXiv preprint arXiv:2001.08361, 2020.
Kingma, D. P. and Ba, J. Adam: A method for stochas-
In Bengio, Y. and LeCun, Y. (eds.),
tic optimization.
10
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
3rd International Conference on Learning Represen-
tations, ICLR 2015, San Diego, CA, USA, May 7-9,
2015, Conference Track Proceedings, 2015. URL http:
//arxiv.org/abs/1412.6980.
Kirk, R., Zhang, A., Grefenstette, E., and Rockt ̈aschel, T. A
survey of generalisation in deep reinforcement learning.
arXiv preprint arXiv:2111.09794, 2021.
Krizhevsky, A., Hinton, G., et al. Learning multiple layers
of features from tiny images. 2009.
Kumar, A., Agarwal, R., Ghosh, D., and Levine, S. Im-
plicit under-parameterization inhibits data-efficient deep
reinforcement learning. In International Conference on
Learning Representations, 2021a.
Kumar, A., Agarwal, R., Ma, T., Courville, A., Tucker, G.,
and Levine, S. Dr3: Value-based deep reinforcement
learning requires explicit regularization. In International
Conference on Learning Representations, 2021b.
Li, X., Xiong, H., An, H., Xu, C.-Z., and Dou, D. Ri-
fle: Backpropagation in depth for deep transfer learning
through re-initializing the fully-connected layer. In In-
ternational Conference on Machine Learning, pp. 6010–
6019. PMLR, 2020.
Lillicrap, T. P., Hunt, J. J., Pritzel, A., Heess, N., Erez, T.,
Tassa, Y., Silver, D., and Wierstra, D. Continuous control
with deep reinforcement learning. In ICLR (Poster), 2016.
Lin, L.-J. Self-improving reactive agents based on reinforce-
ment learning, planning and teaching. Machine learning,
8(3):293–321, 1992.
Lyle, C., Rowland, M., and Dabney, W. Understanding and
preventing capacity loss in reinforcement learning. In
International Conference on Learning Representations,
2021.
Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness,
J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidje-
land, A. K., Ostrovski, G., et al. Human-level control
through deep reinforcement learning. nature, 518(7540):
529–533, 2015.
Nikishin, E., Schwarzer, M., D'Oro, P., Bacon, P.-L., and
Courville, A. The primacy bias in deep reinforcement
learning. In International Conference on Machine Learn-
ing, pp. 16828–16847. PMLR, 2022.
Oliphant, T. E. Python for scientific computing. Computing
in Science & Engineering, 9(3):10–20, 2007. doi: 10.
1109/MCSE.2007.58.
Rotheneichner, P., Belles, M., Benedetti, B., K ̈onig, R.,
Dannehl, D., Kreutzer, C., Zaunmair, P., Engelhardt, M.,
Aigner, L., Nacher, J., et al. Cellular plasticity in the
adult murine piriform cortex: continuous maturation of
dormant precursors into excitatory neurons. Cerebral
Cortex, 28(7):2610–2621, 2018.
Sankararaman, K. A., De, S., Xu, Z., Huang, W. R., and
Goldstein, T. The impact of neural network overparame-
terization on gradient confusion and stochastic gradient
descent. In International conference on machine learning,
pp. 8469–8479. PMLR, 2020.
Silver, D., Huang, A., Maddison, C. J., Guez, A., Sifre, L.,
Van Den Driessche, G., Schrittwieser, J., Antonoglou, I.,
Panneershelvam, V., Lanctot, M., et al. Mastering the
game of go with deep neural networks and tree search.
nature, 529(7587):484–489, 2016.
Sokar, G., Mocanu, E., Mocanu, D. C., Pechenizkiy, M., and
Stone, P. Dynamic sparse training for deep reinforcement
learning. In International Joint Conference on Artificial
Intelligence, 2022.
Sutton, R. S. Learning to predict by the methods of temporal
differences. Machine learning, 3(1):9–44, 1988.
Sutton, R. S. and Barto, A. G. Reinforcement learning: An
introduction. MIT press, 2018.
Taha, A., Shrivastava, A., and Davis, L. S. Knowledge evolu-
tion in neural networks. In Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition,
pp. 12843–12852, 2021.
Tan, Y., Hu, P., Pan, L., and Huang, L. Rlx2: Training a
sparse deep reinforcement learning model from scratch.
arXiv preprint arXiv:2205.15043, 2022.
Todorov, E., Erez, T., and Tassa, Y. Mujoco: A physics
engine for model-based control. In 2012 IEEE/RSJ inter-
national conference on intelligent robots and systems, pp.
5026–5033. IEEE, 2012.
van Hasselt, H., Doron, Y., Strub, F., Hessel, M., Sonnerat,
N., and Modayil, J. Deep reinforcement learning and
the deadly triad. CoRR, abs/1812.02648, 2018. URL
http://arxiv.org/abs/1812.02648.
Van Hasselt, H. P., Hessel, M., and Aslanides, J. When to
use parametric models in reinforcement learning? Ad-
vances in Neural Information Processing Systems, 32,
2019.
Puterman, M. L. Markov decision processes: discrete
stochastic dynamic programming. John Wiley & Sons,
2014.
Van Rossum, G. and Drake Jr, F. L. Python reference man-
ual. Centrum voor Wiskunde en Informatica Amsterdam,
1995.
11
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Wang, K., Kang, B., Shao, J., and Feng, J.
Improv-
learning with
ing generalization in reinforcement
mixture regularization.
In Larochelle, H., Ranzato,
M., Hadsell, R., Balcan, M., and Lin, H. (eds.),
Advances in Neural Information Processing Systems,
pp. 7968–7978. Curran Associates,
volume 33,
URL https://proceedings.
Inc.,
2020.
neurips.cc/paper/2020/file/
5a751d6a0b6ef05cfe51b86e5d1458e6-Paper.
pdf.
Wu, L., Wang, D., and Liu, Q. Splitting steepest descent
for growing neural architectures. Advances in neural
information processing systems, 32, 2019.
Yarats, D., Kostrikov, I., and Fergus, R. Image augmentation
is all you need: Regularizing deep reinforcement learning
from pixels. In International Conference on Learning
Representations, 2021. URL https://openreview.
net/forum?id=GY6-6sTvGaf.
Yoon, J., Yang, E., Lee, J., and Hwang, S. J. Lifelong
learning with dynamically expandable networks. In Inter-
national Conference on Learning Representations, 2018.
Zaidi, S., Berariu, T., Kim, H., Bornschein, J., Clopath, C.,
Teh, Y. W., and Pascanu, R. When does re-initialization
work? arXiv preprint arXiv:2206.10011, 2022.
Zhai, X., Kolesnikov, A., Houlsby, N., and Beyer, L. Scaling
vision transformers. In Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition,
pp. 12104–12113, 2022.
Zhou, G., Sohn, K., and Lee, H. Online incremental fea-
ture learning with denoising autoencoders. In Artificial
intelligence and statistics, pp. 1453–1461. PMLR, 2012.
Zhou, H., Vani, A., Larochelle, H., and Courville, A. For-
tuitous forgetting in connectionist networks. In Interna-
tional Conference on Learning Representations, 2021.
12
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Table 1. Common Hyper-parameters for DQN and DrQ(ε).
Parameter
Value
Optimizer
Optimizer: ε
Training ε
Evaluation ε
Discount factor
Replay buffer size
Minibatch size
Q network: channels
Q-network: filter size
Q-network: stride
Q-network: hidden units
Recycling period
τ -Dormant
Minibatch size for estimating neurons score
Adam (Kingma & Ba, 2015)
1.5 × 10−4
0.01
0.001
0.99
106
32
32, 64, 64
8 × 8, 4 × 4, 3 × 3
4, 2, 1
512
1000
0.025 for default setting, 0.1 otherwise
64
Table 2. Hyper-parameters for DQN.
Parameter
Optimizer: Learning rate
Initial collect steps
n-step
Training iterations
Training environment steps per iteration
(Updates per environment step, Target network update period)
Value
6.25 × 10−5
20000
1
Default setting: 40, otherwise: 10
250K
(0.25, 8000)
(0.5, 4000)
(1, 2000)
(2, 1000)
Author Contributions
• Ghada: Led the work, worked on project direction and plan, participated in discussions, wrote most of the code, ran
most of the experiments, led the writing, and wrote the draft of the paper.
• Rishabh: Advised on project direction and participated in project discussions, ran an offline RL experiment, worked on
the plots and helped with paper writing.
• Pablo: Worked on project direction and plan, participated in discussions throughout the project, helped with reviewing
code, ran some experiments, worked substantially on paper writing, supervised Ghada.
• Utku: Proposed project direction and the initial project plan, reviewed and open-sourced the code, ran part of the
experiments, worked on the plots and helped with paper writing, supervised Ghada.
A. Experimental Details
Discrete control tasks. We evaluate DQN (Mnih et al., 2015) on 17 games from the Arcade Learning Environment
(Bellemare et al., 2013): Asterix, Demon Attack, Seaquest, Wizard of Wor, Bream Reader, Road Runner, James Bond,
Qbert, Breakout, Enduro, Space Invaders, Pong, Zaxxon, Yars' Revenge, Ms. Pacman, Double Dunk, Ice Hockey. This set is
used by previous works (Kumar et al., 2021a;b) to study the implicit under-parameterization phenomenon in offline RL. For
hyper-parameter tuning, we used five games (Asterix, Demon Attack, Seaquest, Breakout, Beam Rider). We evaluate DrQ(ε)
on the 26 games of Atari 100K (Kaiser et al., 2019). We used the best hyper-parameters found for DQN in training DrQ(ε).
13
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Table 3. Hyper-parameters for DrQ(ε).
Parameter
Optimizer: Learning rate
Initial collect steps
n-step
Training iterations
Training environment steps per iteration
Updates per environment step
Value
1 × 10−4
1600
10
40
10K
1, 2, 4, 8
Table 4. Hyper-parameters for SAC.
Parameter
Initial collect steps
Discount factor
Training environment steps
Replay buffer size
Updates per environment step (Replay Ratio)
Target network update period
target smoothing coefficient τ
Optimizer
Optimizer: Learning rate
Minibatch size
Actor/Critic: Hidden layers
Actor/Critic: Hidden units
Recycling period
τ -Dormant
Minibatch size for estimating neurons score
Value
10000
0.99
106
106
1, 2, 4, 8
1
0.005
Adam (Kingma & Ba, 2015)
3 × 10−4
256
2
256
200000
0
256
Continuous control tasks. We evaluate SAC (Haarnoja et al., 2018) on four environments from MuJoCo suite (Todorov
et al., 2012): HalfCheetah-v2, Hopper-v2, Walker2d-v2, Ant-v2.
Code. For discrete control tasks, we build on the implementation of DQN and DrQ provided in Dopamine (Castro et al.,
2018), including the architectures used for agents. The hyper-parameters are provided in Tables 1, 2, and 3. For continuous
control, we build on the SAC implementation in TF-Agents (Guadarrama et al., 2018) and the codebase of (Graesser et al.,
2022). The hyper-parameters are provided in Table 4.
Evaluation. We follow the recommendation from (Agarwal et al., 2021) to report reliable aggregated results across games
using the interquartile mean (IQM). IQM is the calculated mean after discarding the bottom and top 25% of normalized
scores aggregated from multiple runs and games.
Baselines. For weight decay, we searched over the grid [10−6, 10−5, 10−4, 10−3]. The best found value is 10−5. For reset
(Nikishin et al., 2022), we consider re-initializing the last layer for Atari games (same as the original paper). They use a reset
period of 2 × 104 in for Atari 100k (Kaiser et al., 2019), which corresponds to having 5 restarts in a training run. Since we
run longer experiments, we searched over the grid [5 × 104, 1 × 105, 2.5 × 105, 5 × 105] gradient steps for the reset period
which corresponds to having 50, 25, 10 and 5 restarts per training (10M frames, replay ratio 1). The best found period is
1 × 105. For SAC, we reset agent's networks entirely every 2 × 105 environment steps, following the original paper.
Replay ratio. For DQN, we evaluate replay ratio values: {0.25 (default), 0.5, 1, 2}. Following (Van Hasselt et al., 2019),
we scale the target update period based on the value of the replay ratio as shown in Table 2. For DrQ(ε), we evaluate the
values: {1 (default), 2, 4, 8}.
14
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Table 5. Hyperparameters for CIFAR-10.
Parameter
Optimizer
Minibatch size
Learning rate
Momentum
Architecture:
Layer
Convolution
Convolution
MaxPool
Convolution
MaxPool
Dense
Value
SGD
256
0.01
0.9
(channels, kernel size, stride)
(32, 3, 1)
(64, 3, 1)
(-, 2, 2)
(64, 3, 1)
(-, 2, 2)
(128, -, -)
Figure 16. Effect of replay ratio in the number of dormant neurons for DQN on Atari environments (experiments presented in Figure 7).
ReDo hyper-parameters. We did the hyper-parameter search for DQN trained with RR = 1 using the nature CNN
architecture. We searched over the grids [1000, 10000, 100000] and [0, 0.01, 0.1] for the recycling period and τ -dormant,
respectively. We apply the best values found to all other settings of DQN, including the ResNet architecture and DrQ(ε), as
reported in Table 1.
Dormant neurons in supervised learning. Here we provide the experimental details of the supervised learning analysis
illustrated in Section 3. We train a convolutional neural network on CIFAR-10 (Krizhevsky et al., 2009) using stochastic
gradient descent and cross-entropy loss. We select 10000 samples from the dataset to reduce the computational cost. We
analyze the dormant neurons in two supervised learning settings: (1) training a network with fixed targets, the standard
single-task supervised learning, where we train a network using the inputs and labels of CIFAR-10 for 100 epochs, and (2)
training a network with non-stationary targets, where we shuffle the labels every 20 epochs to generate new targets. Table 5
provides the details of the network architecture and training hyper-parameters.
Learning ability of networks with dormant neurons. Here we present the details of the regression experiment provided
in Section 3. Inputs and targets for regression come from a DQN agent trained on DemonAttack for 40M frames with the
default hyper-parameters. The pre-trained network was trained for 40M frames using a replay ratio of 1.
15
0510152025303540Number of Frames (x106)010203040506070Dormant neurons [%]AsterixRR=0.25RR=0.5RR=1RR=20510152025303540Number of Frames (x106)0102030405060Dormant neurons [%]BeamRiderRR=0.25RR=0.5RR=1RR=20510152025303540Number of Frames (x106)01020304050Dormant neurons [%]BreakoutRR=0.25RR=0.5RR=1RR=20510152025303540Number of Frames (x106)01020304050Dormant neurons [%]DemonAttackRR=0.25RR=0.5RR=1RR=20510152025303540Number of Frames (x106)010203040506070Dormant neurons [%]SeaquestRR=0.25RR=0.5RR=1RR=2010203040Number of Frames (x106)010002000300040005000Average returnAsterix010203040Number of Frames (x106)0100020003000400050006000Average returnBeamRider010203040Number of Frames (x106)0255075100125150175Average returnBreakout010203040Number of Frames (x106)010002000300040005000Average returnDemonAttack010203040Number of Frames (x106)020004000600080001000012000Average returnSeaquestThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 17. The dormant neuron phenomenon becomes apparent as the number of training steps increases during the training of DrQ(ε)
with the default replay ratio on Atrai 100K.
B. The Dormant Neuron Phenomenon in Different Domains
In this appendix, we demonstrate the dormant neuron phenomenon on DrQ(ε) (Yarats et al., 2021) on the Atari 100K
benchmark (Kaiser et al., 2019) as well as on additional games from the Arcade Learning Environment on DQN. Additionally,
we show the phenomenon on continuous control tasks and analyze the role of dormant neurons in performance. We consider
SAC (Haarnoja et al., 2018) trained on MuJoCo environments (Todorov et al., 2012). Same as our analyses in Section 3, we
consider τ = 0 to illustrate the phenomenon.
Figure 18. The number of dormant neurons increases over time during the training of SAC on MuJoCo environments.
Figure 16 shows that across games, the number of dormant neurons consistently increases with higher values for the replay
ratio on DQN. The increase in dormant neurons correlates with the performance drop observed in this regime. We then
investigate the phenomenon on a modern valued-based algorithm DrQ(ε). As we see in Figure 17, the phenomenon emerges
as the number of training steps increases.
Figure 18 shows that the phenomenon is also present in continuous control tasks. An agent exhibits an increasing number of
dormant neurons in the actor and critic networks during the training of SAC on MuJoco environments. To analyze the effect
of these neurons on performance, we prune dormant neurons every 200K steps. Figure 19 shows that the performance is
not affected by pruning these neurons; indicating their little contribution to the learning process. Next, we investigate the
effect of ReDo and the studied baselines (Reset (Nikishin et al., 2022) and weight decay (WD)) in this domain. Figure 20
shows that ReDo maintains the performance of the agents while other methods cause a performance drop in most cases. We
hypothesize that ReDo does not provide gains here as the state space is considerably low and the typically used network is
sufficiently over-parameterized.
Figure 19. Pruning dormant neurons during the training of SAC on MuJoCo environments does not affect the performance.
16
0.00.20.40.60.81.0Gradient steps (x106)24681012Dormant neurons [%]DrQ() - Asterix0.00.20.40.60.81.0Gradient steps (x106)4681012141618Dormant neurons [%]DrQ() - BeamRider0.00.20.40.60.81.0Gradient steps (x106)0246810Dormant neurons [%]DrQ() - Breakout0.00.20.40.60.81.0Gradient steps (x106)246810Dormant neurons [%]DrQ() - DemonAttack0.00.20.40.60.81.0Gradient steps (x106)24681012Dormant neurons [%]DrQ() - Seaquest0.00.20.40.60.81.0Gradient steps (×106)024681012Dormant neurons [%]SAC - Actor - Ant-v20.00.20.40.60.81.0Gradient steps (×106)0.02.55.07.510.012.515.017.5Dormant neurons [%]SAC - Critic - Ant-v20.00.20.40.60.81.0Gradient steps (×106)12345678Dormant neurons [%]SAC - Actor - HalfCheetah-v20.00.20.40.60.81.0Gradient steps (×106)012345Dormant neurons [%]SAC - Critic - HalfCheetah-v20.00.20.40.60.81.0Enviroment steps (x106)0100020003000400050006000Average returnAnt-v2StandardPruning0.00.20.40.60.81.0Enviroment steps (x106)020004000600080001000012000Average returnHalfCheetah-v2StandardPruningThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 20. Comparison of the performance of SAC agents with ReDo and two different regularization methods.
Table 6. Performance of SAC on Ant-v2 using using half and a quarter of the width of the actor and critic networks.
Width
SAC
SAC+ReDo
0.25
0.5
2016.18 ± 102
3964.04 ± 953
2114.52 ± 212
4471.61 ± 648
To investigate this, we decrease the size of the actor and critic networks by halving or quartering the width of their layers.
We performed these experiments on the complex environment Ant-v2 using 5 seeds. Table 6 shows the final average return
in each case. We observe that when the network size is smaller, there are some gains from recycling the dormant capacity.
Further analyses of the relation between task complexity and network capacity would provide a more comprehensive
understanding.
C. Recycling Dormant Neurons
Here we study different strategies for recycling dormant neurons and analyze the design choices of ReDo. We performed
these analyses on DQN agents trained with RR = 1 and τ = 0.1 on Atari games. Furthermore, we provide some additional
insights into the effect of recycling the dormant capacity on improving the sample efficiency and the expressivity of the
network.
C.1. Effect of Activation Function
In this section, we attempt to understand the effect of the activation function (ReLU) used in our experiments. The ReLU
activation function consists of a linear part (positive domain) with unit gradients and a constant zero part (negative domain)
with zero gradients. Once the distribution of pre-activations falls completely into the negative part, it would stay there since
the weights of the neuron would get zero gradients. This could be the explanation for the increased number of dormant
neurons in our neural networks. If this is the case, one might expect activations with non-zero gradients on the negative side,
such as leaky ReLU, to have significantly fewer dormant neurons.
Figure 21. Training performance and dormant neuron characteristics of networks using leaky ReLU with a negative slope of 0.01 (default
value) compared to original networks with ReLU.
In Figure 21, we compare networks with leaky ReLU to original networks with ReLU activation. As we can see, using leaky
17
0.00.20.40.60.81.0Enviroment steps (x106)010002000300040005000Average returnAnt-v2SACSAC + ReDoSAC + ResetSAC + WD0.00.20.40.60.81.0Enviroment steps (x106)020004000600080001000012000Average returnHalfCheetah-v2SACSAC + ReDoSAC + ResetSAC + WD0.00.20.40.60.81.0Enviroment steps (x106)0500100015002000250030003500Average returnHopper-v2SACSAC + ReDoSAC + ResetSAC + WD0.00.20.40.60.81.0Enviroment steps (x106)010002000300040005000Average returnWalker2d-v2SACSAC + ReDoSAC + ResetSAC + WD0.00.51.01.52.02.5Gradient steps (×106)01020304050Dormant neurons [%]DQN - DemonAttackalgorithmBaselineReDoact_typeReLULeaky-ReLU02468Number of Frames (×106)10002000300040005000Average returnDQN - DemonAttackalgorithmBaselineReDoact_typeReLULeaky-ReLUThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 22. Comparison of performance with different strategies of reinitializing the outgoing connections of dormant neurons.
Figure 23. Comparison of performance with different strategies of reinitializing the incoming connections of dormant neurons.
ReLU slightly decreases the number of dormant neurons but does not mitigate the issue. ReDo overcomes the performance
drop that occurs during training in the two cases.
C.2. Recycling Strategies
Outgoing connections. We investigate the effect of using random weights to reinitialize the outgoing connections of
dormant neurons. We compare this strategy against the reinitialization strategy of ReDo (zero weights). Figure 22 shows
the performance of DQN on five Atari games. The random initialization of the outgoing connections leads to a lower
performance than the zero initialization. This is because the newly added random weights change the output of the network.
Incoming connections. Another possible strategy to reinitialize the incoming connections of dormant neurons is to scale
their weights with the average norm of non-dormant neurons in the same layer. We observe that this strategy has a similar
performance to the random weight initialization strategy, as shown in Figure 23.
C.3. Effect of Batch Size
The score of a neuron is calculated based on a given batch D of data (Section 3). Here we study the effect of the batch size
in determining the percentage of dormant neurons. We study four different values: {32, 64, 256, 1024}. Figure 24 shows
that the identified percentage of dormant neurons is approximately the same using different batch sizes.
C.4. Comparison with Continual Backprop
Similar to the experiments in Figure 15, we use a fixed recycling schedule to compare the activation-based metric used by
ReDo and the utility metric proposed by Continual Backprop (Dohare et al., 2021). Results shown in Figure 25 show that
both metrics achieve similar results. Note that the original Continual Backprop algorithm calculates neuron scores at every
Figure 24. Effect of the batch size used to detect dormant neurons.
18
02468Number of Frames (×106)5001000150020002500Average returnAsterixZeroRandom02468Number of Frames (×106)1000200030004000500060007000Average returnBeamRiderZeroRandom02468Number of Frames (×106)2030405060Average returnBreakoutZeroRandom02468Number of Frames (×106)10002000300040005000Average returnDemonAttackZeroRandom02468Number of Frames (×106)5001000150020002500Average returnSeaquestZeroRandom02468Number of Frames (×106)50010001500200025003000Average returnAsterixInitial distributionNorm of active neurons02468Number of Frames (×106)1000200030004000500060007000Average returnBeamRiderInitial distributionNorm of active neurons02468Number of Frames (×106)203040506070Average returnBreakoutInitial distributionNorm of active neurons02468Number of Frames (×106)10002000300040005000Average returnDemonAttackInitial distributionNorm of active neurons02468Number of Frames (×106)5001000150020002500Average returnSeaquestInitial distributionNorm of active neurons0.00.51.01.52.02.5Number of Gradients (x106)20304050Dormant neurons [%]AsterixBS = 32BS = 64BS = 1024BS = 2560.00.51.01.52.02.5Number of Gradients (x106)152025303540455055Dormant neurons [%]BeamRiderBS = 32BS = 64BS = 1024BS = 2560.00.51.01.52.02.5Number of Gradients (x106)20253035404550Dormant neurons [%]BreakoutBS = 32BS = 64BS = 1024BS = 2560.00.51.01.52.02.5Number of Gradients (x106)2030405060Dormant neurons [%]DemonAttackBS = 32BS = 64BS = 1024BS = 2560.00.51.01.52.02.5Number of Gradients (x106)3540455055Dormant neurons [%]SeaquestBS = 32BS = 64BS = 1024BS = 256The Dormant Neuron Phenomenon in Deep Reinforcement Learning
iteration and uses a running average to obtain a better estimate of the neuron saliency. This approach requires additional
storage and computing compared to the fixed schedule used by our algorithm. Given the high dormancy threshold preferred
by our method (i.e., more neurons are recycled), we expect better saliency estimates to have a limited impact on the results
presented here. However, a more thorough analysis is needed to make general conclusions.
Figure 25. Comparison of different strategies for selecting the recycled neurons.
C.5. Effect of Recycling the Dormant Capacity
Figure 26. Comparison of agents with varying replay ratios, while keeping the number of gradient updates constant.
Improving Sample Efficiency. To examine the impact of recycling dormant neurons on enhancing the agents' sample
efficiency, an alternative approach is to compare agents with varying replay ratios, while keeping the number of gradient
updates constant during training. Consequently, agents with a higher replay ratio will perform fewer interactions with the
environment.
We performed this analysis on DQN and the 17 Atari games. Agents with a replay ratio of 0.25 run for 10M frames, a replay
ratio of 0.5 run for 5M frames, and a replay ratio of 1 run for 2.5M frames. The number of gradient steps are fixed across all
agents. Figure 26 shows the aggregated results across all games. Interestingly the performance of ReDo with RR = 1 is
very close to RR = 0.25, while significantly reducing the number of environment steps by four. On the other hand, DQN
with RR = 1 suffers from a performance drop.
Improving Networks' expressivity. Our results in the main paper show that recycling dormant neurons improves the
learning ability of agents measured by their performance. Here, we did some preliminary experiments to measure the effect
of neuron recycling on the learned representations. Following (Kumar et al., 2021a), we calculate the effective rank, a
measure of expressivity, of the feature learned in the penultimate layer of networks trained with and without ReDo. We
performed this analysis on agents trained for 10M frames on DemonAttack using DQN. The results are averaged over 5
seeds. The results in Table 7 suggest recycling dormant neurons improves the expressivity, shown by the increased rank
of the learned representations. Further investigation of expressivity metrics and analyses on other domains would be an
exciting future direction.
19
02468Number of Frames (×106)05001000150020002500300035004000Average returnDQN - DemonAttackReDoContinual BP02468Number of Frames (×106)500750100012501500175020002250Average returnDQN - AsterixThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Table 7. Effective rank (Kumar et al., 2021a) of the learned representations of agents trained on DemonAttack.
Agent
Effective rank
DQN
DQN + ReDo
449.2 ± 5.77
470.8 ± 1.16
D. Performance Per Game
Here we share the training curves of DQN using the CNN architecture for each game in the high replay ratio regime
(RR = 1) (Figure 27) and the default setting (RR = 0.25) (Figure 28). Similarly, Figure 29 and 30 show the training curves
of DrQ(ε) for each game in the high replay ratio regime (RR = 4) and the default setting (RR = 1), respectively.
20
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 27. Training curves for DQN with the nature CNN architecture (RR = 1).
21
5001000150020002500Eval/AverageReturnsSeaquest010002000300040005000Eval/AverageReturnsDemonAttack200300400500600700Eval/AverageReturnsSpaceInvaders1000200030004000Eval/AverageReturnsQbert2019181716151413Eval/AverageReturnsDoubleDunk1000150020002500Eval/AverageReturnsMsPacman02004006008001000Eval/AverageReturnsEnduro01000200030004000500060007000Eval/AverageReturnsBeamRider50010001500200025003000Eval/AverageReturnsWizardOfWor100200300400500Eval/AverageReturnsJamesbond010000200003000040000Eval/AverageReturnsRoadRunner5001000150020002500Eval/AverageReturnsAsterix15105051015Eval/AverageReturnsPong024680200040006000Eval/AverageReturnsZaxxon02468200040006000800010000120001400016000Eval/AverageReturnsYarsRevenge0246810203040506070Eval/AverageReturnsBreakout02468141210864Eval/AverageReturnsIceHockeyNumber of Frames (x106)algorithmDQNDQN + ReDoThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 28. Training curves for DQN with the nature CNN architecture (RR = 0.25).
22
01000200030004000500060007000Eval/AverageReturnsSeaquest02000400060008000Eval/AverageReturnsDemonAttack2505007501000125015001750Eval/AverageReturnsSpaceInvaders0200040006000800010000Eval/AverageReturnsQbert222018161412108Eval/AverageReturnsDoubleDunk500100015002000250030003500Eval/AverageReturnsMsPacman020040060080010001200Eval/AverageReturnsEnduro01000200030004000500060007000Eval/AverageReturnsBeamRider010002000300040005000Eval/AverageReturnsWizardOfWor0100200300400500600Eval/AverageReturnsJamesbond01000020000300004000050000Eval/AverageReturnsRoadRunner10002000300040005000Eval/AverageReturnsAsterix201001020Eval/AverageReturnsPong0102030400200040006000800010000Eval/AverageReturnsZaxxon010203040500010000150002000025000Eval/AverageReturnsYarsRevenge0102030400255075100125150175Eval/AverageReturnsBreakout01020304020.017.515.012.510.07.55.02.5Eval/AverageReturnsIceHockeyNumber of Frames (x106)algorithmDQNDQN + ReDoThe Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 29. Training curves for DrQ(ε) with the nature CNN architecture (RR = 4).
23
The Dormant Neuron Phenomenon in Deep Reinforcement Learning
Figure 30. Training curves for DrQ(ε) with the nature CNN architecture (RR = 1).
24
|
|
http://arxiv.org/abs/2302.12899v2 | 2023-05-24T15:24:04 | 2023-02-24T21:19:26 | Multi-Agent Reinforcement Learning with Common Policy for Antenna Tilt
Optimization | This paper presents a method for optimizing wireless networks by adjusting
cell parameters that affect both the performance of the cell being optimized
and the surrounding cells. The method uses multiple reinforcement learning
agents that share a common policy and take into account information from
neighboring cells to determine the state and reward. In order to avoid
impairing network performance during the initial stages of learning, agents are
pre-trained in an earlier phase of offline learning. During this phase, an
initial policy is obtained using feedback from a static network simulator and
considering a wide variety of scenarios. Finally, agents can intelligently tune
the cell parameters of a test network by suggesting small incremental changes,
slowly guiding the network toward an optimal configuration. The agents propose
optimal changes using the experience gained with the simulator in the
pre-training phase, but they can also continue to learn from current network
readings after each change. The results show how the proposed approach
significantly improves the performance gains already provided by expert
system-based methods when applied to remote antenna tilt optimization. The
significant gains of this approach have truly been observed when compared with
a similar method in which the state and reward do not incorporate information
from neighboring cells. | [
"Adriano Mendo",
"Jose Outes-Carnero",
"Yak Ng-Molina",
"Juan Ramiro-Moreno"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12899v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12899v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "eess.SY",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"eess.SY",
"cs.AI",
"cs.LG",
"cs.MA",
"cs.SY"
] | Multi-Agent Reinforcement Learning with
Common Policy for Antenna Tilt Optimization
Adriano Mendo, Jose Outes-Carnero, Yak Ng-Molina and Juan Ramiro-Moreno
3
2
0
2
y
a
M
4
2
]
Y
S
.
s
s
e
e
[
2
v
9
9
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-This paper presents a method for optimizing wire-
less networks by adjusting cell parameters that affect both the
performance of the cell being optimized and the surrounding
cells. The method uses multiple reinforcement learning agents
that share a common policy and take into account information
from neighboring cells to determine the state and reward.
In order to avoid impairing network performance during the
initial stages of learning, agents are pre-trained in an earlier
phase of offline learning. During this phase, an initial policy
is obtained using feedback from a static network simulator
and considering a wide variety of scenarios. Finally, agents
can intelligently tune the cell parameters of a test network
by suggesting small incremental changes, slowly guiding the
network toward an optimal configuration. The agents propose
optimal changes using the experience gained with the simulator
in the pre-training phase, but they can also continue to learn
from current network readings after each change. The results
show how the proposed approach significantly improves the
performance gains already provided by expert system-based
methods when applied to remote antenna tilt optimization. The
significant gains of this approach have truly been observed when
compared with a similar method in which the state and reward
do not incorporate information from neighboring cells.
Index Terms-Reinforcement learning, tilt optimization, AI,
deep neural network.
I. INTRODUCTION
W IRELESS networks are complex systems, where
modification of certain cell parameters may not only
affect the performance in that specific cell but also the sur-
rounding cells. Finding an optimal configuration of this kind
of parameter might be therefore considered a challenging
optimization problem. Examples of these parameters are:
• Remote Electrical Tilt (RET): Defines the angular eleva-
tion of a cell antenna and allows for remote modification
through a terminal, eliminating the need for physical
access to the antenna. Adjusting the RET value may
improve the Downlink (DL) Signal to Interference plus
Noise Ratio (SINR) in the cell being modified, but at
the same time might degrade the SINR of surrounding
cells and vice versa.
• P0 nominal Physical Uplink Shared Channel (PUSCH):
Defines the target power per Physical Resource Block
(PRB) that the cell expects in the Uplink (UL), i.e., the
communication from the User Equipment (UE) to the
Base Station (BS). By increasing it, the UL SINR in the
cell under modification increases but, at the same time,
the UL SINR in the surrounding cells may decrease,
and vice versa.
Therefore, there is a clear trade-off between the perfor-
mance of the modified cell and that of the surrounding
Adriano Mendo, Jose Outes-Carnero, Yak Ng-Molina and Juan Ramiro-
Moreno are with Cloud and Software Services at Ericsson, 29590
Malaga, Spain
yak.ng.molina,
juan.ramiro}@ericsson.com).
(e-mail: {adriano.mendo,
jose.outes,
cells. This trade-off is not easy to estimate, since it varies
on a case-by-case basis. The objective is to optimize the
global performance of the network by modifying the RET
on a per-cell basis. In computational complexity theory, this
kind of problem is considered Non-Polynomial Hard (NP-
hard) to resolve. Numerous scholarly articles and studies
have been published on this topic. One of the most common
approaches to solving this problem is the use of a control
system based on rules defined by an expert. In [1] a fuzzy
rule-based solution is described for RET optimization. With
the explosion of artificial intelligence (AI), reinforcement
learning (RL) has become a very popular method for solving
problems in diverse fields, e.g., autonomous vehicle driving
[2], gaming and puzzle resolution [3], and stock trading
[4]. Wireless network optimization has also become an
attractive field of application, especially in addressing the
particular problem of antenna tilt optimization. In [5] a
single RL agent for the entire network is proposed, which
is no longer valid if new cells are added to the cluster or
if some cells become temporarily unavailable. Multi-agent
RL (MARL) systems, such as those described by [6] and
[7], in which each agent acts upon a single cell, perform
better in terms of knowledge transfer. In [8] a combination
between multi-agent systems and single distributed agents is
introduced. However, MARL scenarios are difficult to train
because it is necessary to also handle the interaction between
individual agents. In [9] a fuzzy system is included as a
continuous/discrete converter before an RL agent based on
tabular records. Nowadays, there are more efficient ways to
handle continuous states, e.g., using neural networks. In some
cases, as in [8], the action of the agent produces the final
parameter value to apply. However, RL techniques tend to
work better in an incremental fashion, in which the parameter
is changed iteratively in small steps, limiting the negative
impact of inaccurate reward estimations. A formulation for
learning a policy for RET optimization completely offline
from real-world network data is successfully applied in [10].
However, the performance of off-policy learning is highly
sensitive to the quality and variability of data. In [11] a
method is proposed based on fuzzy logic combined with
a neural network that considers the impact on neighboring
cells. In this study, the observation space is narrow, limiting
the proposal to the ideal homogeneous network where it is
trained. This paper introduces an alternative RL approach
that addresses all the issues mentioned above.
The rest of the paper is organized as follows. Section II
describes the basic concepts of RL. Section III reveals the
proposed approach for parameter optimization based on RL.
Section IV describes the methodology used to generate the
results. Results are presented and discussed in Section V.
Concluding remarks are summarized in Section VI.
Fig. 1.
system.
Expected performance evolution of an RL agent and an expert
II. REINFORCEMENT LEARNING OVERVIEW
RL is a machine learning discipline in which an agent ac-
cumulates knowledge about the dynamics of an environment
through interactions, with the overall goal of maximizing
some notion of cumulative reward. The focus is on finding
a balance between the exploration of uncharted territory and
the exploitation of current knowledge. Basic RL problems are
modeled as a Markov decision process, in which an RL agent
(e.g., a network optimizer) interacts with its environment
(e.g., the wireless network) in discrete time steps. At each
time t, the agent receives an observation, which includes
the reward Rt and the state St [12]. Depending on the
current state St, the agent chooses an action At from the
set of available actions (e.g., parameter changes), which is
subsequently applied to the environment. The environment
then transitions to a new state St+1 and provides a reward
Rt+1 associated with the transition. The goal of an RL agent
is to maximize current and future rewards. The selection of
actions by the agent is modeled as a map called policy. The
policy map gives the probability of selecting an action At
when the environment is in state St. An example of a policy
is epsilon-greedy [12], where the action with the highest
expected reward is selected with probability 1 − ε, and a
random action is selected with probability ε, which is the
exploration rate. The concept of discount rate is introduced in
many fora to consider the relative impact of future rewards.
A discount rate of zero is assumed in this paper, due to
the nature of the problem to resolve, in which higher future
rewards at the expense of negative or sub-optimal immediate
rewards are not acceptable. This research uses an off-policy
RL method called Q-learning [12].
III. PROPOSED OPTIMIZATION METHOD BASED ON
REINFORCEMENT LEARNING
A. Problem Formulation
This paper focuses on cellular network optimization prob-
lems in which modifying a network parameter in a single
cell affects not only the performance of that particular cell
but also the performance of the surrounding cells. The study
focuses on the case of the RET parameter.
B. Proposed solution
Policies remain constant in expert systems, which means
policies are not improved as expert systems interact with
the environment. In contrast, while an RL agent needs to
Fig. 2. Multiple instances of a unique RL agent.
explore the environment to learn, it will eventually surpass
the performance of any agent that is defined by an expert,
as shown in Fig. 1. An offline agent initialization phase
can avoid both the initial training phase in the network to
optimize, and the corresponding risk of network degradation.
This paper proposes a MARL approach with one agent
per cell, where all agents share a common policy. As a
consequence, any lessons learned based on rewards obtained
from one cell are immediately available in the common
policy for the rest of the cells. The agents implement Q-
learning with a Deep Neural Network (DNN) and Experience
Replay (ER) [13]. A common policy is obtained by making
the agents share the same DNN, which is trained with the
experiences collected by all cells. The proposed approach can
also be perceived as using multiple instances (one per cell)
of a unique RL agent. This conceptual vision is illustrated
in Fig. 2, where the single RL agent periodically updates the
policy based on the observations collected by the multiple
instances. The multiple instances receive the new policy after
every update.
A static network simulator is used to pre-train the DNN
during the initialization phase, as proposed in [14]. A
simulator can provide enough training data variability by
just sweeping the required ranges of network configuration
parameters. Agents with this same DNN are used to interact
with the network to optimize once pre-trained.
The agents steer the cell parameters toward the opti-
mal global solution thanks to suggesting small incremental
changes. The use of small incremental changes limits the
negative impact caused by errors in reward estimations
learned from the training network simulations.
In order to control the interaction between agents, they
have visibility of the cell and its surrounding cells in the def-
inition of state and reward. Below, the proposed definitions
of state, reward, and action are presented for the particular
case of RET optimization of non-active antennas.
1) State: In this study, the following configuration pa-
rameters and Key Performance Indicators (KPI) have been
selected to determine the state of a cell in the RL scheme at
every iteration period t:
• Configuration parameters: antenna height, RET, me-
chanical tilt, carrier frequency, and average distance to
the five closest eNodeBs.
• KPIs synthesized from Cell Traffic Recordings (CTR)
as defined in [1]: cell overshooting, useless high-level
cell overlapping, and bad coverage. The state also
includes congestion level, average congestion at
the
closest cells weighted by their overlapping factor with
respect to the studied cell, and an interference indicator,
computed as the ratio of traffic in which the RSRP of
the second strongest neighbor is higher than a threshold
with respect to the best server. The overlapping factor
between a first cell and a second cell can be obtained
as the periodicity in which both cells are reported
simultaneously by the same UE in CTR, provided that
the first cell is the serving cell.
2) Reward: The reward at
instant t + 1 after a cell
parameter update is defined as the relative performance gain
after the change, i.e.,
Rt+1 = 1000 *
RMt+1 − RMt
RMt
,
(1)
where RMt+1 is the reward metric at instant t + 1 (right
after the parameter update), and RMt is the reward metric
at instant t (right before the parameter update). This relative
definition of the reward improves learning compared to a
definition based on absolute values since positive rewards
imply a gain, while negative rewards imply a loss. The factor
1000 moves the reward values into a scale that facilitates
convergence when using a learning rate of 0.001. The reward
metric at instant t is computed as
Fig. 3. Topology of the scenario used during the training phase.
t
t
t
(cid:17)
(cid:16)
GTt + GT neigh
− CRt − CRneigh
the cell at
RMt = 1 + 0.5 *
,
(2)
where GTt and CRt are the good traffic and the congestion
instant t, respectively, and GT neigh
rate at
and CRneigh
are the average good traffic and congestion
rate measured at instant t at the closest neighboring cells,
weighted by their overlapping factor with respect to the
studied cell. Good traffic is defined as the ratio of traffic
with good coverage and good quality with respect to the
total traffic. Good coverage means having reference signal
received power (RSRP) over a predefined threshold. Good
quality means having DL SINR over a predefined threshold.
t
3) Action: This optimization process follows an iterative
approach, in which the parameters are not updated with
the final value in one single step, but only with a relative
increment with respect to the current value. Three actions
are possible: keep the current value, increase it by a fixed
amount, or decrease it by a fixed amount. A fixed increment
of one degree is used in this study. A small increment limits
the reward estimation error and the negative impact in case
of a wrong decision.
IV. VALIDATION METHODOLOGY
A. Simulator
A proprietary static Monte Carlo simulator has been used
to train the agents during the pre-training phase. A large
variety of scenarios is considered during this initial phase.
In this phase, changes are applied to the training networks,
avoiding impacting the test network, which plays the role of
the network to optimize. In order to test the performance
of the pre-trained agents, the test network has also been
simulated, although its topology is different from the one
used in the training phase. The regular topology with two cell
Fig. 4. Topology of the scenario used during the test phase.
rings shown in Fig. 3 has been used during the training phase,
consisting of 19 sites with three cells per site (i.e., 57 cells).
Users are generated following a uniform spatial distribution
in the network area. All cells operate on a common single-
carrier frequency. The test phase has been carried out in a
similar but larger regular scenario, which consists of five
rings containing 91 sites (i.e., 273 cells), as displayed in
Fig. 4. Table I lists the most relevant network simulation
parameters used during the training and test phases. Note
that U(A, B) is a discrete uniform distribution in the range
[A, B] with step 1. No exploration is carried out during the
test phase.
B. Optimization Process
The agents are initially pre-trained offline with 500 in-
dependent episodes. Each episode simulates a 20-step op-
timization campaign, in which the RET of the 21 cells in
the inner ring are considered for optimization (see Fig. 3).
TABLE I
MAIN SIMULATION PARAMETERS AT THE TRAINING AND TEST PHASES.
Parameter
Electrical tilt for optimized cells
Electrical tilt for non-optimized cells
Mechanical tilt range
Antenna height
Inter-site distance
Carrier frequencies
Offered traffic (average per cell)
Bandwidth
Good coverage threshold
Good quality threshold
Value
U(0, 15) deg
U(4, 6) deg
U(0, 4) deg
U(16, 30) m
U(1000, 2500) m
0.7, 1.8, 2.1 & 2.6 GHz
U(4, 11) Mbps
20 MHz
-108 dBm
3 dB
Fig. 5. Average loss and reward during the pre-training phase.
The remaining 36 cells in the outer ring keep constant RETs
throughout the same episode. These parameters are randomly
reset at the beginning of every episode: inter-site distance,
mechanical tilt, RET, antenna height, frequency, and offered
traffic volume. Mechanical tilt, RET, and antenna height can
be different for different cells. During each step of each
episode, one of these three possible actions is applied to the
RETs of the optimized cells: keep the same value, increase
by one degree, or decrease by one degree. Fig. 5 shows the
evolution of the loss and the reward during the training phase
averaged over a 100-step window so that it is possible to
appreciate the long-term trend. The loss function is the mean
squared reward estimation error. After the initial learning
phase, the agent is tested on 300 additional independent
episodes of a larger scenario with a regular topology where
183 out of 273 cells are optimized (see Fig. 4). To quantify
the benefit of including neighbor information, a modified
version of the RL agents that excludes the neighbor informa-
tion from reward and state has also been implemented, pre-
trained, and tested on the same 300 episodes. Additionally,
the algorithm in [1], henceforth referred to as the expert
system, has also been implemented to provide results on the
same 300 episodes for benchmarking purposes.
C. Evaluation Metric
The metrics to measure the gain per episode are good traf-
fic improvement, good coverage traffic improvement, good
quality traffic improvement, and congestion improvement.
The gains per episode are calculated as the relative improve-
ment at the end of an episode compared to the baseline value
at the beginning of the same episode.
Fig. 6. Evolution of average good traffic improvement in a single episode.
Fig. 7. Evolution of average good coverage traffic improvement in a single
episode.
Fig. 8. Evolution of average good quality traffic improvement in a single
episode.
010002000300040005000600070008000900010000Step01020304050Loss010002000300040005000600070008000900010000Step012345Reward05101520Step0510152025303540Good traffic improvement (%)RL scheme including neighbor informationRL scheme excluding neighbor informationExpert system05101520Step-5051015202530Good coverage traffic improvement (%)RL scheme including neighbor informationRL scheme excluding neighbor informationExpert system05101520Step05101520253035Good quality traffic improvement (%)RL scheme including neighbor informationRL scheme excluding neighbor informationExpert systemFig. 9. Evolution of average congestion improvement in a single episode.
Fig. 10.
episodes.
Evolution of good traffic improvement over 300 independent
V. SIMULATION RESULTS
A. Single Episode
Fig. 6 compares the progress of the average good traffic
improvement per step when optimizing the same particular
episode with pre-trained RL agents with and without neigh-
bor information, and with the expert system. The solid lines
represent the average values using static agents, i.e., agents
that do not continue training after the initial pre-training
phase. The blue dotted line represents the values obtained
with the RL scheme that includes neighbor information and
an agent that continues training while optimizing the test net-
work. Step zero represents the baseline configuration. Notice
how the RL agents enable greater good traffic improvement
from the first step to the last step of the episode, resulting
in significantly better traffic improvements than the expert
system, particularly when the RL agents utilize neighbor
information. This indicates that offline pre-training mitigated
the effects of the initial unstable behavior of RL systems.
An additional gain is obtained when the agent is configured
to continue learning from the network to optimize. This
comparison repeats in Figures 7 and 8 for the coverage
and quality improvements, respectively. A higher quality
improvement is also appreciable from the first step when
using the RL agents as compared with the expert system.
However, the consideration of neighbor information is not
so significant as when evaluating the coverage improvement.
Fig. 9 shows how the congestion improvement reaches 100%
at the third step with all methods. A congestion improvement
of 100% means that the cells have reduced the congestion to
zero. Note that these results have been obtained from a single
episode and are presented solely as an illustrative example.
Consequently, they are insufficient to draw definitive conclu-
sions. To address this, the experiment has been repeated with
a greater number of episodes to ensure statistical significance.
Fig. 11.
independent episodes.
Evolution of good coverage traffic improvement over 300
B. Multiple Episodes
The pre-trained RL agents and the expert system have been
tested on 300 additional independent episodes, as described
in Section IV-B. The results for the multiple episode case
are shown in Figures 10 to 12 as the evolution of good
Fig. 12. Evolution of good quality traffic improvement over 300 indepen-
dent episodes.
traffic improvement, coverage improvement, and quality im-
provement, respectively, with the number of steps. In this
05101520Step0102030405060708090100Congestion improvement (%)RL scheme including neighbor informationRL scheme excluding neighbor informationExpert systemTABLE II
AVERAGE FINAL GAINS OVER 300 INDEPENDENT EPISODES.
KPI
Good traffic improvement (%)
Good coverage traffic improvement (%)
Good quality traffic improvement (%)
ES
16.3
13.3
14.0
RLEN
RLIN
RLIN+
27.6
14.7
24.8
31.6
17.6
27.4
32.4
18.4
27.7
ES: Expert system
RLEN: RL scheme excluding neighbor information
RLIN: RL scheme including neighbor information
RLIN+: RL scheme including neighbor information and continuing to train
case, the improvements per step are computed as the average
values over the 300 episodes, but additional information is
graphically provided about the distribution of the gain in
terms of the first and third quartiles. The solid lines represent
the average values and the shaded areas are the confidence
intervals delimited by the first and third quartiles using
static agents. The blue dotted line represents the average
values obtained with the RL scheme that includes neighbor
information and an agent that continues training. The findings
are similar to the single-episode case:
• Our RL agent provides significantly higher good traffic
improvement than the expert system.
• An additional gain is provided by the RL agent when the
state and reward definitions include information from
neighboring cells, which is especially appreciated in the
coverage improvement.
• Even higher gain can be achieved if the agent continues
to learn from the optimized network.
A comparison of the average gains provided by the dif-
ferent studied schemes after the 20 steps of every episode is
available in Table II. On average, the proposed RL approach
with static agents yields a 94.5% higher gain than the expert
system in terms of good traffic improvement and a 70.0%
higher gain than the same approach when excluding neighbor
information. Another relevant finding is that the proposed RL
approach with neighbor information yields a 19.4% higher
coverage gain than the same approach without neighbor
information, although the quality gain is only 11.6% higher.
A possible reason for the high quality improvement of the RL
scheme that excludes neighbor information is that the quality
KPI depends on the SINR, which includes information on
interference from neighboring cells. The RL approach in-
cluding neighbor information and configured for continuous
learning during network optimization achieves the highest
performance, resulting in an additional 2.3% improvement in
good traffic compared to using a static agent. As illustrated
in the dotted line of Fig. 10, the optimal performance is not
achieved at the last step, but at the 14th step, with a 34.0%
good traffic improvement, i.e., 7.3% higher gain than using a
static agent. This behavior implies that the learning process
eventually starts to deteriorate over time. On the one hand,
the good coverage traffic is still increasing (dotted line in Fig.
11), but on the other hand, the good quality is still decreasing
(dotted line in Fig. 12). By the 15th step,
the majority
of cells have already achieved optimal RET values, and
going forward, the expected behavior of the agent is to keep
the configuration unchanged. However, agents may propose
oscillations around the optimal RET values. This phase can
distort the training of the model, potentially causing it to
Fig. 13. Box plots representing the distribution of the number of steps to
reach congestion mitigation over 300 independent episodes.
TABLE III
AVERAGE STEPS TO MITIGATE CONGESTION.
Considered episodes
All 300 episodes
Episodes with initial congestion
ES
5.1
7.7
RLEN
RLIN
RLIN+
3.1
4.7
3.0
4.6
3.0
4.5
forget previously acquired knowledge. One potential solution
is to exclude training data from cells that have already
reached an optimal value. This can be accomplished by
detecting consecutive 'keep' actions, oscillating actions, or a
decline in reward growth.
Congestion improvement consistently reaches 100% with
all methods, which means that all agents can mitigate the
congestion. For this reason, rather than looking at the evolu-
tion of the average congestion gain, we consider it more
to compare the number of steps each method
insightful
needs to achieve congestion mitigation. Fig. 13 displays
the distribution of the required steps to reach congestion
mitigation for each optimization approach using box plots.
The median, represented by the red line, is consistent at
two steps across all methods. Table III provides the average
number of steps needed to achieve congestion mitigation
for the different methods. It
the RL-
based methods not only deliver significantly improved traffic
performance but also exhibit faster congestion mitigation. On
average, the expert system requires two more steps compared
to the RL methods. However, when focusing on episodes
with initial congestion, the RL methods require three fewer
steps on average compared to the expert system.
is noteworthy that
ESRLENRLINRLIN+02468101214161820Steps to reach congestion mitigationVI. CONCLUSION
A new approach has been proposed to optimize cell
parameters in a wireless network based on MARL, which
considers the impact on the cell under study, but also on
its neighboring cells. A unique common policy facilitates
the immediate sharing of exploration outcomes with the rest
of the cells, thereby accelerating the learning phase. It also
facilitates knowledge sharing when adding new cells. By
employing a simulator for offline pre-training, the network
being optimized is protected from potential damage during
the initial stages of the learning process, where an untrained
agent would exhibit erratic behavior. Simulation results show
a significantly higher gain, as compared to an existing expert
system in terms of good traffic, which implies coverage
increase and interference reduction. Although both methods
can mitigate the congestion, the proposed approach does it
in fewer steps. Considering neighbor information in the state
and reward guarantees significant extra gain, especially in
terms of coverage. Finally, after connecting the RL agent to
the test network, it can continue learning while optimizing,
eventually achieving even higher performance levels. Finding
a method to detect the most suitable step to stop learning
from a cell is recommended to avoid overfitting, which leads
the model to forget previously acquired knowledge.
REFERENCES
[1] V. Buenestado, M. Toril, S. Luna-Ram ́ırez, J. M. Ruiz-Avil ́es, and
A. Mendo, "Self-tuning of remote electrical tilts based on call traces
for coverage and capacity optimization in LTE," IEEE Transactions
on Vehicular Technology, vol. 66, no. 5, pp. 4315–4326, 2017.
[2] M. Rhazzaf and T. Masrour, "Smart autonomous vehicles in high
dimensional warehouses using deep reinforcement learning approach."
Engineering Letters, vol. 29, no. 1, 2021.
[3] K. Hukmani, S. Kolekar, and S. Vobugari, "Solving twisty puzzles
using parallel q-learning." Engineering Letters, vol. 29, no. 4, 2021.
[4] Y. Li and Y. Chen, "Enhancing a stock timing strategy by reinforce-
ment learning." IAENG International Journal of Computer Science,
vol. 48, no. 4, 2021.
[5] F. B. Mismar, J. Choi, and B. L. Evans, "A framework for automated
cellular network tuning with reinforcement learning," IEEE Transac-
tions on Communications, vol. 67, no. 10, pp. 7152–7167, 2019.
[6] W. Guo, S. Wang, Y. Wu, J. Rigelsford, X. Chu, and T. O'Farrell,
"Spectral- and energy-efficient antenna tilting in a hetnet using re-
inforcement learning," in 2013 IEEE Wireless Communications and
Networking Conference (WCNC), 2013, pp. 767–772.
of
"Method
communica-
International Patent WO2012072445A1," World Patent
Available:
tions,
WO2 012 072 445A1,
Jun.
https://patents.google.com/patent/WO2012072445A1
[7] G. Koudouridis,
apparatus
[Online].
2012.
and
7,
[8] E. Balevi and J. G. Andrews, "Online antenna tuning in heterogeneous
cellular networks with deep reinforcement learning," IEEE Transac-
tions on Cognitive Communications and Networking, vol. 5, no. 4, pp.
1113–1124, 2019.
[9] R. Razavi, S. Klein, and H. Claussen, "Self-optimization of capacity
and coverage in LTE networks using a fuzzy reinforcement learning
approach," in 21st Annual IEEE International Symposium on Personal,
Indoor and Mobile Radio Communications, 2010, pp. 1865–1870.
[10] F. Vannella, J. Jeong, and A. Proutiere, "Off-policy learning for remote
electrical tilt optimization," in 2020 IEEE 92nd Vehicular Technology
Conference (VTC2020-Fall), 2020, pp. 1–5.
[11] S. Fan, H. Tian, and C. Sengul, "Self-optimization of coverage and
capacity based on a fuzzy neural network with cooperative reinforce-
ment learning," EURASIP Journal on Wireless Communications and
Networking, vol. 2014, no. 1, pp. 1–14, 2014.
[12] R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduc-
tion, 2nd ed. The MIT Press, 2018.
[13] L.-J. Lin, "Self-improving reactive agents based on reinforcement
learning, planning and teaching," Machine Learning, vol. 8, no. 3-4,
pp. 293–321, 1992.
[14] Ericsson AB,
complex
"AI:
5G world,"
a
line].
report/documents/2021/june-2021-ericsson-mobility-report.pdf.
in
[On-
ericsson.com/4a03c2/assets/local/mobility-
experience
2021,
Enhancing
Available:
customer
26–28,
June
pp.
Adriano Mendo received his M.Sc. in Telecommunication Engineering
from Malaga University, Spain,
in 2004. Since 2004, he has been a
Researcher with Optimi Corporation and joined Ericsson in 2010. He has
authored a few publications and patents. His current research interests
include self-organizing networks, radio resource management, and AI.
Jose Outes Carnero is a Research Specialist at Ericsson in Malaga,
Spain. He received his M.Sc.
in Telecommunication Engineering from
Malaga University, Spain, in 2000. He received his Ph.D. in Electrical and
Electronic Engineering from Aalborg University, Denmark, in 2004. His
current research interests include network design and optimization, and AI.
Yak Ng Molina is a Program Manager at Ericsson in Malaga, Spain. He
received his M.Sc. in Telecommunication Engineering and his Ph.D. in
Electrical and Electronic Engineering from Malaga University, Spain, in
2008 and 2013, respectively. His current research interests include network
design and optimization, digital twins, energy management, and AI.
Juan Ramiro Moreno is heading the Network Design and Optimization
Innovation team at Ericsson. He holds a Telecom Engineering degree from
Malaga University, a Ph.D. in Electrical and Electronic Engineering from
Aalborg University, an MBA from San Telmo Business School, and an
Executive Degree in Big Data & Business Analytics from EOI. He is also
an Honorary Professor at Malaga University and co-author of a book on
Self-Organizing Networks.
|
|
http://arxiv.org/abs/2302.12893v1 | 2023-02-24T21:02:58 | 2023-02-24T21:02:58 | Don't be fooled: label leakage in explanation methods and the importance
of their quantitative evaluation | Feature attribution methods identify which features of an input most
influence a model's output. Most widely-used feature attribution methods (such
as SHAP, LIME, and Grad-CAM) are "class-dependent" methods in that they
generate a feature attribution vector as a function of class. In this work, we
demonstrate that class-dependent methods can "leak" information about the
selected class, making that class appear more likely than it is. Thus, an end
user runs the risk of drawing false conclusions when interpreting an
explanation generated by a class-dependent method. In contrast, we introduce
"distribution-aware" methods, which favor explanations that keep the label's
distribution close to its distribution given all features of the input. We
introduce SHAP-KL and FastSHAP-KL, two baseline distribution-aware methods that
compute Shapley values. Finally, we perform a comprehensive evaluation of seven
class-dependent and three distribution-aware methods on three clinical datasets
of different high-dimensional data types: images, biosignals, and text. | [
"Neil Jethani",
"Adriel Saporta",
"Rajesh Ranganath"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12893v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12893v1",
"@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"
] | Don't be fooled: label leakage in explanation methods and the importance of
their quantitative evaluation
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
3
9
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Neil Jethani*
Grossman School of Medicine, Courant Institute
New York University
Adriel Saporta*
Courant Institute
New York University
Rajesh Ranganath
Courant Institute, Center for Data Science
New York University
Abstract
Feature attribution methods identify which fea-
tures of an input most influence a model's out-
put. Most widely-used feature attribution meth-
ods (such as SHAP, LIME, and Grad-CAM) are
"class-dependent" methods in that they gener-
ate a feature attribution vector as a function of
class. In this work, we demonstrate that class-
dependent methods can "leak" information about
the selected class, making that class appear more
likely than it is. Thus, an end user runs the risk
of drawing false conclusions when interpreting
an explanation generated by a class-dependent
method. In contrast, we introduce "distribution-
aware" methods, which favor explanations that
keep the label's distribution close to its distribu-
tion given all features of the input. We intro-
duce SHAP-KL and FastSHAP-KL, two baseline
distribution-aware methods that compute Shap-
ley values. Finally, we perform a comprehen-
sive evaluation of seven class-dependent and
three distribution-aware methods on three clin-
ical datasets of different high-dimensional data
types: images, biosignals, and text.
1
INTRODUCTION
Post-hoc feature attribution methods, which identify the
features of an input that most influence predictions, are
critical in high-stakes contexts such as healthcare. Fea-
ture attribution methods are used not only to interpret indi-
vidual predictions, but also to better understand a model's
global behavior for model development, knowledge discov-
ery, and quality improvement and assurance. For example,
such methods have been used to detect spurious signals in
Proceedings of the 26th International Conference on Artificial
Intelligence and Statistics (AISTATS) 2023, Valencia, Spain.
PMLR: Volume 206. Copyright 2023 by the author(s).
hip fracture radiographs (Badgeley et al., 2019), to discover
novel gene expression signatures (Janizek et al., 2021), and
to identify brain regions that help distinguish between pos-
sible sources of dementia (Iizuka et al., 2019).
Most widely-used feature attribution methods (such as
SHAP (Lundberg and Lee, 2017), LIME (Ribeiro et al.,
2016), and Grad-CAM (Selvaraju et al., 2016)) are "class-
dependent" methods, which we define to be any approach
that generates a feature attribution vector as a function of
class. However, we theoretically and empirically show that
class-dependent methods can "leak" information about the
selected class, making that class appear more likely than it
is. Thus, an end user runs the risk of drawing false con-
clusions interpreting an explanation generated by a class-
dependent method.
As an alternative, we define a "distribution-aware" method
(such as REAL-X (Jethani et al., 2021)) to be a class-
independent method that creates explanations based on the
change in the label's distribution when the features are per-
turbed, with a preference for explanations with a small
change in distribution. Preferring explanations that keep
the label's distribution close to its distribution when given
full knowledge of the features ameliorates the miscalibra-
tion that can occur when using class-dependent methods.
Further, we consider the evaluation strategy that progres-
sively includes only the top n% of features for each data
point and then plots the resulting model performances on
an inclusion curve (Arras et al., 2017; Petsiuk et al., 2018;
Jethani et al., 2022b). For this evaluation strategy, we
demonstrate that the optimal feature attribution method is
distribution-aware. Finally, we propose a strategy for eval-
uating a feature attribution method given a fixed model.
In summary, our six primary contributions are the fol-
lowing.
(1) We introduce and define the difference be-
tween class-dependent and distribution-aware feature at-
(2) We demonstrate that explanations
tribution methods.
generated by class-dependent methods using the true la-
bel can leak information about the true label, leading to
inflated performance metrics for class-dependent methods,
whereas this cannot occur with class-independent meth-
(3) We show that explanations generated by class-
ods.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
dependent methods using the predicted label can leak in-
formation about the predicted class, making the predicted
class appear more likely than it is. (4) We establish that
the optimal feature attribution vector, as measured by the
(5) We
above evaluation metric, is distribution-aware.
present two distribution-aware feature attribution methods,
SHAP-KL and FastSHAP-KL, that estimate Shapley val-
ues, are easy to optimize, and can serve as baselines to
facilitate the development of additional distribution-aware
methods. (6) We perform a comprehensive evaluation of
seven class-dependent and three distribution-aware feature
attribution methods on three clinical datasets of different
high-dimensional data types: images, biosignals, and text.
average gradient to measure the salience of input features
relative to a user-selected reference input. Another popular
method, Grad-CAM (Selvaraju et al., 2016), computes the
gradient of a class with respect to an intermediate layer of
a convolutional neural network (CNN).
Gradient-based methods have been shown to be sensitive
to small changes or distributional shifts in the input. For
example, adding a constant shift to the input can dramati-
cally change the explanations produced by gradient-based
methods (Kindermans et al., 2019; Ghorbani et al., 2019).
Gradient-based methods can also produce explanations that
appear invariant to model parameter and training label ran-
domizations (Adebayo et al., 2018).
2 RELATED WORK
Feature attribution methods generally fall into one of two
categories, which we review below: removal-based meth-
ods and gradient-based methods. See Appendix A for rele-
vant feature attribution methods grouped by type.
feature
attribution
methods.
Removal-based
Removal-based methods remove subsets of the input
features to determine their influence (Covert et al., 2021).
Many removal-based methods, such as LIME (Ribeiro
et al., 2016) and SHAP (Lundberg and Lee, 2017),
perform the removal operation for each sample of data,
which can be computationally intensive.
Amortized
approaches-such as L2X (Chen et al., 2018), INVASE
(Yoon et al., 2018), REAL-X (Jethani et al., 2021), and
FastSHAP (Jethani et al., 2022b)-represent a new form
of removal-based explainability that performs the removal
operation across multiple samples of data at a time in order
to learn models that produce explanations for a sample of
data with a single forward pass (Fong and Vedaldi, 2017;
Schwab and Karlen, 2019).
Recent work has shown that when using removal-based
methods, replacing the removed features with reference
values shifts the input out-of-distribution or off-manifold,
which can affect explanation quality and make it easier for
adversarial attacks (Frye et al., 2021; Slack et al., 2020;
Jethani et al., 2022b). In addition, some amortized expla-
nation methods, such as L2X and INVASE, can produce
explanations that encode the label directly in the shape of
the explanation rather than with the feature values the ex-
planation highlights (Jethani et al., 2021).
feature
attribution
Gradient-based
methods.
Gradient-based methods determine feature importance
using gradients with respect to either the input or interme-
diate representations of the input (Ancona et al., 2019).
SmoothGrad (Smilkov et al., 2017), for example, measures
how sensitive the model output is to small changes in
a given feature.
Integrated Gradients (IntGrad) (Sun-
dararajan et al., 2017), on the other hand, computes the
3 EVALUATION OF FEATURE
ATTRIBUTION METHODS
A feature attribution method generally produces a single
attribution vector that assigns a score to each input feature,
where a higher score implies a larger relationship to an out-
put. For a given data point, a single attribution vector could
produce many possible explanations, where an explanation
is some subset of the features based on the scores assigned
by the feature attribution method. For example, one could
choose the features with the top one, five, or ten percent of
scores.
In order to evaluate a feature attribution method, one
could compare its explanations to human benchmark ex-
planations. However, human explanations can be time-
consuming and expensive to obtain, or may not be avail-
able at all. For example, while a neural network is able to
predict diabetes from an electrocardiogram (ECG), it is not
yet clear to practitioners what information in the signal is
predictive of the disease (Jethani et al., 2022a).
Multiple strategies have been proposed for evaluating fea-
ture attribution vectors without human benchmark explana-
tions. One standard evaluation strategy is to progressively
include only the top n% of features for each data point and
measure the resulting effect on model performance (Bach
et al., 2015; Samek et al., 2017; Hooker et al., 2019; Sturm-
fels et al., 2020). The expectation is that the better a feature
attribution method is, the more model performance will
improve upon inclusion of only the top-scoring features.
Model performance using each top n% subset of features
is then plotted as an inclusion curve (Arras et al., 2017;
Petsiuk et al., 2018; Jethani et al., 2022b). We follow this
evaluation strategy, as described below.
Defining the evaluation. Let x ∈ X be a random vec-
tor consisting of d features, or x = (x1, . . . , xd). Let
y ∈ Y = {1, . . . , K} be the target variable for a multi-
class classification problem. We use s ∈ {0, 1}d to denote
subsets of the indices {1, . . . , d}. The symbols x, y, s are
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
Figure 1: Illustration of the evaluation framework. An inclusion curve is constructed by progressively increasing n from 0
to 100, selecting the top n% of features for each data point in a held-out test set using the corresponding feature attribution
vector, and then measuring performance of the surrogate evaluation model across the entire test set using the log-likelihood.
random variables, and the symbols x, y, s are possible val-
ues for those random variables.
si = 1}, then psurr(y | m(x, s); β) = F (y | xs) (Jethani
et al., 2021; Covert et al., 2021).
Hooker et al. (2019) noted that when relevant features are
removed, the new altered input comes from a distribution
that is different from that of the original unaltered input,
thereby making it difficult to know whether any degrada-
tion in model performance is caused by the removal of rel-
evant features or by the shift in distribution. The authors
solve this problem by training new surrogate models on
the altered inputs, but it has been shown that this retrain-
ing procedure not only is computationally expensive be-
cause it requires re-training for each type of explanation,
but also allows the surrogate models to incorrectly assign
high scores to feature attribution methods that encode the
label in the locations of the removed features as opposed to
their actual values (Jethani et al., 2021; Rong et al., 2022).
In order to prevent the surrogate model from co-adapting to
the explanations, recent work has proposed a computation-
ally efficient strategy that trains a single surrogate model
with randomly masked inputs (Jethani et al., 2021, 2022b;
Covert et al., 2021). We follow this strategy as described
below.
Let F (x, y) be the data distribution from which data is
drawn, and let p(s) be the distribution over s where all sub-
sets occur with non-zero probability. The surrogate eval-
uation model psurr is trained to predict the label y given a
vector of masked features. Masking is accomplished with
a function m(x, s), where the masking function m replaces
features xi where si = 0 with a [mask] value that is not
in the support of xi. The Surrogate Objective is
L(β) =
E
F (x)
E
p(s)
(cid:104)
DKL
(cid:0)F (y | x) || psurr(y | m(x, s); β)(cid:1)(cid:105)
,
(1)
where DKL is the Kullback–Leibler (KL) divergence. The
surrogate model at optimality matches the conditional
probability distribution of the target variable given some
:
subset of features. More formally, if xs is the set {xi
After training, the surrogate evaluation model can eval-
uate any feature attribution method. Let e(x, y) ∈ Rd
be a feature attribution vector generated by a feature
attribution method for each paired sample of data x, y
where ei(x, y) ∈ R is a score for the feature xi. Let
topn(e) = arg maxs sT e, such that s ∈ {0, 1}d, (cid:107)s(cid:107) =
(cid:100) nd
100 (cid:101), and n ∈ [0, 100], define an operation that returns
an explanation that denotes the top n% of features with the
highest attributions ei ∈ R. An inclusion curve is con-
structed by progressively increasing n from 0 to 100, se-
lecting the top n% of features for each data point in a held-
out test set using the corresponding feature attribution vec-
tor e(x, y), and then measuring performance of the surro-
(cid:17)
(cid:16)
y | m(cid:0)x, topn(e(x, y))(cid:1); β
gate evaluation model psurr
across the entire held-out test set using the log-likelihood.
The area under the inclusion curve (iAUC) is
iAUC =
E
n∼Unif(0,100)
E
F (x,y)
(cid:34)
log psurr
(cid:16)
y | m(cid:0)x, topn (e(x, y)) ; β(cid:1)(cid:17)
(cid:35)
.
(2)
A higher iAUC indicates a higher likelihood of the labels
averaged across different feature subset sizes. See Figure 1
for a diagram of the evaluation procedure.
4 CLASS-DEPENDENT VS.
DISTRIBUTION-AWARE METHODS
In this section, we draw a distinction between class-
dependent and distribution-aware feature attribution meth-
ods. This new categorization of feature attribution methods
exposes an important limitation of class-dependent meth-
ods, which are more commonly used than distribution-
aware methods. First, we define class-dependent methods
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
and show how they can leak information about the selected
class. Then, we define distribution-aware methods and
show that the maximizer of iAUC is a distribution-aware
method. Finally, we introduce two baseline distribution-
aware methods that compute Shapley values and are easy
to optimize.
4.1 Class-dependent methods
Feature attribution methods can be divided into two cate-
gories: class-dependent and class-independent.
We define a class-dependent feature attribution method to
be any approach that generates a feature attribution vector
as a function of class. Formally, for each sample of data
x and class c, a class-dependent feature attribution method
e(x, c) : X × Y → Rd generates an attribution vector such
that e(x, c) (cid:54)= e(x, c(cid:48)) for some c (cid:54)= c(cid:48). LIME, SHAP,
Grad-CAM, IntGrad, SmoothGrad, and FastSHAP are all
examples of class-dependent methods. Appendix B shows
how the computation performed by each of these methods
is class-dependent.
A class-independent method generates an attribution vector
that does not depend on any one class. Formally, for each
sample of data x, a class-independent feature attribution
method e(x) : X → Rd generates an attribution vector as
a function of the input x.
See Appendix C for a glossary of terms defined in this pa-
per.
leakage.
Label
In the specific case where a class-
dependent method generates an attribution vector using the
true label, the predictive performance with only a fixed
fraction of features can exceed the predictive performance
with the entire set of features. In other words, the class-
dependent method is able to leak information about the true
label through the feature attributes that is not captured by
the full set of features. This leakage would cause the evalu-
ation metric iAUC (Equation (2)) to overestimate the utility
of the explanation. Formally,
Lemma 1. There exists a class-dependent feature attri-
bution method e(x, y) and data-generating distribution
x, y ∼ F (x, y) such that
(cid:20)
E
F (x,y)
log F (y | xtopn(e(x,y)))
(cid:21)
(cid:21)
(cid:20)
> E
F (x,y)
for some n ∈ [0, 100]%.
log F (y | x)
(3)
The proof can be found in Appendix D. Lemma 1 shows
that the explanation can predict the label better than the full
feature set, indicating that the explanations are leaking the
label. While Lemma 1 introduces label leakage as a the-
oretical possibility for class-dependent methods using the
true label, we show empirically in Section 6.3 that this phe-
nomenon occurs with popular class-dependent methods on
clinical datasets, up to estimation error of a model trained
to approximate F (y | x).
Lemma 1 works by having the feature attribution pro-
vide low scores to features that reduce the probability of
the observed label. Thus, when only considering the top
n% of features, features that reduce the probability of the
observed label are obfuscated. By obfuscating features
that support other classes, feature attributions generated
by class-dependent methods fail to track the uncertainty of
the true label, making the label appear more likely than it
should. This susceptibility could have important implica-
tions when interpreting the explanations generated using
the true label. For example, a patient's likelihood of hos-
pital readmission given their discharge summary may only
be 55%, but by omitting the word "denies" from a note that
reads, "... pt denies chest pain" in the discharge summary,
the patient may appear to have an 80% chance of readmis-
sion.
Overconfidence using the predicted class. As shown in
Lemma 1, a feature attribution method should not have ac-
cess to the true labels when generating feature attributions
in order to avoid label leakage. An alternative to using the
true label is using a model's prediction of the label.
Let ˆy = arg maxy pmodel(y | x; θ) and let e(cid:48)(x, ˆy) be a
class-dependent method that uses the model's predicted
class. Because ˆy is a function of x, e(cid:48)(x, ˆy) = e(x), a
class-independent method. Therefore, we see that a class-
dependent method that uses the predicted class becomes a
class-independent method. We call class-dependent meth-
ods that use the predicted label predicted-label-dependent
methods. Class-independent methods do not leak the label
on average:
Lemma 2. There does not exist any class-independent fea-
ture attribution method e(x) where Equation (3) holds for
any F (x, y).
The proof can be found in Appendix E.
Predicted-label-dependent methods need not consider the
full distribution across all classes. They could, for example,
focus only on the probability of the predicted class. The im-
plication is that explanations generated using the predicted
class may instead leak the predicted class and omit pre-
dictive features that do not support the predicted class. In
other words, an explanation could make the predicted class
appear more likely than it is for some subset of feature val-
ues. Formally,
Lemma 3. There exists a predicted-label-dependent fea-
ture attribution method e(x, ˆy) where, for some x where
F (x = x) > 0 and for some n ∈ [0, 100]%,
F (y = ˆy | xtopn(e(x,ˆy)); β) > F (y = ˆy | x).
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
The proof can be found in Appendix F.
Lemma 3 demonstrates that an end user runs the risk of
drawing false conclusions when interpreting an explanation
generated for the predicted class with a class-dependent
method. As an example, consider a model that predicts a
patient's likelihood of all-cause mortality to be 52% from
data for that patient including clinical notes. Let us say
that a clinician is starting a shift in the hospital, and while
they do not have time to read all of the patient's clinical
notes, they would like to read the most critical portions of
the clinical notes as relates to the patient's likelihood of
all-cause mortality. Now suppose the critical portions of
the text are highlighted using a predicted-label-dependent
method. Then for some instances, the clinician will miss
those features that have a negative relationship with all-
cause mortality, but that would still help to inform how they
might choose to care for the patient during their shift.
4.2 Distribution-aware methods
The challenge with the full-space of class-independent
methods is that class-independent methods need not re-
spect the whole distribution of the label given the inputs,
F (y | x). To limit to methods that consider the whole dis-
tribution, we define distribution-aware feature attribution
methods.
(cid:16)
F (cid:0)y | x(cid:1) || r(cid:0)y | h(x)(cid:1)(cid:17)
A distribution-aware feature attribution method is a class-
independent method e(x) that focuses on the data distribu-
tion of the label given the features, F (y | x). Formally, let
D be a probability divergence, and h(x) be a perturbation
function. Then for some distribution r a distribution-aware
feature attribution method can be written in terms of the di-
vergence D
and prefers smaller
divergences. In other words, a distribution-aware method
generates feature attributions by measuring the effect of
feature perturbation on the distribution of the label. The ef-
fect is measured by the divergence between the distribution
of y given the input and the distribution of y given the per-
turbed input. An example perturbation function removes
features from the input. The data distribution F (y | x) is
unavailable, so practical distribution-aware feature attribu-
tion methods make use of distributions trained to approxi-
mate F (y | x) such as the surrogate psurr (y | x; β).
How a distribution-aware method prefers a smaller diver-
gence depends on the method. For example, REAL-X
(Jethani et al., 2021) is a distribution-aware method that
prefers smaller divergences directly through its optimiza-
tion procedure; we show how the computation performed
by REAL-X is distribution-aware in Appendix B.
As shown in Lemma 1, to avoid the potential for label leak-
age, a feature attribution method should not have access to
the true labels when generating feature attributions. Given
the constraint of not using the true labels, we show in Ap-
pendix G that the maximizer of iAUC assuming an opti-
mal surrogate psurr is not a class-dependent method, but a
distribution-aware method:
e∗ = arg min
E
F (x)
E
n∼Unif(0,100)
e
(cid:16)
(cid:20)
DKL
F (cid:0)y | x(cid:1) || F (y | xtopn(e(x)))
(cid:17)(cid:21)
.
(4)
Equation (4) shows that the optimal feature attribution vec-
tor e∗(x) for an instance x is distribution-aware in that it
minimizes the KL divergence between the likelihood of the
label given all of the features and the likelihood of the target
variable given the top n% of the features, averaged across
all possible n. Furthermore, we see that e∗(x) does not
depend on a true label y, but instead averages over a distri-
bution of the label.
The KL divergence, as with many divergences, measures
the closeness of two distributions, and thus also mea-
sures the calibration in how well the distribution of the
target given a subset of features matches the distribu-
tion of the target given the full feature set. Therefore,
while a distribution-aware method-like a class-dependent
method-returns a subset of the features, the subset that a
distribution-aware method returns is calibrated according
to the predicted probability. In the all-cause mortality ex-
ample in Section 4.1, a distribution-aware method would
highlight an appropriate ratio of positive and negative fea-
tures.
5 DISTRIBUTION-AWARE SHAPLEY
VALUE ESTIMATORS
Gradient optimization is generally used to solve optimiza-
tion problems such as the optimal explainer for iAUC.
However, the function topn in Equation (4) is not dif-
ferentiable. We develop two baseline distribution-aware
methods, SHAP-KL and FastSHAP-KL, that yield real-
valued and, therefore, simpler optimization problems with
a squared loss.
SHAP-KL and FastSHAP-KL estimate Shapley values. To
compute a Shapley value for each input feature, one must
first define how to value a subset of features. Given Equa-
tion (4), we propose valuing a subset of features according
to the KL divergence between the distribution of y given
the full set of features and the distribution of y given a sub-
set of the features:
vx(s) = −DKL
(cid:0)psurr (y | x; β) || psurr(y | m(x, s); β)(cid:1).
Notice that a higher value for a subset of features entails a
smaller KL divergence, as required for distribution-aware
methods.
Letting n ∼ U(D) denote a uniform distribution over the
set D of the number of features {0, . . . , d − 1} to include
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
in a subset, and letting s ∼ U(Pi(n)) denote a uniform
distribution over all possible feature subsets (power set of
{0, 1}d) such that n features are included in the subset
(|s|0 = n) and the ith feature is not included in the sub-
set (si (cid:54)= 1), the definition of a Shapley value for the ith
feature is
(cid:104)
vx(s + ei) − vx(s)
(cid:105)
φi(v) = E
n∼U (D)
E
s∼U (Pi(n))
E
s∼U (Pi(n))
n∼U (D)
= E
log F (cid:0)y | m(x, s + ei)(cid:1) − log F (cid:0)y | m(x, s)(cid:1)(cid:105)
E
y∼F (y | x)
(cid:104)
.
(5)
Equation (5) shows that this KL divergence-based Shapley
value assigns an attribution to a feature based on how much
it increases the log probability of the label when added to
different subsets of the rest of the features. Note that the
maximizer of iAUC (Equation (4)) is a weighted average
across subsets that progressively increase in size (e.g. the
top 1% of features is a strict subset of the top 2% of fea-
tures); the Shapley value (Equation (5)) is a weighted aver-
age across all possible feature subsets.
Unfortunately, Shapley values introduce computational
challenges: the expectation in Equation (5) involves an ex-
ponential number of subsets, making it infeasible to cal-
culate for large d. Therefore, SHAP-KL and FastSHAP-
KL efficiently approximate the Shapley values. Following
Lundberg and Lee (2017), SHAP-KL computes Shapley
values using its least-squares characterization:
eSHAP-KL(x) =
arg min
φ
E
p(s)
(cid:104)(cid:0)vx(s) − sT φ − vx(0)(cid:1)2(cid:105)
.
(6)
Following Jethani et al. (2022b), FastSHAP-KL learns an
explanation model φfast-kl(x; η) that outputs Shapley values
by minimizing the following objective:
LFastSHAP-KL(η) =
E
F (x)
E
p(s)
(cid:104)(cid:0)vx(s) − s(cid:62)φfast-kl(x; η) − vx(0)(cid:1)2(cid:105)
(7)
where the feature attributions are generated in a
through the explanation model:
single forward-pass
eFastSHAP-KL(x) = φfast-kl(x; η). For both objectives (Equa-
tions (6) and (7)), the efficiency constraint and subset sam-
pling distribution p(s) are the same as for SHAP and are
presented in Appendix B.
6 EXPERIMENTS
We validate our theoretical findings by performing a com-
prehensive evaluation of ten of the most commonly used
feature attribution methods using three clinical datasets
of different high-dimensional data types: biosignals, im-
ages, and text. We also compare SHAP-KL to its class-
dependent counterpart SHAP-S using the general image
dataset CIFAR10 (Krizhevsky et al., 2009), demonstrating
similar findings as in the clinical datasets (Appendix H).
6.1 Datasets and model tasks
For biosignal data, we use the PTB-XL ECG dataset (Wag-
ner et al., 2020). We detect right bundle branch block
(RBBB) from ECG inputs using a ResNet model adapted
from Hannun et al. (2019) (we include details of the model
architecture in Appendix I). For image data, we use the
EyePACs retinal fundus imaging dataset (Graham, 2015).
We detect the presence and severity of diabetic retinopa-
thy in retinal images using a DenseNet121 model (Huang
et al., 2017) pre-trained on ImageNet. For text data, we use
the MIMIC-IV critical care dataset (Johnson et al., 2022).
We predict 30-day readmission from patients' hospital dis-
charge summaries using the pre-trained Bio+Discharge
Summary BERT model (Alsentzer et al., 2019; Huang
et al., 2019). We provide details on dataset processing and
splits in Appendix J and details on training the prediction
models in Appendix K.
6.2 Feature attribution methods
We evaluate the following seven class-dependent methods:
LIME, SHAP, Grad-CAM, IntGrad, SmoothGrad, Fast-
SHAP, and SHAP-S (Covert et al., 2021; Frye et al., 2021).
We evaluate the following three distribution-aware meth-
ods: SHAP-KL, REAL-X, and FastSHAP-KL. Because
Grad-CAM was designed for CNNs, we did not evalu-
ate Grad-CAM using MIMIC-IV. REAL-X failed to opti-
mize on MIMIC-IV using five different regularization hy-
perparameters, therefore we did not evaluate REAL-X on
MIMIC-IV. REAL-X likely requires additional tuning for
this task given that it uses score-function gradient optimiza-
tion. We provide details on explanation generation in Ap-
pendix L; describe how iAUC is empirically calculated in
Appendix M; and report training and explanation run-times
for each method in Appendix N.
6.3 Results
Label leakage in class-dependent methods using the
true label. First, we plot the log-likelihood inclusion
curves of the seven evaluated class-dependent methods
when generating an attribution vector using the true label
(Figure 2). In general, as important features are included in
the input to the surrogate evaluation model, the likelihood
of the true label (and therefore the log-likelihood across
the entire dataset) should increase. On all three datasets we
find that the performance of many of the class-dependent
methods when using a subset of the most relevant features
exceeds performance when using the full set of features
(represented by the horizontal dotted line in Figure 2).
With finite data and an imperfect surrogate evaluation
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
Figure 2: When generating explanations using the true label, class-dependent methods can leak information about the true
label that is not captured by the full feature set: performance when using a subset of the most relevant features exceeds
performance when using the full feature set (represented by the horizontal dotted lines above).
Figure 3: The performance of SHAP-KL and FastSHAP-KL when using a subset of the most relevant features generally
does not exceed performance when using the full feature set (represented by the horizontal dotted lines), validating that
distribution-aware methods do not leak the label on average.
model psurr, the excess performance could be due to ei-
ther estimation error or label leakage. Therefore, unless
we know a priori how the features are related to the input,
it is difficult to know whether the unexpectedly high per-
formance of the class-dependent methods is due to label
leakage or due to better estimation of the surrogate with
fewer features.
Distribution-aware methods do not demonstrate label
leakage. Next, we compare our baseline distribution-
aware methods SHAP-KL and FastSHAP-KL to their
class-dependent counterparts SHAP-S and FastSHAP. We
plot the log-likelihood inclusion curves of the four meth-
ods using the true label to select which class to explain for
SHAP-S and FastSHAP (Figure 3). We find that the perfor-
mance of SHAP-KL and FastSHAP-KL when using a sub-
set of the most relevant features generally does not exceed
performance when using the full set of features, validating
that distribution-aware feature attribution methods do not
leak the label on average (Lemma 2).
FastSHAP-KL on the retinal fundus imaging dataset and
SHAP-KL on the discharge summaries dataset gener-
ate feature attributions that achieve slightly higher log-
likelihoods when using a subset of the features than when
using the full set of features (Figure 3). Since the per-
formance of a distribution-aware method provably can-
not exceed the performance using all features (Lemma 2),
the amount SHAP-KL and FastSHAP-KL rise above the
performance estimate using the full features (the hori-
zontal dotted line) provides a window into the magni-
tude of relative model misestimation for different subset
sizes. This magnitude of model misestimation is smaller
than the excess performance over the full feature set in
class-dependent methods, suggesting that label leakage,
not model estimation, is the primary driver of excess per-
formance in class-dependent methods.
During training, the surrogate evaluation model takes as in-
put a vector of masked features to approximate the proba-
bility distribution of the target given a possible subset of
features. It is possible that the surrogate evaluation model
is better able to optimize over subsets with fewer features.
Furthermore, since there is an exponential number of sub-
sets, learning to model each conditional distribution given
each subset is a difficult task. However, as a sanity check,
we ensure that the surrogate evaluation model performs as
well as the original prediction model when evaluated on the
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
Table 1: Evaluation of the feature attribution methods using iAUC when class-dependent methods use the predicted class.
Parentheses indicate 95% confidence intervals.
PTB-XL: Biosignals
EyePACs: Images
MIMIC-IV: Text
iAUC
-0.075 (-0.081, -0.071)
-0.068 (-0.075, -0.064)
-0.073 (-0.080, -0.066)
-1.400 (-1.419, -1.386)
-1.879 (-1.897, -1.855)
-1.596 (-1.619, -1.578)
-0.634 (-0.638, -0.631)
-0.618 (-0.623, -0.613)
Distribution-aware
FastSHAP-KL
REAL-X
SHAP-KL
Predicted-label-dependent
FastSHAP
Grad-CAM
IntGrad
LIME
SHAP
SHAP-S
SmoothGrad
-0.088 (-0.097, -0.082)
-0.069 (-0.076, -0.064)
-0.128 (-0.141, -0.117)
-0.095 (-0.103, -0.087)
-0.097 (-0.106, -0.089)
-0.095 (-0.105, -0.085)
-0.130 (-0.143, -0.120)
-1.851 (-1.879, -1.825)
-1.988 (-2.018, -1.962)
-1.443 (-1.461, -1.422)
-1.594 (-1.609, -1.571)
-1.598 (-1.612, -1.565)
-1.623 (-1.650, -1.597)
-1.718 (-1.742, -1.695)
-0.627 (-0.632, -0.623)
-0.635 (-0.638, -0.632)
-0.614 (-0.620, -0.609)
-0.615 (-0.621, -0.608)
-0.614 (-0.618, -0.607)
-0.634 (-0.637, -0.631)
full feature set (Appendix O).
Predicted-label-dependent vs.
distribution-aware
methods. Finally, we evaluate the iAUC of the ten feature
attribution methods when using the predicted class (instead
of the true label) to select which class to explain for the
seven class-dependent methods (Table 1).
As the most relevant features are included as input to the
surrogate evaluation model, we expect the iAUC of a suc-
cessful feature attribution method to increase. Though the
theory shows that the best method for iAUC is distribution-
aware (Equation (4)), the distribution-aware methods stud-
ied do not directly optimize iAUC, leaving open the pos-
sibility for a predicted-label-dependent method to have
higher iAUC. We find that compared to predicted-label-
dependent methods, distribution-aware methods have, on
average, higher iAUCs on two of the three datasets: REAL-
X obtained the highest iAUC (-0.068) on the ECG dataset
and FastSHAP-KL obtained the highest iAUC (-1.400)
on the retinal fundus imaging dataset. On the discharge
summaries dataset, however, the predicted-label-dependent
methods outperform the distribution-aware methods on av-
erage: LIME and SHAP-S obtained the highest iAUCs
(both -0.614).
7 DISCUSSION
7.1 Choosing a feature attribution method
When using the true label, distribution-aware methods are
recommended given that they do not demonstrate label
leakage. When using the predicted label, however, it is
not clear whether a predicted-label-dependent method or
a distribution-aware method would be preferred. While
in theory a class-dependent method does not perform op-
timally with respect to iAUC (Equation (4)), it can still
outperform a distribution-aware method in practice because
existing distribution-aware methods do not optimize iAUC
directly (Section 6.3).
In order to evaluate a feature attribution method given
some fixed model, we recommend constructing an inclu-
sion curve for the method under consideration as described
in Section 3. The inclusion curve can then be used to de-
termine how much of the model's performance is explained
by different subsets of the top features. For example, an in-
clusion curve might reveal that the top 10% of features ex-
plains 90% of the model's accuracy under some attribution
method. If the performance is high enough given the de-
sired percentage of features, the feature attribution method
can be used. If it is not high enough, alternative feature
attribution methods should be evaluated.
7.2 The merits of class-dependent methods
While our theoretical and empirical results demonstrate
that class-dependent methods can make a given class ap-
pear overly likely, there are settings in which focusing on
a single class, instead of on the full distribution across all
classes, is a useful design feature (as opposed to a "bug")
of class-dependent methods. Because iAUC measures how
well the target distribution can be approximated using a
subset of features, our paper focuses specifically on settings
in which each data point can take on different values of the
target distribution (because the true label or predicted class
for one sample may not be the same for another sample).
While class-dependent methods do not maximize iAUC
and may leak the label, they are still useful when trying
to understand which features increase or decrease the prob-
ability of a specific class, in which case explanations are
generated using a fixed class for all data points. For exam-
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
ple, given a model that predicts which molecules inhibit
growth of a bacterial species, a class-dependent method
might help highlight moieties that maximize the likelihood
of that outcome in order to guide molecule development. It
remains open what is the best evaluation for a class-specific
explanation.
7.3 The limitations imposed by discrete optimization
As discussed in Section 5, directly maximizing evaluation
metrics for feature attribution methods can be infeasible
since they often involve discrete functions that are not dif-
ferentiable, such as topn in Equation (4). While SHAP-
KL and FastSHAP-KL serve as distribution-aware base-
lines that yield real-valued optimization problems with a
squared loss, neither optimizes iAUC directly, which could
negatively affect their performances. The development of
additional distribution-aware methods that make use of ad-
vances in discrete optimization to more directly optimize
evaluation metrics such as Equation (4) is an important av-
enue for future work.
7.4
Interpreting the feature attribution vector
As discussed in Section 3, feature attribution scores can
produce many possible explanations, and often it is not
known in advance which n% of features will ultimately be
of interest. When this is the case, feature attribution method
performance can be evaluated across different feature sub-
set sizes and measured using a summary statistic such as
iAUC. Eventually, a single feature attribution vector is pro-
duced that includes a score for each input feature. Because
iAUC is a weighted average, if we were to use the single
feature attribution vector to select the "top" k features, it
is not guaranteed that we would in fact retrieve the most
predictive feature subset of size k.
To see why, consider a scenario in which there are three
input features x1, x2, and x3: together x1 and x2 are per-
fectly predictive of the output, but separately they are not
very predictive of the output; x3 alone is almost, but not
quite, perfectly predictive of the output. Given k = 1, the
most predictive feature would be x3. Given k = 2, the
most predictive two features would be x1 and x2. How-
ever, given the constraint that all features are ranked and
the relevant feature subsets monotonically increase in size
so that each subset always includes the "top" n% of fea-
tures, there is no way to choose x3 when k = 1 and choose
x1 and x2 when k = 2.
Therefore, there is no single attribution vector with scores
for all features such that the k highest ranked features are
the most predictive k features for all values of k. Care
should be taken when referring to the features with the top
scores in the attribution vector as the "most predictive" fea-
tures. Future work might investigate ways to address this
limitation when developing new attribution methods.
7.5 Cognitive burden of class-dependent methods
Given a data point, a class-dependent method produces
a set of feature attributions for every possible class. A
distribution-aware method, on the other hand, produces
for a data point a single set of feature attributions, taking
into consideration the full distribution of class probabili-
ties. However, this extra degree of freedom afforded by
class-dependent methods comes at a cost.
As discussed in Section 4.1, class-dependent methods
can surface features that make the selected class appear
more reasonable and obfuscate features that support other
classes. Because class-dependent methods are miscali-
brated and fail to adequately capture the uncertainty of a
class label, it is important that any end user interpreting the
results of a class-dependent method take into consideration
not only the explanation generated for the selected class,
but also the explanations generated for all other classes. In
other words, the end user runs the risk of drawing inaccu-
rate conclusions by only looking at the explanation for the
selected class. However, considering the feature attribu-
tions generated for every class, and then reducing them to
a single explanation for the task at hand, constitutes a sig-
nificant-and perhaps unrealistic-cognitive burden on the
part of the end user. Future work should explore the effect
of miscalibrated explanations on human decision-making.
8 CONCLUSION
In this work, we introduce and define class-dependent and
distribution-aware feature attribution methods. We demon-
strate that class-dependent methods-but not distribution-
aware methods-can leak information about the true la-
bel, causing evaluation metrics to overestimate the util-
ity of their explanations. We show that explanations gen-
erated by class-dependent methods using the predicted
label can make the predicted class appear more likely
than it is. We establish that the maximizer of iAUC is
a distribution-aware method. We present two baseline
distribution-aware methods, SHAP-KL and FastSHAP-KL,
that can be easily optimized. Finally, we validate our
theoretical findings by evaluating seven class-dependent
and three distribution-aware feature attribution methods on
three clinical datasets.
9 REPRODUCIBILITY
Formal statements and proofs for all theoretical results are
provided in Appendices B and D to G. Experimental de-
tails for all empirical results are provided in Appendices H
to P and code is available at https://github.com/
explanationleakage/xai. All datasets used are
publicly available as outlined in Appendix J.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
Acknowledgments
We thank the reviewers for their thoughtful comments.
This work was supported by NIH T32GM007308, NIH
T32GM136573, a DeepMind Scholarship, NIH/NHLBI
Award R01HL148248, NSF Award 1922658 NRT-HDR:
FUTURE Foundations, Translation, and Responsibility for
Data Science, and NSF CAREER Award 2145542.
References
Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z.,
Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M.,
Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Is-
ard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M.,
Levenberg, J., Man ́e, D., Monga, R., Moore, S., Mur-
ray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B.,
Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Va-
sudevan, V., Vi ́egas, F., Vinyals, O., Warden, P., Wat-
tenberg, M., Wicke, M., Yu, Y., and Zheng, X. (2015).
TensorFlow: Large-scale machine learning on heteroge-
neous systems. Software available from tensorflow.org.
Adebayo, J., Gilmer, J., Muelly, M., Goodfellow, I., Hardt,
M., and Kim, B. (2018). Sanity checks for saliency
maps. Advances in neural information processing sys-
tems, 31.
Alsentzer, E., Murphy, J. R., Boag, W., Weng, W.-H., Jin,
D., Naumann, T., and McDermott, M. (2019). Pub-
licly available clinical bert embeddings. arXiv preprint
arXiv:1904.03323.
Ancona, M., Ceolini, E., ̈Oztireli, C., and Gross, M. (2019).
Gradient-based attribution methods. In Explainable AI:
Interpreting, Explaining and Visualizing Deep Learning,
pages 169–191. Springer.
Arras, L., Montavon, G., M ̈uller, K.-R., and Samek, W.
(2017). Explaining recurrent neural network predictions
in sentiment analysis. arXiv preprint arXiv:1706.07206.
Bach, S., Binder, A., Montavon, G., Klauschen, F., M ̈uller,
K.-R., and Samek, W. (2015). On pixel-wise explana-
tions for non-linear classifier decisions by layer-wise rel-
evance propagation. PloS one, 10(7):e0130140.
Badgeley, M. A., Zech, J. R., Oakden-Rayner, L., Glicks-
berg, B. S., Liu, M., Gale, W., McConnell, M. V., Percha,
B., Snyder, T. M., and Dudley, J. T. (2019). Deep learn-
ing predicts hip fracture using confounding patient and
healthcare variables. NPJ digital medicine, 2(1):1–10.
Fong, R. C. and Vedaldi, A. (2017). Interpretable explana-
tions of black boxes by meaningful perturbation. In Pro-
ceedings of the IEEE international conference on com-
puter vision, pages 3429–3437.
Frye, C., de Mijolla, D., Begley, T., Cowton, L., Stanley,
M., and Feige, I. (2021). Shapley explainability on the
data manifold. In International Conference on Learning
Representations.
Ghorbani, A., Abid, A., and Zou, J. (2019). Interpretation
of neural networks is fragile. In Proceedings of the AAAI
conference on artificial intelligence, volume 33, pages
3681–3688.
Goodfellow, S. D., Goodwin, A., Greer, R., Laussen, P. C.,
Mazwi, M., and Eytan, D. (2018). Towards understand-
ing ecg rhythm classification using convolutional neural
networks and attention mappings. In Machine learning
for healthcare conference, pages 83–101. PMLR.
Graham, B. (2015). Kaggle diabetic retinopathy detection
competition report. University of Warwick.
Han, X., Hu, Y., Foschini, L., Chinitz, L., Jankelson, L.,
and Ranganath, R. (2020). Deep learning models for
electrocardiograms are susceptible to adversarial attack.
Nature medicine, 26(3):360–363.
Hannun, A. Y., Rajpurkar, P., Haghpanahi, M., Tison,
G. H., Bourn, C., Turakhia, M. P., and Ng, A. Y. (2019).
Cardiologist-level arrhythmia detection and classifica-
tion in ambulatory electrocardiograms using a deep neu-
ral network. Nature medicine, 25(1):65–69.
He, K., Zhang, X., Ren, S., and Sun, J. (2016). Deep resid-
In Proceedings of
ual learning for image recognition.
the IEEE Conference on Computer Vision and Pattern
Recognition, pages 770–778.
Hooker, S., Erhan, D., Kindermans, P.-J., and Kim, B.
(2019). A benchmark for interpretability methods in
deep neural networks. Advances in neural information
processing systems, 32.
Huang, G., Liu, Z., van der Maaten, L., and Weinberger,
K. Q. (2017). Densely connected convolutional net-
works. In Proceedings of the IEEE Conference on Com-
puter Vision and Pattern Recognition (CVPR).
Huang, K., Altosaar, J., and Ranganath, R. (2019). Clini-
calbert: Modeling clinical notes and predicting hospital
readmission. arXiv preprint arXiv:1904.05342.
Chen, J., Song, L., Wainwright, M., and Jordan, M. (2018).
Learning to explain: An information-theoretic perspec-
tive on model interpretation. In International Conference
on Machine Learning, pages 883–892. PMLR.
Iizuka, T., Fukasawa, M., and Kameyama, M. (2019).
Deep-learning-based imaging-classification identified
cingulate island sign in dementia with lewy bodies. Sci-
entific reports, 9(1):1–9.
Covert, I., Lundberg, S., and Lee, S.-I. (2021). Explaining
by removing: A unified framework for model explana-
tion. Journal of Machine Learning Research, 22(209):1–
90.
Janizek, J. D., Dincer, A. B., Celik, S., Chen, H., Chen,
W., Naxerova, K., and Lee, S.-I. (2021). Uncovering
expression signatures of synergistic drug response using
an ensemble of explainable ai models. bioRxiv.
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
Jethani, N., Puli, A., Zhang, H., Garber, L., Jankelson, L.,
Aphinyanaphongs, Y., and Ranganath, R. (2022a). New-
onset diabetes assessment using artificial intelligence-
enhanced electrocardiography. arXiv.
Shrikumar, A., Greenside, P., and Kundaje, A. (2017).
Learning important features through propagating acti-
vation differences. In International Conference on Ma-
chine Learning, pages 3145–3153. PMLR.
Slack, D., Hilgard, S., Jia, E., Singh, S., and Lakkaraju,
H. (2020). Fooling lime and shap: Adversarial attacks
on post hoc explanation methods. In Proceedings of the
AAAI/ACM Conference on AI, Ethics, and Society, pages
180–186.
Smilkov, D., Thorat, N., Kim, B., Vi ́egas, F., and Watten-
berg, M. (2017). Smoothgrad: removing noise by adding
noise. arXiv preprint arXiv:1706.03825.
Sturmfels, P., Lundberg, S., and Lee, S.-I. (2020). Visual-
izing the impact of feature attribution baselines. Distill,
5(1):e22.
Sundararajan, M., Taly, A., and Yan, Q. (2017). Axiomatic
attribution for deep networks. In International Confer-
ence on Machine Learning, pages 3319–3328. PMLR.
Wagner, P., Strodthoff, N., Bousseljot, R.-D., Kreiseler, D.,
Lunze, F. I., Samek, W., and Schaeffter, T. (2020). Ptb-
xl, a large publicly available electrocardiography dataset.
Scientific Data, 7(1):1–15.
Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue,
C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz,
M., et al. (2019). Huggingface's transformers: State-
of-the-art natural language processing. arXiv preprint
arXiv:1910.03771.
Yoon, J., Jordon, J., and van der Schaar, M. (2018).
In-
vase: Instance-wise variable selection using neural net-
works. In International Conference on Learning Repre-
sentations.
Zeiler, M. D. and Fergus, R. (2014). Visualizing and un-
derstanding convolutional networks. In European con-
ference on computer vision, pages 818–833. Springer.
Jethani, N., Sudarshan, M., Aphinyanaphongs, Y., and
Ranganath, R. (2021). Have we learned to explain?:
How interpretability methods can learn to encode predic-
tions in their interpretations. In Banerjee, A. and Fuku-
mizu, K., editors, Proceedings of The 24th International
Conference on Artificial Intelligence and Statistics, vol-
ume 130 of Proceedings of Machine Learning Research,
pages 1459–1467. PMLR.
Jethani, N., Sudarshan, M., Covert, I. C., Lee, S.-I., and
Ranganath, R. (2022b). FastSHAP: Real-time shapley
value estimation. In International Conference on Learn-
ing Representations.
Johnson, A., Bulgarelli, L., Pollard, T., Horng, S., Celi,
L. A., and Mark, R. (2022). Mimic-iv (version 2.0).
Kindermans, P.-J., Hooker, S., Adebayo, J., Alber, M.,
Sch ̈utt, K. T., D ̈ahne, S., Erhan, D., and Kim, B. (2019).
In Explain-
The (un) reliability of saliency methods.
able AI: Interpreting, Explaining and Visualizing Deep
Learning, pages 267–280. Springer.
Krizhevsky, A., Hinton, G., et al. (2009). Learning multiple
layers of features from tiny images.
Lundberg, S. M. and Lee, S.-I. (2017). A unified approach
to interpreting model predictions. In Proceedings of the
31st international conference on neural information pro-
cessing systems, pages 4768–4777.
Petsiuk, V., Das, A., and Saenko, K. (2018). Rise: Ran-
domized input sampling for explanation of black-box
models. arXiv preprint arXiv:1806.07421.
Ribeiro, M. T., Singh, S., and Guestrin, C. (2016). " why
should i trust you?" explaining the predictions of any
classifier. In Proceedings of the 22nd ACM SIGKDD in-
ternational conference on knowledge discovery and data
mining, pages 1135–1144.
Rong, Y., Leemann, T., Borisov, V., Kasneci, G., and Kas-
neci, E. (2022). A consistent and efficient evaluation
strategy for attribution methods.
Samek, W., Binder, A., Montavon, G., Lapuschkin, S.,
and M ̈uller, K.-R. (2017). Evaluating the visualiza-
tion of what a deep neural network has learned. IEEE
Transactions on Neural Networks and Learning Systems,
28(11):2660–2673.
Schwab, P. and Karlen, W. (2019). Cxplain: Causal expla-
nations for model interpretation under uncertainty. arXiv
preprint arXiv:1910.12336.
Selvaraju, R., Cogswell, M., Das, A., Vedantam, R.,
Parikh, D., and Batra, D. (2016). Grad-cam: visual ex-
planations from deep networks via gradient-based local-
ization. arxiv. Preprint posted online, 7.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
A FEATURE ATTRIBUTION METHODS GROUPED BY TYPE
Gradient-based Removal-based Amortized Relies on OOD inputs
Distribution-aware
FastSHAP-KL
REAL-X
SHAP-KL
Class-dependent
FastSHAP
Grad-CAM
IntGrad
LIME
SHAP
SHAP-S
SmoothGrad
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
B REVIEW OF FEATURE ATTRIBUTION METHODS
B.1 Gradient-based feature attribution methods
Gradient-based methods determine feature importance using gradients with respect to either the input or intermediate
representations of the input (Ancona et al., 2019). Gradients explain how sensitive the model's output is to changes in
the input or intermediate representation. Popular gradient-based methods include Grad-CAM (Selvaraju et al., 2016),
Integrated Gradients (IntGrad) (Sundararajan et al., 2017), SmoothGrad (Smilkov et al., 2017), and others (Bach et al.,
2015; Shrikumar et al., 2017).
SmoothGrad attributes importance based on how sensitive the output is to small changes in the corresponding feature,
where the output is smoothed through the introduction of Gaussian noise as follows:
eSG(x, y) =
1
n
n
(cid:88)
∂pmodel
(cid:0)y | x + N (0, σ2); θ(cid:1)
i=1
∂x
.
IntGrad attributes importance by computing the average gradient to measure the salience of features in the input relative to
a reference input ̄x as follows:
eIG(x, y) = (x − ̄x) (cid:12)
1
n
n
(cid:88)
i=1
∂pmodel
(cid:0)y | ̄x + i
n (x − ̄x); θ(cid:1)
∂ (cid:0) ̄x + i
n (x − ̄x)(cid:1)
.
Grad-CAM computes the gradient with respect to an intermediate representation of the input learned by the model A(x; θ).
This method can only be used with convolutional neural networks (CNN), as the structure of CNNs uniquely allows the
representation to be directly mapped onto the input. Grad-CAM computes explanations as follows:
eGrad-CAM(x, y) = ReLu
c
(cid:88)
k
1
hw
h
(cid:88)
w
(cid:88)
i−1
j=1
∂pmodel (y | x; θ)
∂A(x; θ)k
i,j
A(x; θ)k
where A(x; θ) is a c-channel, h by w, two-dimensional convolutional layer.
B.2 Removal-based feature attribution methods
Popular removal-based methods include LIME (Ribeiro et al., 2016), SHAP (Lundberg and Lee, 2017), and others (Zeiler
and Fergus, 2014; Fong and Vedaldi, 2017).
Both LIME and SHAP solve independent optimization problems for each sample of data. SHAP computes Shapley values
as follows:
eSHAP(x, y) = arg min
φ
E
p(s)
(cid:104)(cid:0)pmodel (y | m(x, s); θ) − sT φ − F (y)(cid:1)2(cid:105)
p(s) ∝
d − 1
(cid:0) d
1(cid:62)s
(cid:1) * 1(cid:62)s * (d − 1(cid:62)s)
.
(Shapley kernel)
Similarly, LIME computes feature attributions using a measure of distance D and attribution complexity Ω as follows:
eLIME(x, y) = arg min
φ
E
p(s)
(cid:104)(cid:0)pmodel (y | m(x, s); θ) − sT φ − F (y)(cid:1)2(cid:105)
+ Ω(φ)
p(s) ∝ D(m(x, s), x).
(LIME kernel)
Both optimizations are performed for a single sample of data x, y. The computation also requires sampling subsets from
p(s) and removing input features using a masking function m(x, s) that replaces the removed features with a reference
value for high-dimensional data.
Recent work has shown that replacing the removed features with a reference value shifts the input out-of-distribution/off-
manifold, which can affect explanation quality and allow for adversarial attack (Frye et al., 2021; Slack et al., 2020; Jethani
et al., 2022b). To address this issue, SHAP-S (Covert et al., 2021; Frye et al., 2021) approximates replacing the removed
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
features x1−s by using a surrogate model learned by minimizing Equation (1). SHAP-S computes Shapley values as
follows:
eSHAP-S(x, y) = arg min
φ
E
p(s)
(cid:104)(cid:0)psurr (y | m(x, s); β) − sT φ − F (y)(cid:1)2(cid:105)
p(s) ∝
d − 1
(cid:0) d
1(cid:62)s
(cid:1) * 1(cid:62)s * (d − 1(cid:62)s)
.
Note that this is the same objective as that used by SHAP except pmodel is replaced with psurr.
B.3 Amortized removal-based feature attribution methods
The removal-based methods above perform the removal operation for each sample of data, which can be computationally
intensive. Amortized removal-based methods represent a new form of removal-based explainability that performs the
removal operation across multiple samples of data at a time in order to learn models that produce explanations for a sample
of data with a single forward pass (Fong and Vedaldi, 2017; Schwab and Karlen, 2019). Amortized removal-based methods
include L2X (Chen et al., 2018), INVASE (Yoon et al., 2018), REAL-X (Jethani et al., 2021), and FastSHAP (Jethani et al.,
2022b).
FastSHAP builds upon the SHAP-S objective to learn an explanation model that outputs Shapley values with a single
forward pass. The follow objective is used to train the explanation model:
LFastSHAP(η) = E
F (x)
E
Unif(y)
E
p(s)
(cid:104)(cid:0)psurr (y | m(x, s); β) − sT φexplanation(x, y; η) − F (y)(cid:1)2(cid:105)
p(s) ∝
d − 1
(cid:0) d
1(cid:62)s
(cid:1) * 1(cid:62)s * (d − 1(cid:62)s)
.
Explanations can then be computed for a given sample of data as follows:
eFastSHAP(x, y) = φexplanation(x, y; η).
While the above feature attribution methods produce explanations in a class-dependent fashion (as a function of x and y),
REAL-X produces explanations in a class-independent fashion (as a function of only x). By measuring the KL divergence
between the distribution of the target given the full feature set and the distribution of the target given a subset of features,
REAL-X is a distribution-aware method. For a given sample of data, REAL-X returns a sufficiently small subset of features
for a given input that best predicts the target and reduces uncertainty about the target variable. This objective is minimized
and amortized by learning an explanation model that outputs a distribution over subsets by sharing parameters across
samples of data as follows:
LREAL-X(φ) = E
F (x)
= E
F (x)
E
qexp(s|x;φ)
E
qexp(s|x;φ)
(cid:2)DKL
(cid:0)F (y | x; θ) || psurr(y | m(x, s); β)(cid:3)
E
F (y|x;θ)
[− log psurr (y | m(x, s); β)] + Const.
Explanations can then be computed for a given sample of data as follows:
eREAL-X(x) = qexp(s | x; φ).
From this equation, it is clear that REAL-X explanations are generated as a function of x alone. L2X (Chen et al., 2018)
and INVASE (Yoon et al., 2018) optimize a near-identical objective: they learn psurr jointly within the same objective,
which Jethani et al. (2021) shows allows the predicted distribution to be encoded directly by s.
C GLOSSARY
class-dependent
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
A class-dependent feature attribution method generates a feature attribution vector as a
function of class. Formally, for each sample of data x and class c, a class-dependent fea-
ture attribution method e(x, c) : X × Y → Rd generates an attribution vector such that
e(x, c) (cid:54)= e(x, c(cid:48)) for some c (cid:54)= c(cid:48). LIME, SHAP, Grad-CAM, IntGrad, SmoothGrad, and
FastSHAP are all examples of class-dependent methods. Appendix B shows how the com-
putation performed by each of these methods is class-dependent.
class-independent
A class-independent method generates an attribution vector that does not depend on any one
class. Formally, for each sample of data x, a class-independent feature attribution method
e(x) : X → Rd generates an attribution vector as a function of the input x.
distribution-aware
(cid:16)
F (cid:0)y | x(cid:1) || r(cid:0)y | h(x)(cid:1)(cid:17)
A distribution-aware feature attribution method is a class-independent method e(x) that fo-
cuses on the data distribution of the label given the features, F (y | x). Formally, let D be
a probability divergence, and h(x) be a perturbation function. Then for some distribution
r a distribution-aware feature attribution method can be written in terms of the divergence
D
and prefers smaller divergences. In other words, a distribution-
aware method generates feature attributions by measuring the effect of feature perturbation
on the distribution of the label. The effect is measured by the divergence between the distri-
bution of y given the input and the distribution of y given the perturbed input. An example
perturbation function removes features from the input. The data distribution F (y | x) is
unavailable, so practical distribution-aware feature attribution methods make use of distri-
butions trained to approximate F (y | x) such as the surrogate psurr (y | x; β).
How a distribution-aware method prefers a smaller divergence depends on the method. For
example, REAL-X (Jethani et al., 2021) is a distribution-aware method that prefers smaller
divergences directly through its optimization procedure; we show how the computation per-
formed by REAL-X is distribution-aware in Appendix B.
predicted-label-
dependent
A predicted-label-dependent method is a class-dependent method that uses the predicted
label. Let ˆy = arg maxy pmodel(y | x; θ) and let e(cid:48)(x, ˆy) be a class-dependent method that
uses the model's predicted class. Because ˆy is a function of x, e(cid:48)(x, ˆy) = e(x), a class-
independent method. Therefore, we see that a class-dependent method that uses the pre-
dicted class becomes a class-independent method.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
D PROOF: LABEL LEAKAGE IN CLASS-DEPENDENT METHODS
We prove that in the specific case where a class-dependent method generates an attribution vector using the true label,
the predictive performance with only a fixed fraction of features can exceed the predictive performance with the entire
set of features. In other words, the class-dependent method is able to leak information about the true label through the
feature attributes that is not captured by the full set of features. This leakage would cause the evaluation metric iAUC
(Equation (2)) to overestimate the utility of the explanation. Formally,
Lemma 1.
F (x, y) such that
There exists a class-dependent feature attribution method e(x, y) and data-generating distribution x, y ∼
E
F (x,y)
(cid:20)
(cid:21)
log F (y | xtopn(e(x,y)))
(cid:20)
> E
F (x,y)
(cid:21)
log F (y | x)
(3)
for some n ∈ [0, 100]%.
Proof. We provide an example scenario in which a class-dependent method identifies a subset of features where the log-
likelihood of the target variable using that subset of features exceeds the log-likelihood of the target variable given the full
feature set.
Consider the following data-generating process for the input x := {x1, x2} and the target y:
(cid:19)
x1 ∼ Uniform(0, 1),
x2 =
,
y ∼ Bernoulli
(cid:18) x1 + x2
2
,
1
2
and the following class-dependent explanation method:
(cid:104)
e(x, y) =
(cid:104)
(cid:104)
(cid:104)
0
1
1
0
Then for n = 50% (inclusion of a single feature),
F (y | xtop50%(e(x,y))) =
(cid:105)
1
(cid:105)
0
(cid:105)
0
(cid:105)
1
x1 < 0.5, y = 1
x1 ≥ 0.5, y = 1
x1 ≤ 0.5, y = 0
x1 > 0.5, y = 0
1
2
x1
2 + 1
4 − x1
2
3
x1 < 0.5, y = 1
4 x1 ≥ 0.5, y = 1
x1 ≤ 0.5, y = 0
x1 > 0.5, y = 0
1
2
Whereas, for the full feature set,
F (y | x) =
Therefore,
(cid:40) x1
2 + 1
4 − x1
3
2
4
y = 1
y = 0
F (y | xtop50%(e(x,y))) > F (y | x)
F (y | xtop50%(e(x,y))) = F (y | x)
F (y | xtop50%(e(x,y))) = F (y | x)
F (y | xtop50%(e(x,y))) > F (y | x)
if x1 < 0.5, y = 1
if x1 ≥ 0.5, y = 1
.
if x1 ≤ 0.5, y = 0
if x1 > 0.5, y = 0
Since in all cases F (y | xtop50%(e(x,y))) ≥ F (y | x) and the events x1 < 0.5, y = 1 and x1 > 0.5, y = 0 occur with
non-zero probability,
(cid:20)
E
F (x,y)
log F (y | xtop50%(e(x,y)))
(cid:21)
> E
F (x,y)
(cid:2) log F (y | x) (cid:3).
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
E PROOF: NO LABEL LEAKAGE IN CLASS-INDEPENDENT METHODS
We showed in Appendix D that there exists a class-dependent feature attribution method e(x, y) and data-generating
distribution x, y ∼ F (x, y) such that
E
F (x,y)
(cid:20)
(cid:21)
log F (y | xtopn(e(x,y)))
(cid:20)
> E
F (x,y)
(cid:21)
log F (y | x)
(3)
for some n ∈ [0, 100]%.
We now prove that there does not exist any class-independent method e(x) where the likelihood of the target variable given
the top n% of features exceeds the likelihood of the target variable given the full feature set.
Lemma 2.
F (x, y).
There does not exist any class-independent feature attribution method e(x) where Equation (3) holds for any
Proof. For a class-independent method Equation (3) becomes
E
F (x,y)
(cid:20)
(cid:21)
log F (y | xtopn(e(x)))
(cid:20)
> E
F (x,y)
(cid:21)
log F (y | x)
(8)
The generative process by which the explanations are created using a class-independent method can be expressed via the
following Markov chain:
y −→ x −→ xtopn(e(x)),
where the target generates the input, which in turn generates the explanation that is used to mask/include features. Accord-
ing to the data processing inequality,
I(x; y) ≥ I(xtopn(e(x)); y) ∀n ∈ [0, 100]%,
which states that the mutual information content between the input and the target cannot be increased by processing the
input. Rewriting the mutual information in terms of the conditional entropy produces
H(y | x) ≤ H(y | xtopn(e(x))) ∀n ∈ [0, 100]%.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
Let r(cid:48) be a distribution. Then using the definition of conditional entropy the inequality can be written as an expectation:
E
F (x,y)
(cid:2) log F (y | x) (cid:3) ≥
E
(cid:0)
xtopn (e(x)),y
(cid:1)
F
≥
E
(cid:0)
xtopn (e(x)),y
(cid:1)
F
−
E
(cid:0)
xtopn(e(x))
(cid:1)
F
=
E
(cid:0)
xtopn (e(x)),y
(cid:1)
F
(cid:20)
(cid:20)
(cid:20)
(cid:20)
log F
(cid:16)
y | xtopn(e(x))
log F
(cid:16)
y | xtopn(e(x))
(cid:17)(cid:21)
(cid:17)(cid:21)
(cid:18)
DKL
F
(cid:16)
y | xtopn(e(x))
(cid:17)
|| r(cid:48)(cid:16)
y | xtopn(e(x))
(cid:17)(cid:19)(cid:21)
log F
(cid:16)
y | xtopn(e(x))
(cid:17)(cid:21)
(cid:20)
log r(cid:48)(cid:16)
y | xtopn(e(x))
(cid:17)
(cid:16)
− log F
y | xtopn(e(x))
(cid:17)(cid:21)
+
F
E
(cid:0)
xtopn(e(x)),y
(cid:20)
(cid:1)
=
F
E
(cid:0)
xtopn (e(x)),y
(cid:1)
log r(cid:48)(cid:16)
y | xtopn(e(x))
(cid:17)(cid:21)
(cid:20)
(cid:1)
log r(cid:48)(cid:16)
y | xtopn(e(x))
(cid:17)(cid:21)
=
E
(cid:0)
xtopn (e(x)),y
(cid:1)
F
F
=
E
(cid:0)
xtopn (e(x)),x,y
(cid:1)
F
E
(cid:0)
x|xtopn (e(x)),y
(cid:20)
log r(cid:48)(cid:16)
y | xtopn(e(x))
(cid:17)(cid:21)
(cid:20)
log r(cid:48)(cid:16)
(cid:1)
y | xtopn(e(x))
(cid:17)(cid:21)
= E
(cid:0)
x,y
F
(cid:1)
= E
(cid:0)
x,y
F
(cid:1)
F
(cid:20)
E
(cid:0)
xtopn (e(x))|x,y
log r(cid:48)(cid:16)
y | xtopn(e(x))
(cid:17)(cid:21)
∀n ∈ [0, 100]%.
Since r(cid:48) is arbitrary, Equation (8) holds for r(cid:48) = F . Therefore, the performance of a class-independent method when using
the top n% of features is upper-bounded by the performance when using the full feature set.
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
F PROOF: LABEL LEAKAGE IN CLASS-DEPENDENT METHODS WHEN USING THE
PREDICTED CLASS
Predicted-label-dependent methods need not consider the full distribution across all classes. They could, for example, focus
only on the probability of the predicted class. The implication is that explanations generated using the predicted class may
instead leak the predicted class and omit predictive features that do not support the predicted class. In other words, an
explanation could make the predicted class appear more likely than it is for some subset of feature values. Formally,
Lemma 3. There exists a predicted-label-dependent feature attribution method e(x, ˆy) where, for some x where F (x =
x) > 0 and for some n ∈ [0, 100]%,
F (y = ˆy | xtopn(e(x,ˆy)); β) > F (y = ˆy | x).
Proof. Let x, y ∼ F (x, y) be the data-generating distribution. Consider the following data-generating process for the
input x := {x1, x2} and the target y ∈ {1, 2, 3}:
x1 ∼ Bernoulli(0.80), x2 ∼ Bernoulli(0.5),
y | x ∼ Categorical([max{
x1 − x2
2
, 0} +
1
2
,
1 − (max{ x1−x2
2
2
, 0} + 1
2 )
,
1 − (max{ x1−x2
2
2
, 0} + 1
2 )
]).
Let the model's predicted class be ˆy = arg max
y
pmodel (y | x; θ) where pmodel is the optimal model (i.e.
the true data-
generating distribution). Notice that it will always be the case that ˆy = 1. Let e(x, ˆy = 1) be a class-dependent feature
attribution method that uses the predicted class to generate explanations and that is defined as follows:
e(x, ˆy = 1) =
(cid:104)
(cid:104)
1
0
(cid:105)
0
(cid:105)
1
if x1 = 1
if x1 = 0
.
Then for n = 50% (inclusion of a single feature),
F (y = ˆy | xtop50%(e(x,ˆy)); β) =
F (y = ˆy | x1 = 1) = 0.5 * 0.5 + 0.5 * 1.0 = 0.75 if x1 = 1, x2 = 1
F (y = ˆy | x1 = 1) = 0.5 * 0.5 + 0.5 * 1.0 = 0.75 if x1 = 1, x2 = 0
if x1 = 0, x2 = 1
F (y = ˆy | x2 = 1) = 0.8 * 0.5 + 0.2 * 0.5 = 0.5
if x1 = 0, x2 = 0
F (y = ˆy | x2 = 0) = 0.8 * 1.0 + 0.2 * 0.5 = 0.9
and
We see that
F (y = ˆy | x) =
0.5
1.0
0.5
0.5
if x1 = 1, x2 = 1
if x1 = 1, x2 = 0
if x1 = 0, x2 = 1
if x1 = 0, x2 = 0
.
F (y = ˆy | xtop50%(e(x,ˆy)); β) > F (y = ˆy | x)
F (y = ˆy | xtop50%(e(x,ˆy)); β) > F (y = ˆy | x)
if x1 = 1, x2 = 1
if x1 = 0, x2 = 0.
Since both of the above two cases occur with non-zero probability, we see that there exists a class-dependent feature
attribution method that, when generating explanations using the predicted class, makes the predicted class appear overly
likely for some n ∈ [0, 100]%.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
G PROOF: WITHOUT TRUE LABELS, A DISTRIBUTION-AWARE METHOD
MAXIMIZES IAUC
Given the constraint of not using the true labels, we show that the maximizer of iAUC assuming an optimal surrogate psurr
is not a class-dependent method, but a distribution-aware method.
As we saw in Equation (2), the area under the inclusion curve (iAUC) is
iAUC =
E
n∼Unif(0,100)
E
F (x,y)
(cid:34)
log psurr
y | m(cid:0)x, topn (e(x, y)) ; β(cid:1)(cid:17)
(cid:16)
(cid:35)
.
The feature attribution method that depends only on x and that maximizes iAUC is
e∗ = arg max
e
E
n∼Unif(0,100)
E
F (x,y)
(cid:34)
(cid:16)
(cid:35)
y | m(cid:0)x, topn (e(x)) ; β(cid:1)(cid:17)
log psurr
= arg max
e
E
n∼Unif(0,100)
E
F (x)
E
F (y | x)
= arg max
e
E
n∼Unif(0,100)
E
F (x)
E
F (y | x)
= arg max
e
E
n∼Unif(0,100)
E
F (x)
E
F (y | x)
(cid:34)
(cid:34)
(cid:34)
log psurr
(cid:16)
y | m(cid:0)x, topn (e(x)) ; β(cid:1)(cid:17)
(cid:35)
log psurr
(cid:16)
y | m(cid:0)x, topn (e(x)) ; β(cid:1)(cid:17)
− log psurr
(cid:0)y | x; β(cid:1) + log psurr
(cid:0)y | x; β(cid:1)
(cid:35)
log psurr
(cid:16)
y | m(cid:0)x, topn (e(x)) ; β(cid:1)(cid:17)
− log psurr
(cid:0)y | x; β(cid:1)
(cid:35)
= arg min
e
E
n∼Unif(0,100)
E
F (x)
E
F (y | x)
(cid:34)
log psurr
(cid:16)
y | x; β
(cid:17)
− log psurr
y | m(cid:0)x, topn (e(x)) ; β(cid:1)(cid:17)
(cid:16)
(cid:35)
Since at optimality psurr
see that
(cid:16)
y | m(cid:0)x, topn (e(x)) ; β∗(cid:1)(cid:17)
= F (y | xtopn(e(x))) for all n ∈ [0, 100]% (Jethani et al., 2021), we
e∗ = arg min
e
E
F (x)
E
n∼Unif(0,100)
DKL
(cid:34)
(cid:18)
F (cid:0)y | x(cid:1) || F (cid:0)y | xtopn(e(x))
(cid:1)
(cid:19)(cid:35)
.
Therefore, we see that the optimal feature attribution vector e∗(x) for an instance x is distribution-aware in that it minimizes
the KL divergence between the likelihood of the label given all of the features and the likelihood of the target variable given
the top n% of the features, averaged across all possible n. Furthermore, we see that e∗(x) does not depend on a true label
y, but instead averages over a distribution of the label.
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
H COMPARING SHAP-KL AND SHAP-S ON CIFAR-10
We compare the distribution-aware SHAP-KL to its class-dependent counterpart SHAP-S using the general image dataset
CIFAR10 (Krizhevsky et al., 2009), demonstrating similar findings as in the clinical datasets.
CIFAR-10 contains 60,000 32 × 32 images across 10 classes. We used 50,000 samples for the training and 5,000 samples
for both validation and testing. Each image was resized to 224 × 224 using bilinear interpolation to interface with the
ResNet-50 architecture (He et al., 2016). The ResNet models were trained as described in Appendix K. Explanations
were then generated for the 5,000 images in the test set using SHAP-KL and SHAP-S (both set up to sample 4028 feature
subsets), and evaluated using iAUC.
As with our other experiments (Section 6.3), we plot the log-likelihood inclusion curves of SHAP-KL and SHAP-S, using
the true label for SHAP-S (Figure 4). We find that the performance of SHAP-KL when using a subset of the features
does not exceed performance when using the full set of features (represented by the horizontal dotted line), validating that
distribution-aware methods do not leak the label on average. We find that the performance of SHAP-S when using a subset
of the features does exceed performance when using the full set of features.
Figure 4: The performance of SHAP-KL when using a subset of the most relevant features does not exceed performance
when using the full set of features (represented by the horizontal dotted line), validating that distribution-aware methods
do not leak the label on average.
We also evaluate the iAUC of SHAP-KL and of SHAP-S when using the predicted class (instead of the true label) to select
which class to explain (Table 2). We find that SHAP-KL has a higher iAUC than SHAP-S.
Table 2: Evaluation of SHAP-KL and SHAP-S using iAUC when SHAP-S uses the predicted class.
SHAP-KL SHAP-S
iAUC
-1.008
-1.461
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
I ECG PREDICTION MODEL ARCHITECTURE
Figure 5: Diagram of the ECG model architecture.
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
J DATASET DETAILS
The PTB-XL dataset consists of 21, 430 12-Lead/10s ECGs. We classify the presence of right bundle branch block (RBBB)
from lead VI of the ECG. There was a 7.75% prevalence of RBBB in the dataset. The dataset was split into training, valida-
tion, and test sets according to an 8 : 1 : 1 ratio. The validation and test sets were directly used as the explanation validation
and test sets (2, 163 ECGs). We trained the deeper 34-layer ResNet model adapted from Hannun et al. (2019) to classify
the presence of a RBBB (see Appendix I for model architecture) as compared to shallower architectures (Goodfellow et al.,
2018; Han et al., 2020). The PTB-XL data is made available under the Creative Commons Attribution 4.0 International
Public License at https://physionet.org/content/ptb-xl/1.0.2/.
The EyePACs dataset consists of 88, 702 retinal fundus images. The task is formulated as multiclass classification
labeled for the presence and severity of diabetic retinopathy. The label distribution was 73.5% normal, 7% mild,
15% moderate, 2.5% severe, and 2% proliferative. The dataset was split into training, validation, and test sets ac-
cording to a 4 : 1 : 5 ratio. The dataset was downloaded from Kaggle and processed with TensorFlow Datasets
(Abadi et al., 2015) according to the 2015 Kaggle competition winner Graham (2015) to generate 544 by 544 pixel
images. Class-balanced explanation validation and test sets (1000 and 2500 images, respectively) were randomly sam-
pled from the validation and test sets, respectively. We trained a DenseNet121 model, pre-trained on ImageNet, to clas-
sify the severity of diabetic retinopathy. The EyePACs dataset is made available at https://www.kaggle.com/c/
diabetic-retinopathy-detection/data under a set of rules found here: https://www.kaggle.com/
competitions/diabetic-retinopathy-detection/rules.
We processed the MIMIC-IV dataset according to Huang et al. (2019), yielding a cohort of 34, 560 patient admis-
sions with 2, 963 positive 30-day readmission labels and 42, 358 negative labels. As detailed by Huang et al. (2019),
the dataset was balanced to yield a final dataset of 5, 926 discharge summaries and split into training, validation, and
test sets according to an 8 : 1 : 1 ratio. The validation and test sets were directly used as the explanation valida-
tion and test sets (584 discharge summaries). The discharge summaries were split into 128 token segments and to-
kenized using the Hugging Face (Wolf et al., 2019) BERT tokenizer. We trained a BERT transformer, implemented
using Hugging Face for TensorFlow and pretrained weights obtained from Alsentzer et al. (2019), to predict 30-day
readmission. The MIMIC-IV data is made available under the PhysioNet Credentialed Health Data License 1.5.0 at
https://physionet.org/content/mimiciv/2.0/.
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
K PREDICTION MODEL DETAILS
Both the DenseNet121 and ResNet models were trained for 100 epochs using Adam with a learning rate of 10−3 and a
batch size of 32. The BERT model was trained for 50 epochs using Adam with a learning rate of 2 ∗ 10−5 and a batch
size of 16. We used a learning rate scheduler that multiplied the learning rate by a factor of 0.95 after three epochs of no
validation loss improvement. Early stopping was triggered after the validation loss ceased to improve for ten epochs.
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
L EXPLANATION GENERATION
The explanation validation set was used to tune each explanation method's hyperparameter, where the best performing
explanation set for the associated metric was selected. The gradient-based methods were implemented using TensorFlow's
native backprop functionality. Both IntGrad and SmoothGrad have a single hyperparameter that controls the number of
samples along the path from the baseline input to the final input and the number of noisy inputs to sample, respectively.
We tuned this hyperparamater for both explanation methods across 64, 128, 256, 512, and 1024 samples. Grad-CAM does
not have any hyperparameters. Because Grad-CAM can only be applied to CNNs, we could not generate Grad-CAM
explanations for our BERT text classification model.
Feature removal was performed at different granularities for the removal-based methods depending on the data type. We
removed segments of the input instead of individual features: 32 by 32 super-pixel segments for images, 0.08 second seg-
ments, and tokens for text. We implement LIME and SHAP using their respective open-source packages, where feature
removal is simulated by replacing the removed features with a baseline value for all three data types. We simply alter
SHAP's value function to implement SHAP-S and SHAP-KL. Image and ECG data were replaced using the zero baseline,
while text data was replaced using the [MASK] token. Both LIME, SHAP, SHAP-S, and SHAP-KL have a single hyperpa-
rameter that controls the number of feature subsets to sample. We tuned this hyperparamater for the explanation methods
across 512, 1024, 2048, 4096, and 8192 subset samples. LIME1 is made available under the BSD 2-Clause "Simplified"
License. SHAP2 is made available under the MIT License.
Explanation generation with REAL-X, FastSHAP, and FastSHAP-KL involves a three-step process: 1) training a surrogate
model to simulate feature removal, 2) training an explanation model, and 3) computing explanations with a single forward
pass through the explanation model. We trained the surrogate and explanation models and tuned them using the same
training and validation sets we used to train the original model. The surrogate model was trained with random feature
removals, where the removed features were replaced with their aforementioned baseline. The surrogate model simulates
marginalizing out features from the original model with their conditional distribution. The surrogate model's training pro-
cedure and model architecture directly mirrored that of the corresponding original model. We adapted the explanation
model architectures from their corresponding classification models being explained by truncating the architectures (see
Appendix P for details). For FastSHAP and FastSHAP-KL, we tuned the hyperparameter controlling the number of feature
subsets to sample for each input in a mini-batch explanation model across 1, 2, 4, 8, 16. For REAL-X, we tuned the regu-
larization hyperparameter that enforces sparse subset selections of the input across 10−5, 10−4, 10−3, 10−2, and 10−1. All
other training hyperparameters used to train the original models were conserved when training and tuning the explanation
models. FastSHAP3 and REAL-X4 are both made available under the MIT License.
1https://github.com/marcotcr/lime
2https://github.com/slundberg/shap
3https://github.com/neiljethani/fastshap
4https://github.com/rajesh-lab/realx
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
M EMPIRICAL CALCULATION OF IAUC
As discussed in Section 3, an inclusion curve is constructed by progressively increasing n from 0 to 100, selecting the top
n% of features for each data point in a held-out test set using the corresponding feature attribution vector e(x, y), and then
measuring performance of the surrogate evaluation model psurr
across the entire held-out test
set using the log-likelihood. As we saw in Equation (2), the area under the inclusion curve (iAUC) is
y | m(cid:0)x, topn(e(x, y))(cid:1); β
(cid:17)
(cid:16)
iAUC =
E
n∼Unif(0,100)
E
F (x,y)
(cid:34)
log psurr
y | m(cid:0)x, topn (e(x, y)) ; β(cid:1)(cid:17)
(cid:16)
(cid:35)
.
For our experiments (Section 6), instead of calculating the above expectation, we construct the inclusion curve using the
following values of n: 0, 1, 5, 10, 15, 25, 50, 75, 85, 90, 95, 99, and 100. We then use the trapezoid rule to approximate
the area under this inclusion curve in order to calculate iAUC.
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
N EXPLANATION EFFICIENCY
We include wall clock times for each explanation method on the explanation test set below. The experiments were run
using a single core of an Intel Xeon Gold 6148 processor and a single AMD MI50 GPU. Gradient-based methods are quite
efficient, especially Grad-CAM, which only requires a single gradient estimate per explanation. Removal-based methods
such as SHAP and LIME are slow. Meanwhile, the amortized methods incur a fixed training cost, which is often made up
for by its meager marginal cost for generating each explanation. In some cases, the amortization also improves explanation
quality. However, this may not always be the case, as the model may over-fit the data (i.e. FastSHAP on MIMIC-IV) or
optimize poorly.
Table 3: Training and explanation run-times for the explanation sets (in minutes).
PTB-XL EyePACs MIMIC-III
# of Samples
Grad-CAM
IntGrad
SmoothGrad
SHAP
SHAP-S
SHAP-KL
LIME
FastSHAP
FastSHAP-KL
REAL-X
FastSHAP
FastSHAP-KL
REAL-X
SHAP-S
SHAP-KL
2163
56.39
15.82
63.17
143.02
150.49
144.47
138.08
0.01
0.02
0.01
54.67
76.51
89.27
16.73
16.73
n
i
a
l
p
x
E
n
i
a
r
T
2500
3063
31.11
3902.53
2398.13
6389.12
6909.33
6348.32
6649.19
0.66
0.51
0.51
3597.14
2918.45
3611.14
1320.97
1320.97
-
717.18
415.74
1343.03
1354.13
1356.01
1340.14
0.30
0.27
-
2038.53
3320.96
-
38.63
38.63
Don't be fooled: label leakage in explanation methods and the importance of their quantitative evaluation
O SURROGATE MODEL VS. ORIGINAL PREDICTION MODEL PERFORMANCE
Table 4: AUROC of the original prediction model compared to the surrogate model. The prediction model is trained
using the full feature set while the surrogate model is trained using random subsets of the input. The performance of
each model on the full feature set is compared using the AUROC (micro-averaged for Eye-PACs). Model performance is
negligibly affected by randomly removing subets of the input during training.
pmodel(y | x; θ)
psurr(y | x; α)
PTB-XL
Eye-PACs
MIMIC-IV
0.997
0.947
0.775
0.997
0.951
0.774
Neil Jethani*, Adriel Saporta*, Rajesh Ranganath
P EXPLANATION MODEL ARCHITECTURES
P.1 ECG explanation model
We modified the ECG model architecture (see Appendix I) to return a tensor of size 125 × 1 for REAL-X/FastSHAP-KL
and 125 × 2 (one for each class) for FastSHAP. For the 10s ECG's input size of 1000 × 1, this process provides 0.08
second segment explanations. First, the layers after the 6th residual connection were removed; the output of this block was
125 × 64. We then appended a 1D convolutional layer with filters of size 1 × 1, one filter for REAL-X/FastSHAP-KL and
2 filters for FastSHAP, such that the output was 125 × 1 or 125 × 2 respectively. For FastSHAP, the yth 125 dimensional
array slice corresponded to the segment-level Shapley values for the class y ∈ {0, 1}.
P.2 Retinal fundus image explanation model
We modified the DenseNet121 architecture to return a tensor of size 17×17×1 for REAL-X/FastSHAP-KL and 17×17×5
(one for each class) for FastSHAP. For an input image size of 544 × 544 this process provides 32 × 32 super-pixel
explanations. First, the classification layers (global average pooling and fully-connected layers) were removed; the output
of this block was 17 × 17 × 1024. We then appended a 2D convolutional layer with filters of size 1 × 1, one filter for
REAL-X/FastSHAP-KL and 5 filters for FastSHAP, such that the output is 17 × 17 × 1 or 17 × 17 × 5 respectively. For
FastSHAP, the yth 17 × 17 slice corresponded to the superpixel-level Shapley values for the class y ∈ {0, 1, 2, 3, 4}.
P.3 Discharge summary explanation model
We modified the BERT architecture by appending two fully connected layers to the output for the last encoder layer.
The output of the final encoder layer was a 128 × 768 tensor, such that there was a 768 dimensional array outputted for
each input token. We first appended a fully connected layer with 768 units, GeLU activation, and layer norm. Then, we
appended another fully connected layer with either 1 unit for REAL-X/FastSHAP-KL or 2 units for FastSHAP, yielding a
128 × 1 or 128 × 2 output. This output provided attributions for each token in the input text segment. For FastSHAP, the
yth 128 dimensional slice corresponded to the token-level Shapley values for the class y ∈ {0, 1}.
|
|
http://arxiv.org/abs/2302.12888v2 | 2023-09-19T09:35:41 | 2023-02-24T20:51:23 | Elliptic PDE learning is provably data-efficient | PDE learning is an emerging field that combines physics and machine learning
to recover unknown physical systems from experimental data. While deep learning
models traditionally require copious amounts of training data, recent PDE
learning techniques achieve spectacular results with limited data availability.
Still, these results are empirical. Our work provides theoretical guarantees on
the number of input-output training pairs required in PDE learning.
Specifically, we exploit randomized numerical linear algebra and PDE theory to
derive a provably data-efficient algorithm that recovers solution operators of
3D uniformly elliptic PDEs from input-output data and achieves an exponential
convergence rate of the error with respect to the size of the training dataset
with an exceptionally high probability of success. | [
"Nicolas Boullé",
"Diana Halikias",
"Alex Townsend"
] | 10.1073/pnas.2303904120 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1073/pnas.2303904120",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12888v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12888v2",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Proc. Natl. Acad. Sci. USA 120(39) (2023), e2303904120"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI",
"cs.NA",
"math.NA"
] | Elliptic PDE learning is provably data-efficient
Nicolas Boulléa,1, Diana Halikiasb, and Alex Townsendb
aIsaac Newton Institute for Mathematical Sciences, University of Cambridge, Cambridge CB3 0EH, United Kingdom; bMathematics Department, Cornell University, Ithaca, NY
14853-4201, United States
3
2
0
2
p
e
S
9
1
]
G
L
.
s
c
[
2
v
8
8
8
2
1
.
2
0
3
2
:
v
i
X
r
a
This manuscript was compiled on September 20, 2023.
PDE learning is an emerging field that combines physics and machine
learning to recover unknown physical systems from experimental data.
While deep learning models traditionally require copious amounts of
training data, recent PDE learning techniques achieve spectacular
results with limited data availability. Still, these results are empirical.
Our work provides theoretical guarantees on the number of input-
output training pairs required in PDE learning. Specifically, we exploit
randomized numerical linear algebra and PDE theory to derive a
provably data-efficient algorithm that recovers solution operators of
3D uniformly elliptic PDEs from input-output data and achieves an
exponential convergence rate of the error with respect to the size of
the training dataset with an exceptionally high probability of success.
deep learning | inverse problems | sample complexity | neural operators
M any scientific breakthroughs have come from deriving
new partial differential equations (PDEs) from first
principles to model real-world phenomena and simulating them
on a computer to make predictions. However, many crucial
problems currently lack an adequate mathematical formulation.
It is not clear how to derive PDEs to describe how turbulence
sheds off the wing of a hypersonic aircraft, how E. coli bacteria
swim in unison to form an active fluid, or how atomic particles
behave with long-range interactions. Rather than working
from first principles, scientists are now looking to derive PDEs
from real-world data using deep learning techniques (1).
The success of deep learning in language models, visual
object recognition, and drug discovery is well known (2). The
emerging field of PDE learning hopes to extend this to dis-
covering new physical laws by supplying deep learning models
with experimental or observational data (1, 3). PDE learn-
ing commonly seeks to recover features such as symmetries,
conservation laws, solution operators, and the parameters of
a family of hypothesized PDEs. In most deep-learning ap-
plications, a large amount of data is needed, which is often
unrealistic in engineering and biology. However, PDE learning
can be shockingly data-efficient in practice (4). In particular,
surprisingly little data is used to learn the solution operator,
which maps the forcing term to the solution of the PDE.
O
In this paper, we provide a theoretical explanation of this
behavior by showing that, for ε > 0 sufficiently small, one can
recover an ε-approximation to the solution operator of a three-
dimensional (3D) elliptic PDE with a training dataset of size
(log5(1/ε)). Elliptic PDEs, such as the steady state
about
heat equation, are ubiquitous in physics and model diffusion
phenomena. Solution operators can produce surrogate data for
data-intensive machine learning approaches such as learning
reduced order models for design optimization in engineering,
uncovering physics in climate models, and PDE recovery (1).
To illustrate the observed data-efficiency of PDE learn-
ing, we compare the performance of three techniques (4–6)
for recovering the solution operator associated with the 2D
Fig. 1. Elliptic PDE learning methods can be data-efficient. (A) Performance of three
deep learning techniques in approximating the solution operator of the 2D Poisson
equation with zero Dirichlet boundary condition on the domain [0, 1]2. On small
datasets, DeepONet and GreenLearning attain exponential decay of the testing error,
while Fourier Neural Operator (FNO) attains algebraic decay. (B) A forcing term (top)
and corresponding predicted solution (bottom) to the 2D Poisson equation by a FNO.
Poisson equation in Fig. 1. We vary the size of the training
dataset, consisting of random forcing terms and corresponding
solutions obtained by a numerical solver. We then evaluate
the accuracy of the predicted solutions on a testing dataset
with new forcing terms. The three methods are based on
deep learning and differ in their neural network architectures.
While the Fourier Neural Operator (5) exploits the fast Fourier
transform for computationally efficient training, DeepONet (4)
and GreenLearning (6) achieve a faster convergence rate on
small training datasets. Here, DeepONet employs a com-
plex network architecture with many parameters. In contrast,
GreenLearning leverages prior knowledge that the solution
operator is an integral operator and the approximation power
of rational neural networks (7). Green's function learning is
observed to be the most data-efficient in Fig. 1, as for a fixed
training dataset size, it achieves the smallest testing error. All
methods plateau due to discretization errors, and the training
procedure gets stuck in a local minimum of the loss landscape
rather than finding the global minimum. The rapid decay of
testing errors prior to the plateau motivates our main result.
There is a lack of understanding for the efficiency of PDE
learning methods with limited training data (4). This work
provides theoretical insights by constructing a provably data-
efficient algorithm, showing that one can achieve exponential
convergence when learning solution operators of elliptic PDEs.
Author contributions: N.B., D.H., and A.T. designed research; performed research; analyzed data;
and wrote the paper.
The authors declare no competing interest.
1To whom correspondence should be addressed. Email: [email protected].
September 20, 2023 | 1
05010015020010−210−1100101SizeoftrainingdatasetTestingerrorFourierNeuralOperatorDeepONetGreenLearningAB0101xy0101xy
Fig. 2. Properties of elliptic PDEs can be exploited to construct a provably data-efficient algorithm for recovering solution operators. (A) The Green's function associated with the
1D Poisson equation, which is the kernel of the solution operator. (B) We use the multi-scale (hierarchical) structure of a Green's function (8). (C) On well-separated domains,
the Green's function has rapidly decaying singular values (9), so it is efficiently recovered by the randomized singular value decomposition (SVD) (10). (D) Forcing terms for the
training dataset are randomly sampled from a Gaussian process. (E) The accuracy of the randomized SVD is carefully adapted on each hierarchical level to counterbalance the
potential accumulation of errors in the reconstruction process. (F) An upper bound on the probability of failure of the reconstruction algorithm as a function of ε.
Consider an unknown uniformly elliptic PDE in three di-
R3 with Lipschitz
mensions, defined on a bounded domain Ω
smooth boundary, with variable coefficients of the form:
⊂
u =
L
−∇ *
(A(x)
u) = f,
∇
Ω,
x
∈
u
|
∂Ω = 0,
[1]
where the coefficient matrix A has bounded coefficient func-
tions and is symmetric positive definite for all x
Ω. The weak
assumptions on Ω and A(x) allow for corner singularities and
low regularity of the coefficients. The training data consists of
pairs of random forcing terms f1, . . . , fN and corresponding
solutions u1, . . . , uN such that
N . Deep
L
learning techniques use this data to predict solutions to Eq. (1)
at new forcing terms by recovering the action of the solution
operator F , which is given by
uj = fj for 1
≤
≤
∈
j
F (f ) =
G(x, y)f (y) dy,
[2]
ZΩ
where G is the associated Green's function. For example, we
visualize in Fig. 2A the Green's function associated with the
1D Poisson equation. The random forcing terms in the training
dataset are sampled from a Gaussian process (GP), i.e., they
follow a multivariate Gaussian distribution when sampled on
a grid, and the covariance kernel determines the correlation
between the function's entries and its smoothness.
Recent work (11) proves that for any ε > 0 and 3D elliptic
PDEs, a large number of input-output training pairs of size
6) is sufficient to recover an ε-approximation ̃F to
(ε−
about
O
F such that
̃F
F
∥
−
∥2 ≤
F
ε
∥
∥HS,
∥ * ∥2 is the solution operator norm and
where
∥ * ∥HS is the
Hilbert–Schmidt norm. Once the ε-approximation to F has
been constructed, ̃F can be used to study the stability and
regularity of solutions of the PDE. For example, to see whether
small perturbations of the input function lead to small changes
in the output solution, or whether the solution has certain
smoothness or decay properties for all forcing terms. Moreover,
̃F can be used in numerical methods for approximating the
solution of the PDE. By discretizing the input function and
applying ̃F as a surrogate for F , one can obtain a numerical
solution of the PDE that approximates the true solution. The
integral kernel associated with the Hilbert–Schmidt operator
̃F is also of interest, as it is an approximation to the Green's
function, which can be exploited to recover linear conservation
laws, symmetries, boundary effects, and dominant modes (6).
Our main result dramatically improves the required amount
of training data to construct an ε-approximation to F by
exploiting the hierarchical structure of G (9) and random-
ized linear algebra techniques (10, 12). We derive a ran-
domized algorithm that provably succeeds with exceptionally
high probability and needs a training dataset size of only
(log(1/ε)5[log(log(1/ε)) + log(1/Γε)]4) input-output pairs.
O
Theorem 1. Let ε > 0 be sufficiently small, and F be the
solution operator associated with a 3D uniformly elliptic PDE
of the form in Eq. (1). There exists a randomized algorithm
that constructs an ε-approximation ̃F to F such that
̃F
ε
∥
(log(1/ε)5[log(log(1/ε)) + log(1/Γε)]4) input-output
log(1/ε)3
using
pairs with probability
∥HS,
∥2 ≤
e−
F
F
O
−
1
∥
.
≥
−
2 |
Boullé et al.
ABCDEF00.5100.51xy00.050.10.150.20.25HierarchicallevelO(log(1/(cid:15))d+1)10010−410−810−1210−16100102104106Targetaccuracy(cid:15)Numericalrankk(cid:15)d=1d=2d=300.20.40.60.81−3−1.501.53xTargetaccuracy(cid:15)0123456710−2010−1510−1010−5100HierarchicallevelRandomizedSVDaccuracy10010−110−210−310−410010−1010−2010−3010−4010−50Targetaccuracy(cid:15)ProbabilityoffailureThe main contribution of Theorem 1 is a theoretical upper
bound on the amount of training data required in elliptic PDE
learning problems, which should deepen our understanding
of existing deep learning techniques. Hence, the exponential
convergence rate in Theorem 1 matches the one observed in
the deep learning experiments of Fig. 1A. We believe that this
learning rate is near-optimal, as it exploits the multi-scale
structure of Green's functions (see Fig. 2B,C) and depends
on the training dataset. The factor 0 < Γε
1 measures
the quality of the training dataset at probing the dominant
modes of the PDE, and a technical definition is available in
the SI Appendix. We emphasize that the error bound must
include a factor that quantifies the quality of the training
dataset. If the forcing terms are too smooth, then Γε is small.
In contrast, choosing the covariance kernel of the GP such
that the sampled functions are oscillatory usually ensures that
Γε is reasonable for learning G. In short, a small number of
sufficiently diverse forcing terms is required (see Fig. 2D).
≤
The algorithm constructed in the proof of Theorem 1
achieves an approximation error measured in the solution
operator norm. This mimics the typical measurement of ac-
curacy of PDE learning techniques by comparing true and
predicted solutions on a testing dataset of square-integrable
forcing terms. Additionally, Theorem 1 employs random input-
output pairs, where the forcing terms are sampled from a GP,
so there is always some probability of failure. Fortunately, we
3,
show this probability is exceptionally small. For ε < 10−
failure is a once-in-a-cosmic-epoch event (see Fig. 2F).
×
Theorem 1 is challenging to prove, and the whole argument
is in the SI Appendix. The proof relies on the fact that the
solution operator associated with a 3D elliptic PDE is an
integral operator in the form of Eq. (2). Firstly, the Green's
functions related to 3D elliptic operators are square-integrable
and have a bounded decay rate away from the diagonal of
Ω
Ω (13). Secondly, they possess a hierarchical structure (9)
in the sense that they have rapidly decaying singular values
when restricted to off-diagonal parts of the domain (green
blocks in Fig. 2B). We leverage the hierarchical structure,
which has been historically exploited by fast solvers, in a data-
driven context where the PDE is unknown. Combining these
properties enables a generalization of the randomized SVD (10)
known as the peeling algorithm (8) to simultaneously learn
the off-diagonal blocks at any level of the hierarchy.
While the peeling algorithm is traditionally used to recover
hierarchical matrices efficiently from matrix-vector products,
we generalize it to approximate infinite-dimensional integral
operators. To do so, we leverage insights from recent work
that extends the peeling algorithm to arbitrary hierarchical
partitions and dimensions (14). This gives us a strategy to
recover the Green's function level-by-level. However, proving
the stability of peeling is an open question in numerical linear
algebra. This is because the approximation errors from one
level can potentially accumulate exponentially at later levels,
thus degrading the convergence rate (8, 11).
We overcome this theoretical obstacle in the infinite-
dimensional context by requiring an adaptive approximation
accuracy at each level of the hierarchy. The peeling algorithm
ensures that the large-scale features of a Green's function are
first learned to high accuracy by the randomized SVD. Then,
we progressively decrease the accuracy requirement at subse-
quent levels, ensuring an overall ε-approximation on each level
of the partition at the end (see Fig. 2E). The rapidly decaying
singular values of the Green's function on off-diagonal parts of
the domain (see Fig. 2C) enable us to maintain a near-optimal
exponential convergence rate with respect to the size of the
training dataset. We then construct a global ε-approximant
by neglecting G near the diagonal of the domain.
As one usually employs deep learning techniques to learn
solution operators, our theoretical contributions can also lead
to practical benefits. We believe that future training datasets
benefit from taking into account prior knowledge of the PDE to
improve the quality of the forcing terms at learning the solution
operator. Similar ideas have already been employed in the
field of visual object recognition through data-augmentation
techniques. There is also an opportunity to design neural
network architectures with hierarchical structures to capture
the long-range interactions in PDE models. Finally, enforcing
a different accuracy at different scales might improve the
computational efficiency of existing PDE learning approaches.
In summary, we constructed a randomized algorithm that
provably achieves an exponential convergence rate for approxi-
mating the solution operator associated with 3D elliptic PDEs
in terms of the size of the training dataset. This provides a
theoretical explanation for the observed performance of re-
cent deep learning techniques in PDE learning. The proof
techniques can be adapted to include elliptic PDEs in any di-
mension and time-dependent PDEs (15). Recovering solution
operators associated with hyperbolic PDEs, like wave equa-
tions, remains a significant open challenge. Moving forward,
we plan to ramp up PDE learning techniques to handle noisy
experimental data, deal with data from emerging transient
dynamics, and enforce conservation laws onto our solutions.
Data availability. All data and codes used in this article are
publicly available on GitHub at https://github.com/NBoulle/
pde-learning. The proof of Theorem 1 and details of the
numerical experiments are available in the SI Appendix.
ACKNOWLEDGMENTS. This work is supported by National
Science Foundation grants DMS-1952757, DMS-2045646, and DGE-
2139899. N.B. was supported by an INI-Simons Postdoctoral Re-
search Fellowship.
1. GE Karniadakis, et al., Physics-informed machine learning. Nat. Rev. Phys. 3, 422–440 (2021).
2. Y LeCun, Y Bengio, G Hinton, Deep learning. Nature 521, 436–444 (2015).
3. M Raissi, A Yazdani, GE Karniadakis, Hidden fluid mechanics: Learning velocity and pressure
fields from flow visualizations. Science 367, 1026–1030 (2020).
4. L Lu, P Jin, G Pang, Z Zhang, GE Karniadakis, Learning nonlinear operators via DeepONet
based on the universal approximation theorem of operators. Nat. Mach. Intell. 3, 218–229
(2021).
5. Z Li, et al., Fourier Neural Operator for Parametric Partial Differential Equations in ICLR.
(2021).
6. N Boullé, CJ Earls, A Townsend, Data-driven discovery of Green's functions with human-
understandable deep learning. Sci. Rep. 12, 1–9 (2022).
7. N Boullé, Y Nakatsukasa, A Townsend, Rational neural networks in NeurIPS. Vol. 33, pp.
14243–14253 (2020).
8. L Lin, J Lu, L Ying, Fast construction of hierarchical matrix representation from matrix-vector
multiplication. J. Comput. Phys. 230, 4071–4087 (2011).
9. M Bebendorf, W Hackbusch, Existence of
-matrix approximants to the inverse FE-matrix of
elliptic operators with L∞-coefficients. Numer. Math. 95, 1–28 (2003).
H
10. N Halko, PG Martinsson, JA Tropp, Finding structure with randomness: Probabilistic algorithms
for constructing approximate matrix decompositions. SIAM Rev. 53, 217–288 (2011).
11. N Boullé, A Townsend, Learning elliptic partial differential equations with randomized linear
algebra. Found. Comput. Math. pp. 1–31 (2022).
12. PG Martinsson, JA Tropp, Randomized numerical linear algebra: Foundations and algorithms.
Acta Numer. 29, 403–572 (2020).
13. M Grüter, KO Widman, The Green function for uniformly elliptic equations. Manuscripta Math.
37, 303–342 (1982).
14. J Levitt, PG Martinsson, Randomized compression of rank-structured matrices accelerated
with graph coloring. arXiv preprint arXiv:2205.03406 (2022).
15. N Boullé, S Kim, T Shi, A Townsend, Learning Green's functions associated with time-
dependent partial differential equations. J. Mach. Learn. Res. 23, 1–34 (2022).
Boullé et al.
September 20, 2023 | 3
SupportingInformationText1.TheoreticalresultsonGreen'sfunctionsWeconsiderasecond-orderuniformlyellipticpartialdifferentialoperatorL:H2(Ω)∩H10(Ω)→L2(Ω)onaboundeddomainΩ⊂Rdinspatialdimensiond=3withaLipschitzsmoothboundary(see(1,Def.6.2.33)).Here,Hk(Ω)denotesthekthSobolevspace,Hk0(Ω)istheclosureoftheinfinitelydifferentiablefunctionscompactlysupportedinΩinHk(Ω),andL2(Ω)isthespaceofsquare-integrablefunctionsoverΩ.WeassumethattheoperatorLtakesthefollowingdivergenceform:Lu=−∇*(A(x)∇u),x∈Ω,u|∂Ω=0.[1]Here,thecoefficientmatrixA(x)∈Rd×disasymmetricpositivedefinitematrixforeveryx∈ΩwithκC=sup{λmax(x)/λmin(x)|x∈Ω}<∞,andAhasboundedcoefficientfunctions,i.e.,Aij∈L∞(Ω)for1≤i,j≤d.Also,λmin(x)andλmax(x)de-notethesmallestandlargesteigenvaluesofA(x).Undertheseconditions,itisknown(2)thatthereisaGreen'sfunctionG:Ω×Ω→R∪{∞}associatedwithEq.(1)sothatthesolutionoperatorassociatedwithLcanbewrittenasF(φ)[x]=ZΩG(x,y)f(y)dy,f∈L2(Ω).[2]Inthreedimensions,Gissquareintegrable(2),anditsassociatedintegraloperatorisaHilbert–Schmidt(HS)operator(3).PDElearningtechniquesaimtoapproximatethesolutionoperatorassociatedwithanunknownPDE,suchasEq.(1),frompairsofinput-outputfunctions{(fj,uj)}Nj=1(4).TheforcingtermsfjareusuallysampledfromaGaussianprocess(GP)withauser-prescribedcovariancekernel(5–7),andtheassociatedsolutionsujareacquiredbysolvingtheequationLuj=fjusingablack-boxsolver(i.e.,throughdirectnumericalsimulationsorbyperformingaphysicalexperiment).Inthepastfewyears,severalapproacheshaveemployedneuralnetworkstoapproximatethesolutionoperatorinawiderangeofproblems(5–11).Whilethesemethodshavebeenverysuccessfulinpractice,theoreticalresultsarelimitedandmostlyfocusonthetypeandcomplexityofneuralnetworkarchitecturesneededtoapproximateagivensolutionoperator(7,10,12).Inthiswork,wefocusoncharacterizingthesamplecomplexityassociatedwithsolutionoperatorsofellipticproblemsinthreedimensionstounderstandtheamountoftrainingdataneededtoreachagiventolerance0<ε<1.AnumberofstudieshaveprovidedalgebraicupperboundsoftheformofN=O(ε−2d)onthesamplecomplexityforellipticproblemsinthreedimensions(13–15).Thisboundnaturallyextendstotime-dependent(parabolic)problemsbychangingthenorminwhichtheerrorismeasuredtoanL1-normtoobtainasamplecomplexityofO(ε−(3+d)/2log(1/ε))(16).However,thepropertiesofGreen'sfunctions,suchastheirlow-rankhierarchicalstructures(16,17),anddeeplearningexperiments(6,7)suggestanexponentiallysmaller(poly-logarithmic)samplecomplexityofO(log(1/ε)α),forsomepowerα≥1.RecentworkshowsthatsuchboundscanbeattainedbyemployingarecoveryalgorithmbasedonasparseCholeskyfactorization(18,19).However,theprooftechniquerequiresqueriesofthesolutionoperatoratdeterministicpiecewisepolynomialinputs,whichisnotclosetothesettingemployedbystate-of-the-artdeeplearningapproaches.Akeydifficultyinimprovingthepolynomialerrorboundfrom(13)toapoly-logarithmicsamplecomplexitycomesfromthehierarchicalstructureoftheGreen'sfunction.Hence,whileonecanexploitthehierarchicalstructuretogreatlyreducethenumberoftrainingpairsusingarecursivepeelingalgorithm(20–23),approximationerrorsmayaccumulateexponentiallyduringtheprocedureandsignificantlydeterioratetheerrorbound.Additionally,designingaprovablystablealgorithmforrecoveringn×nhierarchicalmatricesfromO(logn)matrix-vectorproductsisanopenprobleminnumericallinearalgebra(13,Sec.5.1).Inthispaper,wegeneralizethepeelingalgorithmforhierarchicalmatricestoinfinitedimensionsandcontrolthepotentialaccumulationoferrorsbyadaptivelyrefiningthetolerance.Ourmaintheorem(seeTheorem2)providesapoly-logarithmicupperboundforthesamplecomplexityofsolutionoperatorsassociatedwithellipticproblemsinthreedimensions.Wenotethatonehastoexpresstheerrorinthesolutionoperatornorm∥*∥,definedinDefinition1.Thismetricisconsistentwiththeusualwayofmeasuringthemodelerroronatestsetindeeplearningapproaches(5–11).Definition1(OperatorandHSnorms).LetF:L2(Ω)→L2(Ω)bethesolutionoperatorassociatedwithLandGreen'sfunctionkernelG.Itsoperatornorm∥*∥2andHS-norm∥*∥HSaredefinedas(3,Chapt.3)∥F∥2=sup{∥F(f)∥L2(Ω)|f∈L2(Ω),∥f∥L2(Ω)=1},∥F∥HS=∥G∥L2(Ω×Ω).Theoperatornormisageneralizationofthespectralnorm∥*∥2formatricestoHilbert–SchmidtoperatorsandcouldalternativelybedefinedasthelargestsingularvalueofF,whiletheHS-normisageneralizationoftheFrobeniusnorm.Theorem2.Let0<ε<1besufficientlysmall,Ω⊂RdbeaboundedLipschitzdomainindimensiond=3,andLbeanellipticpartialdifferentialoperatorintheformgivenbyEq.(1).IfF:L2(Ω)→L2(Ω)isthesolutionoperatorassociatedwithL,thenthereisarandomizedalgorithmthatconstructsanapproximation ̃FofFusingN=O(log(1/ε)d+2[log(log(1/ε))+log(1/Γε)]d+1)input-outputpairs{(fj,uj)}Nj=1,suchthat∥F− ̃F∥2≤ε∥F∥HS,withprobabilitygreaterthan1−e−log(1/ε)d.Thefactor0<Γε≤1isameasureofthequalityoftheforcingtermsatapproximatingtheeigenfunctionsofL(seeEq.(25)).NicolasBoullé,DianaHalikiasandAlexTownsend1of22TheproofofTheorem2issummarizedinAlgorithm1andoccupiestherestofthisSupplementaryInformationText.ItexploitstwotheoreticalpropertiesofGreen'sfunctions:(1)thelow-rankstructureonwell-separateddomains(seeSection1A)and(2)theirdecayawayfromthesingularityalongthediagonalofthedomain(seeSection1B).InSection2,wereviewexistingresultsforthediscreteanalogueofGreen'sfunctionrecoveryfrominput-outputpairs,whichisequivalenttohierarchicalmatrixrecoveryfrommatrix-vectorproducts.Wedescribetherandomizedsingularvaluedecomposition(seeSection2A)andthepeelingalgorithminSection2Cforreconstructinghierarchicallow-rankmatricesfrommatrix-vectorproducts(20,24–26).WealsoincludeaperturbationanalysisoftherandomizedsingularvaluedecompositionunderadditiveperturbationerrorsinSection2B.InSection3,weextendtheseresultstothecontinuouscaseofGreen'sfunctionrecovery.WedescribethepreviouslyestablishedrandomizedsingularvaluedecompositionforHilbert–Schmidtoperators(seeSection3A),thenusethisresulttodevelopaninfinite-dimensionalanalogueofthepeelingalgorithm(seeSection3B).TheseideasarefinallycombinedinSections3Cto3EtoshowthatonecanstablyrecoverGreen'sfunctionsassociatedwithellipticoperatorsoftheformofEq.(1)usingapoly-logarithmicnumberofinput-outputfunctions(i.e.,aspectrallyefficientlearningrate).Algorithm1Learningthesolutionoperatorviainput-outputfunctions.Input:Black-boxnumericalsolverassociatedwithL,GPcovariancekernelK,tolerance0<ε<1Output:Approximation ̃FofthesolutionoperatorFwithinrelativeerrorε1:DeterminethenumberofhierarchicallevelsNεusingGreen'sfunctions'off-diagonaldecay(Eq.(7))2:Setinitialtolerancetoε1=εp≪ε3:forL=1:Nεdo4:SampletheGPwithcovariancekernelK(Section3B)5:UsepeelingtosketchtheGreen'sfunctiononnewadmissibledomains(Sections2Cand3B)6:ApproximatetheGreen'sfunctiononnewadmissibledomainsusingtherandomizedSVDwithtoleranceεL(Section3A)7:IncreasetherandomizedSVDtolerance(Proposition10)8:Padtheapproximant ̃Fwithzerosovertheremainingnon-admissibledomains(Section3E)A.Low-rankstructureonwell-separateddomains.Green'sfunctionsofellipticoperatorshavelownumericalrankonwell-separateddomainsX,Y⊂Ω.Moreprecisely,wesaythatXandYsatisfyastrongadmissibleconditionifdist(X,Y)≥ρmax{diamX,diamY},[3]whereρ>0isanarbitraryconstantmeasuringtherelativedistancebetweenXandY.Let0<ε<1beatargetrelativeaccuracy.Bebendorf&Hackbusch(17,Thm.2.8)provedthatwhenthepair(X,Y)isstronglyadmissible,thereexistsaseparableapproximationGk(x,y)=Pki=1ui(x)vi(y)oftheGreen'sfunctionsuchthat∥G−Gk∥L2(X×Y)≤ε∥G∥L2(X׈Y),wherek≤kεandkε=Mlog(1/ε)d+1forsomeconstantM>0thatdependsonL.Here,Y⊂ˆY⊂ΩdenotesadomainslightlylargerthanY(see(17,Thm.2.8)fortheprecisedefinitionofˆY).UsingtheEckart–Young–Mirskytheorem(27,28),wededucethatGreen'sfunctionsassociatedwithellipticoperatorshavenumericalrankboundedbykεonwell-separateddomains.Asnotedin(13),thispropertyenablestheuseofrandomizednumericallinearalgebratechniquesforapproximatingGreen'sfunctionsfrominput-outputpairs.Apair(X,Y)⊂Ω×ΩthatdoesnotsatisfyEq.(3)iscallednon-admissible.ThispropertyleadstoahierarchicalpartitionofΩ×Ωintoadmissibleandnon-admissibledomains(24–26).Withoutlossofgenerality,weassumethatthedomainofthehierarchicalpartitionisΩ=[0,1]d.Otherwise,onemayrescaleandshiftΩsuchthatΩ⊂[0,1]dandconsidertheintersectionofthepartitionof[0,1]dandΩ.SinceGisnotoflowrankontheinitialdomainΩ×Ω,thedomain[0,1]disdyadicallypartitionedinto2dsmallersubdomainsgivenbyhalvingeachofthedintervals[0,1].ThisleadstoN(L)≤6d2dLadmissibledomainsatthelevel1≤L≤Nofthehierarchicalpartition,whereN≥1isthenumberofhierarchicallevels.Here,wechoseanadmissibilityconstantρ=1/√dinEq.(3)sothatnon-admissibledomainsareneighboringboxes.WenotethattherescalingprocedureisequivalenttoembeddingΩintoacubewhosesidelengthdependsonthediameterofΩ.Then,oneconstructsahierarchicalpartitionofthecubeandintersectseachcomponentwithΩtoobtainthedesiredpartition.Therefore,theconstantinfrontofthelearningrateestimateinTheorem2dependsimplicitlyonthegeometryofΩsuchasitsdiameter.AdomainwithpooraspectratioleadstoasuboptimalpartitionandthereforewedonotexpecttohavethebestconstantinTheorem2.B.Off-diagonaldecay.WedeterminethenumberofhierarchicallevelsusingasecondpropertyofGreen'sfunctionsassociatedwithellipticoperators,knownasoff-diagonaldecay,whichcontrolsthemagnitudeofGreen'sfunctionsonnon-admissibledomains.Following(2,Thm.1.1),weknowthataGreen'sfunctioninthreedimensionsdecaysawayfromthediagonal:G(x,y)≤cκC|x−y|∥G∥L2(Ω×Ω),x,y∈Ω,x̸=y,[4]wherecκCisaconstantdependingonthespectralconditionnumberoftheoperatorLdefinedinEq.(1),and|*|denotesEuclideandistance.Foranon-admissiblepairX×Y⊂Ω×Ωsuchthatdist(X,Y)<ρmax{diamX,diamY},theL2-normofG2of22NicolasBoullé,DianaHalikiasandAlexTownsendoverX×YcanbeboundedbyintegratingEq.(4),followingtheargumentof(13,Sec.4.2).Letr=(2+ρ)max{diamX,diamY}beaconstantdependingonthesizeofXandY,thentheL2-normoftheGreen'sfunctionassociatedwithLsatisfies∥G∥L2(X×Y)≤CρcκCr2∥G∥L2(Ω×Ω),[5]whereCρ=√2π/p3(2+ρ)3isanintegrationconstant.UsingthehierarchicalpartitionofΩ×ΩintroducedinSection1A,wefindthatthemaximumdiameterofthenon-admissibledomainsX×Ydecaysexponentiallyfastwiththenumberofhierarchicallevelsasmax{diamX,diamY}≤√d2N+1,[6]sinceXandYarecontainedincubesofsidelength1/2N.Weselectρ=1/√dandthenumberofhierarchicallevels,Nε,suchthatGhasrelativeL2-normboundedby0<ε<1oneachnon-admissibledomainofthepartition.Finally,combiningEqs.(5)and(6)yieldsNε=12log2(1/ε)+12log2(cid:16)cκCπp6√2+√6(cid:17)−1∼12log2log(1/ε),ε→0.[7]Remark3(Generalizationtoothersystems).Ellipticoperators(29)indimensions1and2andellipticoperatorswithlowerorderterms(30)alsoadmitaGreen'sfunctionwithahierarchicalstructureandoff-diagonaldecay.Therateofoff-diagonaldecayinthesecasesresultsinadifferentconstantNε,soNεisdimensiondependent.Thus,wesuspectthattheresultspresentedinthisworkandandaversionofTheorem2generalizewithslightlydifferentconstantstothesesystems.2.Fastrecoveryofhierarchicalmatricesfrommatrix-vectorproductsAhierarchicaloff-diagonallowrank(HODLR)matrixHisablock-structuredmatrixwhichoftenarisesfromintegralordifferentialequationproblems(31–33),e.g.,bydiscretizingaGreen'sfunction(seeSection1A).Thematrixishierarchicallypartitionedintosub-blocks,wheretheblockslocatedawayfromthediagonalareoflowrank.Apairofadmissibleblocks(X,Y)satisfiesaso-calledweaklyadmissibleconditionanalogoustoEq.(3)withρifdist(X,Y)>0.Thenumberoflevelsinthehierarchydeterminesthesizesoftheblocks.Thissectiondescribesa"peeling"recoveryalgorithm(20)forapproximatingHODLRmatricesfrommatrix-vectorproductswithrandomtestvectorsusingtherandomizedsingularvaluedecomposition(21).A.Randomizedsingularvaluedecomposition.Wefirstfocusonrecoveringalow-rankmatrixusingmatrix-vectorproductswithtestvectors.Asthisisafundamentaltaskinnumericallinearalgebra,severalalgorithmshavebeenproposedusingdifferentembeddingtechniquesandvariousrandomtestvectors(34),suchasrandomperturbations(35),sparsesignmatrices(36–39),andsubsampledtrigonometrictransforms(35,40–42).Therandomizedsingularvaluedecomposition(SVD)isoneofthemostpopularalgorithmsforconstructingalow-rankapproximantofalargematrixfrommatrix-vectorproductswithrandomGaussiantestvectors(43).WhiletheprobabilisticerroranalysisperformedbyHalkoetal.applieswhentheinputvectorsarestandardGaussian,therandomizedSVDhasbeenrecentlyanalyzedforGaussianinputvectorswithcorrelatedentriesdeterminedbyageneralcovariancematrix(13,44).AsweshallseelaterinSection3A,thisgeneralizationenablestheapplicationoftherandomizedSVDininfinitedimensionstocomputelow-rankapproximantsofHilbert–Schmidtintegraloperatorsandcanbeusedtoapproximateoff-diagonallow-rankblocksofGreen'sfunctions(seeSection1Band(13)).LetAbeanm×nrealmatrix,wherem≥n,withSVDgivenbyA=UΣV∗,whereU∈Rm×mandV∈Rn×nhaveorthonormalcolumns,andΣisanm×nrectangulardiagonalmatrixcontainingthesingularvaluesσ1(A)≥***≥σn(A)≥0ofA.Letk≥1bethetargetrank,p≥2anoversamplingparameter,andΩ∈Rn×(k+p)arandomtestmatrixwithindependentandidenticallydistributed(i.i.d.)columnsfollowingamultivariateGaussiandistributionwithmean0andcovariancematrixK∈Rn×n,i.e.,Ω(:,j)∼N(0,K)for1≤j≤k+p.ItisconvenienttopartitionthereducedSVDofAasfollows:kn−kkn−knA=(cid:20)U1U2(cid:21)(cid:20)Σ1Σ2(cid:21)(cid:20)V∗1V∗2(cid:21)kn−k,wherethematricesΣ1andΣ2arediagonalandcontainthefirstkandlastn−ksingularvaluesofA,respectively.Inaddition,wedecomposethetestvectorΩinthebasisdefinedbytherightsingularvectorsofAasΩ1=V∗1ΩandΩ2=V∗2Ω.TherandomizedSVDusesthefollowingtwo-stageprocedureforconstructingalow-rankapproximanttothematrixA:1.FormthematrixproductY=AΩ.Thissteprequiresk+pmatrix-vectorproductswithA.2.ProjectthematrixAontotherangeofY.OneachievesthisbyconstructingamatrixQwithorthonormalcolumnsandthesamecolumnspaceasthatofY.Then,weprojectAontotherangeofYasfollows: ̃A=QQ∗A=PYA,wherePYistheorthogonalprojectionmatrixontherangeofYdefinedasPY=YY†.Here,Y†istheMoore–Penrosepseudo-inverseofY.AssumingthatthematrixA=A∗,thisprojectionstepalsorequiresk+pmatrix-vectorproductswithAas ̃A=Q(AQ)∗;otherwise,itrequiresk+pmatrix-vectorproductswithA∗.NicolasBoullé,DianaHalikiasandAlexTownsend3of22TheapproximationerrorintheFrobeniusnorm,∥*∥F,betweenthematrixAandthecomputedlow-rankapproximant ̃Acanbecharacterizedasfollows(13,Thm.1):∥A−PYA∥F≤r1+t2s23γkk(k+p)p+1Tr(K)λ1 nXj=k+1σ2j(A)!1/2,whichholdswithprobability≥1−t−p−[se−(s2−1)/2]k+p,forarbitrarynumberss,t≥1.Here,Tr(K)denotesthetraceofthematrixK,i.e.,thesumofitseigenvaluesλ1≥***≥λn.Thequantity0≤γk≤1measuresthequalityofthecovariancematrixforapproximatingtherightsingularvectorsofAandisdefinedasγk=k/(λ1Tr((V∗1KV1)−1)).Notethatwhenk=p,onecansimplifytheboundbychoosingt=eands=2toobtainthefollowingerrorbound(16,Eq.38):∥A−PYA∥F≤ 1+20rkγkTr(K)λ1! nXj=k+1σ2j(A)!1/2,[8]whichholdswithprobability≥1−2e−k.ThiserrorboundallowsustorecoveraHODLRmatrixHwithhighprobabilityfrommatrix-vectorproductsbyapproximatingitblock-by-block.LaterinSection2C,wecombinetherandomizedSVDwiththepeelingalgorithmtogreatlyreducethenumberoftestinputvectorsneededbyexploitingthehierarchicalstructureofH.However,employingthepeelingprocedureleadstoapotentialaccumulationoferrors,whichcanonlybecontrolledbyacarefulperturbationanalysisoftherandomizedSVD.B.Perturbationanalysisoftherandomizedsingularvaluedecomposition.Inthissection,weassumethatmatrix-vectorproductswithAintroduceadditiveperturbationerrorsinthesampleandprojectionstepsoftherandomizedSVD,suchthatYnoisy=AΩ+E=Y+E,and ̃A=PYnoisyA+QE∗P.[9]Here,Ydenotesthenoiselessmatrix-vectorproductswithAwhichwecannotaccess,E∈Rm×(k+p)istheadditiveperturbationwith∥E∥F≤εforagivenε>0,andEP∈Rn×(k+p)istheprojectionerrorsatisfying∥EP∥F≤ε.WhiletheoriginaltheoreticalresultsontherandomizedSVDareformulatedinthenoise-freesetting(34,43,45–47),alargenumberofstudiesinmatrixperturbationtheoryhaveconsideredboundingtheapproximationerrorbetweenthelow-rankapproximantandexactleadingsingularvectorsofAwhentheobservedmatrixˆAfollowsa"signal-plus-noise"model,i.e.,itcontainsnoiseasˆA=A+E(48–52).StandardboundsintheliteraturecanberefinedbyintroducingadditionalassumptionsontheperturbationerrormatrixE,suchasspecificdistributionofitsentries(53–63).Recently,theseresultshavebeenexploitedtoderiveexplicitperturbationerrorsinthecontextoftherandomizedSVD(64).Oursettingdiffersfrompreviousworkbecausewedonothaveaccesstotheperturbedsketchthroughmatrix-vectorproducts,aserrorisintroducedadditivelyaftersketching(seeEq.(9)).Therefore,wecannotusesketchingto"learn"theperturbationerrorandobtainefficienterrorboundswithclassicalmatrixperturbationtheoryresults.OuraimistoanalyzetheerrorbetweenthematrixAanditsapproximation ̃AcomputedbytherandomizedSVDas∥A− ̃A∥F≤∥A−PYnoisyA∥F+∥QE∗P∥F≤∥A−PYnoisyA∥F+ε.[10]FollowingEq.(10),wefocusonanalyzingtheperturbedprojectionerrorterm∥A−PYnoisyA∥F,whereYnoisy=Y+E.Thistermcanbedirectlyboundedusingthetriangularinequalityas∥A−PYnoisyA∥F≤∥A−PYA∥F+∥(PY−PYnoisy)A∥F,andthenusingorthogonalprojectorerroranalysis(65–68)toanalyzetheprojectionerror(PY−PYnoisy).However,thisapproachintroducestechnicaldifficultieswhenevertheadditiveerrorEhasanon-zerocomponentinthespacespannedbytheleadingsingularvectorsofA.Instead,wechoosetodirectlyanalyzeEq.(10)toestimatetheerrorusingafirst-orderexpansionwhenεissufficientlysmall.Thefollowingpropositionisananalogueof(43,Thm.9.1)andprovidesadeterministicerrorboundfortherandomizedSVDwithperturbedsamples.Proposition4(Deterministicerrorbound).LetAbeanm×nmatrixwithm≥nand1≤k≤nbeatargetrank,andp≥2anoversamplingparameter.ChooseatestvectorΩ∈Rn×(k+p)andconstructtheperturbedsamplematrixasYnoisy=Y+E,whereY=AΩandE∈Rm×(k+p)satisfies∥E∥F≤ε.AssumingthatΩ1=V∗1Ωisfullrankandε>0issufficientlysmall,thentheapproximationerrorsatisfies∥A−PYnoisyA∥2F≤∥Σ2∥2F+∥(Σ2Ω2+E2)(Ω1+Σ−11E1)†∥2F,[11]whereE1=U∗1EandE2=U∗2E.Proof.TheproofofProposition4closelyfollowstheproofof(43,Thm.9.1).WefirstarguethattheleftsingularvectorsofAdonotplayanyrolebydefiningtheauxiliarymatrix ̃Aandperturbedsamplematrix ̃Ynoisyas ̃A=U∗A=(cid:20)Σ1V∗1Σ2V∗2(cid:21),and ̃Ynoisy= ̃AΩ+U∗E=(cid:20)Σ1Ω1+E1Σ2Ω2+E2(cid:21).4of22NicolasBoullé,DianaHalikiasandAlexTownsendUsingtheunitaryinvarianceoftheFrobeniusnormand(43,Prop.8.4),wehave∥A−PYnoisyA∥F=∥U∗(I−PYnoisy)U ̃A∥F=∥(I−PU∗Ynoisy) ̃A∥F=∥ ̃A−P ̃Ynoisy ̃A∥F.Itisthensufficienttoshowthatthefollowinginequalityholds:∥ ̃A−P ̃Ynoisy ̃A∥2F≤∥Σ2∥2F+∥(Σ2Ω2+E2)(Ω1+Σ−11E1)†∥2F.Toachievethis,wefirstremarkthat,sinceΩ1isfullrank,ithaslinearlyindependentcolumnsandΩ1Ω∗1isinvertiblesuchthatΩ†1:=Ω∗1(Ω1Ω∗1)−1iswelldefined.Since1≤k≤rank(A),thekthsingularvalueofAisstrictlypositiveandΣ1isinvertible.LetdΩ1bethefunctiononk×kmatricesdefinedasdΩ1(X)=det(cid:2)(Ω1+Σ−11X)(Ω1+Σ−11X)∗(cid:3)forX∈Rk×k.dΩ1iscontinuousandstrictlypositiveatX=0.Hence,forεsufficientlysmall,dΩ1(E1)>0and(Ω1+Σ−11E1)†iswelldefined.ThisalsoimpliesthatΣ1Ω1+E1hasfullrankand,ifWdenotesthematrixcontainingthefirstkcolumnsof ̃Ynoisyandzeroafterwards,thenk+prange(W)=range(cid:18)(cid:20)I0(cid:21)(cid:19)kn−k,k+pW=(cid:20)Σ1Ω1+E10(cid:21)kn−k.TherangeofWspansthesamesubspaceasthefirstkleftsingularvectorsoftheauxiliarymatrix ̃A.Wethenuseperturbationtheoryfororthogonalprojectorstotreatthematrix ̃YnoisyasaperturbationofW,andintroduceamatrixZtoflattenthefirstkrowsoftheauxiliarysamplematrixasZ= ̃Ynoisy(Σ1Ω1+E1)†= ̃Ynoisy(Ω1+Σ−11E1)†Σ−11=(cid:20)IF(cid:21),F=(Σ2Ω2+E2)(Ω1+Σ−11E1)†Σ−11.Wethenfollowtheproofof(43,Thm.9.1)toobtainthefollowinginequality∥(I−P ̃Ynoisy)A∥2F≤∥Σ∗(I−PZ)Σ∥F≤∥FΣ1∥2F+∥Σ2∥2F.Wehave∥FΣ1∥2F=∥(Σ2Ω2+E2)(Ω1+Σ−11E1)†∥2F,whichshowsthatEq.(11)holds.OnecaneasilyextractexplicitupperboundsfromProposition4whentheperturbationerrorislocatedinasubspacethatisorthogonaltothefirstkleftsingularvectorsofA,containedinthematrixU1.Moreover,themultiplicativefactorΣ1intheright-handsideofEq.(11)impliesthatthecomponentoftheerrorinthespacegeneratedbythejthsingularvectormusthavemagnitudeboundedbythejthsingularvalueofA.Otherwise,onecannothopetorecoveragoodrankkapproximation,astheperturbationistoolargeinthedirectionofthejthsingularvector.Toalleviatethisissue,wederiveaprobabilisticboundfortheperturbedrandomizedSVDbycombiningProposition4withafirst-orderexpansionofaperturbedpseudo-inversematrixwhentheperturbationmagnitudeεissufficientlysmall.Theorem5(Probabilisticerrorbound).LetAbeanm×nmatrixwithm≥n,1≤k≤natargetrank,p≥2anoversamplingparameter,andΩbeann×(k+p)Gaussianmatrix,whereeachcolumnisi.i.d.anddrawnfromamultivariateGaussiandistributionwithmeanzeroandcovariancematrixK.Assumethatmatrix-vectorproductswithAandA∗introduceanadditiveerrorofE,with∥E∥F≤εforsufficientlysmall0<ε<1.Then,theapproximationerrorbetweenthematrixAanditslow-rankapproximant ̃AconstructedbytherandomizedSVDsatisfies∥A− ̃A∥F≤r1+t2s23γkk(k+p)p+1Tr(K)λ1 nXj=k+1σ2j(A)!1/2+O(ε),[12]withprobability≥1−t−p−[se−(s2−1)/2]k+p.Proof.CombiningEq.(10)andProposition4yields∥A− ̃A∥F≤∥A−PYnoisyA∥F+ε≤∥Σ2∥F+∥(Σ2Ω2+E2)(Ω1+Σ−11E1)†∥F+ε.[13]LetXbethek×(k+p)matrixsuchthatεX=Σ−11E1.BythesameargumentoftheproofofProposition4,thematrixΩ1+εXhasfullrankforεsufficientlysmall.Then,thematrix(Ω1+εX)(Ω1+εX)∗isinvertible,andwecancomputeafirst-orderexpansionofthepseudo-inverseusinganexpansionforthematrixinverseas(Ω1+εX)†=(Ω1+εX)∗[(Ω1+εX)(Ω1+εX)∗]−1=(Ω1+εX)∗[Ω1Ω∗1+ε(XΩ∗1+Ω1X∗+εXX∗)]−1=Ω†1+O(ε).Therefore,thesecondtermintheright-handsideofEq.(13)satisfies∥(Σ2Ω2+E2)(Ω1+Σ−11E1)†∥F=∥Σ2Ω2Ω†1∥F+O(ε),since∥E2∥F≤∥E∥F≤εand∥E1∥F≤ε.Weconcludethattheapproximationerrorisboundedforεsufficientlysmallas∥A− ̃A∥F≤∥Σ1∥F+∥Σ2Ω2Ω†1∥F+O(ε),whichwecanboundusingtheproofof(13,Thm.1).NicolasBoullé,DianaHalikiasandAlexTownsend5of22C.Peelingalgorithmforweaklyadmissiblehierarchicalmatrices.Wenowconsiderasymmetricn×nhierarchicalmatrixH,whoseoff-diagonalblocksareoflowrank,andhencecanbeapproximatedbytherandomizedSVD.Thepeelingalgorithm(20,69)usesarecursiveeliminationproceduretoefficientlyutilizeeachinput-outputpairtorecoverHinO(logn)matrix-vectorproducts.Themainideaistorecoverlow-rankblocksofHlevel-by-level,i.e.,recoverHonelevelatatime,startingwiththelargestblocks,workingtowardsthediagonal,andfinallyrecoveringthefinestblocksizeatachosenstoppingpoint.AhierarchicalpartitionofHisobtainedbyhalvingtheindexsetoftherowsandcolumnsateachlevel.Therefore,ifHisasymmetricrank-kn×nHODLRmatrix,ithasN=⌊log2(n)⌋levels,andthefollowingblockstructureatthefirstlevel:H=(cid:18)H1H2H⊤2H4(cid:19),[14]whereH2andH⊤2areconsideredoff-diagonalblocksandareofrankatmostk.Theoff-diagonalblocksarecoloredingreeninEq.(14)andareusuallycalledadmissibleblocksastheysatisfyaweaklyadmissibleconditionanaloguetoEq.(3).Theblocksalongthediagonal,coloredinredinEq.(14),areconsiderednon-admissible.Furtherhierarchicallevelsareobtainedbyrecursivelysubdividingthefirsttwonon-admissibleblocks,H1andH4,torefinethematrixalongthediagonalandobtainmoreadmissibleblockswithrankkasfollows:(cid:18)H1H2H⊤2H4(cid:19)→H11H12H⊤12H14H2H41H42H⊤2H⊤42H44→H111H112H⊤112H114H12H141H142H2H⊤12H⊤142H144H411H412H⊤412H414H42H⊤2H441H442H⊤42H⊤442H444.[15]Again,greenmatricesareofrankkwhileredmatricesneedtobefurtherpartitionedtorevealoff-diagonallow-rankstructure.WenowdescribetheprocedureofthepeelingalgorithmtoconstructaHODLRapproximanttoHfrommatrix-vectorproductswithrandomtestvectorsusingtherandomizedSVD.LetHbearank-ksymmetricHODLRmatrixpartitionedasinEq.(15).Peelingfirstrecoversthelargestoff-diagonalblocksofH,i.e.,H2andH⊤2,whichareofsizen/2×n/2atthefirsthierarchicallevel.Webeginbyconstructingtwon×(k+p)randomtestvectorsX1andY1,withthefollowingblockstructure:X1=(cid:18)0x1(cid:19),Y1=(cid:18)y10(cid:19).Here,x1andy1aren/2×(k+p)matrices,wherekistherankofH2andp≥1isanoversamplingparameterrequiredbytherandomizedSVD.Then,theproductsHX1andHY1allowustoaccessmatrix-vectorproductswiththeblocksH2andH⊤2,andformH2x1andH⊤2y1.Next,weinvoketherandomizedSVDtoapproximatetherank-kblockH2bysamplingthecolumnsofx1i.i.d.fromamultivariateGaussiandistribution,andsettingy1tobetheorthogonalizedoutputH2y1.OncetheblocksH2andH⊤2havebeenrecovered,wedefinethe"leveltruncated"matrixH(1)asthematrixgivenbyzeroingoutalloftheblocksofHwithhierarchicallevelgreaterthanone:H(1)=(cid:18)0H2H⊤20(cid:19).WenotethattheblocksH2andH⊤2havebeenrecoveredexactlybytherandomizedSVDwithprobabilityonesinceweassumedthattheyareofrankexactlyk.Wenowgeneralizetheprocedurerecursivelyandassumethatallthesub-blocksuptothehierarchicallevel1≤L≤N−1havebeenapproximatedbytherandomizedSVDandpeeling.TheL-truncatedmatrixH(L)isequaltoHfortheadmissibleblocksatlevelL,andzeroelsewhere.AtthehierarchicallevelL+1,wegeneratetheanalogoustworandominputmatrices,XL+1andYL+1,with(k+p)columnsandalternatingrandomGaussianandzerostructure.Wethenformtheproducts H−LXl=1H(l)!XL+1, H−LXl=1H(l)!YL+1[16]toisolatetheactionsoftheadmissibleblocksatlevelL+1,andapproximatethemwiththerandomizedSVD.ThisprocesscontinuesuntilthefinalhierarchicallevelNisreached.ApplyingpeelingwiththerandomizedSVDrequiresatotalof2(k+p)Nmatrix-vectorproductstorecoveralltheadmissibleblocksofH.Remark6.Thepeelingtechniquedescribedinthissectioneasilygeneralizestoanon-symmetricHODLRmatrixHbyrequiringtwoadditionalmatrix-vectorproductswithH⊤ateachhierarchicallevel.ThisisbecausetherandomizedSVDrequiresmatrix-vectorproductswiththetransposeofeachadmissibleblock,whichdoublesthetotalnumberofmatrix-vectorproductstorecoverHtoatmost4(k+p)N.6of22NicolasBoullé,DianaHalikiasandAlexTownsendAsitisknownintheliterature(20),thepeelingalgorithmisnotstableandcanpotentiallyintroduceerrorsthatexponentiallyaccumulateasonegoesdownthelevels.WecharacterizethemagnitudeoftheseaccumulatingerrorsforaweaklyadmissibleHODLRmatrix.However,theanalysisgeneralizeseasilytostronglyadmissiblehierarchicalmatrices(seeSection2D).Proposition7(Perturbationerrorfromsketch).Let1≤L≤Nbeahierarchicallevelandassumethateachoftheoff-diagonalblocksofHatlowerlevels1≤l≤L−1hasbeenapproximatedtowithinanabsoluteaccuracyof0< ̃εl<1.LetHi∈Rn/2L×n/2LbeanadmissibleblockatlevelLandxi∈Rn/2L×kaninputmatrix.ConsidertheexactsketchZL=Hixi,andtheperturbedsketch ̃ZLobtainedbypeelingfromtheinput∗XL=[0;x1;***;0;xi;0;***;x2L−1]∈Rn×k,wheretheEuclideannormofeachcolumnofthematricesxiisboundedbyaconstantC>0.Then,theapproximationerrorsatisfies∥ZL− ̃ZL∥F≤C√kL−1Xl=12L−1−l2 ̃εl.Proof.Itsufficestoprovethisresultfortheupperleft-mostoff-diagonalblockatlevelL,whichwedenoteasH1(L−1)2,where1(L−1)representsL−1concatenated1's.Thisisbecausetheperturbationargumentforoneblockappliessymmetricallytoanyotheradmissibleblock.LetXL=[0;x1;0;***;x2L−1]∈Rn×kbetheinputmatrix,suchthat∥xj∥F≤C√kfor1≤j≤2L−1.WeconsidertheexactsketchZL=H1(L−1)2x1oftheblockH1(L−1)2withx1.Then,followingEq.(16),theperturbedsketchobtainedbypeelingsatisfies: ̃ZL=ZL+(cid:0)IL0(cid:1)(H1(L−2)2− ̃H1(L−2)2)[0;x2]+***+(cid:0)IL0(cid:1)(H2− ̃H2)[0;x2L−2+1;***;0;x2L−1],whereIListhen/2L×n/2Lidentitymatrix,i.e.,IL'sdimensionsaretheblocksizeatlevelL.Moreover,theapproximant ̃H1(l)2oftheadmissibleblockH1(l)2atlevel1≤l≤L−1satisfies∥H1(l)2− ̃H1(l)2∥F≤ ̃εl.Then,thesketcherrorisboundedby∥ZL− ̃ZL∥F≤L−1Xl=1 ̃εivuut2L−1−lXj=1∥x2L−1−l+j∥2F≤C√kL−1Xl=12L−1−l2 ̃εl.Wenotethatthesketcherroriszeroatthefirsthierarchicallevel.Proposition7alsocharacterizestheperturbationerrorfortheprojectionstepoftherandomizedSVDinthepeelingalgorithm.Then,ifweconsidertheexactsketchZPL=Hiyiofanoff-diagonalblockHiatlevelL,andtheperturbedsketch ̃ZPLobtainedbypeelingfromtheinputYL=[y1;0;***;0;yi;0;***;0]∈Rn×k,whosecomponentsy1,...,y2L−1haveorthonormalcolumns.Theapproximationerrorsatisfies∥ZPL− ̃ZPL∥F≤√kL−1Xl=12L−1−l2 ̃εl.D.Peelingalgorithmforstronglyadmissiblepartitions.WenowgeneralizethepeelingalgorithmintroducedinSection2Ctohierarchicalmatriceswitharbitrarystructure.AswesawinSection1A,Green'sfunctionsassociatedwithellipticoperatorssatisfyastrongadmissibilitycondition,whichimpliesthatsub-blocksintersectingthediagonalarenolongerconsideredadmissibleandmaynothavelownumericalrank.Asanexample,forasymmetricblockmatrixHinEq.(14),theblocksH2andH⊤2arenotadmissible,andweinsteadrecursivelypartitionHasfollows,(cid:18)H1H2H⊤2H4(cid:19)→H11H12H21H22H⊤12H14H23H24H⊤21H⊤23H41H42H⊤22H⊤24H⊤42H44→H111H112H121H122H⊤112H114H123H124H21H22H⊤121H⊤123H141H142H231H232H⊤122H⊤124H⊤142H144H233H234H24H⊤231H⊤233H411H412H421H422H⊤21H⊤232H⊤234H⊤412H414H423H424H⊤421H⊤423H441H442H⊤22H⊤24H⊤422H⊤424H⊤442H444.[17]HierarchicalmatricespartitionedasinEq.(17)satisfyastrongadmissiblecondition(seeEq.(3))inspatialdimensiond=1.Partitionsinhigherdimensionsworksimilarlybutarehardertovisualizeandpossessalargerbandwidthofnon-admissibleblocksateachlevel.ConstructingthetestvectorsXLandYL,where1≤L≤N,iscrucialtoreducingthenumberofmatrix-vectorproductsintherandomizedSVDwhenrecoveringH.Ifonenaivelyemploysdifferenttestvectorsateachadmissibleblock,thenthenumberofmatrix-vectorproductsgrowsexponentiallywiththenumberoflevelsratherthanlinearly.Fortunately,peelinghasbeenrecentlygeneralizedtohierarchicalmatriceswitharbitrarystructure(23).Thenatureofthehierarchicalpartition(weaklyorstronglyadmissible)determinesthestructureandnumberofalternatinginputsinthetest∗Thisnotationdenotesamatrixwhosecomponents0,x1,0,...,0,x2L−1∈Rn/2L×karestackedvertically.NicolasBoullé,DianaHalikiasandAlexTownsend7of22matricesateachhierarchicalleveltomaintainthelineargrowthofthenumberofmatrix-vectorproductsneededwithrespecttothenumberoflevels.Thepeelingalgorithmrecoversamatrixwithastronglyadmissiblepartitioninexactlythesamewayasforweaklyadmissible,excepttheinputvectorshaveslightlydifferentstructurestoisolatetheactionsofthelow-ranksub-blocks.Thisstructureisderivedbythegeneralizedcoloringalgorithmtechniquein(23),whichwenowdescribe.Thepeelingalgorithmaimstosketchalltheadmissibleblocksofagivenlevel1≤L≤NofahierarchicalmatrixH.WegenerateasetoftestvectorssuchthatforeachadmissibleblockatlevelL,atestvectorsatisfiesasetofsketchingconstraintsassociatedwiththatblock.Morespecifically,foragivenadmissibleblock,werequireatestvectorthatsamplestheblockandavoidscontributionfromnon-admissibleblocksandadmissibleblocksofthesamelevel.Asanexample,ifwewanttosketchtheblockH⊤231inEq.(17),thetestvectormustvanishfortheblocksH⊤233,H411,H412,H421,andH422.Ofcourse,onecoulduseasmanytestvectorsasadmissibleblocks,butthenthenumberofinputswouldgrowexponentiallywiththenumberoflevels.Toresolvethisissue,(23)constructsinputsthatsatisfytheconstraintsforseveraldifferentadmissibleblockssimultaneouslybydefiningaconstraintincompatibilitygraph.Theverticesofthegraphcorrespondtotheconstraintsetforaparticularadmissibleblock,andverticesareconnectediftheirconstraintsconflictwithoneanother.Avertexcoloringalgorithmfindstheminimalnumberofcolors(chromaticnumber)denotedasχ(HL)∈NforalltheconstraintsetsatlevelL.Foreachcolor1≤j≤χ(HL),thereisatestvectorΩ(j)Lthatsatisfiestheconstraintsofalltheverticescoloredbyj.Akeyinsightisthatthechromaticnumberisboundedbyaconstantwhichisindependentofthelevelofthepartitionandsizeofthematrix(23),meaningthatonecanuseaconstantnumberofinputmatricesateachlevel.Inparticular,ifHsatisfiesastronglyadmissibleconditionindimensiond≥1,wehavetheboundχ(HL)≤6dforeachlevelL(23).Asacomparison,thechromaticnumberfortheHODLRmatrixwithaweaklyadmissiblepartitionanalyzedinSection2Cistwo.WeillustratetheinputmatricesforthestronglyhierarchicalmatrixinEq.(17),whosechromaticnumberisboundedaboveasχ(HL)≤6.Atthefirstlevel,i.e.,thesecondmatrixinEq.(17),therearefourtestvectorsoftheform:X(1)1=G1000,X(2)1=0G200,X(3)1=00G30,X(4)1=000G4,whereeachGiisamatrixofsizen/4×(k+p).Here,onecanobtainsketchesoftheblocksH⊤21andH⊤22inEq.(17)usingX(1)2.Withsimilarnotation,sixtestvectorsareneededtosamplealltheadmissibleblocksatthesecondlevel:X(1)2=G100000G110,X(2)2=0G600000G12,X(3)2=00G700000,X(4)2=000G80000,X(4)2=0000G9000,X(4)2=00000G1000.Fromthislevelanduntilthestoppingpoint,onlysixtestvectorsareneededateachlevel.Thefollowingcorollarygeneralizestheerroranalysisforthepeelingalgorithmperformedonaweaklyadmissiblehierarchicalmatrixtoastronglyadmissiblepartition.Corollary8(Accumulationoferrorsinstronglyadmissiblepartitions).SupposetheassumptionsandnotationinProposition7holdforahierarchicalmatrixHwithastronglyadmissiblepartitionindimensiond≥1.Then,thesketchandprojectionerrorsduringthepeelingalgorithmatlevel1≤L≤Nsatisfythefollowingbounds:∥ZL− ̃ZL∥F≤(6d−3d)C√kL−1Xl=12L−1−l2 ̃εl,and∥ZPL− ̃ZPL∥F≤(6d−3d)√kL−1Xl=12L−1−l2 ̃εl.Proof.Let1≤L≤Nbeahierarchicallevel.WiththenotationofProposition7,aninputmatrixXLqueriestheactionofalevel-Lsub-blockH(Iα,Iβ),whereαandβarelevel-LnodesinthehierarchicaltreeandIα,Iβ⊂[0,1]daretheircorrespondingindexsets(see(26)foradescriptionofindexsetsandhierarchicaltrees).Unfortunately,italsocapturestheactionsofapproximationerrorsinintersectingsub-blocksofH−H(L−1),duetousingpeelingatpreviouslevels.Asanexample,ifonetriestosketchtheadmissibleblockH⊤421inEq.(17)withatestvector,thenthematrix-vectorproductmightcontainacontributionfromH⊤22− ̃H⊤22andH⊤24− ̃H⊤24.Wederiveanupperboundonthenumberoflevel-lintersectingblocksfor1≤l≤L−1.EachoftheseintersectingblocksistherestrictionofH−H(L−1)toanadmissibleblockoftheformIα(l)×Iβfromapreviouslevell,whereα(l)isthelevel-lsubdomainthatwaseventuallysubdividedtogetα.Thatis,α(L−1)istheparentoftheα,α(L−2)istheparentofα'sparent,andsoon.Wethencountthenumberoflevel-lnodesβforwhichIα(l)×Iβisanadmissibledomain.First,Iα(l)×Iβisanadmissibledomainifandonlyifthenodesα(l)andβbelongtoeachother'sinteractionlists(23).Moreover,thesizeoftheinteractionlistofanynodeisboundedaboveby6d−3d(23),sothisisalsoan8of22NicolasBoullé,DianaHalikiasandAlexTownsendupperboundonthenumberofintersectingblocksfromlevell.Finally,eachpreviouslylearnedblockfromlevellcontributes ̃εltothesumofaccumulatederrorsfor1≤l≤L−1(seeProposition7),andwehavejustshownthatthereareatmost6d−3dofsuchintersectingblocksateachlevell.CombiningthiswithProposition7,wederivethefollowingboundontheperturbationerrorinthesketchstepoftherandomizedSVD:∥ZL− ̃ZL∥F≤L−1Xl=1(6d−3d) ̃εlvuut2L−1−lXj=1∥x2L−1−l+j∥2F≤(6d−3d)C√kL−1Xl=12L−1−l2 ̃εl.Similarly,weobtainaboundontheprojectionperturbationerror:∥ZPL− ̃ZPL∥F≤L−1Xl=1(6d−3d) ̃εlvuut2L−1−lXj=1∥y2L−1−l+j∥2F≤(6d−3d)√kL−1Xl=12L−1−l2 ̃εl.3.StablerecoveryofGreen'sfunctionsThissectiongeneralizesthediscussionoftherandomizedSVDanditsperturbationanalysisdescribedinSection2BtothecontinuousanalogueofHilbert–Schmidtoperators,ratherthanmatrices.Wethenusetheseresultstoderivetheerroranalysisforthegeneralizationofthepeelingalgorithmininfinitedimensions,showingthatonecanstablyrecoverGreen'sfunctionsonadmissibledomains.ThekeyideaistoavoidtheexponentialaccumulationoferrorswitheachhierarchicallevelinthepeelingprocedurebytakingadvantageofthefastdecayofaGreen'sfunction'ssingularvaluesusingadifferenttargetrankintherandomizedSVDateachlevel.Wethenderiveaprobabilisticerrorboundforusinginfinite-dimensionalpeelingtoapproximateGreen'sfunctionsonadmissibledomainsfrominput-outputpairsusingtherandomizedSVD.Finally,wepresentaglobalerrorboundfortheapproximantintheoperatornormthatachievesarelativeerrorofε>0ontheentiredomain.A.TherandomizedsingularvaluedecompositionforHilbert–Schmidtoperators.TherandomizedSVDintroducedinSection2Ahasbeenrecentlygeneralizedtocomputelow-rankapproximantstoHilbert–Schmidtoperators(13,44).Inthissection,weconsidertheparticularsettingofusingtherandomizedSVDtoapproximateaGreen'sfunctionGoveranadmissibledomainX×Y⊂Ω×Ω.Analogoustosamplingrandominputvectors,wesamplerandominputfunctionsdefinedonYfromaGaussianprocessGP(0,KY),whereKY:Y×Y→Risthecovariancekernel.WeconstructthesecondarykernelKYbytransformingaglobalkernelK:Ω×Ω→R,definedontheentiredomainasfollows.First,weassumethatKisacontinuoussymmetricpositive-definitekernelwithboundedtrace,i.e.,Tr(K)=ZΩK(x,x)dx=∞Xi=1λi<∞,whereλ1≥λ2≥***>0aretheeigenvaluesofK.UsingMercer'stheorem(70),thereexistsanorthonormalbasis{ei}iofL2(Ω)ofeigenfunctionsofK,suchthatK(x,y)=∞Xi=1λiei(x)ei(y),x,y∈Ω,wheretheconvergenceisabsoluteanduniform,andtheeigenfunctionsarecontinuous.Wecanthenrescale,shift,restricttheei,andorthonormalizethefamilyusingGram–Schmidtalgorithmtogenerateanorthonormalfamily{eY,i}iinL2(Y).WethendefinethekernelKYfollowingitsMercerdecompositionasKY(x,y)=∞Xi=1λieY,i(x)eY,i(y),x,y∈Y.[18]ThisprocedureguaranteesthatthesecondarykernelshavethesameeigenvaluesofK,and,inparticular,thatthetraceisunchanged,whichiscrucialinthenextsectionstoboundthenormoftherandomfunctionssampledfromtheassociatedGP.AsdescribedinSection1A,GhaslownumericalrankonX×Y,andthesingularvaluesassociatedwiththecorrespondingHilbert–Schmidtintegraloperator(seeEq.(2))decayexponentiallyfast.Letk≥1beatargetrankandkεanoversamplingparameter(seeSection1A).Wesamplerandomfunctionsf1,...,fk+kεfromtheGaussianprocessGP(0,KY),anddefinetherandomquasimatrix†ΩX×Y=(cid:2)f1***fk+kε(cid:3).Analogoustothediscretecase(43),weconsiderthek×(k+kε)matrixΩX×Y,1=(⟨vi,X×Y,fj⟩)i,j,whosecolumnsarei.i.d.andfollowamultivariateGaussiandistributionwithcovariancematrixCX×Y(13,Lem.1),definedas[CX×Y]ij=ZY×Yvi,X×Y(x)KY(x,y)vj,X×Y(y)dxdy,1≤i,j≤k.†See(71)foranintroductiontothequasimatrixnotation.NicolasBoullé,DianaHalikiasandAlexTownsend9of22Here,vi,X×YistheithsingularvectorofGrestrictedtoX×Y.Following(13,Sec.4.1.2),wesketchtheHSoperatorattherandomfunctionsf1,...,fk+kεandapplytherandomizedSVDtoobtainanapproximant ̃GtoGonthedomainX×Y.Then,withatargetrankkandanoversamplingparameterkε,thefollowingerrorboundholds:∥G− ̃GX×Y∥2L2(X×Y)≤ 1+t2s26kεγk,X×Y∞Xj=1λjλ1!ε2∥G∥2L2(X׈Y)withprobability≥1−t−kε−e−s2(k+kε)foranys,t≥1.Thecovariancekernelquality,γk,X×Y,isdefinedasγk,X×Y=k/(λ1Tr(C−1X×Y)).Wecanthenchooset=O(1)ands=O(1)suchthat∥G− ̃GX×Y∥L2(X×Y)=O(k1/2εγ−1/2k,X×Yε)∥G∥L2(X׈Y)[19]holdswithprobability≥1−e−kε.WeemphasizethattheperturbationerroranalysisfortherandomizedSVDstatedinTheorem5generalizestoinfinitedimensionssothatEq.(19)holdswheneverthemagnitudeoftheperturbationsissmallerthanthetargettolerance.B.PeelingforGreen'sfunctions.WenowgeneralizethepeelingalgorithmtorecoverGreen'sfunctionsoverhierarchicallypartitioneddomainsusingtherandomizedSVD.Inthissection,wefollowthemodelofHODLRmatrixrecoveryalgorithms(20,69)toextendthepeelingalgorithmtothecontinuouscaseofGreen'sfunctionrecoveryindimensionsd∈{1,2,3}.WerecoverGoverlevelsofthedomainrecursively,startingwiththelargesthierarchicallevel.First,theGreen'sfunction'sbehavioroveralloftheadmissibledomainsatthislevelisrecoveredandstoredinthefunctionG(1).Togettothenextlevel,wesubdividebyhalvingthedomaininalldirections.Now,weseektorecoverthefunctionG−G(1)onanynewadmissibledomainstoobtainG(2).Wedyadicallypartitionanynon-admissibledomainsandrepeattheprocesstorecoverG2=G−G(1)−G(2)overthenextlevel'sadmissibledomains.Werepeatuntilwereachapre-determinedstoppingpointclosetothediagonal.Let1≤L≤Nεbeahierarchicallevel.WenowdescribetheprocedureforrecoveringGL=G−PLl=1G(l)oneachadmissiblesubdomainofthislevel.ThecoloringalgorithmeasilyappliestogeneratinginputfunctionsoverΩ,asitwasoriginallywritteninthisgenerality.Wefirstapplythegraphcoloringalgorithm,describedinSection2D,todeterminethechromaticnumberχ(GL)associatedwiththedifferentconstraintsetsforsketchingGL.Asestablishedin(23),weknowthatforthestronglyadmissiblepartitionindimensiond,wehavethefollowingbound:χ(GL)≤6d.Eachcolornumber1≤j≤χ(GL)oftheconstraintgraphgathersnj≥1constraints,whichcorrespondtoasetofadmissiblesubdomains{Xji×Yji}1≤i≤nj⊂Ω×Ω.Wethenconstructtestfunctionsfj∈L2(Ω)suchthatSupp(fj)⊂∪nji=1Yji,wherefj|Yji∼GP(0,KYji),1≤i≤nj,andKYjiisdefinedinEq.(18).GivenatargetrankkandanoversamplingparameterkεforlearningtheGreen'sfunctionwiththerandomizedSVDovertheadmissibledomains,wegeneratetheinputquasimatrixF(j)L,where1≤j≤χ(GL),asfollows:F(j)L=(cid:2)fj,1***fj,k+kε(cid:3),wherefj,l∼fjfor1≤l≤k+kε.Analogoustoperformingamatrix-vectorproduct,sketchingtheHilbert–SchmidtintegraloperatorassociatedwithGLwiththequasimatrixF(j)LyieldsU(j)L=(cid:2)uj,1***uj,k+kε(cid:3),whereuj,l(x)=ZΩGL(x,y)fj,l(y)dy=ZΩG(x,y)fj,l(y)dy−LXl=1ZΩG(l)(x,y)fj,l(y)dy,1≤l≤k+kε.Wenowrestricttheoutputfunctionsuj,l∈L2(Ω)toisolatetheactionofGontheadmissiblesubdomains{Xji×Yji}1≤i≤njassociatedwiththejthcolor.LetRXji:L2(Ω)→L2(Xji)betherestrictionoperatortothesubdomainXji⊂Ω.Then,[RXjiuj,l](x)=RXjiZΩGL(x,y)fj,l(y)dy=njXi′=1ZYji′RXjiGL(x,y)fj,l(y)dy=ZYjiRXjiG(x,y)fj,l|Yji(y)dy,wherethefinalequalityholdsbecausethecoloringalgorithmensuresthatthereisonlyoneYjisuchthatXji×Yjiisanadmissibledomain.AnyotherdomainoftheformXji×Yji′fori′̸=ibelongstoalargersubdomainofΩ×ΩoverwhichGhasalreadybeenrecoveredatapreviouslevel.Thus,assumingexactrecoveryofpeelingatprevioushierarchicallevels,GLiszerooversuchdomains.HavingisolatedtheactionofGLononeadmissibledomain,wecannowconstructitsapproximationusingtherandomizedSVD(13).Followingthismethodforeachcolor1≤j≤χ(GL)ofthegraphcoloringalgorithm,werecoveranapproximationforGovertheadmissibledomainssatisfyingthecorrespondingsamplingconstraints.Thisresultsinatotalof2(k+kε)χ(GL)≤4×6dkεinput-outputfunctionpairsateachhierarchicallevel1≤L≤Nε.WeemphasizethatoneapplicationoftherandomizedSVDrequires2(k+kε)pairstoperformthesketchingandprojectionsteps.Finally,ifXj×YjisanadmissibledomainatlevelL,with1≤j≤N(L),wedenotebyΩ(j)L⊂YjtheassociatedrandomquasimatrixdefinedasΩ(j)L=(cid:2)fj,1|Yj***fj,k+kε|Yj(cid:3),fj,l|Yj∼GP(0,KYj).[20]Inpractice,thenumberofrandomquasimatricesatlevelLismuchsmallerthanN(L),thenumberofadmissibledomainsatthatlevel.10of22NicolasBoullé,DianaHalikiasandAlexTownsendC.Erroranalysisoftheinfinite-dimensionalpeelingalgorithm.Foragiventargetaccuracyε>0,weaimtoreconstructaGreen'sfunctionGcorrespondingtoaself-adjointHilbert–SchmidtoperatorH,giveninhierarchicalformatwithNε≥1hierarchicallevelsinthedomainandchromaticnumberboundedby6d,towithinrelativeerrorε.ThereconstructionalgorithmcombinestherandomizedSVDandthepeelingalgorithmdescribedinSections2C,2Dand3BandonlyreliesonsketchesofHwithrandomtestfunctions.Inparticular,ifHisamatrix,wecomputematrix-vectorproductsusingrandominputvectorssampledfromamultivariateGaussiandistributionwithzeromeanandcovariancematrixK.Ontheotherhand,ifH:L2(Ω)→L2(Ω)isaHilbert–Schmidtoperatorininfinitedimensions,onecancomputelow-rankapproximantsusingtheHSrandomizedSVDdescribedinSection3AbyevaluatingtheoperatoratrandomfunctionssampledfromaGaussianprocesswithzeromeanandtheappropriatecovariancekernelKYdescribedinEq.(18).Morespecifically,ifGirepresentstherestrictionofGtosomeadmissibledomainIαi×Iβi,whereIαi,Iβi⊂[0,1]d,thenwedefineHiastheHSoperatorcorrespondingtotherestrictionGi.Weemploythisnotationfortherestofthesection.BecauseGisaGreen'sfunction,anysuchHihasexponentiallyfastdecayingsingularvalues.Thatis,for0<ε<1,Hihasnumericalrankk≤kε=Mlog(1/ε)d+1,whered≥1isanintegerandM>0isaconstantindependentofε.BytheEckart–Youngtheorem,thetailofthesingularvaluesofHisatisfiesthefollowinginequality: Xj>kσj(Hi)2!1/2≤ε∥H∥HS.[21]Assumption1(Summaryofassumptions).Wesummarizetheassumptionsontheself-adjointHilbert-SchmidtoperatorHasfollowsforeaseofreference:1.HisasolutionoperatorunderthesameassumptionsasFinEq.(2),withcorrespondingGreen'sfunctionkernelG.2.ThedomainofGishierarchicallypartitionedwithNε∼12log2(1/ε)levelsandchromaticnumberboundedby6d.3.Forε>0sufficientlysmall,Hihasnumericalrankk≤kε=Mlog(1/ε)d+1,whereM>0isaconstant.ThefollowingpropositiongivesasufficientconditiononthemagnitudeofthesketchperturbationstoapplytheperturbationestimatefortherandomizedSVDderivedinSection2B.Proposition9(PerturbedrandomizedSVDerror).Letthetargettolerance0<ε<1besufficientlysmallandHibetherestrictionofHtoanadmissibledomainX×Y.SupposethatsketchingHiusingaquasimatrixΩiwithk+kεcolumnssampledi.i.d.fromGP(0,KY)returnsaperturbedsample ̃Z=HiΩi+E,wherethenormoftheperturbationquasimatrixEsatisfies∥E∥HS≤γ1/2k√k+kεε1+δ∥H∥HS,forsomeδ>0.Then,undertheconditionthat∥Ωi,1∥HS≥λ1γ1/2kεδ/2,therandomizedSVDconstructsanapproximation ̃HiofHiusingk+kεinput-outputpairssatisfies∥Hi− ̃Hi∥HS=O(εpkε/γk)∥H∥HS,withprobability≥1−e−kε,wherek≤kε=Mlog(1/ε)d+1.Here,Ωi,1=V∗1Ωi∈Rk×(k+kε),whereV1isthequasimatrixcontainingthefirstkrightsingularfunctionsofHi.Proof.TheproofreliesonthedeterministicerrorboundinProposition4fortherandomizedSVDwithperturbedinputs.Here,onemustcontrolthedecayrateofthekthsingularvalueofHi,denotedbyσk,byprovidingalowerboundtoensurethatthematrixΣ1E1inEq.(11)hassmallnormsothatonecanperformaTaylorexpansionofthepseudo-inverse.Inthefollowing,wearguethatifthetailofthesingularvaluesofHidecaysexponentiallyfast,thenσkmustcontributetoafractionofthenormofHi.Foragiven0<ε<1,bycombining(17,Thm.2.8)andtheEckart–Young–MirskytheoremforHilbert–Schmidtoperators,thereexistsk≤kε=Mlog(1/ε)d+1suchthatHihasnumericalrankk.LetΣ2bethediagonalquasimatrixcontainingthesingularvaluesσk+1≥σk+2≥***≥0ofHi.Weletk≤kεbetheuniqueintegersatisfyingthefollowingtwoinequalities:∥Σ2∥2HS≤ε2∥H∥2HSandσ2k+∥Σ2∥2HS>ε2∥H∥2HS.[22]WeaimtoapplytheperturbationanalysisargumentofSection2BfortherandomizedSVD.Wethereforemustbeabletoestimatetheterm∥Σ−11E1∥HS,whereΣ1isthediagonalmatrixcontainingtheklargestsingularvaluesofHi.WeapplytherandomizedSVDwithatargetrankofkandanoversamplingparameterofkε,resultingink+kεsketchesofHisuchthatE1=U∗1Esatisfies∥E1∥HS≤∥E∥HS≤γ1/2k√k+kεε1+δ∥H∥HS≤√2Mγ1/2klog(1/ε)d+12ε1+δ∥H∥HS.Then,wederivealowerboundonσktoshowthat∥Σ−11E1∥HSconvergestozeroasεgoestozero.Weconsiderthefollowingtwocases:1.Ifσk≥ε∥H∥HS/√2,then∥Σ−11∥HS≤√2k/ε∥H∥HS,andwehave∥Σ−11E1∥HS≤2Mγ1/2klog(1/ε)d+1εδ.2.Otherwise,ifσk<ε∥H∥HS/√2,thenEq.(22)impliesthatXj>kσ2j>ε22∥H∥2HS.[23]NicolasBoullé,DianaHalikiasandAlexTownsend11of22Weapply(17,Thm.2.8)andtheEckart–Young–Mirskytheoremagainwiththeaccuracyε/2toobtainak′≤kε/2=Mlog(2/ε)d+1≤2d+1kεsuchthatXj>k′σ2j≤ε24∥H∥2HS.[24]WethencombineEqs.(23)and(24)toobtainthefollowinglowerboundonσk:k′σ2k≥k′Xj=k+1σ2j=Xj>kσ2j−Xj>k′σ2j≥ε24∥H∥2HS.Intheend,wefindthat∥Σ−11E1∥HS≤2d/2+2M3/2γ1/2klog(1/ε)3(d+1)/2εδ.Inbothcases,weshowedthat∥Σ−11E1∥HS=o(∥Ωi,1∥HS).Then,wecanperformafirstorderexpansionforεsufficientlysmalltoobtaintherandomizedSVDbound(seeSection2BandEq.(19)):∥Hi− ̃Hi∥HS=O(k1/2εγ−1/2kε)∥H∥HS,whichholdswithprobability≥1−e−kε.Wenotethattheerrorduetotheprojectionstepisnegligiblesinceweassumedthiserrorissmallerthanthetargettolerance.Proposition9guaranteesthatonecanapplytherandomizedSVDperturbationanalysiswheneverthemagnitudeoftheperturbationissmallerthanthetargetrandomizedSVDaccuracy.WewillnowanalyzetheeffectoftheaccumulationoferrorsinthepeelingalgorithmontherandomizedSVDaccuracyatthehigherhierarchicallevels.FollowingProposition7,thepeelingalgorithmintroducesanaccumulationoferrorsbecauseadmissibleblocksfromprevioushierarchicallevelsperturbthesketchesatthecurrentlevel.Tocounterbalancethiseffect,weemploytherandomizedSVDatthefirstlevelwithahighertargetaccuracyε1=εr,wherer>1isanexponenttobedetermined,andprogressivelydecreasethetargetaccuracyεLathierarchicallevels1≤L≤Nε,suchthatε1<***<εNε,toreacharelativeerrorbetweentheapproximantandtheGreen'sfunctionofatmostε/log(1/ε)oneachadmissiblesubdomainX×Y⊂Ω×Ωofthepartition.LetkL≤kεLbethetargetrandomizedSVDrankatlevel1≤L≤Nε.Weintroducethefollowingcovariancequalitymeasureforthepeelingalgorithm:Γε=min1≤L≤Nε(cid:26)minXL×YLisadmissibleγkL,XL×YL(cid:27).[25]Weconsiderthefollowingprobabilityevents,whichprovideboundsonthejthrandomquasimatrixatlevelL,Ω(j)L,sampledfromGP(0,KYj)(seeEq.(20)):AΩ:=Nε\L=1N(L)\j=1n∥Ω(j)L∥2HS≤8kε1Tr(K)o,BΩ:=Nε\L=1N(L)\j=1n∥Ω(j)L,1∥2HS≥λ1εδΓεo,[26]whereδ=1/(Nε−1),andΩ(j)L,1isthematrixcontainingtheinnerproductsofthefirstrightsingularvectorsofGrestrictedtotheadmissibledomainX×YandtherandomfunctionsinΩ(j)L(seeSection3A).WeanalyzetheprobabilitythatAΩandBΩoccurinSection3D.Then,Proposition10estimatestherequiredexponentranddecayrateofthetargetaccuracy.Proposition10(Adaptiverateofthetargetaccuracy).Let0<ε<1sufficientlysmallandselectthetargetaccuracyfortherandomizedSVDatlevel1≤L≤Nεasfollows:εL=O(k3/2ε1Γ−1εε−1/(Nε−1)εL−1),ε1=εr,wherer=(d+2)log(log(1/ε))+log(1/Γε),andkε1=Mlog(1/ε1)d+1.ThefactorΓεisdefinedastheminimumofthecovariancequalityγεLoverallhierarchicallevels.Then,conditioningonAΩ,BΩ,andassumingthattherandomizedSVDsucceedsoneachadmissibleblock,theerrorbetweentheGreen'sfunctionanditsapproximant ̃GreturnedbyAlgorithm1usingtherandomizedSVDandthepeelingalgorithmsatisfies∥G− ̃G∥L2(X×Y)≤εlog(1/ε)∥G∥L2(Ω×Ω),oneachadmissibledomainX×Y⊂Ω×Ωofthehierarchicalpartition.Proof.Let1≤L≤Nεbeahierarchicallevelanddenoteby ̃εltheabsoluteerrorbetweentheGreen'sfunctionanditsapproximantoneachoftheadmissibledomainsatthepreviouslevels1≤l≤L−1.AccordingtoCorollary8,theapproximationerroroftheperturbedsketches(randomizedSVDsketchandprojectionsketch)atlevelLareboundedbyELandEPLas∥ZL− ̃ZL∥F≤EL,EL:=√2(6d−3d)Cpkε1L−1Xl=12L−1−l2 ̃εl=√2EL−1+√2(6d−3d)Cpkε1 ̃εL−1,[27a]∥ZPL− ̃ZPL∥F≤EPL,EPL:=√2(6d−3d)pkε1L−1Xl=12L−1−l2 ̃εl=√2EPL−1+√2(6d−3d)pkε1 ̃εL−1,[27b]12of22NicolasBoullé,DianaHalikiasandAlexTownsendwhereC=2√2Tr(K)1/2k1/2ε1followingEq.(26).Notethatweboundedthetargetrankkatlevellbytheinitiallargesttargetrankkε1sincewestartthepeelingalgorithmwiththesmallesttargetaccuracyεr=ε1≤***≤εNε.Then,Eq.(27)yieldsmax{EL,EPL}≤√2max{EL−1,EPL−1}+4(6d−3d)Tr(K)1/2kε1 ̃εL−1.[28]Now,followingProposition9,onecanapplytherandomizedSVDperturbationanalysiswheneverthesketchperturbationsareasymptoticallysmallerthanthetargetaccuracy.Thatis,ifELandEPLsatisfymax{EL,EPL}=Γ1/2εεδεLforsomeδ>0.ThetargetrandomizedSVDaccuracy,εL,andresultingabsoluteapproximationerror, ̃εL,arerelatedbythefollowingequation(seeProposition9): ̃εL=O(k1/2εLγ−1/2εLεL)=O(k1/2ε1Γ−1/2εεL),[29]wherekεL=Mlog(1/εL)d+1≤kε1andγ−1/2εL≤Γ−1/2ε.CombiningEqs.(28)and(29)yieldsεL=O(cid:18)√2εδ+4(6d−3d)Tr(K)1/2k3/2ε1Γ−1εεδεL−1(cid:19)=O(k3/2ε1Γ−1εε−δεL−1).[30]Therefore,afteriteratingEq.(30)over1≤l≤L,weobtainthefollowingestimateforthetargetrandomizedSVDaccuracyatlevelL:εL=O(k3(L−1)/2ε1Γ−(L−1)εε−(L−1)δε1).Moreover,theinitialrandomizedSVDtargetrankisboundedbykε1=Mlog(1/ε1)d+1=Mrd+1log(1/ε)d+1sinceε1=εrbydefinition.Finally,withachoiceofδ=1/(Nε−1),atthefinallevelNε∼log(1/ε)/(2log2),theabsoluteaccuracysatisfies ̃εNε=O(cid:0)εr−1k3Nε/2ε1Γ−Nεε(cid:1)=O(cid:16)εr−1−12log2[32log(kε1)+log(1/Γε)](cid:17).Then,weselectrsuchthat ̃εNε=O(ε/log(1/ε)),i.e.,r−1−34log2log(M)−34log2(d+1)log(r)−34log2(d+1)log(log(1/ε))−12log2log(1/Γε)≥1+log(log(1/ε))log(1/ε).[31]Wethenchooser=(d+2)log(log(1/ε))+log(1/Γε)sothatEq.(31)holdsforεsufficientlysmall,whichconcludestheproof.Proposition10estimatestherandomizedSVDtargetaccuracy,εL,ateachhierarchicallevelneededtorecovertheGreen'sfunctiontowithinε/log(1/ε)relativeerror.Onecanthenprovideanupperboundonthenumberofinput-outputpairsneededbyAlgorithm1toapproximatetheGreen'sfunctiononeachadmissibledomain.Corollary11(Numberofinput-outputpairs).AssumethattherandomizedSVDissuccessfuloneachadmissibleblockoftheGreen'sfunctionuptolevelNε.Then,thetotalnumberofinput-outputpairsrequiredtoapproximateeachoff-diagonalblockoftheGreen'sfunctiontowithinrelativeerrorε/log(1/ε)isboundedbyO(log(1/ε)d+2[log(log(1/ε))+log(1/Γε)]d+1)asε→0.Proof.FollowingProposition10,wechooseatargetrankandanoversamplingparameterfortherandomizedSVDboundedbykεL≤kε1=Mlog(1/ε1)d+1ateachhierarchicallevel.Moreover,foragivenlevel1≤L≤Nε,therandomizedSVDrequiresanumberofinput-outputpairsthatisboundedby4kεLχ(GL)≤4×6dkε1toapproximatetheGreen'sfunctiononallthelevel-Ladmissiblesubdomains(seeSection3B).Then,thetotalnumberofinput-outputpairsafterNε∼log(1/ε)/(2log2)hierarchicallevelsisboundedbyN≤4×6dNεkε1=O(rd+1log(1/ε)d+2)=O(log(1/ε)d+2[log(log(1/ε))+log(1/Γε)]d+1).D.Probabilisticerroranalysis.Theprevioussectionprovidedanupperboundonthenumberofinput-outputpairsrequiredbyAlgorithm1toconstructanapproximanttotheGreen'sfunction,conditionallyuponthesuccessoftherandomizedSVDateachhierarchicallevel.Inthissection,weprovidealowerboundontheprobabilityofsuccessofAlgorithm1.Webeginwiththefollowinglemma(see(13,Lem.4)foraproof),whichgivesaChernoff-typebound(72)fortheHS-normoftherandominputfunctions.ThiscontrolstheconstantCinProposition7toboundthenormofthesketcherrorduringpeeling.Lemma12(ChernoffboundforGaussianprocesses).LetΩX×Ybearandomquasimatrixwithl≥1i.i.d.columnsinL2(Y)forX×Y⊂Ω×Ω,witheachcolumnfollowingaGaussianprocessGP(0,KY),whereKYisdefinedinEq.(18).Foralls≥1,P(cid:8)∥ΩX×Y∥2HS≤ls2Tr(K)(cid:9)≥1−hse−(s2−1)/2il,whereTr(K)=Tr(KY)isthesumoftheeigenvaluesofthekernelK.WecanthenboundthenormoftherandomquasimatricesusedinthepeelingalgorithmofSection3CwithLemma12andestimatetheprobabilityoftheeventAΩdefinedinEq.(26).NicolasBoullé,DianaHalikiasandAlexTownsend13of22Proposition13(Globalupperboundoftheforcingterms).Let1≤L≤Nεbeahierarchicalleveland1≤j≤N(L)≤6d2dL,whereN(L)isthenumberofadmissibledomainsatlevelL.LetΩ(j)LbearandomquasimatrixusedatlevelLofthepeelingalgorithmwithi.i.d.columnsdefinedinSection3B.Then,P(AΩ)=PNε\L=1N(L)\j=1n∥Ω(j)L∥2HS≤8kε1Tr(K)o≥1−14e−log(1/ε)d.Proof.LetkL≤kεLbethetargetrankatlevelLsuchthatthequasimatrixΩ(j)LhaskL+kεLcolumns,wherekεL=Mlog(1/εL)d+1istheoversamplingparameter.ApplyingLemma12fors≥2yieldsPn∥Ω(j)L∥2HS≤(kL+kεL)s2Tr(K)o≥1−hse−(s2−1)/2ikL+kεL≥1−hse−(s2−1)/2ikε,askε≤kεLfor1≤L≤NεandTr(K)=Tr(KY).WedenotebyA(s)ΩtheeventA(s)Ω=Nε\L=1N(L)\j=1n∥Ω(j)L∥2HS≤(kL+kεL)s2Tr(K)o.WecancomputealowerboundforP(A(s)Ω)usingtheindependenceoftherandomsamplesfromtheGaussianprocessasP(A(s)Ω)=NεYL=1N(L)Yj=1Pn∥Ω(j)L∥2HS≤(kL+kεL)s2Tr(K)o≥(cid:18)1−hse−(s2−1)/2ikε(cid:19)6d2d(Nε+1)≥expn6d2d(Nε+1)log(cid:16)1−e−kε[(s2−1)/2−log(s)](cid:17)o,[32]wherekε[(s2−1)/2−log(s)]→∞asε→0since(s2−1)/2>log(s)fors≥2.Lets=2,kε=Mlog(1/ε)d+1,anddefinetheconstantC1=M[3/2−log(2)]>0suchthatlog(cid:0)1−e−kε[3/2−log(2)](cid:1)=log(cid:16)1−e−C1log(1/ε)d+1(cid:17)≥−2e−C1log(1/ε)d+1,[33]whereweusedtheinequalitylog(1−u)≥−u/(1−u)≥−2ufor|u|<1/2.Moreover,sinceNε∼log(1/ε)/(2log2)(seeEq.(7)),thereexistsaconstantC2>0suchthat6d2d(Nε+1)≤C2ε−2dforsufficientlysmallε.Therefore,combiningEqs.(32)and(33)yieldsP(A(2)Ω)≥expn−C2e−C1log(1/ε)d+1+2dlog(1/ε)o≥expn−14e−log(1/ε)do≥1−14e−log(1/ε)d,whereweusedthefactthatC2e−C1log(1/ε)d+1+2dlog(1/ε)≤e−log(1/ε)d/4forsufficientlysmallε,andtheinequalitye−u≥1−ufor|u|<1.Wethenobtainthefollowingbound,PNε\L=1N(L)\j=1n∥Ω(j)L∥2HS≤4(kL+kεL)Tr(K)o≥1−14e−log(1/ε)d.Finally,wenotethatbounding∥Ω(i)L∥2HSby4(kL+kεL)Tr(K)impliestheinequality∥Ω(i)L∥2HS≤8kε1Tr(K),becausekL≤kεL≤kε1,whichachievestheproof.ThenextlemmagivesalowerboundontheFrobeniusnormofamatrixwithi.i.d.columnssampledfromamultivariateGaussiandistribution.Lemma14(Chernofflowerbound).LetΩ1∈Rk×lbearandommatrixwithl≥k≥1,whereeachcolumnissampledfromamultivariateGaussiandistributionwithmeanzeroandcovariancematrixC∈Rk×k.Then,for0<c<1wehaveP(∥Ω1∥2HS≥cλk(C)l)≥1−(cid:2)e−log(c)+c−1(cid:3)−l/2,whereλk(C)isthesmallesteigenvalueofC.14of22NicolasBoullé,DianaHalikiasandAlexTownsendProof.LetZ=∥Ω1∥2HS=Tr(A),wherethescattermatrixA=Ω1Ω∗1followstheWishartdistributionWk(C,l)withscalematrixC∈Rk×k.WedenotetheeigenvaluesofCbyλ1(C)≥***≥λk(C).Following(73,Sec.3),themomentgeneratingfunctionofZisE[etZ]=det(I−2tC)−l/2.Letc>0andt<0,usingMarkov'sinequalitywehaveP(Z<cλk(C)l)=P(etZ/λk(C)>etcl)≤det(cid:18)I−2tλk(C)C(cid:19)−l/2e−tcl=e−l(cid:2)12logdet(cid:0)I−2tλk(C)C(cid:1)+tc(cid:3)≤e−l[k2log(1−2t)+tc],[34]wherethelastinequalitycomesfromthefollowingrelation:logdet(cid:18)I−2tλk(C)C(cid:19)=kXi=1log(cid:18)1−2tλi(C)λk(C)(cid:19)≥klog(1−2t).Wethenchooset=1−k/ctominimizetheright-handsideofEq.(34),whichyieldsP(Z<cλk(C)l)≤(cid:2)elog(k/c)+(c/k−1)(cid:3)−lk/2≤(cid:2)elog(c)+1−c(cid:3)l/2.WecannowestimatetheprobabilityofBΩinEq.(26)usingLemma14.Proposition15(Globallowerboundoftheforcingterms).Let1≤L≤Nεbeahierarchicalleveland1≤j≤N(L)≤6d2dL,whereN(L)isthenumberofadmissibledomainsatlevelL.LetΩ(j)LbearandomquasimatrixusedatlevelLofthepeelingalgorithmwithi.i.d.columnsdefinedinSection3BandΩ(j)L,1bethematrixcontainingtheinnerproductswithrightsingularvectorsofGrestrictedtothecorrespondingadmissibledomain(seeSection3A).Then,P(BΩ)=PNε\L=1N(L)\j=1n∥Ω(j)L,1∥2HS≥λ1εδΓεo≥1−14e−log(1/ε)d,whereδ=1/(Nε−1)(seeProposition10).Proof.Let1≤L≤Nε,1≤j≤N(L),andΩ(j)L,1∈RkL×(kL+kεL)betherandommatrixassociatedwiththequasimatrixΩ(j)L.Let0<c<1,followingLemma14,wehaveP(cid:16)∥Ω(j)L,1∥2HS≥cλ1Γε(cid:17)≥1−ekε[log(c)−c+1]/2,sinceλkL(C)(kL+kεL)≥λ1ΓεandkL+kεL≥kε.Therefore,choosingc=εδyieldsP(BΩ)=PNε\L=1N(L)\j=1n∥Ω(j)L,1∥2HS≥λ1εδΓεo≥(cid:16)1−ekε[−δlog(1/ε)−εδ+1]/2(cid:17)6d2d(Nε+1)≥expn6d2d(Nε+1)log(cid:16)1−ekε[−δlog(1/ε)−εδ+1]/2(cid:17)o≥expn−6d2d(Nε+1)+1ekε[−δlog(1/ε)−εδ+1]/2o,whereweusedtheinequalitylog(1−u)≥−2ufor|u|<1/2.LetC2>0beaconstantsuchthat6d2d(Nε+1)≤C2ε−2dforsufficientlysmallε.Then,P(BΩ)≥expn−2C2e2dlog(1/ε)−Mlog(1/ε)d+1(δlog(1/ε)+εδ−1)o≥expn−14e−log(1/ε)do≥1−14e−log(1/ε)d,whereweusedthefactthat2C2e2dlog(1/ε)−Mlog(1/ε)d+1(δlog(1/ε)+εδ−1)≤e−log(1/ε)d/4forsufficientlysmallε,andtheinequalitye−u≥1−ufor|u|<1.WecombineProposition13andtheprobabilityboundsfortheHilbert–SchmidtrandomizedSVD(cf.Section3A)toobtainaglobalprobabilityboundforthealgorithmthatusesthepeelingprocedurewiththerandomizedSVD.Proposition16(Probabilisticbound).Let0<ε<1besufficientlysmall.ThereisarandomizedalgorithmthatconstructsanapproximationtotheGreen'sfunctionusingN=O(log(1/ε)d+2[log(log(1/ε))+log(1/Γε)]d+1)input-outputpairs{(fj,uj)}Nj=1suchthat∥G− ̃G∥L2(X×Y)≤εlog(1/ε)∥G∥L2(Ω×Ω),[35]holdsonalladmissibledomainsX×YinthehierarchicalpartitionofGwithNεlevelswithprobability≥1−e−log(1/ε)d.NicolasBoullé,DianaHalikiasandAlexTownsend15of22Proof.WefirstnotethatEq.(35)holdsiftherandomizedSVDissuccessfulatalltheadmissibleblocksofthehierarchicalpartitionoftheGreen'sfunction.Therefore,ifEεdenotesthefollowingevent:Eε={∥G− ̃G∥L2(X×Y)≤εlog(1/ε)∥G∥L2(Ω×Ω),foralladmissibledomainsX×Y},thenwehaveP(Eε)≥P(∩NεL=1AL),whereAListheeventthatalltheapplicationsoftherandomizedSVDaresuccessfulfortheadmissibledomainsinthelevel1≤L≤Nεofthehierarchicalpartition.SincetheprobabilityofsuccessoftherandomizedSVDdependsonthenormoftherandominputvectorsduetothepeelingprocedure,weconditionontheeventAΩ∩BΩ,whereagainAΩandBΩaredefinedinEq.(26),toobtainP(Eε)≥P Nε\L=1AL|AΩ∩BΩ!P(AΩ∩BΩ).[36]ByPropositions13and15,wehavetheinequalitiesP(AΩ)≥1−e−log(1/ε)d/4andP(BΩ)≥1−e−log(1/ε)d/4.WethereforefocusonderivingalowerboundforP(∩NεL=1AL|AΩ∩BΩ).Let2≤L≤Nεbeahierarchicallevel.AsinSection3C,duetothepeelingprocedureandaccumulationoftheperturbationerrors,theprobabilityofsuccessoftherandomizedSVDboundgivenbyProposition9ontheadmissibleblocksatlevelLdependsonthesuccessoftherandomizedSVDsatallpreviouslevels1≤l≤L−1.IfpL=P(∩Ll=1Al|AΩ∩BΩ)denotestheprobabilityofsuccessoftherandomizedSVDateachleveluptoLgivenAΩ∩BΩ,wecanestimatepLusingconditionalprobabilityasfollows:pL=P L\l=1Al|AΩ∩BΩ!=P AL|L−1\l=1Al,AΩ∩BΩ!P L−1\l=1Al|AΩ∩BΩ!=P AL|L−1\l=1Al,AΩ∩BΩ!pL−1,[37]wherep1=P(A1|AΩ∩BΩ).WecannowusetheHSrandomizedSVDprobabilitybound(seeEq.(19))toderivealowerboundforpL.First,denotebyN(L)thenumberofadmissibledomainsatlevelL,andconsidertheeventBiLthattheapproximationofGobtainedbytherandomizedSVDontheithadmissibledomainX×YwithtargetaccuracyεL>0satisfiesEq.(19),i.e.,BiL=(cid:8)∥G− ̃G∥L2(X×Y)≤O(cid:0)k1/2εLΓ−1/2εεL(cid:1)∥G∥L2(Ω×Ω)(cid:9).ThisisanapplicationoftherandomizedSVDwithatargetrankofkL≤kεLandanoversamplingparameterofkεL≥kε,wherekε=Mlog(1/ε)d+1.Therefore,usingtheHSrandomizedSVDprobabilitybound(seeEq.(19)),wehaveP BiL|L−1\l=1Al,AΩ∩BΩ!≥1−e−kε.[38]Moreover,combiningEqs.(37)and(38),andusingBoole'sinequalityfortheunionofeventsyieldspL=PN(L)\i=1BiL|L−1\l=1Al,AΩ∩BΩpL−1=1−PN(L)[i=1 ̄BiL|L−1\l=1Al,AΩ∩BΩpL−1≥1−N(L)Xi=1P ̄BiL|L−1\l=1Al,AΩ∩BΩ!pL−1≥(1−N(L)e−kε)pL−1,[39]where ̄BiLdenotesthecomplementaryeventofBiLsuchthatP( ̄BiL|∩L−1l=1Al,AΩ∩BΩ)≤e−kε,andp1≥1−N(1)e−kεbyEq.(38).IteratingEq.(39)over1≤L≤Nεgivesthefollowingprobabilitybound:pNε≥NεYL=1(1−N(L)e−kε),[40]wherethenumberofadmissibledomainsatlevelLisboundedbyN(L)≤6d2dL.Therefore,wetakethelogarithmofEq.(40)todeterminealowerboundonlog(pNε),log(pNε)≥NεXL=1log(1−N(L)e−kε)=−NεXL=1∞Xi=1N(L)ie−ikεi≥−∞Xi=16die−ikεiNεXL=12idL=−∞Xi=16die−ikεi2id(Nε+1)−12id−1≥−∞Xi=16di2id(Nε+1)e−ikεi=log(1−6d2d(Nε+1)e−kε).[41]16of22NicolasBoullé,DianaHalikiasandAlexTownsendHere,weusedtheTaylorseriesoflog(1−u)for|u|<1.Moreover,forsufficientlysmallε,wehave6d2d(Nε+1)e−kε≤C1ε−de−Mlog(1/ε)d+1forsomeconstantC1>0.Finally,takingtheexponentialofEq.(41)gives,pNε≥1−C1ε−de−Mlog(1/ε)d+1=1−C1e−log(1/ε)[Mlog(1/ε)d−d]≥1−12e−log(1/ε)d,forεsufficientlysmall.WeconcludewithEq.(36)asP(Eε)≥pNεP(AΩ∩BΩ)≥(cid:16)1−12e−log(1/ε)d(cid:17)2≥1−e−log(1/ε)d,whereweusedP(AΩ∩BΩ)≥P(AΩ)+P(BΩ)−1.WenotethattheboundgivenbyEq.(35)ontheprobabilityoffailureofthealgorithmdecayssuper-algebraicallywithrespecttotheaccuracyεandisillustratedinFig.2ofthemaintext.E.Globalerrorinthespectralnorm.LetF:L2(Ω)→L2(Ω)betheHilbert–SchmidtintegraloperatorassociatedwiththeGreen'sfunctionoftheellipticoperatorLinthreedimensionssuchthatF(f)[x]=ZΩG(x,y)f(y)dy,f∈L2(Ω),x∈Ω.Previousworks(13,16)haveexpressedtheerrorbetweenthelearnedandexactGreen'sfunctionseitherintheL2-normorL1-normbyexploitingtheconnectionbetweentheHilbert–SchmidtnormoftheintegraloperatorFandtheL2-normoftheGreen'sfunction,since∥F∥HS=∥G∥L2(Ω×Ω).AsobservedinSection3C,thepeelingalgorithmemployedinthisworkintroducesaperturbationerroronthesketchoftheGreen'sfunctionthatdependsontheprevioushierarchicallevels.Inparticular,relativeerrorsonadmissibledomainsfromthepasthierarchicallevelsaddupduringtheprocedure.Hence,thealgorithmintroducedinSection2,whichisbasedonpeelingandtherandomizedSVD,onlyguaranteesarelativeerroroflog(1/ε)−1εoneachadmissibledomainX×Y⊂Ω×Ω,i.e.,∥G− ̃G∥L2(X×Y)≤log(1/ε)−1ε∥G∥L2(Ω×Ω).[42]However,sincethenumberofadmissibledomainsincreasesexponentiallywiththehierarchicallevelsNε,measuringtheerrorintheL2-normontheentiredomainwouldsignificantlydeterioratetheerrorbound,andthereforethenumberofinput-outputpairsrequiredtoapproximateGwithinε.Tocircumventthisissue,weexploitthepropertiesoftheoperatornormofHilbert–Schmidtoperators.Inthissection,weprovethefollowingproposition,whichprovidesanerrorboundexpressedintheoperatornormfortheGreen'sfunctionapproximatedbyAlgorithm1.Theproofisdeferredtotheendofthesection.Proposition17(ApproximationerrorintheHSoperatornorm).LetF:L2(Ω)→L2(Ω)betheHilbert–SchmidtoperatorassociatedwiththeGreen'sfunctionGoftheellipticoperatorLinthreedimensions.Let ̃G:Ω×Ω→RbethekernelconstructedbyAlgorithm1and ̃FitsassociatedHilbert–Schmidtintegraloperator,definedas ̃F(f)[x]=ZΩ ̃G(x,y)f(y)dy,f∈L2(Ω),x∈Ω.Then,∥F− ̃F∥2≤ε∥F∥HS.WeremarkthatProposition17impliesthatthefollowingequationholdsforanyf∈L2(Ω):(cid:13)(cid:13)(cid:13)(cid:13)ZΩ(G− ̃G)f(y)dy(cid:13)(cid:13)(cid:13)(cid:13)L2(Ω)≤ε∥G∥L2(Ω×Ω)∥f∥L2(Ω).Therefore,obtainingarelativeerrorintheoperatornormbetweentheexactandlearnedGreen'sfunctionsguaranteesthattherangeoftheHilbert–SchmidtoperatorF,i.e.,thesolutionoperatorassociatedwiththepartialdifferentialoperatorL,iswellapproximated.Additionally,expressingtheerrorintheoperatornormalignswiththemethodologyemployedbycurrentmachinelearningtechniquesforlearningsolutionoperatorsassociatedwithPDEs,suchasDeepONets(7,8)andneuraloperators(5,10).Inparticular,theymeasuretheapproximationerrorofthesolutionoperatoronasetoftestingpairs.Thisisequivalenttoestimatingtheerrorinthespectralnormonthefinitedimensionalsubspacespannedbythefj.Weemphasizethatmeasuringtheapproximationerrorinthespectralnormisrelevanttothesetupofstate-of-the-artdeeplearningtechniques.WebeginbyrecallingapropertyforthemaximumsingularvalueofanHSoperator(analogoustoblockdiagonalmatrices).Lemma18(OperatornormofblockdiagonalHSoperators).LetG1,G2:Ω×Ω→RbetwokernelssuchthatSupp(G1)⊂D1×D2andSupp(G2)⊂D3×D4,whereD1∩D3=∅andD2∩D4=∅.LetF,F1,andF2betheHilbert–SchmidtintegraloperatorsassociatedwiththekernelsG1+G2,G1,andG2,respectively.Then,∥F∥2=max{∥F1∥2,∥F2∥2}.NicolasBoullé,DianaHalikiasandAlexTownsend17of22Proof.Westarttheproofbyshowingthatthefirstinequality∥F∥2≥max{∥F1∥2,∥F2∥2}holds:∥F∥2=sup∥f∥L2(Ω)=1∥F(f)∥L2(Ω)≥sup∥f∥L2(Ω)=1,Supp(f)⊂D2∥F(f)∥L2(Ω)=sup∥f∥L2(D2)=1∥F1(f)∥L2(D1)=∥F1∥2,whereweidentifiedtheoperatorF1withtheoperatordefinedonD1×D2,sinceSupp(G1)⊂D1×D2.ThesameargumentappliestoF2sothat∥F∥2≥max{∥F1∥2,∥F2∥2}.Fortheotherinequality,letf∈L2(Ω)suchthat∥f∥L2(Ω)=1,anddefinef1=f|D2andf2=f|D4astherestrictionsofftothedomainsD2andD4,respectively.Then,∥f1∥2L2(D2)+∥f2∥2L2(D4)=ZD2|f1(x)|2dx+ZD4|f2(x)|2dx≤ZΩ|f(x)|2dx=∥f∥2L2(Ω)=1.Therefore,wehave∥F(f)∥2L2(Ω)=(cid:13)(cid:13)(cid:13)(cid:13)ZΩ(G1+G2)(*,y)f(y)dy(cid:13)(cid:13)(cid:13)(cid:13)2L2(Ω)=(cid:13)(cid:13)(cid:13)(cid:13)ZD2G1(*,y)f1(y)dy+ZD4G2(*,y)f2(y)dy(cid:13)(cid:13)(cid:13)(cid:13)2L2(Ω)=(cid:13)(cid:13)(cid:13)(cid:13)ZD2G1(*,y)f1(y)dy(cid:13)(cid:13)(cid:13)(cid:13)2L2(D1)+(cid:13)(cid:13)(cid:13)(cid:13)ZD4G2(*,y)f2(y)dy(cid:13)(cid:13)(cid:13)(cid:13)2L2(D3)=∥F1(f1)∥2L2(D1)+∥F2(f2)∥2L2(D3)≤∥F1∥22∥f1∥2L2(D2)+∥F2∥22∥f2∥2L2(D4).Takingthesupremumofbothsidesoverallpossiblef∈L2(Ω)yieldsthesecondinequalityas∥F∥22≤max{∥F1∥22,∥F2∥22}(∥f1∥2L2(D2)+∥f2∥2L2(D4))≤max{∥F1∥22,∥F2∥22}.Lemma18immediatelygeneralizestoanarbitrarysumofHilbert–Schmidtintegraloperatorswithdisjointkernelsupports.Corollary19(SpectralnormofsumsofHSoperators).Letn≥1andG1,...,Gn:Ω×Ω→RbenkernelssuchthatSupp(G1)⊂C1×D1,...,Supp(G1)⊂Cn×Dn,whereDi∩Dj=∅andCi∩Cj=∅for1≤i̸=j≤n.LetF:L2(Ω)→L2(Ω)betheHilbert–SchmidtintegraloperatorassociatedwiththekernelPni=1Gi,andFibetheHilbert–SchmidtintegraloperatorassociatedwiththekernelGifor1≤i≤n.Then,∥F∥2=max1≤i≤n∥Fi∥2.Proof.TheprooffollowsdirectlyfromLemma18byinduction.Inparticular,weconsidertheHSintegraloperatorsassociatedwiththetwokernelsH1=Pn−1i=1GiandH2=GnandapplyLemma18.WearenowreadytoproveProposition17.ProofofProposition17.Let ̃G:Ω×Ω→RbethekernelconstructedbyAlgorithm1suchthattheerrorwiththeGreen'sfunctionGsatisfies∥G− ̃G∥L2(X×Y)=(cid:26)log(1/ε)−1ε∥G∥L2(Ω×Ω),ifX×Yisanadmissibledomain,ε∥G∥L2(Ω×Ω),otherwise.WeapplyCorollary19tocomputeanupperboundontheoperatornormoftheHSoperatorassociatedwiththekernelG− ̃G.Theprocedureconsistsofdecomposingthekernelintoasumofkernelsoverthenumberofhierarchicallevelsandcoloredadmissibledomains(seeSection2D),suchthateachelementinthesumisablockdiagonalkernelwhosenormcanbeestimatedbyCorollary19.Asanillustration,weassumeforsimplicitythatthekernelH=G− ̃GiswrittenintheweaklyadmissiblehierarchicalformwithL=2levelsasH=H11H12H⊤12H14H2H41H42H⊤2H⊤42H44,wherethegreenblockshaveHS-normboundedbylog(1/ε)−1ε∥G∥HSwhiletheredblockshaveHS-normboundedbyε∥G∥HS.ThenwecanestimatetheoperatornormoftheassociatedHilbert–SchmidtoperatorbydecomposingHasH=0000H200H⊤200+0H12H⊤12000H420H⊤420+H1100H140H41000H44.18of22NicolasBoullé,DianaHalikiasandAlexTownsendHence,thenormoftheindividualcomponentsinthesumareboundedbythenormofeachblockfollowingCorollary19,andthenormoftheHSoperatorassociatedwithHisthemaximumofthenormsofthecomponents.Therefore,inthissimpleexample,wehave∥H∥2≤∥H2∥2+max{∥H12∥2,∥H42∥2}+max{∥H11∥2,∥H14∥2,∥H41∥2,∥H44∥2}.InthestronglyadmissiblecasewithNε∼log(1/ε)/(2log2)levels,wedecomposetheoperatorH:=F− ̃FasH=Hdiag+NεXL=1χ(GL)Xj=1njXi=1H|Xj,(L)i×Yj,(L)i,whereHdiagdenotethenon-admissiblepartoftheoperatorHandXj,(L)i×Yj,(L)iisanadmissibledomainatlevelLcoloredby1≤j≤χ(GL).Byconstruction,forafixed1≤L≤Nεand1≤j≤χ(GL),therestrictionsofthekernelofHtothedomains{Xj,(L)i×Yj,(L)i}1≤i≤njhavedisjointsupport.Hence,applyingCorollary19andusingthepropertythattheoperatornormisboundedbytheHS-normyield,∥H∥2≤∥Hdiag∥2+NεXL=1χ(GL)Xj=1max1≤i≤nj{∥H|Xj,(L)i×Yj,(L)i∥2}≤6dε∥F∥HS+6dε∥F∥HS≤2×6dε∥F∥HS.Here,weusedthefactthatNε≤log(1/ε)forsufficientlysmallε,andχ(GL)≤6d.Finally,withoutlossofgenerality,wecanrescalethetargetaccuracyεinAlgorithm1to ̃ε:=ε/(2×6d)byincreasingthenumberofinput-outputpairsbyaconstantfactor,whichconcludestheproof.MethodsInthissection,wedescribethedeeplearningexperimentsusedtogenerateFig.1ofthemaintext.Wecomparetheperformanceofthreeneuralnetworkarchitectures,namelyDeepONet(DON)(7),FourierNeuralOperator(FNO)(5),andGreen'sfunctionlearning(GreenLearning)(6),atapproximatingthesolutionoperatorassociatedwiththetwo-dimensionalPoissonequationdefinedonthedomainΩ=[0,1]2withhomogeneousDirichletboundaryconditions:−∇2u=f,u|∂Ω=0.[43]Thesemethodslearnanapproximant ̃FtothesolutionoperatorFassociatedwithEq.(43),representedbyaneuralnetwork(NN).OurmainmotivationistostudythebehaviorofthesePDElearningtechniquesasthenumberoftrainingdatavaries.Hence,wewanttounderstandwhyspecificneuralnetworkapproachesaredata-efficientandothersarenot.Wereproducethesetupof(74)thatperformsafaircomparisonbetweenFNOandDONandprovidedetailsoftheexperimentsbelow.ThecodeispubliclyavailableonGitHubathttps://github.com/NBoulle/pde-learning.Neuralnetworksarchitecture.TheFNOarchitectureisasuccessionof4Fourierlayers,whichperformconvolutionsintheFourierspaceusingthefastFouriertransform(FFT),withtheReLUactivationfunctions.TheDONemployedinthisworkhasamuchlargernumberoftrainableparametersandconsistsofaproductofa"branchnetwork",whichisaconvolutionNNwithtwo2Dconvolutionlayers,anda"trunknetwork",whichisastandardfullyconnectedNNwith4hiddenlayersand128neuronsperlayer.GreenLearningenforcespriorknowledgeofthesolutionoperatorassociatedwithEq.(43)byapproximatingdirectlytheassociatedGreen'sfunction.SolutionstoEq.(43)arepredictedbyintegratingtheNNrepresentationoftheGreen'sfunctionagainsttheforcingtermsusingatrapezoidalrule.Weemployarationalneuralnetwork(75)with4hiddenlayersand50neuronsperlayer.RationalNNsoffertheoreticalandpracticaladvantagesoverReLUNNs,astheycancapturethesingularitiesofGreen'sfunctionlocatedalongthediagonal(6,75).DONisimplementedinTensorFlow(76)usingtheDeepXDElibrary(77),whileFNOandGreenLearningareimplementedinPyTorch(78).ThedeeplearningexperimentswereperformedonaworkstationwithaGPU(NVIDIAGeForceRTX3080Ti).Trainingandtestingdatasets.Wetrainthethreeneuralnetworksonpairsoftrainingdata{(fj,uj)}Nj=1,wherewevaryNbetween2and1000.InFig.1ofthemaintext,wereporttheresultingapproximationerror∥F− ̃F∥2forN≤200tovisualizetheexponentialconvergenceratebeforetheplateauduetodiscretizationerrors.Here,∥F− ̃F∥2isapproximatedbythemeanrelativeerroronthetestingdataset,whichconsistsofNtest=200pairsofinput-outputdata{(f(test)j,u(test)j)}Ntestj=1,as∥F− ̃F∥2≈1NtestNtestXj=1∥u(test)j− ̃F(f(test)j)∥L2([0,1]2)∥u(test)j∥L2([0,1]2).Forconsistency,wetrainthedifferentnetworkstentimesandreportthemeanandstandarddeviationofthetestingerrorsinFig.1.Following(5,74),theforcingtermsaresampledfromtheGaussianprocessGP(0,(−∆+9I)−2)withzeroNeumannboundaryconditionsontheLaplacian.Inparticular,wesample1200forcingtermsfromtheGaussianprocessandobtaintheassociatedsolutionsbysolvingnumericallythePoissonequation.Then,weperformatraining/testingsplitof1000/200.Whenwevarythesizeofthetrainingdataset,werandomlyselectaportionofthe1000trainingpairstotrainthemodelsandevaluatethemonthe200testingpairstoavoidtrain/testcontamination.Eq.(43)issolvedona421×421uniformgrid,whichisthendownsampledtoa29×29gridwhentrainingandtestingtheNNs.NicolasBoullé,DianaHalikiasandAlexTownsend19of22References1.WHackbusch,Ellipticdifferentialequations:theoryandnumericaltreatment.(Springer),2ndedition,(2017).2.MGrüter,KOWidman,TheGreenfunctionforuniformlyellipticequations.ManuscriptaMath.37,303–342(1982).3.THsing,REubank,Theoreticalfoundationsoffunctionaldataanalysis,withanintroductiontolinearoperators.(JohnWiley&Sons),(2015).4.GEKarniadakis,etal.,Physics-informedmachinelearning.Nat.Rev.Phys.3,422–440(2021).5.ZLi,etal.,FourierNeuralOperatorforParametricPartialDifferentialEquationsinICLR.(2021).6.NBoullé,CJEarls,ATownsend,Data-drivendiscoveryofGreen'sfunctionswithhuman-understandabledeeplearning.Sci.Rep.12,1–9(2022).7.LLu,PJin,GPang,ZZhang,GEKarniadakis,LearningnonlinearoperatorsviaDeepONetbasedontheuniversalapproximationtheoremofoperators.Nat.Mach.Intell.3,218–229(2021).8.SWang,HWang,PPerdikaris,Learningthesolutionoperatorofparametricpartialdifferentialequationswithphysics-informedDeepONets.Sci.Adv.7,eabi8605(2021).9.CRGin,DEShea,SLBrunton,JNKutz,DeepGreen:DeeplearningofGreen'sfunctionsfornonlinearboundaryvalueproblems.Sci.Rep.11,1–14(2021).10.NKovachki,etal.,Neuraloperator:LearningmapsbetweenfunctionspaceswithapplicationstoPDEs.J.Mach.Learn.Res.24,1–97(2023).11.ZLi,etal.,Neuraloperator:Graphkernelnetworkforpartialdifferentialequations.arXivpreprintarXiv:2003.03485(2020).12.SLanthaler,SMishra,GEKarniadakis,Errorestimatesfordeeponets:Adeeplearningframeworkininfinitedimensions.Trans.Math.Appl.6,tnac001(2022).13.NBoullé,ATownsend,Learningellipticpartialdifferentialequationswithrandomizedlinearalgebra.Found.Comput.Math.pp.1–31(2022).14.MVdeHoop,NBKovachki,NHNelsen,AMStuart,Convergenceratesforlearninglinearoperatorsfromnoisydata.SIAM-ASAJ.Uncertain.Quantif.11,480–513(2023).15.KChen,CWang,HYang,DeepOperatorLearningLessenstheCurseofDimensionalityforPDEs.arXivpreprintarXiv:2301.12227(2023).16.NBoullé,SKim,TShi,ATownsend,LearningGreen'sfunctionsassociatedwithtime-dependentpartialdifferentialequations.J.Mach.Learn.Res.23,1–34(2022).17.MBebendorf,WHackbusch,ExistenceofH-matrixapproximantstotheinverseFE-matrixofellipticoperatorswithL∞-coefficients.Numer.Math.95,1–28(2003).18.FSchäfer,HOwhadi,Sparserecoveryofellipticsolversfrommatrix-vectorproducts.arXivpreprintarXiv:2110.05351(2021).19.FSchäfer,TJSullivan,HOwhadi,Compression,inversion,andapproximatePCAofdensekernelmatricesatnear-linearcomputationalcomplexity.MultiscaleModel.Simul.19,688–730(2021).20.LLin,JLu,LYing,Fastconstructionofhierarchicalmatrixrepresentationfrommatrix-vectormultiplication.J.Comput.Phys.230,4071–4087(2011).21.PGMartinsson,Afastrandomizedalgorithmforcomputingahierarchicallysemiseparablerepresentationofamatrix.SIAMJ.Mat.Anal.Appl.32,1251–1274(2011).22.JLevitt,PGMartinsson,Linear-complexityblack-boxrandomizedcompressionofhierarchicallyblockseparablematrices.arXivpreprintarXiv:2205.02990(2022).23.JLevitt,PGMartinsson,Randomizedcompressionofrank-structuredmatricesacceleratedwithgraphcoloring.arXivpreprintarXiv:2205.03406(2022).24.LGrasedyck,WHackbusch,ConstructionandarithmeticsofH-matrices.Computing70,295–334(2003).25.MBebendorf,Hierarchicalmatrices.(Springer),(2008).26.WHackbusch,Hierarchicalmatrices:algorithmsandanalysis.(Springer),(2015).27.CEckart,GYoung,Theapproximationofonematrixbyanotheroflowerrank.Psychometrika1,211–218(1936).28.LMirsky,Symmetricgaugefunctionsandunitarilyinvariantnorms.Q.J.Math.11,50–59(1960).29.GDolzmann,SMüller,EstimatesforGreen'smatricesofellipticsystemsbyLptheory.ManuscriptaMath.88,261–273(1995).30.MBebendorf,EfficientinversionoftheGalerkinmatrixofgeneralsecond-orderellipticoperatorswithnonsmoothcoefficients.Math.Comput.74,1179–1199(2005).31.SBörm,LGrasedyck,WHackbusch,Introductiontohierarchicalmatriceswithapplications.Eng.Anal.Bound.Elem.27,405–422(2003).32.WHackbusch,AsparsematrixarithmeticbasedonH-matrices.PartI:IntroductiontoH-matrices.Computing62,89–108(1999).33.WHackbusch,BKhoromskij,SASauter,OnH2-MatricesinLecturesonAppliedMathematics.(SpringerBerlinHeidelberg),pp.9–29(2000).34.PGMartinsson,JATropp,Randomizednumericallinearalgebra:Foundationsandalgorithms.ActaNumer.29,403–572(2020).35.NAilon,BChazelle,ThefastJohnson–Lindenstrausstransformandapproximatenearestneighbors.SIAMJ.Comput.20of22NicolasBoullé,DianaHalikiasandAlexTownsend39,302–322(2009).36.KLClarkson,DPWoodruff,Low-rankapproximationandregressionininputsparsitytime.J.ACM63,1–45(2017).37.XMeng,MWMahoney,Low-distortionsubspaceembeddingsininput-sparsitytimeandapplicationstorobustlinearregressioninProc.STOC.(ACM),pp.91–100(2013).38.JNelson,HLNguyên,OSNAP:FasternumericallinearalgebraalgorithmsviasparsersubspaceembeddingsinProc.FOCS.(IEEE),pp.117–126(2013).39.YUrano,Master'sthesis(NewYorkUniversity)(2013).40.NAilon,BChazelle,ApproximatenearestneighborsandthefastJohnson-LindenstrausstransforminProc.STOC.(ACM),pp.557–563(2006).41.DSParker,RandomButterflyTransformationswithApplicationsinComputationalLinearAlgebra,(UCLA),TechnicalReportCSD-950023(1995).42.FWoolfe,ELiberty,VRokhlin,MTygert,Afastrandomizedalgorithmfortheapproximationofmatrices.Appl.Comput.Harmon.Anal.25,335–366(2008).43.NHalko,PGMartinsson,JATropp,Findingstructurewithrandomness:Probabilisticalgorithmsforconstructingapproximatematrixdecompositions.SIAMRev.53,217–288(2011).44.NBoullé,ATownsend,AgeneralizationoftherandomizedsingularvaluedecompositioninICLR.(2022).45.MLopes,NBErichson,MMahoney,ErrorestimationforsketchedSVDviathebootstrapinICML.pp.6382–6392(2020).46.VRokhlin,ASzlam,MTygert,Arandomizedalgorithmforprincipalcomponentanalysis.SIAMJ.Mat.Anal.Appl.31,1100–1124(2010).47.AKSaibaba,Randomizedsubspaceiteration:Analysisofcanonicalanglesandunitarilyinvariantnorms.SIAMJ.Mat.Anal.Appl.40,23–48(2019).48.VBLidskii,Onthepropervaluesofasumandproductofsymmetricmatrices.Akad.NaukSSSR75,769–772(1950).49.HWeyl,Dasasymptotischeverteilungsgesetzdereigenwertelinearerpartiellerdifferentialgleichungen(miteineranwendungaufdietheoriederhohlraumstrahlung).Math.Ann.71,441–479(1912).50.CDavis,WMKahan,Therotationofeigenvectorsbyaperturbation.III.SIAMJ.Numer.Anal.7,1–46(1970).51.PÅWedin,Perturbationboundsinconnectionwithsingularvaluedecomposition.BITNumer.Math.12,99–111(1972).52.YYu,TWang,RJSamworth,AusefulvariantoftheDavis–Kahantheoremforstatisticians.Biometrika102,315–323(2015).53.RAhlswede,AWinter,Strongconverseforidentificationviaquantumchannels.IEEETrans.Inf.Theory48,569–579(2002).54.ROliveira,SumsofrandomHermitianmatricesandaninequalitybyRudelson.Electron.Commun.Probab.15,203–212(2010).55.MRudelson,Randomvectorsintheisotropicposition.J.Funct.Anal.164,60–72(1999).56.JATropp,User-friendlytailboundsforsumsofrandommatrices.Found.Comput.Math.12,389–434(2012).57.TTCai,AZhang,Rate-optimalperturbationboundsforsingularsubspaceswithapplicationstohigh-dimensionalstatistics.Ann.Stat.46,60–89(2018).58.EAbbe,JFan,KWang,YZhong,Entrywiseeigenvectoranalysisofrandommatriceswithlowexpectedrank.Ann.Stat.48,1452(2020).59.JCape,MTang,CEPriebe,Signal-plus-noisematrixmodels:eigenvectordeviationsandfluctuations.Biometrika106,243–250(2019).60.JCape,MTang,CEPriebe,Thetwo-to-infinitynormandsingularsubspacegeometrywithapplicationstohigh-dimensionalstatistics.Ann.Stat.47,2405–2439(2019).61.JEldridge,MBelkin,YWang,Unperturbed:spectralanalysisbeyondDavis-KahaninAlgorithmicLearningTheory.(PMLR),pp.321–358(2018).62.JFan,WWang,YZhong,Anl∞eigenvectorperturbationboundanditsapplicationtorobustcovarianceestimation.J.Mach.Learn.Res.18,1–42(2018).63.LLei,Unifiedl2→∞EigenspacePerturbationTheoryforSymmetricRandomMatrices.arXivpreprintarXiv:1909.04798(2019).64.YZhang,MTang,PerturbationAnalysisofRandomizedSVDanditsApplicationstoHigh-dimensionalStatistics.arXivpreprintarXiv:2203.10262(2022).65.YMChen,XSChen,WLi,Onperturbationboundsfororthogonalprojections.Numer.Algorithms73,433–444(2016).66.GStewart,JGSun,MatrixPerturbationTheory.(Elsevier),(1990).67.JGSun,Thestabilityoforthogonalprojections.J.GraduateSch.(inChinese)1,123–133(1984).68.GWStewart,Ontheperturbationofpseudo-inverses,projectionsandlinearleastsquaresproblems.SIAMRev.19,634–662(1977).69.PGMartinsson,Compressingrank-structuredmatricesviarandomizedsampling.SIAMJ.Sci.Comput.38,A1959–A1986(2016).70.JMercer,Functionsofpositiveandnegativetype,andtheirconnectionthetheoryofintegralequations.Proc.R.Soc.A209,415–446(1909).71.ATownsend,LNTrefethen,Continuousanaloguesofmatrixfactorizations.Proc.R.Soc.A471,20140585(2015).72.HChernoff,Ameasureofasymptoticefficiencyfortestsofahypothesisbasedonthesumofobservations.Ann.Math.NicolasBoullé,DianaHalikiasandAlexTownsend21of22Stat.pp.493–507(1952).73.RJMuirhead,Aspectsofmultivariatestatisticaltheory.(JohnWiley&Sons),(2009).74.LLu,etal.,Acomprehensiveandfaircomparisonoftwoneuraloperators(withpracticalextensions)basedonfairdata.Comput.MethodsAppl.Mech.Eng.393,114778(2022).75.NBoullé,YNakatsukasa,ATownsend,RationalneuralnetworksinNeurIPS.Vol.33,pp.14243–14253(2020).76.MAbadi,etal.,TensorFlow:Large-scalemachinelearningonheterogeneoussystems(2015)Softwareavailablefromtensorflow.org.77.LLu,XMeng,ZMao,GEKarniadakis,DeepXDE:Adeeplearninglibraryforsolvingdifferentialequations.SIAMRev.63,208–228(2021).78.APaszke,etal.,AutomaticdifferentiationinPyTorchinProc.NIPSWorkshops.(2017).22of22NicolasBoullé,DianaHalikiasandAlexTownsend |
http://arxiv.org/abs/2302.12881v1 | 2023-02-24T20:31:48 | 2023-02-24T20:31:48 | Denoising diffusion algorithm for inverse design of microstructures with
fine-tuned nonlinear material properties | In this paper, we introduce a denoising diffusion algorithm to discover
microstructures with nonlinear fine-tuned properties. Denoising diffusion
probabilistic models are generative models that use diffusion-based dynamics to
gradually denoise images and generate realistic synthetic samples. By learning
the reverse of a Markov diffusion process, we design an artificial intelligence
to efficiently manipulate the topology of microstructures to generate a massive
number of prototypes that exhibit constitutive responses sufficiently close to
designated nonlinear constitutive responses. To identify the subset of
microstructures with sufficiently precise fine-tuned properties, a
convolutional neural network surrogate is trained to replace high-fidelity
finite element simulations to filter out prototypes outside the admissible
range. The results of this study indicate that the denoising diffusion process
is capable of creating microstructures of fine-tuned nonlinear material
properties within the latent space of the training data. More importantly, the
resulting algorithm can be easily extended to incorporate additional
topological and geometric modifications by introducing high-dimensional
structures embedded in the latent space. The algorithm is tested on the
open-source mechanical MNIST data set. Consequently, this algorithm is not only
capable of performing inverse design of nonlinear effective media but also
learns the nonlinear structure-property map to quantitatively understand the
multiscale interplay among the geometry and topology and their effective
macroscopic properties. | [
"Nikolaos N. Vlassis",
"WaiChing Sun"
] | 10.1016/j.cma.2023.116126 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1016/j.cma.2023.116126",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12881v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12881v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | 3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
1
8
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Denoising diffusion algorithm for inverse design of
microstructures with fine-tuned nonlinear material
properties
Nikolaos N. Vlassis*
WaiChing Sun * †
February 28, 2023
Abstract
In this paper, we introduce a denoising diffusion algorithm to discover microstructures with
nonlinear fine-tuned properties. Denoising diffusion probabilistic models are generative models
that use diffusion-based dynamics to gradually denoise images and generate realistic synthetic sam-
ples. By learning the reverse of a Markov diffusion process, we design an artificial intelligence to
efficiently manipulate the topology of microstructures to generate a massive number of prototypes
that exhibit constitutive responses sufficiently close to designated nonlinear constitutive responses.
To identify the subset of microstructures with sufficiently precise fine-tuned properties, a convolu-
tion neural network surrogate is trained to replace high-fidelity finite element simulations to filter
out prototypes outside the admissible range. The results of this study indicate that the denoising
diffusion process is capable of creating microstructures of fine-tuned nonlinear material properties
within the latent space of the training data. More importantly, the resulting algorithm can be easily
extended to incorporate additional topological and geometric modifications by introducing high-
dimensional structures embedded in the latent space. The algorithm is tested on the open-source
mechanical MNIST data set (Lejeune, 2020). Consequently, this algorithm is not only capable of per-
forming inverse design of nonlinear effective media but also learns the nonlinear structure-property
map to quantitatively understand the multiscale interplay among the geometry and topology and
their effective macroscopic properties.
1 Introduction
Effective constitutive behaviors of manufactured and natural materials are governed by the material
properties of the constituents, as well as the topology and geometry of microstructures (Sigmund and
Maute, 2013; Kumar et al., 2020; Wegst et al., 2015). Understanding this interplay between microstruc-
tures and macroscopic constitutive behaviors is crucial for optimizing microstructures to achieve de-
sirable properties for a wide variety of engineering purposes across length scales. Conventionally,
designing a microstructure with a designated set of material responses often requires one to solve
optimization problems in the spatial domain where a level set or a phase field are used as indica-
tor functions for the different constituents. This setup often leads to a multi-objective non-convex
optimization problem which is non-trivial to solve or to locate the global optimal point. This diffi-
culty motivates the use of machine learning techniques to either embed the design space onto a lower
dimensional latent space or reduce the number of costly high-resolution simulations via surrogates
(Chi et al., 2021; Zhang et al., 2021; Senhora et al., 2022). On the other hand, Woldseth et al. (2022)
*Department of Civil Engineering and Engineering Mechanics, Columbia University, New York, NY 10027, Email:
[email protected]
†Corresponding author, Email: [email protected]
1
argue that generative methods such as generative adversarial networks (GAN) and variational au-
toencoders (VAE) could face challenges for small perturbations of noise, especially when these small
changes may lead to profound difference in the optimized structures.
In this work, we introduce a fundamentally different approach in which the design of the mi-
crostructures is neither completed by solving a constrained optimization neither in the physical nor
the latent space. Instead, the inverse design of a microstructure is completed through a reverse dif-
fusion process learned by a denoising diffusion probabilistic model (DDPM) in which we utilize em-
bedded feature vectors of the target attributes to guide the diffusion generative process. Compared
to the generative adversarial networks, the gradual denoising diffusion process makes the training
more stable and the performance more scalable with increasing data size (Nichol and Dhariwal, 2021).
DDPMs also does not suffer from the unstable training commonly found in the adversarial training of
GAN. While these salient features could potentially be important for material design, the possibility
of using the diffusion process to design microstructures has not been explored, according to the best
knowledge of the authors. To fill this knowledge gap, we introduce context feature vectors to control
both mechanical behaviors and topological features of the microstructures, allowing for the targeted
inverse design of microstructures with desired nonlinear material properties properties. The rela-
tively stable trajectory of the denoising process enables us to generate a large number of microstruc-
ture prototypes with desired macroscopic hyperelastic responses and topology characteristics such
that the optimal microstructures can be searched by ranking the performance of the prototypes. To
filter out the prototypes outside the desired property range, we develop a convolutional neural net-
work surrogate that predicts the macroscopic hyperelastic energy functional behavior to efficiently
rank the generated structures without the need of running full-scale finite element simulations.
To reduce the dimensions of the design space and to enable third-party validation, we use an
open source mechanical MNIST data set provided in Lejeune (2020) as our training data set. We
then demonstrate the capacity of the proposed approach to accurately generate microstructures with
similar energy responses to those present in the dataset. Finally, we explore the algorithm's ability
to generate microstructure twins for both the energy response and topology features. Even when
given the topology features outside of the training dataset, the DDPM model is capable of designing
microstructures that exhibit the target macroscopic elastic responses.
1.1 Past literature on generative methods
In the recent years, there have been significant advances in algorithms generating synthetic data
samples in a wide range of applications, from generating realistic images and videos to creating syn-
thetic voices and music. The most popular include variational autoencoders (Kingma and Welling,
2013; Vahdat and Kautz, 2020) – learning to represent input data in a lower-dimensional latent space
as probabilistic distribution and sampling from it to generate new samples, autoregressive models
(Kalchbrenner et al., 2017; Menick and Kalchbrenner, 2018; Razavi et al., 2019) – learning to generate
new data samples by sequentially predicting each element of the sample conditioned on the previ-
ously generated elements, and generative adverserial networks (Courville and Bengio, 2014; Karras
et al., 2017; Brock et al., 2018) – a generator model learns to generate samples while a discrimina-
tor model decides if they are realistic. Recently, there has been a great influx of denoising diffusion
probabilistic models (Sohl-Dickstein et al., 2015; Song and Ermon, 2020; Ho et al., 2020; Nichol and
Dhariwal, 2021; Ramesh et al., 2022; Rombach et al., 2022) – learning the reverse of a diffusion process
modeled as a Markov chain to iteratively denoise a data structure and generate new samples, that are
replacing many of these models in state of the art.
Several works from the literature have utilized artificial intelligence methods to guide microstruc-
ture generation, including the use of variational autoencoders and Gaussian process regression, gen-
erative adversarial networks, and reinforcement learning. (Wang et al., 2020a) utilize a variational
autoencoder and a regressor for property prediction that provide a distance metric to measure shape
similarity, enable interpolation between microstructures and encode patterns of variation in geome-
(Kim et al., 2021) design a variational autoencoder to generate a continuous
tries and properties.
2
microstructure space, explore structure-property relationships and predict mechanical properties of
dual-phase steels with high accuracy using Gaussian process regression. Many have favored the use
of GANs as the discriminator network component of the architecture is readily available to condition
the generator component's predictions to be physical and have targeted properties. (Chun et al., 2020)
use GANs to generate ensembles of synthetic microstructures of heterogeneous energetic materials,
which can be used to quantify hot spot ignition and growth and to engineer energetic materials for
targeted performance. (Kench and Cooper, 2021) can synthesize high fidelity 3D datasets using a
single representative 2D image, and generated samples of arbitrarily large volumes. (Nguyen et al.,
2022) combine GANs and actor-critic reinforcement learning to synthesize realistic three-dimensional
microstructures with controlled structural properties, enabling the generation of microstructures that
resemble the appearances of real specimens. Kobeissi et al. (2022) use a style-based generative ad-
versarial network with an adaptive discriminator augmentation mechanism that can successfully
generate authentic patterns, which can be used to augment the training dataset for finite element
simulations of soft-tissue materials. However, GANs can be often difficult to train due to issues such
as mode collapse, instability, and sensitivity to hyperparameters (Salimans et al., 2016; Arjovsky and
Bottou, 2017). Furthermore, diffusion models have shown potential in surpassing GANs as the new
state-of-the-art for image synthesis on several metrics and data sets (Dhariwal and Nichol, 2021), as
GANs can trade off diversity for fidelity and do not have good coverage of the entire data distribu-
tion.
1.2 Organization of this article
The rest of the paper is organized as follows. In Section 2, we discuss the concept of denoising dif-
fusion probabilistic models for image generation, explore the problem definition of microstructure
generation using denoising diffusion algorithms, and describe the neural network setup perform
this task. In Section 3, we describe a CNN architecture that predicts the hyperelastic energy func-
tional behavior under uniaxial extension, using the microstructure's image as input. In Section 4, we
demonstrate how the denoising diffusion algorithm can be trained to generate targeted microstruc-
tures with desired constitutive responses by conditioning the microstructure generation process with
the hyperelastic energy functional curves. In Section 5, we introduce another context module neural
network architecture that provides a feature vector for the targeted topology, which, along with the
behavior context module, guides the microstructure generation. We show its capacity to generate
microstructure twins with similar energy responses and topology features as well as test its ability
to generate microstructures of topologies outside of the training data set. In Section 6, we provide
concluding remarks. For completeness, the open-source database we used to generating the latent
design space is described in Appendix A.
2 Conditional diffusion for microstructure generation
In this section, we provide a detailed account on how we extend the denoising diffusion probabilistic
model, originally proposed for image synthesis, to generate microstructures with fine-tuned nonlin-
ear material properties. We first explain the key ideas and mechanisms of the denoising diffusion
probabilistic models and formulate the problem definition for the unconditional microstructure syn-
thesis (Section 2.1). We then formulate a learning problem with the specific task of the conditional
generation mircostructures with target nonlinear material properties (Section 2.2). Finally, we de-
scribe the neural network architecture used to learn the denoising generative process and highlight
how we incorporate the embedded feature vectors that control the mechanical responses and the
topology (Section 2.3).
3
2.1 Unconditional generation of microstructures
Diffusion probabilistic models, first introduced by Sohl-Dickstein et al. (2015), are a class of generative
models that aim to match a given data distribution by learning to reverse a gradual, multi-step noising
process. Ho et al. (2020) proposes a specific parameterization of the generative models that simplifies
the training process and establishes the equivalence between denoising diffusion probabilistic models
(DDPMs) and score-based generative models, which learn a gradient of the log-density of the data
distribution using denoising score matching (Hyv ̈arinen and Dayan, 2005). Several related research
works have shown that DDPMs can generate highly realistic images (Song et al., 2020; Ramesh et al.,
2022; Rombach et al., 2022), audio (Chen et al., 2020; Kong et al., 2020) and forecast time series (Rasul
et al., 2021). The outstanding performance could be attributed to the gradual and iterative nature of
the diffusion (see Fig. 1).
Figure 1: The diffusion process and its reverse for the elastic property distribution of a microstructure.
Noise is added to completely destroy the signal of the original distribution. The forward noising
process q is fixed. The denoising process pθ is learned by a neural network.
A denoising diffusion probabilistic model for image generation can be defined as a generative
model that combines the properties of denoising autoencoders and diffusion processes to generate
new images. These models learn a Markov chain process – where the probability of each transition
depends only on the current state and time elapsed. They are trained in a supervised learning setting
in which a variational inference is learned to produce samples that match the training data after a
finite number of time steps. The transitions of the chain are learned to reverse a diffusion process,
which adds noise to the data in the opposite direction of sampling until the signal is destroyed. In
each diffusion step, the diffusion probabilistic model adds a small amount of Gaussian noise, and
allows a simple neural network parameterization of the new data with the added noise. This diffusion
provides a progressive trajectory from a complex data sample to Gaussian noise and thus eases the
learning of the reverse denoising process by breaking it down with multiple intermediate steps as
shown in Fig. 1. Using a continuous-time approximation of the reverse of the Markov noising process,
the model smoothly traverses the latent space and generates new images.
It is highlighted that adding and removing noise in the classical image synthesis context refers to
manipulating the color channels of the original image. In the context of microstructure generation
for this work, a channel represents the distribution of a material property in a specified material
parameter range. For example, for the data set used in this work the grayscale images have one
channel that represents the distribution of the Young's modulus (Fig. 1) as described in Appendix A.
The dimensionality of the problem can be increased by expanding the noise dimensions to represent
more material parameters to facilitate the concurrent solution for multiple design targets and will be
considered in future work.
In this work, we incorporate the denoising diffusion probabilistic model first introduced in Nichol
and Dhariwal (2021) to guide the generation of microstructures. For completeness, we provide an
overview of the background for the unconditional diffusion process as described in Ho et al. (2020)
and Nichol and Dhariwal (2021). The unconditional diffusion process can be used to generate realistic
microstructures in the general data range. For instance, it can be used to generate a new microstruc-
4
.!(0"#$|0")3(0"|0"#$)Diffusion ProcessReverse Diffusion Process2!2"2#$%2#Young's Modulus, Etures that are considered similar to the microstructures provided to train the AI (Li et al., 2018; Wang
et al., 2020b; Nguyen et al., 2022).
Unconditional generation of microstructures alone can be useful in populating the data set with
synthetic data for other machine learning tasks, such as establishing a response surface when real
data are scarce. In this wok, our focus, nevertheless is on the conditional microstructure generation
tasks, where the goal is not to create just any microstructures but ones that hold a particular set of
topological and constitutive features demanded by the users of the DDPM. In practice, the conditional
and unconditional generation strategy is not necessarily employed in a mutually exclusive manner.
In Sections 4 & 5, we will formulate a technique in which the guided diffusion algorithm may drop the
guidance context vectors (the vectors that provide additional constraints) by a percentage to enrich
the generative capacity of our algorithm. For a more complete implementation of the algorithm and
the detailed differences between formulations, readers are referred to Sohl-Dickstein et al. (2015); Ho
et al. (2020); Nichol and Dhariwal (2021).
Inspired by the non-equilibrium thermodynamics (cf. Sohl-Dickstein et al. (2015)), a diffusion
model consists of two steps. The forward noising/diffusion process that slowly destroy structures of
a data distribution and a reverse process that gradually restores the structures.
2.1.1 Forward process
q(x0), where x0 is the original material property distribution sam-
Consider a data distribution x0 ∼
ple. In the forward noising process q, we produce noised samples x1, ..., xT for T diffusion time steps
by adding Gaussian noise in each time step. The noising is a Markov process where every noised
sample xt is given by:
q(xt|
−
(0, 1) is a variance schedule. By setting αt := 1
where βt ∈
−
arbitrary step of the distribution in Eq. (1) can be written as:
1) :=
(xt;
N
xt
1
−
βtxt
1, βt I),
−
βt and ̄αt := ∏t
(cid:112)
(1)
s=0 αs, it is shown that an
and a sample can be given by:
q(xt|
x0) =
N
(xt; √ ̄αtx0, (1
̄αt)I),
−
xt = √ ̄αtx0 + (cid:101)
(cid:112)
1
̄αt,
−
where (cid:101)
∼
(0, I). Using Bayes theorem, Ho et al. (2020) find the posterior
q(xt
1|
−
xt, x0) =
(xt
−
N
1; ̃μ(xt, x0), ̃βt I),
where the mean of the Gaussian is:
̃μt(xt, x0) :=
and the variance is:
2.1.2 Reverse diffusion process
√ ̄αt
1
−
−
1βt
̄αt
x0 +
√αt(1
1
̄αt
̄αt
−
−
1)
−
xt,
̃βt :=
1
̄αt
−
̄αt
−
1
−
1
βt.
(2)
(3)
(4)
(5)
(6)
xt), we can sample backwards from step t = T to t = 0
If we can learn the reverse distribution q(xt
to gradually remove the noise and generate a microstructure sample. Sohl-Dickstein et al. (2015)
xt) approaches a diagonal Gaussian
show that this is feasible since when T
→
distribution and a network can learn the mean μθ and the diagonal covariance Σ
1|
∞ and βt →
θ such that:
0, q(xt
1|
−
−
pθ(xt
1|
−
xt) :=
(xt
−
N
1; μθ(xt, t), Σ
θ(xt, t)).
(7)
5
While Ho et al. (2020) set to only learn μθ and select a constant Σ
θ, we follow the improved for-
mulation by Nichol and Dhariwal (2021) to parametrize both as this was observed to achieve better
log-likelihoods. Specifically, in this formulation, we learn (cid:101)θ(xt, t) such that:
μθ(xt, t) =
(cid:18)
1
√αt
xt −
βt
√1
̄αt
−
(cid:19)
(cid:101)θ(xt, t)
,
and additional to sample xt the model outputs a vector v to learn Σ
θ(xt, t) such that:
Σ
θ(xt, t) = exp(v log βt + (1
v) log ̃βt).
−
(8)
(9)
Thus, q and pθ constitute a variational autoencoder similar to Kingma and Welling (2013) to be
trained by optimizing a variational lower bound for pθ. The training of the model optimizes two ob-
jectives. For the first learning objective, we randomly sample t and optimize μθ using the expectation:
(cid:104)
Lμ = Et,x0,(cid:101)
(cid:101)
(cid:101)θ(xt, t)
2(cid:105)
,
(10)
||
to estimate a variational lower bound. The second learning objective to only optimize the learned Σ
is:
−
||
θ
where:
Lt :=
Lvlb := L0 + L1 + ... + LT
1 + LT,
−
x1)
xt, x0)pθ(xt
log pθ(x0|
1|
x0)p(xT)
−
DKLq(xt
DKLq(xT|
−
xt)
1|
−
if t = 0
if 0 < t < T
if t = T
.
(11)
(12)
In the above, each term is a KL divergence between the Gaussian distributions of two successive
denoising steps. The learning objective to learn both μθ and Σ
θ is defined as:
where λ = 0.001 is a scaling factor selected to weigh the two objectives similar to Nichol and Dhariwal
(2021).
Lhybrid = Lμ + λLvlb,
(13)
2.2 Conditional diffusion with embedded feature vectors
While the unconditional diffusion described in the previous section can readily generate microstruc-
tures consistent with the training data set, our goal is to design microstructures that exhibit prescribed
mechanical behaviors. To achieve this goal, we usa a conditional diffusion process which fine-tunes
the resultant microstructures via feature vectors.
We enforce the designated material properties by introducing context into the synthesis problem,
following a relevant approach that utilized image classes or textual descriptions to provide context to
target specific images (Ramesh et al., 2022). Our approach, however, differs in that we aim to intro-
duce context to control both targeted mechanical behaviors and targeted topologies, and we do so by
incorporating context in the form of feature vectors into the denoising diffusion algorithm. Along the
time embedding feature vector that is common in diffusion algorithms, our algorithm additionally
employs a mechanical feature vector for every desired target property. This treatment allows us to
modularize the problem and control different properties of the microstructures in a separate and dis-
tinct manner. For every desired target property, we introduce a feature vector and a corresponding
neural network context module that will be trained in tandem with the diffusion algorithm.
To incorporate the feature vector conditioning, we follow Dhariwal and Nichol (2021) by intro-
ducing a conditional Markov process ˆq that adds noise similar to q described in the previous section.
6
Figure 2: Schematic of the sampling framework for microstructure generation conditioned by context
feature vectors ζ A and ζB. The generated microstructures are further filtered by a surrogate model to
demonstrate macroscopic behaviors in a desired admissible range.
We define the conditional noising process to:
ˆq(x0) := q(x0),
and ˆq(x1, ..., xT|
ˆq(xt+1|
x0, ζ1, ..., ζ N) :=
xt, ζ1, ..., ζ N) := q(xt+1|
xt
1, ζ1, ..., ζ N),
xt),
ˆq(xt|
−
T
∏
t=1
(14)
{
ζ1, ..., ζ N}
are the corresponding context feature vector embeddings for i = 1, ..., N target
where
microstructure properties – be it behavior or topology. Dhariwal and Nichol (2021) refer to a class
conditioning given y supervised labels (image classes) but we perform the conditioning with unsu-
pervised labels that are embedded during training, more similar to the Ramesh et al. (2022) approach.
x0) to be the embedding generated during the training process. It
Thus, we are also given ˆq(ζ1, ..., ζ N|
is noted that these context vectors are constant and independent of the diffusion process time. Dhari-
wal and Nichol (2021) show that the conditional noising process with a diffusion time-independent
class behaves similar to the unconditional noising process as described in the previous section and
can be used to guide image synthesis.
Thus, in order to perform the conditional sampling, we will need to train two neural network
xt) to perform the denoising as
approximations. The first is the approximation pθ(xt
xt) for the generation
described in the previous section. The second is pφ(ζ1, ..., ζ N|
of the unsupervised labels. The two will be optimized simultaneously using the training objectives
in Eq. (10) and Eq. (11).
1|
xt) of ˆq(ζ1, ..., ζ N|
xt) of q(xt
1|
−
−
In Fig. 2, we demonstrate a schematic of the sampling process for the conditional microstructure
generation for two sample context feature vectors ζ A and ζB. Each context vector corresponds to a
different type of conditioning (e.g. macroscopic response and topology respectively). At the core of
the algorithm, there is a neural network architecture that learns the reverse of the diffusion process.
Starting by a random Gaussian noise input, it can iteratively denoise the sample from time t = T
to t = 0 to generate a synthetic microstructure. Without the conditioning by a feature vector, the
neural network will be able to sample microstructures from entire data set latent space representa-
xt). By introducing the context feature vectors, we can fine-tune the latent space the
tion pθ(xt
xt, ζ A, ζB). To further fine-tune the microstructure generation to the
model samples from to pθ(xt
desired material nonlinear properties, we introduce an additional step to filter the mass generated mi-
crostructures. We train an surrogate model that predicts the macroscopic response of the generated
1|
1|
−
−
7
||||||||U-net Architecture (Denoising)2!!!(#"#$|#")!!(#"#$|#",'%)!!(#"#$|#",'&)!!(#"#$|#",'&,'%)...Generated microstructures, 2"Surrogate model filter+Context embedded feature vectorsC&C'microstructures, ranks the samples, and filters out the ones that do not satisfy a desired admissible
range. More details on this process are discussed in Section 3.
2.3 Denoising diffusion neural network model architecture
In this section, we explain (1) the neural network architecture used to perform the denoising diffusion
and (2) how the context feature vectors to perform the conditioning are introduced into the diffusion
process. The architecture we used is modified from an implementation of Nichol and Dhariwal (2021).
They have adopted and improved on the U-net architecture used by Ho et al. (2020), which have
adapted the PixelCNN++ (Salimans et al., 2017) and Wide ResNet (Zagoruyko and Komodakis, 2016)
for their image synthesis tasks. This architecture is used to approximate the denoising process as
described in the previous section.
We acknowledge that the dimensionality and resolution of the images that represent the mi-
crostructure in this work – the MNIST data set (Deng, 2012), are smaller than those studied in Nichol
and Dhariwal (2021), such as the CIFAR-10 (Krizhevsky et al., 2009) and ImageNet 64
64 (Deng et al.,
2009). Thus, we adapt a smaller architecture version of the original U-net that was deemed adequate
to perform our synthesis tasks. Specifically, in our U-net implementation, there are two stacks that
perform the downsampling and upsampling in four steps respectively. Each step has one residual
block. We use one attention head with 32
8 attention resolutions. We modify the
×
output of the architecture to have one output image channel to produce the microstructure grayscale
material property maps. The U-net utilizes [C, 2C, 4C, 8C] channel widths from higher to lower reso-
lutions with the base model channel size selected as C = 32. The architecture is conditioned by the
diffusion time step t through an embedded feature vector ζt. This vector is produced by a sequential
two-layer network – it has two-dense layers of 128 neurons each with a Sigmoid Linear Unit (SiLU)
and a Linear activation function respectively.
16, and 8
32, 16
×
×
×
At this point of the architecture, we inject our context feature vectors to perform the microstruc-
ture conditioning. Specifically, given context data structures Zi for i = 1, ..., N target properties to
condition the microstructure generation with, we define neural network architectures ci that produce
context feature vector embeddings ζi = ci(Zi). In this framework, the context data structures are
curves (hyperelastic energy functional responses) and 2D images (topologies). However, any other
type of data structure can be embedded to control the generation process. The context feature vector
embeddings are introduced in the architecture by defining an embedding vector ζemb for both the
diffusion time and the microstructure properties as:
ζemb = ζt + ζi + ... + ζ N for i = 1, ..., N.
(15)
In this work, we will introduce two types of context embeddings, by (1) material behavior and (2)
topology in Section 4 and Section 5 respectively. The corresponding neural network architectures ci
are defined in these sections. We highlight that we introduce the conditioning as the summation of
embedded feature vectors to allow a modular structure of the framework independent of the diffusion
algorithm. More types of conditioning will be considered in future work.
3 Neural network for material behavior prediction
In order to further optimize the microstructure generation for desired material nonlinear properties,
we train a surrogate model which predicts the macroscopic response of the generated microstructures
and, subsequently, ranks and filters out samples which do not fall within the desired admissible hy-
perelastic energy functional range. In this section, we describe the Convolutional Neural Network
(CNN) architecture to perform this task. Given the distribution of a microstructure's Young's modu-
lus, the model can predict the hyperelastic energy functional behavior under uniaxial extension. This
CNN model can be used to predict the behavior of a new microstructure during a uniaxial extension
simulation, eliminating the need to perform a complete finite element simulation. These predictions
8
can then be used in place of the output of an FEM simulation, allowing for faster prediction of the
microstructure's behavior with a reasonable trade-off in accuracy. It is noted that full-scale finite ele-
ment simulations will also eventually be used to validate the generated microstructures in following
sections. However, the CNN counterpart will be used to quickly check the estimated behavior of a
microstructure.
Figure 3: (a) Training and validation loss function values and (b) predictions of the energy functional
response of all the training and testing samples of the MNIST dataset for the CNN architecture.
The neural network implemented follows a standard CNN architecture and consists of two Con-
volutional layers with a kernel size of 3, stride of 1, and padding of 1. The first CNN layer has 1 input
channel and 16 output channels, and the second Convolutional layer has 16 input channels and 16
output channels. The output of the first Convolutional layer is passed through a Max Pooling layer
with a kernel size of 2 and stride of 2, which down-samples the input by taking the maximum value
over a 2x2 window. The output of the second Convolutional layer is also passed through a Max Pool-
ing layer with the same configuration. The output of the second Max Pooling layer is then flattened
to a single dimension, representing the features extracted by the CNN. This flattened output is then
passed through three fully-connected (Dense) layers with 120, 84, and 13 neurons, respectively. The
output size of 13 corresponds to the number of time steps in the Mechanical MNIST uniaxial exten-
sion curves. The ReLU activation function is applied to the output of the CNN and Dense hidden
layers, while the output uses a Linear activation function. The kernel weight matrices of the layers
are initialized with the default Glorot uniform distribution, and the bias vectors are initialized with
a zero distribution. The model was trained for 200 epochs with a batch size of 256 using the Adam
optimization algorithm with a learning rate of 10−3 and a mean squared error (MSE) loss function.
The learning rate was reduced by a factor of 0.9 when the validation loss plateaued for 5 epochs. The
network was trained on the 60,000 and validated on the 10,000 MNIST training and test samples and
their corresponding energy functional ψ curves of the database described in Appendix A. The results
of the training are demonstrated in Fig. 3 where the network is shown to perform well in the training
set with a good capacity to generalize outside the samples used for the calibration.
4 Generation of hyperelastic microstructures conditioned by mate-
rial behavior
In this section, we will demonstrate that the denoising diffusion algorithm described in a Section 2
can be trained on the Mechanical MNIST data set to generate targeted microstructures with desired
9
100101102Epoch10°610°5LossTrainingValidation(a)(b)constitutive responses by conditioning the microstructure generation process with the hyperelastic
energy functional curves. In Section 4.1, we will first describe the hyperelastic curve context module
of the diffusion algorithm, the training of the architecture, and the capacity of the algorithm to gen-
erate synthetic microstructures with similar statistical properties as the given data set. In Section 4.2,
we will input random polynomials to design targeted microstructures outside of the training range
and explore the capacity of the algorithm to generate microstructures for unseen behaviors.
4.1 Training of behavior conditioned architecture
In this section, we introduce a context module neural network architecture that extracts the behavior
feature vector of the hyperelastic energy functional curves from the Mechanical MNIST dataset to
guide the microstructure generation process. We detail the training procedure and demonstrate the
capacity of the architecture to accurately generate microstructures with similar energy responses to
these present in the Mechanical MNIST dataset.
Figure 4: Microstructure generation and neural network prediction results for the same hyperelastic
energy functional response from the Mechanical MNIST testing dataset. The results are shown for
denoising steps 1, 750, and 1000.
The context module in this section embeds the hyperelastic energy functional curves described
in Appendix A into feature vectors. The module follows a simple feed-forward neural network ar-
It inputs the energy functional values ψ of the 13 time steps of the uniaxial extension
chitecture.
experiments of the Mechanical MNIST data set. It is noted that here we are only using the energy
functional values since the displacement inputs for all the FEM simulations are the same and this
input information would be redundant as a context for this case of microstructure generation. In the
case the input strain was variable or there existed different types of tests in the database, we would
have to input additional identifiers to properly control the microstructure generation. The sequential
module has two Dense layers of 128 neurons each. The hidden layer has a SiLU activation function
and the output feature vector layer has a Linear activation function. We opt for an embedded feature
vector of 128 neurons that matches the dimensions of the time embedding vector. The predicted be-
havior feature vector is added to the time embedding feature vector as described in Section 2.3. The
10
kernel weight matrices of the layers are initialized with the default Glorot uniform distribution, and
the bias vectors are initialized with a zero distribution.
After assembling the diffusion architecture with the behavior context module, we train the dif-
fusion model for 50,000 steps on the 60,000 sample pairs of MNIST handwritten digits and energy
functional curves. We also set the context to be dropped with a 10% chance – the feature vector used
is ζemb = ζt– to improve the algorithm's capacity to perform unconditional synthesis. We opt for
1000 diffusion time steps with a linear noise schedule as used in Ho et al. (2020). We use an Adam
optimizer (Kingma and Ba, 2014) with a learning rate of 10−
4 with a batch size of 128.
Figure 5: Microstructure generation and neural network prediction results of 16 samples for the same
hyperelastic energy functional response from the mechanical MNIST testing data set. The samples
were batch generated and filtered to have an energy functional prediction with MSE< 10−
4.
In Fig. 4, we observe that the algorithm can create twins for a specific behavior that do not look
alike or do not resemble the topologies in the training data set. All three microstructures are generated
for the same mechanical response from the mechanical MNIST testing data set. The algorithm is
trained on images of handwritten digits and does not have any limitations or context guidance on
the generated images to fall within a specific image class. This is an important aspect of the behavior
guided diffusion model. It means that the algorithm is not constrained to generate microstructures
that resemble the images it was trained on but rather has the ability to generate a wide variety of
microstructures that may have different shapes, forms, and other properties. This feature allows for
a greater degree of flexibility in the design of microstructures and has the potential to enable the
generation of microstructures with specific properties that may not be found in the training dataset.
Additionally, it also allows to generate microstructures with shapes or forms that are not seen during
the training phase. This ability to generalize and adapt to new behavior context inputs is a key
advantage of this approach to microstructure generation, as it enables the discovery of a diverse
range that can meet specific design criteria.
It is highlighted that it is expected the generated microstructures do not necessarily correspond
to a perfectly accurate energy response compared to the target one. This is because the generation
process is probabilistic and performed using the denoising diffusion probabilistic algorithm, which
inherently introduces a degree of uncertainty. As a result, the generated microstructures have an error
range in their predictions of the energy response. To control the degree of accuracy of the generated
4
microstructures, we filter out the ones that do not satisfy a target MSE error limit of MSE< 10−
using the CNN architecture previously described in Section 3. Thus, we can batch generate multiple
microstructures and quickly select the desired ones without having to run the much slower finite
element simulations to validate. In Fig. 5, we demonstrate 16 microstructure twins that were batch
generated in this way for the same mechanical MNIST testing curve. The error range of the generation
process is further explored in the following section.
11
4.2 Generate hyperelastic microstructures with polynomial energy functional
In this section, we will be further testing the genation for energy functional forms not included in
the data set. Instead of using the hyperelastic energy functionals of the Mechanical MNIST data set
as a guide, we will be using a set of random energy functional polynomials as the target behaviors
to generate microstructures. These random polynomials will be selected from the coefficient ranges
present in the Mechanical MNIST data set and validate that the generated microstructures are phys-
ically realistic and representative of the range of behaviors present in the data set. By using these
random polynomials as the target behaviors, we can generate a diverse set of microstructures with a
wide range of hyperelastic properties, rather than being limited to the specific behaviors present in
the original dataset. This allows for the exploration of the behavior of microstructures with a wider
range of properties and to more fully understand the relationship between microstructure and behav-
ior.
To generate the target polynomials for the microstructure generation process, we first fit all the
energy functional curves in both the training and testing data sets with third-order polynomials. The
general form of the polynomials is ax3 + bx2 + cx. After fitting the curves, we find the ranges of
0.0047], b = [0.6346, 1.3968], and c = [0.00532, 0.4114] We sample
the coefficients a = [
three random polynomials from these coefficient ranges to explore the entire energy data range of the
0.014x3 + 1.368x2 + 0.057x.,
data set. From a higher to a lower energy functional range, we sample
0.013x3 + 0.709x2 + 0.276x. The data range and the sampled en-
0.011x3 + 0.919x2 + 0.062x, and
0.0162,
−
−
−
−
ergy functionals are shown in Fig. 7(a).
−
In order to generate microstructures with accurate targeted behaviors, we filter the generated
microstructures using the CNN architecture previously described in Section 3. We continuously gen-
4. The error range of the
erate microstructures until 512 of them are predicted to have an MSE< 10−
predictions can be quantified and is shown in a Fig. 6(a). In this figure, we end up generating 2112
0.011x3 + 0.919x2 + 0.062x as a context, and plot
microstructures for the second target polynomial
−
the error range of every predicted behavior using the CNN. We also plot the MSE distribution curve
for these predictions, shown in Fig. 6(b). This allows to visualize the overall accuracy of the CNN in
predicting the energy response of the generated microstructures, as well as the range of errors that
we can expect in these predictions. In addition to visualizing the overall error distribution, we can
also use the CNN to filter out and select only the microstructures that have a predicted MSE within a
certain range. In Fig. 6(c), we plot the 2112 generated microstructures, and highlight the 512 that have
4 admissible limit. We also replot the error range for this
a predicted MSE lower than a selected 10−
MSE limit in Fig. 6(d), to show how the errors are distributed among the selected microstructures. By
selecting only the microstructures with a predicted MSE below a certain limit, we can effectively filter
out the microstructures that have a higher degree of uncertainty, and focus on those with a higher
degree of accuracy without having to run a full FEM simulation.
The filtering procedure is performed during the microstructure generation for all the target poly-
nomials. The results for the generated microstructures are shown in Fig. 7(c), (d), and (e). The mi-
4. To validate the microstructure
crostructures shown were first selected to have a MSE less than 10−
design, we also test the microstructure by performing a forward FEM simulation and validate that the
generated microstructures indeed have the desired behaviors. We can also observe that the shapes are
progressively thicker from lower to higher polynomial value ranges. This is expected as the higher
final energy functional values represent increasingly stiffer materials – it is expected that more stiff
inclusion material is predicted for the microstructures. By carefully selecting the target behavior, we
can achieve a high-level control of the overall shape and topology of the generated microstructures
with an accurate control of the target behavior. In the next section, along with the target behavior we
will control the topology of the generated microstructures as well.
12
−
Figure 6: (a) Energy functional neural network predictions for 2112 generated microstructures for the
0.011x3 + 0.919x2 + 0.062x. The data range and error range of the pre-
random target polynomial
dictions are also demonstrated. (b) MSE distribution for the predicted energy functional of the 2112
4 are selected. (c) The 2112 generated
microstructures. Microstructures with an MSE less that 10−
4. The microstructures are
microstructures and the selected microstructures that have an MSE < 10−
embedded using the T-distributed Stochastic Neighbor Embedding algorithm for easier visualization
in three axes. (d) Energy functional neural network predictions for the selected generated microstruc-
tures that have an MSE < 10−
4.
5 Generation of hyperelastic microstructures conditioned by both
material behavior and topology
In this section, we introduce another context module neural network architecture that will provide
another feature vector to control topology. Along with the behavior context module, it will be used
to guide the microstructure generation for two concurrent tasks. We outline the training procedure
and demonstrate the capacity of the architecture to generate microstructure twins now for both the
energy response and topology features for the behaviors and microstructure present in the Mechan-
ical MNIST data set. Additionally, we will test the capacity of the diffusion algorithm to generate
microstructures of topologies outside of the training data set.
13
(a)(b)(c)(d)Figure 7: Microstructure generation and FEM simulation results for three random target energy func-
tional polynomials.
5.1 Training of behavior and topology conditioned architecture
In this section, we introduce an enhanced context module neural network architecture that extracts
both behavior and topology feature vectors from the Mechanical MNIST data set to guide the mi-
crostructure generation process. In addition to the material behavior module introduced in the pre-
vious section, we now also include a topology module. We detail the training procedure and demon-
strate the capacity of the enhanced architecture to accurately generate microstructures with similar
energy responses and topologies to those present in the Mechanical MNIST data set.
The additional topology context module follows a convolutional neural network architecture. The
architecture has two convolutional layers of kernel size 3, stride 1 and padding 1 with ReLU activa-
tions. The first layer inputs the grayscale map that describes the desired target material property
distribution context. Both layers have 16 output channels. Both are followed by a max pooling layer
of kernel size 2 and stride 2 to down-sample their output. The output of the second pooling layer
is then flattened and passed through three fully-connected layers with 128 neurons each with two
ReLU activations and a Linear one respectively. This choice of 128 neurons is made as it aligns with
the size of time and behavior context embedding vectors from the previous sections. Similarly to the
previous section, the context vector containing the time, behavior, and topology contexts comes from
the summation of the three embedded vector counterparts. The training procedure is identical to the
one described in Section 4.1 with the difference that along every sample we also input a topology
14
(a)(b)(c)(d)Figure 8: Generation of topology and behavior twins from a microstructure from the MNIST test set.
The results are shown for steps 0, 750, and 1000 of the denoising process.
context map.
With the addition of a topology module, along with the material behavior module, we are now
able to perform more controlled microstructure generation tasks. In Fig. 8, we demonstrate the gener-
ation of microstructures from image and curve pairs from the Mechanical MNIST testing set. In this
example, we attempt to create twins for a randomly sampled microstructure and its corresponding
hyperelastic behavior. We first check if the algorithm can reproduce a microstructure with the same
topology context (the digit 7) and behavior. We then test the capacity to generate microstructures that
have the same behavior context but different topology context inputs randomly sampled from the
MNIST test set (the digits 6 and 4). We can see the algorithm modifies the material property map in-
puts to synthesize structures to adjust to the specific target behavior. These microstructures not only
look similar to the images they were generated from but also have the same hyperelastic behavior as
the target energy functional curve. Thus, we show that we can perform the creation of both behavior
and topology twins. While in this example the alterations from the input context images may seem
slight, we test some more apparent topology changes in the following section.
5.2 Generation of topologies outside the training dataset
In this section, we will investigate the capability of the behavior and topology guided diffusion model
to generate microstructures for topologies that are not represented in the Mechanical MNIST data
set. Despite the algorithm being trained on images of handwritten digits, there are no limitations or
context guidance imposed on the generated images to fall within a specific image class, as previously
demonstrated in Section 4.1. This suggests that the algorithm has the potential to generate microstruc-
tures of other shapes and geometries as well. However, it is observed that while the topology context
input is dissimilar to the MNIST data set, the images generated in this section tend to resemble the
MNIST style.
By focusing on the topology context aspect of image generation, we will create microstructures
0.011x3 + 0.919x2 +
that share the same energy response, represented by the energy functional
0.062x – all the microstructures in this section have the same energy response. Additionally, to im-
−
15
Original MicrostructureDenoise Step 1Denoise Step 750Denoise Step 1000prove the accuracy of the generated microstructures, we utilize a mass generation method of proto-
types and employ a CNN model from Section 3 to filter out those microstructures that have a pre-
4. We were able to utilize the proposed method to generate microstructures that
dicted MSE> 10−
spell the word "twin" as illustrated in Fig. 9. Furthermore, we demonstrate the denoising process, in
which the letters α, β, and γ were generated, as depicted in Fig. 10. These characters were not present
in the training data set, however, the algorithm has a limited capability to recreate them while also
conforming to the target energy functional behavior.
Figure 9: Microstructure generation and FEM simulation results for the target energy functional poly-
nomial
0.011x3 + 0.919x2 + 0.062x and target images that spell the word "twin".
−
An analysis of the results generated by the behavior and topology guided diffusion model illus-
trate the potential benefits of utilizing this approach in the synthesis of microstructures. These advan-
tages include the ability to create microstructures of specific shapes, as well as the potential to design
microstructures with other properties, such as symmetry and targeted material volumes and ratios.
Nevertheless, a current challenge in this application is the limited similarity between the topology
context inputs used and the Mechanical MNIST data set. This has resulted in difficulty in efficiently
identifying suitable microstructures, as well as instances in which it is not possible to discover mi-
4 at all. Specifically, when topology
crostructures with a predicted energy response with MSE < 10−
context inputs are dissimilar to the MNIST data set, the error range of the generated microstructures
may be larger, deeming it harder to find a suitable microstructure. For example, inputting a very
stiff topology context image and an energy curve in the lower range of the material behaviors, it is
expected that the algorithm would have difficulty in designing a microstructure that satisfies both
criteria simultaneously.
One potential solution to this obstacle in discovering microstructures with dissimilar topology
context inputs would be to augment the training data set. Specifically, by selecting a more hetero-
geneous data set that includes a diverse range of microstructure shapes and forms, the algorithm
would have access to a wider range of reference examples upon which to base its generative process.
Furthermore, in cases where a specific inclusion shape is desired, incorporating additional examples
of that shape within the training data set could also prove beneficial in terms of improving the al-
gorithm's ability to generate microstructures featuring that specific shape. Additionally, employing
other forms of guidance within the microstructure generation process, such as through the use of
metrics (e.g. a symmetry loss metric, a target ratio of soft to stiff material) or neural networks, could
also help to improve the quality of the generated microstructures. Such additional guidance mecha-
nisms can provide a filter for the generated microstructures, allowing the algorithm to focus on those
with the desired characteristics and eliminate those that are not similar to the target topology.
16
Figure 10: Microstructure generation and neural network prediction results for the target energy
0.011x3 + 0.919x2 + 0.062x and targeted images for the letters α, β, and γ.
functional polynomial
The results are shown for denoising steps 1, 750, and 1000.
−
6 Conclusion
We present a novel approach to design microstructures with desired mechanical behaviors and topolo-
gies by introducing context feature vectors that control targeted properties in a DDPM model. We
demonstrate the capacity of the architecture to accurately generate microstructures with similar en-
ergy responses and topologies to those present in the Mechanical MNIST data set, while demon-
strating a reasonable extrapolating capacity. Our method is based on a modular framework where a
feature vector is assigned to every desired target property. This allows for the incorporation of dif-
ferent types of target properties and their corresponding embeddings, rendering the problem more
scalable and easier to interpret. Future work will explore the design of microstructures with addi-
tional behavior controls such as behaviors in the microscale along the macroscopic responses and
more precise topology constraints, such as symmetry. This could be achieved by introducing more
complex microstructure databases as well as additional constraints in the diffusion algorithm. The
flexibility and speed of the design of microstructures using diffusion algorithms will not only facil-
itate the generation of digital twins but could also be extended to generate synthetic databases in
usually data-scarce engineering applications.
7 Acknowledgments
The authors are supported by the National Science Foundation under grant contracts CMMI-1846875
and OAC-1940203, and the Dynamic Materials and Interactions Program from the Air Force Office of
Scientific Research under grant contracts FA9550-19-1-0318, FA9550-21-1-0391 and FA9550-21-1-0027,
17
(a)(b)(c)with additional support provided to WCS by the Department of Energy DE-NA0003962. These sup-
ports are gratefully acknowledged. The views and conclusions contained in this document are those
of the authors, and should not be interpreted as representing the official policies, either expressed or
implied, of the sponsors, including the Army Research Laboratory or the U.S. Government. The U.S.
Government is authorized to reproduce and distribute reprints for Government purposes notwith-
standing any copyright notation herein.
8 Data and code availability
The data and computer code that support the findings of this study are available from the correspond-
ing author upon request.
A Mechanical MNIST Database
This work uses the Mechanical MNIST data set (Lejeune, 2020) that contains pairs of heterogeneous
microstructures and their corresponding hyperelastic responses. Mechanical MNIST is a data set of
finite element simulation results generated from images in the MNIST database of handwritten digits
(Deng, 2012). The MNIST dataset is a large database of handwritten digits that is commonly used for
training, evaluating, and benchmarking image classification algorithms. It consists of 60,000 training
images and 10,000 test images, each of which is a 28x28 pixel grayscale image of a handwritten digit
from 0 to 9.
Figure 11: The Mechanical MNIST data set includes 60,000 training and 10,000 testing microstructures
based on the MNIST handwritten digits data set and their corresponding total strain energy response
curves in uniaxial extension.
The images are transformed into material properties using a compressible Neo-Hookean material
model, where the strain energy functional ψ is given by
(cid:20) 1
2
2 ln(det F)] +
μ[F : F
ψ =
1
2
1
2
λ
3
−
−
(cid:16)
(det F)2
(cid:17)
1
−
−
(cid:21)
ln(det F)
,
(16)
where F is the deformation gradient and μ, λ are the Lam ́e coefficients. The Lam ́e coefficients at every
pixel are calculated through the corresponding Young's modulus:
where β is the value of the grayscale bitmap and a constant Poisson's ratio of ν = 0.3, such that:
E =
β
255.0
(100.0
−
1.0) + 1.0,
λ =
Eν
(1 + ν)(1
2ν)
−
18
and μ =
E
2(1 + ν)
.
(17)
(18)
Uniaxial Extension TestThus, the resulting microstructures in the data set have stiff elastic inclusions in a two orders of
magnitude softer elastic domain.
Finite element simulations are then run on the resulting material domains, with the bottom of
the domain fixed and the top displaced according to a set of prescribed displacements. The applied
displacements range from 0 to half the initial size of the domain. The finite element simulations are
run using the FEniCS platform (Alnaes et al., 2015) with a mesh size of 39,200 quadratic triangular
elements which corresponds to approximately 140 elements per pixel in the MNIST image. The Me-
chanical MNIST data set includes load cases in addition to the uniaxial extension used in this work,
such as shear, equibiaxial extension, and confined compression. Fig.11 shows 5 samples from the
training set as well as the error range of the responses in the entire Mechanical MNIST data set.
References
Martin Alnaes, Jan Blechta, Johan Hake, August Johansson, Benjamin Kehlet, Anders Logg, Chris
Richardson, Johannes Ring, Marie E Rognes, and Garth N Wells. The fenics project version 1.5.
Archive of Numerical Software, 3(100), 2015.
Martin Arjovsky and L ́eon Bottou. Towards principled methods for training generative adversarial
networks. arXiv preprint arXiv:1701.04862, 2017.
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural
image synthesis. arXiv preprint arXiv:1809.11096, 2018.
Nanxin Chen, Yu Zhang, Heiga Zen, Ron J Weiss, Mohammad Norouzi, and William Chan. Waveg-
rad: Estimating gradients for waveform generation. arXiv preprint arXiv:2009.00713, 2020.
Heng Chi, Yuyu Zhang, Tsz Ling Elaine Tang, Lucia Mirabella, Livio Dalloro, Le Song, and Glau-
cio H Paulino. Universal machine learning for topology optimization. Computer Methods in Applied
Mechanics and Engineering, 375:112739, 2021.
Sehyun Chun, Sidhartha Roy, Yen Thi Nguyen, Joseph B Choi, HS Udaykumar, and Stephen S Baek.
Deep learning for synthetic microstructure generation in a materials-by-design framework for het-
erogeneous energetic materials. Scientific reports, 10(1):13307, 2020.
Aaron Courville and Yoshua Bengio. Generative adversarial nets. Advanc in Neural, 2014.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hier-
archical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages
248–255. Ieee, 2009.
Li Deng. The mnist database of handwritten digit images for machine learning research. IEEE Signal
Processing Magazine, 29(6):141–142, 2012.
Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances
in Neural Information Processing Systems, 34:8780–8794, 2021.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in
Neural Information Processing Systems, 33:6840–6851, 2020.
Aapo Hyv ̈arinen and Peter Dayan. Estimation of non-normalized statistical models by score match-
ing. Journal of Machine Learning Research, 6(4), 2005.
Nal Kalchbrenner, A ̈aron Oord, Karen Simonyan, Ivo Danihelka, Oriol Vinyals, Alex Graves, and
Koray Kavukcuoglu. Video pixel networks. In International Conference on Machine Learning, pages
1771–1779. PMLR, 2017.
19
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved
quality, stability, and variation. arXiv preprint arXiv:1710.10196, 2017.
Steve Kench and Samuel J Cooper. Generating 3d structures from a 2d slice with gan-based dimen-
sionality expansion. arXiv preprint arXiv:2102.07708, 2021.
Yongju Kim, Hyung Keun Park, Jaimyun Jung, Peyman Asghari-Rad, Seungchul Lee, Jin You Kim,
Hwan Gyo Jung, and Hyoung Seop Kim. Exploration of optimal microstructure and mechanical
properties in continuous microstructure space using a variational autoencoder. Materials & Design,
202:109544, 2021.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint
arXiv:1412.6980, 2014.
Diederik P Kingma and Max Welling.
Auto-encoding variational bayes.
arXiv preprint
arXiv:1312.6114, 2013.
Hiba Kobeissi, Saeed Mohammadzadeh, and Emma Lejeune. Enhancing mechanical metamodels
with a generative model-based augmented training dataset. Journal of Biomechanical Engineering,
144(12):121002, 2022.
Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. Diffwave: A versatile diffu-
sion model for audio synthesis. arXiv preprint arXiv:2009.09761, 2020.
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
Siddhant Kumar, Stephanie Tan, Li Zheng, and Dennis M Kochmann. Inverse-designed spinodoid
metamaterials. npj Computational Materials, 6(1):73, 2020.
Emma Lejeune. Mechanical mnist: A benchmark dataset for mechanical metamodels. Extreme Me-
chanics Letters, 36:100659, 2020.
Xiaolin Li, Yichi Zhang, He Zhao, Craig Burkhart, L Catherine Brinson, and Wei Chen. A transfer
learning approach for microstructure reconstruction and structure-property predictions. Scientific
reports, 8(1):13461, 2018.
Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks
and multidimensional upscaling. arXiv preprint arXiv:1812.01608, 2018.
Phong CH Nguyen, Nikolaos N Vlassis, Bahador Bahmani, WaiChing Sun, HS Udaykumar, and
Stephen S Baek. Synthesizing controlled microstructures of porous media using generative ad-
versarial networks and reinforcement learning. Scientific reports, 12(1):9034, 2022.
Alexander Quinn Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models.
In International Conference on Machine Learning, pages 8162–8171. PMLR, 2021.
Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-
conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022.
Kashif Rasul, Calvin Seward, Ingmar Schuster, and Roland Vollgraf. Autoregressive denoising dif-
fusion models for multivariate probabilistic time series forecasting. In International Conference on
Machine Learning, pages 8857–8868. PMLR, 2021.
Ali Razavi, Aaron Van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with
vq-vae-2. Advances in neural information processing systems, 32, 2019.
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bj ̈orn Ommer. High-
resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference
on Computer Vision and Pattern Recognition, pages 10684–10695, 2022.
20
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Im-
proved techniques for training gans. Advances in neural information processing systems, 29, 2016.
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. Pixelcnn++:
pixelcnn with discretized logistic mixture likelihood and other modifications.
arXiv:1701.05517, 2017.
Improving the
arXiv preprint
Fernando V Senhora, Heng Chi, Yuyu Zhang, Lucia Mirabella, Tsz Ling Elaine Tang, and Glaucio H
Paulino. Machine learning for topology optimization: Physics-based learning through an indepen-
dent training strategy. Computer Methods in Applied Mechanics and Engineering, 398:115116, 2022.
Ole Sigmund and Kurt Maute. Topology optimization approaches: A comparative review. Structural
and Multidisciplinary Optimization, 48(6):1031–1055, 2013.
Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised
learning using nonequilibrium thermodynamics. In International Conference on Machine Learning,
pages 2256–2265. PMLR, 2015.
Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint
arXiv:2010.02502, 2020.
Yang Song and Stefano Ermon.
Improved techniques for training score-based generative models.
Advances in neural information processing systems, 33:12438–12448, 2020.
Arash Vahdat and Jan Kautz. Nvae: A deep hierarchical variational autoencoder. Advances in neural
information processing systems, 33:19667–19679, 2020.
Liwei Wang, Yu-Chin Chan, Faez Ahmed, Zhao Liu, Ping Zhu, and Wei Chen. Deep generative
modeling for mechanistic-based learning and design of metamaterial systems. Computer Methods
in Applied Mechanics and Engineering, 372:113377, 2020a.
Yixing Wang, Min Zhang, Anqi Lin, Akshay Iyer, Aditya Shanker Prasad, Xiaolin Li, Yichi Zhang,
Linda S Schadler, Wei Chen, and L Catherine Brinson. Mining structure–property relationships in
polymer nanocomposites using data driven finite element analysis and multi-task convolutional
neural networks. Molecular Systems Design & Engineering, 5(5):962–975, 2020b.
Ulrike GK Wegst, Hao Bai, Eduardo Saiz, Antoni P Tomsia, and Robert O Ritchie. Bioinspired struc-
tural materials. Nature materials, 14(1):23–36, 2015.
Rebekka V Woldseth, Niels Aage, J Andreas Baerentzen, and Ole Sigmund. On the use of artificial
neural networks in topology optimisation. Structural and Multidisciplinary Optimization, 65(10):294,
2022.
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146,
2016.
Zeyu Zhang, Yu Li, Weien Zhou, Xiaoqian Chen, Wen Yao, and Yong Zhao. Tonr: An exploration for
a novel way combining neural network with topology optimization. Computer Methods in Applied
Mechanics and Engineering, 386:114083, 2021.
21
|
http://arxiv.org/abs/2302.12862v2 | 2023-03-11T00:06:55 | 2023-02-24T19:38:03 | FLINT: A Platform for Federated Learning Integration | Cross-device federated learning (FL) has been well-studied from algorithmic,
system scalability, and training speed perspectives. Nonetheless, moving from
centralized training to cross-device FL for millions or billions of devices
presents many risks, including performance loss, developer inertia, poor user
experience, and unexpected application failures. In addition, the corresponding
infrastructure, development costs, and return on investment are difficult to
estimate. In this paper, we present a device-cloud collaborative FL platform
that integrates with an existing machine learning platform, providing tools to
measure real-world constraints, assess infrastructure capabilities, evaluate
model training performance, and estimate system resource requirements to
responsibly bring FL into production. We also present a decision workflow that
leverages the FL-integrated platform to comprehensively evaluate the trade-offs
of cross-device FL and share our empirical evaluations of business-critical
machine learning applications that impact hundreds of millions of users. | [
"Ewen Wang",
"Ajay Kannan",
"Yuefeng Liang",
"Boyi Chen",
"Mosharaf Chowdhury"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12862v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12862v2",
"@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.DC",
"F.2.2, I.2.7"
] | FLINT: A PLATFORM FOR FEDERATED LEARNING INTEGRATION
Ewen Wang * 1 Ajay Kannan 1 Yuefeng Liang 1
Boyi Chen * 1 Mosharaf Chowdhury * 2 3
3
2
0
2
r
a
M
1
1
]
G
L
.
s
c
[
2
v
2
6
8
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Cross-device federated learning (FL) has been well-studied from algorithmic, system scalability, and training
speed perspectives. Nonetheless, moving from centralized training to cross-device FL for millions or billions of
devices presents many risks, including performance loss, developer inertia, poor user experience, and unexpected
application failures. In addition, the corresponding infrastructure, development costs, and return on investment
are difficult to estimate. In this paper, we present a device-cloud collaborative FL platform that integrates with
an existing machine learning platform, providing tools to measure real-world constraints, assess infrastructure
capabilities, evaluate model training performance, and estimate system resource requirements to responsibly
bring FL into production. We also present a decision workflow that leverages the FL-integrated platform to
comprehensively evaluate the trade-offs of cross-device FL and share our empirical evaluations of business-critical
machine learning applications that impact hundreds of millions of users.
1
INTRODUCTION
With increasing computation power and storage capacity in
end-user devices, there is a rising trend to move machine
learning (ML) toward the edge where data is generated. One
incentive behind this trend is latency reduction in moving
computation to the device. For instance, for real-time CV
and NLP tasks in search and content understanding, sending
data in the form of video, audio, or text between user devices
and the server is a major bottleneck (Lv et al., 2022). Addi-
tionally, increasing demands for data protection and privacy
in the forms of government regulations (e.g., GDPR) and
platform restrictions (e.g., App Tracking Transparency from
Apple) introduce challenges in performing traditional cen-
tralized ML on sensitive data. These motivate applications
like messaging, content recommendation, and advertising,
which often rely on potentially sensitive user data to achieve
high accuracy, to move ML tasks to the device.
Cross-device federated learning (FL) has captured the zeit-
geist as an effective mechanism to address the aforemen-
tioned challenges both in industry and academia (Kairouz
et al., 2021). Federated learning allows distributed ML train-
ing on user data on their own devices. Indeed, federated
learning has been successfully deployed on a case-by-case
basis throughout the industry. Examples include query sug-
*Equal contribution 1LinkedIn Corporation 2University of
Michigan and RightScope Inc. 3Work done at LinkedIn. Cor-
respondence to: Ewen Wang <[email protected]>, Boyi
Chen <[email protected]>.
Preprint. To appear in the 6 th Conference on Machine Learning
and Systems, 2023. Copyright 2023 by the authors.
gestions on Google Keyboard (Hard et al., 2018a; Yang
et al., 2018; Chen et al., 2019; Ramaswamy et al., 2019),
Android smart text selection (Hartmann, 2021), applications
at Meta (Nguyen et al., 2022; Wu et al., 2022), and several
ML tasks on Apple's iOS devices (Paulik et al., 2021b).
Prior work in cross-device FL has mainly focused on algo-
rithmic improvements (Li et al., 2020; Horvath et al., 2021),
system scalability (Bonawitz et al., 2019; Huba et al., 2022),
secure aggregation techniques (So et al., 2022), and model
convergence speeds (Yu et al., 2019).
However, unlike centralized machine learning, where model
architecture and parameters can be tuned and tested in an
offline setting, cross-device FL relies on online training
systems that require a large population of users to produce
utility. At LinkedIn, close to 8,000 types of user devices
with more than 150 different OS versions have been ob-
served from use cases in its mobile application. Having
a comprehensive understanding of the impact of different
model architectures and hyperparameters on all user de-
vices before deployment is crucial to successful FL training
and user satisfaction. Running resource-intensive ML tasks
on user devices can negatively impact user experience and
degrade user trust and product experiences.
Building a cross-device FL system and migrating central-
ized training to that FL system is non-trivial, especially with
millions of users. Forecasting and optimizing infrastructure
requirements like resource consumption, data payload re-
strictions, and model complexity limits for different design
choices (e.g., how to collaboratively manage features from
cloud and devices, whether to use synchronous or asyn-
FLINT: A Platform for Federated Learning Integration
chronous training modes and what hyperparameters to use
for training) are critical to production success. A systematic
decision workflow to empirically evaluate production design
choices is missing in the existing literature. Many compa-
nies have established ML platforms for centralized training,
yet do not have the platform and process to estimate the
benefits, constraints, and implications of FL. Vice-versa, ex-
isting FL platforms today are independent platforms without
a close integration with their centralized counterparts.
Contributions. This paper describes the architecture of a
novel device-cloud collaborative platform for FL integration,
"FLINT," that augments LinkedIn's well-established central-
ized ML platform. Moreover, it presents a cost-effective
decision workflow that leverages the platform to practically
assess cross-device FL in LinkedIn's context.
In Section 2, we describe the traditional ML systems at
LinkedIn, followed by motivations and challenges of cross-
device FL. Then, Section 3 describes a detailed FL platform
design that closely integrates with the centralized compo-
nents. This includes an experimental framework that ex-
tends the simulation capabilities of FedScale (Lai et al.,
2022), which uses device profiles, traces and a virtual clock
to provide realistic FL simulations. We have contributed
some of our innovations back upstream to the open-source
repository.1In Section 4, we apply the decision workflow on
real use cases at LinkedIn that could benefit from FL, demon-
strating how the FLINT platform can provide ML practition-
ers with the tools to estimate impact, de-risk projects, and
clarify modeling assumptions using a combination of cloud
and device resources. We show how a close integration
with LinkedIn's centralized ML platform can help modeling
teams evaluate FL in a familiar environment.
Throughout the sections, we share real-world measurements
produced by the platform tools, providing insights into an
FL system's constraints such as device availability and data/-
compute heterogeneity. This includes on-device bench-
marks of critical, low-latency models on popular device
hardware. We demonstrate how these measurements can
help forecast model performance under observed real-world
constraints and estimate cloud and device resource costs.
2 BACKGROUND
2.1 Centralized ML at LinkedIn
LinkedIn applies ML to tackle business-critical problems
in numerous domains, including advertising, search, mes-
saging, news feed, notifications, and more. Like many tra-
ditional ML platforms, a typical ML workflow at LinkedIn
consists of data generation, model training and inference. In
data generation, data collected in the cloud from multiple
1https://github.com/SymbioticLab/FedScale
sources are anonymized, analyzed, sanity-checked and con-
flated to extract features and labels for training. The data
is then used as input for the model training step to perform
offline model training and testing. The resulting model is
deployed by production systems to serve users (both con-
sumer and enterprise). At the end, the impressions and
actions from users are then logged via tracking events for
future data analysis and model iterations. For each of these
steps, LinkedIn's platform uses a combination of reputable
open-source and bespoke tools to meet business needs.
2.2 Motivations for Cross-Device FL
Increasing demand for privacy and performance is driving
the industry to consider moving away from centralized-only
ML solutions and instead incorporating computations at
the data sources. Similarly, LinkedIn is considering using
cross-device FL for some of its applications.
Privacy and Security. The centralized raw data collection
and data mixing between users needed to generate training
data introduce privacy and security risks. With user privacy
a priority and a key consideration in LinkedIn's product
design, there are strong incentives to explore moving some
business-critical model training (such as those in the adver-
tising and messaging domains) to user devices to reduce
tracking and merging sensitive data.
Performance. Moving ML computations closer to their
data sources provides better user experiences via improved
systems performance. Many applications (such as search)
at LinkedIn require low latency and high adaptability for
recency. Models for these applications need to be constantly
retrained to adopt the most recent user actions; model infer-
ence needs to spend minimal time to deliver predictions. Un-
der the centralized model training paradigm, large payloads
of user events and inference results have to be transmitted
back and forth between devices and the centralized server,
which can sometimes introduce significant delays in model
freshness and inference speed.
2.3 Challenges of Cross-Device FL
Despite the benefits, cross-device FL comes with unique
challenges and isn't an end-all solution for all scenarios.
In centralized ML systems, parameter tuning can optimize
the model performance assessed by offline evaluations on
centralized testing data; system performance can be exam-
ined by running trained models using designated hardware;
centralized data can be validated, sampled, and shuffled in
scalable data pipelines (Baylor et al., 2017). In contrast,
on-device data processing, training, and inference require
significantly more careful offline evaluations and system
design to responsibly leverage user hardware. Parameter
tuning using user devices can be resource-consuming and
deploying faulty or resource-hogging jobs to user devices
FLINT: A Platform for Federated Learning Integration
can harm user trust and negatively impact product reputation
and business metrics.
Systems and data heterogeneity present another major chal-
lenge. User device heterogeneity (Figure 1) results in sig-
nificant differences in computation power across various
training tasks (Figure 4). Moreover, user behavior differ-
ences between devices lead to uneven data availability (Fig-
ure 2), diverse data distribution, and violations of feature
independence.
These practical challenges put constraints on key aspects of
machine learning like model complexity and convergence
speed. Ensuring high-quality user experience – for both the
model engineers of the ML platform and users whose de-
vices would participate in training and inference – requires
a comprehensive evaluation framework that considers these
system constraints.
Figure 1. Distribution of iOS-based (left) and Android-based
(right) mobile devices in the user base of an example applica-
tion at LinkedIn. The gray regions contain device models outside
of the legend. Note that Android hardware is much more diverse
than iOS hardware, making compute capability challenging to
estimate.
Figure 2. Normalized device availability of an example applica-
tion at LinkedIn over a one-week period, demonstrating the high
fluctuation in client availability. The predominant trend is that the
number of available devices peaks each day and drops to 15% of
the weekly peak at the troughs.
3 SYSTEM DESIGN
3.1 The Integrated FL Platform at LinkedIn
We propose an FL system that works in collaboration with
the centralized ML platform (Figure 3). It shares common
components like model stores, job scheduling, monitoring,
and visualization tools with the centralized ML platform de-
scribed by (Baylor et al., 2017), and introduces FL-specific
components to enable cross-device FL.
On the device side, an on-device runtime library encodes
the FL training and inference tasks and is consumed by 1st
party or 3rd party applications. On the server side, there
is an FL server that performs model parameter aggregation
and client coordination. The model store, which is shared
by centralized training, can store and retrieve versioned pa-
rameters during FL training. The overall mechanism of the
FL server and the device side library works in similar fash-
ions as discussed in other FL system literature (Bonawitz
et al., 2019; Paulik et al., 2021a; Huba et al., 2022; Lv et al.,
2022).
Our proposed FL integration platform, FLINT, builds on top
of these well-known FL and centralized ML platforms. This
section focuses on 1) tools to leverage centralized data and
resources for analyzing FL's impact and viability, 2) a fea-
ture catalog that manages both cloud and device-based data,
3) an experimental framework to optimize model perfor-
mance and system requirements, and 4) a decision workflow
that enables decision-makers to understand the constraints,
costs, and effectiveness of FL for their business needs.
3.2 Real World Measurements
Measuring system constraints from different perspectives
helps provide realistic evaluation contexts and guides the de-
sign of production systems. Running on-device benchmarks
before deployment enables engineers to ensure viability
of models embedded in heterogeneous software/hardware
stacks. Most existing web services log session metrics and
device information during user requests. Our platform tools
can analyze this data to produce metrics and visualizations
around user device availability patterns and device compu-
tation capabilities.
On-Device Benchmarks. In cross-device FL, the bulk of
the computation is offloaded to the clients. Edge devices act
as worker nodes in a large computing cluster. Importantly,
each worker's underlying CPU, GPU, storage, memory, and
OS are heterogeneous and could consume vastly different
resources to achieve the same task (Figure 4). This makes
the runtime of an FL task difficult to estimate and could lead
to inconsistent user experiences. Before allocating such
workloads to a heterogeneous population of mobile workers,
FLINT's device benchmark step packages models into a
benchmark app and deploys it to a pool of test-purposed
FLINT: A Platform for Federated Learning Integration
Figure 3. A device-cloud collaborative ML platform with FL integration.
mobile devices in the cloud, including older and newer gen-
erations of popular phones and tablets from Figure 1. The
collected results (Table 5) help modelers understand their
FL model's worst-case impact on users to derive compatible
device models and OS versions for FL participation.
Figure 4. A comparison of two business-critical models' on-device
training times and max compute usage percentage over 5,000
examples. This benchmark on 27 device models shows the effects
of diverse hardware, and how devices that are optimized for one
task might be worse for another. Note the magnitudes difference
in training time between FL tasks A and B.
User Device Availability. We define device availability
as pairs of start and end times during which a device can
participate in FL training. This availability, which fluctu-
ates widely over time (Figure 2), can affect client selection,
model fairness, and convergence. Our tool helps modelers
generate device availability from existing session logs by
specifying a set of availability criteria. The criteria can
include conditions from three categories; 1) compute capa-
bility: based on the device benchmark results, the modeler
can generate a list of devices and OS versions that have ac-
ceptable worst-case device impact and are compatible with
the model architecture; 2) device state: WiFi connection,
battery level, and whether the app is open in the foreground;
3) user attributes: account reputation, account age, and last
participation time, etc. These criteria should be iteratively re-
fined to meet the desired model, system, and security needs
while ensuring that the model performance is fair among
different sub-populations of clients. For instance, if a device
hardware criterion introduces biased model performance on
users of older phones, then the hardware requirement needs
to be relaxed. And while device charging isn't required for
smaller models, a CPU-intensive model (such as Model E
in Table 5), should require a higher battery level (>80%)
for participation.
Table 1. Mobile device availability of an example mobile use case
at LinkedIn after applying each participation criteria, showing that
only a subset of all users is FL-eligible in practice.
TRAINING CRITERIA
DEVICES AVAILABLE
A: CONNECTED TO WIFI
B: BATTERY LEVEL ≥ 80%
C: OS RELEASE ≥ SEPT. 2019
A ∩ B ∩ C
70%
34%
93%
22%
In Table 1, we specify a restrictive scenario where conditions
A, B, and C must all be met, leaving only 22% of the clients
available for FL participation. In this scenario, the training
task may require various permissions from the device that
may not be available in the background to complete all the
sub-tasks (model download/upload, data processing, model
evaluation, metrics reporting, etc.). This worst-case assump-
tion helps to de-risk potential platform-specific changes to
background task permissions. Naturally, app usage duration
is tail-heavy and poses a challenge in completing training
during short durations of availability.
3.3 Proxy Data Generator
To benchmark existing models in FL under realistic hetero-
geneous conditions, we provide the modeler with a tool to
generate per-device proxy datasets from training data in our
centralized catalog. In our experiments, the proxy datasets
need to be no bigger than centralized training to achieve
similar performances. When available, the modeler selects
a partitioning field such as obfuscated member or device
identifier. The generator uses this field to map records to FL
clients. When privacy is a concern, the centralized dataset's
FLINT: A Platform for Federated Learning Integration
client-level identifier is discarded. In these cases, synthetic
partitioning strategies (Li et al., 2022) can inject label and
data quantity skew between the partitions modeled by a
Dirichlet distribution. To evaluate the model under vary-
ing data heterogeneity, developers can generate multiple
versions of a synthetically-split proxy dataset. After gen-
erating a proxy, the tool stores it back to the data catalog,
adding FL-specific metadata describing feature distributions,
client data quantity, label distribution, and client population.
These characteristics provide an important understanding
of the data heterogeneity between clients (Figure 5 and
Table 2).
cache it for reuse to reduce latency.
Table 2. Characteristics of sample proxy datasets that are heav-
ily down-sampled on a client level. The max/avg/std values are
calculated from client data quantity.
DATASET A DATASET B DATASET C
CLIENT POP.
MAX RECORDS
AVG RECORDS
STD RECORDS
LABEL RATIO
LOOKBACK DAYS
700,000
39,731
99
667
0.28
90
1,024,950
103,471
184
374
0.05
28
16,422,290
406
1.53
1.47
0.06
61
Figure 5. The quantity distribution of key proxy datasets from
different domains used in the evaluation, showing that the data
sizes between clients in different domains can greatly vary.
Data Locality. Though FL can effectively move compute
to the data source, the device runtime should still be able to
access cloud-based data through network communication
when doing so provides systems and model performance
benefits. For some tasks, it may be optimal to pull ready-
to-use features from the cloud on-demand and join them
with device-based contextual features. This reduces the stor-
age and compute footprint of storing and processing large
features like embeddings on the device. Meanwhile, infer-
ence records containing smaller cloud-based features can
be cached on the device to reduce network-induced latency
during training data processing. Additionally, many models
require vocabulary files, which contain a set of string to
integer ID mappings for features in a dataset, to encode
strings into vector values during data processing. The de-
vice runtime can pull or cache these files depending on
storage usage, WiFi connectivity, and the resource and la-
tency requirements of the task. To allow experimenting with
combinations of feature management strategies for various
applications, FLINT provides a feature catalog (Figure 6)
that manages 1) the device-based features' retention policies
and data size limits through cloud-based metadata, 2) the
caching strategy of cloud-based features on user devices,
and 3) where feature transformations happen. The device
feature management and caching also allow multiple appli-
cations to use overlapping features without duplicated work;
when a feature value is created for one task, the runtime can
Figure 6. The architecture of a device-cloud feature catalog that
manages both device-side and cloud-side features. Certain features
and mapping vocabulary can be pulled from the cloud and cached
during inference and training. Processed features can also be
cached for reuse.
3.4 Experimental Framework
A holistic experimental framework for FL should not only
produce model metrics, but also system metrics under re-
alistic constraints. One goal is to understand the return on
investment of FL applications under measured system con-
straints. Another is to predict the infrastructure needs of
such a system. An added benefit is that modelers can better
understand and tune the FL parameters before deploying
jobs to devices because offloading all the hyper-parameter
tuning workloads to production leads to wasted user re-
sources. Our framework builds on top of and significantly
extends an open-source FL benchmarking platform to fit
our requirements. Deployed on centralized ML clusters,
a group of executors poll tasks to run from a leader node,
which manages client selection, tracks virtual time, and
calculates systems metrics.
Inputs and Assumptions. In practice, the systems con-
straints discussed earlier all affect FL's training performance.
As such, our framework takes multiple real-world inputs
to incorporate the complex interactions among these fac-
tors in its simulations. First, each executor loads a parti-
tion of the proxy dataset and maps its records to clients.
Then, the leader loads and uses device availability records
for client selection and task completion decisions. It then
FLINT: A Platform for Federated Learning Integration
consumes the model's on-device benchmarks (model foot-
print, processing-time, network usage, etc.), along with the
hardware/OS distribution of the users. With these detailed
inputs, our framework can report model and system metrics
over both virtual clock time and communication rounds to
account for data heterogeneity, model complexity, device
availability, and hardware capability.
Synchronous and Asynchronous Training. Our frame-
work supports synchronous FedAvg (McMahan et al., 2017)
and asynchronous FedBuff (Nguyen et al., 2022) training
modes. In practice, client selection is largely dictated by
client arrival and availability. Hence, our framework directly
selects the next available device from the input sessions at a
given virtual time and dispatches a task to an executor. The
framework reports results over a virtual time that's calcu-
lated independently of the underlying hardware clock. This
allows for a better representation of the system in practice
when estimating how long a job needs to run, or how much
compute time needs to be spent on the device. Even before
a client task is dispatched to an executor, the task's duration
is calculated using the inputs provided. To estimate client
k's task duration, we sample t ← T , the distribution of
time to train a single example from on-device benchmarks;
we also sample a network bandwidth N from Puffer (Yan
et al., 2020), an open-source dataset containing edge device
network speeds. Let E be the number of local epochs, M be
the size of a gradient update, and |Dk| be client k's partition
size, taskDuration(k) = t ∗ E ∗ |Dk| + 2∗M
N .
While the asynchronous mode is simpler to implement in a
real-time system, it is more difficult to schedule tasks in the
right order in a fast-forwarded and distributed simulation.
To resolve this, the leader node uses a priority queue-based
task scheduler to generate tasks in a streaming fashion and
dispatch them to workers in the correct order. From evalu-
ations of different models, we observe that the benefits of
an asynchronous system depend on the spread of the client
task durations. We offer two explanations on why FedBuff
(Nguyen et al., 2022) offers faster convergence (Table 3):
1) fewer client tasks have to be started because the aggrega-
tion tolerates stale updates, while FedAvg (McMahan et al.,
2017) throws away all stragglers; 2) more client tasks can be
started due to the asynchronous task scheduling. The effects
of 1) and 2) are greater when the client task durations are
heavy-tailed and the staleness limit is higher.
Scalability and Fault Tolerance. Using large existing ML
clusters and a familiar job management tool, developers
can easily simulate millions of clients with our framework.
To increase parallelism, a nuance of our proxy data gener-
ator tool from Section 3.3 is that it outputs one partition
per executor rather than one file per FL client; each par-
tition contains a set of unique clients for an executor to
load into memory, which speeds up the random access of
Table 3. Projected training time speedup of FedBuff over FedAvg.
The "client tasks started" statistic includes failed and stale tasks
which are not aggregated. Client computation is the projected sum
of processing time on all devices.
TASK A TASK B
TASK C
FEDBUFF SPEED-UP
CLIENT TASKS STARTED
CLIENT COMPUTATION
1.2X
48.8K
7.5 HRS 6.8 DAYS 25.9 DAYS
6X
32.3K
2X
610K
client records during training. To support multi-versioned
proxies with millions of clients, this strategy prevents an
explosion of namespaces on the pipeline storage, which is
typically HDFS or cloud blob stores. Furthermore, storing
many clients' records together in a file improves the com-
pression ratio. If each partition still exceeds the memory of
the executor, the data can be additionally split by timestamp
and swapped in and out during the simulation. This allows
a cluster of 20 executors to process over 60,000 client tasks
per hour for Task C in Table 3; the system scales horizontally
and can gracefully handle millions of clients (Table 2).
For very large experiments, a job could run for days on more
than 100 machines. At this scale, the job needs to be fault-
tolerant and self-healing. To recover from executor failures,
the leader node halts dispatching tasks until all executors
have pinged it with a healthy status-code. If a leader node
fails, all the executors wait until it is back online to proceed
polling for tasks. Since the leader frequently checkpoints
the virtual time and recent model weights to the pipeline
storage, any restarted leader and executor can resume from
the checkpoints without losing more than one round of work.
Parameter Tuning. An FL system introduces many more
parameters to tune, e.g. cohort size, asynchronous buffer
size and staleness limits. For example, cohort size is a key
parameter that can determine data efficiency and model con-
vergence (Charles et al., 2021), but may have a different
optimal value for each application. However, once a model
is deployed, parameter tuning should be done sparingly to
responsibly leverage users' device resources. Additionally,
our empirical results (Figure 10) show that model perfor-
mance under random client sampling can be unstable be-
cause clients selected in earlier rounds heavily impact a
model's final performance. Our experimental framework
runs multiple trials of each configuration to report error-
bounded metrics. Though such noise can still complicate
parameter tuning, parameters selected from proxy datasets
can often effectively translate to real FL tasks (Kuo et al.,
2022). Our framework also provides users with an under-
standing of the relationship between different parameters
and model/system metrics. Figure 7 shows the relation-
ship between FedBuff's buffer size parameter and estimated
round duration. Figure 10 shows how learning rate sched-
FLINT: A Platform for Federated Learning Integration
ules can affect training stability.
3.5 Forecasting System Resource
Besides model performance, the FL platform should fore-
cast the overall resource needs from the cloud and user
devices, helping engineers optimize the resource efficiency
of the system and prevent overloading the finite device and
infrastructure capacity. This can help manage the carbon
footprint of edge training jobs, since they can be less energy
efficient than centralized training. Moreover, renewable
energy access at the edge is much more limited due to geo-
graphical diversity (Wu et al., 2022).
Figure 7. Buffer size settings vs time duration to populate the
buffer during a sample model's FL training with max concurrency
= 180; having a realistic estimation of time during offline evalua-
tion help modelers understand the impact of different parameters.
Reducing Device Resource Consumption. In addition to
cloud infrastructure costs, a device-cloud platform should
account for total edge resource utilization in its notion of
budget. As more FL-enabled apps begin sharing the same
finite amount of device resources, imposing such a budget
can incentivize teams to reduce both cloud and device re-
source footprint. Centralized ML jobs typically specify the
workers needed to complete the workload in a reasonable
amount of time. While more workers may increase par-
allelism, it could reduce per-worker utilization, resulting
in wasted budget. Similarly in FL, if concurrency is too
high, more updates become stale and discarded (see Figure
8). The efficiency of an FL system can be measured with
task completion, stragglers, and total device computation
time. Our framework reports model performance over these
variables so that parameters can be adjusted to reduce the
overall user resource footprint. Due to differences in model
and data complexity discussed earlier, the sample model for
Task C from Table 3 consumes 620 hours (25.9 days) of
client compute time to converge, while the sample model
from Task A only takes less than 8 hours. The total device
time is calculated as (cid:80)K
k taskDuration(k), where K is
the sequence of clients that had performed training.
Infrastructure Requirements. Since the trainer in a cross-
Figure 8. Succeeded, interrupted, and stale client tasks under dif-
ferent concurrency and max staleness settings in FedBuff. Higher
concurrency can increase both client tasks started and the amount
of wasted tasks. Higher staleness tolerance can decrease stale tasks
but could slow down learning with older gradients.
device FL pipeline is online by nature and handles requests
in real-time, a projection of each training job's infrastruc-
ture needs is necessary for the modeler to ensure there are
enough resources to handle their FL job throughout heavy
load swings (Figure 2). When multiple FL applications coex-
ist, it is likely for resource contention to occur if they share
the same pool of workers for aggregation and coordination.
The training duration projected by the experimental frame-
work helps to schedule FL workloads efficiently and prevent
overloading the service workers due to task overlaps, espe-
cially when Trusted Execution Environments (TEE) with
limited bandwidth (Huba et al., 2022) are used for secure
aggregation. In Task C in Table 3, an asynchronous setting
where we assume client arrival is uniform, the model takes
48 hours to aggregate 610k tasks (3.53 updates/s). Multi-
plied by the size of each gradient update (Table 5), a TEE
needs to receive and aggregate only 2.68MB/second of up-
dates. This demonstrates the framework's ability to project
cloud resource needs ahead of deployment based on factors
like model size and concurrency.
3.6 Privacy and Security
Although FL greatly improves user privacy and security
by leaving sensitive data on the device, achieving desired
privacy properties may still require introducing additional
privacy enhancing technologies (PETs) into the system
(Kairouz et al., 2021). Currently, developers/security engi-
neers audit the system on a case-by-case basis, since each
project has different risk tolerance and privacy budgets. Our
experimental framework can help developers and security
experts evaluate the model and resource trade-offs of tech-
niques like FL with differential privacy (FL-DP) (Kairouz
et al., 2021), secure aggregation (SecAgg) (Mo et al., 2021),
and robust training (Wong et al., 2020) against adversarial
attacks (Sun et al., 2019). Our SecAgg uses TEEs for re-
FLINT: A Platform for Federated Learning Integration
Figure 9. The proposed decision workflow to analyze and bring cross-device FL into production.
mote attestation (Huba et al., 2022), making it compatible
with async FL.
3.7 Decision Workflow
A standard process to bring FL projects to life at LinkedIn
simplifies many of the production ML operations (MLOps)
complexities introduced by FL. We propose a decision work-
flow in Figure 9 that uses the components of the hybrid FL
platform to ensure that the important risks and challenges of
each FL project are practically assessed before deployment
reaches the users. This covers all aspects of the system, from
understanding the client data, compute, and availability, to
estimating resource impact, model performance, and priva-
cy/security risks. The process complements the proposed
FL/ML platform, leveraging the platform's tools in each of
the steps.
4 CASE STUDIES
We apply our decision workflow on three business-critical
domains: advertising, messaging, and search. We present
the empirical results (Tables 4 and 5), discussing the benefits,
systems/performance trade-offs and newfound challenges in
the context of the evaluations. Each model is at parity with
the centralized model or suffers slight performance loss due
to 1) FL's constraints and 2) proxy datasets exclude some
features that are only available on-device.
Table 4. Projected FL training time to reach convergence for each
domain's representative model. The performance difference is
the median of the FL model's offline metric over N=15 trials
compared to the centralized model. We measure ads and messaging
performance with Area Under Precision-Recall Curve (AUPR),
and search with Normalized Discounted Cumulative Gain (NDCG).
In all cases, performance can reach an acceptable range under FL's
constraints when compared with centralized training.
ADS
MESSAGING SEARCH
TRAINING TIME
PERFORMANCE DIFF.
4.2 DAYS 18.9 HRS
-1.85% -0.18%
2.58 HRS
-1.64%
4.1 Advertising
Privacy in machine learning has received significant atten-
tion in recent years. Traditional machine learning in the
digital advertising industry relies on collecting user data for
measurement, targeting, and click/conversion predictions.
By reducing sensitive data tracking, cross-device FL enables
private model training that can improve advertising qual-
ity, member trust and safety. In this section, we describe
the detailed steps we took to evaluate FL on an advertising
use case, and the results that demonstrate the potential of
moving to cross-device FL while revealing several practical
challenges.
Client Participation and Availability. First, we define our
client participation criteria: (a) app is open in the foreground,
(b) battery level > 80%, and (c) connected to WiFi. Our cri-
teria are designed to be conservative, choosing to err on the
side of classifying a device as not FL-ready when in doubt.
For example, we require (a) because if for some reason CPU
or battery usage spikes when the app is in the background,
a phone OS could choose to kill our training process. To
eliminate this possibility altogether, we do not count any
app background time as time we can use for FL. We then
use these filters to generate device availability traces. We
query for two weeks of anonymized session data from the
LinkedIn app, since usage tends to exhibit weekly period-
icity. Short gaps where the app is in the background are
subtracted from the availability session duration, whereas
longer gaps split a session into two. Since we only have
battery level and WiFi connectivity data for a smaller sub-
set of mobile usage, we calculate empirical probabilities of
WiFi connection and high battery level over time (Table 1).
For each session from our query, we perform a weighted
coin-flip based on the session's start time to decide whether
to include or exclude it from the output device traces.
Building a Proxy Dataset. Next, we use a centralized
dataset in advertising that is down-sampled on a client level
to preserve the natural quantity and label skew. We then
analyze the feature locality of the data to move it into an
on-device setting. In this domain, a candidate is typically a
FLINT: A Platform for Federated Learning Integration
Table 5. On-device evaluation of device-capable model architectures selected to represent common ML tasks at LinkedIn. We report mean
training times and CPU utilization % for each model over 5,000 records, aggregated across 27 devices with diverse hardware.
Model Description
Trainable
Params
Storage
(MB)
Network
(MB)
Memory
(MB)
Mean
Time (s)
Stdev
Time (s)
Mean
CPU (%)
A
B
C
D
E
Tiny Neural Net
MLP w/ sparse features
MLP w/ medium embedding
CNN w/ large embedding
Multi-task MLP
1.51k
189k
208k
390k
922k
0.057
0.76
0.85
10.79
7.52
0.11
1.52
1.88
3.12
7.38
3.08
10.64
0.85
8.37
43.14
4.98
61.81
3.26
70.13
238.38
3.37
44.17
2.23
50.82
178.13
1.63
3.91
5.29
4.72
6.43
potential advertisement to display or an targeting-segment
that is scored in the context of the user. This application
retrieves 184 candidates in a single request on average from
the server, which includes some server-side features. Af-
terwards, each candidate is decorated with client-side fea-
tures and similarity scores are calculated. To create a proxy
dataset, we create a client id field based on the member id,
and map each unique id to an integer for further anonymiza-
tion. Then, we run a Spark job that groups the examples by
client ids and computes inter-client statistics. Through this
analysis, we find that client data is non-IID and extremely
tail-heavy due to users engaging disproportionately more on
the app (std. of 667, and max of 39,731 records).
Selecting a Mobile-ready Model. Next, we analyze three
model architectures that are tested in a centralized setting.
Models that need to be deployed in third-party apps via
an SDK have stricter size requirements (<1MB), while
critical models in the first-party app have looser storage
constraints (<10MB). Thoroughly evaluating resource foot-
print requires taking measurements on device, since model
complexity alone is not a good predictor (compare the re-
source footprints between Models A, B, and C in Table 5).
We convert our three candidate models to a TFLite format,
and deploy them for training on dummy data to 27 different
devices on AWS Device Farm in our benchmarking app.
Out of the three architectures, we picked the model that
satisfies the size requirement mentioned earlier at 0.76MB
and consumed the least network and memory. This also
helps us validate that the ops bundled with the ML runtime
are sufficient to execute the model training.
While we observe that the model training footprint is ac-
ceptable, model assets may pose a challenge. During data
processing, the feature transformer must map more than
70% of its features from categorical values to unique indices
through vocabulary files during the data pre-processing step.
Though these mappings work well in a centralized setting,
the device must refresh and store vocab files as assets, which
could be as big as 1.28MB for high-cardinality variables. To
overcome the memory and disk constraints, feature hashing
(Weinberger et al., 2009) can perform the mapping through
a hash function, trading less storage space with lower pre-
dictive power (due to hash collisions).
Systems and Model Performance. Next, we partition the
proxy dataset for 20 workers by client id in a round-robin
fashion to enable faster job execution time in a cluster. This
number is picked roughly based on the total data size divided
by the memory available per worker. Our job config speci-
fies the device traces, on-device performance distributions
produced earlier, and other hyper-parameters to realistically
evaluate the FL training. Shown in Figure 10, model perfor-
mance under random client sampling can be highly variable
due to data heterogeneity, as the clients selected in the ear-
lier rounds can determine the model's convergence. We use
such experiments to tune parameters (such as the learning
rate schedule in Figure 10) before production deployment.
With the scalability of the framework, we repeat each trial
5 times to estimate an error bound. We decide that the
projected training time of 4.2 days is an acceptable SLA
when FedBuff async training is enabled, as the centralized
counterpart only needs to be retrained weekly. The perfor-
mance difference in Table 4 is also acceptable; since this
on-device deployment helps meet critical compliance and
regulation requirements in the ads industry, there is a higher
tolerance for accuracy degradation (up to 5%). Moreover,
the proxy dataset is only a subset of all the signals that can
be consumed on device; hence it's a worst-case estimation.
Figure 10. AUPR of an example model trained using two different
exponential decay LR schedules on N=5 trials each. This shows a
good learning rate schedule can improve training stability.
Security and Privacy. Transitioning from a centralized
FLINT: A Platform for Federated Learning Integration
setting where signals are collected, the data minimization al-
ready greatly improves the product's privacy budget without
any additional PETs. Nonetheless, we project the data trans-
fer bandwidth needed from a TEE is under 3MB/s, which is
sufficiently within the limit. From the security evaluation
of this case study, in which the model is distributed via an
SDK, we identify a new attack scenario if it is possible for
the SDK's host application to control a significant portion of
the FL participants, hence poisoning the data or updates of a
group of clients. This unique hub-and-spoke setup prompts
further security research on detection and defenses.
4.2 Messaging
Consumer messaging applications often contain highly con-
fidential data and are encrypted end-to-end. This poses
restrictions on the data that on-premise ML tasks like abuse
detection and smart-inbox features could use. Cross-device
FL enables message data to be used for training in its orig-
inal state on the device. To create a proxy dataset without
data decryption, we partition a dataset of synthetic messages
used for centralized training. The FL training achieves a
promising performance compared to the centralized train-
ing, with only a 0.18% difference in the test metrics. This
difference is negligible given the improved freshness of the
training data, which helps the global model quickly adapt
to user feedback. Lastly, the evaluation process helps us
identify practical on-device challenges in this domain.
Size of Text Embeddings. Large mobile apps can discour-
age downloads and increase uninstalls. Many deep NLP
models contain word embedding tables to map text tokens
into fixed-size embeddings that are fed into the rest of the
layers. One of our centralized models in the messaging do-
main initially has a 150 million parameter embedding layer
greater than 500MB, prohibiting on-device deployment. Re-
ducing the vocabulary from 500K words to 50k and the
embedding dimension from 300 to 50 leads to a 60-fold size
decrease, fitting the 10MB size constraint. Other solutions
include embedding compression methods like TT-Rec (Yin
et al., 2021) or MEmCom (Pansare et al., 2022). Finally,
the application can bundle a text embedding that's shared
by NLP models in different domains (search, recommenda-
tions, etc.), and download a smaller language-specific subset
of the corpus based on the user's language.
Security. Evasion attacks involve adversaries carefully
crafting samples fed into the model to change the inference
result, presenting a practical concern for message abuse and
scam detection models during inference time. Access to the
model is especially a concern if a bad actor could decrypt
the weights stored on the device. Existing defenses involve
robust training, but generating adversarial examples during
training can be expensive, (Wong et al., 2020; Hao et al.,
2022) even more so on the device. This introduces a tradeoff
between model robustness and resource consumption. Data
poisoning attacks are another concern when enough users
coordinate to generate fake messages and corresponding
actions, though this usually requires adversaries controlling
an impractical portion of the population (Shejwalkar et al.,
2022). Using the FLINT platform, our decision workflow
enables evaluating new mitigation strategies; for instance,
a more robust client selection criteria that incorporates the
user's reputation score and account age, or continuous FL
training to adapt recent user feedback.
4.3 Search
In industry, FL has been used in browser URL bar sugges-
tions by locally training on private browsing history (Hart-
mann et al., 2019) and ranking keyboard suggestions (Hard
et al., 2018a). Naturally, training ranking tasks on device
allows directly using the displayed candidates and user feed-
back to generate training data directly on the device. At
LinkedIn, most production search workflows are bounded
by strict latency budgets in the sub-100ms range (Guo et al.,
2021). Query autosuggestion and completion require instant
predictions to feel responsive; search ranking models need
regular retraining to reflect search trends. On-device ML
has the potential to improve model freshness and reduce
inference latency. In ranking tasks, the application can lo-
cally cache, retrieve, and rank frequent documents without
any network communication. For language generation tasks
like query completion, locally-trained LSTMs can generate
more personalized search suggestions using partial queries.
Our evaluation of a low-latency model in the search domain
shows a performance difference of only 1.64% (Table 4)
when trained on FL under realistic system constraints, with
minimal device resource usage. Moreover, FL training can
reduce the resources needed to store/ETL data and regularly
retrain models in data centers. However, similar to adver-
tising, training data in search can have a very high quantity
skew because of "superusers".
5 RELATED WORK
Systems for Federated Learning. Several large-scale
cross-device FL systems have been proposed in recent years,
most notably Google's GFL system (Bonawitz et al., 2019),
Apple's FL system (Paulik et al., 2021a), and Meta's PA-
PAYA (Huba et al., 2022). The designs of our service and
client run-time draw inspiration from all of them. Our de-
sign echoes PAPAYA by supporting both sync and async,
selecting clients based on demand by active tasks. Our sync
mode is similar to GFL's round-based design and uses client
over-commitment to handle dropouts.
Evaluation Frameworks. To build the experimental frame-
work, which to the best of our knowledge is first described
FLINT: A Platform for Federated Learning Integration
in this paper, we considered many existing open-source
FL toolkits that provide simulation capability, e.g., TFF
(Bonawitz et al.), FLUTE (Dimitriadis et al., 2022), Flower
(Beutel et al., 2022), and FedML (He et al., 2020). While
they provide a variety of models, datasets, and algorithms
for benchmarks, they report results over communication
rounds. Our design expands on FedScale (Lai et al., 2022),
reporting both model and system metrics reported over a vir-
tual time and communication rounds to account for model
complexity, device availability, compute and network, etc.
FL Benchmarks. Many popular cross-device FL bench-
marks (Caldas et al., 2018) are focused on CV and NLP
tasks (FEMNIST, CIFAR10, Reddit, Shakespeare etc.), and
have helped drive FL research and algorithmic improve-
ments in the recent years. In general, our work prompts
the design of more tabular FL datasets with sparse features,
noisy and imbalanced labels, and heavy data quantity skew.
This is representative of in-app user behavior in the wild,
where data is often scarce and noisy, and superusers domi-
nate. An equally important consideration for realistic bench-
marks is whether the models that are benchmarked can be
deployed to lower-end user devices (and be small enough
to co-exist with other models in a mobile app). We suggest
researchers report a measure of model size and on-device
resource usage with the benchmarks of FL models.
The open-source benchmarks implemented in FedScale (Lai
et al., 2022) are close proxies for our case studies given
the naturally-partitioned datasets. The Taobao Ad Display /
Click dataset (label ratio: 5.4%, clients: 1.1 mil, mean: 23,
std: 65) is a good proxy for our advertising scenario because
it captures the scarcity of user response. Models B and C
from Table 5 fit in the ballpark in terms of architecture, size
and performance requirements. For message classification
tasks, the Amazon Review dataset is a good proxy (clients:
256,059, mean: 2.2, std: 4.4). Section 4.2 describes the
model architecture deployed in a typical message classifi-
cation task. As for next-word query prediction in search,
we believe there are already mature benchmarks such as
Stackoverflow and Reddit, modeled by on-device LSTMs
(Hard et al., 2018b). In search ranking, there is a gap for a
federated learning-to-rank dataset with a natural partition-
ing. Lastly, FedScale incorporates device availability traces
from (Yang et al., 2021), which captures a similar weekly
fluctuation pattern with a difference of 4x between peak and
low, given the device is plugged-in and idle. Our availabil-
ity in Figure 2 fluctuates by a factor of 14x due to strict
participation requirements and geographically-based usage
patterns, serving as an upper-bound. The device traces an be
re-sampled and adjusted based on the deployment scenario.
ML Platforms. The learning algorithm itself is only one
component of an ML platform (Sparks et al., 2017). Sys-
tematically deploying ML in production has received large
attention over the past decade with many available MLOps
and platform solutions (Baylor et al., 2017; Zaharia et al.,
2018) because gluing together disjoint components may
do a job once, but often leads to significant technical debt
(Sculley et al., 2015). With increasing data and model sizes,
many parallelism techniques require the orchestration of dis-
tributed systems (Sergeev & Del Balso, 2018; Moritz et al.,
2018). Lastly, ML platforms need to be user-friendly via au-
tomation and declarative solutions so that even non-experts
can leverage ML (Kraska et al., 2013).
FL Platforms. The concept of device-cloud collaborative
ML platforms is not new. Alibaba's Wall-E (Lv et al., 2022)
provides a deployment platform and high-performance mo-
bile compute runtime for on-device tasks. To the best of our
knowledge, FLINT is the first to fill the important gaps to
allow an effective coexistence of centralized and on-device
ML applications. We believe such a platform should per-
form all the tasks of an ML platform while providing the
tools to analyze and make decisions based on the systems
and data challenges inherent to FL.
6 CONCLUDING REMARKS
As shown by our evaluations of three business-critical ML
applications, a cloud-device collaborative FL platform can
help ML developers and decision makers practically assess
the systems constraints, costs, and benefits of production
FL projects. Leveraging the platform, a systematic decision
workflow can help teams responsibly bring FL projects to
hundreds of millions of users at LinkedIn. Our results also
confirm that in industry scenarios where users could benefit
from improved system performance and data privacy, FL
has the potential to replace centralized training.
In literature, most cross-device FL benchmarks and systems
are designed to process purely device-generated data (text,
voice, image), and their components operate in standalone
FL platforms. As shown in our practical scenarios, the mod-
el/system performance and user experience in FL can greatly
benefit from a collaboration of device-side and cloud-side
data and systems. Hence we emphasize further innovations
in the device-cloud platform space.
ACKNOWLEDGEMENTS
We would like to thank Lu An, Sudhanshu Arora, Oscar
Bonilla, Ting Chen, Alexey Dubovkin, Ebrahim Emami,
Humberto Gonzalez, Ankit Goyal, Mingyang Hu, Abelino
Jimenez, Raghavan Muthuregunathan, Haowen Ning, Ray
Ortigas, Yafei Wang, YuanKun Xue, Hao Yu, Leighton
Zhang, Haifeng Zhao, and Tong Zhou for their valuable
feedback on this work. Further, we thank Siyao Sun, Rahul
Tandra, Zheng Li and Souvik Ghosh for their continuous
support throughout this project.
FLINT: A Platform for Federated Learning Integration
REFERENCES
Apple.
App tracking transparency.
URL https:
//developer.apple.com/documentation/
apptrackingtransparency. Accessed: 2022-10-
20.
Baylor, D., Breck, E., Cheng, H.-T., Fiedel, N., Foo, C. Y.,
Haque, Z., Haykal, S., Ispir, M., Jain, V., Koc, L., et al.
Tfx: A tensorflow-based production-scale machine learn-
ing platform. In Proceedings of the 23rd ACM SIGKDD
International Conference on Knowledge Discovery and
Data Mining, pp. 1387–1395, 2017.
Beutel, D. J., Topal, T., Mathur, A., Qiu, X., Fernandez-
Marques, J., Gao, Y., Sani, L., Li, K. H., Parcollet, T.,
de Gusm ̃ao, P. P. B., et al. Flower: A friendly federated
learning framework. 2022.
Bonawitz, K., Eichner, H., Grieskamp, W., et al. Tensorflow
federated: machine learning on decentralized data.(2020).
Bonawitz, K., Eichner, H., Grieskamp, W., Huba, D., Inger-
man, A., Ivanov, V., Kiddon, C., Koneˇcn`y, J., Mazzocchi,
S., McMahan, B., et al. Towards federated learning at
scale: System design. Proceedings of Machine Learning
and Systems, 1:374–388, 2019.
Caldas, S., Duddu, S. M. K., Wu, P., Li, T., Koneˇcn`y, J.,
McMahan, H. B., Smith, V., and Talwalkar, A. Leaf:
arXiv preprint
A benchmark for federated settings.
arXiv:1812.01097, 2018.
Charles, Z., Garrett, Z., Huo, Z., Shmulyian, S., and Smith,
V. On large-cohort training for federated learning. Ad-
vances in neural information processing systems, 34:
20461–20475, 2021.
Chen, M., Mathews, R., Ouyang, T., and Beaufays, F. Feder-
ated learning of out-of-vocabulary words. arXiv preprint
arXiv:1903.10635, 2019.
Dimitriadis, D., Garcia, M. H., Diaz, D. M., Manoel, A.,
and Sim, R. Flute: A scalable, extensible framework for
high-performance federated learning simulations. arXiv
preprint arXiv:2203.13789, 2022.
GDPR. General data protection regulation. URL https:
//gdpr-info.eu/. Accessed: 2022-10-25.
Guo, W., Liu, X., Wang, S., Kazi, M., Wang, Z., Fu, Z.,
Jia, J., Zhang, L., Gao, H., and Long, B. Deep natural
language processing for linkedin search. arXiv preprint
arXiv:2108.13300, 2021.
Hao, W., Awatramani, A., Hu, J., Mao, C., Chen, P.-C.,
Cidon, E., Cidon, A., and Yang, J. A tale of two models:
Constructing evasive attacks on edge models. Proceed-
ings of Machine Learning and Systems, 4:414–429, 2022.
Hard, A., Rao, K., Mathews, R., Ramaswamy, S., Beaufays,
F., Augenstein, S., Eichner, H., Kiddon, C., and Ramage,
D. Federated learning for mobile keyboard prediction.
arXiv preprint arXiv:1811.03604, 2018a.
Hard, A., Rao, K., Mathews, R., Ramaswamy, S., Beaufays,
F., Augenstein, S., Eichner, H., Kiddon, C., and Ramage,
D. Federated learning for mobile keyboard prediction.
arXiv preprint arXiv:1811.03604, 2018b.
F.
Hartmann,
federated
//ai.googleblog.com/2021/11/
predicting-text-selections-with.html.
Predicting text
2021.
selections with
URL https:
learning,
Hartmann, F., Suh, S., Komarzewski, A., Smith, T. D., and
Segall, I. Federated learning for ranking browser history
suggestions. arXiv preprint arXiv:1911.11807, 2019.
He, C., Li, S., So, J., Zeng, X., Zhang, M., Wang, H., Wang,
X., Vepakomma, P., Singh, A., Qiu, H., et al. Fedml: A
research library and benchmark for federated machine
learning. arXiv preprint arXiv:2007.13518, 2020.
Horvath, S., Laskaridis, S., Almeida, M., Leontiadis, I.,
Venieris, S., and Lane, N. Fjord: Fair and accurate feder-
ated learning under heterogeneous targets with ordered
dropout. Advances in Neural Information Processing
Systems, 34:12876–12889, 2021.
Huba, D., Nguyen, J., Malik, K., Zhu, R., Rabbat, M.,
Yousefpour, A., Wu, C.-J., Zhan, H., Ustinov, P., Srinivas,
H., et al. Papaya: Practical, private, and scalable federated
learning. Proceedings of Machine Learning and Systems,
4:814–832, 2022.
Kairouz, P., McMahan, H. B., Avent, B., Bellet, A., Bennis,
M., Bhagoji, A. N., Bonawitz, K., Charles, Z., Cormode,
G., Cummings, R., et al. Advances and open problems in
federated learning. Foundations and Trends® in Machine
Learning, 14(1–2):1–210, 2021.
Kraska, T., Talwalkar, A., Duchi, J. C., Griffith, R., Franklin,
M. J., and Jordan, M. I. Mlbase: A distributed machine-
learning system. In Cidr, volume 1, pp. 2–1, 2013.
Kuo, K., Thaker, P., Khodak, M., Ngyuen, J., Jiang, D., Tal-
walkar, A., and Smith, V. On noisy evaluation in federated
hyperparameter tuning. arXiv preprint arXiv:2212.08930,
2022.
Lai, F., Dai, Y., Singapuram, S., Liu, J., Zhu, X., Mad-
hyastha, H., and Chowdhury, M. FedScale: Benchmark-
ing model and system performance of federated learning
at scale. In International Conference on Machine Learn-
ing, pp. 11814–11827. PMLR, 2022.
FLINT: A Platform for Federated Learning Integration
Li, Q., Diao, Y., Chen, Q., and He, B. Federated learning
on non-iid data silos: An experimental study. In 2022
IEEE 38th International Conference on Data Engineering
(ICDE), pp. 965–978. IEEE, 2022.
Li, T., Sahu, A. K., Zaheer, M., Sanjabi, M., Talwalkar, A.,
and Smith, V. Federated optimization in heterogeneous
networks. Proceedings of Machine Learning and Systems,
2:429–450, 2020.
Lv, C., Niu, C., Gu, R., Jiang, X., Wang, Z., Liu, B., Wu, Z.,
Yao, Q., Huang, C., Huang, P., et al. Walle: An end-to-
end, general-purpose, and large-scale production system
for device-cloud collaborative machine learning. arXiv
preprint arXiv:2205.14833, 2022.
McMahan, B., Moore, E., Ramage, D., Hampson, S., and
y Arcas, B. A. Communication-efficient learning of deep
networks from decentralized data. In Artificial intelli-
gence and statistics, pp. 1273–1282. PMLR, 2017.
Mo, F., Haddadi, H., Katevas, K., Marin, E., Perino, D., and
Kourtellis, N. Ppfl: privacy-preserving federated learning
In Proceedings
with trusted execution environments.
of the 19th Annual International Conference on Mobile
Systems, Applications, and Services, pp. 94–108, 2021.
Moritz, P., Nishihara, R., Wang, S., Tumanov, A., Liaw, R.,
Liang, E., Elibol, M., Yang, Z., Paul, W., Jordan, M. I.,
et al. Ray: A distributed framework for emerging {AI}
applications. In 13th USENIX Symposium on Operating
Systems Design and Implementation (OSDI 18), pp. 561–
577, 2018.
Nguyen, J., Malik, K., Zhan, H., Yousefpour, A., Rabbat,
M., Malek, M., and Huba, D. Federated learning with
buffered asynchronous aggregation. In International Con-
ference on Artificial Intelligence and Statistics, pp. 3581–
3607. PMLR, 2022.
Pansare, N., Katukuri, J., Arora, A., Cipollone, F., Shaik, R.,
Tokgozoglu, N., and Venkataraman, C. Learning com-
pressed embeddings for on-device inference. Proceedings
of Machine Learning and Systems, 4:382–397, 2022.
Paulik, M., Seigel, M., Mason, H., Telaar, D., Kluivers, J.,
van Dalen, R., Lau, C. W., Carlson, L., Granqvist, F.,
Vandevelde, C., et al. Federated evaluation and tuning for
on-device personalization: System design & applications.
arXiv preprint arXiv:2102.08503, 2021a.
Paulik, M., Seigel, M., Mason, H., Telaar, D., Kluivers, J.,
van Dalen, R., Lau, C. W., Carlson, L., Granqvist, F.,
Vandevelde, C., et al. Federated evaluation and tuning for
on-device personalization: System design & applications.
arXiv preprint arXiv:2102.08503, 2021b.
Ramaswamy, S., Mathews, R., Rao, K., and Beaufays, F.
Federated learning for emoji prediction in a mobile key-
board. arXiv preprint arXiv:1906.04329, 2019.
Sculley, D., Holt, G., Golovin, D., Davydov, E., Phillips, T.,
Ebner, D., Chaudhary, V., Young, M., Crespo, J.-F., and
Dennison, D. Hidden technical debt in machine learning
systems. In NIPS, 2015.
Sergeev, A. and Del Balso, M. Horovod: fast and easy
distributed deep learning in tensorflow. arXiv preprint
arXiv:1802.05799, 2018.
Shejwalkar, V., Houmansadr, A., Kairouz, P., and Ramage,
D. Back to the drawing board: A critical evaluation of
poisoning attacks on production federated learning. pp.
1354–1371, 2022.
So, J., Nolet, C. J., Yang, C.-S., Li, S., Yu, Q., E Ali, R.,
Guler, B., and Avestimehr, S. Lightsecagg: a lightweight
and versatile design for secure aggregation in federated
learning. Proceedings of Machine Learning and Systems,
4:694–720, 2022.
Sparks, E. R., Venkataraman, S., Kaftan, T., Franklin, M. J.,
and Recht, B. Keystoneml: Optimizing pipelines for
large-scale advanced analytics. In 2017 IEEE 33rd in-
ternational conference on data engineering (ICDE), pp.
535–546. IEEE, 2017.
Sun, Z., Kairouz, P., Suresh, A. T., and McMahan, H. B. Can
you really backdoor federated learning? arXiv preprint
arXiv:1911.07963, 2019.
Weinberger, K., Dasgupta, A., Langford, J., Smola, A., and
Attenberg, J. Feature hashing for large scale multitask
learning. In Proceedings of the 26th annual international
conference on machine learning, pp. 1113–1120, 2009.
Wong, E., Rice, L., and Kolter, J. Z. Fast is better than
free: Revisiting adversarial training. arXiv preprint
arXiv:2001.03994, 2020.
Wu, C.-J., Raghavendra, R., Gupta, U., Acun, B., Ardalani,
N., Maeng, K., Chang, G., Aga, F., Huang, J., Bai, C.,
et al. Sustainable ai: Environmental implications, chal-
lenges and opportunities. Proceedings of Machine Learn-
ing and Systems, 4:795–813, 2022.
Yan, F. Y., Ayers, H., Zhu, C., Fouladi, S., Hong, J., Zhang,
K., Levis, P., and Winstein, K. Learning in situ: a ran-
domized experiment in video streaming. In 17th USENIX
Symposium on Networked Systems Design and Implemen-
tation (NSDI 20), pp. 495–511, 2020.
Yang, C., Wang, Q., Xu, M., Chen, Z., Bian, K., Liu, Y.,
and Liu, X. Characterizing impacts of heterogeneity in
federated learning upon large-scale smartphone data. In
FLINT: A Platform for Federated Learning Integration
Proceedings of the Web Conference 2021, pp. 935–946,
2021.
Yang, T., Andrew, G., Eichner, H., Sun, H., Li, W., Kong,
N., Ramage, D., and Beaufays, F. Applied federated
learning: Improving google keyboard query suggestions.
arXiv preprint arXiv:1812.02903, 2018.
Yin, C., Acun, B., Wu, C.-J., and Liu, X. Tt-rec: Tensor train
compression for deep learning recommendation models.
Proceedings of Machine Learning and Systems, 3:448–
462, 2021.
Yu, H., Yang, S., and Zhu, S. Parallel restarted sgd with
faster convergence and less communication: Demystify-
ing why model averaging works for deep learning. Pro-
ceedings of the AAAI Conference on Artificial Intelli-
gence, 33:5693–5700, 2019.
Zaharia, M., Chen, A., Davidson, A., Ghodsi, A., Hong,
S. A., Konwinski, A., Murching, S., Nykodym, T.,
Ogilvie, P., Parkhe, M., et al. Accelerating the machine
learning lifecycle with mlflow. IEEE Data Eng. Bull., 41
(4):39–45, 2018.
|
|
http://arxiv.org/abs/2302.14644v1 | 2023-02-24T19:19:22 | 2023-02-24T19:19:22 | Example Forgetting: A Novel Approach to Explain and Interpret Deep
Neural Networks in Seismic Interpretation | In recent years, deep neural networks have significantly impacted the seismic
interpretation process. Due to the simple implementation and low interpretation
costs, deep neural networks are an attractive component for the common
interpretation pipeline. However, neural networks are frequently met with
distrust due to their property of producing semantically incorrect outputs when
exposed to sections the model was not trained on. We address this issue by
explaining model behaviour and improving generalization properties through
example forgetting: First, we introduce a method that effectively relates
semantically malfunctioned predictions to their respectful positions within the
neural network representation manifold. More concrete, our method tracks how
models "forget" seismic reflections during training and establishes a
connection to the decision boundary proximity of the target class. Second, we
use our analysis technique to identify frequently forgotten regions within the
training volume and augment the training set with state-of-the-art style
transfer techniques from computer vision. We show that our method improves the
segmentation performance on underrepresented classes while significantly
reducing the forgotten regions in the F3 volume in the Netherlands. | [
"Ryan Benkert",
"Oluwaseun Joseph Aribido",
"Ghassan AlRegib"
] | 10.1109/TGRS.2022.3178112 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1109/TGRS.2022.3178112",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.14644v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.14644v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | Citation
R. Benkert, O.J. Aribido, and G. AlRegib, "Example Forgetting: A Novel Approach to Explain and Interpret Deep
Neural Networks in Seismic Interpretation," in IEEE Transactions on Geoscience and Remote Sensing (TGRS), May.
12 2022
Review
Date of submission: October 2021
Date of acceptance: May 2022
Bib
@ARTICLE{benkert2022 TGRS,
author={R. Benkert, O.J. Aribido, and G. AlRegib},
journal={IEEE Geoscience and Remote Sensing},
title={Example Forgetting: A Novel Approach to Explain and Interpret Deep Neural Networks in Seismic Interpretation},
year={2022}
3
2
Copyright ©2022 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in
0
any current or future media, including reprinting/republishing this material for advertising or promotional purposes,
2
creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of
this work in other works.
[email protected] OR [email protected]
http://ghassanalregib.info/
b
e
F
Contact
4
2
]
G
L
.
s
c
[
1
v
4
4
6
4
1
.
2
0
3
2
:
v
i
X
r
a
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
1
Example Forgetting: A Novel Approach to Explain
and Interpret Deep Neural Networks in
Seismic Interpretation
Ryan Benkert, Student Member, IEEE, Oluwaseun Joseph Aribido, Student Member, IEEE,
and Ghassan AlRegib, Senior Member, IEEE
Abstract-In recent years, deep neural networks have signif-
icantly impacted the seismic interpretation process. Due to the
simple implementation and low interpretation costs, deep neural
networks are an attractive component for the common interpreta-
tion pipeline. However, neural networks are frequently met with
distrust due to their property of producing semantically incorrect
outputs when exposed to sections the model was not trained
on. We address this issue by explaining model behaviour and
improving generalization properties through example forgetting:
First, we introduce a method that effectively relates semantically
malfunctioned predictions to their respectful positions within
the neural network representation manifold. More concrete, our
method tracks how models "forget" seismic reflections during
training and establishes a connection to the decision boundary
proximity of
the target class. Second, we use our analysis
technique to identify frequently forgotten regions within the
training volume and augment the training set with state-of-the-
art style transfer techniques from computer vision. We show
that our method improves the segmentation performance on un-
derrepresented classes while significantly reducing the forgotten
regions in the F3 volume in the Netherlands.
Index Terms-Example Forgetting, Seismic Interpretation,
Deep Learning, Semantic Segmentation.
I. INTRODUCTION
I N the field of geophysics, interpreting processed seismic
images is a challenging task. For decades, the process
required expert oversight and a costly interpretation process.
The introduction of deep learning to the field of geophysics
task and enabled accurate
significantly sped up this
interpretation with limited human interference [1]. Instead of
experts annotating volumes for weeks, the interpreter trains a
deep model on a annotated training volume and subsequently
infers geological information from similar test volumes in
a matter of hours. The reason for this success is tied to the
nature of the interpretation task. Traditionally, the interpreter
extracts quantitative measures
interesting
characteristics and infers geological information based on the
extracted attributes and the seismic section [2]. The choice of
these attributes depends on the interpretation objective. For
instance, several attributes are based on geometric properties
[3], [4], [5] while others are derived from the human visual
system [6]–[8]. At its core, deep models function in a very
similar fashion. The model extracts complex features from the
seismic section and classifies the features based on the trained
loss objective. By construction, convolutional neural networks
(attributes) of
Manuscript received February 08, 2022.
[9] posses the capability to model complex spatial features
that human interpreters may overlook or that hand-engineered
attributes may not capture. This specific characteristic is one
of the biggest advantages of deep neural networks, but can
also be a huge pitfall. On one hand, deep models automate
the attribute extraction process and model complex seismic
features easily omitted by interpreters or geometric attributes.
This relieves the interpreter from selecting the appropriate
attribute and significantly decreases the overall interpretation
time. On the flip side, deep models lack interpretability. Even
though the model automates feature extraction, it is unclear
how these features are related to the semantic interpretation
of the subsurface. In other words, the interpreter is unable
to explain the behavior of the network because the features
information. In
are not necessarily based on geophysical
many cases,
this leads to unexplainable predictions that
undermine the confidence in deep models during inference.
For instance, a trained machine learning model may predict
deep subsurface structures as near surface facies (Figure 1).
The former interpretation is significantly less likely in the
traditional workflow where attributes are based on relevant
geophysical characteristics and interpretations are performed
manually by humans.
Fig. 1. An example of mispredictions of a deep neural network. Left: Seis-
mic input section. Center: Manual seismic interpretation. Right: Automated
interpretation of a trained deep neural network. The circled sections represent
severely mispredicted regions.
In this paper, our objective is to make interpretations
more explainable and predict the behavior of deep models
when utilized on different
input volumes. In the field of
computer vision, several approaches to model uncertainty
or interpretability involve Bayesian inference [10], [11] or
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
2
insights about
gradient-based approaches [12]–[16]. Even though these
approaches are useful visualization techniques, they fail to
provide information about the relationship of samples with
respect to the decision boundary. In seismic interpretation,
this information is especially important as it can provide
useful
the geophysical relationship of the
extracted features. Based on these observations, we propose
using example forgetting to explain seismic deep models. At
its core, our method tracks the frequency in which amplitude
reflections are forgotten during training and highlights difficult
regions in heat maps. From an optimization standpoint, our
algorithm contrasts difficult samples with frequent decision
boundary shifts
samples consistently
mapped within class manifolds. This provides the interpreter
with a powerful tool to visualize the generalization capabilities
of the model and to verify model generalization with respect
to the interrpetation of the subsurface.
from less difficult
them with respect
In summary, our contributions in this paper are as follows:
First, we present a framework to explain deep model behavior
by evaluating the learning dynamics during training. Second,
we analyze deep models by visualizing challenging regions
to model predictions and
and interpret
the geophysical properties of the subsurface. The framework
allows us categorize prone regions and evaluate their contri-
bution to the model performance. Third, we introduce a seg-
mentation framework that explicitly targets forgotten samples
and significantly reduces difficult pixels. Our empirical find-
ings show that our method impacts the representation space
mapping and increases the distance of pixels to their respective
class decision boundary. Moreover, our framework improves
segmentation performance of underrepresented classes.
II. RELATED WORK
In seismic interpretation, deep learning models first
surfaced in the form of fully supervised settings [17], [18].
However, due to the high cost,
fully annotated datasets
are scarce in seismic interpretation. For fully supervised
models, this frequently causes overfitting and poor prediction
capabilities. As a result, several works explored semi-
supervised and weakly supervised approaches [19]–[24] as
these methods are less dependent on costly data annotations.
Apart from methodological shifts, deep models have been
further diversified on different seismic applications. A few
example applications include detection of faults [25]–[30],
delineation of salt bodies [6], [31], [32], classification of
facies [21], [33]–[36], prediction rock lithology from well
logs [23], [37]–[39] and seismic horizon interpretation [40],
[41].
Although deep learning models are effective,
they are
hard to explain and mispredictions may follow a random
pattern that
is semantically incorrect. In computer vision,
this is a well known issue of deep models and works on
model uncertainty or explainability are ubiquitous. For
instance, one branch focuses on utilizing gradient activations
the expected change a model
to infer information about
witnesses when updating weight parameters [13]–[16]. A
more traditional approach is visualizing model uncertainty
through Bayesian inference [10], [11]. Typically, this involves
estimating the posterior probability of model parameters with
respect
to given data samples and their respective labels.
Subsequently, model uncertainty is visualized by sampling
from the parameter distribution and computing the entropy of
the resulting prediction distribution. In seismic interpretation,
most approaches concerning model uncertainty fall into this
area of research [42]–[44].
In contrast to existing methods, we explain model behaviour
and prediction uncertainty by investigating the learning dy-
namics in neural networks. In literature, research in this area
can be broadly classified in two categories: The first category
explores the learning continuity when deep models are trained
on new tasks. In research, this behaviour is often referred to
as catastrophic forgetting [45], [46]. In seismic interpretation,
we frequently encounter this phenomenon in transfer learning
scenarios where models are pretrained on one dataset and fine-
tuned on another. The second category addresses the learning
behaviour within a single task and analyzes sample forgetting
within the training distribution [47]. In this paper, we gen-
eralize this concept to a seismic segmentation problem and
visualize frequently forgotten regions in heat maps. Further,
we exploit frequently forgotten regions by transferring their
class characteristics to different sections within the seismic
volume. To achieve this, we utilize state-of-the-art style trans-
fer algorithms from computer vision.
In this context, several style transfer approaches are based on
conditional generative adversarial networks [48]. Starting with
[49], conditional generative adversarial networks (cGANs)
have been widely deployed in many image-translation applica-
tions due to their high quality image generation characteristics.
Examples of such applications are high resolution image
synthesis [50], multi-modal image synthesis [51], [52] and
semantic image synthesis [53]–[57]. In seismic, style transfer
does not have much research traction. However, few papers
address the generation of synthetic subsurface models by
applying style transfer techniques [58], [59].
Finally, we note that this work is a continuation of [60]. In
addition to [60], we present significantly improved segmenta-
tion results as well as thorough analysis aspects of our method.
III. EXPLAINABILITY IN NEURAL NETWORKS WITH
EXAMPLE FORGETTING
At the core of our technique stands the concept of example
forgetting. Intuitively, samples that are more difficult to learn
exhibit different properties than samples that are easy to
distinguish and classify. In this section, we formalize this
concept in the form of "forgetting".
A. Forgetting Events
Deep neural networks cannot learn continually but forget
samples during the optimization process. More generally, op-
timizing weight parameters causes a shift in the representation
manifold that can result in misprediction (or "forgetting") of
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
3
Fig. 2. An example of our proposed method. Left: Heat map of the section. Pixels close to the decision boundary are highlighted in different shades of red
whereas pixels deep within the class manifold are dark blue. Center: Annotation of the respective section. Right: Original seismic section.
previously correct samples. In neural networks, a shift occurs
when a sample has been "learnt" (classified correctly) at some
point t and subsequently "forgotten" (misclassified) at a time
t(cid:48) > t.
Formally, we define (xi, yi) ∈ I M ×N as a (pixel, annotation)
tuple in image I, where xi and yi correspond to the pixel
and annotation respectively. In image segmentation, our goal
is to calculate a prediction ̃yi such that ̃yi = yi. Based on
this definition, the accuracy of a pixel in training epoch t is
defined as
acct
(1)
i = 1 ̃yt
i =yi.
Here, 1 ̃yt
i =yi refers to a binary variable indicating the correct-
ness of the classified pixel in image I. With this definition we
say a pixel is forgotten at epoch t + 1 if the accuracy at t + 1
is strictly smaller than the accuracy at epoch t:
i = int(acct+1
f t
i) ∈ 1, 0
Similar to [47], we define the binary event f t
event at time t.
i as a forgetting
i < acct
(2)
B. Heat Map Computation
In our implementation, we calculate heat maps for different
distribution sets. Following the previous definitions, we
would have to track forgetting events for each model update.
Practically, this would result in interpreting every volume set
after each minibatch and updating the heat maps multiple
times every epoch. Since this approach is computationally
expensive, we update the heat maps of the current minibatch
only. For the training set we monitor forgetting events of each
minibatch and update with the corresponding batch gradient.
For validation and test sets we track forgetting events after
each epoch. Algorithm 1 outlines the tracking procedure.
During training, we count the number of forgetting events
for each pixel (i, j) in set D and store the result in a heat
map for each image within the minibatch. If D is the training
set, we further update with the minibatch B. In all other
cases (e.g. test), we do not perform model updates since this
would alter the regular training procedure. Instead, we train
the model for another epoch on the training set synchronously.
In contrast to other deep learning applications, the nature
of the segmentation tasks enables visualization of forgetting
events (Figure 2). Following our previous definition, we visu-
alize forgetting events in a heat map by counting the number
of forgetting events f t
that occur per pixel during the time
i
M ×N and every
frame T . Mathematically, heat map L ∈ N0+
element in L can be written as
Li =
T
(cid:88)
t=0
f t
i .
(3)
Since frequently forgotten samples were shifted over the
decision boundary frequently during training, we interpret
forgetting events as an approximate metric for decision bound-
ary proximity. This view is complementary to [47] where
frequently forgotten samples are considered support vectors
within the representation space. Qualitatively, we note that fre-
quently forgotten regions typically contain overlapping class
features or a significant amount of annotation ambiguity. For
this reason, we mostly find forgettable regions in underrep-
resented classes (e.g. salt domes) or facies boundaries where
annotations are the most ambiguous (Figure 2).
Algorithm 1: Heat Map Computation
Result: Heat Maps of Set D.
Let (i, j) ∈ M × N and k ∈ D;
initialize previousacck
initialize Heat Maps Ti,j[k] = 0;
while Training not finished do
i,j = 0;
for batch B ∈ D do
if D is training set then
update segmentation model on B;
end
for pixel (b, i, j) ∈ |B| × M × N do
b,i,j < previousacck
b,i,j then
if acck
Tb,i,j[k]+ = 1;
else
continue;
end
end
end
end
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
4
the learning difficulty of the samples. After generation, the
transferred images are added to our training pool and the
segmentation model is trained from scratch (Figure 4d). In the
remainder of this section, we will discuss our transfer model
in more detail as this represents a crucial step in our workflow.
Our transfer model takes three input parameters: A source
image, a target image and a class list. The subsurface source
and target image are two seismic sections specified by the
user. They represent the facies source as well as the section
to be altered by our algorithm. The class list contains the
facies that our algorithm will transfer to the target image. We
show several transfer examples in Figure 5. Here, we transfer
the characteristics of the orange scruff class from the source
image (Figure 5d) to the target image (Figure 5a) and evaluate
the absolute difference between adjacent transfer images using
different sources (Figure 5f). For instance,
the difference
image using source 2 (middle row) represents the absolute
difference between the transfer images of the first and second
row. As seen in the transfer output, the characteristics of
the scruff class are clearly different from the original target
image in all example sections. Moreover, we can see that
varying the source image results in different scruff facies that
are dependent on the scruff regions of their respective source
image. For instance, the scruff facie of the transfer image
resulting from source 2 is significantly smoother than the
other two examples due to the smooth scruff characteristics of
subsurface source 2. Finally, the difference plots show what
regions are affected by our transfer model when different
source images are used. Since our class list only consisted of
the scruff class we observe that only this region of the target
class is altered by our model. Note, that the difference in the
first row (column f) shows the difference between source 1 and
source 0, an adjacent source image not shown in our examples.
To achieve the results in Figure 5 we employ a GAN
architecture [62] consisting of an encoder, a generator as well
as a discriminator (Figure 7). The discriminator (Figure 7c)
predicts whether the presented images originate from the
training distribution and is used to derive
generator or
the adversarial loss. Since this is a standard step in GAN
frameworks [62] our explanations will focus on the other two
architecture elements.
We encode subsurface characteristics in two steps (Figure 7a):
First, we encode the source image to remove information
to subsurface characteristics. Second, we use a
irrelevant
class-wise average pooling layer
to produce subsurface
representations (codes). Each code is a vector and represents
the characteristics of one class in the input source. For
instance, one code will
include the class scruff whereas
another code will represent the zechstein class. These codes
are used to transfer the facies within the generator. Simply
using the target image as the encoder input, will result in
an image reconstruction in the generator as the generated
codes contain the target image characteristics. However, in
our application we want the output to contain the subsurface
characteristics of our source image. For this reason, we
substitute the subsurface codes with our desired source
Fig. 3.
Intuition of our subsurface transfer method. We target the support
vectors of class 1 (blue circled disks) and generate new samples of class 1
(green) that deliberately shift the boundary (black line) away from the blue
class manifold. The other class is presented in light blue.
IV. SUPPORT VECTOR AUGMENTATION
Building on our previous definitions, we use frequently
forgotten regions within the training set to improve robustness
and generalization capabilities of the segmentation model.
Specifically, we identify frequently forgotten regions within
the train set and add example variety through region-wise
style transfer. Since we consider forgetting events as an
approximate decision boundary proximity metric, our method
can be interpreted as an augmentation technique that generates
new samples around the class boundaries. Within the manifold,
this results in a boundary shift (Figure 3). Based on the popular
machine learning paradigm [61], we name our method Support
Vector Augmentation.
Our augmentation workflow consists of a segmentation
model, a transfer model and a data selection step (Figure 4).
First, our method trains the segmentation model on the
training data and produces a forgetting event heat map for
every validation image in the training volume (Figure 4a). In
principle, heat maps could be produced for the entire training
set but that would be computationally inefficient.
In the next step of our workflow, we calculate the forgetting
event density within each facies class of a heat map (Fig-
ure 4b). Specifically, we sum all forgetting events fi∈ck within
class ck of a heat map and divide by the number of pixels of
class Nck in the image:
Uck =
(cid:80)T
t=0
(cid:80)
i∈ck
Nck
f t
i
.
(4)
This metric allows us to rank each heat map according to its
density with regards to any arbitrary class in the dataset.
Finally, we transfer the visual features of a predefined
class from the vertical sections with the highest density
to randomly sampled training sections (Figure 4c). Our
proposed architecture is a slightly altered version of [53].
transfers facies characteristics on the
In short,
batch-normalization activations within the image generator.
Our approach enables class specific transfers without affecting
the interpretation characteristics (texture, structure etc.) of
other classes within the image. In our method, we transfer
the underrepresented class facies (e.g. salt domes) due to
the model
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
5
Fig. 4. The augmentation workflow for seismic interpretation. First, forgetting event maps are produced by the segmentation model using the original volume
(a). Second, sections with the most frequently forgotten samples of the target class are selected as the input for our transfer model (b). Third, the transfer
model transfers the challenging characteristics of the frequently forgotten regions to other randomly sampled sections throughout the training volume (c).
Finally, the generated data is added to the training volume and the segmentation model is retrained from scratch (d).
subsurface codes during inference. This gives us full control
over the transfer and allows us to produce examples as seen
in Figure 5. In our example, we substitute the subsurface
code of the scruff class with the scruff subsurface code from
our source image. Note, that we leave all other subsurface
codes untouched because we want the other classes to share
the same characteristics as the target image.
In our generator (Figure 7b), we use semantic region-
adaptive normalization (SEAN) layers to transfer the codes
to their respective class regions [53]. In summary, SEAN
modulates the subsurface codes as well as the structural
information from the annotation onto the normalized output
of the previous layer. In Figure 6 we show a simplified
visualization of the modulation process. First, the codes are
broadcasted to the respective class regions using the structural
information contained in the section annotation (characteristics
mapping step). For instance, the scruff subsurface code will
be broadcasted to all structural regions containing scruff, the
zechstein codes are broadcasted to the zechstein regions and
so on. The resulting intermediate image is then used to scale
and shift the output of a previous normalization layer.
We train the architecture by learning a simple image recon-
struction problem. The subsurface encoder is trained to distin-
guish per region subsurface codes and the generator is forced
to transfer these codes by region adaptive normalization. In
inference, the image and annotation source can be different
to produce other subsurface codes. In our model, we feed the
target image as well as our source image into the encoder
sequentially and hand-pick the desired subsurface codes.
V. EMPIRICAL ANALYSIS
Our experiments in the entire paper were conducted on
the F3 block dataset in the Netherlands [36]. We partition
the volume into train and test set according to the orignal
benchmark paper and show the layout in Figure 8. When
showing heat maps we restrict the examples to the test sections
in Figure 9. Here, the sections one through four represent
the Test 1 crosslines 234, 310, 556, and 622 respecitvely.
Further, sections five and six represent
the Test 2 inline
sections 575, and 596. Our choice is based on the high
presence of underrepresented classes (e.g. the orange scruff
class) and complex facies structures. Even though this paper
only considers these examples, we note that our observations
and conclusions are consistent throughout the entire volume.
Throughout all of our experiments, we opt for a deeplab-
v3 [63] architecture with different backbone architectures. For
optimization, we use the adam variant of stochastic gradi-
ent descent with a learning rate of 1e − 4 in combination
with a polynomial
learning rate decay. We structure our
experiments in two sections: First, we show the analysis
benefits of forgetting event heat maps by displaying when
pixels are forgotten during training. We distinguish different
groups within forgettable pixels and relate them to the model
interpretations. Second, we benchmark the generalization and
robustness properties of our augmentation method. We analyze
the impact of our method along the metrics of segmentation
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
6
Fig. 5. Examples of transferred subsurfaces. Columns from left to right: a) Target image for subsurface transfer. b) Output of our algorithm when transferring
the orange scruff class. c) Annotation of the target image. d) Subsurface source. e) Subsurface source annotation. f) Absolute differences between adjacent
transfer images using different sources (e.g. the difference image of subsurface source 2 represents the difference between the transfer image of the first row
and the second row).
volume. We track the forgetting events for the validation and
test set and display the heat maps for different observation
windows of the test set (Figure 10). In each row, we show
different time frames in which forgetting events were tracked:
In the first row, all forgetting events that occurred during the
60 epochs are displayed. The second and third row show the
forgetting events that occurred between the 20th and the 60th
epoch as well as the 50th and 60th epoch respectively. In
the final third row, we show the predictions of our model.
Overall, we can classify forgettable regions in the following
groups:
The first group consist of pixels forgotten rarely and which
disappear from the heat maps after 20 epochs. We call these
samples early-stage forgettable. These regions are learned
at an early stage within the training cycle and the network
does not have difficulties mapping them to the representation
space. In the context of the interpretation task, these pixels
are frequently found in areas that are structurally consistent
throughout the volume and do not show a significant variety.
An example of these areas can be found in the upper north
sea group (dark blue class) and the chaotic middle north sea
group (blue class) in images one, two and three. The heat
maps within the first row clearly show highlighted regions
within the upper classes that disappear after epoch 20 and
that are correctly classified by the fully trained model.
Fig. 6. SEAN layer workflow. The normalization layer takes the subsurface
codes and the target image mask as input parameters (bottom left). The layer
modulates the subsurface information as well as the structural information
from the annotation onto the normalized output of the previous layer(right).
performance and heat map impact. As a comparison we use
common augmentation techniques used in literature.
A. Analyzing Forgotten Regions
In our experiments, we train the segmentation architecture
with a resnet-18 backbone [64] for 60 epochs on the training
The second group of pixels is more difficult to characterize
frequently
by our network and consists of pixels most
forgotten - ambiguous forgettable samples. These areas are
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
7
Fig. 7. The subsurface transfer architecture used in this work during training. Top: Generator with SEAN blocks and upsampling layers (b). Bottom: Subsurface
encoder (a) with the bottleneck encoder-decoder architecture (left), region-wise average pooling layer (center) and subsurface codes (right). Left: Discriminator
(c) with both loss functions used in training (MSE loss and adversarial loss)
The final group entails the most difficult pixels for
our model. This group is consistently classified incorrectly
throughout
the training procedure and is forgotten rarely
at the end of training. Due to this characteristic, we call
these samples late-stage forgettable samples. In terms of the
representation mapping, the network is unable to map these
regions into the target manifold throughout training and starts
to learn these pixels at a late stage when the model has already
learned a large variety of textural and structural features. In
our examples, these areas are visible in the third row showing
the forgetting events at a late stage. Qualitatively, these areas
contain difficult textures or salt dome structures that are not
present in the training distribution in that form and hence
present the most difficult regions within the test set. This is
further confirmed by the false predictions in these regions.
B. Subsurface Transfer
In this section, we benchmark our support vector augmen-
tation method in combination with common augmentation
techniques. Our qualitative heat map results are obtained by
training the segmentation model with a resnet-18 backbone
for 60 epochs with and without augmentations. For our
segmentation performance comparison, we use a resnet-101
backbone and train our model for 80 epochs on five separate
random seeds. Furthermore, we train all of our architectures
by randomly cropping 255 pixel patches and test with full
sections. We choose this setup to ensure a proper comparison
to the original baseline of [36]. For consistency, we choose
the validation set by selecting every fifth inline and every fifth
crossline of the training volume for all seeds (Figure 8). We
Fig. 8. Train, test, and validation partition of the F3 dataset. For our validation
set, we select every fifth inline and every fifth crossline of the training data.
frequently shifted between the correct manifold and other
class manifolds during the optimization process but are not
necessarily misclassified. We interpret these samples to have
been within a close proximity to the decision boundary
for a specific time frame during the optimization process.
Examples of these regions are either the class boundaries
textures within underrepresented classes (e.g.
or difficult
Section 1 frequently forgotten scruff regions in row one and
two). Note, these regions are either predicted correctly or
incorrectly depending on the network initialization and are
not directly visible in the network predicitons.
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
8
Fig. 9. Interpreted examples from the test set used for heat map comparison. The sections are chosen based on the high presence of underrepresented classes
and complex facies structures.
note that our numerical results are summarized over every
inline and crossline of both Test 1 and Test 2. We query six
images with the highest forgetting event density of our target
class. Each section is used as a source image to generate
64 transfer images. For generation, we sample randomly to
obtain the target image and retrain the segmentation model
from scratch. We note that due to the random target image
selection our technique is sensitive to the hyperparameter
choice (number of sources, targets etc.) and that significant
experimentation had to be performed to achieve the results
in Table I. However,
the investigation of different query
methods is beyond the scope of this paper and we leave this
topic for future research. In this paper, we report the results
when transferring the scruff class (orange). For evaluation,
we compare our subsurface transfer technique with common
augmentation methods (random horizontal flip and random
rotations; [65]) from computer vision in terms of segmentation
performance (in class accuracy and mean intersection over
union) and impact on forgetting events heat maps.
We show show the numerical results in Table I. Overall,
every method matches or outperforms the baseline in terms of
class accuracy. In particular, our method significantly increases
the performance of the target class (scruff) as well as the
neighboring underrepresented classes (zechstein and chalk) in
the majority of cases. We see that our method affects the
accuracy of other classes (upper, middle, and lower north
sea group) only mildly and largely remains untouched by the
algorithm. For instance, adding our method on top of random
rotate increases the scruff class accuracy by 4.5% while the
upper north sea group accuracy is increased by 0.1% which
we consider insignificant. This suggests, that our method is
spatially localized and affects the classes in direct proximity
of the target class scruff.
Further, we observe that our method matches the base-
line accuracy when combined with the baseline exclusively.
Specifically, we observe a maximum of 0.6% difference to the
baseline on the target class as well as its neighboring classes.
We reason, that the data variations of our method are not as
profound as conventional augmentation techniques and are not
as effective when paired with the baseline exclusively. While
augmentations such as random rotate result in significant struc-
tural variation, our method adds slight subsurface variations
to a single class and maintains all other components of the
seismic image. Therefore, the augmentation alone does not
affect the numerical values strongly. However, when combined
with other augmentations its effect becomes amplified and
more pronounced. For instance, we see a clear improvement
when using our method in combination with random rotate.
Finally, we note that adding an augmentation can result in
minor accuracy reductions for selective classes. For instance,
adding random rotate to the baseline results in a 1.3% re-
duction in terms of accuracy on the upper north sea class.
While augmentations frequently result in an overall accuracy
improvement, several augmentations can have a negative effect
on specific class groups or even entire section performances.
In the example of random rotate, the upper north sea class
does not share an upper boundary with another class and is
therefore "cut off" when rotated. However, we note that adding
our method does not result in such a behavior and reductions
can be considered irrelevant. This affirms that our method
introduces realistic data variations for seismic interpretation
for every class and therefore matches or improves the baseline
performance.
In addition to Table I, we further show the predictions of
crossline 60 in Test 2 for different augmentation constellations
(Figure11). We highlight areas of improvement
in green.
Overall, the predictions further support our numerical analysis
of Table I. In particular, we find that adding our method
in any constellation typically results in more fine-grained
predictions that are less smooth. For instance the highlighted
area when using random rotate and random flip contains
significantly smoother scruff predictions than the model
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
9
Fig. 10. Different time frames in which pixels are forgotten. The columns show six different seismic sections from the test set containing difficult textures
or structures. Different rows show different observation windows for forgetting events. From top to bottom: 1. Test set heat maps containing all forgetting
events throughout training (epoch 0 through epoch 60). 2. Test set heat maps with all forgetting events occurring between epoch 20 and epoch 60. 3. Test set
heat maps with all forgetting events occurring between epoch 50 and epoch 60. 4. Predictions of all sections using the fully trained model.
trained with our method. We reason,
that our method
introduces style variations into the data that provide more
boundary robustness. For this reason, the predictions are more
fine-grained.
We further show the forgetting event heat maps of the
different augmentations in Figure 12. Qualitatively, our method
reduces the amount of forgetting events significantly more
than traditional augmentation methods indicating a clear rep-
resentation shift. Specifically, we find that several regions
with a high forgetting event density are transferred to a low
forgetting event density or disappear entirely (bottom scruff
class in Section 2, entire left part of Section 6, or center of
Section 4). These regions are shifted away from the decision
boundary and the classification accuracy is not significantly
affected by model updates. In contrast, forgettable regions do
not disappear with standard augmentation techniques. Instead,
only the severity of the forgetting event regions is reduced
or the texture of the regions is blurred. For instance, random
rotation results in blurred edges around the forgettable regions.
Finally, we identify regions that transition from lower forget-
ting event densities to higher densities (e.g. Section 6 bottom
left) when using our augmentation method. Because these
regions transition to more difficult regions, and serve as an
example of negative representation shifts. However, we also
note empirically that these occasions are rare and that the
reduction of forgettable regions is significantly more common
than an increase.
VI. CONCLUSION
In this paper, we presented a novel framework that enhances
explainability in deep seismic models. We track the frequency
in which pixels are forgotten during training and analyze
the relationship to the sample position within the feature
space. We highlight forgotten pixels spatially in heat maps
and interpret their semantic geologic meaning. Further, we
consider different time frames in which samples are forgotten
and are able to tie specific prediction properties to model
behaviour. Finally, we exploit our framework to engineer an
augmentation method that explicitly targets forgotten regions
and increases the variety of difficult pixels through subsurface
transfer. Our empirical evaluations clearly show the shift
in the learned feature space when compared to traditional
augmentation methods. In future, we hope that this work will
provide a powerful concept for interpreters to verify the model
functionality and explain its behaviour. Furthermore, we have
shown that the well crafted methods can target prone regions
and allow explicit control over the decision boundary. Future
work could include an application exploration and forgetting
events could be applied to multiple seismic applications such
as rock lithology predictions or salt body delineation.
REFERENCES
[1] G. AlRegib, M. Deriche, Z. Long, H. Di, Z. Wang, Y. Alaudah,
M. A. Shafiq, and M. Alfarraj, "Subsurface structure analysis using
computational interpretation and learning: A visual signal processing
perspective," IEEE Signal Processing Magazine, vol. 35, no. 2, pp. 82–
98, March 2018.
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
10
Model
Baseline
Baseline + Ours
Rand. Rotate
Rand. Rotate + Ours
Rand. Rotate
+
Rand. Flip
Rand. Rotate
Rand. Flip + Ours
+
MIoU
0.689
0.687
0.709
0.724
0.728
0.732
Class Accuracy & Overall MIoU
Upper N. S.
0.986
0.983
0.973
0.974
0.973
Middle N. S.
0.875
0.886
0.923
0.930
0.927
Lower N. S.
0.965
0.962
0.972
0.973
0.974
0.971
0.927
0.975
Chalk
0.771
0.772
0.792
0.811
0.804
0.822
TABLE I
AVERAGED CLASS ACCURACY.
Scruff
0.591
0.585
0.600
0.646
0.650
0.664
Zechstein
0.622
0.619
0.556
0.593
0.588
0.641
Fig. 11. Model predictions for crossline 60 in Test 2 when different augmentation methods are used. Top row: Seismic data and the corresponding ground
truth predictions.Rows two, three, and four: No augmentations (Baseline), random rotate, and random rotate as well as random horizontal flip. The first column
contains the augmentation, and the second column contains the same augmentation with our method. Areas of improvmenta are highlighted in green circles.
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
11
Fig. 12. Heat maps for the example sections two, four, and six when using different augmentation methods. Each group represents a different augmentation
method: The first row contains the baseline model with no augmentations. The second row contains random horizontal flip where we flip each section randomly
during training. The third row contains randomly rotated image augmentations. The final row represents our subsurface augmentation method. In summary,
our method reduces the amount of forgetting events significantly more than traditional methods.
[2] S. Chopra and K. J. Marfurt, "Seismic attributes-a historical perspec-
tive," Geophysics, vol. 70, no. 5, pp. 3SO–28SO, 2005.
[3] M. T. Taner, J. S. Schuelke, R. O'Doherty, and E. Baysal, "Seismic
attributes revisited," in SEG Technical Program Expanded Abstracts
1994. Society of Exploration Geophysicists, 1994, pp. 1104–1106.
[4] A. E. Barnes, "The calculation of instantaneous frequency and instan-
taneous bandwidth," Geophysics, vol. 57, no. 11, pp. 1520–1524, 1992.
[5] Q. Chen and S. Sidney, "Seismic attribute technology for reservoir
forecasting and monitoring," The Leading Edge, vol. 16, no. 5, pp. 445–
448, 1997.
[6] M. A. Shafiq, Z. Wang*, A. Amin, T. Hegazy, M. Deriche, and
G. AlRegib, "Detection of salt-dome boundary surfaces in migrated
seismic volumes using gradient of textures," in SEG Technical Program
Expanded Abstracts 2015. Society of Exploration Geophysicists, 2015,
pp. 1811–1815.
[7] M. A. Shafiq, Y. Alaudah, H. Di, and G. AlRegib, "Salt dome detection
within migrated seismic volumes using phase congruency," in SEG
Technical Program Expanded Abstracts 2017. Society of Exploration
Geophysicists, 2017, pp. 2360–2365.
[8] M. A. Shafiq, T. Alshawi, Z. Long, and G. AlRegib, "The role of
visual saliency in the automation of seismic interpretation," Geophysical
Prospecting, vol. 66, no. S1, pp. 132–143, 2018.
[9] Y. LeCun, Y. Bengio et al., "Convolutional networks for images, speech,
and time series," The handbook of brain theory and neural networks,
vol. 3361, no. 10, p. 1995, 1995.
[10] A. Kendall and Y. Gal, "What uncertainties do we need in bayesian
deep learning for computer vision?" in Advances in neural information
processing systems, 2017, pp. 5574–5584.
[11] Y. Gal and Z. Ghahramani, "Dropout as a bayesian approximation:
Representing model uncertainty in deep learning," in international
conference on machine learning, 2016, pp. 1050–1059.
[12] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and
D. Batra, "Grad-cam: Visual explanations from deep networks via
gradient-based localization," in Proceedings of the IEEE international
conference on computer vision, 2017, pp. 618–626.
[13] J. Lee and G. AlRegib, "Gradients as a measure of uncertainty in neural
networks," in 2020 IEEE International Conference on Image Processing
(ICIP).
IEEE, 2020, pp. 2416–2420.
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
12
[14] M. Prabhushankar, G. Kwon, D. Temel, and G. AlRegib, "Contrastive
explanations in neural networks," in 2020 IEEE International Confer-
ence on Image Processing (ICIP).
IEEE, 2020, pp. 3289–3293.
[15] G. Kwon, M. Prabhushankar, D. Temel, and G. AlRegib, "Backprop-
agated gradient representations for anomaly detection," in European
Conference on Computer Vision. Springer, 2020, pp. 206–226.
[16] --, "Novelty detection through model-based characterization of neural
networks," in 2020 IEEE International Conference on Image Processing
(ICIP).
IEEE, 2020, pp. 3179–3183.
[17] H. Di, M. Shafiq, G. AlRegib et al., "Patch-level mlp classification for
improved fault detection," in 2018 SEG International Exposition and
Annual Meeting. Society of Exploration Geophysicists, 2018.
[18] X. Wu, Y. Shi, S. Fomel, L. Liang et al., "Convolutional neural networks
for fault interpretation in seismic images," in 2018 SEG International
Exposition and Annual Meeting. Society of Exploration Geophysicists,
2018.
[19] Y. Alaudah and G. AlRegib, "Weakly-supervised labeling of seismic
volumes using reference exemplars," in 2016 IEEE International Con-
ference on Image Processing (ICIP).
IEEE, 2016, pp. 4373–4377.
[20] Y. Alaudah, M. Alfarraj, and G. AlRegib, "Structure label prediction
using similarity-based retrieval and weakly supervised label mapping,"
Geophysics, vol. 84, no. 1, pp. V67–V79, 2018.
[21] Y. Alaudah, M. Soliman, and G. AlRegib, "Facies classification with
weak and strong supervision: A comparative study," in SEG Technical
Program Expanded Abstracts 2019. Society of Exploration Geophysi-
cists, 2019, pp. 1868–1872.
[22] Y. Alaudah, S. Gao, and G. AlRegib, "Learning to label seismic
structures with deconvolution networks and weak labels," in SEG
Technical Program Expanded Abstracts 2018. Society of Exploration
Geophysicists, 2018, pp. 2121–2125.
[23] M. Alfarraj and G. AlRegib, "Semisupervised sequence modeling for
elastic impedance inversion," Interpretation, vol. 7, no. 3, pp. SE237–
SE249, 2019.
[24] Y. Babakhin, A. Sanakoyeu, and H. Kitamura, "Semi-supervised seg-
mentation of salt bodies in seismic images using an ensemble of convolu-
tional neural networks," in German Conference on Pattern Recognition.
Springer, 2019, pp. 218–231.
[25] M. Araya-Polo, T. Dahlke, C. Frogner, C. Zhang, T. Poggio, and
D. Hohl, "Automated fault detection without seismic processing," The
Leading Edge, vol. 36, no. 3, pp. 208–214, 2017.
[26] H. Di, M. A. Shafiq, Z. Wang, and G. AlRegib, "Improving seismic fault
detection by super-attribute-based classification," Interpretation, vol. 7,
no. 3, pp. SE251–SE267, 2019.
[27] H. Di and G. AlRegib, "Semi-automatic fault/fracture interpretation
based on seismic geometry analysis," Geophysical Prospecting, vol. 67,
no. 5, pp. 1379–1391, 2019.
[28] M. A. Shafiq, H. Di, and G. AlRegib, "A novel approach for automated
detection of listric faults within migrated seismic volumes," Journal of
Applied Geophysics, vol. 155, pp. 94–101, 2018.
[29] X. Wu, L. Liang, Y. Shi, and S. Fomel, "Faultseg3d: Using synthetic data
sets to train an end-to-end convolutional neural network for 3d seismic
fault segmentation," Geophysics, vol. 84, no. 3, pp. IM35–IM45, 2019.
[30] W. Xiong, X. Ji, Y. Ma, Y. Wang, N. M. AlBinHassan, M. N. Ali, and
Y. Luo, "Seismic fault detection with convolutional neural network,"
Geophysics, vol. 83, no. 5, pp. O97–O103, 2018.
[31] H. Di, Z. Wang, and G. AlRegib, "Deep convolutional neural networks
for seismic salt-body delineation," in AAPG Annual Convention and
Exhibition, 2018.
[32] H. Di, M. Shafiq, and G. AlRegib, "Multi-attribute k-means clustering
for salt-boundary delineation from three-dimensional seismic data,"
Geophysical Journal International, vol. 215, no. 3, pp. 1999–2007, 2018.
[33] M. Liu, W. Li, M. Jervis, and P. Nivlet, "3d seismic facies classification
using convolutional neural network and semi-supervised generative
adversarial network," in SEG Technical Program Expanded Abstracts
2019. Society of Exploration Geophysicists, 2019, pp. 4995–4999.
[34] J. S. Dramsch and M. L ̈uthje, "Deep-learning seismic facies on state-
of-the-art cnn architectures," in SEG Technical Program Expanded
Abstracts 2018. Society of Exploration Geophysicists, 2018, pp. 2036–
2040.
[35] F. Qian, M. Yin, M.-J. Su, Y. Wang, and G. Hu, "Seismic facies recog-
nition based on prestack data using deep convolutional autoencoder,"
arXiv preprint arXiv:1704.02446, 2017.
[36] Y. Alaudah, P. Michałowicz, M. Alfarraj, and G. AlRegib, "A machine-
learning benchmark for facies classification," Interpretation, vol. 7, no. 3,
pp. SE175–SE187, 2019.
[37] V. Das, A. Pollack, U. Wollner, and T. Mukerji, "Convolutional neural
network for seismic impedance inversion," in SEG Technical Program
Expanded Abstracts 2018. Society of Exploration Geophysicists, 2018,
pp. 2071–2075.
[38] --, "Effect of rock physics modeling in impedance inversion from
seismic data using convolutional neural network," in The 13th SEGJ
International Symposium, Tokyo, Japan, 12-14 November 2018. Society
of Exploration Geophysicists and Society of Exploration . . . , 2019, pp.
522–525.
[39] A. Mustafa, M. Alfarraj, and G. AlRegib, "Joint
learning for
spatial context-based seismic inversion of multiple datasets
for
improved generalizability and robustness," 2021. [Online]. Available:
https://arxiv.org/abs/2104.02750
[40] V. Tschannen, M. Delescluse, N. Ettrich, and J. Keuper, "Extracting
horizon surfaces from 3d seismic data using deep learning," Geophysics,
vol. 85, no. 3, pp. N17–N26, 2020.
[41] H. Wu, B. Zhang, T. Lin, D. Cao, and Y. Lou, "Semiautomated seismic
horizon interpretation using the encoder-decoder convolutional neural
networkhorizon tracking using deep learning," Geophysics, vol. 84,
no. 6, pp. B403–B417, 2019.
[42] T. Zhao and X. Chen, "Enrich the interpretation of seismic image
segmentation by estimating epistemic uncertainty," in SEG Technical
Program Expanded Abstracts 2020. Society of Exploration Geophysi-
cists, 2020, pp. 1444–1448.
[43] J. Choi, D. Kim, and J. Byun, "Uncertainty estimation in impedance
inversion using bayesian deep learning," in SEG Technical Program
Expanded Abstracts 2020. Society of Exploration Geophysicists, 2020,
pp. 300–304.
[44] P. Mukhopadhyay and S. Mallick, "Bayesian deep learning for seismic
facies classification and its uncertainty estimation," in SEG Technical
Program Expanded Abstracts 2019. Society of Exploration Geophysi-
cists, 2019, pp. 2488–2492.
[45] H. Ritter, A. Botev, and D. Barber, "Online structured laplace approxi-
mations for overcoming catastrophic forgetting," in Advances in Neural
Information Processing Systems, 2018, pp. 3738–3748.
[46] J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins,
A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska
et al., "Overcoming catastrophic forgetting in neural networks," Pro-
ceedings of the national academy of sciences, vol. 114, no. 13, pp.
3521–3526, 2017.
[47] M. Toneva, A. Sordoni, R. T. d. Combes, A. Trischler, Y. Bengio, and
G. J. Gordon, "An empirical study of example forgetting during deep
neural network learning," arXiv preprint arXiv:1812.05159, 2018.
[48] M. Mirza and S. Osindero, "Conditional generative adversarial nets,"
arXiv preprint arXiv:1411.1784, 2014.
[49] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros, "Image-to-image translation
with conditional adversarial networks," in Proceedings of the IEEE
conference on computer vision and pattern recognition, 2017, pp. 1125–
1134.
[50] T.-C. Wang, M.-Y. Liu, J.-Y. Zhu, A. Tao, J. Kautz, and B. Catanzaro,
"High-resolution image synthesis and semantic manipulation with condi-
tional gans," in Proceedings of the IEEE conference on computer vision
and pattern recognition, 2018, pp. 8798–8807.
[51] J.-Y. Zhu, R. Zhang, D. Pathak, T. Darrell, A. A. Efros, O. Wang,
and E. Shechtman, "Toward multimodal image-to-image translation," in
Advances in neural information processing systems, 2017, pp. 465–476.
[52] X. Huang, M.-Y. Liu, S. Belongie, and J. Kautz, "Multimodal unsu-
pervised image-to-image translation," in Proceedings of the European
Conference on Computer Vision (ECCV), 2018, pp. 172–189.
[53] P. Zhu, R. Abdal, Y. Qin, and P. Wonka, "Sean: Image synthesis
with semantic region-adaptive normalization," in Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition,
2020, pp. 5104–5113.
[54] D. Bau, H. Strobelt, W. Peebles, B. Zhou, J.-Y. Zhu, A. Torralba et al.,
"Semantic photo manipulation with a generative image prior," arXiv
preprint arXiv:2005.07727, 2020.
[55] S. Gu, J. Bao, H. Yang, D. Chen, F. Wen, and L. Yuan, "Mask-guided
portrait editing with conditional gans," in Proceedings of the IEEE
Conference on Computer Vision and Pattern Recognition, 2019, pp.
3436–3445.
[56] C.-H. Lee, Z. Liu, L. Wu, and P. Luo, "Maskgan: Towards diverse and
interactive facial image manipulation," in Proceedings of the IEEE/CVF
Conference on Computer Vision and Pattern Recognition, 2020, pp.
5549–5558.
[57] T. Park, M.-Y. Liu, T.-C. Wang, and J.-Y. Zhu, "Semantic image
synthesis with spatially-adaptive normalization," in Proceedings of the
ACCEPTED FOR PUBLICATION IN IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING MAY 2022
13
IEEE Conference on Computer Vision and Pattern Recognition, 2019,
pp. 2337–2346.
[58] S. Feng, Y. Lin, and B. Wohlberg, "Physically realistic training data
construction for data-driven full-waveform inversion and traveltime
tomography," in SEG Technical Program Expanded Abstracts 2020.
Society of Exploration Geophysicists, 2020, pp. 3472–3476.
[59] O. Ovcharenko, V. Kazei, D. Peter, and T. Alkhalifah, "Style transfer
for generation of realistically textured subsurface models," in SEG
Technical Program Expanded Abstracts 2019. Society of Exploration
Geophysicists, 2019, pp. 2393–2397.
[60] R. Benkert, O. J. Aribido, and G. AlRegib, "Explaining deep models
through forgettable learning dynamics," in 2021 IEEE International
Conference on Image Processing (ICIP).
IEEE, 2021, pp. 3692–3696.
[61] C. Cortes and V. Vapnik, "Support-vector networks," Machine learning,
vol. 20, no. 3, pp. 273–297, 1995.
[62] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley,
S. Ozair, A. Courville, and Y. Bengio, "Generative adversarial nets," in
Advances in neural information processing systems, 2014, pp. 2672–
2680.
[63] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille,
"Deeplab: Semantic image segmentation with deep convolutional nets,
atrous convolution, and fully connected crfs," IEEE transactions on
pattern analysis and machine intelligence, vol. 40, no. 4, pp. 834–848,
2017.
[64] 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.
[65] G. B. Orr and K.-R. M ̈uller, Neural networks: tricks of the trade.
Springer, 2003.
|
http://arxiv.org/abs/2302.12856v1 | 2023-02-24T19:10:40 | 2023-02-24T19:10:40 | Machine Learning based prediction of Glucose Levels in Type 1 Diabetes
Patients with the use of Continuous Glucose Monitoring Data | A task of vital clinical importance, within Diabetes management, is the
prevention of hypo/hyperglycemic events. Increasingly adopted Continuous
Glucose Monitoring (CGM) devices offer detailed, non-intrusive and real time
insights into a patient's blood glucose concentrations. Leveraging advanced
Machine Learning (ML) Models as methods of prediction of future glucose levels,
gives rise to substantial quality of life improvements, as well as providing a
vital tool for monitoring diabetes.
A regression based prediction approach is implemented recursively, with a
series of Machine Learning Models: Linear Regression, Hidden Markov Model,
Long-Short Term Memory Network. By exploiting a patient's past 11 hours of
blood glucose (BG) concentration measurements, a prediction of the 60 minutes
is made. Results will be assessed using performance metrics including: Root
Mean Squared Error (RMSE), normalised energy of the second-order differences
(ESOD) and F1 score.
Research of past and current approaches, as well as available dataset, led to
the establishment of an optimal training methodology for the CITY dataset,
which may be leveraged by future model development. Performance was aligned
with similar state-of-art ML models, with LSTM having RMSE of 28.55, however no
significant advantage was observed over classical Auto-regressive AR models.
Compelling insights into LSTM prediction behaviour could increase public and
legislative trust and understanding, progressing the certification of ML models
in Artificial Pancreas Systems (APS). | [
"Jakub J. Dylag"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12856v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12856v1",
"@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"
] | School of Electronics and Computer Science
Faculty of Physical Sciences and Engineering
University of Southampton
Jakub J. Dylag
May 2nd 2022
Machine Learning based prediction of
Glucose Levels in Type 1 Diabetes
Patients with the use of Continuous
Glucose Monitoring Data.
Project supervisor: Dr Nicholas Gibbins
Second examiner: Prof Koushik Maharatna
A project progress report submitted for the award of
MEng Computer Science with Artificial Intelligence
Abstract
A task of vital clinical importance, within Diabetes management, is the prevention of
hypo/hyperglycemic events. Increasingly adopted Continuous Glucose Monitoring (CGM)
devices offer detailed, non-intrusive and real time insights into a patient's blood glucose
concentrations. Leveraging advanced Machine Learning (ML) Models as methods of
prediction of future glucose levels, gives rise to substantial quality of life improvements, as
well as providing a vital tool for monitoring diabetes.
A regression based prediction approach is implemented recursively, with a series of Machine
Learning Models: Linear Regression, Hidden Markov Model, Long-Short Term Memory
Network. By exploiting a patient's past 11 hours of blood glucose (BG) concentration
measurements, a prediction of the 60 minutes is made. Results will be assessed using
performance metrics including: Root Mean Squared Error (RMSE), normalised energy of the
second-order differences (ESOD) and F1 score.
Research of past and current approaches, as well as available dataset, led to the
establishment of an optimal training methodology for the CITY dataset, which may be
leveraged by future model development. Performance was aligned with similar state-of-art
ML models, with LSTM having RMSE of 28.55, however no significant advantage was
observed over classical Auto-regressive AR models. Compelling insights into LSTM
prediction behaviour could increase public and legislative trust and understanding,
progressing the certification of ML models in Artificial Pancreas Systems (APS).
2
Statement of Originality
● I have read and understood the ECS Academic Integrity information and the University's
Academic Integrity Guidance for Students.
● I am aware that failure to act in accordance with the Regulations Governing Academic
Integrity may lead to the imposition of penalties which, for the most serious cases, may
include termination of programme.
● I consent to the University copying and distributing any or all of my work in any form and using
third parties (who may be based outside the EU/EEA) to verify whether my work contains
plagiarised material, and for quality assurance purposes.
We expect you to acknowledge all sources of information (e.g. ideas, algorithms, data) using
citations. You must also put quotation marks around any sections of text that you have
copied without paraphrasing. If any figures or tables have been taken or modified from
another source, you must explain this in the caption and cite the original source.
I have acknowledged all sources, and identified any content taken from elsewhere.
If you have used any code (e.g. open-source code), reference designs, or similar resources
that have been produced by anyone else, you must list them in the box below. In the report,
you must explain what was used and how it relates to the work you have done.
I have used Python, Jupyter Notebooks, PyTorch, hmmlearn, Scikit-learn, Numpy,
Pandas, Matplotlib, Seaborn, Pickle. CITY dataset, published by Jaeb Center for Health
Research.
You can consult with module teaching staff/demonstrators, but you should not show anyone
else your work (this includes uploading your work to publicly-accessible repositories e.g.
Github, unless expressly permitted by the module leader), or help them to do theirs. For
individual assignments, we expect you to work on your own. For group assignments, we
expect that you work only with your allocated group. You must get permission in writing
from the module teaching staff before you seek outside assistance, e.g. a proofreading service, and
declare it here.
I did all the work myself, or with my allocated group, and have not helped anyone else.
We expect that you have not fabricated, modified or distorted any data, evidence, references,
experimental results, or other material used or presented in the report. You must clearly
describe your experiments and how the results were obtained, and include all data, source
code and/or designs (either in the report, or submitted as a separate file) so that your results
could be reproduced.
The material in the report is genuine, and I have included all my data/code/designs.
We expect that you have not previously submitted any part of this work for another assessment. You
must get permission in writing from the module teaching staff before re-using any of your previously
submitted work for this assessment.
I have not submitted any part of this work for another assessment.
If your work involved research/studies (including surveys) on human participants, their cells
or data, or on animals, you must have been granted ethical approval before the work was
carried out, and any experiments must have followed these requirements. You must give
details of this in the report, and list the ethical approval reference number(s) in the box below.
My work did not involve human participants, their cells or data, or animals.
3
Acknowledgements
I would like to thank Dr Nicholas Gibins for supervising this project and mentoring me
throughout. His continuous guidance, support and feedback were invaluable and allowed me
to achieve this project. Many thanks to Prof Koushik Maharatna for examining my project and
providing insightful suggestions.
Utmost thanks to Prof. Michael Boniface, Dr. Chris Duckworth and the rest of the team at the
IT Innovation Centre, for the experience gained during my Summer Internship, which I found
essential during this project.
Last but not the least, my parents for their patience and encouragement.
4
Contents
Abstract
Statement of Originality
Acknowledgements
Contents
Nomenclature
1 Introduction
2 Literature Review
2.1 Diabetes
2.2 Past Approaches
2.3 Current Approaches
2.4 Machine Learning
2.4.1 Hidden Markov Models
2.4.2 Long-Short Term Memory
2.5 Model Explainability
3 Methodology
3.1 Data Acquisition
3.2 Data Analysis
3.2.1 Patient Cohort
3.2.2 CGM Measurements
3.2.3 Statistical Methods
3.3 Clustering
3.4 Design Methodology
4 Implementation
4.1 Data Preparation
4.2 HMM
4.3 LSTM
4.3.2 Hyper parameter Tuning
5 Evaluation
5.1 Evaluation methodology
5.2 Training Comparison
5.3 Results
5.4 Model Comparison
5.5 Explainability
5.6 Limitations
6 Conclusions and Future work
6.1 Project Management
6.2 Conclusions
6.3 Future Work
References
Appendices
Appendix A: Project Brief
Appendix B: Planned Gantt Chart Brief
Appendix C: Actual Event Gantt Chart
2
3
4
5
6
7
8
8
10
10
12
12
12
15
16
16
17
17
18
19
20
22
23
23
24
25
26
28
28
29
30
31
32
33
34
34
34
35
36
52
44
45
46
5
Nomenclature
AI - Artificial Intelligence
APS - Artificial Pancreas Systems
AR - Autoregressive
BG - Blood glucose
BMI - Body Mass Index
CF - Correction factor
CGM - Continuous Glucose Monitoring
CITY - CGM Intervention in Teens and Young Adults with Type 1 Diabetes
CR - Carbohydrate-to-insulin ratio
EM - Expectation-Maximisation Algorithm
ESOD - Energy of Second Order Difference
GMM - Gaussian Mixture Modelling
GRU - Gated Recurrent Unit
HMM - Hidden Markov Models
HbA1c - Haemoglobin A1c test
LIME - Local Interpretable Model-agnostic Explanations
LRP - Layer-wise relevance propagation
LSTM - Long Short-Term Memory
ML - Machine Learning
MSE - Mean Square Error
PH - Prediction horizon
PMCC - Product Moment Correlation Coefficient
RMSE - Root Mean Square Error
RNN - Recurrent Neural Networks
S.D. - Standard Deviation
SHAP - Shapley Additive Explanations
T1D - Type 1 Diabetes
6
1 Introduction
Artificial Intelligence has made large advances in preventive medicine and management of
chronic conditions, such as Diabetes. The symptoms of this chronic, metabolic disease
include unregulated blood glucose (BG) levels and hyperglycaemic events, which over time
can lead to irreversible damage to the heart, kidneys, blood vessels, eyes and nerves.
Type 1 Diabetes (T1D) Patients must use external insulin, with effective management
requiring optimal doses of insulin, through injection or infusion, multiple times per day.
Current technologies have found success in minimising risk of long-term complications,
however can also pose a significant burden on self-managing patients, reducing quality of
life.
Recent growth in digital disease management platforms and an increased use of
diabetes-related data sensors, such as Continuous Glucose Monitoring (CGM), have
resulted in rapid evolution towards Autonomous Diabetes Systems, which implement
Machine Learning (ML) approaches to predict future glucose levels, detect hyperglycaemic
events, assist with decision making and risk stratification for T1D patients.
The implementation of leading Neural Network based ML models could advance prediction
accuracy and provide more personalised predictions. This leads to the opportunity to explain
model predictions and justify conclusions reached, crucial for medical use.
7
2 Literature Review
2.1 Diabetes
Diabetes Mellitus affects the pancreas' ability to regulate insulin. The condition is categorised
into different forms dependant on the cause: Prediabetes, Type 1 Diabetes, Type 2 Diabetes,
Gestational Diabetes [4]. The International Diabetes Foundation estimates there are over
463 million diabetics worldwide, with projected increases to 578 million by 2030 [3]. The
Insulin hormone is responsible for intake of glucose into muscles, effectively decreasing BG
levels. When digesting carbohydrates, glucose is introduced to the bloodstream, risking
excessively high levels (hyperglycemia). A bolus of insulin may need to be taken to reduce
glucose levels, or before performing exercise.
T1D is an autoimmune condition thought to be caused by the destruction of insulin-producing
beta type cells [2] by the immune system. Symptoms of marked hyperglycemia include
polyuria (excessive urination), polydipsia (extreme thirst), weight loss, sometimes with
polyphagia (extreme hunger), ketonemia and blurred vision [5]. Hood and Colleagues [6] also
indicated increased risk of elevated depression symptoms in children and adolescents.
Although the condition can appear at any age, it is most common to appear around the ages
of 4-7 and 10-14 [1]. Historically, T1D diagnosis has included fasting BG levels higher than
126 mg/dL or any measurement of 200 mg/dL. Diagnosis can also be made with a HbA1c
(average BG concentration over past 3 months) value over 864 mg/dL mmol/mol [2]. Despite
more recent efforts to standardise diagnosis, causes and typology remain unclear among
adults [2].
Although patients who self-monitor BG levels can see long-term benefits, limitations such as
inconvenience, poor adherence to frequent measurements and financial costs of disposables
may result in erroneous readings [7] and therefore inaccurate predictions. Recent advances
in sensor technology enabled CGM devices to be developed. CGM devices greatly reduce
feelings of burden and of inconvenience [10]. These sensors are minimally invasive, using a
single electrode needle and perform readings every 1-5 minutes for consecutive days or
weeks [9].
Juvenile Diabetes Research Foundation [8] demonstrated reductions in nocturnal
hypoglycaemia in children and adolescents when using CGM compared to self-monitoring.
The increasing amount of frequent data is causing the decision-making process to become
more complex. Current research is focused on developing algorithms to simplify this process
and progressively automate in the future. Prototypes of closed loop Artificial Pancreas
Systems (APS) [11] are being investigated by the open source community, which integrate
CGM devices with Automatic Insulin Injection, enabling fully automated therapy with no input
from the patient or medical staff.
8
The range of Autonomous Disease Management systems has been classified by Bitterman
and colleagues [22] into a set of 5 levels of autonomy, each with specific risk management
and legal liability, as presented in Figure 1 below.
Figure 1: levels of autonomy [22]
CGM devices alone are limited to data presentation functionality, however with addition of
predictive algorithms are classified as level 3. Future APS will have higher or full degrees of
automation, introducing legal responsibility for the AI developers.
9
2.2 Past Approaches
Early Decision Support Systems are designed to help medical professionals in retrospective
analysis of patient's data. Centralised Telemedicine services were enabled by remote
communication, through integrations of Web and Telephone access, between Patient Units
and central Patient Management Units [13, 14]. This allowed for the implementation of
empirical mathematical models that calculate the new dose of the medication required to
achieve therapeutic goals [15].
A standard T1D therapy includes the use of a Bolus Calculator to calculate the dose of
insulin bolus required using the equation:
B = CHO
CR +
−G
G
T
C
CF − PS × IOB
Equation 1: Bolus Calculator [12]
The first part of the formula is concerned with finding the meal boluses required to offset
ingested carbohydrates during the meal. This is calculated as the ratio between carbohydrate
intake (CHO) and carbohydrate-to-insulin ratio (CR), a parameter specific to each patient.
Next the correction insulin dose to alter BG concentrations to the target level is calculated
dividing the difference between measured concentration (GC) and the target concentration
(GT), by the correction factor (CF).
Finally, to avoid insulin stacking from the previous injection subtraction of the Insulin on
Board (IOB) is necessary. The multiplier physiological state (PS) can be introduced to
increase accuracy. PS is <1 when insulin sensitivity is increased, for example during exercise
and PS >1 when sensitivity is decreased, for example during illness [16].
Despite standardisation and the success of these empirical approaches, prediction accuracy
is limited by the high degree of generalisation.
2.3 Current Approaches
Within this section more complex and personalised methods of glucose management will be
investigated.
Adaptive Tuning of Bolus Calculator Parameters could better personalise therapy and
automate periodic adjustments by clinicians, reducing the cost of care.
Herrero and colleagues [17] automatically adjusted the CR and CF parameters everyday in a
run-to-run methodology based on CGM data. Although results on simulated data were
promising, with significant reductions in time spent in hypoglycaemia, a fundamental flaw
exists in the assumption of repetitive BG levels. Many factors such as exercise, hormone
cycle, alcohol, stress, mental illness and others, can dramatically affect glucose levels and
are not accounted for.
With the addition of case-based reasoning to the run-to-run methodology situational context
can be comprehended by the algorithm. Successful recent approaches from Sun and
colleagues [18] incorporate reinforcement learning and produced encouraging results on
virtualized data by personalising parameters for better glycemic control even in extreme
scenarios. However this has not been thoroughly tested with real CGM data.
10
CGM devices not only allow for detection of hypo/hyperglycemic events, but also permits
prediction. There are two main approaches in the literature. Firstly, viewing it as a regression
problem and predicting the values of BG concentration into the future until a prediction
horizon (PH). Secondly, forecasting the occurrence of future hypo/hyperglycemic events [9].
Another distinction can be made on the origin of training data. Some algorithms only use
CGM data while others implement external input for meal content and amount of injected
insulin, which have been shown to enhance predictions [20]. Furthermore, given the limited
amount of CGM data, some studies use simulated data (in silico trial) from the widely used
UVA/PADOVA simulator [21].
Population algorithms are standardised and reused throughout the whole population.
Although this approach can leverage large CGM datasets and reduce development time, by
only needing to train a single model, predictions are not personalised to the patient.
By contrast, subject-specific algorithms which orchestrate various specialised models to
produce a combined prediction, account for the variability between individual's characteristics
[19].
Prediction of glucose concentration models have a limited PH under 60 minutes. This allows
for the patient to be alerted up to 60 minutes before the glucose concentrations become too
high/low. As presented in Figure 2 below, predictions enable patients to pre-emptively digest
carbohydrates or inject insulin prior to surpassing dangerous thresholds, minimising the time
spent hyper/hypoglycemic.
Figure 2: predictions made on nocturnal CGM series plot [9]
Event prediction models reduce prediction difficulty by only forecasting the time of
occurrence without the exact glucose concentration levels. This simplification enables a
larger PH between 2-3 hours, giving the ability for the patient to identify postprandial
hypoglycaemia at the time of eating, allowing the patient to not have to eat extra
carbohydrates, managing their weight and promoting a healthier lifestyle.
11
2.4 Machine Learning
The most recent CGM sensors [23] adopt simple prediction algorithms such as linear
extrapolation 15–30 min in advance and generating alerts if a hypo/hyperglycemic threshold
is predicted to be surpassed [24]. Accuracy can be further improved by utilising LASSO (L1)
regularisation [29].
Autoregressive (AR) models capture the signal's frequency information and are invariant to
the signal's phase and amplitude [25]. AR is a popular approach for both Adaptive Tuning of
Bolus Calculator Parameters, as well as regression like glucose level prediction. The
simplified parameters allow for detailed interpretations, in contrast to more complex models
described below.
2.4.1 Hidden Markov Models
Hidden Markov Models (HMM) are an extension of the Markov process [26]
This state-space model in which latent variables represent discrete values, is
considered to be a double Stochastic process, consisting of Hidden States that cannot be
observed, in addition to a random sequence of observations dependent on previous states
[39]. This property makes them capable of predicting and analysing any temporal sequence.
Defined by the number of Hidden states (N), as well as number of observation symbols per
state (M). Model parameters dictate the state transitions and are estimated by a special
case of Expectation-Maximisation (EM) Algorithm, known as the Baum-Welch algorithm [40].
Of note is that this algorithm is a gradient-based optimization method, which is vulnerable to
stagnation in local maximas [41]. Other recent approaches implement both supervised and
unsupervised training of HMM.
The Veterbi algorithm is most commonly used to infer optimal hidden states, hence predicting
the next time step. A decoder is also necessary to map the state-space of discrete random
variables to an comprehensible output value. By increasing the number of hidden states
output resolution is enhanced however at the expense of model complexity; leading to
increased computation and data requirements.
HMM has been demonstrated to be optimal for small training sets (N < 1000) [26].
2.4.2 Long-Short Term Memory
Introduced by Hochreiter and Schmidhuber in 1997 [45] Long-Short Term Memory (LSTM)
networks are a leading accuracy in complex time series prediction tasks [28], by leveraging
its capability to bridge long-term dependencies in excess of 1000 time steps [45].
LSTMs are well suited for temporal data and have shown advantages in Machine Translation
[56], Speech recognition [57] and mortality prediction in Intensive Care Units, based on
Electronic Healthcare Records [58].
12
Figure 3: Graphic illustration of LSTM cell [51]
LSTM cells hold 2 types of memory: short and long. Hidden States (ht) are used throughout
Recurrent Neural Networks (RNN) to store immediate previous events and are constantly
majorly altered by a series of gates. The internal Cell State stores long term dependencies,
with only minor linear interactions throughout the forward pass [44]. This enhances RNN
performance, which is inhibited by the vanishing gradient problem [53]. Both are represented
as vectors of predefined size, with larger vectors increasing model complexity.
Both the cell and hidden states are fed back to the input of the cell, alongside the next time
step and the calculations are repeated until the whole sequence is processed. Once the final
time step is reached the terminal cell state is passed to a fully connected output layer, which
subsequently produces the final output [43].
Equation 2: Formulaic definition of LSTM cell [46]
Of note is the forget gate (ft), which is a sigmoid layer selecting what information to discard
from the cell state. The input (it) and output (ot) gates transform the previous hidden state
(ht-1), using a sigmoid activation function, to incorporate into cell state (Ct) and output hidden
state (ht) respectively.
LSTM flexible architecture offers a range of possible configurations.
Bidirectional LSTM (BiLSTM) architecture is similar to vanilla LSTM, however the sequence
is processed in both the forward and backwards direction, which requires the entire
sequence to be available at once.
13
Figure 4: Illustration of Stacked LSTM architecture [52]
The Recurrent nature of LSTM enables the forwarding of the cell state, not only to the next
cell, but also to a deep LSTM layer. These layers take the cell state from previous layers as
input as opposed to the input data, which allows for increasing levels of abstractions to form.
With these increased capabilities, multiple parallel series can be effectively analysed, forming
a single prediction. This can be utilised as a method of inputting static variables by creating a
constant time series for each. However complexity will be increased, strengthening
requirements for more layers and data to achieve sufficient accuracy.
Convolutional LSTMs (ConvLSTM) incorporate a one dimensional convolutional layer
previous to the initial LSTM layer [54], in order to allow for deeper understanding. Renzhuo
Wan et al. [55] has demonstrated ConvLSTM superiority in multivariate time series prediction
over other attention models. Although BiLSTM has lowest RMSE in Sequence-to-Sequence
prediction, ConvLSTM marginally improves upon it for individual models [42].
Other variants of LSTM include Gated Recurrent Unit (GRU) [59] and the addition of
peephole connections [60]. GRUs simplify the LSTM architecture and reduce training cost
by combining the input and output gates to form a single update gate. However LSTMs
remain prevalent in most use cases.
A challenging problem with LSTM architecture most prevalent with stacked LSTMs, is
overfitting. A solution to overcome this is the use of Drop Out layers in between LSTM layers
for better generalisation, as seen in figure 4. This randomly discards node outputs, altering
the following layers perspective and entices generalisation.
In contrast to HMM, LSTM harnesses greater accuracy using large datasets (N > 1000) [26].
However LSTM complexity is detrimental to prediction accuracy when using smaller
datasets.
14
2.5 Model Explainability
Clinical practitioners and patients would like more granularity in alerts and to better
understand the reasoning behind it. Excessive risk notifications could lead to alert fatigue,
where patients or doctors become desensitised and are less likely to take necessary action.
Current algorithms, such as Shapley Additive Explanations (SHAP) and Local Interpretable
Model-agnostic Explanations (LIME), focus on extracting feature importance. SHAP
conditions on each feature, measuring change in prediction based on given changes in input
feature [63]. LIME samples neighbouring nodes in the region of interest and approximates
their behaviour with simpler surrogate functions [62]. Although demonstrating the importance
of a feature is vital in large multi-feature Neural Networks, temporal datasets with limited
features do not benefit from this approach. Instead it is crucial to survey event importance in
order to extract meaning from time-series prediction algorithms.
A common approach is Layer-wise relevance propagation (LRP) [30], which interprets
individual predictions in terms of input variables, by propagating the predictions backwards.
This method. It has been used to provide for state-of-the-art models such as VGG-16 [30]
and can be effectively applied to any Neural Neural or LSTM model. [31]
When applied to LSTM networks, LRP procedures can be restricted to only utilise the
necessary many-to-one weighted linear connections and two-to-one multiplicative
interactions evident in LSTMs [61]. One primary problem with LRP is that it requires the
definition of target classes, which is not suitable for continuous predictive models.
A specific method of analysing LSTM would be logging the forget gate, which controls the
importance of the previous cell state (as demonstrated in Section 2.4.2). Research has
shown that the forget gate is one of the most important gates in the LSTM, with
forget-gate-only versions outperforming standard LSTM models on certain benchmark
datasets [64]. Higher values of the forget gate vector indicate that the previous cell state
needs to be remembered, as opposed to lower values that justify forgetting the previous cell
[65]. By recording the state of the forget gate during each prediction at the inference stage,
the importance of the previous cell state can be viewed as the importance of a single time
step compared to the sequence as a whole.
15
3 Methodology
3.1 Data Acquisition
Identifying a suitable CGM T1D Dataset is vital to the success of this project.
In addition to maximising the number of measurements, consistency within the dataset is
essential. Minimal interruptions and gaps, minimise interpolation required, enhancing the
quality of the data and true representation of trends. To add to that, a varied study cohort is
required to ensure good representation of population and promote generalisation in the
model.
Various Datasets [32, 33, 66, 67] have been found, however due to the privacy restrictions in
the UK/EU the search was limited to public datasets in the US.
Dataset
Patients
Age
Duration
Tamborlane 2008
Chase 2005
CITY 2019
Aleppo 2017
OhioT1DM 2020
451
200
153
224
12
Maastricht 2010
197 (T2D)
Weinstock 2016
200
8 >
7-18
14-25
25-40
20-60
40-57
60 >
6 months
6 months
22 months
6 months
2 months
3 months
14 days
Figure 5: Tabular presentation of most prominent surveyed Datasets
OhioT1DM Dataset [66] commonly used in other studies [36], includes 8 weeks of data
collected from 12 anonymous T1D patients, between the ages 20 and 60 years old. Data
was highly unsynchronized as collected from multiple devices and sometimes logged
manually [66].
Most datasets focus on a specific age group, enabling a combination of 5 datasets to form a
complete lifespan sequence. Although joining datasets could expand the size and scope of
the model, the accuracy and usage between different models of prevalent CGM devices, as
well as environmental factors and testing methodology differences, can have a detrimental
impact on prediction accuracy, given increased variability of data quality.
CGM Intervention in Teens and Young Adults with T1D (CITY) Dataset [ 32] was chosen,
featuring data from 153 patients over a period of 22 months [34]. With the largest amount of
CGM data collected from similar CGM devices (Dexcom G4/G5/G6). Using a large dataset
would allow for more flexibility in model choice, training methodology and more accurate
testing.
*The source of the CITY dataset is Jaeb Center for Health Research, but the analysis, content and conclusions presented
herein are solely the responsibility of the authors and have not been reviewed or approved by Jaeb Center for Health Research
16
3.2 Data Analysis
3.2.1 Patient Cohort
CITY focuses on teenagers and young adults, with a mean (s.d.) age of 17.46 (2.91), with
100 patients between the ages of 14 and 18 (inclusive) and 53 over 18, at the time of
enrollment. The maximum age was 24.
Insufficient frequency of patients' physical examinations, lead to the decision of representing
variable physical features as static by computing the mean or max as appropriate.
The mean (s.d.) weight was 74.26 kg (16.22) and 169 cm (10.28) for height. Therefore the
mean (s.d.) Body Mass Index (BMI) was 25.96 (5.14), which means 50.9% of patients are
classified as atleast overweight with 17.6% obese. In comparison with the United States
adult average BMI of 29.3, with 71.0% being at least overweight [68], the studies cohort is
shown to be healthier on average.
Commonly expected biological trends, such as on average men being taller and heavier than
women, were represented in the population. Interestingly, the frequent assumption of a
positive correlation between weight and resting heart rate was absent. The same is true for
abnormal health judged by a detailed medical assessment, which was randomly distributed
within the population, independent of both weight and height. It is important to note that
correlations observed from this limited sample are not representative of the population at
large and should be taken with great caution.
Further Analysis of the patient population indicated patients were highly educated with over
74% attending university. Ethnicity was highly homogeneous with 129 out of 153 (84.3%)
patients being of white background. Annual Income in US Dollars had a mean (s.d.) of
$64,869 (58,348). This elevated standard deviation, alongside a high variance of 3,404.51,
quantifies a large division in annual income, with 36 patients earning over $100,000 and 41
earning less than $25,000. Results are consistent with the median household income of
$67,521 in 2020 [69].
Despite the scope of the data limited to teenagers and young adults with T1D, selection bias
in the study cohort is evident towards the white ethnic group and the highly educated. This
cohort may not be representative of common glucose concentration behaviour, therefore
limiting the generalisation and adaptability of the model.
17
3.2.2 CGM Measurements
Of note are the Florida USA origins of the data, where the unit for BG concentration is mg/dL,
whereas the European standard is mmol/L (1 mmol/L = 18 mg/dL). CGM Readings were
distributed in a positively skewed normal distribution, with a mean of 204.56 mg/dL and
standard deviation of 87.21. Interestingly, the largest concentration of reading is at 401 with
3.59%. This could be due to the limited range of the CGM devices (Dexcom G4/G5/G6).
However further extreme readings exist, with 1009 readings (0.012%) above 401 mg/dL up
to a maximum of 600 mg/dL, which is diagnosed as a Diabetic Coma [70]
Figure 6: Mean (left) and s.d. (right) of daily CGM readings grouped at 5 minute intervals
Minimum average levels of 191.61 mg/dL can be observed at 7:05 with maximums of 218.08
at 21:40. Variability of readings remains very high at a minimum of 78.92 across the whole
day, with further increases up to a maximum of 91.08 during evening hours. This
demonstrates instability of BG levels and large variability between consecutive days (weak
cyclical behaviour), which can be medically correlated to the patient's exercise regime and
diet throughout the day. Although this posed greater difficulty of prediction, it allowed for
more flexibility during training set creation.
Figure 7: Distribution of Lengths of consecutive CGM reading sequences
Readings were not performed consistently, with unpredictable periods of missing data as a
result of multiple factors such as: CGM device battery depletion, patient forgetting to apply
CGM device. This is quantified by a large standard deviation of 562.33. Half of the
sequences (N=14,079) were under 50 in length, with all sequences were under 4,000 (13.89
days) in length, except a single extrema of length 9,963 (34.59 days).
18
3.2.3 Statistical Methods
Statistical Analysis of Patient Data was conducted in order to select essential static features,
in addition to temporal CGM readings.
Covariance Matrix and Correlation Matrix were computed with all values normalised previous
to calculations to eliminate value range bias. The covariance quantifies the direction of the
relationship, with a positive covariance signifying a positive correlation and similarly a
negative value for a negative correlation. Product Moment Correlation Coefficient (PMCC)
neatly accompanies the covariance matrix and is used to calculate the strength of a
correlation. Leveraging both matrices allows for the identification of both the direction and
strength of trends between features.
Figure 8: Covariance and Correlation Matrix for Patient Details
(normalised between 10 and -10 for illustration purposes)
HbA1c has a high variance (10.97 × 10-3) indicating the high variability in diabetic patients,
which could be detrimental to generalised prediction models.
Furthermore HbA1c covariance with weight and height are significantly reduced, with -6.33 ×
10-4 and -8.14 × 10-4 respectively, in addition to further reductions with BMI. Interestingly
HbA1c and BMI are positively correlated (0.024), in contrast to the negative correlations with
Weight and Height (-0.048 and -0.151). This minor correlation goes against common belief,
presenting negligible correlations between BG levels and primitive health indicators such as
BMI, suggesting independence between body fat percentage and BG concentrations.
19
Figure 9: Illustration of Annual Income (103 USD) against HbA1c (mg/dL) (m = -0.0955)
Analysing the correlation between HbA1c and Annual income presents a significant causal
relationship. Elevated PMCC between the two (-0.17), in addition to negative linear
correlation (presented above) reinforces the theory of lifestyle and dietary differences
between social classes impacting patient glucose levels. This could be attributed to the
increased cost of low glycemic food sources such as Protein and Vegetables, in comparison
to cheap processed foods, prohibiting access to lower income patients and elevating their
exposure to sugar-rich foods.
Most important features can be selected using variance thresholding [71] approach, which
removes all variables whose variance does not exceed threshold. This yields the most
meaningful features to be: Annual income, Education Level, HbA1c, Height and weight.
However as BMI is calculated from the combination of height and weight, it is a more
meaningful feature and therefore better representative of patient health.
HbA1c, Annual income and BMI are concluded to be the most crucial features.
3.3 Clustering
Calculations of cohort variability revealed major divergences within the patient population,
advocating leveraging these differences by clustering patients into distinct cohorts, thus
decreasing variability in patient characteristics. Statistical methods quantified the large
covariances within patient details (Section 3.2.3). Correspondingly, CGM data was found to
have weak cyclical behaviour and extremas (Section 3.2.2). The aforementioned indicates
the scope of major divergences in the population.
An assumption can be made that contrasting patient characteristics lead to heterogeneous
behaviour of BG concentrations. In the case of similar patient characteristics a generalised
model trained upon a single population could be successfully implemented. By contrast, with
large variations between patients it may be necessary to train personalised models for each
patient, which could restrict the scope of CGM behaviour, decreasing prediction difficulty.
However this would significantly reduce the size of the training set, introducing a prevalent
risk of underfitting in complex models, such as LSTM.
20
Gaussian Mixture Modelling (GMM) [72] was chosen over K-means clustering, which
assumes circular distribution by using the euclidean distance between points, whereas GMM
allows for the elliptical spread of data for better division. The expectation-maximisation (EM)
algorithm [73], was utilised to optimise centroid positioning. Insurances were made that the
solution was optimal by performing 200 iterations for each of the 20 random initial settings.
Figure 10: Relationship between HbA1c (horizontal) and Annual Income(vertical) across the coloured
3 cohort of patients.
Effectiveness of groupings could be quantified by the lower bound value on the log-likelihood
of the optimal clustering. Although combinations of most varianced variables such as sex and
annual income would provide the most distinct groupings, it is evident that these variables
would have the least impact on oscillations of CGM readings, which would not substantially
improve model performance. Experimentation with a range of more meaningful variables
directed to the choice of HbA1c and Annual Income with 3 distinct cohorts, resulting in the
lowest log-likelihood of -8.25.
Figure 11: Distribution of HbA1c across 3 cohorts.
Further analysis was conducted into the resulting distributions of variables for each cohort,
visually illustrating the distinctness of the clustering. It is evident that GMM was focused on
the separation of annual income brackets with high, medium and low groupings. However
HbA1c has significant overlap with limited distinction, which could be detrimental to model
performance.
21
3.4 Design Methodology
Although Hypo/Hyperglycemic Event Forecast Models could give greater benefit to the
patient with longer PH, Glucose Concentration Prediction Models are more widely used, offer
a deeper insight into the explainability of the model's prediction process, as well as potential
use in Artificial Pancreases in the future.
Such regressive models for Glucose concentration prediction can be used both in a recursive
and direct fashion. Recursive methods incorporate the previous prediction in their input,
whereas direct methods do not [36]. Direct methods require the implementation of sequence
to sequence models (many-to-many), which inflate model complexity exacerbating underfit
risk. Recursive predictions lead to the accumulation of error, resulting in a lesser accuracy,
however deeper explainability insights can be gained, by analysis of each individual time
step. More thorough analysis could promote faster adoption, in addition to trust and reliability
for patients and medical staff. Therefore a recursive approach will be implemented.
Analysis of varied Machine Learning Models (Section 2.4) has shown a range of trade-offs
between levels of model complexity. Therefore, it is most appropriate that a diverse span of
models be used, allowing for detailed comparison and selecting the highest performing.
Comparative investigation led to the choice of: Linear Regression, HMM and Stacked LSTM
models. Prevalent AR models will not be implemented as previous studies have indicated
disjointed sequential data, as quantified in Section 3.2.2, can severely impact accuracy [74].
Although a range of LSTM configurations, such as Bi-directional and Convolutional are
available, they significantly impede explainability investigations, as well as increasing the risk
of underfitting. Therefore a Stacked LSTM will be implemented enabling flexibility in model
complexity, by adjustment of stacked layers.
This chosen range of models enables a thorough comparison, given the same training data
and allows for better judgement of accuracy. Discrepancies during comparisons with other
predictive solutions for Autonomous Diabetes Systems, could arise from the scarcse use of
the CITY dataset, not allowing for equivalent judgement. Thus, internal model evaluation and
use of multiple models can help alleviate the aforementioned problems.
A multitude of two training methodologies will be implemented in a separate parallel form.
A generalised model will employ all available temporal data, in distinction to a clustering
approach, which will develop 3 independent models from each of the cohorts outlined in
Section 3.3. Both approaches will be independently trained on a sequence of 132
measurements, which approximates 11 hours, and predict the next 12 measurements (60
minutes). These will be tested against the validation set consisting of 12 readings. Insights
from Section 3.2.2 informed this decision, as 10,379 sequences (36.69%) of length more
than 144 will be available for training and testing. Although decreasing the required length
would allow for more training data, shorter sequences may not supply adequate context to
LSTM's long-term memory impacting prediction performance.
It is vital that all CGM sequences belonging to a certain patient must be kept in the same
cluster to ensure there is no contamination between the training and testing data sets.
Standard randomised sampling of sequences for cross-validation method (Section 5.1),
would mix readings between clusters, therefore train-test split must be conducted
subsequent to clustering.
Performance will be evaluated using a series of metrics: Root Mean Squared Error (RMSE),
F1 score and Energy of Second Order Difference (ESOD). Details are outlined in Section 5.1.
HMM with fewer hyperparameters facilitate more detailed and thorough interpretation, as
opposed to LSTM, which are challenging to comprehend. However due to time constraints
explainability analysis will be limited to the best performing model. This will aim to quantify
the attention placed on each datapoint, emphasising significant events.
22
4 Implementation
4.1 Data Preparation
Raw data stored in text-file format, from the CITY dataset, was imported and passed through
a preprocessing pipeline for training and testing set creation. Python packages such as
Pandas and Numpy were heavily utilised within the pipeline, in addition to all statistical
analysis documented in previous sections.
Figure 12: Illustration of CGM data loss (number of readings) throughout Preprocessing pipeline
As cohorts were divided by patient, all CGM data from one patient was included in the cohort
they belonged to. The same process is computed for the generalised dataset and each of the
cohorts, divided from clustering.
Consecutive measurements within sequences must be made within 15 mins, allowing
sufficient time for users to switch CGM devices once battery is depleted. 28,290 sequences
of connected measurements were identified. However only 10,379 sequences (36.69%) were
more than 144 in length (Section 3.4). Subsequently randomised division into test sets and
training is performed using a 5-fold cross-validation methodology.
23
Segmentation into lengths of 144, of both training and test sets was performed (as specified
in Section 3.4), with the remaining readings being discarded. The first 132 readings were
used as input data with the following 12 used as validation during training. This data was
used to train the HMM and Linear Regression models.
Additional data augmentation was performed on LSTM training data, due to the inefficiency
of training HMM models. Therefore it was impractical to train HMM with such a large dataset.
Augmentation vastly enlarged the number of sequences from 49,769 to 6,391,075, using a
sliding window size of 144 samples (11 hours) and step size of 1 (5 minutes). Similarly 132
initial readings are used to train with the following 12 used as validation. Although duplication
of sequence segments will not provide unseen information, variations of sequences present
varied context, maximising the available training data. Also it is vital to note augmentation
was only performed on the training set and not validation set in order to avoid test set
contamination and duplication of test sequences producing unequal representation.
Dataset
Patients
Set Size
(sequences)
Training Set Size
(sequences)
Test Set Size
(sequences)
All
Cohort 1
Cohort 2
Cohort 3
153
6,391,075
5,112,860
1,278,215
86
36
31
3,296,488
2,637,190
1,203,470
962,776
1,891,117
1,512,893
659,298
240,694
378,224
Figure 13: Tabular comparison of all processed datasets used
Cohort 1 is the largest with 52% of data, followed by Cohort 2 and 3 which roughly share the
remaining data at 19% and 30% respectively.
Pandas' Dataframes enabled versatile analysis of given features, however performance
limitations exist and Numpy Arrays were favoured for training. Serialisation of the arrays
using the python pickle library was conducted in order to limit computation and ensure data
consistency between models.
4.2 HMM
HMM model was created using the hmmlearn python library [41]. Regular step intervals in
the dataset promoted the use of a Discrete HMM as opposed to Continuous HMM, which
considers irregular measurements [77]. This would provide further context and
disproportionately favour HMM over LSTM. An implementation of Viterbi Training Algorithm
[76] was required, as it was not included in the python package. This dynamic programming
algorithm approximates the maximum likelihood explanation, predicting the next state, which
corresponds to a segment of the possible glucose concentrations. The initial formula
μ
further best states (k) are recursively identified using (Xk) = (Xk-1)P[Xk|Xk-1]P[Yk|Xk].
Scaling of the Viterbi output was required to map the ordinal state values to real glucose
measurements.
(X0) = P[Y0|X0]P[X0] is utilised to identify the initial best state, given observed data. All
μ
μ
24
The default Baum-Welch Algorithm [75] implementation in the hmmlearn package was
utilised to train the HMM. Training was very slow, with limited parallelisation and no GPU
support. All computation was performed on a single CPU core (4.5GHz) with 32 GB of RAM.
Number of
States
Iterations
RMSE
3
20
100
1k
2k
10k
156.04 (18.07)
146.15 (17.92)
112.34 (15.73)
Figure 14: Table of all HMM models used in hyperparameter tuning
An array of hyperparameter combinations were investigated. Increases in the number of
states led to additional complexity in the model, requiring further iterations to fully train the
HMM. The best performant model had the included the most states and iterations, with 100
states and 10,000 iterations resulting in an RMSE of 112.34. Larger HMM models were
impractical to train, given that 10,000 iterations took over 12 hours of computation.
4.3 LSTM
Creation of the LSTM model was performed in an object-oriented approach permitted by the
PyTorch framework in Python. By leveraging polymorphism standardise LSTM PyTorch
classes can be inherited and adapted to specific dataset requirements, whilst remaining
compatible with other supporting logic through standardised interfaces.
The nn.Module base class [48] for all neural networks, must first be inherited to enable
interactions with other modules by implementing the interface through the __init__ () and
forward() functions. Specialised layers such as LSTM are defined within the __init__()
function and stored as local class properties. By storing key model attributes as local
variables rapid alterations to the architecture can be made by re-initialising the object with a
new set of starting parameters. Next a single forward pass and accompanying logic is
defined within the forward() function [48], ordering the execution of the previously defined
layers. The nn.LSTM layer [46] prediction internally computes the prediction from L stacked
layers, which is next flattened and passed to a fully connected output layer nn.Linear [47].
The output is returned in addition to the hidden state to be used in the following recursive
prediction.
The default Mini-Batch Gradient Descent methodology included within PyTorch was utilised,
alongside PyTorch CUDA implementation, enabling fast parallelised training on a GPU.
Training was performed on a Nvidia RTX 3070ti GPU consisting of 6144 CUDA cores and
8GB of VRAM. A DataLoader [ 49] was employed to iteratively load batches of 128
sequences to the GPU, which was limited by the size of the VRAM. Every model was trained
for a duration of 20 epochs, with a limited test subsequently performed. This employed a
randomised constrained testset (N=1000 sequences) as a heuristic of test loss. This
methodology facilitated the identification of overfitting by comparison of the Training loss and
Test loss, making it fundamental to the training of large models prevalent to overfitting.
ADAM optimiser with a default learning rate of 0.001 was incorporated to dynamically reduce
the learning rate. This enabled smaller changes to be made by the Mini-batch Gradient
Descent Algorithm, fine tuning parameters to the identified minimum.
25
4.3.2 Hyper parameter Tuning
Evaluation of a broad spectrum of hyperparameter combinations was performed for this deep
network. Hyperparameters such as number of layers and hidden memory cells are crucial
aspects of the model and highly dependent on the complexity of the dataset. Accuracy and
efficiency requirements are also a factor with increased hidden memory cells able to store
more greater context, but significantly elevate computation requirements and escalate the
risk of overfitting.
Figure 15: LSTM RMSE loss on limited test set across variable hidden sizes
Firstly, the effect of Hidden size on prediction performance was investigated.
Complexity of larger models was clearly illustrated by initial performance, where larger
models had worse initial performance and required more epochs to reach minimum loss.
Only 3 epochs were required for hidden size 8 to train, in contrast to 9 for 128 memory cells.
Overfit was evident across larger models with rising discrepancies between train loss and
test loss. This is clearly illustrated within epoch 4 for hidden size 128, which has the lowest
training loss of 41.42 across all sizes, but the highest test loss of 242.00.
The best models: epoch 3 of hidden size 8 and epoch 6 of hidden size 16 were tested upon
the whole testset, resulting in Root Mean Square Error (RMSE) of 33.31 and 33.07. Although
the hidden size 16 has better performance, training took twice as long, which would be
further exacerbated with the addition of stacked layers. Therefore 8 was chosen to be the
optimal hidden memory size.
26
Secondly, the same approach was applied to investigate the layer depth.
A presumption can be made that the addition of stacked layers (Section 2.4.2) enabled
deeper insights from a more abstracted viewpoint.
Figure 16: LSTM RMSE loss on limited test set across variable amounts of layers
Slight improvement over single layered vanilla LSTM, with the second layer making the most
significant improvements to accuracy. Only marginal improvements were observed from the
third layer, when compared to the addition of the second. Layer 4 did not coverage during
training, having a consistent loss over 7300 and so it was inappropriate to test.
Epoch 5 of 2 stacked layers and epoch 8 of 3 layers were evaluated upon the whole test set,
resulting in RMSE of 29.05 and 28.55 respectively. The optimal final model is made up of
1,513 trainable parameters and consists of 8 hidden memory cells, with 3 stacked layers.
These hyperparameters were reused for all 5 repetitions of the cross-validation process.
27
5 Evaluation
5.1 Evaluation methodology
The evaluation will be conducted using a 5-fold cross-validation strategy (20% of the
sequences being used to test and 80% to train), in addition to a random sampler, with a
predefined seed to ensure repeatability. Sequences of consecutive measurements derived
from a cohort, will be divided prior to segmentation and augmentation in order to eliminate
duplicate sequences between the training and test sets. This eliminates the risk of test set
contamination. Accuracy of the models will be evaluated with an array of metrics, for
thorough comparative inspection of different loss types.
Root Mean Squared Error (RMSE) quantifies the proximity of predictions to the validation set.
The PyTorch Mean Squared Error (MSE) loss function [50] used, had to be square rooted
and then averaged over the number of batches in a training epoch.
Threshold Classification of glucose concentration measurements into hyperglycaemia,
normal and hypoglycaemia, with thresholds of 70 mg/dL and 280 mg/dL, enabled the
calculations of Precision and Recall metrics. Precision calculates the percentage of positive
predictions given a real validation outcome. Similarly, Recall presents the relationship
between real positive cases and predicted positive cases. Due to the possibility of serious
consequences to patient health and life, an overestimation of false positives is most
desireable. False negative predictions could delay appropriate rehabilitative action and
exacerbate consequences. This creates a trade-off between precision and recall. A final
calculation of the harmonic mean between precision and recall, known as the F1 score [35],
is used to quantify an unbiased measure impartial to precision and recall manipulation.
Equation 3: Formula definition of ESOD metric, given set of predictions ( ) and validation set (y)
y
Energy of Second Order Difference (ESOD) reflects the risk of false alerts, indicating the
reliability of a model [36]. The ideal ESOD score is 1, meaning the prediction is identical to
the validation measurement.
28
5.2 Training Comparison
Evaluation was independently conducted on all four LSTM models, trained on both
generalised and personalised methodologies, in order to recognise the best training
procedure. This was conducted on only one of the 5-fold datasets.
LSTM Model
RMSE
Cohort 1
RMSE
Cohort 2
RMSE
Cohort 3 Total RMSE
Cohort 1, epoch 2
30.92
Cohort
Cohort 2, epoch 2
28.81
Cohort 3, epoch 7
All
All, epoch 8
30.51
27.62
77.29
27.87
Difference
-49.42
-0.41
Figure 17: Comparison of RMSE between Training Sets
-1.19
59.30
28.52
-30.78
A generalised training procedure is shown to yield higher performant models across the
whole population when compared to a personalised methodology. Limited data availability
used to train cohort-specific models impacted performance, with the largest cohort 1 (86
patients) having the smallest performance impact of -0.41 RMSE, whereas the smallest
cohort 3 (31 patients) has a substantial accuracy loss of -49.42 RMSE. Performance could
be further degraded for cohort 3 specific model, which has the lowest mean annual income,
as this population was identified to have the greatest glucose concentration variability in
section 3.2.3.
Vital to note possible test set contamination as the test sets created for each cohort were
independently cross-validated from the generalised test set, meaning some sequences used
within the generalised training set could be present in the cohort-specific test sets used to
evaluate the generalised model.
Further investigations could be made into adapting the generalised model with transfer
learning for possible decreases in loss for specific cohorts. However significant data set
expansion would be necessary in order to avoid test set contamination, therefore
inappropriate for the current available data.
29
5.3 Results
LSTM model was tested on the augmented test set, whereas the HMM and Heuristic models
were tested on just a segmented test set. Testing of LSTM and HMM model was arduous as
a result of the recursive prediction implementation , which introduced dependencies on
previous prediction and memory state, meaning parallelisation was inhibited.
Model
RMSE (mg/dL)
ESOD
Heuristic - Copy Last
Heuristic - Linear Regression
HMM
LSTM
33.75 (6.85)
43.30 (7.31)
112.34 (15.73)
28.55 (3.28)
0.00
1.81E-28
7397.38
0.12
Figure 18: Tabular evaluation of average model performance with corresponding s.d.
LSTM network outperformed all other architectures at the 60-minute prediction interval,
presenting excellent performance at predicting hypoglycaemia and hyperglycaemia, with
precision of 0.865, recall 0.183 and F1 score 0.303, in comparison to baseline Heuristic and
HMM models. Given the large discrepancies between precision and recall, it is evident that
thresholds require adjustments to be appropriate for medical use, with reasons outlined in
Section 5.1. Further analysis focused on LSTM performance.
Figure 19: Illustration of reference CGM readings (mg/dL) against LSTM predictions (mg/dL)
30
The Surveillance error grid [78] quantifies accuracy by plotting predictions and reference
values and visually comparing against the coloured continuous risk error gradient.
This is similar to Clarke Error Grid Analysis, however a continuous risk error grid is used as
opposed to predefined zoning techniques [38]. It is evident that reference extrema readings
over 400 mg/dL were never predicted by the LSTM model. This could be a result of severe
under-representation in the dataset.
Predictions over yellow and orange areas, indicate elevated risk stratification, which poses
an increased likelihood of health consequences. To add to that, subtle underestimation can
be observed. This is highly agnostic in medical applications, as overestimation leading to
unnecessary treatment is a more favourable, less dangerous scenario.
5.4 Model Comparison
RMSE (mg/dL)
Dataset
HMM
LSTM
LSTM [36]
LSTM [79]
ARIMA [79]
112.34
28.55
55.34
CITY
CITY
OhioT1DM
16.94
The Maastricht Study (T2D)
27.77
The Maastricht Study (T2D)
Figure 20: Comparison with State-of-Art Models (*subject to conversion)
Other studies have also demonstrated successful recursive predictions of glucose levels
using LSTM models. However direct comparison is not appropriate as a result of dataset
discrepancies, with the OhioT1DM having significantly limited amounts of data and the
Maastricht Study using data from Type 2 Diabetes patients.
31
5.5 Explainability
Deeper analysis with the aim of explaining decision processes, will be conducted upon the
best performant model. LSTM model explainability can be investigated by assigning an
importance to each datapoint in the time series. This could lead to the identification of trends
in which events are significant, allowing medical professionals and patients to gain a deeper
understanding of the reasoning behind each prediction. Furthermore there is potential for the
identification of a patient's detrimental behaviour that increases risk of an
hypo/hyperglycemic event occurring and should be altered. As featured in Section 2.5,
mapping values of the forget gate vector indicates importance of the previous cell state [80].
Predictions based on training data have been outlined with the green line and those made
recursively from previous predictions in red.
Figure 21: Importance of each CGM reading (mg/dL) in sequence, throughout all LSTM layers
It is clear elevated attention is placed on initial predictions as the hidden states are empty
and require assignment.
The initial LSTM layer only utilises 2 out of 8 hidden states at indexes 0 and 3 and all others
remain at a constant value of 1. A negative correlation is observed, with importance placed
on the lowest glucose concentrations through the day. This could be interpreted as a basic
identification of hypoglycemic events.
The first deep LSTM layer extracts more meaning, using all 8 hidden states.
Mean values increase around large variations of glucose levels, leading to the conclusion
that focus is placed on the identification of large glucose concentration fluctuations
throughout the day.
32
The next deep layer derives further meaning by using all hidden states.
Although the presented correlations are not as evident as previously, it can be deduced that
importance is placed on high glucose values, which could improve predictions of
hyperglycemia, unaccounted for by the first layer.
Furthermore as this is the final LSTM layer, previous to the fully connected layer, its values
follow the desired output, and therefore positively correlate with CGM readings.
Investigating the explainability of the 2 stacked layer LSTM model, yielded similar findings
and given the insights into similar loss between the 2 and 3 layered LSTMs (Section 4.3.2),
the theory that the third layer had very minor contributions is reinforced.
It is vital to note the limitations of this method, which can only analyse a single sequence and
requires visual inspection for each. This means it is not possible to quantify the trends
observed in each layer, therefore comparison across all sequences in the test set is severely
impractical for large datasets.
5.6 Limitations
The CITY dataset used demonstrates bias towards white and educated patients, as analysed
in Section 3.2.1, so the cohort is unrepresentative of the American population.
This does not take into account the elevated demographic variations between countries such
as the United States and the United Kingdom. Studies of other populations in India, have
identified "high-calorie/high-fat and high sugar diets" [81], altering blood glucose
concentrations when compared to others. This could lead to deficient accuracy in
marginalised communities, which are not accurately represented in the patient cohort.
This could raise the need for personalised model trained at the state level to be better
representative of the demographic population. However alternative approaches should be
considered as patient clustering into smaller cohorts was shown to have a detrimental effect
on performance.
33
6 Conclusions and Future work
6.1 Project Management
Given the research based nature of this project, covering a range of topics, significant
planning was required. By restricting time for certain tasks, the scope of the research was
limited and reducing the risk of overruns, therefore focus could be placed on the success
criteria. Appendix B presents the planned work schedule, whereas Appendix C shows the
schedule that took place.
Initial planning was formulated into a conventional waterfall methodology, with linear
progression of tasks from data acquisition to training set creation. Simultaneous research
was conducted in order to follow best practices, in addition to informing the ideation of the
design methodology. This workflow was followed until 13th December 2021, where
development was paused over the festive period, to allow more time for exam preparations
and vocational activities.
Subsequent technical development from 31st January 2022 altered planning schemes to an
Incremental Model, which appropriately divisioned end-to-end development of each model
into separate linear progressions, from creation to evaluation. The perceived most
challenging model: LSTM, was developed first, with Heuristics and HMM ensuing. Evaluation
and Model comparison were performed at the conclusion of all model development.
Concurrent report writing during model creation, enabled active recording of ideas and steps
taken, minimising the risk of forgetting details.
Later focus was placed on formal documentation of the project, through the writing of this
report. Visualisations were created using the python packages Matplotlib and Seaborn, in
order to enhance and assist the conveyance of complex concepts. Additional Analysis was
also necessary to assist with explanations.
6.2 Conclusions
Creation, Evaluation and Explainability Analysis was conducted on a range of techniques for
predicting BG levels up to a 60 minute interval. Section 5.4 demonstrates LSTM model
accuracy to be akin to state-of-art models in similar use cases. However as illustrated in
figure 19, inaccurate predictions persist, elevating risk of hypo/hyperglycemia events.
Therefore it is not considered appropriate for use in Artificial Pancreas applications.
Nonetheless meaningful guidance is still provided to T1D patients.
Study has established a thorough training methodology for future Machine Learning models.
Generalised models are proven to outperform personalised models (Section 5.2).
Analysis of LSTM layers has shown the importance placed on major fluctuations in glucose
concentration, as well as unconventional perspectives of high or low values.
34
6.3 Future Work
Independent peer review would be necessary for academic integrity and reproducibility of
this approach which is crucial in the medical industry.
Future investigations could be conducted with addition of variable patient statistics such as
weight, age and annual income directly to the model to provide further context.
An opportunity for deployment of the LSTM model in edge devices could arise, due to its
small size and low energy requirements for inference. Sensitive medical data could be stored
locally on the device and predictions computed locally [82]. Differential Privacy [84]
techniques could also be implemented, leveraging the hidden state of LSTM to encode raw
input data. This would allow data to be anonymously stored in the cloud without
compromising the patient's privacy, as well as allowing for more detailed replication of
prediction and deeper analysis of model error.
Furthermore, RMSE loss and other diagnostics may also be freely transmitted to web
storage to aid evaluation, as it will not make patients uniquely identifiable. Similar
approaches have already been implemented on Natural Language Processing of news
articles using LSTM models for stock prediction [85]. Apprehensive patients could be
persuaded by privacy enforcement, promoting patient cohort expansion and model
invariance.
Compliance with regulatory policies [83] is vital for successful deployment to medical
devices. These require extensive evaluation of each model, previous to certification,
therefore continuous training and personalisation would not be possible.
35
References
[1] Mayo Clinic (2021). Type 1 diabetes - Symptoms and causes. [online] Mayo Clinic.
Available_at:https://www.mayoclinic.org/diseases-conditions/type-1-diabetes/symptoms-caus
es/syc-20353011.
[2] Atkinson, M.A., Eisenbarth, G.S. and Michels, A.W. (2014). Type 1 diabetes. The Lancet,
[online] 383(9911), pp.69–82. Available at:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4380133/.
[3] IDF Diabetes Atlas Ninth Edition (2019). [online] Available at:
https://www.diabetesatlas.org/upload/resources/material/20200302_133351_IDFATLAS9e-fin
al-web.pdf.
[4] Hitti, M. (2008). Types of Diabetes Mellitus. [online] WebMD. Available at:
https://www.webmd.com/diabetes/guide/types-of-diabetes-mellitus.
[5] American Diabetes Association (2008). Diagnosis and Classification of Diabetes Mellitus.
Diabetes Care, 32(Supplement_1), pp.S62–S67.
[6] Hood, K.K., Huestis, S., Maher, A., Butler, D., Volkening, L. and Laffel, L.M.B. (2006).
Depressive Symptoms in Children and Adolescents With Type 1 Diabetes: Association with
diabetes-specific characteristics. Diabetes Care, 29(6), pp.1389–1389.
[7] Erbach, M., Freckmann, G., Hinzmann, R., Kulzer, B., Ziegler, R., Heinemann, L. and
Schnell, O. (2016). Interferences and Limitations in Blood Glucose Self-Testing. Journal of
Diabetes Science and Technology, [online] 10(5), pp.1161–1168. Available at:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5032951/.
[8] Prolonged Nocturnal Hypoglycemia Is Common During 12 Months of Continuous Glucose
Monitoring in Children and Adults With Type 1 Diabetes. (2010). Diabetes Care, 33(5),
pp.1004–1008.
[9] Vettoretti, M., Cappon, G., Facchinetti, A. and Sparacino, G. (2020). Advanced Diabetes
Management Using Artificial Intelligence and Continuous Glucose Monitoring Sensors.
Sensors, 20(14), p.3870.
[10] Halford, J. and Harris, C. (2010). Determining Clinical and Psychological Benefits and
Barriers with Continuous Glucose Monitoring Therapy. Diabetes Technology & Therapeutics,
12(3), pp.201–205.
[11] openaps.readthedocs.io. (n.d.). Welcome to OpenAPS's documentation! - OpenAPS
0.0.0 documentation. [online] Available at: https://openaps.readthedocs.io/en/latest/
[Accessed 14 Dec. 2021].
[12] Schmidt, S. and Nørgaard, K. (2014). Bolus Calculators. Journal of Diabetes Science
and Technology, [online] 8(5), pp.1035–1041. Available at:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4455388/ [Accessed 26 Jun. 2019].
[13] Bellazzi, R., Arcelloni, M., Bensa, G., Blankenfeld, H., Brugués, E., Carson, E., Cobelli,
C., Cramp, D., D'Annunzio, G., De Cata, P., de Leiva, A., Deutsch, T., Fratino, P., Gazzaruso,
C., Garcìa, A., Gergely, T., Gómez, E., Harvey, F., Ferrari, P. and Hernando, E. (2003).
Design, Methods and Evaluation Directions of a Multi-Access Service for the Management
of Diabetes Mellitus Patients. Diabetes Technology & Therapeutics, 5(4), pp.621–629.
36
[14] Mougiakakou, S.G., Bartsocas, C.S., Bozas, E., Chaniotakis, N., Iliopoulou, D., Kouris,
I., Pavlopoulos, S., Prountzou, A., Skevofilakas, M., Tsoukalis, A., Varotsis, K., Vazeou, A.,
Zarkogianni, K. and Nikita, K.S. (2010). SMARTDIAB: A Communication and Information
Technology Approach for the Intelligent Monitoring, Management and Follow-up of Type 1
Diabetes Patients. IEEE Transactions on Information Technology in Biomedicine, [online]
14(3), pp.622–633. Available at: https://ieeexplore.ieee.org/document/5401101 [Accessed 14
Dec. 2021].
[15] Cook, C.B., McMichael, J.P., Lieberman, R., Mann, L.J., King, E.C., New, K.M., Vaughn,
P.S., Dunbar, V.G. and Caudle, J.M. (2005). The Intelligent Dosing System: Application for
Insulin Therapy and Diabetes Management. Diabetes Technology & Therapeutics, 7(1),
pp.58–71.
[16] Schmidt, S. and Nørgaard, K. (2014). Bolus Calculators. Journal of Diabetes Science
and Technology, [online] 8(5), pp.1035–1041. Available at:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4455388/ [Accessed 26 Jun. 2019].
[17] Herrero, P., Pesl, P., Bondia, J., Reddy, M., Oliver, N., Georgiou, P. and Toumazou, C.
(2015). Method for automatic adjustment of an insulin bolus calculator: In silico robustness
evaluation under intra-day variability. Computer Methods and Programs in Biomedicine,
119(1), pp.1–8.
[18] Sun, Q., Jankovic, M.V., Budzinski, J., Moore, B., Diem, P., Stettler, C. and
Mougiakakou, S.G. (2019). A Dual Mode Adaptive Basal-Bolus Advisor Based on
Reinforcement Learning. IEEE Journal of Biomedical and Health Informatics, [online] 23(6),
pp.2633–2641. Available at: https://ieeexplore.ieee.org/document/8579186 [Accessed 14
Dec. 2021].
[19] Oviedo, S., Vehí, J., Calm, R. and Armengol, J. (2016). A review of personalized blood
glucose prediction strategies for T1DM patients. International Journal for Numerical Methods
in Biomedical Engineering, 33(6), p.e2833.
[20] Zecchin, C., Facchinetti, A., Sparacino, G. and Cobelli, C. (2016). How Much Is
Short-Term Glucose Prediction in Type 1 Diabetes Improved by Adding Insulin Delivery and
Meal Content Information to CGM Data? A Proof-of-Concept Study. Journal of Diabetes
Science and Technology, 10(5), pp.1149–1160.
[21] Man, C.D., Micheletto, F., Lv, D., Breton, M., Kovatchev, B. and Cobelli, C. (2014). The
UVA/PADOVA Type 1 Diabetes Simulator. Journal of Diabetes Science and Technology, 8(1),
pp.26–34.
[22] Bitterman, D.S., Aerts, H.J.W.L. and Mak, R.H. (2020). Approaching autonomy in
medical artificial intelligence. The Lancet Digital Health, 2(9), pp.e447–e449.
[23] Anon, (n.d.). SmartGuard - How it (probably) works. [online] Available at:
https://littlet1d.blogspot.com/2015/07/smartguard-how-it-probably-works.html [Accessed 14
Dec. 2021].
[24] Abraham, S.B., Arunachalam, S., Zhong, A., Agrawal, P., Cohen, O. and McMahon, C.M.
(2019). Improved Real-World Glycemic Control With Continuous Glucose Monitoring System
Predictive Alerts. Journal of Diabetes Science and Technology, p.193229681985933.
37
[25] Gani, A., Gribok, A.V., Yinghui Lu, Ward, W.K., Vigersky, R.A. and Reifman, J. (2010).
Universal Glucose Models for Predicting Subcutaneous Glucose Concentration in Humans.
IEEE Transactions on Information Technology in Biomedicine, [online] 14(1), pp.157–165.
Available at: https://ieeexplore.ieee.org/document/5291722.
[26] Tadayon, M. and Pottie, G. (2020). Comparative Analysis of the Hidden Markov Model
and LSTM: A Simulative Approach. arXiv:2008.03825 [cs, stat]. [online] Available at:
https://arxiv.org/abs/2008.03825 [Accessed 14 Dec. 2021].
[27] Posted by Sharmistha Chatterjee on July 26, 2020 at 7:09am and Blog, V. (n.d.).
ARIMA/SARIMA vs LSTM with Ensemble learning Insights for Time Series Data. [online]
www.datasciencecentral.com. Available at:
https://www.datasciencecentral.com/profiles/blogs/arima-sarima-vs-lstm-with-ensemble-learni
ng-insights-for-time-ser.
[28] Xia, J., Pan, S., Zhu, M., Cai, G., Yan, M., Su, Q., Yan, J. and Ning, G. (2019). A Long
Short-Term Memory Ensemble Approach for Improving the Outcome Prediction in Intensive
Care Unit. Computational and Mathematical Methods in Medicine, 2019, pp.1–10.
[29] Liu, H. and Zhang, J. (2008). On the L1 Regularized Regression. arXiv:0802.1517 [math,
stat]. [online] Available at: https://arxiv.org/abs/0802.1517 [Accessed 14 Dec. 2021].
[30] Montavon, G., Binder, A., Lapuschkin, S., Samek, W. and Müller, K.-R. (2019).
Layer-Wise Relevance Propagation: An Overview. [online] Springer Link. Available at:
https://link.springer.com/chapter/10.1007%2F978-3-030-28954-6_10 [Accessed 14 Dec.
2021].
[31] Arras, L., Arjona-Medina, J.A., Widrich, M., Montavon, G., Gillhofer, M., Müller, K.-R.,
Hochreiter, S. and Samek, W. (2019). Explaining and Interpreting LSTMs. arXiv:1909.12114
[cs, stat]. [online] Available at: https://arxiv.org/abs/1909.12114 [Accessed 14 Dec. 2021].
[32] Jaeb Center for Health Research (n.d.) Continuous Glucose Monitoring on Glycemic
Control in Adolescents and Young Adults With Type 1 Diabetes Dataset - PUBLIC STUDY
WEBSITES. [online] public.jaeb.org Available at: https://public.jaeb.org/datasets/diabetes
[Accessed 14 Dec. 2021].
[33] Irina (2020). irinagain/Awesome-CGM. [online] GitHub. Available at:
https://github.com/irinagain/Awesome-CGM.
[34] Laffel, L.M., Kanapka, L.G., Beck, R.W., Bergamo, K., Clements, M.A., Criego, A.,
DeSalvo, D.J., Goland, R., Hood, K., Liljenquist, D., Messer, L.H., Monzavi, R., Mouse, T.J.,
Prahalad, P., Sherr, J., Simmons, J.H., Wadwa, R.P., Weinstock, R.S., Willi, S.M. and Miller,
K.M. (2020). Effect of Continuous Glucose Monitoring on Glycemic Control in Adolescents
and Young Adults With Type 1 Diabetes. JAMA, 323(23), p.2388.
[35] Seo, W., Lee, Y.-B., Lee, S., Jin, S.-M. and Park, S.-M. (2019). A machine-learning
approach to predict postprandial hypoglycemia. BMC Medical Informatics and Decision
Making, 19(1).
[36] Xie, J. and Wang, Q. (2020). Benchmarking machine learning algorithms on blood
glucose prediction for Type 1 Diabetes in comparison with classical time-series models. IEEE
Transactions on Biomedical Engineering [online] Available at:
https://ieeexplore.ieee.org/document/9007528 [Accessed 1 Apr 2022].
38
[37] Rachel Draelos. (2019). Measuring Performance: AUC (AUROC). [online] Available at:
https://glassboxmedicine.com/2019/02/23/measuring-performance-auc-auroc/. [Accessed 1
Apr 2022].
[38] Clarke, W.L. (2005). The Original Clarke Error Grid Analysis (EGA). Diabetes
Technology & Therapeutics, 7(5), pp.776–779.
[39] Rubik's Code. 2022. Stock Price Prediction Using Hidden Markov Model | Rubik's Code.
[online] Available at:
https://rubikscode.net/2021/09/06/stock-price-prediction-using-hidden-markov-model
[Accessed 1 May 2022].
[40] Baum, L., Petrie, T., Soules, G. and Weiss, N., 1970. A Maximization Technique
Occurring in the Statistical Analysis of Probabilistic Functions of Markov Chains. The Annals
of Mathematical Statistics, [online] 41(1), pp.164-171. Available at:
https://projecteuclid.org/journals/annals-of-mathematical-statistics/volume-41/issue-1/A-Maxi
mization-Technique-Occurring-in-the-Statistical-Analysis-of-Probabilistic/10.1214/aoms/1177
697196.full [Accessed 2 May 2022].
[41] Hmmlearn.readthedocs.io. 2022. Tutorial - hmmlearn 0.2.7.post7+g1c73251
documentation. [online] Available at: https://hmmlearn.readthedocs.io/en/latest/tutorial.html
[Accessed 2 May 2022].
[42] https://radai.iu.edu/wp-content/uploads/2020/08/KDH_2020_paper_50.pdf
[43] Sak, H., Senior, A. and Beaufays, F. (2014). Long Short-Term Memory Based Recurrent
Neural Network Architectures for Large Vocabulary Speech Recognition. [online] arXiv.org.
Available at: https://arxiv.org/abs/1402.1128 [Accessed 10 May 2019].
[44] Olah, C. (2015). Understanding LSTM Networks. [online] colah.github.io. Available at:
https://colah.github.io/posts/2015-08-Understanding-LSTMs [Accessed 2 May 2022].
[45] Hochreiter, S. and Schmidhuber, J. (1997). Long Short-Term Memory. Neural
Computation, 9(8), pp.1735–1780.
[F2] Sherstinsky, A. (2020). Fundamentals of Recurrent Neural Network (RNN) and Long
Short-Term Memory (LSTM) Network. Physica D: Nonlinear Phenomena, [online] 404,
p.132306. Available at: https://arxiv.org/pdf/1808.03314.pdf [Accessed 2 May 2022].
[46] pytorch.org. (2019a). LSTM - PyTorch 1.12 documentation. [online] Available at:
https://pytorch.org/docs/master/generated/torch.nn.LSTM.html [Accessed 2 May 2022].
[47] pytorch.org. (2019b). Linear - PyTorch 1.8.0 documentation. [online] Available at:
https://pytorch.org/docs/stable/generated/torch.nn.Linear.html [Accessed 2 May 2022].
39
[48] pytorch.org. (2019c). Module - PyTorch 1.11.0 documentation. [online] Available at:
https://pytorch.org/docs/stable/generated/torch.nn.Module.html [Accessed 2 May 2022].
[49] pytorch.org. (2019d). Datasets & DataLoaders - PyTorch Tutorials 1.11.0+cu102
documentation. [online] Available at:
https://pytorch.org/tutorials/beginner/basics/data_tutorial.html [Accessed 2 May 2022].
[50] pytorch.org. (2019e). MSELoss - PyTorch 1.11.0 documentation. [online] Available at:
https://pytorch.org/docs/stable/generated/torch.nn.MSELoss.html#torch.nn.MSELoss
[Accessed 2 May 2022].
[51] Hrnjica, B. and Bonacci, O. (2019). Lake Level Prediction using Feed Forward and
Recurrent Neural Networks. Water Resources Management, 33(7), pp.2471–2484.
[52] Rabby, M.F., Tu, Y., Hossen, M.I., Lee, I., Maida, A.S. and Hei, X. (2021). Stacked LSTM
based Deep Recurrent Neural Network with Kalman Smoothing for Blood Glucose
Prediction. BMC Medical Informatics and Decision Making, 21(1).
[53] Le, P. and Zuidema, W. (2016). Quantifying the Vanishing Gradient and Long Distance
Dependency Problem in Recursive Neural Networks and Recursive LSTMs.
arXiv:1603.00423 [cs]. [online] Available at: https://arxiv.org/abs/1603.00423 [Accessed 2
May 2022].
[54] Essien, A. and Giannetti, C. (2019). A Deep Learning Framework for Univariate Time
Series Prediction Using Convolutional LSTM Stacked Autoencoders. 2019 IEEE International
Symposium on Innovations in Intelligent SysTems and Applications (INISTA).
[55] Wan, R., Mei, S., Wang, J., Liu, M. and Yang, F. (2019). Multivariate Temporal
Convolutional Network: A Deep Neural Networks Approach for Multivariate Time Series
Forecasting. Electronics, [online] 8(8), p.876. Available at:
https://www.mdpi.com/2079-9292/8/8/876 [Accessed 21 Sep. 2021].
[56] Sutskever, I., Vinyals, O. and V. Le, Q. (2014). Sequence to Sequence Learning with
Neural Networks. [online] Available at: https://arxiv.org/pdf/1409.3215.pdf [Accessed 2 May
2022].
[57] Sak, H., Senior, A., Rao, K. and Beaufays, F. (2015). Fast and Accurate Recurrent
Neural Network Acoustic Models for Speech Recognition. arXiv:1507.06947 [cs, stat].
[online] Available at: https://arxiv.org/abs/1507.06947.
[58] Xia, J., Pan, S., Zhu, M., Cai, G., Yan, M., Su, Q., Yan, J. and Ning, G. (2019). A Long
Short-Term Memory Ensemble Approach for Improving the Outcome Prediction in Intensive
Care Unit. Computational and Mathematical Methods in Medicine, pp.1–10.
40
[59] Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H.
and Bengio, Y. (2014). Learning Phrase Representations using RNN Encoder–Decoder for
Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods
in Natural Language Processing (EMNLP). [online] Available at:
https://arxiv.org/pdf/1406.1078v3.pdf.
[60] Gers, F.A. and Schmidhuber, J. (2000). Recurrent nets that time and count. IEEE Xplore,
[online] 3. Available at: https://ieeexplore.ieee.org/abstract/document/861302 [Accessed 2
Oct. 2021].
[61] Arras, L., Montavon, G., Müller, K.-R. and Samek, W. (2017). Explaining Recurrent
Neural Network Predictions in Sentiment Analysis. ACLWeb, [online] pp.159–168. Available
at: https://aclanthology.org/W17-5221/ [Accessed 2 May 2022].
[62] Ribeiro, M.T., Singh, S. and Guestrin, C. (2016). 'Why Should I Trust You?': Explaining
the Predictions of Any Classifier. arXiv.org. [online] Available at:
https://arxiv.org/abs/1602.04938 [Accessed 2 May 2022].
[63] Lundberg, S.M. and Lee, S.-I. (2017). A Unified Approach to Interpreting Model
Predictions. Neural Information Processing Systems, [online] 30. Available at:
https://papers.nips.cc/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html
[Accessed 2 May 2022].
[64] Van der Westhuizen, J. and Lasenby, J. (2018). The unreasonable effectiveness of the
forget gate. arXiv:1804.04849 [cs, stat]. [online] Available at: https://arxiv.org/abs/1804.04849
[Accessed 2 May 2022].
[65] Wang, S. and Jiang, J. (2016). Learning Natural Language Inference with LSTM.
arXiv:1512.08849 [cs]. [online] Available at: https://arxiv.org/abs/1512.08849 [Accessed 2
May 2022].
[66] Marling, C. and Bunescu, R. (2020). The OhioT1DM Dataset for Blood Glucose Level
Prediction: Update 2020. [online] smarthealth.cs.ohio.edu. Available at:
http://smarthealth.cs.ohio.edu/bglp/OhioT1DM-dataset-paper.pdf [Accessed 2 May 2022].
[67] Schram, M.T., Sep, S.J.S., van der Kallen, C.J., Dagnelie, P.C., Koster, A., Schaper, N.,
Henry, R.M.A. and Stehouwer, C.D.A. (2014). The Maastricht Study: an extensive
phenotyping study on determinants of type 2 diabetes, its complications and its
comorbidities. European Journal of Epidemiology, 29(6), pp.439–451.
[68] Centers for Disease Control and Prevention (2015). NHANES Questionnaires, Datasets,
and Related Documentation. [online] wwwn.cdc.gov. Available at:
https://wwwn.cdc.gov/nchs/nhanes/continuousnhanes/default.aspx?BeginYear=2015
[Accessed 7 Feb. 2022].
41
[69] Shrider, E.A., Kollar, M., Chen, F. and Semega, J. (2021). Income and Poverty in the
United States: 2020. [online] www.census.gov. United States Census Bureau. Available at:
https://www.census.gov/library/publications/2021/demo/p60-273.html [Accessed 2 May
2022].
[70] Mayo Clinic (2018). Diabetic coma - Symptoms and causes. [online] Mayo Clinic.
Available at:
https://www.mayoclinic.org/diseases-conditions/diabetic-coma/symptoms-causes/syc-203714
75 [Accessed 2 May 2022].
[71] Gupta, A. (2020). Feature Selection Techniques in Machine Learning. [online] Analytics
Vidhya. Available at:
https://www.analyticsvidhya.com/blog/2020/10/feature-selection-techniques-in-machine-learn
ing [Accessed 2 May 2022].
[72] Buitinck, L., Louppe, G., Blondel, M., Pedregosa, F., Mueller, A., Grisel, O., Niculae, V.,
Prettenhofer, P., Gramfort, A., Grobler, J., Layton, R., VanderPlas, J., Joly, A., Holt, B. and
Varoquaux, G. (2019). sklearn.mixture.GaussianMixture - scikit-learn 0.21.2 documentation.
[online] Scikit-learn.org. Available at:
https://scikit-learn.org/stable/modules/generated/sklearn.mixture.GaussianMixture.html
[Accessed 2 May 2022].
[73] Araújo, G.F., Macedo, H.T., Chella, M.T., Estombelo Montesco, C.A. and Medeiros,
M.V.O. (2014). Parallel implementation of Expectation-Maximisation algorithm for the training
of Gaussian Mixture Models. ri.ufs.br. [online] Available at:
https://ri.ufs.br/jspui/handle/riufs/1764 [Accessed 2 May 2022].
[74] Naumova, V., Pereverzyev, S.V. and Sivananthan, S. (2012). A meta-learning approach
to the regularized learning-Case study: Blood glucose prediction. Neural Networks, 33,
pp.181–193.
[75] Baggenstoss, P.M. (2001). A modified Baum-Welch algorithm for hidden Markov models
with multiple observation spaces. IEEE Transactions on Speech and Audio Processing,
[online] 9(4), pp.411–416. Available at:
https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=917686 [Accessed 2 May 2022].
[76] Lou, H.-L. . (1995). Implementing the Viterbi algorithm. IEEE Signal Processing
Magazine, 12(5), pp.42–52.
[77] Ge, F., Moore, W. and Antolovich, M. (2015). Learning from Demonstration Using GMM,
CHMM and DHMM: A Comparison. researchoutput.csu.edu.au, [online] 9457, pp.204–217.
Available at:
https://researchoutput.csu.edu.au/en/publications/learning-from-demonstration-using-gmm-c
hmm-and-dhmm-a-comparison [Accessed 2 May 2022].
[A7] Kingma, D.P. and Ba, J. (2014). Adam: A Method for Stochastic Optimization. arXiv.org.
[online] Available at: https://arxiv.org/abs/1412.6980 [Accessed 2 May 2022].
42
[78] Klonoff, D.C., Lias, C., Vigersky, R., Clarke, W., Parkes, J.L., Sacks, D.B., Kirkman,
M.S., Kovatchev, B., Aurand, L., Benson, C., Bernhardt, P., Blonde, L., Breton, M.,
Buckingham, B., Cariski, A., Colburn, S., Flacke, F., Harrison, B., Herman, C. and Hinzmann,
R. (2014). The Surveillance Error Grid. Journal of Diabetes Science and Technology, 8(4),
pp.658–672.
[79] van Doorn, W.P.T.M., Foreman, Y.D., Schaper, N.C., Savelberg, H.H.C.M., Koster, A.,
van der Kallen, C.J.H., Wesselius, A., Schram, M.T., Henry, R.M.A., Dagnelie, P.C., de
Galan, B.E., Bekers, O., Stehouwer, C.D.A., Meex, S.J.R. and Brouwers, M.C.G.J. (2021).
Machine learning-based glucose prediction with use of continuous glucose and physical
activity monitoring data: The Maastricht Study. PLoS ONE, [online] 16(6). Available at:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8224858 [Accessed 22 Jan. 2022].
[80] GraZai, Simon, J. and D, H. (2020). xai-tutorial-april-2020/Interpretability of TS, Simple
Sinous.ipynb at master * grazai/xai-tutorial-april-2020. [online] GitHub. Available at:
https://github.com/grazai/xai-tutorial-april-2020/blob/master/Interpretability%20of%20TS%2C
%20Simple%20Sinous.ipynb [Accessed 2 May 2022].
[81] Mohan, V. (2004). Why are Indians more prone to diabetes? The Journal of the
Association of Physicians of India, [online] 52, pp.468–474. Available at:
https://pubmed.ncbi.nlm.nih.gov/15645957 [Accessed 21 Apr. 2021].
[82] Sun, L., Jiang, X., Ren, H. and Guo, Y. (2020). Edge-Cloud Computing and Artificial
Intelligence in Internet of Medical Things: Architecture, Technology and Application. IEEE
Access, 8.
[83] Department of Health & Social Care (2021). Deliverable 1: principles for the evaluation
of artificial intelligence or machine learning-enabled medical devices to assure safety,
effectiveness and ethicality. [online] GOV.UK. Available at:
https://www.gov.uk/government/publications/g7-health-track-digital-health-final-reports/deliver
able-1-principles-for-the-evaluation-of-artificial-intelligence-or-machine-learning-enabled-med
ical-devices-to-assure-safety-effectiveness-an [Accessed 2 May 2022].
[84] Ji, Z., Lipton, Z.C. and Elkan, C. (2014). Differential Privacy and Machine Learning: a
Survey and Review. arXiv. [online] Available at: https://arxiv.org/abs/1412.7584 [Accessed 2
May 2022].
[85] Li, X., Li, Y., Yang, H., Yang, L. and Liu, X.-Y. (2019). DP-LSTM: Differential
Privacy-inspired LSTM for Stock Prediction Using Financial News. ResearchGate. [online]
Available at:
https://www.researchgate.net/publication/338138728_DP-LSTM_Differential_Privacy-inspired
_LSTM_for_Stock_Prediction_Using_Financial_News [Accessed 2 May 2022].
43
Appendices
Appendix A: Project Brief
Artificial Intelligence has made large advances in preventive medicine and management of
chronic conditions, such as Diabetes. The symptoms of this metabolic disease include
elevated blood glucose levels and hyperglycaemic events, which over time can lead to
irreversible damage to the heart, kidneys, blood vessels, eyes and nerves.
Type 1 Diabetes Patients must use external insulin, with effective management requiring
optimal doses of insulin, through injection or infusion, multiple times per day.
Current technologies have found success in minimising risk of long-term complications,
however they can pose a significant burden on self-managing patients, reducing their quality
of life.
Recent growth in digital disease management platforms and an increased use of
diabetes-related data sensors, such as Continuous Glucose Monitoring (CGM), have
resulted in rapid evolution towards Autonomous Diabetes Systems, which implement
Machine Learning approaches to predict future glucose levels, detect hyperglycaemic
events, assist with decision making and risk stratification for Type 1 Diabetes patients.
The implementation of leading Neural Network based Machine Learning models could
advance prediction accuracy and provide more personalised predictions. This leads to the
opportunity to explain model predictions and justify conclusions reached, crucial for medical
use.
Outlined below is my plan of approach:
1.
Identify suitable Dataset for CGM use on patients with Type 1 Diabetes or
combination thereof.
2. Extract and manipulate to generate adequate training and validation datasets.
3.
4. Evaluation and comparison of each model between each other as well as with the
Investigate using a variety of machine learning models
current leading predictive solutions for Autonomous Diabetes Systems.
Definition of success for the project:
● Creation of an accurate Neural Network Model to forecast glucose levels for patients
with Type 1 Diabetes.
● Explain and justify the model's decision making process behind the predictions made.
44
Appendix B: Planned Gantt Chart Brief
45
Appendix C: Actual Event Gantt Chart
46
|
|
http://arxiv.org/abs/2302.12828v1 | 2023-02-24T18:59:18 | 2023-02-24T18:59:18 | SplineCam: Exact Visualization and Characterization of Deep Network
Geometry and Decision Boundaries | Current Deep Network (DN) visualization and interpretability methods rely
heavily on data space visualizations such as scoring which dimensions of the
data are responsible for their associated prediction or generating new data
features or samples that best match a given DN unit or representation. In this
paper, we go one step further by developing the first provably exact method for
computing the geometry of a DN's mapping - including its decision boundary -
over a specified region of the data space. By leveraging the theory of
Continuous Piece-Wise Linear (CPWL) spline DNs, SplineCam exactly computes a
DNs geometry without resorting to approximations such as sampling or
architecture simplification. SplineCam applies to any DN architecture based on
CPWL nonlinearities, including (leaky-)ReLU, absolute value, maxout, and
max-pooling and can also be applied to regression DNs such as implicit neural
representations. Beyond decision boundary visualization and characterization,
SplineCam enables one to compare architectures, measure generalizability and
sample from the decision boundary on or off the manifold. Project Website:
bit.ly/splinecam. | [
"Ahmed Imtiaz Humayun",
"Randall Balestriero",
"Guha Balakrishnan",
"Richard Baraniuk"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12828v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12828v1",
"@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"
] | SplineCam: Exact Visualization and Characterization of Deep
Network Geometry and Decision Boundaries
Ahmed Imtiaz Humayun
Rice University
[email protected]
Randall Balestriero
Meta AI, FAIR
[email protected]
Guha Balakrishnan
Rice University
[email protected]
Richard Baraniuk
Rice University
[email protected]
3
2
0
2
b
e
F
4
2
]
V
C
.
s
c
[
1
v
8
2
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Current Deep Network (DN) visualization and inter-
pretability methods rely heavily on data space visualiza-
tions such as scoring which dimensions of the data are re-
sponsible for their associated prediction or generating new
data features or samples that best match a given DN unit or
representation. In this paper, we go one step further by de-
veloping the first provably exact method for computing the
geometry of a DN's mapping – including its decision bound-
ary – over a specified region of the data space. By lever-
aging the theory of Continuous Piece-Wise Linear (CPWL)
spline DNs, SplineCam exactly computes a DN's geometry
without resorting to approximations such as sampling or ar-
chitecture simplification. SplineCam applies to any DN ar-
chitecture based on CPWL nonlinearities, including (leaky-
)ReLU, absolute value, maxout, and max-pooling and can
also be applied to regression DNs such as implicit neural
representations. Beyond decision boundary visualization
and characterization, SplineCam enables one to compare
architectures, measure generalizability and sample from the
decision boundary on or off the manifold. Project Website:
bit.ly/splinecam.
1. Introduction
Deep learning and in particular Deep Networks (DNs) have
redefined the landscape of machine learning and pattern
recognition [23]. Although current DNs employ a variety
of techniques that improve their performance, their core op-
eration remains unchanged, primarily consisting of sequen-
tially mapping an input vector x to a sequence of L fea-
ture maps z(cid:96), (cid:96) = 1, . . . , L by successively applying simple
nonlinear transformations, called layers, as in
z(cid:96) = σ (cid:0)W (cid:96)z(cid:96)−1 + b(cid:96)(cid:1) ,
(cid:96) = 1, . . . , L
(1)
Figure 1. Exact visualization of the decision boundary and par-
tition geometry of a 3D neural signed distance field (SDF). (Top
left) Surface normals obtained from the learned signed distance
field with annotations indicating slices used for visualization. For
each of the slices, we can see the spline partition geometry of the
learned SDF- each contiguous line represents a neuron, on either
side of which it gets activated/deactivated. Neurons from differ-
ent depths of the network create a partitioning of the input space
into 'linear regions'. Here the colored lines represent the decision
boundary learned by the SDF. Note that while the final neuron ob-
tains the decision boundary, many neurons place their boundaries
close to the ground truth surface to obtain the final SDF represen-
tation.
popular choice for σ is the Rectified Linear Unit (ReLU)
[13] that takes the elementwise maximum between its entry
and 0. The parametrization of W (cid:96), b(cid:96) controls the type of
layer, e.g., circulant matrix for convolutional layer.
starting with z0 = x, and denoting by W (cid:96) the weight ma-
trix, b(cid:96) the bias vector, and σ an activation operator that
applies an element-wise nonlinear activation function. One
Interpreting the geometry of a DN is a nontrivial task since
many different sets of parameters can lead to the same
input-output mapping. One example is obtained by per-
1
muting the rows of W (cid:96), b(cid:96) and the columns of W (cid:96)+1 any
two consecutive layers DN. Another example is to rescale
W (cid:96), b(cid:96) by some constant κ and to rescale W (cid:96)+1 by 1/κ for
a ReLU-DN [33]; the list of such parameter manipulations
preserving the underlying DN's function is an active area of
research [32]. Since one cannot trivially use the DN's pa-
rameters to describe its mapping, practitioners have relied
on different solutions to interpret what has been learned by
a model by looking at the activations instead of the weights
of the network [20, 40]. Activation based interpretability
methods however can be susceptible to feature adversarial
attacks, i.e., adversarial attacks that don't cross the deci-
sion boundary but changes the activation [12]. An alterna-
tive empirical method for model interpretation is finding the
closest point to a training sample x that lies on the model's
decision boundary [35]. Beyond interpretability, such meth-
ods find practical use in active learning [24] and adversarial
In this setting, one commonly performs
robustness [16].
gradient updates from an initial guess for x based on an
objective function that reaches its minimum whenever its
argument lies on the model's decision boundary. While al-
ternative and more efficient solutions have been developed,
most of the progress in this direction has focused on provid-
ing more optimized losses and sampling strategies [16, 35].
In short, there doesn't exist an exact (up to machine preci-
sion) method to compute the decision boundary of a DN.
In this paper, we focus on DNs employing Continuous
Piece-Wise Linear (CPWL) activation functions σ, such as
the (leaky-)ReLU, absolute value, and max-pooling. In this
setting, the entire DN itself becomes a CPWL operator, i.e.,
its mapping is affine within regions of a partition of its do-
main. There has been previous studies dedicated to esti-
mating the partition of such CPWL DNs and bridging em-
pirical findings with interpretability. For example, Hanin
et al. [14] connects the DN partition density with the com-
plexity of the learned function, Jordan et al. [21] approx-
imates the DN partition to provide robustness certificates,
Zhang et al. [42] interprets the impact of dropout with re-
spect to DN partitions, Chen et al. [6] proposes a neural ar-
chitecture search method based on the number of partition
regions, Balestriero et al. [3] proposes to improve batch-
normalization to further adapt DN partitions to the data ge-
ometry, Humayun et al. [18, 19] proposes methods to con-
trol pre-trained generative network output distributions by
approximating the DN partition. Despite being successful,
all these methods rely on approximation of the DN partition.
We propose SplineCam, a sampling-free method to compute
the exact partition of a DN. Our method computes the parti-
tion on two-dimensional domains of the input space, easily
scales with width and depth of DNs, can handle convolu-
tional layers and skip connections, and can be scaled to dis-
cover numerous regions as opposed to previously existing
methods. Our method also allows local characterization of
the input space based on partition statistics, and enables one
to tractably and efficiently sample arbitrarily many samples
that provably lie on a DN's decision boundary - opening
new avenues for visualization and interpretability. We sum-
marize our contributions as follows:
• Development of a scalable enumeration method that,
given a bounded 2D domain of a DN's input space,
computes the DN's input space partition (aka, linear
regions) and decision boundary.
• Development of SplineCam that leverages our new
enumeration method to directly visualize a DN's input
space partition, compute partition statistics and sample
from the decision boundary.
• Quantitative analysis that demonstrates the ability of
SplineCam to characterize the DN and compare be-
tween architectural choices and training regimes.
The SplineCam library, and codes required to reproduce
our results are provided in our Github1.
In Appendix E,
we also demonstrate the usage of SplineCAM with example
code blocks.
2. The Exact Geometry and Decision Bound-
ary of Continuous Piece-Wise Linear Deep
Networks
The goal of this section is to first introduce basic notations
and concepts associated with CPWL DNs (Sec. 2.1), and
then develop our method that consists of building the exact
DN input space partition, and the DN's decision boundary
that lives on it (Sec. 2.2); empirical studies based on our
method will be provided in Sec. 4.1.
2.1. Deep Networks as Continuous Piece-Wise Lin-
ear Operators
One of the most fundamental functional form for a nonlin-
ear function emerges from polynomials, and in particular,
spline operators.
In all generality a spline is a mapping
which has locally degree P polynomials on each region ω
of its input space partition Ω, with the additional constraints
that the first P − 1 derivatives of those polynomials are con-
tinuous throughout the domain, i.e., imposing a smoothness
constraint when moving from one region to any of its neigh-
bor. More formally and for the context of DNs we will par-
ticularly focus on affine splines, i.e., spline operators with
P = 1 and only constrained to enforce continuity through-
out the domain.
Let S be a Deep Network (DN) with L layers and parame-
ters {W (cid:96), b(cid:96)}L
(cid:96)=1. Whenever S employs continuous piece-
1https://github.com/AhmedImtiazPrio/SplineCAM
2
Algorithm 1 Find Partitions
Input: 2-polytope P and hyperplanes H ∈ R2, s.t., H ∩
P (cid:54)= ∅.
Output: G, C. G = (E, N ), where E are edges and N are
nodes of the graph G. C are cycles/cells/faces of G.
Step 1: Solve for N = {hi ∩ (hj ∪ Pe) ∀hi, hj ∈ H : j (cid:54)=
i}, where Pe are edges of P .
Step 2: For each hi, sort {hi ∩ (hj ∪ Pe) ∀hj ∈ H : j (cid:54)=
i} and connect in sorted sequence to obtain edges E.
Step 3: Obtain set of cycles C from graph G via Alg. 2.
2.2. Exact Computation of Their Partition and De-
cision Boundary
i ,b(cid:96)
Suppose, w(cid:96)
i are the i-th rows of W (cid:96), b(cid:96). The following
lemma provides us a framework to back-project to RS a
i , b(cid:96)
hyperplane h(cid:96)
i ,
expressed as,
i ∈ R(cid:96)−1 from layer (cid:96) with parameters w(cid:96)
Figure 2. Visual depiction of Eq. 2 with a toy affine spline map-
ping S : R2 → R3. Left: input space partition Ω made of mul-
tiple convex regions shown with different colors and with bound-
aries shown in black. Right: affine spline image Im(S) which
is a continuous piecewise affine surface composed of the input
space regions affinely transformed by the per-region affine map-
pings. Colors maintain correspondence from the left to the right.
wise affine (CPA) activation σ at each layer, i.e., layer (cid:96)
outputs are given by Eq. 1, with z0 being an input x ∈ RS.
h(cid:96)
i
(cid:44) {z ∈ R(cid:96)−1 : (cid:104)w(cid:96)
i , z(cid:105) + b(cid:96)
i = 0 }.
(5)
Lemma 1. The layer 1 to (cid:96) composition of a DN S, denoted
as S(cid:96) with output space R(cid:96), can be expressed as
Lemma 2. Given a hyperplane h(cid:96)
the tangent space of region ω ∈ Ω as,
i , it can be projected onto
S(cid:96)(x) =
(cid:88)
ω∈Ω
(cid:0)A(cid:96)
ωx + b(cid:96)
ω
(cid:1) 1{x∈ω},
(2)
with indicator function 1{.} and per-region affine parame-
ters given by,
A(cid:96)
ω=
(cid:96)
(cid:89)
i=1
diag (cid:0)qi
ω
(cid:1) W i,
ω=diag (cid:0)q(cid:96)
b(cid:96)
ω
(cid:1) b(cid:96)+
(cid:96)−1
(cid:88)
(3)
(cid:96)
(cid:89)
diag (cid:0)qj
ω
diag (cid:0)qi
(cid:1)W j
ω
(cid:1) bi.
i=1
j=i+1
(4)
Here, q(cid:96)
ω is the point-wise derivative of σ at pre-activation
W (cid:96)z(cid:96)−1 +b(cid:96), and diag(.) operator given a vector argument
creates a matrix with the vector values along the diagonal.
As a consequence of Thm. 1 from Balestriero et al. [2], q(cid:96)
ω
is unique for any region ω ∈ Ω.
Such formulations of DNs have been extensively employed
as it makes theoretical studies amenable to actual DNs with-
out any simplification while leveraging the rich literature
on spline theory, e.g., in approximation theory [7], optimal
control [8], statistics [9] and related fields.
3
projω(h(cid:96)
i ) = {x ∈ RS : (cid:104)w(cid:96)
i , A(cid:96)−1
ω x + b(cid:96)−1
ω (cid:105) + b(cid:96)
i = 0}.
(6)
i , A(cid:96)−1
i = (cid:104)w(cid:96)
i , with z(cid:96)
i the i-th element of layer (cid:96) activation.
The proof of Lem. 2 is direct since z(cid:96)
ω (cid:105) + b(cid:96)
b(cid:96)−1
Theorem 1. Let, S is a binary classifier DN therefore with
a single output unit. In RL−1, the decision boundary is the
1 . The decision boundary in RS is therefore
hyperplane hL
∪ω∈Ω{projω(hL
ω x +
1 ) ∩ ω}.
Thm. 1 can be proven by repeatedly applying Lem. 2 to
back-project the hyperplane hL
1 for all ω ∈ Ω. While the
above is general, we want to compute Ω on a 2-polytope
P ∈ RS for tractability [1] and ease of visualization.
SplineCam. Let's denote the partition in the input space
formed by the composition of layers 1 to (cid:96) as Ω(cid:96). Using
Alg. 1, SplineCam starts by partitioning P into Ω1 via hy-
perplanes h1
i from layer (cid:96) = 1, the first layer. Then for each
ω ∈ Ω1, we use Lem. 1 and Lem. 2 to obtain projω(h2
i )
for layer two. Therefore, we use Alg. 1 on each region in
Ω1 to obtain Ω2. We repeat this for all layers up to (cid:96) = L.
SplineCam is scalable, all the SplineCam operations can be
vectorized except for the search algorithm, which finds cy-
cles in a given graph G. We have provided pseudocode
for the search algorithm in Alg. 2 and in python script in
Suppl. E List. 3.
Complexity. For the vectorized operations, we can trade-
off time complexity with space complexity by allocating
Figure 3. Given an input domain P and a set of hyperplanes H, SplineCam first produces a graph G using all the edge and hyperplane
intersections (as in Alg. 1). To find all the cycles in the graph, we select a boundary edge es (blue arrow), do a breadth-first search (BFS)
to find the shortest path through the graph between vertices of es and obtain the corresponding cycle (blue). The edges obtained via BFS
are enqueued and the search is repeated. Each non-boundary edge is allowed to be traversed twice, once from either direction (see Alg. 2).
Once new regions are found, we back-project deeper layer hyperplanes, compute partition graphs and repeat.
(cid:46) get from top of queue
Neural Representations
Algorithm 2 Find cycles
Input: G = (E, N ) an undirected graph, Pe ⊂ E bound-
ary edges and starting edge es ⊂ Pe.
Output: C cycles.
(cid:46) connect edges both ways
(cid:46) append to end of queue
Initialize C = ∅, Eq = ∅
G(cid:48) =bidirectional(G)
APPEND Eq ← es
REMOVE es from G(cid:48)
while Eq (cid:54)= ∅ do
POP e ← Eq
REMOVE e(cid:48) from G(cid:48)
Ec = bfs(G(cid:48), ve, vs)
(cid:46) e(cid:48) is e with its direction inverted
(cid:46) vs, ve are start and end vertices of e
(cid:46) Ec are edges forming shortest path from ve to vs
c, ∀ec ∈ Ec if ec /∈ Pe
APPEND Eq ← e(cid:48)
REMOVE ec from G(cid:48), ∀ec ∈ Ec
REMOVE e(cid:48)
APPEND Ec ← e(cid:48)
APPEND C ← Ec
c from G(cid:48), ∀ec ∈ Ec s.t. ec ⊂ Pe
(cid:46) append edge to form cycle
end while
more memory. For Alg. 2, scaling requires distributing sets
of (ω, H) across CPU threads. Given a set of n intersecting
hyperplanes and a 2-polytope P , the operation of Alg. 1 to
find the partition reduces to an arrangement of lines prob-
lem. Therefore, the number of intersections, edges and cy-
cles ≤ O(n2) [1]. As the number of hyperplanes n → ∞,
the E[number of edges per cycle] ≈ O(1), also visible in
Table. 1. Therefore, the E[complexity] of Alg. 1 as n → ∞
is also of the order O(n2). In Fig. 7, we present the wall
time required for SplineCam for a randomly initialized sin-
gle layer MLP with variable width and input dimensionality.
For an MLP with width 1000, input dimensionality 8002,
and 8M params, it takes SplineCam 134s to find 132K re-
gions. The methods closest to SplineCam in the literature
4
are by Yuan et al. [38] that uses an exponential complex-
ity linear programming based algorithm to compute the DN
partitions and Gamba et al. [11] a method that computes the
intersection of partition boundaries with one-dimensional
lines connecting pairs of training samples. SplineCam is
the first exact method that is fast, scalable and computes the
partition on 2D slices.
3. Visualizing and Understanding Implicit
We start our journey into the geometry of DNs by looking
at implicit neural representations (INRs). INRs are perva-
sive in applications like 3D view synthesis [27] and inverse
problems [36], where multi-layer perceptrons are trained to
produce a continuous mapping from signal coordinates to
the value of the signal at those coordinates. While most
state-of-the-art implicit representations require training a
single large MLP (parameters in millions) not much has
been explored theoretically [41]. For example, while ReLU
MLPs were primarily used in NeRF [26]- one of the most
popular INR applications- the current practice has moved
towards using periodic encodings of the input coordinates
and following up with a ReLU-MLP. In this section, we
look at the effect of periodic encodings, visualize the ge-
ometry of the regions learned by these methods and in the
process provide qualitative validation for SplineCam.
3.1. Decision Boundary of Signed Distance Func-
tions
A signed distance function is an implicit continuous repre-
sentation of a surface or boundary, that outputs the distance
of an input from the boundary represented by the function.
The zero level set of a signed distance function (SDF) there-
fore denotes the surface or boundary of the function. Train-
ing an INR as a signed distance function is essentially a
regression task, where a ground truth distance field is fit by
the model to implicitly learn a continuous boundary. We
Original image
Layer 1
Layer 2
Layer 3
Layer 4
Layer 5
Reconstruction
Figure 4. SplineCam visualizations of neurons from different layers of an MLP trained with (top) and without (bottom) periodic position
encoding on a 2D image fitting task. All the neurons are visualized in the input space, color coded by the same color, and one neuron
from each layer is highlighted in red. The trained MLP has a width of 10 and depth of 5 and has ReLU activations for every layer. For
the positionally encoded (P.E.) network, boundaries of some neurons seem to be periodically repeating in the input domain, significantly
increasing the number of unique ω where the ReLU is active. The increased weight sharing, i.e., same weights/neurons being used to
represent/fit non-contiguous parts of the learned function, could be a possible reason for improved convergence of P.E. MLP [29].
boundary separating the background (ESDF) and another
with a more convoluted boundary (HSDF). We train an
identical ReLU-MLP architecture with width 256 and depth
6 on both ESDF and HSDF. In Fig. 5 we present the analyt-
ical decision boundary of the SDF overlaid on the ground
truth signed distance field for both ESDF and HSDF. While
the network capacity remains the same for both, we can see
that the spline partition of the two figures vary dramatically,
with higher region density for the HSDF task compared to
ESDF. For the harder HSDF task, we see the network cre-
ating significantly more regions, with higher density, that
allows the network to learn the curvature of the decision
boundary. This indicates that harder tasks may utilize more
of the network parameters compared to easier tasks.
For the 3D SDF task, we train a leakyReLU-MLP with
width 256 depth 6 on a Stanford Bunny SDF, and present
in Fig. 1 the normal map of the learned SDF, as well as the
spline partition and decision boundary on three 2D slices,
{x = 0, y = 0, z = 0}. What is noticeable here is that,
apart from the final layer hyperplane (final output neuron
weights), many neurons from the deeper layers of the net-
work also place their boundaries near the zero level set of
the SDF. Meaning, while the decision boundary is denoted
by the output neuron, there are multiple neurons that learn
parts of the surface boundary. This is a clear indication of
the hierarchical nature of signal fitting by INRs.
3.2. The Effect of Positional Encoding on INR Ge-
ometry
Figure 5. Visualization of the decision boundary and partition ge-
ometry of a 2D neural SDF with width 256 and depth 6. A single
training image is thresholded at 0.01 and 0.5 to create two signed
distance fields (top middle and right), on which an MLP is trained.
For both we can use SplineCam to obtain the analytical zero level
set (decision boundary) and also visualize the partition geometry
(bottom row). Note that even with identical architecture, the par-
tition density differs significantly based on the task complexity.
train a 2D and 3D SDF and visualize the analytical zero
level set, `a la decision boundary, using our method, and vi-
sualize the spline partitioning learned by the functions in
Fig. 5 and Fig. 1.
To train an INR as a 2D SDF, we take the image as in Fig. 5
from the MetFaces [22] dataset and threshold it at .001 and
.05 to create two binary images. Each binary image is used
to create separate ground truth SDFs, one with a simpler
Empirical evidence shows that INRs trained with period-
ically encoded coordinates instead of input space coordi-
nates, are able to fit the input signal better with faster con-
vergence rates. While initially inspired by its use in trans-
5
Table 1. Statistics of the spline partitions formed by fully-connected (MLP) and convolutional neural networks. For each dataset, the same
2D slice and input domain is used to find the partition regions. Convolutional neural networks have a significantly higher number of regions
with lower volume compared to MLPs even with less parameters.
Architecture
Dataset
Parameters Avg Vol
MLP
CONV
MNIST
Fashion-MNIST
MNIST
Fashion-MNIST
44,860
44,860
39,780
39,780
3.144e-4
4.991e-4
1.134e-5
3.54e-5
Avg Number
of Vertices
4
4
4
4
Ecc
102e7
36e7
17e7
14e7
Number of
Regions
318
1364
8814
28222
Figure 7. Time complexity of computing the partition regions
(Top) and growth of the number of regions with width (Bottom),
for a single layer randomly initialized MLP with varying width (n)
and input dimensionality. For all the input dimensions, we take a
randomly oriented, square 2D domain centered on the origin, with
an area of 4 units. Note that with increasing input dimensionality,
we get reduced number of hyperplane intersections with our 2D
domain of interest, therefore we can see a slight reduction in the
wall time required and also the number of regions.
tion of sine/cosine while training, with 5 linear regions for
each period of the sine/cosine. We see that using this en-
coding has negligible effect on performance compared to
using continuous cosine and sine functions for encoding. In
Fig. 4 we present a layerwise visualization where we sep-
arately show for each layer the neurons in the input space.
We also highlight in red, the boundary induced by a single
neuron from each layer.
For the P.E. network boundaries of some neurons seem to
be periodically repeating across the input domain. This is
due to the periodic wrapping of space induced by P.E., i.e.,
the input domain is wrapped around in the embedded space
which gets cut by subsequent ReLU hyperplanes. The ef-
fect of periodicity is most evident for the first layer hyper-
planes, as can be seen from the highlighted neuron in Fig. 4.
Such repetition of neurons across different parts of the in-
put space, significantly increases the number of regions and
weight sharing across input space, which could be a pos-
sible reason for improved convergence [29]. We also see
a layerwise learning of the boundary of the sphere, indicat-
ing how multiple neurons across different depths coordinate
to complete the final regression task. The absence of some
neurons from the input space domain also shows that not all
neurons actively partake in the regression task. For exam-
ple, while for the first layer of the non-P.E. network, all 10
Figure 6. (Top Left) Decision boundary visualization for an MLP
with width 50 and depth 3, trained on fashion-MNIST. Dark red
line represents the learned decision boundary while black lines
represent the spline partition of the network. (Top Right) Sam-
ples from the decision boundary between classes Top and Trouser.
The samples have distinguishable attributes present from both
classes, which indicates a good decision boundary (Bottom Left)
SplineCam visualization for a CNN trained on MNIST, with two
convolutional layers and one hidden fully connected layer of width
50. One of the digit 3 samples is misclassified by the network
as digit 2. (Bottom Right) Samples from the decision boundary
between digits 2 and 3 of MNIST. Some of the samples clearly
look like the digit three, indicating that the decision boundary here
could be sub-optimal.
former networks there has been very less theoretical inves-
tigation of how positional encoding affects learning. We
train a 2D INR to regress a grayscale image intensity for
given pixel coordinates (Fig.4). We use a ReLU-MLP as
the INR backbone, with width 10 and depth 5, and visu-
alize the spline partition induced with/without a periodic
position encoding front-end. Since SplineCam works with
affine non-linearities only, we use a piecewise approxima-
6
Figure 8. Decision boundary of a 5 layer convnet during training epochs {50,100,150,200,300} (columns) trained on a binary classification
task to classify between Egyptian cat and Tabby Cat classes of tinyimagenet. White points are images from the dataset that were used as
anchor points for the 2d-plane cut in the input space. First, we clearly observe that in the first two columns (epoch 50 and 100) not much
change occurs to the decision boundar (red line). However, between epoch 100 and 150, a sudden change occurs making the decision
boundary move out of the 2D-slice, which then slowly recovers until the end of training (top row). On the other hand when looking at a
different 2D-slide of the input space (bottom row) we can see that again between epoch 50 and 100 training does not drastically update the
decision boundary, but that between epoch 100 and 150, a sudden change in the decision boundary occurs. It then stays roughly identical
(within this slice) until the end of training. Samples from the decision boundary are provided in the appendix.
hyperplanes intersect the input space, for the last layer only
4 of the 10 neurons intersect the input domain. This shows
how different neurons create redundancy by remaining ac-
tive/inactive for all possible inputs.
4. How Training Hyper-Parameters Impact
Your Spline
Recall from Sec. 2.1 that any DN with CPWL non-
linearities is a CPWL mapping or affine spline. Affine
splines have been widely studied and many of their prop-
erties, e.g. number of regions in their partition, are known
to convey information on the complexity of the function
In this section, we thus propose to take on a more
[14].
quantitative approach on using SplineCam by quantify-
ing how different training choices, e.g., architecture, data-
augmentation, impact the partition of the DN.
4.1. Impact of Architecture on Partitions Properties
Computing the exact partition boundary finds many applica-
tions, not only to visualize and sample the decision bound-
ary (see Fig. 6). We explore some alternative interesting
directions in this section.
First, we explore the impact of the DN's architecture. We
see that the choice of architecture can have significant ef-
fect on the partitioning induced by a deep neural network
(Tab. 1). We quantify the characteristics of the partitions via
the following measures- Average Region Volume (ARV),
number of vertices, Number of Regions, and eccentricity
which is defined as the ratio of the max pairwise distance
between vertices and min pairwise distance between ver-
tices. For a given dataset, we fix the input domain and
switch between convolutional and fully connected archi-
tectures to draw emphasis on the effect of the symmetries
induced by a convolutional layer. We see that in convo-
lutional architectures, there is a significantly higher num-
ber of partition regions formed, which is an indication of
higher complexity of the learned model [28]. We also see
that the eccentricity and volume of the polytopes are signif-
icantly smaller for convolutional architectures compared to
fully connected architectures, indicating more uniform par-
tition shapes and higher partition density. These can also be
visualized in Fig. 6. In Suppl. Fig.13 we present the varia-
tion of partition statistics with training, for training points,
test points and points off the manifold. We see that partition
density increases for sample on the data manifold regardless
of being on the training.
4.2. Data-Augmentation
Data-Augmentation is a ubiquitous technique that has led to
great improvements into DN's performances [10]. It is still
unclear what is the impact of DA onto the DN's mapping. In
fact, while explicit regularizers of DA has been found [5,17]
and while many empirical studies have emerged [39], none
truly pinpoint what is different between DNs trained with
DA and DNs trained without.
7
Figure 9. Average partition statistics for 90 tinyimagenet test samples with and without DA training for VGG11 and VGG16. The average
volume and number of regions are indicative of partition density whereas eccentricity is indicative of the shape of the regions. For VGG11
a distinct difference in the statistics can be visualized between DA and non-DA training. DA training significantly increases the partition
density at test points, which is indicative of better generalizability. On the other hand, the difference reduces for VGG16 while the overall
region density increases. This is expected behavior since the VGG16 has significantly more parameters. For both case, the DA models
acquired a similar accuracy of 51% on the tinyimagenet-200 classification task.
gion eccentricity for spline partitions computer from ran-
dom 2D domains centered at 90 tiny imagenet test sam-
ples. We define region eccentricity to be the ration between
the largest and smallest edge for a given region. For each
sample, computation of partition statistics take 7mins for
VGG11. We see that partition statistics vary significantly
between DA and non-DA for VGG11 but not as signifi-
cantly for VGG16. For both networks, we provide partition
visualizations in the supplementary materials. One thing to
notice is that the average number of regions more than dou-
bles between VGG11 and VGG16. In the supplementary
materials we provide more such comparisons across archi-
tecture choices.
5. Conclusions
We present the first provable method to visualize and sam-
ple the decision boundary of deep neural networks with
CPWL non-linearities. Our presented methods may allow
many future avenues of exploration and understanding of
neural network geometries. For example, in Fig. 4 in the
presented SplineCam visuals, we see that a number of neu-
rons do not intersect the input space domain after learning.
We have also seen that number of neurons could be initial-
ized as such that the input vectors always keep the neuron
deactivated. Such insights can be used to provide improved
initialization or pruning schemes for INRs. Furthermore,
using SplineCam we can visualize the decision boundary
Figure 10. Images from the decision boundary of a CNN trained to
perform binary classification between Tabby Cat and Egyptian Cat
classes of tinyimagenet. In the supplementary materials we have
provided larger sets of images and compare with images obtained
from different parts of the input space.
In order to provide a first quantitative understanding of what
actually changes within a DN when DA is applied, we pro-
pose to rely on SplineCam. In Fig.8 we provide the average
volume of region, average number of regions, and mean re-
8
dynamics of neural networks and asses different training
strategies based on decision boundary dynamics across ran-
dom regions of the input space.
Acknowledgements
Humayun and Baraniuk were supported by NSF grants CCF-
1911094, IIS-1838177, and IIS-1730574; ONR grants N00014-
18-12571, N00014-20-1-2534, and MURI N00014-20-1-2787;
AFOSR grant FA9550-22-1-0060; and a Vannevar Bush Faculty
Fellowship, ONR grant N00014-18-1-2047.
References
[1] Pankaj K Agarwal. Partitioning arrangements of lines ii: Ap-
plications. Disc. & Comp. Geom., 1990. 3, 4
[2] R. Balestriero and R. G. Baraniuk. A spline theory of deep
networks. In Proc. Int. Conf. Mach. Learn., volume 80, pages
374–383, Jul. 2018. 3, 2
[3] Randall Balestriero and Richard G Baraniuk. Batch normal-
ization explained. arXiv preprint arXiv:2209.14778, 2022.
2
[4] Randall Balestriero, Romain Cosentino, Behnaam Aazhang,
and Richard Baraniuk. The geometry of deep networks:
In Advances in Neural Infor-
Power diagram subdivision.
mation Processing Systems 32, pages 15806–15815, 2019.
2
[5] Randall Balestriero, Ishan Misra, and Yann LeCun. A data-
augmentation is worth a thousand samples: Exact quantifi-
cation from analytical augmented sample moments, 2022. 7
[6] Wuyang Chen, Xinyu Gong, and Zhangyang Wang. Neu-
in four gpu hours:
arXiv preprint
ral architecture search on imagenet
A theoretically inspired perspective.
arXiv:2102.11535, 2021. 2
[7] Elliott Ward Cheney and William Allan Light. A course in
approximation theory, volume 101. American Mathematical
Soc., 2009. 3
[8] Magnus Egerstedt and Clyde Martin. Control theoretic
splines: optimal control, statistics, and path planning.
Princeton University Press, 2009. 3
[9] Cesare Fantuzzi, Silvio Simani, Sergio Beghelli, and Ric-
Identification of piecewise affine models
International Journal of Control,
cardo Rovatti.
in noisy environment.
75(18):1472–1485, 2002. 3
[10] Alhussein Fawzi, Horst Samulowitz, Deepak Turaga, and
Pascal Frossard. Adaptive data augmentation for image clas-
sification. In 2016 IEEE international conference on image
processing (ICIP), pages 3688–3692. Ieee, 2016. 7
[11] Matteo Gamba, Adrian Chmielewski-Anders, Josephine Sul-
livan, Hossein Azizpour, and Marten Bjorkman. Are all
In International Conference
linear regions created equal?
on Artificial Intelligence and Statistics, pages 6573–6590.
PMLR, 2022. 4
[12] Amirata Ghorbani, Abubakar Abid, and James Zou. Inter-
pretation of neural networks is fragile. In Proceedings of the
AAAI conference on artificial intelligence, volume 33, pages
3681–3688, 2019. 2
[13] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep
sparse rectifier neural networks. In Proceedings of the four-
teenth international conference on artificial intelligence and
statistics, pages 315–323, 2011. 1
[14] Boris Hanin and David Rolnick. Complexity of linear re-
gions in deep networks. arXiv preprint arXiv:1901.09021,
2019. 2, 7
[15] L. A. Hannah and D. B. Dunson. Multivariate convex re-
gression with adaptive partitioning. J. Mach. Learn. Res.,
14(1):3261–3294, 2013. 1
[16] Warren He, Bo Li, and Dawn Song. Decision boundary anal-
ysis of adversarial examples. In ICLR, 2018. 2
[17] Alex Hern ́andez-Garc ́ıa and Peter K ̈onig. Data augmen-
arXiv preprint
tation instead of explicit regularization.
arXiv:1806.03852, 2018. 7
[18] Ahmed Imtiaz Humayun, Randall Balestriero, and Richard
Baraniuk. MaGNET: Uniform sampling from deep genera-
tive network manifolds without retraining. In International
Conference on Learning Representations, 2022. 2
[19] Ahmed Imtiaz Humayun, Randall Balestriero, and Richard
Baraniuk. Polarity sampling: Quality and diversity control
of pre-trained generative networks via singular values.
In
Proceedings of the IEEE/CVF Conference on Computer Vi-
sion and Pattern Recognition, pages 10641–10650, 2022. 2
[20] Mohammad AAK Jalwana, Naveed Akhtar, Mohammed
Bennamoun, and Ajmal Mian. Cameras: Enhanced resolu-
tion and sanity preserving class activation mapping for image
saliency. In CVPR, pages 16327–16336, 2021. 2
[21] Matt Jordan, Justin Lewis, and Alexandros G Dimakis. Prov-
able certificates for adversarial examples: Fitting a ball in the
union of polytopes. In Advances in Neural Information Pro-
cessing Systems, 2019. 2
[22] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten,
Jaakko Lehtinen, and Timo Aila. Analyzing and improving
the image quality of stylegan. In Proc. CVPR, pages 8110–
8119, 2020. 5
[23] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep
learning. nature, 521(7553):436–444, 2015. 1
[24] Andrea Locatelli, Alexandra Carpentier,
and Samory
Kpotufe. An adaptive strategy for active learning with
smooth decision boundary. In Algorithmic Learning Theory,
pages 547–571. PMLR, 2018. 2
[25] A. Magnani and S. P. Boyd. Convex piecewise-linear fitting.
Optim. Eng., 10(1):1–17, 2009. 1
[26] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik,
Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf:
Representing scenes as neural radiance fields for view syn-
In European conference on computer vision, pages
thesis.
405–421. Springer, 2020. 4
[27] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik,
Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf:
Representing scenes as neural radiance fields for view syn-
thesis. Communications of the ACM, 65(1):99–106, 2021.
4
[28] Guido F Montufar, Razvan Pascanu, Kyunghyun Cho, and
Yoshua Bengio. On the number of linear regions of deep
In Advances in Neural Information Pro-
neural networks.
cessing systems, pages 2924–2932, 2014. 7, 3
9
[29] Steven J Nowlan and Geoffrey E Hinton. Simplifying neu-
ral networks by soft weight-sharing. Neural computation,
4(4):473–493, 1992. 5, 6
[30] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer,
James Bradbury, Gregory Chanan, Trevor Killeen, Zem-
ing Lin, Natalia Gimelshein, Luca Antiga, Alban Desmai-
son, Andreas Kopf, Edward Yang, Zachary DeVito, Mar-
tin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit
Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch:
An imperative style, high-performance deep learning library.
In Advances in Neural Information Processing Systems 32,
pages 8024–8035. Curran Associates, Inc., 2019. 2, 10
[31] Tiago P. Peixoto. The graph-tool python library. figshare,
2014. 2
[32] Henning Petzka, Martin Trimmel, and Cristian Sminchis-
escu. Notes on the symmetries of 2-layer relu-networks.
In Proceedings of the Northern Lights Deep Learning Work-
shop, volume 1, pages 6–6, 2020. 2
[33] Mary Phuong and Christoph H. Lampert. Functional vs.
parametric equivalence of re{lu} networks. In International
Conference on Learning Representations, 2020. 2
[34] Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli,
and Jascha Sohl-Dickstein. On the expressive power of deep
neural networks. arXiv preprint arXiv:1606.05336, 2016. 4
[35] Gowthami Somepalli, Liam Fowl, Arpit Bansal, Ping Yeh-
Chiang, Yehuda Dar, Richard Baraniuk, Micah Goldblum,
and Tom Goldstein. Can neural nets learn the same model
twice? investigating reproducibility and double descent from
the decision boundary perspective. In CVPR, pages 13699–
13708, 2022. 2
[36] Yu Sun, Jiaming Liu, Mingyang Xie, Brendt Wohlberg,
and Ulugbek S Kamilov. Coil: Coordinate-based inter-
nal learning for imaging inverse problems. arXiv preprint
arXiv:2102.05181, 2021. 4
[37] Shuning Wang and Xusheng Sun. Generalization of hing-
ing hyperplanes. IEEE Transactions on Information Theory,
51(12):4425–4431, 2005. 1
[38] Yuan Wang. Estimation and comparison of linear regions for
relu networks. In IJCAI, 2022. 4
[39] Yulin Wang, Xuran Pan, Shiji Song, Hong Zhang, Gao
Huang, and Cheng Wu. Implicit semantic data augmentation
for deep networks. Advances in Neural Information Process-
ing Systems, 32, 2019. 7
[40] Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and
Hod Lipson. Understanding neural networks through deep
ICML Deep Learning Workshop, page 12,
visualization.
2015. 2
[41] Gizem Y ̈uce, Guillermo Ortiz-Jim ́enez, Beril Besbinar, and
Pascal Frossard. A structured dictionary perspective on
the
implicit neural representations.
IEEE/CVF Conference on Computer Vision and Pattern
Recognition, pages 19228–19238, 2022. 4
In Proceedings of
[42] Xiao Zhang and Dongrui Wu. Empirical studies on the
properties of linear regions in deep neural networks. arXiv
preprint arXiv:2001.01072, 2020. 2
10
SplineCam: Exact Visualization of Deep Neural Network Geometry and Decision
Boundary
Supplementary Materials
Codes available at SplineCAM Github
Google Colab demo https://bit.ly/splinecam-demo
We provide the following supplementary materials (SMs)
as support of our theoretical and empirical claims. This SM
is organized as follows.
Appendix A provides the necessary background results for
SplineCam and elaborates on how any deep neural network
or implicit neural representation function with piecewise
contiuous affine activations are max affine splines. Ap-
pendix B provides further implementation details, extend-
ing from Sec. 2.2 and including hardware and software re-
quirements.
Appendix C elaborates on the computational complexity of
the method. We present experiments assessing the time
complexity of SplineCam varying the width of a single
layer MLP and varying the volume of the input domain for
VGG11. In Appendix D we present new experiments, first
Appendix D.1 discusses the change of partition character-
istics with training epochs and while varying architecture
parameters (e.g., width for MLP and number of filters for a
CNN). We also present the change of characteristics across
different parts of the input space, e.g., around training sam-
ples, test samples and regions off the data manifold. In Ap-
pendix D.2 we present quantitative results on the variation
of partition statistics while varying the orientation of the 2D
input domain of interest. We see that the variation is con-
siderably low between random orientation, showing that a
single 2D slice can possibly be good enough to characterize
the partition in different parts of the input space. Finally,
in Appendix E we expand on the usage of SplineCam and
present code blocks as explainers for how the SplineCam
framework operates.
A. Background on Continuous Piecewise
Affine Deep Networks
A max-affine spline operator (MASO) concatenates inde-
pendent max-affine spline (MAS) functions, with each MAS
formed from the point-wise maximum of R affine map-
pings [15, 25]. For our purpose each MASO will express
a DN layer and is thus an operator producing a D(cid:96) dimen-
sional vector from a D(cid:96)−1 dimensional vector and is for-
mally given by
Figure 11. Time complexity of computing the partition regions
(Top) and growth of the number of regions with width (Bottom),
for a single layer randomly initialized MLP with varying width (n)
and input dimensionality. For all the input dimensions, we take a
randomly oriented, square 2D domain centered on the origin, with
an area of 4 units. Note that with increasing input dimensionality,
we get reduced number of hyperplane intersections with our 2D
domain of interest, therefore we can see a slight reduction in the
wall time required and also the number of regions.
are the slopes and br ∈ RD(cid:96)
where Ar ∈ RD(cid:96)×D(cid:96)−1
are the offset/bias parameters and the maximum is taken
coordinate-wise. For example, a layer comprising a fully
connected operator with weights W (cid:96) and biases b(cid:96) fol-
lowed by a ReLU activation operator corresponds to a (sin-
gle) MASO with R = 2, A1 = W (cid:96), A2 = 0, b1 =
b(cid:96), b2 = 0. Note that a MASO is a continuous piecewise-
affine (CPA) operator [37].
MASO(v; {Ar, br}R
r=1) = max
r=1,...,R
Arv + br,
(7)
The key background result for this paper is that the layers
of DNs constructed from piecewise affine operators (e.g.,
1
convolution, ReLU, and max-pooling) are MASOs [2]:
B. Implementation Details
s.t. MASO(v; {Ar, br}R
∃R ∈ N∗, ∃{Ar, br}R
r=1) = g(cid:96)(v), ∀v ∈ RD(cid:96)−1
r=1 (8)
,
(9)
making any Implicit Neural Representation or even Deep
Generative Networks a composition of MASOs.
The CPA spline interpretation enabled from a MASO for-
mulation of DNs provides a powerful global geometric in-
terpretation of the network mapping based on a partition of
its input space RS into polyhedral regions and a per-region
affine transformation producing the network output. The
partition regions are built up over the layers via a subdivi-
sion process and are closely related to Voronoi and power
diagrams [4].
Figure 12. Time complexity of computing the partition re-
gions Top and average region volume (ARV) Bottom while in-
creasing the area of the input domain, for a VGG11 trained on
tinyimagenet-200. Each line corresponds to one of 10 training
samples anchored on which the 2D input domains are defined,
with random orientations. We see that the required time scales
linearly with the size of the input domain. Apart from that, we see
that as the neighborhood size is increased for some samples, the
ARV increases and then decreases again. This could indicate that
while the ARV is small for smaller neighborhoods around training
samples while farther away larger regions appear and cause the
transient behavior in the curves.
2
In Sec. 2.2 we provide a summary of how SplineCam works.
In this section we provide details about SplineCam imple-
mentation and algorithm.
SplineCam is implemented using Pytorch [30] and Graph-
tool [31]. All the linear algebra operations are performed
using Pytorch and are scalable using GPUs. The region
finding operation on the other hand is single threaded. This
can be a bottleneck in cases, for example, with DNNs that
have more than one layer. In this case, distributing regions
across threads, as pairs of hyperplane-sets and a polygon,
can result in significant speedups.
Since finding the regions involve solving systems of linear
equations, most of the opearations in SplineCam require
double precision. This can introduce significant memory
bottlenecks, especially for large convolutional layers with
multiple channels of input and output; for such layers the
size of the corresponding Toeplitz matrix representation be-
comes significantly large with large number of input and
output channels. For this reason, we always store such
weight matrices as sparse matrices and query rows only
when required. We also replace max pool layers with aver-
age pool layers for simplicity; in our experiments involving
VGG16 and VGG11, we replace the maxpool after the first
conv with an average pool and use strided convolutions for
deeper layers. Unless specified, we always consider square
2D domains in the input. While characterizing we use the
terms volume and area of the regions interchangeably.
In Appendix. E, we provide details on how SplineCam can
be used, with modular codes showing how it computes the
partition in a layerwise fashion. We also provide a pseu-
docode for the search algorithm we have proposed to find
regions given a graph formed via polygon-hyperplane inter-
sections. All the reported computation times were evaluated
on a setup consisting of 8x NVIDIA QUADRO RTX 8000
48GB GPUs and 2x Intel Xeon Gold 5220R.
C. Computational Complexity
In this section we present two sets of experiments that we
have performed to assess the computational complexity of
SplineCam.
Varying width for a single layer MLP. As we have
discussed earlier and have elaborated in Appendix. E,
SplineCam performs region wise partition operations,
which can be parallelized across sets of regions. To assess
the per region performance of SplineCam, we do the fol-
lowing experiment. We take an uninitialized 1 layer ReLU-
MLP with n neurons and D input dimensionality. The num-
ber of neurons is equal to the number of hyperplanes that
would partition space. We vary n ∈ {10...980} and also
Figure 13. Evolution of average region volume (ARV) for 55 different randomly oriented square domains of the input space. Out of the
55 domains, 25 are centered on CIFAR10 training samples, 25 on test samples and 5 on random locations in the input space. We train a 8
layer CNN as detailed in Appendix. D.1. We notice that as training progresses, the ARV around points on the data manifold gets reduced.
For points off the manifold ARV reduces as well, for CNN x8 CIFAR10 it reduces significantly while for CNN x32 it doesn't. In all cases,
the off manifold ARV remains larger than the on manifold ARV at 100 training epochs.
vary D ∈ {2, 2002, 4002, 6002, 8002} and plot in Fig. 11
the wall time in seconds, required to compute the partition.
As the input domain, we consider a randomly oriented 2D
domain centered on the origin with 4sq unit area. We see
that the computation time complexity is upper bounded by
O(n2/5000) within the range of n in question. With in-
creasing D we see a reduced number of hyperplane inter-
sections, therefore we see a reduction in required time.
Effect of the area of the input domain. For this experi-
ment, we take a VGG11 model and increase the size (area)
of the input domain. We present the wall time vs area plot in
Fig. 12. We can see that increasing the area (or volume) of
the input region, monotonically increases the required time
for computing the partition, in approximately a linear fash-
ion. Even though increasing the area of the input domain
should increase the number of first layer intersections, we
see that the effect of that remains linear within the range.
Note that, we can also scale the area of the input domain by
breaking the input domain into multiple 2D polygonal re-
gions of equal area and using separate threads/gpus to per-
form computation. This way we can also parallelize the
partition computation and scale across memory instead of
time.
D. Extra Experiments
D.1. Evolution of partition statistics while training
MLP trained on MNIST. For this experiment we train
an MLP with depth 5 and width ∈ {8, 16, 32, 16, 128}.
We train the MLPs for 50 training epochs on the MNIST
dataset, and evaluate the partition statistics via SplineCam,
for 25 training and 25 validation samples of randomly se-
lected from MNIST. We present average region volume
(ARV) distributions per training epoch in Fig. 15. The first
thing to notice is that for smaller width networks, ARV is
bimodal across all epochs, while for width 64 and onwards,
the mode with higher volume regions vanishes. ARV also
shifts towards lower volumes as the width of the networks
are increased. While training samples tend to have lower
ARV, the lower ends of the distributions differ between
training and test samples; for widths 32, 64, and 128 we
see distinct low ARV tails which are not visible for the test
samples. This shows that for some of the training samples,
the partition regions of the network are smaller, indicating
that the model has more representation capacity for such
sample neighborhoods [28]. This could be a possible indi-
cation for memorization of some training samples. Another
thing to notice is that during the first epoch, the avg parti-
tion volumes are significantly lower. As training progresses,
first ARV shifts to the right (larger) and then slowly shifts
to the left. As we increase width, the starting ARV of the
network becomes small in general compared to the ARV for
the last training epoch. In Fig. 16 we also present the dis-
tributions of the average number of regions (ANR) in the
neighborhood of the same samples used for Fig. 15.
CNN trained on CIFAR10. For this experiment, we train
an 8 layer CNN with 6 convolutional layers and 2 fully con-
nected layers. The number of filters for the convolutional
layers are set as {(cid:98)(cid:96)/2(cid:99) × mul
: (cid:96) = 1...6}, where (cid:98).(cid:99)
is the floor operation, and mul ∈ {8, 16, 32} is a width
multiplier. We see that, similar to Fig. 15, the ARV gets
reduced with increased width. For training, we can see
longer tails towards lower ARV, indicating denser regions
near some training samples. One thing that is noticeable
here is that contrary to MLPs, the ARV of neighborhoods
near training samples monotonically decrease in most cases
3
tic for the partition generated by a VGG11 model. Re-
gion volumes can vary both for a given 2D input domain
and between different input domains. The maximum in-
domain RV standard deviation over 20 different orientations
is {7.3955e − 07, 2.2665e − 07, 3.0617e − 06, 1.0149e −
06, 2.2171e − 06} for each sample. The between orienta-
tion ARV standard deviation is {5.5993e − 08, 7.4666e −
09, 1.3462e−07, 3.9948e−08, 1.2935e−07} for each sam-
ple, which is an order smaller than the in-domain RV stan-
dard deviation. This is an indication that SplineCam statis-
tics for a single 2D slice could possibly be accurate enough
to not require multiple 2D slices, even for high dimensional
inputs.
D.3. Extra Figures
In the following section we present some figures comple-
menting the experiments done above.
Figure 14. Partition visualization for a VGG11 model trained on
TinyImagenet. We take 10 samples from the training set for which
the model posteriors have the lowest entropy, and present here
neighborhoods for two samples with high partition density (Left)
and two samples with low partition density (Right). We also high-
light in red, the sets of points for which any two classes from the
dataset has equal probability. We see that the denser partition re-
gions have more such lines compared to sparser regions, suggest-
ing correlations with generalization [34]
for the CNNs. This could be due to the complexity of the
task, CIFAR10 classification being a harder task compared
to MNIST, the region density is required to be significantly
higher compared to early training.
We also visualize in Fig. 13 the evolution of ARV with
training epochs for CNNs with different width multipliers.
We visualize for 25 training, 25 test and 5 random sam-
ples, a randomly oriented 2D neighborhood. We notice that
as training progresses, the ARV around points on the data
manifold gets reduced. For points off the manifold ARV re-
duces as well, for CNN x8 CIFAR10 it reduces significantly
while it doesn't as much for CNN x32. In all cases, the off
manifold ARV remains larger than the on manifold ARV at
100 training epochs.
D.2. Variation of region statistics between random
orientations
For this experiment we take 5 random training samples from
TinyImagenet and calculate partition statistics for 20 ran-
domly oriented 2D domains with area 0.005, centered on
each sample. To assess the variability between different
2D domains we first look at the region volume (RV) statis-
4
Train
Test
Train
Test
Figure 15. Distribution of average region volume (ARV) across
training epochs, in the neighborhood of 25 train (Left) and 25
test (Right) samples from MNIST. We train an MLP with depth
5 and vary its width between {8, 16, 32, 16, 128}. ARV is consid-
erably large and bimodal for smaller widths; as network width is
increased ARV becomes smaller and unimodal, with long smaller
volume tails for training samples. This discrepancy between train-
ing and test samples, possibly indicates memorization.
Figure 16. Distribution of average number of regions (ANR)
across training epochs, in the neighborhood of 25 train (Left) and
25 test (Right) samples from MNIST. We train an MLP with depth
5 and vary its width between {8, 16, 32, 16, 128}. ANR is small
for smaller widths and increases significantly as the network width
is increased. For larger networks, the distributions have large ANR
tails. We can also see a shift towards lower ANR right after epoch
1 and a slow shift of the distribution towards larger ANR as train-
ing progresses.
5
Train
Test
Train
Test
Figure 17. Distribution of average region volume (ARV) across
training epochs, in the neighborhood of 25 train (Left) and 25 test
(Right) samples from CIFAR10. We train a CNN with 6 convolu-
tional layers and 2 fully connected layers. The number of filters for
the layers are set as {(cid:98)(cid:96)/2(cid:99) × mul : (cid:96) = 1...6}, where (cid:98).(cid:99) is the
floor operation, and mul ∈ {8, 16, 32} is a width multiplier. We
see that, similar to Fig. 15, the ARV gets reduced with increased
width. For training, we can see longer tails towards lower ARV,
indicating that for some training samples the regions become very
small. For both train and test, with increasing number of epochs,
the ARV distribution mean shifts towards lower ARV.
Figure 18. Distribution of average number of regions (ANR)
across training epochs, in the neighborhood of 25 train (Left) and
25 test (Right) samples from CIFAR10. We train a CNN with
6 convolutional layers and 2 fully connected layers. The number
of filters for the layers are set as {(cid:98)(cid:96)/2(cid:99) × mul
: (cid:96) = 1...6},
where (cid:98).(cid:99) is the floor operation, and mul ∈ {8, 16, 32} is a width
multiplier. We see that, similar to Fig. 16, the ANR significantly
increases with increased width. For training, we can see longer
tails towards higher ANR, indicating that for some training sam-
ples there is high region density in the neighborhood. For both
train and test, with increasing number of epochs, the ANR distri-
bution mean shifts towards higher ANR.
6
Figure 19. Partition visualization of a randomly initialized single layer MLP with 1000 hyperplanes and input dimensionality of 8002 for
a randomly oriented 2D square domain centered on the origin. The partition contains 132569 regions and takes 134s to compute.
7
Figure 20. Partition visualization of a convolutional neural network, trained for binary classification of tinyimagenet Tabby Cat and
Egyptian Cat classes. Left Samples that are used as anchor points to determine the 2D slice with an area of 450 units. Middle The
partitioning of input space induced by the model as well as the decision boundary (in red). Right Randomly sampled points from the
decision boundary. Samples from the decision boundary visually represent a linear combination of the three anchor samples, while the
weights are determined by the non-linear decision boundary. For example, for the top and bottom rows, samples from the boundary look
biased towards two of the three anchor points. Computing the partition regions take 7.46 mins, 13.96 mins and 5.02 mins respectively, with
each of the partitions containing 82817, 119895, and 60455 regions. The number of regions is positively correlated with the curvature of
the decision boundary in the neighborhood.
8
Figure 21. Training and visualizing the partition of a 2D INR trained on an inpainting task. Top row shows the original training image,
the training image with a section cropped out and the predictions of a trained MLP with width 256 and depth 6. The MLP, via implicit
regularization, learns a smooth surface in place of the discontinuity. Note how a lot of neurons are placed in the cropped region, and also
around the foreground boundaries, to allow more curvature while fitting.
9
E. Usage of SplineCam
We provide SplineCam as a python toolbox that can wrap
any given Pytorch [30] sequential network, containing a set
of supported modules. The toolbox is available for down-
load in our anonymized Drive .zip file.
To begin, first we have to define a 2D input space region of
interest (ROI). The region of interest is can be a polytopal
region at the input of the network defined via vertices. Since
all the region finding operations are performed in 2D, we
also require an orthogonal projection matrix that projects
vectors from the input space on to the 2D ROI. Follow-
ing this we can use the SplineCam library to wrap a given
model.
1
2 import torch
3 import splinecam
4
5 ## given torch model and domain (ROI) as a list
of vertices
6
7 T = splinecam.utils.get_proj_mat(domain)
8
9 model.cuda()
10 model.eval()
11 model.type(torch.float64)
12
13 print('Wrapping model with SplineCam...')
14 NN = splinecam.wrappers.model_wrapper(
model,
input_shape=model.input_shape,
T = T,
dtype = torch.float64,
device = 'cuda'
15
16
17
18
19
20 )
21
22 ## check .forward() and matmul operation
equivalence
23 print('Verifying wrapped model...')
24 flag =
25 print('Model.forward and matmul equivalence check
NN.verify()
', flag)
26 assert flag
27
28 #
Listing 1. Wrapping a model with splinecam
Each
SplineCam supports custom layers as well.
SplineCam layer requires a submodules to return the
weights, the intersection pattern and activation pattern of
the layer. We refer the reader to our codes for details. The
wrapped SplineCam model contains a verification method,
to ensure that the affine operations and the forward opera-
tions (which can be different from the affine operation based
on implementation, e.g., convolution) of the model result in
the same value for random inputs.
SplineCam can take any set of 2D domains as ROI, with cor-
responding projection matrices. This allows SplineCam to
be used to visualize the partition for piecewise linear sub-
spaces in the input space. The following example shows
how SplineCam computes the partition in a layerwise fash-
ion.
1
2 ## for a given list of polygons in 2D and
corresponding projection matrices
3
4 Abw = T
5 out_cyc = poly
6
7 for current_layer in range(1,len(NN.layers)):
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 #
## given a set of 2D regions and a target
layer, find all new regions in 2D
out_cyc,out_idx = splinecam.graph.
to_next_layer_partition(
cycles = out_cyc,
Abw = Abw,
NN = NN,
current_layer = current_layer,
)
## acquire region centroids
means = splinecam.utils.get_region_means(
out_cyc)
## pass each region centroid to next layer
means = NN.layers[:current_layer].forward(
means)
## get activation mask for each region
q = NN.layers[current_layer].
get_activation_pattern(means)
## query network weights
Wb =
NN.layers[current_layer].get_weights()
## calculate affine parameters per region
Abw = splinecam.utils.get_Abw(
q = q,
Wb = Wb.to_dense(),
incoming_Abw = Abw)
Listing 2. Modular code for computing spline partition
of
key
algorithms
the
One
the
to next layer partition(.)
the
search algorithm that allows us to find cycles from a given
graph. The following codeblock presents a pseudocode of
our heuristic breadth first search method.
function is
in
1
2 from graph_tool import topology
3
4 def find_cycles(V=input_graph,start_edge=
input_edge):
'''
Given a undirected graph and a starting edge
find cycles from that edge
'''
5
6
7
8
10
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## Convert V to a bidirectional graph. This
allows us to control
## the number of traversals for each edge
V = convert_to_bidirectional(V)
edge_q.append(start_edge)
## if edge is a boundary edge
V.remove_edge(start_edge)
out_cycles = []
for e in edge_q:
remove_q = []
vertices = []
vertex_id = []
## if no way out of v0 or no way in for
v1, continue
if not (V.get_in_degrees(e.vertex1)>1
) and (
V.get_out_degrees(e.vertex0)>1):
continue
## if the edge doesn't exist, continue
if V.edge(e) is None and V.edge(e.vertex1
,e.vertex0) is None:
continue
## add opposite path to removal queue
remove_q.append(V.edge(e.vertex1,
e.vertex0)))
## bfs
vs,es = topology.shortest_path(V,
source=e.vertex0,
target=e.vertex1,
)
out_cycles.append([V.vertex_index[each]
for each in vs])
for new_e in es:
## if boundary edge remove edges in
both directions
if V.ep['layer'][new_e] == -1:
remove_q.append(new_e)
remove_q.append(V.edge(new_e.
vertex1,new_e.vertex0))
else:
## remove only one direction and
append to queue
remove_q.append(new_e)
edge_q.append(new_e)
for each in remove_q:
V.remove_edge(each)
return out_cycles
Listing 3.
undirected graph
Pseudocode function for finding cycles given a
11
|
|
http://arxiv.org/abs/2302.12826v1 | 2023-02-24T18:59:13 | 2023-02-24T18:59:13 | Permutation-Invariant Set Autoencoders with Fixed-Size Embeddings for
Multi-Agent Learning | The problem of permutation-invariant learning over set representations is
particularly relevant in the field of multi-agent systems -- a few potential
applications include unsupervised training of aggregation functions in graph
neural networks (GNNs), neural cellular automata on graphs, and prediction of
scenes with multiple objects. Yet existing approaches to set encoding and
decoding tasks present a host of issues, including non-permutation-invariance,
fixed-length outputs, reliance on iterative methods, non-deterministic outputs,
computationally expensive loss functions, and poor reconstruction accuracy. In
this paper we introduce a Permutation-Invariant Set Autoencoder (PISA), which
tackles these problems and produces encodings with significantly lower
reconstruction error than existing baselines. PISA also provides other
desirable properties, including a similarity-preserving latent space, and the
ability to insert or remove elements from the encoding. After evaluating PISA
against baseline methods, we demonstrate its usefulness in a multi-agent
application. Using PISA as a subcomponent, we introduce a novel GNN
architecture which serves as a generalised communication scheme, allowing
agents to use communication to gain full observability of a system. | [
"Ryan Kortvelesy",
"Steven Morad",
"Amanda Prorok"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12826v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12826v1",
"@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.MA"
] | Permutation-Invariant Set Autoencoders with Fixed-Size
Embeddings for Multi-Agent Learning
Steven Morad
University of Cambridge
Cambridge, United Kingdom
[email protected]
Ryan Kortvelesy
University of Cambridge
Cambridge, United Kingdom
[email protected]
Amanda Prorok
University of Cambridge
Cambridge, United Kingdom
[email protected]
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
6
2
8
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
The problem of permutation-invariant learning over set representa-
tions is particularly relevant in the field of multi-agent systems-a
few potential applications include unsupervised training of aggre-
gation functions in graph neural networks (GNNs), neural cellular
automata on graphs, and prediction of scenes with multiple objects.
Yet existing approaches to set encoding and decoding tasks present a
host of issues, including non-permutation-invariance, fixed-length
outputs, reliance on iterative methods, non-deterministic outputs,
computationally expensive loss functions, and poor reconstruction
accuracy. In this paper we introduce a Permutation-Invariant Set
Autoencoder (PISA), which tackles these problems and produces en-
codings with significantly lower reconstruction error than existing
baselines. PISA also provides other desirable properties, including
a similarity-preserving latent space, and the ability to insert or
remove elements from the encoding. After evaluating PISA against
baseline methods, we demonstrate its usefulness in a multi-agent
application. Using PISA as a subcomponent, we introduce a novel
GNN architecture which serves as a generalised communication
scheme, allowing agents to use communication to gain full observ-
ability of a system.
KEYWORDS
Set; Autoencoder; Graph Neural Network; Multi-Agent Systems
1 INTRODUCTION
Over time, machine learning research has placed an increasing
emphasis on utilising relational inductive biases [2]. By focusing
on the underlying relationships in graph structured data, it has
become possible to create models with superior performance and
generalisation. These models are particularly useful in multi-agent
learning, where most data is structured as a graph. For example,
graph neural networks (GNNs) are used to learn communication
amongst a variable number of neighbours [8, 12], graph pooling
is used to facilitate value factorisation in a variable-sized system
of agents [9, 15], and set encoders are used to classify a variable
number of observations (such as pointclouds) [14, 22].
While there are many architectures suited for encoding variable-
sized sets of elements, there is a lack of methods that can be used
to decode sets. Consequently, tasks that require models that can
encode and decode sets represent an underexplored field within
multi-agent learning. One potential application for set autoencoders
in this domain is learning encoders and communication schemes
in an unsupervised manner. This is particularly useful in multi-
agent reinforcement learning (MARL), where the task of learning
these functions with just the reward signal represents a significant
bottleneck with respect to sample efficiency [11].
For a set autoencoder to be useful in a multi-agent context, it
must satisfy several properties. First, it must have a low reconstruc-
tion error-the primary purpose of the model is to preserve the in-
formation being encoded. Second, it must be permutation-invariant.
There is no inherent ordering of agents in a system or edges in a
graph, so the model should generalise across all possible permuta-
tions of inputs. Finally, it should have a similarity-preserving latent
space. It is desirable for similar inputs to produce similar embed-
dings, as it is more robust to noise and it enables generalisation to
novel inputs (via interpolation by a continuous function).
Unfortunately, the few existing approaches which tackle the
task of set autoencoding exhibit an array of problems, including
non-permutation-invariance [4, 19], fixed-length outputs [23], re-
liance on iterative methods [23], non-deterministic outputs [10],
and computationally expensive loss functions [10, 23]. Even more
importantly, these methods exhibit a relatively high reconstruction
error in our experiments.
In this paper, we present a novel set autoencoder model which ad-
dresses these issues. In contrast to existing methods, our approach
operates on the principle of using key-value pairs to encode and
decode elements. It also does not require solving an optimisation
problem in the loss function which calculates the minimum assign-
ment between input and output elements. We also demonstrate
these advantages experimentally, showing that our method can
encode and decode sets with a lower reconstruction error than
current state-of-the-art methods.
To evaluate our model, we demonstrate its usefulness in two
multi-agent learning problems. In our first experiment, we evaluate
our set autoencoder against baselines on the task of random set
encoding and reconstruction. In the multi-agent domain, a solution
to this task constitutes a method for aggregating elements in a
manner which minimises the loss of information (which can be
used as an aggregation function for neighbours' messages at the
agent level, or as a graph pooling layer at the global level). In our
second experiment, we tackle the problem of combining the states of
agents with partial observability through communication to obtain
global observability. Within our solution, we define a novel GNN
architecture which leverages our set autoencoder as its internal
mechanism.
Contributions.
• We present PISA, a novel, permutation-invariant set autoen-
coder architecture which exhibits significantly lower recon-
struction error than existing methods.
• Our method preserves similarity in the latent space. We anal-
yse the effect of interpolating in the latent space, showing
that our method smoothly transitions between the initial
and target sets, while most other methods do not.
(a) Set Encoder
(b) Set Decoder
Figure 1: The full set autoencoder architecture. In this schema, the blue modules are learned networks, the green modules
are mathematical operations (sum and element-wise product), and the red modules are other non-learned operations. (a) The
encoder first assigns keys to values according to a deterministic criterion ρ. Then, it encodes the values with ψval and the keys
with ψkey, mapping both to Rdz . Each element is inserted by adding the element-wise product of the encoded key and value to
the latent state. The cardinality of the set is also encoded by adding λenc (n) to the embedding. (b) The decoder first predicts the
cardinality of the set with λdec. Next, it produces ˆn keys in the same manner as the encoder, and transforms them into queries
in Rdz with φkey. Each of these queries is element-wise multiplied by the hidden state to produce an element-specific encoding.
Finally, φdec transforms these encodings into the reconstructed set.
• Unlike the baselines, our method allows elements to be in-
serted or removed from the latent state after it has been ini-
tially encoded, enabling transforms within the latent space.
• We use PISA as a component in a novel GNN which serves
as an application-agnostic communication scheme for multi-
agent systems.
2 RELATED WORK
Permutation-invariant set autoencoders have become popular with
the recent development of Deep Sets [22] and to a lesser extent,
graph neural networks [7] (GNNs). Both are permutation invariant,
allowing them to serve as general models for handling variable-
sized, unordered data. Methods like Featurewise Sort Pooling (FSPool),
Deep Set Prediction Networks (DSPN), and Transformer Set Predic-
tion Networks (TSPN) maintain permutation invariance by using
elements from Deep Set theory.
FSPool [24] encodes a set of elements X = {x1, . . . , xn } into a
single, fixed-size latent representation z. It sorts the inputs elements
along the feature axis, applies a linear transform, and then sums
them together to produce a single embedding z for the set. The
authors also propose an FSPool decoder, which maps the embedding
z into a prediction of the input set ˆX = { ˆx1, . . . , ˆxn }. Their decoder
unpools z using a linear transformation, and unsorts the unpooled
vectors using a differentiable sorting network. FSPool maps xi to
ˆxi via the sort and unsort operations.
The authors of DSPN find that the FSPool decoder is insufficent
for solving even simple tasks [23]. They use FSPool in the encoder,
but replace the decoder with an iterative method. Starting with
an initial guess ˆX (0) , ˆX (t ) is iteratively updated for T iterations,
∂ L ( ˆX (t ) ,z)
following the gradient of −
. That is, the output set is
∂ ˆX (t )
updated until its encoding matches a given latent state. Note that
because DSPN is an iterative method, its inference speed is slow.
Furthermore, it learns a domain-specific initial ˆX (0) , causing the
number of parameters to scale with the size of the largest set. While
DSPN can be modified to accommodate variable-size sets by predict-
ing masks, the prediction size is limited by the size of ˆX (0) . DSPN
also requires each ˆxi to be mapped to each xi in order to compute
the training loss. This mapping is computed by the Chamfer algo-
rithm (O (n2)) for large sets, and the Hungarian algorithm (O (n3))
for small sets.
TSPN improves upon DSPN by replacing the iterative decoder
with a single pass of a transformer. TSPN samples ˆX (0) from a
learned normal distribution, decoupling the number of parame-
ters from the largest set size, but making the predictions non-
deterministic. Sampled latent representations ˆX (0) are concate-
nated along the feature dimension with an embedding z = ψ (X).
The resulting set of vectors { ˆx (0)
|| z | i ∈ [1..n]} are fed to the
i
transformer, which produces the prediction ˆX. Similar to DSPN,
TSPN uses the Chamfer and Hungarian matching algorithms in its
loss function to compute a correspondence between elements in
the input set and the predicted set.
Other related work (excluding DSPN, TSPN, and FSPool) tends
to break either fixed-size latent representation or permutation in-
variance constraints. Generalized autoencoders [20] project a set
of n inputs into a set of n latent states. This precludes their use in
many interesting tasks, such as composition with other modules
(e.g. passing the full set representation through an MLP).
Sequence to sequence models encode ordered sequences of in-
puts and decode ordered sequences of outputs, and consequently
are not permutation invariant. However, prior work [13] sometimes
treats sets as sequences with varying success, utilising models like
Gated Recurrent Unit (GRU) [3].
Linear transformers constitute another form of sequence-to-
sequence model, which become permutation invariant when the
positional encoding is omitted [5, 16]. These approaches map a
set to key, value, and query vectors. They produce a fixed-size
attention matrix by summing the outer products of each key and
value pair. Then, an output is produced by computing the inner
product between the attention matrix and query. Unfortunately, this
<latexit sha1_base64="i2ylX6EPy0B9TTkWbd87f4qm25g=">AAAB63icbVDLSgNBEOyNrxhfUY9eBoPgKeyKqMegF48RzAOSJcxOZrND5rHMzAoh5Be8eFDEqz/kzb9xNtmDJhY0FFXddHdFKWfG+v63V1pb39jcKm9Xdnb39g+qh0dtozJNaIsornQ3woZyJmnLMstpN9UUi4jTTjS+y/3OE9WGKfloJykNBR5JFjOCbS71daIG1Zpf9+dAqyQoSA0KNAfVr/5QkUxQaQnHxvQCP7XhFGvLCKezSj8zNMVkjEe056jEgppwOr91hs6cMkSx0q6kRXP198QUC2MmInKdAtvELHu5+J/Xy2x8E06ZTDNLJVksijOOrEL542jINCWWTxzBRDN3KyIJ1phYF0/FhRAsv7xK2hf14Kp++XBZa9wWcZThBE7hHAK4hgbcQxNaQCCBZ3iFN094L96797FoLXnFzDH8gff5AyKajlA=</latexit>⇢<latexit sha1_base64="iO6UV/dWjdRX2nJoiXZZCKEYEP8=">AAACHXicbVDLSgMxFM34rOOr6tJNsAiuykwp6rLoxmUF+4BOKZnMbRuayQxJpliG/ogbf8WNC0VcuBH/xkw7grYeSDg591xy7/FjzpR2nC9rZXVtfWOzsGVv7+zu7RcPDpsqSiSFBo14JNs+UcCZgIZmmkM7lkBCn0PLH11n9dYYpGKRuNOTGLohGQjWZ5RoI/WKVc+HARNpSLRk91NbYM+z3ezyxkGkVcYqsyeI4MfVK5acsjMDXiZuTkooR71X/PCCiCYhCE05UarjOrHupkRqRjlMbS9REBM6IgPoGCpICKqbzrab4lOjBLgfSXOExjP1d0dKQqUmoW+cZr6hWqxl4n+1TqL7l92UiTjRIOj8o37CsY5wFhUOmASq+cQQQiUzs2I6JJJQbQK1TQju4srLpFkpu+fl6m21VLvK4yigY3SCzpCLLlAN3aA6aiCKHtATekGv1qP1bL1Z73PripX3HKE/sD6/ASMJoLk=</latexit>n1...2<latexit sha1_base64="hIJ3UguGNBKQQfpLRA4TDZjQN/c=">AAAB/3icbVBNS8NAEN34WetXVfDiJVgETyWRoh6LXjxWsB/QhLDZTtulm03YnYgh9uBf8eJBEa/+DW/+G7cfB219MPB4b4aZeWEiuEbH+baWlldW19YLG8XNre2d3dLeflPHqWLQYLGIVTukGgSX0ECOAtqJAhqFAlrh8Hrst+5BaR7LO8wS8CPal7zHGUUjBaVDL9E88BAeMPeQyywfQjYaBaWyU3EmsBeJOyNlMkM9KH153ZilEUhkgmrdcZ0E/Zwq5EzAqOilGhLKhrQPHUMljUD7+eT+kX1ilK7di5UpifZE/T2R00jrLApNZ0RxoOe9sfif10mxd+nnXCYpgmTTRb1U2Bjb4zDsLlfAUGSGUKa4udVmA6ooQxNZ0YTgzr+8SJpnFfe8Ur2tlmtXszgK5Igck1PikgtSIzekThqEkUfyTF7Jm/VkvVjv1se0dcmazRyQP7A+fwB9pZcR</latexit> key<latexit sha1_base64="5u4VQsetojCXzD67jkQyqzcs+HA=">AAAB/3icbVDLSsNAFJ3UV62vqODGTbAIrkoiRV0W3bisYB/QhDCZTtqhk0mYuSmGmIW/4saFIm79DXf+jdPHQlsPXDiccy/33hMknCmw7W+jtLK6tr5R3qxsbe/s7pn7B20Vp5LQFol5LLsBVpQzQVvAgNNuIimOAk47wehm4nfGVCoWi3vIEupFeCBYyAgGLfnmkZso5rtAHyB3gYksH2NeFL5ZtWv2FNYyceakiuZo+uaX249JGlEBhGOleo6dgJdjCYxwWlTcVNEEkxEe0J6mAkdUefn0/sI61UrfCmOpS4A1VX9P5DhSKosC3RlhGKpFbyL+5/VSCK+8nIkkBSrIbFGYcgtiaxKG1WeSEuCZJphIpm+1yBBLTEBHVtEhOIsvL5P2ec25qNXv6tXG9TyOMjpGJ+gMOegSNdAtaqIWIugRPaNX9GY8GS/Gu/Exay0Z85lD9AfG5w90k5cL</latexit> val<latexit sha1_base64="JkOl49FuBA//quzJ8YicZaJLIo0=">AAAB73icbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48V7Ae0oWw2m3bpJht3J0Ip/RNePCji1b/jzX/jts1BWx8MPN6bYWZekEph0HW/ncLa+sbmVnG7tLO7t39QPjxqGZVpxptMSaU7ATVcioQ3UaDknVRzGgeSt4PR7cxvP3FthEoecJxyP6aDRESCUbRSpxeIgQoV9ssVt+rOQVaJl5MK5Gj0y1+9ULEs5gkySY3pem6K/oRqFEzyaamXGZ5SNqID3rU0oTE3/mR+75ScWSUkkdK2EiRz9ffEhMbGjOPAdsYUh2bZm4n/ed0Mo2t/IpI0Q56wxaIokwQVmT1PQqE5Qzm2hDIt7K2EDammDG1EJRuCt/zyKmldVL3Lau2+Vqnf5HEU4QRO4Rw8uII63EEDmsBAwjO8wpvz6Lw4787HorXg5DPH8AfO5w80FJAX</latexit>K<latexit sha1_base64="TTTPNSS8rWR0anlLIFEO/mYKbBE=">AAAB63icbVDLSgNBEOyNrxhfUY9eBoPgKeyKqMegF48RzAOSJcxOZpMhM7PLPISw5Be8eFDEqz/kzb9xNtmDJhY0FFXddHdFKWfa+P63V1pb39jcKm9Xdnb39g+qh0dtnVhFaIskPFHdCGvKmaQtwwyn3VRRLCJOO9HkLvc7T1RplshHM01pKPBIspgRbHKpr60YVGt+3Z8DrZKgIDUo0BxUv/rDhFhBpSEca90L/NSEGVaGEU5nlb7VNMVkgke056jEguowm986Q2dOGaI4Ua6kQXP190SGhdZTEblOgc1YL3u5+J/Xsya+CTMmU2uoJItFseXIJCh/HA2ZosTwqSOYKOZuRWSMFSbGxVNxIQTLL6+S9kU9uKpfPlzWGrdFHGU4gVM4hwCuoQH30IQWEBjDM7zCmye8F+/d+1i0lrxi5hj+wPv8ATTZjlw=</latexit>X<latexit sha1_base64="OB8kQ4Gk2x8IarQTNqx2eXgre8k=">AAAB83icbVDLSgNBEOyNrxhfUY9eBoPgKexKUI9BLx4jmAckS5idnU2GzM4uM71iWPIbXjwo4tWf8ebfOHkcNLGgoajqprsrSKUw6LrfTmFtfWNzq7hd2tnd2z8oHx61TJJpxpsskYnuBNRwKRRvokDJO6nmNA4kbwej26nffuTaiEQ94DjlfkwHSkSCUbRST5EeipgbEvaf+uWKW3VnIKvEW5AKLNDol796YcKymCtkkhrT9dwU/ZxqFEzySamXGZ5SNqID3rVUUbvIz2c3T8iZVUISJdqWQjJTf0/kNDZmHAe2M6Y4NMveVPzP62YYXfu5UGmGXLH5oiiTBBMyDYCEQnOGcmwJZVrYWwkbUk0Z2phKNgRv+eVV0rqoepfV2n2tUr9ZxFGEEziFc/DgCupwBw1oAoMUnuEV3pzMeXHenY95a8FZzBzDHzifP42kkWI=</latexit>n⇥dx<latexit sha1_base64="noMTON/pEgk714di0qWw44wSyik=">AAACI3icbVDLSgMxFM34rOOr6tJNsAiuykwpKq6KblxWsA/oDCWTuW1DM5khyZSWof/ixl9x40Ipblz4L6YPQVsPhHs4515y7wkSzpR2nE9rbX1jc2s7t2Pv7u0fHOaPjusqTiWFGo15LJsBUcCZgJpmmkMzkUCigEMj6N9N/cYApGKxeNSjBPyIdAXrMEq0kdr5Gy+ALhNZRLRkw7E9bLvY80wpTYs3CGOt5oKYCSDCn952vuAUnRnwKnEXpIAWqLbzEy+MaRqB0JQTpVquk2g/I1IzymFse6mChNA+6ULLUEEiUH42u3GMz40S4k4szRMaz9TfExmJlBpFgek0+/XUsjcV//Naqe5c+xkTSapB0PlHnZRjHeNpYDhkEqjmI0MIlczsimmPSEK1idU2IbjLJ6+SeqnoXhbLD+VC5XYRRw6dojN0gVx0hSroHlVRDVH0hF7QG3q3nq1Xa2J9zFvXrMXMCfoD6+sbUJOjeg==</latexit>x1x2...xn<latexit sha1_base64="Q3ZFHU8Hsd5v0kzobS0LsgWpHuE=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF49V7Ae0oWy2m3bpZhN2J0IJ/QdePCji1X/kzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmTjVjDdZLGPdCajhUijeRIGSdxLNaRRI3g7GtzO//cS1EbF6xEnC/YgOlQgFo2ilh17WL1fcqjsHWSVeTiqQo9Evf/UGMUsjrpBJakzXcxP0M6pRMMmnpV5qeELZmA5511JFI278bH7plJxZZUDCWNtSSObq74mMRsZMosB2RhRHZtmbif953RTDaz8TKkmRK7ZYFKaSYExmb5OB0JyhnFhCmRb2VsJGVFOGNpySDcFbfnmVtC6q3mW1dl+r1G/yOIpwAqdwDh5cQR3uoAFNYBDCM7zCmzN2Xpx352PRWnDymWP4A+fzB55yjW4=</latexit>{<latexit sha1_base64="Q3ZFHU8Hsd5v0kzobS0LsgWpHuE=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF49V7Ae0oWy2m3bpZhN2J0IJ/QdePCji1X/kzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmTjVjDdZLGPdCajhUijeRIGSdxLNaRRI3g7GtzO//cS1EbF6xEnC/YgOlQgFo2ilh17WL1fcqjsHWSVeTiqQo9Evf/UGMUsjrpBJakzXcxP0M6pRMMmnpV5qeELZmA5511JFI278bH7plJxZZUDCWNtSSObq74mMRsZMosB2RhRHZtmbif953RTDaz8TKkmRK7ZYFKaSYExmb5OB0JyhnFhCmRb2VsJGVFOGNpySDcFbfnmVtC6q3mW1dl+r1G/yOIpwAqdwDh5cQR3uoAFNYBDCM7zCmzN2Xpx352PRWnDymWP4A+fzB55yjW4=</latexit>{<latexit sha1_base64="VcduhImtG31xtIwCRH/3qEwy95Y=">AAAB6HicbVDLTgJBEOzFF+IL9ehlIjHxRHYNUY9ELx4hkUcCGzI79MLI7OxmZtYECV/gxYPGePWTvPk3DrAHBSvppFLVne6uIBFcG9f9dnJr6xubW/ntws7u3v5B8fCoqeNUMWywWMSqHVCNgktsGG4EthOFNAoEtoLR7cxvPaLSPJb3ZpygH9GB5CFn1Fip/tQrltyyOwdZJV5GSpCh1it+dfsxSyOUhgmqdcdzE+NPqDKcCZwWuqnGhLIRHWDHUkkj1P5kfuiUnFmlT8JY2ZKGzNXfExMaaT2OAtsZUTPUy95M/M/rpCa89idcJqlByRaLwlQQE5PZ16TPFTIjxpZQpri9lbAhVZQZm03BhuAtv7xKmhdl77JcqVdK1ZssjjycwCmcgwdXUIU7qEEDGCA8wyu8OQ/Oi/PufCxac042cwx/4Hz+AOwvjQc=</latexit>z<latexit sha1_base64="9ddWfsD8vIZnnrpTg815gGw3f8A=">AAAB83icbVDLSgNBEOyNrxhfUY9eBoPgKexKUI9BLx4jmAckS5idnU2GzM4uM71CXPIbXjwo4tWf8ebfOHkcNLGgoajqprsrSKUw6LrfTmFtfWNzq7hd2tnd2z8oHx61TJJpxpsskYnuBNRwKRRvokDJO6nmNA4kbwej26nffuTaiEQ94DjlfkwHSkSCUbRST5EeipgbEvaf+uWKW3VnIKvEW5AKLNDol796YcKymCtkkhrT9dwU/ZxqFEzySamXGZ5SNqID3rVUUbvIz2c3T8iZVUISJdqWQjJTf0/kNDZmHAe2M6Y4NMveVPzP62YYXfu5UGmGXLH5oiiTBBMyDYCEQnOGcmwJZVrYWwkbUk0Z2phKNgRv+eVV0rqoepfV2n2tUr9ZxFGEEziFc/DgCupwBw1oAoMUnuEV3pzMeXHenY95a8FZzBzDHzifP5CskWQ=</latexit>n⇥dz<latexit sha1_base64="9ddWfsD8vIZnnrpTg815gGw3f8A=">AAAB83icbVDLSgNBEOyNrxhfUY9eBoPgKexKUI9BLx4jmAckS5idnU2GzM4uM71CXPIbXjwo4tWf8ebfOHkcNLGgoajqprsrSKUw6LrfTmFtfWNzq7hd2tnd2z8oHx61TJJpxpsskYnuBNRwKRRvokDJO6nmNA4kbwej26nffuTaiEQ94DjlfkwHSkSCUbRST5EeipgbEvaf+uWKW3VnIKvEW5AKLNDol796YcKymCtkkhrT9dwU/ZxqFEzySamXGZ5SNqID3rVUUbvIz2c3T8iZVUISJdqWQjJTf0/kNDZmHAe2M6Y4NMveVPzP62YYXfu5UGmGXLH5oiiTBBMyDYCEQnOGcmwJZVrYWwkbUk0Z2phKNgRv+eVV0rqoepfV2n2tUr9ZxFGEEziFc/DgCupwBw1oAoMUnuEV3pzMeXHenY95a8FZzBzDHzifP5CskWQ=</latexit>n⇥dz<latexit sha1_base64="9ddWfsD8vIZnnrpTg815gGw3f8A=">AAAB83icbVDLSgNBEOyNrxhfUY9eBoPgKexKUI9BLx4jmAckS5idnU2GzM4uM71CXPIbXjwo4tWf8ebfOHkcNLGgoajqprsrSKUw6LrfTmFtfWNzq7hd2tnd2z8oHx61TJJpxpsskYnuBNRwKRRvokDJO6nmNA4kbwej26nffuTaiEQ94DjlfkwHSkSCUbRST5EeipgbEvaf+uWKW3VnIKvEW5AKLNDol796YcKymCtkkhrT9dwU/ZxqFEzySamXGZ5SNqID3rVUUbvIz2c3T8iZVUISJdqWQjJTf0/kNDZmHAe2M6Y4NMveVPzP62YYXfu5UGmGXLH5oiiTBBMyDYCEQnOGcmwJZVrYWwkbUk0Z2phKNgRv+eVV0rqoepfV2n2tUr9ZxFGEEziFc/DgCupwBw1oAoMUnuEV3pzMeXHenY95a8FZzBzDHzifP5CskWQ=</latexit>n⇥dz<latexit sha1_base64="KiLEtGqJ4dwA5urdFrxImSAPHbg=">AAAB83icbVDLSgNBEOyNrxhfUY9eBoPgKexKUI9BLx4jmAdklzA7O5sMmX0w0yvEJb/hxYMiXv0Zb/6Nk2QPmljQUFR1093lp1JotO1vq7S2vrG5Vd6u7Ozu7R9UD486OskU422WyET1fKq5FDFvo0DJe6niNPIl7/rj25nffeRKiyR+wEnKvYgOYxEKRtFIrkNcFBHXJBg8Dao1u27PQVaJU5AaFGgNql9ukLAs4jEySbXuO3aKXk4VCib5tOJmmqeUjemQ9w2NqVnk5fObp+TMKAEJE2UqRjJXf0/kNNJ6EvmmM6I40sveTPzP62cYXnu5iNMMecwWi8JMEkzILAASCMUZyokhlClhbiVsRBVlaGKqmBCc5ZdXSeei7lzWG/eNWvOmiKMMJ3AK5+DAFTThDlrQBgYpPMMrvFmZ9WK9Wx+L1pJVzBzDH1ifPzGZkSc=</latexit>1⇥dz<latexit sha1_base64="KiLEtGqJ4dwA5urdFrxImSAPHbg=">AAAB83icbVDLSgNBEOyNrxhfUY9eBoPgKexKUI9BLx4jmAdklzA7O5sMmX0w0yvEJb/hxYMiXv0Zb/6Nk2QPmljQUFR1093lp1JotO1vq7S2vrG5Vd6u7Ozu7R9UD486OskU422WyET1fKq5FDFvo0DJe6niNPIl7/rj25nffeRKiyR+wEnKvYgOYxEKRtFIrkNcFBHXJBg8Dao1u27PQVaJU5AaFGgNql9ukLAs4jEySbXuO3aKXk4VCib5tOJmmqeUjemQ9w2NqVnk5fObp+TMKAEJE2UqRjJXf0/kNNJ6EvmmM6I40sveTPzP62cYXnu5iNMMecwWi8JMEkzILAASCMUZyokhlClhbiVsRBVlaGKqmBCc5ZdXSeei7lzWG/eNWvOmiKMMJ3AK5+DAFTThDlrQBgYpPMMrvFmZ9WK9Wx+L1pJVzBzDH1ifPzGZkSc=</latexit>1⇥dz<latexit sha1_base64="E7yHiJYAhS7+y4Vp11K8FmODLqw=">AAACBXicbVBPS8MwHE3nvzn/VT3qITgET6OVoR6HXjxOcHOwlpKm2RaWpCVJhVF68eJX8eJBEa9+B29+G9Pag24+CDze+/3I770wYVRpx/myakvLK6tr9fXGxubW9o69u9dXcSox6eGYxXIQIkUYFaSnqWZkkEiCeMjIXTi9Kvy7eyIVjcWtniXE52gs6IhipI0U2IceM8MRCjyO9ETyzFMcMZYRgfM8sJtOyykBF4lbkSao0A3sTy+KccqJ0JghpYauk2g/Q1JTzEje8FJFEoSnaEyGhgrEifKzMkUOj40SwVEszRMalurvjQxxpWY8NJPFrWreK8T/vGGqRxd+RkWS6iJW+dEoZVDHsKgERlQSrNnMEIQlNbdCPEESYW2Ka5gS3PnIi6R/2nLPWu2bdrNzWdVRBwfgCJwAF5yDDrgGXdADGDyAJ/ACXq1H69l6s95/RmtWtbMP/sD6+AbFWplo</latexit> enc<latexit sha1_base64="kuvqsFNbjEvULVMnkk4XIG+iKgw=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlpuyXK27VnYOsEi8nFcjR6Je/eoOYpRFKwwTVuuu5ifEzqgxnAqelXqoxoWxMh9i1VNIItZ/ND52SM6sMSBgrW9KQufp7IqOR1pMosJ0RNSO97M3E/7xuasJrP+MySQ1KtlgUpoKYmMy+JgOukBkxsYQyxe2thI2ooszYbEo2BG/55VXSvqh6l9Vas1ap3+RxFOEETuEcPLiCOtxBA1rAAOEZXuHNeXRenHfnY9FacPKZY/gD5/MH2f+M+w==</latexit>n<latexit sha1_base64="7POxo7vFgrBtvWmL4OJ79dcm+1k=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlZrdfrrhVdw6ySrycVCBHo1/+6g1ilkYoDRNU667nJsbPqDKcCZyWeqnGhLIxHWLXUkkj1H42P3RKzqwyIGGsbElD5urviYxGWk+iwHZG1Iz0sjcT//O6qQmv/YzLJDUo2WJRmApiYjL7mgy4QmbExBLKFLe3EjaiijJjsynZELzll1dJ+6LqXVZrzVqlfpPHUYQTOIVz8OAK6nAHDWgBA4RneIU359F5cd6dj0VrwclnjuEPnM8fvTOM6A==</latexit>[<latexit sha1_base64="2HNR7gFizcQTjs+XSXx/gpL675s=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlpt8vV9yqOwdZJV5OKpCj0S9/9QYxSyOUhgmqdddzE+NnVBnOBE5LvVRjQtmYDrFrqaQRaj+bHzolZ1YZkDBWtqQhc/X3REYjrSdRYDsjakZ62ZuJ/3nd1ITXfsZlkhqUbLEoTAUxMZl9TQZcITNiYgllittbCRtRRZmx2ZRsCN7yy6ukfVH1Lqu1Zq1Sv8njKMIJnMI5eHAFdbiDBrSAAcIzvMKb8+i8OO/Ox6K14OQzx/AHzucPwDuM6g==</latexit>]<latexit sha1_base64="XVshIbxFNr0zStsvhy0ERmzlsgc=">AAACO3icbVA9T8MwEHX4JnwVGFksKiSmKkEIGBEsjIAordRUleNcWwvHiexLRRXlf7HwJ9hYWBhAiJUdtxRUKE+y9PzenX33wlQKg5736ExNz8zOzS8sukvLK6trpfWNa5NkmkOVJzLR9ZAZkEJBFQVKqKcaWBxKqIU3pwO/1gNtRKKusJ9CM2YdJdqCM7RSq3QZhNARKo8ZanFbuEGXYX5btPIhUUVBg+BH9O2FukEvStCM63tuACr6fqNVKnsVbwg6SfwRKZMRzlulhyBKeBaDQi6ZMQ3fS7GZM42CS7AzZQZSxm9YBxqWKhaDaebD3Qu6Y5WIthNtj0I6VMc7chYb049DW2nn65q/3kD8z2tk2D5q5kKlGYLiXx+1M0kxoYMgaSQ0cJR9SxjXws5KeZdpxtHG7doQ/L8rT5LrvYp/UNm/2C8fn4ziWCBbZJvsEp8ckmNyRs5JlXByR57IC3l17p1n5815/yqdckY9m+QXnI9PfaSu7g==</latexit>ˆxˆnˆx1...ˆx2<latexit sha1_base64="VcduhImtG31xtIwCRH/3qEwy95Y=">AAAB6HicbVDLTgJBEOzFF+IL9ehlIjHxRHYNUY9ELx4hkUcCGzI79MLI7OxmZtYECV/gxYPGePWTvPk3DrAHBSvppFLVne6uIBFcG9f9dnJr6xubW/ntws7u3v5B8fCoqeNUMWywWMSqHVCNgktsGG4EthOFNAoEtoLR7cxvPaLSPJb3ZpygH9GB5CFn1Fip/tQrltyyOwdZJV5GSpCh1it+dfsxSyOUhgmqdcdzE+NPqDKcCZwWuqnGhLIRHWDHUkkj1P5kfuiUnFmlT8JY2ZKGzNXfExMaaT2OAtsZUTPUy95M/M/rpCa89idcJqlByRaLwlQQE5PZ16TPFTIjxpZQpri9lbAhVZQZm03BhuAtv7xKmhdl77JcqVdK1ZssjjycwCmcgwdXUIU7qEEDGCA8wyu8OQ/Oi/PufCxac042cwx/4Hz+AOwvjQc=</latexit>z<latexit sha1_base64="JkOl49FuBA//quzJ8YicZaJLIo0=">AAAB73icbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48V7Ae0oWw2m3bpJht3J0Ip/RNePCji1b/jzX/jts1BWx8MPN6bYWZekEph0HW/ncLa+sbmVnG7tLO7t39QPjxqGZVpxptMSaU7ATVcioQ3UaDknVRzGgeSt4PR7cxvP3FthEoecJxyP6aDRESCUbRSpxeIgQoV9ssVt+rOQVaJl5MK5Gj0y1+9ULEs5gkySY3pem6K/oRqFEzyaamXGZ5SNqID3rU0oTE3/mR+75ScWSUkkdK2EiRz9ffEhMbGjOPAdsYUh2bZm4n/ed0Mo2t/IpI0Q56wxaIokwQVmT1PQqE5Qzm2hDIt7K2EDammDG1EJRuCt/zyKmldVL3Lau2+Vqnf5HEU4QRO4Rw8uII63EEDmsBAwjO8wpvz6Lw4787HorXg5DPH8AfO5w80FJAX</latexit>K<latexit sha1_base64="CNwEVGM4K+8S46iEyvjokL3etF0=">AAAB/3icbVBNS8NAEN34WetXVPDiJVgETyWRoh6LXjxWsB/QlLLZTtulm03YnYgh5uBf8eJBEa/+DW/+G7cfB219MPB4b4aZeUEsuEbX/baWlldW19YLG8XNre2dXXtvv6GjRDGos0hEqhVQDYJLqCNHAa1YAQ0DAc1gdD32m/egNI/kHaYxdEI6kLzPGUUjde1DPx7yro/wgJmPXKZZD1ied+2SW3YncBaJNyMlMkOta3/5vYglIUhkgmrd9twYOxlVyJmAvOgnGmLKRnQAbUMlDUF3ssn9uXNilJ7Tj5Qpic5E/T2R0VDrNAxMZ0hxqOe9sfif106wf9nJuIwTBMmmi/qJcDByxmE4Pa6AoUgNoUxxc6vDhlRRhiayognBm395kTTOyt55uXJbKVWvZnEUyBE5JqfEIxekSm5IjdQJI4/kmbySN+vJerHerY9p65I1mzkgf2B9/gA/7Jbp</latexit> dec<latexit sha1_base64="WmIsvmVWdQRhGrDCeCZIihqNwpQ=">AAAB/3icbVBNS8NAEN34WetXVfDiJVgETyWRoh6LXjxWsB/QhLDZTtulm03YnYgh9uBf8eJBEa/+DW/+G7cfB219MPB4b4aZeWEiuEbH+baWlldW19YLG8XNre2d3dLeflPHqWLQYLGIVTukGgSX0ECOAtqJAhqFAlrh8Hrst+5BaR7LO8wS8CPal7zHGUUjBaVDLxnwwEN4wNxDLrN8CNloFJTKTsWZwF4k7oyUyQz1oPTldWOWRiCRCap1x3US9HOqkDMBo6KXakgoG9I+dAyVNALt55P7R/aJUbp2L1amJNoT9fdETiOtsyg0nRHFgZ73xuJ/XifF3qWfc5mkCJJNF/VSYWNsj8Owu1wBQ5EZQpni5labDaiiDE1kRROCO//yImmeVdzzSvW2Wq5dzeIokCNyTE6JSy5IjdyQOmkQRh7JM3klb9aT9WK9Wx/T1iVrNnNA/sD6/AFsKJcG</latexit> key<latexit sha1_base64="lQr3dUdeD4kPXTKj0xpkdekwiS4=">AAAB+3icbVBNS8NAEN3Ur1q/Yj16WSyCp5JIUY9FLx4r2A9oQtlsN+3SzSbsTsQa8le8eFDEq3/Em//GbZuDtj4YeLw3w8y8IBFcg+N8W6W19Y3NrfJ2ZWd3b//APqx2dJwqyto0FrHqBUQzwSVrAwfBeoliJAoE6waTm5nffWBK81jewzRhfkRGkoecEjDSwK56YwKZzLEHPGIaDwdPA7vm1J058CpxC1JDBVoD+8sbxjSNmAQqiNZ910nAz4gCTgXLK16qWULohIxY31BJzCI/m9+e41OjDHEYK1MS8Fz9PZGRSOtpFJjOiMBYL3sz8T+vn0J45WdcJikwSReLwlRgiPEsCDzkilEQU0MIVdzciumYKELBxFUxIbjLL6+Sznndvag37hq15nURRxkdoxN0hlx0iZroFrVQG1H0iJ7RK3qzcuvFerc+Fq0lq5g5Qn9gff4A73aUYg==</latexit>ˆn⇥dz<latexit sha1_base64="lQr3dUdeD4kPXTKj0xpkdekwiS4=">AAAB+3icbVBNS8NAEN3Ur1q/Yj16WSyCp5JIUY9FLx4r2A9oQtlsN+3SzSbsTsQa8le8eFDEq3/Em//GbZuDtj4YeLw3w8y8IBFcg+N8W6W19Y3NrfJ2ZWd3b//APqx2dJwqyto0FrHqBUQzwSVrAwfBeoliJAoE6waTm5nffWBK81jewzRhfkRGkoecEjDSwK56YwKZzLEHPGIaDwdPA7vm1J058CpxC1JDBVoD+8sbxjSNmAQqiNZ910nAz4gCTgXLK16qWULohIxY31BJzCI/m9+e41OjDHEYK1MS8Fz9PZGRSOtpFJjOiMBYL3sz8T+vn0J45WdcJikwSReLwlRgiPEsCDzkilEQU0MIVdzciumYKELBxFUxIbjLL6+Sznndvag37hq15nURRxkdoxN0hlx0iZroFrVQG1H0iJ7RK3qzcuvFerc+Fq0lq5g5Qn9gff4A73aUYg==</latexit>ˆn⇥dz<latexit sha1_base64="lQr3dUdeD4kPXTKj0xpkdekwiS4=">AAAB+3icbVBNS8NAEN3Ur1q/Yj16WSyCp5JIUY9FLx4r2A9oQtlsN+3SzSbsTsQa8le8eFDEq3/Em//GbZuDtj4YeLw3w8y8IBFcg+N8W6W19Y3NrfJ2ZWd3b//APqx2dJwqyto0FrHqBUQzwSVrAwfBeoliJAoE6waTm5nffWBK81jewzRhfkRGkoecEjDSwK56YwKZzLEHPGIaDwdPA7vm1J058CpxC1JDBVoD+8sbxjSNmAQqiNZ910nAz4gCTgXLK16qWULohIxY31BJzCI/m9+e41OjDHEYK1MS8Fz9PZGRSOtpFJjOiMBYL3sz8T+vn0J45WdcJikwSReLwlRgiPEsCDzkilEQU0MIVdzciumYKELBxFUxIbjLL6+Sznndvag37hq15nURRxkdoxN0hlx0iZroFrVQG1H0iJ7RK3qzcuvFerc+Fq0lq5g5Qn9gff4A73aUYg==</latexit>ˆn⇥dz<latexit sha1_base64="PZp63NdXIY2NWk/5dSbuWajeMIM=">AAAB+3icbVBNS8NAEN3Ur1q/Yj16WSyCp5JIUY9FLx4r2A9oQtlsN+3SzSbsTqQl5K948aCIV/+IN/+N2zYHbX0w8Hhvhpl5QSK4Bsf5tkobm1vbO+Xdyt7+weGRfVzt6DhVlLVpLGLVC4hmgkvWBg6C9RLFSBQI1g0md3O/+8SU5rF8hFnC/IiMJA85JWCkgV31xgQymWMPeMQ0Hg6mA7vm1J0F8DpxC1JDBVoD+8sbxjSNmAQqiNZ910nAz4gCTgXLK16qWULohIxY31BJzCI/W9ye43OjDHEYK1MS8EL9PZGRSOtZFJjOiMBYr3pz8T+vn0J442dcJikwSZeLwlRgiPE8CDzkilEQM0MIVdzciumYKELBxFUxIbirL6+TzmXdvao3Hhq15m0RRxmdojN0gVx0jZroHrVQG1E0Rc/oFb1ZufVivVsfy9aSVcycoD+wPn8A7G6UYA==</latexit>ˆn⇥dx<latexit sha1_base64="nTy4U9G9QASFJRtsRiCqlXVe7sg=">AAACBXicbVC7TsMwFHXKq5RXgBEGiwqJqUpQBYwVLIxFog+piSLHcVqrthPZDlIVdWHhV1gYQIiVf2Djb3DaDNByJEtH55wr33vClFGlHefbqqysrq1vVDdrW9s7u3v2/kFXJZnEpIMTlsh+iBRhVJCOppqRfioJ4iEjvXB8U/i9ByIVTcS9nqTE52goaEwx0kYK7GOPmXCEAo8jPZI89xRHjOURwdNpYNedhjMDXCZuSeqgRDuwv7wowRknQmOGlBq4Tqr9HElNMSPTmpcpkiI8RkMyMFQgTpSfz66YwlOjRDBOpHlCw5n6eyJHXKkJD02y2FUteoX4nzfIdHzl51SkmSYCzz+KMwZ1AotKYEQlwZpNDEFYUrMrxCMkEdamuJopwV08eZl0zxvuRaN516y3rss6quAInIAz4IJL0AK3oA06AINH8AxewZv1ZL1Y79bHPFqxyplD8AfW5w+2E5le</latexit> dec<latexit sha1_base64="5m+QR8hdbMv3XDBazsHAMIzfn4U=">AAACGnicbVDLSgMxFM3UVx1fVZdugkVwVWZE1GXRjcsK9gGdUjKZO21oJjMkmWId+h1u/BU3LhRxJ278G9N2BG09kHBy7rnk3uMnnCntOF9WYWl5ZXWtuG5vbG5t75R29xoqTiWFOo15LFs+UcCZgLpmmkMrkUAin0PTH1xN6s0hSMVicatHCXQi0hMsZJRoI3VLrudDj4ksIlqyu7F9jz1vdnnDINZq+rQ9EMGPpVsqOxVnCrxI3JyUUY5at/ThBTFNIxCacqJU23US3cmI1IxyGNteqiAhdEB60DZUkAhUJ5uuNsZHRglwGEtzhMZT9XdHRiKlRpFvnGa+vpqvTcT/au1UhxedjIkk1SDo7KMw5VjHeJITDpgEqvnIEEIlM7Ni2ieSUG3StE0I7vzKi6RxUnHPKqc3p+XqZR5HER2gQ3SMXHSOquga1VAdUfSAntALerUerWfrzXqfWQtW3rOP/sD6/AY3CqBg</latexit>zz...z<latexit sha1_base64="7POxo7vFgrBtvWmL4OJ79dcm+1k=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlZrdfrrhVdw6ySrycVCBHo1/+6g1ilkYoDRNU667nJsbPqDKcCZyWeqnGhLIxHWLXUkkj1H42P3RKzqwyIGGsbElD5urviYxGWk+iwHZG1Iz0sjcT//O6qQmv/YzLJDUo2WJRmApiYjL7mgy4QmbExBLKFLe3EjaiijJjsynZELzll1dJ+6LqXVZrzVqlfpPHUYQTOIVz8OAK6nAHDWgBA4RneIU359F5cd6dj0VrwclnjuEPnM8fvTOM6A==</latexit>[<latexit sha1_base64="2HNR7gFizcQTjs+XSXx/gpL675s=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlpt8vV9yqOwdZJV5OKpCj0S9/9QYxSyOUhgmqdddzE+NnVBnOBE5LvVRjQtmYDrFrqaQRaj+bHzolZ1YZkDBWtqQhc/X3REYjrSdRYDsjakZ62ZuJ/3nd1ITXfsZlkhqUbLEoTAUxMZl9TQZcITNiYgllittbCRtRRZmx2ZRsCN7yy6ukfVH1Lqu1Zq1Sv8njKMIJnMI5eHAFdbiDBrSAAcIzvMKb8+i8OO/Ox6K14OQzx/AHzucPwDuM6g==</latexit>]<latexit sha1_base64="ARDs0NR7HlTy0rzpYQUBzc5BAxc=">AAACIHicbVDLSgMxFM34rOOr6tJNsAiuyoyIdVl047KCrUKnlEzmtg1mMkNyp1iGfoobf8WNC0V0p19j+hC09UDC4Zx7k3tPmEph0PM+nYXFpeWV1cKau76xubVd3NltmCTTHOo8kYm+DZkBKRTUUaCE21QDi0MJN+Hdxci/6YM2IlHXOEihFbOuEh3BGVqpXawEIXSFymOGWtwPXZ8GgXs8uoJ+lKAZsx7DXA3dAFT0U9gulryyNwadJ/6UlMgUtXbxI4gSnsWgkEtmTNP3UmzlTKPgEuzjmYGU8TvWhaalisVgWvl4wSE9tEpEO4m2RyEdq787chYbM4hDW2nn65lZbyT+5zUz7Jy1cqHSDEHxyUedTFJM6CgtGgkNHOXAEsa1sLNS3mOacbSZujYEf3bledI4Lvun5ZOrk1L1fBpHgeyTA3JEfFIhVXJJaqROOHkgT+SFvDqPzrPz5rxPShecac8e+QPn6xtqwKKQ</latexit>12...ˆn<latexit sha1_base64="7POxo7vFgrBtvWmL4OJ79dcm+1k=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlZrdfrrhVdw6ySrycVCBHo1/+6g1ilkYoDRNU667nJsbPqDKcCZyWeqnGhLIxHWLXUkkj1H42P3RKzqwyIGGsbElD5urviYxGWk+iwHZG1Iz0sjcT//O6qQmv/YzLJDUo2WJRmApiYjL7mgy4QmbExBLKFLe3EjaiijJjsynZELzll1dJ+6LqXVZrzVqlfpPHUYQTOIVz8OAK6nAHDWgBA4RneIU359F5cd6dj0VrwclnjuEPnM8fvTOM6A==</latexit>[<latexit sha1_base64="2HNR7gFizcQTjs+XSXx/gpL675s=">AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF48t2FpoQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgpr6xubW8Xt0s7u3v5B+fCoreNUMWyxWMSqE1CNgktsGW4EdhKFNAoEPgTj25n/8IRK81jem0mCfkSHkoecUWOlpt8vV9yqOwdZJV5OKpCj0S9/9QYxSyOUhgmqdddzE+NnVBnOBE5LvVRjQtmYDrFrqaQRaj+bHzolZ1YZkDBWtqQhc/X3REYjrSdRYDsjakZ62ZuJ/3nd1ITXfsZlkhqUbLEoTAUxMZl9TQZcITNiYgllittbCRtRRZmx2ZRsCN7yy6ukfVH1Lqu1Zq1Sv8njKMIJnMI5eHAFdbiDBrSAAcIzvMKb8+i8OO/Ox6K14OQzx/AHzucPwDuM6g==</latexit>]<latexit sha1_base64="Q3ZFHU8Hsd5v0kzobS0LsgWpHuE=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF49V7Ae0oWy2m3bpZhN2J0IJ/QdePCji1X/kzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmTjVjDdZLGPdCajhUijeRIGSdxLNaRRI3g7GtzO//cS1EbF6xEnC/YgOlQgFo2ilh17WL1fcqjsHWSVeTiqQo9Evf/UGMUsjrpBJakzXcxP0M6pRMMmnpV5qeELZmA5511JFI278bH7plJxZZUDCWNtSSObq74mMRsZMosB2RhRHZtmbif953RTDaz8TKkmRK7ZYFKaSYExmb5OB0JyhnFhCmRb2VsJGVFOGNpySDcFbfnmVtC6q3mW1dl+r1G/yOIpwAqdwDh5cQR3uoAFNYBDCM7zCmzN2Xpx352PRWnDymWP4A+fzB55yjW4=</latexit>{<latexit sha1_base64="Q3ZFHU8Hsd5v0kzobS0LsgWpHuE=">AAAB6XicbVBNS8NAEJ3Ur1q/qh69LBbBU0mkqMeiF49V7Ae0oWy2m3bpZhN2J0IJ/QdePCji1X/kzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmTjVjDdZLGPdCajhUijeRIGSdxLNaRRI3g7GtzO//cS1EbF6xEnC/YgOlQgFo2ilh17WL1fcqjsHWSVeTiqQo9Evf/UGMUsjrpBJakzXcxP0M6pRMMmnpV5qeELZmA5511JFI278bH7plJxZZUDCWNtSSObq74mMRsZMosB2RhRHZtmbif953RTDaz8TKkmRK7ZYFKaSYExmb5OB0JyhnFhCmRb2VsJGVFOGNpySDcFbfnmVtC6q3mW1dl+r1G/yOIpwAqdwDh5cQR3uoAFNYBDCM7zCmzN2Xpx352PRWnDymWP4A+fzB55yjW4=</latexit>{<latexit sha1_base64="n/ihL1HZUSIyRv9Ohb5CjnBUpTo=">AAAB9HicbVDLSgMxFL1TX7W+qi7dBIvgqsxIUZdFNy4r9AXtUDJppg1NMmOSKZSh3+HGhSJu/Rh3/o2ZdhbaeiBwOOfe5OQEMWfauO63U9jY3NreKe6W9vYPDo/KxydtHSWK0BaJeKS6AdaUM0lbhhlOu7GiWAScdoLJfeZ3plRpFsmmmcXUF3gkWcgINlby+wKbsRJpk3E6H5QrbtVdAK0TLycVyNEYlL/6w4gkgkpDONa657mx8VOsDCP2vlI/0TTGZIJHtGepxIJqP12EnqMLqwxRGCl7pEEL9fdGioXWMxHYySykXvUy8T+vl5jw1k+ZjBNDJVk+FCYcmQhlDaAhU5QYPrMEE8VsVkTGWGFibE8lW4K3+uV10r6qetfV2mOtUr/L6yjCGZzDJXhwA3V4gAa0gMATPMMrvDlT58V5dz6WowUn3zmFP3A+fwBFNZJw</latexit>Tile(a) Correlation (z ∈ R96)
(b) MSE (z ∈ R96)
(e) PISA
(f) GRU
(c) Correlation (z ∈ R48)
(d) MSE (z ∈ R48)
(g) DSPN
(h) TSPN
Figure 2: Results for the Random Set Reconstruction experiment. (a)-(d): Correlation and MSE loss for PISA and baselines
with a sufficient latent size (z ∈ R96) and under compression (z ∈ R48). (e-h): Reconstruction error for PISA and baselines. The
transparent circles represent the ground truth, and the opaque circles represent the prediction.
relies on using the keys at decode time, constituting a variable-sized
latent state.
All of the methods that we have examined in related work ex-
hibit fundamental problems, including non-permutation-invariance,
variable-sized latent states, and reliance on computationally ex-
pensive loss functions which introduce instability. Our method
addresses all of these issues by tackling the problem of set autoen-
coding with a significantly different approach.
3 METHOD
A set autoencoder architecture consists of an encoder ψ and a
decoder φ. The encoder takes a set of elements X as input
X : Rn×dx = {xi : Rdx | i ∈ [1, . . . n]}
and produces latent state z
z : Rdz = ψ (X),
(1)
(2)
which is fed to the decoder φ to predict the original input
ˆX : Rn×dx = φ (z).
The goal is to find ψ and φ such that the "set" error between
X and ˆX is minimised (that is, the sizes |X | and | ˆX | match, and
the MSE error between every corresponding input-output pair of
elements is minimised).
(3)
Our permutation-invariant set autoencoder (PISA) tackles this
problem with a significantly different approach than related works.
We introduce a notion of keys and values, popularised by trans-
formers [5, 16, 19]. Elements are encoded as values, and "inserted"
into the embedding with keys. By creating key-value pairings, the
decoder can extract specific elements with their corresponding
queries. This creates a direct correspondence between inputs and
outputs, enabling the use of a simple loss function which does not
require a matching algorithm to compute the set error.
3.1 Encoder
In the encoder architecture, keys and values are produced by learned
networks ψkey and ψval (Fig. 1). The embedding is generated by
taking the element-wise product between each encoded key-value
pair, and summing over all elements:
z =
n
∑︁
i=1
(cid:2)ψkey (ρ (xi )) ⊙ ψval (xi )(cid:3) + λenc (n).
(4)
The input to the key network ψkey is generated by a value-to-key
mapping function ρ : Rdx ↦→ [1..n]. Although any key can be used
to insert any value, the mapping function ρ guarantees permutation
invariance by assigning keys to values in a deterministic manner.
Since the pairing between keys and values has a negligible effect on
the output, it is not necessary to learn ρ-it is implemented with a
randomly initialised linear layer. In practice, we also transform the
output of ρ to the onehot space before passing it to ψkey in order
to remove the inherent ordering in the keys.
In addition to encoding the elements from the input set, we also
0 ↦→ Rdz encodes
encode its cardinality. In equation (4), λenc : Z+
the cardinality with a single linear layer. It is important that this
mapping is linear, as it maintains additivity within the latent space
(see Appendix A).
3.2 Decoder
The decoder architecture closely mirrors the encoder architecture,
extracting values in a similar manner to how they were inserted
(Fig. 1). The decoder uses λdec to predict the number of outputs ˆn,
and then uses φkey to produce queries qi :
ˆn = λdec (z)
{q1, . . . q ˆn } = {φkey (i) | i ∈ [1.. ˆn]}
(5)
(6)
0500010000150002000025000Step0.00.20.40.60.81.0CorrelationPISAGRUDSPNTSPN05000100001500020000Step10−310−210−1100MeanSquaredErrorPISAGRUDSPNTSPN05000100001500020000Step0.00.20.40.60.81.0CorrelationPISAGRUDSPNTSPN05000100001500020000Step10−1100MeanSquaredErrorPISAGRUDSPNTSPN(a) PISA
(b) GRU
(c) DSPN
(d) TSPN
Figure 3: The sensitivity of the latent space for each method. In this experiment, we encode two sets with 8 elements into
representations z0 and z1. Then, we continuously interpolate in the latent space between z0 and z1, and decode the result. In
the figure, each panel is calculated as φ ((1 − α) * z0 + α * z1), from α = 0 on the left to α = 1 on the right. All of the methods are
evaluated on the same sets X0 and X1, which are shown in the α = 0 and α = 1 panels with lower opacity.
By computing the element-wise product between the latent state
and the queries, the decoder produces an element-specific hidden
state z ⊙ qi . Finally, a decoder network φdec processes each hidden
state, producing the reconstructed set elements
ˆX = {φdec (z ⊙ qi ) | i ∈ [1.. ˆn]}.
(7)
3.3 Training
The full autoencoder is trained in an unsupervised manner with
standard MSE reconstruction loss Lmse = (cid:205)n
i ( ˆxi − xρ (xi ) )2. In
addition, we use a separate loss to train the networks λenc and
λdec, which encode and predict the set's cardinality: Lsize = (n −
λdec (z))2.
This training scheme is much more efficient than that of al-
gorithms like DSPN [23] and TSPN [10], which use Hungarian
loss (O (n3) complexity) for smaller sets and Chamfer loss (O (n2)
complexity) for larger sets. The latter requires solving an optimi-
sation problem at each step: Lhung = minP ||PX − ˆX ||2, where
X, ˆX ∈ Rn×d are matrices of stacked elements from the ground
truth and predicted sets, P ∈ {0, 1}n×n is a permutation matrix, and
the magnitude || * || represents the row-wise Euclidean norm.
In contrast, our training scheme does not require computation-
ally expensive optimisation, and it always produces the correct
correspondence between elements due to our key-value technique.
4 EXPERIMENTS
In this section, we first evaluate PISA against baselines, including
GRU, DSPN, and TSPN. For a fair evaluation, we select a non-
application-specific scenario: encoding and reconstructing a ran-
domly generated set. Once we have demonstrated the performance
of our method in comparison to baselines, we show its usefulness
by applying it to a multi-agent problem: fusion of observations
within a partially observable multi-agent system.
For all of the baselines, we use official code (Github reposito-
ries published by the original authors for DSPN and TSPN, and
PyTorch's implementation of GRU), adapted to a common inter-
face. All methods use their own recommended hyperparameters,
with the exception of a common learning rate of 10−3 and latent
state size (defined in the experiments). For DSPN and TSPN, we use
Hungarian loss (as opposed to Chamfer loss). In DSPN, we run the
Figure 4: An ablation analysis over the components of PISA.
PISA (No ρ) denotes a version the model without ρ, whereby
keys are assigned to values according to their input order-
ing. PISA (Hungarian) refers to the same model as PISA, but
trained with a Hungarian algorithm to match inputs with
outputs, instead of using the ground truth correspondence.
Lastly, PISA (Deepset) represents a variant of PISA where the
encoder is replaced by Deep Sets [22]. The metric used in
this ablation analysis is the correlation coefficient between
the inputs and outputs.
Figure 6: The integrated arc length travelled by all ele-
ments in the latent space interpolation experiment. This
plot serves as a quantitative metric for the experiment
shown in Fig. 3. Over 100 trials, we encode sets X0 and X1
into z0 and z1, interpolate between z0 and z1 in the embed-
ding space, and decode the result: φ ((1 − α) * z0 + α * z1). We
report the arc length of the reconstructed set produced by
∂α.
each method as it is interpolated:
The red line represents the mean of the minimum possible
arc lengths across all trials, calculated by finding the mini-
mum cost assignment between the elements in sets X0 and
X1 and computing the linear distance between each pair of
elements.
∂φ ( (1−α) *z0+α *z1)
∂α
∫ 1
0
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(a) Correlation vs Number of Elements (z ∈ R96)
(b) Correlation vs Number of Elements (z ∈ R48)
Figure 5: An analysis of the reconstruction accuracy (mea-
sured by correlation) for each method as a function of the
number of elements in the set, evaluated with a latent of suf-
ficient size (z ∈ R96) and under compression (z ∈ R48). Each
line represents the mean over 1024 runs, and the shaded re-
gion denotes the min and max.
decoder for 30 iterations (the highest number of iterations used in
the paper, which produced the highest fidelity outputs).
4.1 Random Set Reconstruction
Problem Formalisation. In the random set reconstruction prob-
lem, the task is to compress a set X into a latent representation
z, and then reconstruct it into ˆX such that the loss Lmse (X, ˆX) is
minimised. Elements xi ∈ R6 from each set are drawn from a nor-
mal distribution N (06, I6), and the number of elements n ∈ [0..16]
is drawn from a discrete uniform distribution. Two latent sizes
dz ∈ {48, 96} are tested to evaluate various degrees of compression.
A solution to the random set reconstruction problem can be used
as a permutation-invariant aggregation method which minimises
the loss of data. This is extremely useful in the multi-agent domain,
particularly in systems with GNN-based policies. For example, it
can operate at the agent level as a method of combining messages
from neighbouring agents, or at the global level as a graph pooling
layer.
Results. In our first experiment, we compare PISA against base-
line methods, evaluating both the mean squared error of the recon-
struction and the correlation coefficient between the ground truth
and reconstructed elements (Fig 2). We run this experiment with
hidden sizes of 96 (which is theoretically just large enough to store
all of the the inputs) and 48 (which requires some compression).
The results show that PISA outperforms all of the baselines in both
scenarios, achieving a correlation coefficient of 0.9999 for z ∈ R96
and 0.9180 for z ∈ R48. The next best method, GRU, achieves a
correlation of 0.9412 for z ∈ R96 and 0.8228 for z ∈ R48.
The conclusions we draw from the loss and correlation metrics
are corroborated by the qualitative results in Fig 2. We provide
a visualisation of the reconstructed sets using each method, rep-
resenting each xi ∈ R6 datapoint as a circle with parameterised
position, colour, and radius. The results show that PISA's recon-
struction is near perfect, GRU's reconstruction has some error, and
the reconstructions of DSPN and TSPN are very poor, making it dif-
ficult to distinguish the intended correspondences between inputs
and outputs. We note that the performance of DSPN and TSPN for
05000100001500020000Step0.00.20.40.60.81.0CorrelationPISAPISA(Noρ)PISA(Hungarian)PISA(Deepset)0246810121416NumberofElements0.00.20.40.60.81.0CorrelationPISAGRUDSPNTSPN0246810121416NumberofElements0.00.20.40.60.81.0CorrelationPISAGRUDSPNTSPN101102InterpolatedSetArcLengthPISAGRUDSPNTSPNFigure 7: The Fusion GNN architecture. This schema is drawn from the perspective of agent 2, which can directly observe
objects A, B, and C, and can communicate with agents 1 and 3. First, the local observation is encoded with the set encoder. Then,
at each layer in the GNN, the agent decodes the latent states that it receives from its neighbours, filters out the duplicates,
and encodes the resulting set. Finally, after the last GNN layer, the set decoder is applied to reconstruct the entire global
observation.
up to 2 elements is satisfactory, but performance falls off sharply
as the number of elements increases (Fig. 5).
embeddings). We do this by encoding two random sets X0 and X1
into latents z0 and z1, interpolating between z0 and z1 in the latent
space with a weighted average: (1 − α) * z0 + α * z1 (for α from 0 to
1), and decoding the result.
As shown in Fig. 3 and Fig. 6, PISA exhibits a similarity-
preserving latent space. As we interpolate from z0 to z1, the decoded
set smoothly transforms through logical intermediate sets. In con-
trast, DSPN and TSPN are both highly sensitive, so their decodings
of the interpolated latent state are highly unstable. GRU is the
only other method which demonstrates a smooth transition, and
therefore low sensitivity to input noise. However, the intermediate
states produced by GRU do not necessarily carry the meaning of
a weighted average between X0 and X1-for example, note that
while the visualisations of X0 and X1 both have large circles, the
visualisation of ˆX0.5 = 1
2z1 only has small circles.
2z0 + 1
Ablation Analysis. In addition to our comparison against base-
line methods, we also run an ablation analysis to validate each
component of our architecture (Fig. 4). The results show that PISA
performs significantly better than variants which (1) use the hun-
garian algorithm to match inputs and outputs in the loss function,
and (2) use Deep Sets [22] in place of our encoder. On the other
hand, the variant of PISA without the network ρ to match keys
with values (and therefore is not permutation-invariant) achieves
the exact same performance as the base model. This is a significant
result-our architecture is still able to generalise between different
permutations without ρ. The purpose of the key-value matching
criterion is simply to guarantee permutation-invariance.
4.2 Multi-Agent Sensor Fusion
Problem Formalisation. The multi-agent sensor fusion problem
concerns the task of using communication to combine sets of obser-
vations within a partially observable multi-agent system, producing
global observability (assuming the graph of communication links be-
tween agents is connected). Consider a graph Gcom = ⟨A, E (com) ⟩
consisting of a set of agents A ≡ [1..n] and and edges E (com) ,
where the edge e (com)
represents a communication link between
agents i and j, and E (com)
∈ E (com) } repre-
= { j
sents the set of agents in communication range of agent i. Let
| e (com)
i,j
i,j
i
Figure 8: The Multi-Agent Sensor Fusion Problem. In this en-
vironment, there is a set of agents A (depicted as robots) and
a set of objects O (depicted as coloured circles). The commu-
nication edges E (com) define the links between agents which
can communicate (shown as black lines). The observation
edges E (obs) define the objects which are in each agent's lo-
cal observation range (shown as dotted green lines). The goal
of the task is for each agent to use communication to recon-
struct the entire global observation.
Latent Space Sensitivity. In addition to reconstruction loss,
one extremely important property in autoencoders is the propensity
to map similar elements to similar embeddings. The pursuit of
this property forms the motivation for methods like variational
autoencoders, which incentivise similarity preservation even at the
cost of reconstruction error [6]. Similarity preservation is desirable
because it leads to better stability and generalisation in networks
using the embedding as an input.
Although neither our method nor the baselines specifically op-
timise for the sensitivity of the latent space, some methods lend
themselves to more similarity-preserving embeddings than others
(as a product of the architectures themselves). In this experiment,
we analyse the effect of interpolating in the latent space (and, by
extension, we test the property that similar inputs map to similar
Encode GNNSet EncoderObject AObject BObject CAgent 2LatentAgent 1LatentAgent 3LatentSet DecoderMerge GNNDuplicate FilterSet EncoderAgent 2LatentObject DecoderSet DecoderObject AObject BObject CObject DObject ERepeat for N LayersCommunicationCommunicationObjects in Agent 2'sObservation RangeAll Objects Reconstructed by Agent 2Agent 1 GNN InputAgent 1 GNN Output(a) Fusion GNN Layer 0
(b) Fusion GNN Layer 1
(c) Fusion GNN Layer 2
Figure 9: Evaluation of the trained Fusion model. In this visualisation, the 7 agents are represented by black squares, and
the 10 observations are visualised as coloured circles. The plot is from the point of view of agent 0, depicted as a blue square.
The transparent circles represent the ground truth global observation, while the circles with full opacity represent the scene
reconstructed by agent 0. At layer 0 of the GNN, agent 0 only has access to its own observations. However, after multiple rounds
of message passing, agent 0 can reconstruct objects outside of its observation range.
i
i,j
Gobs = ⟨A ∪ O, E (obs) ⟩ be a bipartite graph representing the ob-
jects which can be observed by each agent, where O is the set of
objects, and E (obs) is the set of edges between agents and objects.
Each object oi ∈ O contains information oi ∈ R6 which is provided
to the agents as an observation. Without communication, each
agent can observe the set of objects E (obs)
∈ E (obs) }.
However, with communication, agents can gain access to informa-
tion about objects which they cannot directly observe. If X (l)
is the
set of objects that agent i has reconstructed after l rounds of com-
munication, then the goal of this task is to learn a communication
strategy with fixed-size messages such that liml→∞ X (l)
= {o j | e (obs)
Since this communication strategy is trained with an autoen-
coder, it is application-agnostic. That is, the communication strategy
can be trained on synthetic data, and then that pre-trained submod-
ule can be deployed in multiple disparate systems. It also allows
the number of layers to be updated dynamically at execution time,
enabling systems to make the number of communication steps ar-
bitrarily large or small in order to receive all necessary information
(i.e the maximum of the lengths of the shortest paths between every
pair of agents in G (com) ).
= O.
i
i
One potential application for this is multi-agent reinforcement
learning. Even in single-agent reinforcement learning, the task of
learning an appropriate representation for the state is a major bot-
tleneck with respect to sample efficiency [11]. That is, it is difficult
to learn an encoder with only a reward signal. This problem is only
exacerbated when moving to the multi-agent domain, wherein the
size of the state space is even larger. However, with a multi-agent
sensor fusion system, the task of learning an encoder and commu-
nication scheme can be pre-trained with unsupervised learning,
allowing the reinforcement learning stage of training to focus on
learning the task. In problems with local rewards, this allows the
multi-agent reinforcement learning problem to be reformulated
into a single-agent reinforcement learning problem, where the la-
tent state from the communication system is the observation. This
allows the problem to be solved by single-agent reinforcement
learning methods.
Another possible application for the fusion model is hierarchical
reinforcement learning in a multi-agent system [18]. Since commu-
nication in MARL is usually trained alongside a policy to complete
a given task [12], agents operating under different policies cannot
communicate with each other. This is a problem in hierarchical
reinforcement learning, where the team must transition between
policies, and different subsets of agents might select different poli-
cies at any given timestep. However, with our fusion model, a
generalised communication scheme can be trained for all of the
policies.
Model. Our multi-agent sensor fusion model is defined by a novel
GNN architecture. The architecture has three subcomponents: a set
encoder ψ , a set decoder φ, and a duplicate filter f . The set encoder
compresses a set of objects into a message which can be passed to
other agents:
i = ψ (X (l)
z (l)
Similarly, the set decoder reconstructs a set of objects given a mes-
sage:
(8)
).
i
X (l+1)
i
= φ (z (l)
i
).
(9)
Finally, the filter takes in a set of sets of objects, and returns the
union over those sets (by identifying and removing the duplicates):
X1 ∪ X2 ∪ . . . Xn = f ({X1, X2, . . . , Xn }).
(10)
The filter f is defined by training a binary classifier g which deter-
mines if two reconstructed objects are the same g : O × O ↦→ [0, 1],
and evaluating it on every pair of objects.
The entire GNN is constructed with these three components,
with parameter sharing across layers. At each layer, the GNN de-
codes the latent states from all of the neighbours, filters the dupli-
cates, and encodes the result:
z (l+1)
i
= φ
(cid:16)
f
(cid:16)(cid:110)
ψ (z (l)
j
)
j ∈ E (com)
i
(cid:111)(cid:17)(cid:17)
.
(cid:12)
(cid:12)
(cid:12)
(11)
The loss for the GNN is calculated per-layer. The encoder and
decoder are trained with the standard set autoencoder loss, which is
applied between the input to the set encoder and the reconstructed
output of the set decoder in the next layer. The filter is trained
with a crossentropy loss, using a dataset of pairs of reconstructed
observations at each layer ( ˆoi, ˆo j ), and a label which indicates if
those were reconstructed from the same original object 1(i = j).
Results. As shown in Fig. 9, our fusion model can successfully
learn a communication scheme which allows agents to gain full
observability of a system through message passing. The trained
model's set autoencoder achieves a reconstruction correlation co-
efficient of 0.9999, and the duplicate filter achieves an accuracy of
1.0.
While these quantitative results produce reconstructions which
should be sufficient for most mutli-agent applications, we note that
the elements slightly drift as the number of layers of the GNN
increases, as a result of compounded error. Fortunately, there is a
way that this effect could be mitigated in future work. Currently, all
elements are re-encoded at every layer in the GNN, and if there are
duplicates then there is no mechanism for choosing one element
over another. However, since our set autoencoder architecture en-
ables the addition and removal of elements after a set is initially
encoded, it is possible to design the system in a manner such that
only new elements are added. This would not only remove the
error due to re-encoding, but also place a bias on choosing ele-
ments which come from fewer communication steps away when
duplicates exist.
5 DISCUSSION
In our experiments, we demonstrate that PISA is capable of pro-
ducing near-perfect reconstructions and possesses a similarity-
preserving latent space. The combination of these properties enable
PISA to be used as a pre-trained submodule within a larger learned
model. The encoder can be used as a permutation-invariant aggre-
gator which minimises the loss of information, while the decoder
can be used as a module for predicting variable-sized outputs given
a vector of logits. Furthermore, the Fusion GNN can be used as a
task-agnostic communication scheme for observations of a given
size. Given the application-agnostic nature of our experiments, the
results should hold when applied to any domain.
The primary attribute that sets our method apart from the base-
lines is our approach to the core problem in set autoencoding:
producing a variable number of unique outputs from a single latent
state. While our method solves this issue in a simple manner with
a key-value approach, the baselines introduce problems with over-
engineered workarounds. In the case of GRU, the primary issue
is that it encodes and decodes sequentially, thereby including the
ordering of the inputs in the embedding, and removing its ability
to generalise across all orderings. This not only injects some in-
stability (whereby the manner in which elements are processed
depends on previous elements in the sequence), but also introduces
non-permutation-invariance. For DSPN and TSPN, the primary
issue is likely the fact that there is no correspondence between
inputs and outputs. In order to apply a loss function, DSPN and
TSPN use the Hungarian algorithm to match predicted elements
with the closest elements in the input set. However, this matching
process is imperfect, and consequently introduces some noise into
the loss signal which makes it more difficult to learn (as shown in
our ablation analysis in Fig. 4). In the DSPN and TSPN papers, the
primary experiment for evaluation was autoencoding point clouds
forming MNIST digits. In those experiments, if the matching is
imperfect, it can still produce the desirable macroscopic behaviour
(even if individual elements are in the wrong places).
One unique property of our model which we do not explore in
this paper is its ability to perform transforms on the latent space.
Unlike in other methods, sets can be combined simply by adding
embeddings-there is no need to re-encode a new set. To insert an
element e to an existing embedding z0 of size n, it must be encoded
with key n + 1 to produce embedding ze . Then, the two embeddings
can be combined by adding them: z0 + ze . Removal of elements
through subtraction is also possible, but it requires the user to keep
track of keys (to identify the element which will be removed, and
to remember which keys are still present after a subset is removed).
Although we focus on multi-agent systems in this paper, PISA
has applications in many different domains. The encoder can be
used in any application which involves reasoning over graphs, in-
cluding natural language processing [1], image processing [21], and
knowledge graphs [17]. The decoder can be used in neural cellular
automata on graphs (expanding sets of children nodes), prediction
of scenes with multiple objects (either predicting point clouds or
semantic objects), and multimodal continuous action distributions
(where a vector of logits is mapped to a set of Gaussians which are
composed together). Given the experimental success of PISA, we
hope that it will open up future avenues of research in these fields.
6 CONCLUSION
In our experiments, we have demonstrated that PISA outperforms
all baselines on a reconstruction task with random data. Our model
produces near-perfect reconstructions up to a compression factor of
1.0, and significantly better reconstructions than the baselines with
more compression. Furthermore, it possesses a well-behaved latent
space, mapping similar inputs to similar embeddings. In addition
to benchmarking the performance of PISA on the reconstruction
of random data, we demonstrate its usefulness in the multi-agent
sensor fusion problem-our novel GNN architecture uses PISA to
define a generalised communication strategy. However, this rep-
resents just one of many possible applications. Given its success
with completely random data, it is possible for PISA to be used as a
submodule in any application which involves learning over set or
graph-structured data.
ACKNOWLEDGEMENTS
Ryan Kortvelesy is supported by Nokia Bell Labs through their donation
for the Centre of Mobile, Wearable Systems and Augmented Intelligence
to the University of Cambridge. A. Prorok acknowledges funding through
ERC Project 949940 (gAIa).
REFERENCES
[1] Jasmijn Bastings, Ivan Titov, Wilker Aziz, Diego Marcheggiani, and Khalil
Sima'an. 2017. Graph Convolutional Encoders for Syntax-aware Neural Machine
Translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural
Language Processing. Association for Computational Linguistics, Copenhagen,
Denmark, 1957–1967. https://doi.org/10.18653/v1/D17-1209
[2] 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. 2018. Relational inductive biases, deep learning,
and graph networks. arXiv preprint arXiv:1806.01261 (2018).
[3] Kyunghyun Cho, Bart Van Merriënboer, Dzmitry Bahdanau, and Yoshua Ben-
gio. 2014. On the properties of neural machine translation: Encoder-decoder
approaches. arXiv preprint arXiv:1409.1259 (2014).
[4] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau,
Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase
representations using RNN encoder-decoder for statistical machine translation.
arXiv preprint arXiv:1406.1078 (2014).
[5] Kazuki Irie, Imanol Schlag, Róbert Csordás, and Jürgen Schmidhuber. 2021. Going
beyond linear transformers with recurrent fast weight programmers. Advances
in Neural Information Processing Systems 34 (2021), 7703–7717.
[6] Diederik P Kingma and Max Welling. 2013. Auto-encoding variational bayes.
arXiv preprint arXiv:1312.6114 (2013).
[7] Thomas N Kipf and Max Welling. 2016. Semi-supervised classification with graph
convolutional networks. arXiv preprint arXiv:1609.02907 (2016).
[8] Ryan Kortvelesy and Amanda Prorok. 2021. ModGNN: Expert Policy Approxima-
tion in Multi-Agent Systems with a Modular Graph Neural Network Architecture.
https://doi.org/10.48550/arXiv.2103.13446 arXiv:2103.13446 [cs].
[9] Ryan Kortvelesy and Amanda Prorok. 2022. QGNN: Value Function Factorisa-
tion with Graph Neural Networks. https://doi.org/10.48550/arXiv.2205.13005
arXiv:2205.13005 [cs].
[10] Adam R. Kosiorek, Hyunjik Kim, and Danilo J. Rezende. 2020. Conditional Set
Generation with Transformers. CoRR abs/2006.16841 (2020). arXiv:2006.16841
https://arxiv.org/abs/2006.16841
[11] Alex X Lee, Anusha Nagabandi, Pieter Abbeel, and Sergey Levine. 2020. Stochastic
latent actor-critic: Deep reinforcement learning with a latent variable model.
Advances in Neural Information Processing Systems 33 (2020), 741–752.
[12] Qingbiao Li, Fernando Gama, Alejandro Ribeiro, and Amanda Prorok. 2020.
Graph Neural Networks for Decentralized Multi-Robot Path Planning. http:
//arxiv.org/abs/1912.06095 arXiv:1912.06095 [cs].
[13] Fangyu Liu, Shuaipeng Li, Liqiang Zhang, Chenghu Zhou, Rongtian Ye, Yuebin
Wang, and Jiwen Lu. 2017. 3DCNN-DQN-RNN: A deep reinforcement learning
framework for semantic parsing of large-scale 3D point clouds. In Proceedings of
the IEEE international conference on computer vision. 5678–5687.
[14] Charles R. Qi, Hao Su, Kaichun Mo, and Leonidas J. Guibas. 2017. PointNet:
Deep Learning on Point Sets for 3D Classification and Segmentation. https:
//doi.org/10.48550/arXiv.1612.00593 arXiv:1612.00593 [cs].
[15] Tabish Rashid, Mikayel Samvelyan, Christian Schroeder de Witt, Gregory Far-
quhar, Jakob Foerster, and Shimon Whiteson. 2018. QMIX: Monotonic Value
Function Factorisation for Deep Multi-Agent Reinforcement Learning. https:
//doi.org/10.48550/arXiv.1803.11485 arXiv:1803.11485 [cs, stat].
[16] Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. 2021. Linear transformers
are secretly fast weight programmers. In International Conference on Machine
Learning. PMLR, 9355–9366.
[17] Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne van den Berg, Ivan
Titov, and Max Welling. 2018. Modeling relational data with graph convolutional
networks. In European semantic web conference. Springer, 593–607.
[18] Hongyao Tang, Jianye Hao, Tangjie Lv, Yingfeng Chen, Zongzhang Zhang, Hang-
tian Jia, Chunxu Ren, Yan Zheng, Changjie Fan, and Li Wang. 2018. Hierarchical
deep multiagent reinforcement learning. arXiv preprint arXiv:1809.09332 (2018).
[19] 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).
[20] Wei Wang, Yan Huang, Yizhou Wang, and Liang Wang. 2014. Generalized
Autoencoder: A Neural Network Framework for Dimensionality Reduction.
490–497. https://www.cv-foundation.org/openaccess/content_cvpr_workshops_
2014/W15/html/Wang_Generalized_Autoencoder_A_2014_CVPR_paper.html
[21] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. 2018. Non-local
neural networks. In Proceedings of the IEEE conference on computer vision and
pattern recognition. 7794–7803.
[22] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Ruslan
Salakhutdinov, and Alexander Smola. 2018. Deep Sets. http://arxiv.org/abs/1703.
06114 arXiv:1703.06114 [cs, stat].
[23] Yan Zhang, Jonathon Hare, and Adam Prugel-Bennett. 2019. Deep Set Prediction
Networks. In Advances in Neural Information Processing Systems, H. Wallach,
H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (Eds.),
Vol. 32. Curran Associates, Inc. https://proceedings.neurips.cc/paper/2019/file/
6e79ed05baec2754e25b4eac73a332d2-Paper.pdf
[24] Yan Zhang, Jonathon Hare, and Adam Prügel-Bennett. 2020. FSPool: Learning Set
Representations with Featurewise Sort Pooling. https://openreview.net/forum?
id=HJgBA2VYwH
B MNIST
In this section we evaluate our set autoencoder on an MNIST dataset. While
the rest of our paper uses randomly generated data, this experiment deals
with structured data. Furthermore, it shows that our set autoencoder works
as a subcomponent in a larger neural network architecture. The full model
in this experiment consists of a CNN encoder, set encoder, set decoder, and
then a CNN decoder. The CNN encoder compresses R32×32 images into
a latent with size R64, and the set encoder compresses up to 16 of these
elements by a compression factor of 1
4 the max
2 the max size R
1
2 *64*16 or 1
size R
1
4 *64*16.
The results are shown in Fig. 10. With a compression factor of 1
2 , the
model generates near-perfect reconstructions. However, with a compression
factor of 1
4 , the model makes some errors. As shown in Fig. 10b, the model
incorrectly predicts a 4 as a 0 and a 2 as a 3. Interestingly, some of the
other numbers are correct, but not exact matches to the ground truth. For
example, one of the digits in the ground truth is a 0 which is not closed,
but the predicted digit closes the loop. Another ground truth digit is a 7
with a cross through the middle, but the prediction omits the cross. These
errors indicate that under compression, the set autoencoder attempts to
preserve the most semantically important information. That is, the model
has learned from examples that 0 should be a closed loop, and 7 often
does not have a cross through it. So, while under compression, the model
maximises its reconstruction accuracy by storing enough information to get
close (primarily by encoding which digit it is), and discarding information
which can often be inferred.
APPENDIX
A ADDITIVITY
This stems from the fact that the last operation in our encoder is a summa-
tion, and therefore can be split via the associative property:
ψ ( X0 ∪ X1) =
+
n
∑︁
x ∈X0
n
∑︁
x ∈X1
(cid:2)ψkey (ρ (x)) ⊙ ψval (x)(cid:3)
(cid:2)ψkey (ρ (x)) ⊙ ψval (x)(cid:3)
(12)
+ λenc ( |X0 ∪ X1 |)
Furthermore, since λenc is linear, we can use the property of linearity to
split it (for disjoint sets X0 and X1):
λenc ( |X0 ∪ X1 |) = λenc ( |X0 |) + λenc ( |X1 |)
(13)
The resulting equation can be grouped into expressions which depend
only on X0 or X1:
ψ ( X0 ∪ X1) =
+
n
∑︁
x ∈X0
n
∑︁
x ∈X1
(cid:2)ψkey (ρ (x)) ⊙ ψval (x)(cid:3) + λenc ( |X0 |)
(cid:2)ψkey (ρ (x)) ⊙ ψval (x)(cid:3) + λenc ( |X1 |)
(14)
Note that these expressions can be replaced with ψ ( X0) and ψ ( X0), so
we can show that our model possesses the property of additivity: ψ ( X0 ∪
X1) = ψ ( X0) + ψ ( X1). One caveat to this property is that one of the sets
must be encoded using keys with an offset (using keys from |X0 | + 1 to
|X0 | + |X1 | instead of 1 to |X1 |). Otherwise, multiple values would be
associated with each key, so decoding would not work. However, if the
sets are encoded normally, then addition in the latent space can be used for
interpolation-we use this property for our experiments in section 4.1.
(a)
1
2 Set Autoencoder Compression Ratio
(b)
1
4 Set Autoencoder Compression Ratio
Figure 10: Results for MNIST set reconstruction, where sets of up to 16 images are encoded and reconstructed. The outer level of
our model is a CNN autoencoder which compresses 32 × 32 images into a latent of size 64. The inner level is our set autoencoder,
1
4 the maximum set size, as shown in (b). The numbers
which compresses to either
in the top row are the ground truth, those in the middle row are reconstructed by the CNN, and those in the bottom row are
reconstructed by the entire CNN/PISA architecture (where set sizes range between 1 and 16).
1
2 the maximum set size, as shown in (a) or
|
|
http://arxiv.org/abs/2302.12823v1 | 2023-02-24T18:58:11 | 2023-02-24T18:58:11 | Generative Models of Huge Objects | This work initiates the systematic study of explicit distributions that are
indistinguishable from a single exponential-size combinatorial object. In this
we extend the work of Goldreich, Goldwasser and Nussboim (SICOMP 2010) that
focused on the implementation of huge objects that are indistinguishable from
the uniform distribution, satisfying some global properties (which they coined
truthfulness). Indistinguishability from a single object is motivated by the
study of generative models in learning theory and regularity lemmas in graph
theory. Problems that are well understood in the setting of pseudorandomness
present significant challenges and at times are impossible when considering
generative models of huge objects.
We demonstrate the versatility of this study by providing a learning
algorithm for huge indistinguishable objects in several natural settings
including: dense functions and graphs with a truthfulness requirement on the
number of ones in the function or edges in the graphs, and a version of the
weak regularity lemma for sparse graphs that satisfy some global properties.
These and other results generalize basic pseudorandom objects as well as
notions introduced in algorithmic fairness. The results rely on notions and
techniques from a variety of areas including learning theory, complexity
theory, cryptography, and game theory. | [
"Lunjia Hu",
"Inbal Livni-Navon",
"Omer Reingold"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12823v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12823v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.CC",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.CC",
"cs.CR",
"cs.DS",
"cs.LG"
] | Generative Models of Huge Objects
Lunjia Hu∗
Inbal Livni-Navon†
Omer Reingold‡
Abstract
This work initiates the systematic study of explicit distributions that are indistinguishable
from a single exponential-size combinatorial object. In this we extend the work of Goldreich,
Goldwasser and Nussboim (SICOMP 2010) that focused on the implementation of huge objects
that are indistinguishable from the uniform distribution, satisfying some global properties (which
they coined truthfulness). Indistinguishability from a single object is motivated by the study of
generative models in learning theory and regularity lemmas in graph theory. Problems that are
well understood in the setting of pseudorandomness present significant challenges and at times
are impossible when considering generative models of huge objects.
We demonstrate the versatility of this study by providing a learning algorithm for huge
indistinguishable objects in several natural settings including: dense functions and graphs with
a truthfulness requirement on the number of ones in the function or edges in the graphs, and
a version of the weak regularity lemma for sparse graphs that satisfy some global properties.
These and other results generalize basic pseudorandom objects as well as notions introduced in
algorithmic fairness. The results rely on notions and techniques from a variety of areas including
learning theory, complexity theory, cryptography, and game theory.
3
2
0
2
b
e
F
4
2
]
C
C
.
s
c
[
1
v
3
2
8
2
1
.
2
0
3
2
:
v
i
X
r
a
∗Stanford University. Supported by the Simons Foundation Collaboration on the Theory of Algorithmic Fairness,
Omer Reingold's NSF Award IIS-1908774, and Moses Charikar's Simons Investigators award.
†Stanford University. Supported by the Simons Foundation Collaboration on the Theory of Algorithmic Fairness,
the Sloan Foundation Grant 2020-13941, and the Zuckerman STEM Leadership Program.
‡Stanford University. Supported by the Simons Foundation Collaboration on the Theory of Algorithmic Fairness
and the Simons Foundation Investigators award 689988.
Contents
1 Introduction
1.1 Overall Goal: Indistinguishable Generative Models of Huge Objects
. . . . . . . . .
1.2 Our Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Preliminaries
3
4
5
9
10
3 Learning Functions with Exponentially Large Domains
13
3.1 Learning Sample-Access Binary Functions . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Truthful Learning That Preserves Support Size . . . . . . . . . . . . . . . . . . . . . 15
Step 1: Exact Model with 2O(N ) Time Implementation . . . . . . . . . . . . . 16
Step 2: Indistinguishable Model with poly(N ) Time Implementation . . . . . 17
Step 3: Indistinguishable Model with polylog(N ) Time Implementation . . . 20
. . . . . . . . . . . . . . . . . . . . . . . 23
. . . . . . . . . . . . . . . . . . . . . . . 28
3.4 Learning Bit-String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3 Learning Support-Access Binary Functions
3.3.1 Auditor for Support-Access Objects
3.2.1
3.2.2
3.2.3
4 Learning Exponential-Size Graphs
32
4.1 Learning Dense Graphs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Learning Sparse Graphs Without Dense Subgraphs . . . . . . . . . . . . . . . . . . . 33
4.3 Learning Sparse Uniform Out-degree Graphs
. . . . . . . . . . . . . . . . . . . . . . 38
4.4 Learning Uniform Degree Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5 Impossibilities
42
2
1
Introduction
A pseudorandom distribution is indistinguishable from the uniform distribution to a set of compu-
tationally bounded distinguishers. Pseudorandomness is a cornerstone of many areas of computer
science and mathematics. The variability of pseudorandom distributions stems from the different
objects they can generate (bit strings, functions, permutations and more) and the different com-
putational bounds that can be imposed on the distinguishers. In the area of cryptography, it is
typical to consider powerful distinguishers that are at least polynomial time, giving rise to central
notions such as pseudorandom generators [BM84, Yao82], pseudorandom functions [GGM86] and
pseudorandom permutations [LR88]. More limited distinguishers give rise to other fundamental
notions such as k-wise independent hashing and ε-biased distributions (cf. [WC81, NN93]). In the
area of explicit combinatorial constructions, we typically try to emulate the uniform distribution
by a single object, rather than with a distribution. A primer example is the fundamental notion
of expander graphs (see [HLW06, Vad12] for surveys), with its multiple variants (including various
notions of randomness extractors). These are graphs that are indistinguishable from a uniformly
selected graph to a limited set of distinguishers (such as distinguishers that check if a random edge
crosses a given cut).
In these classic areas of pseudorandomness, a distribution, or even a single object, is constructed
to emulate a distribution (typically, the uniform distribution). In this paper we ask for a distribution
to emulate a single object (Table 1). This reversal may seem absurd from the perspective of
pseudorandomness but makes perfect sense from the perspective of generative models. An early
exposure of the TOC community to generative models was with respect to the World Wide Web.
These were models that produce distributions of graphs that imitate some properties of the Web,
such as power law on the degrees of nodes (see [Mit03] for a survey). At any given point, the
web is a single graph, but it is also a very large graph that does not have a simple description.
Generative models gave a useful way to analyze, or estimate through experimentation, the expected
performance of protocols on the Web.
Other well studied generative models are the stochastic block model [HLL83] and the more
elaborate mixed membership stochastic block model [ABFX08]. Consider a graph representing
some connections between individuals, such as the connectivity of the social network. The stochastic
block model partitions the vertices into disjoint communities and for every two communities assigns
a probability of connection. This model represents a distribution over graphs where for each two
vertices, an edge is placed independently with the probability assigned to the pair of communities
of its end points. (In the mixed-membership model, each vertex is assigned a distribution over
communities.) These models help identify useful substructures within a social structure such as sub-
communities or different social roles. But given a single social network, B∗, what is an appropriate
model to capture it? After all, a model describes a distribution over networks rather than the single
network we are trying to explain. A prevalent approach is to aim at the maximum likelihood model.
Out of all models, the probability of sampling B∗ is maximized under the maximum likelihood
model. Heuristics for estimating the maximum likelihood model have been playing a major roles
in the generative-model literature and in its application in practice. It should be noted that the
probability that the model would produce B∗ is often very small. In this light, the meaningfulness
of a maximum-likelihood models may be debated and may depend on a particular setting.
From the perspective of indistinguishability, it may be more natural to seek a model that
produce a distribution that is indistinguishable from B∗ to a meaningful set of distinguishers. For
example, in the case of the stochastic block model, natural distinguishers are defined by two sets
3
Pseudorandomness
Explicit construction (e.g. expander graphs) distribution of objects
Our setup: generative models
single object
single object
distribution of objects
distribution of objects distribution of objects
What do we imitate? What do we construct?
Table 1: Comparison between problem settings
of vertices U and V and ask what is the probability that a random edge in the graph crosses
from U to V . A stochastic block model that fool all such distinguishers is exactly what is given
by the Frieze-Kannan regularity lemma (also known as the weak regularity lemma) [FK99]. The
indistinguishability perspective on generative models and known connections between learning and
pseudrandomness, which we will discuss shortly, are both a motivation as well as the starting point
of this work.
1.1 Overall Goal: Indistinguishable Generative Models of Huge Objects
In many of the applications of generative models, such as modeling the Web or a social network,
the objects being modeled are huge. In this paper, we aim at a systematic theory of efficiently
learning and implementing huge generative models. Our models will generate a distribution of
objects satisfying some global properties that are indistinguishable from a fixed combinatorial
object. Such a theory presents non-trivial challenges that do not manifest themselves neither when
generating huge pseudorandom objects, nor in generative models of polynomial-size objects.
Concretely, we assume that we have access to an object B∗ with exponential size. For example,
B∗ could be a function with an exponentially large domain, or a graph with exponentially many
vertices and edges. We are most interested in the case where the object B∗ is too large to read
for example, when B∗ represents
or process as a whole, and we have to access it by sampling:
a function f : X → {0, 1} with |X| being exponentially large, we may access B∗ by asking for
random pairs (x, f (x)) ∈ X × {0, 1} (sample access) or random inputs x ∈ X conditioned on
f (x) = 1 (support access). Given access to the huge object B∗, our goal is to create a generative
model M for B∗. Here, our model M represents a distribution over objects, and we want to ensure
that this distribution is indistinguishable from B∗ to all distinguishers D in a class D. Specifically,
if we use DB ∈ {"accept", "reject"} to denote the output of distinguisher D given sample/support
access to object B, our indistinguishability requirement is that for every D ∈ D,
| Pr[DB∗
= "accept"] − EB∼M [Pr[DB = "accept"]]| ≤ ε.
We aim for building an efficient learner L that can output a model M satisfying the indistinguisha-
bility requirement above when given sample/support access to the true object B∗. When B∗ is
exponentially large (which is the case we are interested in), the output model M also needs to
generate exponentially large objects, and thus we cannot expect an efficient learner to directly out-
put M . Instead, we want our learner to output an efficient implementation of M , which, roughly
speaking, is a randomized algorithm that can efficiently provide sample/support access to objects
drawn from M (Definitions 2.9 and 2.10).
Our goal of learning a generative model M indistinguishable from the true object B∗ is anal-
ogous to the problem addressed by Goldreich, Goldwasser and Nussboim [GGN10] in the area of
4
pseudorandomness. They study the problem of efficiently implementing a distribution of huge ob-
jects, satisfying some global properties, that are indistinguishable from the uniform distribution of
such objects. Follow-up works of [GGN10] such as [NNT05, NN07] study efficient implementations
that are indistinguishable from certain distributions of huge random graphs. All these works aim
to achieve indistinguishability from a known distribution of objects, whereas in our problem of
learning a generative model, we assume that the true object B∗ is initially unknown, and to collect
information about B∗, we additionally need a learner L that can use sample/support access to B∗
to efficiently construct an implementation of an indistinguishable model.
Beyond indistinguishability, we also aim to achieve the notion of truthfulness introduced in
[GGN10]. To demonstrate this notion, consider pseudorandom permutations fs : {0, 1}n (cid:55)→
{0, 1}n [LR88]. A distribution of permutations is pseudorandom if it is indistinguishable from the
uniform distribution of permutations. It should be noted that a pseudorandom {0, 1}n (cid:55)→ {0, 1}n
function [GGM86] is also indistinguishable from a random permutation over {0, 1}n (as long as the
number of queries are sufficiently smaller than 2n/2). Nevertheless, insisting that the pseudorandom
objects satisfy the global condition of being a permutation is critical in the applications of pseu-
dorandom permutations. This motivates the distinction of [GGN10] between indistinguishability
(that the pseudorandom objects are indistinguishable from a uniform object to a class of distin-
guishers) and truthfulness which is a global property that needs to hold exactly or approximately
in a statistical sense. In our setup, a generative model M is truthful if every object B drawn from
the distribution represented by M satisfies a certain global property. For example, when the true
object B∗ is a function f ∗ : X → {0, 1} with support size |{x ∈ X : f ∗(x) = 1}| being k, a truthful
requirement on a generative model M for B∗ may restrict M to always generate functions with
support size k.
The study of implementing huge pseudorandom objects [NR02, GGN10, NNT05, NN07] has
pseudorandom functions and permutations as vital building blocks. Besides these building blocks,
our techniques for learning generative models of huge objects also come from connections to the
regularity lemma and especially the work of Trevisan, Tulsiani and Vadhan [TTV09]. In [TTV09],
they construct an efficiently-implementable function f : X (cid:55)→ [0, 1] which is indistinguishable
from some f ∗ : X (cid:55)→ [0, 1] to a family of distinguishers represented by functions g : X (cid:55)→ [0, 1].
Indistinguishability here means that | E[f (x)g(x)] − E[f ∗(x)g(x)]| is smaller than some error pa-
rameter ε. After [TTV09], the problem of creating indistinguishable functions and its applications
to cryptography are further studied in [VZ13, JP14, Sk ́o16a, Sk ́o16b, Sk ́o17, CCL18]. These works
assume that the true function f ∗ is known and they do not explicitly deal with the problem of
learning f ∗, but the corresponding learning task has been studied in the algorithmic fairness lit-
erature through the notions of multi-accuracy, multi-calibration, and outcome indistinguishability
[HJKRR18, KGZ19, DKR+21, GKSZ22, DLLT23]. When applying techniques from these works
to solve some problems in our setting, we need to deal with additional challenges such as the
truthfulness requirement that we want our generative model to satisfy.
1.2 Our Results
The main conceptual contribution of this paper is in suggesting a new frontier for the study of
indistinguishability, which is highly motivated and technically challenging. As we introduce in
Section 1.1, the notion of indistinguishability from a single huge object combines at its core the
areas of learning theory and pseudorandomness which, as recent research uncovered, have deep
connections, providing a way to describe and address a rich landscape of natural problems. Below
5
we summarize the main problems we address in this new framework.
Truthful Learning That Preserves Support Size
Suppose we have sample access to a function f ∗ : {0, 1}n → {0, 1} and we want to build an
indistinguishable generative model for f ∗. Here sample access allows us to observe pairs (x, f ∗(x))
with x drawn uniformly at random from {0, 1}n, and accordingly, we assume that every distinguisher
also decides to accept or reject based on such a random pair (x, f (x)) from a function f that may
or may not be the true f ∗. This task of learning a generative model for a binary function is
closely related to the task of no-access outcome indistinguishability studied in [DKR+21], and it
has been observed that the task can be reduced to multi-accuracy.
Indeed, assuming that the
distinguishers have bounded complexity and can be learned efficiently, using previous algorithms
in [HJKRR18, KGZ19, DKR+21], we can design an efficient learner that constructs a generative
model indistinguishable from f ∗ (Theorem 3.2). The model constructed this way is specified using
a predictor p : {0, 1}n → [0, 1], and the model represents the distribution of functions f : {0, 1}n →
{0, 1} where the function value f (x) is distributed independently for every x ∈ {0, 1}n according
to the Bernoulli distribution Ber(p(x)) with mean p(x).
Learning generative models for binary functions becomes a more challenging task when we
additionally enforce truthfulness requirements. A natural choice of truthfulness requirement is to
preserve the support size of the function. Assuming that we know the support size |{x ∈ {0, 1}n :
f ∗(x) = 1}| of f ∗ is k, we would like our model to only generate functions that also have support
size k. We show how to build an efficient learner that can output such a truthful model which is
also indistinguishable from the true function f ∗:
Theorem 1.1 (Informal statement of Theorem 3.4). Let B be the class of sample-access objects
induced by binary functions f : {0, 1}n → {0, 1} satisfying |supp(f )| = k, where supp(f ) := {x ∈
{0, 1}n : f (x) = 1}. Let D be a class of distinguishers that is efficiently learnable. There exists an
efficient (ε, δ)-learner L for B w.r.t. D and the learner always outputs an efficient implementation
of a model M that is truthful w.r.t. B.
Note that the truthfulness requirement on the support size cannot be enforced simply using
computationally-bounded distinguishers, because computing the support size of a function f exactly
requires reading the values f (x) for all the exponentially many inputs x ∈ {0, 1}n. Also, this
truthfulness requirement cannot be satisfied directly by a generative model specified by a predictor
p, where the function value f (x) is distributed according to Ber(p(x)) independently of the function
values f (x(cid:48)) of other individuals x(cid:48)
(cid:54)= x. To enforce a fixed support size, the function values of
different individuals must coordinate in a global manner, requiring us to use new techniques. We
create a binary tree with leaves corresponding to the function domain {0, 1}n, and following ideas
in previous work such as [GGN10], we assign support size budgets from the root to the leaves.
However, the true function f ∗ is a single unknown object and is very different from the uniform
distribution considered in [GGN10], so there are no closed-from distributions (such as the binomial
distributions used in [GGN10]) that can guide us to distribute the support size budget from a node
two its two children. Instead, we need to estimate how the budget should be divided, and this
leads to accumulated error towards the leaves and forces us to stop before reaching the leaves. To
efficiently propagate the budgets to the leaves, we solve a zero-sum game where player C chooses
the budgets for the leaves and player D distinguishes them from the target. We show that if player
6
D uses the multiplicative weights algorithm to minimize regret, we can create an indistinguishable
and truthful model from the empirical distribution over the optimal responses from player C.
Learning a Function with Support Access
In the classic setting when learning a function f : {0, 1} → {0, 1}, the learner receives random
samples of form (x, f (x)) for a uniform x ∈ {0, 1}. In this work, we also consider a function object
in which we receive a random positive entry. That is, the learner receives random x's such that
f (x) = 1. This type of random access is natural is certain situations, for example when we have
information on the individuals that graduated some program, but not on those that did not.
Theorem 1.2 (Informal statement of Theorem 3.15). Let α > 0, and let f : {0, 1} → {0, 1} be a
function such that Pr[f (x) = 1] = α. Let D be a collection of distinguishers, each D ∈ D associated
with a set SD ⊆ [N ] and accepts x if x ∈ SD. If there exists a weak agnostic learner for D, then
there exists a learning algorithm L running in time poly(n), that receives random elements from
the set {x|f (x) = 1} and outputs a model M that is indistinguishable from f to all D ∈ D.
The theorem holds when there is a weak agnostic learner for the collection of distinguishers D
under the distribution of a random support element (i.e. random x s.t. f (x) = 1). We show in
Section 3.3.1 that if a collection of distinguishers D has a weak agnostic learner over the standard
sample access distribution, and the learner is a statistical query algorithm, then there is a learner
for D also under the distribution of random support element.
The proof of the theorem is similar to the classic boosting argument, with an additional step that
the learner preforms of keeping the support size of the model approximately the same as support
size of f . This step is necessary because under the distribution of a random support element,
the boosting algorithm is only promised to work when the support sizes of f and the model are
approximately equal.
Learning an object under the distribution of random support element is potentially very useful in
the case of sparse objects. For a sparse function f , if we choose a uniform x ∈ {0, 1}, then f (x) = 0
with high probability, and a learner cannot hope to learn anything non-trivial with random samples
of form (x, f (x)). Unfortunately, the above theorem does not hold for sparse functions, but in the
next part we show how this theorem can be used to learn different sparse objects - sparse graphs.
Learning Sparse Graphs Without Dense Subgraphs
Suppose G = ([N ], E) is a graph represented by the N 2 length string of its adjacency matrix. In
this representation, receiving a random edge from G is equivalent to receiving a random support
element from the function representing its adjacency matrix. Therefore, Theorem 1.2 implies that
we can learn a model for G that is indistinguishable for a set of distinguishers D that have a weak
agnostic learner. The theorem only holds for functions f with a constant fraction of 1 entries,
which corresponds to a dense graph. What about sparse graphs?
Learning a sparse graph, or a sparse object in general, is a very challenging task because of the
huge domain. The weak regularity lemma [FK99] has error that is proportional to N 2, which is too
much in the case of sparse graphs (an empty graph is indistinguishable from a sparse graph with
this error). Therefore in the setting of a sparse graphs it is more natural to require an ε error from
the distinguisher under the distribution of receiving a random edge. Under this distribution, the
error of the distinguishers scales with the number of edges. We show a learner for a specific class
7
of sparse graphs, those that have no dense subgraphs. We note that a random sparse graph has no
dense subgraphs, so many graphs have this property.
Theorem 1.3 (Informal statement of Theorem 4.3). Let G = ([N ], E) be a sparse graph with
no dense subgraphs. Let D be a collection of distinguishers, each D ∈ D associated with two sets
UD, VD ⊆ [N ] and accepts an edge (u, v) if u ∈ UD, v ∈ VD. If there exists a weak agnostic learner
for D, then there exists a learning algorithm L running in time polylog(N ), that receives random
edges from G and outputs a model M that is indistinguishable from f to all D ∈ D.
The model that the learner outputs is dense, i.e. the model outputs graphs with Θ(N 2) many
edges. This is done because of technical reasons - to allow us to use rejection sampling when training
the model. This brings us to the question, is there a dense graph that is indistinguishable from our
sparse graph G? The answer to this question depends on G, and in Claim 4.5 we show that if a
sparse graph G has a very dense subgraph, then there is no dense graph that is indistinguishable
from G.
The proof of the theorem has two parts, in the first part we show that for every sparse graph
G with no dense subgraphs, there exists a dense graph H that is indistinguishable from G. In this
part of the proof we apply the strong regularity lemma for sparse graphs [KR03, Sco11] on G, and
use the resulting partition to build the dense indistinguishable graph H. This part of the proof is
existential, and we do know how to find H efficiently, as the strong regularity lemma does not have
an efficient algorithm for finding the partition. It is not possible to use the weak regularity lemma
or its variants [FK99], because its error is too large. In the second part of the proof, we reduce the
learning G to learning H, and show that the resulted model M is indistinguishable from G to all
distinguishers D ∈ D.
Other Results on Learning Generative Models
In this work we also show indistinguishable models in several other settings
• Let f : {0, 1}n → {0, 1}n be a function. Learning such function is harder than learning a
binary function because the large domain makes f a sparse object (when viewed as a graph for
example it is an out-degree one graph). For such functions, we show that there exists a learner
that given samples from the distribution (x, f (x)), outputs a model that is indistinguishable
against the following set of distinguishers D = {(SD, jD)|SD ⊂ {0, 1}n , jD ∈ [n]} such that
D = 1 ⇐⇒ x ∈ SD, f (x)j = 1. This appears on Section 3.4.
• In Section 4.1 we apply the theorems for functions on the adjacency matrix of a dense graph
G = ([N ], E). For a set of distinguishers D that have a weak agnostic leaner, we have an
efficient learner that outputs an indistinguishable model when G is:
1. A dense graph when the learner receives random adjacency matrix entries.
2. A dense graph with a fixed total number of edges m = Θ(N 2).
3. A directed graph with a fixed out-degree m = Θ(N ).
4. A dense graph when the learner receives random edges.
• For a directed graph G = ({0, 1}n, E) with constant out-degree d, we can treat each of the
d outgoing degrees as a function fi : {0, 1}n → {0, 1}n. For the same set of distinguishers
8
that we can handle in the case of a length-preserving functions (the first item in this list), we
provide an efficient learner. See Section 4.3.
• In the case of a uniform degree undirected graph, we provide in Section 4.4 a learning algorithm
for an indistinghuishable model, albeit for a somewhat limited set of distinguishers.
Impossibility Results
As we discussed earlier, our goal of learning a generative model is closely related to the goal
in [GGN10] of implementing huge random objects, but a key difference is that we assume the
groundtruth is a single unknown object B∗, whereas [GGN10] considers a known uniform distribu-
tion of objects. This means that we need an additional learning procedure to collect information
about B∗, and we show in Section 5 that our task of efficiently learning a generative model is only
possible when the distinguisher class is efficiently learnable.
Besides the requirement of learning, our setting is more challenging than the setting in [GGN10]
in many other ways. We demonstrate this by another two impossibility results on fooling entry-
access distinguishers and fooling stronger distinguishers than the model. When we consider a
pseudorandom function, fs, the function is indistinguishable from the uniform distribution to dis-
tinguishers that have entry access to the function (allowed to ask for an arbitrary string x and
get fs(x)). Furthermore, while fs is computable in a fixed polynomial time, the distinguishers can
run in any polynomial time (and under reasonable assumptions, even exponential time). [GGN10]
and subsequent work inherit these two properties - indistinguishability to distinguishers that are
computationally more complex than the models and have entry access to the model. In Section 5
we argue that neither of these properties is achievable in our setting.
For the impossibility of fooling distinguishers with entry access, in Theorem 5.1 we give the
example of a class D that contains a distinguisher Dx for every input x ∈ {0, 1}n which queries
the function value f (x) for a function f and outputs "accept" if and only if f (x) = 1. We argue
that every model M that is indistinguishable from the true f ∗ for the set of distinguishers D has
to be very close to f ∗. Since the size of f ∗ is exponential and f ∗ is unknown, no efficient learner
can output a model that is close to f ∗. We also show an example, using an idea from [TTV09],
of a distinguisher and a true function f ∗, such that the distinguisher can tell apart f ∗ from any
model M with a low complexity compared to the distinguisher (Theorem 5.2). This highlights the
fact that in our setting, the generative model and the learner constructing the model have to be
computationally comparable or stronger than the distinguishers.
1.3 Related Work
As mentioned in Section 1.1, [GGN10] introduced the problem of creating an indistinguishable
[GGN10] as well as follow-up works [NNT05, NN07] also
implementation of a random object.
present a collection of positive results for dense and sparse graphs or functions with a variety of
truthfulness conditions and access models of the distinguishers.
The connection between generative models and indistinguishability has been manifested through
the invention of generative adversarial networks (GANs) [GPAM+14, AGL+17].
Intuitively, a
GAN is trained to imitate a distribution of objects (say images). The generator is trained in
concert with a discriminator that could be interpreted as a distinguisher. Through a sequence of
rounds, the generator is trained to fool the discriminator which is then trained to fail the generator.
9
GANs highlight the connection between generative models and indistinguishability [Imp17], but
they do not naturally fall into our framework as they are more directly described in terms of
indistinguishability of two distributions.
The connection between indistinguishability and learning theory has been established in many
previous works (e.g. [TTV09] applies the boosting technique from learning theory). More recently,
in the context of algorithmic fairness, the relation between learning theory and indistinguishability
has been dramatically expanded in the notions of multicalibration and outcome indistinguishabil-
ity [HJKRR18, DKR+21], in applications to learning and statistical inference through the notions
of omnipredictors and universal adapatability [GKR+22, KKG+22, HLNRY22, GHK+23, KP23]
and in the emergence of research uncovering intricate and exciting connections while studying the
sample complexity of indistinguishability from a learning-theoretic perspective [HPR22, HP23].
It is possible to view our learning setting as a 2-players zero-sum game, between the learner and
the distinguishers, in which the learner's goal is to output a model for an indistinguishable object
and the distinguishers try to tell apart the input and the model. In this setting, there is a relation
between min-max theorems and regularity-lemma theorems. Such theorems prove that it is possible
to express a complex object f by a function of a few simpler objects g1, . . . gt that, in our setting,
represent the distinguishers [TTV09, VZ13]. There have been works improving the parameters and
also using such theorems for applications in cryptography [VZ13, JP14, Sk ́o16a, Sk ́o16b, Sk ́o17,
CCL18]. In this work, our setting is slightly different, as we assume that the object f is complex
and unknown, and the learner has to learn it. The proof of Theorem 1.3 has an intermediate step
that is existential and has a similar structure to a weak regularity lemma theorems, but since the
required error there is too small, we derive it from the sparse strong regularity lemma.
2 Preliminaries
Throughout the paper, we are interested in learning objects such as functions and graphs, and we are
particularly interested when these objects have exponential sizes (e.g. functions with exponentially
large domains and graphs with exponentially many vertices and edges). We typically use B to
denote an object, and use B to denote a class of objects. We view an object B as a function
B : Q → ∆A that maps a query q ∈ Q to a distribution B(q) over answers in A.
Functions. When the object is a function f : X → Y , we consider three access types. For sample
access, B returns a random pair (x, f (x)). For support access, it returns a random x such that
f (x) = 1. For entry access, upon querying x, B returns f (x).
Definition 2.1 (Function-induced sample-access object). Let f : X → Y be a function and let B :
Q → ∆A be an object. We say B is the sample-access object induced by f if Q = {⊥}, A = X × Y ,
and B(⊥) is the distribution of (x, f (x)) ∈ A where x is drawn uniformly from X.
Definition 2.2 (Function-induced support-access object). Let f : X → {0, 1} be a binary function.
We define the support of f to be supp(f ) := {x ∈ X : f (x) = 1}. Let B : Q → ∆A be an object.
Assuming supp(f ) (cid:54)= ∅, we say B is the support-access object induced by f if Q = {⊥}, A = X,
and B(⊥) is the uniform distribution over supp(f ) ⊆ X.
Definition 2.3 (Function-induced entry-access object). Let f : X → Y be a function and let B :
Q → ∆A be an object. We say B is the entry-access object induced by f if Q = X, A = Y , and for
every q ∈ Q, B(q) is the singleton distribution such that a ∼ B(q) equals to f (q) deterministically.
10
In this paper, we show positive results for learning generative models of functions with sample
access and support access (Section 3) whereas we show impossibility results for entry access (Sec-
tion 5). This separation is mainly because entry access makes the distinguishers stronger and thus
makes indistinguishability harder to achieve (see Definitions 2.6 and 2.7 below).
Graphs. For a graph G = (V, E) where we assume V has exponential size, we define two access
types, sample-access which corresponds to a random adjacency matrix entry, and support-access
which corresponds to a random edge in the graph.
Definition 2.4 (Graph-induced sample-access object). Let G = (V, E) be a directed or undirected
graph and let B : Q → ∆A be an object. We say B is the sample-access object induced by G if
Q = {⊥}, A = V × V × {0, 1}, and B(⊥) is the distribution of (u, v, y) ∈ A where (u, v) is drawn
uniformly from V × V , y = 1 if (u, v) ∈ E and y = 0 otherwise.
Definition 2.5 (Graph-induced support-access object). Let G = (V, E) be a directed or undirected
graph and let B : Q → ∆A be an object. Assuming E (cid:54)= ∅, we say B is the support-access object
induced by G if Q = {⊥}, A = V × V , and B(⊥) is the uniform distribution over E ⊆ V × V .
Indistinguishability. Each learner we design in this paper has access to a ground-truth object
B∗, and it aims to output an object B that is indistinguishable from B∗.
In many cases, the
learner does not just output a single object B, but a distribution over objects, and we refer to such
distributions as models. Below we formally define the notion of indistinguishability.
Definition 2.6 (Distinguisher). A distinguisher D is an algorithm that when given access to an
object B : Q → ∆A, outputs "accept" or "reject". That is, the distinguisher is allowed to make
queries q ∈ Q to the model, and for each query q the distinguisher receives an answer a ∈ A drawn
independently from B(q) ∈ ∆A. We allow the distinguisher D itself to be randomized, and we use
random variable DB to denote the output of the distinguisher D in {"accept", "reject"} when given
access to B.
Definition 2.7 (Indistinguishability). Let B∗ : Q → ∆A be an object, and let model M be a
distribution over objects B : Q → ∆A. We say model M is ε-indistinguishable from object B∗
w.r.t. a distinguisher D if
| Pr[DB∗
= "accept"] − EB∼M [Pr[DB = "accept"]]| ≤ ε.
(1)
We say model M is ε-indistinguishable from object B∗ w.r.t. a class D of distinguishers if (1) holds
for every D ∈ D.
Truthfulness.
In addition to indistinguishability, another desirable property of a model is truth-
fulness introduced in [GGN10]. Truthfulness requires every object generated from the model to
satisfy a certain (usually global) property which we formalize using an object class B:
Definition 2.8 (Truthfulness). We say a model M is truthful w.r.t. an object class B if
PrB∼M [B ∈ B] = 1.
11
Implementations. Our goal is to design efficient learners, and thus we cannot expect the learner
to output a model M explicitly, especially when the objects drawn from M are huge. Instead, our
learner outputs an efficient implementation of a model, defined as follows.
Definition 2.9 (Ordinary Implementation). For (cid:96) ∈ Z≥0, let T be a randomized algorithm that
takes (r, q) ∈ {0, 1}(cid:96)×Q as input, and outputs T (r, q) ∈ A. We say T is an ordinary implementation
of a model M with seed length (cid:96) if for every seed r ∈ {0, 1}(cid:96) there exists an object Br : Q → ∆A
such that
1. for every q ∈ Q, T (r, q) is distributed according to Br(q), where the randomness in T (r, q)
comes from the internal randomness in algorithm T ;
2. Br is distributed according to M when r is drawn uniformly from {0, 1}(cid:96).
While our goal is to output an ordinary implementation with a polynomial-length seed, following
the approach in [GGN10], it is more convenient to first build implementations using a random oracle
and then transform the implementation to an ordinary one using Lemma 2.1.
Definition 2.10 (Random-Oracle Implementation). Let T be a randomized algorithm that takes a
function r : {0, 1}∗ → {0, 1} as an oracle. On an input q ∈ Q, the algorithm T outputs T r(q) ∈ A.
We say T is a random-oracle implementation of a model M if for every r : {0, 1}∗ → {0, 1} there
exists an object Br : Q → ∆A such that
1. for every q ∈ Q, T r(q) is distributed according to Br(q), where the randomness in T r(q) comes
from the internal randomness in algorithm T ;
2. Br is distributed according to M when r is a uniformly random function from {0, 1}∗ to {0, 1}.
Lemma 2.1 (Theorem 2.9 in [GGN10]). Suppose that one-way functions exist. There exists an
algorithm H with the following properties. Let D be a class of distinguishers where each D ∈ D
is a circuit of size at most W for some W ≥ 1. Let T be a random-oracle implementation of a
model M with circuit complexity at most W . Given W, T and an arbitrary ε ∈ (0, 1) as input, the
algorithm H runs in time poly(W, 1/ε) and outputs an ordinary implementation T (cid:48) of a model M (cid:48)
where T (cid:48) has seed length and circuit complexity both being poly(W, 1/ε), and
| EB(cid:48)∼M (cid:48) Pr[DB(cid:48)
= "accept"] − EB∼M Pr[DB = "accept"]| ≤ ε
for every D ∈ D.
Moreover, if M is truthful w.r.t. an object class B, then M (cid:48) is also truthful w.r.t. B.
Lemma 2.1 can be proved by using a pseudorandom function to emulate the random oracle.
Learning. We describe the learners we aim to design in the definition below.
Definition 2.11 (Learner). Let B be a class of objects B : Q → ∆A and D be a class of distin-
guishers. An (ε, δ)-learner L for the class B w.r.t. D is an algorithm with the following properties.
For any B∗ ∈ B, given access to B∗, the learner outputs an implementation T of a model M such
that with probability at least 1 − δ, M is ε-indistinguishable from B∗ w.r.t. D.
12
Other Notations. For v ∈ R, we define cap(v) by capping its value into [0, 1], i.e.,
cap(v) =
v,
1,
0,
if 0 ≤ v ≤ 1;
if v > 1;
if v < 0.
Given a list of values (v1, . . . , vt) we define Lcap(v1, . . . , vt) by summing over the list and capping
the value to [0, 1] in every iteration. We formally define it recursively:
Lcap(v1) = cap(v1),
Lcap(v1, . . . , vt) = cap(Lcap(v1, . . . , vt−1) + vt).
(2)
3 Learning Functions with Exponentially Large Domains
The goal of this section is to efficiently learn a generative model that is indistinguishable from a
target function f ∗ : X → Y to a class D of distinguishers. We allow the domain X of the function
to have exponential size N := |X|, and require our learner to run in time polylog(N ). This means
that the learner cannot read the entire function f ∗, and can only access it via random sample.
Throughout the paper, our learners output an efficient random-oracle implementation T of a model
M , which can be turned in to an efficient ordinary implementation by Lemma 2.1.
3.1 Learning Sample-Access Binary Functions
We start by studying the case where the target object B∗ is the sample-access object induced by
a binary function f ∗ : X → {0, 1} (Definition 2.1). We assume that every distinguisher D ∈ D
satisfies the following: when given access to a sample-access object B induced by a function f :
X → {0, 1}, the distinguisher asks a single query ⊥, receives an answer a = (x, y) ∼ B(⊥), and
outputs D(x, y) ∈ {"accept", "reject"}. We allow the distinguisher itself to be randomized, and
each distinguisher D defines a function gD : X → [−1, 1] such that
gD(x) = Pr[D(x, 1) = "accept"] − Pr[D(x, 0) = "accept"]
for every x ∈ X.
We use the following claim to relate a distinguisher D ∈ D to the function gD : X → [−1, 1]:
Claim 3.1. For every distinguisher D ∈ D, the following equation holds for every x ∈ X and
y1, y2 ∈ {0, 1}:
Pr[D(x, y1) = "accept"] − Pr[D(x, y2) = "accept"] = y1gD(x) − y2gD(x).
The claim can be easily proved by considering the four possible choices of (y1, y2) ∈ {0, 1} ×
{0, 1}.
As we show later in Section 5, it is necessary to impose certain learnability assumptions on the
distinguishers. To that end, we assume that there is an auditor for the function class G := {gD :
D ∈ D}, defined as follows:
Definition 3.1 (Auditor). Let D and G be defined as above. We say an algorithm Λ is an (ε, γ, δ)-
auditor for G if it satisfies the following property. Given access to a sample-access object B∗ induced
13
by a function f ∗ : X → {0, 1} and taking a predictor p : X → [0, 1] as an oracle, if there exists
g ∈ G such that
| E[f ∗(x)g(x)] − E[p(x)g(x)]| ≥ ε,
then Λ outputs ˆg : X → [−1, 1] satisfying the following with probability at least 1 − δ:
E[f ∗(x)ˆg(x)] − E[p(x)ˆg(x)] ≥ γ.
The auditor defined above can be viewed as a weak agnostic learner for the class G. When
the domain X is {0, 1}n with size N = 2n, many classes allow efficient auditors that run in time
poly(n) = polylog(N ). Using an auditor for G, we prove the following theorem:
Theorem 3.2. Let the distinguisher class D and the function class G be defined above. Let
ε, γ, δ, δ(cid:48) ∈ (0, 1/2) be parameters satisfying γ ≤ ε and δ(cid:48) ≤ cδγ2 for a sufficiently small ab-
solute constant c > 0. Let B be the class of sample-access objects induced by binary functions
f : X → {0, 1}. Let Λ be an (ε, γ, δ(cid:48))-auditor for G (Definition 3.1). Then there exists an (ε, δ)-
learner L for B w.r.t. D. Moreover, if the auditor Λ runs in time at most W1 and always outputs a
function with circuit size at most W2, then the learner L runs in time poly(γ−1, log(δ−1), W1) and
always outputs implementations with circuit complexity ̃O(γ−2W2).
We apply the following result in the algorithmic fairness literature to prove Theorem 3.2:
Lemma 3.3 (Learning a multiaccurate predictor [TTV09, HJKRR18, KGZ19]). Let the distin-
guisher class D and the functions class G be defined as above. Let ε, γ, δ, δ(cid:48) ∈ (0, 1/2) be parameters
satisfying γ ≤ ε and δ(cid:48) ≤ cδγ2 for a sufficiently small absolute constant c > 0. Let Λ be an (ε, γ, δ(cid:48))-
auditor for G. Given access to a sample-access object B∗ induced by a function f ∗ : X → {0, 1},
there is a learner L that outputs a predictor p : X → [0, 1] such that with probability at least 1 − δ,
| E[f ∗(x)g(x)] − E[p(x)g(x)]| ≤ ε
for every g ∈ G.
(3)
Moreover, if the auditor Λ runs in time at most W1 and always outputs a function with circuit size
at most W2, then the learner L runs in time poly(γ−1, log(δ−1), W1) and always outputs implemen-
tations with circuit complexity ̃O(γ−2W2).
Proof of Theorem 3.2. Let B∗ be the sample-access object induced by a binary function f ∗ : X →
{0, 1}. It suffices to turn the predictor p from Lemma 3.3 into an efficient random-oracle imple-
mentation T of a model M that is ε-indistinguishable from B∗ w.r.t. D. Let us consider a random
function f : X → {0, 1} such that for every x ∈ X, the function value f (x) is drawn independently
from Ber(p(x)). By Claim 3.1, for every distinguisher D ∈ D, we have
| Ex[Pr[D(x, f ∗(x)) = "accept"]] − Ef,x[Pr[D(x, f (x)) = "accept"]]|
= | Ex[f ∗(x)gD(x)] − E[p(x)gD(x)]|.
(4)
Therefore, if we choose the model M to be the distribution over the sample-access object Bf
induced by the random function f , then (3) and (4) imply that M is ε-indistinguishable from B∗
w.r.t. D. To implement M efficiently using a random oracle r : {0, 1}∗ → {0, 1}, for each x ∈ X,
we designate a set Sx ⊆ {0, 1}∗ so that Sx ∩ Sx(cid:48) = ∅ for x (cid:54)= x(cid:48). We first generate a random x ∈ X
uniformly from X, and then draw y ∼ Ber(p(x)) using the randomness from Sx. We return the
answer (x, y). This is an implementation for M for the following reasons. For every fixed r, there
exists a function f : X → {0, 1} such that the answer (x, y) always satisfies y = f (x) and the
distribution of x is uniform in X. Moreover, when r is random, the conditional distribution of y
given x is Ber(p(x)).
14
3.2 Truthful Learning That Preserves Support Size
Some desirable properties of a generative model are global and cannot be enforced using com-
putationally bounded distinguishers alone. This motivated [GGN10] to introduce the notion
of truthfulness that ensures such global properties beyond indistinguishability. Here we focus
on a natural global property of a binary function f : X → {0, 1}:
the size of its support
supp(f ) := {x ∈ X : f (x) = 1}. The model M we create in Section 3.1 using the multiaccu-
rate predictor p from Lemma 3.3 may generate functions f with support size different from the
target function f ∗. Indeed, even if (cid:80)
x∈X p(x) = |supp(f ∗)|, a random function f with each entry
f (x) independently drawn from Ber(p(x)) is not guaranteed to satisfy |supp(f )| = |supp(f ∗)|. Now
we show an efficient learner that outputs truthful models that preserve the support size of the
generated functions.
Theorem 3.4. Let the distinguisher class D and the function class G be defined as in Section 3.1.
Let ε, γ, δ, δ(cid:48) ∈ (0, 1/2) be parameters satisfying γ ≤ ε and δ(cid:48) ≤ cδγ2 for a sufficiently small
absolute constant c > 0. Let B be the class of sample-access objects induced by binary functions
f : X → {0, 1} satisfying |supp(f )| = k, where X = {0, 1}n. Let Λ be an (ε, γ, δ(cid:48))-auditor for
G (Definition 3.1). Then there exists an (ε, δ)-learner L for B w.r.t. D and the learner always
outputs a random-oracle implementation of a model M that is truthful w.r.t. B. Moreover, if the
auditor Λ runs in time at most W1 and always outputs a function with circuit size at most W2,
then the learner L runs in time poly(n, γ−1, log(δ−1), W1) and always outputs an implementation
with circuit complexity poly(n, γ−1, W2).
We prove Theorem 3.4 using Lemma 3.3 and the following lemma:
Lemma 3.5 (Fixed-weight implementation from a predictor). Define X = {0, 1}n for a positive
integer n. Let k be an integer satisfying 0 ≤ k ≤ |X| and let ε ∈ (0, 1) be a parameter. There exists
a poly(n, ε−1)-time implementation T such that T takes an arbitrary predictor p : X → [0, 1] as
an oracle and T implements a model M such that each object B ∼ M is the sample-access object
induced by a binary function fB : X → {0, 1}. Moreover, for every predictor p : X → [0, 1], the
resulting model M satisfies
1. PrB∼M [(cid:80)
2. (cid:80)
x∈X fB(x) = k] = 1;
x∈X | EB∼M fB(x) − p(x)| ≤ |k − (cid:80)
x∈X p(x)| + ε|X|.
We first prove Theorem 3.4 using Lemma 3.5 and then prove Lemma 3.5.
Proof of Theorem 3.4. We start with the observation that using Λ, we can build an auditor Λ(cid:48) for
G ∪ {g1}, where g1 is the constant 1 function: g1(x) = 1 for every x ∈ X. This is because we
can accurately estimate E[f ∗(x)g1(x)] − E[p(x)g1(x)] using random examples (x, f ∗(x), p(x)) for x
drawn uniformly from X.
Let B∗ be the sample-access object induced by a function f ∗ : X → {0, 1} satisfying supp(f ∗) =
k. By Lemma 3.3, we can learn a predictor p : X → {0, 1} such that
| Ex[f ∗(x)g(x)] − Ex[p(x)g(x)]| ≤ ε/4
for every g ∈ G ∪ {g1}.
(5)
In particular, choosing g = g1, we have
(cid:12)
(cid:12)
(cid:12)
k −
(cid:12)
(cid:12)
p(x)
(cid:88)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
x∈X
= |X| * | E[f ∗(x)g1(x)] − E[p(x)g1(x)]| ≤ ε|X|/4.
15
We apply Lemma 3.5 on p to obtain an implementation T of a model M such that each object
B ∼ M is the sample-access object induced by a binary function fB : X → {0, 1}. Lemma 3.5
allows us to ensure that
PrB∼M [|supp(fB)| = k] = 1,
| EB∼M fB(x) − p(x)| ≤ ε|X|/2.
(cid:88)
x∈X
(6)
(7)
It remains to prove that M is ε-indistinguishable from B∗ w.r.t. D and that M is truthful w.r.t.
B. The truthfulness follows immediately from (6). We prove indistinguishability below. For every
g ∈ G, we have
| Ex[p(x)g(x)] − EB∼M Ex[fB(x)g(x)]| ≤
(cid:12)
(cid:12)
(cid:12)
Ex
(cid:104)
g(x) EB∼M [fB(x) − p(x)]
(cid:105)(cid:12)
(cid:12)
(cid:12)
≤ Ex | EB∼M fB(x) − p(x)|
≤ ε/2,
(8)
where the last inequality follows from (7). Combining (5) and (8), for every g ∈ G,
| Ex[f ∗(x)g(x)] − EB∼M Ex[fB(x)g(x)]| ≤ ε.
By Claim 3.1, this implies that M is ε-indistinguishable from B∗ w.r.t. D.
In the following sub-sections, we prove Lemma 3.5 starting with an inefficient implementation
and building to more and more efficient ones, where we use N = 2n to denote the domain size |X|.
For convenience, we sometimes take [N ] := {1, . . . , N } to be our domain in place of X = {0, 1}n,
in which case we allow N to be not necessarily a power of 2.
3.2.1 Step 1: Exact Model with 2O(N ) Time Implementation
We prove the following lemma which can be viewed as a version of Lemma 3.5 with α = ε = 0 and
without efficiency requirement for the model:
Lemma 3.6. Let p : [N ] → [0, 1] be a predictor satisfying (cid:80)
There exists a distribution μ over binary functions f : [N ] → {0, 1} such that
x∈[N ] p(x) = k for some integer k.
1. Prf ∼μ[(cid:80)
x∈[N ] f (x) = k] = 1, and
2. for every x ∈ [N ], Ef ∼μ[f (x)] = p(x).
For two functions p, p(cid:48) : [N ] → R, we define their inner product to be (cid:104)p, p(cid:48)(cid:105) := (cid:80)
x∈[N ] p(x)p(cid:48)(x).
Our proof of Lemma 3.6 is based on the following claim:
Claim 3.7. Let N, k be integers satisfying N > 0 and 0 ≤ k ≤ N . Let p : [N ] → [0, 1] be a
function satisfying (cid:80)
x∈[N ] p(x) = k. For any function w : [N ] → R with function values sorted
as w(σ(1)) ≥ * * * ≥ w(σ(N )) for a bijection σ : [N ] → [N ], let f : [N ] → {0, 1} be the function
satisfying f (σ(1)) = * * * = f (σ(k)) = 1 and f (σ(k + 1)) = * * * = f (σ(N )) = 0. Then
(cid:104)w, f (cid:105) ≥ (cid:104)w, p(cid:105).
16
Proof. By rearranging the coordinates, it is w.l.o.g. to assume that σ(i) = i for every i ∈ [N ].
Defining w(N + 1) = 0, we have
(cid:104)w, p(cid:105) =
(cid:88)
i∈[N ]
w(i)p(i)
=
=
=
(cid:88)
N
(cid:88)
(w(j) − w(j + 1))p(i)
i∈[N ]
(cid:88)
j=i
(cid:88)
(w(j) − w(j + 1)p(i)
i∈[j]
(w(j) − w(j + 1))
j∈[N ]
(cid:88)
j∈[N ]
p(i)
(cid:88)
i∈[j]
f (i).
(cid:88)
i∈[j]
i∈[j] f (i) for every j = 1, . . . , N , and additionally
and similarly
(cid:104)w, f (cid:105) =
(cid:88)
j∈[N ]
(w(j) − w(j + 1))
It is clear that (cid:80)
i∈[N ] p(i) = k = (cid:80)
(cid:80)
(cid:88)
(cid:104)w, p(cid:105) =
i∈[j] p(i) ≤ min{j, k} = (cid:80)
i∈[N ] f (i). Therefore,
(w(j) − w(j + 1))
p(i) ≤
(cid:88)
i∈[j]
(cid:88)
j∈[N ]
(w(j) − w(j + 1))
f (i) = (cid:104)w, f (cid:105).
(cid:88)
i∈[j]
j∈[N ]
Proof of Lemma 3.6. Let F denote the set of functions f : [N ] → {0, 1} satisfying |supp(f )| = k.
We first show that p belongs to the convex hull of F . Assuming that this is not the case, by the
hyperplane separation theorem, there exists w : [N ] → R and b ∈ R such that (cid:104)w, p(cid:105) − b > 0 and
(cid:104)w, f (cid:105) − b < 0 for every f ∈ F . By Claim 3.7, there exists f ∈ F such that (cid:104)w, f (cid:105) ≥ (cid:104)w, p(cid:105), and
thus (cid:104)w, f (cid:105) − b ≥ (cid:104)w, p(cid:105) − b > 0, a contradiction.
We have proved that p is in the convex hull of F . This means that there exists a probability
distribution μ over F such that Ef ∼μ[f (x)] = p(x) for every x ∈ [N ], as desired.
Clearly, the distribution μ can be explicitly computed using a linear program in time 2O(N )
where the variables are the probability mass on each f : [N ] → {0, 1}.
3.2.2 Step 2: Indistinguishable Model with poly(N ) Time Implementation
We prove the following variant of Lemma 3.6 where we allow a small ε error but require a poly(N )
time algorithm to sample from the distribution μ.
Lemma 3.8. Let N > 1 be a positive integer, and let p : [N ] → [0, 1] be a predictor satisfying
(cid:80)
x∈[N ] p(x) = k for some integer k. For any ε ∈ (0, 1/2), there exists a distribution μ over binary
functions f : [N ] → {0, 1} such that
1. Prf ∼μ[(cid:80)
x∈[N ] f (x) = k] = 1, and
2. for every x ∈ [N ], | Ef ∼μ[f (x)] − p(x)| ≤ ε.
Moreover, μ can be taken as the uniform distribution over f (1), . . . , f (T ) for T = O(ε−2 log N ), and
the list f (1), . . . , f (T ) can be computed in time ̃O(ε−2N ) given p as input.
17
We prove Lemma 3.8 using the multiplicative weights algorithm. We need the following no-
tations. We define ∆N to be the set of all functions w : [N ] → R≥0 satisfying (cid:80)
x∈[N ] w(x) = 1.
For two functions w, w(cid:48) ∈ ∆N , assuming w(cid:48)(x) > 0 for every x ∈ [N ], we define DKL(w(cid:107)w(cid:48)) =
(cid:80)
x∈[N ] w(x) ln(w(x)/w(cid:48)(x)) with the convention that 0 ln 0 = 0. For a function r : [N ] → R, we
define (cid:107)r(cid:107)∞ := maxx∈[N ] |r(x)|. For functions r, r(cid:48) : [N ] → R, we define r (cid:5) r(cid:48) : [2N ] → R to be the
function such that
(r (cid:5) r(cid:48))(x) =
(cid:40)
r(x),
r(cid:48)(x − N ),
if x ≤ N ;
if x > N.
The definition of r (cid:5) r(cid:48) allows us to state the following basic fact that will be useful:
Claim 3.9. For any function r : [N ] → R, there exists w ∈ ∆2N such that (cid:104)w, r (cid:5) (−r)(cid:105) = −(cid:107)r(cid:107)∞.
The claim above allows us to express −(cid:107)r(cid:107)∞ as an inner product. Note that it is crucial to
extend r to r (cid:5) (−r). The claim would not hold if we instead consider inner products of the form
(cid:104)w, r(cid:105) for w ∈ ∆N because of the restriction that w(x) ≥ 0 for every w ∈ ∆N and x ∈ [N ].
The following is a standard lemma for analyzing the multiplicative weights algorithm:
Lemma 3.10 (Multiplicative Weights). Let w(1) ∈ ∆N and r : [N ] → R be two functions. Assume
w(1)(x) > 0 for every x ∈ [N ]. Define ˆw : [N ] → R and w(2) ∈ ∆N such that for every x ∈ [N ],
ˆw(x) = w(1)(x)e−r(x),
w(2)(x) = ˆw(x)/
(cid:88)
ˆw(x(cid:48)).
x(cid:48)∈[N ]
Then for every w ∈ ∆N
(cid:104)w(1) − w, r(cid:105) ≤ DKL(w(cid:107)w(1)) − DKL(w(cid:107)w(2)) +
1
2
(cid:107)r(cid:107)2
∞.
Proof of Lemma 3.8. We initialize w(1) ∈ ∆2N such that w(1)(x) = 1/(2N ) for every x ∈ [2N ].
In the i-th iteration, we perform the following computation. We break w(i) into two functions
w(i,+), w(i,−) : [N ] → [0, 1] such that w(i) = w(i,+) (cid:5) w(i,−). Using Claim 3.7, we can efficiently
compute f (i) ∈ {0, 1}N such that |supp(f (i))| = k and
(cid:104)w(i,+) − w(i,−), f (i)(cid:105) ≥ (cid:104)w(i,+) − w(i,−), p(cid:105).
(9)
Define r(i) : [2N ] → R such that r(i) = (f (i) − p) (cid:5) (p − f (i)). We compute w(i+1) using the
multiplicative weights algorithm with step size α:
ˆw(i+1)(x) ← w(i)(x)e−αr(i)(x),
(cid:88)
w(i+1)(x) ← ˆw(i+1)(x)/
ˆw(i+1)(x(cid:48))
x(cid:48)∈[N ]
By Lemma 3.10, for every w ∈ ∆2N ,
α(cid:104)w(i) − w, r(i)(cid:105) ≤ DKL(w(cid:107)w(i)) − DKL(w(cid:107)w(i+1)) + α2(cid:107)r(i)(cid:107)2
∞.
18
Summing up over i = 1, . . . , T and noting that DKL(w(cid:107)w(1)) ≤ ln(2N ), DKL(w(cid:107)w(T +1)) ≥ 0 and
(cid:107)r(i)(cid:107)∞ ≤ 1, we have
(cid:88)
α(cid:104)w(i) − w, r(i)(cid:105) ≤ ln(2N ) + α2T,
which implies
i∈[T ]
1
T
(cid:88)
i∈[T ]
(cid:104)w(i), r(i)(cid:105) ≤
ln(2N )
αT
+ α +
(cid:42)
w,
1
T
(cid:88)
i∈[T ]
(cid:43)
r(i)
.
By the definition of w(i,+), w(i,−) and r(i),
(cid:104)w(i), r(i)(cid:105) = (cid:104)w(i,+), f (i) − p(cid:105) + (cid:104)w(i,−), f − q(i)(cid:105) = (cid:104)w(i,+) − w(i,−), f (i) − p(cid:105) ≥ 0,
where the last inequality follows from (9). Plugging this into (10), for every w ∈ ∆2N ,
0 ≤
ln(2N )
αT
+ α +
(cid:42)
w,
1
T
(cid:88)
i∈[T ]
(cid:43)
r(i)
.
(10)
(11)
By our definition r(i) = (f (i) − p) (cid:5) (p − f (i)) and Claim 3.9, there exists w ∈ ∆2N such that
(cid:104)w, (cid:80)
i∈[T ](f (i) − p)(cid:107)∞, so (11) implies
i∈[T ] r(i)(cid:105) = −(cid:107) (cid:80)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
1
T
(cid:88)
i∈[T ]
f (i) − p
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)∞
≤
ln(2N )
αT
+ α.
i=1 f (i) − p(cid:107)∞ ≤ 2(cid:112)(ln(2N ))/T ≤ ε.
Setting T = (cid:100) 4 ln(2N )
The proof is completed by noting that the multiplicative weights algorithm allows us to compute
f (1), . . . , f (T ) in time ̃O(N T ) = ̃O(ε−2N ).
(cid:101) and α = (cid:112)(ln(2N ))/T , we get (cid:107) 1
T
(cid:80)T
ε2
The running time in Lemma 3.8 can be further improved in the case where N (cid:29) 1/ε:
Lemma 3.11. Let N > 1 be a positive integer, and let p : [N ] → [0, 1] be a predictor satisfying
(cid:80)
x∈[N ] p(x) = k for some integer k. For any ε ∈ (0, 1/2), there exists a distribution μ over binary
functions f : [N ] → {0, 1} such that
1. PrM ∼μ[(cid:80)
x∈[N ] f (x) = k] = 1, and
2. for every x ∈ [N ], | Ef ∼μ[f (x)] − p(x)| ≤ ε.
Moreover, given p as input, we can sample from the distribution μ in time ̃O(ε−2r + N ) where
r = min{1/ε, N }.
Proof. We can assume w.l.o.g. that N ≥ 1/ε because of Lemma 3.8. We partition [0, 1] into
u = (cid:100)2/ε(cid:101) sub-intervals Γ1, . . . , Γu with the width of each interval being at most ε/2. These
:= {x ∈ X : p(x) ∈ Γi}. Define
sub-intervals partition X := [N ] into X1, . . . , Xu where Xi
s(i) := (cid:80)
p(x) and define t(i) := s(i) − (cid:98)s(i)(cid:99) for every i ∈ [u]. We have t(i) ∈ [0, 1] and
(cid:80)
i(cid:98)s(i)(cid:99). Define I0 := {i ∈ [u] : t(i) = 0}. By Lemma 3.8, we can
find a distribution over ˆt : [u] \ I0 → {0, 1} such that | E[ˆt(i)] − t(i)| ≤ ε/2 for every i ∈ [u] \ I0
and (cid:80)
ˆt(i) = k(cid:48). Moreover, a random ˆt can be sampled in time ̃O(ε−2r) given t. We define
i t(i) is an integer k(cid:48) = k − (cid:80)
x∈Xi
i∈[u]\I0
19
ˆt(i) = 0 for every i ∈ I0. For every i ∈ [u], we define ˆs(i) := (cid:98)s(i)(cid:99) + ˆt(i).
ˆs(i) ≤ (cid:100)s(i)(cid:101) ≤ |Xi| and
It is clear that
(cid:88)
i∈[u]
ˆs(i) = k,
and
| E[ˆs(i)] − s(i)| ≤ ε/2.
(12)
(13)
Given ˆt, we compute ˆs and for each i ∈ [u], we randomly pick ˆs(i) individuals x in Xi and assign
f (x) = 1, and we assign f (x) = 0 otherwise. This allows us to sample f in time ̃O(N ) given ˆt. By
(12) we have (cid:80)
x f (x) = k. For each individual x ∈ Xi,
Ef [f (x)] = E[ˆs(i)]/|Xi|.
By (13), we have
| Ef [f (x)] − s(i)/|Xi|| ≤ ε/2.
Since the width of Γi is at most ε/2, by the definition of s(i) and Xi, we have |s(i)/|Xi|−p(x)| ≤ ε/2.
Combining this with the inequality above, we have | Ef [f (x)] − p(x)| ≤ ε, as desired.
3.2.3 Step 3: Indistinguishable Model with polylog(N ) Time Implementation
Now we prove Lemma 3.5, where N = 2n is exponentially large and we want our implementa-
tion to run in time poly(n, ε−1). Because of this efficiency requirement, we cannot directly apply
Lemma 3.11 which would only give us a poly(N, ε−1) time implementation. Our idea is to divide
the domain X = {0, 1}n into small groups each with size roughly Θ(ε−1) and apply Lemma 3.11
separately on each group. This requires us to set a target support size for every group so that these
sizes sum up to the total support size k for the entire domain. We achieve this by creating a binary
tree whose root corresponds to the entire domain and whose leaves correspond to the groups. We
assign a target support size for every node of the tree from the root to the leaves. For every non-leaf
node, we determine how to split its support size to its two children by estimating the sum of p(x) in
the sub-domains corresponding to the children. We make sure that the depth of the tree is at most
n so that we can efficiently reach any leaf from the root, which allows us to construct an efficient
implementation.
Because of Lemma 3.11, it is w.l.o.g. to assume 2n ≥ 8/ε in Lemma 3.5. We start by describing
an inefficient randomized algorithm that produces a function f : X → {0, 1} given the predictor p.
We will then choose the model M as the distribution of the sample-access model B induced by the
random function f and show that M can be implemented efficiently.
The randomized algorithm producing the function f operates as follows. For every bit string
z ∈ (cid:83)n
j=0{0, 1}j, we can view z as a node in a binary tree with root being the empty string. Starting
from the root, we assign an integer kz to certain nodes z in the tree as follows. For the root node z,
we set kz := k. Suppose we have assigned an integer kz to a node z of the tree, we assign integers
kz(cid:107)0 and kz(cid:107)1 to the two children z(cid:107)0 and z(cid:107)1 of z as follows. Define z(cid:48) := z(cid:107)0 and let Xz(cid:48) be the set
consisting of x ∈ X such that z(cid:48) is a prefix of x. We draw x1, . . . , xm independently and uniformly
from Xz(cid:48) for m = (cid:100)16n2/ε2(cid:101), and define (cid:96)z(cid:48) := |Xz(cid:48) |
i=1 p(xi). We set ˆkz(cid:107)0 := (cid:98)(cid:96)z(cid:48)(cid:99) ∈ [0, |Xz(cid:48)|]
m
and ˆkz(cid:107)1 := kz − ˆkz(cid:107)0. We then define
(cid:80)m
(kz(cid:107)0, kz(cid:107)1) =
(ˆkz(cid:107)0, ˆkz(cid:107)1),
(kz, 0),
(kz − |Xz(cid:107)1|, |Xz(cid:107)1|),
if 0 ≤ ˆkz(cid:107)1 ≤ |Xz(cid:107)1|,
if ˆkz(cid:107)1 < 0,
if ˆkz(cid:107)1 > |Xz(cid:107)1|.
20
The above procedure allows us to assign an integer kz to every node z, and we use these integers
to construct a function f : X → {0, 1}. Specifically, choosing n(cid:48) to be the largest integer satisfying
2n−n(cid:48) ≥ 8/ε, for every z ∈ {0, 1}n(cid:48), we construct a function fz : Xz → {0, 1}, and the function f is
then constructed by combining fz for all z ∈ {0, 1}n(cid:48).
x∈Xz
To construct each fz, we first construct a predictor p(cid:48)
p(x), we increase each p(x) for x ∈ Xz to p(cid:48)(x) so that (cid:80)
(cid:80)
decrease p(x) to p(cid:48)(x) if kz < (cid:80)
we can randomly construct a function fz : Xz → {0, 1} such that for every x ∈ Xz,
If kz ≥
p(cid:48)(x) = kz. Similarly, we
p(x). Using Lemma 3.11, in time poly(|Xz|, ε−1) = poly(ε−1)
: Xz → [0, 1] as follows.
x∈Xz
x∈Xz
| E fz(x) − p(cid:48)(x)| ≤ ε/2.
(14)
where the expectation is in the randomness of fz.
We analyze the above procedure of generating the function f in the following lemma:
Lemma 3.12. In the procedure above, if we choose m ≥ Cn2/ε2 for a sufficiently large absolute
constant C > 0, then
1. Pr[(cid:80)
x∈X f (x) = k] = 1;
2. (cid:80)
x∈X | E[f (x)] − p(x)| ≤ |k − (cid:80)
x∈X p(x)| + ε|X|.
Note that the probability and expectation are over the randomness in f .
We first prove two helper lemmas below before we prove Lemma 3.12.
Lemma 3.13. Assume that |kz − (cid:80)
x∈Xz
p(x)| ≤ α and |(cid:96)z(cid:107)0 − (cid:80)
x∈Xz(cid:107)0
p(x)| ≤ β. Then
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz(cid:107)0 −
(cid:88)
p(x)
x∈Xz(cid:107)0
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz(cid:107)1 −
(cid:88)
p(x)
x∈Xz(cid:107)1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ α + 2β + 2.
Proof. By our choice of ˆkz(cid:107)0 = (cid:98)(cid:96)z(cid:107)0(cid:99) and ˆkz(cid:107)1 = kz − ˆkz(cid:107)0, we have
(cid:12)
(cid:12)
(cid:12)
ˆkz◦0 −
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
x∈Xz(cid:107)0
≤ β + 1,
and
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ˆkz◦1 −
(cid:88)
x∈Xz(cid:107)1
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:12)
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
ˆkz◦0 −
(cid:12)
(cid:12)
(cid:12)
(cid:88)
x∈Xz
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
x∈Xz(cid:107)0
≤ α + β + 1.
Summing up,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ˆkz◦0 −
(cid:88)
p(x)
x∈Xz(cid:107)0
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ˆkz◦1 −
(cid:88)
p(x)
x∈Xz(cid:107)1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ α + 2β + 2.
The lemma is proved by the observation that replacing (ˆkz(cid:107)0, ˆkz(cid:107)1) with (kz(cid:107)0, kz(cid:107)1) does not increase
the LHS of the inequality above.
21
Lemma 3.14. Let n(cid:48) ∈ Z≥0 satisfy 2n−n(cid:48) ≥ 8
(cid:88)
z∈{0,1}n(cid:48)
E
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:88)
x∈Xz
ε . Then
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
p(x)
k −
p(x)
(cid:88)
x∈X
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+ ε|X|/2.
Proof. Consider an arbitrary z ∈ (cid:83)n−1
|Xz(cid:48) |
m
(cid:80)
j=0 {0, 1}j and define z(cid:48) = z(cid:107)0. By our definition of (cid:96)z(cid:48) :=
i=1 p(xi) for x1, . . . , xm drawn i.i.d. from the uniform distribution over Xz(cid:48), we have E[(cid:96)z(cid:48)] =
(cid:80)m
m . Therefore,
x∈Xz(cid:48) p(x) and Var((cid:96)z(cid:48)) ≤ |Xz(cid:48) |2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:96)z(cid:48) −
p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
x∈Xz(cid:48)
(cid:88)
E
≤ E
(cid:96)z(cid:48) −
(cid:88)
x∈Xz(cid:48)
1/2
p(x)
= Var[(cid:96)z(cid:48)]1/2 ≤
|Xz(cid:48)|
√
m
.
By our choice of m ≥ 16n2/ε2, we have
E
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:96)z(cid:48) −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
x∈Xz(cid:48)
≤
ε|Xz(cid:48)|
4n
=
ε|Xz|
8n
.
We prove the following inequality by induction on j = 0, . . . , n:
(cid:88)
E
z∈{0,1}j
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:88)
x∈Xz
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
≤
(cid:12)
(cid:12)
(cid:12)
k −
(cid:12)
(cid:12)
(cid:88)
x∈X
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
+
(cid:18) εj
4n
+ 2−(n−j−1)
(cid:19)
|X|.
(15)
(16)
The inequality holds trivially for j = 0 because kz = k and Xz = X when z is the empty string.
Now suppose the inequality holds for some j = 0, . . . , n − 1, and we show that it also holds with j
replaced by j + 1. For every z ∈ {0, 1}j, defining z(cid:48) := z(cid:107)0, by Lemma 3.13 we have
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz(cid:107)0 −
(cid:88)
p(x)
x∈Xz(cid:107)0
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz(cid:107)1 −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:12)
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
x∈Xz(cid:107)1
kz −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:88)
x∈Xz
+ 2
(cid:12)
(cid:12)
(cid:12)
(cid:96)z(cid:48) −
(cid:12)
(cid:12)
(cid:12)
(cid:88)
p(x)
x∈Xz(cid:48)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+ 2
Summing up over z ∈ {0, 1}j and taking expectation, we have
(cid:88)
z∈{0,1}j+1
(cid:32)
(cid:88)
z∈{0,1}j
(cid:12)
(cid:12)
(cid:12)
k −
(cid:12)
(cid:12)
(cid:88)
x∈X
E
E
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
+
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:88)
x∈Xz
p(x)
(cid:12)
(cid:33)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
+ 2
(cid:88)
E
z∈{0,1}j
(cid:19)
+ 2−(n−j−1)
|X| +
(cid:88)
x∈Xz
(cid:18) εj
4n
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:96)z(cid:48) −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
x∈Xz(cid:48)
+ 2j+1
ε
4n
|X| + 2−(n−j−1)|X|
(by induction hypothesis and (15))
(cid:12)
(cid:12)
(cid:12)
k −
(cid:12)
(cid:12)
(cid:88)
x∈X
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
+
(cid:18) ε(j + 1)
4n
+ 2−(n−j−2)
(cid:19)
|X|.
≤
≤
≤
The lemma is proved by setting j = n(cid:48) in (16) and observing that εn(cid:48)
4n ≤ ε
4 and 2−(n−n(cid:48)−1) ≤ ε
4 .
22
Proof of Lemma 3.12. For every z ∈ {0, 1}n(cid:48), by the definition of p(cid:48)(x),
(cid:12)p(cid:48)(x) − p(x)(cid:12)
(cid:12)
(cid:12) =
(cid:88)
x∈Xz
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:88)
x∈Xz
(cid:12)
(cid:12)
p(cid:48)(x)
(cid:12)
(cid:12)
(cid:12)
.
(17)
Combining (17) and (14),
| E[fz(x)|kz] − p(x)| ≤
(cid:88)
x∈Xz
(cid:88)
x∈Xz
| E[fz(x)|kz] − p(cid:48)(x)| +
|p(cid:48)(x) − p(x)|
(cid:88)
x∈Xz
≤ ε|Xz|/2 +
Taking expectation over kz,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:88)
p(cid:48)(x)
x∈Xz
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
.
| E[f (x)] − p(x)| =
(cid:88)
x∈Xz
=
≤
(cid:88)
x∈Xz
(cid:88)
x∈Xz
(cid:88)
x∈Xz
| E[fz(x)] − p(x)|
| Ekz
E[fz(x)|kz] − p(x)|
Ekz | E[fz(x)|kz] − p(x)|
≤ ε|Xz|/2 + E
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
kz −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
.
(cid:88)
x∈Xz
Summing up over z ∈ {0, 1}n(cid:48) and applying Lemma 3.14,
| E[f (x)] − p(x)| ≤ ε|X|/2 +
(cid:88)
x∈X
(cid:12)
(cid:12)
(cid:12)
k −
(cid:12)
(cid:12)
(cid:88)
x∈X
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
+ ε|X|/2 =
(cid:12)
(cid:12)
(cid:12)
k −
(cid:12)
(cid:12)
(cid:88)
x∈X
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
+ ε|X|.
Proof of Lemma 3.5. It suffices to prove that the model M defined as the distribution of the sample-
access object B induced by the random function f in Lemma 3.12 can be implemented efficiently,
and the implementation itself can be computed efficiently from p.
To see that M can be implemented efficiently, we first generate all the randomness needed in
the procedure of creating f by querying a random oracle. We then note that in order to compute
f (x), it suffices to compute kz for every prefix z of x and then compute fz for z being the length-n(cid:48)
prefix of x. This can be done efficiently in time poly(n, ε−1).
3.3 Learning Support-Access Binary Functions
In the previous sections we showed how to learn and construct an implementation of an indis-
tinguishable model for a function induced sample-access object B∗, i.e. there exists a function
f ∗ : X → {0, 1}, and the distinguishers and learner both receives random samples of form (x, f ∗(x)).
In this section, we learn a support-access object induced by a function see Definition 2.2. For a
binary function f ∗ : X → {0, 1}, the support-access object B∗ induced by f ∗ outputs random
samples from the set {x|f ∗(x) = 1}. We show how to construct an efficient implementation of a
model that is indistinguishable from B∗.
23
Distinguishers: Let D be a set of distinguishers, such that each D ∈ D has an associated subset
SD ⊂ X. Given access to a sample x from a object B,the distinguisher accepts if x ∈ SD.
We assume that for every D ∈ D, the set SD has known size and an efficient description, that
on input x answers if x ∈ SD.
Auditor: Let D be defined as above. We say that an algorithm ΛB∗,p is an (ε, γ, δ) auditor for
the collection of sets S = {SD|D ∈ D} if it has the following properties. Given access to a
function-induced support access-object B∗ and query access to a predictor p : X → [0, 1]. If
there exists S ∈ S and b ∈ {−1, 1} such that
(cid:18)
b
Pr
x∼B∗(⊥)
[x ∈ S] − Pr
x∼p
[x ∈ S]
> ε.
(cid:19)
Then the auditor returns a set S(cid:48) such that with probability 1 − δ,
(cid:18)
Pr
x∼B∗(⊥)
[x ∈ S(cid:48)] − Pr
x∼p
b
(cid:19)
[x ∈ S(cid:48)]
> γ.
(18)
Where x ∼ p is the distribution generated from the predictor p, i.e. Prx∼p[x = x(cid:48)] =
(cid:80)
p(x(cid:48))
x(cid:48)(cid:48)∈X p(x(cid:48)(cid:48)) .
Assuming an auditor for the collection of sets S, we show a learning algorithm for support-access
function object B∗.
Theorem 3.15. Let α ∈ [0, 1] , and let B be a collection of support access object induced by binary
functions, such that ∀B ∈ B, Ex∈X [fB(x)] = α. Let D be a collection of distinguishers as described
above.
Let ε, γ, δ(cid:48), δ(cid:48)(cid:48) be parameters such that δ(cid:48) ≤ cδγ2α−2 for a sufficiently small constant c. Let
Λ be an (ε, γ, δ(cid:48)) auditor Λ for D. Then there exists a (2ε, δ)-learner L for B with respect to the
distinguisher class D. The learner L runs in time poly(γ−1 log(δ−1)α−1, W1, W2), where W1 is the
running time of the auditor Λ and W2 the circuit complexity of its output. The implementation T
that the learner outputs runs in time poly(γ−1 log(δ−1)α−1, W2)
The learner L in the theorem above has access to an auditor Λ that can audit support-access
objects. In section Section 3.3.1 we show that such auditor exists under similar conditions to an
auditor for sample-access objects.
The learning algorithm is similar to the classic algorithm in Lemma 3.3, with an additional step
of keeping the expected value of the model to be approximately α. This extra step is required to
show convergence for support-access objects. We note that if the function is sparse, i.e. α is very
small, then the algorithm is no longer efficient.
Learning algorithm: We described the polynomial-time learner L. The learner maintains a list
F or tuples (S, w), for S ⊆ X and w ∈ [0, 1]. Using the list, the learner calculates a predictor
p : X → [0, 1], by setting for each x ∈ X,
p(x) = Lcap (w * 1(x ∈ S) : (S, w) ∈ F ) ,
(19)
24
where Lcap caps the value p(x) to the range [0, 1] after adding every list element, as defined in
eq. (2). For example, if the list is (S1, w1), (S2, w2) then we have p(x) = cap(cap(w1 * 1(x ∈
S1)) + w2 * 1(x ∈ S2)).
For every x ∈ X, calculating p(x) is done in |F | calls for the functions 1(x ∈ S), for sets S that
the auditor returns.
The learner creates the list F using the following algorithm.
1. Initialization: set F = (X, w0 = α).
2. Query ΛB∗,p, where p is the predictor generated from F .
(a) If it does not return a set, output the current F .
(b) If the auditor returns a set S ⊆ X and a sign b ∈ {−1, 1}, set F ← F ∪ (S, bγα |X|
|S| ).
3. Choose t = log |X| random elements from X, I = {x1, . . . , xt}.
If |Ex∈I [p(x)] − α| > β = 1
item until the condition is satisfied. Return to Item 2.
10 γα2, add ([N ], βsign (α − Ei∈I [pi])) to F . Repeat the current
Implementation: Given a list F , a random oracle implementation T implements sampling x ∼
B(⊥) by rejection sampling. Denote by R the random oracle, and assume that for every input the
random oracle outputs a different random string.
1. Choose a random x ∈ X.
2. Use R(x) to sample a bit b such that PrR(x)[b = 1] = p(x).
3. If b = 1, return x. If b = 0, go back to Item 1.
The expected number of loop iterations in the implementation is α, since this is the expected value
of p. The random oracle is used to create an implement a consistent function object B. That is, in
every time the implementation samples x ∈ X, the random oracle returns the same random string
R(x). This means that for every randomness, the implementation implements a support-access
object for a specific function f : X → {0, 1}, as required.
Proof of Theorem 3.15. We start by assuming that the learning algorithm finished its running, and
showing that in this case the output is indistinguishable from B∗ to all D ∈ D.
The algorithm ends after Item 3, which means that with probability (β |X|)−1, we have
(cid:88)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
x∈X
(cid:12)
(cid:12)
(cid:12)
p(x) − α |X|
(cid:12)
(cid:12)
< 2β.
(20)
Assuming eq. (20) holds, the implementation T of our model is efficient and runs approximately
1/α steps before stopping. It sample a random entry x ∼ p, from p such that the auditor does not
return any set S, which means that for all D ∈ D,
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
x∼B∗(⊥)
[x ∈ SD] −
(cid:80)
(cid:80)
p(x)
x∈SD
x∈X p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ ε.
25
Together this implies that after the algorithm ends, the model M is such that
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
x∈B∗(⊥)
[D(x) = 1] −
Pr
B∼M,x∈B(⊥)
[D(x) = 1]
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ ε + 2β ≤ 2ε.
Therefore, if the learning algorithm ends it outputs an implementation for a model that is indis-
tinguishable from B∗ for all D ∈ D.
We are left with proving that the learning algorithm is efficient, which also bounds the com-
plexity of the implementation T (as it depends on the size of F ). We prove this using a potential
function:
φ(B∗, p) =
(f ∗(x) − p(x))2 .
(cid:88)
x∈X
Since both p and f ∗ are in [0, 1], the value of φ is bounded by |X|.
By definition, with probability 1 − δ(cid:48) the auditor returns a set S that satisfies eq. (18). In this
case, from Claim 3.16, the value of φ is reduced by Ω(γ2α2 |X|) on each iteration. In addition,
from Claim 3.17, the value of φ is reduced by Ω(γ2α4 |X|) on each iteration of Item 3. Together,
we get that the total number of weight updates (of both types) are at most O(γ−2α−4).
Claim 3.16. Suppose that on Item 2b of the algorithm, the learning algorithm list is updated from
F to F ∪ (S, w), such that (S, w) satisfies eq. (18). Let p be the predictor described by F , and
p(cid:48) be the predictor described by F ∪ (S, w). Assume that |Ex∈X [p(x)] − α| ≤ 2δ, then φ(B∗, p(cid:48)) ≤
φ(B∗, p) − 1
2 γ2α2 |X|.
Proof. According to our assumption, we have
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
x∼B∗(⊥)
[x ∈ S] −
(cid:80)
(cid:80)
x∈S p(x)
x∈X p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
> γ.
The previous inequality can be written also as
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:80)
(cid:80)
x∈S f ∗(x)
x∈X f ∗(x)
−
(cid:80)
(cid:80)
x∈S p(x)
x∈X p(x)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
> γ.
(21)
We divide into two cases, of b = 1 and b = −1. The two cases are nearly identical and we write
them both for completeness.
If b = 1: Then eq. (21) can be written as:
−
(cid:80)
(cid:80)
x∈S p(x)
x∈X p(x)
(22)
γ <
≤
≤
(cid:80)
(cid:80)
x∈S f ∗(x)
x∈X f ∗(x)
1
(cid:88)
α |X|
1
α |X|
x∈S
(cid:88)
x∈S
f ∗(x) −
1
|X| (α + 2δ)
(cid:88)
p(x)
(cid:18)
f ∗(x) −
(cid:18)
1 −
x∈S
(cid:19)
(cid:19)
p(x)
2δ
α + 2δ
Where we use the fact that Ex∈X [p(x)] ≤ α + β.
(cid:88)
φ(B∗, p) − φ(B∗, p(cid:48)) =
(cid:0)2f ∗(x)w − 2wp(x) − w2(cid:1)
x∈S
26
= 2w
(cid:88)
x∈S
(f ∗(x) − p(x)) − |S| w2.
≥ 2wγαN − 2w
γ2α2 |X|2
|S|
γ2α2 |X|2
|S|
= 2
≥
1
2
2δ
|S| − w2 |S| ,
α + 2δ
− 4 |X| γδ − ε2α2 |X|2
|S|
≥
1
2
γ2α2 |X| .
Where we use the fact that β = 1
8 γα2.
The capping of p(x) to [0, 1] can only reduce the value of the potential function, because for
every x ∈ X we have f ∗(x) ∈ {0, 1}.
If b = −1: This case is nearly identical to the b = 1 case. In this case, eq. (21) can be written as
x∈S f ∗(x)
x∈X f ∗(x)
1
α |X|
p(x) −
γ <
≤
≤
(cid:80)
(cid:80)
x∈S p(x)
x∈X p(x)
1
|X| (α − 2β)
(cid:32)
(cid:80)
(cid:80)
−
(cid:88)
x∈S
1
α |X|
(cid:88)
x∈S
(p(x) − f ∗(x)) +
f ∗(x)
(cid:88)
x∈S
(cid:33)
|S|
.
2β
α − 2β
If the algorithm did not perform any capping:
φ(B∗, p) − φ(B∗, p(cid:48)) =
(cid:88)
(2f ∗(x)w − 2wp(x) − w2)
x∈S
γ2α2 |X|2
|S|
≥
− 8γβ |X| ≥
γ2α2 |X| .
1
5
As before, capping p(x) to [0, 1] can only reduce the value of φ.
Claim 3.17. Suppose that in the step described by Item 3, the algorithm makes an update to the
list F . Let p be the predictor before the update (as defined in (19)), and p(cid:48) be the predictor after
the update. Then with probability 1 − O(|X|−1), φ(B∗, p(cid:48)) ≤ φ(B∗, p) − 9
10 β2 |X|.
Proof. This proof is the classic learning proof. Using the Chernoff bound, with probability O(|X|−1)
we have that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
t
(cid:88)
x∈I
p(x) −
(cid:88)
x∈X
1
N
p(x)
≤
1
100
β.
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
Assuming the above holds, then
(cid:88)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
x∈X
f ∗(x) −
(cid:12)
(cid:12)
(cid:12)
p(x)
(cid:12)
(cid:12)
(cid:88)
x∈X
>
99
100
β |X| .
27
Assume without loss of generality that (cid:80)
list. We have
x∈X f ∗(x) ≥ (cid:80)
x∈X p(x), then we add ([N ], β) to the
φ(B∗, p) − φ(B∗, p(cid:48)) =
=
(cid:88)
x∈X
(cid:88)
x∈X
(cid:0)(f ∗(x) − p(x))2 − (f ∗(x) − p(cid:48)(x))2(cid:1)
(cid:0)−2f ∗(x)(p(x) − p(cid:48)(x)) + p(x)2 − p(cid:48)(x)2(cid:1) .
Assume for now that no capping is done for p(cid:48). In this case, p(cid:48)(x) = p(x) + β and thus
φ(B∗, p) − φ(B∗, p(cid:48)) ≥
(cid:0)2f ∗(x)β − 2βp(x) − β2(cid:1)
(cid:88)
x∈X
≥ 2 *
99
100
β2 |X| − β2 |X| =
98
100
β2 |X| .
Capping p(cid:48) can only reduce the value of φ(B∗, p(cid:48)), since f ∗(x) ∈ [0, 1].
3.3.1 Auditor for Support-Access Objects
The auditor for the sample-access objects can be seen as a weak agnostic learner of the concept
class G representing the class of distinguishers D under the uniform distribution. In the case of
support-access objects, the auditor does not get labeled samples (x, f ∗(x)), but rather a random x
such that f ∗(x) = 1.
We show that for a large family of learning algorithms, statistical query algorithms, learning
from support-access objects is not much more difficult than learning from sample-access objects.
Definition 3.2 (Statistical Query Oracle). A statistical query oracle over a distribution P : X ×
{0, 1} → [0, 1] is a function receiving as an input a function φ : X × {0, 1} → {0, 1} and error
parameter ε and outputting a value v ∈ [0, 1] such that (cid:12)
(cid:12)v − E(x,y)∼P [φ(x, y)](cid:12)
(cid:12) ≤ ε.
Definition 3.3 (Statistical Query Algorithm). An algorithm A is a statistical query algorithm over
a distribution P : X × {0, 1} → [0, 1] if it only access to the object is using a statistical query oracle
over the distribution P .
Claim 3.18. If there exists a statistical query algorithm A learning a hypothesis h over the distri-
bution P created from sample-access object, i.e. that outputs (x, f ∗(x)) for a uniform x ∈ X, then
there exists an algorithm A(cid:48) learning h from the distribution P (cid:48) created from support-access object,
i.e. that outputs a uniform (x, 1) for a random x ∈ X such that f ∗(x) = 1. The algorithm A(cid:48) also
requires m = |supp(f ∗)| = (cid:80)
x∈X f ∗(x) as an input.
Furthermore, A(cid:48) has the same number of queries to the statistical oracle, has running time
similar to the running time of A up to polylog |X| factors, and has the same success probability up
to an additive error of 1/ log |X|.
Proof. The algorithm A(cid:48) simulates the algorithm A, and simulates the the statistical query oracle
over the distribution P using the oracle for P (cid:48). Suppose the algorithm A queries the statistical
query oracle the function φ : X × {0, 1} → {0, 1}. Since the second variable is binary we can write,
φ(x, y) = φ1(x) * y + φ2(x)(1 − y),
Ex∈X [φ(x, f ∗(x))] = Ex∈X [(φ1(x) − φ2(x))f ∗(x)] + Ex∈X [φ2(x)].
(23)
(24)
28
The value Ex∈X [φ2(x)] does not depend on the function f ∗ and can be approximated without
any queries to f ∗ or to the oracle. Given that the function φ2(x) is bounded, A(cid:48) can approximate
Ex∈X [φ2(x)] up to an additive error of ε/2 in polylog |X| runtime, with success probability 1−|X|−2.
We denote this approximation by v1.
For the second element, Ex∈X [(φ1(x) − φ2(x))f ∗(x)], we have
Ex∈X [(φ1(x) − φ2(x))f ∗(x)] = Pr
x∈X
m
|X|
=
[f ∗(x) = 1] * Ex∈X [(φ1(x) − φ2(x))|f ∗(x) = 1]
Ex∈X [(φ1(x) − φ2(x))|f ∗(x) = 1].
Notice that the last term is the expected value of φ1(x) − φ2(x) under the support-access object
distribution, P (cid:48). Therefore, the algorithm A(cid:48) then queries the statistical query oracle over distri-
bution P (cid:48) with function φ(cid:48)(x, y) = φ1(x) − φ2(x) and error parameter ε/2. Denote the return value
to be v2. Then, A(cid:48) to simulates A assuming the return value of the statistical query oracle to A is
v1 + m
|X| v2. Since the error in v1, v2 is bounded by ε/2, the return value is a valid return value from
the statistical oracle query with probability 1 − |X|−2.
Summing over all of the queries of A to the statistical query oracle, the probability that A(cid:48)
fails is the same as A with the additional factor smaller than 1/ log |X| (which is the error in the
approximation of Ex∈X [φ2(x)]).
Therefore, if there exists an auditor in the standard sample-access object, that is a statistical
query algorithm, then there is also an auditor for the support-access object.
We further prove the existence of an auditor for support-access objects for specific set of dis-
tinguishers.
Claim 3.19. Let D be a set of t distinguishers for the support-access object, as defined on Sec-
tion 3.3. Then there exists an auditor Λ as defined in Section 3.3 with running time Θ(t) and query
complexity O(log(t)polylog(|X|)1/(δ(ε − γ))).
Proof. The auditor samples k = c * log(t)polylog(|X|) uniform samples x1, . . . , xk ∼ B∗(⊥). For
every distinguisher D ∈ D with an associated set SD the auditor calculates
vD =
Pr
x∈{x1,...,xk}
[x ∈ SD] =
|{x1, . . . , xk} ∩ SD|
k
.
If there exists D ∈ D such that |vD − Prx∼p[x ∈ SD]| > ε+γ
For every set SD ⊆ X, by Chernoff bound the probability over x1, . . . , xk that
2 , the auditor returns SD.
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
x∈{x1,...,xk}
[x ∈ SD] − Pr
[x ∈ SD]
x∈B∗(⊥)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≥
ε − γ
2
is at most e−k(ε−γ)2/10. Therefore, we choose the constant c such that even when summing over
the t distinguishers, the error is smaller than δ.
We can look at the value vD calculated by the algorithm above as an estimator for Prx∈B∗(⊥)[x ∈
SD]. The argument above implies that vD uniformly converge to Prx∈B∗(⊥)[x ∈ SD].
29
Definition 3.4 (Uniform Convergence). An estimator v uniformly converges to P under distribu-
tion B over the hypothesis class D if there exists a function k : (0, 1) × (0, 1) → N such that for
every ε, δ > 0, if k > k(ε, δ) then
Pr
x1,...,xk∼B
[∃D ∈ D s.t. |vD(x1, . . . , xk) − PD,x∼B| ≥ ε] < δ.
The uniform convergence implies that there exists an algorithm for weak agnostic learning of
the class D with sample complexity poly(1/ε, log(1/δ), VCdim(D)) [VC71, BEHW89, LMR91].
3.4 Learning Bit-String Functions
In this section we are interested in learning a function f : {0, 1}n → {0, 1}n. This is a harder than
learning a binary function, because the range of the function is very large. In this section, we only
learn a indistinguishable model with respect to a very limited set of distinguishers, with a product
structure. In this setting, the sampling distribution is a pair (x, f (x)) for a random input x.
Distinguishers: Let D, such that each distinguisher D ∈ D has an set SD ⊂ {0, 1}n and a
coordinate j ∈ [n]. The distinguisher D accept a sample (x, f (x)) if x ∈ S and f (x)j = 1.
Auditor: Let D be defined as above. We say that an algorithm ΛB∗,p is an (ε, γ, δ) auditor
for the collection of sets S if it has the following properties. Given access to a function-
induced support access-object B∗ and query access to a set of n predictors p1, . . . pn, such
that pj : {0, 1}n → [0, 1]. If there exists S ∈ S and j ∈ [n] such that
(cid:17)
[x ∈ S, f (x)j = 1] − Ex[pj(x) * 1(x ∈ S)]
> ε.
(cid:16)
b
Pr
x
Then the auditor returns a set S(cid:48) ⊆ {0, 1}n and j ∈ [n] such that with probability 1 − δ,
(cid:16)
b
(cid:17)
[x ∈ S(cid:48), f (x)j = 1] − Ex[pj(x) * 1(x ∈ S(cid:48))]
Pr
x
> γ.
.
Theorem 3.20. Let B be a collection of support access object induced by functions f : {0, 1}n →
{0, 1}n. Let D be a collection of distinguishers as described above.
Let ε, γ, δ(cid:48), δ(cid:48)(cid:48) be parameters such that δ(cid:48) ≤ cδγ2n−1 for a sufficiently small constant c. Let Λ be
an (ε, γ, δ(cid:48)) auditor for D. Then there exists a (2ε, δ)-learner L to B with respect to the distinguisher
class D and the learner L runs in time poly(γ−1 log(δ−1)α−1, W1, W2), where W1 is the running
time of the auditor Λ and W2 the circuit complexity of its output. The implementation T that the
learner outputs runs in time poly(γ−1 log(δ−1)α−1, W2)
We describe the learner L and implementation T .
Implementation: Given a list F of tuples (S, j, w), the implementation algorithm T with oracle
access to a random oracle R generates a model ˆB. Given x ∈ {0, 1}n the algorithm T outputs
v by:
1. For every j ∈ [n] calculate pj(x) ∈ [0, 1] by:
pj(x) = Lcap (w * 1(x ∈ S) : (S, j, w) ∈ F ) .
30
2. Choose v ∈ {0, 1}n by setting for every j ∈ [j], vj = 1 with probability pj(x) indepen-
dently using the random oracle R(x).
Learning Algorithm: The learning algorithm L.
1. Initialization: set F = {({0, 1}n , j, 1/2)|j ∈ [n]}.
2. Query the auditor with the current model and B∗. If the auditor returns (S, j, b), add
(S, j, b * γ) to F and repeat.
Notice that the learner is identical to the classic boosting algorithm, where we apply it individually
on each of the coordinated of f (x). This is the reason that we can only be indistinguishable with
respect to a set of distinguishers D that only check if a single output coordinate in f (x) equals 1.
Proof of Theorem 3.20. Similar to the previous proofs, if the auditor does not output any set then
the model is ε-indistinguishable for all D ∈ D.
We prove the correctness using a potential function, which sums over the error of each coordinate
j ∈ [n]. Let
φ(B∗, p1, . . . , pn) =
(cid:88)
(cid:88)
j∈[n]
x∈{0,1}n
(1(f (x)j = 1) − pj(x))2 .
Every x appears in the sum n times, therefor the initial value of φ is bounded by n * 2n.
Let p1, . . . , pn be the predictors before the execution of Item 2, and p(cid:48)
claim that with probability 1 − δ(cid:48) we have that φ(B∗, p1, . . . , pn) − φ(B∗, p(cid:48)
1, . . . , p(cid:48)
1, . . . , p(cid:48)
n afterwards. We
n) ≥ γ22n.
The auditor returned (S, i, b), then
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
2n
(cid:12)
(cid:12)
(cid:12)
(1(f (x)j = 1) − pj(x))
(cid:12)
(cid:12)
(cid:88)
x∈S
≥ γ.
(25)
Assume without loss of generality that b = 1. We note that the difference between p1, . . . , pn and
1, . . . , p(cid:48)
p(cid:48)
n is only between pi, p(cid:48)
i and only for x ∈ S.
φ(B∗, p1, . . . , pn) − φ(B∗, p(cid:48)
1, . . . , p(cid:48)
n) =
=
(cid:88)
(cid:16)
x∈S
(cid:88)
(cid:16)
x∈S
(1(f (x)i = 1) − pi(x))2 − (cid:0)1(f (x)i = 1) − p(cid:48)
i(x)(cid:1)2(cid:17)
−2 * 1(f (x)i = 1)(pi(x) − p(cid:48)
i(x)) + p2
i (x) − p(cid:48)
i(x)2(cid:17)
.
Assuming that the algorithm does not do any capping,
φ(B∗, p1, . . . , pn) − φ(B∗, p(cid:48)
1, . . . , p(cid:48)
n) =
(cid:0)2γ * 1(f (x)i = 1) − 2γpi(x) − γ2(cid:1)
(cid:88)
x∈S
≥ 2γ22n − γ22n
= γ22n,
where we use eq. (25) in the last inequality.
The values of 1(f (x)j = 1) are in {0, 1}, therefore capping the value of pi to [0, 1] can only lower
the value of the potential function.
31
4 Learning Exponential-Size Graphs
4.1 Learning Dense Graphs
The most basic setting for graphs is the dense model, where the graph-induced sample-access
object B induced by a graph G = ([N ], E) can be thought of as getting a random entry ((u, v), b)
for u, v ∈ [N ], b ∈ {0, 1} from the adjacency matrix of G (see Definition 2.4). In this setting, we
can think of the adjacency matrix of the graph as a function, where the graph imposes some extra
structure on the distinguishers. Therefore, some of the results from Section 3 follow directly.
Distinguishers: Let D be a collection of distinguishers. Each distinguisher has two sets of
vertices UD, VD ⊂ [N ]. When getting a random entry ((u, v), b) from the graph-induced sample-
access object B∗, it accepts if u ∈ UD, v ∈ VD and b = 1.
Auditors: An algorithm Λ is an (ε, γ, δ)-auditor for a collection of tuples S containing pairs
(U, V ) ⊂ [N ] × [N ] if it satisfies the following. The auditor received query access to a predictor
p : [N ] × [N ] → [0, 1] and to a graph-induced sample-access object B∗ induced by a graph G∗ =
([N ], E∗). If there exists (U, V ) ∈ S such that
(cid:18)
b *
Pr
(u,v)∈[N ]×[N ]
[u ∈ U, v ∈ V, (u, v) ∈ E∗] − E(u,v)∈[N ]×[N ][1(u ∈ U, v ∈ V )p(u, v)]
(cid:19)
≥ ε.
Then with probability (1 − δ), it outputs U (cid:48), V (cid:48) such that
(cid:18)
b *
Pr
(u,v)∈[N ]×[N ]
[u ∈ U (cid:48), v ∈ V (cid:48), (u, v) ∈ E∗] − E(u,v)∈[N ]×[N ][1(u ∈ U (cid:48), v ∈ V (cid:48))p(u, v)]
(cid:19)
≥ γ.
From Theorem 3.2, which uses a multicalibrated predictor from [TTV09, HJKRR18, KGZ19],
we get that we can learn an exponential graph model assuming we have an auditor for the class of
distinguishers. This is done by simply applying Theorem 3.2 on the sample-access object for a graph,
when treating its adjacency matrix as a binary function, i.e. apply it on f ∗ : [N ] × [N ] → {0, 1}
such that f ∗(u, v) = 1 ⇐⇒ (u, v) ∈ E∗.
Corollary 4.1 (Corollary of Theorem 3.2). Let the distinguisher class D be defined above. Let
ε, γ, δ, δ(cid:48) > 0 be parameters satisfying δ(cid:48) ≤ cδγ2 for a sufficiently small absolute constant c > 0. Let
B be the class of sample-access objects induced by graphs over vertex set [N ]. Let Λ be an (ε, γ, δ(cid:48))-
auditor for S = {(UD, VD)|D ∈ D}. Then there exists an (ε, δ)-learner L for B w.r.t. D. Moreover,
if the auditor Λ runs in time at most W1 and always outputs a function with circuit size at most
W2, then the learner L runs in time poly(γ−1, log(δ−1), W1) and always outputs implementations
with circuit complexity O(γ−2W2).
The same holds also for learning a graph with a fixed number of edges. We can apply Theo-
rem 3.4 on the sample-access object representing the adjacency matrix of a graph with m edges
(when m is known). Theorem 3.4 implies that we can learn an indistinguishable model in the
setting of Corollary 4.1, while also requiring that the model only contains graphs with m edges.
Note though that this can be done when using the adjacency matrix of the graph as a function, so
the result is meaningful only for dense graphs, i.e. when m = Θ(N 2).
32
The two theorems also apply when learning a model of a directed graph, and all of the previous
results still holds. This is done simply by having the adjacency matrix of a directed graph, i.e.
when f (u, v) might differ from f (v, u). In addition, for a directed graph, it is possible to apply the
construction used in Section 3.2 to have a truthfulness requirement of a fixed out degree d. That
is, when given a sample-access object induced by a directed graph G with uniform out-degree d, we
output a model such that for all B ∼ M , the graph GB has out degree d for all vertices. This is done
by learning a predictor as previously, and using the construction from Section 3.2 for the sampling
In the sampling algorithm, instead of having a directed edge (u, v) with probability
algorithm.
p(u, v) independently, we apply the algorithm from Section 3.2 on the function representing the
row of u in the adjacency matrix, with the value of the function being d. We sample a directed
edge by following the algorithm from Section 3.2.
4.2 Learning Sparse Graphs Without Dense Subgraphs
For a sparse graph, a sample-access graph object is not useful. This is because a random entry in the
adjacency matrix of a sparse graph is nearly always 0, so any sparse graph is indistinguishable from
the empty graph for sample-access objects. For sparse graphs, we study graph-induced support-
access objects (Definition 2.5). A support-access object B∗ induced by a sparse graph G = ([N ], E),
B(⊥) outputs a random edge in the graph (u, v) ∈ E.
In Section 3.3 we studied function-induced support access objects, i.e. an object of a function
f that returns a random input x such that f (x) = 1. For a graph G = ([N ], E), if we view its
adjacency matrix as a function f : [N ] × [N ] → {0, 1}, then a support-access function object B
of f returns a random positive entry of f , i.e. a random edge (u, v) ∈ E. Therefore, we can
apply Theorem 3.15 for support-access graph objects. Unfortunately, Theorem 3.15 only applies
for functions f with a constant expected value, i.e. when f represents the adjacency matrices of a
dense graph (for f representing a sparse graph, the learning and implementation are inefficient).
In this section we show how to create a dense model for a sparse graph, as long as the sparse
graph does not have a subgraph which is too dense. We do so by using the strong regularity lemma
for sparse graphs [KR03, Sco11], which implies that for a sparse graph G with no dense subgraphs,
there exists a dense graph that is indistinguishable from it. Then we reduce the problem to finding
a dense model for a dense graph, and apply Theorem 3.15.
Distinguishers: Let D be a collection of distinguishers. Each distinguisher has two sets of
vertices UD, VD ⊂ [N ]. A distinguisher D on input (u, v) accepts if u ∈ UD and v ∈ VD.
Auditors: An algorithm Λ is an (ε, ε(cid:48), δ)-auditor for a collection pairs of sets S, such that (U, V ) ∈
S, U, V ⊂ [N ] if it satisfies the following. The auditor received query access to a predictor p :
[N ] × [N ] → [0, 1] and access to a graph-induced support-access object B∗ representing a graph
G∗ = ([N ], E∗). If there exists a pair of sets (U, V ) ⊂ S and a bit b such that
(cid:18)
b *
Pr
(u,v)∼B∗(⊥)
[u ∈ U, v ∈ V ] − Pr
(u,v)∼p
(cid:19)
[u ∈ U, v ∈ V ]
≥ ε,
Then Λ outputs sets U (cid:48), V (cid:48) ⊂ [N ] such that
(cid:18)
b *
Pr
(u,v)∼B∗(⊥)
[u ∈ U (cid:48), v ∈ V (cid:48)] − Pr
(u,v)∼p
[u ∈ U (cid:48), v ∈ V (cid:48)]
(cid:19)
≥ ε(cid:48).
33
The distribution (u, v) ∼ p is defined by the predictor p, i.e. for all u, v ∈ [N ] we have
Pr
(u(cid:48),v(cid:48))∼p
[u(cid:48) = u, v(cid:48) = v] =
p(u, v)
u(cid:48)(cid:48),v(cid:48)(cid:48)∈[N ] p(u(cid:48)(cid:48), v(cid:48)(cid:48))
(cid:80)
.
Graph Notations and Definitions For a graph G = ([N ], E) and U, V ⊂ [N ], we define
EG(U, V ) = {(u, v) ∈ E|u ∈ U, v ∈ V } to be the set of edges between U, V in G. We denote
by ρG(U, V ) the edge density between U, V in G, ρG(U, V ) = |EG(U,V )|
. We denote by ρG =
ρG([N ], [N ]) the edge density of the graph.
|U ||V |
We use the definition of upper-uniform graphs from [KR03, Sco11] to define graphs without
dense subgraph. We need a slightly stronger definition than what is used in [KR03, Sco11], with
an additional requirement also for U, V smaller than ηN .
Definition 4.1 (Upper-uniform graphs). A graph G = ([N ], E) is (η, γ)-upper uniform, if for every
two disjoint sets U, V ⊂ [N ], with min {|U | , |V |} ≥ ηN we have that
and for U, V such that min {|U | , |V |} < ηN ,
ρG(U, V ) ≤ γρG,
|E(U, V )| ≤ γηρGN 2.
We remark that with high probability, a random sparse graph is upper-uniform for constants
η, γ.
In this section we use the regularity lemma for sparse graphs from [KR03, Sco11].
Definition 4.2 (Regular sets). For graph G = ([N ], E), the vertex sets V, U ⊂ [N ] are (δ)-regular
if for all U (cid:48) ⊂ U, V (cid:48) ⊂ V with |U (cid:48)| ≥ δ |U | , |V (cid:48)| ≥ δ |V | we have
(cid:12)ρG(U (cid:48), V (cid:48)) − ρG(U, V )(cid:12)
(cid:12)
(cid:12) ≤ δρG.
Theorem 4.2 (Regularity lemma for sparse upper uniform graphs [KR03]). For every δ, γ > 0
there exists (η, m) = φ(δ, γ), η > 0, m ∈ N such that every (η, γ)-upper uniform graph G has a
partition U0, U1, . . . , Uk with k ≤ m such that |V0| ≤ δN , |Vi| = |Vj| for all i, j ≥ 1, and all except
δk2 of the pairs Vi, Vj in the partition are (δ)-regular.
We now state and prove the theorem for constructing a dense model for a sparse graph.
Theorem 4.3. For every parameter γ, ε, ε(cid:48), λ(cid:48)λ(cid:48)(cid:48) > 0, such that λ(cid:48) ≤ cλε(cid:48)2 for a sufficiently large
constant c. Then there exists η ∈ [0, 1] such that the following holds. Let B be a collection of
graph-induced support access objects, such that for each B∗ ∈ B, the graph it represents GB∗ is
(η, γ)-upper-uniform.
Let D be a collection of distinguishers. If there exists an (ε, ε(cid:48), δ(cid:48))-auditor Λ for the collection
of sets C = {(UD, VD)|D ∈ D}, then there exists an (ε, δ(cid:48)(cid:48))-learning algorithm L for all B∗ ∈ B with
respect to D.
Proof. At a high level, the proof of the theorem has two parts. In the first, Claim 4.4, we use the
regularity lemma for sparse graphs to show that for every upper-uniform graph G there exists a
34
dense graph H that is indistinguishable from G. In the second part, we reduce finding a model to
our graph G∗ to finding a model for a dense graph H that is indistinguishable from it.
Let δ = ε(cid:48)2
100γ . Let (η(cid:48), m) = φ(δ, γ), where φ is the function from the regularity lemma,
Theorem 4.3. Let η = min {η(cid:48), 1/(2m), δ}.
Let B∗ ∈ B be a graph-induced support-access object, representing a sparse graph G∗ that is
(η, γ)-upper uniform. We remark that G∗ is also (η(cid:48), γ)-upper uniform, as the upper-regularity is
monotone in the η parameter.
From Claim 4.4, there exists a graph H with ρH ≈ 1/γ such that for all U, V ⊂ [N ],
(cid:12)
(cid:12)
(cid:12)
(cid:12)
|EG(U, V )|
γ
− |EH (U, V )| ρG
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ 12δρGN 2.
Suppose that instead of a graph-induced support-access object B∗ representing the sparse graph
G∗, we had access to an object BH representing the dense graph H. Then, we could have run the
learning algorithm from Section 3.3 on BH (treating BH as a function-induced support-access
object), and get an implementation of a model M that is 2ε-indistinguishable from BH . Since the
indistinguishability error is additive, M is also (2ε + δ)-indistinguishable from B∗.
In our case, we do not have access to the object BH , and cannot find H. Instead, we simulate an
auditor with access to BH by our auditor with access to B∗. Every time that the algorithm queries
the auditor ΛBH ,p, we instead invoke the auditor ΛB∗,p and forward its answer to the algorithm.
We claim that our simulated auditor is an (2ε, 1
2 ε(cid:48), δ(cid:48))-auditor for BH . In fact, a slightly weaker
claim suffice. We claim that if ΛB∗,p returns a tuple ((U, V ), b), then it is also a valid return value
for ΛBH ,p.
Suppose the auditor ΛB∗,p returned a tuple ((U, V ), b). Then with probability 1 − δ(cid:48) we have
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
(u,v)∼B∗
[u ∈ U, v ∈ V ] − Pr
(u,v)∼p
(cid:12)
(cid:12)
[u ∈ U, v ∈ V ]
(cid:12)
(cid:12)
> ε(cid:48).
This is the same as
(cid:12)
(cid:12)
(cid:12)
(cid:12)
EG∗(U, V )
ρG∗ * N 2 − Pr
(u,v)∼p
(cid:12)
(cid:12)
[u ∈ U, v ∈ V ]
(cid:12)
(cid:12)
> ε(cid:48).
From Claim 4.4, we have that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
|EG∗(U, V )|
ρG∗ * N 2 −
γ |EH (U, V )|
N 2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ 12δγ.
Together with the fact that ρH ∈ [1/γ − 12δ, 1/γ + 12δ] we get that
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
(u,v)∼BH
[u ∈ U, v ∈ V ] − Pr
(u,v)∼p
(cid:12)
(cid:12)
[u ∈ U, v ∈ V ]
(cid:12)
(cid:12)
≥ (cid:15)(cid:48) − 12δγ ≥
ε(cid:48).
1
2
For our choice of δ. That is, if the auditor ΛB∗,p returned a tuple ((U, V ), b), then with probability
1 − δ(cid:48), this answer is a valid return value also for ΛBH ,p.
If the auditor ΛB∗,p does not return an answer, then p is a 2ε indistinguishable model from B∗
(see the proof of Theorem 3.15 for more details), so we are done.
35
Claim 4.4. Let γ, δ, η > 0, be such that η ≤ η(cid:48), 1/(2m), δ for (η(cid:48), m) = φ(δ, γ). Then for every
(η, γ)-upper uniform graph G on vertex set [N ], there exists a graph H on vertex set [N ] with
ρH ∈ [1/γ − 12δ, 1/γ + 12δ], such that for every U, V ⊂ [N ], we have that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
|EG(U, V )|
γ
− |EH (U, V )| ρG
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ 12δρGN 2.
Proof. From the claim requirements, η is a constant small enough that the regularity lemma for
sparse graphs, Theorem 4.2, holds with γ, δ. Therefore, any (η, γ)-upper uniform graph G can be
partitioned into V0, V1 . . . , Vk with k ≤ m such that |Vi| = |Vj| for all i, j ≥ 1, |V0| ≤ δN and all
except δk2 of the pairs Vi, Vj are (δ)-regular. Since η ≤ 1
2k and G is (η, γ) regular, all sets Vi, Vj
satisfy ρG(Vi, Vj) ≤ γρG.
We use this partition to construct a dense graph H as follows. For every pair u, v ∈ [N ], add
the edge (u, v) to H with probability pu,v defined by:
pu,v =
(cid:40) ρG(Vi,Vj )
γρG
1
γ
if u ∈ Vi, v ∈ Vj for a regular pair Vi, Vj
otherwise.
From the fact that ρG(Vi, Vj) ≤ γρG, we get that for every u, v, pu,v ≤ 1.
We prove that H satisfies the conditions of the claim. Fix any two sets U, V ⊂ [N ]. We start
by bounding |EG(U, V )|,
|EG(U, V )| =
(cid:88)
i,j
|EG(U ∩ Vi, V ∩ Vj)| .
We bound this sum using the regularity lemma, and dividing into cases.
1. Exception set: From the regularity lemma, the size of the exception set if bounded by δN .
Using the upper-uniformity condition, intersection with the exception set have:
and the same holds for EG(V0 ∩ U, V ).
|EG(V0 ∩ V, U )| ≤ δγρGN 2,
2. Non-regular sets: At most δk2 of the sets Vi, Vj in the partition are not regular. We bound
the maximal number of edges between these sets:
(cid:88)
|EG(Vi, Vj)| ≤
(cid:88)
γρG * |Vi| |Vj| ≤ γδρGN 2.
i,j non-regular
i,j non-regular
3. Sets with small intersection: For the set U , we say that the intersection of U with Vi is
small, if |U ∩ Vi| ≤ δ |Vi|. Let IU ⊂ [k] be the parts that has small intersection with U , and
SU = ∪i∈IU (U ∩ Vi) be their union. Then |SU | ≤ δN . From the upper-uniformity condition,
we have that
|EG(SU , V )| ≤ γδρGN 2,
and the same holds for EG(SV , U ).
4. Regular sets with large intersection: Let Vi, Vj be a (δ)-regular pair, such that |Vi ∩ U | ≥ δ |Vi|
and |Vj ∩ V | ≥ δ |Vj|. Then according to the regularity lemma,
|ρG(Vi ∩ U, Vj ∩ V ) − ρG(Vi, Vj)| ≤ δρG.
36
Combining all of the cases together, if we call i, j ∈ [k] good if Vi, Vj is regular, and U, V have large
intersection with Vi, Vj we have that
|EG(U, V )| ≤ 5γδρGN 2 +
≤ 5γδρGN 2 +
(cid:88)
good i,j
(cid:88)
good i,j
|EG(U ∩ Vi, V ∩ Vj)|
|U ∩ Vi| |V ∩ Vj| ρG(Vi, Vj) (1 + δρG)
Similarly, we get a lower bound
|EG(U, V )| ≥
(cid:88)
good i,j
|U ∩ Vi| |V ∩ Vj| ρG(Vi, Vj)(1 − δρG).
We now bound |EH (U, V )|. The graph H is generated such that each edge is sampled uniformly
at random with probability pu,v. For all good i, j, We have that if u ∈ Vi, v ∈ Vj, then pu,v = pi,j =
ρG(Vi,Vj )
. Since |Vi| , |Vj| = Θ(N ), we have from Chernoff bound that with high probability,
ρGγ
|ρH (Vi ∩ U, Vj ∩ V ) − pi,j| ≤ δpi,j.
There are at most 5δN 2 pairs of vertices (u, v) that do not belong into a good pair of parts
Vi, Vj.
Together we get that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
|EH (U, V )| ρG −
|EG(U, V )|
γ
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤
≤
(cid:88)
(cid:12)
(cid:12)
|EH (U ∩ Vi, V ∩ Vj)| ρG −
(cid:12)
(cid:12)
|EG(U ∩ Vi, V ∩ Vj)|
γ
(cid:12)
(cid:12)
(cid:12)
(cid:12)
good i,j
+ 5δρGN 2 + 5δρGN 2
(cid:88)
|U ∩ Vi| |V ∩ Vj| (δρG(Vi, Vj) + δρG) + 10δρGN 2
good i,j
≤ 12δρGN 2.
The above equation also implies that ρH ∈ [1/γ − 12δ, 1/γ + 12δ], by applying it with U = V =
[N ].
Next we show that a sparse graph with a dense subgraph does not have a dense indistinguishable
model. This does not mean that it is not possible to learn a sparse graph with a dense subgraph,
but it indicates that our approach have certain limits. This claim is not tight, in a sense that there
are graphs do not satisfy the claims of Theorem 4.3, and we do not know if they have a dense
model.
Claim 4.5. Let G be a graph, if there exists a distinguisher D with vertex sets U, V such that
|U | , |V | ≥ εN and
then there is no graph H with ρH = 1/γ that is δ-indistinguishable from G to D.
ρG(U, V )
ρG
> γ +
2δ
ε2 ,
37
Proof. If H and G are indistinguishable, it must be that
(cid:12)
(cid:12)
Pr
(cid:12)
(cid:12)
(u,v)∼G
[u ∈ U, v ∈ V ] − Pr
(u,v)∼H
(cid:12)
(cid:12)
[u ∈ U, v ∈ V ]
(cid:12)
(cid:12)
≤ δ,
This is the same as
This means that
(cid:12)
(cid:12)
(cid:12)
(cid:12)
ρG(U, V )
ρG
−
ρH (U, V )
ρH
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≤ δ
N 2
|U | |V |
.
ρH (U, V )
ρH
≥
ρG(U, V )
ρG
−
δ
ε2 > γ,
which is a contradiction as ρH (U, V ) ≤ 1 and ρH = 1/γ.
4.3 Learning Sparse Uniform Out-degree Graphs
In this section we are interested in learning a sparse directed graph G∗ = ({0, 1}n, E∗), such that
each x ∈ G∗ has a uniform constant out degree d. We assume B∗ is the object representing the
graph G∗, and upon querying B∗(⊥) outputs a random edge according to the following distribution:
choose a random x ∈ [N ], then a random neighbor of x.
If we denote the d outgoing edges from each x as d functions, f1, . . . , fd : {0, 1}n → {0, 1}n, then
learning B∗ is rather similar to learning these d functions. Using this notations, a random edge from
B∗(⊥) corresponds to a pair (x, fi(x)) for a random x ∈ {0, 1}n, i ∈ [d]. If we would also assumes
that the sample contains the index i, i.e. that B∗(⊥) returns a random triplet (x, i, fi(x)), then
this would be exactly equivalent to learning the functions f1, . . . , fd, and the result of Section 3.4
would translate automatically. Without this additional assumption we need to do a bit more work
in order to translate the result of Section 3.4 into the graph object.
We formally describe the object, the class of distinguishers that we can work against and the
auditor.
The object B∗ is a graph-induced support access object to a directed graph G = ({0, 1}n , E)
with out-degree d for a constant d. The edge distribution is choosing a uniform x ∈ {0, 1}n and
then a random neighbor y of x. We assume an order over the d neighbors of each vertex, and
denote by f1, . . . , fd : {0, 1}n → {0, 1}n to be d functions representing the neighbors of the vertices
in the graph.
Distinguishers: Let D, such that each distinguisher D ∈ D has an set SD ⊂ {0, 1}n and a
coordinate j ∈ [n]. The distinguisher D accept an edge (u, v) if u ∈ SD and vj = 1.
Auditor: Let D be defined as above. We say that an algorithm ΛB∗,p is an (ε, γ, δ) auditor for
the collection of sets S if it has the following properties. Given access to a graph-induced
support access-object B∗ and query access to a predictor p : {0, 1}n → [0, 1]. If there exists
S ∈ S and j ∈ [j] such that
[x ∈ S, fi(x)j = 1] − Ex[pj(x) * 1(x ∈ S)]
> ε.
(cid:19)
Then the auditor returns a set S(cid:48), j such that with probability 1 − δ,
(cid:19)
(cid:18)
[x ∈ S(cid:48), fi(x)j = 1] − Ex[pj(x) * 1(x ∈ S(cid:48))]
> γ.
(cid:18)
b
Pr
x,i
b
Pr
x,i
The probability is uniform among all x ∈ [N ], i ∈ [d].
38
Theorem 4.6. Let B be a collection of support access graph objects induced by d functions f1, . . . ,
fd : {0, 1}n → {0, 1}n. Let D be a collection of distinguishers as described above.
Let ε, γ, δ(cid:48), δ(cid:48)(cid:48) be parameters such that δ(cid:48) ≤ cδγ2n−1 for a sufficiently small constant c. Let
Λ be an (ε, γ, δ(cid:48)) auditor Λ for D. Then there exists a (2ε, δ)-learner L to B with respect to the
distinguisher class D, and the learner L runs in time poly(γ−1 log(δ−1)α−1, W1, W2), where W1 is
the running time of the auditor Λ and W2 the circuit complexity of its output. The implementation
T that the learner outputs runs in time poly(γ−1 log(δ−1)α−1, W2)
We prove the theorem in a similar way to the proof of Theorem 3.20. The learner L and the
implementation T are the same as in the function, only we apply the same predictor d times to get
d outgoing edges out of every vertex in the graph, and verify that the endpoints are distinct.
Implementation: Given a list F of tuples (S, j, w), the implementation algorithm T with oracle
access to a random oracle R generates a model ˆB. Given x ∈ {0, 1}n the algorithm T outputs
v by:
1. For every j ∈ [n] calculate pj ∈ [0, 1] by:
pj(x) = Lcap (w * 1(x ∈ S) : (S, j, w) ∈ F ) .
2. For t = 1 to d, choose a vertex v(t) by setting v(t)
j = 1 with probability pj(x), using the
random oracle R(v, t).
3. If all of the vertices v(t) are distinct, choose a uniform i ∈ [d] and return v(i). If there is
a collision, go back to Item 2 and repeat with new randomness from the random oracle.
We remark that since d is constant and the domain {0, 1}n is exponentially large, collisions
are very unlikely. When analyzing the distribution of the model over large sets of vertices we
can ignore this event.
Learning Algorithm: The learning algorithm L.
1. Initialization: set F = {({0, 1}n , j, 1/2)|j ∈ [n]}.
2. Query the auditor with the current model and B∗. If the auditor returns (S, j, b), add
(S, j, b * γ) to F and repeat .
Notice that the learner is identical to the classic boosting algorithm, where we apply it individually
on each of the coordinated of (cid:80)
i∈[d] fi(x). This is the reason that we can only be indistinguishable
with respect to a set of distinguishers D that only check if a single output coordinate in f (x) equals
1.
Proof of Theorem 4.6. The proof is the same as the proof of Theorem 3.20, except the averag-
ing over i ∈ [d]. The probability of collision on Item 2 is negligible, so we can safely assume
independence between the d outgoing edges.
If the auditor does not output any set then the model is ε-indistinguishable for all D ∈ D.
We prove the correctness using a potential function, which sums over the error of each coordinate
j ∈ [n]. Let
φ(B∗, p1, . . . , pn) =
(cid:88)
(cid:88)
(cid:88)
j∈[n]
x∈{0,1}n
i∈[d]
2
1(fi(x)j = 1) − pj(x)
.
1
d
39
Every x appears in the sum n * d times, therefor the initial value of φ is bounded by n * 2n.
Let p1, . . . , pn be the predictors after before the execution of Item 2 and p(cid:48)
then we claim that with probability 1−δ(cid:48) we have that φ(B∗, p1, . . . , pn)−φ(B∗, p(cid:48)
1, . . . , p(cid:48)
n afterwards,
n) ≥ γ22n.
1, . . . , p(cid:48)
The auditor returned (S, i, b), then
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1
2n
(cid:88)
x∈S
Ei∈[d][1(f (x)j = 1)] − pj(x)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
≥ γ.
(26)
Assume without loss of generality that b = 1, then with probability 1 − δ,
φ(B∗, p1, . . . , pn) − φ(B∗, p(cid:48)
(cid:88)
(cid:88)
1, . . . , p(cid:48)
n)
(cid:16)(cid:0)Ei∈[d][1(f (x)j = 1)] − pj(x)(cid:1)2 − (cid:0)Ei∈[d][1(f (x)j = 1)] − p(cid:48)
j(x)(cid:1)2(cid:17)
j∈[n]
x∈S
(cid:88)
(cid:16)
x∈S,j∈[n]
−2 Ei∈[d][1(f (x)j = 1)](pj(x) − p(cid:48)
j(x)) + p2
j (x) − p(cid:48)
j(x)2(cid:17)
.
=
=
If there is not capping, we have
φ(B∗, p1, . . . , pn) − φ(B∗, p(cid:48)
1, . . . , p(cid:48)
n) =
(cid:0)2γ * Ei∈[d][1(f (x)j = 1)] − 2γpi(x) − γ2(cid:1)
(cid:88)
x∈S
≥ 2γ22n − γ22n
= γ22n,
where we use eq. (25) in the last inequality.
The values of Ei∈[d][1(f (x)j = 1)] are in [0, 1], therefore capping the value of pi to [0, 1] can only
lower the value of the potential function.
4.4 Learning Uniform Degree Graphs
Suppose we are interested in generating a truthful model for a uniform degree d graph. That is, we
want that all graph in our model has a uniform degree d. In Section 4.1, we discussed applying the
results from learning functions to learning graphs, and have a truthful model for a directed graph
with a uniform out-degree, assuming the graph is dense. In the previous section, we also saw how
to have a sparse directed graph with uniform out-degree.
For undirected graphs, in [GGN10] the authors showed an algorithm for generating a uniform
degree graph that is indistinguishable from a random uniform degree graph. Their algorithm applies
a random permutation on a large girth uniform degree expander graph.
We are interested in generating a model M that is indistinguishable from a specific graph-
induced object B∗. Therefore, it is not possible to use the same approach. Instead, we are restricting
the set of distinguishers to those that can be described by a partition over the set of vertices, and
show how to create a uniform degree graph in this case. Our construction is simple - we sample and
approximate the edge density between every two parts in the partition induced by the distinguishers,
and the model is a random permutation over a deterministic graph with the correct edge density.
40
Distinguishers: Then the set of distinguishers D contains distinguishers D with sets (UD, VD)
such that U, V ∈ U. Every distinguisher D accepts an edge (u, v) if u ∈ U, v ∈ V . Let U =
{U ⊂ [N ]|∃D s.t. U = UD or U = VD}. We assume that U is a partition with t parts, and that
|UJ | is linear in N .
Lemma 4.7. Let B be a collection of graph-induced support-access objects, such that for all B∗ ∈ B,
the graph GB∗ has a uniform degree d. Let D be the distinguishers class defined above. Then for
every constant ε there exists an (ε, δ)− learning algorithm L for the class B with respect to D. The
algorithm runs in time poly(1/ε, log(1/δ)).
We describe an implementation and a learning algorithm:
(cid:1) → N.
Representation: The model M is represented by the partition U, and by a function k : (cid:0)t
2
The function k represents the number of edges between every two parts. We assume that it
satisfies for all j ∈ [t] we have (cid:80)
i∈[t] k({i, j}) = d * |Uj|.
Implementation: The implementation T with a random oracle R on partition U and function k.
It samples a random u ∈ [N ] it outputs an edge (u, v) by:
1. Let Uj ∈ U be the part in the partition that u belongs to. We assume there is a
deterministic order on the vertices in Uj, u1, . . . , u|UJ |.
2. Choose a random (cid:96) ∈ [d].
3. Let EUj be a list of all the outgoing edges from Uj, by following order:
EUj = (u1
1, . . . , u1
|Uj |, u2
1, . . . , ud
|Uj |)
(cid:12)
(cid:12)
(cid:12)EUj
Let FUj ∈ [t]
exactly k(j, 1) times in FUj .
(cid:12)
(cid:12)
(cid:12) be the vector: FUj = (1k({j,1}), 2k({j,2}), . . . , tk({j,t})). That is, 1 appears
4. Calculate i = FUj (u(cid:96)).
5. Use R to apply a random matching between
(cid:111)
(cid:110)
(u(cid:48), l(cid:48)) ∈ Uj|FUj ((u(cid:48))l(cid:48)) = i
to the set
(cid:111)
(cid:110)
(u(cid:48), l(cid:48)) ∈ Ui|FUi((u(cid:48))l(cid:48)) = j
. Note that both sets have size k({i, j}). For i = j, pick an
arbitrary matching that does not map any element to itself. If any vertex u(cid:48) appears in
the set more than once, pick a matching from Uj to the matching set in Ui, then for the
second edge of u(cid:48) pick a shift of the matching (and vice verse).
6. Let v ∈ Ui be the vertex matched to (u, (cid:96)) in the above random matching, output v.
We remark that the random permutation is picked to be inevitable, such that if v is picked,
then the corresponding neighbor would be u.
Learning algorithm: We describe an algorithm for learning the function k.
1. Sample edges from B∗, let S = (u1, v1), . . . , (um, vm) be the sample. For every i, j ∈ [t]
set k({i, j}) by for i (cid:54)= j
k({i, j}) =
|{(u, v) ∈ S|u ∈ Ui, v ∈ Uj}|
|S|
dN.
and for i = j twice this value.
41
2. For every i ∈ [t], calculate ei = (cid:80)
3. If there exists i ∈ [t] such that |ei| ≥ dε/2 |Ui|, quit the algorithm and output an arbitrary
j∈[t] k({i, j}) − d |Ui|.
k such that ei = 0 for all i.
4. While there exists i with ei (cid:54)= 0: Pick i with ei > 0 and i(cid:48) with ei(cid:48) < 0. Pick a random
j ∈ [t], such that it is possible to decrease k({i, j}) by 1 and increase k({i(cid:48), j}) by 1, and
do so.
Remark 4.1. The initial value k({i, j}) on the first item are created such that (cid:80)
2dN , and therefore we have (cid:80)
there must also be i(cid:48) with ei(cid:48) < 0. Therefore, the correction algorithm always ends.
i,j∈[t] k(i, j) =
i∈[t] ei = 0. This means that in Item 4, if there is i with ei > 0 then
The implementation T outputs exactly d neighbors for each vertex u ∈ U . We prove that the
resulting model is indistinguishabile for every D ∈ D.
Proof of Lemma 4.7. We start by proving that with high probability over the samples of the learn-
ing algorithm, we have |ei| < ε
2 |Ui| for all i ∈ [N ].
Fix some i ∈ [t]. The specification graph B∗ has uniform degree d, which implies that
(cid:88)
j∈[t]
|{(u, v) ∈ B|u ∈ Ui, v ∈ Uj}| = d |Ui| .
For every edge (u, v) sampled, let I(u,v) be the indicator random variable that this edge con-
(u,v)∈S I(u,v) =
N * |S| ε2), all approximations are
tributes to k({i, j}) for some j ∈ [t]. Then we know that the expected value of (cid:80)
|Ui|
N * |S|. Therefore, by chernoff bound, with probability exp( |Ui|
within ε/2 form the expected value.
The corrections on the value of k on Item 4 are negligible, as they correct at most t2d edges per
group Uj of size linear in N .
Let D be a distinguisher with sets Ui, Uj in the partition. Then by the model, the probability
that an edge is sampled with Ui, Uj is k({i, j})/(dN ). Therefore, if ki,j are correct up to an ε/2N d
factor, the model is indistinguishable for D.
5
Impossibilities
A main difference in our work from [GGN10] is in the target distribution/object we aim to be
indistinguishable from. In [GGN10], the target distribution is fixed and uniform over many objects,
whereas in our setup the target is a single object which is initially unknown, and a learner is needed
to access the target object to make it possible to create an indistinguishable model. This difference
makes our setup challenging, and below we show example tasks that are impossible to achieve in
our setup because of this difference.
Fooling Distinguishers with Entry-Access is Hard.
In [GGN10], the distinguishers can
query for specific entries of an object. Such distinguishers can be impossible to fool in our setup.
For example, suppose the target object B∗ is the entry-access object induced by a function f ∗ :
X → {0, 1} (Definition 2.3), and suppose our learner aims to output a model M of entry-access
objects B induced by functions f : X → {0, 1}. For every x ∈ X, suppose there is a distinguisher
that queries for the value of f (x) and outputs "accept" if and only if f (x) = 1. To fool these
42
distinguishers, we have to learn the target function f ∗ exactly, which is clearly impossible if the
domain X has exponential size and the learner can only make polynomially many queries.
Theorem 5.1. Let X be a non-empty finite set. Let B be the class of entry-access objects induced
by all functions f : X → {0, 1}. Let D be the class of distinguishers Dx for every x ∈ X where
given an object B, the distinguisher Dx outputs "accept" if and only if the answer a ∼ B(x) is
equal to 1. Let L be an (ε, δ)-learner for the class B w.r.t. D for ε, δ < 1/2. Then L needs to query
every input x ∈ X in the worst case.
Proof. For the sake of contradiction, let us assume that whenever L outputs a model, there always
exists x ∈ X that is not queried by L. Consider the case where the target object B∗ ∈ B is drawn
uniformly at random. That is, B∗ is induced by f ∗ : X → {0, 1} chosen randomly such that for
every x ∈ X, f ∗(x) is distributed independently and uniformly from {0, 1}. When L outputs a
model M given entry access to the random target model B∗, the conditional distribution of f ∗(x)
for the x ∈ X not queried by L is still the uniform distribution over {0, 1}, and thus with conditional
probability at least 1/2 over the randomness in f ∗, it holds that PrB∼M,a∼B(x)[a = f ∗(x)] ≤ 1/2,
and thus
| Pr[DB∗
x = "accept"] − EB∼M [Pr[DB
x = "accept"]]| ≥ 1/2.
By the law of total probability, with (unconditional) probability at least 1/2, there exists a dist-
ingsher D ∈ D such that
| Pr[DB∗
= "accept"] − EB∼M [Pr[DB = "accept"]]| ≥ 1/2.
This contradicts the fact that L is an (ε, δ)-learner with ε, δ < 1/2.
Learned Model Needs to be Stronger than Distinguishers. The model learned in [GGN10]
can fool distinguishers with significantly larger circuit complexity than the model itself. Below we
show that this can become impossible in our setup where the target is a single object.
Theorem 5.2 (Remark 1.6 in [TTV09]). Let n, W > 1 be positive integers satisfying W log W ≤
2n/C for a sufficiently large absolute constant C > 0. There exists a sample-access object B∗
induced by a function f ∗ : {0, 1}n → {0, 1} and a distinguisher D with circuit complexity ̃O(nW )
such that for any model M with circuit complexity at most W , it holds that
| Pr[DB∗
= "accept"] − EB∼M [Pr[DB = "accept"]]| > 1/3.
(27)
Proof. Define k := CW log W ≤ 2n. By known constructions of k-wise independent hash functions
[CW79, WC81], there exists a distribution over f ∗ : {0, 1}n → {0, 1} with the following properties:
1. for any distinct x1, . . . , xk ∈ {0, 1}n, the k-tuple (f ∗(x1), . . . , f ∗(xk)) is distributed uniformly
from {0, 1}k;
2. every f ∗ drawn from the distribution has circuit complexity ̃O(nk) = ̃O(nW ).
Consider any fixed model M . By concentration inequalities for k-wise independent random variables
[BR94], it holds that
(cid:104)
Pr
f ∗
Pr
B∼M,(x,y)∼B(⊥)
[y = f ∗(x)] ≥ 2/3
(cid:105)
< 2−Ω(k) = 2−Ω(CW log W ).
43
Choosing C to be sufficiently large and applying the union bound over all 2O(W log W ) models of
circuit size at most S, there exists f ∗ with circuit complexity ̃O(nW ) such that for every model M
with circuit size at most W ,
Pr
B∼M,(x,y)∼B(⊥)
[y = f ∗(x)] < 2/3.
(28)
Now we choose D to be the distinguisher that on a sample (x, y) outputs "accept" if and only if
y = f ∗(x). Inequality (28) implies
EB∼M [Pr[DB = "accept"]] < 2/3.
(29)
Let B∗ be the object induced by f ∗. By our definition of D and B∗, we have Pr[DB∗ = "accept"] =
1. Combining this with (29), we get (27) as desired.
The Distinguisher Class Needs to be Learnable. Since the target distribution in [GGN10]
is fixed, no learning is needed in order to produce an indistinguishable model. In our setup, the
learning task is usually performed using an auditor, which can be viewed as a weak agnostic learner
for the class of distinguishers. A natural question is whether we can still achieve indistinguishability
if such a weak agnostic learner does not exist. Previous works [HJKRR18, GHK+23] have shown
negative answers to this question for certain notions of indistinguishability (such as calibrated
multiaccuracy) by showing that these notions imply (strong) agnostic learning for the distinguisher
class. The indistinguishability notion we use for generative models is closer to multiaccuracy, and
below we show that efficiently achieving this notion requires the distinguisher class to be efficiently
realizably learnable. For a true function f ∗ : X → {0, 1}, multiaccuracy requires a predictor
p : X → [0, 1] to satisfy
| E[(f ∗(x) − p(x))g(x)]| ≤ ε
(30)
for every function g in a class G. Now consider the case where G consists of functions g : X →
{−1, 1}. For an arbitrary g∗ ∈ G, suppose the true function f ∗ satisfies f ∗(x) = 1 if g∗(x) = 1 and
f ∗(x) = 0 if g∗(x) = −1. Then (30) implies
E |f ∗(x) − p(x)| ≤ ε.
(31)
Now we define ˆg(x) = 1 if p(x) ≥ 1/2, and define ˆg(x) = −1 if p(x) < 1/2. It is easy to check
that if ˆg(x) (cid:54)= g∗(x) for some x ∈ X, then |f ∗(x) − p(x)| ≥ 1/2, and thus (31) implies the following
realizable learning guarantee for the class G:
Pr[ˆg(x) (cid:54)= g∗(x)] ≤ 2ε.
References
[ABFX08] Edoardo M Airoldi, David M Blei, Stephen E Fienberg, and Eric P Xing. Mixed
membership stochastic blockmodels. Journal of machine learning research: JMLR,
9:1981–2014, 2008. 3
[AGL+17]
Sanjeev Arora, Rong Ge, Yingyu Liang, Tengyu Ma, and Yi Zhang. Generalization
and equilibrium in generative adversarial nets (GANs). In Doina Precup and Yee Whye
44
Teh, editors, Proceedings of the 34th International Conference on Machine Learning,
volume 70 of Proceedings of Machine Learning Research, pages 224–232. PMLR, 06–11
Aug 2017. 9
[BEHW89] Anselm Blumer, Andrzej Ehrenfeucht, David Haussler, and Manfred K. Warmuth.
Learnability and the Vapnik-Chervonenkis dimension. J. Assoc. Comput. Mach.,
36(4):929–965, 1989. 30
[BM84]
[BR94]
[CCL18]
Manuel Blum and Silvio Micali. How to generate cryptographically strong sequences
of pseudorandom bits. SIAM Journal on Computing, 13(4):850–864, 1984. 3
M. Bellare and J. Rompel. Randomness-efficient oblivious sampling. In Proceedings
35th Annual Symposium on Foundations of Computer Science, pages 276–287, 1994.
43
Yi-Hsiu Chen, Kai-Min Chung, and Jyun-Jie Liao. On the complexity of simulating
auxiliary input.
In Advances in cryptology-EUROCRYPT 2018. Part III, volume
10822 of Lecture Notes in Comput. Sci., pages 371–390. Springer, Cham, 2018. 5, 10
[CW79]
J. Lawrence Carter and Mark N. Wegman. Universal classes of hash functions. J.
Comput. System Sci., 18(2):143–154, 1979. 43
[DKR+21] Cynthia Dwork, Michael P Kim, Omer Reingold, Guy N Rothblum, and Gal Yona.
Outcome indistinguishability. In Proceedings of the 53rd Annual ACM SIGACT Sym-
posium on Theory of Computing, pages 1095–1108, 2021. 5, 6, 10
[DLLT23]
Cynthia Dwork, Daniel Lee, Huijia Lin, and Pranay Tankala. New insights into multi-
calibration. arXiv preprint arXiv:2301.08837, 2023. 5
[FK99]
Alan Frieze and Ravi Kannan. Quick approximation to matrices and applications.
Combinatorica, 19(2):175–220, 1999. 4, 7, 8
[GGM86]
Oded Goldreich, Shafi Goldwasser, and Silvio Micali. How to construct random func-
tions. Journal of the ACM, 33(4):792–807, October 1986. 3, 5
[GGN10]
Oded Goldreich, Shafi Goldwasser, and Asaf Nussboim. On the implementation of
huge random objects. SIAM Journal on Computing, 39(7):2761–2822, 2010. 4, 5, 6,
9, 11, 12, 15, 40, 42, 43, 44
[GHK+23] Parikshit Gopalan, Lunjia Hu, Michael P. Kim, Omer Reingold, and Udi Wieder.
Loss Minimization Through the Lens Of Outcome Indistinguishability. In Yael Tau-
man Kalai, editor, 14th Innovations in Theoretical Computer Science Conference
(ITCS 2023), volume 251 of Leibniz International Proceedings in Informatics (LIPIcs),
pages 60:1–60:20, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum f ̈ur
Informatik. 10, 44
[GKR+22] Parikshit Gopalan, Adam Tauman Kalai, Omer Reingold, Vatsal Sharan, and Udi
Wieder. Omnipredictors. In Mark Braverman, editor, 13th Innovations in Theoretical
Computer Science Conference, ITCS 2022, January 31 - February 3, 2022, Berkeley,
CA, USA, volume 215 of LIPIcs, pages 79:1–79:21. Schloss Dagstuhl - Leibniz-Zentrum
f ̈ur Informatik, 2022. 10
45
[GKSZ22]
Parikshit Gopalan, Michael P Kim, Mihir A Singhal, and Shengjia Zhao. Low-degree
multicalibration. In Po-Ling Loh and Maxim Raginsky, editors, Proceedings of Thirty
Fifth Conference on Learning Theory, volume 178 of Proceedings of Machine Learning
Research, pages 3193–3234. PMLR, 02–05 Jul 2022. 5
[GPAM+14] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley,
Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In
Z. Ghahramani, M. Welling, C. Cortes, N. Lawrence, and K.Q. Weinberger, editors,
Advances in Neural Information Processing Systems, volume 27. Curran Associates,
Inc., 2014. 9
[HJKRR18] Ursula H ́ebert-Johnson, Michael Kim, Omer Reingold, and Guy Rothblum. Multical-
ibration: Calibration for the (computationally-identifiable) masses. In International
Conference on Machine Learning, pages 1939–1948. PMLR, 2018. 5, 6, 10, 14, 32, 44
[HLL83]
Paul W. Holland, Kathryn Blackmond Laskey, and Samuel Leinhardt. Stochastic
blockmodels: First steps. Social Networks, 5(2):109–137, 1983. 3
[HLNRY22] Lunjia Hu, Inbal Livni-Navon, Omer Reingold, and Chutong Yang. Omnipredictors
for constrained optimization. arXiv preprint arXiv:2209.07463, 2022. 10
[HLW06]
Shlomo Hoory, Nathan Linial, and Avi Wigderson. Expander graphs and their appli-
cations. Bulletin of the AMS, 43(4):439–561, 2006. 3
[HP23]
[HPR22]
[Imp17]
[JP14]
[KGZ19]
Lunjia Hu and Charlotte Peale. Comparative Learning: A Sample Complexity The-
ory for Two Hypothesis Classes. In Yael Tauman Kalai, editor, 14th Innovations in
Theoretical Computer Science Conference (ITCS 2023), volume 251 of Leibniz Inter-
national Proceedings in Informatics (LIPIcs), pages 72:1–72:30, Dagstuhl, Germany,
2023. Schloss Dagstuhl – Leibniz-Zentrum f ̈ur Informatik. 10
Lunjia Hu, Charlotte Peale, and Omer Reingold. Metric entropy duality and the
sample complexity of outcome indistinguishability.
In Sanjoy Dasgupta and Nika
Haghtalab, editors, Proceedings of The 33rd International Conference on Algorithmic
Learning Theory, volume 167 of Proceedings of Machine Learning Research, pages
515–552. PMLR, 29 Mar–01 Apr 2022. 10
Russell Impagliazzo. Lecture on learning models: connections between boosting, hard-
core distributions, dense models, GAN, and regularity I. https://www.ias.edu/
video/csdm/2017/1113-RussellImpagliazzo, 2017. 10
Dimitar Jetchev and Krzysztof Pietrzak. How to fake auxiliary input. In Theory of
cryptography, volume 8349 of Lecture Notes in Comput. Sci., pages 566–590. Springer,
Heidelberg, 2014. 5, 10
Michael P Kim, Amirata Ghorbani, and James Zou. Multiaccuracy: Black-box post-
processing for fairness in classification. In Proceedings of the 2019 AAAI/ACM Con-
ference on AI, Ethics, and Society, pages 247–254, 2019. 5, 6, 14, 32
46
[KKG+22] Michael P. Kim, Christoph Kern, Shafi Goldwasser, Frauke Kreuter, and Omer
Reingold. Universal adaptability: Target-independent inference that competes
with propensity scoring.
the National Academy of Sciences,
119(4):e2108097119, 2022. 10
Proceedings of
[KP23]
Michael P. Kim and Juan C. Perdomo. Making Decisions Under Outcome Perfor-
mativity. In Yael Tauman Kalai, editor, 14th Innovations in Theoretical Computer
Science Conference (ITCS 2023), volume 251 of Leibniz International Proceedings in
Informatics (LIPIcs), pages 79:1–79:15, Dagstuhl, Germany, 2023. Schloss Dagstuhl
– Leibniz-Zentrum f ̈ur Informatik. 10
[KR03]
Yoshiharu Kohayakawa and Vojtech R ̈odl. Szemer ́edi's regularity lemma and quasi-
randomness. Recent advances in algorithms and combinatorics, pages 289–351, 2003.
8, 33, 34
[LMR91]
Nathan Linial, Yishay Mansour, and Ronald L. Rivest. Results on learnability and
the Vapnik-Chervonenkis dimension. Inform. and Comput., 90(1):33–49, 1991. 30
[LR88]
[Mit03]
[NN93]
[NN07]
[NNT05]
[NR02]
[Sco11]
[Sk ́o16a]
Michael Luby and Charles Rackoff. How to construct pseudorandom permutations
from pseudorandom functions. SIAM Journal on Computing, 17(2):373–386, 1988. 3,
5
Michael Mitzenmacher. A Brief History of Generative Models for Power Law and
Lognormal Distributions. Internet Mathematics, 1(2):226 – 251, 2003. 3
Joseph Naor and Moni Naor. Small-bias probability spaces: Efficient constructions
and applications. SIAM Journal on Computing, 22(4):838–856, August 1993. 3
Moni Naor and Asaf Nussboim. Implementing huge sparse random graphs. In Moses
Charikar, Klaus Jansen, Omer Reingold, and Jos ́e D. P. Rolim, editors, Approxima-
tion, Randomization, and Combinatorial Optimization. Algorithms and Techniques,
10th International Workshop, APPROX 2007, and 11th International Workshop,
RANDOM 2007, Princeton, NJ, USA, August 20-22, 2007, Proceedings, volume 4627
of Lecture Notes in Computer Science, pages 596–608. Springer, 2007. 5, 9
Moni Naor, Asaf Nussboim, and Eran Tromer. Efficiently constructible huge graphs
that preserve first order properties of random graphs. In Joe Kilian, editor, Theory
of Cryptography, Second Theory of Cryptography Conference, TCC 2005, Cambridge,
MA, USA, February 10-12, 2005, Proceedings, volume 3378 of Lecture Notes in Com-
puter Science, pages 66–85. Springer, 2005. 5, 9
Moni Naor and Omer Reingold. Constructing pseudo-random permutations with a
prescribed structure. J. Cryptol., 15(2):97–102, jan 2002. 5
Alexander Scott. Szemer ́edi's regularity lemma for matrices and sparse graphs. Com-
binatorics, Probability and Computing, 20(3):455–466, 2011. 8, 33, 34
Maciej Sk ́orski. Simulating auxiliary inputs, revisited. In Theory of cryptography. Part
I, volume 9985 of Lecture Notes in Comput. Sci., pages 159–179. Springer, Berlin, 2016.
5, 10
47
[Sk ́o16b]
[Sk ́o17]
[TTV09]
[Vad12]
[VC71]
[VZ13]
[WC81]
[Yao82]
Maciej Sk ́orski. A subgradient algorithm for computational distances and applications
to cryptography. Cryptology ePrint Archive, 2016. 5, 10
Maciej Sk ́orski. A cryptographic view of regularity lemmas: simpler unified proofs
In Theory and applications of models of computation, volume
and refined bounds.
10185 of Lecture Notes in Comput. Sci., pages 586–599. Springer, Cham, 2017. 5, 10
Luca Trevisan, Madhur Tulsiani, and Salil P. Vadhan. Regularity, boosting, and effi-
ciently simulating every high-entropy distribution. In Proceedings of the 24th Annual
IEEE Conference on Computational Complexity, CCC 2009, Paris, France, 15-18
July 2009, pages 126–136. IEEE Computer Society, 2009. 5, 9, 10, 14, 32, 43
Salil P. Vadhan. Pseudorandomness. Foundations and Trends® in Theoretical Com-
puter Science, 7(1–3):1–336, 2012. 3
V. N. Vapnik and A. Ya. Chervonenkis. On the uniform convergence of relative
frequencies of events to their probabilities. Theory of Probability & Its Applications,
16(2):264–280, 1971. 30
Salil Vadhan and Colin Jia Zheng. A uniform min-max theorem with applications in
cryptography. In Advances in Cryptology–CRYPTO 2013: 33rd Annual Cryptology
Conference, Santa Barbara, CA, USA, August 18-22, 2013. Proceedings, Part I, pages
93–110. Springer, 2013. 5, 10
Mark N. Wegman and J. Lawrence Carter. New hash functions and their use in
authentication and set equality. Journal of Computer and System Sciences, 1981. 3,
43
In 23rd annual
Andrew C. Yao. Theory and applications of trapdoor functions.
symposium on foundations of computer science (Chicago, Ill., 1982), pages 80–91.
IEEE, New York, 1982. 3
48
|
|
http://arxiv.org/abs/2302.12814v2 | 2023-06-27T14:01:09 | 2023-02-24T18:49:10 | GraphSR: A Data Augmentation Algorithm for Imbalanced Node
Classification | Graph neural networks (GNNs) have achieved great success in node
classification tasks. However, existing GNNs naturally bias towards the
majority classes with more labelled data and ignore those minority classes with
relatively few labelled ones. The traditional techniques often resort
over-sampling methods, but they may cause overfitting problem. More recently,
some works propose to synthesize additional nodes for minority classes from the
labelled nodes, however, there is no any guarantee if those generated nodes
really stand for the corresponding minority classes. In fact, improperly
synthesized nodes may result in insufficient generalization of the algorithm.
To resolve the problem, in this paper we seek to automatically augment the
minority classes from the massive unlabelled nodes of the graph. Specifically,
we propose \textit{GraphSR}, a novel self-training strategy to augment the
minority classes with significant diversity of unlabelled nodes, which is based
on a Similarity-based selection module and a Reinforcement Learning(RL)
selection module. The first module finds a subset of unlabelled nodes which are
most similar to those labelled minority nodes, and the second one further
determines the representative and reliable nodes from the subset via RL
technique. Furthermore, the RL-based module can adaptively determine the
sampling scale according to current training data. This strategy is general and
can be easily combined with different GNNs models. Our experiments demonstrate
the proposed approach outperforms the state-of-the-art baselines on various
class-imbalanced datasets. | [
"Mengting Zhou",
"Zhiguo Gong"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12814v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12814v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | GraphSR: A Data Augmentation Algorithm
for Imbalanced Node Classification
Mengting Zhou1,2, Zhiguo Gong1,2*
1State Key Laboratory of Internet of Things for Smart City, University of Macau, Macao
2 Guangdong-Macau Joint Laboratory for Advanced and Intelligent Computing
[email protected], [email protected]
3
2
0
2
n
u
J
7
2
]
G
L
.
s
c
[
2
v
4
1
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Graph neural networks (GNNs) have achieved great success
in node classification tasks. However, existing GNNs natu-
rally bias towards the majority classes with more labelled data
and ignore those minority classes with relatively few labelled
ones. The traditional techniques often resort over-sampling
methods, but they may cause overfitting problem. More re-
cently, some works propose to synthesize additional nodes
for minority classes from the labelled nodes, however, there
is no any guarantee if those generated nodes really stand for
the corresponding minority classes. In fact, improperly syn-
thesized nodes may result in insufficient generalization of the
algorithm. To resolve the problem, in this paper we seek to
automatically augment the minority classes from the mas-
sive unlabelled nodes of the graph. Specifically, we propose
GraphSR, a novel self-training strategy to augment the mi-
nority classes with significant diversity of unlabelled nodes,
which is based on a Similarity-based selection module and
a Reinforcement Learning(RL) selection module. The first
module finds a subset of unlabelled nodes which are most
similar to those labelled minority nodes, and the second one
further determines the representative and reliable nodes from
the subset via RL technique. Furthermore, the RL-based mod-
ule can adaptively determine the sampling scale according to
current training data. This strategy is general and can be eas-
ily combined with different GNNs models. Our experiments
demonstrate the proposed approach outperforms the state-of-
the-art baselines on various class-imbalanced datasets.
Introduction
Graph is regarded as one of the most powerful models for
describing complex relationships between objects in vari-
ous fields, such as natural language processing (Yao, Mao,
and Luo 2019), computer vision (Chen et al. 2019), and rec-
ommendation systems (Wu et al. 2019). As the result, cor-
responding techniques for graph data analytics are receiv-
ing significant attention from the community. And GNNs
(Graph Neural Networks) is one of the most successful
techniques for node analysis. In principle, GCN (Kipf and
Welling 2016) aggregates node features in the spectral space
using Laplacian matrices, while GraphSAGE (Hamilton,
Ying, and Leskovec 2017) aggregates features from node
*Corresponding Author.
Copyright © 2023, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.
neighbors directly in the spatial domain. However, most ex-
isting GNNs are trained under the assumption that the node
classes are balanced. Unfortunately, this assumption is not
true in many real-world situations where some classes may
have significantly few nodes than others in the training pro-
cess. For example, the number of fraudsters in a social net-
work is much smaller than that of benign ones in the fraud
detection task (Liu et al. 2021). The class-imbalanced prob-
lem may cause the algorithm to bias towards the majority
classes and ignore the minority classes in the representation
learning. Therefore, it is challenging to apply GNNs directly
to many real-world class-imbalanced graphs.
In fact, imbalance problem has been tackled for a long
time and some significant progresses have been made in
the area of machine learning. Generally speaking, the so-
lutions can be summarized into three streams: data-level
approaches, algorithm-level approaches, and hybrid ap-
proaches. Data-level approaches attempt to balance the class
distribution by pre-processing training samples with over-
sampling (Chawla et al. 2002) or under-sampling (Kubat,
Matwin et al. 1997) techniques; algorithm-level approaches
take misclassification costs into consideration (Ling and
Sheng 2008) or modify the loss function (Cui et al. 2019)
to alleviate the impact of class-imbalanced issue; and hy-
brid approaches combine above both (Batista, Prati, and
Monard 2004). However, either data based or algorithm
based method still solely relies on those labelled training
data, therefore, inherently suffers from overfitting problem
caused by the extensively reusing some samples or raising
their weights.
Actually, graph data naturally present topological struc-
tures of nodes, which can be used to generate some virtual
nodes as data augmentation for the training algorithm. In this
respect, recently GraphSMOTE (Zhao, Zhang, and Wang
2021) extend SMOTE (Chawla et al. 2002) to perform in-
terpolation between two minority nodes in the embedding
space to synthesize new samples, and exploit an edge pre-
dictor to determine the neighborhood of the synthetic sam-
ples as shown in Fig.1a. Nevertheless, such generated nodes
only rely on the minority nodes, which could not effectively
extend the minority classes outwards (can still cause over-
fitting). To further deal with this, GraphENS (Park, Song,
and Yang 2022) synthesize new minority nodes with their
one-hop neighbors by mixing some existing minority node
(a) GraphSMOTE
(b) GraphENS
(c) GraphSR
Figure 1: Here is a graph with limited labelled nodes and massive unlabelled nodes, blue nodes denote majority class, red nodes
denote minority class and blank nodes are unlabelled nodes. (a) synthetic nodes are generated by two minority nodes and edges
are generated by an edge predictor. (b) mixed nodes and their one-hop neighbors are generated by minor node and target node.
(c) displays supplemental unlabelled nodes for minority class by GraphSR.
from other classes, thus, can enrich the diversity of those mi-
nority classes as shown in Fig.1b. However, those synthetic
nodes, which are generated under the subjectively designed
mixing ratio between the minority nodes and other nodes,
may not reveal the real situation of the underlying data na-
ture, thus, could damage the results if the mixing ratio is not
properly set. In addition, both of the above methods conduct
over-sampling on minority classes heuristically with a fixed
proportion, which could not be generalized across different
datasets. The over-sampling ratio should be well-elaborated,
otherwise the performance of majority classes will degrade
when the ratio is set too large for minority classes.
As a matter of fact, the previous works fail to utilize the
rich information from the massive unlabelled nodes of the
graph, which are valuable resources for generating more
promising data to augment the minority classes. In the com-
puter vision area, CReST (Wei et al. 2021) experimentally
finds the phenomenon that minority classes suffer from low
recall but achieve surprisingly high precision, thus minority
pseudo-labels are less risky to supplement the training set.
However, we empirically find that there are still many mis-
classified nodes in minority classes in the node classification
task on graph, the details are shown in appendix. Applying
CReST directly on graph does not work well since the mi-
nority pseudo-labels are not reliable enough, and there is no
mechanism to restrict these noisy unlabelled samples from
being supplemented to the training set. Wrongly augmented
data may damage the performance of the classification.
Motivated by above discussions, in this paper we design
a novel data augmentation algorithm for minority classes,
called GraphSR, as shown in Fig.1c, where a reinforce-
ment learning algorithm is employed to optimize the strategy
for selecting those unlabelled data to augment the minority
classes.
Specifically, we firstly pre-train a baseline GNN model
with labelled data, which can then generate pseudo-labels
for those unlabelled data. Nevertheless, the baseline GNN
model trained on imbalanced data could be biased towards
majority classes, resulting in a poor prediction of unla-
belled data. To tackle the problem, instead of supplementing
the minority classes by randomly selecting some unlabelled
nodes solely according to their pseudo-labels, GraphSR
firstly utilizes a similarity-based selection module to fil-
ter out the most similar unlabelled nodes for each minor-
ity class, which aims to efficiently discover potential nodes
from the numerous unlabelled nodes and maintains a pool
of potential data to augment those minority classes. In the
second step, in order to reduce the impact of noisy nodes,
we design another module to adaptively choose the informa-
tive and reliable nodes from the candidate set through a re-
inforcement learning technique, named RL-based selection
module. In practice, GraphSR trains a selector as an agent
to decide which node in the candidate set to be preserved,
and then the action is evaluated by the environment with the
improved classifier trained using the augmented dataset, the
reward is assigned based on the performance of a class bal-
anced validation set. With the two-step selection, GraphSR
can obtain the optimal unlabelled nodes to supplement the
imbalanced training data. In this way, we can use the new
training set to train an unbiased GNN classifier.
We summarize the main contributions as follows:
• We propose to study the class-imbalanced node classifi-
cation problem in the semi-supervised setting, where nu-
merous unlabelled nodes can be exploited to supplement
the minority classes.
• We design a novel data augmentation strategy, GraphSR,
to efficiently sample the informative and reliable unla-
belled nodes to enhance the diversity of the minority
classes. The proposed method can adaptively determine
the sampling scale based on the current training data,
making it more generalizable to different datasets.
• Experimental results on several datasets show that the
proposed approach outperforms all the baselines. More
importantly, the technique can be injected into any of the
GNNs algorithms.
Related Work
Class Imbalanced Learning
Class imbalanced representation learning is a classical topic
in machine learning domain and has been well-studied (He
and Garcia 2009). The goal is to train an unbiased classi-
fier on a labelled dataset with a class-imbalanced distribu-
tion, where majority classes have significantly more sam-
ples and minority classes have fewer samples. Prominent
works include re-weighting and re-sampling approaches.
Re-weighting approaches try to modify the loss function
by raising the weights of minority classes (Lin et al. 2017;
Cui et al. 2019), or expanding the margins on minority
classes (Cao et al. 2019; Liu et al. 2019; Menon et al.
2020). Re-sampling approaches attempt to balance the data
distributions by pre-processing training samples deliber-
ately, such as over-sampling minority classes (Chawla et al.
2002), under-sampling majority classes (Kubat, Matwin
et al. 1997), and a combination of both (Batista, Prati, and
Monard 2004). With the improvement of neural network,
re-sampling strategies augment the minority classes through
not only sampling techniques (Liu et al. 2020), but also gen-
eration idea (Kim, Jeong, and Shin 2020; Wang et al. 2021).
The typical method SMOTE (Chawla et al. 2002) generates
new samples by using interpolating technique over some mi-
nority samples and their nearest neighbors from the same
class. While other works (Kim, Jeong, and Shin 2020; Wang
et al. 2021) synthesize minority samples through transfer-
ring the common knowledge from majority classes. How-
ever, most existing methods are devoted to i.i.d. data, and
can not be directly utilized to graph-based data, where the
relationships among objects should be considered.
Graph Neural Networks
Graph neural networks (GNNs) are firstly proposed in 2005
(Gori, Monfardini, and Scarselli 2005). With the rapid de-
velopment of deep learning, the techniques have achieved
enormous success in non-Euclidean structured data. Gener-
ally speaking, GNNs follow a message-passing scheme to
recursively embed a node with its neighbors into a continu-
ous and low-dimensional space (Gilmer et al. 2017). GNN
techniques can be divided into two categories: spectral-
based methods and spatial-based methods. The spectral-
based methods often apply the Laplacian matrix decom-
position of the entire graph to collect nodes information
(Defferrard, Bresson, and Vandergheynst 2016; Kipf and
Welling 2016; Bianchi, Grattarola, and Alippi 2020), while
the spatial-based methods employ the topological structure
of the graph directly and aggregate nodes features based on
the topological information of the graph (Veliˇckovi ́c et al.
2017; Hamilton, Ying, and Leskovec 2017; You, Ying, and
Leskovec 2019).
For node classification task, there are some works pro-
posed to deal with class-imbalanced issue. DR-GCN (Shi
et al. 2020) utilizes two types of regularization with class-
conditioned adversarial training and latent distribution con-
straints on unlabelled nodes to train an unbiased classi-
fier. GraphSMOTE (Zhao, Zhang, and Wang 2021) extends
SMOTE to the embedding space and combines it with edge
generation to synthesize minority nodes. ImGAGN (Qu et al.
2021) generates a set of synthetic minority nodes by mod-
elling a generator to simulate both the attribute and topo-
logical distributions of the whole minority class. PC-GNN
(Liu et al. 2021) devises a label-balanced sampler to con-
struct the sub-graphs, and chooses neighbors for each node
in the sub-graphs by a neighborhood sampler for training.
GraphENS (Park, Song, and Yang 2022) synthesize the fea-
tures and neighbors for minority nodes by mixing minority
nodes and target nodes from other classes to avoid overfit-
ting. For the over-sampling works, GraphSMOTE and Im-
GAGN only adopt the identical minority nodes to synthe-
size new samples, it is prone to be overfitting, and the diver-
sity is limited. Although GraphENS utilizes the nodes from
both minority classes and other classes when generating new
samples, it changes graph structure and is hard to find out
the optimal mixing ratio and neighbors, which may induce
some noise and impact the performance instead. Moreover,
these methods over-sample the minority classes with a fixed
ratio and fail to take full advantage of the abundant informa-
tion available from unlabelled nodes. In our work, GraphSR
supplements the minority classes with unlabelled nodes to
enrich the diversity and determines the sampling scale adap-
tively.
Problem Definition
In this work, we target at semi-supervised class-imbalanced
node classification on graphs, which is with a small ratio
of labelled nodes and large amount of unlabelled ones. We
are going to use the limited number of labelled nodes for
training a classifier, which is tested on the nodes from the
same graph. In our setting, each node belongs to only one
class, and the distribution of classes is imbalanced, that is
the majority classes have significantly more samples than
those minority classes in the training set.
Formally, an attributed graph is defined as G = (V, E, X),
where V is the nodes set, E is the set of edges, and X ∈
R|V |×d denotes the attribute matrix where each row repre-
sents a d-dimensional attribute of the corresponding node.
N (v) = {v′ ∈ V |{v′, v} ∈ E} is the set of the neighbor-
ing nodes that directly connect to v. Each node only belongs
to one class y, and there are totally m classes in the graph.
During training, only a subset of nodes VL with their cor-
responding labels YL are available, and the unlabelled set
of notes ia denoted as U . For the labelled nodes, we denote
their class distribution as {C1, ..., Cm}, where Ci is the node
set of i-th class. Besides, we introduce an imbalance ratio ρ
to measure the degree of imbalance, ρ = mini(|Ci|)
maxi(|Ci|) .
Given G with a labelled node set VL, which is class im-
balanced, we aim to train an unbiased classifier f that can
work well for the entire classes, with the help of unlabelled
nodes in U .
Methodology
In this section, we present the details of the proposed
GraphSR, which is based on the self-training technique.
In fact, self-training (Scudder 1965) is a classical method
which is widely used in semi-supervised learning. In princi-
ple, the algorithm iteratively trains a model on the available
labelled set and uses the trained model to generate pseudo-
labels for those unlabelled data; then, it selects confident
samples from the unlabelled set to combine with the training
set to further retrain the model, until converging.
To accommodate the class-imbalanced issue in graphs,
with the idea of self-training, we propose two kinds of com-
ponents to adaptively select informative and reliable nodes
from unlabelled data to supplement the minority classes, as
demonstrated in Fig.2. First, GraphSR trains a GNN model
Figure 2: Overall pipeline of GraphSR
based on the labelled set VL and generates pseudo-labels
for unlabelled nodes in U . Then a similarity-based selection
module is designed to identify the unlabelled nodes which
are most similar to the minority nodes, to filter out candidate
nodes set VC for minority classes. Next, GraphSR utilizes a
module of reinforcement learning to adaptively choose the
informative and reliable nodes to get a proper supplemen-
tal set V ˆL, which can optimally and effectively enrich the
diversity of minority classes and finally augment the train-
ing set. With the augmented training data {VL, V ˆL}, we can
train a class-balanced node classifier. In the following, we
will show the details of each component.
Similarity-Based Selection
One simple way to augment the minority classes in the semi-
supervised setting is to find the similar unlabelled nodes
from the original graph. In general, node representations de-
rived from GNNs can reflect the inter-class and intra-class
relationship of nodes, that is, nodes of the same class will be
closer in the embedding space, while nodes from different
classes should be farther away in the latent space. There-
fore, rather than comparing nodes directly using their raw
attributes, we train a GNN model on the labelled set to learn
the node representations, which can simultaneously capture
both feature property and topological information of nodes.
Specifically, we train a GNNs classifier g on imbalanced
training set {VL, YL}, the message passing and fusing pro-
cess of which is formulated as:
v = σ (cid:0)W k * CAT(hk−1
hk
, ∀v′ ∈ N (v)}))(cid:1)
(1)
where AGG(*) denotes the aggregation function that aggre-
gate the information of neighborhood N (v), CAT(*) con-
catenates the node representations and the neighboring in-
formation, W is the learnable weight parameters, and σ
, AGG({hk−1
v′
v
refers to the nonlinear activation function, hk
v denotes the
learned representation of node v with k-hop neighbors and
h0
v = X[v, :]. And we utilize zv to indicate the embeddings
of node v acquired by classifier g.
In addition, the well-trained g is able to generate pseudo-
labels ˆy for unlabelled node u, then we can filter out some
unlabelled nodes that may not belong to the minority classes
for efficiency. To this end, let Mi = {u ∈ U |ˆyu = i} denote
the set of all the unlabelled nodes which are predicted as mi-
nority class i by the classifier g. From Mi, we only select
those nodes that are close enough to the center of the minor-
ity class in the embedding space by means of a similarity-
based module. The center of each minority class in the latent
space is computed based on the labelled nodes as:
cen(i) =
1
|Ci|
(cid:88)
zv
v∈Ci
(2)
where Ci is the labelled nodes set of class i. Then, the mod-
ule only selects the top-K nearest nodes to the center cen(i)
from Mi as a candidate set VC, such that
VC = {u ∈ Mi|D(zu, cen(i)) < φ and |VC| ≤ K}
(3)
where D(*, *) measures the similarity in the embedding
space, and we adopt the Euclidean distance as the measure-
ment D(u, v) =∥ zu−zv ∥, φ denotes the farthest distant be-
tween node in VC and the cen(i), φ = max(zu, cen(i)|u ∈
VC).
Through this selection, we can find the nodes which are
most likely to be predicted as minority classes, however, g
is not reliable because it is trained with the imbalanced data.
To deal with this, GraphSR utilizes another selection module
of reinforcement learning to draw out the reliable nodes that
can exactly improve the performance of classifier, as well as,
determine the over-sampling scale for each minority class
adaptively.
RL-Based Selection
The key task of this selection module is to specify a sam-
pling procedure that can adaptively select unlabelled nodes
to supplement the minority classes. Due to the lack of su-
pervised information on unlabelled nodes, we adopt rein-
forcement learning for node selection. We design an itera-
tive sampling procedure which is formulated as a Markov
Decision Process (MDP), M = (S, A, R, T ). The proce-
dure to generate a balanced training set can be described
by a trajectory (s0, a0, r0, ..., sT , aT , rT ), where the initial
state s0 only contains the imbalanced labelled set and the
last state sT contains the final supplemented balanced nodes
set. GraphSR tries to learn an optimal policy using the re-
inforcement learning algorithm to allow the agent to decide
preserving or discarding the unlabelled nodes in a partially-
observed environment. In particular, the agent (i.e. the se-
lector) traverses the candidate minority nodes in VC sequen-
tially. For each node ut, the agent takes an action through
a policy network represented by πθ based on the current
state, and then the environment assigns a reward based on
the action. The agent updates the policy network based on
the reward. After enough interactions between the agent and
the environment, the agent can learn an optimal policy to
optimally select the unlabelled nodes to supplement the mi-
nority classes. With the RL-based selection, it is easier for
the algorithm to be generalized to different datasets with-
out additionally determining the over-sampling scale. In the
following, we discuss the major components of RL-based
selection module in detail.
v∈Vt
State We define the state st of the environment to en-
code the information of intermediate training set Vt and the
unlabelled node ut at time step t. In order to feed the st
into the policy network, we need to fix the dimension of
st irrelevant to the number of nodes in Vt. Motivated by
PULNS (Luo et al. 2021), we use the summation of the
nodes embeddings in Vt to represent the information of Vt,
i.e., zVt = (cid:80)
zv. In addition, the embedding of ut is
exploited to denote its information. For time step t, state st
is defined as st = (zVt, zut). At the beginning, V0 = VL is
the imbalanced labelled set, u0 is the first node in VC.
Action The action at is to decide whether the current un-
labelled node ut in VC should be included into the current
training set Vt or not at time step t. Particularly, at ∈ {0, 1},
where at = 1 means that node ut is selected to supplement
the imbalanced training set, while at = 0 indicates that ut
is not applicable. Furthermore, the action is generated by
a policy function πθ, which takes the state as input and is
parameterized by θ. In this work, the policy network repre-
sents the probability distribution of action, and is specified
as a Multilayer Perceptron (MLP) with nonlinear activation
function, i.e.:
at = P (at|st) = πθ(st) = M LPθ(st)
(4)
Transition After taking action at, the state of the environ-
ment should change to st+1. In our work, state consists of
Vt and ut, after taking at,
Vt+1 =
(cid:26){Vt ∪ ut}, at = 1
at = 0
Vt,
(5)
and then st+1 = (zVt+1, zut+1). The termination of transi-
tion will happen when agent has completely traversed the
candidate set VC once.
Reward The reward rt given by environment is to evalu-
ate the action at at state st. Without supervised information
about unlabelled nodes, it is hard to exactly find the minor-
ity nodes and reward it explicitly according to the true labels.
Here we train a classifier based on {Vt ∪ut}, and evaluate its
accuracy acct on a small balanced validation set. However,
the accuracy is always non-negative, directly applying it as
reward may impede the convergence of the agent. The idea
of reward engineering is to assign a positive reward if adding
ut can boost the performance of classifier, or a negative re-
ward otherwise. Hence, the reward function is designed as:
rt =
+1, acct ≥ bt and at = 1
−1, acct < bt and at = 1
+1, acct < bt and at = 0
−1, acct ≥ bt and at = 0
(6)
where, bt denotes a baseline reward which is the average of
past ten accuracies, i.e., bt = mean{acct−11, ..., acct−1},
and acc0 means the accuracy of the initial classifier trained
by the labelled nodes set VL.
Policy Gradient Training The goal of the agent is to train
an optimal policy network that can maximize the expected
reward, and policy gradient based methods are broadly uti-
lized to optimize the policy network. In this work, we use
Proximal Policy Optimization (PPO) (Schulman et al. 2017)
to update the parameter θ of policy network. The objective
function of PPO is defined as:
LCLIP (θ) = Et[min(pt(θ) ˆAt, clip(pt(θ), 1 − ε, 1 + ε) ˆAt)]
(7)
where pt(θ) is the probability ratio, pt(θ) = πθ(at|st)
πθold (at|st) ,
which is clipped into the range [1 − ε, 1 + ε], making a lower
bound of the conservative policy iteration objective (Kakade
and Langford 2002) and the agent's exploration more stable.
ˆAt is the estimated advantage function that involves discount
accumulated reward and value function V π, and is widely
used in policy gradient algorithms.
GNN-Based Classifier
As discussed before, with the similarity-based selection and
RL-based selection, GraphSR can sample the most informa-
tive and reliable nodes from the unlabelled data to supple-
ment the minority classes for training. In detail, we obtain
the final training set {VL, V ˆL} with labelled set {(vi, yi)}
and supplemented set with pseudo-label {(ui, ˆyi)}. Based
on the new training data, we can train an unbiased GNN clas-
sifier f according to the message passing process as eq.1 and
cross-entropy loss function. The end-to-end training process
of GraphSR is outlined in appendix.
Experiments
We conduct experiments to evaluate the effectiveness of
GraphSR for class-imbalanced node classification over sev-
eral datasets with different imbalanced ratios. The results are
reported in this section. More details about the experiments
setting and metric definitions are given in appendix.
Experiment Setup
Datasets We evaluate GraphSR on several widely-used
public datasets for node classification task: Cora, CiteSeer,
PubMed for citation networks (Sen et al. 2008). In cita-
tion networks, we construct an imitative imbalanced set-
ting: three classes for Cora and CiteSeer and one class for
PubMed are randomly selected as minority classes. All ma-
jority classes maintain 20 nodes in the training set, and the
numbers for minority classes are 20 × ρ, where ρ is the im-
balanced ratio. When validating and testing, we sample the
same numbers of nodes for all classes to make the validation
and test set balanced. The statistics of datasets are summa-
rized in appendix.
Baselines We test our method over two popular ar-
chitectures, GCN and GraphSAGE. And we compare
GraphSR with representative approaches which handle
class-imbalanced issue. Note that for all the over-sampling
baselines algorithms, we oversample the minority classes
until they have the same number of samples as that of the
majority classes.
• Re-Weighting: A classic cost-sensitive method (Japkow-
icz and Stephen 2002), which modifies loss function in-
versely proportional to the number of each class.
• EN-Weighting: Another variant of re-weighting method,
which assigns the weight for each class based on the Ef-
fective Number (Cui et al. 2019).
• Over-Sampling: A classical re-sampling method, where
the minority nodes are repeatedly sampled until the num-
ber of each minority class is the same as that of the ma-
jority classes.
• CB-Sampling: A variant of re-sampling method moti-
vated by (Butler 1956), which firstly selects a class
among all classes, and then randomly samples a node
from the selected class.
• GraphSMOTE (Zhao, Zhang, and Wang 2021): An over-
sampling method for graph, which synthesizes additional
minority nodes from existing nodes in the minority class.
• GraphENS (Park, Song, and Yang 2022): Another over-
sampling strategy for graph, which generates minority
nodes by mixing minority nodes with some nodes sam-
pled from other classes.
• RU-Selection: A baseline model that supplements the mi-
nority class by randomly collecting the unlabelled nodes
whose pseudo-labels are the minority class, until the
class distribution is balanced.
• SU-Selection: An extension of RU-Selection that, rather
than random collection, selects the unlabelled nodes in
terms of their similarity for the minority classes.
Experiment Results
Class-Imbalanced Node Classification We compare
the class-imbalanced node classification performance of
GraphSR with that of other baselines on the widely-used
citation datasets in semi-supervised setting. To verify the
model generalization, we combine the proposed technique
with two popular GNNs architectures, GCN and Gragh-
SAGE. Here, we set the imbalanced ratio ρ as 0.3, and the
experimental results are reported in Table 1, where we can
find that GraphSR outperforms the previous baselines in-
cluding the re-weighting and re-sampling algorithms. Our
method can effectively select proper unlabelled nodes to
supplement the minority classes, which can enrich the di-
versity of minority classes and avoid overfitting.
Ablation Study We verify two components of GraphSR:
similarity-based selection module and RL-based selection
module. To this end, we introduce baselines: RU-Selection
which supplements minority classes with randomly sampled
unlabelled nodes (i.e., without Similarity/without RL), and
SU-Selection which utilizes the similarity-based selection
(i.e., with Similarity/without RL). From Table 1 and 2, we
find that RU-Selection can not always work well because
it is highly dependent on the predictions of GNN classifier
when selecting unlabelled nodes, which is more prone to
noisy nodes. On the other hand, SU-Selection can further
improve the performances with the similarity-based selec-
tion module. With the further learning by RL-based module,
GraphSR can identify the most informative and reliable un-
labelled nodes for minority augmentation, thus,significantly
boost the performances.
(a) Cora
(b) CiteSeer
Figure 3: Over-sampling scale of minority classes with dif-
ferent base architectures on different datasets when imbal-
anced ratio ρ = 0.3. Note that the numbers of labelled
nodes for minority classes are 6, and the shaded bar indi-
cate the number of unlabelled nodes adaptively determined
by GraphSR for each minority class.
Over-Sampling Scale Furthermore, we investigate the
over-sampling scales of minority classes which are adap-
tively determined by GraphSR. We visualize the number of
supplemental nodes for each minority class when the im-
balance ratio is fixed as 0.3 on Cora and CiteSeer datasets,
based on two base architectures. The results are presented
in Figure 3, where we can find that GraphSR can automat-
ically determine different over-sampling scales for differ-
ent minority classes over different datasets. Besides, even
over the same dataset, GraphSR can generate different num-
bers of supplemental nodes when working for different base
architectures, because the over-sampling scales are learned
by RL-based selection based on the embeddings of nodes
and current training set. For different base architectures,
Method
Vanilla
Re-Weighting
EN-Weighting
Over-Sampling
CB-Sampling
GraphSMOTE
GraphENS
RU-Selection
SU-Selection
GraphSR
Vanilla
Re-Weighting
EN-Weighting
Over-Sampling
CB-Sampling
GraphSMOTE
GraphENS
RU-Selection
SU-Selection
GraphSR
ACC
72.25±0.93
72.43±1.31
73.48±1.82
71.82±1.61
67.72±0.64
68.67±3.56
73.48±0.13
70.75±1.28
73.10±0.85
73.90±0.16
75.67±0.11
76.11±0.46
76.05±1.05
75.28±0.56
73.53±0.77
75.32±0.80
76.84±0.88
75.85±0.82
77.99±1.00
78.78±0.42
N
C
G
E
G
A
S
h
p
a
r
G
Cora
F1
71.72±1.17
71.82±1.38
72.98±1.79
71.37±1.57
67.07±0.71
67.66±3.73
72.95±0.18
70.36±1.36
72.80±0.91
73.59±0.11
75.26±0.11
75.99±0.61
75.39±0.98
74.86±0.56
72.97±0.90
75.03±0.87
75.94±0.84
75.61±0.86
77.69±1.02
78.36±0.45
AUC-ROC
88.36±1.19
89.43±1.29
88.59±1.87
87.71±1.28
88.49±0.33
90.71±1.47
90.70±0.08
89.77±0.71
90.97±0.22
90.21±0.77
93.71±0.53
94.55±0.59
94.49±0.24
94.07±0.25
93.64±0.21
94.42±0.55
94.04±0.81
94.24±0.43
94.57±0.25
94.92±0.25
ACC
50.30±2.13
52.23±2.52
51.63±2.46
52.70±1.87
52.26±3.69
46.83±4.61
55.75±0.32
56.66±0.90
56.27±1.39
57.28±0.55
49.99±0.52
50.99±0.59
50.56±0.57
50.66±0.08
52.73±0.75
43.17±2.87
52.45±0.23
56.25±0.2
52.93±0.42
54.30±0.52
CiteSeer
F1
43.86±3.02
46.71±3.05
46.49±2.76
47.48±2.38
48.45±3.47
44.20±5.02
52.87±0.22
53.51±1.03
53.47±2.24
55.20±0.85
42.75±0.66
44.39±0.80
43.81±0.93
43.70±0.98
48.67±0.08
38.85±3.31
50.93±0.42
52.74±0.49
47.87±0.87
51.15±0.69
AUC-ROC
81.79±0.71
82.37±0.60
82.30±2.90
82.39±0.88
81.82±0.86
76.71±2.85
82.98±0.06
83.21±0.78
83.49±0.61
83.67±0.60
83.79±0.16
77.89±0.42
77.98±0.66
84.07±0.31
82.45±0.31
76.98±1.95
84.05±0.41
85.09±0.26
83.79±0.12
84.21±0.14
ACC
64.20±1.34
63.26±1.38
62.67±1.99
63.13±1.81
66.33±3.73
66.32±3.61
70.07±0.07
69.83±1.36
67.75±1.01
71.79±1.34
63.67±0.07
61.40±0.67
61.60±0.71
66.39±1.35
67.13±0.88
67.22±1.85
68.07±0.27
68.74±0.75
66.83±0.37
74.13±1.19
PubMed
F1
61.14±2.38
60.02±2.14
58.86±3.17
59.50±3.05
64.99±5.49
64.66±4.68
69.09±0.34
69.32±1.55
65.83±0.94
71.70±1.41
59.89±0.91
57.38±1.17
57.25±0.91
64.03±1.71
66.24±0.90
65.23±2.55
66.19±0.36
68.34±0.79
64.72±0.30
74.36±1.34
AUC-ROC
80.66±0.89
79.98±1.22
79.67±1.49
80.58±1.05
82.37±2.27
82.18±1.06
83.45±0.54
83.45±0.54
81.91±0.91
85.14±0.86
86.88±0.16
88.41±0.41
88.61±1.18
87.07±0.23
87.14±0.20
85.71±0.29
88.17±0.22
86.72±0.51
86.59±0.30
89.33±0.38
Table 1: Comparisons of GraphSR with other baselines when imbalance ratio is 0.3.
Method
Vanilla
Re-Weighting
EN-Weighting
Over-Sampling
CB-Sampling
GraphSMOTE
GraphENS
RU-Selection
SU-Selection
GraphSR
ACC
61.53±0.53
64.25±0.07
64.04±0.81
64.17±0.76
62.28±0.26
65.99±2.54
70.44±0.67
71.33±0.91
71.39±0.92
75.17±0.85
E
G
A
S
h
p
a
r
G
ρ = 0.1
F1
55.40±0.90
58.85±0.78
58.70±0.79
58.55±1.05
56.07±0.19
63.23±2.70
65.51±0.88
68.37±1.15
69.00±1.26
74.82±0.86
AUC-ROC
91.52±1.01
92.72±0.79
93.62±0.25
92.78±0.43
91.50±0.69
92.35±0.96
89.55±0.66
94.13±0.31
94.10±0.50
94.20±0.12
ACC
72.67±0.44
74.10±0.61
74.20±0.64
72.81±1.23
72.49±0.59
71.74±1.92
75.42±0.11
74.74±0.89
77.13±0.94
77.46±0.75
ρ = 0.2
F1
71.42±0.58
73.37±0.55
73.36±0.73
71.90±1.40
71.40±0.78
70.61±2.22
73.74±0.20
74.32±0.83
76.91±0.96
77.23±0.80
AUC-ROC
93.49±0.55
94.13±0.36
94.31±0.24
93.78±0.18
93.80±0.51
92.82±1.82
93.72±0.06
93.88±0.58
94.70±0.29
94.85±0.32
ACC
76.04±0.70
77.13±0.70
76.45±0.38
77.42±0.66
77.10±0.65
75.54±2.25
75.84±0.09
77.80±0.68
77.56±0.23
78.56±0.89
ρ = 0.4
F1
75.64±0.77
76.83±0.74
76.02±0.40
77.10±0.67
76.80±0.69
74.97±2.45
74.70±0.10
77.49±0.62
77.27±0.34
78.25±0.94
AUC-ROC
94.69±0.09
95.05±0.09
94.80±0.07
94.81±0.21
95.08±0.17
94.41±0.92
94.06±0.01
94.70±0.13
95.01±0.06
95.33±0.34
ACC
78.49±0.38
77.85±0.65
77.92±0.83
78.31±0.39
77.03±0.99
77.72±1.59
76.26±0.23
77.78±0.29
78.21±0.41
79.54±0.35
ρ = 0.5
F1
78.28±0.39
77.48±0.71
78.09±0.30
78.10±0.38
76.66±1.08
77.48±1.69
75.29±0.18
77.54±0.22
77.96±0.39
79.33±0.38
AUC-ROC
95.09±0.24
95.11±0.21
95.17±0.22
95.11±0.30
95.04±0.31
94.89±0.42
94.53±0.18
94.96±0.26
95.13±0.14
95.50±0.29
Table 2: Comparisons of GraphSR with other baselines on Cora with different imbalance ratio ρ.
the embeddings of nodes are different, which make the
over-sampling scale different as well. With the RL-based
selection module, GraphSR can automatically decide the
over-sampling scale for different imbalance ratio on dif-
ferent datasets, without demanding a well-elaborating over-
sampling hyperparameter.
Node Classification over Different Imbalance Ratios
In
this subsection, we evaluate the robustness of GraphSR on
different imbalance ratio. The experiments are conducted on
Cora dataset with imbalance ratio ρ ranging from 0.1 to 0.5.
The results are shown in Table 2, where we can observe that
GraphSR can be well adapted to different imbalance ratios.
It achieves significant improvements across all different ra-
tios. That demonstrates the validity and robustness of the
proposed model. Moreover, the improvement of GraphSR
is more impressive when the degree of imbalanced is ex-
treme. On the one hand, the previous over-sampling meth-
ods can easily cause overfitting when the minority class is
really limited. On the other hand, the self-training strategy
of GraphSR can continuously train the GNN classifer with
supplemental training set, and can generate more reliable
pseudo-labels for minority classes, which can help GraphSR
dig out the more valuable unlabelled nodes.
Conclusion
In this paper, we investigate the node classification with
class-imbalanced problem in a semi-supervised setting. To
take full advantage of rich information from the massive un-
labelled nodes, we propose a novel data augmentation strat-
egy, GraphSR, which can automatically supplement the mi-
nority classes from massive unlabeled nodes, with the help
of a similarity-based selection module and an RL-based se-
lection module. In addition, the RL-based module can adap-
tively determine the over-sampling scales for different mi-
nority classes. We verify that the proposed model can effec-
tively enrich the diversity of minority classes and avoid over-
fitting to some extent. The experimental results demonstrate
the effectiveness and robustness of GraphSR over various
datasets with different GNN architectures.
References
Batista, G. E.; Prati, R. C.; and Monard, M. C. 2004. A
study of the behavior of several methods for balancing ma-
chine learning training data. ACM SIGKDD explorations
newsletter, 6(1): 20–29.
Bianchi, F. M.; Grattarola, D.; and Alippi, C. 2020. Spectral
clustering with graph neural networks for graph pooling. In
International Conference on Machine Learning, 874–883.
PMLR.
Butler, J. W. 1956. Machine sampling from given probabil-
ity distributions. In Symposium on Monte Carlo Methods,
249–264. Wiley New York.
Cao, K.; Wei, C.; Gaidon, A.; Arechiga, N.; and Ma, T. 2019.
Learning imbalanced datasets with label-distribution-aware
margin loss. In Advances in Neural Information Processing
Systems, 1567–1578.
Chawla, N. V.; Bowyer, K. W.; Hall, L. O.; and Kegelmeyer,
W. P. 2002. SMOTE: synthetic minority over-sampling tech-
nique. Journal of artificial intelligence research, 16: 321–
357.
Chen, Z.-M.; Wei, X.-S.; Wang, P.; and Guo, Y. 2019. Multi-
label image recognition with graph convolutional networks.
In Proceedings of the IEEE/CVF conference on computer
vision and pattern recognition, 5177–5186.
Cui, Y.; Jia, M.; Lin, T.-Y.; Song, Y.; and Belongie, S. 2019.
Class-balanced loss based on effective number of samples.
In Proceedings of the IEEE/CVF conference on computer
vision and pattern recognition, 9268–9277.
Defferrard, M.; Bresson, X.; and Vandergheynst, P. 2016.
Convolutional neural networks on graphs with fast localized
spectral filtering. Advances in neural information process-
ing systems, 29.
Gilmer, J.; Schoenholz, S. S.; Riley, P. F.; Vinyals, O.; and
Dahl, G. E. 2017. Neural message passing for quantum
In International conference on machine learn-
chemistry.
ing, 1263–1272. PMLR.
Gori, M.; Monfardini, G.; and Scarselli, F. 2005. A new
model for learning in graph domains. In Proceedings. 2005
IEEE international joint conference on neural networks,
729–734.
Hamilton, W.; Ying, Z.; and Leskovec, J. 2017.
Inductive
representation learning on large graphs. Advances in neural
information processing systems, 30.
He, H.; and Garcia, E. A. 2009. Learning from imbalanced
data. IEEE Transactions on knowledge and data engineer-
ing, 21(9): 1263–1284.
Japkowicz, N.; and Stephen, S. 2002. The class imbalance
problem: A systematic study. Intelligent data analysis, 6(5):
429–449.
Kakade, S.; and Langford, J. 2002. Approximately optimal
approximate reinforcement learning. In In Proc. 19th Inter-
national Conference on Machine Learning. Citeseer.
Kim, J.; Jeong, J.; and Shin, J. 2020. M2m: Imbalanced clas-
sification via major-to-minor translation. In Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, 13896–13905.
Kingma, D. P.; and Ba, J. 2015. Adam: A method for
In International Conference on
stochastic optimization.
Learning Representations.
Kipf, T. N.; and Welling, M. 2016. Semi-supervised classi-
fication with graph convolutional networks. arXiv preprint
arXiv:1609.02907.
Kubat, M.; Matwin, S.; et al. 1997. Addressing the curse of
imbalanced training sets: one-sided selection. In Icml, 179.
Citeseer.
Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; and Doll ́ar, P.
2017. Focal loss for dense object detection. In Proceedings
of the IEEE international conference on computer vision,
2980–2988.
Ling, C. X.; and Sheng, V. S. 2008. Cost-sensitive learning
and the class imbalance problem. Encyclopedia of machine
learning, 2011: 231–235.
Liu, B.; Deng, W.; Zhong, Y.; Wang, M.; Hu, J.; Tao, X.;
and Huang, Y. 2019. Fair loss: Margin-aware reinforcement
In Proceedings of the
learning for deep face recognition.
IEEE/CVF International Conference on Computer Vision,
10052–10061.
Liu, Y.; Ao, X.; Qin, Z.; Chi, J.; Feng, J.; Yang, H.; and
He, Q. 2021. Pick and choose: a GNN-based imbalanced
learning approach for fraud detection. In Proceedings of the
Web Conference 2021, 3168–3177.
Liu, Z.; Wei, P.; Jiang, J.; Cao, W.; Bian, J.; and Chang,
Y. 2020. MESA: boost ensemble imbalanced learning with
meta-sampler. Advances in Neural Information Processing
Systems, 33: 14463–14474.
Luo, C.; Zhao, P.; Chen, C.; Qiao, B.; Du, C.; Zhang, H.;
Wu, W.; Cai, S.; He, B.; Rajmohan, S.; et al. 2021. PULNS:
Positive-Unlabeled Learning with Effective Negative Sam-
ple Selector. In Proceedings of the AAAI Conference on Ar-
tificial Intelligence, 8784–8792.
Menon, A. K.; Jayasumana, S.; Rawat, A. S.; Jain, H.; Veit,
A.; and Kumar, S. 2020. Long-tail learning via logit adjust-
ment. arXiv preprint arXiv:2007.07314.
Park, J.; Song, J.; and Yang, E. 2022. GraphENS: Neighbor-
Aware Ego Network Synthesis for Class-Imbalanced Node
In International Conference on Learning
Classification.
Representations.
Qu, L.; Zhu, H.; Zheng, R.; Shi, Y.; and Yin, H. 2021. Im-
gagn: Imbalanced network embedding via generative adver-
In Proceedings of the 27th ACM
sarial graph networks.
SIGKDD Conference on Knowledge Discovery & Data Min-
ing, 1390–1398.
Schulman, J.; Wolski, F.; Dhariwal, P.; Radford, A.; and
Klimov, O. 2017. Proximal policy optimization algorithms.
arXiv preprint arXiv:1707.06347.
Scudder, H. 1965. Probability of error of some adaptive
pattern-recognition machines. IEEE Transactions on Infor-
mation Theory, 11(3): 363–371.
Sen, P.; Namata, G.; Bilgic, M.; Getoor, L.; Galligher, B.;
and Eliassi-Rad, T. 2008. Collective classification in net-
work data. AI magazine, 29(3): 93–93.
Shi, M.; Tang, Y.; Zhu, X.; Wilson, D.; and Liu, J. 2020.
Multi-class imbalanced graph convolutional network learn-
ing. In Proceedings of the Twenty-Ninth International Joint
Conference on Artificial Intelligence (IJCAI-20).
Veliˇckovi ́c, P.; Cucurull, G.; Casanova, A.; Romero, A.; Lio,
P.; and Bengio, Y. 2017. Graph attention networks. arXiv
preprint arXiv:1710.10903.
Wang, J.; Lukasiewicz, T.; Hu, X.; Cai, J.; and Xu, Z. 2021.
Rsg: A simple but effective module for learning imbalanced
In Proceedings of the IEEE/CVF Conference on
datasets.
Computer Vision and Pattern Recognition, 3784–3793.
Wei, C.; Sohn, K.; Mellina, C.; Yuille, A.; and Yang, F.
2021. Crest: A class-rebalancing self-training framework
for imbalanced semi-supervised learning. In Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, 10857–10866.
Wu, S.; Tang, Y.; Zhu, Y.; Wang, L.; Xie, X.; and Tan, T.
2019. Session-based recommendation with graph neural net-
works. In Proceedings of the AAAI conference on artificial
intelligence, 346–353.
Yao, L.; Mao, C.; and Luo, Y. 2019. Graph convolutional
networks for text classification. In Proceedings of the AAAI
conference on artificial intelligence, 7370–7377.
You, J.; Ying, R.; and Leskovec, J. 2019. Position-aware
graph neural networks. In International conference on ma-
chine learning, 7134–7143. PMLR.
Zhao, T.; Zhang, X.; and Wang, S. 2021. Graphsmote: Im-
balanced node classification on graphs with graph neural
In Proceedings of the 14th ACM international
networks.
conference on web search and data mining, 833–841.
Appendix
Precision and recall on node classification
Here we show the experimental results on Cora dataset to
reveal the recall and precision of each class with differ-
ent GNNs algorithms (GCN and GraphSAGE). We directly
apply both algorithms to class-imbalanced semi-supervised
setting on Cora dataset, and the results are displayed in Fig-
ure 4. In Cora dataset, we set the first four classes belong
to majority classes and the last three classes are minority
classes. CReST (Wei et al. 2021) experimentally finds the
phenomenon that minority classes suffer from low recall but
achieve surprisingly high precision, thus minority pseudo-
labels are less risky to supplement the training set. How-
ever, we find that this experimental phenomenon is not suit-
able for all datasets, especially those from different domains.
Specifically, the recalls of majority classes are not always
larger than minority classes, for example, the recall of class
6 in Fig. 4a is higher than majority classes. Besides, Fig.
4a and Fig. 4b show the precision of class 1 (from the ma-
jority classes) is even higher than the recall, while the re-
call of class 7 (from the minority classes) is higher than its
precision, which are both contrary to the phenomenon ob-
served by CReST. These results indicate that when training
classifier with imbalanced data, the predictions on minority
classes are not reliable enough, and noisy nodes are easily
obtained to supplement the minority classes. Therefore, it
is necessary to carefully determine the supplemental unla-
belled nodes.
Datasets.
Here we show the details of datasets in Table 3, Cora1, Cite-
Seer2 and PubMed3 (Sen et al. 2008). For citation networks,
one node represents a publication, and each node is charac-
terized as a 0/1-valued word vector indicating the absence/p-
resence of the corresponding word in the dictionary, which
consists of distinct unique words. An edge is a citation link
between two nodes. Each node belongs to a research area,
i.e., class. And the label distributions of datasets are displays
in Table 4. In addition, we show data segmentation for each
dataset in Table 5, respectively. The first row indicates the
number of majority classes and minority classes. The sec-
ond and third rows denote the numbers of each class used
for training. And all the models are validated and tested in
the class-balanced set.
Dataset
Cora CiteSeer
PubMed
Number of Nodes
Number of Features
Number of Edges
Number of Classes
2708
1433
5429
7
3327
3703
4732
6
19717
500
44338
3
Table 3: Datesets statistics.
1https://linqs-data.soe.ucsc.edu/public/lbc/cora.tgz
2https://linqs-data.soe.ucsc.edu/public/lbc/citeseer.tgz
3https://linqs-data.soe.ucsc.edu/public/Pubmed-Diabetes.tgz
Dataset
Cora
Citeseer
Pubmed
#L0
818
596
4103
#L1
180
668
7875
#L2
217
701
7739
#L3
426
264
-
#L4
351
508
-
#L5
418
590
-
#L6
298
-
-
Table 4: Label distributions of dataset.
Dataset
Cora
CiteSeer
PubMed
Class Split[Maj/Min]
Number of Majority Class
Number of Minority Class
Number of Validation Per Class
Number of Test Per Class
4 / 3
20
20 × ρ
30
100
3 / 3
20
20 × ρ
30
100
2 / 1
20
20 × ρ
30
100
Table 5: Date segmentation.
Evaluation Metrics
Following previous works on class-imbalanced classifica-
tion, such as GraphSMOTE (Zhao, Zhang, and Wang 2021),
we adopt three widely-used metrics to measure the perfor-
mances of all methods, namely accuracy (ACC), F1-macro
score (F1) and AUC-ROC score. ACC is one of the most
commonly used metrics in machine learning to measure the
performance of model and is susceptible to data imbalance.
F1 is used to measure the performance of imbalanced data,
and is considered as a weighted average of the precision and
recall of the model. AUC-ROC is the area under the ROC
curve and indicates the probability that the predicted posi-
tive cases rank ahead of the negative cases, it is not sensitive
to data imbalance.
Experimental Setting
We adopt a 3-layer MLP as the policy network with 128 di-
mensions in the hidden layer, activated using ReLu function.
We use the PPO algorithm to train the agent with default
hyperparameters, and the learning rate is set as 0.005. All
the parameters are optimized with Adam optimizer (Kingma
and Ba 2015). For GNN classifier, we adopt two base archi-
tectures GCN and GraphSAGE. Both consist of 2 GCN or
SAGE layers with 128 hidden units and ReLU activation.
The learning rate is set as 0.01, and dropout rate is 0.5.
GNN classifiers are trained by SGD optimizer with early
stop mechanism and the maximum training epoch is 2000.
Specifically, the size of candidate set K in similarity-based
selection module is set as 20. For all the compared methods,
we report the mean and standard deviation of 5 runs.
Experimental Result
The experimental results of GraphSR based on GAT archi-
tecture are reported in Table 6.
Main Algorithm
The end-to-end training process of GraphSR is outlined in
Algorithm 1.
(a) GCN
(b) GraphSAGE
Figure 4: Experimental results on Cora dataset. Both GNN models are trained on class-imbalanced data. The test set remains
balanced. Note that class {1, 2, 3, 4} belong to majority classes, class {5, 6, 7} belong to minority classes, and the imbalanced
ratio is ρ = 0.3.
Method
Vanilla
Re-Weighting
EN-Weighting
Over-Sampling
CB-Sampling
GraphSMOTE
GraphENS
RU-Selection
SU-Selection
GraphSR
ACC
75.03±0.94
75.07±0.97
75.91±1.38
75.71±0.76
75.51±0.49
67.25±3.37
77.62±1.01
77.50±0.42
77.31±0.30
79.64±0.78
T
A
G
Cora
F1
73.67±1.05
74.82±1.11
75.60±1.24
75.37±0.84
75.14±0.52
66.47±3.27
76.93±1.02
77.23±0.43
77.15±0.26
79.44±0.88
AUC-ROC
94.76±0.37
95.45±0.15
95.66±0.15
95.59±0.17
95.39±0.21
90.17±1.58
93.23±0.35
96.26±0.19
96.31±0.20
95.68±0.19
ACC
47.49±1.21
50.50±2.01
52.72±0.41
51.54±1.02
49.46±1.54
54.28±1.69
57.20±0.98
51.12±1.41
52.96±2.59
57.77±0.20
CiteSeer
F1
39.90±2.17
44.96±2.86
47.52±0.36
45.62±1.51
43.01±2.09
53.16±2.20
55.03±1.19
45.01±1.50
45.83±1.45
55.31±0.21
AUC-ROC
81.59±0.61
83.09±0.45
82.90±0.55
83.09±0.48
82.36±0.58
80.51±0.08
83.02±0.71
83.08±0.99
82.93±0.86
84.12±0.31
ACC
61.50±0.89
66.83±0.72
65.77±0.56
64.83±1.25
64.66±0.81
71.11±2.88
74.90±0.83
68.50±0.59
69.25±0.82
77.88±0.63
PubMed
F1
57.42±1.14
65.87±0.87
64.44±0.46
62.95±1.69
63.07±0.98
70.91±3.15
74.64±0.88
67.78±0.53
69.01±0.86
77.82±0.72
AUC-ROC
86.08±0.18
86.94±0.11
86.78±0.14
86.55±0.26
86.92±0.24
86.92±0.57
88.65±0.55
87.69±0.34
88.29±0.22
91.68±0.51
Table 6: Comparisons of GraphSR with other baselines when imbalance ratio is 0.3.
end for
Update candidate node set VC
Calculate the center ceni for class i
Obtain pseudo-minority node set Mi
for j = 1, ..., |Mi| do
Algorithm 1: The overall process of GraphSR
Input: G = (V, E, X); Imbalanced training set with labels {VL, YL}; Unlabelled node set U ; Number of epochs Ne; Label set
of minority class YM
Output: Augmented training set, unbiased GNN classifier f
1: Initialize a GNN classifier g trained with VL
2: Obtain embeddings of labelled and unlabelled nodes by g
3: for i ∈ YM do
4:
5:
6:
7:
8:
9: end for
10: Initialize agent πθ randomly
11: Initialize current training set Vt = VL
12: for e = 1, ..., Ne do
13:
14:
15:
16:
17:
18:
19:
20: end for
21: Obtain final augmented training set {VL, V ˆL}
22: Train an unbiased GNN classifier f based on {VL, V ˆL}
23: return Agent πθ, GNN classifier f
Get state st
Sample action at ∼ πθ(st)
Update Vt
Obtain reward rt
for t = 1, ..., |VC| do
end for
Update πθ
|
|
http://arxiv.org/abs/2302.12808v2 | 2023-07-12T14:07:17 | 2023-02-24T18:41:48 | Linearization Algorithms for Fully Composite Optimization | This paper studies first-order algorithms for solving fully composite
optimization problems over convex and compact sets. We leverage the structure
of the objective by handling its differentiable and non-differentiable
components separately, linearizing only the smooth parts. This provides us with
new generalizations of the classical Frank-Wolfe method and the Conditional
Gradient Sliding algorithm, that cater to a subclass of non-differentiable
problems. Our algorithms rely on a stronger version of the linear minimization
oracle, which can be efficiently implemented in several practical applications.
We provide the basic version of our method with an affine-invariant analysis
and prove global convergence rates for both convex and non-convex objectives.
Furthermore, in the convex case, we propose an accelerated method with
correspondingly improved complexity. Finally, we provide illustrative
experiments to support our theoretical results. | [
"Maria-Luiza Vladarean",
"Nikita Doikov",
"Martin Jaggi",
"Nicolas Flammarion"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12808v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12808v2",
"@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
l
u
J
2
1
]
C
O
.
h
t
a
m
[
2
v
8
0
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Proceedings of Machine Learning Research vol 195:1–27, 2023
36th Annual Conference on Learning Theory
Linearization Algorithms for Fully Composite Optimization
Maria-Luiza Vladarean
́Ecole Polytechnique F ́ed ́erale de Lausanne
Nikita Doikov
́Ecole Polytechnique F ́ed ́erale de Lausanne
Martin Jaggi
́Ecole Polytechnique F ́ed ́erale de Lausanne
Nicolas Flammarion
́Ecole Polytechnique F ́ed ́erale de Lausanne
Editors: Gergely Neu and Lorenzo Rosasco
[email protected]
[email protected]
[email protected]
[email protected]
Abstract
This paper studies first-order algorithms for solving fully composite optimization problems over
convex and compact sets. We leverage the structure of the objective by handling its differentiable
and non-differentiable components separately, linearizing only the smooth parts. This provides us
with new generalizations of the classical Frank-Wolfe method and the Conditional Gradient Sliding
algorithm, that cater to a subclass of non-differentiable problems. Our algorithms rely on a stronger
version of the linear minimization oracle, which can be efficiently implemented in several practical
applications. We provide the basic version of our method with an affine-invariant analysis and prove
global convergence rates for both convex and non-convex objectives. Furthermore, in the convex
case, we propose an accelerated method with correspondingly improved complexity. Finally, we
provide illustrative experiments to support our theoretical results.
Keywords: convex optimization, composite problems, Frank-Wolfe algorithm, acceleration
1. Introduction
In this paper we consider fully composite optimization problems of the form
(cid:105)
(cid:104)
φ(x) def= F (f (x), x)
,
min
x∈X
(1)
is a convex and compact set, F : Rn
R is a simple but possibly non-differentiable
Rn is a smooth mapping, which is the main source of computational
× X →
X
where
convex function and f :
burden.
X →
Problems of this type cover and generalize many classical use-cases of composite optimiza-
tion and are often encountered in applications. In this work, we develop efficient algorithms for
solving (1) by leveraging the structure of the objective and using the linearization principle. Our
method generalizes the well-known Frank-Wolfe algorithm (Frank and Wolfe, 1956) and ensures
asymptotically faster convergence rates compared to methods treating φ in a black-box fashion.
A classical algorithm for solving smooth optimization problems is the Gradient Descent method
(GD), proposed by Cauchy in 1847 (see historical note by Lemar ́echal (2012)). It rests on the idea
of linearizing the function around the current iterate, taking a step in the negative gradient direction
for k
and projecting the result onto the feasible set
0:
X
≥
© 2023 M.-L. Vladarean, N. Doikov, M. Jaggi & N. Flammarion.
VLADAREAN DOIKOV JAGGI FLAMMARION
yk+1 = πX
(cid:0)yk
where πX is the projection operator onto
imize general non-smooth convex functions by substituting
subdifferential ∂φ(yk). The resulting Subgradient method was proposed by Shor et al. (1985).
−
. Surprisingly, the same kind of iterations can min-
φ(yk) with any subgradient in the
φ(yk)(cid:1),
αk > 0,
(2)
αk
∇
∇
X
Another notable example for smooth optimization over a convex and bounded constraint set
X
is the Frank-Wolfe (FW) method (Frank and Wolfe, 1956). Again, a linearization of the objective
around the current iterate is used to query the so-called linear minimization oracle (LMO) associated
with
, for every k
0:
X
yk+1
∈
≥
Argmin
x
(cid:8)
φ(yk), x
⟨∇
: x
∈
⟩
yk + γk(
X −
yk) (cid:9),
(0, 1].
γk
∈
(3)
Steps of type (3) can be significantly cheaper than those involving projections (2) for a few notable
domains such as nuclear norm balls and spectrahedrons (Combettes and Pokutta, 2021), making
FW the algorithm of choice in such scenarios. Moreover, the solutions found by FW methods can
benefit from additional properties such as sparsity (Jaggi, 2013). These desirable features make
FW methods suitable for large scale optimization, a fact which led to an increased interest in recent
years (we point the reader to the monograph of Braun et al. (2022) for a detailed presentation).
Unfortunately, the vanilla FW algorithm does not extend to non-differentiable problems in the same
straightforward manner as GD – a counterexample is given by Nesterov (2018a). The question of
developing non-smooth versions of the FW algorithm therefore remains open, and is the main focus
of this article.
O
Finally, we touch on the issue of convergence rates – a principal means of theoretically charac-
terizing optimization algorithms. The classical monograph of Nemirovski and Yudin (1983) estab-
(1/√k) rate of the Subgradient method is optimal for general non-differentiable
lishes that the
(1/k) rate of its counterpart GD is far from the lower bound of
convex problems, while the
Ω(1/k2) for L
smooth convex functions. Similar results are established by Lan (2013) for LMO-
(1/k) rate is matched by a lower bound for smooth
based algorithms, although in this case the
convex minimization. This relatively slow convergence of FW algorithms is a result of their affine-
invariant oracle, which is independent on the choice of norm. In light of these lower bounds, one
can only hope to improve convergence rates by imposing additional structure on the problem to be
solved.
O
O
−
The present work leverages this observation and studies a subclass of (possibly) non-smooth
and non-convex problems with the specific structure of (1). Our methods require only linearizations
of the differentiable component f , while the non-differentiable function F is kept as a part of the
subproblem solved within oracle calls. We show that this approach is a viable way of generalizing
FW methods to address problem (1), with the possibility of acceleration. Our contributions can be
summarized as follows.
• We propose a basic method for problem (1), which is affine-invariant and equipped with
(1/k) in the convex setting,
accuracy certificates. We prove the global convergence rate of
and of ̃
O
(1/√k) in the non-convex case.
• We propose an accelerated method with inexact proximal steps which attains a convergence
(cid:0)ε−1/2(cid:1) oracle
f .
(1/k2) for convex problems. Our algorithm achieves the optimal
rate of
complexity for smooth convex problems in terms of the number of computations of
O
O
O
• We provide proof-of-concept numerical experiments, that demonstrate the efficiency of our
∇
approach for solving composite problems.
2
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
Related Work. The present work lies at the intersection of two broad lines of study: general
methods for composite optimization and FW algorithms. The former category encompasses many
approaches that single out non-differentiable components in the objective's structure, and lever-
age this knowledge in the design of efficient optimization algorithms. This approach originated
in the works of Burke (1985, 1987); Nesterov (1989); Nemirovski (1995); Pennanen (1999); Bot ̧
et al. (2007, 2008). A popular class of additive composite optimization problems was proposed
by Beck and Teboulle (2009); Nesterov (2013) and the modern algorithms for general composite
formulations were developed by Cui et al. (2018); Drusvyatskiy and Lewis (2018); Drusvyatskiy
and Paquette (2019); Bolte et al. (2020); Burke et al. (2021); Doikov and Nesterov (2022).
The primitive on which most of the aforementioned methods rely is a proximal-type step – a
generalization of (2). Depending on the geometry of the set
, such steps may pose a significant
computational burden. Doikov and Nesterov (2022) propose an alternative contracting-type method
for fully composite problems, which generalizes the vanilla FW algorithm. Their method relies on
a simpler primitive built on the linearization principle, which can be much cheaper in practice. We
study the same problem structure as Doikov and Nesterov (2022) and devise methods with several
advantages over the aforementioned approach, including an affine-invariant analysis, accuracy cer-
tificates, convergence guarantees for non-convex problems and, in the convex case, an accelerated
convergence. Moreover, we decouple stepsize selection from the computational primitive, to enable
efficient line search procedures.
X
O
Our methods are also intimately related to FW algorithms, which they generalize. For smooth
(cid:0)ε−1(cid:1) LMO and first order oracle (FO)
and convex problems, vanilla FW converges at the cost of
calls in terms the Frank-Wolfe gap – an accuracy measure bounding functional suboptimality (Jaggi,
(cid:0)ε−2(cid:1) LMO
2013). For smooth non-convex problems, a gap value of at most ε is attained after
and FO calls (Lacoste-Julien, 2016). Due to the relatively slow convergence of LMO-based meth-
ods, recent efforts have gone into devising variants with improved guarantees. The number of FO
calls was reduced to the lower bound for smooth convex optimization by Lan and Zhou (2016), local
acceleration was achieved following a burn-in phase by Diakonikolas et al. (2020); Carderera et al.
(2021); Chen and Sun (2022), and empirical performance was enhanced by adjusting the update di-
rection with gradient information by Combettes and Pokutta (2020). Of the aforementioned works,
closest to ours is the Conditional Gradient Sliding (CGS) algorithm proposed by Lan and Zhou
(2016) and further studied by Yurtsever et al. (2019); Qu et al. (2018). CGS uses the acceleration
framework of Nesterov (1983) and solves the projection subproblem inexactly via the FW method,
(cid:0)ε−1/2(cid:1) FO calls for smooth convex problems. We rely on a
achieving the optimal complexity of
similar scheme for improving FO complexity in the convex case.
O
O
O
(cid:0)ε−4(cid:1) FO calls, a complexity which is later improved to
In the context of generic non-smooth convex objectives, the FW algorithm was studied by Lan
(2013), who proposes a smoothing-based approach matching the lower bound of Ω(ε−2) LMO calls.
(cid:0)ε−2(cid:1)
The method however requires
by Garber and Hazan (2016) through a modified LMO for polytopes, by Ravi et al. (2019) with a
(differently) modified LMO, and finally by Thekumparampil et al. (2020) through a combination of
smoothing and the CGS algorithm. Our algorithm, instead, leverages the structure of problem (1)
and a modified LMO to achieve improved rates, with the added benefit of an affine invariant method
and analysis. We also mention FW methods for additive composite optimization (Argyriou et al.,
2014; Yurtsever et al., 2018, 2019; Zhao and Freund, 2022), with the former three relying on proxi-
mal steps and the latter assuming a very restricted class of objectives.
O
3
VLADAREAN DOIKOV JAGGI FLAMMARION
Reference
φ subclass
Use structure?
Shor et al. (1985)
Thekumparampil et al. (2020)
Doikov and Nesterov (2022)
(this work) Alg. 2
cvx, L-cont
cvx, L-cont
cvx, fully-comp
cvx, fully-comp.
De Oliveira (2023)
non-cvx, upper-C 1,α
non-cvx, abs-smooth
Kreimeier et al. (2023)
Drusvyatskiy and Paquette (2019) non-cvx, comp
(this work) Alg. 1
non-cvx, fully-comp
no
no
yes
yes
no
no
yes
yes
# FO
Observations
# PO/LMO
O (cid:0)ε−2(cid:1)(1) O (cid:0)ε−2(cid:1)(1)
projection
O (cid:0)ε−2(cid:1)(1) O (cid:0)ε−2(cid:1)(1) smoothing, vanilla LMO
O (cid:0)ε−1(cid:1)(1) O (cid:0)ε−1(cid:1)(1)
modif. LMO
ε−1/2(cid:17)(1) O (cid:0)ε−1(cid:1)(1)
(cid:16)
O
modif. LMO
O (cid:0)ε−2(cid:1) (2) O (cid:0)ε−2(cid:1) (2)
O (cid:0)ε−2(cid:1) (3) O (cid:0)ε−2(cid:1) (3)
O (cid:0)ε−2(cid:1) (4) O (cid:0)ε−2(cid:1) (4)
̃O (cid:0)ε−2(cid:1) (5)
̃O (cid:0)ε−2(cid:1) (5)
vanilla LMO
modif. LMO
prox. steps
modif. LMO
Table 1: Summary of convergence complexities for solving non-smooth problems. Note (1) marks complexi-
ties reaching an ε functional residual. Note (2) marks complexities for reaching Clarke-stationary points. Note
(3) marks complexities for obtaining d
stationary points. Note (4) marks the complexity for reaching a small
norm of the gradient mapping. Finally, note (5) marks the complexity of minimizing the positive quantity (14).
−
Finally, two concurrent works study FW methods for some restricted classes of non-smooth and
non-convex problems. De Oliveira (2023) shows that vanilla FW with line-search can be applied to
C1,α functions, when one replaces gradients with an arbitrary element
the special class of upper
(cid:0)ε−2(cid:1) is shown for reaching a Clarke-stationary point in
in the Clarke subdifferential. A rate of
a setting comparable to ours. A similar rate is shown by Kreimeier et al. (2023) for reaching a d-
stationary point of abs-smooth functions through the use of a modified LMO. Both these algorithms
are structure-agnostic. A summary of method complexities for solving non-smooth problems is
provided in Table 1.
O
−
Notation. We denote by [n] the set
1, . . . n
}
{
and by
∥ * ∥
the standard Euclidean norm, unless ex-
def= maxz,y∈X
as
y
z
∈
λ
Rn
def=
+ :
f (x)
plicitly stated otherwise. We define the diameter of a bounded set
We use the notation ∆n
λ, e
{
⟩
⟨
where e is the vector of all ones. For a differentiable, scalar-valued function f : Rd
Rd to denote its gradient vector and
∇
a differentiable vector-valued function f : Rd
.
∥}
to denote the standard n-dimensional simplex,
}
R we use
Rd×d to denote its Hessian matrix. For
2f (x)
∇
Rn defined as f = (f1, f2, . . . fn) we denote by
→
f (x) = (cid:80)n
Rn×d, where ei are the standard
i=1 ei
∇
basis vectors in Rn. We represent the second directional derivatives applied to the same direction
h
∇
2f (x)[h]2 def= (cid:80)n
f (x) its Jacobian matrix defined as
∈
fi(x)⊤
2f (x)[h]2 def=
2f (x)h, h
R, and
Rd as
2fi(x)[h]2
Rn.
= 1
→
{∥
∇
−
D
X
∈
∈
X
∈
∇
⟨∇
⟩ ∈
∇
i=1 ei
∇
∈
2. Problem Setup, Assumptions and Examples
The problems addressed by this work are represented by the following structured objective
φ⋆ = min
x∈X
(cid:104)
φ(x) def= F (f (x), x)
(cid:105)
,
Rd,
X ⊂
(4)
is a convex and compact set and the inner mapping f :
where
defined as f (x) = (f1(x), . . . , fn(x))
access to a first-order oracle
Rn is differentiable and
X →
R is differentiable. We assume
X →
f , which is the main source of computational burden. The outer
Rn, where each fi :
X
∈
∇
4
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
component F : Rn
and is simple (see assumptions). However, F is possibly non-differentiable.
R, on the other hand, is directly accessible to the algorithm designer
× X →
In this work, we propose two algorithmic solutions addressing problem (4), which we call a
fully composite problem. Our methods importantly assume that subproblems of the form
Argmin
x∈X
F (cid:0)Ax + b, x(cid:1) +
u, x
⟩
⟨
(5)
Rd. Oracles of type (5) are sequen-
are efficiently solvable, where A
tially called during the optimization procedure and take as arguments linearizations of the difficult
nonlinear components of (4). Naturally, solving (5) cheaply is possible only when F is simple and
Rn×d and b
Rn, u
∈
∈
∈
X
has an amenable structure.
In particular, template (4) encompasses to some standard problem formulations. For example,
u(1), in which case problem (4)
the classical Frank-Wolfe setting is recovered when F (u, x)
u, x
becomes minx∈X f1(x) and subproblem (5) reduces to a simple LMO: argminx∈X ⟨
. The
⟩
u(1) + ψ(x) for
setting of proximal-gradient methods is similarly covered, by letting F (u, x)
a given convex function ψ (e.g., a regularizer). Then, problem (4) reduces to additive composite
(cid:111)
.
optimization minx∈X
We now formally state the assumptions on the fully composite problem (4), along with com-
, and subproblem (5) becomes argminx∈X
≡
(cid:110)
u, x
⟨
f1(x) + ψ(x)
+ ψ(x)
≡
(cid:110)
(cid:111)
⟩
mentary and examples.
Assumption 1 The outer function F : Rn
F (u, x) is subhomogeneous in u:
×X →
R is jointly convex in its arguments. Additionally,
F (γu, x)
≤
γF (u, x),
Rn, x
u
∀
∈
, γ
1.
≥
∈ X
(6)
Assumption 2a The inner mapping f :
quantity is bounded:
X →
Rn is differentiable and the following affine-invariant
=
S
f ,F,X
S
def=
sup
x,y∈X , γ∈(0,1]
yγ =x+γ(y−x)
F (cid:0) 2
γ2
(cid:2)f (yγ)
f (x)
−
− ∇
f (x)(yγ
−
x)(cid:3), yγ
(cid:1) < +
.
∞
(7)
i
∀
Rn.
Assumption 2b Each component fi(
) has a Lipschitz continuous gradient on
*
fi(y)
x, y
Li
x
y
,
[n].
∥ ≤
∥
−
∥
∀
∈ X
∈
fi(x)
∥ ∇
− ∇
with constant Li:
X
We denote the vector of Lipschitz constants by L = (L1, . . . , Ln)
∈
Assumption 3 Each component fi :
Thus, for any two vectors u, v
X →
Rn such that u
R is convex. Moreover, F (
, x) is monotone
*
v (component-wise), it holds that
∈
≤
F (u, x)
≤
F (v, x).
x
∀
.
∈ X
(8)
A few comments are in order. Assumption 1, which is also required by Doikov and Nesterov
(2022), represents the formal manner in which we ask that F be simple – through convexity and
bounded growth in u. This assumption ensures convexity of subproblem (5), irrespective of the
nature of f .
5
VLADAREAN DOIKOV JAGGI FLAMMARION
Assumption 2a is a generalization of the standard bounded curvature premise typical for Frank-
Wolfe settings (Jaggi, 2013). Requirement (7) is mild, as it only asks that the curvature of f remains
is affine-invariant (remains unchanged un-
bounded under F over
der affine reparametrizations of
), which enables us to obtain convergence rates with the same
property. Further discussion on the importance of affine-invariant analysis for FW algorithms is
provided by Jaggi (2013). For mappings f that are twice differentiable, we can bound the quantity
. Importantly, the quantity
X
X
S
S
from Assumption 2a using Taylor's formula and the second derivatives, as follows
S ≤
sup
x,y∈X , γ∈[0,1]
yγ =x+γ(y−x)
F (
∇
2f (yγ)[y
x]2, x).
−
This quantity is reminiscent of the quadratic upper-bound used to analyze smooth optimization
methods. In particular, for monotone non-decreasing F , a compact
and Lipschitz continuous
, the assumption is satisfied with
fi with respect to a fixed norm
X
∇
∥ * ∥
F (L
S ≤
2
X ) def= sup
D
x∈X
F (L
2
X , x).
D
Assumption 2b is standard and considered separately from Assumption 2a to allow for different
makes this a locally-Lipschitz gradient
levels of generality in our results. The restriction to
assumption on fi.
X
Finally, Assumption 3, which is also made by Doikov and Nesterov (2022), is required whenever
we need to ensure the overall convexity of φ(x). The monotonicity of F is necessary in addition to
convexity of each fi, since the composition of convex functions is not necessarily convex (Boyd and
Vandenberghe, 2004). We rely on this assumption for deriving asymptotically faster convergence
rates in the convex setting (Section 4).
To conclude this section, we provide the main application examples that fall under our fully
composite template and which satisfy to our assumptions. Further examples can be found in Ap-
pendix C.
u(i). Function F satisfies Assumptions 1 and 3 and problem (4)
Example 1 Let F (u, x)
becomes
max
1≤i≤n
≡
while oracle (5) becomes
min
x∈X
max
1≤i≤n
fi(x),
min
x∈X
max
1≤i≤n⟨
ai, x
⟩
+ bi
min
x∈X ,t∈R
(cid:8)t :
⇔
ai, x
⟨
⟩
+ bi
≤
t, 1
i
≤
≤
n(cid:9).
Max-type minimization problems of this kind result from scalarization approaches in multi-objective
optimization, and their solutions were shown to be (weakly) Pareto optimal (Chapter 3.1 in Miet-
tinen, 1999). As such, problem (9) is relevant to a wide variety of applications requiring optimal
trade-offs amongst several objective functions, and appears in areas such as machine learning,
science and engineering (see the introductory sections of, e.g., Daulton et al., 2022; Zhang and
Golovin, 2020). Problem (9) also covers some instances of constrained l∞ regression.
When
is a polyhedron, subproblem (10) can be solved via Linear Programming, while for
X
one can resort to Interior-Point Methods (Nesterov and Nemirovski, 1994). Another
general
option for solving (10) is to note that under strong duality (Rockafellar, 1970) we have
X
min
x∈X
max
1≤i≤n⟨
ai, x
⟩
+ bi = min
x∈X
max
λ∈∆n
n
(cid:80)
i=1
λ(i)(cid:2)
⟨
ai, x
⟩
+ bi
(cid:3) = max
λ∈∆n
g(λ),
(11)
6
(9)
(10)
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
(cid:80)n
ai, x
i=1 λ(i)(cid:2)
⟨
(cid:3). The maximization of g in (11) can be done very
where g(λ) def= min
x∈X
efficiently for small values of n (with, e.g., the Ellipsoid Method or the Mirror Descent algorithm),
. An interesting case is
since evaluating g(λ) and ∂g(λ) reduces to a vanilla LMO call over
n = 2, for which (11) becomes a univariate maximization problem and one may use binary search
to solve it at the expense of a logarithmic number of LMOs.
+ bi
X
⟩
Example 2 Let F (u, x)
and problem (4) can be interpreted as solving a system of non-linear equations over
for an arbitrary fixed norm
≡ ∥
∥*∥
u
. Function F satisfies Assumption 1
∥
min
x∈X ∥
f (x)
∥
,
X
(12)
while oracle (5) amounts to solving the (constrained) linear system min
Ax + b
x∈X ∥
. Problems of
∥
this kind can be encountered in applications such as robust phase retrieval (Duchi and Ruan, 2019)
with phase constraints.
The iterations of Algorithm 1 can be interpreted as a variant of the Gauss-Newton method
(Burke and Ferris, 1995; Nesterov, 2007; Tran-Dinh et al., 2020), solving the (constrained) linear
systems:
xk+1
Argmin
x∈X ∥
∈
f (yk) +
∇
f (yk)(x
yk)
∥
−
, and yk+1 = (1
−
γk)yk + γkxk+1.
(13)
In the particular case of solving systems of non-linear equations over compact convex sets, our
algorithms can be seen as modified Gauss-Newton methods with global convergence guarantees.
3. The Basic Method
We present the first new method for solving problem (4) in Algorithm 1. The central idea is to lin-
earize the differentiable components of the objective and then to minimize this new model over the
, via calls to an oracle of type (5). The next iterate is defined as a convex combination
constraint
with coefficient (or stepsize) γ between the computed minimizer and the preceding iterate.
X
Algorithm 1 Basic Method
Input: y0
for k = 0, 1, . . . do
∈ X
Compute
xk+1
Argmin
x∈X
∈
F (cid:0)f (yk) +
f (yk)(x
∇
−
yk), x(cid:1)
(0, 1] by a predefined rule or with line search
Choose γk
Set yk+1 = (1
∈
end for
γk)yk + γkxk+1
−
A similar method for tackling problems of type (4) in the convex setting was proposed by Doikov
and Nesterov (2022). Different from theirs, our method decouples the parameter γk from the min-
imization subproblem. This change is crucial since it allows us to choose the parameter γk after
minimizing the model, thus enabling us to use efficient line search rules. Moreover, we provide
7
VLADAREAN DOIKOV JAGGI FLAMMARION
Algorithm 1 with a more advanced affine-invariant analysis and establish its convergence in the
non-convex setup.
We also mention that for solving problems of type (9), oracle (5) reduces to the minimization
. Therefore, it has the same complexity as the modified LMOs
of a piecewise linear function over
of Kreimeier et al. (2023) and, moreover, subproblem (5) is convex irrespective of the nature of f .
X
Accuracy Certificates. The standard progress metric of FW algorithms, which Algorithm 1 gen-
eralizes, is the 'Frank-Wolfe gap' or Hearn gap (Hearn, 1982). For smooth objectives, it is defined
as ∆k = maxy∈X
, for each iterate yk. This quantity is computed cost-free during
−
⟩
the algorithm's iterations and has the desirable property of upper-bounding the suboptimality of the
φ⋆. Notably, its semantics straightforwardly extend to the non-convex
current iterate: ∆k
setting (Lacoste-Julien, 2016). Additionally, convergence guarantees on the gap are desirable due
to its affine invariance, which aligns with the affine invariance of classical FW algorithm.
φ(yk), yk
φ(yk)
⟨∇
−
≥
y
Our setting does not permit a direct generalization of the FW gap with all of the above properties.
Rather, we introduce the following accuracy certificate, which is readily available in each iteration:
∆k
def= φ(yk)
F (cid:0)f (yk) +
−
f (yk)(xk+1
∇
−
yk), xk+1
(cid:1).
(14)
For minimization of a smooth (not necessarily convex) function, quantity (14) indeed reduces to the
standard FW gap. Moreover, for convex φ(x) (Assumption 3) we can conclude that
∆k
(cid:104)
φ(yk)
(cid:104)
φ(yk)
max
x∈X
max
x∈X
−
−
≥
≥
F (cid:0)f (yk) +
∇
(cid:105)
F (f (x), x)
f (yk)(x
−
= φ(yk)
yk), x(cid:1)(cid:105)
φ⋆.
−
(15)
Hence, for a tolerance ε > 0, the criterion ∆k
ε can be used as the stopping condition for our
method in convex scenarios. Moreover, the value of ∆k can be used for computing the parameter
γk through line search.
≤
Convergence on Convex Problems.
rithm 1 in case when φ(x) is convex.
In the following, we prove the global convergence of Algo-
Theorem 3.1
Then, for k
≥
Let Assumptions 1, 2a, and 3 be satisfied. Let γk := min
1 it holds that
1, ∆k
{
S }
or γk := 2
2+k .
φ(yk)
φ⋆
−
≤
2
S
1 + k
and
min
1≤i≤k
∆i
≤
6
S
k
.
(16)
Our method recovers the rate of classical FW methods for smooth problems, while being ap-
(1/k) rate improves upon
(1/√k) of black-box non-smooth optimization. Clearly, the improvement is achievable by
plicable to the wider class of fully composite problems (4). Thus, our
the
leveraging the structure of the objective within the algorithm.
O
O
In this case, ∆k has different semantics and no longer
Convergence on Non-convex Problems.
provides an accuracy certificate for the functional residual. This quantity is nevertheless important,
since it enables us to quantify the algorithm's progress in the non-convex setting, while maintaining
an affine-invariant analysis. The following theorem states the convergence guarantee on ∆k for
non-convex problems.
8
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
Theorem 3.2 Let Assumptions 1 and 2a be satisfied. Let γk := min
{
for all k
1 it holds that
≥
1, ∆k
S }
or γk := 1√
1+k
. Then,
min
0≤i≤k
∆i
≤
φ(y0)−φ⋆+0.5S(1+ln(k+1))
k+1
√
.
(17)
Theorem 3.2 recovers a similar rate to the classical FW methods (Lacoste-Julien, 2016). The line
search rule for parameter γk makes our method universal, thereby allowing us to attain practically
faster rates automatically when the iterates lie within a convex region of the objective.
As previously mentioned, the progress measure (14) does not upper-bound functional subopti-
mality in the general non-convex setting. However, in some cases, we may still be able to establish
convergence of meaningful quantities for non-convex fully composite problems with the lineariza-
tion method. Namely, let us consider problem (12) in Example 2 for the Euclidean norm, i.e.,
F (u, x) =
, and the following simple iterations:
u
∥
∥
yk+1
Argmin
y∈yk+γk(X −yk) ∥
∈
f (yk) +
f (yk)(y
.
yk)
∥
−
∇
(18)
Note that in (18), differently from (13), the value of γk is selected prior to the oracle call. Denoting
(cid:2)φ(x)(cid:3)2 = 1
the squared objective as Φ(x) def= 1
2 and following our analysis, we can state
2 ∥
2
∥
the convergence of process (18) in terms of the classical FW gap with respect to Φ. The proof is
deferred to Appendix A.5.
f (x)
Proposition 3.1 Let γk := 1√
k
1, it holds that
1+k
≥
min
0≤i≤k
max
y∈X ⟨∇
Φ(yi), yi
y
−
⟩ ≤ O
(cid:0) ln(k)
√
k
(cid:1).
. Then, for the iterations (18), under Assumption 2b and for all
We further show in Appendix B that ∆k can be related to the classical FW gap, when our
iterates lie in a smooth region of F . Whether we can provide a meaningful interpretation of ∆k in
the general non-convex case, however, remains an interesting open question.
4. The Accelerated Method
We now move away from the affine-invariant formulation of Algorithm 1 to a setting in which, by
considering regularized minimization subproblems along with convexity and Lipschitz continuity
of gradients, we can accelerate the Basic Method. We achieve acceleration by resorting to the
well-known three-point scheme of Nesterov (1983), in which the proximal subproblem is solved
inexactly via calls to oracles of type (5). This approach was first analyzed in the context of FW
methods by Lan and Zhou (2016).
We propose Algorithm 2 which consists of a two-level scheme: an outer-loop computing the
, and a subsolver computing inexact solutions to the proximal
values of three iterates y, x and z in
subproblem
X
(cid:110)
P (u) def= F (f (z) +
Argmin
u∈X
f (z)(u
∇
−
z), u) + β
2 ∥
u
x
∥
−
2
2, β > 0
(cid:111)
.
(19)
Note that the minimization in (19) does not conform to our oracle model (5) due to the quadratic
regularizer. However, we can approximate its solution by iteratively solving subproblems in which
9
VLADAREAN DOIKOV JAGGI FLAMMARION
we linearize the squared norm to match the template of (5). This procedure, denoted as InexactProx
in Algorithm 2, returns a point u+ satisfying the optimality condition η-inexactly for some η > 0:
F (f (z) +
f (z)(u+
∇
−
z), u+) + β
u+
⟨
−
x, u+
⟩
F (f (z) +
f (z)(u
∇
≤
Note that condition (20) implies P (u+)
≤
Algorithm 2 Accelerated Method
Input: y0
for k = 0, 1, . . . do
∈ X
, set x0 = y0
z), u) + β
−
P (u) + η,
u+
⟨
u
∀
∈ X
x, u
⟩
−
+ η,
u
∀
.
∈ X
(20)
. Formally, the main convergence
(0, 1]
Choose γk
∈
Set zk+1 = (1
Compute xk+1 = InexactProx(xk, zk+1, βk, ηk) for some βk
Set yk+1 = (1
γk)yk + γkxk+1
γk)yk + γkxk
−
end for
−
0 and ηk
0
≥
≥
result characterizing Algorithm 2 is the following.
Theorem 4.1 Let Assumptions 1, 2b, and 3 be satisfied. We choose γk := 3
and ηk :=
Then, for all k
k+3 , βk := cF (L)γk
0 are chosen constants, and F (L) := supx∈X F (L, x).
3(k+1)(k+2) where δ > 0 and c
1 it holds that
≥
δ
≥
φ(yk)
φ⋆
−
≤
δ+8cF (L)D2
X
(k+2)(k+3) + 2 max{0,1−c}F (L)D2
k+3
X
.
The proof of Theorem 4.1 comes from a natural sequence of steps involving the properties of
the operators and the approximate optimality of xk+1. The crucial step in attaining the improved
convergence is the choice of parameters γk, βk and ηk. Notably, the decay speed required of ηk is
quadratic, meaning that the subproblems are solved with fast-increasing accuracy and at the cost of
additional time spent in the subsolver. The constant δ allows us to fine-tune the accuracy required
for the first several iterations of the algorithm, where we can demand a lower accuracy. In practice,
2
we can always choose δ = 1 as a universal rule, and the optimal choice is δ = F (L)
X when these
parameters are known. The factor cF (L) in the definition of βk can be interpreted as the quality
of the approximation of the Lipschitz constant for our problem. Namely, it is exactly computed for
c = 1, and over or underestimated for c > 1 and c
∈
We describe each of the bounding terms independently: the first is highly reminiscent of the
usual bounds accompanying FW-type algorithms in terms of constants, albeit now with quadratic
decay speed. The second term indicates the behavior of the algorithm as a function of c: overes-
timation of F (L) ensures quadratic rates of convergence, since the second term becomes negative.
Conversely, underestimation of F (L) brings us back into the familiar FW convergence regime of
(1/k) as the second term becomes positive. The extreme case c = 0 (and hence βk = 0) essen-
O
tially reduces Algorithm 2 to Algorithm 1, since the projection subproblem reduces to problem (5)
which we assume to be easily solvable. We therefore have robustness in terms of choosing the pa-
rameter c and the exact knowledge of F (L) is not needed, even though it may come at the cost of a
(0, 1) respectively.
D
10
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
slower convergence. In contrast, classical Fast Gradient Methods are usually very sensitive to such
parameter choices (Devolder, 2013).
Theorem 4.1 provides an accelerated rate on the iterates yk – an analogous result to that of Lan
and Zhou (2016) albeit under a different oracle. This convergence rate is conditioned on the sub-
solver returning an ηk-inexact solution to the projection subproblem and therefore any subsolver
satisfying the condition can achieve this rate. As with any optimization algorithm, convergence
guarantees may also be stated in terms of the oracle complexity required to reach ε accuracy. For
Algorithm 2 all the oracle calls are deferred to the subsolver InexactProx, which we describe and
analyze in the next section.
5. Solving the Proximal Subproblem
We now provide an instance of the InexactProx subsolver which fully determines the oracle com-
plexity of the Accelerated Method (Algorithm 2). It relies on a specific adaptation of Algorithm 1
to the structure of (19). The quadratic regularizer is linearized and oracles of type (5) are called
f (zk) is computed once per subsolver call. The main
once per inner iteration, while the Jacobian
challenge here is to find a readily available quantity defining the exit condition of the subsolver,
which we denote by ∆t.
∇
Algorithm 3 InexactProx(x, z, β, η)
Initialization: u0 = x.
for t = 0, 1, . . . do
Compute vt+1
∈
Compute ∆t = F (cid:0)f (z) +
Argmin
v∈X
(cid:110)
F (cid:0)f (z) +
f (z)(ut
∇
f (z)(v
−
(cid:1)
z), ut
−
∇
−
z), v(cid:1) + β
⟨
F (cid:0)f (z) +
x, v
ut
−
(cid:111)
⟩
f (z)(vt+1
∇
+ β
ut
⟨
−
−
x, ut
(cid:1)
z), vt+1
vt+1
−
⟩
η then return ut
if ∆t
≤
Set αt = min
(cid:110)
1,
∆t
β∥vt+1−ut∥2
2
end for
(cid:111)
and ut+1 = αtvt+1 + (1
αt)ut
−
The parameters of Algorithm 3 are fully specified, and the stopping condition depends on ∆t
≥
P ⋆, which is a meaningful progress measure. The algorithm selects its stepsize via closed-
u(1), this procedure recovers the
P (ut)
form line search to improve practical performance. When F (u)
classical FW algorithm with line search applied to problem (19).
−
≡
We prove two results in relation to Algorithm 3: its convergence rate and the total oracle com-
plexity of Algorithm 2 when using Algorithm 3 as the subsolver. The rate and analysis are similar
to the ones for the Basic Method, utilizing additionally the form of the proximal subproblem.
Theorem 5.1 Let Assumptions 1, 2b, and 3 be satisfied. Then, for all t
P (ut)
P ⋆
−
≤
2βD2
X
t+1
and
min
1≤i≤t
∆t
≤
1 it holds that
≥
6βD2
X
t
.
Consequently, Algorithm 3 returns an η-approximate solution according to condition (20) after at
most
iterations.
(cid:17)
(cid:16) βD2
X
η
O
11
VLADAREAN DOIKOV JAGGI FLAMMARION
(a)
(b)
Figure 1: Convergence of the Basic and Accelerated methods against the Projected Subgradient baseline for
problem (21), along with relevant theoretical rates.
We note that oracle (5) is called once per inner iteration and the Jacobian
once per subsolver call.
Method achieves the optimal number of
convex optimization, while maintaining a
The results are stated in the following corollary.
O
O
f (zk) is computed
In particular, when using Algorithm 3 as a subsolver, our Accelerated
(cid:0)ε−1/2(cid:1) Jacobian computations typical of smooth and
(cid:0)ε−1(cid:1) complexity for the number of calls to oracle (5).
∇
Corollary 5.1 Consider the optimal choice of parameters for Algorithm 2, that is c := 1 and
(cid:1)
(cid:113) F (L)D2
2
X . Then, solving problem (4) with ε accuracy φ(yk)
δ := F (L)
φ⋆
(cid:0)
X
ε
D
computations of
≤
f . In addition, the total number of calls to oracle (5) is
−
ε, requires
O
(cid:0) F (L)D2
(cid:1).
X
ε
O
∇
Finally, we note that for smaller values of parameter c
[0, 1] in Algorithm 2 (underestimating
the Lipschitz constant), the complexity of InexactProx procedure improves. Thus, for c = 0 we
have β = 0 (no regularization) and Algorithm 3 finishes after just one step.
∈
6. Experiments
The experiments are implemented in Python 3.9 and run on a MacBook Pro M1 with 16 GB
RAM. For both experiments we use the Projected Subgradient Method as a baseline (Shor et al.,
1985), with a stepsize of p√
where p is tuned for each experiment. The CVXPY library (Diamond
k
and Boyd, 2016) is used to solve subproblems of type (5). The random seed for our experiments is
always set to 666013, and we set c = 1 since we can analytically compute the Lipschitz constants
or their upper bounds.
6.1. Minimization Over the Simplex
We consider the following optimization problem
(cid:26)
min
x∈X
max
i=1,n
x⊤Aix
b⊤
i x
−
(cid:27)
, for
X
= ∆d,
Rd,
⊆
(21)
Rd×d are random PSD matrices and b
where Ai
and we use d = 500 and n = 10. We generate Ai = QiDQ⊤
Rd. The problem conforms to Example 1,
i , where D is a diagonal matrix of
∈
∈
12
100101102103FOcalls10−910−710−510−310−1φ(y)−φ?ProjSubGdBasicMAccM1/√k1/k1/k2100101102103SubproblemOraclecalls10−710−510−3φ(y)−φ?LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
(a)
(b)
Figure 2: Convergence of the Basic and Accelerated methods against the Projected Subgradient baseline for
problem (22), along with relevant theoretical rates.
eigenvalues decaying linearly from 1 to 10−6, and Qi is a randomly generated orthogonal matrix
using the scipy.stats.ortho group method (Mezzadri, 2006). The vectors bi, which de-
termine the position of the quadratics in space, are set as follows: bi = ei
10, b9 = 0 (the origin),
b10 = 1
10 (the all ones vector multiplied by 10). We set δ = 0.2 in the Accelerated Method (see
Theorem 4.1) and settle for p = 1.42 following tuning of the Subgradient Method. Finally, we set
x0 = e3
∆d for all methods.
*
*
The convergence results in terms of FO oracles and oracles of type (5) are shown in Fig-
ure 1(a) and 1(b), respectively. The figures highlight the improvement in terms of the number of FO
calls, while showing comparable performance in terms of subproblem oracle calls, as predicted by
our theory.
∈
6.2. Minimization Over the Nuclear Norm Ball
We consider the following optimization problem
max
i=1,n
(cid:88)
(cid:16)
(k,l)∈Ωi
(cid:17)2
A(i)
k,l
Xk,l
−
, for
:=
X
{
∈
X
Rd×m,
X
∥
∥∗ ≤
r
}
(22)
min
X∈X
Formulation (22) models a matrix completion scenario where we wish to recover an X⋆ that min-
imizes the largest error within a given set of matrices A(i). The matrices A(i) are only partially
revealed through a set of corresponding indices Ωi. This problem conforms to Example 1 and we
use d = 30, m = 10, r = 7, where r is the rank of matrices A(i). The data is generated in identical
fashion as in Section 5.2 of (Lan and Zhou, 2016) on Matrix Completion. We set δ = 100 in the
Accelerated Method (see Theorem 4.1) and settle for p = 0.2 following tuning of the Subgradient
Method. Finally, we set x0 = 0d×m
for all methods.
The convergence results in terms of FO oracles and oracles of type (5) are shown in Fig-
ure 2(a) and 2(b), respectively. The figures highlight the improvement in terms of the number of FO
calls, while showing comparable performance in terms of subproblem oracle calls, as predicted by
our theory.
∈ X
13
100101102103FOcalls10−610−410−2100φ(y)−φ?ProjSubGdBasicMAccM1/√k1/k1/k2100101102103SubproblemOraclecalls10−510−310−1101φ(y)−φ?VLADAREAN DOIKOV JAGGI FLAMMARION
7. Conclusion
Our work illustrates how improved convergence rates may be attained by assuming precise struc-
ture within a class of objectives (e.g., non-differentiable ones). Moreover, it shows how a simple
principle such as linearizing the differentiable components of a function composition can be used
to create more benign subproblems that are efficiently solved. Interesting future work may address
relaxing the assumptions on F , extending this framework to stochastic settings, and meaningfully
interpreting the quantity ∆k in the non-convex setting.
Acknowledgments
The authors thank Aditya Varre and the anonymous reviewers for their helpful feedback on the
manuscript. This work was partly supported by the Swiss State Secretariat for Education, Research
and Innovation (SERI) under contract number 22.00133.
References
Andreas Argyriou, Marco Signoretto, and Johan Suykens. Hybrid conditional gradient-smoothing
algorithms with applications to sparse and low rank regularization. Regularization, Optimization,
Kernels, and Support Vector Machines, pages 53–82, 2014.
Amir Beck and Marc Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse
problems. SIAM journal on imaging sciences, 2(1):183–202, 2009.
J ́erˆome Bolte, Zheng Chen, and Edouard Pauwels. The multiproximal linearization method for
convex composite problems. Mathematical Programming, 182(1):1–36, 2020.
Radu Ioan Bot ̧, Sorin-Mihai Grad, and Gert Wanka. New constraint qualification and conjugate
duality for composed convex optimization problems. Journal of Optimization Theory and Appli-
cations, 135:241–255, 2007.
Radu Ioan Bot ̧, Sorin-Mihai Grad, and Gert Wanka. A new constraint qualification for the formula of
the subdifferential of composed convex functions in infinite dimensional spaces. Mathematische
Nachrichten, 281(8):1088–1107, 2008.
Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004.
G ́abor Braun, Alejandro Carderera, Cyrille W Combettes, Hamed Hassani, Amin Karbasi,
arXiv preprint
Aryan Mokhtari, and Sebastian Pokutta. Conditional gradient methods.
arXiv:2211.14103, 2022.
James V Burke. Descent methods for composite nondifferentiable optimization problems. Mathe-
matical Programming, 33(3):260–279, 1985.
James V Burke. Second order necessary and sufficient conditions for convex composite ndo. Math-
ematical programming, 38:287–302, 1987.
James V Burke and Michael C Ferris. A Gauss-Newton method for convex composite optimiza-
tion. Mathematical Programming, 71(2):179–194, 1995.
14
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
James V Burke, Hoheisel Tim, and Quang V Nguyen. A study of convex convex-composite func-
tions via infimal convolution with applications. Mathematics of Operations Research, 46(4):
1324–1348, 2021.
Alejandro Carderera, Jelena Diakonikolas, Cheuk Yin Lin, and Sebastian Pokutta. Parameter-free
locally accelerated conditional gradients. arXiv preprint arXiv:2102.06806, 2021.
Zhaoyue Chen and Yifan Sun. Accelerating frank-wolfe via averaging step directions. arXiv
preprint arXiv:2205.11794, 2022.
Cyrille Combettes and Sebastian Pokutta. Boosting frank-wolfe by chasing gradients. In Interna-
tional Conference on Machine Learning, pages 2111–2121. PMLR, 2020.
Cyrille W Combettes and Sebastian Pokutta. Complexity of linear minimization and projection on
some sets. Operations Research Letters, 2021.
Ying Cui, Jong-Shi Pang, and Bodhisattva Sen. Composite difference-max programs for modern
statistical estimation problems. SIAM Journal on Optimization, 28(4):3344–3374, 2018.
Samuel Daulton, David Eriksson, Maximilian Balandat, and Eytan Bakshy. Multi-objective
bayesian optimization over high-dimensional search spaces. In Uncertainty in Artificial Intel-
ligence, pages 507–517. PMLR, 2022.
Welington De Oliveira. Short paper-a note on the frank–wolfe algorithm for a class of nonconvex
and nonsmooth optimization problems. Open Journal of Mathematical Optimization, 4:1–10,
2023.
Olivier Devolder. Exactness, inexactness and stochasticity in first-order methods for large-scale
convex optimization. PhD thesis, ICTEAM and CORE, Universit ́e catholique de Louvain, 2013.
Jelena Diakonikolas, Alejandro Carderera, and Sebastian Pokutta. Locally accelerated conditional
gradients. In International Conference on Artificial Intelligence and Statistics, pages 1737–1747.
PMLR, 2020.
Steven Diamond and Stephen Boyd. CVXPY: A Python-embedded modeling language for convex
optimization. Journal of Machine Learning Research, 17(83):1–5, 2016.
Nikita Doikov and Yurii Nesterov. High-order optimization methods for fully composite problems.
SIAM Journal on Optimization, 32(3):2402–2427, 2022.
Dmitriy Drusvyatskiy and Adrian S Lewis. Error bounds, quadratic growth, and linear convergence
of proximal methods. Mathematics of Operations Research, 43(3):919–948, 2018.
Dmitriy Drusvyatskiy and Courtney Paquette. Efficiency of minimizing compositions of convex
functions and smooth maps. Mathematical Programming, 178(1):503–558, 2019.
John C Duchi and Feng Ruan. Solving (most) of a set of quadratic equalities: Composite optimiza-
tion for robust phase retrieval. Information and Inference: A Journal of the IMA, 8(3):471–529,
2019.
15
VLADAREAN DOIKOV JAGGI FLAMMARION
Marguerite Frank and Philip Wolfe. An algorithm for quadratic programming. Naval research
logistics quarterly, 3(1-2):95–110, 1956.
Dan Garber and Elad Hazan. A linearly convergent variant of the conditional gradient algorithm
under strong convexity, with applications to online and stochastic optimization. SIAM Journal on
Optimization, 26(3):1493–1528, 2016.
Donald W. Hearn. The gap function of a convex program. Operations Research Letters, 1(2):67–71,
apr 1982. doi: 10.1016/0167-6377(82)90049-9.
Martin Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In International
Conference on Machine Learning, pages 427–435, 2013.
Timo Kreimeier, Sebastian Pokutta, Andrea Walther, and Zev Woodstock. On a frank-wolfe ap-
proach for abs-smooth functions. arXiv preprint arXiv:2303.09881, 2023.
Simon Lacoste-Julien. Convergence rate of Frank-Wolfe for non-convex objectives. arXiv preprint
arXiv:1607.00345, 2016.
Guanghui Lan. The complexity of large-scale convex programming under a linear optimization
oracle. arXiv preprint arXiv:1309.5550, 2013.
Guanghui Lan and Yi Zhou. Conditional gradient sliding for convex optimization. SIAM Journal
on Optimization, 26(2):1379–1409, 2016.
Claude Lemar ́echal. Cauchy and the gradient method. Doc Math Extra, 251(254):10, 2012.
Francesco Mezzadri. How to generate random matrices from the classical compact groups. arXiv
preprint math-ph/0609050, 2006.
Kaisa Miettinen. Nonlinear multiobjective optimization, volume 12. Springer Science & Business
Media, 1999.
Arkadi Nemirovski. Information-based complexity of convex programming. Lecture notes, 834,
1995.
Arkadi Nemirovski and David Yudin. Problem complexity and method efficiency in optimization.
1983.
Yurii Nesterov. A method for solving the convex programming problem with convergence rate
O(1/kˆ2). In Dokl. akad. nauk Sssr, volume 269, pages 543–547, 1983.
Yurii Nesterov. Effective methods in nonlinear programming. Moscow, Radio i Svyaz, 1989.
Yurii Nesterov. Modified Gauss–Newton scheme with worst case guarantees for global perfor-
mance. Optimisation Methods and Software, 22(3):469–483, 2007.
Yurii Nesterov. Gradient methods for minimizing composite functions. Mathematical Program-
ming, 140(1):125–161, 2013.
Yurii Nesterov. Complexity bounds for primal-dual methods minimizing the model of objective
function. Mathematical Programming, 171(1):311–330, 2018a.
16
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
Yurii Nesterov. Lectures on convex optimization, volume 137. Springer, 2018b.
Yurii Nesterov and Arkadi Nemirovski. Interior-point polynomial algorithms in convex program-
ming. SIAM, 1994.
Teemu Pennanen. Graph-convex mappings and k-convex functions. Journal of Convex Analysis, 6
(2):235–266, 1999.
Chao Qu, Yan Li, and Huan Xu. Non-convex conditional gradient sliding. In international confer-
ence on machine learning, pages 4208–4217. PMLR, 2018.
Sathya N Ravi, Maxwell D Collins, and Vikas Singh. A deterministic nonsmooth frank wolfe
algorithm with coreset guarantees. Informs Journal on Optimization, 1(2):120–142, 2019.
R Tyrrell Rockafellar. Convex analysis, volume 36. Princeton university press, 1970.
NZ Shor, Krzysztof C Kiwiel, and Andrzej Ruszcay ́nski. Minimization methods for non-
differentiable functions, 1985.
Kiran K Thekumparampil, Prateek Jain, Praneeth Netrapalli, and Sewoong Oh. Projection efficient
subgradient method and optimal nonsmooth frank-wolfe method. Advances in Neural Informa-
tion Processing Systems, 33:12211–12224, 2020.
Quoc Tran-Dinh, Nhan Pham, and Lam Nguyen. Stochastic Gauss-Newton algorithms for non-
convex compositional optimization. In International Conference on Machine Learning, pages
9572–9582. PMLR, 2020.
Alp Yurtsever, Olivier Fercoq, Francesco Locatello, and Volkan Cevher. A conditional gradient
framework for composite convex minimization with applications to semidefinite programming.
In International Conference on Machine Learning, pages 5727–5736. PMLR, 2018.
Alp Yurtsever, Suvrit Sra, and Volkan Cevher. Conditional gradient methods via stochastic path-
integrated differential estimator. In International Conference on Machine Learning, pages 7282–
7291. PMLR, 2019.
Richard Zhang and Daniel Golovin. Random hypervolume scalarizations for provable multi-
In International Conference on Machine Learning, pages
objective black box optimization.
11096–11105. PMLR, 2020.
Renbo Zhao and Robert M Freund. Analysis of the frank–wolfe method for convex composite op-
timization involving a logarithmically-homogeneous barrier. Mathematical Programming, pages
1–41, 2022.
17
VLADAREAN DOIKOV JAGGI FLAMMARION
Appendix A. Proofs
Assumption 2a implies global progress bounds on our fully composite objective with an inner lin-
earization of f , as stated in the following Lemma A.1. This lemma provides a basis for all our
convergence results.
Lemma A.1 Let x, y
and γ
∈ X
φ(yγ)
≤
∈
F (cid:0)f (x) +
f (x)(yγ
x), yγ
−
∇
−
(cid:1) + γ2
2 S
[0, 1]. Denote yγ = x + γ(y
x). Then, it holds
.
(23)
Proof Note that the subhomogenity assumption (6) is equivalent to the following useful inequality
for the outer component of the objective see (Theorem 7.1 in Doikov and Nesterov (2022)):
F (u + tv, x)
≤
F (u, x) + tF (v, x),
u, v
∀
∈
Rn, x
X, t
0.
≥
∈
(24)
Then, we have
F (f (yγ), yγ)
≡
φ(yγ)
= F (cid:0)f (x) +
(24)
F (cid:0)f (x) +
F (cid:0)f (x) +
≤
≤
f (x)(yγ
∇
f (x)(yγ
∇
f (x)(yγ
∇
−
−
−
x) + γ2
2
γ2
2 *
(cid:1) + γ2
x), yγ
(cid:2)f (yγ)
2 F (cid:0) 2
γ2
f (x)
−
(cid:2)f (yγ)
f (x)(yγ
x)(cid:3), yγ
(cid:1)
− ∇
f (x)
−
− ∇
−
f (x)(yγ
x)(cid:3), yγ
(cid:1)
−
x), yγ
(cid:1) + γ2
2 S
,
which is the desired bound.
A.1. Proof of Theorem 3.1
Theorem 3.1 Let Assumptions 1, 2a, and 3 be satisfied. Let γk := min
Then, for k
1 it holds that
≥
1, ∆k
S }
{
or γk := 2
2+k .
φ(yk)
φ⋆
−
≤
2
S
1 + k
and
min
1≤i≤k
∆i
≤
6
S
k
.
(16)
Proof Indeed, for one iteration of the method, we have
(23)
φ(yk+1)
F (cid:0)f (yk) +
f (yk)(yk+1
yk), yk+1
−
∇
(cid:1) + γ2
k
2 S
≤
= F (cid:0)(1
γk)f (yk) + γk(f (yk) +
f (yk)(xk+1
yk)),
−
∇
γk)yk + γkxk+1
(cid:1) + γ2
k
2 S
−
−
(1
(∗)
≤
≡
φ(yk) + γk
(cid:104)
F (cid:0)f (yk) +
f (yk)(xk+1
∇
−
yk), xk+1
(cid:1)
(cid:105)
φ(yk)
−
φ(yk)
γk∆k + γ2
2 S
k
,
−
18
+ γ2
k
2 S
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
where we used in (
) that F (
∗
the progress of one step, for k
) is jointly convex. Hence, we obtain the following inequality for
0:
,
*
*
≥
φ(yk)
−
φ(yk+1)
≥
γk∆k
γ2
k
2 S
.
−
Now, let us choose use an auxiliary sequence Ak := k
2(k + 1). Then,
ak+1
Ak+1
= 2
2+k ,
(k + 1) and ak+1 := Ak+1
*
(25)
Ak =
−
which is one of the possible choices for γk. Note that for the other choice, we set γk = min(cid:8)1, ∆k
which maximizes the right hand side of (25) with respect to γk
have that
(cid:9),
[0, 1]. Hence, in both cases we
S
∈
a2
k+1
2A2
k+1 S
,
(26)
φ(yk)
−
φ(yk+1)
≥
ak+1
Ak+1
∆k
−
or, rearranging the terms,
Ak+1
(cid:2)φ(yk+1)
φ⋆(cid:3)
−
(26)
≤
(15)
≤
Ak+1
(cid:2)φ(yk)
φ⋆]
−
−
ak+1∆k +
a2
k+1
2Ak+1 S
Ak
(cid:2)φ(yk)
φ⋆] +
−
a2
k+1
2Ak+1 S
.
Telescoping this bound for the first k
1 iterations, we get
≥
φ(yk)
φ⋆
−
≤
S
2Ak *
k
(cid:80)
i=1
a2
i
Ai
=
2S
k(k+1) *
k
(cid:80)
i=1
i
i+1 ≤
2S
k+1 .
(27)
It remains to prove the convergence in terms of the accuracy measure ∆k. For that, we telescope
the bound (26), which is
for the k
≥
k
(cid:80)
i=1
ak+1∆k
≤
ak+1φ(yk) + Akφ(yk)
Ak+1φ(yk+1) +
−
a2
k+1
Ak+1
S
2 ,
(28)
1 iterations, and use the convergence for the functional residual (27):
ai+1
min
1≤i≤k
∆i
*
≤
(28)
≤
(27)
≤
k
(cid:80)
i=1
ai+1∆i
(cid:2)φ(y1)
a1
φ⋆(cid:3) +
−
k
(cid:80)
i=1
ai+1
(cid:2)φ(yi)
φ⋆(cid:3) + S
2
−
k
(cid:80)
i=1
a2
i+1
Ai+1
(cid:16)
1 +
k
(cid:80)
i=1
2
S *
ai+1
i+1 +
(cid:17)
i
i+1
k
(cid:80)
i=1
2
S *
≤
(1 + 3k).
To finish the proof, we need to divide both sides by
k
(cid:80)
i=1
ai+1 = Ak+1
−
a1 = k(3 + k).
19
VLADAREAN DOIKOV JAGGI FLAMMARION
A.2. Proof of Theorem 3.2
1, ∆k
Theorem 3.2 Let Assumptions 1 and 2a be satisfied. Let γk := min
{
for all k
1 it holds that
S }
≥
or γk := 1√
1+k
. Then,
min
0≤i≤k
∆i
≤
φ(y0)−φ⋆+0.5S(1+ln(k+1))
k+1
√
.
(17)
Proof As in the proof of the previous theorem, our main inequality (25) on the progress of one step
is:
φ(yk)
−
φ(yk+1)
≥
γk∆k
γ2
k
2 S
,
−
where we can substitute γk = 1√
k+1
for the both strategies of choosing this parameter.
Summing up this bound for the first k + 1 iterations, we obtain
k
(cid:80)
i=0
γi∆i
φ(y0)
−
≤
φ(yk+1) + S
2
k
(cid:80)
i=0
γ2
i .
(29)
Using the bound φ(yk+1)
≥
φ⋆ and our value of γi, we get
min
0≤i≤k
∆i
*
√k + 1
k
(cid:80)
i=0
∆i√
1+i
(29)
≤
φ(y0)
φ⋆ + S
2
−
k
(cid:80)
i=0
1
1+i
φ(y0)
−
φ⋆ + S
2 (1 + ln(k + 1)),
≤
≤
which is (17).
A.3. Proof of Theorem 4.1
Theorem 4.1 Let Assumptions 1, 2b, and 3 be satisfied. We choose γk := 3
and ηk :=
Then, for all k
k+3 , βk := cF (L)γk
0 are chosen constants, and F (L) := supx∈X F (L, x).
3(k+1)(k+2) where δ > 0 and c
1 it holds that
≥
δ
≥
φ(yk)
φ⋆
−
≤
δ+8cF (L)D2
X
(k+2)(k+3) + 2 max{0,1−c}F (L)D2
k+3
X
.
Proof Let us consider one iteration of the method, for some k
0.
≥
Since all the components of f have the Lipschitz continuous gradients, it hold that
f (yk+1)
f (zk+1) +
∇
≤
f (zk+1)(yk+1
zk+1) + L
2 ∥
−
yk+1
zk+1
2,
∥
−
20
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
where the vector inequality is component-wise. Then, using the properties of F , we have
φ(yk+1)
=
F (f (yk+1), yk+1)
(8),(24)
≤
=
≤
≤
F (f (zk+1) +
f (zk+1)(yk+1
∇
γk)(cid:2)f (zk+1) +
F (cid:0)(1
−
f (zk+1)(yk
∇
zk+1)(cid:3)
−
zk+1), yk+1) + F (L)
2 ∥
yk+1
zk+1
2
∥
−
−
+ γk
(cid:2)f (zk+1) +
f (zk+1)(xk+1
∇
zk+1)(cid:3),
−
γk)yk + γkxk+1
(cid:1) + γ2
kF (L)
2
(1
−
xk+1
∥
−
xk
2
∥
(1
−
γk)F (f (zk+1) +
f (zk+1)(yk
∇
+ γkF (f (zk+1) +
f (zk+1)(xk+1
∇
−
zk+1), yk)
−
zk+1), xk+1) + γ2
kF (L)
2
xk+1
∥
xk
2
∥
−
(1
−
γk)φ(yk) + γkF (f (zk+1) +
f (zk+1)(xk+1
∇
−
zk+1), xk+1)
+ γ2
kF (L)
2
xk+1
∥
−
xk
2,
∥
where the second equality comes from the update rule of yk+1, the second inequality comes from
the joint convexity in Assumption 1, the third inequality comes from convexity of the components
of f and monotonicity of F .
Since we are introducing a norm-regularized minimization subproblem for the purpose of accel-
2 can be further upper bounded using ηk-approximate guarantee
xk+1
xk
eration, the term
∥
(20), as follows, for any x
γ2
kF (L)
2
∥
−
:
∈ X
γ2
kF (L)
2
xk+1
∥
−
xk
∥
2 =
(cid:16) γ2
kF (L)
2 −
(cid:17)
βkγk
2
xk+1
∥
−
xk
2 + βkγk
∥
2 ∥
xk+1
xk
2
∥
−
2
2 + γ2
kF (L)(1−c)
2
xk
∥
−
xk+1
∥
xk
2
∥
−
xk+1
βkγk
2 ∥
(cid:0)
≤
= βkγk
2
+ γ2
x
∥
−
xk
kF (L)(1−c)
2
x
2
2 − ∥
∥
xk+1
−
∥
xk+1
2
∥
xk
2
⟨
−
−
xk+1, xk+1
(cid:1)
x
⟩
−
2
∥
−
xk
(20)
≤
βkγk
2
(cid:0)
x
∥
xk
2
2 − ∥
∥
x
−
−
xk+1
2(cid:1) + γ2
∥
kF (L)(1−c)
2
xk+1
∥
−
xk
2
∥
+ γkF (f (zk+1) +
γkF (f (zk+1) +
−
∇
∇
f (zk+1)(x
zk+1), x)
−
f (zk+1)(xk+1
−
zk+1), xk+1) + γkηk,
where we used our choice βk = cF (L)γk.
21
VLADAREAN DOIKOV JAGGI FLAMMARION
Therefore, combining these two bounds together, we obtain
φ(yk+1)
(1
−
≤
γk)φ(yk) + γkF (f (zk+1) +
f (zk+1)(x
zk+1), x)
−
+ βkγk
2
(cid:0)
x
2
xk
x
xk+1
∥
−
− ∥
∥
γk)φ(yk) + γkφ(x) + βkγk
2
−
∥
(cid:0)
xk+1
xk
∥
2 + γkηk,
(1
≤
−
+ γ2
kF (L)(1−c)
2
∇
2(cid:1) + γ2
kF (L)(1−c)
2
xk+1
∥
xk
∥
−
2 + γkηk
x
xk
−
2
∥
− ∥
xk+1
x
−
2(cid:1)
∥
for all x
∥
∈ X
−
, where we used convexity of f and monotonicity of F .
We now subtract φ(x) from both sides, let x = x⋆ and denote εk := φ(yk)
−
2(cid:1)
γk)εk + γkβk
2
∥
xk+1
εk+1
x⋆
xk
(1
≤
−
−
∥
∥
(cid:0)
−
+ γ2
kF (L)(1−c)
2
xk+1
∥
−
xk
∥
x⋆
2
− ∥
∥
2 + γkηk.
φ⋆, which gives
(30)
We now move on to choosing the parameters γk, ηk and βk in a way that allows us to accelerate. For
more flexibility, we let γk := ak+1
k≥0 that will be defined
Ak+1
later. Then (30) becomes:
, for some sequences
k≥0 and
}
ak
{
Ak
{
}
Ak+1εk+1
A0ε0 +
≤
k
(cid:80)
i=0
ai+1ηi + 1
2
(cid:16)
ai+1βi
k
(cid:80)
i=0
xi
∥
−
x⋆
2
∥
− ∥
xi+1
x⋆
∥
−
2(cid:17)
+ F (L)(1−c)
2
k
(cid:80)
i=0
a2
i+1
Ai+1 ∥
xi+1
xi
2
∥
−
A0ε0 +
≤
k
(cid:80)
i=0
ai+1ηi + a1β0
2 ∥
x0
x⋆
2 + 1
2
∥
−
(cid:80)k
i=1 (ai+1βi
aiβi−1)
−
xi
∥
−
x⋆
2
∥
+ F (L)(1−c)
2
k
(cid:80)
i=0
a2
i+1
Ai+1 ∥
xi+1
xi
2
∥
−
and therefore we have
εk+1
≤
A0ε0
Ak+1
+ 1
Ak+1
k
(cid:80)
i=0
ai+1ηi + a1β0
2Ak+1 ∥
x0
x⋆
2
∥
−
+ 1
2Ak+1
k
(cid:80)
i=1
(ai+1βi
aiβi−1)
−
k
(cid:80)
i=0
a2
i+1
Ai+1 ∥
xi
x⋆
2 + F (L)(1−c)
2Ak+1
∥
∥
−
∥
(cid:0)1/k2(cid:1) rate of
). The constraint we require on the sequences is
O
−
xi+1
xi
2.
We wish to choose sequences Ak, ak, βk and ηk such that we obtain a
convergence on the functional residual of φ(
*
βk. The following choices
γkF (L)
≤
ηk =
δ
ak+1
,
for some constant δ > 0,
βk = cF (L)γk,
for some constant c > 0
ak+1 = Ak+1
−
Ak = 3Ak+1
k+3 , Ak+1 = (k + 1)(k + 2)(k + 3),
22
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
give us the desired outcome, since equation (31) becomes:
εk+1
≤
δ
(k + 2)(k + 3)
+
x0
3cF (L)
(k + 1)(k + 2)(k + 3)
−
∥
x⋆
2
∥
+
5ckF (L)
2
X
D
(k + 1)(k + 2)(k + 3)
+
9F (L)(1
c)
−
2(k + 1)(k + 2)(k + 3)
k
(cid:88)
i=0
(i + 1)
xi+1
∥
−
xi
2
∥
δ
(k + 2)(k + 3)
+
≤
8cF (L)
2
X
D
(k + 2)(k + 3)
2 max
{
+
0, 1
F (L)
c
−
}
k + 3
2
X
D
since ai+1βi
aiβi−1 =
−
9cF (L)(i2+5i+4)
i2+5i+6
< 9cF (L) and
xi
∥
−
x⋆
2
∥
2
X .
≤ D
A.4. Proof of Theorem 5.1
Theorem 5.1 Let Assumptions 1, 2b, and 3 be satisfied. Then, for all t
P (ut)
P ⋆
−
≤
2βD2
X
t+1
and
min
1≤i≤t
∆t
≤
1 it holds that
≥
6βD2
X
t
.
Consequently, Algorithm 3 returns an η-approximate solution according to condition (20) after at
most
iterations.
(cid:17)
(cid:16) βD2
X
η
O
Proof Let us introduce our subproblem, in a general form, that is
s⋆ = min
u∈X
(cid:110)
s(u) def= r(u) + h(u),
(cid:111)
(31)
where r(
β > 0, and h(u) is a general proper closed convex function, not necessarily differentiable.
) is a differentiable convex function, whose gradient is Lipschitz continuous with constant
*
In our case, for computing the inexact proximal step (19), we set
r(u)
:= β
2 ∥
u
x
2,
∥
−
h(u)
:= F (f (z) +
f (z)(u
∇
−
z), u),
for a fixed x and z.
Then, in each iteration of Algorithm 3, we compute, for t
0:
≥
vt+1
(cid:110)
Argmin
u∈X
∈
r(ut), u
⟨∇
⟩
+ h(u)
(cid:111)
.
The optimality condition for this operation is (see, e.g. Theorem 3.1.23 in Nesterov (2018b))
r(ut), u
vt+1
⟩
−
⟨∇
+ h(u)
≥
h(vt+1),
u
∀
.
∈ X
23
(32)
(33)
VLADAREAN DOIKOV JAGGI FLAMMARION
Therefore, employing the Lipschitz continuity of the gradient of r(
), we have
*
s(ut+1)
r(ut) +
r(ut), ut+1
⟨∇
ut
⟩
−
≤
ut
2 + h(ut+1)
∥
−
= r(ut) + αt
r(ut), vt+1
⟨∇
ut
⟩
−
vt+1
ut
2
∥
−
+ β
ut+1
2 ∥
+ βα2
2 ∥
t
+ h(αtvt+1 + (1
αt)ut)
−
(34)
s(ut) + αt
r(ut), vt+1
(cid:0)
ut
⟩
−
+ h(vt+1)
−
h(ut)(cid:1) + βα2D2
X
2
≤
≡
s(ut)
−
⟨∇
αt∆t + βα2
t D2
X
2
,
where the last equality comes from the definition of ∆t in Algorithm 3.
Note that αt is defined as the minimizer of βα2
2 ∥
[0, 1] it will hold that:
t
vt+1
ut
2
∥
−
−
αt∆t and hence, for any other
ρt
∈
s(ut+1)
s(ut)
−
≤
ρt∆t +
2
βρ2
t D
X
2
.
At the same time,
∆t
def= h(ut)
(32)
≥
≥
h(ut)
s(ut)
−
−
−
h(vt+1)
r(ut), vt+1
ut
⟩
−
− ⟨∇
h(u)
r(ut), u
ut
⟩
−
− ⟨∇
s(u),
u
∀
∈ X
(35)
(36)
where the last line follows from the convexity of r(u). Letting u := u⋆ (solution to (31)) in (36)
and further substituting it into (35) and subtracting s⋆ from both sides, we obtain
[s(ut+1)
−
Now, let us choose ρt := at+1
At+1
Then, ρt
:= 2
2+t , t
≥
s⋆]
(1
−
≤
ρt) [s(ut)
−
t D2
s⋆] + βρ2
X
2
.
for sequences At := t
(t+1), and at+1 := At+1
−
*
0. Using this choice, inequality (37) can be rewritten as
(37)
At = 2(t+1).
At+1
(cid:2)s(ut+1)
s⋆(cid:3)
−
≤
(cid:2)s(ut)
At
s⋆(cid:3) +
a2
t+1βD2
X
2At+1
−
Telescoping this inequality for the first iterations, we obtain, for t
1:
≥
s(ut)
s⋆
−
≤
βD2
X
2At
t
(cid:80)
i=1
*
a2
i
Ai
= βD2
X
2t(t+1) *
t
(cid:80)
i=1
4i
i+1 ≤
2βD2
t+1 .
X
(38)
This is the global convergence in terms of the functional residual. It remains to justify the conver-
gence for the accuracy certificates ∆t. Multiplying (35) by At+1, we obtain
at+1∆t
≤
at+1s(ut) + Ats(ut)
At+1s(ut+1) +
−
a2
t+1
At+1
βD2
2 .
X
(39)
24
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
Telescoping this bound, we get, for t
1:
≥
t
(cid:80)
i=1
ai+1
min
1≤i≤t
∆i
*
≤
(39)
≤
(38)
≤
t
(cid:80)
i=1
ai+1∆i
(cid:2)s(u1)
a1
s⋆(cid:3) +
−
t
(cid:80)
i=1
ai+1
(cid:2)s(ui)
s⋆(cid:3) + βD2
2
X
−
t
(cid:80)
i=1
a2
i+1
Ai+1
2β
2
X *
D
(cid:16)
1 +
t
(cid:80)
i=1
ai+1
i+1 + 1
4
t
(cid:80)
i=1
(cid:17)
a2
i+1
Ai+1
2β
2
X *
D
≤
(1 + 3t).
Dividing both sides by (cid:80)t
i=1 ai+1 = At+1
−
A1 = t(3 + t) completes the proof we finally get:
min
1≤i≤t
∆i
≤
6β
2
X
D
t
.
A.5. Proof of Proposition 3.1
Proposition 3.1 Let γk := 1√
k
1, it holds that
1+k
≥
min
0≤i≤k
max
y∈X ⟨∇
Φ(yi), yi
y
−
⟩ ≤ O
(cid:0) ln(k)
√
k
(cid:1).
. Then, for the iterations (18), under Assumption 2b and for all
Proof In our case, we have φ(x)
f (x)
≡ ∥
2. Using Lemma A.1, we obtain
∥
φ(yk+1)
f (yk) +
∇
≤ ∥
f (yk)(yk+1
yk)
−
=
f (yk) + γk
∥
∇
f (yk)(xk+1
−
k
2 + γ2
2 S
∥
2 + γ2
2 S
yk)
∥
k
(40)
,
where xk+1
g(x) def=
∈ X
f (yk) + γk
∥
f (yk)(x
yk)
∥
−
∇
2, we get that
is the point such that yk+1 = yk +γk(xk+1
yk). Using convexity of the function
−
φ(yk) = g(yk)
g(xk+1) +
⟨
≥
g′(xk+1), yk
−
xk+1
=
f (yk) + γk
∥
∇
f (yk)(xk+1
2 +
yk)
∥
−
f (yk)⊤ fk+1
where the subgradient g′(xk+1) = γk
∥fk+1∥2
satisfies the stationary condition for the method step:
∇
with fk+1
⟩
g′(xk+1), yk
⟨
−
def= f (yk)+γk
xk+1
,
⟩
f (yk)(xk+1
yk),
−
∇
g′(xk+1), x
⟨
xk+1
−
⟩ ≥
0,
x
∀
.
∈ X
(41)
25
VLADAREAN DOIKOV JAGGI FLAMMARION
A few comments are in order now about the use of the subgradient above. Note that we wish to
Rn. First,
impose an assumption on f which can ensure that f (yk) + γk
some preliminaries. Under Assumption 2b on f , it holds that:
f (yk)(x
= 0
yk)
∇
−
∈
(0,
(0,
∃F ∈
∃G ∈
) s.t.
) s.t.
∞
∞
∥
∥ ∇
f (x)
f (x)
∥ ≤ F
∥ ≤ G
∀
∈ X
,
x
∀
,
∈ X
x
by continuity of f
by continuous differentiability of f
From here, we can bound the products between Jacobians and iterates as follows:
f (x)(y
∥ ∇
z)
−
∥ ≤ ∥ ∇
f (x)
y
z
−
∥ ∥
X ,
∥ ≤ GD
x, y, z
∀
.
∈ X
(42)
(43)
(44)
Thus, without loss of generality, we can shift f by a constant vector of identical values depending on
yk) > 0 component-wise. Hence,
X such that we ensure, for example, f (yk) + γk
f (yk)(x
GD
combining these observations with (40), we have
∇
−
φ(yk)
−
φ(yk+1)
g′(xk+1), yk
≥ ⟨
xk+1
−
⟩ −
γ2
k
2 S
(41)
≥
g′(xk+1), yk
max
x∈X ⟨
x
−
⟩ −
γ2
k
2 S
.
Then, by lower bounding appropriately using (42) and (43), we get:
φ(yk)
−
φ(yk+1)
≥
=
γk
F +GDX
max
y∈X ⟨∇
f (yk)⊤f (yk), yk
y
−
⟩ −
(cid:16) GD2
X
F +GDX
γ2
k
(cid:17)
+ S
2
γk
F +GDX
max
y∈X ⟨∇
Φ(yk), yk
y
−
⟩ −
(cid:16) GD2
X
F +GDX
γ2
k
(cid:17)
.
+ S
2
Substituting γk := 1√
(for the details, see the end of the proof of Theorem 3.2).
1+k
and telescoping this bound would lead to the desired global convergence
Appendix B. Interpretation of ∆k in the non-convex setting
While we cannot make any strong claims about the meaning of ∆k in general, we can provide an
additional observation for this quantity when the outer component F is smooth inside a ball included
in
.
X
Thus, consider a ball of radius ε centered at yk denoted by B(yk, ε) =
Rd :
yk
x
B
, and set
= B(yk, ε)
ε
}
and that its gradient is Lipschitz continuous with constant LF , we have for any x
F (cid:0)f (yk) +
yk), x(cid:1)(cid:105)
(cid:104)
φ(yk)
f (yk)(x
∩ X
−
. Assuming that F (u, x) is differentiable at all points from Rn
∈
∥
:
∈ B ⊆ X
∥ ≤
,
× B
x
{
∆k = max
x∈X
−
∇
−
max
x∈B
≥
(cid:104)
φ(yk)
−
F (f (yk), yk)
∂F
∂u (f (yk), yk),
f (yk)(x
∇
− ⟨
∂F
∂x (f (yk), yk), x
− ⟨
yk
−
⟩ −
(cid:0)
LF
2
f (yk)
∥∇
2 + 1(cid:1)
∥
*
= max
x∈B
(cid:104)
⟨∇
φ(yk), yk
(cid:105)
⟩
−
x
−
(cid:0)
LF
2
f (yk)
∥
∥∇
2 + 1(cid:1)
ε2.
*
26
yk)
⟩
−
ε2(cid:105)
̸
LINEARIZATION ALGORITHMS FOR FULLY COMPOSITE OPTIMIZATION
Hence, for a small enough ball, ∆k is an
to the considered neighborhood. If, in addition, the composite function φ is convex in
is a local optimum x⋆
O
(cid:0)ε2(cid:1)-approximation of functional suboptimality.
, then ∆k is an
(cid:0)ε2(cid:1)-approximation of the original FW gap restricted
and there
B
∈ B
O
Appendix C. Additional Application Examples
Example 3 We define a generalized nonlinear model as,
F (u, x)
n
(cid:88)
i=1
≡
φ(u(i)),
(45)
where φ : R
R is a fixed convex loss function, and n is the number of data points. Problem (4)
then reduces to training a (non-convex) model, for example a neural network, with respect to the
→
constraint set
: min
x∈X
X
m
(cid:80)
i=1
φ(fi(x)).
Solving this problem then involves training a linear model within the basic subroutine (5)
m
(cid:80)
i=1
φ(
ai, x
⟨
+ bi), which is a convex problem. Amongst the loss functions relevant to Ma-
min
x∈X
chine Learning, the following are convex and subhomogeneous thus making F in (45) satisfy As-
sumption 1:
⟩
• l1-regression: φ(t) =
t
|
|
• Hinge loss (SVM): φ(t) = max
{
• Logistic loss: φ(t) = log(1 + et)
0, t
}
27
|
|
http://arxiv.org/abs/2302.12798v2 | 2023-04-04T14:17:15 | 2023-02-24T18:19:49 | 3D Generative Model Latent Disentanglement via Local Eigenprojection | Designing realistic digital humans is extremely complex. Most data-driven
generative models used to simplify the creation of their underlying geometric
shape do not offer control over the generation of local shape attributes. In
this paper, we overcome this limitation by introducing a novel loss function
grounded in spectral geometry and applicable to different neural-network-based
generative models of 3D head and body meshes. Encouraging the latent variables
of mesh variational autoencoders (VAEs) or generative adversarial networks
(GANs) to follow the local eigenprojections of identity attributes, we improve
latent disentanglement and properly decouple the attribute creation.
Experimental results show that our local eigenprojection disentangled (LED)
models not only offer improved disentanglement with respect to the
state-of-the-art, but also maintain good generation capabilities with training
times comparable to the vanilla implementations of the models. | [
"Simone Foti",
"Bongjin Koo",
"Danail Stoyanov",
"Matthew J. Clarkson"
] | 10.1111/cgf.14793 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1111/cgf.14793",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12798v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12798v2",
"@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.GR",
"cs.LG"
] | 3
2
0
2
r
p
A
4
]
V
C
.
s
c
[
2
v
8
9
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Volume xx (200y), Number z, pp. 1–13
3D Generative Model Latent Disentanglement
via Local Eigenprojection
Simone Foti1
, Bongjin Koo1,2
, Danail Stoyanov1
, and Matthew J. Clarkson1
1University College London, London, UK
2University of California, Santa Barbara, Santa Barbara, USA
Figure 1: Shape generation and editing of two subjects randomly generated with LED-VAE, which is one of the proposed local eigenprojec-
tion disentangled models. Left: effects caused on the generated shapes by traversing two arbitrary latent variables controlling the eyes and
nose of the first random subject. Right: example of shape editing performed manipulating the latent variables controlling jaw, nose, and fore-
head of the second subject. The latent manipulations are performed with a GUI that allows the manual modification of the latent variables,
but random per-attribute modifications can also be performed. The edited shapes are always paired with their corresponding displacement
map highlighting the shape differences from the initial model.
Abstract
Designing realistic digital humans is extremely complex. Most data-driven generative models used to simplify the creation of
their underlying geometric shape do not offer control over the generation of local shape attributes. In this paper, we overcome
this limitation by introducing a novel loss function grounded in spectral geometry and applicable to different neural-network-
based generative models of 3D head and body meshes. Encouraging the latent variables of mesh variational autoencoders
(VAEs) or generative adversarial networks (GANs) to follow the local eigenprojections of identity attributes, we improve latent
disentanglement and properly decouple the attribute creation. Experimental results show that our local eigenprojection dis-
entangled (LED) models not only offer improved disentanglement with respect to the state-of-the-art, but also maintain good
generation capabilities with training times comparable to the vanilla implementations of the models. Our code and pre-trained
models are available at github.com/simofoti/LocalEigenprojDisentangled.
Keywords: disentanglement, geometric deep learning, variational autoencoder, generative adversarial networks
CCS Concepts
• Computing methodologies
→
Dimensionality reduction and manifold learning; Learning latent representations;
1. Introduction
In recent years digital humans have become central elements not
only in the movie and video game production, but also in aug-
mented and virtual reality applications. With a growing interest
in the metaverse, simplified creation processes of diverse digital
humans will become increasingly important. These processes will
benefit experienced artists and, more importantly, will democratise
submitted to COMPUTER GRAPHICS Forum (4/2023).
the character generation process by allowing users with no artistic
skills to easily create their unique avatars. Since digitally sculpting
just the geometric shape of the head of a character can easily require
a highly skilled digital artist weeks to months of work [GFZ*20],
many semi-automated avatar design tools have been developed. Al-
beit simpler and faster to use, they inherit the intrinsic constraints of
their underlying generative models [FKSC22]. Usually based upon
blendshapes [LMR*15; OBB20; TDM11], principal component
2
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
analysis (PCA) [BV99; PWP*19; LBB*17], variational autoen-
coders (VAEs) [RBSB18; GCBZ19; ATJD19; CNH*20], or gen-
erative adversarial networks (GANs) [CBZ*19; GLP*20; LBZ*20;
ABWB19], these models are either limited in expressivity or they
cannot control the creation of local attributes. Considering that
deep-learning-based approaches, such as VAEs and GANs, offer
superior representation capabilities with a reduced number of pa-
rameters and that they can be trained to encourage disentanglement,
we focus our study on these models.
By definition [BCV13; HMP*17; KM18], with a disentangled
latent representation, changes in one latent variable affect only one
factor of variation while being invariant to changes in other factors.
This is a desirable property to offer control over the generation of
local shape attributes. However, latent disentanglement remains an
open problem for generative models of 3D shapes [ATJD19] de-
spite being a widely researched topic in the deep learning commu-
nity [HMP*17; KM18; KWKT15; EWJ*19; DXX*20; WYH*21;
RL21]. Most research on latent disentanglement of generative mod-
els for the 3D shape of digital humans addresses the problem of
disentangling the pose and expression of a subject from its iden-
tity [ATJD19; ATDJ21; CNH*20; ABWB19; ZYL*20; LYF*21;
ZYHC22], but none of these works is able to provide disentangle-
ment over the latent variables controlling the local attributes char-
acterising the identity. Some control over the generation of local
attributes was achieved for generative models of 3D furniture by
leveraging complex architectures with multiple encoders and de-
coders independently operating on different furniture parts [NW17;
YML*20; RDC*21]. In contrast, [FKSC22] recently proposed a
method to train a single VAE while enforcing disentanglement
among sets of latent variables controlling the identity of a char-
acter. This approach allows their Swap Disentangled VAE (SD-
VAE) to learn a more disentangled, interpretable, and structured
latent representation for 3D VAEs of bodies and heads. How-
ever, although [FKSC22] disentangles subsets of latent variables
controlling local identity attributes, variables within each set can
be entangled and not orthogonal. In addition, their curated mini-
batching procedure based on attribute swapping is applicable only
to autoencoder-based architectures and it significantly increases the
training duration. In this work, we aim at overcoming these limita-
tions by leveraging spectral geometry to achieve disentanglement
without curating the mini-batching. In particular, we encourage
the latent representation of a mesh to equal the most significant
local eigenprojections of signed distances from the mean shape
of the training data. Since the eigenprojections are computed us-
ing the eigenvectors of combinatorial Laplacian operators, we re-
quire meshes to be in dense point correspondence and to share the
same topology. This is a standard requirement for most of the tra-
ditional [BV99; BRZ*16; DPSD20; GFZ*20; LMR*15; OBB20;
PWP*19; PVS*21] and neural-network-based [FKD*20; FKSC22;
GCBZ19; RBSB18; ZWL*20; YLY*20] generative models, which
not only simplifies the shape generation process, but also the defi-
nition of other digital humans' properties that will be automatically
shared by all the generated meshes (e.g., UV maps, landmarks, and
animation rigs).
To summarise, the key contribution of this work is the introduc-
tion of a novel local eigenprojection loss, which is able to improve
latent disentanglement among variables controlling the generation
of local shape attributes contributing to the characterisation of the
identity of digital humans. Our method improves over SD-VAE by
enforcing orthogonality between latent variables and avoiding the
curated mini-batching procedure, thus significantly reducing the
training times. In addition, we demonstrate the flexibility and dis-
entanglement capabilities of our method on both VAEs and GANs.
2. Related Work
2.1. Generative Models.
Blendshapes are still widely adopted for character animation or as
consumer-level avatar design tools because, by linearly interpo-
lating between a predefined set of artistically created shapes, the
blend-weights can be easily interpreted [LAR*14]. However, to
compensate for the limited flexibility and diversity of these mod-
els, large amounts of shapes are required. This makes the mod-
els very large and only a limited number of shapes can be used
in most practical applications. An alternative approach capable
of offering more flexibility is to build models relying on prin-
cipal component analysis (PCA) [BV99; EST*20]. These data-
driven models are able to generate shapes as linear combina-
tions of the training data, but the variables controlling the out-
put shapes are related to statistical properties of the training data
and are difficult to interpret. In recent years, PCA-based mod-
els have been created from large number of subjects. For exam-
ple, LSFM [BRZ*16] and LYHM [DPSD20] were built collecting
scans from 10, 000 faces and 1, 212 heads respectively. The two
models were later combined in UHM [PWP*19], which was sub-
sequently enriched with additional models for ears, eyes, teeth,
tongue, and the inner-mouth [PVS*21]. Also, [GFZ*20] combined
multiple PCA models, but they were controlling different head re-
gions and an anatomically constrained optimisation was used to
combine their outputs and thus create an interactive head sculpt-
ing tool. PCA-based models of the body were also combined with
blendshapes in SMPL [LMR*15] and STAR [OBB20], which were
trained with 3, 800 and 14, 000 body scans respectively. PCA-based
models generally trade the amount of fine details they can repre-
sent with their size. The advent of geometric deep learning tech-
niques brought a new set of operators making possible the creation
of neural network architectures capable of processing 3D data such
as point-clouds and meshes. [RBSB18] introduced the first VAE
for the generation of head meshes. In its comparison against PCA,
the VAE model used significantly fewer parameters and exhibited
superior performances in generalisation, interpolation, and recon-
struction. This pioneering work was followed by many other au-
toencoders which differed from one another mostly by their ap-
plication domain and the mesh operators used in their architec-
ture [LBBM18; FKD*20; YFST18; ZWL*20; GCBZ19; DS19;
TZY*22; BBP*19]. These mesh operators were used also for gen-
erative models based on GAN architectures [OBD*21; CBZ*19],
but they appear to be less frequent than their VAE counterparts.
Most GAN architectures operate in the image domain by repre-
senting 3D shapes in a UV space [MPN*20; LBZ*20].
2.2. Latent Disentanglement.
Most research on latent disentanglement is performed on gen-
erative models of images [KSB18; KM18; KWKT15; EWJ*19;
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
3
DXX*20; RL21; WYH*21]. The β-VAE [HMP*17] is probably
the simplest model used to improve disentanglement in a VAE.
Other simple methods that leverage statistical properties and do
not require supervision over the generative factors are for instance
the DIP-VAEs [KSB18] and the FactorVAE [KM18]. All methods
above were re-implemented to operate on meshes by [FKSC22],
but they did not report good levels of disentanglement with re-
spect to the identity attributes. In the 3D realm, there are cur-
rently two prominent streams of research: the one disentangling the
identity from the pose or expression of digital humans [ATJD19;
ATDJ21; CNH*20; ZYL*20; ZBP20; TSL21; JWCZ19; HHS*21;
OFD*22], and the stream attempting to disentangle parts of man-
made objects [YML*20; NW17; LLW22; RDC*21]. In both cases,
the proposed solutions require complex architectures. In addition,
in the former category, current state-of-the-art methods do not at-
tempt to disentangle identity attributes. The latter category appears
better suited for this purpose, but the type of generated shapes is
substantially different because the generation of object parts needs
to consider intrinsic hierarchical relationship, and surface discon-
tinuities are not a problem. More similar to ours, is the method
recently proposed by [FKSC22], where the latent representation of
a mesh convolutional VAE is disentangled by curating the mini-
batching procedure and introducing an additional loss. In particu-
lar, swapping shape attributes between the input meshes of every
mini-batch, it is possible to know which of them share the same
attribute and which share all the others. This knowledge is har-
nessed by a contrastive-like latent consistency loss that encourages
subsets of latent variables from different meshes in the mini-batch
to assume the same similarities and differences of the shapes cre-
ated with the attribute swapping. This disentangles subsets of latent
variables which become responsible for the generation of different
body and head attributes. We adopt the same network architecture,
dataset, and attribute segmentation of SD-VAE. This choice is arbi-
trary and simplifies comparisons between the two methods, which
differ only in their disentanglement technique.
Like VAEs, the research on GANs comes mostly from the imag-
ing domain, where good levels of control over the generation pro-
cess were recently made possible. Most of these models leverage
segmentation maps [HMWL21; LLWL20; LKL*21], additional at-
tribute classifiers [HZK*19; SBKM21], text prompts [RKH*21],
or manipulate the latent codes and the parameter space of the pre-
trained model to achieve the desired results [KAL*21; HHLP20;
SYTZ22; LKL*21]. We argue that while the first two approaches
require more inputs and supervision than our method, the last two
offer less editing flexibility. In fact, describing the shape of hu-
man parts is a difficult task that would ultimately limit the di-
versity of the generated shapes, while the post-training manipula-
tion may limit the exploration of some latent regions. Only a few
methods explicitly seek disentanglement during training [AW20;
VB20] like ours. However, [AW20] is specifically designed for
grid-structured data, like images, and [VB20] still requires a pre-
trained GAN and two additional networks for disentanglement. In
the 3D shapes domain, GAN disentanglement is still researched to
control subject poses and expressions [CTS*21; OBD*21] or ob-
ject parts [LLHF21]. However, they suffer the same problems de-
scribed for 3D VAEs: they have complex architectures and do not
have control over the generation of local identity attributes.
submitted to COMPUTER GRAPHICS Forum (4/2023).
2.3. Spectral Geometry.
Spectral mesh processing has played an essential role in shape
indexing, sequencing, segmentation, parametrisation, correspon-
dence, and compression [ZVD10]. Spectral methods usually lever-
age the properties of the eigenstructures of operators such as the
mesh Laplacian. Even though there is no unique definition for this
linear operator, it can be classified either as geometric or combi-
natorial. Geometric Laplacians are a discretisation of the contin-
uous Laplace-Beltrami operator [Cha84] and, as their name sug-
gests, they encode geometric information. Their eigenvalues are ro-
bust to changes in mesh connectivity and are often used as shape
descriptors[RWP06; GYP14]. Since they are isometry-invariant,
they are used also in VAEs for identity and pose disentangle-
ment [ATJD19; ATDJ21]. However, being geometry dependant,
the Laplace-Beltrami operator and its eigendecomposition have to
be precomputed for every mesh in the dataset. On the other hand,
combinatorial Laplacians treat a mesh as a graph and are entirely
defined by the mesh topology. For these operators, the eigenvec-
tors can be considered as Fourier bases and the eigenprojections
are equivalent to a Fourier transformation [SNF*13] whose re-
sult is often used as a shape descriptor. If all shapes in a dataset
share the same topology, the combinatorial Laplacian and its eigen-
decomposition need to be computed only once. For this reason,
multiple graph and mesh convolutions [BZSL13; DBV16] as well
as some data augmentation technique [FKD*20] and smoothing
losses [FKSC22] are based on combinatorial Laplacian formula-
tions.
3. Method
The proposed method introduces a novel loss to improve latent
disentanglement in generative models of 3D human shapes. Af-
ter defining the adopted shape representation, we introduce our lo-
cal eigenprojection loss, followed by the two generative models on
which it was tested: a VAE and two flavours of GANs.
3.1. Shape Representation.
We represent 3D shapes as manifold triangle meshes with a fixed
=
,
topology. By fixing the topology, all meshes
share
3. Therefore, they
2 and faces
the same edges
N
differ from one another only for the position of their vertices X
R
with point-wise correspondences across shapes.
∈
3, which are assumed to be consistently aligned, scaled, and
M
Γ
N
×
F ∈
E ∈
F}
X,
N
E
×
×
{
ε
3.2. Local Eigenprojection Loss.
We define F arbitrary attributes on a mesh template by manually
colouring anatomical regions on its vertices. Thanks to the assump-
tion of our shape representation, the segmentation of the template
mesh can be consistently transferred to all the other meshes with-
out manually segmenting them. Mesh vertices can be then grouped
F
per-attribute such that X =
ω=1. Seeking to train generative
}
models capable of controlling the position of vertices correspond-
ing to each shape attribute Xω through a predefined set of latent
variables, we evenly split the latent representation z in F subsets of
F
size κ, such that z =
ω=1 and each zω controls its correspond-
ing Xω. To establish and enforce a direct relationship between
Xω
{
zω
{
}
4
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
(cid:28)
We assume that not all eigenprojections are equally significant
when representing shapes. Therefore, for each attribute ω, we
eigenproject all the local signed distances sd(Xω) computed over
the training set, and identify the κ (with κ
K) spectral compo-
nents with the highest variance. While these spectral components
are responsible for most shape variations, the small shape differ-
ences represented by other components can be easily learned by
the neural-network-based generative model. After eigenprojecting
the entire training set, we select the Fourier modes U?
κ
Nω×
associated with the highest variance eigenprojections (Fig. 2) and
use them to compute the eigenprojection loss. During this prepro-
cessing step we also compute the mean and standard deviation of
the highest variance local eigenrpojections, which we denote by
m?
ω respectively. We thus define the local eigenprojection
loss as:
ω and s?
ω ∈
R
LLE(X, z) =
1
F κ
zω
(U?
ω)T sd(Xω)
s?
ω
−
−
m?
ω
(3)
Note that combinatorial Laplacian operators are determined exclu-
sively by the mesh topology. Since the topology is fixed across
the dataset, the Laplacians and their eigendecompositions can be
computed only once. Therefore, the local eigenprojection can be
quickly determined by matrix-multiplying signed distances by the
precomputed U?
ω. Also, if the Laplace-Beltrami operator was used
in place of the Kirchoff graph Laplacian, the eigendecomposition
would need to be computed for every mesh. Not only this would
significantly increase the training duration, but backpropagating
through the eigendecomposition would be more complex as this
would introduce numerical instabilities [WDH*19]. Alternatively,
an approach similar to [MRC*21] should be followed.
F
∑
ω=1 (cid:13)
(cid:13)
(cid:13)
1
(cid:13)
(cid:13)
(cid:13)
3.3. Mesh Variational Autoencoder.
|
Like traditional VAEs [KW13], our 3D-VAE is also built as a prob-
abilistic encoder-decoder pair parameterised by two separate neural
networks. The probabilistic encoder is defined as a variational dis-
tribution q(z
X) that approximates the intractable model posterior.
It predicts the mean μμμ and standard deviation σσσ of a Gaussian dis-
tribution over the possible z values from which X could have been
generated. The probabilistic decoder p(X
z) describes the distri-
|
bution of the decoded variable given the encoded one. During the
generation process, a latent vector z is sampled from a Gaussian
prior distribution p(z) =
(z; 0, I) and an output shape is gener-
ated by the probabilistic decoder. Since the decoder is used as a
generative model, it is also referred to as generator. Following this
convention, we define our architecture as a pair of non-linear func-
tions
maps from the vertex embedding
{
domain
Z → X
vice versa. Since traditional convolutional operators are not com-
patible with the non-Euclidean nature of meshes, we build both net-
works as in [FKSC22], using the simple yet efficient spiral convolu-
tions [GCBZ19] and sparse matrix multiplications with transforma-
tion matrices obtained with quadric sampling [GCBZ19; RBSB18]
(see Supplementary Materials for more details).
}
X → Z
to the latent distribution domain
, where E :
, and G :
E, G
N
Z
X
As in [FKSC22], the 3D-VAE is trained minimising
LL(X0) + β
LR is the reconstruction loss,
LVAE =
LKL(μμμ, σσσ). While α and β are weight-
LL is a Laplacian reg-
LR(X, X0) + α
ing constants,
submitted to COMPUTER GRAPHICS Forum (4/2023).
Figure 2: Schematic representation of the local eigenprojection,
the operation at the core of our local eigenprojection loss. The
signed distance between a given mesh X and a mean shape tem-
plate is computed as sd(X). sd(X) is locally eigenprojected into
a vector z? where each subset of variables is a spectral descrip-
tor of a shape attribute. The projection is performed by matrix-
multiplying the signed distance by U?
ω, the highest-variance eigen-
vectors of each shape attribute ω. The heads in the bottom part
of the figure represent one-dimensional vectors whose values are
mapped with diverging colour maps on the mean shape head. On
the heads corresponding to the columns of U?
ω, the black seams
mark the different attributes that we seek to control during the gen-
eration procedure.
∈
N
−
Nω×
Aω, where Aω
Nω×
R
each Xω and zω we rely on spectral geometry and compute low-
dimensional local shape descriptors in the spectral domain. We start
by computing the Kirchoff graph Laplacian corresponding to each
Nω is the
shape attribute as: Kω = Dω
∈
Nω its diagonal de-
adjacency matrix of attribute ω, Dω
gree matrix, and Nω the number of its vertices. Values on the diago-
nal of Dω are computed as Daa = ∑b Aab. The Kirchoff Laplacian
is a real symmetric positive semidefinite matrix that can be eigen-
decomposed as Kω = UωΛΛΛωUT
K
are a set of K orthonormal eigenvectors known as the graph Fourier
modes and can be used to transform any discrete function defined
on the mesh vertices into the spectral domain. The signal most com-
monly transformed is the mesh geometry, which is the signal spec-
ifying the vertex coordinates. However, the local eigenprojection
̃Xω = UT
3 containing
the spectral representations of the 3 spatial coordinates. Instead of
flattening ̃Xω to make it compatible with the shape of the latent
representation, we define and project a one-dimensional signal: the
signed distance between the vertices of a mesh and the per-vertex
mean of the training set M (see Fig. 2). We have:
ω Xω would result in a matrix of size K
ω . The columns of Uω
Nω×
×
R
∈
M
k2
sd(X) = γγγ
X
with γγγ = sign(
X
M, N
),
(1)
*i
−
,
h*
k
is the inner product, and N are the vertex normals
where
referred to the mesh template with vertex positions M. If X was
standardised by subtracting M and dividing by the per-vertex stan-
dard deviation of the training set ΣΣΣ, being
the Hadamard product,
Eq. 1 can be rewritten as:
−
(cid:12)
(cid:10)
(cid:11)
sd(X) = γγγ
X
ΣΣΣ
k2
(cid:12)
k
with γγγ = sign(
X
ΣΣΣ, N
).
(2)
(cid:12)
(cid:10)
(cid:11)
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
5
Figure 3: Local eigenprojection distributions. All training meshes are locally eigenprojected to observe the distributions of the elements in
the resulting vectors. Distributions are colour-coded according to the shape attribute they are referred to. The segmentation of the shape
attributes displayed next to the distributions is rendered on the mean shape templates of the corresponding dataset. The dashed distributions,
which are obtained sampling a Gaussian, are reported for comparison.
k
X0
LR(X, X0) = 1
N k
LKL is a Kullback–Leibler (KL) divergence. In auto-
ulariser, and
encoder parlance, the reconstruction loss
−
2
X
F encourages the output of the VAE to be as close as possi-
ble to its input by computing the squared Frobenius norm between
X0 = G(E(X)) and X. The KL divergence can be considered as a
regularisation term that pushes the variational distribution q(z
X)
|
towards the prior distribution p(z). Since both prior and posterior
are assumed to be Gaussian
1.
2
LL(X0) = 1
F is a smoothing term
The Laplacian loss
N k
computed on the output vertices X0 and based on the Tutte Lapla-
1A, where A, D, and K are the ad-
cian T = D−
D−
jacency, diagonal degree, and Kirchoff Laplacian introduced in the
previous paragraph and computed on the entire mesh rather than on
shape attributes.
LKL(μμμ, σσσ) = σσσ2 + μμμ2
TX0
k
log(σσσ2)
1K = I
−
−
−
Latent disentanglement is enforced by separately applying the
local eigenprojection loss to the encoder and generator. We thus
define the total loss as:
to E, but with minor differences in the last layers (see Supplemen-
tary Materials). Nevertheless, all networks are built with the same
mesh operators of our 3D-VAE and [FKSC22; GCBZ19].
N
In the LSGAN implementation, G samples an input latent rep-
resentation from a Gaussian distribution p(z) =
(z; 0, I) and
maps it to the shape space as G(z) = X0. While it tries to learn
a distribution over generated shapes, the discriminator operates as
a classifier trying to distinguish generated shapes X0 from real
shapes X. Using a binary coding scheme for the labels of real
and generated samples, we can write the losses of G and D re-
D
1)2] and
LSGAN =
p(z)[(D(G(z))
spectively as
p(z)[D(G(z))2]. We also add
1
2 Ez
2 EX
LL(X0) to smooth the generated
the Laplacian regularisation term
outputs. When seeking disentanglement, we train the discriminator
D
LSGAN and the generator by minimising the follow-
by minimising
ing:
L
p(X)[(D(X)
2 Ez
∼
1)2] + 1
G
LSGAN = 1
−
−
L
L
∼
∼
=
L
LR(X, X0) + α
LL(X0) + β
LKL(μμμ, σσσ)+
+η1LLE(X, μμμ) + η2LLE(X0, μμμ),
(4)
G
LS =
L
L
G
LSGAN + α
LL(X0) + η
LLE(X0, z).
(5)
where η1 and η2 are two scalar weights balancing the contribu-
LLE(X, μμμ)
tions of the two local eigenprojection losses. Note that
is backpropagated only through E. This term pushes the predicted
μμμ towards the standardised local eigenprojections of the input,
while the KL divergence attempts to evenly distribute the encod-
LLE(X0, μμμ) is
ings around the centre of the latent space. Similarly,
backpropagated only through G and it enforces the output attributes
to have an eigenprojection compatible with the predicted mean.
3.4. Mesh Generative Adversarial Networks.
We propose two flavours of 3D Generative Adversarial Networks:
one based on Least Squares GAN (LSGAN) [MLX*17] and one on
Wasserstein GAN (WGAN) [ACB17]. Like VAEs, GANs also rely
on a pair of neural networks: a generator-discriminator pair
}
in LSGAN and a generator-critic
pair in WGAN. The ar-
chitecture of the generators is the same as the one adopted in the
generator of the 3D-VAE. The architectures of D and C are similar
G, D
G, C
{
{
}
submitted to COMPUTER GRAPHICS Forum (4/2023).
its critic network C,
In WGAN, G still
tries to learn a distribution over gener-
instead of classifying
ated shapes, but
real and generated shapes,
learns a Wasserstein distance and
outputs scalar scores that can be interpreted as measures of
realism for the shapes it processes. The WGAN losses for
C
WGAN =
G and C are
Ez
−
p(X)[D(X)] respectively. Similarly to
Ez
the LSGAN implementation, when enforcing disentanglement, the
C
critic is trained minimising
WGAN, while the generator minimis-
ing:
L
p(z)[D(G(z))]
G
WGAN =
EX
p(z)[D(G(z)] and
−
L
L
∼
∼
∼
G
W =
L
L
G
WGAN + α
LL(X0) + η
LLE(X0, z).
(6)
Note that to make C a 1-Lipschitz function, and thus satisfies
the Wasserstein distance computation requirements, C weights are
clipped to the range [
c, c].
−
6
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
Table 1: Quantitative comparison between our model and other state-of-the-art methods. All methods were trained on UHM [PWP*19].
Diversity, JSD, MMD, COV, and 1-NNA evaluate the generation capabilities of the models, while VP evaluates latent disentanglement. The
different metrics are computed as detailed in Sec. 4.3. Note that the training time does not consider the initialisation time.
Method
VAE
LSGAN
WGAN
DIP-VAE-I
SD-VAE
Mean Rec.
)
(
↓
0.61
-
-
4.65
0.73
LED-VAE
LED-LSGAN
LED-WGAN
1.46
-
-
Diversity
)
(
↑
4.23
6.12
4.04
4.74
4.23
5.30
6.38
5.77
JSD
)
(
↓
4.89
1.14
22.75
5.32
4.30
2.27
2.09
2.55
MMD
)
(
↓
1.53
1.65
1.36
1.24
1.56
1.73
2.03
1.81
COV
)
(%,
↑
65.49
43.41
57.94
55.57
65.67
49.83
43.41
47.47
1-NNA
)
(∆%,
↓
1.17
22.04
23.98
4.31
0.50
15.80
17.23
14.95
VP
(%,
)
↑
63.73
46.83
71.07
35.60
79.75
80.75
79.75
74.11
Training
)
Time (
↓
1h:46m
2h:23m
2h:22m
1h:48m
7h:21m
2h:53m
2h:28m
2h:28m
4. Experiments
4.1. Datasets.
Since our main objective is to train a generative model capable
of generating different identities, we require datasets containing
a sufficient number of subjects in a neutral expression (pose).
Most open source datasets for 3D shapes of faces, heads, bodies,
or animals (e.g. MPI-Dyna [PRMB15], SMPL [LMR*15], SUR-
REAL [VRM*17], CoMA [RBSB18], SMAL [ZKJB17], etc.) focus
on capturing different expressions or poses and are not suitable for
identity disentanglement. For comparison, we rely on the 10, 000
meshes –with neutral expression and pose– generated in [FKSC22]
using two linear models that were built using a large number of
subjects: UHM [PWP*19] and STAR [OBB20] (Sec. 2.1). We also
use the same data split with 90% of the data for training, 5% for
validation, and 5% for testing. Since these data are generated from
PCA-based models, we also train our models on real data from the
LYHM dataset [DPSD20] registered on the FLAME [LBB*17] tem-
plate. In addition, even though it is beyond the scope of this work,
we attempt to achieve disentanglement through local eigenprojec-
tion also on CoMA [RBSB18], a dataset mostly known for its wide
variety of expressions. All models and datasets are released for non-
commercial scientific research purposes.
4.2. Local Eigenprojection Distributions.
We observe that the eigenprojections are normally distributed for
datasets with neutral poses or expressions (Fig. 3). By standardis-
ing the eigenprojections in Eq. 3 we ensure their mean and stan-
dard deviation to be 0 and 1 respectively. Since we enforce a direct
relation between the local eigenprojections and the latent represen-
tations, this is a desirable property that allows us to generate mean-
ingful shapes by sampling latent vector from a normal distribution.
In order to explain why this property holds for datasets with neutral
poses and expressions, we need to hypothesise that shapes follow a
Gaussian distribution. This is a reasonable hypothesis for datasets
generated from PCA-based models, such as those obtained from
UHM and STAR, because vertex positions are computed as linear
combinations of generative coefficients sampled from a Gaussian.
However, following the maximum entropy explanation [Lyo14], it
is also reasonable to assume that shapes in dataset obtained captur-
ing real people (like LYHM), are normally distributed. [Lyo14] ar-
gues that although the Central Limit Theorem is the standard expla-
nation of why many things are normally distributed, the conditions
to apply the theorem are usually not met or they cannot be verified.
We assume that, like people's height, also body and head shapes are
largely determined by genetics and partially by environment and
epigenetic effects. The selection pressure determines an ideal shape
with some variability to hedge against fluctuating circumstances in
the environment. This amounts to fixing the mean, and an upper
bound on the variance. Apart from that, the population will natu-
rally tend to a state of maximal disorder (i.e., maximum entropy).
Therefore, according to the maximum entropy explanation, human
shapes are normally distributed because the distribution maximis-
ing entropy subject to those constraints is a normal distribution.
If the shapes are normally distributed, we can consider also ver-
tex positions consistently sampled on the shape surfaces to follow
each a different Gaussian distribution centred at the corresponding
vertex coordinates on the mean shape. Considering that the signed
distance and the local eigenprojection are both linear operations,
they preserve normality, and for this reason also the local eigen-
projections are normal. Note that expressions are subject-specific
deformations with a highly non-linear behaviour [CBGB20]. There
is no guarantee that these transformations preserve the normality of
the shape distribution. Therefore, datasets containing expressions,
such as CoMA, may not satisfy the normality assumption. In fact,
we observe that the standardised eigenprojections have more com-
plex distributions which appear to be mixture of Gaussians (see
Fig. 3). Intuitively, each Gaussian in the mixtures could be related
to a different subset of expressions.
4.3. Comparison with Other Methods.
We compare our local eigenprojection disentangled (LED) methods
against their vanilla implementations and against the only state-
of-the-art method providing control over the generation of local
shape attributes: the swap disentangled VAE (SD-VAE) proposed
in [FKSC22]. The authors compared their SD-VAE with other
VAEs for latent disentanglement. Among their implementation of
DIP-VAE-I, DIP-VAE-II, and FactorVAE, the first one appeared
to be the best performing. Therefore, we report results for DIP-
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
7
Figure 4: Random samples and vertex-wise distances showing the effects of traversing three randomly selected latent variables (see Supple-
mentary Material to observe the effects for all the latent variables).
VAE-I. For a fair comparison, all methods were trained on the same
dataset (UHM) using the same batch size and the same number of
epochs. In addition, they share the same architecture with minor
modifications for the GAN implementations (see Supplementary
Materials). The SD-VAE implementation, as well as the evaluation
code and the benchmark methods, are made publicly available at
github.com/simofoti/3DVAE-SwapDisentangled. All models were
trained on a single Nvidia Quadro P5000, which was used for ap-
proximately 18 GPU days in order to complete all the experiments.
The reconstruction errors reported in Tab. 1 are computed as the
mean per-vertex L2 distance between input and output vertex po-
sitions. This metric is computed on the test set and applies only
to VAEs. We report the generation capabilities of all models in
terms of diversity, JSD, MMD, COV, and 1-NNA. The diversity
is computed as the average of the mean per-vertex distances among
pairs of randomly generated meshes. The Jensen-Shannon Diver-
gence (JSD) [ADMG18] evaluates the KL distances between the
marginal point distributions of real and generated shapes. The cov-
erage (COV) [ADMG18] measures the fraction of meshes matched
to at least one mesh from the reference set. The minimum matching
distance (MMD) [ADMG18] complements the coverage by averag-
ing the distance between each mesh in the test set and its nearest
neighbour among the generated ones. The 1-nearest neighbour ac-
curacy (1-NNA) is a measure of similarity between shape distribu-
tions that evaluates the leave-one-out accuracy of a 1-NN classifier.
In its original formulation [YHH*19], it expects values converg-
ing to 50%. However, following [FKSC22], in Tab. 1 we report
absolute differences between the original score and the 50% target
value. All the generation capability metrics can be computed either
with the Chamfer or the Earth Mover distance. Since we did not ob-
serve significant discrepancies between the metrics computed with
these two distances, we arbitrarily report results obtained with the
Chamfer distance.
submitted to COMPUTER GRAPHICS Forum (4/2023).
Observing Tab. 1 we notice that none of the models is consis-
tently outperforming the others. GANs generally report better di-
versity scores than VAEs, but they are worse in terms of cover-
age and 1-NNA. GANs were also more difficult to train and were
prone to mode collapse. On the other hand, VAEs appeared stable
and required significantly less hyperparameter tuning. The scores
of our LED models were comparable with other methods, thus
showing that our loss does not negatively affect the generation ca-
pabilities. However, LED models are consistently outperformed in
terms of MMD, COV, and 1-NNA. These metrics evaluate the qual-
ity of generated samples by comparing them to a reference set.
Since comparisons are performed on the entire output shapes, we
hypothesise that a shape with local identity attributes resembling
each a different subject from the test set is more penalised than a
shape whose attributes are plausibly obtained from a single subject.
Note also that MMD, COV, and 1-NNA appear to be inversely pro-
portional to the diversity, suggesting that more diverse generated
shapes are also less similar to shapes in the test set. LED-models
report higher diversity because attributes can be independently gen-
erated. This negatively affects MMD, COV, and 1-NNA, but the
randomly generated shapes are still plausible subjects (see Fig. 4
and Supplementary Materials). Interestingly, SD-VAE appears to
be still capable of generating shapes with attributes resembling the
same subject from the test set, but at the expense of diversity and
latent disengagement (see Sec. 4.4).
LED-LSGAN and LED-WGAN train almost as quickly as the
vanilla LSGAN and WGAN. Training LED-VAE takes approxi-
mately one hour more than its vanilla counterpart because the local
eigenprojection loss is separately backpropagated through the en-
coder. However, since latent disentanglement is achieved without
swapping shape attributes during mini-batching, the training time
of LED-VAE is reduced by 61% with respect to SD-VAE. Note that
the additional initialisation overhead of LED models (3.72 minutes)
is negligible when compared to the significant training time reduc-
8
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
Figure 5: Effects of traversing each latent variable across different mesh attributes. For each latent variable (abscissas) we represent the
per-attribute mean distances computed after traversing the latent variable from its minimum to its maximum value. For each latent variable,
we expect a high mean distance in one single attribute and low values for all the others.
tion over SD-VAE, which is the only model capable of achieving a
satisfactory amount of latent disentanglement.
If we then qualitatively evaluate the random samples in Fig. 4,
we see that the quality of the meshes generated by LED-LSGAN
and LED-WGAN is slightly worse than those from LED-VAE. We
attribute this behaviour to the –usually undesired– smoothness typi-
cally introduced by 3D VAE models. In this case, the VAE model it-
self acts as a regulariser that prevents the shape artefacts introduced
by the local eigenprojection disentanglement. In addition, travers-
ing the latent variables, we find that mesh defects tend to appear
when latent variables approach values near
3 (see supplementary
material video). This might be a consequence of the reduced num-
ber of training data with local eigenprojections with these values
(see Fig. 3). Nonetheless, the problem can be easily mitigated with
the truncation trick, thus sampling latent vectors from a Gaussian
with standard deviation slightly smaller than one.
±
4.4. Evaluation of Latent Disentanglement.
Latent disentanglement can be quantitatively evaluated on datasets
with labelled data. However, such labels are not available for the
disentanglement of shape attributes and traditional metrics such as
Z-Diff [HMP*17], SAP [KSB18], and Factor [KM18] scores can-
not be used. Since the Variation Predictability (VP) disentangle-
ment metric does not require labelled data and it has shown good
correlation with the Factor score [ZXT20], we rely on this metric
to quantify disentanglement across different models (see Tab. 1).
The VP metric averages the test accuracies across multiple few-shot
trainings of a classifier. The classifier takes as input the difference
between two shapes generated from two latent vectors differing in
only one dimension and predicts the varied latent dimension. We
implement the classifier network with the same architecture of our
encoders, discriminators, and critiques. The network was trained
4. As in [ZXT20], we set
for 5 epochs with a learning rate of 1e−
ηV P = 0.1, NV P = 10, 000 and SV P = 3.
−
In addition, we qualitatively evaluate disentanglement as
in [FKSC22] by observing the effects of traversing latent variables
(Fig. 1, left). For each latent variable, we compute the per-vertex
Euclidean distances between two meshes. After setting all latent
variables to their mean value (0), the first mesh is generated setting
a single latent to its minimum (
3) and the second mesh setting the
same variable to its maximum (+3). The Euclidean distances can
be either rendered on the mesh surface using colours proportional
to the distances (Latent Traversals in Fig. 4 and Fig. 6), or plot-
ted as their per-attribute average distance (Fig. 5 and Fig. 6). When
plotted, the average distances isolated to each attribute provide an
intuitive way to assess disentanglement: good disentanglement is
achieved when the traversal of a single variable determines high
mean distances for one attribute and low mean distances for all the
others. Observing Fig. 4 and Fig. 5, it is clear that the only state-
of-the-art method providing control over local shape attributes is
SD-VAE. Since the eigenvectors used in the local eigenprojection
loss are orthogonal, we improve disentanglement over SD-VAE.
In fact, traversing latent variables of LED models determines finer
changes within each attribute in the generated shapes. For instance,
this can be appreciated by observing the eyes of the latent traversals
in Fig. 4, where left and right eyes are controlled by different vari-
ables in LED-VAE, while by the same one in SD-VAE (more exam-
ples are depicted in the Supplementary Materials). We also notice
that the magnitude of the mean distances reported in Fig. 5 for our
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
9
Figure 6: Results of LED-VAE on other datasets. For each dataset are displayed the effects of traversing latent variables (UHM is reported in
Fig. 5), three random samples and three vertex-wise distances highlighting the effects of traversing three latent variables (UHM is reported
Fig. 4). Mean distances are plotted following the colour coding depicted in Fig. 3.
LED models is bigger than SD-VAE within attributes and compa-
rable outside. This shows superior disentanglement and allows our
models to generate shapes with more diverse attributes than SD-
VAE. Our model exhibits good disentanglement performances also
on other datasets (Fig. 6).
4.5. Direct Manipulation
Υ
◦
×
∈
Like SD-VAE, also LED-VAE can be used for the direct manip-
ulation of the generated shapes. As in [FKSC22], the direct ma-
nipulation is performed by manually selecting Υ vertices on the
3) and by providing their
X0 = S
mesh surface (S
G(z)
R
◦
∈
2
3). Then, minzω k
Υ
desired location (Y
2 is op-
R
×
timised with the ADAM optimiser for 50 iterations while maintain-
ing a fixed learning rate of lr = 0.1. Note that the optimisation
is performed only on the subset of latent variables zω controlling
the local attribute corresponding to the selected vertices. If ver-
tices from different attributes are selected, multiple optimisations
are performed. As it can be observed in Fig. 7, LED-VAE is able to
perform the direct manipulations causing less shape changes than
SD-VAE in areas that should remain unchanged.
G(z)
Y
−
S
◦
k
most promising. This model is simpler to train, requires less hyper-
parameter tuning, and generates higher-quality meshes. We trained
and tested this model also on other datasets, where it showed equiv-
alent performances. Datasets with expressions have complex lo-
cal eigenprojection distributions (Fig. 3) which are more difficult
to learn. In fact, random samples generated by LED-VAE trained
on CoMA present mesh defects localised especially in areas where
changes in expression introduce significant shape differences char-
acterised by a highly non-linear behaviour (e.g. the mouth region).
Controlling the generation of different expressions was beyond the
scope of this work and we aim at addressing the issue as future
work. We proved that our loss can be easily used with both GANs
and VAEs. Being efficient to compute and not requiring modifi-
cations to the mini-batching procedure (like SD-VAE), it could be
leveraged also in more complex architectures for 3D reconstruction
5. Conclusion
We introduced a new approach to train generative models with a
more disentangled, interpretable and structured latent representa-
tion that significantly reduces the computational burden required by
SD-VAE. By establishing a correspondence between local eigen-
projections and latent variables, generative models can better con-
trol the creation and modification of local identity attributes of hu-
man shapes (See Fig. 1). Like the majority of state-of-the-art meth-
ods, the main limitation of our model is the assumption on the train-
ing data, which need to be consistently aligned, in dense point cor-
respondence, and with a fixed topology. Even though this is surely a
limitation, as we mentioned in Sec. 1, this assumption can simplify
the generation of other digital human's properties. Among the dif-
ferent LED models we proposed, we consider LED-VAE to be the
submitted to COMPUTER GRAPHICS Forum (4/2023).
Figure 7: Direct manipulation. Left: the user manually selects an
arbitrary number of vertices (blue) and specifies their desired po-
sition (red). Right: results of the direct manipulation optimisation
for LED-VAE and SD-VAE. For each method, the output shape, a
close-up of the manipulated attribute, and the rendering of the per-
vertex distances between the initial and manipulated shapes are
reported. The colour-map used to represent vertex distances is blue
where distances are zero and red where they reach their maximum
value.
10
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
or pose and expression disentanglement. In the LED-VAE the local
eigenprojection loss is computed also on the encoder (see how this
improves disentanglement in the ablation study provided with the
supplementary materials). Having an encoder capable of providing
a disentangled representation for different attributes could greatly
benefit shape-analysis research in plastic surgery [OvdLP*22] and
in genetic applications [CRW*18]. Therefore, we believe that our
method has the potential to benefit not only experienced digital
artists but also democratise the creation of realistic avatars for the
metaverse and find new applications in shape analysis. Since the
generation of geometric shapes is only the first step towards the
data-driven generation of realistic digital humans, as future work,
we will research more interpretable generative processes for ex-
pressions, poses, textures, materials, high-frequency details, and
hair.
Acknowledgement
This research was funded in whole, or in part, by the Wellcome
Trust [203145Z/16/Z]. For the purpose of Open Access, the author
has applied a CC BY public copyright licence to any Author Ac-
cepted Manuscript version arising from this submission.
References
[ABWB19] ABREVAYA, VICTORIA FERNANDEZ, BOUKHAYMA, AD-
NANE, WUHRER, STEFANIE, and BOYER, EDMOND. "A Decoupled 3D
Facial Shape Model by Adversarial Training". en. 2019 IEEE/CVF Inter-
national Conference on Computer Vision (ICCV). Seoul, Korea (South):
IEEE, Oct. 2019, 9418–9427. ISBN: 978-1-72814-803-8. (Visited on
09/17/2022) 2.
[ACB17] ARJOVSKY, MARTIN, CHINTALA, SOUMITH, and BOTTOU,
LÉON. "Wasserstein generative adversarial networks". Proceedings of
the 34th International Conference on Machine Learning. Ed. by PRE-
CUP, DOINA and TEH, YEE WHYE. Vol. 70. Proceedings of Machine
Learning Research. Sydney, Australia: PMLR, Aug. 2017, 214–223 5.
[ADMG18] ACHLIOPTAS, PANOS, DIAMANTI, OLGA, MITLIAGKAS,
IOANNIS, and GUIBAS, LEONIDAS. "Learning representations and gen-
erative models for 3d point clouds". Proceedings of the 35th Interna-
tional Conference on Machine Learning. Ed. by DY, JENNIFER and
KRAUSE, ANDREAS. Vol. 80. Proceedings of Machine Learning Re-
search. Stockholm, Sweden: PMLR, July 2018, 40–49 7.
[ATDJ21] AUMENTADO-ARMSTRONG, TRISTAN, TSOGKAS, STAVROS,
DICKINSON, SVEN, and JEPSON, ALLAN. Disentangling Geometric
Deformation Spaces in Generative Latent Shape Models. 2021 2, 3.
[ATJD19] AUMENTADO-ARMSTRONG, TRISTAN, TSOGKAS, STAVROS,
JEPSON, ALLAN, and DICKINSON, SVEN. "Geometric disentanglement
for generative latent shape models". Proceedings of the IEEE/CVF Inter-
national Conference on Computer Vision. Seoul, Korea (South): IEEE,
2019, 8181–8190 2, 3.
[AW20] ALHARBI, YAZEED and WONKA, PETER. "Disentangled im-
age generation through structured noise injection". Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition.
Virtual: IEEE, 2020, 5134–5142 3.
[BBP*19] BOURITSAS, GIORGOS, BOKHNYAK, SERGIY, PLOUMPIS,
STYLIANOS, et al. "Neural 3d morphable models: Spiral convolutional
networks for 3d shape representation learning and generation". Proceed-
ings of the IEEE/CVF International Conference on Computer Vision.
Seoul, Korea (South): IEEE, 2019, 7213–7222 2.
[BCV13] BENGIO, YOSHUA, COURVILLE, AARON, and VINCENT, PAS-
CAL. "Representation learning: A review and new perspectives".
IEEE transactions on pattern analysis and machine intelligence 35.8
(2013), 1798–1828 2.
[BRZ*16] BOOTH, JAMES, ROUSSOS, ANASTASIOS, ZAFEIRIOU, STE-
FANOS, et al. "A 3d morphable model learnt from 10,000 faces". Pro-
ceedings of the IEEE Conference on Computer Vision and Pattern
Recognition. Las Vegas, Nevada: IEEE, 2016, 5543–5552 2.
[BV99] BLANZ, VOLKER and VETTER, THOMAS. "A Morphable Model
for the Synthesis of 3D Faces". Proceedings of the 26th Annual Con-
ference on Computer Graphics and Interactive Techniques. SIGGRAPH
'99. Los Angeles, California, USA: ACM Press/Addison-Wesley Pub-
lishing Co., 1999, 187–194. ISBN: 0201485605 2.
[BZSL13] BRUNA, JOAN, ZAREMBA, WOJCIECH, SZLAM, ARTHUR, and
LECUN, YANN. Spectral Networks and Locally Connected Networks on
Graphs. 2013 3.
[CBGB20] CHANDRAN, PRASHANTH, BRADLEY, DEREK, GROSS,
MARKUS, and BEELER, THABO. "Semantic deep face models". 2020
International Conference on 3D Vision (3DV). Fukuoka, Japan: IEEE,
2020, 345–354 6.
[CBZ*19] CHENG, SHIYANG, BRONSTEIN, MICHAEL, ZHOU, YUXI-
ANG, et al. MeshGAN: Non-linear 3D Morphable Models of Faces.
2019 2.
[Cha84] CHAVEL, ISAAC. Eigenvalues in Riemannian geometry. Orlando,
Florida: Academic press, 1984 3.
[CNH*20] COSMO, LUCA, NORELLI, ANTONIO, HALIMI, OSHRI, et al.
"LIMP: Learning Latent Shape Representations with Metric Preserva-
tion Priors". European Conference on Computer Vision – ECCV 2020.
Springer. Online: Springer International Publishing, 2020, 19–35. ISBN:
978-3-030-58580-8 2, 3.
[CRW*18] CLAES, PETER, ROOSENBOOM, JASMIEN, WHITE, JULIE D,
et al. "Genome-wide mapping of global-to-local genetic effects on hu-
man facial shape". Nature genetics 50.3 (2018), 414–423 10.
[CTS*21] CHEN, HAOYU, TANG, HAO, SHI, HENGLIN, et al. "Intrinsic-
extrinsic preserved gans for unsupervised 3D pose transfer". Proceed-
ings of the IEEE/CVF International Conference on Computer Vision.
Virtual: IEEE, 2021, 8630–8639 3.
[DBV16] DEFFERRARD, MICHAËL, BRESSON, XAVIER, and VAN-
DERGHEYNST, PIERRE. "Convolutional Neural Networks on Graphs
with Fast Localized Spectral Filtering". Proceedings of the 30th Interna-
tional Conference on Neural Information Processing Systems. NIPS'16.
Barcelona, Spain: Curran Associates Inc., 2016, 3844–3852 3.
[DPSD20] DAI, HANG, PEARS, NICK, SMITH, WILLIAM, and DUNCAN,
CHRISTIAN. "Statistical modeling of craniofacial shape and texture". In-
ternational Journal of Computer Vision 128.2 (2020), 547–571 2, 6.
[DS19] DAI, HANG and SHAO, LING. "Pointae: Point auto-encoder for 3d
statistical shape and texture modelling". Proceedings of the IEEE/CVF
International Conference on Computer Vision. Seoul, Korea (South):
IEEE, 2019, 5410–5419 2.
[DXX*20] DING, ZHENG, XU, YIFAN, XU, WEIJIAN, et al. "Guided vari-
ational autoencoder for disentanglement learning". Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition.
Virtual: IEEE, 2020, 7920–7929 2, 3.
[EST*20] EGGER, BERNHARD, SMITH, WILLIAM AP, TEWARI, AYUSH,
et al. "3d morphable face models-past, present, and future". ACM
Transactions on Graphics (TOG) 39.5 (2020), 1–38 2.
[EWJ*19] ESMAEILI, BABAK, WU, HAO, JAIN, SARTHAK, et al. "Struc-
tured disentangled representations". The 22nd International Conference
on Artificial Intelligence and Statistics. PMLR. Naha, Okinawa, Japan:
PMLR, 2019, 2525–2534 2.
[FKD*20] FOTI, SIMONE, KOO, BONGJIN, DOWRICK, THOMAS, et al.
"Intraoperative Liver Surface Completion with Graph Convolutional
VAE". Uncertainty for Safe Utilization of Machine Learning in Med-
ical Imaging, and Graphs in Biomedical Image Analysis. Lima, Peru:
Springer-Verlag, 2020, 198–207. ISBN: 978-3-030-60364-9 2, 3.
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
11
[FKSC22] FOTI, SIMONE, KOO, BONGJIN, STOYANOV, DANAIL, and
CLARKSON, MATTHEW J. "3D Shape Variational Autoencoder La-
tent Disentanglement via Mini-Batch Feature Swapping for Bodies and
Faces". Proceedings of the IEEE/CVF Conference on Computer Vi-
sion and Pattern Recognition. New Orleans, Louisiana, USA: IEEE,
2022, 18730–18739 1–9.
[GCBZ19] GONG, SHUNWANG, CHEN, LEI, BRONSTEIN, MICHAEL, and
ZAFEIRIOU, STEFANOS. "Spiralnet++: A fast and highly efficient mesh
convolution operator". Proceedings of the IEEE/CVF International Con-
ference on Computer Vision Workshops. Seoul, Korea (South): IEEE,
2019 2, 4, 5.
[GFZ*20] GRUBER, A., FRATARCANGELI, M., ZOSS, G., et al. "In-
teractive Sculpting of Digital Faces Using an Anatomical Modeling
Paradigm". Computer Graphics Forum 39.5 (2020), 93–102 1, 2.
[GLP*20] GECER, BARIS, LATTAS, ALEXANDROS,
PLOUMPIS,
STYLIANOS, et al. "Synthesizing coupled 3d face modalities by
trunk-branch generative adversarial networks". European Conference
on Computer Vision. Springer. Virtual: IEEE, 2020, 415–433 2.
[GYP14] GAO, ZHANHENG, YU, ZEYUN, and PANG, XIAOLI. "A com-
pact shape descriptor for triangular surface meshes". Computer-Aided
Design 53 (2014), 62–69 3.
[HHLP20] HÄRKÖNEN, ERIK, HERTZMANN, AARON, LEHTINEN,
JAAKKO, and PARIS, SYLVAIN. "Ganspace: Discovering interpretable
gan controls". Advances in Neural Information Processing Systems 33
(2020), 9841–9850 3.
[HHS*21] HUANG, QIXING, HUANG, XIANGRU, SUN, BO, et al. "ARA-
PReg: An As-Rigid-As Possible Regularization Loss for Learning De-
formable Shape Generators". Proceedings of the IEEE/CVF Interna-
tional Conference on Computer Vision. Virtual: IEEE, 2021, 5815–
5825 3.
[HMP*17] HIGGINS, IRINA, MATTHEY, LOIC, PAL, ARKA, et al. beta-
VAE: Learning Basic Visual Concepts with a Constrained Variational
Framework. Toulon, France, 2017 2, 3, 8.
[HMWL21] HUANG, XUN, MALLYA, ARUN, WANG, TING-CHUN, and
LIU, MING-YU. Multimodal Conditional Image Synthesis with Product-
of-Experts GANs. 2021 3.
[HZK*19] HE, ZHENLIANG, ZUO, WANGMENG, KAN, MEINA, et al.
"Attgan: Facial attribute editing by only changing what you want". IEEE
transactions on image processing 28.11 (2019), 5464–5478 3.
[JWCZ19] JIANG, ZI-HANG, WU, QIANYI, CHEN, KEYU, and ZHANG,
JUYONG. "Disentangled representation learning for 3d face shape". Pro-
ceedings of the IEEE/CVF Conference on Computer Vision and Pat-
tern Recognition. Long Beach, California, USA: IEEE, 2019, 11957–
11966 3.
[KAL*21] KARRAS, TERO, AITTALA, MIIKA, LAINE, SAMULI, et al.
"Alias-free generative adversarial networks". Advances in Neural Infor-
mation Processing Systems. Vol. 34. Curran Associates, Inc., 2021, 852–
863 3.
[KM18] KIM, HYUNJIK and MNIH, ANDRIY. "Disentangling by factoris-
ing". International Conference on Machine Learning. PMLR. Stockhol,
Sweden: PMLR, 2018, 2649–2658 2, 3, 8.
[KSB18] KUMAR, ABHISHEK, SATTIGERI, PRASANNA, and BALAKR-
ISHNAN, AVINASH. Variational Inference of Disentangled Latent Con-
cepts from Unlabeled Observations. Vancouver, Canada, 2018 2, 3, 8.
[KW13] KINGMA, DIEDERIK P and WELLING, MAX. Auto-Encoding
Variational Bayes. 2013 4.
[KWKT15] KULKARNI, TEJAS D, WHITNEY, WILLIAM F., KOHLI,
PUSHMEET, and TENENBAUM, JOSH. "Deep Convolutional Inverse
Graphics Network". Advances in Neural Information Processing Sys-
tems. Ed. by CORTES, C., LAWRENCE, N., LEE, D., et al. Vol. 28. Mon-
treal, Canada: Curran Associates, Inc., 2015 2.
[LAR*14] LEWIS, JOHN P, ANJYO, KEN, RHEE, TAEHYUN, et al. "Prac-
tice and theory of blendshape facial models." Eurographics (State of the
Art Reports) 1.8 (2014), 2 2.
submitted to COMPUTER GRAPHICS Forum (4/2023).
[LBB*17] LI, TIANYE, BOLKART, TIMO, BLACK, MICHAEL J, et al.
"Learning a model of facial shape and expression from 4D scans." ACM
Trans. Graph. 36.6 (2017), 194–1 2, 6.
[LBBM18] LITANY, OR, BRONSTEIN, ALEX, BRONSTEIN, MICHAEL,
and MAKADIA, AMEESH. "Deformable shape completion with graph
convolutional autoencoders". Proceedings of the IEEE conference on
computer vision and pattern recognition. Salt Lake City, Utah, USA:
IEEE, 2018, 1886–1895 2.
[LBZ*20] LI, RUILONG, BLADIN, KARL, ZHAO, YAJIE, et al. "Learn-
ing Formation of Physically-Based Face Attributes". Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition.
Virtual: CVPR, 2020, 3410–3419 2.
[LKL*21] LING, HUAN, KREIS, KARSTEN, LI, DAIQING, et al. "Edit-
GAN: High-Precision Semantic Image Editing". Advances in Neural In-
formation Processing Systems. Vol. 34. Virtual: Curran Associates, Inc.,
2021, 16331–16345 3.
[LLHF21] LI, RUIHUI, LI, XIANZHI, HUI, KA-HEI, and FU, CHI-WING.
"SP-GAN: Sphere-guided 3D shape generation and manipulation". ACM
Transactions on Graphics (TOG) 40.4 (2021), 1–12 3.
[LLW22] LI, SHIDI, LIU, MIAOMIAO, and WALDER, CHRISTIAN. "Ed-
itVAE: Unsupervised Parts-Aware Controllable 3D Point Cloud Shape
Generation". Proceedings of the AAAI Conference on Artificial Intelli-
gence 36.2 (June 2022), 1386–1394 3.
[LLWL20] LEE, CHENG-HAN, LIU, ZIWEI, WU, LINGYUN, and LUO,
PING. "Maskgan: Towards diverse and interactive facial image manipu-
lation". Proceedings of the IEEE/CVF Conference on Computer Vision
and Pattern Recognition. Virtual: IEEE, 2020, 5549–5558 3.
[LMR*15] LOPER, MATTHEW, MAHMOOD, NAUREEN, ROMERO,
JAVIER, et al. "SMPL: A skinned multi-person linear model". ACM
transactions on graphics (TOG) 34.6 (2015), 1–16 1, 2, 6.
[LYF*21] LOMBARDI, SANDRO, YANG, BANGBANG, FAN, TIANXING,
et al. "LatentHuman: Shape-and-Pose Disentangled Latent Representa-
tion for Human Bodies". 2021 International Conference on 3D Vision
(3DV). Virtual: IEEE, 2021, 278–288 2.
[Lyo14] LYON, AIDAN. "Why are normal distributions normal?": The
British Journal for the Philosophy of Science 65.3 (2014), 621–649 6.
[MLX*17] MAO, XUDONG, LI, QING, XIE, HAORAN, et al. "Least
squares generative adversarial networks". Proceedings of the IEEE
international conference on computer vision. Venice, Italy: IEEE,
2017, 2794–2802 5.
[MPN*20] MOSCHOGLOU,
STYLIANOS,
STYLIANOS,
NICOLAOU, MIHALIS A, et al. "3dfacegan: Adversarial nets for 3d face
representation, generation, and translation". International Journal of
Computer Vision 128 (2020), 2534–2551 2.
PLOUMPIS,
[MRC*21] MARIN, RICCARDO, RAMPINI, ARIANNA, CASTELLANI,
UMBERTO, et al. "Spectral shape recovery and analysis via data-
driven connections". International
journal of computer vision 129
(2021), 2745–2760 4.
[NW17] NASH, C. and WILLIAMS, C. K. I. "The Shape Variational Au-
toencoder: A Deep Generative Model of Part-Segmented 3D Objects".
Computer Graphics Forum 36.5 (Aug. 2017), 1–12. ISSN: 0167-7055 2,
3.
[OBB20] OSMAN, AHMED A A, BOLKART, TIMO, and BLACK,
MICHAEL J. "STAR: A Sparse Trained Articulated Human Body Re-
gressor". European Conference on Computer Vision (ECCV). Virtual:
Springer International Publishing, 2020, 598–613 1, 2, 6.
[OBD*21] OLIVIER, NICOLAS, BAERT, KELIAN, DANIEAU, FABIEN,
et al. FaceTuneGAN: Face Autoencoder for Convolutional Expression
Transfer Using Neural Generative Adversarial Networks. 2021 2, 3.
[OFD*22] OTBERDOUT, NAIMA, FERRARI, CLAUDIO, DAOUDI, MO-
HAMED, et al. "Sparse to dense dynamic 3d facial expression gen-
eration". Proceedings of the IEEE/CVF Conference on Computer Vi-
sion and Pattern Recognition. New Orleans, Louisiana, USA: IEEE,
2022, 20385–20394 3.
12
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
[OvdLP*22] O'SULLIVAN, EIMEAR, van de LANDE, LARA S, PA-
PAIOANNOU, ATHANASIOS, et al. "Convolutional mesh autoencoders
for the 3-dimensional identification of FGFR-related craniosynostosis".
Scientific reports 12.1 (2022), 1–8 10.
[VRM*17] VAROL, GUL, ROMERO, JAVIER, MARTIN, XAVIER, et al.
"Learning from synthetic humans". Proceedings of the IEEE Conference
on Computer Vision and Pattern Recognition. Honolulu, Hawaii, USA:
IEEE, 2017, 109–117 6.
[PRMB15] PONS-MOLL, GERARD, ROMERO,
JAVIER, MAHMOOD,
NAUREEN, and BLACK, MICHAEL J. "Dyna: A model of dynamic hu-
man shape in motion". ACM Transactions on Graphics (TOG) 34.4
(2015), 1–14 6.
[PVS*21] PLOUMPIS, STYLIANOS, VERVERAS, EVANGELOS, SULLI-
VAN, EIMEAR O', et al. "Towards a Complete 3D Morphable Model of
the Human Head". IEEE Transactions on Pattern Analysis and Machine
Intelligence 43.11 (2021), 4142–4160 2.
[PWP*19] PLOUMPIS, STYLIANOS, WANG, HAOYANG, PEARS, NICK,
et al. "Combining 3D Morphable Models: A Large scale Face-and-Head
Model". Proceedings of the IEEE Conference on Computer Vision and
Pattern Recognition. Long Beach, California, USA: IEEE, 2019, 10934–
10943 2, 6.
[RBSB18] RANJAN, ANURAG, BOLKART, TIMO, SANYAL, SOUBHIK,
and BLACK, MICHAEL J. "Generating 3D faces using convolutional
mesh autoencoders". Proceedings of the European Conference on Com-
puter Vision (ECCV). Munich, Germany: Springer International Publish-
ing, 2018, 704–720 2, 4, 6.
[RDC*21] ROBERTS, DOMINIC, DANIELYAN, ARA, CHU, HANG, et al.
"LSD-StructureNet: Modeling Levels of Structural Detail in 3D Part Hi-
erarchies". Proceedings of the IEEE/CVF International Conference on
Computer Vision. Virtual: IEEE, 2021, 5836–5845 2, 3.
[RKH*21] RADFORD, ALEC, KIM, JONG WOOK, HALLACY, CHRIS,
et al. "Learning Transferable Visual Models From Natural Language
Supervision". Proceedings of the 38th International Conference on
Machine Learning. Ed. by MEILA, MARINA and ZHANG, TONG.
Vol. 139. Proceedings of Machine Learning Research. Virtual: PMLR,
2021, 8748–8763 3.
[RL21] RHODES, TRAVERS and LEE, DANIEL. "Local Disentanglement
in Variational Auto-Encoders Using Jacobian L_1 Regularization". Ad-
vances in Neural Information Processing Systems. Vol. 34. Virtual: Cur-
ran Associates, Inc., 2021 2, 3.
[WDH*19] WANG, WEI, DANG, ZHENG, HU, YINLIN,
al.
"Backpropagation-friendly eigendecomposition". Advances in Neural
Information Processing Systems. Vol. 32. Virtual, 2019 4.
et
[WYH*21] WANG, TAN, YUE, ZHONGQI, HUANG, JIANQIANG, et al.
"Self-Supervised Learning Disentangled Group Representation as Fea-
ture". Advances in Neural Information Processing Systems. Vol. 34. Vir-
tual: Curran Associates, Inc., 2021 2, 3.
[YFST18] YANG, YAOQING, FENG, CHEN, SHEN, YIRU, and TIAN,
DONG. "Foldingnet: Point cloud auto-encoder via deep grid deforma-
tion". Proceedings of the IEEE conference on computer vision and pat-
tern recognition. Salt Lake City, Utah, USA: IEEE, 2018, 206–215 2.
[YHH*19] YANG, GUANDAO, HUANG, XUN, HAO, ZEKUN, et al. "Point-
flow: 3d point cloud generation with continuous normalizing flows".
Proceedings of the IEEE/CVF International Conference on Computer
Vision. Seoul, Korea (South): IEEE, 2019, 4541–4550 7.
[YLY*20] YUAN, YU-JIE, LAI, YU-KUN, YANG, JIE, et al. "Mesh vari-
ational autoencoders with edge contraction pooling". Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern Recognition
Workshops. Virtual: IEEE, 2020, 274–275 2.
[YML*20] YANG, JIE, MO, KAICHUN, LAI, YU-KUN, et al. DSM-Net:
Disentangled Structured Mesh Net for Controllable Generation of Fine
Geometry. 2020 2, 3.
[ZBP20] ZHOU, KEYANG, BHATNAGAR, BHARAT LAL, and PONS-
MOLL, GERARD. "Unsupervised shape and pose disentanglement for 3d
meshes". European Conference on Computer Vision. Springer. Virtual:
Springer International Publishing, 2020, 341–357 3.
[ZKJB17] ZUFFI, SILVIA, KANAZAWA, ANGJOO, JACOBS, DAVID W,
and BLACK, MICHAEL J. "3D menagerie: Modeling the 3D shape
and pose of animals". Proceedings of the IEEE conference on com-
puter vision and pattern recognition. Honolulu, Hawaii, USA: IEEE,
2017, 6365–6373 6.
[RWP06] REUTER, MARTIN, WOLTER, FRANZ-ERICH, and PEINECKE,
NIKLAS. "Laplace–Beltrami spectra as 'Shape-DNA'of surfaces and
solids". Computer-Aided Design 38.4 (2006), 342–366 3.
[ZVD10] ZHANG, HAO, VAN KAICK, OLIVER, and DYER, RAM-
SAY. "Spectral Mesh Processing". Computer Graphics Forum 29.6
(2010), 1865–1894 3.
[SBKM21] SHOSHAN, ALON, BHONKER, NADAV, KVIATKOVSKY,
IGOR, and MEDIONI, GERARD. "Gan-control: Explicitly controllable
gans". Proceedings of the IEEE/CVF International Conference on Com-
puter Vision. Virtual: IEEE, 2021, 14083–14093 3.
[ZWL*20] ZHOU, YI, WU, CHENGLEI, LI, ZIMO, et al. "Fully convolu-
tional mesh autoencoder using efficient spatially varying kernels". Ad-
vances in Neural Information Processing Systems 33 (2020), 9251–
9262 2.
[SNF*13] SHUMAN, DAVID I, NARANG, SUNIL K, FROSSARD, PAS-
CAL, et al. "The emerging field of signal processing on graphs: Extend-
ing high-dimensional data analysis to networks and other irregular do-
mains". IEEE signal processing magazine 30.3 (2013), 83–98 3.
[SYTZ22] SHEN, YUJUN, YANG, CEYUAN, TANG, XIAOOU, and ZHOU,
BOLEI. "InterFaceGAN: Interpreting the Disentangled Face Represen-
tation Learned by GANs". IEEE Transactions on Pattern Analysis and
Machine Intelligence 44.4 (2022), 2004–2018 3.
[TDM11] TENA,
J. RAFAEL, DE LA TORRE, FERNANDO, and
MATTHEWS, IAIN. "Interactive Region-Based Linear 3D Face Models".
ACM Transactions on Graphics 30.4 (July 2011). ISSN: 0730-0301 1.
[TSL21] TATRO, NORMAN JOSEPH, SCHONSHECK, STEFAN C, and LAI,
RONGJIE. Unsupervised Geometric Disentanglement via CFAN-VAE.
Virtual, 2021 3.
[TZY*22] TAN, QINGYANG, ZHANG, LING-XIAO, YANG, JIE, et al.
"Variational Autoencoders for Localized Mesh Deformation Component
Analysis". IEEE Transactions on Pattern Analysis and Machine Intelli-
gence 44.10 (2022), 6297–6310 2.
[VB20] VOYNOV, ANDREY and BABENKO, ARTEM. "Unsupervised dis-
covery of interpretable directions in the gan latent space". International
conference on machine learning. PMLR. Virtual: PMLR, 2020, 9786–
9796 3.
[ZXT20] ZHU, XINQI, XU, CHANG, and TAO, DACHENG. "Learning dis-
entangled representations with latent variation predictability". European
Conference on Computer Vision. Virtual: Springer International Publish-
ing, 2020, 684–700 8.
[ZYHC22] ZHENG, MINGWU, YANG, HONGYU, HUANG, DI, and CHEN,
LIMING. "ImFace: A Nonlinear 3D Morphable Face Model with Implicit
Neural Representations". Proceedings of the IEEE/CVF Conference on
Computer Vision and Pattern Recognition. New Orleans, Louisiana,
USA: IEEE, 2022, 20343–20352 2.
[ZYL*20] ZHANG, ZIHUI, YU, CUICAN, LI, HUIBIN, et al. "Learning
Distribution Independent Latent Representation for 3D Face Disentan-
glement". 2020 International Conference on 3D Vision (3DV). Virtual:
IEEE, 2020, 848–857 2, 3.
submitted to COMPUTER GRAPHICS Forum (4/2023).
Volume xx (200y), Number z, pp. 1–4
Supplementary Materials of:
3D Generative Model Latent Disentanglement
via Local Eigenprojection
Simone Foti1
, Bongjin Koo1,2
, Danail Stoyanov1
, and Matthew J. Clarkson1
1University College London, London, UK
2University of California, Santa Barbara, Santa Barbara, USA
1. PCA-Based Baseline
LED models and SD-VAE are characterised by a single architec-
ture that, thanks to a disentangled latent representation, can control
the generation of local shape attributes while still considering the
whole output shape. To demonstrate the need for these models we
compare our method also against a bundle of attribute-specific PCA
models. As it can be observed in Fig. 8, the main issue of naive
per-part methods, such as the bundle of PCA models, is that shape
attributes are independently generated. Even though this makes the
different attributes fully disentangled between each others, signif-
icant surface discontinuities appear during the generation proce-
dure. On the contrary, LED models are capable of ensuring the
continuity of the output surfaces while providing control over the
generation of each attribute.
2. Mesh Operators
Traditional neural network operators are not well suited for non-
Euclidean data such as meshes. In recent years, many operators ca-
pable of operating on meshes were proposed. We decide to build all
models with the intuitive spiral++ convolutions and with quadric-
sampling-based pooling operators as in [FKSC22; GCBZ19]. How-
ever, other mesh operators could be used. Spiral++ convolutions,
which are specifically designed to efficiently operate on datasets
of meshes sharing the same topology [GCBZ19], are built aggre-
gating vertices along spiral sequences and processing them with
a multilayer perceptron. Spirals are defined for each vertex of the
mesh by selecting an arbitrary neighbour as well as the other ver-
tices along a clockwise spiral. All spirals are precomputed and have
a fixed length. The receptive field of these convolutions can be in-
creased by dilating the spirals, thus skipping a predefined amount
of vertices after each selected vertex. Since spirals are precom-
puted, only the multilayer preceptron's weights are learned dur-
ing training. Also the pooling operators are precomputed. In fact,
a quadric sampling procedure that iteratively contracts the vertex
pair with the smallest quadric error is applied to the mean shape of
the training data M. During this procedure both a pooling and an
un-pooling sparse matrix are defined. The former has values of 1
in correspondence of vertices that need to be preserved and 0 else-
where. The latter still has values of 1 for vertices that remain un-
changed while un-pooling, but it also stores the barycentric weights
corresponding to the barycentric coordinates of contracted vertices
in order to restore them. These precomputed sparse matrices are
matrix multiplied with the vertex features computed by the differ-
ent network's layers to achieve pooling and un-pooling.
3. Architectures
VAEs operating on meshes from UHM. The architecture of en-
coder and generator are defined as:
3
2
0
2
r
p
A
4
]
V
C
.
s
c
[
2
v
8
9
7
2
1
.
2
0
3
2
:
v
i
X
r
a
E = e(Conv(32)) ↓
4
−→
4
↓
−→
e(Conv(32)) ↓
4
−→
4
e(Conv(64)) ↓
−→
e(Conv(32))
Lin(60)
2
×
G = Lin(64n) ↑
4
−→
e(Conv(64)) ↑
4
−→
e(Conv(32))
4
−→
e(Conv(32))
Conv(3),
→
4
↑
−→
e(Conv(32)) ↑
Figure 8: Random samples generated by a bundle of PCA models
trained each on a different shape attribute.
submitted to COMPUTER GRAPHICS Forum (4/2023).
*
) and Conv(
*
where Lin(
) respectively represent linear layers and
spiral convolutions (Sec. 2) with their number of output features.
e(
) is the ELU (exponential linear unit) non-linear activation func-
*
tion. Right arrows represent pooling operations (Sec. 2). Their su-
perscript indicates the sampling factor as well as whether it is an
2
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
↓
↑
) or a down-sampling (
) operator. n is the number
up-sampling (
of down-sampled vertices after all the sampling operations. In this
case, being N the number of input and output vertices, n = N/44.
Note that E terminates with two linear layers that are responsi-
ble to predict μμμ and σσσ, which are used in conjunction with the
reparametrization trick to sample a latent vector z. This vector is
the input to the generator G.
The architecture described above is used by VAE, LED-VAE,
SD-VAE, and DIP-VAE-I.
VAEs operating on meshes from LYHM and CoMA. Since
meshes from LYHM and CoMA have fewer vertices than UHM, the
pooling layers of the VAE models have smaller sampling factor.
Therefore, we have:
E = e(Conv(32)) ↓
4
−→
2
↓
−→
e(Conv(32)) ↓
2
−→
2
e(Conv(64)) ↓
−→
e(Conv(32))
Lin(60)
2
×
G = Lin(64n) ↑
2
−→
e(Conv(64)) ↑
2
−→
e(Conv(32))
4
−→
e(Conv(32))
Conv(3).
→
2
↑
−→
e(Conv(32)) ↑
VAEs operating on meshes from STAR. Also STAR has fewer
vertices than UHM. In this case we use the same architecture used
by [FKSC22]. on this dataset:
E =e(Conv(32)) ↓
4
−→
e(Conv(32)) ↓
4
−→
e(Conv(64)) ↓
4
−→
Lin(60)
2
×
G = Lin(64n) ↑
4
−→
e(Conv(64)) ↑
4
−→
e(Conv(32))
4
↑
−→
e(Conv(32))
Conv(3).
→
LSGANs operating on meshes from UHM. As mentioned in
Sec. 3, the architecture of G remains the same of the VAEs operat-
ing on meshes from UHM and the architecture of the discriminator
D is similar to the one of E with some minor difference:
G = Lin(64n) ↑
e(Conv(64)) ↑
e(Conv(32))
4
−→
4
−→
e(Conv(32))
4
↑
−→
e(Conv(32)) ↑
4
−→
Conv(3)
→
e(Conv(32))
D = e(Conv(32)) ↓
4
−→
4
e(Conv(32)) ↓
−→
4
↓
−→
e(Conv(64)) ↓
Lin(60).
4
−→
Note that the main difference between E and D is the number of
linear layers at the end of the architecture. This architecture is used
for both LSGAN and LED-LSGAN.
WGANs operating on meshes from UHM. The architecture of
the generator in WGAN is the same as LSGAN's. The architecture
of the critic C is the same as D with fewer neurons in the last linear
layer, which outputs a single value. In fact, we have:
G = Lin(64n) ↑
e(Conv(64)) ↑
e(Conv(32))
4
−→
4
−→
e(Conv(32))
4
↑
−→
e(Conv(32)) ↑
4
−→
Conv(3)
→
C = e(Conv(32)) ↓
4
−→
4
−→
e(Conv(32)) ↓
e(Conv(32))
4
↓
−→
e(Conv(64)) ↓
Lin(1).
4
−→
This architecture is used for both WGAN and LED-WGAN.
4. Implementation Details
All networks are implemented in PyTorch using the mesh opera-
tors described in Sec. 2 with the implementation made available by
[FKSC22] †. We segment heads from UHM, LYHM, and CoMA in
F = 12 head attributes and split the latent representation z in F
subsets of size κ = 5. Bodies from STAR have F = 11 and κ = 3.
For the sake of comparison, all models trained on the meshes ob-
tained from UHM, CoMA, and STAR are trained for 40 epochs.
Since LYHM has significantly fewer meshes, models trained on this
dataset are trained for 400 epochs, which correspond to approxi-
mately the same number of iterations as other models. In addition,
the batch size is always set to 16 while spirals length and dilation
are set to 9 and 1 respectively. Data are always standardised by sub-
tracting the per-vertex mean of the training set (M) and dividing by
the per-vertex standard deviation of the training set (Σ).
VAEs. All VAE models are trained with the ADAM optimizer us-
4 and a KL divergence weight set
ing a fixed learning rate of 1e−
4. The vanilla VAE, DIP-VAE-I, and SD-VAE have a
to β = 1e−
smoothing loss weight of α = 1. As reported in [FKSC22], the la-
tent consistency weight of the SD-VAE model is set to 1 and the
contrastive margins to 0.5. In DIP-VAE-I we set λd = 100 and
λod = 10.
LED-VAEs. During the eigendecomposition of the Kirchoff
Laplacians Kω we compute the first K = 50 eigenvectors. The α
weight controlling the smoothing loss is set to α = 50, while the
weights of the local eigenprojection losses are set to η1 = 1 and
η2 = 0.5. As previously mentioned, the weight controlling the KL
4. The values reported above are used
divergence is set to β = 1e−
when LED-VAE is trained on the meshes from UHM. When LED-
4,
VAE is trained on LYHM, we have: K = 45, α = 10, β = 1e−
η1 = 0.5 and η2 = 0.25. On CoMA we have: K = 45, α = 50,
4, η1 = 1 and η2 = 2. On STAR we have: K = 50, α = 10,
β = 1e−
4, η1 = 0.1 and η2 = 2.
β = 1e−
LSGAN and LED-LSGAN. The generator G is trained using the
4. The discrimi-
ADAM optimizer with a fixed learning rate of 1e−
4. The weight
nator D using SGD with a fixed learning rate of 8e−
of the Laplacian smoothing term is set to α = 10 in LSGAN and
α = 50 in LED-LSGAN. In LED-LSGAN the local eigenprojection
loss weight is set to η = 0.5 and K = 50 eigenvalues are computed
during the eigendecompositions of the Kω.
WGAN and LED-WGAN. Both generator and critc are trained
using the RMSprop optimizer. The learning rate of the optimizer
† The SD-VAE, DIP-VAE, and FactorVAE implementations as well as
the evaluation code are publicly available at github.com/simofoti/3DVAE-
SwapDisentangled
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
3
Figure 9: Ablation study. The LED-VAE is ablated by removing the data standardisation and the computation of the local eigenprojection
loss on either the encoder or generator. Albations are performed also selecting the first eigenvectors instead of those associated with the
maximum variance and without standardising the local eigenprojections in the loss computation.
4, while the learning rate of the opti-
operating on G is set to 1e−
5. The C network weights are clipped
mizer operating on C is 5e−
c, c] with c = 0.01. The weight of the Laplacian
to the range [
smoothing term is set to α = 10 in WGAN and α = 50 in LED-
WGAN. In LED-WGAN the local eigenprojection loss weight is
set to η = 0.25 and K = 50 eigenvalues are computed.
−
5. LED-VAE Additional Experiments
As mentioned in Sec. 5, we consider LED-VAE to be the most
promising generative model among the proposed LED models be-
cause it is simpler to train, requires less hyperparameter tuning,
and generates higher quality meshes. Therefore, we conduct ex-
periments to evaluate the importance of the different assumptions
made in its construction (Sec. 5.1 and Sec. 5.2), and observe the
smoothness of the latent space (Sec. 5.3).
5.1. Ablation Study
The ablation study in Fig. 9 is performed by re-training the pro-
posed LED-VAE without some of its characterising design choices.
Models are re-trained with the same architecture (Sec. 3) and im-
plementation details (Sec. 4) of LED-VAE. Only one design choice
is altered per ablation experiment. Not standardising the data (No
stand in Fig. 9) we observe noisy random samples. Some control
over the generation of local attributes appears to be retained, but
the presence of noise contributes to shape variations across the en-
tire shape during latent traversals. When the local eigenprojection
loss is not computed on the encoder (η1 = 0), not only the encoder
loses its disentanglement capabilities, but the control over the gen-
eration of local shape attributes is significantly reduced (No LE
E in Fig. 9). Similar results are obtained when the local eigen-
projection loss is not computed on the generator (η2 = 0), though
the encoder should retain its disentanglement power (No LE G in
Fig. 9). If instead of selecting the κ eigenvectors corresponding to
the spectral components with the highest variance, we select the
first κ eigenvectors as Fourier modes for the local eigenprojection,
submitted to COMPUTER GRAPHICS Forum (4/2023).
the generator creates unrealistic shapes (No max var in Fig. 9). Un-
realistic shapes are generated also if the local eigenprojections are
not standardised and thus m?
ω = 1 in Eq. 3 (No LE
stand in Fig. 9). In addition, note that the vanilla VAE is equivalent
to the LED-VAE without local eigenprojection losses and its re-
sults are equivalent to those of an ablation experiment where both
the local eigenprojection losses are set to zero.
ω = 0 and s?
Not only we perform an ablation study removing some charac-
terising design choice of LED-VAE, but we also experiment with
the strength of their weighting coefficients. In Fig. 10, we observe
the effects caused by changing the smoothing weight (α). As ex-
pected, reducing α reduces also the quality of the randomly gener-
ated samples. Interestingly, also the disentanglement performance
slightly deteriorates. Increasing α does not have major effects on
Figure 10: Effects of smoothness weight (α) on random samples
and latent traversals. The row highlighted in pink reports results
obtained with the proposed implementation of LED-VAE. Latent
traversals are referred always to the same latent variable.
4
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
Figure 11: Effects of local eigenprojection weights on random samples and latent traversals. Rows highlighted in pink report results obtained
with the proposed implementation of LED-VAE. The left column shows the effects of changing η1, which controls the local eigenprojection
loss affecting the encoder. The right column the effects of changing η2, which controls the local eigenprojection loss affecting the generator.
Latent traversals are referred always to the same latent variable.
the generation and disentanglement performance. In Fig. 11, we
report the effects of altering the local eigenprojection weighting co-
efficients. Even though Fig. 9 (No LE E) shows the importance of
enforcing the local eigenprojection loss on the encoder, we do not
observe significant difference when altering its weight (η1). Most
differences can be appreciated in the first latent traversal, show-
ing how lower weights slightly deteriorate disentanglement. On the
contrary, η2, which modulates the disentanglement on the genera-
tor, has more influence on sample quality and disentanglement. In
fact, high η2 values improve disentanglement, but reduce sample
quality.
5.2. Different segmentations
The segmentations in Fig. 3 were performed with clinical supervi-
sion and were aimed at identifying key anatomical areas of the face
and body. Nevertheless, different segmentations are admissible. To
observe the disentanglement performance of LED-VAE with dif-
ferent segmentations, we re-trained LED-VAE using a coarser and
a finer segmentation. As shown in Fig. 12, LED-VAE success-
fully disentangles local identity attributes when varying the size
and number of local shape attributes.
Note that the local segments are used only by the local eigenpro-
jection losses and are not an input to the network. For this reason,
attributes can be connected, overlapping or even not connected. The
segmentation used to train our models is connected. Overlapping
segments could be used, but big overlaps may be counterproduc-
tive as they would increase entanglement between neighbouring re-
gions and may produce unexpected results when eigenprojections
of overlapping regions are incompatible.
5.3. Latent Interpolations and Replacements
We perform two latent interpolation experiments and compare re-
sults between LED-VAE and SD-VAE, the two variational autoen-
coders providing control over the generation of local shape at-
tributes. Two randomly selected test shapes Xstart and Xfinish are
encoded to compute their respective latent representations. Fig. 13
shows the reconstructed shapes X0start and X0finish as well as the
shapes generated from latent vectors linearly interpolated between
the latents of Xstart and Xfinish. Fig. 14, Fig. 15, and Fig. 16 depict
the effects of changing each zω of Xstart with the corresponding zω
of Xfinish. This is equivalent to progressively replacing attributes
of the initial mesh with those of the final mesh. The experiment
in Fig. 14 is better represented in the supplementary video, where
each zω is interpolated instead of being replaced. These experi-
ments show that the latent space of our LED-VAE is smooth. Even
though some self-intersections is visible on the ears of heads gen-
erated by LED-VAE, this model appears to be better than SD-VAE
at replacing attributes.
6. Random Generation and Latent Disentanglement
We report more randomly generated shapes and latent traversals
than those already depicted in Fig. 4 and Fig. 6. In fact, in Fig. 18
we show shapes obtained by all methods trained on heads from
UHM and in Fig. 17 shapes generated with LED-VAE trained on
LYHM, and CoMA, and STAR. Then we report the effects caused in
the generated shapes by traversing all the latent variables. In partic-
ular, Fig. 19 shows the shapes generated by traversing all 5 latent
variables in each zω for LED-VAE, SD-VAE, LED-LSGAN, and
LED-WGAN. Fig. 20 represents the effects of latent traversals for
methods that are not able to enforce disentanglement with respect
to local shape attributes, such as: VAE, DIP-VAE-I, LSGAN, and
WGAN. Finally, Fig. 21 reports latent traversal results for LED-
VAE trained on LYHM, and CoMA, and STAR.
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
5
Figure 12: Effects of traversing each latent variable of LED-VAE trained enforcing latent disentanglement with different attribute segmen-
tations. Note that since 5 latent variables are used to represent each attribute, the latent size with 6 attributes is equal to 30, 60 with 12, and
100 with 20. When 20 attributes are disentangled, not only we segment the supraorbital area, but we also separate the left from the right
attribute. For instance, while with 12 attributes left and right eye were grouped together, now they are separate.
Figure 13: Latent interpolations with LED-VAE and SD-VAE. Two shapes (Xstart and Xfinish) are randomly selected from the test set. Their
latent representation is computed by feeding the two shapes in the encoder network. 10 intermediate latent vectors are obtained by linearly
interpolating all the latent variables. Shapes generated from these latent vectors smoothly transition from the reconstructed initial (X0start)
and final shapes (X0finish).
submitted to COMPUTER GRAPHICS Forum (4/2023).
6
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
Figure 14: Per-attribute latent replacements with LED-VAE and SD-VAE. Subsets of the latent variables corresponding to different head
attributes (zω) are progressively replaced. While the left-most and right-most heads are the reconstruction of the initial and target shape, the
others are obtained with latent replacements. Each shape is generated starting from the one on its left. For example, the second heads from
the left are generated with the latent vector of X0start and replacing the subset of latent variables controlling the eyes of X0start with the subset
controlling the eyes of X0finish. Similarly, the third head has the same latent representation of the second one, but also the subset of latent
variables controlling the ears is replaced. The remaining shapes are obtained repeating the same procedure.
Figure 15: Additional per-attribute latent replacements with LED-VAE (see Fig. 14).
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
7
Figure 16: Additional per-attribute latent replacements with LED-VAE trained on shapes from STAR (see Fig. 14).
Figure 17: Random samples generated by LED-VAE models trained on shapes from LYHM, CoMA, and STAR.
submitted to COMPUTER GRAPHICS Forum (4/2023).
8
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
Figure 18: Random samples generated by LED-VAE, SD-VAE, LED-LSGAN, LED-WGAN, VAE, DIP-VAE-I, LSGAN, WGAN. All models
are trained on head shapes from UHM.
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
9
Figure 19: Complete latent traversals grouped per-method along columns and per-attribute along rows. LED-VAE, SD-VAE, LED-LSGAN,
and LED-WGAN are all trained on UHM.
submitted to COMPUTER GRAPHICS Forum (4/2023).
10
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
Figure 20: Complete latent traversals of VAE, DIP-VAE-I, LSGAN, and WGAN trained on UHM.
submitted to COMPUTER GRAPHICS Forum (4/2023).
S. Foti et al. / 3D Generative Model Latent Disentanglement via Local Eigenprojection
11
Figure 21: Complete latent traversals of LED-VAE grouped per-dataset along columns and per-attribute along rows. The LED-VAE models
are trained on shapes from LYHM, CoMA, and STAR.
submitted to COMPUTER GRAPHICS Forum (4/2023).
|
http://arxiv.org/abs/2302.12840v2 | 2023-03-01T08:43:13 | 2023-02-24T18:17:38 | HULAT at SemEval-2023 Task 10: Data augmentation for pre-trained
transformers applied to the detection of sexism in social media | This paper describes our participation in SemEval-2023 Task 10, whose goal is
the detection of sexism in social media. We explore some of the most popular
transformer models such as BERT, DistilBERT, RoBERTa, and XLNet. We also study
different data augmentation techniques to increase the training dataset. During
the development phase, our best results were obtained by using RoBERTa and data
augmentation for tasks B and C. However, the use of synthetic data does not
improve the results for task C. We participated in the three subtasks. Our
approach still has much room for improvement, especially in the two
fine-grained classifications. All our code is available in the repository
https://github.com/isegura/hulat_edos. | [
"Isabel Segura-Bedmar"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12840v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12840v2",
"@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",
"cs.NE"
] | ||
http://arxiv.org/abs/2302.12794v1 | 2023-02-24T18:10:37 | 2023-02-24T18:10:37 | HULAT at SemEval-2023 Task 9: Data augmentation for pre-trained
transformers applied to Multilingual Tweet Intimacy Analysis | This paper describes our participation in SemEval-2023 Task 9, Intimacy
Analysis of Multilingual Tweets. We fine-tune some of the most popular
transformer models with the training dataset and synthetic data generated by
different data augmentation techniques. During the development phase, our best
results were obtained by using XLM-T. Data augmentation techniques provide a
very slight improvement in the results. Our system ranked in the 27th position
out of the 45 participating systems. Despite its modest results, our system
shows promising results in languages such as Portuguese, English, and Dutch.
All our code is available in the repository
\url{https://github.com/isegura/hulat_intimacy}. | [
"Isabel Segura-Bedmar"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12794v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12794v1",
"@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",
"cs.NE"
] | HULAT at SemEval-2023 Task 9: Data augmentation for pre-trained
transformers applied to Multilingual Tweet Intimacy Analysis
Isabel Segura-Bedmar
Computer Science Department, Universidad Carlos III de Madrid, Leganés, Spain
[email protected]
Abstract
This paper describes our participation in
SemEval-2023 Task 9, Intimacy Analysis of
Multilingual Tweets. We fine-tune some of
the most popular transformer models with
the training dataset and synthetic data gen-
erated by different data augmentation tech-
niques. During the development phase, our
best results were obtained by using XLM-T.
Data augmentation techniques provide a very
slight improvement in the results. Our system
ranked in the 27th position out of the 45 partici-
pating systems. Despite its modest results, our
system shows promising results in languages
such as Portuguese, English, and Dutch. All
our code is available in the repository https:
//github.com/isegura/hulat_intimacy.
1
Introduction
The Intimacy Analysis of Multilingual Tweets (Pei
et al., 2023) is a very novel task whose goal is to
estimate the level of intimacy of a text. If we can
detect the degree of intimacy of a text, this could
help us better understand the social norms that exist
within a culture or society. Furthermore, from a
computational point of view, this task will allow us
to assess whether current computational models are
capable of identifying the intimacy level of a text,
distinguishing between texts with very intimate
content and texts without any intimate information.
Although the automatic analysis of textual in-
timacy in language could be very beneficial for
politicians, governments, sociologists, anthropol-
ogists, companies, and so on, very few research
efforts have been devoted to this challenging task
to now (Pei and Jurgens, 2020). Another important
aspect of this task is its multilingual setting. The
dataset used in the task is the MINT dataset (Pei
and Jurgens, 2020) with a total of 13,384 tweets in
10 languages including English, French, Spanish,
Italian, Portuguese, Korean, Dutch, Chinese, Hindi,
and Arabic. However, the training subset does not
include tweets written in Arabic, Dutch, Korean, or
Hindi.
The ask can be modeled as a regression task. We
explore some of the most successful transformers
such as BERT (Devlin et al., 2019), DistilBERT
(Sanh et al., 2019), MiniLM (Wang et al., 2020),
XLM-RoBERTa (Conneau et al., 2020), and XLM-
T(Barbieri et al., 2022). In addition, we also study
some data augmentation techniques to increase the
training dataset. Based on our experiments during
the development phase of the competition, we de-
cided to combine the XLM-T transformer model
and the data augmentation techniques to estimate
our predictions for the test set during the test phase.
Our team, HULAT, obtained an overall correla-
tion (Pearson's r) of 0.55. The highest correlation
was 0.616, while the lowest correlation was 0.03.
Our system ranked in the 27th position out of the
45 participating systems. Although our results are
modest, our system performs very well for some
languages such as Portuguese and English, rank-
ing third and ninth in the competition, respectively.
As expected, our system obtains worse results for
the unseen languages (Arabic, Korean, or Hindi),
but it ranks seventh for Dutch. Regarding the data
augmentation techniques, our experiments show
that the use of synthetic data does not appear to
provide a significant improvement in the perfor-
mance of the transformers. All our code is available
in the repository https://github.com/isegura/
hulat_intimacy.
2 Background
This task is a regression task whose goal is to pre-
dict a numerical value ranging from 1-5 that rep-
resents the intimacy level of a tweet, where 1 is
the lowest level, while 5 is the highest level of in-
timacy. An example is "Here is a nice equation:
0+0-0-0+0=0", which was annotated with an inti-
macy score of 1.0. Another example is "hes eating
cake and im planning to eat him", which was anno-
3
2
0
2
b
e
F
4
2
]
L
C
.
s
c
[
1
v
4
9
7
2
1
.
2
0
3
2
:
v
i
X
r
a
tated with an intimacy score of 4.40.
The training dataset contains 9,491 tweets from
six different languages: Portuguese, Chinese, Span-
ish, French, English, Italian. The test dataset has
3,881 tweets written in the previous languages, but
also in four unseen languages: Korean, Dutch, Ara-
bic, and Hindi. Both training and test datasets
have balanced representations of their languages
(see Fig. 4).
In the training dataset, each lan-
guage is represented by a sample of approximately
1,500 tweets. In the test dataset, the average size is
around 400 tweets per language, except for Hindu,
which only has 280 tweets.
We have studied the distribution of the intimacy
scores in the training and test datasets (see Fig. 7).
The mean intimacy score is around two tokens in
both datasets. 95% of the tweets have an intimacy
score lower than 3.8 in the training dataset, and
lower than four in the test dataset.
Since our dataset is multilingual, we are also
interested in studying the distribution of the inti-
macy scores for each language.
In the training
dataset, the tweets in all languages tend to have
low intimacy scores, with their highest densities
at 1.5 score (see Fig. 8). English, Italian, and
French are the languages that have a larger number
of tweets with intimacy scores lower than 2.0. Chi-
nese, Portuguese, and Spanish show more uniform
distribution than the others. Chinese and Spanish
tweets appear to have the tweets with higher inti-
macy scores. We also observe the same distribution
of the intimacy scores for the six languages in the
test dataset (see Fig. 9).
Figure 1: Density graph of the intimacy scores in the
test dataset, for the unseen languages: Hindi, Korean,
Dutch, and Arabic.
Regarding the distribution of the intimacy scores
for the new languages in the test dataset (that is,
Hindi, Korean, Dutch, Arabic), we observe that
Figure 2: Density graph of tweet length in the test
dataset for the seen languages: Portuguese, Chinese,
Spanish, French, English, Italian.
Dutch and Arabic appear to have a large number
of tweets with lower intimacy scores than Korean
and Hindi (see Fig. 1). Indeed, 75% of the tweets
written in Dutch or Arabic have intimacy scores
lower than 1.8. In both languages, the mean score
is around 1.5. On the contrary, 75% of the tweets
written in Hindi have intimacy scores greater than
1.5, with a mean score of 2.5. Korean tweets appear
to have even greater intimacy scores, with a mean
score of 3.0, and 75% of them show intimacy scores
greater than 2.5. Therefore, textual intimacy may
be strongly related to language (see Fig10).
We also studied the length of the tweets. The
mean size is around 10 tokens in both training and
test datasets. Moreover, 95% of the tweets have
less than 22 tokens (see Fig. 5). Figure 6 shows the
distribution of tweet length for each language in the
training dataset. As expected, Chinese tweets are
considerably shorter than the other languages, with
an average length of between three and four tokens.
This is due to the fact that the Chinese language
uses ideographs to represent words and ideas, and
therefore, these symbols have more information
than individual characters. For the romance lan-
guages, tweets are larger with an average length
of around 10 tokens. All languages show a similar
distribution of their lengths. Moreover, the same
distribution was seen in the test dataset (see Fig.
2).
For the unseen languages, Arabic, Dutch, Hindi,
and Korean, (which are only present in the test
dataset), we can see the tweets written in Korean
are shorter than the tweets written in other lan-
guages (see Fig. 3). This is because Korean is also
based on ideographs. In fact, this language is de-
excellent results for monolingual text classification.
Moreover, it also obtains good performance for
low-resource languages, such as Swahili and Urdu.
XLM-T (Barbieri et al., 2022), based on XLM-R,
was pre-trained on millions of tweets in over thirty
languages.
3.2 Data augmentation
Data augmentation (DA) aims to increase the train-
ing size by applying different transformations to the
original dataset. For example, in computer vision,
some modifications can be performed by cropping,
flipping, changing colors, and rotating pictures. In
NLP, these transformations include swapping to-
kens (but also characters or sentences), deletion or
random insertion of tokens (but also characters or
sentences), and back translation of texts between
different languages. While those transformations
are easier to implement in computer vision, they
are challenging in NLP, because they can alter the
grammatical structure of a text.
Another advantage is that these techniques help
to enhance the diversity of the examples in the
dataset. Moreover, they also help to avoid overfit-
ting. Unfortunately, data augmentation does not
always improve the results in NLP tasks.
In this task, we used different data augmentation
techniques (such as EDA (Wei and Zou, 2019), and
NLPAug library2) to create synthetic data.
EDA has been implemented in the textaugment
library 3 for Python. EDA uses four simple opera-
tions: Synonym Replacement, Random Insertion,
Random swap, and Random Deletion. The first op-
eration randomly chooses n words in a sentence
(which are not stopwords). Then, these words
are replaced with synonyms from WordNet4, a
very large lexicon for English. Random insertion
chooses a random word (which is not a stopword).
Then, it finds a random synonym that is inserted
in a random position in the sentence. The third
operation, Random Swap, randomly chooses two
words in the sentence and swaps their positions.
The fourth operation, Random Deletion, randomly
removes a word from a sentence. These operations
can be repeated several times.
NLPAug also provides an efficient implemen-
tation of DA techniques. In particular, NLPAug
offers three types of augmentation: Character level
2https://github.com/makcedward/nlpaug
3https://github.com/dsfsi/textaugment
4https://wordnet.princeton.edu/
Figure 3: Density graph of tweet length in the test
dataset for the unseen languages: 'Arabic', 'Dutch',
'Hindi', 'Korean'.
rived from Chinese (Goodman et al., 2012). Tweets
written in Hindi are larger with an average length of
15 tokens approximately. Arabic and Dutch show
a similar distribution, with an average length of
around 10 tokens.
3 System Overview
3.1 Models
We now provide a brief description of the trans-
formers that we explored during the development
phase.
BERT (Devlin et al., 2019) is undoubtedly the
most popular transformer model due to its excel-
lent results in many NLP tasks. In fact, many of
the transformers that have been published since
then (such as DistilBERT, RoBERTa or XLM-R)
are based on BERT. BERT is an encoder trained
using two strategies: masked language modeling
(MLM) and next sentence prediction (NSP). The
multilingual version of BERT was pre-trained in
more than one hundred languages using Wikipedia.
DistilBERT (Sanh et al., 2019) and MiniLM (Wang
et al., 2020) are smaller versions of BERT, which
can achieve similar results to BERT but with less
training time.
XLM-RoBERTa (XLM-R) (Conneau et al.,
2020) was pre-trained using more than two ter-
abytes of texts from the Common Crawl Corpus
1, which was collected by using web crawling for
12 years. Like BERT, XLM-R is based on the
strategy of masked language modeling. This is a
multilingual model that was pre-trained in one hun-
dred languages. However, XLM-R still provides
1https://commoncrawl.org/the-data/
augmentation, Word level augmentation, and Sen-
tence level augmentation.
In each of these lev-
els, NLPAug provides all the operations described
above, that is, synonym replacement, random dele-
tion, random insertion, and swapping. Regarding
synonym replacement, the most effective way is us-
ing word embeddings to select the synonyms. This
technique allows us to obtain a sentence with the
same meaning but with different words. NLPAug
uses non-contextual embeddings (such as Glove,
word2vec, etc) or contextual embeddings (such as
Bert, Roberta, etc).
In this work, we use the synonym replacement
provided by EDA, which is based on WordNet.
Thanks to NLPAug, we also generate new examples
by using a contextualized language model such as
BERT.
4 Experimental Setup
During the development phase, we divided the
training dataset into three splits with a ratio of
70:10:20. That is, 6,643 texts for training, 940
for validation, and 1,908 for testing. These splits
allowed us to train and validate our models, and
choose the best model for the test phase. The three
splits have the same distribution of languages and
intimacy scores.
Before tokenization, we used some filters to
clean texts. For example, we removed all mentions
of '@user' and URLs. We also removed punctua-
tion. Based on the length distribution of texts (see
Fig. 5), we consider 50 tokens as the maximum
length. All models were trained with batch size 64
for three epochs, while the batch size was 20 for
validation. We train all models using Pearson's r as
the metric to choose the best model. Pearson corre-
lation coefficient measures the linear relationship
between two datasets, in our case, the actual and
predicted values. It can range from -1 to +1, where
0 means that there is no correlation. A positive
score tells us that there is a positive association
between the two datasets.
5 Results
Our team, HULAT, participated in the task by using
the XLM-T model (Barbieri et al., 2022) and data
augmentation. Our approach obtained an overall
correlation (Pearsons'r) of 0.55. The highest corre-
lation was 0.616, while the lowest correlation was
0.03. Our system ranked in the 27th position out of
the 45 participating systems.
Language
Portuguese
English
Chinese
Italian
French
Spanish
Overall
Pearson
.699
.721
.709
.693
.670
.698
.707
Top Pearson Ranking
.702
.758
.762
.742
726
.784
.707
3
9
21
22
25
29
18
Table 1: XLM-T results on the test dataset for the seen
languages. The third column shows the highest corre-
lation in the competition for each language. The fourth
column shows our ranking in the competition for each
language.
Language
Dutch
Arabic
Hindi
Korean
Overall
Pearson
.641
.601
.209
.256
.355
Top Pearson Ranking
.678
.662
.276
.419
.499
7
22
25
35
33
Table 2: XLM-T results for unseen languages on the
test dataset. The third column shows the highest corre-
lation in the competition for each language. The fourth
column shows our ranking in the competition for each
language.
Regarding the results for the seen languages (that
is, the languages that are in the training dataset),
our system ranked third for Portuguese with a corre-
lation of 0.699, very close to the highest correlation
(0.702). For English, our system ranked ninth for
English with a correlation of 0.721, being the high-
est correlation of 0.758. Table 1 shows our results
on the test dataset for these languages. Overall, our
results are five points below the best score, except
for Spanish, where the difference is even higher
(around eight points).
Regarding the results for the unseen languages
(that is, the languages that were not in the training
dataset), our system achieved a correlation of 0.355,
while the highest correlation was 0.449. However,
our system ranked eighth for Dutch with a corre-
lation of 0.642 (the highest correlation was 0.678).
Table 2 shows our results on the test dataset for
each of the unseen languages. There is still a lot to
improve, especially in Korean (our score is almost
17 points below the highest correlation).
During the development phase, we explored dif-
ferent models described in Section 3. Table 3 shows
the results (Pearson's r) of all our models on the
final test dataset. The best model is XLM-T. This
may be because this model was pre-trained on mil-
lions of tweets in over thirty languages. The sec-
ond model was XLM-R. Both models, XLM-R and
Model
MiniLM
BERT
DistilBERT
XLM-R
XLM-T
Aug.
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Pearson
.457
.501
.475
.468
.52
.489
.526
.527
.565
.563
Table 3: Pearson scores for all our models on the final
test dataset
XLM-T, are multilingual and have the same archi-
tecture. The only difference is that the first one was
pre-trained with texts from the Common Crawl
Corpus, while the second one was pre-trained with
tweets. This fact could explain why XLM-T out-
performs XLM-R. DistilBERT is the third model,
achieving better results than BERT. Like Distil-
BERT, MiniLM is also a smaller version of BERT,
but with worse results than DistilBERT.
Data augmentation does not appear to affect the
results of the XLM-R and XLMT models. For
BERT and DistilBERT, the use of synthetic data
even decreases their results. MiniLM is the only
model that appears to benefit from data augmenta-
tion techniques.
6 Conclusion
In this paper, we fine-tuned some of the most suc-
cessful transformers by using an augmented train-
ing dataset created with some data augmentation
techniques. Based on the results during the devel-
opment phase, we chose the XLM-T model with
data augmentation for the test phase. Our system
obtained an overall correlation of 0.55, six points
below the highest correlation in the ranking. For
Portuguese and English, it ranked fourth and ninth,
respectively. Although our results for unseen lan-
guages are modest, our system ranked eight for
Dutch.
As future work, we plan to use zero-shot text
classification methods to automatically annotate a
small sample of tweets written in the unseen lan-
guages of the task, which later will be manually
reviewed by experts. We also plan to extend the
dataset by using texts from novels (which should
contain more intimacy) and from academic books
(whose texts, in general, should have a less degree
of intimacy). Fortunately, novels and academic
books are usually published in different languages.
A group of experts will annotate a small sample
of these texts. Then, we will explore some data
augmentation techniques, especially based on back
translation, to create new synthetic data for the task
and for all the languages.
7 Acknowledgments
This work is part of the R&D&i ACCESS2MEET
project
(PID2020-116527RB-I0), financed by
MCIN AEI/10.13039/501100011033/.
References
Francesco Barbieri, Luis Espinosa Anke, and Jose
Camacho-Collados. 2022. Xlm-t: Multilingual lan-
guage models in twitter for sentiment analysis and
beyond. In Proceedings of the Thirteenth Language
Resources and Evaluation Conference, pages 258–
266.
Alexis Conneau, Kartikay Khandelwal, Naman Goyal,
Vishrav Chaudhary, Guillaume Wenzek, Francisco
Guzmán, Edouard Grave, Myle Ott, Luke Zettle-
moyer, and Veselin Stoyanov. 2020. Unsupervised
In
cross-lingual representation learning at scale.
Proceedings of the 58th Annual Meeting of the Asso-
ciation for Computational Linguistics, pages 8440–
8451, Online. Association for Computational Lin-
guistics.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and
Kristina Toutanova. 2019. BERT: pre-training of
deep bidirectional transformers for language under-
In Proceedings of the 2019 Conference
standing.
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 Pa-
pers), pages 4171–4186. Association for Computa-
tional Linguistics.
Kenneth S Goodman, Shaomei Wang, Mieko Iven-
tosch, and Yetta M Goodman. 2012. Reading in
Asian languages: Making sense of written texts in
Chinese, Japanese, and Korean. Routledge.
Jiaxin Pei and David Jurgens. 2020. Quantifying inti-
macy in language. In Proceedings of the 2020 Con-
ference on Empirical Methods in Natural Language
Processing (EMNLP), pages 5307–5326, Online. As-
sociation for Computational Linguistics.
Jiaxin Pei, Vítor Silva, Maarten Bos, Yozon Liu,
Leonardo Neves, David Jurgens, and Francesco Bar-
bieri. 2023. Semeval 2023 task 9: Multilingual
tweet intimacy analysis. In 17th International Work-
shop on Semantic Evaluation (SemEval-2023).
Victor Sanh, Lysandre Debut, Julien Chaumond, and
Thomas Wolf. 2019. Distilbert, a distilled version
of bert: smaller, faster, cheaper and lighter. In The
5th Workshop on Energy Efficient Machine Learning
and Cognitive Computing @ NeurIPS 2019.
Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan
Yang, and Ming Zhou. 2020. Minilm: Deep self-
attention distillation for task-agnostic compression
of pre-trained transformers. Advances in Neural In-
formation Processing Systems, 33:5776–5788.
Jason Wei and Kai Zou. 2019. EDA: Easy data aug-
mentation techniques for boosting performance on
In Proceedings of the
text classification tasks.
2019 Conference on Empirical Methods in Natu-
ral Language Processing and the 9th International
Joint Conference on Natural Language Processing
(EMNLP-IJCNLP), pages 6383–6389, Hong Kong,
China. Association for Computational Linguistics.
8 Appendix
In this section, we provide supplementary material
for our research. Figure 4 shows the distribution of
languages in the training and test datasets. Figure
5 is a histogram of the length of the tweets in both
datasets. Figure 6 shows a density graph of the
length of the tweets in the training dataset.
Figure 4: Distribution of the languages in the training
and test datasets.
Figure 6: Density of tweet length in the training
dataset.
Figure 7: Histogram of the intimacy scores in the train-
ing and test datasets.
Figure 8: Density graph of the intimacy scores in the
training dataset
Figure 5: Distribution of the length of texts in tokens.
Figure 7 is a histogram of the intimacy scores
in training and test datasets. Figures 8 and 9 show
the density graph of the intimacy scores for each
language in the training and test dataset, respec-
tively. Figure 10 shows a comparison of the in-
timacy scores for Chinese and Korean in the test
dataset, which shows that textual intimacy may be
strongly related to language.
Figure 9: Density graph of the intimacy scores in the
test dataset for the seen languages: Portuguese, Chi-
nese, Spanish, French, English, Italian
Figure 10: Comparison of the intimacy scores for Chi-
nese and Korean in the test dataset.
During training, we also compute some common
metrics for regression tasks (see Table 4), which
are described below:
• Mean Absolute Error(MAE) calculates the ab-
solute difference between actual and predicted
values. That is, we must sum all the errors and
divide them by the total number of instances
in the test dataset.
• Mean Squared Error(MSE) is the squared dis-
tance between actual and predicted values.
• Root Mean Squared Error(RMSE) is the root
of MSE.
• R2 score (also known as Coefficient of Deter-
mination) ranges from 0 to 100. A low value
tells us that our regression model is not work-
ing well. Unlike the previous metrics, this
gives us the performance of the model, not the
error.
Model
MiniLM
BERT
DistilBERT
XLM-R
XLM-T
Aug.
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
MSE
.771
.704
.762
.797
.693
.764
.708
.747
.648
.645
RMSE
.878
.839
.873
.892
.832
.874
.841
.864
.805
.803
MAE
.667
.650
.661
.657
.635
.65
.640
.653
.625
.615
SMAPE
31.2
30.7
30.9
30.9
29.8
30.5
30.1
30.2
29.8
29.1
R2
.171
.243
.18
.14
.255
.179
.238
.196
.304
.306
Table 4: Results on the final test dataset for the metrics:
MSE, RMSE, MAE, SMAPE, and R2
|
|
http://arxiv.org/abs/2302.12784v1 | 2023-02-24T17:54:12 | 2023-02-24T17:54:12 | STA: Self-controlled Text Augmentation for Improving Text
Classifications | Despite recent advancements in Machine Learning, many tasks still involve
working in low-data regimes which can make solving natural language problems
difficult. Recently, a number of text augmentation techniques have emerged in
the field of Natural Language Processing (NLP) which can enrich the training
data with new examples, though they are not without their caveats. For
instance, simple rule-based heuristic methods are effective, but lack variation
in semantic content and syntactic structure with respect to the original text.
On the other hand, more complex deep learning approaches can cause extreme
shifts in the intrinsic meaning of the text and introduce unwanted noise into
the training data. To more reliably control the quality of the augmented
examples, we introduce a state-of-the-art approach for Self-Controlled Text
Augmentation (STA). Our approach tightly controls the generation process by
introducing a self-checking procedure to ensure that generated examples retain
the semantic content of the original text. Experimental results on multiple
benchmarking datasets demonstrate that STA substantially outperforms existing
state-of-the-art techniques, whilst qualitative analysis reveals that the
generated examples are both lexically diverse and semantically reliable. | [
"Congcong Wang",
"Gonzalo Fiz Pontiveros",
"Steven Derby",
"Tri Kurniawan Wijaya"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12784v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12784v1",
"@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"
] | STA: Self-controlled Text Augmentation for Improving Text
Classifications
Congcong Wang†∗, Gonzalo Fiz Pontiveros‡, Steven Derby‡ and Tri Kurniawan Wijaya‡
† School of Computer Science, University College Dublin, Dublin 4, Ireland
‡ Huawei Ireland Research Centre. Georges Court, Townsend St, Dublin 2, D02 R156, Ireland
[email protected]
{gonzalo.fiz.pontiveros, steven.derby, tri.kurniawan.wijaya}@huawei.com
Abstract
Despite recent advancements in Machine
Learning, many tasks still involve working in
low-data regimes which can make solving nat-
ural language problems difficult. Recently, a
number of text augmentation techniques have
emerged in the field of Natural Language Pro-
cessing (NLP) which can enrich the training
data with new examples, though they are not
without their caveats. For instance, simple
rule-based heuristic methods are effective, but
lack variation in semantic content and syntac-
tic structure with respect to the original text.
On the other hand, more complex deep learn-
ing approaches can cause extreme shifts in
the intrinsic meaning of the text and intro-
duce unwanted noise into the training data. To
more reliably control the quality of the aug-
mented examples, we introduce a state-of-the-
art approach for Self-Controlled Text Augmen-
tation (STA). Our approach tightly controls
the generation process by introducing a self-
checking procedure to ensure that generated
examples retain the semantic content of the
original text. Experimental results on multiple
benchmarking datasets demonstrate that STA
substantially outperforms existing state-of-the-
art techniques, whilst qualitative analysis re-
veals that the generated examples are both lex-
ically diverse and semantically reliable.
1
Introduction
A variety of tasks such as Topic Classification (Li
and Roth, 2002), Emotion Detection (Saravia et al.,
2018) and Sentiment Analysis (Socher et al., 2013)
have become important areas of research in NLP.
Such tasks generally require a considerable amount
of accurately labelled data to achieve strong per-
formance. However, acquiring enough such data is
costly and time consuming and thus rare in prac-
tice. This has motivated a vast body of research in
∗*The author completed this work during his internship at
Huawei Ireland Research Center.
techniques that can help alleviate issues associated
with low-data regimes.
A popular augmentation approach involves the
use of rule-based transformations, which employ
intuitive heuristics based on well-known paradig-
matic relationships between words. For instance,
by using a lexical-semantic database such as Word-
Net (Miller, 1995), researchers can make ratio-
nal and domain-specific conjectures about suit-
able replacements for words from lists of known
synonyms or hyponyms/hypernyms (Wang and
Yang, 2015; Wei and Zou, 2019; Feng et al., 2020).
Whilst these substitution-based approaches can re-
sult in novel and lexically diverse data, they also
tend to produce highly homogeneous structures,
even when context-free grammars are used to gen-
erate more syntactically variable examples (Jia and
Liang, 2016).
The recent success of pretrained transformer lan-
guage models such as BERT (Devlin et al., 2019)
and GPT-2 (Radford et al., 2019) has helped facil-
itate more robust strategies for dealing with low-
resource scenarios: Conditional text generation.
Large language models - typically trained on a
vast corpus of text - contain a rich understand-
ing of syntactic structure and semantic phenom-
ena in the corpus and thus can be well suited for
faithful domain-specific generation. Indeed, large
language models have been conditioned to great
success (Kobayashi, 2018; Wu et al., 2019; Anaby-
Tavor et al., 2020; Kumar et al., 2020) to synthesize
highly diverse training examples and strong down-
stream performance . The trade off for diverse
neurally-generated data is that semantic discrep-
ancies can emerge which can cause samples to be
misaligned with their appropriate label. Ideally,
the optimal augmentation method would be one
that satisfies both Lexical/Syntactic Diversity and
Semantic Fidelity (reliable alignment between se-
mantic meaning and class label).
In this paper, we propose a novel strategy - self-
3
2
0
2
b
e
F
4
2
]
L
C
.
s
c
[
1
v
4
8
7
2
1
.
2
0
3
2
:
v
i
X
r
a
controlled text augmentation (STA) that aims to
tightly control the generation process in order to
produce diverse training examples which retain a
high level of semantic fidelity. Following previous
work, we fine-tune a state-of-the-art sequence-to-
sequence transformer model, known as T5 (Raf-
fel et al., 2020), using a dataset containing only
a limited number of samples and generate new
samples using task-specific prompting, which has
been shown to be effective in low-resource sce-
narios (Le Scao and Rush, 2021). While similar
approaches have been deployed in previous work
(Anaby-Tavor et al., 2020), our novel strategy effec-
tively utilizes Pattern-Exploiting Training (Schick
and Schütze, 2021a,b) by employing templates of
verbalization-patterns that simultaneously direct
the generation process and filter noisy labels. Ex-
perimental results on multiple benchmarks demon-
strate that STA outperforms existing state-of-the-art
augmentation techniques. Furthermore, examining
the quality of the augmented data reveals better
diversity and fidelity as compared to the existing
techniques.
2 Related Work
Data augmentation for text classification has
been widely developed in the literature. Zhang
et al. (2015) demonstrated that replacing words or
phrases with lexically similar words such as syn-
onyms or hyponyms/hypernyms is an effective way
to perform text augmentation with minimal loss of
generality. The authors identify the target words
according to a predefined geometric distribution
and then replace words with their synonyms from a
thesaurus. Similarly, Wei and Zou (2019) proposed
EDA (Easy Data Augmentation) for text classifica-
tion that generates new samples from the original
training data with four simple operations; synonym
replacement, random insertion, random swap, and
random deletion, while Feng et al. (2020) further
explores these substitution techniques, particularly
for text generation. Wang and Yang (2015) instead
exploit the distributional knowledge from word
embedding models to randomly replace words or
phrases with other semantically similar concepts.
Kobayashi (2018) built upon this idea by replacing
words based on the context of the sentence, which
they achieve by sampling words from the probabil-
ity distribution produced by a bi-directional LSTM-
RNN language model at different word positions.
Back translation is another method that has
shown to be effective for augmentation, particularly
for transforming the structure of the text (Sennrich
et al., 2016; Shleifer, 2019). Here, novel samples
are generated by translating the original sentence
to a predetermined language, before it is eventu-
ally translated back to the original target language.
More recently, researchers have looked to capital-
ize on the success of pretrained transformer-based
language models by performing conditional text
augmentation to generate new sentences from the
original training data. For example, (Wu et al.,
2019) leveraged the masked language model of
BERT conditioned on labeled prompts that are
prepended to the text. Anaby-Tavor et al. (2020)
was also successfully able to finetune GPT-2 with
scarcely labeled training data to generate novel
sentences of text, which improved performance
on downstream classification tasks. Furthermore,
the authors aimed to directly tackle the label mis-
alignment problem by filtering noisy generated sen-
tences using a jointly trained classifier, with some
success. Similar work was performed by Kumar
et al. (2020) who studied conditional text augmen-
tation using a broader range of transformer-based
pre-trained language models including autoregres-
sive models (GPT-2), auto-encoder models (BERT),
and seq2seq models (BART), the latter of which
outperformed other data augmentation methods in
a low-resource setting.
Recently, Wang et al. (2021) also proposed using
GPT-3 for text augmentation with zero-label learn-
ing, with results that were competitive when com-
pared to fully supervised approaches. More closely
related to our instruction-based generation strategy,
Schick and Schütze (2021b) propose GenPet which
is used to directly tackle a number of text genera-
tion tasks rather than text augmentation itself. In
their work, which builds upon previous research
PET (Schick and Schütze, 2021a), the authors al-
ter the text inputs to form cloze-style questions
known as prompting training (Liu et al., 2021),
demonstrating improved performance on few-shot
downstream tasks. More recent and closely aligned
with our work includes both LM-BFF (Gao et al.,
2021) and DART (Zhang et al., 2022).
Unlike previous work, our novel approach can
successfully generate diverse samples using task-
specific templates - verbal prompts for genera-
tion and classification which signal the models ob-
jective. To ensure semantic fidelity, the model it-
self (self-controlling) is then used to both generate
novel data and selectively retain only the most con-
vincing examples using a classification template.
3 Method
In this section, we describe our self-controlled ap-
proach for text augmentation in text classification
(STA). Figure 1 illustrates the workflow of STA and
Algorithm 1 states STA in simple terms. At a high
level, STA first finetunes a pretrained sequence-to-
sequence (seq2seq) model using a dataset which
implicitly includes generation and classification
tasks. The generation task is then employed to
generate new data, and the classification task is
used for self-checking and selection for the final
synthetic dataset.
Algorithm 1 :Self-Controlled Text Augmentation
Require: Original dataset Do. Generative model
M . Generation template G. Classification tem-
plate C.
1: Convert Do to training dataset Dt via G and C.
2: Finetune M on Dt in a generation task and a
classification task jointly to obtain Mt.
3: Use G and Mt to generate candidate dataset
Dc.
4: Apply Mt to do classification inference on Dc
with C to select the most confident examples.
5: Form the final generated dataset D∗ with the
selected examples.
3.1 Pattern-Exploiting Training in seq2seq
Models
Pattern-Exploiting Training, PET (Schick and
Schütze, 2021a), is a finetuning technique for
downstream text classification tasks in masked lan-
guage models. The authors in (Schick and Schütze,
2021a) show PET allows accurate text classifica-
tion with very few labeled examples by converting
inputs into cloze questions. In this paper we adapt
the principles of PET to seq2seq autoregressive
models.
Let M be a pretrained seq2seq autoregressive
transformer model (for our experiments we have
chosen T5 (Raffel et al., 2020)). Such models
consist of an encoder-decoder pair; the encoder
takes an input sequence s and produces a contex-
tualised encoding sequence s. The encoded se-
quence and current subsequence t : {t1, t2, ..ti−1}
are then used as the input for the decoder to com-
pute the conditional distribution pM (ti|t1:i−1, s)
for the next token in the sequence. It is the possible
target sample (a sequence) t : {t1, t2, ..., tm} given
s via the factorization:
pM (t1:m|s) =
m
(cid:89)
pM (ti|t1:i−1, s)
(1)
i=1
Let Do = {(xi, yi)}|n
i=1 be a dataset for text
classification where xi ∈ X and yi ∈ L are text
and label respectively. The goal is to produce a
derived dataset Dt to finetune M and ensure it is
primed for generating diverse and (label) faithful
examples.
Formally, a template is a function T : V ∗ × L →
V ∗ × V ∗ where V is the vocabulary of M and
V ∗ denotes the set of finite sequences of sym-
bols in V . Given a family of templates T , we set
Dt = T (Do) = (cid:83)
T ∈T T (Do). That is, we convert
each sample (xi, yi) ∈ Do to |T | samples in the
derived dataset Dt. Table 1 lists all the templates
we specifically designed for classification and gen-
eration purposes 1 and Table 7 (see Appendix A)
demonstrates how this conversion is performed.
Crucially, we construct two types of template
families: classification templates C and generation
templates G and set T = C ∪ G.
the
Classification templates have
form
c(x, y) = (f1(x), f2(y)) or
c(x, y) =
(f1(x, y), f2(y)) where f1 and f2 denote functions
that map a piece of text to a source sequence and
target sequence respectively. Here, the text x ∈ X
is not a part of the target output. Generation
templates have the form g(x, y) = (f1(y), f2(x))
or g(x, y) = (f1(x, y), f2(x)) i.e. the label y ∈ L
is not a part of the target output. Thus Dt is
designed so that our model can learn both how
to generate a new piece of text of the domain
conditioning on the label description as well as
to classify a piece of text of the domain. With
the dataset Dt in hand, we proceed to finetune
M to obtain Mt, see 4.3 for details on training
parameters. We next describe how to use Mt for
text generation and self-checking.
3.2 Data Generation, Self-checking and
Selection
We follow a two-step process: first we generate
candidates and second we select a fraction of the
candidates to be included as augmentations. This
processes is conducted for each class separately so
1We have a discussion on why we use this specific set of
prompts in Section 7.
Figure 1: The architecture of our Self-controlled Text Augmentation approach (STA). The upper portion outlines
the finetuning component of our method (Training), whilst the lower portion demonstrates our procedure for
generating novel data (Inference). STA is highlighted by using the generation template and classification template
for fine-tuning a seq2seq transformer model. The generation template is used for generating samples and the
classification template is used for self-controlling and selecting the generated samples.
Template
Source sequence (s)
Target sequence (t)
Classification
c1 Given {Topic}: {L}. Classify: {xi}
c2
c3
Text: {xi}. Is this text about {yi} {Topic}?
Text: {xi}. Is this text about {yi} {Topic}?
Generation
g1 Description: {yi} {Topic}. Text:
g2 Description: {yi} {Topic}. Text: {xj}. Another text: {x0-2
i }
{yi}
yes
no
{xi}
{x3...
i }
Table 1: Prompt templates. "Topic" refers to a simple keyword describing the dataset e.g. "Sentiment" or "Emo-
tion" and L is the list of all class labels in the dataset. The symbol yi in c3 stands for any label in L \ {yi}, chosen
randomly. In g2, the xj denotes another sample from the same class as xi (i.e. yj = yi) chosen randomly.
we may assume for the remainder of this section
that we have fixed a label y ∈ L.
That is, first, we generate α × ny samples where
ny is the original number of samples in Do for la-
bel y and then select select the top β × ny samples
(β < α). In our experiments, we call β the aug-
mentation factor and set α = 5 × β. Namely, our
self-checking technique selects the top 20% of the
candidate examples per class 2 to form the final
generated D∗ that is combined with the original
dataset Do for downstream model training.
For the generation task, we need to choose a pre-
fix/source sequence s and proceed autoregressively
using Equation 1.
Referring back to Table 1, there are two choices
2This is based on our experimental search over {10%, 20%,
30%, 40%, 50%}.
g1 and g2 that can be used to construct s. We
choose g1 over g2 as the former only needs the label
(the dataset description is viewed as a constant), i.e.
g1(x, y) = (f1(y), f2(x)).
which gives the model greater freedom to generate
diverse examples.
Thus we set s = f1(y) and generate α × ny
samples using the finetuned model Mt where α
is the times of the number of generated candidate
examples to that of original examples.
We now possess a synthetic candidate dataset
c = {(xi, y)}|α×ny
Dy
i=1 which we will refine using a
self-checking strategy for selecting the generated
samples based on the confidence estimated by the
model Mt itself.
For each synthetic sample (x, y), we construct
Generated CandidateDatasetGeneration templateClassification templateSeq2SeqTransformerOriginal DatasetStep 2: Fine-tuningGeneration templateClassification templateSeq2SeqTransformerStep 4: Self checking and selectionGenerated Dataset+Step 3: Generation++TrainingInferenceStep 5: constructionStep 1: ConversionTraining Dataseta source sequence using the template c1(x, y) =
(f (cid:48)
1(x), f (cid:48)
1(x), {y}), that is, we set s =
f (cid:48)
1(x). Given s we define a score function u in the
same way as (Schick and Schütze, 2021a):
2(y)) = (f (cid:48)
u(y|s) = log pMt({y}|s)
equivalently this is the logit computed by Mt for
the sequence {y}. We then renormalize over the
labels in L by applying a softmax over each of the
scores u(*|s):
q(y|s) =
eu(y|s)
l∈L eu(l|s)
Finally, we rank the elements of Dy
(cid:80)
c by the value
of q and select the top β × ny samples to form the
dataset Dy
∗ and set D∗ = (cid:83)
y∈L Dy
∗
4 Experiments
Next, we conduct extensive experiments to test the
effectiveness of our approach in low-data regimes.
This section first describes the datasets choices,
and then presents the baselines for comparison,
and finally outlines model training and evaluation.
4.1 Datasets
Following previous work in the augmentation lit-
erature (Kumar et al., 2020; Anaby-Tavor et al.,
2020), two bench-marking datasets are used in
our experiments: SST-2 (Socher et al., 2013)
and TREC (Li and Roth, 2002). We also in-
clude EMOTION (emotion classification) (Sar-
avia et al., 2018) and HumAID (crisis tweets cat-
egorisation) (Alam et al., 2021) to extend the do-
mains of testing STA's effectiveness. More infor-
mation on the datasets can be found in Appendix B.
4.2 Baselines
We evaluate our novel strategy against a set of state-
of-the-art techniques found within the literature.
These approaches include a variety of augmenta-
tion procedures from rule-based heuristics to deep
neural text generation. We compare STA to the aug-
mentation techniques as they are directly related to
our method in generating samples that can be used
in our subsequent study for examining the quality
of generated examples. We realise that our work is
also related to few-shot learning approaches such
as PET and LM-BFF that use few examples for
text classification, we report the results of STA
compared to them in Appendix C.
Baseline (No Aug.) uses the original train-
ing data as the downstream model training data.
Namely, no augmentation is applied anywhere.
EDA (Wei and Zou, 2019) refers to easy data
augmentation that transforms an existing example
by applying local word-level changes such as syn-
onym replacement, random insertion, etc.
BT and BT-Hops (Edunov et al., 2018; Shleifer,
2019) refers to back-translation techniques. The
former is simply one step back translation from En-
glish to another language that is randomly sampled
from the 12 Romance languages provided by the
"opus-mt-en-ROMANCE" model3 from the trans-
formers library (Wolf et al., 2019). The latter adds
random 1 to 3 extra languages in the back transla-
tion using the same model.
GPT-2 4 is a deep learning method using GPT-2
for augmentation. Following (Kumar et al., 2020),
we finetune a GPT-2 base model on the original
training data and then use it to generate new exam-
ples conditioning on both the label description and
the first three words of an existing example.
GPT-2-λ is similar to GPT-2 with the addition
of the LAMBDA technique from Anaby-Tavor et al.
(2020). LAMBDA first finetunes the downstream
classification model on the original training data
and then use it to select the generated examples by
GPT-2.
CBERT (Wu et al., 2019) is a strong word-
replacement based method for text augmentation.
It relies on the masked language model of BERT
to obtain new examples by replacing words of the
original examples conditioning on the labels.
BART-Span (Kumar et al., 2020) 5 uses the
Seq2Seq BART model for text augmentation. Pre-
viously, it was found to be a competitive technique
for data augmentation using BERT for classifica-
tion (the sort of large-scale language models fine-
tuning for classification) in low-data regimes. It is
implemented as described in Kumar et al. (2020)
that finetunes the BART large model conditioning
on the label names and the texts of 40% consecutive
masked words.
4.3 Training and Evaluation
When finetuning the generation model, we select
the pre-trained T5 base checkpoint as the starting
weights. For the downstream classification task,
3https://huggingface.co/Helsinki-NLP/
opus-mt-en-ROMANCE
4Licensing: Modified MIT License
5Licensing: Attribution-NonCommercial 4.0 International
Augmentation Method
5
10
20
50
100
Baseline (No Aug.)
56.5 (3.8)
63.1 (4.1)
68.7 (5.1)
81.9 (2.9)
85.8 (0.8)
EDA (Wei and Zou, 2019)
BT (Edunov et al., 2018)
BT-Hops (Shleifer, 2019)
CBERT (Wu et al., 2019)
GPT-2 (Kumar et al., 2020)
GPT-2-λ (Anaby-Tavor et al., 2020)
BART-Span (Kumar et al., 2020)
STA-noself
STA-twoprompts
STA (ours)
59.7 (4.1)
59.6 (4.2)
59.1 (4.6)
59.8 (3.7)
53.9 (2.8)
55.4 (4.8)
60.0 (3.7)
66.7 (5.0)
69.8 (4.9)
72.8 (6.2)
66.6 (4.7)
67.9 (5.3)
67.1 (5.2)
66.3 (6.8)
62.5 (3.8)
65.9 (4.3)
69.0 (4.7)
77.1 (4.7)
79.1 (3.4)
81.4 (2.6)
73.7 (5.6)
73.7 (5.8)
73.4 (5.2)
72.9 (4.9)
69.4 (4.6)
76.2 (5.6)
78.4 (5.0)
81.8 (2.1)
81.7 (4.5)
84.2 (1.8)
83.2 (1.5)
82.9 (1.9)
82.4 (2.0)
82.5 (2.5)
82.4 (1.7)
84.5 (1.4)
83.8 (2.0)
84.8 (1.0)
86.0 (0.8)
86.0 (0.8)
86.0 (1.4)
86.0 (1.2)
85.8 (1.1)
85.6 (1.2)
85.0 (1.7)
86.4 (0.6)
85.8 (1.0)
85.7 (1.0)
87.5 (0.6)
87.2 (0.6)
Table 2: STA on SST-2 in 5, 10, 20, 50, 100 examples per class. The results are reported as average (std.) accuracy
(in %) based on 10 random experimental runs. Numbers in bold indicate the highest in columns.
we finetune "bert-base-uncased"6 on the original
training data either with or without the augmented
samples. Regarding the pre-trained models, we
use the publicly-released version from the Hug-
gingFace's transformers library (Wolf et al., 2019).
For the augmentation factor (i.e., β in Section 3.2),
the augmentation techniques including ours and
the baselines are applied to augment 1 to 5 times
of original training data. In the experiments, it is
regarded as a hyper-parameter to be determined.
Since our work focuses on text augmentation for
classification in low-data settings, we sampled 5,
10, 20, 50 and 100 examples per class for each
training dataset as per Anaby-Tavor et al. (2020).
To alleviate randomness, we run all experiments
10 times so the average accuracy along with its
standard deviation (std.) is reported on the full test
set in the evaluation. More information on training
and evaluation refers to Appendix D.
5 Results and Discussion
5.1 Classification Tasks
The results on SST-2 (Table 2), EMOTION (Ta-
ble 3), TREC (Table 4) and HumAID (Table 5)
classification tasks all demonstrate the effective-
ness of our augmentation strategy. In all cases, our
approach provides state-of-the-art performance for
text augmentation across all low-resource settings.
When a higher number of samples (50-100) are
used for training we see that STA is better, as in the
cases of SST-2, EMOTION and HumAID tasks, or
competitive, as in the case of TREC. Furthermore,
we can see that STA is superior to other augmen-
tation techniques when only a small number of
examples are used to train the generator (5-10-20).
6https://huggingface.co/bert-base-uncased
In fact, STA on average demonstrates a difference
of +9.4∆ and +4.7∆ when trained on only 5 and
10 samples per class respectively, demonstrating
its ability to generate salient and effective training
examples from limited amounts of data.
5.2 Ablation Studies: Self-checking and
Prompts
To demonstrate the importance of our self-checking
procedure, we performed our empirical investi-
gations on STA both with and without the self-
checking step. The results without self-checking
are shown at the bottom of the tables for SST-2 (Ta-
ble 2), EMOTION (Table 3), TREC (Table 4) and
HumAID (Table 5), denoted as "STA-noself". We
see that our approach demonstrates considerable
improvements when the self-checking step is added
across all tasks and training sample sizes, further
supporting our augmentation technique. In fact,
the difference between the two settings is consider-
able, with an average increase of +9.3∆ across all
tasks and training samples sizes. We hypothesize
that the self-checking step more reliably controls
the labels of the generated text, which greatly im-
proves training stimulus and thus the performance
on downstream tasks.
Of course, there are many possible choices for
templates and permutations of template procedures.
To further support the use of our multiple prompt
templates used in STA (see Table 1), we con-
duct another ablation run for this purpose, denoted
as "STA-twoprompts" at the bottom of the tables.
These templates, one for classification (c1) and
one for generation (g1), represent a minimalistic
approach for performing generation-based augmen-
tation with self-checking without the additional
templates outlined in Table 1. The results show
Augmentation Method
5
10
20
50
100
Baseline (No Aug.)
26.7 (8.5)
28.5 (6.3)
32.4 (3.9)
59.0 (2.6)
74.7 (1.7)
EDA
BT
BT-Hops
CBERT
GPT-2
GPT-2-λ
BART-Span
STA-noself
STA-twoprompts
STA (ours)
30.1 (6.2)
32.0 (3.0)
31.3 (2.6)
29.2 (6.5)
28.4 (8.5)
28.6 (5.1)
29.9 (4.5)
34.0 (4.0)
41.8 (6.1)
43.8 (6.9)
33.1 (4.3)
37.4 (3.0)
37.1 (4.6)
32.6 (3.9)
31.3 (3.5)
30.8 (3.1)
35.4 (5.7)
41.4 (5.5)
56.2 (3.0)
57.8 (3.7)
47.5 (5.0)
48.5 (5.1)
49.1 (3.5)
44.1 (5.2)
39.0 (4.1)
43.3 (7.5)
46.4 (3.9)
53.3 (2.2)
64.9 (3.3)
64.1 (2.1)
66.7 (2.7)
65.5 (2.0)
65.0 (2.3)
62.1 (2.0)
57.1 (3.1)
71.6 (1.5)
70.9 (1.5)
65.1 (2.3)
75.1 (1.5)
75.3 (1.8)
77.4 (1.8)
75.6 (1.6)
75.0 (1.5)
75.5 (2.2)
69.9 (1.3)
80.7 (0.4)
77.8 (1.0)
74.0 (1.1)
81.3 (0.7)
81.5 (1.1)
Table 3: STA on EMOTION in 5, 10, 20, 50, 100 examples per class. The results are reported as average (std.)
accuracy (in %) based on 10 random experimental runs. Numbers in bold indicate the highest in columns.
Augmentation Method
5
10
20
50
100
Baseline (No Aug.)
33.9 (10.4)
55.8 (6.2)
71.3 (6.3)
87.9 (3.1)
93.2 (0.7)
EDA
BT
BT-Hops
CBERT
GPT-2
GPT-2-λ
BART-Span
STA-noself
STA-twoprompts
STA (ours)
54.1 (7.7)
56.0 (8.7)
53.8 (8.2)
52.2 (9.8)
47.6 (7.9)
49.6 (11.0)
55.0 (9.9)
45.4 (3.2)
49.6 (9.0)
59.6 (7.4)
70.6 (5.7)
67.0 (4.1)
67.7 (5.1)
67.0 (7.1)
67.7 (4.9)
70.2 (5.8)
65.9 (6.7)
61.9 (10.2)
69.1 (8.0)
70.9 (6.6)
79.5 (3.4)
79.4 (4.8)
78.7 (5.6)
78.0 (5.3)
76.9 (5.6)
80.9 (4.4)
77.1 (5.5)
77.2 (5.5)
81.0 (5.9)
81.1 (3.9)
89.3 (1.9)
89.0 (2.4)
88.0 (2.3)
89.1 (2.5)
87.8 (2.4)
89.6 (2.2)
88.38 (3.4)
88.3 (1.2)
89.4 (3.0)
89.1 (2.7)
92.3 (1.1)
92.7 (0.8)
91.8 (0.9)
92.6 (1.1)
91.6 (1.1)
93.5 (0.8)
92.7 (1.6)
91.7 (0.8)
93.1 (0.9)
93.2 (0.8)
Table 4: STA on TREC in 5, 10, 20, 50, 100 examples per class. The results are reported as average (std.) accuracy
(in %) based on 10 random experimental runs. Numbers in bold indicate the highest in columns.
Augmentation Method
5
10
20
50
100
Baseline (No Aug.)
EDA
BT
BT-Hops
CBERT
GPT-2
GPT-2-λ
BART-Span
STA-noself
STA-twoprompts
STA (ours)
29.1 (6.6)
49.5 (4.5)
45.8 (5.7)
43.4 (6.4)
44.8 (7.6)
46.0 (4.7)
50.7 (8.6)
42.4 (7.3)
56.4 (7.0)
68.7 (10.9)
69.0 (3.9)
37.1 (6.4)
64.4 (3.6)
59.1 (5.2)
57.5 (5.2)
59.5 (4.8)
55.7 (5.7)
68.1 (6.2)
58.6(7.0)
70.2 (4.3)
77.6 (3.6)
75.8 (3.3)
60.7 (4.0)
74.7 (1.5)
73.5 (2.1)
72.4 (2.8)
73.4 (1.7)
67.3 (2.6)
78.5 (1.3)
70.04 (3.7)
76.3 (3.3)
80.1 (1.7)
80.2 (1.6)
80.0 (0.9)
80.7 (1.0)
80.4 (1.2)
80.1 (1.1)
80.3 (0.8)
77.8 (1.6)
82.1( 1.1)
79.3 (1.4)
79.4 (4.5)
82.9 (1.6)
83.2 (0.5)
83.4 (1.0)
83.5 (0.6)
83.1 (0.7)
82.8 (1.4)
82.7 (1.2)
81.1 (0.6)
84.2 (0.8)
83.33 (0.9)
81.8 (1.3)
84.3 (0.7)
84.5 (1.1)
Table 5: STA on HumAID in 5, 10, 20, 50, 100 examples per class. The results are reported as average (std.)
accuracy (in %) based on 10 random experimental runs. Numbers in bold indicate the highest in columns.
that the multiple templates used for STA provide
additional improvements to the downstream tasks,
especially in low-data settings.
Test
SST-2 EMOTION TREC HumAID
91.8
96.6
89.7
93.5
Table 6: Accuracy (in %) on test set predicted by BERT
that is trained on the whole training data for measuring
semantic fidelity.
To further analyse the quality of the generated
data, we measure the diversity of the data, indicated
by its lexical variation, and its ability to align the
text with the correct label (semantic fidelity). The
measurements for each are described as follows.
(a) SST-2
(b) EMOTION
(c) TREC
(d) HumAID
Figure 2: Diversity versus semantic fidelity of generated texts by various augmentation methods. The average
scores over 10 runs are reported.
5.3 Lexical Variation and Semantic Fidelity
Generated Data Diversity.
The metric we
used for evaluating diversity is UNIQUE TRI-
GRAMS (Feng et al., 2020; Kumar et al., 2020). It
is determined by calculating the unique tri-grams
divided by the total tri-grams in a population. As
we aim to examine the difference between the gen-
erated data and the original data, the population
consists of both the original and generated training
data. For this metric, a higher score indicates better
diversity.
Generated Data Fidelity. The semantic fidelity
is measured by evaluating how well the generated
data retains the semantic meaning of its label. As
per Kumar et al. (2020), we measure it by first
finetuning a "BERT-base-uncased " on the 100%
of original training data of each classification task.
The performance of the classifier on the test set
is reported in Table 6. After the finetuning, to
measure the generated data fidelity, we use the
finetuned classifier to predict the labels for the gen-
erated data and use the accuracy between its pre-
dicted labels and its associated labels as the metric
for fidelity. Hence, a higher score indicates better
fidelity.
To present the quality of generated data in di-
versity and fidelity, we take the training data (10
examples per class) along with its augmented data
(β = 1) for investigation. Figure 2 depicts the di-
versity versus semantic fidelity of generated data
by various augmentation methods across three
datasets. We find that generation-based approaches
such as GPT-2 or GPT-2-λ, achieve strong diversity
but less competitive fidelity. On the contrary, rule-
based heuristics methods such as EDA perform
well in retaining the semantic meaning but not in
lexical diversity. The merit of STA is that it is good
in both diversity and fidelity, as seen from its po-
sition at the top-right of Figure 2a, 2b, 2c and 2d.
Finally, if we compare our STA approach with and
without self-checking, we see that each approach
produces highly diverse examples, although only
self-checking STA retains a high level of semantic
fidelity. As previously suggested, this ability to
align the semantic content of generated examples
with the correct label is the most probable reason
for the increase in downstream classification per-
formance when self-checking is employed. This
supports the notion that our generation-based ap-
proach is able to produce novel data that is lexically
diverse, whilst the self-checking procedure can en-
sure consistent label retention, which guarantees a
high semantic fidelity in the generated examples7.
6 Conclusion
We propose a novel strategy for text-based data aug-
mentation that uses pattern-exploiting training to
generate training examples and ensure better label
alignment. Our approach substantially outperforms
the previous state-of-the-art on a variety of down-
stream classification tasks and across a range of
low-resource scenarios. Furthermore, we provide
an analysis of the lexical diversity and label con-
sistency of generated examples, demonstrating that
our approach produces uniquely varied training ex-
amples with more consistent label alignment than
previous work. In the future, we hope to improve
this approach in rich-data regime and extend it to
other downstream natural language tasks. TODO:
add for example, this, this and this (see ACL rolling
review feedback)
7 Limitations
Our work explores the possibility of data augmen-
tation for boosting text classification performance
when the downstream model is finetuned using pre-
trained language models. The results show that
STA consistently performs well across different
7See also Appendix E for the demonstration of augmented
examples.
0.20.30.40.50.60.70.80.91.0Fidelity0.50.60.70.80.91.0DiversitySTASTA-noselfGPT-2-GPT-2EDABTBT-HopsCBERTBART-Span0.20.30.40.50.60.70.80.91.0Fidelity0.50.60.70.80.91.0DiversitySTASTA-noselfGPT-2-GPT-2EDABTBT-HopsCBERTBART-Span0.20.30.40.50.60.70.80.91.0Fidelity0.50.60.70.80.91.0DiversitySTASTA-noselfGPT-2-GPT-2EDABTBT-HopsCBERTBART-Span0.20.30.40.50.60.70.80.91.0Fidelity0.50.60.70.80.91.0DiversitySTASTA-noselfGPT-2-GPT-2EDABTBT-HopsCBERTBART-Spanbench-marking tasks using the same experimen-
tal setup, which addresses the limitation stated in
the previous work (Kumar et al., 2020) calling for
a unified data augmentation technique. However,
similar to Kumar et al. (2020), although STA can
achieve improved performance as the data size goes
up to 100 examples per class in some cases (such
as 100 examples per class in EMOTION, Table 3
and HumAID, Table 5), the absolute gain in per-
formance plateaus when the training data becomes
richer (such as 100 examples per class in SST-2
and TREC). This suggests that it is challenging
for STA to improve pre-trained classifier's model
performance in more abundant data regimes.
Another important consideration is the choice
of templates used in STA. Ablation experiments in
Section 5.2 show that our chosen set of templates
yields better performance than a 'minimal subset'
consisting of the two simplest templates; the ques-
tion as to how to choose optimal templates for this
augmentation scheme remains unanswered. Hence,
in future work, we will explore better methods for
constructing the prompt templates, aiming to re-
duce the dependency on the manual work at this
step.
References
Firoj Alam, Umair Qazi, Muhammad Imran, and Ferda
Ofli. 2021. Humaid: Human-annotated disaster in-
cidents data from twitter with deep learning bench-
In Proceedings of the International AAAI
marks.
Conference on Web and Social Media, volume 15,
pages 933–942.
Ateret Anaby-Tavor, Boaz Carmeli, Esther Goldbraich,
Amir Kantor, George Kour, Segev Shlomov, Naama
Tepper, and Naama Zwerdling. 2020. Do not have
In Pro-
enough data? deep learning to the rescue!
ceedings of the AAAI Conference on Artificial Intel-
ligence, volume 34, pages 7383–7390.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and
Kristina Toutanova. 2019. Bert: Pre-training of deep
bidirectional transformers for language understand-
ing. In NAACL-HLT (1).
Sergey Edunov, Myle Ott, Michael Auli, and David
Grangier. 2018. Understanding back-translation at
scale. In EMNLP.
Steven Y Feng, Varun Gangal, Dongyeop Kang,
Teruko Mitamura, and Eduard Hovy. 2020. Genaug:
Data augmentation for finetuning text generators. In
Proceedings of Deep Learning Inside Out (DeeLIO):
The First Workshop on Knowledge Extraction and
Integration for Deep Learning Architectures, pages
29–42.
Tianyu Gao, Adam Fisch, and Danqi Chen. 2021.
Making pre-trained language models better few-shot
learners. In Association for Computational Linguis-
tics (ACL).
Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and
Yejin Choi. 2019. The curious case of neural text de-
In International Conference on Learn-
generation.
ing Representations.
Robin Jia and Percy Liang. 2016. Data recombination
for neural semantic parsing. In Proceedings of the
54th Annual Meeting of the Association for Compu-
tational Linguistics (Volume 1: Long Papers), pages
12–22.
Diederik P Kingma and Jimmy Ba. 2014. Adam: A
method for stochastic optimization. arXiv preprint
arXiv:1412.6980.
Sosuke Kobayashi. 2018. Contextual augmentation:
Data augmentation by words with paradigmatic re-
In Proceedings of the 2018 Conference of
lations.
the North American Chapter of the Association for
Computational Linguistics: Human Language Tech-
nologies, Volume 2 (Short Papers), pages 452–457.
Varun Kumar, Ashutosh Choudhary, and Eunah Cho.
2020. Data augmentation using pre-trained trans-
former models. In Proceedings of the 2nd Workshop
on Life-long Learning for Spoken Language Systems,
pages 18–26, Suzhou, China. Association for Com-
putational Linguistics.
Teven Le Scao and Alexander M Rush. 2021. How
many data points is a prompt worth? In Proceedings
of the 2021 Conference of the North American Chap-
ter of the Association for Computational Linguistics:
Human Language Technologies, pages 2627–2636.
Xin Li and Dan Roth. 2002. Learning question clas-
In COLING 2002: The 19th International
sifiers.
Conference on Computational Linguistics.
Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang,
Hiroaki Hayashi, and Graham Neubig. 2021. Pre-
train, prompt, and predict: A systematic survey of
prompting methods in natural language processing.
arXiv preprint arXiv:2107.13586.
George A Miller. 1995. Wordnet: a lexical database for
english. Communications of the ACM, 38(11):39–
41.
Alec Radford, Jeffrey Wu, Rewon Child, David Luan,
Dario Amodei, Ilya Sutskever, et al. 2019. Lan-
guage models are unsupervised multitask learners.
OpenAI blog, 1(8):9.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine
Lee, Sharan Narang, Michael Matena, Yanqi Zhou,
Wei Li, and Peter J Liu. 2020. Exploring the lim-
its of transfer learning with a unified text-to-text
transformer. Journal of Machine Learning Research,
21:1–67.
Elvis Saravia, Hsien-Chi Toby Liu, Yen-Hao Huang,
Junlin Wu, and Yi-Shin Chen. 2018. CARER: Con-
textualized affect representations for emotion recog-
In Proceedings of the 2018 Conference on
nition.
Empirical Methods in Natural Language Processing,
pages 3687–3697, Brussels, Belgium. Association
for Computational Linguistics.
Timo Schick and Hinrich Schütze. 2021a. Exploiting
cloze-questions for few-shot text classification and
In Proceedings of the
natural language inference.
16th Conference of the European Chapter of the As-
sociation for Computational Linguistics: Main Vol-
ume, pages 255–269.
Timo Schick and Hinrich Schütze. 2021b. Few-shot
text generation with natural language instructions.
In Proceedings of the 2021 Conference on Empiri-
cal Methods in Natural Language Processing, pages
390–402.
Rico Sennrich, Barry Haddow, and Alexandra Birch.
Improving neural machine translation mod-
2016.
In Proceedings of the
els with monolingual data.
54th Annual Meeting of the Association for Compu-
tational Linguistics (Volume 1: Long Papers), pages
86–96.
Sam Shleifer. 2019. Low resource text classification
arXiv preprint
with ulmfit and backtranslation.
arXiv:1903.09244.
Richard Socher, Alex Perelygin, Jean Wu, Jason
Chuang, Christopher D. Manning, Andrew Ng, and
Christopher Potts. 2013. Recursive deep models
for semantic compositionality over a sentiment tree-
In Proceedings of the 2013 Conference on
bank.
Empirical Methods in Natural Language Processing,
pages 1631–1642, Seattle, Washington, USA. Asso-
ciation for Computational Linguistics.
William Yang Wang and Diyi Yang. 2015. That's so an-
noying!!!: A lexical and frame-semantic embedding
based data augmentation approach to automatic cat-
egorization of annoying behaviors using# petpeeve
tweets. In Proceedings of the 2015 Conference on
Empirical Methods in Natural Language Processing,
pages 2557–2563.
Zirui Wang, Adams Wei Yu, Orhan Firat, and Yuan Cao.
2021. Towards zero-label language learning. arXiv
preprint arXiv:2109.09193.
Jason Wei and Kai Zou. 2019. Eda: Easy data augmen-
tation techniques for boosting performance on text
classification tasks. In Proceedings of the 2019 Con-
ference on Empirical Methods in Natural Language
Processing and the 9th International Joint Confer-
ence on Natural Language Processing (EMNLP-
IJCNLP), pages 6382–6388.
State-of-the-art natural language processing. arXiv
preprint arXiv:1910.03771.
Xing Wu, Shangwen Lv, Liangjun Zang, Jizhong Han,
and Songlin Hu. 2019. Conditional bert contextual
augmentation. In International Conference on Com-
putational Science, pages 84–95. Springer.
Ningyu Zhang, Luoqiu Li, Xiang Chen, Shumin Deng,
Zhen Bi, Chuanqi Tan, Fei Huang, and Huajun Chen.
2022. Differentiable prompt makes pre-trained lan-
In Interna-
guage models better few-shot learners.
tional Conference on Learning Representations.
Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015.
Character-level convolutional networks for text clas-
sification. Advances in neural information process-
ing systems, 28:649–657.
A Template Example
Table 7 presents how an original training example
is converted to multiple examples in STA using the
prompt templates from Table 1.
B Datasets
Table 8 lists the basic information of the four
datasets used in our experiments and they are
shortly described as follows.
• SST-2 (Socher et al., 2013) is a binary sen-
timent classification dataset that consists of
movie reviews annotated with positive and
negative labels.
• EMOTION (Saravia et al., 2018) is a dataset
for emotion classification comprising short
comments from social media annotated with
six emotion types, such as, sadness, joy, etc.
• TREC (Li and Roth, 2002) is a dataset for
question topic classification comprising ques-
tions across six categories including human,
location, etc.
• HumAID (Alam et al., 2021) is a dataset
for crisis messages categorisation comprising
tweets collected during 19 real-world disaster
events, annotated by humanitarian categories
including rescue volunteering or donation ef-
fort, sympathy and support, etc.
C Comparing to Few-shot Baselines
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien
Chaumond, Clement Delangue, Anthony Moi, Pier-
ric Cistac, Tim Rault, Rémi Louf, Morgan Fun-
towicz, et al. 2019. Huggingface's transformers:
Since our work explores a text augmentation ap-
proach for improving text classification in low-
data regime, it is also related to few-shot learning
An example from SST-2 a sentiment classification dataset where the classes (L): negative, positive
Text (x)
top-notch action powers this romantic drama.
Label (y)
positive
Converted examples by classification templates: source(s), target(t)
positive
Given sentiment: negative, positive. Classify: top-notch
action powers this romantic drama.
Text: top-notch action powers this romantic drama. Is this
text about positive sentiment?
Text: top-notch action powers this romantic drama. Is this
text about negative sentiment?
yes
no
Converted examples by generation templates: source(s), target(t)
Description: positive sentiment. Text:
Description: positive sentiment. Text: top-notch action
powers this romantic drama. Another text: spielberg 's
realization of
Description: positive sentiment. Text: top-notch action
powers this romantic drama. Another text: a movie in
Description: positive sentiment. Text: top-notch action
powers this romantic drama . Another text: a tightly di-
rected
top-notch action powers this romantic drama.
a near-future america is masterful .
which laughter and self-exploitation merge into jolly soft-
porn 'em powerment . '
highly professional film that 's old-fashioned in all the best
possible ways .
Table 7: The demonstration of an example conversion by the prompt templates in Table 1 where the example's text
is highlighted in blue and label is highlighted in red for readability.
Dataset
# Train
# Dev
# Test
# Classes (N )
SST-2
EMOTION TREC
SST-2
6,228
EMOTION 160,000
4,906
TREC
40,623
HumAID
692
2,000
546
5,913
1,821
2,000
500
11,508
2
6
6
8
DART
LM-BFF
PET
66.5 (5.8)
71.1 (9.5)
56.7 (0.8)
26.7 (3.0)
30.2 (3.8)
28.4 (1.0)
74.0 (2.7)
77.1 (3.0)
69.1 (1.1)
STA (ours)
81.4 (2.6)
57.8 (3.7)
70.9 (6.6)
Table 8: Datasets statistics
methods that use few examples for text classifica-
tion. We further conduct an experiment to com-
pare STA to three state-of-the-art few-shot learn-
ing approaches: PET (Schick and Schütze, 2021a),
LM-BFF (Gao et al., 2021), and DART (Zhang
et al., 2022). For fair comparison, we set the ex-
periment under the 10 examples per class scenario
with 10 random seeds ensuring the 10 examples per
class are sampled the same across the methods. Be-
sides, we use bert-base-uncased8 as the starting
weights of the downstream classifier. The results
are shown in Table 9. We found that although
STA loses the best score to DART and LM-BFF
on the TREC dataset, it substantially outperforms
the few-shot baselines on SST-2 and EMOTION.
This tells us that STA is a competitive approach for
few-shot learning text classification.
D Training Details
To select the downstream checkpoint and the aug-
mentation factor, we select the run with the best per-
formance on the development set for all methods.
8https://huggingface.co/bert-base-uncased
Table 9: The comparison between STA and few-shot
baselines using 10 examples per class on SST-2 and
EMOTION and TREC. The results are reported as av-
erage (std.) accuracy (in %) based on 10 random exper-
imental runs. Numbers in bold indicate the highest in
columns.
The hyper-parameters for finetuning the generation
model and the downstream model are also setup
based on the development set. Although using the
full development set does not necessarily represent
a real-life situation in low-data regime (Schick and
Schütze, 2021a; Gao et al., 2021), we argue that
it is valid in a research-oriented study. We choose
to use the full development set since we aim to
maximize the robustness of various methods' best
performance given small training data available. As
all augmentation methods are treated the same way,
we argue this is valid to showcase the performance
difference between our method and the baselines.
For all experiments presented in this work, we
exclusively use Pytorch9 for general code and
Huggingface10 for transformer implementations re-
9https://pytorch.org/
10https://huggingface.co/
spectively, unless otherwise stated. In finetuning
T5, we set the learning rate to 5 × 10−5 using
Adam (Kingma and Ba, 2014) with linear sched-
uler (10% warmup steps), the training epochs to
be 32 and batch size to be 16. At generation time,
we use top-k (k = 40) and top-p (p = 1.0) sam-
pling technique (Holtzman et al., 2019) for next
token generation. In finetuning downstream BERT,
the hyper-parameters are similar to those of T5
finetuning, although the training epoch is set to be
20. We set the training epochs to be as large as
possible with the aim of finding the best model
when trained on a small dataset, where the quality
is based on performance on the development set.
In our experiments, for a single run on all datasets,
it takes around one day with a single Tesla P100
GPU (16GB) and thus estimated 10 days for 10
runs. To aid reproducibility, we will release our
experimental code to the public at 11.
E Demonstration
Table 10 and Table 11 demonstrate some original
examples and augmented examples by different
methods. In comparison, the examples generated
by STA tend to be not only diverse but also highly
label relevant (semantic fidelity).
11https://github.com/wangcongcong123/STA
Original training examples and augmented examples for "Sadness" of EMOTION
Original
EDA
GPT-2-λ
i sit here feeling blank about this
i feel ashamed that i so readily turn it aside
i feel positively ashamed when i look out of the window and see the state of things
i had just lost my uncle i would be sad but i feel as if i am devastated
i was feeling kind of discouraged because nothing happened
i sit here opinion blank about this
i feel that ashamed i so readily turn it aside
i feel positively ashamed when i look out of the window and construe the state of things
i had just lost my uncle i would be pitiful but i feel as if i am devastated
i happened feeling kind of discouraged because nothing was
ive seen so many girls walk around feeling ashamed of their bodi
ive got to admit that i feel a little weird for a moment seeing her standing in front of my face when i walk into
the shop
ive always wondered what im doing right now im feeling
ive read many blogs about her and how much she hates those who don't admit to being kind or caring about
others but instead blame them for not doing something about it
ive never felt sympathetic towards people because of the way they look and act because of their skin to
STA-noself
i feel like the whole world is watching and feeling it's failing me
i want people to know i am not alone
i feel ashamed when i look out of the window and see the state of things
i walked away feeling disappointed because i don t know the answer
i drank some cold drink or find some ice dessert such as chendol or ice kacang
STA
i feel sad seeing people who have to work harder to cope
i walked away feeling disappointed because i don t know the answer
i was feeling sad seeing the state of things that i never did i really want to see if it lasted
i feel sad seeing the state of things but the truth is im not sure how to express it gracefully
i feel like the whole world is watching and feeling it's failing me
Table 10: The demonstration of original training examples and augmented examples for "sadness" of EMOTION.
It is noted that the 5 augmented examples in each block are randomly selected instead of cherry-picked. This
reveals some difference between the original training examples and the augmented examples by our STA and other
methods (Here we use a rule-based heuristics method EDA, a generation-based method GPT-2-λ and STA-noself
for comparison).
Original training examples and augmented examples for "missing or found people" of HumAID
Original
EDA
GPT-2-lambda
STA-noself
STA
UPDATE: Body found of man who disappeared amid Maryland flooding
Open Missing People Search Database from Mati and Rafina areas #Greecefires #PrayForGreece #PrayForA-
thens
@ThinBlueLine614 @GaetaSusan @DineshDSouza case in point, #California Liberalism has created the
hell which has left 1000s missing 70 dead,...
Heres the latest in the California wildfires #CampFire 1011 people are missing Death toll rises to 71 Trump
blames fires on poor ...
#Idai victims buried in mass grave in Sussundenga, at least 60 missing - #Mozambique #CycloneIdai
#CicloneIdai
update flooding found of man who disappeared amid maryland boy
open missing people search database from mati escape and rafina areas greecefires prayforgreece prayforathens
created gaetasusan dineshdsouza hell in point california missing has thinblueline the case which has left s
liberalism dead an countless people...
heres blames latest in the california wildfires campfire people are missing death toll rises to trump more fires
on poor...
idai victims buried in mass grave in sussundenga at mozambique missing least cycloneidai cicloneidai
@KezorNews - Search remains in #Morocco after @deweathersamp; there has been no confirmed death in
#Kerala
#Cambodia - Search & Rescue is assisting Search & Rescue officials in locating the missing 27 year old
woman who disappeared in ...
@JHodgeEagle Rescue Injured After Missing Two Children In Fresno County
#Florence #Florence Missing On-Rescue Teams Searching For Search and Rescue Members #Florence
#Florence #DisasterInformer #E
RT @LATTAODAYOUT: RT @HannahDorian: Search Continues After Disappearance of Missing People in
Florida
Search Database from Matias, Malaysia, missing after #Maria, #Kerala, #Bangladesh #KeralaKerala, #Ker-
alaFloods, ...
RT @hubarak: Yes, I can guarantee you that our country is safe from flooding during the upcoming weekend!
Previous story Time Out! 2 Comments
The missing persons who disappeared amid Maryland flooding are still at large. More on this in the next
article.
the number of missing after #CycloneIdai has reached more than 1,000, reports CNN.
RT @adriane@przkniewskiZeitecki 1 person missing, police confirm #CycloneIdai. #CicloneIdai
The missing persons who disappeared amid Maryland flooding are still at large. More on this in the next
article.
Search Triangle County for missing and missing after #Maria floods #DisasterFire
Just arrived at San Diego International Airport after #Atlantic Storm. More than 200 people were missing,
including 13 helicopters ...
Search Database contains information on missing and found people #HurricaneMaria, hashtag #Firefighter
Were told all too often that Californians are missing in Mexico City, where a massive flood was devastating.
...
Table 11: The demonstration of original training examples and augmented examples for "missing or found people"
of HumAID. It is noted that the 5 augmented examples in each block are randomly selected instead of cherry-
picked. This reveals some difference between the original training examples and the augmented examples by our
STA and other methods (Here we use a rule-based heuristics method EDA, a generation-based method GPT-2-λ
and STA-noself for comparison).
|
|
http://arxiv.org/abs/2302.12780v2 | 2023-03-04T02:55:25 | 2023-02-24T17:52:12 | VIPeR: Provably Efficient Algorithm for Offline RL with Neural Function
Approximation | We propose a novel algorithm for offline reinforcement learning called Value
Iteration with Perturbed Rewards (VIPeR), which amalgamates the pessimism
principle with random perturbations of the value function. Most current offline
RL algorithms explicitly construct statistical confidence regions to obtain
pessimism via lower confidence bounds (LCB), which cannot easily scale to
complex problems where a neural network is used to estimate the value
functions. Instead, VIPeR implicitly obtains pessimism by simply perturbing the
offline data multiple times with carefully-designed i.i.d. Gaussian noises to
learn an ensemble of estimated state-action {value functions} and acting
greedily with respect to the minimum of the ensemble. The estimated
state-action values are obtained by fitting a parametric model (e.g., neural
networks) to the perturbed datasets using gradient descent. As a result, VIPeR
only needs $\mathcal{O}(1)$ time complexity for action selection, while
LCB-based algorithms require at least $\Omega(K^2)$, where $K$ is the total
number of trajectories in the offline data. We also propose a novel
data-splitting technique that helps remove a factor involving the log of the
covering number in our bound. We prove that VIPeR yields a provable uncertainty
quantifier with overparameterized neural networks and enjoys a bound on
sub-optimality of $\tilde{\mathcal{O}}( { \kappa H^{5/2} \tilde{d}
}/{\sqrt{K}})$, where $\tilde{d}$ is the effective dimension, $H$ is the
horizon length and $\kappa$ measures the distributional shift. We corroborate
the statistical and computational efficiency of VIPeR with an empirical
evaluation on a wide set of synthetic and real-world datasets. To the best of
our knowledge, VIPeR is the first algorithm for offline RL that is provably
efficient for general Markov decision processes (MDPs) with neural network
function approximation. | [
"Thanh Nguyen-Tang",
"Raman Arora"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12780v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12780v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | 3
2
0
2
r
a
M
4
]
G
L
.
s
c
[
2
v
0
8
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Published as a conference paper at ICLR 2023
VIPER: PROVABLY EFFICIENT ALGORITHM FOR OF-
FLINE RL WITH NEURAL FUNCTION APPROXIMATION
Thanh Nguyen-Tang
Department of Computer Science
Johns Hopkins University
Baltimore, MD 21218, USA
[email protected]
Raman Arora
Department of Computer Science
Johns Hopkins University
Baltimore, MD 21218, USA
[email protected]
ABSTRACT
We propose a novel algorithm for offline reinforcement learning called Value Iter-
ation with Perturbed Rewards (VIPeR), which amalgamates the pessimism prin-
ciple with random perturbations of the value function. Most current offline RL
algorithms explicitly construct statistical confidence regions to obtain pessimism
via lower confidence bounds (LCB), which cannot easily scale to complex prob-
lems where a neural network is used to estimate the value functions.
Instead,
VIPeR implicitly obtains pessimism by simply perturbing the offline data multi-
ple times with carefully-designed i.i.d. Gaussian noises to learn an ensemble of
estimated state-action value functions and acting greedily with respect to the min-
imum of the ensemble. The estimated state-action values are obtained by fitting a
parametric model (e.g., neural networks) to the perturbed datasets using gradient
descent. As a result, VIPeR only needs O(1) time complexity for action selection,
while LCB-based algorithms require at least Ω(K 2), where K is the total number
of trajectories in the offline data. We also propose a novel data-splitting technique
that helps remove a factor involving the log of the covering number in our bound.
We prove that VIPeR yields a provable uncertainty quantifier with overparameter-
ized neural networks and enjoys a bound on sub-optimality of ̃O(κH 5/2 ̃d/
K),
where ̃d is the effective dimension, H is the horizon length and κ measures the
distributional shift. We corroborate the statistical and computational efficiency
of VIPeR with an empirical evaluation on a wide set of synthetic and real-world
datasets. To the best of our knowledge, VIPeR is the first algorithm for offline
RL that is provably efficient for general Markov decision processes (MDPs) with
neural network function approximation.
√
1
INTRODUCTION
Offline reinforcement learning (offline RL) (Lange et al., 2012; Levine et al., 2020) is a practical
paradigm of RL for domains where active exploration is not permissible. Instead, the learner can
access a fixed dataset of previous experiences available a priori. Offline RL finds applications in
several critical domains where exploration is prohibitively expensive or even implausible, including
healthcare (Gottesman et al., 2019; Nie et al., 2021), recommendation systems (Strehl et al., 2010;
Thomas et al., 2017), and econometrics (Kitagawa & Tetenov, 2018; Athey & Wager, 2021), among
others. The recent surge of interest in this area and renewed research efforts have yielded several
important empirical successes (Chen et al., 2021; Wang et al., 2023; 2022; Meng et al., 2021).
A key challenge in offline RL is to efficiently exploit the given offline dataset to learn an optimal
policy in the absence of any further exploration. The dominant approaches to offline RL address
this challenge by incorporating uncertainty from the offline dataset into decision-making (Buckman
et al., 2021; Jin et al., 2021; Xiao et al., 2021; Nguyen-Tang et al., 2022a; Ghasemipour et al., 2022;
An et al., 2021; Bai et al., 2022). The main component of these uncertainty-aware approaches to
offline RL is the pessimism principle, which constrains the learned policy to the offline data and leads
to various lower confidence bound (LCB)-based algorithms. However, these methods are not easily
extended or scaled to complex problems where neural function approximation is used to estimate
1
Published as a conference paper at ICLR 2023
the value functions. In particular, it is costly to explicitly compute the statistical confidence regions
of the model or value functions if the class of function approximator is given by overparameterized
neural networks. For example, constructing the LCB for neural offline contextual bandits (Nguyen-
Tang et al., 2022a) and RL (Xu & Liang, 2022) requires computing the inverse of a large covariance
matrix whose size scales with the number of parameters in the neural network. This computational
cost hinders the practical application of these provably efficient offline RL algorithms. Therefore, a
largely open question is how to design provably computationally efficient algorithms for offline RL
with neural network function approximation.
In this work, we present a solution based on a computational approach that combines the pessimism
principle with randomizing the value function (Osband et al., 2016; Ishfaq et al., 2021). The algo-
rithm is strikingly simple: we randomly perturb the offline rewards several times and act greedily
with respect to the minimum of the estimated state-action values. The intuition is that taking the min-
imum from an ensemble of randomized state-action values can efficiently achieve pessimism with
high probability while avoiding explicit computation of statistical confidence regions. We learn the
state-action value function by training a neural network using gradient descent (GD). Further, we
consider a novel data-splitting technique that helps remove the dependence on the potentially large
log covering number in the learning bound. We show that the proposed algorithm yields a provable
uncertainty quantifier with overparameterized neural network function approximation and achieves
a sub-optimality bound of ̃O(κH 5/2 ̃d/
K), where K is the total number of episodes in the offline
data, ̃d is the effective dimension, H is the horizon length, and κ measures the distributional shift.
We achieve computational efficiency since the proposed algorithm only needs O(1) time complexity
for action selection, while LCB-based algorithms require O(K 2) time complexity. We empirically
corroborate the statistical and computational efficiency of our proposed algorithm on a wide set of
synthetic and real-world datasets. The experimental results show that the proposed algorithm has
a strong advantage in computational efficiency while outperforming LCB-based neural algorithms.
To the best of our knowledge, ours is the first offline RL algorithm that is both provably and compu-
tationally efficient in general MDPs with neural network function approximation.
√
2 RELATED WORK
Randomized value functions for RL. For online RL, Osband et al. (2016; 2019) were the first
to explore randomization of estimates of the value function for exploration. Their approach was
inspired by posterior sampling for RL (Osband et al., 2013), which samples a value function from
a posterior distribution and acts greedily with respect to the sampled function. Concretely, Osband
et al. (2016; 2019) generate randomized value functions by injecting Gaussian noise into the training
data and fitting a model on the perturbed data. Jia et al. (2022) extended the idea of perturbing re-
wards to online contextual bandits with neural function approximation. Ishfaq et al. (2021) obtained
a provably efficient method for online RL with general function approximation using the perturbed
rewards. While randomizing the value function is an intuitive approach to obtaining optimism in
online RL, obtaining pessimism from the randomized value functions can be tricky in offline RL.
Indeed, Ghasemipour et al. (2022) point out a critical flaw in several popular existing methods for
offline RL that update an ensemble of randomized Q-networks toward a shared pessimistic temporal
difference target. In this paper, we propose a simple fix to obtain pessimism properly by updating
each randomized value function independently and taking the minimum over an ensemble of ran-
domized value functions to form a pessimistic value function.
Offline RL with function approximation. Provably efficient offline RL has been studied exten-
sively for linear function approximation. Jin et al. (2021) were the first to show that pessimistic
value iteration is provably efficient for offline linear MDPs. Xiong et al. (2023); Yin et al. (2022)
improved upon Jin et al. (2021) by leveraging variance reduction. Xie et al. (2021) proposed a
Bellman-consistency assumption with general function approximation, which improves the bound
d when realized to finite action space and linear MDPs. Wang
of Jin et al. (2021) by a factor of
et al. (2021); Zanette (2021) studied the statistical hardness of offline RL with linear function ap-
proximation via exponential lower bound, and Foster et al. (2021) suggested that only realizability
and strong uniform data coverage are not sufficient for sample-efficient offline RL. Beyond linearity,
some works study offline RL for general function approximation, both parametric and nonparamet-
ric. These approaches are either based on Fitted-Q Iteration (FQI) (Munos & Szepesv ́ari, 2008; Le
√
2
Published as a conference paper at ICLR 2023
et al., 2019; Chen & Jiang, 2019; Duan et al., 2021a;b; Hu et al., 2021; Nguyen-Tang et al., 2022b)
or the pessimism principle (Uehara & Sun, 2022; Nguyen-Tang et al., 2022a; Jin et al., 2021). While
pessimism-based algorithms avoid the strong assumptions of data coverage used by FQI-based algo-
rithms, they require an explicit computation of valid confidence regions and possibly the inverse of a
large covariance matrix which is computationally prohibitive and does not scale to complex function
approximation setting. This limits the applicability of pessimism-based, provably efficient offline
RL to practical settings. A very recent work Bai et al. (2022) estimates the uncertainty for construct-
ing LCB via the disagreement of bootstrapped Q-functions. However, the uncertainty quantifier is
only guaranteed in linear MDPs and must be computed explicitly.
We provide a more detailed discussion of our technical contribution in the context of existing litera-
ture in Section C.1.
3 PRELIMINARIES
In this section, we provide basic background on offline RL and overparameterized neural networks.
3.1 EPISODIC TIME-INHOMOGENOUS MARKOV DECISION PROCESSES (MDPS)
A finite-horizon Markov decision process (MDP) is denoted as the tuple M = (S, A, P, r, H, d1),
where S is an arbitrary state space, A an arbitrary action space, H the episode length, and d1 the
initial state distribution. We assume that SA := |S||A| is finite but arbitrarily large, e.g., it can
be as large as the total number of atoms in the observable universe ≈ 1082. Let P(S) denote
the set of probability measures over S. A time-inhomogeneous transition kernel P = {Ph}H
h=1,
where Ph : S × A → P(S) maps each state-action pair (sh, ah) to a probability distribution
Ph(*|sh, ah). Let r = {rh}H
h=1 where rh : S × A → [0, 1] is the mean reward function at step
h. A policy π = {πh}H
h=1 assigns each state sh ∈ S to a probability distribution, πh(*|sh), over
the action space and induces a random trajectory s1, a1, r1, . . . , sH , aH , rH , sH+1 where s1 ∼ d1,
h ∈ RS and the action-
ah ∼ πh(*|sh), sh+1 ∼ Ph(*|sh, ah). We define the state value function V π
h(s, a) = Eπ[(cid:80)H
state value function Qπ
t=h rt|sh = s, ah = a],
h(s, a)], where the expectation Eπ is taken with respect to the random-
and V π
ness of the trajectory induced by π. Let Ph denote the transition operator defined as (PhV )(s, a) :=
Es(cid:48)∼Ph(*|s,a)[V (s(cid:48))]. For any V : S → R, we define the Bellman operator at timestep h as
(BhV )(s, a) := rh(s, a) + (PhV )(s, a). The Bellman equations are given as follows. For any
(s, a, h) ∈ S × A × [H],
h ∈ RS×A at each timestep h as Qπ
h (s) = Ea∼π(*|s) [Qπ
Qπ
h(s, a) = (BhV π
h+1)(s, a), V π
h (s) = (cid:104)Qπ
h(s, *), πh(*|s)(cid:105)A, V π
H+1(s) = 0,
where [H] := {1, 2, . . . , H}, and (cid:104)*, *(cid:105)A denotes the summation over all a ∈ A. We define an
optimal policy π∗ as any policy that yields the optimal value function, i.e. V π∗
h (s)
for any (s, h) ∈ S × [H]. For simplicity, we denote V π∗
h and Q∗
h, respectively. The
h
Bellman optimality equation can be written as
h (s) = supπ V π
h as V ∗
and Qπ∗
Q∗
h(s, a) = (BhV ∗
h+1)(s, a), V ∗
h (s) = max
a∈A
Q∗
h(s, a), V ∗
H+1(s) = 0.
Define the occupancy density as dπ
visit state s and take action a at timestep h if we follow the policy π. We denote dπ∗
h(s, a) := P((sh, ah) = (s, a)|π) which is the probability that we
h by d∗
h.
h, st
h, at
h+1)}t∈[K]
the learner has access to a fixed dataset D =
Offline regime.
In the offline regime,
{(st
h, rt
h∈[H] generated a priori by some unknown behaviour policy μ = {μh}h∈[H].
Here, K is the total number of trajectories, and at
h ∼ μh(*|st
h) for any
(t, h) ∈ [K] × [H]. Note that we allow the trajectory at any time t ∈ [K] to depend on the tra-
jectories at previous times. The goal of offline RL is to learn a policy ˆπ, based on (historical data)
D, such that ˆπ achieves small sub-optimality, which we define as
h+1 ∼ Ph(*|st
h), st
h, at
SubOpt(ˆπ) := Es1∼d1 [SubOpt(ˆπ; s1)] , where SubOpt(ˆπ; s1) := V π∗
1 (s1) − V ˆπ
1 (s1).
3
Published as a conference paper at ICLR 2023
Algorithm 1 Value Iteration with Perturbed Rewards (VIPeR)
1: Input: Offline data D = {(sk
h)}k∈[K]
h, ak
h, rk
h∈[H], a parametric function family F = {f (*, *; W ) :
W ∈ W} ⊂ {X → R} (e.g. neural networks), perturbed variances {σh}h∈[H], number of
bootstraps M , regularization parameter λ, step size η, number of gradient descent steps J, and
cutoff margin ψ, split indices {Ih}h∈[H] where Ih := [(H − h)K (cid:48) + 1, . . . , (H − h + 1)K (cid:48)]
2: Initialize ̃VH+1(*) ← 0 and initialize f (*, *; W ) with initial parameter W0
3: for h = H, . . . , 1 do
4:
5:
for i = 1, . . . , M do
Sample {ξk,i
Perturb the dataset ̃Di
Let ̃W i
h }k∈Ih ∼ N (0, σ2
h ← {sk
h ← GradientDescent(λ, η, J, ̃Di
h) and ζ i
h, rk
h, ak
h = {ζ j,i
h + ̃Vh+1(sk
h, ζ i
h }j∈[d] ∼ N (0, σ2
h+1) + ξk,i
h }k∈Ih
h, W0) (Algorithm 2)
hId)
end for
Compute ̃Qh(*, *) ← min{mini∈[M ]f (*, *; ̃W i
(cid:104) ̃Qh, πh(cid:105) and ̃Vh ← (cid:104) ̃Qh, ̃πh(cid:105)
̃πh ← arg maxπh
10:
11: end for
12: Output: ̃π = { ̃πh}h∈[H].
h), (H − h + 1)(1 + ψ)}+
6:
7:
8:
9:
(cid:46) Perturbation
(cid:46) Optimization
(cid:46) Pessimism
(cid:46) Greedy
h) and x = (s, a). We write ̃O(*) to hide logarith-
Notation. For simplicity, we write xt
mic factors of the problem parameters (d, H, K, m, 1/δ) in the standard Big-Oh notation. We use
Ω(*) as the standard Omega notation. We write u (cid:46) v if u = O(v) and write u (cid:38) v if v (cid:46) u. We
write A (cid:22) B iff B − A is a positive definite matrix. Id denotes the d × d identity matrix.
h = (st
h, at
3.2 OVERPARAMETERIZED NEURAL NETWORKS
(cid:80)m
1 , . . . , wT
In this paper, we consider neural function approximation setting where the state-action value func-
tion is approximated by a two-layer neural network. For simplicity, we denote X := S ×A and view
it as a subset of Rd. Without loss of generality, we assume X ⊂ Sd−1 := {x ∈ Rd : (cid:107)x(cid:107)2 = 1}.
We consider a standard two-layer neural network: f (x; W, b) = 1√
i x), where m
m
is an even number, σ(*) = max{*, 0} is the ReLU activation function (Arora et al., 2018), and
m)T ∈ Rmd. During the training, we initialize (W, b) via the symmetric initial-
W = (wT
ization scheme (Gao et al., 2019) as follows: For any i ≤ m
2 +i ∼ N (0, Id/d), and
2 +i = −bi ∼ Unif({−1, 1}).1 During the training, we optimize over W while the bi are kept
b m
fixed, thus we write f (x; W, b) as f (x; W ). Denote g(x; W ) = ∇W f (x; W ) ∈ Rmd, and let W0 be
the initial parameters of W . We assume that the neural network is overparameterized, i.e, the width
m is sufficiently larger than the number of samples K. Overparameterization has been shown to
be effective in studying the convergence and the interpolation behaviour of neural networks (Arora
et al., 2019; Allen-Zhu et al., 2019; Hanin & Nica, 2020; Cao & Gu, 2019; Belkin, 2021). Under
such an overparameterization regime, the dynamics of the training of the neural network can be
captured using the framework of the neural tangent kernel (NTK) (Jacot et al., 2018).
2 , wi = w m
i=1 biσ(wT
4 ALGORITHM
In this section, we present the proposed algorithm called Value Iteration with Perturbed Rewards, or
VIPeR; see Algorithm 1 for the pseudocode. The key idea underlying VIPeR is to train a parametric
model (e.g., a neural network) on a perturbed-reward dataset several times and act pessimistically
by picking the minimum over an ensemble of estimated state-action value functions. In particular, at
each timestep h ∈ [H], we draw M independent samples of zero-mean Gaussian noise with variance
σh. We use these samples to perturb the sum of the observed rewards, rk
h, and the estimated value
function with a one-step lookahead, i.e., ̃Vh+1(sk
h+1) (see Line 6 of Algorithm 1). The weights ̃W i
h
are then updated by minimizing the perturbed regularized squared loss on { ̃Di
h}i∈[M ] using gradient
descent (Line 7). We pick the value function pessimistically by selecting the minimum over the
finite ensemble. The chosen value function is truncated at (H − h + 1)(1 + ψ) (see Line 9), where
1This symmetric initialization scheme makes f (x; W0) = 0 and (cid:104)g(x; W0), W0(cid:105) = 0 for any x.
4
Published as a conference paper at ICLR 2023
ψ ≥ 0 is a small cutoff margin (more on this when we discuss the theoretical analysis). The returned
policy is greedy with respect to the truncated pessimistic value function (see Line 10).
It is important to note that we split the trajec-
tory indices [K] evenly into H disjoint buckets
[K] = ∪h∈[H]Ih, where Ih = [(H − h)K (cid:48) +
1, . . . , (H − h + 1)K (cid:48)] for K (cid:48)
:= (cid:98)K/H(cid:99)2,
as illustrated in Figure 1. The estimated ̃Qh is
thus obtained only from the offline data with
(trajectory) indices from Ih along with ̃Vh+1.
This novel design removes the data dependence
structure in offline RL with function approxi-
mation (Nguyen-Tang et al., 2022b) and avoids
a factor involving the log of the covering num-
ber in the bound on the sub-optimality of Algo-
rithm 1, as we show in Section D.1.
To deal with the non-linearity of the underly-
ing MDP, we use a two-layer fully connected
neural network as the parametric function fam-
ily F in Algorithm 1.
1√
i=1 biσ(wT
m
h, ζ i
Algorithm 2 GradientDescent(λ, η, J, ̃Di
h, W0)
1: Input: Regularization parameter λ, step
size η, number of gradient descent steps
J, perturbed dataset ̃Di
h = {sk
h +
̃Vh+1(sk
h+1) + ξt,i
h }k∈Ih , regularization per-
turber ζ i
h, initial parameter W0
2: L(W ) := 1
h, ak
(f (sk
k∈Ih
2
̃Vh+1(sk
h ))2 + λ
2 (cid:107)W + ζ i
h +
h − W0(cid:107)2
2
h; W ) − (rk
h+1) + ξk,i
h, ak
h, rk
(cid:80)
Wj+1 ← Wj − η∇L(Wj)
3: for j = 0, . . . , J − 1 do
4:
5: end for
6: Output: WJ .
(cid:80)m
In other words, we approximate the state-action values: f (x; W ) =
i x), as described in Section 3.2. We use two-layer neural networks to simplify
the computational analysis. We utilize gradient descent to train the state-action value functions
{f (*, *; ̃W i
h)}i∈[M ], on perturbed rewards. The use of gradient descent is for the convenience of
computational analysis, and our results can be extended to stochastic gradient descent by leveraging
recent advances in the theory of deep learning (Allen-Zhu et al., 2019; Cao & Gu, 2019), albeit with
a more involved analysis.
Existing offline RL algorithms utilize estimates of statistical confidence regions to achieve pes-
simism in the offline setting. Explicitly constructing these confidence bounds is computationally
expensive in complex problems where a neural network is used for function approximation. For ex-
ample, the lower-confidence-bound-based algorithms in neural offline contextual bandits (Nguyen-
Tang et al., 2022a) and RL (Xu & Liang, 2022) require computing the inverse of a large covariance
matrix with the size scaling with the number of network parameters. This is computationally pro-
hibitive in most practical settings. Algorithm 1 (VIPeR) avoids such expensive computations while
still obtaining provable pessimism and guaranteeing a rate of ̃O( 1√
) on the sub-optimality, as we
K
show in the next section.
5 SUB-OPTIMALITY ANALYSIS
Next, we provide a theoretical guarantee on the sub-optimality of VIPeR
for the function approximation class, F, represented by (overparameter-
ized) neural networks. Our analysis builds on the recent advances in gen-
eralization and optimization of deep neural networks (Arora et al., 2019;
Allen-Zhu et al., 2019; Hanin & Nica, 2020; Cao & Gu, 2019; Belkin,
2021) that leverage the observation that the dynamics of the neural param-
eters learned by (stochastic) gradient descent can be captured by the cor-
responding neural tangent kernel (NTK) space (Jacot et al., 2018) when
the network is overparameterized.
Figure 1: Data splitting.
Next, we recall some definitions and state our key assumptions, formally.
Definition 1 (NTK (Jacot et al., 2018)). The NTK kernel Kntk : X × X → R is defined as
Kntk(x, x(cid:48)) = Ew∼N (0,Id/d)(cid:104)xσ(cid:48)(wT x), x(cid:48)σ(cid:48)(wT x(cid:48))(cid:105),
where σ(cid:48)(u) = 1{u ≥ 0}.
2Without loss of generality, we assume K/H ∈ N.
5
h=1h=2h=H...k=1 k=K'k=K.........Published as a conference paper at ICLR 2023
Let Hntk denote the reproducing kernel Hilbert space (RKHS) induced by the NTK, Kntk.
SinceKntk is a universal kernel (Ji et al., 2020), we have that Hntk is dense in the space of con-
tinuous functions on (a compact set) X = S × A (Rahimi & Recht, 2008).
Definition 2 (Effective dimension). For any h ∈ [H], the effective dimension of the NTK matrix on
data {xk
h}k∈Ih is defined as
̃dh :=
logdet(IK(cid:48) + Kh/λ)
log(1 + K (cid:48)/λ)
,
h, xj
̃dh.
h}k∈Ih. We further
h)]i,j∈Ih is the Gram matrix of Kntk on the data {xk
where Kh := [Kntk(xi
define ̃d := maxh∈[H]
Remark 1. Intuitively, the effective dimension ̃dh measures the number of principal dimensions
over which the projection of the data {xk
h}k∈Ih in the RKHS Hntk is spread. It was first introduced
by Valko et al. (2013) for kernelized contextual bandits and was subsequently adopted by Yang &
Wang (2020) and Zhou et al. (2020) for kernelized RL and neural contextual bandits, respectively.
The effective dimension is data-dependent and can be bounded by ̃d (cid:46) K (cid:48)(d+1)/(2d) in the worst
case (see Section B for more details).3
Definition 3 (RKHS of the infinite-width NTK). Define Q∗ := {f (x) = (cid:82)
supw
N (0, Id/d), and B is some positive constant.
Rd c(w)T xσ(cid:48)(wT x)dw :
p0(w) < B}, where c : Rd → Rd is any function, p0 is the probability density function of
(cid:107)c(w)(cid:107)2
We make the following assumption about the regularity of the underlying MDP under function
approximation.
Assumption 5.1 (Completeness). For any V : S → [0, H + 1] and any h ∈ [H], BhV ∈ Q∗.4
Assumption 5.1 ensures that the Bellman operator Bh can be captured by an infinite-width neural
network. This assumption is mild as Q∗ is a dense subset of Hntk (Gao et al., 2019, Lemma C.1)
when B = ∞, thus Q∗ is an expressive function class when B is sufficiently large. Moreover,
similar assumptions have been used in many prior works on provably efficient RL with function
approximation (Cai et al., 2019; Wang et al., 2020; Yang et al., 2020; Nguyen-Tang et al., 2022b).
Next, we present a bound on the suboptimality of the policy ̃π returned by Algorithm 1. Recall that
we use the initialization scheme described in Section 3.2. Fix any δ ∈ (0, 1).
2 B + (H + 1)(cid:2) ̃d log(1 + K (cid:48)/λ) + 2 + 2 log(3H/δ)(cid:3) 1
Theorem 1. Let σh = σ := 1 + λ 1
2 . Let
m = poly(K (cid:48), H, d, B, ̃d, λ, δ) be some high-order polynomial of the problem parameters, λ =
1 + H
1
1−Φ(−1) ,
where Φ(*) is the cumulative distribution function of the standard normal distribution. Then, under
Assumption 5.1, with probability at least 1 − M Hm−2 − 2δ, for any s1 ∈ S, we have that
(cid:112) ̃d + B)), ψ = 1, and M = log HSA
K , η (cid:46) (λ + K (cid:48))−1, J (cid:38) K (cid:48) log(K (cid:48)(H
δ / log
SubOpt( ̃π; s1) ≤ σ(1 + (cid:112)2 log(M SAH/δ)) * Eπ∗
(cid:34) H
(cid:88)
h=1
(cid:107)g(sh, ah; W0)(cid:107)Λ−1
h
(cid:35)
+ ̃O(
1
K (cid:48) )
k∈Ih
g(sk
h, ak
where Λh := λImd + (cid:80)
h, ak
Remark 2. Theorem 1 shows that the randomized design in our proposed algorithm yields a
provable uncertainty quantifier even though we do not explicitly maintain any confidence regions
in the algorithm. The implicit pessimism via perturbed rewards introduces an extra factor of
1 + (cid:112)2 log(M SAH/δ) into the confidence parameter β.
h; W0)T ∈ Rmd×md.
h; W0)g(sk
We build upon Theorem 1 to obtain an explicit bound using the following data coverage assumption.
Assumption 5.2 (Optimal-Policy Concentrability). ∃κ < ∞, sup(h,sh,ah)
d∗
h(sh,ah)
h(sh,ah) ≤ κ.
dμ
3Note that this is the worst-case bound, and the effective dimension can be significantly smaller in practice.
4We consider V : S → [0, H + 1] instead of V : S → [0, H] due to the cutoff margin ψ in Algorithm 1.
6
Published as a conference paper at ICLR 2023
work
Jin et al. (2021)
Yang et al. (2020)
̃O
(cid:18)
̃O
Xu & Liang (2022)
This work
d3/2
lin H 2
√
K
√
√
H 2
̃d2+ ̃d ̃n
K
(cid:16) ̃dH 2
√
K
̃O
(cid:17)
(cid:16) κH 5/2 ̃d√
(cid:17)
K
̃O
bound
(cid:18)
i.i.d?
explorative data?
finite spectrum? matrix inverse?
opt
(cid:19)
(cid:19)
no
no
yes
no
yes
–
yes
no
yes
no
yes
no
yes
yes
yes
no
analytical
oracle
oracle
GD
Table 1: State-of-the-art results for offline RL with function approximation. The third and the fourth
columns ask if the corresponding result needs the data to be i.i.d, and well-explored, respectively;
the fifth column asks if the induced RKHS needs to have a finite spectrum; the sixth column asks if
the algorithm needs to invert a covariance matrix and the last column presents the optimizer being
used. Here ̃n is the log of the covering number.
Assumption 5.2 requires any positive-probability trajectory induced by the optimal policy to be
covered by the behavior policy. This data coverage assumption is significantly milder than the uni-
form coverage assumptions in many FQI-based offline RL algorithms (Munos & Szepesv ́ari, 2008;
Chen & Jiang, 2019; Nguyen-Tang et al., 2022b) and is common in pessimism-based algorithms
(Rashidinejad et al., 2021; Nguyen-Tang et al., 2022a; Chen & Jiang, 2022; Zhan et al., 2022).
Theorem 2. For the same parameter settings and the same assumption as in Theorem 1, we have
that with probability at least 1 − M Hm−2 − 5δ,
(cid:115)
SubOpt( ̃π) ≤
2 ̃d log(1 + K (cid:48)/λ) + 1 +
2 ̃σκH
√
K (cid:48)
(cid:113)
log H
δ
λ
+
16H
3K (cid:48) log
log2(K (cid:48)H)
δ
+ ̃O(
1
K (cid:48) ),
where ̃σ := σ(1 + (cid:112)2 log(SAH/δ)).
Remark 3. Theorem 2 shows that with appropriate parameter choice, VIPeR achieves a sub-
optimality of ̃O
. Compared to Yang et al. (2020), we improve by a factor
κH 3/2
√
√
(cid:18)
(cid:19)
̃d}
√
̃d*max{B,H
K
2
dγ−1 for some γ ∈ (0, 1) at the expense of
of K
̃d = dlin and our bound reduces into ̃O
of PEVI (Jin et al., 2021, Corollary 4.6) by a factor of
comparison in Table 1 and give a more detailed discussion in Subsection B.1.
H. When realized to a linear MDP in Rdlin,
(cid:17)
K)
which improves the bound ̃O(d3/2
√
dlin. We provide the result summary and
lin H 2/
√
K
√
(cid:16) κH 5/2dlin
√
6 EXPERIMENTS
In this section, we empirically evaluate the proposed algorithm VIPeR against several state-of-the-art
baselines, including (a) PEVI (Jin et al., 2021), which explicitly constructs lower confidence bound
(LCB) for pessimism in a linear model (thus, we rename this algorithm as LinLCB for convenience
in our experiments); (b) NeuraLCB (Nguyen-Tang et al., 2022a) which explicitly constructs an
LCB using neural network gradients; (c) NeuraLCB (Diag), which is NeuraLCB with a diagonal
approximation for estimating the confidence set as suggested in NeuraLCB (Nguyen-Tang et al.,
2022a); (d) Lin-VIPeR which is VIPeR realized to the linear function approximation instead of
neural network function approximation; (e) NeuralGreedy (LinGreedy, respectively) which uses
neural networks (linear models, respectively) to fit the offline data and act greedily with respect to
the estimated state-action value functions without any pessimism. Note that when the parametric
class, F, in Algorithm 1 is that of neural networks, we refer to VIPeR as Neural-VIPeR. We do not
utilize data splitting in the experiments. We provide further algorithmic details of the baselines in
Section H.
We evaluate all algorithms in two problem settings: (1) the underlying MDP is a linear MDP whose
reward functions and transition kernels are linear in some known feature map (Jin et al., 2020), and
(2) the underlying MDP is non-linear with horizon length H = 1 (i.e., non-linear contextual ban-
dits) (Zhou et al., 2020), where the reward function is either synthetic or constructed from MNIST
7
Published as a conference paper at ICLR 2023
Figure 2: Empirical results of sub-optimality (in log scale) on linear MDPs.
dataset (LeCun et al., 1998). We also evaluate (a variant of) our algorithm and show its strong per-
formance advantage in the D4RL benchmark (Fu et al., 2020) in Section A.3. We implemented all
algorithms in Pytorch (Paszke et al., 2019) on a server with Intel(R) Xeon(R) Gold 6248 CPU @
2.50GHz, 755G RAM, and one NVIDIA Tesla V100 Volta GPU Accelerator 32GB Graphics Card.5
6.1 LINEAR MDPS
We first test the effectiveness of pessimism implicit in VIPeR (Algorithm 1). To that end, we
construct a hard instance of linear MDPs (Yin et al., 2022; Min et al., 2021); due to page lim-
itation, we defer the details of our construction to Section A.1. We test for different values of
H ∈ {20, 30, 50, 80} and report the sub-optimality of LinLCB, Lin-VIPeR, and LinGreedy, av-
eraged over 30 runs, in Figure 2. We find that LinGreedy, which is uncertainty-agnostic, fails
to learn from offline data and has poor performance in terms of sub-optimality when compared
to pessimism-based algorithms LinLCB and Lin-VIPeR. Further, LinLCB outperforms Lin-VIPeR
when K is smaller than 400, but the performance of the two algorithms matches for larger sample
sizes. Unlike LinLCB, Lin-VIPeR does not construct any confidence regions or require computing
and inverting large (covariance) matrices. The Y-axis is in log scale; thus, Lin-VIPeR already has
small sub-optimality in the first K ≈ 400 samples. These show the effectiveness of the randomized
design for pessimism implicit in Algorithm 1.
6.2 NEURAL CONTEXTUAL BANDITS
(a)
(b)
Figure 3: Sub-optimality (on log-scale) vs. sample size (K) for neural contextual bandits with fol-
lowing reward functions: (a) r(s, a) = cos(3sT θa), (b) r(s, a) = exp(−10(sT θa)2), and (c) MNIST.
(c)
Next, we compare the performance and computational efficiency of various algorithms against
VIPeR when neural networks are employed. For simplicity, we consider contextual bandits, a spe-
cial case of MDPs with horizon H = 1. Following Zhou et al. (2020); Nguyen-Tang et al. (2022a),
we use the bandit problems specified by the following reward functions: (a) r(s, a) = cos(3sT θa);
(b) r(s, a) = exp(−10(sT θa)2), where s and θa are generated uniformly at random from the unit
sphere Sd−1 with d = 16 and A = 10; (c) MNIST, where r(s, a) = 1 if a is the true label
of the input image s and r(s, a) = 0, otherwise. To predict the value of different actions from
the same state s using neural networks, we transform a state s ∈ Rd into dA-dimensional vec-
tors s(1) = (s, 0, . . . , 0), s(2) = (0, s, 0, . . . , 0), . . . , s(A) = (0, . . . , 0, s) and train the network to
map s(a) to r(s, a) given a pair of data (s, a). For Neural-VIPeR, NeuralGreedy, NeuraLCB, and
NeuraLCB (Diag), we use the same neural network architecture with two hidden layers of width
m = 64 and train the network with Adam optimizer (Kingma & Ba, 2015). Due to page limita-
tions, we defer other experimental details and hyperparameter setting to Section A.2. We report the
5Our code is available here: https://github.com/thanhnguyentang/neural-offline-rl.
8
Published as a conference paper at ICLR 2023
sub-optimality averaged over 5 runs in Figure 3. We see that algorithms that use a linear model, i.e.,
LinLCB and Lin-VIPeR significantly underperform neural-based algorithms, i.e., NeuralGreedy,
NeuraLCB, NeuraLCB (Diag) and Neural-VIPeR, attesting to the crucial role neural representations
play in RL for non-linear problems. It is also interesting to observe from the experimental results
that NeuraLCB does not always outperform its diagonal approximation, NeuraLCB (Diag) (e.g., in
Figure 3(b)), putting a question mark on the empirical effectiveness of NTK-based uncertainty for
offline RL. Finally, Neural-VIPeR outperforms all algorithms in the tested benchmarks, suggesting
the effectiveness of our randomized design with neural function approximation.
(a)
(b)
Figure 4: Elapsed time (in seconds) for action selection in the contextual bandits problem with
r(s, a) = 10(sT θa)2: (a) Runtime of action selection versus the number of (offline) data points K,
and (b) runtime of action selection versus the network width m (for K = 500).
Figure 4 shows the average runtime for action selection of
neural-based algorithms NeuraLCB, NeuraLCB (Diag), and
Neural-VIPeR. We observe that algorithms that use explicit
confidence regions, i.e., NeuraLCB and NeuraLCB (Diag),
take significant time selecting an action when either the num-
ber of offline samples K or the network width m increases.
This is perhaps not surprising because NeuraLCB and Neu-
raLCB (Diag) need to compute the inverse of a large covari-
ance matrix to sample an action and maintain the confidence
region for each action per state. The diagonal approximation
significantly reduces the runtime of NeuraLCB, but the run-
time still scales with the number of samples and the network
width. In comparison, the runtime for action selection for
Neural-VIPeR is constant. Since NeuraLCB, NeuraLCB (Diag), and Neural-VIPeR use the same
neural network architecture, the runtime spent training one model is similar. The only difference is
that Neural-VIPeR trains M models while NeuraLCB and NeuraLCB (Diag) train a single model.
However, as the perturbed data in Algorithm 1 are independent, training M models in Neural-VIPeR
is embarrassingly parallelizable.
Figure 5: Sub-optimality of Neural-
VIPeR versus different values of M .
Finally, in Figure 5, we study the effect of the ensemble size on the performance of Neural-VIPeR.
We use different values of M ∈ {1, 2, 5, 10, 20, 30, 50, 100, 200} for sample size K = 1000. We
find that the sub-optimality of Neural-VIPeR decreases graciously as M increases.
Indeed, the
grid search from the previous experiment in Figure 3 also yields M = 10 and M = 20 from the
search space M ∈ {1, 10, 20} as the best result. This suggests that the ensemble size can also
play an important role as a hyperparameter that can determine the amount of pessimism needed in a
practical setting.
7 CONCLUSION
We propose a novel algorithmic approach for offline RL that involves randomly perturbing value
functions and pessimism. Our algorithm eliminates the computational overhead of explicitly main-
taining a valid confidence region and computing the inverse of a large covariance matrix for pes-
K(cid:1). We support
simism. We bound the suboptimality of the proposed algorithm as ̃O(cid:0)κH 5/2 ̃d/
our theoretical claims of computational efficiency and the effectiveness of our algorithm with exten-
sive experiments.
√
9
Published as a conference paper at ICLR 2023
ACKNOWLEDGEMENTS
This research was supported, in part, by DARPA GARD award HR00112020004, NSF CAREER
award IIS-1943251, an award from the Institute of Assured Autonomy, and Spring 2022 workshop
on "Learning and Games" at the Simons Institute for the Theory of Computing.
REFERENCES
Yasin Abbasi-yadkori, D ́avid P ́al, and Csaba Szepesv ́ari. Improved algorithms for linear stochas-
tic bandits.
In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. Pereira, and K.Q. Weinberger (eds.),
Advances in Neural Information Processing Systems, volume 24. Curran Associates, Inc., 2011.
Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via over-
parameterization. In International Conference on Machine Learning, pp. 242–252. PMLR, 2019.
Gaon An, Seungyong Moon, Jang-Hyun Kim, and Hyun Oh Song. Uncertainty-based offline re-
inforcement learning with diversified q-ensemble. Advances in neural information processing
systems, 34:7436–7447, 2021.
Raman Arora, Amitabh Basu, Poorya Mianjy, and Anirbit Mukherjee. Understanding deep neural
networks with rectified linear units. In International Conference on Learning Representations,
2018.
Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, Russ R Salakhutdinov, and Ruosong Wang. On
exact computation with an infinitely wide neural net. Advances in neural information processing
systems, 32, 2019.
Susan Athey and Stefan Wager. Policy learning with observational data. Econometrica, 89(1):
133–161, 2021.
Chenjia Bai, Lingxiao Wang, Zhuoran Yang, Zhi-Hong Deng, Animesh Garg, Peng Liu, and Zhao-
ran Wang. Pessimistic bootstrapping for uncertainty-driven offline reinforcement learning.
In
International Conference on Learning Representations, 2022.
Peter L Bartlett, Olivier Bousquet, and Shahar Mendelson. Local rademacher complexities. The
Annals of Statistics, 33(4):1497–1537, 2005.
Mikhail Belkin. Fit without fear: remarkable mathematical phenomena of deep learning through the
prism of interpolation. Acta Numerica, 30:203–248, 2021.
Alberto Bietti and Julien Mairal. On the inductive bias of neural tangent kernels. Advances in Neural
Information Processing Systems, 32, 2019.
Jacob Buckman, Carles Gelada, and Marc G Bellemare. The importance of pessimism in fixed-
dataset policy optimization. In International Conference on Learning Representations, 2021.
Qi Cai, Zhuoran Yang, Jason D Lee, and Zhaoran Wang. Neural temporal-difference learning con-
verges to global optima. Advances in Neural Information Processing Systems, 32, 2019.
Yuan Cao and Quanquan Gu. Generalization bounds of stochastic gradient descent for wide and
deep neural networks. Advances in Neural Information Processing Systems, 32:10836–10846,
2019.
Jinglin Chen and Nan Jiang. Information-theoretic considerations in batch reinforcement learning.
In International Conference on Machine Learning, pp. 1042–1051. PMLR, 2019.
Jinglin Chen and Nan Jiang. Offline reinforcement learning under value and density-ratio realizabil-
ity: the power of gaps. In Uncertainty in Artificial Intelligence, pp. 378–388. PMLR, 2022.
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. Advances in neural information processing systems, 34:15084–15097, 2021.
10
Published as a conference paper at ICLR 2023
Sayak Ray Chowdhury and Aditya Gopalan. On kernelized multi-armed bandits. In International
Conference on Machine Learning, pp. 844–853. PMLR, 2017.
Yaqi Duan, Chi Jin, and Zhiyuan Li. Risk bounds and rademacher complexity in batch reinforcement
learning. In International Conference on Machine Learning, pp. 2892–2902. PMLR, 2021a.
Yaqi Duan, Mengdi Wang, and Martin J Wainwright. Optimal policy evaluation using kernel-based
temporal difference methods. arXiv preprint arXiv:2109.12002, 2021b.
Dylan J Foster, Akshay Krishnamurthy, David Simchi-Levi, and Yunzong Xu. Offline rein-
forcement learning: Fundamental barriers for value function approximation. arXiv preprint
arXiv:2111.10919, 2021.
Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4RL: datasets for deep
data-driven reinforcement learning. CoRR, abs/2004.07219, 2020.
Scott Fujimoto and Shixiang Gu. A minimalist approach to offline reinforcement learning.
In
A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), Advances in Neural In-
formation Processing Systems, 2021.
Ruiqi Gao, Tianle Cai, Haochuan Li, Cho-Jui Hsieh, Liwei Wang, and Jason D Lee. Convergence
of adversarial training in overparametrized neural networks. Advances in Neural Information
Processing Systems, 32, 2019.
Seyed Kamyar Seyed Ghasemipour, Shixiang Shane Gu, and Ofir Nachum. Why so pessimistic?
estimating uncertainties for offline RL through ensembles, and why their independence matters.
arXiv preprint arXiv:2205.13703, 2022.
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.
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, pp. 1861–1870. PMLR, 2018.
Boris Hanin and Mihai Nica. Finite depth and width corrections to the neural tangent kernel. In
International Conference on Learning Representations, 2020.
Yichun Hu, Nathan Kallus, and Masatoshi Uehara. Fast rates for the regret of offline reinforce-
ment learning. In Mikhail Belkin and Samory Kpotufe (eds.), Conference on Learning Theory,
COLT 2021, 15-19 August 2021, Boulder, Colorado, USA, volume 134 of Proceedings of Machine
Learning Research, pp. 2462. PMLR, 2021.
Haque Ishfaq, Qiwen Cui, Viet Nguyen, Alex Ayoub, Zhuoran Yang, Zhaoran Wang, Doina Precup,
and Lin Yang. Randomized exploration in reinforcement learning with general value function
approximation. In International Conference on Machine Learning, pp. 4607–4616. PMLR, 2021.
Arthur Jacot, Franck Gabriel, and Cl ́ement Hongler. Neural tangent kernel: Convergence and gen-
eralization in neural networks. Advances in neural information processing systems, 31, 2018.
Ziwei Ji, Matus Telgarsky, and Ruicheng Xian. Neural tangent kernels, transportation mappings,
and universal approximation. In International Conference on Learning Representations, 2020.
Yiling Jia, Weitong ZHANG, Dongruo Zhou, Quanquan Gu, and Hongning Wang. Learning neural
contextual bandits through perturbed rewards. In International Conference on Learning Repre-
sentations, 2022.
Chi Jin, Zhuoran Yang, Zhaoran Wang, and Michael I Jordan. Provably efficient reinforcement
learning with linear function approximation. In Conference on Learning Theory, pp. 2137–2143.
PMLR, 2020.
Ying Jin, Zhuoran Yang, and Zhaoran Wang. Is pessimism provably efficient for offline RL? In
International Conference on Machine Learning, pp. 5084–5096. PMLR, 2021.
11
Published as a conference paper at ICLR 2023
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio
and Yann LeCun (eds.), 3rd International Conference on Learning Representations, ICLR 2015,
San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
Toru Kitagawa and Aleksey Tetenov. Who should be treated? empirical welfare maximization
methods for treatment choice. Econometrica, 86(2):591–616, 2018.
Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-
learning via bootstrapping error reduction. Advances in Neural Information Processing Systems,
32, 2019.
Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline
reinforcement learning. Advances in Neural Information Processing Systems, 33:1179–1191,
2020.
Sascha Lange, Thomas Gabel, and Martin Riedmiller. Batch reinforcement learning. In Reinforce-
ment learning, pp. 45–73. Springer, 2012.
Hoang Minh Le, Cameron Voloshin, and Yisong Yue. Batch policy learning under constraints. In
ICML, volume 97 of Proceedings of Machine Learning Research, pp. 3703–3712. PMLR, 2019.
Yann LeCun, L ́eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to
document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tuto-
rial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
Linghui Meng, Muning Wen, Yaodong Yang, Chenyang Le, Xiyun Li, Weinan Zhang, Ying Wen,
Haifeng Zhang, Jun Wang, and Bo Xu. Offline pre-trained multi-agent decision transformer: One
big sequence model conquers all starcraftii tasks. arXiv preprint arXiv:2112.02845, 2021.
Yifei Min, Tianhao Wang, Dongruo Zhou, and Quanquan Gu. Variance-aware off-policy evaluation
with linear function approximation. Advances in neural information processing systems, 34, 2021.
R ́emi Munos and Csaba Szepesv ́ari. Finite-time bounds for fitted value iteration. J. Mach. Learn.
Res., 9:815–857, 2008.
Thanh Nguyen-Tang, Sunil Gupta, A. Tuan Nguyen, and Svetha Venkatesh. Offline neural con-
In International Conference on
textual bandits: Pessimism, optimization and generalization.
Learning Representations, 2022a.
Thanh Nguyen-Tang, Sunil Gupta, Hung Tran-The, and Svetha Venkatesh. On sample complexity
of offline reinforcement learning with deep reLU networks in besov spaces. Transactions on
Machine Learning Research, 2022b. ISSN 2835-8856.
Thanh Nguyen-Tang, Ming Yin, Sunil Gupta, Svetha Venkatesh, and Raman Arora. On instance-
dependent bounds for offline reinforcement learning with linear function approximation. In Pro-
ceedings of the Thirty Seventh AAAI Conference on Artificial Intelligence, 2023.
Xinkun Nie, Emma Brunskill, and Stefan Wager. Learning when-to-treat policies. Journal of the
American Statistical Association, 116(533):392–409, 2021.
Ian Osband, Daniel Russo, and Benjamin Van Roy.
(More) efficient reinforcement learning via
posterior sampling. Advances in Neural Information Processing Systems, 26, 2013.
Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized
value functions. In International Conference on Machine Learning, pp. 2377–2386. PMLR, 2016.
Ian Osband, Benjamin Van Roy, Daniel J Russo, Zheng Wen, et al. Deep exploration via randomized
value functions. J. Mach. Learn. Res., 20(124):1–62, 2019.
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor
Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-
performance deep learning library. Advances in neural information processing systems, 32, 2019.
12
Published as a conference paper at ICLR 2023
Ali Rahimi and Benjamin Recht. Uniform approximation of functions with random bases. In 2008
46th Annual Allerton Conference on Communication, Control, and Computing, pp. 555–561,
2008.
Paria Rashidinejad, Banghua Zhu, Cong Ma, Jiantao Jiao, and Stuart Russell. Bridging offline rein-
forcement learning and imitation learning: A tale of pessimism. Advances in Neural Information
Processing Systems, 34, 2021.
Niranjan Srinivas, Andreas Krause, Sham Kakade, and Matthias Seeger. Gaussian process optimiza-
tion in the bandit setting: No regret and experimental design. In Proceedings of the 27th Interna-
tional Conference on International Conference on Machine Learning, ICML'10, pp. 1015–1022,
Madison, WI, USA, 2010. Omnipress. ISBN 9781605589077.
Ingo Steinwart and Andreas Christmann. Support vector machines. Springer Science & Business
Media, 2008.
Alex Strehl, John Langford, Lihong Li, and Sham M Kakade. Learning from logged implicit explo-
ration data. Advances in neural information processing systems, 23, 2010.
Philip S. Thomas, Georgios Theocharous, Mohammad Ghavamzadeh, Ishan Durugkar, and Emma
Brunskill. Predictive off-policy policy evaluation for nonstationary decision problems, with ap-
plications to digital marketing. In Proceedings of the Thirty-First AAAI Conference on Artificial
Intelligence, AAAI'17, pp. 4740–4745. AAAI Press, 2017.
Joel Tropp. Freedman's inequality for matrix martingales. Electronic Communications in Probabil-
ity, 16:262–270, 2011.
Masatoshi Uehara and Wen Sun. Pessimistic model-based offline reinforcement learning under
partial coverage. In International Conference on Learning Representations, 2022.
Michal Valko, Nathan Korda, R ́emi Munos, Ilias Flaounas, and Nello Cristianini. Finite-time anal-
In Proceedings of the Twenty-Ninth Conference on Un-
ysis of kernelised contextual bandits.
certainty in Artificial Intelligence, UAI'13, pp. 654–663, Arlington, Virginia, USA, 2013. AUAI
Press.
Kerong Wang, Hanye Zhao, Xufang Luo, Kan Ren, Weinan Zhang, and Dongsheng Li. Bootstrapped
transformer for offline reinforcement learning. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave,
and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022.
Ruosong Wang, Russ R Salakhutdinov, and Lin Yang. Reinforcement learning with general value
function approximation: Provably efficient approach via bounded eluder dimension. Advances in
Neural Information Processing Systems, 33:6123–6135, 2020.
Ruosong Wang, Dean Foster, and Sham M. Kakade. What are the statistical limits of offline RL
with linear function approximation? In International Conference on Learning Representations,
2021.
Zhendong Wang, Jonathan J Hunt, and Mingyuan Zhou. Diffusion policies as an expressive policy
class for offline reinforcement learning. In The Eleventh International Conference on Learning
Representations, 2023.
Yue Wu, Shuangfei Zhai, Nitish Srivastava, Joshua M. Susskind, Jian Zhang, Ruslan Salakhutdinov,
and Hanlin Goh. Uncertainty weighted actor-critic for offline reinforcement learning. In ICML,
volume 139 of Proceedings of Machine Learning Research, pp. 11319–11328. PMLR, 2021.
Chenjun Xiao, Yifan Wu, Jincheng Mei, Bo Dai, Tor Lattimore, Lihong Li, Csaba Szepesvari, and
Dale Schuurmans. On the optimality of batch policy optimization algorithms. In International
Conference on Machine Learning, pp. 11362–11371. PMLR, 2021.
Tengyang Xie, Ching-An Cheng, Nan Jiang, Paul Mineiro, and Alekh Agarwal. Bellman-consistent
pessimism for offline reinforcement learning. Advances in neural information processing systems,
34, 2021.
13
Published as a conference paper at ICLR 2023
Wei Xiong, Han Zhong, Chengshuai Shi, Cong Shen, Liwei Wang, and Tong Zhang. Nearly min-
imax optimal offline reinforcement learning with linear function approximation: Single-agent
MDP and markov game. In International Conference on Learning Representations, 2023.
Tengyu Xu and Yingbin Liang. Provably efficient offline reinforcement learning with trajectory-wise
reward. arXiv preprint arXiv:2206.06426, 2022.
Lin Yang and Mengdi Wang. Sample-optimal parametric q-learning using linearly additive features.
In International Conference on Machine Learning, pp. 6995–7004. PMLR, 2019.
Lin Yang and Mengdi Wang. Reinforcement learning in feature space: Matrix bandit, kernels, and
regret bound. In International Conference on Machine Learning, pp. 10746–10756. PMLR, 2020.
Zhuoran Yang, Chi Jin, Zhaoran Wang, Mengdi Wang, and Michael I. Jordan. On function approx-
imation in reinforcement learning: Optimism in the face of large state spaces. In Proceedings
of the 34th International Conference on Neural Information Processing Systems, NIPS'20, Red
Hook, NY, USA, 2020. Curran Associates Inc. ISBN 9781713829546.
Ming Yin, Yaqi Duan, Mengdi Wang, and Yu-Xiang Wang. Near-optimal offline reinforcement
learning with linear representation: Leveraging variance information with pessimism. Interna-
tional Conference on Learning Representations, 2022.
Ming Yin, Mengdi Wang, and Yu-Xiang Wang. Offline reinforcement learning with differentiable
function approximation is provably efficient. In International Conference on Learning Represen-
tations, 2023.
Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon, James Y Zou, Sergey Levine, Chelsea
Finn, and Tengyu Ma. MOPO: Model-based offline policy optimization. Advances in Neural
Information Processing Systems, 33:14129–14142, 2020.
Andrea Zanette. Exponential lower bounds for batch reinforcement learning: Batch RL can be
In International Conference on Machine Learning, pp.
exponentially harder than online RL.
12287–12297. PMLR, 2021.
Wenhao Zhan, Baihe Huang, Audrey Huang, Nan Jiang, and Jason D. Lee. Offline reinforcement
learning with realizability and single-policy concentrability. In Po-Ling Loh and Maxim Raginsky
(eds.), Conference on Learning Theory, 2-5 July 2022, London, UK, volume 178 of Proceedings
of Machine Learning Research, pp. 2730–2775. PMLR, 2022.
Dongruo Zhou, Lihong Li, and Quanquan Gu. Neural contextual bandits with UCB-based explo-
ration. In International Conference on Machine Learning, pp. 11492–11502. PMLR, 2020.
14
Published as a conference paper at ICLR 2023
A EXPERIMENT DETAILS
A.1 LINEAR MDPS
In this subsection, we provide further details to the experiment setup used in Subsection 6.1. We
describe in detail a variant of the hard instance of linear MDPs (Yin et al., 2022) used in our experi-
ment. The linear MDP has S = {0, 1}, A = {0, 1, * * * , 99}, and the feature dimension d = 10. Each
action a ∈ [99] = {1, . . . , 99} is represented by its binary encoding vector ua ∈ R8 with entry being
a , δ(s, a), 1 − δ(s, a)]T ∈ R10,
either −1 or 1. The feature mapping φ(s, a) is given by φ(s, a) = [uT
where δ(s, a) = 1 if (s, a) = (0, 0) and δ(s, a) = 0 otherwise. The true measure νh(s) is given
by νh(s) = [0, * * * , 0, (1 − s) ⊕ αh, s ⊕ αh] where {αh}h∈[H] ∈ {0, 1}H are generated uni-
formly at random and ⊕ is the XOR operator. We define θh = [0, * * * , 0, r, 1 − r]T ∈ R10 where
r = 0.99. Recall that the transition follows Ph(s(cid:48)|s, a) = (cid:104)φ(s, a), νh(s(cid:48))(cid:105) and the mean reward
rh(s, a) = (cid:104)φ(s, a), θh(cid:105). We generated a priori K ∈ {1, . . . , 1000} trajectories using the behav-
ior policy μ, where for any h ∈ [H] we set μh(0|0) = p, μh(1|0) = 1 − p, μh(a|0) = 0, ∀a >
1; μh(0|1) = p, μh(a|1) = (1 − p)/99, ∀a > 0, where we set p = 0.6.
We run over K ∈ {1, . . . , 1000} and H ∈ {20, 30, 50, 80}. We set λ = 0.01 for all algorithms.
For Lin-VIPeR, we grid searched σh = σ ∈ {0.0, 0.1, 0.5, 1.0, 2.0} and M ∈ {1, 2, 10, 20}. For
LinLCB, we grid searched its uncertainty multiplier β ∈ {0.1, 0.5, 1, 2}. The sub-optimality metric
is used to compare algorithms. For each H ∈ {20, 30, 50, 80}, each algorithm was executed for 30
times and the averaged results (with std) are reported in Figure 2.
A.2 NEURAL CONTEXTUAL BANDITS
In this subsection, we provide in detail the experimental and hyperparameter setup in our exper-
iment in Subsection 6.2. For Neural-VIPeR, NeuralGreedy, NeuraLCB and NeuraLCB (Diag),
we use the same neural network architecture with two hidden layers whose width m = 64, train
the network with Adam optimizer (Kingma & Ba, 2015) with learning rate being grid-searched
over {0.0001, 0.001, 0.01} and batch size of 64. For NeuraLCB, NeuraLCB (Diag), and LinLCB,
we grid-searched β over {0.001, 0.01, 0.1, 1, 5, 10}. For Neural-VIPeR and Lin-VIPeR, we grid-
searched σh = σ over {0.001, 0.01, 0.1, 1, 5, 10} and M over {1, 10, 20}. We did not run NeuraLCB
in MNIST as the inverse of a full covariance matrix in this case is extremely expensive. We fixed the
regularization parameter λ = 0.01 for all algorithms. Offline data is generated by the (1−(cid:15))-optimal
policy which generates non-optimal actions with probability (cid:15) and optimal actions with probability
1 − (cid:15). We set (cid:15) = 0.5 in our experiments. To estimate the expected sub-optimality, we randomly
obtain 1, 000 novel samples (i.e. not used in training) to compute the average sub-optimality and
keep these same samples for all algorithms.
A.3 EXPERIMENT IN D4RL BENCHMARK
In this subsection, we evaluate the effectiveness of the reward perturbing design of VIPeR in the
Gym domain in the D4RL benchmark (Fu et al., 2020). The Gym domain has three environ-
ments (HalfCheetah, Hopper, and Walker2d) with five datasets (random, medium, medium-replay,
medium-expert, and expert), making up 15 different settings.
Design. To adapt the design of VIPeR to continuous control, we use the actor-critic framework.
Specifically, we have M critics {Qθi }i∈[M ] and one actor πφ, where {θi}i∈[M ] and φ are the learn-
able parameters for the critics and actor, respectively. Note that in the continuous domain, we
consider discounted MDP with discount factor γ, instead of finite-time episode MDP as we initially
considered in our setting in the main paper. In the presence of the actor πφ, there are two modifica-
tions to Algorithm 1. The first modification is that when training the critics {Qi
θ}i∈[M ], we augment
the training loss in Algorithm 2 with a new penalization term. Specifically, the critic loss for Qθi on
a training sample τ := (s, a, r, s(cid:48)) (sampled from the offline data D) is
L(θi; τ ) = (Qθi(s, a) − (r + γQ ̄θi(s(cid:48)) + ξ))2 + β Ea(cid:48)∼πφ(*|s)
(cid:2)(Qθi(s, a(cid:48)) − ̄Q(s, a(cid:48)))2(cid:3)
,
(cid:125)
(cid:123)(cid:122)
penalization term R(θi;s,φ)
(1)
(cid:124)
15
Published as a conference paper at ICLR 2023
(cid:80)M
where ̄θi has the same value of the current θi but is kept fixed, ̄Q = 1
i=1 Qθi and ξ ∼ N (0, σ2)
M
is Gaussian noise, and β is a penalization parameter (note that β here is totally different from the
β in Theorem 1). The penalization term R(θi; s, φ) discourages overestimation in the value func-
tion estimate Qθi for out-of-distribution (OOD) actions a(cid:48) ∼ πφ(*|s). Our design of R(θi; s, φ)
is initially inspired by the OOD penalization in Bai et al. (2022) that creates a pessimistic pseudo
target for the values at OOD actions. Note that we do not need any penalization for OOD actions
in our experiment for contextual bandits in Section 6.2. This is because in the contextual bandit
setting in Section 6.2 the action space is finite and not large, thus the offline data often sufficiently
cover all good actions. In the continuous domain such as the Gym domain of D4RL, however, it is
almost certain that there are actions that are not covered by the offline data since the action space
is continuous. We also note that the inclusion of the OOD action penalization term R(θi; s, φ) in
this experiment does not contradict our guarantee in Theorem 1 since in the theorem we consider
finite action space while in this experiment we consider continuous action space. We argue that the
inclusion of some regularization for OOD actions (e.g., R(θi; s, φ)) is necessary for the continuous
domain. 6
The second modification to Algorithm 1 for the continuous domain is the actor training, which is
the implementation of policy extraction in line 10 of Algorithm 1. Specifically, to train the actor πφ
given the ensemble of critics {Qi
θ}i∈[M ], we use soft actor update in Haarnoja et al. (2018) via
(cid:26)
max
φ
Es∼D,a(cid:48)∼πφ(*|s)
(cid:20)
min
i∈[M ]
Qθi(s, a(cid:48)) − log πφ(a(cid:48)|s)
(cid:21)(cid:27)
,
(2)
which is trained using gradient ascent in practice. Note that in the discrete action domain, we do not
need such actor training as we can efficiently extract the greedy policy with respect to the estimated
action-value functions when the action space is finite. Also note that we do not use data splitting
and value truncation as in the original design of Algorithm 1.
Hyperparameters. For the hyper-parameters of our training, we set M = 10 and the noise vari-
ance σ = 0.01. For β, we decrease it from 0.5 to 0.2 by linear decay for the first 50K steps and
exponential decay for the remaining steps. For the other hyperparameters of actor-critic training, we
fix them the same as in Bai et al. (2022). Specifically, the Q-network is the fully connected neural
network with three hidden layers all of which has 256 neurons. The learning rate for the actor and
the critic are 10−4 and 3 × 10−4, respectively. The optimizer is Adam.
Results. We compare VIPeR with several state-of-the-art algorithms, including (i) BEAR (Kumar
et al., 2019) that use MMD distance to constraint policy to the offline data, (ii) UWAC (Wu et al.,
2021) that improves BEAR using dropout uncertainty, (iii) CQL (Kumar et al., 2020) that mini-
mizes Q-values of OOD actions, (iv) MOPO (Yu et al., 2020) that uses model-based uncertainty via
ensemble dynamics, (v) TD3-BC (Fujimoto & Gu, 2021) that uses adaptive behavior cloning, and
(vi) PBRL (Bai et al., 2022) that use uncertainty quantification via disagreement of bootstrapped
Q-functions. We follow the evaluation protocol in Bai et al. (2022). We run our algorithm for five
seeds and report the average final evaluation scores with standard deviation. We report the scores
of our method and the baselines in Table 2. We can see that our method has a strong advantage of
good performance (highest scores) in 11 out of 15 settings, and has good stability (small std) in all
settings. Overall, we also have the strongest average scores aggregated over all settings.
B EXTENDED DISCUSSION
Here we provide extended discussion of our result.
B.1 COMPARISON WITH OTHER WORKS AND DISCUSSION
We provide further discussion regarding comparison with other works in the literature.
6In our experiment, we also observe that without this penalization term, the method struggles to learn any
good policy. However, using only the penalization term without the first term in Eq. (1), we observe that the
method cannot learn either.
16
Published as a conference paper at ICLR 2023
m
o
d
n
a
R
m
u
i
d
e
M
m
u
i
d
e
M
m
u
i
d
e
M
t
r
e
p
x
E
HalfCheetah
Hopper
Walker2d
HalfCheetah
Hopper
Walker2d
y HalfCheetah
Hopper
Walker2d
a
l
p
e
R
r
e
p
x
E
t HalfCheetah
Hopper
Walker2d
HalfCheetah
Hopper
Walker2d
Average
BEAR
2.3 ±0.0
3.9 ±2.3
12.8 ±10.2
43.0 ±0.2
51.8 ±4.0
-0.2 ±0.1
36.3 ±3.1
52.2 ±19.3
7.0 ±7.8
46.0 ±4.7
50.6 ±25.3
22.1 ±44.9
92.7 ±0.6
54.6 ±21.0
106.6 ±6.8
38.78 ±10.0
UWAC
2.3 ±0.0
2.7 ±0.3
2.0 ±0.4
42.2 ±0.4
50.9 ±4.4
75.4 ±3.0
35.9 ±3.7
25.3 ±1.7
23.6 ±6.9
42.7 ±0.3
44.9 ±8.1
96.5 ±9.1
92.9 ±0.6
110.5 ±0.5
108.4 ±0.4
50.41 ±2.7
CQL
17.5 ±1.5
7.9 ±0.4
5.1 ±1.3
47.0 ±0.5
53.0 ±28.5
73.3 ±17.7
45.5 ±0.7
88.7 ±12.9
81.8 ±2.7
75.6 ±25.7
105.6 ±12.9
107.9 ±1.6
96.3 ±1.3
96.5 ±28.0
108.5 ±0.5
67.35 ±9.1
MOPO
35.9 ±2.9
16.7 ±12.2
4.2 ±5.7
73.1 ±2.4
38.3 ±34.9
41.2 ±30.8
69.2 ±1.1
32.7 ±9.4
73.7 ±9.4
70.3 ±21.9
60.6 ±32.5
77.4 ±27.9
81.3 ±21.8
62.5 ±29.0
62.4 ±3.2
53.3 ±16.3
TD3-BC
11.0 ±1.1
8.5 ±0.6
1.6 ±1.7
48.3 ±0.3
59.3 ±4.2
83.7 ±2.1
44.6 ±0.5
60.9 ±18.8
81.8 ±5.5
90.7 ±4.3
98.0 ±9.4
110.1 ±0.5
96.7 ±1.1
107.8 ±7
110.2 ±0.3
67.55 ±3.8
PBRL
11.0 ±5.8
26.8 ±9.3
8.1 ±4.4
57.9 ±1.5
75.3 ±31.2
89.6 ±0.7
45.1 ±8.0
100.6 ±1.0
77.7 ±14.5
92.3 ±1.1
110.8 ±0.8
110.1 ±0.3
92.4 ±1.7
110.5 ±0.4
108.3 ±0.3
74.37 ±5.3
VIPeR
14.5 ±2.1
31.4 ±0.0
20.5 ±0.5
58.5 ±1.1
99.4 ±6.2
89.6 ±1.2
45.0 ±8.6
100.2 ±1.0
83.1 ±4.2
94.2 ±1.2
110.6 ±1.0
109.8 ±0.5
97.4 ±0.9
110.8 ±0.4
108.3 ±0.2
78.2 ±1.9
Table 2: Average normalized score and standard deviation of all algorithms over five seeds in the
Gym domain in the "v2" dataset of D4RL (Fu et al., 2020). The scores for all the baselines are from
Table 1 of Bai et al. (2022). The highest scores are highlighted.
K
(cid:17)
√
(cid:16) κH 5/2dlin
√
which improves the bound ̃O(d3/2
Comparing to Jin et al. (2021). When the underlying MDP reduces into a linear MDP, if we
use the linear model as the plug-in parametric model in Algorithm 1, our bound reduces into
̃O
lin H 2/
K) of PEVI (Jin et al., 2021, Corollary 4.6)
√
H due to the data splitting. Thus, our bound is more
by a factor of
favorable in the linear MDPs with high-dimensional features. Moreover, our bound is guaranteed
in more practical scenarios where the offline data can have been adaptively generated and is not
required to uniformly cover the state-action space. The explicit bound ̃O(d3/2
K) of PEVI
(Jin et al., 2021, Corollary 4.6) is obtained under the assumption that the offline data have uniform
coverage and are generated independently on the episode basis.
dlin and worsen by a factor of
lin H 2/
√
√
Comparing to Yang et al. (2020). Though Yang et al. (2020) work in the online regime, it shares
some part of the literature with our work in function approximation for RL. Besides different learn-
ing regimes (offline versus online), we offer three key distinctions which can potentially be used
in the online regime as well: (i) perturbed rewards, (ii) optimization, and (iii) data split. Regard-
ing (i), our perturbed reward design can be applied to online RL with function approximation to
obtain a provably efficient online RL that is computationally efficient and thus remove the need of
maintaining explicit confidence regions and performing the inverse of a large covariance matrix.
Regarding (ii), we incorporate the optimization analysis into our algorithm which makes our algo-
rithm and analysis more practical. We also note that unlike (Yang et al., 2020), we do not make
any assumption on the eigenvalue decay rate of the empirical NTK kernel as the empirical NTK
kernel is data-dependent. Regarding (iii), our data split technique completely removes the factor
(cid:112)log N∞(H, 1/K, B) in the bound at the expense of increasing the bound by a factor of
H. In
complex models, such log covering number can be excessively larger than the horizon H, making
the algorithm too optimistic in the online regime (optimistic in the offline regime, respectively). For
example, the target function class is RKHS with a γ-polynomial decay, the log covering number
scales as (Yang et al., 2020, Lemma D1),
√
(cid:112)log N∞(H, 1/K, B) (cid:46) K
2
αγ−1 ,
for some α ∈ (0, 1). In the case of two-layer ReLU NTK, γ = d (Bietti & Mairal, 2019), thus
(cid:112)log N∞(H, 1/K, B) (cid:46) K
H when the size of dataset is large.
Note that our data-splitting technique is general that can be used in the online regime as well.
αd−1 which is much larger than
√
2
Comparing to Xu & Liang (2022). Xu & Liang (2022) consider a different setting where per-
timestep rewards are not available and only the total reward of the whole trajectory is given. Used
17
Published as a conference paper at ICLR 2023
√
√
with neural function approximation, they obtain ̃O(DeffH 2/
K) where Deff is their effective di-
mension. Note that Xu & Liang (2022) do not use data splitting and still achieve the same order of
Deff as our result with data splitting. It at first might appear that our bound is inferior to their bound
H due to data splitting. However, to obtain that bound, they make three crit-
as we pay the cost of
ical assumptions: (i) the offline data trajectories are independently and identically distributed (i.i.d.)
(see their Assumption 3), (ii) the offline data is uniformly explorative over all dimensions of the fea-
ture space (also see their Assumption 3), and (iii) the eigenfunctions of the induced NTK RKHS has
finite spectrum (see their Assumption 4). The i.i.d. assumption under the RKHS space with finite
dimensions (due to the finite spectrum assumption) and the well-explored dataset is critical in their
Deff as it would normally
proof to use a matrix concentration that does not incur an extra factor of
do without these assumptions (see Section E, the proof of their Lemma 2). Note that the celebrated
ReLU NTK does not satisfy the finite spectrum assumption (Bietti & Mairal, 2019). Moreover, we
do not make any of these three assumptions above for our bound to hold. That suggests that our
bound is much more general. In addition, we do not need to compute any confidence regions nor
perform the inverse of a large covariance matrix.
√
Comparing to Yin et al. (2023). During the submission of our work, a concurrent work of Yin
et al. (2023) appeared online. Yin et al. (2023) study provably efficient offline RL with a general
parametric function approximation that unifies the guarantees of offline RL in linear and generalized
linear MDPs, and beyond with potential applications to other classes of functions in practice. We
remark that the result in Yin et al. (2023) is orthogonal/complementary to our paper since they
consider the parametric class with third-time differentiability which cannot apply to neural networks
(not necessarily overparameterized) with non-smooth activation such as ReLU. In addition, they do
not consider reward perturbing in their algorithmic design or optimization errors in their analysis.
B.2 WORSE-CASE RATE OF EFFECTIVE DIMENSION
(cid:16) κH 5/2 ̃d√
(cid:17)
K
In the main paper, we prove an ̃O
sub-optimality bound which depends on the notion of
effective dimension defined in Definition 2. Here we give a worst-case rate of the effective dimension
̃d for the two-layer ReLU NTK. We first briefly review the background of RKHS.
Let H be an RKHS defined on X ⊆ Rd with kernel function ρ : X ×X → R. Let (cid:104)*, *(cid:105)H : H ×H →
R and (cid:107) * (cid:107)H : H → R be the inner product and the RKSH norm on H. By the reproducing
kernel property of H, there exists a feature mapping φ : X → H such that f (x) = (cid:104)f, φ(x)(cid:105)H
and ρ(x, x(cid:48)) = (cid:104)φ(x), φ(x(cid:48))(cid:105)H. We assume that the kernel function ρ is uniformly bounded, i.e.
supx∈X ρ(x, x) < ∞. Let L2(X ) be the space of square-integral functions on X with respect to the
Lebesgue measure and let (cid:104)*, *(cid:105)L2 be the inner product on L2(X ). The kernel function ρ induces an
integral operator Tρ : L2(X ) → L2(X ) defined as
Tρf (x) =
(cid:90)
X
ρ(x, x(cid:48))f (x(cid:48))dx(cid:48).
By Mercer's theorem (Steinwart & Christmann, 2008), Tρ has countable and positive eigenvalues
{λi}i≥1 and eigenfunctions {νi}i≥1. The kernel function and H can be expressed as
ρ(x, x(cid:48)) =
∞
(cid:88)
i=1
λiνi(x)νi(x(cid:48)),
H = {f ∈ L2(X ) :
∞
(cid:88)
i=1
(cid:104)f, νi(cid:105)L2
λi
< ∞}.
Now consider the NTK defined in Definition 1:
Kntk(x, x(cid:48)) = Ew∼N (0,Id/d)(cid:104)xσ(cid:48)(wT x), x(cid:48)σ(cid:48)(wT x(cid:48))(cid:105).
It follows from (Bietti & Mairal, 2019, Proposition 1) that λi (cid:16) i−d. Thus, by (Srinivas et al., 2010,
Theorem 5), the data-dependent effective dimension of Hntk can be bounded in the worst case by
̃d (cid:46) K (cid:48)(d+1)/(2d).
18
Published as a conference paper at ICLR 2023
We remark that this is the worst-case bound that considers uniformly over all possible realizable of
training data. The effective dimension ̃d is on the other hand data-dependent, i.e. its value depends
on the specific training data at hand thus ̃d can be actually much smaller than the worst-case rate.
C PROOF OF THEOREM 1 AND THEOREM 2
In this section, we provide both the outline and detailed proofs of Theorem 1 and Theorem 2.
C.1 TECHNICAL REVIEW AND PROOF OVERVIEW
Technical Review.
In what follows, we provide more detailed discussion when placing our tech-
nical contribution in the context of the related literature. Our technical result starts with the value
difference lemma in Jin et al. (2021) to connect bounding the suboptimality of an offline algorithm
to controlling the uncertainty quantification in the value estimates. Thus, our key technical contri-
bution is to provably quantify the uncertainty of the perturbed value function estimates which were
obtained via reward perturbing and gradient descent. This problem setting is largely different from
the current analysis of overparameterized neural networks for supervised learning which does not
require uncertainty quantification.
Our work is not the first to consider uncertainty quantification with overparameterized neural net-
works, since it has been studied in Zhou et al. (2020); Nguyen-Tang et al. (2022a); Jia et al. (2022).
However, there are significant technical differences between our work and these works. The work in
Zhou et al. (2020); Nguyen-Tang et al. (2022a) considers contextual bandits with overparameterized
neural networks trained by (S)GD and quantifies the uncertainty of the value function with explicit
empirical covariance matrices. We consider general MDP and use reward perturbing to implicitly
obtain uncertainty, thus requiring different proof techniques.
Jia et al. (2022) is more related to our work since they consider reward perturbing with overparam-
eterized neural networks (but they consider contextual bandits). However, our reward perturbing
strategy is largely different from that in Jia et al. (2022). Specifically, Jia et al. (2022) perturbs each
reward only once while we perturb each reward multiple times, where the number of perturbing
times is crucial in our work and needs to be controlled carefully. We show in Theorem 1 that our re-
ward perturbing strategy is effective in enforcing sufficient pessimism for offline learning in general
MDP and the empirical results in Figure 2, Figure 3, Figure 5, and Table 2 are strongly consistent
with our theoretical suggestion. Thus, our technical proofs are largely different from those of Jia
et al. (2022).
Finally, the idea of perturbing rewards multiple times in our algorithm is inspired by Ishfaq et al.
(2021). However, Ishfaq et al. (2021) consider reward perturbing for obtaining optimism in online
RL. While perturbing rewards are intuitive to obtain optimism for online RL, for offline RL, under
distributional shift, it can be paradoxically difficult to properly obtain pessimism with randomization
and ensemble (Ghasemipour et al., 2022), especially with neural function approximation. We show
affirmatively in our work that simply taking the minimum of the randomized value functions after
perturbing rewards multiple times is sufficient to obtain provable pessimism for offline RL. In addi-
tion, Ishfaq et al. (2021) do not consider neural network function approximation and optimization.
Controlling the uncertainty of randomization (via reward perturbing) under neural networks with ex-
tra optimization errors induced by gradient descent sets our technical proof significantly apart from
that of Ishfaq et al. (2021).
Besides all these differences, in this work, we propose an intricately-designed data splitting tech-
nique that avoids the uniform convergence argument and could be of independent interest for study-
ing sample-efficient RL with complex function approximation.
Proof Overview. The key steps for proving Theorem 1 and Theorem 2 are highlighted in Subsec-
tion C.2 and Subsection C.3, respectively. Here, we discuss an overview of our proof strategy. The
key technical challenge in our proof is to quantify the uncertainty of the perturbed value function
estimates. To deal with this, we carefully control both the near-linearity of neural networks in the
NTK regime and the estimation error induced by reward perturbing. A key result that we use to con-
trol the linear approximation to the value function estimates is Lemma D.3. The technical challenge
19
Published as a conference paper at ICLR 2023
Parameters
Meaning/Expression
m
λ
η
M
{σh}h∈[H]
J
ψ
K
R
δ
K (cid:48)
Ih
B
γh,1
γh,2
B1
̃B1
̃B2
ι0
ι1
ι2
ι
β
Network width
Regularization parameter
Learning rate
Number of bootstraps
Noise variances
Number of GD steps
Cutoff margin
Number of offline episodes
Radius parameter
Failure level
bucket size, K/H
index buckets, [(H − h)K (cid:48) + 1, (H − h)K (cid:48) + 2, . . . , (H − h + 1)K (cid:48)]
Parameter radius of the Bellman operator
c1σh
(cid:112)log(KM/δ)
(cid:113)
λ−1
2K(H + ψ)2 + 8CgR4/3m−1/6
log m
c2σh
(cid:112)d log(dKM/δ)
√
√
λ−1(cid:113)
2K (cid:48)(H + ψ + γh,1)2 + λγ2
KCgR1/3m−1/6√
√
√
log m
log m
K (cid:48)CgR1/3m−1/6√
log m
h,2 + 8CgR4/3m−1/6
λ−1K (cid:48)CgR4/3m−1/6√
√
log m
d + (cid:112)2 log(3H/δ))
Bm−1/2(2
(cid:16) ̃B1 + ̃B2 + λ−1(1 − ηλ)J (cid:16)
CgR4/3m−1/6√
log m + Cg
CgR4/3m−1/6√
K (cid:48)(H + ψ + γh,1)2 + λγ2
h,2
(cid:17)(cid:17)
log m + Cg
(cid:16)
B1 + ̃B2 + λ−1(1 − ηλ)J K (cid:48)(H + ψ)2(cid:17)
ι0 + ι1 + 2ι2
√
BK(cid:48)
√
m (2
d + (cid:112)2 log(3H/ δ))λ−1/2Cg + λ1/2B
(cid:20)(cid:113)
+(H + ψ)
̃dh log(1 + K(cid:48)
λ ) + K (cid:48) log λ + 2 log(3H/δ)
(cid:21)
Table 3: The problem parameters and the additional parameters that we introduce for our proofs.
Here c1, c2, and Cg are some absolute constants independent of the problem parameters.
20
Published as a conference paper at ICLR 2023
in establishing Lemma D.3 is how to carefully control and propagate the optimization error incurred
by gradient descent. The complete proof of Lemma D.3 is provided in Section E.3.
The implicit uncertainty quantifier induced by the reward perturbing is established in Lemma D.1
and Lemma D.2, where we carefully design a series of intricate auxiliary loss functions and establish
the anti-concentrability of the perturbed value function estimates. This requires a careful design of
the variance of the noises injected into the rewards.
To deal with removing a potentially large covering number when we quantify the implicit uncer-
tainty, we propose our data splitting technique which is validated in the proof of Lemma D.1 in
Section E.1. Moreover, establishing Lemma D.1 in the overparameterization regime induces an ad-
ditional challenge since a standard analysis would result in a vacuous bound that scales with the
overparameterization. We avoid this issue by carefully incorporating the use of the effective dimen-
sion in Lemma D.1.
C.2 PROOF OF THEOREM 1
In this subsection, we present the proof of Theorem 1. We first decompose the suboptimality
SubOpt( ̃π; s) and present the main lemmas to bound the evaluation error and the summation of the
implicit confidence terms, respectively. The detailed proof of these lemmas are deferred to Section
D. For proof convenience, we first provide the key parameters that we use consistently throughout
our proofs in Table 3.
We define the model evaluation error at any (x, h) ∈ X × [H] as
errh(x) = (Bh ̃Vh+1 − ̃Qh)(x),
(3)
where Bh is the Bellman operator defined in Section 3, and ̃Vh and ̃Qh are the estimated (action-)
state value functions returned by Algorithm 1. Using the standard suboptimality decomposition (Jin
et al., 2021, Lemma 3.1), for any s1 ∈ S,
SubOpt( ̃π; s1) = −
H
(cid:88)
h=1
E ̃π [errh(sh, ah)] +
H
(cid:88)
h=1
Eπ∗ [errh(sh, ah)]
+
H
(cid:88)
h=1
Eπ∗
(cid:104)
(cid:124)
(cid:104) ̃Qh(sh, *), π∗
h(*|sh) − ̃πh(*|sh)(cid:105)A
(cid:123)(cid:122)
≤0
(cid:105)
,
(cid:125)
where the third term is non-positive as ̃πh is greedy with respect to ̃Qh. Thus, for any s1 ∈ S, we
have
SubOpt( ̃π; s1) ≤ −
H
(cid:88)
h=1
E ̃π [errh(sh, ah)] +
H
(cid:88)
h=1
Eπ∗ [errh(sh, ah)] .
(4)
In the following main lemma, we bound the evaluation error errh(s, a). In the rest of the proof, we
consider an additional parameter R and fix any δ ∈ (0, 1).
Lemma C.1. Let
(cid:16)
√
(cid:17)
m/R)
d3/2R−1 log3/2(
m = Ω
R = O (cid:0)m1/2 log−3 m(cid:1) ,
m = Ω (cid:0)K (cid:48)10(H + ψ)2 log(3K (cid:48)H/δ)(cid:1)
λ > 1
K (cid:48)C 2
η ≤ (λ + K (cid:48)C 2
ψ > ι,
σh ≥ β, ∀h ∈ [H],
g ≥ λR ≥ max{4 ̃B1, 4 ̃B2, 2
g )−1,
(cid:113)
2λ−1K (cid:48)(H + ψ + γh,1)2 + 4γ2
h,2},
(5)
21
Published as a conference paper at ICLR 2023
where ̃B1, ̃B2, γh,1, γh,2, and ι are defined in Table 3, Cg is a absolute constant given in Lemma G.1,
and R is an additional parameter. Let M = log HSA
1−Φ(−1) where Φ(*) is the cumulative
distribution function of the standard normal distribution. With probability at least 1−M Hm−2−2δ,
for any (x, h) ∈ X × [H], we have
δ / log
1
−ι ≤ errh(x) ≤ σh(1 + (cid:112)2 log(M SAH/δ)) * (cid:107)g(x; W0)(cid:107)Λ−1
h
+ ι
where Λh := λImd + (cid:80)
k∈Ih
g(xk
h; W0)g(xk
h; W0)T ∈ Rmd×md.
Now we can prove Theorem 1.
Proof of Theorem 1. Theorem 1 can directly follow from substituting Lemma C.1 into Equation (4).
We now only need to simplify the conditions in Equation (5). To satisfy Equation (5), it suffices to
set
λ = 1 + H
K
ψ = 1 > ι
σh = β
8CgR4/3m−1/6√
λ−1K (cid:48)H 2 ≥ 2
(cid:113)
̃B1 ≤
̃B2 ≤ K (cid:48)CgR4/3m−1/6√
log m ≤ 1
2K (cid:48)(H + ψ + γh,1)2 + λγ2
log m ≤ 1.
h,2 + 1
√
K (cid:48)CgR1/3m−1/6√
log m ≤ 1
Combining with Equation 5, we have
λ = 1 + H
K
ψ = 1 > ι
σh = β
η (cid:46) (λ + K (cid:48))−1
R8 log3 m, K (cid:48)10(H + 1)2 log(3K (cid:48)H/δ), d3/2R−1 log3/2(
m (cid:38) max
m (cid:38) [2K (cid:48)(H + 1 + β(cid:112)log(K (cid:48)M/δ))2 + λβ2d log(dK (cid:48)M/δ) + 1]3K (cid:48)3R log3 m
√
4
K (cid:48)(H + 1 + β(cid:112)log(K (cid:48)M/δ)) + 4β(cid:112)d log(dK (cid:48)M/δ) ≤ R (cid:46) K (cid:48).
√
(cid:110)
m/R), K (cid:48)6R8 log3 m
(cid:111)
Note that with the above choice of λ = 1 + H
K (cid:48) log λ = log(1 +
K , we have
1
K (cid:48) )K(cid:48)
We further set that m (cid:38) B2K (cid:48)2d log(3H/δ), we have
(6)
≤ log 3 < 2.
β =
BK (cid:48)
√
m
(2
√
d + (cid:112)2 log(3H/ δ))λ−1/2Cg + λ1/2B
(cid:34)(cid:114)
(cid:35)
+ (H + ψ)
̃dh log(1 +
) + K (cid:48) log λ + 2 log(3H/δ)
K (cid:48)
λ
(cid:34)(cid:114)
≤ 1 + λ1/2B + (H + 1)
̃dh log(1 +
) + 2 + 2 log(3H/δ)
(cid:35)
√
= o(
K (cid:48)).
K (cid:48)
λ
Thus,
√
4
K (cid:48)(H + 1 + β(cid:112)log(K (cid:48)M/δ)) + 4β(cid:112)d log(dK (cid:48)M/δ) << K (cid:48)
for K (cid:48) large enough. Therefore, there exists R that satisfies Equation (6). We now only need to
verify ι < 1. We have
ι0 = Bm−1/2(2
√
d + (cid:112)2 log(3H/δ)) ≤ 1/3,
22
Published as a conference paper at ICLR 2023
ι1 = CgR4/3m−1/6(cid:112)log m + Cg
(cid:16) ̃B1 + ̃B2 + λ−1(1 − ηλ)J (cid:0)K (cid:48)(H + 1 + γh,1)2 + λγ2
h,2
(cid:1)(cid:17)
(cid:46) 1/3
if
Note that
(1 − ηλ)J (cid:104)
(cid:105)
K (cid:48)(H + 1 + β(cid:112)log(K (cid:48)M/δ))2 + λβ2d log(dK (cid:48)M/δ)
(cid:46) 1.
(7)
(1 − ηλ)J ≤ e−ηλJ ,
K (cid:48)(H + 1 + β(cid:112)log(K (cid:48)M/δ))2 + λβ2d log(dK (cid:48)M/δ) (cid:46) K (cid:48)H 2λβ2d log(dK (cid:48)M/δ).
Thus, Equation (7) is satisfied if
J (cid:38) ηλ log (cid:0)K (cid:48)H 2λβ2d log(dK (cid:48)M/δ)(cid:1) .
Finally note that ι2 ≤ ι1. Rearranging the derived conditions here gives the complete parameter con-
ditions in Theorem 1. Specifically, the polynomial form of m is m (cid:38) max{R8 log3 m, K (cid:48)10(H +
1)2 log(3K (cid:48)H/δ), d3/2R−1 log3/2(
m/R), K (cid:48)6R8 log3 m, B2K (cid:48)2d log(3H/δ)}, m (cid:38) [2K (cid:48)(H +
1 + β(cid:112)log(K (cid:48)M/δ))2 + λβ2d log(dK (cid:48)M/δ) + 1]3K (cid:48)3R log3 m.
√
C.3 PROOF OF THEOREM 2
In this subsection, we give a detailed proof of Theorem 2. We first present intermediate lemmas
whose proofs are deferred to Section D. For any h ∈ [H] and k ∈ Ih = [(H − h)K (cid:48) + 1, . . . , (H −
h + 1)K (cid:48)], we define the filtration
(cid:16)
(cid:17)
{(st
h(cid:48), at
h(cid:48), rt
h(cid:48))}t≤k
h(cid:48)∈[H] ∪ {(sk+1
h(cid:48)
, ak+1
h(cid:48)
, rk+1
h(cid:48)
)}h(cid:48)≤h−1 ∪ {(sk+1
h
, ak+1
h
)}
F k
h = σ
.
Let
Λk
h := λI +
(cid:88)
g(xt
h; W0)g(xt
h; W0)T ,
t∈Ik,t≤k
̃β := β(1 + 2(cid:112)log(SAH/δ)).
In the following lemma, we connect the expected sub-optimality of ̃π to the summation of the un-
certainty quantifier at empirical data.
Lemma C.2. Suppose that the conditions in Theorem 1 all hold. With probability at least 1 −
M Hm−2 − 3δ,
SubOpt( ̃π) ≤
2 ̃β
K (cid:48)
H
(cid:88)
(cid:88)
h=1
k∈Ih
Eπ∗
(cid:20)
(cid:107)g(xh; W0)(cid:107)(Λk
h)−1
F k−1
h
, sk
1
(cid:21)
+
(cid:12)
(cid:12)
(cid:12)
(cid:12)
16
3K (cid:48) H log(log2(K (cid:48)H)/δ)
+
2
K (cid:48) + 2ι,
Lemma C.3. Under Assumption 5.2, for any h ∈ [H] and fixed W0, with probability at least 1 − δ,
(cid:88)
Eπ∗
k∈Ih
(cid:20)
(cid:107)g(xh; W0)(cid:107)(Λk
h)−1
Fk−1, sk
1
(cid:21)
≤
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:88)
k∈Ih
κ(cid:107)g(xh; W0)(cid:107)(Λk
h)−1 + κ
(cid:114)
K (cid:48) log(1/δ)
λ
.
Lemma C.4. If λ ≥ C 2
h ∈ [H], we have
g and m = Ω(K (cid:48)4 log(K (cid:48)H/δ)), then with probability at least 1 − δ, for any
(cid:88)
k∈Ih
(cid:107)g(xh; W0)(cid:107)2
h)−1 ≤ 2 ̃dh log(1 + K (cid:48)/λ) + 1.
(Λk
where ̃dh is the effective dimension defined in Definition 2.
Proof of Theorem 2. Theorem 2 directly follows from Lemma C.2-C.3-C.4 using the union bound.
23
Published as a conference paper at ICLR 2023
D PROOF OF LEMMA C.1
In this section, we provide the proof for Lemma C.1. We set up preparation for all the results in the
rest of the paper and provide intermediate lemmas that we use to prove Lemma C.1. The detailed
proofs of these intermediate lemmas are deferred to Section E.
D.1 PREPARATION
To prepare for the lemmas and proofs in the rest of the paper, we define the following quantities.
Recall that we use abbreviation x = (s, a) ∈ X ⊂ Sd−1 and xk
h) ∈ X ⊂ Sd−1. For any
h ∈ [H] and i ∈ [M ], we define the perturbed loss function
h = (sk
h, ak
̃Li
h(W ) :=
1
2
(cid:88)
(cid:16)
k∈Ih
f (xk
h; W ) − ̃yi,k
h )
(cid:17)2
+
λ
2
(cid:107)W + ζ i
h − W0(cid:107)2
2,
(8)
where
̃yi,k
h := rk
h + ̃Vh+1(sk
h+1) + ξi,k
h ,
̃Vh+1 is computed by Algorithm 1 at Line 10 for timestep h + 1, and {ξi,k
noises obtained at Line 5 of Algorithm 1.
Here the subscript h and the superscript i in ̃Li
sample i and timestep h. The gradient descent update rule of ̃Li
h(W ) is
h(W ) emphasize the dependence on the ensemble
h } and ζ i
h are the Gaussian
̃W i,(j+1)
h
= ̃W i,(j)
h − η∇ ̃Li
h(W ),
where ̃W i,(0)
h = W0 is the initialization parameters. Note that
h, ζ i
h = GradientDescent(λ, η, J, ̃Di
̃W i
h, W0) = ̃W i,(J)
h
(9)
,
where ̃W i
h is returned by Line 7 of Algorithm 1. We consider a non-perturbed auxiliary loss function
Lh(W ) :=
1
2
(cid:88)
k∈Ih
where
(cid:0)f (xk
h; W ) − yk
h)(cid:1)2
+
λ
2
(cid:107)W − W0(cid:107)2
2,
(10)
h + ̃Vh+1(sk
Note that Lh(W ) is simply a non-perturbed version of ̃Li
and {ζ i
yk
h := rk
h}. We consider the gradient update rule for Lh(W ) as follows
ˆW (j+1)
h
h − η∇Lh(W ),
= ˆW (j)
h+1).
h(W ) where we drop all the noises {ξi,k
h }
where ˆW (0)
h = W0 is the initialization parameters. To correspond with ̃W i
h, we denote
ˆWh := ˆW (J)
h .
(11)
(12)
We also define the auxiliary loss functions for both non-perturbed and perturbed data in the linear
model with feature g(*; W0) as follows
̃Li,lin
h
(W ) :=
1
2
(cid:88)
(cid:16)
k∈Ih
(cid:104)g(xk
h; W0), W (cid:105) − ̃yi,k
h
(cid:17)2
+
λ
2
(cid:107)W + ζ i
h − W0(cid:107)2
2,
Llin
h (W ) :=
1
2
(cid:88)
k∈Ih
(cid:0)(cid:104)g(xk
h; W0), W (cid:105) − yk
h
(cid:1)2
+
λ
2
(cid:107)W − W0(cid:107)2
2.
We consider the auxiliary gradient updates for ̃Li,lin
h
(W ) as
̃W i,lin,(j+1)
h
= ̃W i,lin,(j)
h
− η∇ ̃Li,lin
h
(W ),
24
(13)
(14)
(15)
Published as a conference paper at ICLR 2023
ˆW lin,(j+1)
h
= ˆW lin,(j)
h
− η∇ ̃Llin
h (W ),
(16)
where ̃W i,lin,(0)
h
auxiliary perturbed and non-perturbed loss functions for the linear model as follows
= W0 for all i, h. Finally, we define the least-square solutions to the
= ˆW i,lin,(0)
h
̃W i,lin
h = arg min
W ∈Rmd
̃Li,lin
h
(W ),
ˆW lin
h = arg min
W ∈Rmd
Llin
h (W ).
For any h ∈ [H], we define the auxiliary covariance matrix Λh as follows
Λh := λImd +
(cid:88)
k∈Ih
g(xk
h; W0)g(xk
h; W0)T .
(17)
(18)
(19)
It is worth remarking that Algorithm 1 only uses Equation (8) and (9) thus it does not actually require
any of the auxiliary quantities defined in this subsection during its run time. The auxiliary quantities
here are only for our theoretical analysis.
D.2 PROOF OF LEMMA C.1
In this subsection, we give detailed proof of Lemma C.1. To prepare for proving Lemma C.1, we
first provide the following intermediate lemmas. The detailed proofs of these intermediate lemmas
are deferred to Section E.
In the following lemma, we bound the uncertainty f (x; ˆWh) in estimating the Bellman operator at
the estimated state-value function Bh ̃Vh+1.
Lemma D.1. Let
m = Ω (cid:0)K (cid:48)10(H + ψ)2 log(3K (cid:48)H/δ)(cid:1)
λ > 1
K (cid:48)C 2
g ≥ λ
With probability at least 1 − Hm−2 − 2δ, for any x ∈ Sd−1, and any h ∈ [H],
|f (x; ˆWh) − (Bh ̃Vh+1)(x)| ≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
h
+ ι2 + ι0,
where ̃Vh+1 is computed by Algorithm 1 for timestep h + 1, ˆWh is defined in Equation (12), and β,
ι2 and ι0 are defined in Table 3.
In the following lemma, we establish the anti-concentration of ̃Qh.
Lemma D.2. Let
√
(cid:17)
m/R)
(cid:16)
d3/2R−1 log3/2(
m = Ω
R = O (cid:0)m1/2 log−3 m(cid:1) ,
η ≤ (λ + K (cid:48)C 2
R ≥ max{4 ̃B1, 4 ̃B2, 2
g )−1,
(cid:113)
2λ−1K (cid:48)(H + ψ + γh,1)2 + 4γ2
h,2},
(20)
where ̃B1, ̃B2, γh,1 and γh,2 are defined in Table 3, and Cg is a constant given in Lemma G.1. Let
M = log HSA
1−Φ(−1) where Φ(*) is the cumulative distribution function of the standard nor-
mal distribution and M is the number of bootstrapped samples in Algorithm 1. Then with probability
1 − M Hm−2 − δ, for any x ∈ Sd−1 and h ∈ [H],
δ / log
1
̃Qh(x) ≤ max{(cid:104)g(x; W0), ˆW lin
h − W0(cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
+ ι1 + ι2, 0},
h
where ˆW lin
h
defined in Table 3.
is defined in Equation (18), ̃Qh is computed by Line 9 of Algorithm 1, and ι1 and ι2 are
25
Published as a conference paper at ICLR 2023
We prove the following linear approximation error lemma.
Lemma D.3. Let
√
(cid:17)
(cid:16)
m/R)
d3/2R−1 log3/2(
m = Ω
R = O (cid:0)m1/2 log−3 m(cid:1) ,
η ≤ (λ + K (cid:48)C 2
R ≥ max{4 ̃B1, 4 ̃B2, 2
g )−1,
(cid:113)
2λ−1K (cid:48)(H + ψ + γh,1)2 + 4γ2
h,2},
(21)
where ̃B1, ̃B2, γh,1 and γh,2 are defined in Table 3, and Cg is a constant given in Lemma G.1. With
probability at least 1 − M Hm−2 − δ, for any (x, i, j, h) ∈ Sd−1 × [M ] × [J] × [H],
|f (x; ̃W i,(j)
h
) − (cid:104)g(x; W0), ̃W i,lin
h − W0(cid:105)| ≤ ι1,
h
, ̃W i,lin
h
, and ι1 are defined in Equation (9), Equation (17), and Table 3, respectively.
where ̃W i,(j)
In addition, with probability at least 1 − Hm−2, for any for any (x, j, h) ∈ Sd−1 × [J] × [H],
h ) − (cid:104)g(x; W0), ˆW lin
h − W0(cid:105)| ≤ ι2,
|f (x; ˆW (j)
where ˆW (j)
h , ˆW lin
h , and ι2 are defined in Equation (11), Equation (18), and Table 3, respectively.
We now can prove Lemma C.1.
Proof of Lemma C.1. Note that the first fourth conditions in Equation (5) of Lemma C.1 satisfy
Equation (21). Moreover, the event in which the inequality in Lemma D.3 holds already implies the
event in which the inequality in Lemma D.1 holds (see the proofs of Lemma D.3 and Lemma D.1
in Section D). Now in the rest of the proof, we consider the joint event in which both the inequality
of Lemma D.3 and that of Lemma D.1 hold. Then, we also have the inequality in Lemma D.1.
Consider any x ∈ X , h ∈ [H].
It follows from Lemma D.1 that
(Bh ̃Vh+1)(x) ≥ f (x; ˆWh) − β * (cid:107)g(x; W0)(cid:107)Λ−1
h
− ι0 − ι2.
(22)
It follows from Lemma D.2 that
̃Qh(x) ≤ max{(cid:104)g(x; W0), ˆW lin
h − W0(cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
+ ι1 + ι2, 0}.
(23)
h
Note that ̃Qh(x) ≥ 0. If (cid:104)g(x; W0), ˆW lin
implies that ̃Qh(x) = 0 and thus
h − W0(cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
+ ι1 + ι2 ≤ 0, Equation (23)
h
errh(x) = (Bh ̃Vh+1)(x) − ̃Qh(x)
= (Bh ̃Vh+1)(x) ≥ 0.
Otherwise, if (cid:104)g(x; W0), ˆW lin
h − W0(cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
h
+ ι1 + ι2 > 0, Equation (23) implies that
̃Qh(x) ≤ (cid:104)g(x; W0), ˆW lin
h − W0(cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
+ ι1 + ι2.
(24)
h
Thus, combining Equation (22), (24) and Lemma D.3, with the choice σh ≥ β, we have
errh(x) := (Bh ̃Vh+1)(x) − ̃Qh(x) ≥ −(ι0 + ι1 + 2ι2) = −ι.
As ι ≥ 0, in either case, we have
errh(x) := (Bh ̃Vh+1)(x) − ̃Qh(x) ≥ −ι.
(25)
Note that due to Equation (25), we have
̃Qh(x) ≤ (Bh ̃Vh+1)(x) + ι ≤ H − h + 1 + ι < H − h + 1 + ψ,
26
Published as a conference paper at ICLR 2023
where the last inequality holds due to the choice ψ > ι. Thus, we have
f (x; ̃W i
h), H − h + 1 + ψ}+ = max{ min
i∈[M ]
̃Qh(x) = min{ min
i∈[M ]
f (x; ̃W i
h), 0}.
(26)
Substituting Equation (26) into the definition of errh(x), we have
errh(x) = (Bh ̃Vh+1)(x) − ̃Qh(x)
≤ (Bh ̃Vh+1)(x) − min
i∈[M ]
f (x; ̃W i
h)
= (Bh ̃Vh+1)(x) − f (x; ˆWh) + f (x; ˆWh) − min
i∈[M ]
f (x; ̃W i
h)
≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
h
≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
h
+ ι0 + ι2 + f (x; ˆWh) − min
i∈[M ]
+ ι0 + ι2 + (cid:104)g(x; W0), ˆW lin
f (x; ̃W i
h)
h − W0(cid:105) + ι2
− min
i∈[M ]
(cid:104)g(x; W0), ̃W i,lin
h − W0(cid:105) + ι1
= β * (cid:107)g(x; W0)(cid:107)Λ−1
h
≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
h
(cid:104)g(x; W0), ˆW lin
+ ι0 + ι2 + max
i∈[M ]
+ ι0 + ι2 + (cid:112)2 log(M SAH/δ)σh(cid:107)g(x; W0)(cid:107)Λ−1
h − ̃W i,lin
h
(cid:105) + ι1 + ι2
+ ι1 + ι2
h
where the first inequality holds due to Equation (26), the second inequality holds due to Lemma D.1,
the third inequality holds due to Lemma D.3, and the last inequality holds due to Lemma E.2 and
Lemma G.3 via the union bound.
D.3 PROOF OF LEMMA C.2
Proof of Lemma C.2. Let Zk := ̃β (cid:80)H
where
1{} is the indicator function. Under the event in which the inequality in Theorem 1 holds, we
have
(cid:104)
1{k ∈ Ih}(cid:107)g(xh; W0)(cid:107)(Λk
1, F k−1
h
h)−1|sk
Eπ∗
h=1
(cid:105)
SubOpt( ̃π) ≤ min
H, ̃β * Eπ∗
(cid:40)
(cid:34) H
(cid:88)
h=1
(cid:35)
(cid:41)
(cid:107)g(xh; W0)(cid:107)Λ−1
h
+ 2ι
(cid:40)
≤ min
H, ̃βEπ∗
(cid:34) H
(cid:88)
h=1
(cid:35)(cid:41)
(cid:107)g(xh; W0)(cid:107)Λ−1
h
+ 2ι
=
≤
=
≤
1
K (cid:48)
1
K (cid:48)
1
K (cid:48)
1
K (cid:48)
K
(cid:88)
k=1
K
(cid:88)
k=1
K
(cid:88)
k=1
K
(cid:88)
k=1
(cid:40)
min
H, ̃βEπ∗
(cid:40)
min
H, ̃βEπ∗
(cid:34) H
(cid:88)
h=1
(cid:34) H
(cid:88)
h=1
1{k ∈ Ih}(cid:107)g(xh; W0)(cid:107)Λ−1
h
+ 2ι
(cid:35)(cid:41)
1{k ∈ Ih}(cid:107)g(xh; W0)(cid:107)(Λk
h)−1 |F k−1
h
min (cid:8)H, E[Zk|F k−1
h
](cid:9) + 2ι
E (cid:2)min{H, Zk}|F k−1
h
(cid:3) + 2ι,
(cid:35)(cid:41)
+ 2ι
(27)
where the first inequality holds due to Theorem 1 and that SubOpt( ̃π; s1) ≤ H, ∀s1 ∈ S, the
second inequality holds due to min{a, b + c} ≤ min{a, b} + c, the third inequality holds due to
that Λ−1
h)−1, the fourth inequality holds due to Jensen's inequality for the convex function
f (x) = min{H, x}. It follows from Lemma G.9 that with probability at least 1 − δ,
h (cid:22) (Λk
K
(cid:88)
k=1
E [min{H, Zk}|Fk−1] ≤ 2
K
(cid:88)
k=1
Zk +
16
3
27
H log(log2(KH)/δ) + 2.
(28)
Published as a conference paper at ICLR 2023
Substituting Equation (28) into Equation (27) and using the union bound complete the proof.
D.4 PROOF OF LEMMA C.3
Proof of Lemma C.3. Let Z k
measurable, and by Assumption 5.2, we have,
h(xk
h := 1{k ∈ Ih} d∗
h)
h) (cid:107)g(xk
dμ
h(xk
h; W0)(cid:107)(Λk
h)−1. We have Z k
h is F k
h -
|Z k
h| ≤
h(xk
d∗
h)
dμ
h(xk
h)
(cid:3) = Exh∼dμ
h
E (cid:2)Z k
h|F k−1
h
, sk
1
(cid:107)g(xk
h; W0))(cid:107)2
(cid:113)
(cid:107)(Λk
h)−1(cid:107) ≤ 1/
√
λ
(cid:20)
1{k ∈ Ih}
d∗
h(xh)
dμ
h(xh)
(cid:107)g(xh; W0)(cid:107)(Λk
h)−1
h(xk
d∗
h)
dμ
h(xk
h)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
F k−1
h
< ∞,
(cid:21)
.
, sk
1
Thus, by Lemma G.4, for any h ∈ [H], with probability at least 1 − δ, we have:
K
(cid:88)
k=1
Ex∼d∗
h
(cid:20)
1{k ∈ Ih}(cid:107)g(xh; W0)(cid:107)(Λk
h)−1
(cid:21)
F k−1
h
, sk
1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
=
≤
K
(cid:88)
k=1
K
(cid:88)
k=1
Exh∼dμ
h)
(cid:20)
1{k ∈ Ih}
d∗
h(xh)
dμ
h(xh)
(cid:107)φh(xh)(cid:107)(Λk
h)−1
(cid:21)
F k−1
h
, sk
1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
1{k ∈ Ih}
h(xk
d∗
h)
dμ
h(xk
h)
(cid:107)g(xk
h; W0)(cid:107)(Λk
h)−1 +
(cid:114) 1
λ
(cid:118)
(cid:117)
(cid:117)
(cid:116)
log(1/δ)
K
(cid:88)
1{k ∈ Ih}
k=1
(cid:19)2
(cid:18) d∗
h(xk
h)
dμ
h(xk
h)
≤ κ
K
(cid:88)
k=1
1{k ∈ Ih}(cid:107)g(xh; W0)(cid:107)(Λk
h)−1 + κ
(cid:114)
K (cid:48) log(1/δ)
λ
= κ
(cid:88)
k∈Ih
(cid:107)g(xh; W0)(cid:107)(Λk
h)−1 + κ
(cid:114)
K (cid:48) log(1/δ)
λ
D.5 PROOF OF LEMMA C.4
Proof of Lemma C.4. For any fixed h ∈ [H], let
By the union bound, with probability at least 1 − δ, for any h ∈ [H], we have
U = [g(xk
h; W0)]k∈Ih ∈ Rmd×K(cid:48)
.
(cid:88)
k∈Ih
(cid:107)g(xh; W0)(cid:107)2
h)−1 ≤ 2 log
(Λk
det Λh
det(λI)
(cid:32)
= 2 logdet
I +
g(xk
h; W0)g(xk
h; W0)T /λ
(cid:33)
(cid:88)
k∈Ih
= 2 logdet(I + U U T /λ)
= 2 logdet(I + U T U/λ)
= 2 logdet(I + Kh/λ + (U T U − Kh)/λ)
≤ 2 logdet(I + Kh/λ) + 2 tr (cid:0)(I + Kh/λ)−1(U T U − Kh)/λ(cid:1)
≤ 2 logdet(I + Kh/λ) + 2(cid:107)(I + Kh/λ)−1(cid:107)F (cid:107)U T U − Kh(cid:107)F
≤ 2 logdet(I + Kh/λ) + 2
≤ 2 logdet(I + Kh/λ) + 1
= 2 ̃dh log(1 + K (cid:48)/λ) + 1
K (cid:48)(cid:107)U T U − Kh(cid:107)F
√
28
Published as a conference paper at ICLR 2023
where the first inequality holds due to λ ≥ C 2
g and (Abbasi-yadkori et al., 2011, Lemma 11), the
third equality holds due to that logdet(I + AAT ) = logdet(I + AT A), the second inequality holds
due to that logdet(A + B) ≤ logdet(A) + tr(A−1B) as the result of the convexity of logdet, the
K (cid:48)(cid:107)U T U −
third inequality holds due to that tr(A) ≤ (cid:107)A(cid:107)F , the fourth inequality holds due to 2
Kh(cid:107)F ≤ 1 by the choice of m = Ω(K (cid:48)4 log(K (cid:48)H/δ)), Lemma G.2 and the union bound, and the
last equality holds due to the definition of ̃dh.
√
E PROOFS OF LEMMAS IN SECTION D
E.1 PROOF OF LEMMA D.1
In this subsection, we give detailed proof of Lemma D.1. For this, we first provide a lemma about
the linear approximation of the Bellman operator. In the following lemma, we show that Bh ̃Vh+1
can be well approximated by the class of linear functions with features g(*; W0) with respect to
l∞-norm.
Lemma E.1. Under Assumption 5.1, with probability at least 1 − δ over w1, . . . , wm drawn i.i.d.
from N (0, Id), for any h ∈ [H], there exist c1, . . . , cm where ci ∈ Rd and (cid:107)ci(cid:107)2 ≤ B
m such that
̄Qh(x) :=
(cid:107)Bh ̃Vh+1 − ̄Qh(cid:107)∞ ≤
m
(cid:88)
i=1
B
√
m
i xσ(cid:48)(wT
cT
i x),
√
(2
d + (cid:112)2 log(H/δ))
Moreover, ̄Qh(x) can be re-written as
̄Qh(x) = (cid:104)g(x; W0), ̄Wh(cid:105),
√
̄Wh :=
m[a1cT
1 , . . . , amcT
m]T ∈ Rmd, and (cid:107) ̄Wh(cid:107)2 ≤ B.
(29)
We now can prove Lemma D.1.
Proof of Lemma D.1. We first bound the difference (cid:104)g(x; W0), ̄Wh(cid:105) − (cid:104)g(x; W0), ˆW lin
h − W0(cid:105):
(cid:104)g(x; W0), ̄Wh(cid:105) − (cid:104)g(x; W0), ˆW lin
h − W0(cid:105) = g(x; W0)T ̄Wh − g(x; W0)T Λ−1
h
(cid:88)
k∈Ih
g(xk
h; W0)yk
h
= g(x; W0)T ̄Wh − g(x; W0)T Λ−1
h
g(xk
h; W0) * (Bh ̃Vh+1)(xk
h)
(cid:88)
k∈Ih
(cid:124)
+ g(x; W0)T Λ−1
h
(cid:88)
k∈Ih
(cid:124)
(cid:123)(cid:122)
I1
(cid:104)
g(xk
h; W0) *
(cid:125)
(Bh ̃Vh+1)(xk
h) − (rk
h + ̃Vh+1(sk
h+1))
(cid:123)(cid:122)
I2
(cid:105)
.
(cid:125)
For bounding I1, it follows from Lemma E.1 that with probability at least 1 − δ/3, for any for any
x ∈ Sd−1 and any h ∈ [H],
|(Bh ̃Vh+1)(x) − (cid:104)g(x; W0), ̄Wh(cid:105)| ≤ ι0,
where ι0 is defined in Table 3. where ̄Wh is defined in Lemma E.1. Thus, with probability at least
1 − δ/3, for any for any x ∈ Sd−1 and any h ∈ [H],
I1 = g(x; W0)T ̄Wh − g(x; W0)T Λ−1
h
(cid:88)
g(xk
h; W0) *
(cid:104)
− g(x; W0)T ̄Wh + λg(x; W0)T Λ−1
h
k∈Ih
̄Wh
29
(Bh ̃Vh+1)(xk
h) − g(xk
h; W0)T ̄Wh
(cid:105)
Published as a conference paper at ICLR 2023
≤ (cid:107)g(x; W0)T (cid:107)Λ−1
h
ι0(cid:107)g(xk
h; W0)T (cid:107)Λ−1
h
+ λ(cid:107)g(x; W0)(cid:107)Λ−1
h
(cid:107) ̄Wh(cid:107)Λ−1
h
(cid:88)
≤ (cid:107)g(x; W0)(cid:107)Λ−1
h
k∈Ih
(cid:104)
K (cid:48)ι0λ−1/2Cg + λ1/2B
(cid:105)
,
(30)
h
≤
(cid:113)
(cid:107)Λ−1
h (cid:107)2 * (cid:107) ̄Wh(cid:107)2 ≤ λ−1/2B.
where the first equation holds due to the definition of Λh, and the last inequality holds due to Step I
with (cid:107) ̄Wh(cid:107)Λ−1
For bounding I2, we have
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:124)
(cid:104)
(Bh ̃Vh+1)(xk
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)Λ−1
(cid:125)
(cid:107)g(x; W0)(cid:107)Λ−1
h − ̃Vh+1(sk
(cid:105)
h+1)
h) − rk
h; W0)
g(xk
I2 ≤
(31)
(cid:88)
k∈Ih
.
h
h
(cid:123)(cid:122)
I3
If we directly apply the result of Jin et al. (2021) in linear MDP, we would get
I2 (cid:46) dmH(cid:112)log(2dmK (cid:48)H/δ) * (cid:107)g(x; W0)(cid:107)Λ−1
which gives a vacuous bound as m is sufficiently larger than K in our problem. Instead, in the
following, we present an alternate proof that avoids such vacuous bound.
,
h
For notational simplicity, we write
h − ̃Vh+1(sk
h) − rk
h)k∈Ih ]T ∈ RK(cid:48)
.
h+1),
h := (Bh ̃Vh+1)(xk
(cid:15)k
Eh := [((cid:15)k
h; W0), g(xj
h}k∈[K]. We denote
:= [(cid:104)g(xi
We denote Kinit
kernel on the data {xk
h
h; W0)(cid:105)]i,j∈Ih as the Gram matrix of the empirical NTK
G0 := (cid:0)g(xk
:= GT
Kint
h
h; W0)(cid:1)
k∈Ih
0 G0 ∈ RK(cid:48)×K(cid:48)
∈ Rmd×K(cid:48)
,
.
Recall the definition of the Gram matrix Kh of the NTK kernel on the data {xk
h}k∈Ih . It follows
from Lemma G.2 and the union bound that if m = Ω((cid:15)−4 log(3K (cid:48)H/δ)) with probability at least
1 − δ/3, for any h ∈ [H],
(cid:107)Kh − Kinit
h (cid:107)F ≤
√
K (cid:48)(cid:15).
(32)
We now can bound I3. We have
I 2
3 =
(cid:88)
g(xk
h; W0)(cid:15)k
h
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)
(cid:13)
Λ−1
h
0 )−1G0Eh
0 (λImd + G0GT
0 G0)−1Eh
0 G0(λIK(cid:48) + GT
k=Ih
h GT
h GT
h Kinit
(Kinit
h
h Kh(Kh + λIK(cid:48))−1Eh
(cid:125)
(cid:123)(cid:122)
I5
h + λIK)−1Eh
+ ET
h
(cid:124)
= ET
= ET
= ET
= ET
(cid:124)
(cid:0)Kh(Kh + λIK(cid:48))−1 − Kinit
h
(Kint
h + λIK(cid:48))−1Eh
(33)
.
(cid:1)
(cid:125)
(cid:123)(cid:122)
I4
We bound each I4 and I5 separately. For bounding I4, applying Lemma G.1, with 1 − Hm−2, for
any h ∈ [H],
I4 ≤ (cid:13)
(cid:13)Kh(Kh + λIK(cid:48))−1 − Kinit
= (cid:13)
(cid:13)(Kh − Kinit
h
h (cid:107)2/λ + (cid:107)Kinit
≤ (cid:107)Kh − Kinit
(cid:13)2 (cid:107)Eh(cid:107)2
(cid:0)(Kh + λIK(cid:48))−1 − (Kint
h (cid:107)2/λ2(cid:107)Eh(cid:107)2
2
h
)(Kh + λIK(cid:48))−1 + Kinit
h + λIK(cid:48))−1(cid:1)(cid:13)
h (cid:107)2 * (cid:107)Kh − Kinit
h + λIK(cid:48))−1(cid:13)
(cid:13)2 (cid:107)Eh(cid:107)2
(Kint
h
2
2
30
Published as a conference paper at ICLR 2023
≤
λ + K (cid:48)C 2
g
λ2
≤ 2K (cid:48)C 2
(cid:107)Kh − Kinit
h (cid:107)2(cid:107)Eh(cid:107)2
2
g K (cid:48)(H + ψ)2(cid:107)Kh − Kinit
h (cid:107)2,
(34)
where the first inequality holds due to the triangle inequality, the second inequality holds due to
the triangle inequality, Lemma G.7, and (cid:107)(Kh + λIK(cid:48))−1(cid:107)2 ≤ λ−1, the third inequality holds due
to (cid:107)Kinit
g due to Lemma G.1, the fourth inequality holds due to
(cid:107)Eh(cid:107)2 ≤
g ≥ λ.
2 ≤ (cid:107)G0(cid:107)2
F ≤ K (cid:48)C 2
K (cid:48)(H + ψ), λ ≥ 1, and K (cid:48)C 2
h (cid:107)2 ≤ (cid:107)G0(cid:107)2
√
Substituting Equation (32) in Equation (34) using the union bound, with probability 1−Hm−2−δ/3,
for any h ∈ [H],
I4 ≤ 2K (cid:48)C 2
g K (cid:48)(H + ψ)2
√
K (cid:48)(cid:15) ≤ 1,
(35)
where the last inequality holds due to the choice of (cid:15) = 1/2K (cid:48)−5/2(H + ψ)−2C −2
m = Ω((cid:15)−4 log(3K (cid:48)H/δ)) = Ω (cid:0)K (cid:48)10(H + ψ)2 log(3K (cid:48)H/δ)(cid:1) .
g
and thus
For bounding I5, as λ > 1, we have
I5 = ET
≤ ET
h Kh(Kh + λIK(cid:48))−1Eh
h (Kh + (λ − 1)IK)(Kh + λIK(cid:48))−1Eh
Eh.
(cid:3)−1
(cid:2)(Kh + (λ − 1)IK(cid:48))−1 + IK(cid:48)
Let σ(*) be the σ-algebra induced by the set of random variables. For any h ∈ [H] and k ∈ Ih =
[(H − h)K (cid:48) + 1, . . . , (H − h + 1)K (cid:48)], we define the filtration
= ET
h
(36)
F k
h = σ
(cid:16)
{(st
h(cid:48), at
h(cid:48), rt
h(cid:48))}t≤k
h(cid:48)∈[H] ∪ {(sk+1
h(cid:48)
, ak+1
h(cid:48)
, rk+1
h(cid:48)
)}h(cid:48)≤h−1 ∪ {(sk+1
h
, ak+1
h
)}
(cid:17)
which is simply all the data up to episode k + 1 and timestep h but right before rk+1
generated (in the offline data). 7 Note that for any k ∈ Ih, we have (sk
h
h+1) ∈ F k
and sk+1
h , and
h, ak
h, rk
h, sk
h+1 are
̃Vh+1 ∈ σ
(cid:16)
Thus, for any k ∈ Ih, we have
{(sk
h(cid:48), ak
h(cid:48), rk
h(cid:48))}k∈Ih(cid:48)
h(cid:48)∈[h+1,...,H]
(cid:17)
⊆ F k−1
h ⊆ F k
h .
h = (Bh ̃Vh+1)(xk
(cid:15)k
h) − rk
h − ̃Vh+1(sk
h+1) ∈ F k
h .
The key property in our data split design is that we nicely have that
(cid:17)
(cid:16)
̃Vh+1 ∈ σ
{(sk
h(cid:48), ak
h(cid:48), rk
h(cid:48))}k∈Ih(cid:48)
h(cid:48)∈[h+1,...,H]
⊆ F k−1
h
.
Thus, conditioned on F k−1
h
, ̃Vh+1 becomes deterministic. This implies that
(cid:3) =
(Bh ̃Vh+1)(sk
h − ̃Vh+1(sk
h) − rk
h, ak
h+1)|F k−1
(cid:104)
h
(cid:105)
= 0.
E (cid:2)(cid:15)k
h|F k−1
h
Note that this is only possible with our data splitting technique. Otherwise, (cid:15)k
h is not zero-mean due
to the data dependence structure induced in offline RL with function approximation (Nguyen-Tang
et al., 2022b). Our data split technique is a key to avoid the uniform convergence argument with the
log covering number that is often used to bound this term in Jin et al. (2021), which is often large
for complex models. For example, in a two-layer ReLU NTK, the eigenvalues of the induced RKHS
has d-polynomial decay (Bietti & Mairal, 2019), thus its log covering number roughly follows, by
(Yang et al., 2020, Lemma D1),
log N∞(Hntk, (cid:15), B) (cid:46)
(cid:19) 4
αd−1
,
(cid:18) 1
(cid:15)
7To be more precise, we need to include into the filtration the randomness from the generated noises {ξk,i
h }
h} but since these noises are independent of any other randomness, they do not affect any derivations
and {ζ i
here but only complicate the notations and representations.
31
Published as a conference paper at ICLR 2023
for some α ∈ (0, 1).
Therefore, for any h ∈ [H], {(cid:15)k
with Zt = (cid:15)h
least 1 − δ/3, for any h ∈ [H],
h }k∈Ih . Applying Lemma G.5
t ∈ [−(H + ψ), H + ψ], σ2 = (H + ψ)2, ρ = λ − 1, for any δ > 0, with probability at
h}k∈Ih is adapted to the filtration {F k
ET
h
(cid:2)(Kh + (λ − 1)IK(cid:48))−1 + I(cid:3)−1
Eh ≤ (H + ψ)2 logdet (λIK(cid:48) + Kh) + 2(H + ψ)2 log(3H/δ)
(37)
Substituting Equation (37) into Equation (36), we have
I5 ≤ (H + ψ)2 logdet(λIK(cid:48) + Kh) + 2(H + ψ)2 log(H/δ)
= (H + ψ)2 logdet(IK(cid:48) + Kh/λ) + (H + ψ)2K (cid:48) log λ + 2(H + ψ)2 log(H/δ)
= (H + ψ)2 ̃dh log(1 + K (cid:48)/λ) + (H + ψ)2K (cid:48) log λ + 2(H + ψ)2 log(H/δ),
(38)
where the last equation holds due to the definition of the effective dimension.
Combining Equations (38), (35), (33), (31), and (30) via the union bound, with probability at least
1 − Hm−2 − δ, for any x ∈ Sd−1 and any h ∈ [H],
|(cid:104)g(x; W0), ̄Wh(cid:105) − (cid:104)g(x; W0), ˆW lin
h − W0(cid:105)| ≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
,
h
where
β := K (cid:48)ι0λ−1/2Cg + λ1/2B + (H + ψ)
(cid:20)(cid:113)
(cid:21)
̃dh log(1 + K (cid:48)/λ) + K (cid:48) log λ + 2 log(3H/δ)
.
Combing with Lemma D.3 using the union bound, with probability at least 1 − Hm−2 − 2δ, for any
x ∈ Sd−1, and any h ∈ [H],
f (x; ˆWh) − (Bh ̃Vh+1)(x) ≤ (cid:104)g(x; W0), ˆW lin
h − W0(cid:105) + ι2 − (cid:104)g(x; W0), ̄Wh(cid:105) + ι0
(39)
≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
= β * (cid:107)g(x; W0)(cid:107)Λ−1
h
h
+ ι2 + ι0,
+ ι2 + ι0
where ι2, and β are defined in Table 3.
Similarly, it is easy to show that
(Bh ̃Vh+1)(x) − f (x; ˆWh) ≤ β * (cid:107)g(x; W0)(cid:107)Λ−1
h
+ ι2 + ι0.
E.2 PROOF OF LEMMA D.2
Before proving Lemma D.2, we prove the following intermediate lemmas. The detailed proofs of
these intermediate lemmas are deferred to Section F.
Lemma E.2. Conditioned on all the randomness except {ξk,i
h}, for any i ∈ [M ],
̃W i,lin
h − ˆW lin
h ∼ N (0, σ2
h } and {ζ i
hΛ−1
h ).
Lemma E.3. If we set M = log HSA
1−Φ(−1) where Φ(*) is the cumulative distribution func-
tion of the standard normal distribution, then with probability at least 1−δ, for any (x, h) ∈ X ×[H],
δ / log
1
min
i∈[M ]
(cid:104)g(x; W0), ̃W i,lin
(cid:105) ≤ (cid:104)g(x; W0), ˆW lin
h
h (cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
.
h
We are now ready to prove Lemma D.2.
32
Published as a conference paper at ICLR 2023
Proof of Lemma D.2. Note that the parameter condition in Equation (20) of Lemma D.2 satisfies
Equation (21) of Lemma D.3, thus given the parameter condition Lemma D.2, Lemma D.3 holds.
For the rest of the proof, we consider under the joint event in which both the inequality of Lemma
D.3 and that of Lemma E.3 hold. By the union bound, probability that this joint event holds is at
least 1 − M Hm−2 − δ. Thus, for any x ∈ Sd−1, h ∈ [H], and i ∈ [M ],
min
i∈[M ]
f (x; ̃W i
h) − f (x; ˆWh) ≤ min
(cid:104)g(x; W0), ̃W i,lin
h − W0(cid:105) − (cid:104)g(x; W0), ˆW lin
h − W0(cid:105) + ι1 + ι2
i∈[M ]
h
where the first inequality holds due to Lemma D.3, and the second inequality holds due to Lemma
E.3. Thus, we have
≤ −σh(cid:107)g(x; W0)(cid:107)Λ−1
+ ι1 + ι2
̃Qh(x) = min{ min
i∈[M ]
f (x; ̃W i
h), H − h + 1 + ψ}+ ≤ max{ min
i∈[M ]
f (x; ̃W i
h), 0}
≤ max{(cid:104)g(x; W0), ˆW lin
h − W0(cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
+ ι1 + ι2, 0}.
h
E.3 PROOF OF LEMMA D.3
In this subsection, we provide a detailed proof of Lemma D.3. We first provide intermediate lemmas
that we use for proving Lemma D.3. The detailed proofs of these intermediate lemmas are deferred
to Section F.
The following lemma bounds the the gradient descent weight of the perturbed loss function around
the linear weight counterpart.
Lemma E.4. Let
√
(cid:17)
(cid:16)
d3/2R−1 log3/2(
m = Ω
R = O (cid:0)m1/2 log−3 m(cid:1) ,
η ≤ (λ + K (cid:48)C 2
R ≥ max{4 ̃B1, 4 ̃B2, 2
g )−1,
(cid:113)
m/R)
2λ−1K (cid:48)(H + ψ + γh,1)2 + 4γ2
h,2},
(40)
where ̃B1, ̃B2, γh,1 and γh,2 are defined in Table 3 and Cg is a constant given in Lemma G.1. With
probability at least 1 − M Hm−2 − δ, for any (i, j, h) ∈ [M ] × [J] × [H], we have
• ̃W i,(j)
h
∈ B(W0; R),
• (cid:107) ̃W i,(j)
h − ̃W i,lin
h
(cid:107)2 ≤ ̃B1 + ̃B2 + λ−1(1 − ηλ)j (cid:16)
K (cid:48)(H + ψ + γh,1)2 + λγ2
h,2
(cid:17)
Similar to Lemma E.4, we obtain the following lemma for the gradient descent weights of the non-
perturbed loss function.
Lemma E.5. Let
(cid:16)
d3/2R−1 log3/2(
m = Ω
R = O (cid:0)m1/2 log−3 m(cid:1) ,
η ≤ (λ + K (cid:48)C 2
R ≥ max{4B1, 4 ̃B2, 2
g )−1,
√
√
(cid:17)
m/R)
(41)
2λ−1K (cid:48)(H + ψ)},
where B1, ̃B2, γh,1 and γh,2 are defined in Table 3 and Cg is a constant given in Lemma G.1. With
probability at least 1 − M Hm−2 − δ, for any (i, j, h) ∈ [M ] × [J] × [H], we have
• ˆW (j)
h ∈ B(W0; R),
h − ˆW lin
• (cid:107) ˆW (j)
h (cid:107)2 ≤ B1 + ̃B2 + λ−1(1 − ηλ)jK (cid:48)(H + ψ)2
33
Published as a conference paper at ICLR 2023
We now can prove Lemma D.3.
Proof of Lemma D.3. Note that Equation (21) implies both Equation (40) of Lemma E.4 and Equa-
tion (41) of Lemma E.5, thus both Lemma E.4 and Lemma E.5 holds under Equation (21). Thus, by
the union bound, with probability at least 1 − M Hm−2 − δ, for any (i, j, h) ∈ [M ] × [J] × [H],
and x ∈ Sd−1,
) − (cid:104)g(x; W0), ̃W i,lin
|f (x; ̃W i,(j)
h
≤ |f (x; ̃W i,(j)
≤ CgR4/3m−1/6(cid:112)log m + Cg
) − (cid:104)g(x; W0), ̃W i,(j)
h
h − W0(cid:105)|
h − W0(cid:105)| + |(cid:104)g(x; W0), ̃W i,(j)
(cid:16) ̃B1 + ̃B2 + λ−1(1 − ηλ)j (cid:0)K (cid:48)(H + ψ + γh,1)2 + λγ2
h − ̃W i,lin
(cid:105)|
h
(cid:1)(cid:17)
= ι1,
h,2
where the first inequality holds due to the triangle inequality, the second inequality holds due to
Cauchy-Schwarz inequality, Lemma G.1, and Lemma E.4.
Similarly, by the union bound, with probability at least 1−Hm−2, for any (i, j, h) ∈ [M ]×[J]×[H],
and x ∈ Sd−1,
|f (x; ˆW (j)
h ) − (cid:104)g(x; W0), ˆW lin
+ |(cid:104)g(x; W0), ˆW (j)
h − ˆW lin
h (cid:105)|
≤ CgR4/3m−1/6(cid:112)log m + Cg
h − W0(cid:105)| ≤ |f (x; ˆW (j)
h ) − (cid:104)g(x; W0), ˆW (j)
h − W0(cid:105)|
(cid:16)
B1 + ̃B2 + λ−1(1 − ηλ)jK (cid:48)(H + ψ)2(cid:17)
= ι2,
where the first inequality holds due to the triangle inequality, the second inequality holds due to
Cauchy-Schwarz inequality, Lemma E.5, and Lemma G.1.
F PROOFS OF LEMMAS IN SECTION E
In this section, we provide the detailed proofs of Lemmas in Section E.
F.1 PROOF OF LEMMA E.1
Proof of Lemma E.1. As Bh ̃Vh+1 ∈ Q∗ by Assumption 5.1, where Q∗ is defined in Section 5, we
have
Bh ̃Vh+1 =
(cid:90)
Rd
c(w)T xσ(cid:48)(wT x)dw,
for some c : Rd → Rd such that supw
approximation by finite sum (Gao et al., 2019).
(cid:107)c(w)(cid:107)2
p0(w) ≤ B. The lemma then directly follows from
F.2 PROOF OF LEMMA E.2
Proof of Lemma E.2. Let ̄W := W + ζ i
h and
(cid:16)
h( ̄W ) :=
̄Li
(cid:88)
k∈Ih
(cid:104)g(xk
h; W0), ̄W (cid:105) − ̄yi,k
h
(cid:17)2
+ λ(cid:107) ̄W (cid:107)2
2,
h + ̃Vh+1(sk
where ̄yk
arg maxW
(W ) = arg max ̄W
the regularized least-squares solution,
h = rk
̃Li,lin
h
h+1) + ξk,i
h + (cid:104)g(xk
h( ̄W ) − ζ i
̄Li
h; W0), ζ i
h as both ̃Li,lin
h(cid:105). We have ̃Li,lin
(W ) and ̄Li
h( ̄W ) and
(W ) = ̄Li
h are convex. Using
h
h
arg max
̄W
h( ̄W ) = Λ−1
̄Li
h
(cid:88)
k∈Ih
g(xk
h; W0) ̄yk
h
= Λ−1
h
(cid:34)
(cid:88)
k∈Ih
g(xk
h; W0)(rk
h + ̃Vh+1(sk
h+1) + ξk,i
h ) +
g(xk
h; W0)(cid:104)g(xk
(cid:35)
h; W0), ζ i
h(cid:105)
(cid:88)
k∈Ih
34
Published as a conference paper at ICLR 2023
= Λ−1
h
= Λ−1
h
(cid:34)
(cid:88)
k∈Ih
(cid:34)
(cid:88)
k∈Ih
Thus, we have
g(xk
h; W0)(rk
h + ̃Vh+1(sk
h+1) + ξk,i
h ) +
g(xk
h; W0)g(xk
h; W0)T ζ i
h
(cid:35)
(cid:88)
k∈Ih
g(xk
h; W0)(rk
h + ̃Vh+1(sk
h+1) + ξk,i
h ) + (Λh − λImd)ζ i
h
(cid:35)
.
̃W i
h = arg max
̃Li,lin
h
(W ) = arg max
̄W
h( ̄W ) − ζ i
̄Li
h
W
(cid:34)
= Λ−1
h
= Λ−1
h
(cid:88)
g(xk
h; W0)(rk
h + ̃Vh+1(sk
h+1) + ξk,i
h ) + (Λh − λImd)ζ i
h
(cid:35)
− ζ i
h
k∈Ih
(cid:34)
(cid:88)
k∈Ih
g(xk
h; W0)(rk
h + ̃Vh+1(sk
h+1) + ξk,i
h ) − λζ i
h
(cid:35)
= ˆWh + Λ−1
h
(cid:34)
(cid:88)
k∈Ih
g(xk
h; W0)ξk,i
h − λζ i
h
By direct computation, it is easy to see that
(cid:35)
(cid:35)
̃W i
h − ˆWh = Λ−1
h
(cid:34)
(cid:88)
k∈Ih
g(xk
h; W0)ξk,i
h − λζ i
h
∼ N (0, σ2
hΛ−1
h ).
F.3 PROOF OF LEMMA E.3
In this subsection, we provide a proof for E.3. We first provide a bound for the perturbed noises
used in Algorithm 1 in the following lemma.
Lemma F.1. There exist absolute constants c1, c2 > 0 such that for any δ > 0, event E(δ) holds
with probability at least 1 − δ, for any (k, h, i) ∈ [K] × [H] × [M ],
(cid:112)log(K (cid:48)HM/δ) =: γh,1,
(cid:112)d log(dK (cid:48)HM/δ) =: γh,2.
h | ≤ c1σh
h(cid:107)2 ≤ c2σh
|ξk,i
(cid:107)ζ i
Proof of Lemma F.1. It directly follows from the Gaussian concentration inequality in Lemma G.3
and the union bound.
We now can prove Lemma E.3.
Proof of Lemma E.3. By Lemma E.2,
Using the anti-concentration of Gaussian distribution, for any x = (s, a) ∈ S × A and any i ∈ [M ],
̃W i,lin
h − ˆW lin
h ∼ N (0, σ2
hΛ−1
h ).
(cid:16)
P
(cid:104)g(x; W0), ̃W i,lin
h
(cid:105) ≤ (cid:104)g(x; W0), ˆW lin
h (cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
h
(cid:17)
= Φ(−1) ∈ (0, 1).
As { ̃W i,lin
Φ(−1))M , for any x = (s, a) ∈ S × A, and h ∈ [H],
h
}i∈[M ] are independent, using the union bound, with probability at least 1 − SAH(1 −
min
i∈[M ]
(cid:104)g(x; W0), ̃W i,lin
h
(cid:105) ≤ (cid:104)g(x; W0), ˆW lin
h (cid:105) − σh(cid:107)g(x; W0)(cid:107)Λ−1
.
h
Setting δ = SAH(1 − Φ(−1))M completes the proof.
35
Published as a conference paper at ICLR 2023
F.4 PROOF OF LEMMA E.4
In this subsection, we provide a detailed proof of Lemma E.4. We first prove the following interme-
diate lemma whose proof is deferred to Subsection F.5.
Lemma F.2. Let
(cid:40)
and additionally let
(cid:16)
d3/2R−1 log3/2(
m = Ω
R = O (cid:0)m1/2 log−3 m(cid:1) .
√
(cid:17)
m/R)
(cid:26)η ≤ (K (cid:48)C 2
η ≤ 1
2λ .
g + λ/2)−1,
Then with probability at least 1 − M Hm−2 − δ, for any (i, j, h) ∈ [M ] × [J] × [H], if ̃W i,(j)
B(W0; R) for any j(cid:48) ∈ [j], then
h
∈
(cid:107)fj(cid:48) − ̃y(cid:107)2 (cid:46)
(cid:113)
K (cid:48)(H + ψ + γh,1)2 + λγ2
h,2 + (λη)−2R4/3m−1/6(cid:112)log m.
We now can prove Lemma E.4.
Proof of Lemma E.4. To simplify the notations, we define
h
)
(cid:17)
Gj :=
h − ̃W i,lin,(j)
∆j := ̃W i,(j)
(cid:16)
h; ̃W i,(j)
g(xk
h
j ∈ Rmd×md,
h; ̃W i,(j)
(cid:17)
Hj := GjGT
(cid:16)
fj :=
f (xk
(cid:17)
)
(cid:16)
h
̃y :=
̃yi,k
h
k∈Ih
∈ RK(cid:48)
.
k∈Ih
k∈Ih
∈ Rmd,
∈ Rmd×K(cid:48)
,
∈ RK(cid:48)
The gradient descent update rule for ̃W i,(j)
(cid:104)
h
in Equation (9) can be written as:
̃W i,(j+1)
h
= ̃W i,(j)
h − η
Gj(fj − ̃y) + λ( ̃W i,(j)
h + ζ i
h − W0)
(cid:105)
.
The auxiliary updates in Equation (15) can be written as:
̃W i,lin,(j+1)
h
= ̃W i,lin,(j)
h
− η
(cid:16)
(cid:104)
G0
GT
0 ( ̃W i,lin,(j)
h
− W0) − ̃y
(cid:17)
+ λ( ̃W i,lin,(j)
h
+ ζ i
(cid:105)
h − W0)
.
Step 1: Proving ̃W i,(j)
probability at least 1 − M Hm−2 − δ, for any (i, j, h) ∈ [M ] × [J] × [H], we have
∈ B(W0; R) for all j.
In the first step, we prove by induction that with
h
̃W i,(j)
h
∈ B(W0; R).
In the rest of the proof, we consider under the event that Lemma F.2 holds. Note that the condition
in Lemma E.4 satisfies that of Lemma F.2 and under the above event of Lemma F.2, Lemma G.1 and
Lemma F.1 both hold. It is trivial that
For any fix j ≥ 0, we assume that
̃W i,(0)
h = W0 ∈ B(W0; R).
̃W i,(j(cid:48))
h
∈ B(W0; R), ∀j(cid:48) ∈ [j].
(42)
We will prove that ̃W i,(j+1)
(cid:107)∆j+1(cid:107)2
h
∈ B(W0; R). We have
36
Published as a conference paper at ICLR 2023
=
(cid:13)
(cid:13)
(cid:13)
(cid:13)
(1 − ηλ)∆j − η
(cid:104)
G0(fj − GT
0 ( ̃W i,(j)
h − W0)) + G0GT
0 ( ̃W i,(j)
h − ̃W i,lin,(j)
h
) + (fj − ̃y)(Gj − G0)
(cid:105) (cid:13)
(cid:13)
(cid:13)
(cid:13)2
≤ (cid:107)(I − η(λI + H0))∆j(cid:107)2
(cid:125)
(cid:124)
(cid:123)(cid:122)
I1
+ η(cid:107)fj − ̃y(cid:107)2(cid:107)Gj − G0(cid:107)2
(cid:123)(cid:122)
(cid:125)
I2
(cid:124)
0 ( ̃W i,(j)
+ η(cid:107)G0(cid:107)2(cid:107)fj − GT
(cid:123)(cid:122)
I3
h − W0)(cid:107)2
(cid:125)
(cid:124)
.
We bound I1, I2 and I3 separately.
Bounding I1. For bounding I1,
I1 = (cid:107)(I − η(λI + H0))∆j(cid:107)2
≤ (cid:107)I − η(λI + H0)(cid:107)2(cid:107)∆j(cid:107)2
≤ (1 − η(λ + K (cid:48)C 2
g ))(cid:107)∆j(cid:107)2
≤ (1 − ηλ)(cid:107)∆j(cid:107)2
where the first inequality holds due to the spectral norm inequality, the second inequality holds due
to
η(λI + H0) (cid:22) η(λ + (cid:107)G0(cid:107)2)I (cid:22) η(λ + K (cid:48)C 2
g )I (cid:22) I,
where the first inequality holds due to that H0 (cid:22) (cid:107)H0(cid:107)2I (cid:22) (cid:107)G0(cid:107)2
due to that (cid:107)G0(cid:107)2 ≤
in Equation (40).
2I, the second inequality holds
KCg due to Lemma G.1, and the last inequality holds due to the choice of η
√
Bounding I2. For bounding I2,
I2 = η(cid:107)fj − ̃y(cid:107)2(cid:107)Gj − G0(cid:107)2
√
≤ η(cid:107)fj − ̃y(cid:107)2 max
k∈Ih
√
≤ η(cid:107)fj − ̃y(cid:107)2
(cid:113)
K (cid:48)(cid:107)g(xk
h; ̃W i,(j)
h
) − g(xk
h; W0)(cid:107)2
K (cid:48)CgR1/3m−1/6(cid:112)log m
≤ η
2K (cid:48)(H + ψ + γh,1)2 + λγ2
√
h,2 + 8CgR4/3m−1/6(cid:112)log m)
K (cid:48)CgR1/3m−1/6(cid:112)log m
where the first inequality holds due to Cauchy-Schwarz inequality, the second inequality holds due
to the induction assumption in Equation (42) and Lemma G.1, and the third inequality holds due to
Lemma F.2 and the induction assumption in Equation (42).
Bounding I3. For bounding I3,
I3 = η(cid:107)G0(cid:107)2(cid:107)fj − GT
√
√
0 ( ̃W i,(j)
h − W0)(cid:107)2
h; ̃W i,(j)
|f (xk
h
K (cid:48)Cg
≤ η
≤ ηK (cid:48)CgR4/3m−1/6(cid:112)log m,
K (cid:48) max
k∈Ih
) − g(xk
h; W0)T ( ̃W i,(j)
h − W0)|
K (cid:48)Cg
where the first inequality holds due to Cauchy-Schwarz inequality and due to that (cid:107)G0(cid:107)2 ≤
and the second inequality holds due to the induction assumption in Equation (42) and Lemma G.1.
√
Combining the bounds of I1, I2, I3 above, we have
Recursively applying the inequality above for all j, we have
(cid:107)∆j+1(cid:107)2 ≤ (1 − ηλ)(cid:107)∆j(cid:107)2 + I2 + I3.
(cid:107)∆j(cid:107)2 ≤
I2 + I3
ηλ
≤
R
4
+
R
4
=
R
2
,
(43)
where the second inequality holds due the choice specified in Equation (40). We also have
λ(cid:107) ̃W i,lin,(j+1)
h
+ ζ i
h − W0(cid:107)2
2 ≤ 2 ̃Li,lin
h
≤ 2 ̃Li,lin
h
( ̃W i,lin,(j+1)
h
( ̃W i,lin,(0)
h
)
)
37
Published as a conference paper at ICLR 2023
(W0)
= 2 ̃Li,lin
h
(cid:104)g(xk
(cid:124)
(cid:88)
=
k∈Ih
(cid:88)
=
h; W0), W0(cid:105)
(cid:125)
(cid:123)(cid:122)
=0
( ̃yi,k
h )2 + λ(cid:107)ζ i
h(cid:107)2
2
2
− ̃yi,k
h
+ λ(cid:107)ζ i
h(cid:107)2
2
k∈Ih
≤ K (cid:48)(H + ψ + γh,1)2 + λγ2
h,2,
(44)
where the first inequality holds due the the definition of ̃Li,lin
holds due to the monotonicity of ̃Li,lin
h
squared loss on a linear model, the third equality holds due to (cid:104)g(xk
symmetric initialization scheme, and the last inequality holds due to Lemma F.1. Thus, we have
), the second inequality
}j(cid:48) for the
h; W0), W0(cid:105) = 0 from the
(W ) on the gradient descent updates { ̃W i,lin,(j(cid:48))
( ̃W i,lin,(j+1)
h
h
h
(cid:107) ̃W i,lin,(j+1)
h
− W0(cid:107)2 ≤
≤
≤
(cid:113)
(cid:113)
2(cid:107) ̃W i,lin,(j+1)
h
+ ζ i
h − W0(cid:107)2
2 + (cid:107)ζ i
h(cid:107)2
2
2λ−1K (cid:48)(H + ψ + γh,1)2 + 4γ2
h,2
R
2
,
(45)
where the first inequality holds due to Cauchy-Schwarz inequality, the second inequality holds due
to Equation (44) and Lemma F.1, and the last inequality holds due to the choice specified in Equation
(40).
Combining Equation (43) and Equation (45), we have
(cid:107) ̃W i,(j+1)
h
− W0(cid:107)2 ≤ (cid:107) ̃W i,(j+1)
h
− ̃W i,lin,(j+1)
h
(cid:107)2 + (cid:107) ̃W i,lin,(j+1)
h
− W0(cid:107)2
where the first inequality holds due to the triangle inequality.
≤
R
2
+
R
2
= R,
Step 2: Bounding (cid:107) ̃W i,(j)
regression, ̃W i,(j)
h − ̃W i,lin
converges to ̃W i,lin
h
h
h
with the convergence rate,
(cid:107)2. By the standard result of gradient descent on ridge linear
(cid:107) ̃W i,lin,(j)
h
− ̃W i,lin
h
( ̃L(W0) − ̃L( ̃W i,lin
2 ≤ (1 − ηλ)j 2
(cid:107)2
λ
≤ (1 − ηλ)j 2
λ
≤ λ−1(1 − ηλ)j (cid:0)K (cid:48)(H + ψ + γh,1)2 + λγ2
̃L(W0)
))
h
h,2
(cid:1) .
Thus, for any j, we have
h − ̃W i,lin
(cid:107) ̃W i,(j)
h
(cid:107)2 ≤ (cid:107) ̃W i,(j)
h − ̃W i,lin,(j)
(cid:107)2 + (cid:107) ̃W i,lin,(j)
h
≤ (ηλ)−1(I2 + I3) + λ−1(1 − ηλ)j (cid:0)K (cid:48)(H + ψ + γh,1)2 + λγ2
− ̃W i,lin
h
(cid:107)2
h
(cid:1) ,
(46)
h,2
where the first inequality holds due to the triangle inequality, the second inequality holds due to
Equation (43) and Equation (46).
F.5 PROOF OF LEMMA F.2
Proof of Lemma F.2. We bound this term following the proof flow of (Zhou et al., 2020, Lemma C.3)
with modifications for different neural parameterization and noisy targets. Suppose that for some
fixed j,
̃W i,(j(cid:48))
h
∈ B(W0; R), ∀j(cid:48) ∈ [j].
(47)
Let us define
G(W ) := (cid:0)g(xk
h; W )(cid:1)
∈ Rmd×K(cid:48)
,
k∈Ih
38
2 is 1-smooth,
1
2
Published as a conference paper at ICLR 2023
f (W ) := (cid:0)f (xk
h; W )(cid:1)
∈ RK(cid:48)
,
k∈Ih
e(W (cid:48), W ) := f (W (cid:48)) − f (W ) − G(W )T (W (cid:48) − W ) ∈ R.
To further simplify the notations in this proof, we drop i, h in ̃Li
write ̃Li
, where
h(W ) as ̃L(W ) and write Wj = W i,(j)
1
2
̃L(W ) =
f (xk
(cid:88)
(cid:16)
h
k∈Ih
h; W ) − ̃yi,k
h )
(cid:17)2
+
λ
2
(cid:107)W + ζ i
h − W0(cid:107)2
2
h(W ) defined in Equation (8) to
=
1
2
(cid:107)f (W ) − ̃y(cid:107)2
2 +
λ
2
(cid:107)W + ζ i
h − W0(cid:107)2
2.
Suppose that W ∈ B(W0; R). By that (cid:107) * (cid:107)2
̃L(W (cid:48)) − ̃L(W ) ≤ (cid:104)f (W ) − ̃y, f (W (cid:48)) − f (W )(cid:105) +
(cid:107)f (W (cid:48)) − f (W )(cid:107)2
2
+ λ(cid:104)W + ζ i
h − W0, W (cid:48) − W (cid:105) +
λ
2
(cid:107)W (cid:48) − W (cid:107)2
2
= (cid:104)f (W ) − ̃y, G(W )T (W (cid:48) − W ) + e(W (cid:48), W )(cid:105) +
+ λ(cid:104)W + ζ i
h − W0, W (cid:48) − W (cid:105) +
= (cid:104)∇ ̃L(W ), W (cid:48) − W (cid:105)
λ
2
(cid:107)W (cid:48) − W (cid:107)2
2
1
2
(cid:107)G(W )T (W (cid:48) − W ) + e(W (cid:48), W )(cid:107)2
2
+ (cid:104)f (W ) − ̃y, e(W (cid:48), W )(cid:105) +
(cid:124)
For bounding I1,
1
2
(cid:107)G(W )T (W (cid:48) − W ) + e(W (cid:48), W )(cid:107)2
2 +
(cid:123)(cid:122)
I1
λ
2
(cid:107)W (cid:48) − W (cid:107)2
2
(cid:125)
.
(48)
I1 ≤ (cid:107)f (W ) − ̃y(cid:107)2(cid:107)e(W (cid:48), W )(cid:107)2 + K (cid:48)C 2
= (cid:107)f (W ) − ̃y(cid:107)2(cid:107)e(W (cid:48), W )(cid:107)2 + (K (cid:48)C 2
2 + (cid:107)e(W (cid:48), W )(cid:107)2
g (cid:107)W (cid:48) − W (cid:107)2
g + λ/2)(cid:107)W (cid:48) − W (cid:107)2
2 +
2 + (cid:107)e(W (cid:48), W )(cid:107)2
2,
(cid:107)W (cid:48) − W (cid:107)2
2
(49)
λ
2
where the first inequality holds due to Cauchy-Schwarz inequality, W ∈ B(W0; R) and Lemma G.1.
Substituting Equation (49) into Equation (48) with W (cid:48) = W − η∇ ̃L(W ),
̃L(W (cid:48)) − ̃L(W ) ≤ −η(1 − (KC 2
g + λ/2)η)(cid:107)∇ ̃L(W )(cid:107)2
+ (cid:107)e(W (cid:48), W )(cid:107)2
2.
2 + (cid:107)f (W ) − ̃y(cid:107)2(cid:107)e(W (cid:48), W )(cid:107)2
(50)
By the 1-strong convexity of (cid:107) * (cid:107)2
2, for any W (cid:48),
̃L(W (cid:48)) − ̃L(W ) ≥ (cid:104)f (W ) − ̃y, f (W (cid:48)) − f (W )(cid:105) + λ(cid:104)W + ζ i
h − W0, W (cid:48) − W (cid:105) +
= (cid:104)f (W ) − ̃y, G(W )T (W (cid:48) − W ) + e(W (cid:48), W )(cid:105) + λ(cid:104)W + ζ i
h − W0, W (cid:48) − W (cid:105) +
= (cid:104)∇ ̃L(W ), W (cid:48) − W (cid:105) + (cid:104)f (W ) − ̃y, e(W (cid:48), W )(cid:105) +
≥ −
(cid:107)∇ ̃L(W )(cid:107)2
2
2λ
− (cid:107)f (W ) − ̃y(cid:107)2(cid:107)e(W (cid:48), W )(cid:107)2,
λ
2
(cid:107)W (cid:48) − W (cid:107)2
2
where the last inequality holds due to Cauchy-Schwarz inequality.
Substituting Equation (51) into Equation (50), for any W (cid:48),
̃L(W − η∇ ̃L(W )) − ̃L(W )
λ
2
λ
2
(cid:107)W (cid:48) − W (cid:107)2
2
(cid:107)W (cid:48) − W (cid:107)2
2
(51)
≤ 2λη(1 − (KC 2
(cid:123)(cid:122)
α
(cid:124)
g + λ/2)η)
(cid:125)
(cid:16) ̃L(W (cid:48)) − ̃L(W ) + (cid:107)f (W ) − ̃y(cid:107)2(cid:107)e(W (cid:48), W )(cid:107)2
(cid:17)
+ (cid:107)f (W ) − ̃y(cid:107)2(cid:107)e(W − η∇ ̃L(W ), W )(cid:107)2 + (cid:107)e(W − η∇ ̃L(W ), W )(cid:107)2
2
39
Published as a conference paper at ICLR 2023
≤ α
+
γ2
2
(cid:18)
≤ α
(cid:18)
̃L(W (cid:48)) − ̃L(W ) +
γ1
2
(cid:107)f (W ) − ̃y(cid:107)2
2 +
(cid:19)
(cid:107)e(W (cid:48), W )(cid:107)2
2
1
2γ1
(cid:107)f (W ) − ̃y(cid:107)2
2 +
(cid:107)e(W − η∇ ̃L(W ), W )(cid:107)2
2 + (cid:107)e(W − η∇ ̃L(W ), W )(cid:107)2
2
1
2γ2
̃L(W (cid:48)) − ̃L(W ) + γ1 ̃L(W ) +
(cid:19)
(cid:107)e(W (cid:48), W )(cid:107)2
2
1
2γ1
+ γ2 ̃L(W ) +
1
2γ2
(cid:107)e(W − η∇ ̃L(W ), W )(cid:107)2
2 + (cid:107)e(W − η∇ ̃L(W ), W )(cid:107)2
2,
(52)
where the second inequality holds due to Cauchy-Schwarz inequality for any γ1, γ2 > 0, and the
2 ≤ 2 ̃L(W ).
third inequality holds due to (cid:107)f (W ) − ̃y(cid:107)2
Rearranging terms in Equation (52) and setting W = Wj, W (cid:48) = W0, γ1 = 1
4 , γ2 = α
4 ,
̃L(Wj+1) − ̃L(W0) ≤ (1 − α + αγ1 + γ2) ̃L(Wj) − (1 −
α
2
) ̃L(W0) +
α
2
̃L(W0)
+
α
2γ1
= (1 −
+ (1 +
≤ (1 −
α
2
2
α
α
2
(cid:107)e(W0, Wj)(cid:107)2
1
2 +
2γ2
(cid:17)
(cid:16) ̃L(Wj) − ̃L(W0)
)
+
)(cid:107)e(Wj+1, Wj)(cid:107)2
2
(cid:17)
(cid:16) ̃L(Wj) − ̃L(W0)
)
+
(cid:107)e(Wj+1, Wj)(cid:107)2
2 + (cid:107)e(Wj+1, Wj)(cid:107)2
2
α
2
α
2
̃L(W0) + 2α(cid:107)e(W0, Wj)(cid:107)2
2
̃L(W0) + (1 +
2
α
+ 2α)e,
(53)
log m, the last inequality holds due to Equation (47) and Lemma G.1.
where e := CgR4/3m−1/6√
Applying Equation (53), we have
̃L(Wj) − ̃L(W0) ≤
(cid:18) α
2
2
α
̃L(W0) + (1 +
(cid:19)
+ 2α)e
.
2
α
Rearranging the above inequality,
4
α2 + 4)e
where the last inequality holds due to the choice of η. Finally, we have
̃L(Wj) ≤ 2 ̃L(W0) + (
2
α
+
and ̃L(W0) = 1
2 (cid:107) ̃y(cid:107)2
2 + λ
2 (cid:107)ζ i
h(cid:107)2
2 ≤ K(cid:48)
2 γ2
h,2 due to Lemma F.1.
(cid:107)fj − ̃y(cid:107)2
2 ≤ 2 ̃L(Wj)
2 (H + ψ + γh,1)2 + λ
G SUPPORT LEMMAS
(cid:16)
√
(cid:17)
and R = O (cid:0)m1/2 log−3 m(cid:1). With probabil-
Lemma G.1. Let m = Ω
m/R)
ity at least 1 − e−Ω(log2 m) ≥ 1 − m−2 with respect to the random initialization, it holds for any
W, W (cid:48) ∈ B(W0; R) and x ∈ Sd−1 that
d3/2R−1 log3/2(
(cid:107)g(x; W )(cid:107)2 ≤ Cg,
(cid:16)
(cid:107)g(x; W ) − g(x; W0)(cid:107)2 ≤ O
|f (x; W ) − f (x; W (cid:48)) − (cid:104)g(x; W (cid:48)), W − W (cid:48)(cid:105)| ≤ O
(cid:16)
(cid:17)
CgR1/3m−1/6(cid:112)log m
(cid:17)
CgR4/3m−1/6(cid:112)log m
,
,
where Cg = O(1) is a constant independent of d and m. Moreover, without loss of generality, we
assume Cg ≤ 1.
Proof of Lemma G.1. Due to (Yang et al., 2020, Lemma C.2) and (Cai et al., 2019, Lemma F.1, F.2),
we have the first two inequalities and the following:
|f (x; W ) − (cid:104)g(x; W0), W − W0(cid:105)| ≤ O
(cid:16)
(cid:17)
CgR4/3m−1/6(cid:112)log m
.
40
Published as a conference paper at ICLR 2023
For any W, W (cid:48) ∈ B(W0; R),
f (x; W ) − f (x; W (cid:48)) − (cid:104)g(x; W (cid:48)), W − W (cid:48)(cid:105)
= f (x; W ) − (cid:104)g(x; W0), W − W0(cid:105) − (f (x; W (cid:48)) − (cid:104)g(x; W0), W (cid:48) − W0(cid:105))
+ (cid:104)g(x; W0) − g(x; W (cid:48)), W0 − W (cid:48)(cid:105).
Thus,
|f (x; W ) − f (x; W (cid:48)) − (cid:104)g(x; W (cid:48)), W − W (cid:48)(cid:105)|
≤ |f (x; W ) − (cid:104)g(x; W0), W − W0(cid:105)| + |f (x; W (cid:48)) − (cid:104)g(x; W0), W (cid:48) − W0(cid:105)|
+ (cid:107)g(x; W0) − g(x; W (cid:48))(cid:107)2(cid:107)W0 − W (cid:48)(cid:107)2 ≤ O
(cid:16)
(cid:17)
CgR4/3m−1/6(cid:112)log m
.
Lemma G.2 ((Arora et al., 2019, Theorem 3)). If m = Ω((cid:15)−4 log(1/δ)), then for any x, x(cid:48) ∈ X ⊂
Sd−1, with probability at least 1 − δ,
|(cid:104)g(x; W0), g(x(cid:48), W0)(cid:105) − Kntk(x, x(cid:48))| ≤ 2(cid:15).
Lemma G.3. Let X ∼ N (0, aΛ−1) be a d-dimensional normal variable where a is a scalar. There
exists an absolute constant c > 0 such that for any δ > 0, with probability at least 1 − δ,
√
(cid:107)X(cid:107)Λ ≤ c(cid:112)da log(d/δ).
2.
For d = 1, c =
Lemma G.4 (A variant of Hoeffding-Azuma inequality). Suppose {Zk}∞
k=0 is a real-valued
stochastic process with corresponding filtration {Fk}∞
k=0, i.e. ∀k, Zk is Fk-measurable. Suppose
that for any k, E[|Zk|] < ∞ and |Zk − E [Zk|Fk−1] | ≤ ck almost surely. Then for all positive n
and t, we have:
P
(cid:32)(cid:12)
(cid:12)
(cid:12)
(cid:12)
n
(cid:88)
k=1
Zk −
n
(cid:88)
k=1
E [Zk|Fk−1]
(cid:33)
≥ t
≤ 2 exp
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:18) −t2
(cid:80)n
i=1 c2
i
(cid:19)
.
Lemma G.5 ((Chowdhury & Gopalan, 2017, Theorem 1)). Let H be an RKHS defined over X ⊆
Rd. Let {xt}∞
t=1 be a discrete time stochastic process adapted to filtration {Ft}∞
k=1
be a real-valued stochastic process such that Zk ∈ Fk, and Zk is zero-mean and σ-sub Gaussian
conditioned on Fk−1. Let Ek = (Z1, . . . , Zk−1)T ∈ Rk−1 and Kk be the Gram matrix of H defined
on {xt}t≤k−1. For any ρ > 0 and δ ∈ (0, 1), with probability at least 1 − δ,
t=0. Let {Zk}∞
ET
k
(cid:2)(Kk + ρI)−1 + I(cid:3)−1
Ek ≤ σ2 logdet [(1 + ρ)I + Kk] + 2σ2 log(1/δ).
Lemma G.6. For any matrices A and B where A is invertible,
logdet(A + B) ≤ logdet(A) + tr(A−1B).
Lemma G.7. For any invertible matrices A, B,
(cid:107)A−1 − B−1(cid:107)2 ≤
(cid:107)A − B(cid:107)2
λmin(A)λmin(B)
.
Proof of Lemma G.7. We have:
(cid:107)A−1 − B−1(cid:107)2 = (cid:107)(AB)−1(AB)(A−1 − B−1)(cid:107)2
= (cid:107)(AB)−1(ABA−1 − A)(cid:107)2
≤ (cid:107)(AB)−1(cid:107)2(cid:107)ABA−1 − A(cid:107)2
= (cid:107)(AB)−1(cid:107)2(cid:107)ABA−1 − AAA−1(cid:107)2
= (cid:107)(AB)−1(cid:107)2(cid:107)A(B − A)A−1(cid:107)2
= (cid:107)(AB)−1(cid:107)2(cid:107)B − A(cid:107)2
≤ λmax(A−1)λmax(B−1)(cid:107)2(cid:107)B − A(cid:107)2.
41
Published as a conference paper at ICLR 2023
Lemma G.8 (Freedman's inequality (Tropp, 2011)). Let {Xk}n
gale difference sequence with the corresponding filtration {Fk}n
and E[Xk|Fk−1] = 0.
(cid:80)n
k=1 be a real-valued martin-
k=1, i.e. Xk is Fk-measurable
|Xk| ≤ M almost surely and define V :=
E (cid:2)X 2
k |Fk−1
k=1
Suppose for any k,
(cid:3). For any a, b > 0, we have:
(cid:33)
(cid:32) n
(cid:88)
P
Xk ≥ a, V ≤ b
≤ exp
(cid:18)
−a2
2b + 2aM/3
(cid:19)
.
In an alternative form, for any t > 0, we have:
k=1
(cid:32) n
(cid:88)
P
k=1
Xk ≥
√
2M t
3
+
(cid:33)
2bt, V ≤ b
≤ e−t.
Lemma G.9 (Improved online-to-batch argument Nguyen-Tang et al. (2023)). Let {Xk} be any
real-valued stochastic process adapted to the filtration {Fk}, i.e. Xk is Fk-measurable. Suppose
that for any k, Xk ∈ [0, H] almost surely for some H > 0. For any K > 0, with probability at least
1 − δ, we have:
K
(cid:88)
k=1
E [Xk|Fk−1] ≤ 2
K
(cid:88)
k=1
Xk +
16
3
H log(log2(KH)/δ) + 2.
Proof of Lemma G.9 . Let Zk = Xk − E [Xk|Fk−1] and f (K) = (cid:80)K
is a real-valued difference martingale with the corresponding filtration {Fk} and that
k=1
E [Xk|Fk−1]. We have Zk
V :=
K
(cid:88)
k=1
E (cid:2)Z 2
k|Fk−1
(cid:3) ≤
K
(cid:88)
k=1
E (cid:2)X 2
k |Fk−1
(cid:3) ≤ H
K
(cid:88)
k=1
E [Xk|Fk−1] = Hf (K).
Note that |Zk| ≤ H and f (K) ∈ [0, KH] and let m = log2(KH). Also note that f (K) =
(cid:80)K
k=1 Zk ≤ −1, we have f (K) ≥ 1. For any t > 0,
leveraging the peeling technique (Bartlett et al., 2005), we have:
k=1 Zk. Thus if (cid:80)K
k=1 Zk ≥ − (cid:80)K
k=1 Xk − (cid:80)K
(cid:32) K
(cid:88)
P
k=1
Zk ≤ −
2Ht
3
− (cid:112)4Hf (K)t − 1
(cid:33)
= P
(cid:32) K
(cid:88)
k=1
Zk ≤ −
2Ht
3
− (cid:112)4Hf (K)t − 1, f (K) ∈ [1, KH]
(cid:33)
(cid:32) K
(cid:88)
k=1
(cid:32) K
(cid:88)
k=1
(cid:32) K
(cid:88)
k=1
Zk ≤ −
2Ht
3
− (cid:112)4Hf (K)t − 1, f (K) ∈ [2i−1, 2i)
(cid:33)
Zk ≤ −
Zk ≤ −
√
√
2Ht
3
−
2Ht
3
−
4H2i−1t − 1, V ≤ H2i, f (K) ∈ [2i−1, 2i)
(cid:33)
(cid:33)
2H2it, V ≤ H2i
P
P
e−t = me−t,
m
(cid:88)
P
≤
i=1
m
(cid:88)
i=1
m
(cid:88)
i=1
m
(cid:88)
i=1
≤
≤
≤
3 − (cid:112)4Hf (K)t − 1 ≤ −1 thus f (K) ≥ 1,
where the first equation is by that (cid:80)K
the second inequality is by that V ≤ Hf (K), and the last inequality is by Lemma G.8. Thus, with
probability at least 1 − me−t, we have:
k=1 Zk ≤ − 2Ht
K
(cid:88)
k=1
Xk − f (K) =
K
(cid:88)
k=1
Zk ≥ −
2Ht
3
− (cid:112)4Hf (K)t − 1.
The above inequality implies that f (K) ≤ 2 (cid:80)K
inequality: if x ≤ a
√
x + b, x ≤ a2 + 2b. Then setting t = log(m/δ) completes the proof.
k=1 Xk + 4Ht/3 + 2 + 4Ht, due to the simple
42
Published as a conference paper at ICLR 2023
H BASELINE ALGORITHMS
For completeness, we give the definition of linear MDPs as follows.
Definition 4 (Linear MDPs (Yang & Wang, 2019; Jin et al., 2020)). An MDP has a linear structure
if for any (s, a, s(cid:48), h), we have:
rh(s, a) = φh(s, a)T θh, Ph(s(cid:48)|s, a) = φh(s, a)T μh(s(cid:48)),
where φ : S × A → Rdlin is a known feature map, θh ∈ Rdlin is an unknown vector, and μh : S →
Rdlin are unknown signed measures.
We also give the details of the baseline algorithms: LinLCB in Algorithm 3, LinGreedy in Algorithm
4, Lin-VIPeR in Algorithm 5, NeuraLCB in Algorithm 6 and NeuralGreedy in Algorithm 7. For
simplicity, we do not use data split in these algorithms presented here.
Algorithm 3 LinLCB (Jin et al., 2021)
h, ak
1: Input: Offline data D = {(sk
h, rk
h)}k∈[K]
h∈[H], uncertainty multiplier β, regularization parameter
λ.
2: Initialize ̃VH+1(*) ← 0
3: for h = H, . . . , 1 do
Λh ← (cid:80)K
k=1 φ(sk
h)φ(sk
h, ak
4:
(cid:80)K
ˆθh ← Σ−1
h) * (rk
h, ak
h
bh(*, *) ← β * (cid:107)φh(*, *)(cid:107)Σ−1
.
ˆQh(*, *) ← min{(cid:104)φh(*, *), ˆθh(cid:105) − bh(*, *), H − h + 1}+.
(cid:104) ˆQh, πh(cid:105) and ˆV k
ˆπh ← arg maxπh
h, ak
k=1 φh(sk
h + ˆVh+1(sk
h ← (cid:104) ˆQk
h)T + λI
h+1))
h, πk
5:
6:
h(cid:105).
h
7:
8:
9: end for
10: Output: ˆπ = {ˆπh}h∈[H]
h)}k∈[K]
h∈[H], perturbed variances {σh}h∈[H], number of boot-
Algorithm 4 LinGreedy
1: Input: Offline data D = {(sk
h, rk
straps M , regularization parameter λ.
h, ak
(cid:80)K
2: Initialize ̃VH+1(*) ← 0
3: for h = H, . . . , 1 do
ˆθh ← Σ−1
h + ˆVh+1(sk
4:
h
ˆQh(*, *) ← min{(cid:104)φh(*, *), ˆθh(cid:105), H − h + 1}+.
h, πk
ˆπh ← arg maxπh
(cid:104) ˆQh, πh(cid:105) and ˆV k
5:
6:
7: end for
8: Output: ˆπ = {ˆπh}h∈[H]
h ← (cid:104) ˆQk
k=1 φh(sk
h) * (rk
h, ak
h(cid:105).
h+1))
43
Published as a conference paper at ICLR 2023
Algorithm 5 Lin-VIPeR
1: Input: Offline data D = {(sk
h, rk
straps M , regularization parameter λ.
h, ak
h)}k∈[K]
h∈[H], perturbed variances {σh}h∈[H], number of boot-
2: Initialize ̃VH+1(*) ← 0
3: for h = H, . . . , 1 do
Λh ← (cid:80)K
h, ak
k=1 φ(sk
4:
for i = 1, . . . , M do
5:
Sample {ξτ,i
6:
Solve the perturbed regularized least-squares regression:
7:
h }τ ∈[K] ∼ N (0, σ2
h = {ζ j,i
h)T + λI
h) and ζ i
h)φ(sk
h, ak
h }j∈[d] ∼ N (0, σ2
hId)
̃θi
h ← arg max
θ∈Rd
K
(cid:88)
(cid:16)
k=1
(cid:104)φ(sk
h, ak
h), θ(cid:105) − (rk
h + ̃Vh+1(sk
h+1) + ξk,i
h )
(cid:17)2
+ λ(cid:107)θ + ζ i
h(cid:107)2
2,
8:
9:
end for
Compute ̃Qh(*, *) ← min{mini∈[M ](cid:104)φ(*, *), ̃θi
(cid:104) ̃Qh, πh(cid:105) and ̃Vh ← (cid:104) ̃Qh, ̃πh(cid:105)
̃πh ← arg maxπh
10:
11: end for
12: Output: ̃π = { ̃πh}h∈[H]
h(cid:105), H − h + 1}+
Algorithm 6 NeuraLCB (a modification of (Nguyen-Tang et al., 2022a))
h, ak
1: Input: Offline data D = {(sk
h∈[H], neural networks F = {f (*, *; W ) : W ∈ W} ⊂
{X → R}, uncertainty multiplier β, regularization parameter λ, step size η, number of gradient
descent steps J
h)}k∈[K]
h, rk
2: Initialize ̃VH+1(*) ← 0 and initialize f (*, *; W ) with initial parameter W0
3: for h = H, . . . , 1 do
4:
h)}k∈[K], 0, W0) (Algorithm 2)
ˆWh ← GradientDescent(λ, η, J, {(sk
Λh = λI + (cid:80)K
h; ˆWh)g(xk
k=1 g(sk
Compute ˆQh(*, *) ← min{f (*, *; ˆWh) − β(cid:107)g(*, *; ˆWh)(cid:107)Λ−1
ˆπh ← arg maxπh
(cid:104) ˆQh, πh(cid:105) and ˆVh ← (cid:104) ˆQh, ˆπh(cid:105)
h, ak
h, rk
h; ˆWh)T
h, ak
h
, H − h + 1}+
5:
6:
7:
8: end for
9: Output: ˆπ = {ˆπh}h∈[H].
Algorithm 7 NeuralGreedy
1: Input: Offline data D = {(sk
h)}k∈[K]
{X → R}, uncertainty multiplier β, step size η, number of gradient descent steps J
h∈[H], neural networks F = {f (*, *; W ) : W ∈ W} ⊂
h, ak
h, rk
2: Initialize ̃VH+1(*) ← 0 and initialize f (*, *; W ) with initial parameter W0
3: for h = H, . . . , 1 do
4:
h)}k∈[K], 0, W0) (Algorithm 2)
ˆWh ← GradientDescent(λ, η, J, {(sk
Compute ˆQh(*, *) ← min{f (*, *; ˆWh), H − h + 1}+
ˆπh ← arg maxπh
(cid:104) ˆQh, πh(cid:105) and ˆVh ← (cid:104) ˆQh, ˆπh(cid:105)
h, ak
h, rk
5:
6:
7: end for
8: Output: ˆπ = {ˆπh}h∈[H].
44
|
|
http://arxiv.org/abs/2302.12766v1 | 2023-02-24T17:29:31 | 2023-02-24T17:29:31 | Language-Driven Representation Learning for Robotics | Recent work in visual representation learning for robotics demonstrates the
viability of learning from large video datasets of humans performing everyday
tasks. Leveraging methods such as masked autoencoding and contrastive learning,
these representations exhibit strong transfer to policy learning for visuomotor
control. But, robot learning encompasses a diverse set of problems beyond
control including grasp affordance prediction, language-conditioned imitation
learning, and intent scoring for human-robot collaboration, amongst others.
First, we demonstrate that existing representations yield inconsistent results
across these tasks: masked autoencoding approaches pick up on low-level spatial
features at the cost of high-level semantics, while contrastive learning
approaches capture the opposite. We then introduce Voltron, a framework for
language-driven representation learning from human videos and associated
captions. Voltron trades off language-conditioned visual reconstruction to
learn low-level visual patterns, and visually-grounded language generation to
encode high-level semantics. We also construct a new evaluation suite spanning
five distinct robot learning problems $\unicode{x2013}$ a unified platform for
holistically evaluating visual representations for robotics. Through
comprehensive, controlled experiments across all five problems, we find that
Voltron's language-driven representations outperform the prior
state-of-the-art, especially on targeted problems requiring higher-level
features. | [
"Siddharth Karamcheti",
"Suraj Nair",
"Annie S. Chen",
"Thomas Kollar",
"Chelsea Finn",
"Dorsa Sadigh",
"Percy Liang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12766v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12766v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.RO",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.RO",
"cs.AI",
"cs.CL",
"cs.CV",
"cs.LG"
] | Language-Driven Representation Learning for Robotics
Siddharth Karamcheti
Stanford University
[email protected]
Suraj Nair
Stanford University
[email protected]
Annie Chen
Stanford University
[email protected]
Thomas Kollar
Toyota Research Institute
Chelsea Finn
Stanford University
Dorsa Sadigh
Stanford University
Percy Liang
Stanford University
3
2
0
2
b
e
F
4
2
]
O
R
.
s
c
[
1
v
6
6
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Recent work in visual representation learning for robotics demon-
strates the viability of learning from large video datasets of humans
performing everyday tasks. Leveraging methods such as masked au-
toencoding and contrastive learning, these representations exhibit
strong transfer to policy learning for visuomotor control. But, robot
learning encompasses a diverse set of problems beyond control
including grasp affordance prediction, language-conditioned imi-
tation learning, and intent scoring for human-robot collaboration,
amongst others. First, we demonstrate that existing representations
yield inconsistent results across these tasks: masked autoencoding
approaches pick up on low-level spatial features at the cost of high-
level semantics, while contrastive learning approaches capture the
opposite. We then introduce Voltron, a framework for language-
driven representation learning from human videos and associated
captions. Voltron trades off language-conditioned visual recon-
struction to learn low-level visual patterns, and visually-grounded
language generation to encode high-level semantics. We also con-
struct a new evaluation suite spanning five distinct robot learning
problems – a unified platform for holistically evaluating visual rep-
resentations for robotics. Through comprehensive, controlled ex-
periments across all five problems, we find that Voltron's language-
driven representations outperform the prior state-of-the-art, espe-
cially on targeted problems requiring higher-level features.1
1 Introduction
Good words are worth much, and cost little.
- George Herbert
Realizing a future of ubiquitous, broadly capable robots is predi-
cated on systems capable of generalizable perception and interac-
tion [Weiss et al. 1987; Chaumette and Hutchinson 2006; Levine et al.
2016]. Towards this goal, recent work in robotics present approaches
for learning visual representations to bootstrap learning for visuo-
motor control [Parisi et al. 2022; Nair et al. 2022; Radosavovic et al.
2022]. Critically, these approaches show that we can learn such
representations from real-world videos of human behavior – specifi-
cally, egocentric video datasets such as Something-Something-v2
and Ego4D [Goyal et al. 2017; Grauman et al. 2022] – instead of
solely relying on in-domain robotics data that is scarce and expen-
sive. While prior work has developed and evaluated representations
for visuomotor control, robot learning is an expansive discipline,
1Project Page: https://sites.google.com/view/voltron-robotics
Model Artifacts & Pretraining Code: https://github.com/siddk/voltron-robotics
Evaluation Suite: https://github.com/siddk/voltron-evaluation
1
spanning a diverse spectrum of problems: predicting grasp proposals
from visual input [Saxena et al. 2008; Mahler et al. 2017], language-
conditioned imitation learning [Tellex et al. 2011] and belief/intent
tracking for human-robot interaction [Hauser 2012; Javdani et al.
2018], amongst others. Broadening our focus to problems beyond
learning for control enables us to develop flexible, generalizable
representations that capture both low-level spatial reasoning and
high-level semantic understanding – a flexibility that is a key prereq-
uisite to realizing a foundation model for robotics [Bommasani et al.
2021]. Thus, we ask: how can we learn visual representations that
generalize across the diverse spectrum of problems in robot learning?
Recent approaches for learning visual representations for robot-
ics use pretraining objectives that reflect different inductive biases
for what the learned representations should capture. Masked Visual
Pretraining [MVP; Radosavovic et al. 2022] proposes using masked
autoencoding [He et al. 2022] to prioritize visual reconstruction
from heavily masked video frames, encoding representations that
facilitate per-pixel reconstruction. Separately, Reusable Represen-
tations for Robotic Manipulation [R3M; Nair et al. 2022] eschews
pixel reconstruction for two contrastive learning objectives: time
contrastive learning [Sermanet et al. 2018] and video-language
alignment. These approaches show strong performance on imita-
tion learning in simulated and real-world settings, with sizeable
improvements over strong alternatives such as ResNet or CLIP
features [He et al. 2016; Radford et al. 2021]; however, they have
not been evaluated beyond these settings. As a first contribution,
we evaluate these representations on problems beyond control and
identify inconsistent evaluation performance, with huge penalties
depending on the approach and specific application. MVP performs
well on problems such as grasp affordance prediction, but struggles
with higher-level problems such as language-conditioned imita-
tion. R3M instead excels at the higher-level problems, but degrades
completely on problems such as grasp affordance prediction.
Motivated by this, we present Voltron, a framework for language-
driven visual representation learning for robotics that learns rep-
resentations that capture both low-level and high-level features,
empirically outperforming prior approaches over all applications.
Voltron models take videos and associated language captions as
input to a masked autoencoding pipeline, reconstructing one (or
more) frames from a masked context. The novelty of our frame-
work is in how we use language supervision. Depending on a tunable
probability α, we either condition on (α = 0), or generate (α > 0)
the associated caption. Explicitly conditioning on words in differ-
ent contexts allows for low-level pattern recognition at the local,
spatial level, while generating language from our learned visual
Karamcheti et. al.
Figure 1: Voltron Evaluation Suite. We introduce a suite of evaluation problems spanning five applications within robotics, including
grasp affordance prediction, referring expression grounding, single-task visuomotor control (in simulation), language-conditioned imitation
learning (on a real robot), and intent scoring.
encoding allow us to infer higher-level features around affordances
and intents. Furthermore, guided by the hypothesis that language is
especially useful in describing change, we study dual-frame contexts
consisting of the initial and current observation in multi-timestep
tasks. Altogether, we examine three different Voltron variants: V
– Cond (Language Conditioning: single frame, α = 0), V – Dual
(Adding Context: dual-frame conditioning, α = 0), and V – Gen
(Adding Language Generation: dual-frame, α = 0.5 – we find that
α = 1 with no language-conditioning at all hurts performance).
To evaluate Voltron and other visual representation learning
approaches, we assemble a new evaluation suite (depicted in Fig-
ure 1) spanning five problem domains within robotics: 1) dense
segmentation for grasp affordance prediction [Zeng et al. 2017], 2)
object detection from referring expressions (e.g., "the blue coffee
mug to the left of the plate") in cluttered scenes [Wang et al. 2021],
3) imitation learning for visuomotor control (in simulation) [Nair
et al. 2022], 4) learning multi-task language-conditioned policies
for real-world manipulation [Stepputtis et al. 2020] (on a real-world
Franka Emika fixed-arm manipulator), and 5) zero-shot intent scor-
ing [Javdani et al. 2018; Chen et al. 2021]. We choose these tasks for
their broad coverage; tasks such as grasp affordance prediction and
referring expression grounding require reasoning over low-level
spatial features, while language-conditioned imitation and intent
scoring require a deeper understanding of semantics.
Through experiments controlling for pretraining data and model
capacity, we show that the simplest Voltron representations (from
V – Cond) strictly outperform both MVP and R3M representa-
tions across all evaluation domains. Furthermore, by adapting our
models to learn from multiple frame contexts and that favor gen-
eration (e.g., with V – Dual and V – Gen), we show that we can
further boost performance on evaluations requiring higher-level
features such as with language-conditioned policy learning (on a
real robot) and intent scoring. Though language-conditioning offers
universal performance gains, there are tradeoffs between Voltron
models; adding language generation hurts performance on some
control tasks, even though its necessary for strong performance on
intent scoring. Furthermore, Voltron with single-frame language
conditioning performs well on non-episodic tasks (e.g., grasping),
but underperforms multi-frame models on control tasks. There is
not yet a silver bullet – a single representation strong on all tasks
– but the ability to balance tradeoffs between encoding low and
high-level features offers a net win over restrictions of past work.
Contributions. 1) We present Voltron, a framework for language-
driven visual representation learning. Through controlled experi-
ments and comprehensive ablations we demonstrate that Voltron's
representations strictly outperform the prior art across 2) a new
evaluation suite composed of five distinct problem domains within
robotics. Finally, 3) we analyze the tradeoffs between different
Voltron models that balance different types of feature learning,
outlining several directions for future work. We release all mod-
els, the evaluation suite, code (pretraining and adaptation), and
preprocessed data (https://sites.google.com/view/voltron-robotics).
Limitations. We do not have access to the compute resources
to train models of the same scale and data used in prior work
[Radosavovic et al. 2022; Nair et al. 2022]. Instead, we carefully
reproduce MVP and R3M – the current state-of-the-art approaches
– by pretraining on the Something-Something-v2 dataset [Goyal
et al. 2017], further controlling for batch ordering, model capacity,
and other sources of randomness (full details are in §4). However,
for full context we also include results from the official release
artifacts from both these works, as well as other methods such as
CLIP [Radford et al. 2021], though we note these results in gray or
with dashed lines as to indicate they are not directly comparable.
2 Related Work
Voltron is situated within a rich body of work in visual represen-
tation learning for robotics and multimodal pretraining.
2
Voltron: Language-Driven Representations for Robotics
Figure 2: The Voltron Framework. Central to our approach is language-driven learning on top of a masked autoencoding backbone. We
incorporate language in two ways, following §3.2: 1) as a conditioning variable fed to a multimodal encoder that also encodes one or more
video frames, or 2) as a generation target for the language generator [Left]. During downstream evaluation, we use the (frozen) outputs from
the encoder, adapting evaluation-specific "heads" on top [Right].
Visual Representation Learning for Robotics. An emerging
body of work in robot learning studies learning visual state rep-
resentations for control. A wealth of prior approaches learn rep-
resentations from in-domain data taken directly from the target
environment (and corresponding task); these techniques range from
using data augmentation [Laskin et al. 2020; Srinivas et al. 2020;
Kostrikov et al. 2021; Pari et al. 2022] to modeling forward dynam-
ics [Gelada et al. 2019; Hafner et al. 2020] to using task-specific
information [Jonschkowski and Brock 2015; Zhang et al. 2021]. Un-
like these approaches, we move beyond task-specific data, instead
leveraging large, accessible datasets such as videos of humans per-
forming everyday tasks. Work in this paradigm has exploded in
recent years. A number of approaches find that existing represen-
tations such as features from models trained on ImageNet [Deng
et al. 2009], or features from CLIP [Radford et al. 2021] enable
more efficient learning [Shah and Kumar 2021; Khandelwal et al.
2021]. More recently, multiple approaches have shown increased
dividends in applying such representations to visuomotor control,
for example by combining features at different layers of pretrained
ResNets [Parisi et al. 2022] or by pretraining such representations
on human videos, conjecturing that such data captures features
useful for robotic manipulation [Nair et al. 2022; Xiao et al. 2022;
Radosavovic et al. 2022; Ma et al. 2022]. However, missing from
these approaches is a notion of semantics; works such as MVP [Xiao
et al. 2022; Radosavovic et al. 2022] purely learn to perform masked
reconstruction from a single image, and even works that leverage
some temporal and linguistic signals do so in a limited way [Nair
et al. 2022; Ma et al. 2022]. Instead, our work is motivated by the
hypothesis that language understanding – both via conditioning
and generation – is an essential component of learning generaliz-
able visual representations. It is not enough that a representation
summarizes an observation; instead, for generalization to new con-
texts and behaviors, it must capture how observations (and changes
thereof) relate to higher-level semantic abstractions.
Voltron aims to do this with its language-driven representation
learning objective: by jointly modeling sequences of frames and
language, we enable a range of capabilities, from producing repre-
sentations of single images in isolation, to providing the capability
to generate language grounded in visual contexts. We demonstrate
the benefits of language-driven learning in our evaluation (see §5):
in head-to-head comparisons, Voltron models strictly outperform
prior approaches across all evaluation domains.
Learning Multimodal Foundation Models. Our work draws fur-
ther inspiration from a wave of progress in multimodal foundation
models such as CLIP, Multimodal Masked Autoencoders (M3AE),
Flamingo, CoCa, and Gato, amongst many others [Radford et al.
2021; Geng et al. 2022; Alayrac et al. 2022; Yu et al. 2022; Reed et al.
2022; Lu et al. 2023; Aghajanyan et al. 2022]. These approaches
highlight the myriad benefits of multimodal pretraining: language
supervision works to enrich visual representations (even in the
absence of language downstream), while visual supervision simi-
larly enriches language representations [Lu et al. 2019; Singh et al.
2022]. Of the many capabilities afforded by these models, many
have applications in embodied AI and robotics. CLIP representa-
tions have shown to be effective in applications to various robotics
tasks [Shridhar et al. 2021; Khandelwal et al. 2021; Cui et al. 2022],
while multimodal transformer models have proven effective ini-
tializations for training control policies [Reid et al. 2022; Liu et al.
3
2022]. These approaches are similar to Voltron in their joint use of
visual and language inputs; where Voltron differs, however, is in
our novel representation learning objective that balances language
conditioning and generation, enabling learning representations that
transfer to a wide range of applications within robotics.
3 Voltron – Language-Driven Learning
We assume access to a dataset of videos paired with natural lan-
guage annotations; in each video-language pair (v, c), language
can take the form of a caption (e.g., "peels the carrot" in Figure 2),
narration, or even coarse textual label of a behavior. We assume
each video v ∈ RT ×H ×W ×C consists of a sequence of frames v =
[o1, . . . , oT ], where each frame oi ∈ RH ×W ×C is RGB-encoded. We
tokenize and one-hot encode each utterance into a vocabulary V
of cardinality |V |, padding to a max length L such that c ∈ RL×|V |.
We define a <NULL> token (separate from the <PAD> token) as a
placeholder for an empty language context. Furthermore, following
the MAE work, we define a visual masking function Mask(v, γ) →
(vvisible ∈ R(1−γ ) (T ×H ×W ×C), vmasked ∈ Rγ (T ×H ×W ×C) ) that parti-
tions the regions of a video into a set of visible and masked-out
regions subject to a fixed masking ratio γ. We sample a mask once,
and apply it uniformly across all frames in the video to prevent
leakage [Tong et al. 2022]; if the masks were sampled independently,
a masked region in one frame could be visible in another, allowing
the encoder to "cheat" by looking ahead.
3.1 Voltron – Core Components
A Voltron model comprises 1) a multimodal encoder that takes in a
visual context and (optional) language utterance producing a dense
representation, 2) a visual reconstructor that attempts to reconstruct
the masked-out visual context from the encoder's representation
of what is visible, and 3) a language generator that predicts the
language annotation for the video given the encoded visual context.
The visual reconstructor and language generator crucially act to
shape the representations by first erasing portions of a (v, c) pair,
then attempting to reconstruct the missing parts; we show in our
experiments (see §5) that this bottleneck helps focus on more low-
level features when we favor reconstruction over generation, and
more high-level, semantic features when we favor generation over
reconstruction. We step through each component below.
Multimodal Encoder: Eθ ( ̃v, u) → h ∈ RS×d
The multimodal encoder (Figure 2; lower half in blue and orange)
is the core of a Voltron model. It takes as input ( ̃v, u) where
̃v ∈ {vvisible, v } denotes either the masked or unmasked (full) visual
context respectively, and u represents a (possibly <NULL>) utter-
ance to condition on. As output, the encoder produces a dense
representation h ∈ RS×d where S denotes the number of encoded
regions, and d is a hyperparameter denoting the dimensionality of
the representation. Keeping with the original MAE work, we divide
each image oi ∈ RH ×W ×C into a set of non-overlapping regions
R, where each region is a p × p patch; this results in |R| = HW /p2
regions. Given a k-frame context, S = (1 − γ)k |R|.
Visual Reconstructor: Rθ (h) → ˆvmasked ∈ Rγ (k×H ×W ×C)
The visual reconstructor (Figure 2; upper half in orange) takes
as input the encoded representation of the visible visual context
Karamcheti et. al.
h = Eθ (vvisible, c). It attempts to reconstruct the missing visual
regions vmasked, conditioned on language context c, producing a
prediction ˆvmasked. Following prior work, the elements of ˆvmasked
are the normalized pixel targets from the original image. We use
mean-squared error as the reconstruction loss Lreconstruct (θ ).
Language Generator: Gθ (h) → ˆc ∈ RL×C
The language generator (Figure 2; upper half in red) takes the
encoded representation of the visible context and the <NULL> lan-
guage token, h = Eθ (vvisible, <NULL>). It generates the language
annotation, producing ˆc ∈ RL×|V |, with each of the L elements
corresponding to a probability distribution over the vocabulary. We
use the negative log-likelihood (cross-entropy) of the annotation c
under the generator as our loss Lgenerate.
The language generator crucially takes the <NULL> token as
input instead of the annotation c; inputting the same c that the
generator is trying to output can lead to trivial collapse where the
encoder learns to memorize the tokens to aid the generator. As a
result, for each example during training we need to either condition
or generate language; this further motivates the parameter α in
Figure 2 and in the training objective.
3.2 Balancing Reconstruction & Generation
The Voltron learning objective trades off language-conditioned
reconstruction and visually-grounded language generation to shape
the features captured by the encoder's learned representation. The
reconstruction objective prioritizes low-level spatial information
conducive to filling in missing textures, colors, or edges; likewise,
the generation objective captures higher-level semantic informa-
tion, encouraging the encoder to encode features that are predictive
of the language caption. We make this tradeoff explicit by minimiz-
ing the following loss, characterized by the parameter α ∈ [0, 1]:
L (θ ) = Lreconstruct (θ ) + Lgenerate (θ )
MSE(vmasked, Rθ (Eθ (vvisible, c)))
MSE(vmasked, Rθ (Eθ (vvisible, <NULL>)))
+ NLL(c, Gθ (Eθ (vvisible, <NULL>)))
if z = 0
if z = 1
=
and z ∼ Bernoulli(α)
For each example (v, c) seen at training, we draw z ∼ Bernoulli(α):
with z = 0 we condition on the original language utterance, while
with z = 1, we generate the original language utterance, condition-
ing the encoder on the <NULL> token. We limit our exploration in
this work to at most two frame contexts k = 2 due to computational
cost; even four frame contexts exceed the memory on the compute
available to us. In selecting the two frame contexts, we sample at
least five frames from each video clip in our dataset (with random
intervals between). We enforce a heuristic such that the first frame
in each dual-frame context comes from the first 20% of the clip,
with the other frame appearing in the remaining 80%.
Driven by the hypothesis that different values of α and frame-
contexts k shape the balance of low-level and high-level features
in our representations, we evaluate three different instantiations of
the Voltron framework (as mentioned in §1):
4
Voltron: Language-Driven Representations for Robotics
• V – Cond: α = 0, k = 1 single-frame conditioning.
• V – Dual: α = 0, k = 2 dual-frame conditioning; a context-
aware model identical to V – Cond but trained on dual-
frame pairs (initial frame, random subsequent frame).
• V – Gen: α = 0.5, k = 2; condition and generate with equal
probability, trained on dual-frame contexts as above.
Note that we do not evaluate α = 1; we find through preliminary
experiments that some language-conditioning is always helpful.
4 Implementation & Reproducibility
In addition to our framework, a core contribution of this work
is a comprehensive set of controlled experiments. To do this, we
reimplement both MVP and R3M using code released by the authors,
controlling for the pretraining data (at the level of the individual
frames seen per epoch) and model capacity.
Baselines – Preliminaries. Throughout this work, we have men-
tioned both MVP and R3M in terms of their tradeoffs; here, we
make their pretraining objectives explicit. Both prior approaches
use video datasets, but only learn single-frame encoders, choosing
to use the video structure in different ways (detailed below). Of the
two approaches, we note that only R3M uses language supervision.
MVP follows a masked autoencoding backbone, similar to that
depicted in Figure 2 (without language conditioning). MVP does not
offer any special consideration to the temporal structure of videos,
instead treating each frame in the dataset as as standalone input.
Given a single frame, MVP masks out regions subject to a fixed
mask ratio γ (same as in Voltron), encoding the visible context
with a Transformer encoder, then attempting to reconstruct the
missing context with a separate Transformer decoder – also using
mean-squared error for reconstruction.
R3M is different in that it does not contain a reconstruction
component, instead combining two contrastive objectives on top of a
single-frame visual encoder – time contrastive learning [Sermanet
et al. 2018] and image-language temporal alignment [Radford et al.
2021; Nair et al. 2021]. These objectives explicitly use the temporal
structure of videos. Given an encoding of a visual context, the time-
contrastive objective seeks to maximize the score of encodings
between frames close together in time (e.g., within a few frames of
each other), contrasted against frames from the same video that are
further away. R3M also uses language supervision. Given a separate
encoder that fuses a language caption with the encoding dual-
frames contexts (consisting of an initial and subsequent frame) the
image-language alignment objective attempts to assign scores that
capture "task progress:" the score of a subsequent frame occurring
later in a video subject to a language caption should be higher
than the score of a frame occurring earlier. The two key differences
between Voltron and R3M are 1) using visual reconstruction as
a dense objective vs. time contrastive learning, and 2) explicitly
conditioning on or generating language in Voltron vs. matching
visual and language embeddings as a contrastive objective.
Pretraining Dataset Construction. For all models in this work,
we use Something-Something-v2 [Sth-Sth; Goyal et al. 2017] as
our pretraining dataset, motivated by prior work [Shao et al. 2020;
Chen et al. 2021; Xiao et al. 2022]. All models see the exact same
image frames. We extract 5 frames per video, per training epoch
to ensure we are learning from multiple visual inputs of the same
5
context and to facilitate R3M's time contrastive learning objective
[Sermanet et al. 2018]; we serialize the processed frames, and store
index files with the video/frame indices per epoch.
Data-Equivalent Reproductions. Though prior works release
trained model artifacts, they do not provide sufficient details for
reproduction, such as the exact frames sampled from videos, prepro-
cessing applied, or hardware/compute used. We thus reimplement
MVP and R3M in a controlled setting on Sth-Sth using the released
code from the original papers where possible and clarifying addi-
tional details with the authors directly as needed. We implement all
models with a Vision Transformer (ViT) backbone and additionally
implement R3M with a ResNet-50 backbone based on discussions
with the authors of the original work. They suggested that there
may be slight differences in the inductive bias of ResNets vs. Vision
Transformers [Raghu et al. 2021] that would be worth investigating.
We use the ViT-Small/16 variant, with patch size p × p = 16 × 16
and a Transformer with 12 blocks, 6 attention heads per block,
and hidden dimension d = 384 [Wightman 2019]. We refer to our
reproductions as "R-MVP," "R-R3M (ViT-S)," and "R-R3M (RN-50)."
We pretrain all models in this work on TPU v3-8 compute, gener-
ously granted to us by the TPU Research Cloud program (TRC). We
run 400 epochs of training for all models with a batch size of 1024,
each epoch comprised of a pass through 844K frames (168K clips in
Sth-Sth, 5 frames per clip). We do not use dropout or data augmen-
tation. All code and reproducibility details are in our open-source
code repositories, linked from our project page.
Additional Comparisons. Though we lack the compute resources
to train on models on the same scale data, we further contextualize
our results by evaluating the official R3M and MVP models released
in the original works. We note that the released R3M model uses
the entirety of the Ego4D dataset [Grauman et al. 2022], comprised
of over 3000 hours of videos, spanning 3.6M individual clips (com-
prising more than 20x the data we use in this work). The released
MVP also uses Ego4D, but add Sth-Sth, Epic-Kitchens, and more
[Damen et al. 2018; Shan et al. 2020], while also scaling models up
to 86M and 307M parameters, (4-10x the size of ViT-Small). We also
evaluate OpenAI's CLIP model (ViT-Base) as a strong baseline that
leverages language supervision. We refer to these models as "R3M
(Ego4D)," "MVP (EgoSoup)," and "CLIP (ViT-B)," following naming
conventions from the original work and denote them with gray text
and dashed lines in plots.
Voltron Architecture Details. Voltron follows the masked au-
toencoding pipeline detailed above, with simple extensions for
incorporating language. We implement the Voltron encoder Eθ by
jointly embedding the language u and visual inputs vvisible with a
Transformer [Vaswani et al. 2017]. We initialize language embed-
dings from DistilBERT [Sanh et al. 2019], learning a separate linear
projection into the encoder's embedding space, similar to R3M. For
the visual reconstructor Rθ and language generator Gθ , we use
a separate Transformer with a small addition to enable language
generation. In a standard MAE decoder, patches are generated inde-
pendently, attending to all patch embeddings from the encoder. To
enable generation, we append a causal (lower triangular) attention
mask for preventing our language decoder from "peeking" at the
future inputs to generate (visualized by the red triangle in Figure 2).
This is akin to prefix language modeling [Raffel et al. 2019]; all
Table 1: Summary of Evaluation Suite & Results. While some of our evaluation domains use language input, grasp affordance prediction
and single-task visuomotor control do not. While Voltron models obtain strong performance over all applications, R-R3M and R-MVP exhibit
variable performance depending on the application subset.
Input Format
Train Dataset Size
Best Model
Best Baseline
Grasp §5.1
Referring Expressions §5.2
Single-Task Control §5.3
Language-Conditioned Imitation §5.4
Intent Scoring §5.5
Single Frame
Single Frame, Language Expression
Frame History
Frame History, Language Instruction
Frame History, Language Intent
1470
259,839
n ∈ [5, 10, 25] Demos
100 = 5 x 20 Demos
N/A (Zero-Shot)
V – Cond
V – Cond
V – Dual
V – Dual / V – Gen
V – Gen
R-MVP
R-R3M (ViT)
R-R3M (RN-50)
R-R3M (ViT)
N/A
Karamcheti et. al.
embeddings can attend to the visual inputs (as in a traditional MAE
decoder), but language embeddings can only attend to the preceding
language input.
Voltron uses a combination of different language objectives on
top of the standard MAE pipeline, adding complexity. To help ensure
stable and reliable training, we follow best practices from the NLP
community and make a series of small changes to the Transformer
architecture including: 1) switching the default LayerNorm to root-
mean square normalization [Zhang and Sennrich 2019; Narang et al.
2021] (stability, no learned parameters), 2) switching from the de-
fault GELU to the more performant SwishGLU activation [Shazeer
2020; Chowdhery et al. 2022] (performance), and 3) adopting Layer-
Scale for scaling down the magnitude of each residual connection
[Touvron et al. 2021; Karamcheti et al. 2021a] (prevents overflow).
To ensure that any gains in evaluation performance stem from our
insights around language-driven learning rather than this modified
architecture, we run an ablation experiment in §6. We find that
these changes do not change downstream evaluation results, but
significantly improve training stability. We present further details,
including a sketch of the implementation differnces in §B.1.
Adapting Representations. Unfortunately, there is not yet a stan-
dard for extracting representations from learned Vision Trans-
former encoders, especially for those trained via masked autoencod-
ing. However, Zhai et al. [2022] suggest that multiheaded attention
pooling [MAP; Lee et al. 2018] is a strong and versatile approach.
We choose to use MAP as the sole feature extraction approach in all
our ViT experiments, finding it to universally improve performance
for all ViT models, relative to the "default" extraction approaches
suggested in prior work. Notably, we find that just switching to
MAP-based extraction over the procedure used in the original MVP
work almost doubles success rate on visuomotor control tasks; we
provide results from this analysis in §D.2. We note that we use
MAP when evaluating CLIP (ViT-Base/16) and MVP (EgoSoup) for
the fairest and strongest possible comparison.
5 Evaluation Suite: Construction & Results
We outline our evaluation suite (Table 1) comprised of five problem
domains within robotics. Each evaluation consists of adaptation
data and evaluation metrics. The adaptation data consists of vi-
sual input(s) (as RGB frames) and in some cases, language (e.g.,
an instruction for language-conditioned imitation). We evaluate
representations from Voltron and various baseline models by freez-
ing the pretrained vision and language encoders, instead adapting
evaluation-specific "heads"(lightweight networks) on top of the
extracted representations. We choose evaluations that represent
Figure 3: Grasp Affordance Prediction [ARC Grasping; Zeng
et al. 2017]. Given objects in cluttered bins, segment the image cor-
responding to "graspable" (green), vs. "non-graspable" (red) regions;
note that these regions are labeled for use with suction grippers.
domains that capture different types of understanding; in the follow-
ing sections, we motivate the role of each application and provide
experimental results.
5.1 Grasp Affordance Prediction
We consider the problem of grasp affordance prediction: given an
image of a set of objects (e.g., on a cluttered workspace), predict a
dense segmentation mask corresponding to "graspable" and "non-
graspable" locations for a suction-based gripper.
Motivation. Grasp affordance prediction from visual input is a
foundational task in robot learning, and is often a key component
of many modular systems [Bohg et al. 2013; Correll et al. 2016].
Including this evaluation allows us to probe the low-level spatial
features retained by various representations.
Table 2: Results on Grasp Affordance Prediction. We report
average precision at various confidence intervals following the
original procedure described in Zeng et al. [2017].
Architecture
Top-1
Top 1%
Top 5%
R-R3M
R-MVP
V – Cond [Ours]
V – Cond [Ours]
CLIP
MVP (EgoSoup)
ViT-S
ViT-S
ViT-S
ViT-B
ViT-B
ViT-B
40.38
72.94
85.15
90.00
43.20
77.49
40.55
61.47
80.71
82.44
44.11
72.87
28.66
39.77
47.45
62.33
29.66
51.28
6
Voltron: Language-Driven Representations for Robotics
Figure 4: Referring Expression Grounding (Object Detection) from the OCID-Ref Dataset [Wang et al. 2021]. Given a referring
expression in natural language, the goal is to predict the bounding box coordinates around the respective object. An important feature of
OCID-Ref are the various dataset splits, corresponding to three increasing amounts of clutter, depicted left-to-right.
Evaluation Details. We specifically consider the problem as for-
mulated in the Amazon Robotics Challenge Grasping Dataset (ARC-
Grasping) introduced by Zeng et al. [2017]. We choose this dataset
over alternatives as it is readily available and consists of 1800+ im-
ages of multiple real-world objects in cluttered bins (Figure 3; left).
We focus on the RGB-only, suction-grasping split of the dataset. We
implement models for grasp affordance prediction following recent
work on semantic segmentation with Transformers [Zheng et al.
2021; Strudel et al. 2021; Bao et al. 2022], specifically by introducing
a Progressive Upsampling (SETR-PUP) head on top of our frozen
visual features. We omit results from all ResNet models – R-R3M
(RN-50) and R3M (Ego4D); unfortunately, training with simple PUP-
style on the final ResNet-50 7 × 7 spatial grid did not converge,
possibly indicating a need for more complex architectures with
significant added parameters (beyond the scope of this work). As
this task only takes a single frame as input, we do not evaluate V –
Dual and V – Gen. Following the original work, we report average
precision at various confidences: Top-1 precision, Top-1% precision,
and Top-5% precision. We select models via 5-fold cross validation.
This task does not have a language component. We provide addi-
tional details around the adaptation procedure in Appendix E and
the open-source code repositories.
Experimental Results. Looking at Table 2, representations from
MVP and Voltron models perform well across the board, while
contrastive representations (e.g., from CLIP and R-R3M) perform
quite poorly. Interestingly, V – Cond outperforms R-MVP and
MVP (EgoSoup) on this task, despite the absence of language input,
demonstrating that language supervision during pretraining can
improve low-level feature learning, even relative to larger-scale
models trained on much more data.
5.2 Referring Expression Grounding
Given a cluttered scene and language expression, the goal is to
predict a bounding box around an object (e.g., "the blue black pen
on the front left of the orange can" in Figure 4; middle).
Motivation. Capturing object-centric priors and high-level seman-
tics around properties such as color and spatial relationships is
crucial across the entire robotics stack. More importantly, this is
a language-conditioned task, allowing us to evaluate the impact of
pretraining with language supervision.
Evaluation Details. We use the OCID-Ref Dataset [Wang et al.
2021] grounded in scenes that are representative of robotics set-
tings; other datasets such as RefCoCo [Yu et al. 2016] are grounded
in more global scenes (e.g., multiple humans playing frisbee on a
field) that are less informative for robot learning. OCID-Ref also
Table 3: Results on Referring Expression Grounding. We report average precision @ 0.25 IoU following Wang et al. [2021] (OCID-Ref).
This is a language-conditioned task; across various clutter levels, Voltron models are substantially more performant than baselines, as well
as models trained on more data and with alternative language supervision (e.g., CLIP).
R-R3M
R-MVP + DistilBERT
V – Cond [Ours]
V – Cond [Ours]
CLIP
MVP (EgoSoup) + DistilBERT
Architecture
ViT-S
ViT-S
ViT-S
ViT-B
ViT-B
ViT-B
Total
63.30
49.58
89.38
90.77
68.35
49.25
Minimum Clutter
Medium Clutter
Maximum Clutter
63.87
50.98
85.88
87.56
67.01
51.46
7
68.34
53.83
95.39
96.58
76.61
52.15
55.33
41.94
89.12
90.17
60.33
40.50
Karamcheti et. al.
Figure 5: Franka Kitchen – Single-Task Visuomotor Control Results. Visualization of the Franka Kitchen evaluation environments,
comprised of five unique tasks, with two camera viewpoints [Left]. Results (success rate for each of n demonstrations) for Voltron and
baselines, showing the benefit of language-driven learning (over 3 seeds) [Right]. In dashed lines (not directly comparable), we plot CLIP
(ViT-B), MVP (EgoSoup), and R3M (Ego4D) trained with n = 25 demonstrations.
provides splits based on the clutter level of the underlying scene,
letting us further evaluate robustness. We regress bounding box
coordinates directly from our frozen features using a shallow MLP.
All approaches condition on language (see expressions in Figure 4),
using the given language encoder where possible. This means using
the multimodal encoder for V – Cond and the default learned text
encoder for CLIP or R3M. However, for approaches that only learn
visual representations (e.g., MVP), we append pretrained language
features from DistilBERT – the same language model used to initial-
ize Voltron. We note again that we omit ResNet results; though this
task did not require upsampling, we find trained models obtained
no better than random performance, again indicating a need for a
more sophisticated adaptation architecture (beyond the scope of
this work). We report average precision at 0.25 IoU for each split
following the evaluation procedure outlined in Wang et al. [2021].
We provide additional details around the adaptation procedure in
Appendix E and the open-source code repositories.
Experimental Results. Results for each model across the various
clutter splits are in Table 3. Voltron models are especially strong,
vastly outperforming R-MVP by 40% and R-R3M by over 25% on
all splits, showing that multimodal pretraining – even just condi-
tioning on language when optimizing for masked reconstruction –
can lead to substantial gains on downstream multimodal tasks. We
isolate the massive performance gains of Voltron models over prior
work due to the multimodal encoder that learns fused embeddings
of vision and language, allowing language to shape the visual rep-
resentations during pretraining. In contrast, R3M, and CLIP models
learn independent text encodings that are only fused post-hoc, dur-
ing adaptation. This is even worse for MVP: these models need
to learn to fuse their strong visual embeddings with the language
embeddings from a completely different model (DistilBERT).
5.3 Single-Task Visuomotor Control
Motivation. Imitation learning for visuomotor control has been
the de-facto evaluation for prior work [Parisi et al. 2022; Nair et al.
8
2022; Radosavovic et al. 2022], giving us the closest comparison to
the evaluations used in MVP and R3M. This evaluation focuses on
sample-efficient generalization, measuring how well visual repre-
sentations help in learning policies from limited demonstrations
n ∈ {5, 10, 25}. This evaluation takes place in simulation.
Evaluation Details. We look at policy learning in the Franka
Kitchen simulation environments as defined by Nair et al. [2022].
This domain consists of 5 tasks, with 2 distinct camera viewpoints
(Figure 5). We learn shallow MLP policy heads via behavioral
cloning that predict 9-DoF joint velocities (7 joints, 2 gripper) from
our (frozen) visual features and proprioceptive state. We follow the
R3M evaluation, reporting average success rates for each setting
with n demonstrations across the 5 tasks, 2 viewpoints, and 3 ran-
dom seeds. We train separate policies per task, with no language
conditioning – using the exact code provided by Nair et al. [2022].
Additional details are in Appendix E and the open-source code.
Experimental Results. Most approaches perform similarly across
the various number of training demonstrations (Figure 5; right).
However, we see some promising trends; Voltron models perform
better than both baselines, with approaches that learn from mul-
tiple frame contexts V – Dual and V – Gen showing significant
improvements over single-frame approaches. Yet, the absolute suc-
cess rates are low; learning for control is difficult, and while good
visual representations can help, learning closed-loop policies from
limited data remains an open challenge.
5.4 Language-Conditioned Imitation (Real)
Given a dataset of language instructions (e.g. "throw the bag of
chips away") paired with demonstrations (on a real robot in a real-
world tabletop setting), learn an instruction following policy via
behavioral cloning. Figure 6 depicts the real-world environment.
Motivation. A large body of work looks at learning language-
conditioned policies for human-robot collaborative settings [Aru-
mugam et al. 2017; Stepputtis et al. 2020; Lynch and Sermanet 2020;
Karamcheti et al. 2021b; Ahn et al. 2022]. This evaluation gets at
Voltron: Language-Driven Representations for Robotics
Figure 6: Real-World Language-Conditioned Imitation Learning Results. The real-world "Study Desk" environment, with sample
language instructions corresponding to the five behaviors we evaluate. [Top] The challenging visual distractor split for evaluating robustness
to novel distractors, ranging from simple color swapping of background objects (e.g., purple to green textbook), to more drastic changes such
as playing a clip from "Voltron – the Animated Series" in the background [Bottom].
the robustness and reliability of learned representations, with the
goal of validating different approaches in real-robot settings.
Evaluation Details. We construct a "study desk" environment
(Figure 6) with five prototypical "tasks": 1) closing the drawer, 2)
throwing the green bag of chips in the trash can, 3) discarding the
used coffee pods, 4) moving the cyan coffee mug to the purple plate,
and 5) moving the same mug to the yellow plate. For each task, we
collect 20 teleoperated demonstrations at 10 Hz, randomly resetting
the scene between episodes. We adopt the keyframe-based action
space proposed in James and Davison [2022] for learning. This
approach heuristically breaks a demonstration into 4-5 "waypoints"
(end-effector poses) that are used as action targets during behav-
ior cloning; during policy execution, we plan min-jerk trajectories
from the current position to the predicted waypoint, feeding the
subsequent state and visual observation back to our policy [James
et al. 2022; Shridhar et al. 2022]. To collect diverse instructions, we
prompt ChatGPT [version dated Jan 9th, 2023; OpenAI 2022] with
simple task descriptions, asking it to generate diverse language
instructions, collecting 25 utterances total (20 train, 5 held-out)
per task.2 We parameterize our policy similarly to §5.3, adding a
shallow MLP on top of the extracted (frozen) visual representations
[Misra et al. 2017]. This task is language-conditioned; as in OCID-
Ref, we use the given language encoders for each approach where
possible, appending DistilBERT features to pure visual representa-
tions otherwise. We report success rates with partial credit – 0.25
points for achieving each of the following "milestones": reaching an
object, interacting with it, transporting it, and completing the task.
We provide additional details in Appendix E, and include videos of
policy rollouts on the project page.
2ChatGPT Prompt (additional details and generated instructions on project page): I'm
trying to train a robot assistant that can follow diverse language instructions. One task
requires moving an empty chip bag (a green bag of those jalapeno chips) to the garbage.
Can you generate 25 natural-sounding instructions (e.g., "throw away the chips")?
9
Experimental Results. Looking at success rates of the various
representations (Figure 6; top right) we see an exaggerated version
of the trends exhibited in the single-task control setting; Voltron
models obtain an extra boost in performance across the board given
that this task is language-conditioned, highlighting the strength of
its fused representations. Similarly, R-R3M models exhibit the next
best performance. Due to time and shared resource constraints, we
do not run out MVP (EgoSoup), R3M (Ego4D), or CLIP (ViT-B/16),
though we expect similar trends as in the last evaluation.
5.5 Qualitative: Zero-Shot Intent Scoring
We perform a qualitative evaluation for the problem of language-
based intent scoring; given a language expression describing an
intent or behavior (e.g., "opening the faucet") and a corresponding
video (that may or may not show the described behavior), predict
an "alignment score" for each frame of a video. This alignment
score should capture how well the current visual context matches
the described behavior – ideally reflecting calibrated confidence
over time (an example language/video is shown in Figure 7; left).
Motivation. This evaluation is motivated by two active areas of re-
search: reward learning from language and demonstrations [Smith
et al. 2020; Shao et al. 2020; Chen et al. 2021; Bahl et al. 2022], and be-
lief modeling for human-robot collaboration [Hoffman and Breazeal
2007; Hauser 2012; Bandyopadhyay et al. 2013] This evaluation
probes for the ability to reason over intents and visual behaviors
jointly, without the need for additional data.
Evaluation Details. This is a qualitative evaluation that focuses
on measuring how well existing approaches "track" progress condi-
tioned on a language intent over time. Doing this zero-shot means
that we can only evaluate models that can produce alignment scores
given language and visual context: 1) CLIP (ViT-B/16) through co-
sine similarity of learned vision and text representations, 2) R3M
(Ego4D) through the "video-language alignment" head, and 3) our
Karamcheti et. al.
Figure 7: Qualitative Zero-Shot Intent Scoring Results. Given a pair of videos from the WHiRL dataset [Bahl et al. 2022] of a human
and robot performing a task, we evaluate the ability of V – Gen, R3M (from Nair et al. [2022]) and CLIP in scoring various frames subject
to the utterance "opening the faucet." While CLIP and R3M produce extremely noisy scores, V – Gen is calibrated, successfully tracking
progress over time – both for the human user, as well as for the robot.
V – Gen model (by measuring the likelihood of a given language
utterance conditioned on visual context under the language genera-
tor). Given a video of an agent performing some behavior described
in language (e.g., "opening the faucet"), we estimate and plot scores
under each model across a sequence of video frames. We use videos
from WHiRL [Bahl et al. 2022] of humans and robots performing
the same tasks from different views; we choose to evaluate intent
scoring for both agents to better capture the robustness and transfer
potential for these approaches in similar real-world settings.
Experimental Results. The two curves in Figure 7 show the pre-
dicted scores over time for the language intent "opening the faucet."
Even though it has never been trained for this task, we find that
V – Gen is able to coherently predict not only the exact frames
corresponding to "keypoints" in each video (e.g., touching the han-
dle, observing when the water starts running), but is also capable
of measuring partial progress – akin to a shaped, dense reward;
however, both R3M (Ego4D) and CLIP (ViT-B/16) fail at this task,
predicting random scores with high variance across sequential time
steps. Note that the intent scores are not perfect; after turning the
faucet on for the human video, predicted scores remain high, while
for the robot, the scores taper off. It is not clear why this happens,
but given a small amount of adaptation data, one could ensure
consistent behavior. We provide more examples from WHiRL in
§C.5, and additional evaluation details in Appendix E.
6 Ablations, Extensions, & Further Analysis
The comparative results across the various evaluation problem
domains paint Voltron's language-driven representations in a fa-
vorable light relative to MVP and R3M baselines. Yet, there remain
key questions that we address in this section: is language super-
vision actually driving these results? Why generative language
modeling over masked language modeling? Will Voltron scale?
Ablation: The Impact of Language Supervision. The second
row of Table 4 shows a subset of evaluation results across three dif-
ferent problem domains when training a "no-language" variant of
10
the V – Cond architecture – this variant is in essence an alternate
version of a masked autoencoder that uses the small architecture
modifications we added for training stability in §4. As such, it also
serves as an architecture ablation when compared to the R-MVP
results, enabling us to isolate the impact of the small stability modi-
fications described in §4. Indeed, the results confirm our hypotheses:
first, removing language results in a definitive drop in performance
across all evaluation applications. Second, the respective results
for each evaluation application are on par with the corresponding
results for the R-MVP model, demonstrating that the performance
of Voltron models does not stem from the architecture. We delve
further into this ablation in §C.1.
Ablation: Generative vs. Masked Language Modeling. Look-
ing at the Voltron objective, a natural question to ask is why we
chose language generation over masked language modeling. Further-
more, recent and concurrent work propose learning multimodal
masked autoencoders (M3AE) both within and outside of robot-
ics [Geng et al. 2022; Liu et al. 2022], showing promising results
in learning visual representations for image classification tasks,
amongst others. To assess the differences, we choose to reproduce
the M3AE model in a manner similar to our reproduction of MVP
and R3M; we keep the same Something-Something-v2 pretraining
data, adopting the exact procedure described in Geng et al. [2022],
then evaluating the resulting representations on the same subset of
evaluation domains as in the prior ablation (third row of Table 4).
Surprisingly, we see drastic drops in performance across the board.
Looking at the pretraining curves, we identify a possible reason for
this failure: in optimizing M3AE on Sth-Sth, we see the language
modeling loss go to zero almost immediately, leading to overfit-
ting. A possible explanation is that the masked language modeling
conditioned on visual contexts in datasets annotated with short,
predictable narrations leads to degenerate representations, while
generative language modeling is not susceptible to the same types
of collapse; looking at ways to mitigate this seems like a promising
direction for future work. Explicit details around pretraining and
evaluating R-M3AE, with an in-depth discussion are in §C.2.
Acknowledgments
This work would not have been possible without the support of
entire communities of students, engineers, and various domain
experts; our gratitude cannot be understated. We would specifically
like to thank Shyamal Buch, David Hall, Sasha Khazatsky, and
John Thickstun for their invaluable advice and suggestions around
pretraining and evaluation. We further thank Dilip Arumugam,
Masha Itkina, Minae Kwon, Tyler Lum, Vivek Myers, and Karl
Pertsch for their feedback on earlier drafts.
Toyota Research Institute ("TRI") provided funds to support this
work. This project was additionally supported by the Office of Naval
Research (ONR). Parts of this research – specifically model pretrain-
ing – was supported with Cloud TPUs from Google's TPU Research
Cloud (TRC). Siddharth Karamcheti is grateful to be supported
by the Open Philanthropy Project AI Fellowship. Annie Chen is
supported by the NSF Graduate Research Fellowship (NSF GRFP).
Finally, we thank the members of the Stanford ILIAD, IRIS, and
NLP groups for valuable discussions and their unwavering support.
Voltron: Language-Driven Representations for Robotics
Table 4: Ablation Experiments. We select a subset of evalua-
tions from §5 – grasp affordance prediction, referring expression
grounding, and single-task visuomotor control.
Grasp
PR @ Top-1%
Refer
Total Accuracy
V + Lang [Ours]
No-Language ↓
R-M3AE ↓↓
80.71
65.83
52.79
89.38
53.44
51.61
Imitate
(n = 25)
38.2 ± 5.09
33.1 ± 4.79
24.0 ± 4.21
Extension: Scaling Up. Prior approaches have shown gains in
scaling model capacity; here, we present preliminary evidence that
Voltron models behave similarly. For each evaluation in §5, we
evaluate a ViT-Base variant of V – Cond (86M parameters vs.
the 22M in the ViT-Small). We see universal improvement: Top-
5% precision for grasping (Table 2; middle row) increases by 15%,
expression grounding accuracy improves (Table 3; middle row), as
does performance on control.
Extension: Robustness to Real-World Distractors. Factors such
as lighting conditions, time of day, and accidental environment per-
turbations (e.g., a colleague knocking over the camera) can have a
profound impact on performance of robotic systems, especially if
learned representations are not robust. We run a limited "robust-
ness" evaluation after training language-conditioned policies from
the demonstrations described in §5.4. Success rates before and after
introducing visual distractors for two of the "meta-tasks" are in Fig-
ure 6 (bottom right).3 We find that Voltron and R-MVP models are
robust to even the most extreme distractors – seemingly a benefit
of per-patch masking coupled with MAP-based extraction.
7 Discussion & Conclusion
We propose Voltron, a framework for language-driven representa-
tion learning that balances conditioning and generation to shape the
balance of low and high-level features captured. We introduce an
evaluation suite spanning five diverse problems within robotics for
holistically evaluating visual representations. Through controlled
experiments and ablations, we validate the strengths of our repre-
sentations; across all evaluation tasks, Voltron models that balance
language conditioning and generation strictly outperform prior
approaches such as R3M and MVP, and in many cases show perfor-
mance competitive with or exceeding that of approaches that use
orders of magnitude more data or more expressive models.
Yet, while language is a pivotal source of supervision, there are
still key questions to answer. Why is language-based pretraining
helpful on tasks that have nothing to do with language? Why not
try to learn one model that can encode both low-level and high-level
features, without tradeoffs? While there is not a silver bullet yet
we hope that future work takes a deep, grounded look at these
questions, identifying what existing representations capture – and
more importantly, what they miss. Our hope is that Voltron serves
as a starting point; a flexible, unified framework for future improve-
ments in visual representation learning for robotics.
3We try five distractors spanning simple changes such as swapping the purple textbook
in the background for a green one, to more extreme distractors such as playing a clip
from "Voltron, the Animated Series" on a tablet in the middle of the workspace. Videos
are on the project page.
11
References
Armen Aghajanyan, Bernie Huang, Candace Ross, Vladimir
Karpukhin, Hu Xu, Naman Goyal, Dmytro Okhonko, Mandar
Joshi, Gargi Ghosh, Mike Lewis, and Luke Zettlemoyer. 2022.
CM3: A Causal Masked Multimodal Model of the Internet. arXiv
preprint arXiv:2201.07520 (2022).
Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar,
Omar Cortes, Byron David, Chelsea Finn, Keerthana Gopalakrish-
nan, Karol Hausman, Alexander Herzog, Daniel Ho, Jasmine Hsu,
Julian Ibarz, Brian Ichter, Alex Irpan, Eric Jang, Rosario Jauregui
Ruano, Kyle Jeffrey, Sally Jesmonth, Nikhil Jayant Joshi, Ryan C.
Julian, Dmitry Kalashnikov, Yuheng Kuang, Kuang-Huei Lee,
Sergey Levine, Yao Lu, Linda Luu, Carolina Parada, Peter Pastor,
Jornell Quiambao, Kanishka Rao, Jarek Rettinghouse, Diego M
Reyes, Pierre Sermanet, Nicolas Sievers, Clayton Tan, Alexan-
der Toshev, Vincent Vanhoucke, Fei Xia, Ted Xiao, Peng Xu,
Sichun Xu, and Mengyuan Yan. 2022. Do As I Can, Not As I
Say: Grounding Language in Robotic Affordances. arXiv preprint
arXiv:2204.01691 (2022).
Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech,
Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katie Milli-
can, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan
Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne
Monteiro, Jacob Menick, Sebastian Borgeaud, Andy Brock, Aida
Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo
Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan.
2022. Flamingo: a Visual Language Model for Few-Shot Learning.
arXiv preprint arXiv:2204.14198 (2022).
Dilip Arumugam, Siddharth Karamcheti, Nakul Gopalan, Lawson
L. S. Wong, and Stefanie Tellex. 2017. Accurately and Efficiently
Interpreting Human-Robot Instructions of Varying Granularities.
In Robotics: Science and Systems (RSS).
Shikhar Bahl, Abhi Gupta, and Deepak Pathak. 2022. Human-to-
Robot Imitation in the Wild. In Robotics: Science and Systems
(RSS).
Tirthankar Bandyopadhyay, Kok Sung Won, Emilio Frazzoli, David
Hsu, Wee Sun Lee, and Daniela Rus. 2013.
Intention-Aware
Motion Planning. In Workshop for the Algorithmic Foundations of
Robotics (WAFR).
Hangbo Bao, Li Dong, and Furu Wei. 2022. BEiT: BERT Pre-Training
of Image Transformers. In International Conference on Learning
Representations (ICLR).
Iz Beltagy, Matthew E. Peters, and Arman Cohan. 2020. Long-
arXiv preprint
former: The Long-Document Transformer.
arXiv:2004.05150 (2020).
Elad Ben-Zaken, Shauli Ravfogel, and Yoav Goldberg. 2022. BitFit:
Simple Parameter-efficient Fine-tuning for Transformer-based
Masked Language-models. In Association for Computational Lin-
guistics (ACL).
Jeannette Bohg, Antonio Morales, Tamim Asfour, and Danica Kragic.
2013. Data-Driven Grasp Synthesis-A Survey. IEEE Transactions
on Robotics (T-RO) 30 (2013), 289–309.
Rishi Bommasani, Drew A. Hudson, Ehsan Adeli, Russ Altman, Sim-
ran Arora, Sydney von Arx, Michael S. Bernstein, Jeannette Bohg,
Antoine Bosselut, Emma Brunskill, Erik Brynjolfsson, Shyamal
Buch, Dallas Card, Rodrigo Castellon, Niladri Chatterji, Annie
Karamcheti et. al.
Chen, Kathleen Creel, Jared Quincy Davis, Dorottya Demszky,
Chris Donahue, Moussa Doumbouya, Esin Durmus, Stefano Er-
mon, John Etchemendy, Kawin Ethayarajh, Li Fei-Fei, Chelsea
Finn, Trevor Gale, Lauren Gillespie, Karan Goel, Noah Good-
man, Shelby Grossman, Neel Guha, Tatsunori Hashimoto, Peter
Henderson, John Hewitt, Daniel E. Ho, Jenny Hong, Kyle Hsu,
Jing Huang, Thomas Icard, Saahil Jain, Dan Jurafsky, Pratyusha
Kalluri, Siddharth Karamcheti, Geoff Keeling, Fereshte Khani,
Omar Khattab, Pang Wei Koh, Mark Krass, Ranjay Krishna, Ro-
hith Kuditipudi, Ananya Kumar, Faisal Ladhak, Mina Lee, Tony
Lee, Jure Leskovec, Isabelle Levent, Xiang Lisa Li, Xuechen
Li, Tengyu Ma, Ali Malik, Christopher D. Manning, Suvir Mir-
chandani, Eric Mitchell, Zanele Munyikwa, Suraj Nair, Avanika
Narayan, Deepak Narayanan, Ben Newman, Allen Nie, Juan Car-
los Niebles, Hamed Nilforoshan, Julian Nyarko, Giray Ogut, Lau-
rel 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é, Dorsa Sadigh, Shiori Sagawa, Keshav San-
thanam, Andy Shih, Krishnan Srinivasan, Alex Tamkin, Rohan
Taori, Armin W. Thomas, Florian Tramèr, Rose E. Wang, William
Wang, Bohan Wu, Jiajun Wu, Yuhuai Wu, Sang Michael Xie,
Michihiro Yasunaga, Jiaxuan You, Matei Zaharia, Michael Zhang,
Tianyi Zhang, Xikun Zhang, Yuhui Zhang, Lucia Zheng, Kaitlyn
Zhou, and Percy Liang. 2021. On the Opportunities and Risks of
Foundation Models. arXiv preprint arXiv:2108.07258 (2021).
François Chaumette and Seth A. Hutchinson. 2006. Visual servo
control. I. Basic approaches. IEEE Robotics & Automation Maga-
zine 13 (2006), 82–90.
Annie S. Chen, Suraj Nair, and Chelsea Finn. 2021. Learning Gener-
alizable Robotic Reward Functions from "In-The-Wild" Human
Videos. In Robotics: Science and Systems (RSS).
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey
Hinton. 2020. A simple framework for contrastive learning of
visual representations. In International Conference on Machine
Learning (ICML). 1597–1607.
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten
Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won
Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh,
Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, A. Rao, Parker
Barnes, Yi Tay, Noam M. Shazeer, Vinodkumar Prabhakaran,
Emily Reif, Nan Du, B. Hutchinson, Reiner Pope, James Brad-
bury, Jacob Austin, M. Isard, Guy Gur-Ari, Pengcheng Yin, Toju
Duke, Anselm Levskaya, S. Ghemawat, Sunipa Dev, Henryk
Michalewski, Xavier García, Vedant Misra, Kevin Robinson, Liam
Fedus, Denny Zhou, Daphne Ippolito, D. Luan, Hyeontaek Lim,
Barret Zoph, A. Spiridonov, Ryan Sepassi, David Dohan, Shivani
Agrawal, Mark Omernick, Andrew M. Dai, T. S. Pillai, Marie
Pellat, Aitor Lewkowycz, E. Moreira, Rewon Child, Oleksandr
Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan
Saeta, Mark Diaz, Orhan Firat, Michele Catasta, Jason Wei, K.
Meier-Hellstern, D. Eck, J. Dean, Slav Petrov, and Noah Fiedel.
2022. PaLM: Scaling Language Modeling with Pathways. arXiv
(2022).
Nikolaus Correll, Kostas E. Bekris, Dmitry Berenson, Oliver Brock,
Albert J. Causo, Kris K. Hauser, Kei Okada, Alberto Rodriguez,
Joseph M. Romano, and Peter R. Wurman. 2016. Analysis and
12
Voltron: Language-Driven Representations for Robotics
Observations From the First Amazon Picking Challenge. Science
15 (2016), 172–188.
Yuchen Cui, Scott Niekum, Abhi Gupta, Vikash Kumar, and Aravind
Rajeswaran. 2022. Can Foundation Models Perform Zero-Shot
Task Specification For Robot Manipulation?. In Learning for Dy-
namics & Control Conference (L4DC).
Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Sanja Fi-
dler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti,
Jonathan Munro, Toby Perrett, Will Price, and Michael Wray.
2018. Scaling Egocentric Vision: The EPIC-KITCHENS Dataset.
In European Conference on Computer Vision (ECCV).
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei.
2009. ImageNet: A large-scale hierarchical image database. In
Computer Vision and Pattern Recognition (CVPR). 248–255.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.
2019. BERT: Pre-training of Deep Bidirectional Transformers
for Language Understanding. In Association for Computational
Linguistics (ACL). 4171–4186.
Andreas Geiger, Philip Lenz, and Raquel Urtasun. 2012. Are we
ready for autonomous driving? The KITTI vision benchmark
suite. In Computer Vision and Pattern Recognition (CVPR). 3354–
3361.
Carles Gelada, Saurabh Kumar, Jacob Buckman, Ofir Nachum, and
Marc G. Bellemare. 2019. DeepMDP: Learning Continuous La-
tent Space Models for Representation Learning. In International
Conference on Machine Learning (ICML).
Xinyang Geng, Hao Liu, Lisa Lee, Dale Schuurams, Sergey Levine,
and P. Abbeel. 2022. Multimodal Masked Autoencoders Learn
Transferable Representations. arXiv preprint arXiv:2205.14204
(2022).
Raghav Goyal, Samira Ebrahimi Kahou, Vincent Michalski, Joanna
Materzynska, Susanne Westphal, Heuna Kim, Valentin Haenel,
Ingo Fründ, Peter N. Yianilos, Moritz Mueller-Freitag, Florian
Hoppe, Christian Thurau, Ingo Bax, and Roland Memisevic. 2017.
The "Something Something Video Database for Learning and
Evaluating Visual Common Sense. In International Conference on
Computer Vision (ICCV).
Kristen Grauman, Andrew Westbury, Eugene Byrne, Zachary Q.
Chavis, Antonino Furnari, Rohit Girdhar, Jackson Hamburger,
Hao Jiang, Miao Liu, Xingyu Liu, Miguel Martin, Tushar Na-
garajan, Ilija Radosavovic, Santhosh K. Ramakrishnan, F. Ryan,
Jayant Sharma, Michael Wray, Mengmeng Xu, Eric Z. Xu, Chen
Zhao, Siddhant Bansal, Dhruv Batra, Vincent Cartillier, Sean
Crane, Tien Do, Morrie Doulaty, Akshay Erapalli, Christoph Fe-
ichtenhofer, Adriano Fragomeni, Qichen Fu, Christian Fuegen,
Abrham Gebreselasie, Cristina González, James M. Hillis, Xuhua
Huang, Yifei Huang, Wenqi Jia, Weslie Yu Heng Khoo, Jáchym
Kolár, Satwik Kottur, Anurag Kumar, Federico Landini, Chao
Li, Yanghao Li, Zhenqiang Li, Karttikeya Mangalam, Raghava
Modhugu, Jonathan Munro, Tullie Murrell, Takumi Nishiyasu,
Will Price, Paola Ruiz Puentes, Merey Ramazanova, Leda Sari,
Kiran K. Somasundaram, Audrey Southerland, Yusuke Sugano,
Ruijie Tao, Minh Vo, Yuchen Wang, Xindi Wu, Takuma Yagi,
Yunyi Zhu, Pablo Arbeláez, David J. Crandall, Dima Damen, Gio-
vanni Maria Farinella, Bernard Ghanem, Vamsi Krishna Ithapu,
C. V. Jawahar, Hanbyul Joo, Kris Kitani, Haizhou Li, Richard A.
Newcombe, Aude Oliva, Hyun Soo Park, James M. Rehg, Yoichi
13
Sato, Jianbo Shi, Mike Zheng Shou, Antonio Torralba, Lorenzo
Torresani, Mingfei Yan, and Jitendra Malik. 2022. Ego4D: Around
the World in 3,000 Hours of Egocentric Video. In Computer Vision
and Pattern Recognition (CVPR).
Danijar Hafner, Timothy P. Lillicrap, Jimmy Ba, and Mohammad
Norouzi. 2020. Dream to Control: Learning Behaviors by Latent
Imagination. In International Conference on Learning Representa-
tions (ICLR).
Kris K. Hauser. 2012. Recognition, prediction, and planning for
assisted teleoperation of freeform tasks. Autonomous Robots
(AURO) (2012), 241–254.
Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and
Ross B. Girshick. 2022. Masked Autoencoders Are Scalable Vision
Learners. In Computer Vision and Pattern Recognition (CVPR).
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016.
Deep Residual Learning for Image Recognition. In Computer
Vision and Pattern Recognition (CVPR).
Dan Hendrycks and Kevin Gimpel. 2016. Gaussian Error Linear
Units (GELUs). arXiv preprint arXiv:1606.08415 (2016).
Guy Hoffman and Cynthia Breazeal. 2007. Cost-Based Anticipatory
Action Selection for Human–Robot Fluency. IEEE Transactions
on Robotics (T-RO) 23 (2007), 952–961.
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Mor-
rone, Quentin de Laroussilhe, Andrea Gesmundo, Mona At-
tariyan, and Sylvain Gelly. 2019. Parameter-Efficient Transfer
Learning for NLP. arXiv (2019).
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu,
Yuanzhi Li, Shean Wang, and Weizhu Chen. 2021. LoRA: Low-
Rank Adaptation of Large Language Models. arXiv preprint
arXiv:2106.09685 (2021).
Sergey Ioffe and Christian Szegedy. 2015. Batch Normalization:
Accelerating Deep Network Training by Reducing Internal Co-
variate Shift. In International Conference on Machine Learning
(ICML). 448–456.
Andrew Jaegle, Felix Gimeno, Andrew Brock, Andrew Zisserman,
Oriol Vinyals, and João Carreira. 2021. Perceiver: General Per-
ception with Iterative Attention. In International Conference on
Machine Learning (ICML).
Stephen James and Andrew J. Davison. 2022. Q-Attention: Enabling
Efficient Learning for Vision-based Robotic Manipulation. IEEE
Robotics and Automation Letters (RA-L) 7 (2022), 1612–1619.
Stephen James, Kentaro Wada, Tristan Laidlow, and Andrew J. Davi-
son. 2022. Coarse-to-Fine Q-Attention: Efficient Learning for
Visual Robotic Manipulation via Discretisation. In Computer Vi-
sion and Pattern Recognition (CVPR). 13729–13738.
Shervin Javdani, Henny Admoni, Stefania Pellegrinelli, Siddhartha S
Srinivasa, and J Andrew Bagnell. 2018. Shared autonomy via
hindsight optimization for teleoperation and teaming. Interna-
tional Journal of Robotics Research (IJRR) 37 (2018), 717–742.
Rico Jonschkowski and Oliver Brock. 2015. Learning state repre-
sentations with robotic priors. Autonomous Robots 39 (2015),
407–428.
Siddharth Karamcheti, Laurel Orr, Jason Bolton, Tianyi Zhang,
Karan Goel, Avanika Narayan, Rishi Bommasani, Deepak
Narayanan, Tatsunori Hashimoto, Dan Jurafsky, Christopher D.
Manning, Christopher Potts, Christopher Ré, and Percy Liang.
2021a. Mistral - A Journey towards Reproducible Language
Model Training.
Siddharth Karamcheti, Megha Srivastava, Percy Liang, and Dorsa
Sadigh. 2021b. LILA: Language-Informed Latent Actions. In
Conference on Robot Learning (CoRL).
Apoorv Khandelwal, Luca Weihs, Roozbeh Mottaghi, and Anirud-
dha Kembhavi. 2021. Simple but Effective: CLIP Embeddings for
Embodied AI. In Computer Vision and Pattern Recognition (CVPR).
14809–14818.
Diederik Kingma and Jimmy Ba. 2015. Adam: A method for sto-
chastic optimization. In International Conference on Learning
Representations (ICLR).
Ilya Kostrikov, Denis Yarats, and Rob Fergus. 2021. Image Aug-
mentation Is All You Need: Regularizing Deep Reinforcement
Learning from Pixels. In International Conference on Learning
Representations (ICLR).
Michael Laskin, Kimin Lee, Adam Stooke, Lerrel Pinto, P. Abbeel,
and A. Srinivas. 2020. Reinforcement Learning with Augmented
Data. In Advances in Neural Information Processing Systems
(NeurIPS).
Juho Lee, Yoonho Lee, Jungtaek Kim, Adam R. Kosiorek, Seungjin
Choi, and Yee Whye Teh. 2018. Set Transformer: A Framework
for Attention-based Permutation-Invariant Neural Networks. In
International Conference on Machine Learning (ICML).
S. Levine, Chelsea Finn, Trevor Darrell, and P. Abbeel. 2016. End-to-
End Training of Deep Visuomotor Policies. Journal of Machine
Learning Research (JMLR) 17 (2016).
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro
Perona, Deva Ramanan, Piotr Dollár, and C. Lawrence Zitnick.
2014. Microsoft COCO: Common objects in context. In European
Conference on Computer Vision (ECCV). 740–755.
Hao Liu, Lisa Lee, Kimin Lee, and Pieter Abbeel. 2022. InstructRL:
Simple yet Effective Instruction-Following Agents with Multi-
modal Transformer. arXiv preprint arXiv:2210.13431 (2022).
Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. 2019. ViLBERT:
Pretraining Task-Agnostic Visiolinguistic Representations for
Vision-and-Language Tasks. In Advances in Neural Information
Processing Systems (NeurIPS).
Jiasen Lu, Christopher Clark, Rowan Zellers, Roozbeh Mottaghi,
and Aniruddha Kembhavi. 2023. Unified-IO: A Unified Model
for Vision, Language, and Multi-Modal Tasks. In International
Conference on Learning Representations (ICLR).
Corey Lynch and Pierre Sermanet. 2020. Grounding Language in
Play. arXiv preprint arXiv:2005.07648 (2020).
Yecheng Jason Ma, Shagun Sodhani, Dinesh Jayaraman, Osbert
Bastani, Vikash Kumar, and Amy Zhang. 2022. VIP: Towards
Universal Visual Reward and Representation via Value-Implicit
Pre-Training. arXiv preprint arXiv:2210.00030 (2022).
Jeffrey Mahler, Jacky Liang, Sherdil Niyaz, Michael Laskey, Richard
Doan, Xinyu Liu, Juan Aparicio Ojea, and Ken Goldberg. 2017.
Dex-Net 2.0: Deep Learning to Plan Robust Grasps with Synthetic
Point Clouds and Analytic Grasp Metrics. In Robotics: Science
and Systems (RSS).
Ajay Mandlekar, Danfei Xu, Josiah Wong, Soroush Nasiriany, Chen
Wang, Rohun Kulkarni, Li Fei-Fei, Silvio Savarese, Yuke Zhu,
and Roberto Martín-Martín. 2021. What Matters in Learning
from Offline Human Demonstrations for Robot Manipulation. In
Conference on Robot Learning (CoRL).
14
Karamcheti et. al.
Dipendra K. Misra, John Langford, and Yoav Artzi. 2017. Map-
ping Instructions and Visual Observations to Actions with Rein-
forcement Learning. In Empirical Methods in Natural Language
Processing (EMNLP).
Suraj Nair, Eric Mitchell, Kevin Chen, Brian Ichter, Silvio Savarese,
and Chelsea Finn. 2021. Learning Language-Conditioned Robot
Behavior from Offline Data and Crowd-Sourced Annotation. In
Conference on Robot Learning (CoRL).
Suraj Nair, Aravind Rajeswaran, Vikash Kumar, Chelsea Finn, and
Abhinav Gupta. 2022. R3M: A Universal Visual Representation
for Robot Manipulation. arXiv preprint arXiv:2203.12601 (2022).
Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault
Févry, Michael Matena, Karishma Malkan, Noah Fiedel, Noam M.
Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan Ding, Jake Mar-
cus, Adam Roberts, and Colin Raffel. 2021. Do Transformer Mod-
ifications Transfer Across Implementations and Applications?.
In Empirical Methods in Natural Language Processing (EMNLP).
OpenAI. 2022. ChatGPT: Optimizing Language Models for Dia-
logue.
Jyothish Pari, Nur Muhammad (Mahi) Shafiullah, Sridhar Pandian
Arunachalam, and Lerrel Pinto. 2022. The Surprising Effective-
ness of Representation Learning for Visual Imitation. In Robotics:
Science and Systems (RSS).
Simone Parisi, Aravind Rajeswaran, Senthil Purushwalkam, and
Abhinav Kumar Gupta. 2022. The Unsurprising Effective-
ness of Pre-Trained Vision Models for Control. arXiv preprint
arXiv:2203.03580 (2022).
Ofir Press, Noah A. Smith, and Mike Lewis. 2022. Train Short, Test
Long: Attention with Linear Biases Enables Input Length Extrap-
olation. In International Conference on Learning Representations
(ICLR).
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. 2021. Learning Transferable Visual Models From
Natural Language Supervision. In International Conference on
Machine Learning (ICML), Vol. 139. 8748–8763.
Ilija Radosavovic, Tete Xiao, Stephen James, P. Abbeel, Jitendra
Malik, and Trevor Darrell. 2022. Real-World Robot Learning with
Masked Visual Pre-training. In Conference on Robot Learning
(CoRL).
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan
Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu.
2019. Exploring the limits of transfer learning with a unified
text-to-text transformer. arXiv preprint arXiv:1910.10683 (2019).
Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan
Zhang, and Alexey Dosovitskiy. 2021. Do Vision Transformers
See Like Convolutional Neural Networks?. In Advances in Neural
Information Processing Systems (NeurIPS).
Scott Reed, Konrad Zolna, Emilio Parisotto, Sergio Gomez
Colmenarejo, Alexander Novikov, Gabriel Barth-Maron, Mai
Gimenez, Yury Sulsky, Jackie Kay, Jost Tobias Springenberg, Tom
Eccles, Jake Bruce, Ali Razavi, Ashley D. Edwards, Nicolas Man-
fred Otto Heess, Yutian Chen, Raia Hadsell, Oriol Vinyals, Mah-
yar Bordbar, and Nando de Freitas. 2022. A Generalist Agent.
arXiv preprint arXiv:2205.06175 (2022).
Voltron: Language-Driven Representations for Robotics
Machel Reid, Yutaro Yamada, and Shixiang Shane Gu. 2022. Can
Wikipedia Help Offline Reinforcement Learning? arXiv preprint
arXiv:2201.12122 (2022).
Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf.
2019. DistilBERT, a distilled version of BERT: smaller, faster,
cheaper and lighter. arXiv preprint arXiv:1910.01108 (2019).
Ashutosh Saxena, Justin Driemeyer, and A. Ng. 2008. Robotic
Grasping of Novel Objects using Vision. International Journal of
Robotics Research (IJRR) 27 (2008), 157–173.
Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade
Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush
Katta, Clayton Mullis, Mitchell Wortsman, Patrick Schramowski,
Srivatsa Kundurthy, Katherine Crowson, Ludwig Schmidt, Robert
Kaczmarczyk, and Jenia Jitsev. 2022. LAION-5B: An open large-
scale dataset for training next generation image-text models.
In Neural Information Processing Systems Track on Datasets and
Benchmarks (NeurIPS Datasets and Benchmarks).
Christoph Schuhmann, Richard Vencu, Romain Beaumont, Robert
Kaczmarczyk, Clayton Mullis, Aarush Katta, Theo Coombes, Je-
nia Jitsev, and Aran Komatsuzaki. 2021. LAION-400M: Open
Dataset of CLIP-Filtered 400 Million Image-Text Pairs. arXiv
preprint arXiv:2111.02114 (2021).
Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric
Jang, Stefan Schaal, and Sergey Levine. 2018. Time-Contrastive
Networks: Self-Supervised Learning from Video. In International
Conference on Robotics and Automation (ICRA). 1134–1141.
Rutav Shah and Vikash Kumar. 2021. RRL: Resnet as representa-
tion for Reinforcement Learning. In International Conference on
Machine Learning (ICML).
Dandan Shan, Jiaqi Geng, Michelle Shu, and David F. Fouhey. 2020.
Understanding Human Hands in Contact at Internet Scale. In
Computer Vision and Pattern Recognition (CVPR). 9866–9875.
Lin Shao, Toki Migimatsu, Q. Zhang, Karen Yang, and Jeannette
Bohg. 2020. Concept2Robot: Learning Manipulation Concepts
from Instructions and Human Demonstrations. In Robotics: Sci-
ence and Systems (RSS).
Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut.
2018. Conceptual Captions: A Cleaned, Hypernymed, Image
Alt-text Dataset For Automatic Image Captioning. In Association
for Computational Linguistics (ACL).
Noam M. Shazeer. 2020. GLU Variants Improve Transformer. arXiv
preprint arXiv:2002.05202 (2020).
Mohit Shridhar, Lucas Manuelli, and Dieter Fox. 2021. CLIPort:
What and Where Pathways for Robotic Manipulation. In Confer-
ence on Robot Learning (CoRL).
Mohit Shridhar, Lucas Manuelli, and Dieter Fox. 2022. Perceiver-
Actor: A Multi-Task Transformer for Robotic Manipulation. In
Conference on Robot Learning (CoRL).
Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume
Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela.
2022. FLAVA: A Foundational Language And Vision Alignment
Model. In Computer Vision and Pattern Recognition (CVPR). 15617–
15629.
Laura Smith, Nikita Dhawan, Marvin Zhang, P. Abbeel, and Sergey
Levine. 2020. AVID: Learning Multi-Stage Tasks via Pixel-Level
Translation of Human Videos. In Robotics: Science and Systems
(RSS).
15
A. Srinivas, Michael Laskin, and P. Abbeel. 2020. CURL: Contrastive
Unsupervised Representations for Reinforcement Learning. In
International Conference on Machine Learning (ICML).
Krishna Srinivasan, Karthik Raman, Jiecao Chen, Michael Bender-
sky, and Marc Najork. 2021. WIT: Wikipedia-based Image Text
Dataset for Multimodal Multilingual Machine Learning. In ACM
Special Interest Group on Information Retreival (SIGIR).
Simon Stepputtis, J. Campbell, Mariano Phielipp, Stefan Lee, Chitta
Baral, and H. B. Amor. 2020. Language-Conditioned Imitation
Learning for Robot Manipulation Tasks. In Advances in Neural
Information Processing Systems (NeurIPS).
Robin Strudel, Ricardo Garcia Pinel, Ivan Laptev, and Cordelia
Schmid. 2021. Segmenter: Transformer for Semantic Segmen-
tation. In International Conference on Computer Vision (ICCV).
7242–7252.
Jianlin Su, Yu Lu, Shengfeng Pan, Bo Wen, and Yunfeng Liu. 2021.
RoFormer: Enhanced Transformer with Rotary Position Embed-
ding. arXiv preprint arXiv:2104.09864 (2021).
Stefanie Tellex, Thomas Kollar, Steven Dickerson, Matthew R Wal-
ter, Ashis Gopal Banerjee, Seth J Teller, and Nicholas Roy. 2011.
Understanding Natural Language Commands for Robotic Naviga-
tion and Mobile Manipulation. In Association for the Advancement
of Artificial Intelligence (AAAI).
Zhan Tong, Yibing Song, Jue Wang, and Limin Wang. 2022. Video-
MAE: Masked Autoencoders are Data-Efficient Learners for Self-
Supervised Video Pre-Training. In Advances in Neural Information
Processing Systems (NeurIPS).
Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel
Synnaeve, and Hervé Jégou. 2021. Going deeper with Image
Transformers. In International Conference on Computer Vision
(ICCV). 32–42.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion
Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017.
Attention Is All You Need. arXiv preprint arXiv:1706.03762 (2017).
Ashish Vaswani, Yinggong Zhao, Victoria Fossum, and David Chi-
ang. 2013. Decoding with Large-Scale Neural Language Models
Improves Translation. In Empirical Methods in Natural Language
Processing (EMNLP). 1387–1392.
Ke-Jyun Wang, Yun-Hsuan Liu, Hung-Ting Su, Jen-Wei Wang, Yu-
Siang Wang, Winston H. Hsu, and Wen-Chin Chen. 2021. OCID-
Ref: A 3D Robotic Dataset With Embodied Language For Clutter
Scene Grounding. In Association for Computational Linguistics
(ACL).
Lee E. Weiss, Arthur C. Sanderson, and Charles P. Neuman. 1987.
Dynamic sensor-based control of robots with visual feedback.
IEEE Robotics and Automation Letters (RA-L) 3 (1987), 404–417.
Ross Wightman. 2019. PyTorch Image Models. https://github.com/
rwightman/pytorch-image-models.
Tete Xiao, Ilija Radosavovic, Trevor Darrell, and Jitendra Malik.
2022. Masked Visual Pre-training for Motor Control. arXiv
preprint arXiv:2203.06173 (2022).
Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao.
2015. LSUN: Construction of a Large-scale Image Dataset us-
ing Deep Learning with Humans in the Loop. arXiv preprint
arXiv:1506.03365 (2015).
Karamcheti et. al.
Jiahui Yu, Zirui Wang, Vijay Vasudevan, Legg Yeung, Mojtaba
Seyedhosseini, and Yonghui Wu. 2022. CoCa: Contrastive Cap-
tioners are Image-Text Foundation Models.
arXiv preprint
arXiv:2205.01917 (2022).
Licheng Yu, Patrick Poirson, Shan Yang, Alexander C. Berg, and
Tamara L. Berg. 2016. Modeling Context in Referring Expressions.
In European Conference on Computer Vision (ECCV).
Andy Zeng, Shuran Song, Kuan-Ting Yu, Elliott Donlon, Fran-
cois Robert Hogan, Maria Bauzá, Daolin Ma, Orion Taylor,
Melody Liu, Eudald Romo, Nima Fazeli, Ferran Alet, Nikhil Cha-
van Dafle, Rachel Holladay, Isabella Morona, Prem Qu Nair,
Druck Green, Ian Taylor, Weber Liu, Thomas A. Funkhouser,
and Alberto Rodriguez. 2017. Robotic pick-and-place of novel ob-
jects in clutter with multi-affordance grasping and cross-domain
image matching. International Journal of Robotics Research (IJRR)
41 (2017), 690–705.
Xiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, and Lucas Beyer.
2022. Scaling Vision Transformers. In Computer Vision and Pat-
tern Recognition (CVPR). 1204–1213.
Amy Zhang, Rowan McAllister, Roberto Calandra, Yarin Gal, and
Sergey Levine. 2021. Learning Invariant Representations for
Reinforcement Learning without Reconstruction. In International
Conference on Learning Representations (ICLR).
Biao Zhang and Rico Sennrich. 2019. Root Mean Square Layer Nor-
malization. In Advances in Neural Information Processing Systems
(NeurIPS).
Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun
Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip
H. S. Torr, and Li Zhang. 2021. Rethinking Semantic Segmenta-
tion from a Sequence-to-Sequence perspective with Transform-
ers. In Computer Vision and Pattern Recognition (CVPR).
16
Voltron: Language-Driven Representations for Robotics
Overview
In the appendices below, we provide additional details around the implementation, pretraining, and adaptation procedures described in the
main text, in addition to delving deeper into various discussions. Finally, we add additional results and visualizations that further complement
the findings from the main text.
We provide open-source code for loading and using pretraining models, hosted links for our preprocessing splits (including the actual batches
seen during training), and a separate, standalone open-source code repository for our evaluation suite. Our hope is that the evaluation suite
especially is general and easy to use for downstream work on evaluating learned representations. The full manifest of resources are as
follows:
• Project Page (videos & additional links): https://sites.google.com/view/voltron-robotics
• Open-Source Modeling Repository (pretraining code for all approaches, loading models): https://github.com/siddk/voltron-robotics
• Open-Source Evaluation Suite (general API for evaluating on different problem domains): https://github.com/siddk/voltron-evaluation
All model and automated evaluation code is in PyTorch; however, the evaluation code can be easily overridden to suit your needs.
An overview of each appendix can be found below. We further indicate which parts of the appendices are best viewed here in the text or on
the project page; for videos and visualizations, we highly recommend navigating to the latter.
Appendix A – Motivating Questions
We index a list of "motivating" questions that may arise from reading the main text and that we expand on further here (e.g.,
"why only evaluate frozen representations"). Our answers here are direct, and in many cases link to actual experiments further
on in the appendices.
Appendix B – Voltron Implementation
We provide code and other implementation details around the modifications to the Transformer architecture described in the
Implementation and Reproducibility Section (see §4) of the main text, along with additional details around the released models
and data artifacts from this work. The section is structured as follows:
§B.1 – Voltron Transformer Implementation
Side-by-side comparisons of the Voltron and "standard" Vision Transformer blocks.
§B.2 – Jointly Processing Vision & Language
Additional details around encoding multimodal inputs (e.g., position encoding, modality tokens, etc.).
§B.3 – Pretraining Curves
Voltron pretraining loss curves (reconstruction error, language modeling error) over training; useful for characterizing
the behavior of downstream models (and the trade-offs between the losses).
§B.4 – Index of Released Artifacts
We release pretrained Voltron models – V – Cond, V – Dual, V – Gen – in addition to intermediate checkpoints to
facilitate future work. We also release the larger V – Cond model (ViT-Base).
Appendix C – Additional Results & Visualization
We report additional results and visualizations from experiments mentioned in the main text, as well as other experiments that
further support our conclusions.
§C.1 – Analysis: Impact of Language-Conditioning on Reconstruction Loss
We revisit the language vs. no-language ablation from the main text, looking at pretraining curves to help explain why
language is so helpful as a supervision signal. We find that language-conditioning significantly lowers reconstruction
loss, allowing models to pick up on more low-level features.
§C.2 – Analysis: Generative vs. Masked Language Modeling
We look further at the masked language modeling ablation from the main text, via the reproduction of Multimodal
Masked Autoencoders [M3AE; Geng et al. 2022]. We find in the pretraining curves high evidence of overfitting with
masked models early in training, impacting the learned representations.
17
Karamcheti et. al.
§C.3 – Results: Adroit Visuomotor Control
We present results on the Adroit Visumotor Control environments from Nair et al. [2022], finding that while language
is again superior, higher-level features perform better. This is preliminary evidence that even for individual evaluation
domains (e.g., single-task visuomotor control), there is no silver bullet; different types of representations perform
differently.
§C.4 – Qualitative: Real-Robot Language-Conditioned Policy Rollouts
Visualizations of real-world policy rollouts from the various representation learning approaches.
§C.5 – Qualitative: Additional Intent Scoring Visualizations
Additional intent scoring visualizations using videos from the WHiRL dataset [Bahl et al. 2022].
Appendix D – Data-Equivalent Reproductions & Reproducibility
We add additional discussion around the reproductions of MVP and R3M on the Something-Something-v2 dataset:
§D.1 – Additional Preprocessing Discussion
Additional discussion of how we preprocess Something-Something-v2 [Sth-Sth; Goyal et al. 2017] for pretraining, with
a comparison of how prior work such as MVP source and process pretraining data.
§D.2 – Multiheaded Attention Pooling – Feature Extraction
Detailed explanation of the Multiheaded Attention Pooling [MAP; Lee et al. 2018] feature extraction strategy, with
analysis and results comparing to alternative methods.
Appendix E – Adapting Representations for Evaluation
We provide further descriptions of the adaptation pipeline for each of the five evaluation domains.
18
Voltron: Language-Driven Representations for Robotics
A Motivating Questions
Q1. From the results, some Voltron models outperform larger models such as MVP-Base trained on significantly more data, even on tasks that do
not necessarily need language information. How do you make sense of this?
We find that in many of our evaluation domains, especially domains with episodic tasks such as single-task and language-conditioned
imitation learning, it is important to discern differences across frames in the same overall visual context, or otherwise pay attention to small
visual distinctions. Looking at the original MVP work [Radosavovic et al. 2022], we see that the original pretraining datasets are compiled by
sampling frames from various video datasets once, in a single-step procedure, at low sampling rates. For many datasets (such as Sth-Sth and
Ego4D), this means only seeing 1-2 frames per video clip in total during training.
In contrast, when we sample data from Sth-Sth, we ensure to sample at least 5 frames per clip, per epoch; while the aggregate amount of
diverse contexts is much lower than in the original MVP work, seeing multiple frames per context seems to significantly help learning, and
not just for Voltron models! On the tasks where Voltron models outperform MVP (EgoSoup) (with a larger ViT-Base encoder), we also see
commensurate gains in our reproductions R-MVP and R-R3M. For example, R-MVP is at par with or only slightly less performant than MVP
(EgoSoup) on grasp affordance prediction and single-task control. We offer further discussion in §D.1.
Q2. Why don't you evaluate models trained with α = 1 (pure language generation)?
In preliminary experiments, we partially pretrained variants of V – Gen with values α = 0.25, 0.5, 0.75; we focused on evaluating the
downstream performance of these representations in the context of the single task visuomotor control evaluation. With α = 0.75 we observed
significant performance degradation on control tasks; furthermore, looking at the pretraining loss curves, we saw the reconstruction error
plateau early in training. We found that α = 0.5 balanced learning, and allowed us to continue to push reconstruction error down while also
pushing the language generator loss (cross-entropy) lower; with α = 0.25, we saw the opposite trend as with α = 0.75.
These results are to be taken with a grain of salt, given the limited pretraining duration. However, we worry that with α = 1, we might
suffer doubly for 1) never conditioning on language, which is so clearly helpful from our results, and 2) potentially fall into the same failure
mode as the R-M3AE multimodal masked autoencoder from Section §6 in the main text, overfitting to the language loss. In general, V – Gen
with α = 0.5 already converges to a substantially higher reconstruction loss as V – Cond and V – Dual, as shown in the pretraining curves
in §B.3. That being said, it is a promising avenue for future work to understand if this is inherent or a problem with the specific optimization
procedure we used – perhaps changing the relative scaling of the two losses over the course of pretraining may mitigate this issue, or even
adaptively clipping the gradient updates depending on the relative contribution of the visual reconstructor or language generator.
Q3. Why does language during pretraining help for downstream tasks that don't use language?
Consider a masked visual input of a "black, curved object above a wooden surface." Given this information – and this information alone –
what is a plausible reconstruction? There are myriad objects that fit those percepts – a black, curved object: we could lbe looking at the
side of a bowl, the handle of a briefcase, the arm of a chair or stool, or in general, any number of possible options. A masked autoencoder
optimizing for reconstruction must embed in the representation of this input as many of the features possible to enable good downstream
reconstruction loss. It needs to model everything, as the visual context is under-specified and ambiguous. This compressed bottleneck is core
to learning a masked autoencoder, but the unfortunate byproduct of this – in light of a vast world of possibilities – are representations that
try to capture everything they possibly can.
Contrast this with a world in which you are told that the same visual context is associated with the language caption "lifting a black
coffee mug on the table." What changes? The posterior over possible objects collapses down to the narrow slice of possibilities captured by
"black coffee mug"; under this new set of possibilities, what does the encoder focus on? What type of black coffee mug is on the table? If it is
being lifted, how is it being lifted? From what part of the object – the handle (seen in frame), or somewhere else? What are the features that
help further reconstruct the black coffee mug? The other nearby surfaces – what is the mug resting on (a wooden table? the wooden arm of
a chair?), is it at an angle? The additional visual context – what type of scene are we in – a living room, a coffeehouse? What else can I
specifically encode that helps me reconstruct this cup in high-fidelity? The edges of the cup, its texture, the way the light is reflecting off of
it in this particular visible context?
Conditioning on a language description both simplifies and focuses what I need to represent. My encoded features are no longer general
enough to cover the full range of objects that could follow from the visible context alone; instead, I can use that same capacity to represent
this specific context, as denoted by language. The encoder can focus on all of things left unspecified by language – arguably, the very things
we want a visual encoder for robotics to represent. Because we know that it is a "black coffee mug," we can encode features around different
types of black coffee mugs as a first level, and at a second level, go deeper, and actually model the low-level features that are not tied to
semantics, but tied to core, perceptual primitives: the texture of the mug, the edges/boundaries of the object relative to other objects, even
the way light reflects off of the surface. These are the features that help in tasks like grasp affordance prediction (the edges of objects), and
when we learn joint representations of language and vision, the features that help with localization (grounding referring expressions) and
detection. Though speculative, we can attempt to make this concrete with results: if language is indeed reducing the space over plausible
reconstructions (and focusing the encoder), we might expect lower reconstruction error when language-conditioning vs. when we condition
19
Karamcheti et. al.
solely on the visual context alone. This is exactly what we show in §C.1, and a hint at why Voltron is able to perform so strongly downstream
(even without language input). The simple presence of language during pretraining refocuses the features in our representations.
Q4. Why only evaluate frozen representations? Why not fully finetune the backbones for each downstream evaluation?
Both MVP and R3M [Radosavovic et al. 2022; Nair et al. 2022] only evaluate frozen visual representations, following a precedent set by a
long tradition of work in self-supervised learning from the computer vision community [Chen et al. 2020; Radford et al. 2021; He et al. 2022].
There are two reasons for the validity of evaluating frozen representations. First, the hope is that evaluating frozen representations (via
adapted per-evaluation "heads" on top) help us isolate the relative impact of what the representations contain – otherwise, the separation
between the standalone representations and the downstream evaluation parameters (and the co-mingling of the two when optimizing all
weights via gradient descent) becomes much less clear. Second, for many of the evaluations we look at, we have extremely small amounts
of data – on the order of 1000 examples for grasp affordance prediction, 10 - 20 demonstrations for single task and language-conditioned
imitation. There is a valid fear that full-finetuning the sizeable visual encoders vs. just the adaptation parameters (< 50K parameters) could
lead to extreme overfitting. In general, finetuning large-scale Transformers from minimal data is an active area of research in and of itself,
with work like adapters, low-rank approximations, and partial finetuning [Houlsby et al. 2019; Hu et al. 2021; Ben-Zaken et al. 2022].
Q5. Assuming pretraining datasets of (video, language) pairs feels restrictive; is there a way to leverage other sources of data?
While Voltron expects a dataset of videos and associated language narrations, there is a wealth of visually diverse and relevant data that
does not subscribe to this type signature:: datasets of standalone images from curated datasets [Deng et al. 2009; Geiger et al. 2012; Yu et al.
2015], curated images paired with language captions as in Conceptual Captions [Lin et al. 2014; Sharma et al. 2018], and large in-the-wild
datasets of images paired with text scraped from the internet [Schuhmann et al. 2021; Srinivasan et al. 2021; Schuhmann et al. 2022].
Luckily (though beyond the scope of this initial work), incorporating this data into the existing Voltron learning pipeline is straightforward;
for image data without language, we can simply "annotate" each example with an empty <NULL> token in the worst case, or alternatively,
with some minimal textual metadata (e.g., a class label, dataset descriptor, or even a URL if available). To accommodate for training on
variable length image contexts, a naive solution would be adopting frame dropout or padding; there are myriad ways to do this efficiently –
from Perceiver-based resampling of large patch sequences [Jaegle et al. 2021; Alayrac et al. 2022] to different position encoding schemes [Su
et al. 2021; Press et al. 2022], to more efficient attention variants [Beltagy et al. 2020].
20
Voltron: Language-Driven Representations for Robotics
B Voltron Implementation & Artifacts
We provide complete implementation details for the various Voltron models, from the small modifications to the Transformer block for
added pretraining stability, to the added structural components for embedding multimodal (vision and language) inputs. All of these details
are made explicit in our code release, linked on our project page.
Figure 8: Standard vs. Voltron Transformer Implementation. The Voltron Transformer Block is near-identical to the "standard"
Transformer block used in prior work in Vision Transformers, with exceptions marked in orange. Notably, we switch LayerNorm for RMSNorm,
a standard MLP with a GELU activation [Hendrycks and Gimpel 2016] with a SwishGLU activation, and adopt LayerScale for each residual
connection; these components are defined explicitly below the block definitions. In ablating these architecture modifications, we find no
impact on downstream performance, but increased pretraining stability.
B.1 Voltron Transformer Implementation
As mentioned in §4, we perform a series of modifications to the typical Transformer block used in prior work in the Vision Transformer and
Masked Autoencoding literature to help with pretraining stability; these changes are motivated by recent work from the NLP community on
training stable and performant Transformer models [Narang et al. 2021; Karamcheti et al. 2021a; Chowdhery et al. 2022].
We show the side-by-side comparison of the "standard" Transformer block implementation vs. the Voltron Transformer block in Figure 8.
The changes are three-fold:
• Using Root Mean-Square Normalization [Zhang and Sennrich 2019] over the default LayerNorm; not only does RMSNorm have fewer
parameters, but it has been shown to increase stability and performance [Narang et al. 2021].
• Using the SwishGLU activation [Shazeer 2020; Chowdhery et al. 2022] over the default GELU [Hendrycks and Gimpel 2016].
• Using LayerScale [Touvron et al. 2021] for scaling down the magnitude of residual connections; prior work has found this to have a
powerful stabilizing effect during pretraining [Karamcheti et al. 2021a].
We also provide pseudocode for implementing the various modifications in Figure 8 (bottom); these modifications are all simple and
transferable across Transformer implementations. Furthermore, as part of the no-language implementation in §6, we ablate the effects
of these modifications on performance; we find that these modifications do not change downstream performance, but significantly increase
pretraining stability, following our initial motivation.
21
Karamcheti et. al.
B.2 Jointly Processing Vision & Language
To incorporate language into the typical masked autoencoding pipeline, we add a series of small structural changes to handle 1) multi-modality,
2) sharing a Transformer decoder for both visual reconstruction and language generation, and 3) handling position encoding for both visual
patch embeddings and textual tokens.
Multimodal Encoder. We make the following adjustments to enable a Transformer encoder to embed multiple modalities. First, we project
both our learned "patch embeddings" (obtained as in a standard ViT, by learning a linear transformation of our flattened RGB patches of
size p × p × 3) and our pretrained language embeddings to the same space Rd , where d is the Transformer dimensionality (e.g., d = 384
for a ViT-Small). While we learn our patch embedding end-to-end, we initialize our language embeddings from a pretrained (and frozen)
DistilBERT model [Sanh et al. 2019]; this is following R3M [Nair et al. 2022]. We pad each language annotation c in our dataset to a maximum
length L = 20 tokens, additionally storing a binary length mask to ensure that each Transformer block does not attend to padding.
Once projected into the Transformer's embedding space, we add learned modality embeddings (e.g., an embedding for <IMG> and <LANG>)
to each of the respective inputs; we find that this better allows the Transformer to reason over different modalities. We initialize these
learnable embeddings via a truncated normal distribution, with scale σ = 0.02, following how other special embeddings are initialized in the
MAE and Vision Transformer literature [He et al. 2022].
The final step is for handling multi-frame contexts; we learn a set of frame index embeddings (e.g., for FRAME-1, FRAME-2, etc.) and add
these to the corresponding patch embeddings – i.e. we add the FRAME-i embedding to all patch embeddings from the first frame and so on.
This further allows us to distinguish individual frame patches from one another.
At this point, we concatenate the full sequence of flattened visual patch embeddings and language token embeddings, and feed them
through the stack of Transformer blocks that form the multimodal encoder. This output is fed to the decoder, in the same fashion as a
traditional masked autoencoder.
Shared Transformer for Reconstruction & Generation. As mentioned in §4, we make one crucial change to the standard Transformer
decoder in a masked autoencoder to additionally allow for language generation: namely adding a prefix mask over the language inputs [Raffel
et al. 2019]. The goal of this mask (as stated in the main text) is to prevent information leakage when decoding; this mask selectively zeroes
out dependencies in the multiheaded attention during training such that when generating language given a visual context, each language
embedding at a given timestep t can only attend to prior generated language at timesteps < t, as well as the entire visual context. This
masking operates in the same way as the original decoder masking described in Vaswani et al. [2013]; the attention scores for all "invalid"
inputs (> t) are set to 0, restricting the model from incorporating future predictions as it processes the sequence.
Apart from this, the only other change we make to the MAE decoder is learning a separate set of modality embeddings (as described in
the prior section) – i.e. embeddings for <IMG-DECODER> and <LANG-DECODER>; the reason for this is that the Decoder sees a series of <MASK>
embeddings representing the "unseen" visible context to reconstruct, as well as the new language context to generate (recall that because of
the α gating, the language generator never sees language embeddings from the encoder). We add these to the corresponding embeddings fed
to the decoder, then resume the standard MAE decoding pipeline (reconstructing visual patches), and the language generation pipeline
(autoregressively generating the original annotation).
Position Encoding. We follow standard pratice in the masked autoencoding literature (and the same practice used by MVP), as position
encode each of the patch embeddings subject to a fixed (deterministic) 2D sinusoidal embedding that reflects both vertical and horizontal
positioning of each patch within a grid – this is taken directly from the original MAE codebase. To encode text, we use a similar strategy,
using a 1D sinusoidal embedding added to each token embedding in a sequence.
B.3 Pretraining Curves
To further contextualize our results and enrich some of the discussion §6 (and further on in the appendices), we include the pretraining loss
curves for each of the three Voltron models we train in this work – V – Cond, V – Dual, and V – Gen. The reconstruction error curves
for the three models can be found in Figure 9. In general, we find that the "trade-off" between language-conditioned reconstruction and
visually-grounded language generation is made concrete in the pretraining loss – both purely language-conditioned models (V – Cond, V
– Dual with α = 0) converge to fairly low reconstruction error; however, V – Gen (with α = 0.5) converges to a much higher reconstruction
error – due to the tension between optimizing for both reconstruction and language generation. We additionally note that adding even
simple, dual-frame contexts enables lower reconstruction error – even with the ViT-Small models, on the Sth-Sth dataset.
22
Voltron: Language-Driven Representations for Robotics
Figure 9: Voltron Pretraining Learning Curves (Reconstruction Error). We visualize the reconstruction error over pretraining epoch
for each of the Voltron models. Note that each model learns differently, converging to different reconstruction errors: both the language-
conditioned models (α = 0) converge to low reconstruction error, with V – Dual showing that encoding and learning over multi-frame
contexts allowing for a better fit. The language generative model V – Gen (α = 0.5) converges to a relatively higher reconstruction error,
showing the tension between balancing two disparate objectives.
B.4 Index of Released Artifacts
All of the following are linked in our code release and project page:
• Checkpoints for V – Cond, V – Dual, and V – Gen after 400 epochs of training on Sth-Sth.
• Checkpoints for our reproductions R-MVP and R-R3M (both with a ViT-S and RN-50 backbone).
• All index files (serialized frames/order seen during training) for reproducible pretraining.
• Intermediate checkpoints every 20 epochs for each of the three Voltron models – along with optimizer states.
• Checkpoints for the ViT-Base variant of V – Cond (86M parameters vs. 22M for a ViT-Small).
The modeling code release additionally provides documentation and scripts for 1) training these models from scratch, and 2) downloading
and extracting representations from the pretrained models. The evaluation code release provides a unified API for the various problems we
evaluate on in this work.
23
C Additional Results & Visualizations
We present additional results and visualizations to further support our claims from the main text. We provide additional discussion of 1) the
impact of language supervision (in the context of pretraining reconstruction loss), 2) a further discussion of masked vs. generative language
modeling as an objective, with an analysis of pretraining language modeling loss, 3) additional single task control results on the Adroit
dexterous manipulation environments, 4) qualitative trajectory rollouts from the V – Gen language-conditioned imitation policy, and 5)
additional qualitative intent scoring results.
Karamcheti et. al.
Figure 10: Pretraining Curves for the No-Language Ablation Experiment. Training with language-conditioning (V – Cond) con-
verges to a lower reconstruction error while also learning faster, compared to no-language (single-frame MAE) pretraining.
C.1 Analysis: Impact of Language-Conditioning on Reconstruction Loss
As part of the ablation experiments in §6, we evaluate the impact of language-supervision during pretraining via a no-language ablation,
training a single-frame masked autoencoder with the Voltron Transformer architecture as described in §B.1; this resulting model does
not condition on language at all, but is otherwise identical to V – Cond. In the main text, we evaluated the corresponding no-language
model on a subset of evaluation tasks, showing a noticeable drop in performance across every evaluated application (even those without
language input) – thereby showing concrete evidence as to the value of language-driven pretraining. Here we expand on those results by
characterizing the behavior of both V – Cond and the no-language ablation thereof in terms of their pretraining behavior.
Figure 10 shows the reconstruction error for both V – Cond (yellow) and the no-language ablation (gray) over the course of pretraining.
There are two noticeable properties of these curves: first, V – Cond converges to a substantially lower reconstruction error than the
same model trained without language. Second, V – Cond is able to learn faster, showing a steeper decline in reconstruction error earlier
on in training. Taken together, these curves suggest that language-conditioning is able to focus feature learning in a way that allows
the learned visual encoder to better encode masked contexts – especially considering that the visual reconstructor is by definition not
language-conditioned. Furthermore, from the aggregate evaluation results, the features learned as a result somehow generalize better across
the board, from low-level tasks like grasp affordance prediction, to high-level tasks such as control.
Figure 11: Pretraining Curves for the Generative vs. Masked Language Ablation Experiment. Compared to multimodal masked
language modeling (R-M3AE), V – Gen (α = 0.5) shows that with language generation as an objective, language modeling perplexity (PPL =
exp(NLL)) gradually decreases. R-M3AE overfits to language prediction almost immediately (PPL = 1), impacting its learned representations.
24
Voltron: Language-Driven Representations for Robotics
Figure 12: Adroit – Single-Task Visuomotor Control Results. Visualization of the high-dimensional Adroit environments, comprised
of two dexterous manipulation tasks, with three camera viewpoints [Left]. Results (success rate for each of n demonstrations with
n ∈ [25, 50, 100]) for Voltron and baselines (over 3 seeds) [Right]. Note the flipped trends relative to the Franka Kitchen results – notably,
the more "high-level" representations (from CLIP, R3M, or V – Gen) tend to do better on this task; yet, V – Gen is still outperforming
R-R3M and CLIP, showing the benefit of language-driven flexible learning.
C.2 Analysis: Generative vs. Masked Language Modeling
Later in §6, we raise the question: why generative (autoregressive) language modeling over masked language modeling? To help contextualize
this choice, we look at recent work on combining masked autoencoders (for vision) with masked language modeling (for text), through
multimodal masked autoencoders [M3AE; Geng et al. 2022]. We reimplement this M3AE model, pretraining on the same Sth-Sth dataset
used throughout this work, following the same standard of quality as for R-MVP and R-R3M. When we evaluate the corresponding R-M3AE
model, we notice substantially worse performance across all evaluation domains; in the main text we attributed this to overfitting during
pretraining – here, we provide that concrete evidence.
Figure 11 shows the language model perplexity over time for both the R-M3AE, and the V – Gen model (trained with α = 0.5). Perplexity
(PPL) = exp(NLL) is a monotonic function of the cross-entropy loss; lower values are "better" with a lower bound value of 1.0. Almost
immediately, the R-M3AE model overfits to the masked language modeling task, hitting a "perfect" perplexity of 1 (loss of 0.0) within the
first 20 epochs. Contrast this with V – Gen that learns to gradually lower perplexity of the entire course of training, almost driving down to
a PPL of 1.0 by the 400th epoch. We attribute R-M3AE's poor performance to this extremely early overfitting of the language loss, again
echoing the hypothesis that language generation is slightly more robust to these settings – predict short language captions given visual
context – than a masked language modeling objective. We note that this pretraining data (Sth-Sth) is significantly different than the data
used to train the original M3AE model in Geng et al. [2022]; the original M3AE work used Conceptual Captions 12M [Sharma et al. 2018], a
rich dataset of images paired with long, descriptive captions. Further work on extending M3AE models as in Liu et al. [2022] further pretrain
on text-only datasets such as Wikipedia and Toronto Books [Devlin et al. 2019] suggesting the need for diverse, broad coverage text when
training (multimodal) masked language models.
C.3 Results: Adroit Visuomotor Control
To supplement our single-task visuomotor control results, we run out evaluations on the Adroit dexterous manipulation tasks from the
R3M paper [Nair et al. 2022]. The two tasks we evaluate on, depicted in Figure 12 (left) consist of controlling a high degree-of-freedom
robotic hand (24-DoF) for the task of 1) relocating a ball on the table to a specified target position, and 2) reorienting a pen within the hand
to reach a target orientation. Given the innate difficulty of controlling a high-dimensional dexterous robotic hand over a 9-DoF fixed arm
manipulator, these tasks are evaluated with n ∈ [25, 50, 100] demonstrations instead of n ∈ [5, 10, 25] as with the Franka Kitchen evaluation.
In general, learning policies in this environment is difficult, especially from limited data.
Looking to the results we see that on this environment, V – Gen and R-R3M models tend to be the most performant, in contrast with the
Franka Kitchen results which favored V – Cond and V – Dual (the reconstruction-leaning models). Interestingly, this flipped trend seems
to suggest that even within single-task control, different tasks and environments seems to prefer different visual features to perform well
– in this case, the more high-level features under models such as R-R3M and V – Gen seem to be preferred. In a way, this makes sense;
unlike with Franka Kitchen, the actual background objects and interactions thereof – turning knobs, opening microwaves, or sliding doors
with clearly marked handles – seem more sensitive to low-level features (where on the microwave is the handle, which knob of the various
possible needs to be turned). In Adroit however, these tasks are on clean backgrounds, with individual objects; the high-level behaviors
instead that are more important (e.g., "is the ball getting closer to the target location?"). It would be an interesting direction for future work
25
Karamcheti et. al.
Figure 13: Real-World Language-Conditioned Imitation Rollouts from V – Gen. We visualize some rollouts from the best-performing
real-world language-conditioned imitation learning model, V – Gen. While some tasks – e.g., discarding the plate of used coffee pods in the
trash – prove hard for all methods, V – Gen shows smooth motion on a series of tasks, even when challenging visual distractors are present.
Videos with evaluation rollouts for each method are on our project page.
to further profile other "common" visuomotor control tasks along this axis, to get a better understanding of what visual representations must
capture to be useful in general tasks – to the extent of predicting ahead of time what features would be useful to aid in solving a task.
C.4 Qualitative: Real-Robot Language-Conditioned Policy Rollouts
While the experimental results in §5 capture the quantitative success rates of various methods for language-conditioned imitation, they do
not paint a picture of how these policies behave. In Figure 13 we show three different rollouts for the best-performing V – Gen model: a task
success (in-distribution), a task failure (in-distribution), and an example rollout from the visual distractor split. With the waypoint-based
action space described in §5, we generally see smooth motions; however, the failure mode of these policies are "oscillations" (Figure 13;
middle) where the policy collapses to predicting the same two waypoints repeatedly. We supplement these visualizations with full videos of
rollouts from each representation learning approach – these are all on our project page.
C.5 Qualitative: Additional Intent Scoring Visualizations
Figure 14 presents additional intent scoring qualitative visualizations for two other tasks from the WHiRL dataset [Bahl et al. 2022] –
specifically "lifting the lid off a pot" and "stacking cups." In both scenarios, we see similar behavior to the results from §V of the main text: V
– Gen shows a propensity for not only tracking the key progress points in the videos for both human and robot agents, but also providing a
dense and smooth measure of intermediate progress. Both CLIP (ViT-Base) and R3M (Ego4D) unfortunately predict high-variance scores,
seemingly random across the video.
26
Voltron: Language-Driven Representations for Robotics
D Data-Equivalent Reproductions & Reproducibility
In this section we provide additional discussion around two aspects of the reproduction and pretraining procedure discussed in §4:
1) preprocessing, and specifically the importance of selecting multiple images from the same context, and 2) how to operationalize the
representations from the visual encoder for downstream learning.
Figure 14: Additional Qualitative Zero-Shot Intent Scoring Examples. Given more videos of humans and robots performing similar
behaviors from the WHiRL dataset [Bahl et al. 2022], we evaluate the zero-shot intent scoring capabilities of V – Gen, R3M (Ego4D) and
CLIP (ViT-Base). In general, V – Gen continues to show a nuanced understanding of semantics over time, in general tracking key points in
each video smoothly, whereas both baselines are for the most part predicting random scores.
D.1 Additional Preprocessing Discussion
We described our preprocessing approach in §4: following the R3M paper, we sample five frames from each video clip for each epoch of
pretraining. Seeing multiple frames from the same visual context is minimally necessary for the R3M time-contrastive learning objective, but
we posit in this discussion (following the questions in Appendix A) that repeatedly sampling from the same visual context – even with a
reconstruction objective – allows for picking up on finer-grained changes within a context. The best evidence we have for this is in looking
at how prior work constructs their pretraining datasets.
The original MVP work [Xiao et al. 2022; Radosavovic et al. 2022] constructs static datasets of images by iterating through the various
video clips in their pretraining datasets – Sth-Sth, Ego4D [Grauman et al. 2022], 100 Days of Hands [Shan et al. 2020] – at a fixed rate, usually
from 0.2 to 1 frames per second. Given video clip lengths of 2 seconds, this means that in aggregate these pretraining datasets comprise
maybe 2-3 frames sampled from the same clip, if that. Contrast that with this work and R3M, sampling multiple frames from each video clip
for every pretraining epoch (for 400 epochs). This not only means that we are seeing the same context repeatedly, but also that we are seeing
different views of the same context; this can help tune reconstruction towards picking up on finer-grained features (e.g., if a high-capacity
model is able to memorize prior contexts given enough repetition).
This offers a (again, speculative) explanation of why Voltron models outperform MVP (EgoSoup) models that are both higher-capacity
and trained on orders of magnitude more data – but definitely requires further experiments to prove. In the meantime, it seems as though
taking steps to use as much of the pretraining datasets we have access to as possible is in our best interest.
27
Karamcheti et. al.
Figure 15: Default Feature Extraction in MAE Models. Prior work in masked autoencoding including MVP use the embedding corre-
sponding to a dummy <CLS> token appended to the Transformer input for downstream adaptation. While this is motivated in the supervised
learning setting, it is not clear what this embedding captures in the MAE setting, as it never receives explicit supervision. We find that
pooling the learned patch embeddings is strictly better.
D.2 Multiheaded Attention Pooling – Extracting Representations
There is a critical difference between pretraining visual representations and identifying the "right" way to use these representations for
downstream adaptation tasks. Especially for Vision Transformers trained as part of a masked autoencoder – as mentioned at the end of
Section §4 of the main text – identifying a method for extracting information from the learned representations is an open problem. The main
text states – by fiat – that we use multiheaded attention pooling [MAP; Lee et al. 2018] as suggested by Zhai et al. [2022] to operationalize our
learned representations for our downstream tasks. Here, we further contextualize that decision with a description of alternative approaches,
as well as comparative results (Table 5) that show the superiority of MAP-based "feature extraction" (referring to the process of taking the
output of a Vision Transformer and producing a dense, summary vector for downstream learning) over alternative approaches.
MVP and prior work in masked autoencoding with Vision Transformers [He et al. 2022] make an interesting choice when it comes to
extracting features: during pretraining, these works append a dummy <CLS> token to the input of the encoder and decoder in the masked
autoencoding pipeline (depicted in Figure 15). This "free" embedding is motivated by how Vision Transformers for supervised learning
(e.g., classification) are parameterized: in these settings, after encoding an input image, the <CLS> embedding is used as (the sole) input to a
linear projection into label space, thus obtaining supervision from the global loss function (e.g., the cross-entropy loss for classification).
Crucially, the <CLS> embedding in these cases gets direct supervision during training. However, in the masked autoencoding setting, this
<CLS> embedding is just passed through the various Transformer layers of the encoder and decoder, never obtaining any direct or indirect
Table 5: Feature Extraction Results. We evaluate various feature extraction strategies on the Franka Kitchen visuomotor control tasks
at n = 10 demonstrations. We find that multiheaded attention pooling is strictly superior for all Vision Transformer backbones; even
mean-pooling over patch embeddings outperforms the default strategy from the MVP work that uses the frozen <CLS> embedding.
Architecture
Default Extractor
Mean-Pooling
Multiheaded Attention Pooling (MAP)
R-R3M
R-MVP
V – Cond
V – Dual
V – Gen
V – Cond
V – Dual
V – Gen
CLIP
MVP (EgoSoup)
ViT-S
ViT-S
ViT-S
ViT-S
ViT-S
ViT-B
ViT-B
ViT-B
ViT-B
ViT-B
16.07 (Default = Mean-Pooling)
7.90 (Default = <CLS> Token)
–
–
–
–
–
–
17.73 (Default = Pool & Normalize)
18.20 (Default = <CLS>)
28
–
9.50
19.07
17.40
15.67
19.40
16.40
15.73
16.33
20.13
14.73
26.73
27.33
33.07
30.33
30.80
37.27
32.13
22.20
33.87
Voltron: Language-Driven Representations for Robotics
supervision; while it does attend to all other patch embeddings as a byproduct of the multiheaded attention mechanism, there is no guarantee
that this embedding captures or summarize all the useful information necessary.
Instead, recent work from the same authors of the original Vision Transformer [Zhai et al. 2022] eschew the <CLS> embedding completely
during training, instead identifying that two other strategies – mean-pooling all the patch embeddings output by the encoder, or using
multiheaded attention pooling [Lee et al. 2018] – are almost always preferable. As an aside – this work is what motivates Voltron models to
also do away with the <CLS> embedding.
Multiheaded attention pooling (MAP) can be thought of as a form of cross-attention with a learned query. Starting with a randomly
initialized query vector (or optionally, set of query vectors), a MAP block implements a shallow multiheaded attention operation, using the
initialized query vector to cross-attend over the patch embeddings output by the Vision Transformer – the resulting output is a "weighted"
combination of the individual patch embeddings that is shaped on a per-adaptation basis. We evaluate MAP-based extraction against
mean-pooling and any other "default" strategy (e.g., the <CLS> embedding used in MVP, the learned dense representation under CLIP) in
Table 5. We find that MAP universally outperforms all other strategies on the Franka Kitchen control tasks (with n = 10 demonstrations),
informing our usage of MAP as the sole feature extraction approach throughout this work. Notably, we find that MAP-based extraction
when applied to the original model MVP (EgoSoup) released in the original work almost doubles success rate on downstream control tasks. We
even find that simple mean-pooling over patches outperforms the <CLS> embedding, further motivating alternate strategies.
29
Karamcheti et. al.
E Adapting Representations for Evaluation
The description of the adaptation pipeline described in §5 outlines all major details for the adaptation experiments for each evaluation domain;
the role of this section is to clarify any potentially ambiguous details, and further motivate some of the choices we make in implementing
each evaluation. In general, all of the details for adapting representations for each evaluation in the same manner used in this work are in
the released evaluation code repository that provides a unified harness for evaluating arbitrary visual representations on all evaluation
domains used in this work – this codebase is also linked from our project page.
In general, for each evaluation domain, we keep the adaptation architecture as simple as possible, and optimization parameters simple as
well. For all applications we use an AdamW optimizer [Kingma and Ba 2015] with the default learning rate of 1e-3, and weight decay of 0.01.
Grasp Affordance Prediction. We implement the adaptation head for the grasp affordance prediction task following recent work in learning
segmentation heads on top of vision transformer features, specifically following the procedure outlined in Segmentation Transformers via
Progressive Upsampling (SETR-PUP) [Zheng et al. 2021]. A PUP block is straightforward – we first extract all patch embeddings from the
output of our Vision Transformer encoder, using a shallow MAP block with the same number of seed vectors as patches output by the encoder.
We then reshape the extracted features into a grid, then stack a series of 4 upsampling blocks (channel depths of [128, 64, 32, 16], ReLU
activation) that consist of a 2D convolution followed by a bilinear upsampling, until we recover a grid of the same size of the original image.
We finally apply a spatial softmax, predicting distributions over each of the possible labels ("graspable," "non-graspable," "background"), and
compute our loss per-pixel. We optimize with a batch size of 64, for 50 epochs in total. Given the small size of the dataset, we find that there
is a great deal of variance across random initializations; we report results by running 5-fold cross-validation, taking the model with the best
performance across validation folds to compute final test statistics.
Referring Expression Grounding. We use a simple adaptation head for referring expression grounding that extracts a single dense
representation from our learned encoder via a shallow MAP block with a single seed vector (the default extractor for obtaining a vector
representation of a visual input). For representations that are not language-conditioned, we concatenate this vector with the language
embedding under the appropriate model – e.g., the CLIP text embedding for CLIP (ViT-Base) – or the DistilBERT language embedding for
pure visual models (e.g., MVP). We then feed this context through a 4-layer MLP (hidden dimensions of [512, 128, 128, 64], GELU activation)
that directly predicts bounding box coordinates as (x, y, width, height). We use a Huber loss to compute error. We optimize with a batch size
of 512, for 10 epochs in total, using the provided validation set for model selection.
Single-Task Visuomotor Control. We first extract a dense representation using a shallow MAP block (as described above), then follow the
exact procedure for evaluating both Franka Kitchen and Adroit policy learning as described in the R3M work [Nair et al. 2022]. Namely, we
concatenate the visual representation with the robot's proprioceptive state, followed by a BatchNorm layer [Ioffe and Szegedy 2015]. These
are then fed to a 2-layer MLP (d = 256) that directly predicts action targets for computing mean-squared error against the ground-truth
actions. Following R3M, we run 20,000 gradient steps with a batch size of 32, evaluating the models online every 5000 steps on a heldout set
of 50 environments (fixed seed) – we report success rate subject to the best performing model from the online evaluation. We run three
seeds for each combination of viewpoint, number of demonstrations, and task.
Real-World Language-Conditioned Imitation. The full set of language instructions generated by ChatGPT can be found on our project
page. For adaptation, we first extract a representation as with the referring expression evaluation by using a shallow MAP block, and
concatenating the corresponding language embedding as appropriate. We concatenate this fused vector with the robot's proprioceptive state,
and pass the corresponding embedding to a BatchNorm layer. Then, following recent work on real-world imitation learning [Mandlekar
et al. 2021], we only train a shallow 2-layer MLP with (d = 64) to predict action targets for computing mean-squared error against the
ground-truth waypoint actions. We optimize with a batch size of 256, and train for 10 epochs. As policy evaluation in the real-world is
expensive – especially for the five approaches we evalaute – we uniformly choose the last epoch checkpoint to perform evaluation rollouts.
Qualitative: Zero-Shot Intent Scoring. This is a zero-shot evaluation with no adaptation data, only applicable to the representation
learning models capable of "scoring" joint vision-language contexts: V – Gen, CLIP (ViT-Base), and R3M (Ego4D). We download videos from
the WHiRL dataset off of the WHiRL website: https://human2robot.github.io/. To generate plots, we sample frames at 2 FPS from each video,
center cropping and resizing each frame prior to passing it to each model.
30
|
|
http://arxiv.org/abs/2302.12758v1 | 2023-02-24T17:16:37 | 2023-02-24T17:16:37 | Defending Against Backdoor Attacks by Layer-wise Feature Analysis | Training deep neural networks (DNNs) usually requires massive training data
and computational resources. Users who cannot afford this may prefer to
outsource training to a third party or resort to publicly available pre-trained
models. Unfortunately, doing so facilitates a new training-time attack (i.e.,
backdoor attack) against DNNs. This attack aims to induce misclassification of
input samples containing adversary-specified trigger patterns. In this paper,
we first conduct a layer-wise feature analysis of poisoned and benign samples
from the target class. We find out that the feature difference between benign
and poisoned samples tends to be maximum at a critical layer, which is not
always the one typically used in existing defenses, namely the layer before
fully-connected layers. We also demonstrate how to locate this critical layer
based on the behaviors of benign samples. We then propose a simple yet
effective method to filter poisoned samples by analyzing the feature
differences between suspicious and benign samples at the critical layer. We
conduct extensive experiments on two benchmark datasets, which confirm the
effectiveness of our defense. | [
"Najeeb Moharram Jebreel",
"Josep Domingo-Ferrer",
"Yiming Li"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12758v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12758v1",
"@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
4
2
]
R
C
.
s
c
[
1
v
8
5
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Defending Against Backdoor Attacks by
Layer-wise Feature Analysis
Najeeb Moharram Jebreel1, Josep Domingo-Ferrer1, and Yiming Li2
1 Universitat Rovira i Virgili
Av. Pa ̈ısos Catalans 26, E-43007 Tarragona, Catalonia
{najeeb.jebreel,josep.domingo}@urv.cat
2 Tsinghua University, Beijing, China
[email protected]
Abstract. Training deep neural networks (DNNs) usually requires mas-
sive training data and computational resources. Users who cannot afford
this may prefer to outsource training to a third party or resort to publicly
available pre-trained models. Unfortunately, doing so facilitates a new
training-time attack (i.e., backdoor attack) against DNNs. This attack
aims to induce misclassification of input samples containing adversary-
specified trigger patterns. In this paper, we first conduct a layer-wise
feature analysis of poisoned and benign samples from the target class.
We find out that the feature difference between benign and poisoned
samples tends to be maximum at a critical layer, which is not always
the one typically used in existing defenses, namely the layer before fully-
connected layers. We also demonstrate how to locate this critical layer
based on the behaviors of benign samples. We then propose a simple
yet effective method to filter poisoned samples by analyzing the feature
differences between suspicious and benign samples at the critical layer.
We conduct extensive experiments on two benchmark datasets, which
confirm the effectiveness of our defense.
Keywords: Backdoor Detection * Backdoor Defense * Backdoor Learn-
ing * AI Security * Deep Learning.
1
Introduction
In recent years, deep neural networks (DNNs) have successfully been applied in
many tasks, such as computer vision, natural language processing, and speech
recognition. However, training DNNs requires massive training data and compu-
tational resources, and users who cannot afford it may opt to outsource training
to a third-party (e.g., a cloud service) or leverage pre-trained DNNs. Unfortu-
nately, losing control over training facilitates backdoor attacks [2,5,10] against
DNNs. In these attacks, the adversary poisons a few training samples to cause
the DNN to misclassify samples containing pre-defined trigger patterns into an
adversary-specified target class. Nevertheless, the attacked models behave nor-
mally on benign samples, which makes the attack stealthy. Since DNNs are used
2
Najeeb Jebreel et al.
Fig. 1: PCA-based visualization of features of benign (green) and poisoned sam-
ples (red) generated by the layer before the fully connected layers of models
attacked by BadNets [5] and Blended [2]. As shown in this figure, features of
poisoned and benign samples are not well separable on the GTSRB benchmark.
in many mission-critical tasks (e.g., autonomous driving, or facial recognition),
it is urgent to design effective defenses against these attacks.
Among all backdoor defenses in the literature, backdoor detection is one
of the most important defense paradigms, where defenders attempt to detect
whether a suspicious object (e.g., model or sample) is malicious. Currently, most
existing backdoor detectors assume poisoned samples have different feature rep-
resentations from benign samples, and they tend to focus on the layer before the
fully connected layers [1,22,6]. Two intriguing questions arise: (1) Is this layer
always the most critical place for backdoor detection? (2) If not, how to find the
critical layer for designing more effective backdoor detection?
In this paper, we give a negative answer to the first question (see Figure 1).
To answer the second one, we conduct a layer-wise feature analysis of poisoned
and benign samples from the target class. We find out that the feature difference
between benign and poisoned samples tends to reach the maximum at a critical
layer, which can be easily located based on the behaviors of benign samples.
Specifically, the critical layer is the one or near the one that contributes most to
assigning benign samples to their true class. Based on this finding, we propose a
simple yet effective method to filter poisoned samples by analyzing the feature
differences (measured by cosine similarity) between incoming suspicious samples
and a few benign samples at the critical layer. Our method can serve as a 'fire-
wall' for deployed DNNs to identify, block, and trace malicious inputs. In short,
our main contributions are four-fold. (1) We demonstrate that the features of
poisoned and benign samples are not always clearly separable at the layer be-
fore fully connected layers, which is the one typically used in existing defenses.
(2) We conduct a layer-wise feature analysis aimed at locating the critical layer
where the separation between poisoned and benign samples is neatest. (3) We
propose a backdoor detection method to filter poisoned samples by analyzing the
feature differences between suspicious and benign samples at the critical layer.
(4) We conduct extensive experiments on two benchmark datasets to assess the
effectiveness of our proposed defense.
CIFAR10-ResNet18GTSRB-MobileNetV2BadNetsBlendedBadNetsBlendedDefending Against Backdoor Attacks by Layer-wise Feature Analysis
3
2 Related Work: Backdoor Attacks and Defenses
In this paper, we focus on backdoor attacks and defenses in image classification.
Other deep learning tasks are out of our current scope.
BadNets [5] was the first backdoor attack, which randomly selected a few
benign samples and generated their poisoned versions by stamping a trigger
patch onto their images and reassigning their label as the target label. Later
[2] noted that the poisoned image should be similar to its benign version for
stealthiness; these authors proposed a blended attack by introducing trigger
transparency. However, these attacks are with poisoned labels and therefore users
can still detect them by examining the image-label relation. To circumvent this,
[23] proposed the clean-label attack paradigm, where the target label is consistent
with the ground-truth label of poisoned samples. Specifically, in this paradigm,
adversarial attacks were exploited to perturb the selected benign samples before
conducting the standard trigger injection process. [18] adopted image warping as
the backdoor trigger, which modifies the whole image while preserving its main
content. Besides, [17] proposed the first sample-specific attack, where the trigger
varies across samples. However, such triggers are visible and the adversaries
need to control the whole training process. More recently, [14] introduced the
first poison-only invisible sample-specific attack to address these problems.
Existing backdoor defenses fall into three main categories: input filtering,
input pre-processing, and model repairing. Input filtering intends to differ-
entiate benign and poisoned samples based on their distinctive behaviors, like
the separability of the feature representations of benign and poisoned samples.
For example, [6] introduced a robust covariance estimation of feature represen-
tations to amplify the spectral signature of poisoned samples. [25] proposed to
filter inputs inspired by the understanding that poisoned images tend to have
some high-frequency artifacts. [4] proposed to blend various images on the sus-
picious one, since the trigger pattern can still mislead the prediction no matter
what the background contents are. Input pre-processing modifies each input
sample before feeding it into the deployed DNN. Its rationale is to perturb po-
tential trigger patterns and thereby prevent backdoor activation. [16] proposed
the first defense in this category where they used an encoder-decoder to modify
input samples. [19] employed randomized smoothing to generate a set of in-
put neighbors and averaged their predictions. Further, [13] demonstrated that
if the location or appearance of the trigger is slightly different from that used
for training, the attack effectiveness may degrade sharply. Based on this, they
proposed to pre-process images with spatial transformations. Model repair-
ing aims at erasing backdoors contained in the attacked DNNs. For example,
[16,26,9] showed that users can effectively remove backdoors by fine-tuning the
attacked DNNs with a few benign samples. [15] revealed that model pruning
can also remove backdoors effectively, because backdoors are mainly encoded in
specific neurons. Very recently, [24] proposed to repair compromised models with
adversarial model unlearning. In this paper, we focus on input filtering, which is
very convenient to protect deployed DNNs.
4
Najeeb Jebreel et al.
3 Layer-wise Feature Analysis
A deep neural network (DNN) f (x) is composed by L layers f l, l ∈ [1, L]. Each
f l has a weight matrix wl, a bias vector bl, and an activation function σl. The
output of f l is al = f l(al−1) = σl(wl * al−1 + bl), where f 1 takes input x
and f L outputs a vector aL with C classes. The vector aL is softmaxed to get
probabilities p. A DNN has a feature extractor that maps x to latent features,
which are input to fully connected layers for classification.
In this paper, we use DNNs as C-class classifiers, where yi is the ground truth
label of xi and ˆyi is the index of the highest probability in pi. Also, activations
of intermediate layers are analyzed for detecting poisoned samples.
We notice that the predictions of attacked DNNs for both benign samples
from the target class and poisoned samples are all the target label. The attacked
DNNs mainly exploit class-relevant features to predict these benign samples
while they use trigger-related features for poisoned samples. We suggest that
defenders could exploit this difference to design effective backdoor detection. To
explore their main differences, we conduct a layer-wise analysis, as follows.
Definition 1 (Layer-wise centroids of target class features). Let f (cid:48) be an
attacked DNN with a target class t. Let Xt = {xi}|Xt|
i=1 be benign samples with
true class t, and let {a1
i , . . . , aL
i=1 be their intermediate features generated by
i=1 al
f (cid:48). The centroid of t's benign features at layer l is defined as ˆal
i,
and {ˆa1
t } is the set of layer-wise centroids of t's benign features.
t , . . . , ˆaL
t = 1
|Xt|
i }|Xt|
(cid:80)|Xt|
Definition 2 (Layer-wise cosine similarity). Let al
ated by layer l for an input xj, and let csl
and the corresponding t's centroid ˆal
layer-wise cosine similarities between xj and t's centroids.
j be the features gener-
j be the cosine similarity between al
j
j } is said to be the
t. The set {cs1
j , . . . , csL
Settings. We conducted six representative attacks on four classical benchmarks:
CIFAR10-ResNet18, CIFAR10-MobileNetV2, GTSRB-ResNet18, and GTSRB-
MobileNetV2. The six attacks were BadNets [5], the backdoor attack with blended
strategy (Blended) [2], the label-consistent attack (LC) of [23], WaNet [18],
ISSBA [14], and IAD [17]. More details on the datasets, DNNs, and attack
settings are presented in Section 5. Specifically, for each attacked DNN f (cid:48) with
a target class t, we estimated {ˆa1
t } using 10% of the benign test samples
labeled as t. Then, for the benign and poisoned test samples classified by f (cid:48)
into t, we calculated the layer-wise cosine similarities between their generated
features and the corresponding estimated centroids. Finally, we visualized the
layer-wise means of the computed cosine similarities of the benign and poisoned
samples to analyze their behaviors.
t , . . . , ˆaL
Results. Figure 2 shows the layer-wise means of cosine similarity for benign and
poisoned samples with the CIFAR10-ResNet18 benchmark under the BadNets
and ISSBA attacks. As we go deeper into the attacked DNN layers, the gap
between the direction of benign and poisoned features gets larger until we reach
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
5
(a) BadNets
Fig. 2: Layer-wise behaviors of benign samples from the target class and poisoned
samples (generated by BadNets and ISSBA) on CIFAR-10 with ResNet-18
(b) ISSBA
(a) BadNets
(b) ISSBA
Fig. 3: Layer-wise behaviors of benign samples from the target class and poisoned
samples (generated by BadNets and ISSBA) on GTSRB with MobileNetV2
a specific layer where the backdoor trigger is activated, causing poisoned samples
to get closer to the target class. Figure 3 shows the same phenomenon for the
GTSRB-MobileNetV2 benchmark. Further, we can see that for BadNets the
latent features of benign and poisoned samples are similar in the last layer of
the features extractor (i.e., layer 17).
Regardless of the attack or benchmark, when we enter the second half of
DNN layers (which usually are class-specific), benign samples start to get closer
to the target class before the poisoned ones, that are still farther from the target
class because the backdoor trigger is not yet activated. This makes the difference
in similarity maximum in one of those latter layers, which we call the critical
layer. In particular, this layer is not always the one typically used in existing
defenses (i.e., the layer before fully-connected layers). Besides, we show that it
is very likely to be either the layer that contributes most to assigning the benign
samples to their true target class (which we name the layer of interest or LOI,
circled in blue) or one of the two layers before the LOI (circled in brown).
Results under other attacks for these benchmarks are presented in Appendix B.
In those materials, we also provide confirmation that the above distinctive be-
haviors hold regardless of the datasets or models being used. From the analysis
above, we can conclude that focusing on those circled layers can help develop a
simple and robust defense against backdoor attacks.
4 The Proposed Defense
Threat Model. Consider a user that obtains a suspicious trained fs that might
contain hidden backdoors. We assume that the user has limited computational
6
Najeeb Jebreel et al.
Algorithm 1 Identify layer of interest (LOI).
, . . . , ˆcsL
t } for potential target class t
; LOIt ← (cid:98)L/2(cid:99) + 1;
Input: Cosine similarities { ˆcs(cid:98)L/2(cid:99)
t
1: maxdif f ← ˆcs(cid:98)L/2(cid:99)+1
− ˆcs(cid:98)L/2(cid:99)
t
t
2: for l ∈ {(cid:98)L/2(cid:99) + 2, . . . , L} do
3:
4:
5:
6: return LOIt.
ldif f ← ˆcsl
if ldif f > maxdif f then
t − ˆcsl−1
;
t
maxdif f ← ldif f ; LOIt ← l;
Fig. 4: The example of benign samples and their poisoned versions generated by
six representative backdoor attacks.
resources or benign samples, and therefore cannot repair fs. The user wants to
defend by detecting at inference time whether a suspicious incoming input xs is
poisoned, given fs. Similar to existing defenses, we assume that a small set of
benign samples Xval is available to the user/defender. We denote the available
samples that belong to a potential class t as Xtval. Let m = |Xtval| denote the
number of available samples labeled as t.
Method Design. Based on the lessons learned in Section 3, our method to
detect poisoned samples at inference time consists of four steps. 1) Estimate
the layer-wise features' centroids of class t for each of layers (cid:98)L/2(cid:99) to L using
the class's available benign samples. 2) Compute the cosine similarities between
the extracted features and the estimated centroids, and then compute the layer-
wise means of the computed cosine similarities. 3) Identify the layer of interest
(LOI) as per Algorithm 2, sum up the cosine similarities in LOI and the two
layers before LOI (sample-wise), and compute the mean and standard deviation
of the summed cosine similarities. 4) For any suspicious incoming input xs clas-
sified as t by fs, 4.1) compute its cosine similarities to the estimated centroids
in the above-mentioned three layers, and 4.2) consider it as a potentially poi-
soned input if its summed similarities fall below the obtained mean by a specific
number τ of standard deviations (called threshold in what follows). A detailed
pseudocode can be found in Appendix A.
5 Experiments
5.1 Main Settings
Datasets and DNNs. In this paper, we use two classic benchmark datasets,
namely CIFAR10 [8] and GTSRB [21]. We use the ResNet18 [7] on CIFAR10 and
Benign sampleBadNetsBlendedLCWaNetISSBAIADPoisoned sampleDefending Against Backdoor Attacks by Layer-wise Feature Analysis
7
the MobileNetV2 [20] on GTSRB. More details are presented in Appendix D.1.
The source code, pre-trained models, and poisoned test sets of our defense are
available at https://github.com/NajeebJebreel/DBALFA.
Attack Baselines. We evaluated each defense under the six attacks mentioned
in Section 3: BadNets, Blended, LC, WaNet, ISSBA, and IAD. They are rep-
resentative of visible attacks, patch-based invisible attacks, clean-label attacks,
non-patch-based invisible attacks, invisible sample-specific attacks, and visible
sample-specific attacks, respectively.
Defense Baselines. We compared our defense with six representative defenses,
namely randomized smoothing (RS) [19], ShrinkPad (ShPd) [13], activation clus-
tering (AC) [1], STRIP [4], SCAn [22], and fine-pruning (FP) [15]. RS and ShPd
are two defenses with input pre-processing; AC, STRIP, and SCAn are three
advanced input-filtering-based defenses; FP is based on model repairing.
Attack Setup. For both CIFAR10 and GTSRB, we took the following settings.
We used a 2 × 2 square as the trigger pattern for BadNets (as suggested in [5]).
We adopted the random noise pattern, with a 10% blend ratio, for Blended (as
suggested in [2]). The trigger pattern adopted for the LC attack was the same
used in BadNets. For WaNet, ISSBA, and IAD, we took their default settings.
Besides, we set the poisoning rate to 5% for BadNets, Blended, LC, and ISSBA.
For WaNet and IAD, we set the poisoning rate to 10%. We implement baseline
attacks based on the codes in BackdoorBox [12]. More details on settings are
given in Appendix D.3. Figure 4 shows an example of poisoned samples generated
by different attacks.
Defense Setup. For RS, ShPd and STRIP, we took the settings suggested
in [19,13,4]. For FP, we pruned 95% of the dormant neurons in the last convo-
lution layer and fine-tuned the pruned model using 5% of the training set. We
adjusted RS, ShPd, and FP to be used as detectors for poisoned samples by
comparing the prediction change before and after applying them to an incoming
input. For AC, STRIP, SCAn, and our defense, we randomly selected 10% from
each benign test set as the available benign samples. For SCAn, we identified
classes with scores larger than e as potential target classes, as suggested in [22].
For our defense, we used a threshold τ = 2.5, which gives a reasonable trade-off
between TPR and FPR for both benchmarks.
Evaluation Metrics. We used the main accuracy (MA) and the attack success
rate (ASR) to measure attack performance. Specifically, MA is the number of
correctly classified benign samples divided by the total number of benign sam-
ples, and ASR is the number of poisoned samples classified as the target class
divided by the total number of poisoned samples. We adopted TPR and FPR to
evaluate the performance of all defenses, where TPR is computed as the num-
ber of detected poisoned inputs divided by the total number of poisoned inputs,
whereas FPR is the number of benign inputs falsely detected as poisoned divided
by the total number of benign inputs.
8
Najeeb Jebreel et al.
Table 1: Main results (%) on the CIFAR-10 dataset. Boldfaced values are the
best results among all defenses. Underlined values are the second-best results.
Blended
LC
WaNet
ISSBA
IAD
Avg
Attack→ BadNets
Metric→
Defense↓
RS
ShPd
FP
AC
TPR FPR TPR FPR TPR FPR TPR FPR TPR FPR TPR FPR TPR FPR
5.76
7.35
9.21
7.52 98.48 10.00 8.83 8.72 13.28 6.36 24.50 7.73
9.84 8.00
94.28 13.31 49.72 12.89 69.87 13.18 36.25 17.69 95.22 5.50 42.74 7.56 64.68 11.69
96.10 17.13 96.23 16.16 94.76 17.31 96.01 18.64 98.98 19.53 97.08 22.52 96.53 18.55
99.52 31.14 100.00 30.69 100.00 31.16 99.18 32.44 99.94 34.22 82.99 31.32 96.94 31.83
STRIP 68.70 11.70 65.20 11.70 66.00 12.80 7.90 12.30 56.20 11.40 2.10 14.00 44.35 12.32
5.05 98.55 1.06 99.89 2.61 84.19 0.13 79.88 1.60
SCAn
96.60 0.77 100.00 0.00 0.02
99.38 1.35 100.00 1.59 100.00 1.20 91.04 1.48 98.97 1.17 99.12 1.26 98.09 1.34
Ours
LC
Blended
TPR FPR TPR FPR TPR FPR TPR FPR TPR FPR TPR FPR TPR FPR
Table 2: Main results (%) on the GTSRB dataset. Boldfaced values are the best
results among all defenses. Underlined values are the second-best results.
Attack→ BadNets
Metric→
Defense↓
RS
ShPd
FP
AC
16.98 17.70 17.60 11.49 18.91
13.20 22.10 10.12 20.40
8.61
9.23
31.07 16.10 65.97 12.10
8.26
94.97 12.16 11.58 10.68 96.16 10.60 66.11 14.81 95.92
78.34 14.76
94.37
7.05
3.24
94.22
89.05 18.80 30.56 3.70 94.71 50.02 67.12
25.87 99.06 17.48 43.85 10.73 24.74 12.34
4.83 5.42 0.42
0.00
5.67
0.30 8.84
10.60 28.93 11.07
7.40
80.40 10.80
STRIP 32.00 9.00
6.60
11.00 34.20 11.40 13.00 13.60
46.05 2.57 46.02
SCAn
6.58
19.41 45.59
30.45 11.39 54.07 1.88 96.85 0.17 0.09
4.03
99.99 6.23 100.00 6.72 100.00 5.95 100.00 6.49 100.00 5.43 100.00 4.67 100.00 5.92
Ours
19.15 10.10 17.20
WaNet
ISSBA
IAD
5.75
Avg
5.2 Main Results
For each attack, we ran each defense five times for a fair comparison. Due to
space limitations, we present the average TPR and FPR in this section. Please
refer to Appendix C for more detailed results.
As shown in Tables 1 and 2, existing defenses failed to detect attacks with low
TPR or high FPR in many cases, especially on the GTSRB dataset. For example,
AC failed in most cases on GTSRB, although it had promising performance
on CIFAR-10. In contrast, our method had good performance in detecting all
attacks on both datasets. There were only a few cases (4 over 28) where our
approach was neither optimal nor close to optimal. In these cases, our detection
was still on par with state-of-the-art methods, and another indicator (i.e., TPR
or FPR) was significantly better than them. For example, when defending against
the blended attack on the GTSRB dataset, the TPR of our method was 69.44%
larger than that of FP, which had the smallest FPR in this case. These results
confirm the effectiveness of our detection.
5.3 Discussions
Performance of Attacks. Table 3 shows the performance of the selected at-
tacks on the CIFAR10-ResNet18 and the GTSRB-MobileNetV2 benchmarks. It
can be seen that sample-specific attacks (e.g., ISSBA and IAD) performed better
than other attacks in terms of MA and ASR.
Effects of the Detection Threshold. Figure 5 shows the TPRs and FPRs
of our defense with threshold τ ∈ {0.5, 1, 1.5, 2, 2.5, 3} for BadNets and WaNet.
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
9
Benchmark↓
Table 3: MA% and ASR% under the selected backdoor attacks on the CIFAR10-
ResNet18 and the GTSRB-MobileNetV2 benchmarks. Best scores are in bold.
Metric↓,Attack→ BadNets Blended LC WaNet ISSBA IAD
92.19
91.98 91.13 94.74 94.42
100.0 99.96 99.04 100.0 99.66
97.27
98.43 98.81
100.0 100.0 91.82 100.0 99.63
MA%
ASR%
MA%
ASR%
91.45
97.20
97.00
95.49
GTSRB-MobileNetV2
CIFAR10-ResNet18
97.45 96.09
(a) CIFAR10-ResNet18
(b) GTSRB-MobileNetV2
Fig. 5: Impact of detection thresholds on TPR (%) and FPR (%)
Table 4: Impact of poisoning rates
Poisoning Rate↓, Metric→ MA (%) ASR (%) TPR (%) FPR (%)
1%
3%
5%
10%
91.52
92.28
91.45
91.45
94.15
96.31
97.20
97.56
99.64
99.32
99.36
99.83
1.25
1.32
1.35
1.62
Table 5: Effectiveness of defenses with different features. Latent features denote
those generated by the feature extractor that is typically used in existing de-
fenses. Critical features are extracted by our method from the identified layers.
Metric→
TPR (%)
FPR (%)
Defense↓, Features→ Latent Features Critical Features Latent Features Critical Features
AC
SCAn
Ours
0.3
46.05
1.31
96.32
86.19
99.99
8.84
2.57
4.93
7.67
1.96
6.23
It can be seen that a threshold 2.5 is reasonable, as it offers a high TPR while
keeping a low FPR. Note that the larger the threshold, the smaller the TPR and
FPR. Users should choose the threshold based on their specific needs.
Effects of the Poisoning Rate. We launched BadNets on CIFAR10-ResNet18
using different poisoning rates ∈ {1%, 3%, 5%, 10%} to study the impact of poi-
soning rates on our defense. Table 4 shows the attack success rate (ASR) in-
creases with the poisoning rate. However, the poisoning rate has minor effects on
our TPR and FPR. These results confirm again the effectiveness of our method.
Effectiveness of Our Layer Selection. We compared the performance of
AC, SCAn, and our method at detecting BadNets on the GTSRB-MobileNetV2
10
Najeeb Jebreel et al.
Table 6: Performance of features from individual layers compared to identified
layers by our defense. The LOI of WaNet and IAD are 9 and 8, respectively.
Layer
4
2
3
1
10 Ours
TPR (%) 0.00 0.10 0.05 0.00 0.01 0.00 68.82 98.08 59.82 0.00 91.04
1.48
FPR (%) 0.09 0.82 0.24 0.20 0.21 0.04 2.06 1.52 2.06 0.65
TPR (%) 19.32 34.03 6.44 30.49 61.09 78.65 88.81 99.65 99.10 2.36
99.12
1.26
FPR (%) 1.65 1.38 1.44 1.60 2.27 1.70 1.29 1.13 1.09 1.24
8
9
5
6
7
WaNet
IAD
benchmark using latent features and critical features. We generated latent fea-
tures based on the feature extractor (i.e., the layer before fully-connected lay-
ers) that is typically adopted in existing defenses. The critical features were
extracted by the layer of interest (LOI) used in our method. Table 5 shows that
using our features led to significantly better performance in almost all cases. In
other words, existing detection methods can also benefit from our LOI selection.
Also, we compared the performance of our method on CIFAR10-ResNet18 un-
der WaNet and IAD when using the features of every individual layer, and when
using LOI and the two layers before LOI. Table 6 shows that as we approach the
critical layer, which was just before LOI with WaNet and at LOI with IAD, the
detection performance gets better. Since our method included the critical layer,
it also was effective. These results confirm the effectiveness of our layer selection
and partly explain our method's good performance.
Effectiveness of Cosine Similarity. We compared the cosine similarity with
the Euclidean distance as a metric to differentiate between benign and poisoned
samples. In Appendix C.2, we show the cosine similarity gives a better differ-
entiation than the Euclidean distance. This is mostly because the direction of
features is more important for detection than their magnitude.
Resistance to Adaptive Attacks. The adversary may adapt his attack to
bypass our defense by optimizing the model's original loss Lorg and minimizing
the layer-wise angular deviation between the features of the poisoned samples
and the features' centroids of the target class's benign samples. We studied the
impact of this strategy by introducing the cosine distance between the features of
poisoned samples and the target class centroids as a secondary loss function Lcd
in the training objective function. Also, we introduced a penalty parameter β,
which yielded a modified objective function (1−β)Lorg +βLcd. The role of β is to
control the trade-off between the angular deviation and the main accuracy loss.
We then launched BadNets on CIFAR10-ResNet18 under the modified objective
function. Table 7 (top subtable) shows MA and ASR with different penalty
factors. We can see that values of β < 0.9 slightly increased the main accuracy
because the second loss acted as a regularizer to the model's parameters, which
reduced over-fitting. Also, ASR stayed similar to the non-adaptive ASR (when
β = 0). However, the main accuracy degraded with greater β values, because
the original loss function was dominated by the angular deviation loss.
Table 7 (bottom subtable) shows the TPRs and FPRs of AC, SCAn, and our
defense with different penalty factors. As β increased (up to β = 0.9), the TPR of
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
11
Table 7: Adaptive attack. Top, impact of penalty factor β on MA and ASR.
Bottom, impact of penalty factor β on TPR and FPR.
0
β
0.92 0.95
0.7
MA (%) 91.45 92.96 92.06 92.65 92.63 90.33 79.97 69.13 10
ASR (%) 97.20 96.72 96.93 96.63 96.29 96.88 96.41 97.36 100
0.9 0.91
0.6
0.5
0.8
β →
Defense↓ Metric (%)↓
0
0.5
0.6
0.7
0.8
0.9
0.91 0.92 0.95
AC
SCAn
Ours
TPR
FPR
TPR
FPR
TPR
FPR
99.52 99.20 99.16 45.69 26.26 26.22 23.81 13.38 0.00
31.14 29.46 28.85 8.21 7.72 6.21 0.25 7.80 0.00
96.60 96.55 96.60 72.80 56.19 0.00 0.00 0.00 0.00
0.77 1.38 4.60 1.14 0.10 0.00 0.00 0.00 0.00
99.38 99.41 98.18 97.43 97.52 94.20 24.20 0.00 0.00
1.35 1.96 1.44 1.15 0.53 1.40 4.17 0.00 0.00
our defense decreased from 99.38% to 94.20% while FPR was almost unaffected.
This shows that the adversary gained a small advantage with β = 0.9. On the
other hand, the other defenses achieved limited or poor robustness compared to
ours with the same β values. With β ≥ 0.91, AC, SCAn, and our method defense
failed to counter the attack. However, looking at Table 7 (top subtable) we can
see the main accuracy degraded with these high β values, which made it easy to
reject the model due its low performance.
6 Conclusion
In this paper, we conducted a layer-wise feature analysis of the behavior of be-
nign and poisoned samples generated by attacked DNNs. We found that the
feature difference between benign and poisoned samples tends to reach the max-
imum at a critical layer, which can be easily located based on the behaviors
of benign samples. Based on this finding, we proposed a simple yet effective
backdoor detection to determine whether a given suspicious testing sample is
poisoned by analyzing the differences between its features and those of a few lo-
cal benign samples. Our extensive experiments on benchmark datasets confirmed
the effectiveness of our detection. We hope our work can provide a deeper un-
derstanding of attack mechanisms, to facilitate the design of more effective and
efficient backdoor defenses and more secure DNNs.
Acknowledgments
This research was funded by the European Commission (projects H2020-871042
"SoBigData++" and H2020-101006879 "MobiDataLab"), the Government of
Catalonia (ICREA Acad`emia Prize to J.Domingo-Ferrer, grant no. 2021 SGR
00115, and FI B00760 grant to N. Jebreel), and MCIN/AEI/ 10.13039/501100011033
and "ERDF A way of making Europe" under grant PID2021-123637NB-I00
"CURLING". The authors are with the UNESCO Chair in Data Privacy, but the
views in this paper are their own and are not necessarily shared by UNESCO.
12
Najeeb Jebreel et al.
References
1. Chen, B., Carvalho, W., Baracaldo, N., Ludwig, H., Edwards, B., Lee, T., Molloy,
I., Srivastava, B.: Detecting backdoor attacks on deep neural networks by activation
clustering. In: AAAI Workshop (2019)
2. Chen, X., Liu, C., Li, B., Lu, K., Song, D.: Targeted backdoor attacks on deep
learning systems using data poisoning. arXiv preprint arXiv:1712.05526 (2017)
3. Cohen, J., Rosenfeld, E., Kolter, Z.: Certified adversarial robustness via random-
ized smoothing. In: ICML (2019)
4. Gao, Y., Kim, Y., Doan, B.G., Zhang, Z., Zhang, G., Nepal, S., Ranasinghe, D.C.,
Kim, H.: Design and evaluation of a multi-domain Trojan detection method on
deep neural networks. IEEE Transactions on Dependable and Secure Computing
19(4), 2349–2364 (2022)
5. Gu, T., Liu, K., Dolan-Gavitt, B., Garg, S.: BadNets: Evaluating backdooring
attacks on deep neural networks. IEEE Access 7, 47230–47244 (2019)
6. Hayase, J., Kong, W.: Spectre: Defending against backdoor attacks using robust
covariance estimation. In: ICML (2021)
7. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition.
In: CVPR (2016)
8. Krizhevsky, A., Hinton, G., et al.: Learning multiple layers of features from tiny
images (2009)
9. Li, Y., Lyu, X., Koren, N., Lyu, L., Li, B., Ma, X.: Neural attention distillation:
Erasing backdoor triggers from deep neural networks. In: ICLR (2021)
10. Li, Y., Jiang, Y., Li, Z., Xia, S.T.: Backdoor learning: A survey. IEEE Transactions
on Neural Networks and Learning Systems (2022)
11. Li, Y., Ya, M., Bai, Y., Jiang, Y., Xia, S.T.: BackdoorBox: A python toolbox for
backdoor learning (2022), https://github.com/THUYimingLi/BackdoorBox
12. Li, Y., Ya, M., Bai, Y., Jiang, Y., Xia, S.T.: Backdoorbox: A python toolbox for
backdoor learning. arXiv preprint arXiv:2302.01762 (2023)
13. Li, Y., Zhai, T., Jiang, Y., Li, Z., Xia, S.T.: Backdoor attack in the physical world.
In: ICLR Workshop (2021)
14. Li, Y., Li, Y., Wu, B., Li, L., He, R., Lyu, S.: Invisible backdoor attack with
sample-specific triggers. In: ICCV (2021)
15. Liu, K., Dolan-Gavitt, B., Garg, S.: Fine-pruning: Defending against backdooring
attacks on deep neural networks. In: RAID (2018)
16. Liu, Y., Xie, Y., Srivastava, A.: Neural Trojans. In: ICCD (2017)
17. Nguyen, T.A., Tran, A.: Input-aware dynamic backdoor attack. In: NeurIPS (2020)
18. Nguyen, T.A., Tran, A.T.: Wanet-imperceptible warping-based backdoor attack.
In: International Conference on Learning Representations (2020)
19. Rosenfeld, E., Winston, E., Ravikumar, P., Kolter, Z.: Certified robustness to label-
flipping attacks via randomized smoothing. In: ICML (2020)
20. Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., Chen, L.C.: Mobilenetv2: In-
verted residuals and linear bottlenecks. In: CVPR (2018)
21. Stallkamp, J., Schlipsing, M., Salmen, J., Igel, C.: The German traffic sign recog-
nition benchmark: a multi-class classification competition. In: IJCNN (2011)
22. Tang, D., Wang, X., Tang, H., Zhang, K.: Demon in the variant: Statistical analysis
of dnns for robust backdoor contamination detection. In: USENIX Security (2021)
23. Turner, A., Tsipras, D., Madry, A.: Label-consistent backdoor attacks. arXiv
preprint arXiv:1912.02771 (2019)
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
13
24. Zeng, Y., Chen, S., Park, W., Mao, Z.M., Jin, M., Jia, R.: Adversarial unlearning
of backdoors via implicit hypergradient. In: ICLR (2022)
25. Zeng, Y., Park, W., Mao, Z.M., Jia, R.: Rethinking the backdoor attacks' triggers:
A frequency perspective. In: ICCV (2021)
26. Zhao, P., Chen, P.Y., Das, P., Ramamurthy, K.N., Lin, X.: Bridging mode connec-
tivity in loss landscapes and adversarial robustness. In: ICLR (2020)
A Detailed method
Algorithm 2 summarizes our defense.
Algorithm 2 Detecting backdoor attacks via layer-wise feature analysis
Input: Suspicious trained DNN fs; Validation samples Xval; Threshold τ ; Suspi-
cious input xs
Output: Boolean value (True/False) tells if xs is poisoned.
1: for each potential target class t ∈ {1, . . . , C} do (cid:46) An offline loop conducted
for one time only
i=1 ←Layers' features generated by fs for {xi ∈ Xtval }
(cid:46) Estimate t's centroid at layer l ∈ {(cid:98)L/2(cid:99), . . . , L}
i, ˆal
i to its centroid
t)
(cid:46) Aggregate computed benign similarities at layer l
(cid:46) Similarity of al
i
t
t })
(cid:80)m
i=1)
, . . . , ˆcsL
+ csLOIt−1
i
+ csLOIt
i
i=1), STD({csi}m
Xtval ←Split t's benign samples from Xval
m ← |Xtval |
{a(cid:98)L/2(cid:99)
, . . . , aL
i }m
i
(cid:80)m
ˆal
i=1 al
t ← 1
i
m
i ← CosineSimilarity(al
csl
ˆcsl
i=1 csl
t ← 1
m
LOIt ← IdentifyLayerOfInterest({ ˆcs(cid:98)L/2(cid:99)
csi ← csLOIt−2
i
μt, σt ← MEAN({csi}m
2:
3:
4:
5:
6:
7:
8:
9:
10:
11: IsP oisoned ← F alse
12: ˆys ← fs(xs)
13: for each potential target class t ∈ {1, . . . , C} do
14:
15:
16:
17:
18:
19: return IsP oisoned
20: procedure IdentifyLayerOfInterest({ ˆcs(cid:98)L/2(cid:99), . . . , ˆcsL})
21:
22:
23:
24:
25:
26:
27:
28:
if ˆys = t then
, csLOIt
{csLOIt−2
j
css ← csLOIt−2
+ csLOIt−1
s
if css < (μt − τ × σt) then
IsP oisoned ← T rue
ldif f ← ˆcsl − ˆcsl−1
if ldif f > maxdif f then
maxdif f ← ldif f
LOI ← l
maxdif f ← ˆcs(cid:98)L/2(cid:99)+1 − ˆcs(cid:98)L/2(cid:99)
LOI ← (cid:98)L/2(cid:99) + 1
for l ∈ {(cid:98)L/2(cid:99) + 2, . . . , L} do
} ← {CosineSimilarity(al
+ csLOIt
s
return LOI
, csLOIt−1
s
s
j
(cid:46) ˆys is the predicted class by fs for xs
s, ˆal
t)}LOIt
l=LOIt−2
14
Najeeb Jebreel et al.
For each potential target class t ∈ {1, . . . C}, we first feed the available m
benign samples to fs and extract their intermediate features in the second half
of layers to obtain the set {(aL/2
, . . . , aL
i=1 (if L is odd, take the integer
part of L/2 instead of L/2 here and in what follows). Note that we can reduce
computation by focusing on the second half of layers because the LOI and the
two layers before the LOI are among the latter layers of the DNN. After that,
we compute the layer-wise centroids of the extracted features for each layer
l ∈ {L/2, . . . , L} (Line 5). Then, we compute the cosine similarity between the
benign features of each layer and their corresponding centroid (Line 6).
i )}m
i
t
, . . . , ˆcsL
, ˆcs(L/2)+1
Then, we aggregate the computed similarities to approximate the similarity
centroid in each layer l ∈ {L/2, (L/2) + 1, . . . , L − 1, L} (Line 7). Next, we use
{ ˆcsL/2
t }, to locate the layer of interest LOIt that contributes
t
most to assigning t's benign samples to their true class t (Lines 20-28). We
compute the difference between the approximated similarity of each layer and
its preceding one, and we identify the layer with the maximum difference as
LOIt. For example, if the maximum difference is | ˆcsl
|, then layer l is the
layer of interest.
t − ˆcsl−1
t
Once we locate LOIt, we estimate the behavior of benign samples in that
layer and in the two layers previous to it. For each sample xi ∈ Xtval, we sum
up its computed cosine similarities in the three layers (Line 9). After computing
the summed similarities of the m samples and obtaining the set {csi}m
i=1, we
compute the mean μt and the standard deviation σt of the set.
To detect potentially poisoned samples, for any suspicious incoming input
xs classified as t by fs at inference time, we extract its features in LOIt and
the two preceding layers, compute their cosine similarities to the corresponding
estimated centroids {csLOIt−2
}, and sum them up to get css.
Then, we identify xs as a potentially poisoned sample if css < μt − τ × σt,
where τ is an input threshold chosen by the defender that provides a reasonable
trade-off between the true positive rate TPR and the false positive rate FPR.
Figure 6 shows an example of the distributions of the summed cosine similarities
of benign and poisoned features to the estimated benign centroids (in the three
identified layers) under the label-consistent attack of [23].
, csLOIt−1
, csLOIt
s
s
s
B Additional Results on Layer-wise Feature Analysis
Figure 7 shows the layer-wise behavior of benign and poisoned features w.r.t. the
target class on the CIFAR10-ResNet18 benchmark under all the used attacks.
Figure 8 shows the same on the GTSRB-MobileNetV2 benchmark.
It can be seen that the layer with the maximum difference in cosine similarity
is likely to be one of the three circled layers (the LOI and the two preceding
layers). This happens in all cases, except for WaNet on GTSRB-MobileNetV2.
We can also notice that the layer-wise gaps are smaller for WaNet, which is
stealthier than the other attacks. Nevertheless, no matter how stealthy the attack
is, the difference is always evident in one of the circled layers.
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
15
(a) CIFAR10-ResNet18
(b) GTSRB-MobileNetV2
Fig. 6: Distributions of the summed cosine similarities of benign and poisoned
samples under the label-consistent attack on CIFAR10 with ResNet18 and GT-
SRB with MobileNetV2 benchmarks
(a) BadNets
(b) Blended
(c) Label-consistent
(d) WaNet
(e) ISSBA
(f) IAD
Fig. 7: Layer-wise behavior of benign and poisoned samples w.r.t. the target class
in the CIFAR10-ResNet18 benchmark, under all implemented attacks
16
Najeeb Jebreel et al.
(a) BadNets
(b) Blended
(c) Label-consistent
(d) WaNet
(e) ISSBA
(f) IAD
Fig. 8: Layer-wise behavior of benign and poisoned samples w.r.t. the target class
in the GTSRB-MobileNetV2 benchmark, under all implemented attacks
C Additional Discussion
C.1 Stability Comparison
We compared the stability of our defense with that of AC, SCAn, and FP on
the CIFAR10-ResNet18 and GTSRB-MobileNetV2 benchmarks. We ran each
defense five times and we report the average TPR and FPR with their standard
deviations. Error bars in Figure 9 and Figure 10 show that our defense, in general,
is more stable than the others.
C.2 Effectiveness of Cosine Similarity
We also tried the Euclidean distance as a metric to differentiate between benign
and poisoned samples, as we did with cosine similarity. The only difference was
considering any suspicious input with a summed distance greater than the mean
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
17
(a) AC
(b) SCAn
(c) FP
(d) Ours
Fig. 9: Stability on the CIFAR10-ResNet18 benchmark
Table 8: Comparison between Euclidean distance and cosine similarity as metrics
to differentiate between benign and poisoned samples (±: standard deviation).
Best scores are in bold.
Threshold→
Evaluation metric→
Similarity metric↓
Euclidean distance
Cosine similarity
0.5
1
1.5
2
2.5
3
TPR% FPR% TPR% FPR% TPR% FPR% TPR% FPR% TPR% FPR% TPR% FPR%
99.98
(±0.01)
100.00
(±0.00)
24.77
(±0.64)
33.65
(±1.11)
97.12
(±3.13)
99.99
(±0.00)
13.64
(±0.90)
18.74
(±0.73)
95.73
(±2.41)
99.91
(±0.05)
8.67
(±0.36)
8.71
(±0.88)
70.84
(±10.00)
99.76
(±0.04)
4.69
(±0.36)
3.89
(±0.32)
53.13
(±12.94)
99.12
(±0.45)
3.21
(±1.78)
0.17
(±0.13)
15.71
(±10.61)
95.99
(±3.04)
1.56
(±0.06)
0.40
(±0.18)
of benign samples with τ standard deviations as potentially poisoned. Table 8
shows the detection performance of our defense with each of the two metrics in
the CIFAR10-ResNet18 benchmark under the IAD backdoor attack with differ-
ent thresholds. It can be seen that cosine similarity provides a better differenti-
ation between benign and poisoned samples. A possible explanation is that the
direction of features is more important for detection than their magnitude.
18
Najeeb Jebreel et al.
(a) AC
(b) SCAn
(c) FP
(d) Ours
Fig. 10: Stability on the GTSRB-MobileNetV2 benchmark
C.3 Runtime Comparison
We compared the average CPU runtime (in seconds) of our defense with that
of AC and SCAn on the whole benign and poisoned test sets. Figure 11 shows
that our defense had the shortest runtime on CIFAR10-ResNet18 and the second
shortest on GTSRB-MobileNetV2. It had a runtime slightly longer than that of
AC on GTSRB-MobileNetV2 because MobileNetV2 contains a larger number of
intermediate layers, which increases the time required to analyze them.
D Detailed Settings for Experiments
We used the PyTorch framework to implement the experiments on an AMD
Ryzen 5 3600 6-core CPU with 32 GB RAM, an NVIDIA GTX 1660 GPU, and
Windows 10 OS. In addition, we used the BackdoorBox [11] open toolbox for
conducting all attacks and re-implemented the other defenses used in our work.
Defending Against Backdoor Attacks by Layer-wise Feature Analysis
19
Fig. 11: Average CPU running time in seconds.
Table 9: Statistics of the used datasets and DNNs
Dataset
Input size # Classes # Training samples #Test samples # Available samples DNN model # Layers
CIFAR-10 3x32x32
GTSRB 3x32x32
10
43
50,000
39,209
10,000
12,630
1,000
1,263
ResNet18
MobileNetV2
10
19
D.1 Datasets and DNN Architectures
Table 9 summarizes the statistics of the used datasets and DNNs and the number
of benign samples available to the defender. Note that, for ease of computation,
we consider as a layer each convolutional block other than the first convolutional
layer and the last fully connected layer.
D.2 Training Setting
We used the cross-entropy loss and the SGD optimizer with a momentum 0.9
and weight decay 5 × 10−4 on all benchmarks. We used initial learning rates
0.1 for ResNet18 and 0.01 for MobileNetV2, and trained models for 200 epochs.
The learning rates were decreased by a factor of 10 at epochs 100 and 150,
respectively. We set the batch size to 128 and trained all models until they
converged.
D.3 Attack Setting
The target class on all datasets was 1 for BadNets [5], the backdoor attack with
blended strategy [2] (Blended), the invisible sample-specific attack [14] (ISSBA),
and the input-aware dynamic attack [17] (IAD). The target classes for the label-
consistent attack [23] and WaNet [18] were 2 and 0, respectively, on all datasets.
The trigger patterns of attacks were the same as those presented in the main
20
Najeeb Jebreel et al.
paper. In particular, we set the blended ratio to λ = 0.1 for the blended attack
on all datasets. We used the label-consistent backdoor attack with maximum
perturbation size 16. For WaNet, we set the noise rate to ρn = 0.2, the control
grid size to k = 4, and the warping strength to s = 0.5 on all datasets, as
suggested in the WaNet paper [18]. For IAD [17], we trained the classifier and the
trigger generator concurrently. We attached the dynamic trigger to the samples
from other classes and relabeled them as the target label.
D.4 Defense Setting
For RS, we generated 100 neighbors of each input with a mean = 0 and a standard
deviation = 0.1, as suggested in [3]. We set the shrinking rate to 10% for ShPd
and padded shrinked images with 0-pixels to expand them to their original size,
as suggested in [13]. For FP, we pruned 95% of the dormant neurons in the last
convolution layer and fine-tuned the pruned model using 5% of the training set.
We adjusted RS, ShPd, and FP to be used as detectors for poisoned samples
by comparing the change in prediction before and after applying them to an
incoming input. For AC, STRIP, SCAn, and our defense, we randomly selected
10% from each benign test set as the available benign samples. Then, for AC, we
used the available benign samples, from each class, for normalizing benign and
poisoned test samples and identifying potential poisoned clusters. For STRIP, we
blended each input with 100 random inputs from the available benign samples
using a blending value α = 0.5, as suggested in [4]. Then, we identified inputs
with entropy below the 10-th percentile of the entropies of benign samples as
potentially poisoned samples. For SCAn, we identified classes with scores larger
than e as potential target classes, as suggested in [22], and identified the cluster
that did not contain the available benign samples as a poisoned cluster. For
our defense, we used a threshold τ = 2.5, which gave us a reasonable trade-off
between T P R and F P R on both benchmarks.
|
|
http://arxiv.org/abs/2303.04833v1 | 2023-02-24T17:16:27 | 2023-02-24T17:16:27 | Finding Regularized Competitive Equilibria of Heterogeneous Agent
Macroeconomic Models with Reinforcement Learning | We study a heterogeneous agent macroeconomic model with an infinite number of
households and firms competing in a labor market. Each household earns income
and engages in consumption at each time step while aiming to maximize a concave
utility subject to the underlying market conditions. The households aim to find
the optimal saving strategy that maximizes their discounted cumulative utility
given the market condition, while the firms determine the market conditions
through maximizing corporate profit based on the household population behavior.
The model captures a wide range of applications in macroeconomic studies, and
we propose a data-driven reinforcement learning framework that finds the
regularized competitive equilibrium of the model. The proposed algorithm enjoys
theoretical guarantees in converging to the equilibrium of the market at a
sub-linear rate. | [
"Ruitu Xu",
"Yifei Min",
"Tianhao Wang",
"Zhaoran Wang",
"Michael I. Jordan",
"Zhuoran Yang"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2303.04833v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2303.04833v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "econ.GN",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"econ.GN",
"cs.LG",
"q-fin.EC"
] | Finding Regularized Competitive Equilibria of
Heterogeneous Agent Macroeconomic Models with
Reinforcement Learning
Ruitu Xu∗
Yifei Min†
Tianhao Wang‡
Zhaoran Wang§
Michael I. Jordan¶
Zhuoran Yang‖
Abstract
We study a heterogeneous agent macroeconomic model with an infinite number of households
and firms competing in a labor market. Each household earns income and engages in consumption
at each time step while aiming to maximize a concave utility subject to the underlying market
conditions. The households aim to find the optimal saving strategy that maximizes their
discounted cumulative utility given the market condition, while the firms determine the market
conditions through maximizing corporate profit based on the household population behavior. The
model captures a wide range of applications in macroeconomic studies, and we propose a data-
driven reinforcement learning framework that finds the regularized competitive equilibrium of the
model. The proposed algorithm enjoys theoretical guarantees in converging to the equilibrium of
the market at a sub-linear rate.
1
Introduction
The behavior of labor markets has always been one of the key subjects of study in macroeconomics,
and it is crucial to understand the underlying mechanisms that give rise to the aggregate macroe-
conomic indicators, such as price level and unemployment rate. In addition, detailed economic
statistics such as wealth distribution have also become critical factors in analyzing the societal
impact of economic policies. There is therefore a major need for a deeper understanding of the
interaction between economic variables in large and complex markets, a challenging endeavor for
economists that machine learning and ubiquitous data collection promise to catalyze.
A variety of macroeconomic models have been proposed to characterize high-dimensional economic
dependencies (Aiyagari, 1994; Bewley, 1986; Huggett, 1993). Under these models, the competition
in the market among different types of market participants, such as households and firms, is often
regarded as a sequential game, where the participants interact and eventually arrive at certain
equilibrium strategies (Kuhn, 2013). Being able to find these equilibrium outcomes is critical
3
2
0
2
b
e
F
4
2
]
N
G
.
n
o
c
e
[
1
v
3
3
8
4
0
.
3
0
3
2
:
v
i
X
r
a
∗Yale University. E-mail: [email protected]
†Yale University. E-mail: [email protected]
‡Yale University. E-mail: [email protected]
§Northwestern University. E-mail: [email protected]
¶University of California, Berkeley. E-mail: [email protected]
‖Yale University. E-mail: [email protected]
1
in unraveling many important aspects of economic growth and providing insightful guidance to
policymakers and corporations.
In this paper, we focus on a labor market model that is composed of two groups of participants:
households and firms, each with an infinite number of heterogeneous agents. One of the classic
examples of such heterogeneous agent model is Aiyagari model (Aiyagari, 1994). At every time
step, each household retains certain capital holdings, e.g., cash and investments, and earns a
certain amount of income, e.g., salary and dividends. The income of each household is subject to
independent and heterogeneous exogenous shocks over time, which reflects the impact of market
conditions on individual household employment. Facing the capital holdings and income at each
step, the household saves part of its total wealth for the next step and spends the rest to enjoy some
utility.
The competition between the households and firms lies at the essence of the model: The goal of the
household is to come up with a saving strategy that maximizes its discounted cumulative utility. The
utility function is concave with respect to savings, a critical assumption that reflects the economic
principle of diminishing returns (Shephard and F ̈are, 1974). The firms make decisions that maximize
corporate profit given the population behavior of the households subject to the saving strategy, and
these decisions then determine the market conditions. Such competition between the two parties is
characteristic of modern labor markets, which eventually arrive at an equilibrium determined by
the inherent properties of the markets. Note that the model comprises infinitely many households
interacting through a population variable, and it can be cast into a mean-field game (MFG) (Lasry
and Lions, 2007), such that the representative agent of the MFG stands for a typical household and
the mean-field term represents the market condition that incorporates both the population behavior
of the households and the optimal decisions of a typical firm (Light and Weintraub, 2022).
Existing numerical methods in economic literature suffer from a number of drawbacks in solving for
such equilibria, and these drawbacks impose significant limits on the applications of the model to
real markets (Achdou et al., 2014a,b, 2022; Kuhn, 2013). Specifically: 1) The underlying stochastic
model for income shocks is unknown in general, while existing methods assume prior knowledge
of income shock transitions, which is unrealistic in practice. 2) These methods also require a
discretization of the state-action space in computing the utilities despite the model featuring a
continuous variable space. It results in massive computational inefficiency due to the curse of
dimensionality (Bellman and Dreyfus, 2015). 3) There are few theoretical results that guarantee the
convergence of these existing methods to the desired equilibrium.
In this work we present a reinforcement learning (RL) based alternative to the existing methods.
Machine learning techniques have been adopted for solving economic models recently, thanks to
the emergence of massive computational power and the increasingly available microeconomic data
(Achdou et al., 2022; Curry et al., 2022; Min et al., 2022b). Despite some attempts to apply
data-driven RL methods for macroeconomic models (Curry et al., 2022), theoretical understanding
of such algorithms is still limited. In particular, the analysis of RL algorithms for heterogeneous
agent models face several unique challenges: 1) The concavity assumption on the utility function
of the households features the economic nature of the problem, and it induces a concave shape
constraint on the value functions of the agents for any feasible policy. Such shape constraint is
absent in the existing literature on MFG, and it requires special treatments to achieve better sample
efficiency. 2) The model induces a continuous domain of the value functions, whereas existing
literature on MFG only considers a discrete state-action space. Under such a continuous setup of
state-action space, the optimal policy of an agent may not be unique, and this may compromise the
uniqueness of the equilibrium as well as the stability of the learning process.
2
Our contributions. We summarize the main contributions of this paper as follows:
• We propose a RL framework for a class of heterogeneous agent models in macroeconomics, by
formulating it as an MFG with a shape constraint on the value function. Our formulation
generalizes the well-known Aiyagari model, extending the model into high-dimensional state-
action space.
• To guarantee a provable convergence to an equilibrium, we propose a regularized policy
iteration algorithm that we refer to as ConcaveHAM, facilitated by the combination of fitted
Q-iteration (Riedmiller, 2005) and convex regression. Our algorithm provides a data-driven
approach that estimates the income shock transitions, and with the introduction of convex
regression, it avoids the curse of dimensionality in discretization and provides a continuous
solution on value functions that better characterize the problem. It is noteworthy that our
algorithm can readily incorporate other forms of shape constraints under large state spaces.
• We prove that ConcaveHAM converges to the desired equilibrium at a sublinear rate under
standard assumptions. Especially, it learns a quantal response mean-field equilibrium (QR-
MFE) of the MFG, an equivalence of the regularized recursive competitive equilibrium of
the macroeconomic model (Prescott and Mehra, 2005), which incorporates the concept of
bounded rationality (Selten, 1990) and enforces the uniqueness of optimal policy through
entropy regularization. To the best of our knowledge, this is the first data-driven framework
for heterogeneous agent models that captures economic intuitions and guarantees theoretical
tractability simultaneously.
• In the MFG that we consider, the feasible action set is not independent of its current state,
which is a natural consequence of the household budget constraint. This is also a unique
characteristic that has not been considered in the existing literature to the best of our
knowledge and might be of independent interest.
Notation. We denote the set of all positive integers by Z+ and the set of all non-negative real
numbers by R+. For functions f and g, we denote f (n) (cid:46) g(n) if f (n) ≤ Cg(n) for every n ∈ Z+
with some universal constant C > 0 (similarly, f (n) (cid:38) g(n)); further, we write f (n) (cid:16) g(n) if
f (n) (cid:46) g(n) and f (n) (cid:38) g(n). We write diam(X) := maxx,y∈X kx − yk∞ for any set X. For any
measurable set A, we define ∆A as the set of all density functions supported on A. We denote the
set of policies π with Π. For any measurable functions f and g supported on domain A, we denote
hf, giA = (cid:82)
A f (x)g(x) dx.
2 Preliminary
In this paper, we focus on a heterogeneous agent model as a generalization of the well-known Aiyagari
model of labor markets with idiosyncratic income shocks (Aiyagari, 1994). Notably, we formulate
the model as an MFG, i.e., an asymptotic approximation of a multi-agent Markov game with a large
number of agents. In the rest of this section, we elaborate on how to cast a generalized Aiyagari
model in macroeconomics into the form of an MFG. Table 1 shows a detailed correspondence
between the two interpretations.
2.1 Heterogeneous agent model
Consider db, dw, dz ∈ Z+. Let B ⊆ [0, 1]db be the set of all capital holdings, W ⊆ [0, 1]dw be the
set of all possible incomes, and A ⊆ [0, 1]dw be the set of all feasible capital savings. Further let
3
Table 1: A comparison of notation between the generalized Aiyagari model and its MFG formulation.
Mean-field game
(Representative agent)
Heterogeneous agent model
(Representative household)
Notation
Interpretation
Notation
Interpretation
State
s ∈ S ⊆ Rds
a ∈ A ⊆ Rdw Action
Policy
π : S → ∆A
z ∈ Z ⊆ Rdz Mean-field term
Reward function
rz
Value function
V π
z
Aggregate indicator
Ξπ
z
QR-MFE
(z?, π?)
(b, w) ∈ B × W ⊆ Rds Capital holdings and income
a ∈ A ⊆ Rdw
π : S → ∆A
z ∈ Z ⊆ Rdz
rz
V π
z
(bπ
)
z , wπ
z
(z?, π?)
Capital savings
Saving strategy
Market condition (indicators)
Utility function
Cumulative utility
Population capital and labor
Market equilibrium
Z ⊆ Rdz be the set of all aggregate indicators that represent possible market conditions.
Households. Within a heterogeneous agent model, each household on the market is characterized
by its total assets b ∈ B and current income w ∈ W at each time step. Under any given market
condition represented by some aggregate indicators z ∈ Z, the income w of each household is subject
to independent heterogeneous exogenous shocks, i.e., the income of each household forms a Markov
chain as time evolves. The household adopts a saving strategy π : B × W → A, and at each time step,
after making saving a = π(b, w), the household gains utility rz(b, w, a), where rz : B × W × A → R
is the utility function under market condition z. The savings a made at the current time step then
become the capital holdings b at the next time step.
that maximizes its expected
The goal of each household is to come up with a saving strategy π?
z
cumulative utility V π?
(as a γ-discounted sum of all future rewards) subject to the underlying
z
market condition z. The optimal saving strategy of the households, together with the aggregate
indicator, gives rise to a population average of household capital retention bπ?
and income level
z
wπ?
z
.
z
Firms. Based on bπ?
, the firms desire to make decisions that maximize their profits,
z
which in turn gives a new market condition indicator z0 following some aggregate function Ψ and
production mapping Φ.
and wπ?
z
More specifically, for dΞ ∈ Z+ and the set Π of all feasible policies, we assume the representative firm
has access to an aggregate function Ψ : Z × Π → RdΞ that maps any mean-field term z and policy π
to a set of aggregate indicators Ξπ
) ∈ RdΞ (which represents the population behaviors of
z , wπ
z
z
all households in the market). Here bπ
denotes the aggregated indicators on capital retention and
z
denotes those on labor supply. The representative firm then makes corporate decisions based on
wπ
z
as given and picks the corporate decisions that
the indicators Ξπ
. In particular, the firm takes Ξπ
z
z
maximize the production function of the firm, which give rise to a new market condition represented
by a new mean-field term z0 = Φ(Ξπ
z
) ∈ Z.
= (bπ
Competition between households and firms. Under the new market condition z0, the house-
holds then need to update their saving policy, and the competition between the households and the
firms continues iteratively.
4
, and
Notice that the households and firms interact only through the aggregate terms bπ
z
z; therefore, the competition can be regarded as between one representative household and one
representative firm. Such repetitive competitions reach a competitive equilibrium (z?, π?
z?) under
mild conditions. Our goal is to learn an approximate equilibrium of (z?, π?
z?) from observational
data, where the behavior policy may not be optimal with respect to the underlying market condition
z.
, wπ
z
2.2 Mean-field game on households
We cast the above heterogeneous agent model into a framework of MFG, where infinitely many
identical agents interact through a mean-field term (Lasry and Lions, 2007). In particular, we focus
on a representative agent that stands for a representative household and consider its interaction with
a mean-field term z, which forms a counterpart of the aggregate indicators z of the market. From
now on, we describe the components of the MFG in the language of RL, as listed in Table 1.
Shape-constrained MDP for representative agent. Fix any mean-field term z. The interac-
tion between the agent and economic environment forms a discounted infinite-horizon MDP with a
shape constraint, denoted by a tuple (S, A, G, Γ, Pz, rz, γ), where γ ∈ (0, 1) is the discount factor.
Here S := B × W is the state space of total assets and income, and A is the action space of savings.
In contrast to standard definitions of MDPs, here at each state s ∈ S, the agent can only take
action in a feasible actions set Γ(s) ⊆ A that reflects the household budget constraint. We define
the feasible state-action set as G := {(s, a) ∈ S × A | a ∈ Γ(s)}. In particular, we assume that
G ⊆ Rds+dw is a convex set, corresponding to a convex household budget constraint, and that it is
independent of the choice of mean-field term z. We also assume the reward function rz : G → [0, 1]
is a concave function that depends on the mean-field term z.
At each time step h given state sh = (bh, wh), the agent takes some action ah ∈ Γ(sh) and receives a
reward rz(sh, ah). Then the agent transitions to the next state sh+1 = (bh+1, wh+1) ∼ Pz(* | sh, ah),
where the transition probability Pz represents the idiosyncratic income shock that implicitly depends
on the mean-field term z. More specifically, for any ah ∈ Γ(bh, wh).
Pz(bh+1, wh+1|bh, wh, ah) =
(cid:40)Pz[wh+1|wh]
0
bh+1 = ah
bh+1 6= ah
(2.1)
where Pz[* | *] denotes the income shock.
Learning goal. The representative agent aims to maximize the γ-discounted cumulative reward
over an infinite time horizon. We encode the agent's strategy in a map π : S → ∆A, which is called a
policy. In particular, π(s) is only supported on Γ(s) for any s ∈ S. Then given any mean-field term
z and policy π, we define the Q-function (i.e., action-value function) Qπ
: G → R as the expected
z
discounted cumulative reward under the policy π, i.e.,
Qπ
z
(s, a) := E
(cid:20) ∞
(cid:88)
h=1
γhrz(sh, ah)
(cid:21)
s0 = s, a0 = a
,
(cid:12)
(cid:12)
(cid:12)
(cid:12)
where the expectation E is taken with respect to both Pz and π along the trajectory. Similarly, we
define the value function V π
z
(s) : S → R of π as
V π
z
(s) := E
(cid:20) ∞
(cid:88)
h=0
γhrz(sh, ah)
(cid:21)
,
s0 = s
(cid:12)
(cid:12)
(cid:12)
(cid:12)
5
which we also write as V π
z
to find an optimal policy π?
z
V ?
z
decision processes (MDPs) (Puterman, 2014), and it holds that V ∗
z
(s, *), π(* | s)iΓ(s). The goal of the representative agent is then
(s, a) and
(s). Note that such optimal policy always exists for infinite horizon Markov
that maximizes its value functions Q?
z
(s) = hQ∗
z
(s, *), π∗
z
(* | s)iΓ(s).
(s, a) := maxπ Qπ
z
(s) := maxπ V π
z
(s) = hQπ
z
Note that the convexity of the reward functions further induces the convexity of the value functions
for any policy, and thus the policies are economically meaningful for the heterogeneous agent
model.
In our formulation of the MFG, we treat the
Mean-field term: the representative firm.
representative firm as a function that outputs the mean-field term given any policy π from the
representative agent.
Formally, we assume a mapping Φ ◦ Ψ : Z × Π → Z that sends any policy π under a current
mean-field term z to its corresponding updated mean-field term z0. We assume full knowledge of
both functions, as the aggregation function Ψ can be estimated with a simulator and the production
mapping Φ is generally a deterministic function given the production function.
2.3 Quantal response mean-field equilibrium
The MFG described above admits at least one equilibrium under mild conditions, and any equilibrium
(z?, π?) of the MFG then corresponds to an equilibrium of the heterogeneous agent model, where
the equilibrium reveals itself as the pair of market condition z? and the optimal household strategy
z? under such market condition.
π?
Issues with RCE. One commonly considered equilibrium for MFG is recursive competitive
equilibrium (RCE), which is represented as a tuple (z?, Q?, π?, Ξ?) where π? is the optimal policy
with respect to the MDP under transition kernel Pz?, the optimal Q-function Q? = Q?
z?, and it
holds that Φ(Ξ?) = z? for the aggregate indicators Ξ? = Ψ(z?, π?) (Light and Weintraub, 2022).
However, such equilibrium can be non-unique and unstable with respect to Q? and its estimation.
Furthermore, policy estimation is not robust under the definition of RCE. The lack of robustness
limits the capability of value-based RL algorithms from converging to the equilibria. Further
discussions on the lack of uniqueness and robustness of RCE is delayed to Appendix A.2.
To overcome this challenge, we propose a regularized competitive equilibrium named Quantal
Response Mean-Field Equilibrium (QR-MFE).
Definition 2.1 (Quantal Response Mean-Field Equilibrium). A representative agent policy and a
mean-field term (π?, z?) reach quantal response mean-field equilibrium with respect to a strongly
convex entropy function H if z? = Φ(Ψ(z?, π?)) and for any policy π, state s ∈ S, and the optimal
Q-function Q?
z? under mean-field term z?
(cid:90)
π?(a | s)Q?
z?(s, a) da − H(π?) ≥
Γ(s)
(cid:90)
Γ(s)
π(a | s)Q?
z?(s, a) da − H(π).
The quantal response equilibrium introduces the notion of bounded rationality that characterizes
human decision-making, where the agent makes stochastic "quantal" decisions according to a smooth
probability distribution around the best response (Goeree et al., 2020).
Under this new notion of equilibrium, the equilibrium policy π? is unique with respect to Q?
z? thanks
to the strongly convex entropy regularization H. It is noteworthy that the pair (π?, z?) of policy
6
Algorithm 1 Concave Heterogeneous Agent Model (ConcaveHAM)
Input: Mean-field term z0 ∈ Z, number of iterations T , number of iterations τ within each CFQI
1: initialize Q0(s, a) ← 0 for all (s, a) ∈ G,
2: for t = 1, . . . , T do
3:
(cid:98)π0 ← Unif(Γ(s)) for all s ∈ S
zt ← Φ(Ψ(zt−1, (cid:98)πt−1))
(cid:98)Qt ← CFQI(Dt; τ ) where Dt is the offline dataset under zt
(cid:98)πt ← π
(cid:98)Qt following Eq. (3.1)
4:
5:
6: end for
7: Return zT
z? is
and mean-field term alone is enough to characterize the equilibrium; the optimal Q-function Q?
deterministic given z? and the aggregation indicators Ξ? = Ψ(z?, π?) are also fixed given π? and
z?. Especially, the optimal policy can be estimated from data through RL algorithms when the
mean-field term is fixed, and therefore we only consider the approximation error to the equilibrium
mean-field term z? in the rest of this paper.
3 A Reinforcement Learning Algorithm
In this section, we propose a RL-based algorithm called ConcaveHAM for learning the QR-MFE of the
heterogeneous agent model from offline data. The main algorithm is displayed in Algorithm 1, which,
at a high level, consists of two major procedures: 1) a mean-field term generation from regularized
optimal policy, and 2) an optimal value function estimation under concave shape constraint.
Algorithm 1 executes as follows: We initialize Algorithm 1 with an arbitrary mean-field term
z0 ∈ Z, zero Q-function Q0, and uniform policy
(cid:98)π0, which is indeed the regularized optimal policy
of constant Q-function Q0. In each iteration t ∈ [T ], given the previous mean-field term zt−1 and
the representative agent's policy
(cid:98)πt−1, the representative firm determines a new mean-field term zt
(Line 7). Then under zt, we estimate the optimal Q-function (cid:98)Qt for the representative agent with the
concave fitted Q-iteration (FQI) (Algorithm 2), using the offline dataset (Line 4). The regularized
optimal policy is further solved according to (3.1) with respect to (cid:98)Qt (Line 5). Finally, Algorithm 1
returns an approximation zT of the equilibrium mean-field term z? after T iterations.
As we will show in Theorem 4.6, the mean-field term estimation of Algorithm 1 converges to the
equilibrium quantity z? under proper conditions. In the rest of this section, we explain the details
for each component of Algorithm 1.
Regularized optimal policy. For any Q-function Q and any strongly convex regularizer H, we
define the regularized optimal policy πQ with respect to Q as
πQ(* | s) := arg max
u∈∆Γ(s)
(cid:26) (cid:90)
Γ(s)
u(a)Q(s, a) da − H(u)
(cid:27)
.
(3.1)
In particular, we assume H is ζ-strongly convex in k * k1. A classic example is the negative entropy,
i.e., −H(u) = ζ (cid:82) u(a) log u(a) da. We further assume πQ is known for any Q-function Q and
regularizer H for simplicity, and the policy optimization with entropy regularization can be found
in Chen et al. (2021b); Mei et al. (2020).
Q-function estimation. For any fixed mean-field term z, we propose a Concave FQI algorithm
7
Algorithm 2 Concave FQI (CFQI)
Input: Data Dz = {sz,m, az,m, rz,m, s0
z,m}M
1: initialize (cid:101)Q0(s, a) ← 0 for all (s, a) ∈ G
2: for ' = 1, . . . , τ do
3:
4: end for
5: Return (cid:101)Qτ
(cid:101)Q' ← LSE(F , Dz, Tz (cid:101)Q'−1; (cid:15))
m=1
, number of iterations τ
in Algorithm 2, abbreviated as CFQI, for estimating the optimal Q-function Q?
z
MDP from data.
of the underlying
Under each mean-field term z, we define the Bellman optimality operator Tz as follows:
z,m
m=1
)}M
(TzQ)(s, a) := rz(s, a) + γ Es0∼Pz(*|s,a)[((cid:74)Q)(s0)],
where ((cid:74)Q)(s) := maxa∈Γ(s) Q(s, a). For each mean-field term z ∈ Z, we assume access to an offline
dataset Dz := {(sz,m, az,m, rz,m, s0
that contains M i.i.d. samples, where (sz,m, az,m) ∼ (cid:101)μ ∈
∆G, the reward rz,m = rz(sz,m, az,m), and the next state s0
z,m ∼ Pz(* | sz,m, az,m). Then given the
dataset Dz, FQI (Antos et al., 2007) applies an approximate value iteration on the Q-functions, by
iteratively computing an estimator (cid:101)Q' of Tz (cid:101)Q'−1 for ' = 1, . . . , τ .
In particular, CFQI enforces a concave shape constraint on the estimated Q-function through a
convex regression solver termed least square estimator (LSE). Given (cid:101)Q'−1 from the previous iteration
and a set of concave functions denoted by F , LSE finds ˆf ∈ F that minimizes the empirical risk
given by the Bellman error between ˆf and (cid:101)Q'−1 evaluated on the dataset Dz. Specifically, for any
Q and (cid:98)f ∈ F , we say (cid:98)f is an (cid:15)-approximate LSE of TzQ on dataset Dz if
(cid:88)
(s,a,r,s0)∈Dz
( (cid:98)f (s, a) − r − γ((cid:74)Q)(s0))2 − min
f ∈F
(cid:88)
(s,a,r,s0)∈Dz
(f (s, a) − r − γ((cid:74)Q)(s0))2 ≤ (cid:15).
We denote the regression solver used to acquire such (cid:15)-approximate LSE as LSE(F , Dz, TzQ; (cid:15)).
Then in each iteration ', we solve for (cid:101)Q' = LSE(F , Dz, Tz (cid:101)Q'−1; (cid:15)), and Algorithm 2 terminates after
τ iterations and returns an approximate optimal Q-function (cid:101)Qτ .
In general LSE is hard to obtain without structures on F , but fortunately here we have the convex
shape constraint. Recall that the reward function rz is concave and takes values in [0, 1], and it
are in [0, 1/(1 − γ)]. Let us denote B := 1/(1 − γ) and L := Lr/(1 − γ),
follows that Qπ
and V π
z
z
is B-bounded and L-Lipschitz for any z ∈ Z and policy π.
then the Q-function Qπ
z
Hence, as Lemma B.5 shows, the estimation target TzQ is a concave function for any concave Q,
and this allows effective estimation of TzQ with a simple concave function set. We also remark
that if the model has finite number of discrete income levels for variable w, the regression target
TzQ(*, w, *) is concave for any concave Q(*, w, *) and all w ∈ W without the requirement of stochastic
concavity, cf. Lemma B.6.
3.1 Convex regression
We now introduce a few regression solvers available to Algorithm 2. Without loss of generality,
for any regression on a concave Q bounded from above by B, we consider an equivalent regression
problem on the non-negative convex function −Q + B. With a slight abuse of notation, we write Q
to denote this transformed convex function from now on to simplify discussions.
8
Bounded Lipschitz convex functions. Let CB,L denote the set of all non-negative B-bounded
and L-Lipschitz convex functions on G, i.e.,
CB,L := {f : G → [0, B] | f is convex; ∂f (x) 6= ∅, ∀x ∈ G; k∂f (x)k ≤ L, ∀x ∈ G},
g∈∂f (x) kgk∞. Recall
where ∂f (x) denotes the subdifferential of f at x ∈ G and k∂f (x)k denotes sup
that TzQ ∈ CB,L for any Q ∈ CB,L and mean-field term z following Lemma B.5. A convex regression
solver for TzQ is written as LSE(CB,L, Dz, TzQ; (cid:15)).
Lipschitz max-affine functions. Further, we let A K,+
B,L
Lipschitz K-max-affine functions, i.e.,
denote the set of all non-negative L-
A K,+
B,L
:= {h : G → [0, B] | h(x) = max
k∈[K]
(cid:124)
kx + ck, kαkk∞ ≤ L, ∀k ∈ [K]}.
α
Note that max-affine functions are convex by definition, and therefore any estimator in A K,+
B,L
also lies in CB,L. We write a K-max-affine regression solver for TzQ as LSE(A K,+
B,L , Dz, TzQ; (cid:15)). It
can
is worth noting that an approximate LSE to the convex regression on both CB,L and A K
B,L
be obtained by solving the corresponding convex optimization problems up to arbitrary accuracy
(Bal ́azs et al., 2015; Mazumder et al., 2019), and we therefore assume the approximate LSEs returned
by the solvers admit at most (cid:15) excess empirical risk compared to the LSE.
Input convex neural networks. Beyond the standard convex regression algorithms, the shape-
constrained estimation of TzQ can be achieved by minimizing the empirical risk over a set of input
convex neural network (ICNN), where the network output is always convex with respect to the
network input when the parameter space of the network is constrained (Amos et al., 2017).
More specifically, for any K-layer ICNN fK(x) : Rd → R, each of its i-th layer yi can be expressed
as
i yi + W (x)
yi+1 = σ(W (y)
i ∈ R'i+1×'i, W (x)
i x − βi),
where yi, βi ∈ R'i, W (y)
∈ R'i+1×d, and σ denotes ReLU function. Especially,
y0 = x ∈ Rd represents the network input, yK = fK(x) ∈ R represents the network output, and 'i
denotes the number of neurons on the i-th layer (especially, '0 = d). To guarantee the convexity of
fK(x) with respect to x, we further restrict W (y)
, so that the composition of convex and
convex non-decreasing function is also convex (Amos et al., 2017).
i = 0, 1, . . . , K − 1,
i ∈ R'i+1×'i
+
i
We further show that under a convex parameter set of the network specified by G, we are able to
of ICNNs such that it is equivalent to the set of all non-negative B-bounded
construct a set N K
B,L
and L-Lipschitz K-max-affine functions, i.e., A K,+
. Therefore, minimizing the empirical risk on
B,L
also serves as an estimation of the convex function TzQ, assuming that the solver trains to
N K
B,L
the global minimum. This is summarized in the following lemma, and see Appendix B.7 for a
proof.
Lemma 3.1. There exists a set N K
X → [0, B] defined on a convex domain X ⊆ Rd that is the maximum of K affine functions, N K
able to represent fK exactly under a convex constraint set specified by W (x)
and maxx∈X (cid:80)K−1
i
](cid:124)
[w
B,L is
equivalent to the set of all non-negative K-max-affine functions that are B-bounded and L-Lipschitz.
B,L of K-layer ICNNs, such that for any L-Lipschitz function fK :
B,L is
j=i−1 wjk∞ ≤ L,
=
j=i−1 bj ≤ B for all i ∈ [K], where wi := wi,1 − wi,2 and W (x)
= 1 fixed for all i ∈ [K − 1]. Especially, N K
. In addition, we set W (y)
i ≥ 0, k (cid:80)K−1
j x + (cid:80)K−1
= 0 and W (y)
j=i−1 w
(cid:124)
i,1, w
(cid:124)
i,2
(cid:124)
0
i
9
4 Theoretical Results
Next, we show the existence and uniqueness of the QR-MFE, and provide theoretical guarantees to
the convergence of Algorithm 1 to the unique equilibrium. Before diving into the main results, we
make a few moderate assumptions on the MFG, under which our theoretical results hold.
We first define formally the shape constrain assumption on the feasible action sets and reward
functions, as well as some technical conditions required for the following theorems. It is noteworthy
that we consider b and w as continuous variables.
Assumption 4.1. The set of all feasible mean-field terms Z ⊆ Rdz has bounded '1-radius, i.e.,
maxz,z0∈Z kz − z0k1 ≤ Z for some Z > 0. The feasible set G = {(s, a) ∈ Rds+dw | a ∈ Γ(s)} is a
closed convex set. The reward function rz(s, a) is concave in (s, a) and Lr-Lipschitz in '∞ norm
with respect to (s, a, z), i.e., |rz(s, a) − rz0(s0, a0)| ≤ Lr * max{ks − s0k∞, ka − a0k∞, kz − z0k∞}.
Assumption 4.2. For all z ∈ Z, the transition kernel Pz of the MDP is stochastically concave
(Smith and McCardle, 2002), i.e., q(b, w, a) := Ew0[Q(b, w0, a) | w] is concave on for any concave Q.
We assume that the transition kernel (2.1) is Lipschitz with respect to both the state and mean-field
term. Recall that the transition is independent of the current capital holdings b and savings a (see
Equation 2.1). Such assumption admits smooth transition between between different mean-field
environments.
Assumption 4.3. The transition kernel P is Lipschitz in the sense that for any mean-field term
z, z0 ∈ Z and s, s0 ∈ S, there exists LP > 0 such that kPz(* | w) − Pz0(* | w0)k1 ≤ LP * (ks − s0k + kz −
z0k1).
To guarantee a stable iteration for Algorithm 1, we also impose a Lipschitz condition on the
aggregation function Ψ and the production mapping Φ. Here for any two policies π and π0,
kπ − π0k∞,ν is defined as (cid:82)
S kπ(* | s) − π0(* | s)k∞ dν(s) for any ν ∈ ∆S.
Assumption 4.4. The aggregate function Ψ is LΨ-Lipschitz for all policy π and mean-field term
z ∈ Z and the production mapping Φ is LΦ-Lipschitz, i.e.,
kΨ(z, π) − Ψ(z0, π0)k1 ≤ LΨ(kz − z0k1 + kπ − π0k∞,ν),
kΦ(Ξ) − Φ(Ξ0)k1 ≤ LΦ * kΞ − Ξ0k1,
for some policy-induced distribution ν. Hence, Φ(Ψ(*, *)) is LF -Lipschitz, where LF := LΨLΦ.
As mentioned above, we assume that for any mean-field term z, we have access to a logged dataset
Dz comprising of i.i.d. samples from the trajectory of an exploratory behavior policy, where the
behavior policy satisfies a coverage assumption. These are standard for FQI in the RL literature
(Antos et al., 2007), and the state-action pairs needed for the training dataset can be sampled from
the heterogeneous households in the market.
Assumption 4.5. For any z ∈ Z, the offline data Dz = {(sz,m, az,m, rz,m, s0
follows an
(cid:101)μ, where i.i.d. samples (sz,m, az,m) ∼ (cid:101)μ. In particular,
(cid:101)ν × πb follows
exploratory distribution
from a sample distribution
(cid:101)ν on S and an exploratory behavior policy πb, such that for any mean-field
term z, non-stationary policy π∗, step h, and feasible state-action pair (s, a), there exists a constant
)}M
(cid:101)μ =
m=1
z,m
∗A non-stationary policy may change over time, i.e., there may not exists a policy π : S → ∆A such that πt = π
for all t.
10
D such that
z,h
(s, a)
μπ
(cid:101)μ(s, a) ≤ D,
where μπ
z
π. Note that
denotes the distribution on step h over S × A induced by transition kernel Pz and policy
Γ(s) μπ
z,h
(s, a) da/(cid:101)ν(s) ≤ D for any s ∈ S.
Γ(s) (cid:101)μ(s, a) da, and we have (cid:82)
(cid:101)ν(s) = (cid:82)
Under these assumptions, we show the existence and uniqueness of the QR-MFE for the MFG
as well as the convergence guarantees of Algorithm 1 with a range of external solvers for convex
regression.
To ease the notation, let us introduce some problem-dependent quantities: Let B := 1/(1 − γ),
L := Lr/(1 − γ), d := ds + dw, and
κ := JLF D2
ζ
+ LF .
We further write
and C0
d
= (d + 1)B4 + (B + dL)dL.
Cd = B
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2
First, we prove that the MFG has a unique QR-MFE. The essential idea is that if Φ(Ψ(πQ∗
contraction and Z is complete, then the equilibrium is unique. See proof in Appendix B.1.
z , z)) a
Theorem 4.6 (Unique QR-MFE). Under Assumptions 4.1, 4.2, 4.4 and 4.5, further assume that
κ < 1. Then, there exists a unique quantal response mean-field equilibrium to the MFG with
regularized policies.
Further, we show that Algorithm 1 converges to the QR-MFE with a range of external solvers that
provides approximate LSE on the set of convex functions, max-affine functions, and ICNNs. In
particular, as we will see in Theorems 4.7 and 4.8, the RL framework ConcaveHAM enjoys sub-linear
convergence rate to the equilibrium mean-field term z? for all three convex regression solvers if
the estimation error (cid:15) = 0. Proofs for Theorems 4.7 and 4.8 can be found in Appendices B.2
and B.3.
Theorem 4.7 (Convergence for CB,L). Under Assumptions 4.1, 4.2, 4.3, 4.4, and 4.5, further
assume that κ < 1. For δ ∈ (0, 1), suppose that the number of iterations within each CFQI subroutine
satisfies
(cid:16)
log
d D−1/2 M 2/(d+2)
C−1
log M
log 1
γ
(cid:17)
,
τ (cid:16)
and that the sample size M satisfies
log M (cid:38) max
(cid:26) B
4d+8
d+2
d
d+2
CdM
(cid:18)
log τ T
δ
,
1 + log
(cid:19) 2
d (cid:27)
,
R∗
dB
Cd
d ≤ max{8dL, 2B + 4dL}. Then with probability at least 1 − δ, Algorithm 1 with T iterations
where R∗
on CB,L gives mean-field term zT such that
kzT − z?k1 (cid:46) CdLF D5/2
(1 − γ)(1 − κ)ζ
M − 2
d+2 log M +
LF D5/2(cid:15)
(1 − γ)(1 − κ)ζ
+ κT Z + κT −1
1 − γ
.
11
d+2 ) when the sample size M is large enough. Note that κT Z + κT −1
1−γ
Theorem 4.7 suggests that when we take convex regression on F = CB,L for the estimation of
optimal value function in Algorithm 2, the estimation zT of ConcaveHAM converges to z? in the rate
of (cid:101)O(M − 2
converges to zero
exponentially fast, and the number of required iterations T is in logarithmic order. It is noteworthy
that the number of iterations τ in Algorithm 2 is kept in the order of log(M
d+2 / log M ) to guarantee
the convergence of ConcaveHAM.
Due to the large covering entropy of CB,L in the order of dd, the sample complexity with the term Cd
in Theorem 4.7 suffers from an almost linear dependence on d. This issue can be avoided by taking
the regression solver LSE(A K,+
with a specially
designed K.
B,L , Dz, TzQ; (cid:15)) on the max-affine function set A K,+
B,L
2
). Under Assumptions 4.1, 4.2, 4.3, 4.4, and 4.5, further
Theorem 4.8 (Convergence for N K
B,L
assume that κ < 1. For δ ∈ (0, 1), suppose that the number of iterations within each CFQI subroutine
satisfies
τ (cid:16)
√
log M 4/(d+4)
d2L2
D
log 1
γ
,
and that the sample size M satisfies
M (cid:38) max
√
(cid:26) log M 4/(d+4)
d2L2
D
δ log 1
γ
,
τ T
exp(2(d + 1)M d/(d+4))δ
,
(cid:18) B3(B + dL)
d log M
(cid:19) d+4
2d+4
(cid:18) B2
d2L2
,
log τ T
δ
(cid:19) d+4
d (cid:27)
.
then with probability at least 1 − δ, Algorithm 1 with T iterations on A K,+
term zT such that
B,L or N K
B,L gives mean-field
kzT − z?k1 (cid:46)
C0
dLF D5/2
(1 − γ)(1 − κ)ζ
M − 4
d+4 log M +
LF D5/2(cid:15)
(1 − γ)(1 − κ)ζ
+ κT Z + κT −1
1 − γ
.
, ConcaveHAM converges in the rate of
With the regression solver on max-affine function set A K
B,L
(cid:101)O(M − 4
d+4 ) when the sample size M is large enough. Compared to Theorem 4.7, it not only enjoys
a better rate but also enjoys a better constant in d, compared to the one in Theorem 4.7 for CB,L.
ConcaveHAM also enjoys the same rate of (cid:101)O(M − 4
d+4 ) for large M when paired with regression on
of ICNNs, and this is a natural statement following Lemma 3.1 and assuming the
the set N K
B,L
B,L, Dz, TzQ; (cid:15)) approach the global optimum on minimizing the empirical
learning algorithms LSE(N K
risk.
Therefore, the ConvHAM algorithm is provably convergent to the QR-MFE of the mean-field game
at a sublinear rate, which provides a data-driven approach to a large class of heterogeneous agent
models that does not require prior knowledge of the income shock transitions. By taking advantage
of convex regression, it is capable of capturing the economic intuitions, and at the same time,
providing a continuous solution on value functions and avoiding the curse of dimensionality in
discretization.
5 Numerical Experiments
To corroborate our theoretical results, we apply the proposed ConvHAM algorithm to some of the
existing heterogeneous agent models in macroeconomics and show the convergence rate on mean-field
terms that matches our theoretical guarantees.
12
Figure 1: Convergence of the mean-field terms: rent ς and wage ω. The red, blue, and purple lines
show the average outputs of the mean-field terms by ConvHAM after 15 rounds of iterations with
different number of samples M provided at each iteration. The corresponding confidence bands
are plotted over 50 random trials. The black dotted line indicates the convergence rate of order
O(M −2/5).
Experiment setup. Our simulation features a canonical setup of the Aiyagari model where
market incompleteness and idiosyncratic income shocks give rise to agent heterogeneity.
Under this setup, the household has two levels of labor opportunities n ∈ {0, 1}, i.e., employment if
n = 1 and unemployment if n = 0. The utility function is logarithmic with respect to the amount of
spending χ that is restricted by the household budget constraint χ ≤ (1 + ς − δ)b + ωn − a, where
the mean-field term z = (ω, ς) represents the wage and the rent on the market while δ denotes
a depreciation constant. We restrict feasible capital holding 0 ≤ b ≤ 20 and the representative
firm takes the Cobb-Douglas production function F (b, n) = bαn1−α for any aggregated population
capital b and population labor n. The training data are sampled from a uniform distribution on
feasible states s = (b, n) following a uniform policy π0.
Simulation results. Our method is able to achieve stable convergence in a few dozens of rounds of
ConvHAM with moderate regularization, and the convergence rate matches our theoretical guarantees
as illustrated in Figure 1.
More specifically, we aggregate the numerical results over 50 random trials for three initialization
of population capital, which is determined by the initial mean-field terms, with a range of sample
sizes M for the concave value function estimation. We plot the mean-field terms (wage and rent)
against different sample sizes for 15 rounds of ConcaveHAM, and compare them with the theoretically
predicted convergence rate of M −2/5 in terms of the sample size. The numerical results verify that
(i) our algorithm achieves stable convergence, and (ii) the convergence rate matches our theoretical
guarantees.
6 Related Work
Heterogeneous agent models are a fundamental class of macroeconomic models that aim to understand
the dynamics of individual participants of the market and how their population behaviors impact the
overall performance of the economy (Hommes, 2006). These models often consider random economic
shocks to individual participants, such as aggregate and exogenous risk (Fern ́andez-Villaverde
et al., 2019), and focus on understanding the RCE between households and firms (Kuhn, 2013;
13
Light, 2020). Machine learning has gained momentum in analyzing a range of economic models
(Fernandez-Villaverde et al., 2020; Lepetyuk et al., 2020). Especially, deep RL has claimed success in
solving heterogeneous agent models with aggregate shocks and discrete-continuous choice dynamic
models with heterogeneous agents (Han et al., 2021; Maliar and Maliar, 2022); it is also proven
effective in finding micro-founded general equilibria for macroeconomic models with many agents
(Curry et al., 2022).
MFG characterizes the decision-making dynamics of infinitely many players through a mean-field
term, and it provides a natural extension to multi-agent games that admits simpler asymptotic
analysis (Gu ́eant et al., 2011; Lasry and Lions, 2007). Convergence of RL algorithms to equilibria
of MFGs have been analyzed in recent works (Guo et al., 2019; Subramanian and Mahajan, 2019).
Particularly, Guo et al. (2022) studied MFGs with entropy regularization on discrete action space
and finite time horizon.
Shape-constrained non-parametric modeling is a powerful tool that enables reliable estimation of
special function classes, and it is especially useful for economic models that often demand shape
constraints on utility functions (Blundell et al., 2003). In particular, theoretical guarantees have
been laid out for convex and max-affine shape constraint regression in a thread of literature (Bal ́azs
et al., 2015; Han and Wellner, 2016; Lim and Glynn, 2012; Mazumder et al., 2019; Seijo and Sen,
2011). An architecture of ICNN has also been considered for the representation of convex functions
with neural networks (Amos et al., 2017; Chen et al., 2018).
7 Conclusion
We study a generalized Aiyagari model as an MFG with concave shape constraint imposed on
the agent's value function. We propose a data-driven RL framework ConcaveHAM for solving the
MFG that dramatically improves the computational efficiency with the help of a variety of convex
regression procedures. The algorithm converges to the regularized recursive competitive equilibrium
of the macroeconomic model at a sub-linear rate and can readily incorporate other forms of shape
constraints. To the best of our knowledge, this is the first data-driven algorithm for heterogeneous
agent models with theoretical guarantees.
Acknowledgements
Zhaoran Wang acknowledges National Science Foundation (Awards 2048075, 2008827, 2015568,
1934931), Simons Institute (Theory of Reinforcement Learning), Amazon, J.P. Morgan, and Two
Sigma for their support. Zhuoran Yang acknowledges Simons Institute (Theory of Reinforcement
Learning) for the support.
References
Achdou, Y., Buera, F. J., Lasry, J.-M., Lions, P.-L. and Moll, B. (2014a). Partial
differential equation models in macroeconomics. Philosophical Transactions of the Royal Society
A: Mathematical, Physical and Engineering Sciences 372 20130397.
Achdou, Y., Han, J., Lasry, J.-M., Lions, P.-L. and Moll, B. (2014b). Heterogeneous agent
models in continuous time. Preprint 14.
Achdou, Y., Han, J., Lasry, J.-M., Lions, P.-L. and Moll, B. (2022). Income and wealth
14
distribution in macroeconomics: A continuous-time approach. The review of economic studies 89
45–86.
Aiyagari, S. R. (1994). Uninsured idiosyncratic risk and aggregate saving. The Quarterly Journal
of Economics 109 659–684.
Amos, B., Xu, L. and Kolter, J. Z. (2017). Input convex neural networks. In International
Conference on Machine Learning. PMLR.
Antos, A., Munos, R. and Szepesv ́ari, C. (2007). Fitted q-iteration in continuous action-space
mdps .
Arora, S., Du, S., Hu, W., Li, Z. and Wang, R. (2019). Fine-grained analysis of optimization
and generalization for overparameterized two-layer neural networks. In International Conference
on Machine Learning. PMLR.
Ayoub, A., Jia, Z., Szepesvari, C., Wang, M. and Yang, L. (2020). Model-based reinforcement
learning with value-targeted regression. In International Conference on Machine Learning. PMLR.
Bal ́azs, G., Gy ̈orgy, A. and Szepesv ́ari, C. (2015). Near-optimal max-affine estimators for
convex regression. In Artificial Intelligence and Statistics. PMLR.
Bellman, R. E. and Dreyfus, S. E. (2015). Applied dynamic programming, vol. 2050. Princeton
university press.
Bertsekas, D. (2012). Dynamic programming and optimal control: Volume I, vol. 1. Athena
scientific.
Bewley, T. (1986). Stationary monetary equilibrium with a continuum of independently fluctuating
consumers. Contributions to mathematical economics in honor of G ́erard Debreu 79.
Blanchet, J., Glynn, P. W., Yan, J. and Zhou, Z. (2019). Multivariate distributionally robust
convex regression under absolute error loss. Advances in Neural Information Processing Systems
32.
Blundell, R. W., Browning, M. and Crawford, I. A. (2003). Nonparametric engel curves
and revealed preference. Econometrica 71 205–240.
Cai, Q., Yang, Z., Jin, C. and Wang, Z. (2020). Provably efficient exploration in policy
optimization. In International Conference on Machine Learning. PMLR.
Chen, J. and Jiang, N. (2019).
Information-theoretic considerations in batch reinforcement
learning. In International Conference on Machine Learning. PMLR.
Chen, L., Min, Y., Belkin, M. and Karbasi, A. (2021a). Multiple descent: Design your own
generalization curve. Advances in Neural Information Processing Systems 34 8898–8912.
Chen, L., Min, Y., Zhang, M. and Karbasi, A. (2020). More data can expand the generalization
gap between adversarially robust and standard models. In International Conference on Machine
Learning. PMLR.
Chen, Y., Dong, J. and Wang, Z. (2021b). A primal-dual approach to constrained markov
decision processes. arXiv preprint arXiv:2101.10895 .
Chen, Y., Shi, Y. and Zhang, B. (2018). Optimal control via neural networks: A convex approach.
arXiv preprint arXiv:1805.11835 .
15
Christmann, A. and Steinwart, I. (2007). Consistency and robustness of kernel-based regression
in convex risk minimization .
Curry, M., Trott, A., Phade, S., Bai, Y. and Zheng, S. (2022). Finding general equilibria in
many-agent economic simulations using deep reinforcement learning. CoRR abs/2201.01163.
URL https://arxiv.org/abs/2201.01163
Du, S., Kakade, S., Lee, J., Lovett, S., Mahajan, G., Sun, W. and Wang, R. (2021). Bilinear
classes: A structural framework for provable generalization in rl. In International Conference on
Machine Learning. PMLR.
Du, S. S., Hou, K., Salakhutdinov, R. R., Poczos, B., Wang, R. and Xu, K. (2019). Graph
neural tangent kernel: Fusing graph neural networks with graph kernels. Advances in neural
information processing systems 32.
Dubey, A. and Pentland, A. (2021). Provably efficient cooperative multi-agent reinforcement
learning with function approximation. arXiv preprint arXiv:2103.04972 .
Fei, Y. and Xu, R. (2022a). Cascaded gaps: Towards gap-dependent regret for risk-sensitive
reinforcement learning. arXiv preprint arXiv:2203.03110 .
Fei, Y. and Xu, R. (2022b). Cascaded gaps: Towards logarithmic regret for risk-sensitive
reinforcement learning. In International Conference on Machine Learning. PMLR.
Fern ́andez-Villaverde, J., Hurtado, S. and Nuno, G. (2019). Financial frictions and the
wealth distribution. Tech. rep., National Bureau of Economic Research.
Fernandez-Villaverde, J., Nuno, G., Sorg-Langhans, G. and Vogler, M. (2020). Solving
high-dimensional dynamic programming problems using deep learning. Unpublished working paper
.
Fonteneau, R., Murphy, S. A., Wehenkel, L. and Ernst, D. (2013). Batch mode reinforcement
learning based on the synthesis of artificial trajectories. Annals of operations research 208 383–416.
Goeree, J. K., Holt, C. A. and Palfrey, T. R. (2020). Stochastic game theory for social
science: A primer on quantal response equilibrium. In Handbook of Experimental Game Theory.
Edward Elgar Publishing.
Grunewalder, S., Lever, G., Baldassarre, L., Pontil, M. and Gretton, A. (2012).
Modelling transition dynamics in mdps with rkhs embeddings. arXiv preprint arXiv:1206.4655 .
Gu ́eant, O., Lasry, J.-M. and Lions, P.-L. (2011). Mean field games and applications. In
Paris-Princeton lectures on mathematical finance 2010. Springer, 205–266.
Guo, X., Hu, A., Xu, R. and Zhang, J. (2019). Learning mean-field games. Advances in Neural
Information Processing Systems 32.
Guo, X., Hu, A., Xu, R. and Zhang, J. (2020). A general framework for learning mean-field
games. arXiv preprint arXiv:2003.06069 .
Guo, X., Xu, R. and Zariphopoulou, T. (2022). Entropy regularization for mean field games
with learning. Mathematics of Operations Research .
Gy ̈orfi, L., Kohler, M., Krzy ̇zak, A. and Walk, H. (2002). A distribution-free theory of
nonparametric regression, vol. 1. Springer.
16
Han, J., Yang, Y. et al. (2021). Deepham: A global solution method for heterogeneous agent
models with aggregate shocks .
Han, Q. and Wellner, J. A. (2016). Multivariate convex regression: global risk bounds and
adaptation. arXiv preprint arXiv:1601.06844 .
He, J., Wang, T., Min, Y. and Gu, Q. (2022). A simple and provably efficient algorithm for
asynchronous federated contextual linear bandits. Advances in neural information processing
systems .
Hommes, C. H. (2006). Heterogeneous agent models in economics and finance. Handbook of
computational economics 2 1109–1186.
Huggett, M. (1993). The risk-free rate in heterogeneous-agent incomplete-insurance economies.
Journal of economic Dynamics and Control 17 953–969.
Jin, C., Yang, Z., Wang, Z. and Jordan, M. I. (2020). Provably efficient reinforcement learning
with linear function approximation. In Conference on Learning Theory. PMLR.
Kuhn, M. (2013). Recursive equilibria in an aiyagari-style economy with permanent income shocks.
International Economic Review 54 807–835.
Kumar, A., Fu, J., Soh, M., Tucker, G. and Levine, S. (2019). Stabilizing off-policy q-learning
via bootstrapping error reduction. Advances in Neural Information Processing Systems 32.
Lasry, J.-M. and Lions, P.-L. (2007). Mean field games. Japanese journal of mathematics 2
229–260.
Lepetyuk, V., Maliar, L. and Maliar, S. (2020). When the us catches a cold, canada sneezes: a
lower-bound tale told by deep learning. Journal of Economic Dynamics and Control 117 103926.
Light, B. (2020). Uniqueness of equilibrium in a bewley–aiyagari model. Economic Theory 69
435–450.
Light, B. and Weintraub, G. Y. (2022). Mean field equilibrium: uniqueness, existence, and
comparative statics. Operations Research 70 585–605.
Lim, E. and Glynn, P. W. (2012). Consistency of multidimensional convex regression. Operations
Research 60 196–208.
Ling, S., Xu, R. and Bandeira, A. S. (2019). On the landscape of synchronization networks: A
perspective from nonconvex optimization. SIAM Journal on Optimization 29 1879–1907.
Lu, M., Min, Y., Wang, Z. and Yang, Z. (2023). Pessimism in the face of confounders: Provably
In
efficient offline reinforcement learning in partially observable markov decision processes.
International Conference on Learning Representation.
Maliar, L. and Maliar, S. (2022). Deep learning classification: Modeling discrete labor choice.
Journal of Economic Dynamics and Control 135 104295.
Mazumder, R., Choudhury, A., Iyengar, G. and Sen, B. (2019). A computational framework
for multivariate convex regression and its variants. Journal of the American Statistical Association
114 318–331.
Mei, J., Xiao, C., Szepesvari, C. and Schuurmans, D. (2020). On the global convergence rates
of softmax policy gradient methods. In International Conference on Machine Learning. PMLR.
17
Min, Y., Chen, L. and Karbasi, A. (2021a). The curious case of adversarially robust models: More
data can help, double descend, or hurt generalization. In Uncertainty in Artificial Intelligence.
PMLR.
Min, Y., He, J., Wang, T. and Gu, Q. (2022a). Learning stochastic shortest path with linear
function approximation. In International Conference on Machine Learning. PMLR.
Min, Y., Wang, T., Xu, R., Wang, Z., Jordan, M. and Yang, Z. (2022b). Learn to match
with no regret: Reinforcement learning in markov matching markets. In Advances in Neural
Information Processing Systems.
Min, Y., Wang, T., Zhou, D. and Gu, Q. (2021b). Variance-aware off-policy evaluation with
linear function approximation. Advances in neural information processing systems 34 7598–7610.
Pfrommer, S., Anderson, B. G., Piet, J. and Sojoudi, S. (2023). Asymmetric certified
robustness via feature-convex neural networks. arXiv preprint arXiv:2302.01961 .
Prescott, E. C. and Mehra, R. (2005). Recursive competitive equilibrium: The case of
homogeneous households. In Theory Of Valuation. World Scientific, 357–371.
Puterman, M. L. (2014). Markov decision processes: discrete stochastic dynamic programming.
John Wiley & Sons.
Riedmiller, M. (2005). Neural fitted q iteration–first experiences with a data efficient neural
reinforcement learning method. In Machine Learning: ECML 2005: 16th European Conference
on Machine Learning, Porto, Portugal, October 3-7, 2005. Proceedings 16. Springer.
Schmidt, M., Roux, N. and Bach, F. (2011). Convergence rates of inexact proximal-gradient
methods for convex optimization. Advances in neural information processing systems 24.
Seijo, E. and Sen, B. (2011). Nonparametric least squares estimation of a multivariate convex
regression function. The Annals of Statistics 39 1633–1657.
Selten, R. (1990). Bounded rationality. Journal of Institutional and Theoretical Economics
(JITE)/Zeitschrift f ̈ur die gesamte Staatswissenschaft 146 649–658.
Shalev-Shwartz, S. and Singer, Y. (2007). Online learning: Theory, algorithms, and applications
.
Shephard, R. W. and F ̈are, R. (1974). The law of diminishing returns. In Production Theory:
Proceedings of an International Seminar Held at the University at Karlsruhe May–July 1973.
Springer.
Smith, J. E. and McCardle, K. F. (2002). Structural properties of stochastic dynamic programs.
Operations Research 50 796–809.
Song, G., Xu, R. and Lafferty, J. (2021a). Convergence and alignment of gradient descent
with random backpropagation weights. Advances in Neural Information Processing Systems 34
19888–19898.
Song, Z., Mei, S. and Bai, Y. (2021b). When can we learn general-sum markov games with a
large number of players sample-efficiently? arXiv preprint arXiv:2110.04184 .
Subramanian, J. and Mahajan, A. (2019). Reinforcement learning in stationary mean-field
games. In Proceedings of the 18th International Conference on Autonomous Agents and MultiAgent
Systems.
18
Sutton, R. S. and Barto, A. G. (2018). Reinforcement learning: An introduction. MIT press.
Tan, H. Y., Mukherjee, S., Tang, J. and Sch ̈onlieb, C.-B. (2022). Data-driven mirror descent
with input-convex neural networks. arXiv preprint arXiv:2206.06733 .
Wang, Y., Liu, Q., Bai, Y. and Jin, C. (2023). Breaking the curse of multiagency: Provably
efficient decentralized multi-agent rl with function approximation. arXiv preprint arXiv:2302.06606
.
Xu, R., Chen, L. and Karbasi, A. (2021). Meta learning in the continuous time limit. In
International Conference on Artificial Intelligence and Statistics. PMLR.
Zhu, Y. (2020). A convex optimization formulation for multivariate regression. Advances in Neural
Information Processing Systems 33 17652–17661.
19
A Clarification of Notation
We make a few clarifications on the problem setup of our heterogeneous agent model as well as the
related notation that we intentionally omitted in the main text due to space constraints.
A.1 Bellman Operators
We define Bellman operator Tπ
z
Q to
for any policy π and mean-field term z that maps from any Q-function
(Tπ
z Q)(s, a) := rz(s, a) + γ E[hQ(s0, *), π(* | s0)iΓ(s0) | s, a]
= rz(s, a) + γ(PzV π
z
)(s, a),
where (Pzv)(s, a) := E[v(s0) | s, a] and s0 ∼ Pz(* | s, a) be the next state for any state-value function
v. Further, we also denote Tz to be the Bellman optimality operator, such that for any value
function Q
(TzQ)(s, a) := rz(s, a) + γ E
(cid:104)
max
a0∈Γ(s0)
Q(s0, a0)
(cid:12)
(cid:105)
(cid:12)
(cid:12) s, a
under a greedy policy with respect to Q. Note that the value function Qπ
z
, i.e., Qπ
policy π is the fixed point of Tπ
z
z
optimal Q-function Q?
z
z Qπ
z
(s) is the fixed point of the Bellman optimality operator Tz, i.e.,
corresponding to any
)(s, a), and for any mean-field term z, the
(s, a) = (Tπ
Q?
z
(s, a) = (TzQ?
z
)(s, a) := rz(s, a) + γ E
and the optimal state-value function follows from V ?
z
A.2 Issues With RCE
(cid:104)
(s0, a0)
Q?
z
max
a0∈Γ(s0)
(s) = maxa∈Γ(s) Q?
z
(s, a).
(cid:12)
(cid:105)
(cid:12)
(cid:12) s, a
For any concave value function Q, there may exist multiple actions maximizing Q(s, *) for any s ∈ S,
and this non-uniqueness in optimal policy leads to the non-uniqueness of the aggregate indicator Ξ?
and therefore the non-uniqueness of RCE.
The non-robustness of an equilibrium implies that a small estimation error on the optimal value
function can lead to a large estimation error on the corresponding optimal policy.
A.3 Regularized RCE
Through adding an entropy regularization, we have a unique regularized optimal policy given any
mean-field term, and for the convenience of notation, we denote the regularized optimal policy for
any mean-field term z as
(cid:26)
Λ1(y) :=
π† : π† = arg max
(cid:110) (cid:90)
π
Γ(s)
π(a | s)Q?
z
(s, a) da − H(π(* | s))
(cid:111)
for all s ∈ S
(cid:27)
.
For any policy π, we also denote the next-iteration mean-field term under any current mean-field
term z with a shorthand
Λ2(π, z) := Φ(Ψ(z, π)).
To conclude the existence and uniqueness of the QR-MFE, we need to show the convergence of the
above iteration process starting with any mean-field term z ∈ Z, and it suffices if Λ2(Λ1(*)) is a
contractive mapping.
20
B Proof of Main Results
B.1 Proof of Theorem 4.6
Proof. Recall that the optimal regularized policy π?
z
term z is defined as
of the representative agent under any mean-field
π?
z
and the unique mean-field term induced by the best response of the environment to π?
z
mean-field term z is given by
= Λ1(y),
under any
Λ2(π?
z , z) := Φ(Ψ(π?
Let us further denote Λ(y) := Λ2(Λ1(y), z) to be the operator that maps any mean-field term
z to its corresponding next-iteration mean-field term through the regularized policy Λ1(y). A
policy-environment pair (π?, z?) is a QR-MFE if and only if z? = Λ(z?) and π? = Λ1(z?). Similar
to the argument in Guo et al. (2020), note that for any mean-field terms z and z0, the distance
between their corresponding next-iteration mean-field terms is controlled by
z , π)).
kΛ(y) − Λ(z0)k1 = kΛ2(Λ1(y), z) − Λ2(Λ1(z0), z0)k1
≤ kΛ2(Λ1(y), z) − Λ2(Λ1(z0), z)k1 + kΛ2(Λ1(z0), z) − Λ2(Λ1(z0), z0)k1
z0, z))k1 + kΦ(Ψ(π?
≤ kΦ(Ψ(π?
z0, z)) − Φ(Ψ(π?
z , z)) − Φ(Ψ(π?
z0, z0))k1,
where the first equality follows from the definition of operator Λ(*), the first inequality follows
from triangular inequality, and the last inequality follows from the definition of Λ1(*) and Λ2(*, *).
Following Assumption 4.4, the Lipschitzness of the mappings Ψ and Φ yields
kΦ(Ψ(π?
z0, z)) − Φ(Ψ(π?
z0, z0))k1 ≤ LF kz − z0k1
and
kΦ(Ψ(π?
z − π?
Further, it also holds for the optimal Q-functions Q?
z0 that the distance between their
z
corresponding optimal policies under entropy regularization H is bounded through the distance
between the mean-field terms, i.e.,
z0, z))k1 ≤ LF * kπ?
and Q?
z , z)) − Φ(Ψ(π?
z0k∞,ν.
kπ?
z − π?
z0k∞,ν ≤ D * kπ?
z − π?
z0k∞,(cid:101)ν
≤
≤
D2
ζ
JD2
ζ
kQ?
z − Q?
z0k1,(cid:101)μ
kz − z0k1,
where the first inequality is due to the concentrability of the sampling distribution
(cid:101)ν in Assump-
tion 4.5, the second inequality follows by applying Lemma B.2, and the last inequality is due to
Lemma B.1. Hence, we combine the above inequalities together to get
kΛ(y) − Λ(z0)k1 ≤ LF kz − z0k1 + LF * kπ?
z − π?
z0k∞,ν
≤
(cid:16) JLF D2
ζ
(cid:17)
+ LF
kz − z0k1,
and the operator Λ(*) forms a contraction if κ := JLF D2
+ LF < 1. The existence and uniqueness of
the QR-MFE (π?, z?) follows from Banach fixed-point theorem on compact metric space Z and the
uniqueness of global optimizer on strongly convex optimization.
ζ
21
Lemma B.1. Let z, z0 ∈ Z be two mean-field terms and Q?
z0 to be the optimal value functions
under the MDPs with transition kernels Pz and Pz0, respectively. Define B := 1/(1 − γ). Then under
Assumptions Assumption 4.3, and 4.5, we have
z and Q?
kQ?
z − Q?
z0k1,(cid:101)μ ≤ J * kz − z0k1,
where
J := Lr + γBLP
1 − γD
.
Proof. Notice that for any optimal Q-functions Q?
z
equation that
and Q?
z0, it follows from the Bellman optimality
kQ?
z − Q?
z0k1,(cid:101)μ = kTzQ?
(cid:13)
(cid:13)rz(s, a) + γ
=
(cid:13)
z − Tz0Q?
z0k1,(cid:101)μ
(cid:90)
Pz(s0 | s, a) max
a∈Γ(s0)
S
Q?
z
(s0, a) ds0
− rz0(s, a) − γ
(cid:90)
S
Pz0(s0 | s, a) max
a∈Γ(s0)
z0(s0, a) ds0(cid:13)
Q?
(cid:13)
(cid:13)1,(cid:101)μ
,
z0 are the fixed points
where the first equality is due to the fact that optimal Q-functions Q?
z
under the Bellman operators Tz and Tz0 respectively, the second equality expands the Bellman
operators following the definition of Tz and Tz0. Further, we decompose the difference into three
pieces, i.e.,
and Q?
kQ?
z − Q?
z0k1,(cid:101)μ ≤ γ
(cid:13)
(cid:13)
(cid:13)
(cid:90)
S
+ γ
{Q?
z
Pz(s0 | s, a)(cid:2) max
a∈Γ(s0)
(cid:90)
(s0, a)} − max
a∈Γ(s0)
(cid:2)Pz(s0 | s, a) − Pz0(s0 | s, a)(cid:3) max
a∈Γ(s0)
(cid:13)
(cid:13)
(cid:13)
S
{Q?
z0(s0, a)}(cid:3) ds0(cid:13)
(cid:13)
(cid:13)1,(cid:101)μ
z0(s0, a) ds0(cid:13)
Q?
(cid:13)
(cid:13)1,(cid:101)μ
(B.1)
+ krz(s, a) − rz0(s, a)k1,(cid:101)μ,
where the inequality follows from triangular inequality and supplying an intermediate dummy term
(cid:82)
z0(s0, a) ds0. Notice that the last term in (B.1) can be bounded following
S Pz(s0 | s, a) maxa∈Γ(s0) Q?
the Lipschitzness of the reward function, i.e.,
krz(s, a) − rz0(s, a)k1,(cid:101)μ ≤ Lr * kz − z0k1,
and the second term in (B.1) is controlled by the distance between transition kernels Pz and Pz0,
i.e.,
(cid:13)
(cid:13)
(cid:13)
(cid:90)
S
(cid:2)Pz(s0 | s, a) − Pz0(s0 | s, a)(cid:3) max
a∈Γ(s0)
z0(s0, a) ds0(cid:13)
Q?
(cid:13)
(cid:13)1,(cid:101)μ
≤ LP * kQ?k∞kz − z0k1
≤ BLPkz − z0k1,
where the first inequality is due to the Lipschitz condition on Pz with respect to z in Assumption 4.3
and maxa∈Γ(s0) Q?
z0(s0, a) ≤ kQ?k∞ ≤ B for all feasible state-action pair (s, a). The second inequality
follows from the assumption that the reward rh(s, a) ∈ [0, 1] for any feasible state-action pair (s, a)
and step h ∈ Z+. Finally, for any optimal Q-functions Q?
z0, the first term in (B.1) is bounded
z
by
and Q?
(cid:13)
(cid:13)
(cid:13)
(cid:90)
S
Pz(s0 | s, a)(cid:2) max
a0∈Γ(s0)
{Q?
z
(s0, a0)} − max
a0∈Γ(s0)
{Q?
z0(s0, a0)}(cid:3) ds0(cid:13)
(cid:13)
(cid:13)1,(cid:101)μ
22
(cid:90)
≤
(cid:13)
(cid:13)
(cid:13)
S
= (cid:13)
(cid:13) max
a∈Γ(s)
= (cid:13)
(cid:13)Q?
z
Pz(s0 | s, a) max
a0∈Γ(s0)
(s, a) − Q?
z0(s, a)(cid:13)
(s, a) − Q?
(cid:12)
(cid:12)Q?
z
(cid:12)
(cid:12)Q?
z
(cid:13)
z0(s, a)(cid:12)
(cid:13)1,Pz (cid:101)μ
(cid:12)
(cid:13)1,Pz (cid:101)μ×π‡(Q?
z,Q?
z0 )
(s0, a0) − Q?
z0(s0, a0)(cid:12)
(cid:12) ds0(cid:13)
(cid:13)
(cid:13)1,(cid:101)μ
a∈A |Q?
z
kQ?
where the inequality follows from the fact that | maxx∈X f (x) − maxy∈X g(y)| ≤ maxx∈X |f (x) − g(x)|
for any x, y in the shared domain X, the first equality is due to the shorthand s0 ∼ Pzμ to denote
z0) that
s0 ∼ Pz(* | s, a) and (s, a) ∼ μ, and the last equality is due to defining the policy π‡(Q?
z0)(s) :=
takes the action to maximize the difference between Q-functions Q?
z0, i.e., π‡(Q?
z
arg max
z0(s, a)|. Putting the bounds above together, we have an upper bound
z, Q?
z, Q?
(s, a) − Q?
and Q?
z − Q?
z0k1,(cid:101)μ ≤ γD * kQ?
z − Q?
z0k1,(cid:101)μ + γBLP * kz − z0k1 + Lr * kz − z0k1,
(B.2)
where the inequality follows from Assumption 4.5. Rearranging the term in (B.2) and following the
definition of J to get
kQ?
z − Q?
z0k1,(cid:101)μ ≤
Lr + γBLP
1 − γD
kz − z0k1 = J * kz − z0k1.
Lemma B.2. Let Q?
kernels Pz and Pz0, respectively. Then, under Assumption 4.5, we have
z0 be two optimal value functions under the MDPs with transition
z and Q?
kπ?
z
(* | *) − π?
z0(* | *)k∞,(cid:101)ν ≤
D
ζ
* kQ?
z − Q?
z0k1,(cid:101)μ.
Proof. For any mean-field term z and its corresponding optimal value function Q?
z
regularized policy π?
z
can be written as
, the optimal
π?
z
(* | s) = arg max
u∈∆Γ(s)
= arg max
u∈∆Γ(s)
(cid:40)(cid:90)
Γ(s)
{hu, Q?
z
= ∇H?(Q(s, *)),
u(a)Q?
z
(s, a) da − H(u)
(cid:41)
(s, *)i − H(u)}
where the first equality follows from the definition of the optimal regularized policy π?
, and the
z
last equality follows from Lemma C.1 with ∇H?(Q(s, *)) being the functional derivative of the
dual functional H∗ evaluated at Q(s, *) for s ∈ S. Similarly, we write the optimal regularized
z0(s, *)) for any s ∈ S, and it follows that the distance between optimal
policy π?
regularized policies is controlled by that between optimal value functions, i.e.,
z0(* | s) = ∇H?(Q?
kπ?
z
(* | *) − π?
z0(* | *)k∞,(cid:101)ν = k∇H?(Q?
≤
1
kQ?
z
z
(s, *)) − ∇H?(Q?
z0(s, *))k∞,(cid:101)ν
(s, *) − Q?
z0(s, *)k1,(cid:101)ν
ζ
D
ζ
≤
kQ?
z − Q?
z0k1,(cid:101)μ,
where the first inequality is due to the ζ-strong convexity assumption on H and Lemma C.1, and
the last inequality is due to Assumption 4.5 and kQ?
with
z
πU being a uniform policy.
z0(s, *)k1,(cid:101)ν = kQ?
z0k1,(cid:101)ν×πU
(s, *) − Q?
z − Q?
23
From the proof of Lemma B.2, we bound the distance between the optimal household policies
under different mean-field environments. It provides an abstraction over multi-agent games where
exponentially many interactions between the agents are considered. Recall that mean-field setups,
viewed as a limit of their multi-agent counterparts (Dubey and Pentland, 2021; He et al., 2022; Ling
et al., 2019; Song et al., 2021b; Wang et al., 2023; Xu et al., 2021), drive the number of agents to
infinity. Compared to the multi-agent setting, in our analysis we bound the distance between the
optimal household policies under different mean-field environments.
B.2 Proof of Theorem 4.7
Proof. For each t ∈ [T ], the mean-field term zt is determined by the mean-field term zt−1 from
(cid:98)Qt−1 induced by the estimator (cid:98)Qt−1 of
last iteration of Algorithm 1 and the regularized policy π
the optimal value function Q?
zt−1. Hence, we follow the definition of operator Λ1 and Λ2, and the
distance between zt and the regularized RCE z? is bounded by
kzt − z?k1 = kΛ2(π
(cid:98)Qt−1, zt−1) − Λ2(Λ1(z?), z?)k1
≤ kΛ2(Λ1(zt−1), zt−1) − Λ2(Λ1(z?), z?)k1
+ kΛ2(Λ1(zt−1), zt−1) − Λ2(π
(cid:17)
+ LF
kzt−1 − z?k1 + LF kπQ?
≤
(cid:98)Qt−1, zt−1)k1
(cid:16) JLF D2
ζ
zt−1
− π
(cid:98)Qt−1k∞,ν,
where the equality follows from the definition of Λ1 and Λ2 as well as Definition 2.1, the first
inequality follows from triangular inequality, and the second inequality is due to Theorem 4.6
and Assumption 4.4. We denote κ := JLF D2/ζ + LF for the convenience of notation. Following
Lemma B.2, we further have
kzt − z?k1 ≤
(cid:17)
(cid:16) JLF D2
ζ
+ LF
≤ κ * kzt−1 − z?k1 + LF D2
kzt−1 − z?k1 + LF D2
k (cid:98)Qt−1 − Q?
zt−1k1,(cid:101)μ
ζ
ζ
After expanding the the first term of (B.3) recursively for t = T , it holds that for any T ∈ Z+, the
distance between the output mean-field term zT of Algorithm 1 and z? is controlled by
k (cid:98)Qt−1 − Q?
zt−1k
(cid:101)μ.
(B.3)
kzT − z?k1 ≤ κT kz0 − z?k1 + LF D2
ζ
T −1
(cid:88)
t=1
κT −1−tk (cid:98)Qt − Q?
ztk
(cid:101)μ + κT −1k (cid:98)Q0 − Q?
p0k
(cid:101)μ
≤ κT kz0 − z?k1 + LF D2
ζ
sup
t∈[T ]
k (cid:98)Qt − Q?
ztk
(cid:101)μ
T −1
(cid:88)
t=1
κT −1−t + κT −1k (cid:98)Q0 − Q?
p0k
(cid:101)μ
≤ κT kz0 − z?k1 + LF D2
(1 − κ)ζ
sup
t∈[T ]
k (cid:98)Qt − Q?
ztk
(cid:101)μ + κT −1
1 − γ
,
where the first inequality follows from recursive expansion of (B.3), the second inequality is due to
(cid:101)μ for all t ∈ [T ], and
uniform bounding of the estimation error k (cid:98)Qt − Q?
the last inequality is due to the bounded optimal value function kQ∗
= B for all z ∈ Z.
Therefore, for regression on the set CB,L of concave functions, we have with probability 1 − δ that
ztk
zk∞ ≤ 1
1−γ
t∈[T ] k (cid:98)Qt − Q?
(cid:101)μ ≤ sup
ztk
kzT − z?k1 (cid:46)
LF D2
√
D
(1 − γ)(1 − κ)ζ
(cid:104)
B
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
(cid:105)
d+2 log M + (cid:15)
+ κT Z + κT −1
1 − γ
24
for sample size M
d
d+2 (cid:38) log M , M
d
d+2 log M (cid:38) B
3d
d+2 (d + 1) −2
d+2 (dL) −d
d+2 log τ T
δ
, and
(log M ) d
2 (cid:38) 1 + log(R∗
dB
−6
d+2 (d + 1) −2
d+2 (dL) −d
d+2 ),
where R∗
d ≤ max{8dL, 2B + 4dL} and
(cid:18)
τ (cid:16) log
D−1/2B− d+8
d+2 (d + 1)− 2
d+2 (dL)− d
d+2 M
2
d+2
(cid:19)
1
log M
/ log
1
γ
.
The inequality follows from applying Lemma B.9 with a union bound.
B.3 Proof of Theorem 4.8
Combine the statements of Theorems B.3 and B.4 to get Theorem 4.8.
Theorem B.3. Let B := 1/(1 − γ), L := Lr/(1 − γ). Assume that κ := JLF D2
probability at least 1 − δ, Algorithm 1 with T iterations on A K
+ LF < 1, then with
B,L gives mean-field term zT such that
ζ
kzT − z?k1 (cid:46)
LF D2
√
D
(1 − γ)(1 − κ)ζ
(cid:104)(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M + (cid:15)
(cid:105)
+ κT Z + κT −1
1 − γ
for sample size M (cid:38) 1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
, M
2d+4
d+4 log M (cid:38) B3(B+4dL)
d+1
, M (cid:38)
τ T
exp(2(d+1)M d/(d+4))δ
, and
M
d
d+4 (cid:38) B2
d2L2 log 2τ T
δ , where τ (cid:16) log M 4/(d+4)
√
d2L2
D
/ log 1
γ .
Proof. Following similar argument as in the proof of Theorem 4.7, the distance between the output
mean-field term zT of Algorithm 1 and z? is controlled by
kzT − z?k1 ≤ κT kz0 − z?k1 + LF D2
ζ
T −1
(cid:88)
t=1
κT −1−tk (cid:98)Qt − Q?
ztk
(cid:101)μ + κT −1k (cid:98)Q0 − Q?
p0k
(cid:101)μ
≤ κT kz0 − z?k1 + LF D2
ζ
sup
t∈[T ]
k (cid:98)Qt − Q?
ztk
(cid:101)μ
T −1
(cid:88)
t=1
κT −1−t + κT −1k (cid:98)Q0 − Q?
p0k
(cid:101)μ
≤ κT kz0 − z?k1 + LF D2
(1 − κ)ζ
sup
t∈[T ]
k (cid:98)Qt − Q?
ztk
(cid:101)μ + κT −1
1 − γ
,
where the first inequality follows from recursive expansion of (B.3), the second inequality is due to
(cid:101)μ for all t ∈ [T ], and
uniform bounding of the estimation error k (cid:98)Qt − Q?
the last inequality is due to the bounded optimal value function kQ∗
zk∞ ≤ B for all z ∈ Z. For
regression on max-affine functions A K
B,L
, we have with probability 1 − δ that
t∈[T ] k (cid:98)Qt − Q?
(cid:101)μ ≤ sup
ztk
ztk
kzT − z?k1 (cid:46)
LF D2
√
D
(1 − γ)(1 − κ)ζ
(cid:104)(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M + (cid:15)
(cid:105)
+ κT Z + κT −1
1 − γ
for
M (cid:38)
1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
,
M
2d+4
d+4 log M (cid:38) B3(B + 4dL)
d + 1
,
M (cid:38)
τ T
exp(2(d + 1)M d/(d+4))δ
,
M
d
d+4 (cid:38) B2
d2L2
log
2τ T
δ
,
25
where
The inequality follows from applying Lemma B.9 with a union bound.
τ (cid:16) log M 4/(d+4)
√
d2L2
D
/ log
1
γ
.
Theorem B.4. Let B := 1/(1 − γ), L := Lr/(1 − γ). Assume that κ := JLF D2
probability at least 1 − δ, Algorithm 1 with T iterations on N K
+ LF < 1, then with
B,L gives mean-field term zT such that
ζ
kzT − z?k1 (cid:46)
LF D2
√
D
(1 − γ)(1 − κ)ζ
(cid:104)(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M + (cid:15)
(cid:105)
+ κT Z + κT −1
1 − γ
for sample size M (cid:38) 1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
, M
2d+4
d+4 log M (cid:38) B3(B+4dL)
d+1
, M (cid:38)
τ T
exp(2(d+1)M d/(d+4))δ
, and
M
d
d+4 (cid:38) B2
d2L2 log 2τ T
δ , where τ (cid:16) log M 4/(d+4)
√
d2L2
D
/ log 1
γ .
Proof. Following a similar argument as in the proof of Theorem 4.7, the distance between the output
mean-field term zT of Algorithm 1 and z? is controlled by
kzT − z?k1 ≤ κT kz0 − z?k1 + LF D2
ζ
T −1
(cid:88)
t=1
κT −1−tk (cid:98)Qt − Q?
ztk
(cid:101)μ + κT −1k (cid:98)Q0 − Q?
p0k
(cid:101)μ
≤ κT kz0 − z?k1 + LF D2
ζ
sup
t∈[T ]
k (cid:98)Qt − Q?
ztk
(cid:101)μ
T −1
(cid:88)
t=1
κT −1−t + κT −1k (cid:98)Q0 − Q?
p0k
(cid:101)μ
≤ κT kz0 − z?k1 + LF D2
(1 − κ)ζ
sup
t∈[T ]
k (cid:98)Qt − Q?
ztk
(cid:101)μ + κT −1
1 − γ
,
where the first inequality follows from recursive expansion of (B.3), the second inequality is due to
(cid:101)μ for all t ∈ [T ], and
uniform bounding of the estimation error k (cid:98)Qt − Q?
zk∞ ≤ B for all z ∈ Z. For
the last inequality is due to the bounded optimal value function kQ∗
regression on max-affine functions N K
B,L
, we have with probability 1 − δ that
t∈[T ] k (cid:98)Qt − Q?
(cid:101)μ ≤ sup
ztk
ztk
kzT − z?k1 (cid:46)
LF D2
√
D
(1 − γ)(1 − κ)ζ
(cid:104)(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M + (cid:15)
(cid:105)
+ κT Z + κT −1
1 − γ
for
where
M (cid:38)
1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
,
M
2d+4
d+4 log M (cid:38) B3(B + 4dL)
d + 1
,
M (cid:38)
τ T
exp(2(d + 1)M d/(d+4))δ
,
M
d
d+4 (cid:38) B2
d2L2
log
2τ T
δ
,
The inequality follows from applying Lemma B.9 with a union bound.
τ (cid:16) log M 4/(d+4)
√
d2L2
D
/ log
1
γ
.
26
under the MDP
In order to apply concave regression in estimating the optimal value function Q?
z
with transition kernel Pz, it is required that for any function Q ∈ CB,L, the Bellman optimality
operator Tz preserves the concavity, i.e., TzQ ∈ CB,L. As we show in Lemmas B.5 and B.6, this
holds for the Bellman optimality operator Tz and B-bounded and L-Lipschitz concave function set
CB,L for B = 1/(1 − γ) and L = Lr/(1 − γ).
Lemma B.5. Let B := 1/(1 − γ) and L := Lr/(1 − γ). For any mean-field term z ∈ Z and the
MDP with stochastic concave transition kernel Pz, if any value function Q ∈ CB,L, then TzQ ∈ CB,L.
z ∈ CB,L.
Consequently, the optimal value function Q?
Proof. For any bounded Lipschitz value function Q ∈ CB,L, we fix b, b0 ∈ B, w, w0 ∈ W, a ∈ Γz(b, w),
and a0 ∈ Γz(b0, w0). For any λ ∈ [0, 1], we define b := (1 − λ)b + λb0, n := (1 − λ)n + λw0, and
a := (1 − λ)a + λa0. Note that the state-action pair (B, w, a) lies in the feasible set G due to the
concavity assumption. It then follows that under Bellman optimality operator Tz that
(1 − λ)(TzQ)(b, w, a) + λ(TzQ)(b0, w0, a0) = (1 − λ)rz(b, w, a) + λrz(b0, w0, a0)
+ γ(1 − λ)
+ γλ
(cid:90)
W
(cid:90)
W
Pz(
(cid:101)w | w)Q(a, (cid:101)w, a1, (cid:101)w) d (cid:101)w
Pz(
(cid:101)w | w0)Q(a0, (cid:101)w, a2, (cid:101)w) d (cid:101)w,
where we define a1, (cid:101)w := arg max
a2, (cid:101)w := arg max
Given the optimal actions a1, (cid:101)w and a2, (cid:101)w, we further denote
a‡∈Γ(a, (cid:101)w) Q(a, (cid:101)w, a‡) to be the optimal action under state (a, (cid:101)w) and
(cid:101)w ∈ W.
(cid:98)a := (1 − λ)a1, (cid:101)w + λa2, (cid:101)w. Notice that
a‡∈Γ(a0, (cid:101)w) Q(a0, (cid:101)w, a‡) to be the optimal action under state (a0, (cid:101)w) for any
(1 − λ)rz(b, w, a) + λrz(b0, w0, a0) ≤ rz(b, w, a)
due to the concavity of the reward function rz. It also follows from the stochastic concavity of the
transition kernel Pz that
(1 − λ)
≤
(cid:90)
W
(cid:90)
W
Pz(
(cid:101)w | w)Q(a, (cid:101)w, a1, (cid:101)w) d (cid:101)w + λ
(cid:90)
W
Pz(
(cid:101)w | w0)Q(a0, (cid:101)w, a2, (cid:101)w) d (cid:101)w
Pz(
(cid:101)w | w)Q(a, (cid:101)w, (cid:98)a) d (cid:101)w.
Hence, we have the concavity of TzQ following
(1 − λ)(TzQ)(b, w, a) + λ(TzQ)(b0, w0, a0) ≤ rz(b, w, a) + γ
≤ rz(b, w, a) + γ
(cid:90)
W
(cid:90)
W
Pz(
(cid:101)w | w)Q(a, (cid:101)w, (cid:98)a) d (cid:101)w
Pz(
(cid:101)w | w)Q(a, (cid:101)w, a†) d (cid:101)w
= (TzQ)(b, w, a),
where the second inequality is due to the the greedy action Q(a, (cid:101)w, (cid:98)a) ≤ max
a† Q(a, (cid:101)w, a†), and
the last equality is due to a† := maxa∈Γ(a, (cid:101)w) Q(a, (cid:101)w, a†). The Lipschitzness of TzQ follows from
L = Lr/(1 − γ).
Recall that Q?
z
and the operation Tz that preserves concavity and Lipschitzness of the value function.
is the fixed point of Tz, and our desired conclusion follows from the closeness of CB,L
27
Lemma B.6. Let B := 1/(1 − γ) and L := Lr/(1 − γ). For any MDP with transition kernel Pz and
any fixed income variable w ∈ W, if any value function Q(*, w, *) ∈ CB,L, then TzQ(*, w, *) ∈ CB,L.
Consequently, Q?
z
(*, w, *) ∈ CB,L for any w ∈ W.
Proof. For any bounded Lipschitz value function Q(*, w, *) ∈ CB,L with fixed w ∈ W, we pick any
b, b0 ∈ B, a ∈ Γz(b, w), and a0 ∈ Γz(b0, w). For any λ ∈ [0, 1], we define b := (1 − λ)b + λb0, and
a := (1 − λ)a + λa0. Note that the state-action pair (b, w, a) lies in the feasible set G due to the
concavity assumption. It then follows that under Bellman optimality operator Tz
(1 − λ)(TzQ)(b, w, a) + λ(TzQ)(b0, w, a0) = (1 − λ)rz(b, w, a) + λrz(b0, w, a0)
+ γ(1 − λ)
+ γλ
(cid:90)
W
(cid:90)
W
Pz(
(cid:101)w | w)Q(a, (cid:101)w, a1, (cid:101)w) d (cid:101)w
Pz(
(cid:101)w | w)Q(a0, (cid:101)w, a2, (cid:101)w) d (cid:101)w,
where we define a1, (cid:101)w := arg max
a2, (cid:101)w := arg max
Given the optimal actions a1, (cid:101)w and a2, (cid:101)w, we further denote
a‡∈Γ(a, (cid:101)w) Q(a, (cid:101)w, a‡) to be the optimal action under state (a, (cid:101)w) and
(cid:101)w ∈ W.
(cid:101)w := (1 − λ)a1, (cid:101)w + λa2, (cid:101)w. Notice that
(cid:98)a
a‡∈Γ(a0, (cid:101)w) Q(a0, (cid:101)w, a‡) to be the optimal action under state (a0, (cid:101)w) for any
(1 − λ)rz(b, w, a) + λrz(b0, w, a0) ≤ rz(b, w, a)
due to the concavity of the reward function rz. It also holds that
(1 − λ)
=
≤
(cid:90)
W
(cid:90)
W
(cid:90)
W
Pz(
(cid:101)w | w)Q(a, (cid:101)w, a1, (cid:101)w) d (cid:101)w + λ
(cid:90)
W
Pz(
(cid:101)w | w)Q(a0, (cid:101)w, a2, (cid:101)w) d (cid:101)w
Pz(
(cid:101)w | w)[(1 − λ)Q(a, (cid:101)w, a1, (cid:101)w) d (cid:101)w + λQ(a0, (cid:101)w, a2, (cid:101)w)] d (cid:101)w
Pz(
(cid:101)w | w)Q(a, (cid:101)w, (cid:98)a
(cid:101)w) d (cid:101)w,
where the inequality is due to the concavity of the value function Q. Hence, we have the concavity
of TzQ following
(TzQ)(b, w, a) = rz(b, w, a) + γ
≥ rz(b, w, a) + γ
(cid:90)
W
(cid:90)
W
Pz(
(cid:101)w | w)Q(a, (cid:101)w, a†) d (cid:101)w
Pz(
(cid:101)w | w)Q(a, (cid:101)w, (cid:98)a
(cid:101)w) d (cid:101)w,
= B, we have kTzQk∞ ≤ 1 + γ
1−γ
where the equality is due to the the greedy action a† := maxa∈Γ(a, (cid:101)w) Q(a, (cid:101)w, a†), and the inequality
is due to Q(a, (cid:101)w, (cid:98)a) ≤ Q(a, (cid:101)w, a†).
Recall that rz(b, w, a) ∈ [0, 1] for all (b, w, a) ∈ G. For any value function Q such that kQk∞ ≤
= B following the Bellman equation. The Lipschitzness
1
1−γ
of TzQ similarly follows from L = Lr/(1 − γ). Hence, we have (TzQ)(*, w, *) ∈ CB,L if any value
function Q(*, w, *) ∈ CB,L.
Notice that Q?
z
of any value function Q in CB,L and the closeness of CB,L lead to Q?
is the fixed point of Tz, and the operation Tz preserving concavity and Lipschitzness
= 1
1−γ
z ∈ CB,L.
28
B.4 Proof of FQI with Concave Regression
FQI is a popular offline RL algorithm, together with its online value iteration counterpart, has been
analyzed by a large body of literature under different settings (Bertsekas, 2012; Fei and Xu, 2022b;
Fonteneau et al., 2013; Grunewalder et al., 2012; Kumar et al., 2019; Lu et al., 2023; Min et al.,
2022a, 2021b; Sutton and Barto, 2018; Zhu, 2020). In particular, our method features FQI with
concave regression that integrates the economic insights to the algorithm.
We would like to introduce some notation for the proofs of Algorithm 2 that follows. For any
function f and dataset Df = {(Xm, Ym)}M
where data pairs (X, Y ) are i.i.d. sampled from a
distribution D such that ED [Y | X = x] = f (x), we define the empirical risk of any estimator f 0 of
the ground truth f as
m=1
LD(f 0, f ) :=
1
M
M
(cid:88)
(f 0(Xm) − Ym))2,
m=1
where the subscript f on D is omitted for simplicity. Further, we define the true risk of the estimator
f 0 as
L(f 0, f ) := E[(f 0(X) − Y ))2] = ED[LD(f 0, f )],
where the expectation is taken with respect to the underlying distribution D. For any function class
F and estimator f 0 ∈ F , we denote
ED(f 0, f ) := LD(f 0, f ) − inf
g∈F
LD(g, f )
as the sub-optimality of f 0 compared to the best empirical risk estimator of f in F . We say f 0 is
an (cid:15)-approximate LSE if ED(f 0, f ) ≤ (cid:15), and we denote the set of all (cid:15)-approximate LSEs f 0 ∈ F on
data Df as LSE(F , Df ; (cid:15)). Similarly, we also define
E(f 0, f ) := L(f 0, f ) − inf
g∈F
L(g, f )
to be the sub-optimality of f 0 in terms of true risk over distribution D. In particular, for any offline
dataset DTQ := {(sm, am, rm, s0
i.i.d. sampled from (s, a) ∼ (cid:101)μ under the transition kernel
m
s0 ∼ P(* | s, a), we aim to estimate TQ with concave regression given any value function Q ∈ CB,L.
It follows that
)}M
m=1
LD(f 0, TQ) =
1
M
M
(cid:88)
(f 0(sm, am) − rm − γV (s0
m
))2
m=1
and for any function set F ,
ED(f 0, TQ) := LD(f 0, TQ) − inf
g∈F
LD(g, TQ),
) := maxa∈Γ(s0
m, a) is the the action-value function under the greedy policy with
where V (s0
m
. Further, we have L(f 0, TQ) := ED[LD(f 0, TQ)]. We write DTQ as D
respect to Q evaluated at s0
m
for simplicity when the context is clear. Before getting into the proof for regression, we first bound
the estimation error of FQI using a similar argument as in Chen and Jiang (2019).
m) Q(s0
29
Lemma B.7. Let Q?
(cid:101)Q'
μ, it holds that the distance between Q?
z be the estimation of Q?
z be the optimal value function under the MDP with transition kernel Pz and
z at the '-th iteration of Algorithm 2. Then for any policy-induced measure
z and the estimator (cid:101)Qτ
z of Algorithm 2 is bounded by
k (cid:101)Qτ
z − Q?
zkμ ≤
√
γτ −'
τ
(cid:88)
'=1
D * k (cid:101)Q'
z − Tz (cid:101)Q'−1
z k
(cid:101)μ + γτ
1 − γ
.
Proof. Under the MDP induced by mean-field term z and policy-induced measure μ ∈ ∆G, it holds
for any ' ∈ [τ ] that
k (cid:101)Q'
z − Q?
zkμ ≤ k (cid:101)Q'
z − Tz (cid:101)Q'−1
z kμ + kTz (cid:101)Q'−1
z − Q?
zkμ,
(B.4)
where TzQ for any value function Q denotes the Bellman operator induced by the mean-field term z
and the greedy policy with respect to Q. Notice that the first term of (B.4) represents the estimation
error of (cid:101)Q'
. For any measure μ, the second term of (B.4) can be
z
further bounded through
to the target function Tz (cid:101)Q'−1
z
kTz (cid:101)Q'−1
z − Q?
zk2
μ
z − TzQ?
= kTz (cid:101)Q'−1
= Eμ[(Tz (cid:101)Q'−1
= Eμ[(γP[ (cid:101)V '−1
zk2
μ
(s, a) − TzQ?
z
(s0)])2],
(s0) − V ?
z
z
z
(s, a))2]
where the first equality is due to the fact that the optimal value function Q?
z
point of Tz, and the second equality follows from expanding the terms Tz (cid:101)Q'−1
γ (cid:82)
inequality to the right-hand side of the second inequality, we have
(s, a) = rz(s, a) + γ (cid:82)
S Pz(s0 | s, a) (cid:101)V '−1
(s0) ds and TzQ?
z
is the fixed
(s, a) = rz(s, a) +
(s0) ds. Apply Jensen's
S Pz(s0 | s, a)V ?
z
z
z
kTz (cid:101)Q'−1
z − Q?
zk2
μ ≤ γ2 Eμ Pz[( (cid:101)V '−1
= γ2 EPzμ[( (cid:101)V '−1
(s0))2]
(s0) − V ?
z
(s0))2],
(s0) − V ?
z
z
z
where we define a shorthand s0 ∼ Pzμ that implies s0 ∼ Pz(* | s, a) and (s, a) ∼ μ. In particular, we
further expand according to the definitions of (cid:101)V '−1
z
(s0) and V ?
z
(s0) to get
EPzμ[( (cid:101)V '−1
z
(s0) − V ?
z
(s0))2] = EPzμ
(s0, a) − max
a∈A
Q?
z
(s0, a)(cid:1)2(cid:105)
z
(cid:104)(cid:0) max
a∈A (cid:101)Q'−1
(cid:101)Q'−1
z
z − Q?
(cid:104)(cid:0)
z
(s0, π‡( (cid:101)Q'−1
zk2
Pzμ×π‡( (cid:101)Q'−1
z
≤ EPzμ
= k (cid:101)Q'−1
,
,Q?
z)
, Q?
z
)) − Q?
z
(s0, π‡( (cid:101)Q'−1
z
, Q?
z
))(cid:1)2(cid:105)
where the inequality follows from the inequality follows from the fact that | maxx∈X f (x) −
maxy∈X g(y)| ≤ maxx∈X |f (x) − g(x)| for any x, y in the shared domain X. Especially, the policy
) is defined to take the action to maximize the difference between value functions (cid:101)Q'−1
π‡( (cid:101)Q'−1
z
(s, a)|. Combine the upper bounds
(s, a) − Q?
and Q?
z
z
z
above together, for any ' ∈ [τ ], we have
, Q?
z
, i.e., π‡( (cid:101)Q'−1
)(s) := arg max
a∈A | (cid:101)Q'−1
, Q?
z
z
z
k (cid:101)Q'
z − Q?
zkμ ≤ k (cid:101)Q'
z kμ + γk (cid:101)Q'−1
z − Tz (cid:101)Q'−1
Dk (cid:101)Q'
z − Tz (cid:101)Q'−1
z k
z − Q?
(cid:101)μ + γk (cid:101)Q'−1
zkPzμ×π‡( (cid:101)Q'−1
z
,Q?
z)
zkPzμ×π‡( (cid:101)Q'−1
z
z − Q?
√
≤
z),
,Q?
(B.5)
30
where the inequality follows from Assumption 4.5. Notice that Pzμ × π‡( (cid:101)Q'−1
z
induced measure, and we apply the above argument recursively on k (cid:101)Qi−1
z − Q?
i ∈ [']. Take ' = τ and expand the inequality (B.5) for τ times, we obtain
(cid:101)μ + γτ
1 − γ
z − Tz (cid:101)Q'−1
z k
D * k (cid:101)Q'
z − Q?
zkμ ≤
γτ −'
k (cid:101)Qτ
τ
(cid:88)
√
,
'=1
, Q?
z
zkPzμ×π
) is also a policy-
for all
(cid:101)Qi−1
z
,Q?
z
where k (cid:101)Q'
z − Tz (cid:101)Q'−1
z k
(cid:101)μ is the estimation error for target function Tz (cid:101)Q'−1
z
.
Lemma B.8. Let B := 1/(1 − γ) and L := Lr/(1 − γ), and for any mean-field term z, Q ∈ CB,L,
and data DTzQ := {(sm, am, rm, s0
m=1, we define (cid:98)f ∈ LSE(CB,L, DTzQ; (cid:15)). Then for any measure
m
(cid:101)μ ∈ ∆G and any training set size M := |DTzQ| such that M
d+2 (d +
d+2 (cid:38) log M , M
1) −2
d+2 log M (cid:38) B
d+2 log 1
)}M
3d
d
d
d+2 (dL) −d
δ , and
(log M ) d
2 (cid:38) 1 + log(R∗
dB
−6
d+2 (d + 1) −2
d+2 (dL) −d
d+2 ),
with probability at least 1 − δ
k (cid:98)f − TzQk2
(cid:101)μ
d ≤ max{8dL, 2B + 4dL}.
where R∗
(cid:46) B
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
d+2 log M + (cid:15),
Proof. Before getting into the proof of the lemma, we first provide a few useful definitions. We denote
g†
z(Q) := arg min
(cid:101)μ for any
mean-field term z and value function Q ∈ CB,L. We also define gz(Q; D) := arg min
LD(f, TzQ)
to be the LSE of TzQ that minimizes the empirical risk on D. Note that TzQ ∈ CB,L following
Lemma B.5, and we have g†
L(f, TzQ) to be the LSE of TzQ that minimizes the true risk under
z(Q) = TzQ. Further recall that
f ∈CB,L
f ∈CB,L
LD( (cid:98)f , TQ) =
1
M
M
(cid:88)
m=1
(f 0(sm, am) − rm − γ max
a∈Γ(s0
m)
Q(s0
m, a))2
and L( (cid:98)f , TQ) = ED[LD( (cid:98)f , TQ)]. For any (cid:98)f ∈ LSE(CB,L, D; (cid:15)), it follows by definition that
ED( (cid:98)f , TQ) = LD( (cid:98)f , TQ) − LD(gz(Q; D), TQ) ≤ (cid:15).
(cid:101)μ − kg†
z(Q) − TzQk2
It is noteworthy that k (cid:98)f − TzQk2
(cid:101)μ
from the fact that for any f ∈ CB,L,
z(Q), TzQ), which is followed
= L( (cid:98)f , TzQ) − L(g†
L(f, TzQ) = E
= E
(cid:101)μ[(f (s, a) − rz(s, a) − γ((cid:74)Q)(s0))2]
(cid:101)μ[(f (s, a) − (TzQ)(s, a))2] + Var
(cid:101)μ[E[r(s, a) + γ((cid:74)Q)(s0) | s, a]],
where (s, a) ∼ (cid:101)μ and s0 ∼ Pz(* | s, a); the variance terms cancel with each other and yield the
equality. It follows that
where the equality is due to kg†
holds that for any α, β > 0 and 0 < % ≤ 1
2
,
k (cid:98)f − TzQk2
(cid:101)μ
z(Q) − TzQk2
(cid:101)μ
= L( (cid:98)f , TzQ) − L(TzQ, TzQ)
= 0 and g†
z(Q) = TzQ. Following Theorem C.2, it
P
(cid:110)
∃f ∈ CB,L : L(f, TzQ) − L(TzQ, TzQ) − (LD(f, TzQ) − LD(TzQ, TzQ))
31
≥ % * (α + β + L(f, TzQ) − L(TzQ, TzQ))
%2(1 − %)αM
214(1 + %)B4
(cid:18) β%
20B
, CB,L, D
exp
N1
−
(cid:18)
(cid:19)
(cid:111)
,
(cid:19)
,
≤ 14 sup
D
where the inequality follows from |f | ≤ 1
= B for all f ∈ CB,L, and N1 (ε, F , D) denotes the
1−γ
ε-covering number of F on D with respect to '1 metric. The supremum is taken with respect to all
random dataset D. This provides a high probability upper bound on k (cid:98)f − TzQk2
(cid:101)μ
as
P
(cid:111)
(cid:110)
(1 − %)[L( (cid:98)f , TzQ) − L(TzQ, TzQ)] ≥ % * (α + β) + [LD( (cid:98)f , TzQ) − LD(TzQ, TzQ)]
≤ P
(cid:110)
∃f ∈ CB,L : L(f, TzQ) − L(g†, TzQ) − (LD(f, TzQ) − LD(g†, TzQ))
≥ % * (α + β + L(f, TzQ) − L(g†, TzQ))
(cid:111)
.
Further, for the set of all B-bounded, L-Lipschitz concave functions, its covering entropy is bounded
by
log N1
sup
D
(cid:18) β%
20B
(cid:19)
, CB,L, D
≤ log N∞
(cid:19)
, CB,L
(cid:18) β%
20B
(cid:18) 1600BdL
β%
≤ 2(d + 1)
(cid:19)d/2
ln
(cid:18) 200BR∗
d
β%
(cid:19)
,
where the first inequality follows from upper bounding '1 covering number with '∞ covering number,
and the second inequality follows from Lemma C.3. More specifically, for Lipschitz constant L and
uniform '∞ bound B, the covering entropy of CB,L is bounded through
log N∞(ε, CB,L) ≤ 2(d + 1)
(cid:19)d/2
(cid:18) 80Ld
ε
ln
(cid:19)
(cid:18) 10R∗
d
ε
for any ε ∈ (0, 80Ld] where Ld := dL diam(G) ≤ dL and R∗
β ≤ 1600
% BdL, we have
d ≤ max{8dL, 2B + 4dL}. Thus, for any
P
(cid:111)
(cid:110)
(1 − %)[L( (cid:98)f , TzQ) − L(TzQ, TzQ)] ≥ % * (α + β) + [LD( (cid:98)f , TzQ) − LD(TzQ, TzQ)]
(cid:32)
≤ 14 exp
2(d + 1)
(cid:19)d/2
(cid:18) 1600BdL
β%
ln
(cid:19)
(cid:18) 200BR∗
d
β%
−
%2(1 − %)αM
214(1 + %)B4
(cid:33)
.
Take % = 1
2
and for the estimator (cid:98)f ∈ CB,L that with probability at least
(cid:32)
1 − 14 exp
2(d + 1)
(cid:19)d/2
(cid:18) 3200BdL
β
ln
(cid:19)
(cid:18) 400BR∗
d
β
−
αM
2568B4
(cid:33)
,
it holds that the estimation error is bounded by
k (cid:98)f − TzQk2
(cid:101)μ
= L( (cid:98)f , TzQ) − L(TzQ, TzQ)
≤ α + β + 2(LD( (cid:98)f , TzQ) − LD(TzQ, TzQ))
= α + β + 2(ED( (cid:98)f , TQ) + LD(gz(Q; D), TQ) − LD(TzQ, TzQ))
≤ α + β + 2(cid:15)
32
where the second equality is due to ED( (cid:98)f , TQ) = LD( (cid:98)f , TQ) − LD(gz(Q; D), TQ), and the last
inequality is due to the fact that gz(Q; D) is defined to be the LSE that minimizes the empirical
risk, i.e., LD(gz(Q; D), TzQ) ≤ LD(TzQ, TzQ). Consequently, solve for proper α and β to get our
conclusion: if M
d+2 (cid:38) log M , M
d+2 (d + 1) −2
d+2 log M (cid:38) B
d+2 (dL) −d
, and
3d
d
d
d+2 log 1
δ
(log M ) d
2 (cid:38) 1 + log(R∗
dB
−6
d+2 (d + 1) −2
d+2 (dL) −d
d+2 ),
then for any d ≥ 2, with probability at least 1 − δ
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) B
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
d+2 log M + (cid:15).
Lemma B.9. For the MDP with transition kernel Pz, if the regression of Algorithm 2 finds (cid:15)-
approximate LSE in CB,L at all τ iterations, then the total approximation error of (cid:101)Qτ
z with respect
to the optimal value function Q?
z under any measure (cid:101)μ is upper bounded by
√
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
d+2 log M +
B
√
D(cid:15)
1 − γ
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ (cid:46)
D
1 − γ
with probability at least 1 − δ for the number of iterations
(cid:18)
τ (cid:16) log
D−1/2B− d+8
d+2 (d + 1)− 2
d+2 (dL)− d
d+2 M
2
d+2
(cid:19)
1
log M
/ log
1
γ
for any sample size M
d
d+2 (cid:38) log M , M
d
d+2 log M (cid:38) B
3d
d+2 (d + 1) −2
d+2 (dL) −d
d+2 log τ
δ , and
(log M ) d
2 (cid:38) 1 + log(R∗
dB
−6
d+2 (d + 1) −2
d+2 (dL) −d
d+2 ),
where R∗
d ≤ max{8dL, 2B + 4dL}.
Proof. Combining Lemma B.7 and Lemma B.8, we have with probability at least 1 − δ that the
total approximation error of the output (cid:101)Qτ
(cid:101)μ
z
is upper bounded by
to the optimal value function Q?
z
under any measure
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ ≤
(cid:46)
(cid:46)
τ
(cid:88)
'=1
τ
(cid:88)
√
γτ −'
D * k (cid:101)Q'
z − T (cid:101)Q'−1
z k
(cid:101)μ + γτ
1 − γ
√
(cid:16)
B
D *
γτ −'
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
d+2 log M + (cid:15)
(cid:17)
'=1
1
1 − γ
√
(cid:16)
B
D *
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
d+2 log M + (cid:15)
(cid:17)
+ γτ
1 − γ
,
+ γτ
1 − γ
for M
d
d+2 (cid:38) log M , M
d
d+2 log M (cid:38) B
3d
d+2 (d + 1) −2
d+2 (dL) −d
d+2 log τ
δ
, and
(log M ) d
2 (cid:38) 1 + log(R∗
dB
−6
d+2 (d + 1) −2
d+2 (dL) −d
d+2 ).
The first inequality follows from Lemma B.7, the second inequality is due to applying Lemma B.8
(cid:101)μ holds with probability at least 1 − δ/τ for all ' ∈ [τ ],
such that the upper bound on k (cid:101)Q'
z − T (cid:101)Q'−1
z k
33
and the last inequality follows from a sum over geometric series. If the number of iteration τ is
large enough, such that
(cid:18)
τ (cid:38) log
it follows that
D−1/2B− d+8
d+2 (d + 1)− 2
d+2 (dL)− d
d+2 M
2
d+2
(cid:19)
1
log M
/ log
1
γ
,
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ (cid:46)
√
D
1 − γ
B
d+8
d+2 (d + 1) 2
d+2 (dL) d
d+2 M − 2
d+2 log M +
√
D(cid:15)
1 − γ
.
B.5 Proof of FQI With Max-Affine Functions
In this subsection, we present the analysis of our FQI algorithm when the underlying feasible
functions are max-affine. Max-affine functions generalize the commonly studied linear functions
in RL (Ayoub et al., 2020; Cai et al., 2020; Du et al., 2021; Fei and Xu, 2022a; Jin et al., 2020;
Min et al., 2022b), and more importantly, all max-affine functions constitute a subset of all convex
functions. Let A K
denote the set of all bounded L-Lipschitz K-max-affine functions defined as
B,L
follows
A K
B,L
:= {h : G → R | h(x) = max
k∈[K]
(cid:124)
kx + ck, kαkk∞ ≤ L, h(x) ∈ [−dL diam(G), B]}.
α
Lemma B.10. Let B := 1/(1 − γ) and L := Lr/(1 − γ), and for any mean-field term z, Q ∈ CB,L,
and dataset DTzQ := {(sm, am, rm, s0
m=1 with (sm, am) ∈ Rd i.i.d. sampled from any measure
)}M
m
(cid:101)μ ∈ ∆G for all m ∈ [M ], we define the (cid:15)-approximate estimator (cid:98)f ∈ LSE(A K,+
B,L , DTzQ; (cid:15)) of TzQ for
K ∈ Z+. Then for any training set size M := |DTzQ| such that
M (cid:38)
1
e2(d+1)M d/(d+4)δ
,
M
then with probability at least 1 − δ
2d+4
d+4 log M (cid:38) B3(B + 4dL)
d + 1
,
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) (d + 1)B4M −4/(d+4) log M + d2L2M −4/(d+4)
(cid:114)
+ BdLM −4/(d+4)
log
+
2
δ
B2 log 2
δ
M
+ (cid:15).
f ∈A K,+
B,L
f ∈A K,+
B,L
z(Q) := arg min
LD(f, TzQ) to be the LSE of TzQ in A K,+
B,L
Proof. Let us denote g†
L(f, TzQ) to be the estimator of TzQ in A K,+
B,L
(cid:101)μ for any mean-field term z. We also define gz(Q; D) :=
that minimizes the true risk under
arg min
that minimizes the empirical risk on
DTzQ. Note that for any Q ∈ CB,L, TzQ ∈ CB,L following Lemma B.5, but it does not have to be
in A K,+
B,L , DTzQ; (cid:15)), it
B,L
follows by definition that ED( (cid:98)f , TzQ) = LD( (cid:98)f , TzQ) − LD(gz(Q; D), TzQ) ≤ (cid:15).
Recall that k (cid:98)f − TzQk2
(cid:101)μ
α, β > 0 and 0 < % ≤ 1
,
2
= L( (cid:98)f , TzQ) − L(TzQ, TzQ). Following Theorem C.2, it holds that for any
z(Q) = TzQ may not hold. For any (cid:98)f ∈ LSE(A K,+
. Hence, the estimator g†
P
(cid:110)
∃f ∈ A K,+
B,L
: L(f, TzQ) − L(TzQ, TzQ) − (LD(f, TzQ) − LD(TzQ, TzQ))
34
≥ % * (α + β + L(f, TzQ) − L(TzQ, TzQ))
(cid:19)
%2(1 − %)αM
214(1 + %)B4
(cid:18) β%
20B
B,L , D
, A K,+
exp
N1
−
(cid:18)
(cid:111)
,
(cid:19)
,
≤ 14 sup
D
where the inequality follows from |f | ≤ B for all f ∈ A K,+
, and N1 (ε, F , D) denotes the ε-covering
B,L
number of F on D with respect to '1 metric. The supremum is taken with respect to all possible
data D. This provides a high probability upper bound on k (cid:98)f − TzQk2
(cid:101)μ
as
P
(cid:111)
(cid:110)
(1 − %)[L( (cid:98)f , TzQ) − L(TzQ, TzQ)] ≥ % * (α + β) + [LD( (cid:98)f , TzQ) − LD(TzQ, TzQ)]
≤ P
(cid:110)
∃f ∈ A K,+
B,L
: L(f, TzQ) − L(TzQ, TzQ) − (LD(f, TzQ) − LD(TzQ, TzQ))
≥ % * (α + β + L(f, TzQ) − L(TzQ, TzQ))
(cid:111)
.
Further, for the set of all B-bounded, L-Lipschitz K-piece max-affine functions, its covering entropy
is bounded by
log N1
sup
D
(cid:18) β%
20B
(cid:19)
, A K,+
B,L , D
≤ log N∞
(cid:18) β%
20B
(cid:19)
, A K
B,L
≤ (d + 1)K log
(20B + 80dL)B
β%
,
where the first inequality follows from upper bounding '1 covering number with '∞ covering number,
and the second inequality follows from Lemma C.4 with Ld ≤ dL. More specifically, for Lipschitz
constant L and uniform '∞ bound B, the covering entropy of A K
B,L
is bounded through
log N∞(ε, A K
B,L
) ≤ (d + 1)K log B + 4Ld
ε
for any ε ≤ B + 4Ld. For our regression problem, d is the dimension of G. Thus, for any
β ≤ 20BB
(4dL + B), we have
%
P
(cid:111)
(cid:110)
(1 − %)[L( (cid:98)f , TzQ) − L(TzQ, TzQ)] ≥ % * (α + β) + [LD( (cid:98)f , TzQ) − LD(TzQ, TzQ)]
(cid:18)
≤ 14 exp
(d + 1)K log
(20B + 80dL)B
β%
−
%2(1 − %)αM
214(1 + %)B4
(cid:19)
.
Take % = 1
2
and for the estimator (cid:98)f ∈ A K
B,L
that with probability at least
1 − 14 exp
(cid:18)
(d + 1)K log
(40B + 160dL)B
β
−
αM
2568B4
(cid:19)
,
it holds that the estimation error is bounded by
k (cid:98)f − TzQk2
(cid:101)μ
= L( (cid:98)f , TzQ) − L(TzQ, TzQ)
≤ α + β + 2(LD( (cid:98)f , TzQ) − LD(TzQ, TzQ))
= α + β + 2(ED( (cid:98)f , TzQ) + LD(gz(Q; D), TzQ) − LD(TzQ, TzQ))
≤ α + β + 2(cid:15) + 2(LD(gz(Q; D), TzQ) − LD(TzQ, TzQ))
≤ α + β + 2(cid:15) + 2(LD(g†
z
(Q), TzQ) − LD(TzQ, TzQ)),
35
where the second equality is due to ED( (cid:98)f , TzQ) = LD( (cid:98)f , TzQ) − LD(gz(Q; D), TzQ) and the last
inequality is due to the fact that gz(Q; D) is defined to be the LSE that minimizes the empirical risk,
i.e., LD(gz(Q; D), TzQ) ≤ LD(g†
z(Q), TzQ). Consequently, solve for proper α and β to get that if
(B + 4dL)B3
(d + 1)K
1
e2(d+1)Kδ
M log M (cid:38)
,
,
M (cid:38)
then for any d ≥ 2, with probability at least 1 − δ/2
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46)
(d + 1)K
B4
log M
M
+ 2(cid:15) + 2(LD(g†
z
(Q), TzQ) − LD(TzQ, TzQ)).
Following Lemma C.5, under any measure
kg†
z
(Q) − TzQk2
(cid:101)μ ≤ kg‡
z
(cid:101)μ it holds that
(Q) − TzQk2
(cid:101)μ ≤ 722L2
d
(K − 1)−4/d,
where g‡
arg min
Bernstein's inequality, we have
z(Q) := σ(g‡
f ∈A K−1
B,L
z(Q)) is the truncated estimator, where σ denotes ReLU function and g‡
= L(g†
z(Q) :=
z(Q), TzQ)−L(TzQ, TzQ), and following
L(f, TzQ). Note that kg†
z(Q)−TzQk2
(cid:101)μ
|L(g†
z
(Q), TzQ) − L(TzQ, TzQ) − LD(g†
z
(Q), TzQ) + LD(TzQ, TzQ)|
=
(cid:12)
(cid:12)
(cid:12)
L(g†
z
(Q), TzQ) − L(TzQ, TzQ) −
1
n
(cid:88)
[(g†
z
(Q)(s, a) − (TzQ)(s, a))
(s,a,r,s0)∈D
* (g†
z
(cid:12)
(Q)(s, a) + (TzQ)(s, a) − 2r − 2γ((cid:74)Q)(s0))]
(cid:12)
(cid:12)
≤
2B2 log 1
δ
3M
* (g†
z
(cid:115)
+ 2
log 1
δ
M
* Var([(g†
z
(Q)(s, a) − (TzQ)(s, a))
(Q)(s, a) + (TzQ)(s, a) − 2r − 2γ((cid:74)Q)(s0))])1/2.
Since we have |g†
any random variable X, we further simplify the upper bound into
z(Q)(s, a) + (TzQ)(s, a) − 2r − 2γ((cid:74)Q)(s0)| ≤ 2B and Var(X) = E X 2 − (E X)2 for
|L(g†
z
(Q), TzQ) − L(TzQ, TzQ) − LD(g†
(Q), TzQ) + LD(TzQ, TzQ)|
z
(cid:115)
≤
2B2 log 1
δ
3M
+ 4Bkg†
z
(Q) − TzQk
(cid:101)μ
log 1
δ
M
.
It follows that with probability at least 1 − δ/2
LD(g†
z
(Q), TzQ) − LD(TzQ, TzQ) ≤ kg†
z
(Q) − TzQk2
(cid:101)μ
+ 4Bkg†
z
(Q) − TzQk
(cid:101)μ
(cid:115)
log 2
δ
M
+
2B2 log 2
δ
3M
≤ 722L2
d
(K − 1)−4/d + 288BLdK−2/d
(cid:115)
log 2
δ
M
+
2B2 log 2
δ
3M
.
Combine the upper bounds above together, we have with probability at least 1 − δ
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) (d + 1)KB4
log M
M
+ d2L2(K − 1)−4/d + BdLK−2/d
(cid:115)
log 2
δ
M
+
B2 log 2
δ
M
+ (cid:15).
36
Take K = dM d/(d+4)e, then it holds that
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) (d + 1)B4M −4/(d+4) log M + d2L2M −4/(d+4)
(cid:114)
+ BdLM −4/(d+4)
log
+
2
δ
B2 log 2
δ
M
+ (cid:15).
Lemma B.11. Let B := 1/(1 − γ) and L := Lr/(1 − γ). For the MDP with transition kernel Pz,
B,L with K = dM d/(d+4)e at all τ
if the regression of Algorithm 2 finds (cid:15)-approximate LSE in A K
iterations, then the approximation error of (cid:101)Qτ
z under
any measure (cid:101)μ is upper bounded by
D
1 − γ
z with respect to the optimal value function Q?
(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M +
D(cid:15)
1 − γ
z − Q?
zk
(cid:101)μ (cid:46)
k (cid:101)Qτ
√
√
with probability at least 1 − δ for the number of iterations
τ (cid:16) log M 4/(d+4)
√
d2L2
D
/ log
1
γ
for any sample size M = |D| such that
M (cid:38)
1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
,
M
M (cid:38)
τ
exp(2(d + 1)M d/(d+4))δ
,
M
d
d+4 (cid:38) B2
d2L2
2d+4
d+4 log M (cid:38) B3(B + 4dL)
,
d + 1
2τ
δ
log
.
Proof. Combining Lemma B.7 and Lemma B.10, we have with probability at least 1 − δ that the
total approximation error of the output (cid:101)Qτ
(cid:101)μ
z
is upper bounded by
to the optimal value function Q?
z
under any measure
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ ≤
τ
(cid:88)
√
γτ −'
D * k (cid:101)Q'
z − T (cid:101)Q'−1
z k
(cid:101)μ + γτ
1 − γ
'=1
1
1 − γ
(cid:46)
√
(cid:16)
D *
(cid:46)
1
1 − γ
√
(cid:16)
D *
(d + 1)B4M −4/(d+4) log M + d2L2M −4/(d+4)
+ BdLM −4/(d+4)
(cid:114)
log
2τ
δ
+
B2 log 2τ
δ
M
(cid:17)
+ (cid:15)
+ γτ
1 − γ
(d + 1)B4M −4/(d+4) log M + 2d2L2M −4/(d+4)
+ BdLM −4/(d+4)
(cid:114)
log
2τ
δ
(cid:17)
+ (cid:15)
+ γτ
1 − γ
,
τ
exp(2(d+1)M d/(d+4))δ
d+4 log M (cid:38) B3(B+4dL)
. The first inequality follows from
for M (cid:38)
Lemma B.7, the second inequality is due to applying Lemma B.8 such that the upper bound on
(cid:101)μ holds with probability at least 1 − δ/τ for all ' ∈ [τ ], and the last inequality follows
k (cid:101)Q'
from M d/(d+4) ≥ B2
. Take the number of iteration
z − T (cid:101)Q'−1
z k
and M
d+1
2d+4
d2L2 log 2τ
δ
τ =
(cid:38)
log M 4/(d+4)
d2L2
D
√
/ log
(cid:39)
,
1
γ
37
it follows that for M ≥ 1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
, the approximation error
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ (cid:46)
√
D
1 − γ
(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M +
√
D(cid:15)
1 − γ
.
B.6 Proof of FQI With ICNN
In this subsection, we present our theoretical work for the ICNN function family. As a convex
object, ICNN function is robust against outliers and input perturbations (Min et al., 2021a), such
merits have been discussed in related works (Blanchet et al., 2019; Chen et al., 2020; Christmann
and Steinwart, 2007; Pfrommer et al., 2023). We combine Lemma 3.1 and Lemma C.4 to prove
Lemma B.12 and then Lemma B.13. More specifically, Lemma C.4 provides an upper bound on the
covering entropy for L-Lipschitz K-piece max-affine functions, and the covering entropy of such
. We
function set can provide an upper bound on the covering entropy of N K
B,L
note that our argument assumes finding the global minimum of the functions represented by the
ICNN. We do not elaborate on the convergence properties of such neural network functions under
different backpropagation schemes, and they have been discussed in a vast body of literature (Arora
et al., 2019; Chen et al., 2021a, 2018; Du et al., 2019; Schmidt et al., 2011; Song et al., 2021a; Tan
et al., 2022).
B,L ⊆ A K+1
B,L
as N K
Lemma B.12. Let B := 1/(1 − γ) and L := Lr/(1 − γ), and for any mean-field term z, Q ∈ CB,L,
and data DTzQ := {(sm, am, rm, s0
m=1 with (sm, am) ∈ Rd i.i.d. sampled from any measure
)}M
m
B,L, DTzQ; (cid:15)) of TzQ for
(cid:101)μ ∈ ∆G for all m ∈ [M ], we define the (cid:15)-approximate estimator (cid:98)f ∈ LSE(N K
K ∈ Z+. Then for any training set size M := |DTzQ| such that
M (cid:38)
1
e2(d+1)Kδ
,
M
it holds with probability at least 1 − δ
2d+4
d+4 log M (cid:38) B3(B + 4dL)
d + 1
,
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) (d + 1)B4M −4/(d+4) log M + d2L2M −4/(d+4)
(cid:114)
+ BdLM −4/(d+4)
log
+
2
δ
B2 log 2
δ
M
+ (cid:15).
L(f, TzQ) to be the estimator of TzQ in N K
B,L
that
(cid:101)μ for any mean-field term z and value function Q ∈ CB,L. We also
that minimizes the
LD(f, TzQ) to be the LSE of TzQ in N K
B,L
B,L, D; (cid:15)), it follows by definition that ED( (cid:98)f , TzQ) =
f ∈N K
B,L
z(Q) := arg min
Proof. Let us denote g†
minimizes the true risk under
define gz(Q; D) := arg min
empirical risk on D. For any (cid:98)f ∈ LSE(N K
LD( (cid:98)f , TzQ) − LD(gz(Q; D), TzQ) ≤ (cid:15).
Recall that k (cid:98)f − TzQk2
(cid:101)μ
,
α, β > 0 and 0 < % ≤ 1
2
f ∈N K
B,L
= L( (cid:98)f , TzQ) − L(TzQ, TzQ). Following Theorem C.2, it holds that for any
P
(cid:110)
∃f ∈ N K
B,L
: L(f, TzQ) − L(TzQ, TzQ) − (LD(f, TzQ) − LD(TzQ, TzQ))
≥ % * (α + β + L(f, TzQ) − L(TzQ, TzQ))
(cid:111)
,
38
≤ 14 sup
D
N1
(cid:18) β%
20B
(cid:19)
, N K
B,L, D
(cid:18)
−
exp
%2(1 − %)αB4M
214(1 + %)
(cid:19)
,
where the inequality follows from |f | ≤ B + dL = B for all f ∈ N K
, and N1 (ε, F , D) denotes the
B,L
ε-covering number of F on D with respect to '1 metric. The supremum is taken with respect to all
possible data D. This provides a high probability upper bound on k (cid:98)f − TzQk2
(cid:101)μ
as
P
(cid:111)
(cid:110)
(1 − %)[L( (cid:98)f , TzQ) − L(TzQ, TzQ)] ≥ % * (α + β) + [LD( (cid:98)f , TzQ) − LD(TzQ, TzQ)]
≤ P
(cid:110)
∃f ∈ N K
B,L
: L(f, TzQ) − L(g†, TzQ) − (LD(f, TzQ) − LD(g†, TzQ))
≥ % * (α + β + L(f, TzQ) − L(g†, TzQ))
(cid:111)
.
Further, for the set of all functions in N K
B,L
(cid:19)
log N1
sup
D
(cid:18) β%
20B
, N K
B,L, D
, its covering entropy is bounded by
≤ log N∞
(cid:18) β%
20B
(cid:19)
, A K+1
B,L
≤ (d + 1)(K + 1) log
(40B + 80dL)B
β%
,
where the first inequality follows from upper bounding '1 covering number with '∞ covering number
and Lemma 3.1, and the second inequality follows from Lemma C.4 and Ld ≤ dL. More specifically,
for Lipschitz constant L uniform '∞ bound B, the covering entropy of A K+1
is bounded through
B,L
log N∞(ε, A K
B,L
) ≤ (d + 1)(K + 1) log B + 4Ld
ε
for any ε ≤ B + 4Ld. Thus, for any β ≤ 20
%
(4dLr + B)B, we have
P
(cid:111)
(cid:110)
(1 − %)[L( (cid:98)f , TzQ) − L(TzQ, TzQ)] ≥ % * (α + β) + [LD( (cid:98)f , TzQ) − LD(TzQ, TzQ)]
(20B + 80dL)B
β%
%2(1 − %)αB4M
214(1 + %)
(d + 1)(K + 1) log
≤ 14 exp
−
(cid:19)
(cid:18)
.
Take % = 1
2
and for the estimator (cid:98)f ∈ N K
B,L
that with probability at least
1 − 14 exp
(cid:18)
(d + 1)(K + 1) log
(40B + 160dL)B
β
αB4M
2568
(cid:19)
,
−
it holds that the estimation error is bounded by
k (cid:98)f − TzQk2
(cid:101)μ
= L( (cid:98)f , TzQ) − L(TzQ, TzQ)
≤ α + β + 2(LD( (cid:98)f , TzQ) − LD(TzQ, TzQ))
= α + β + 2(ED( (cid:98)f , TzQ) + LD(gz(Q; D), TzQ) − LD(TzQ, TzQ))
≤ α + β + 2(cid:15) + 2(LD(gz(Q; D), TzQ) − LD(TzQ, TzQ))
≤ α + β + 2(cid:15) + 2(LD(g†
z
(Q), TzQ) − LD(TzQ, TzQ)),
where the second equality is due to ED( (cid:98)f , TzQ) = LD( (cid:98)f , TzQ) − LD(gz(Q; D), TzQ) and the last
inequality is due to the fact that gz(Q; D) is defined to be the LSE that minimizes the empirical risk,
i.e., LD(gz(Q; D), TzQ) ≤ LD(g†
z(Q), TzQ). Consequently, solve for proper α and β to get that if
M (cid:38)
1
e2(d+1)Kδ
,
M log M (cid:38) B + 4dL
B3(d + 1)K
,
39
then for any d ≥ 2, with probability at least 1 − δ/2
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) (d + 1)(K + 1)B4
log M
M
+ 2(cid:15) + 2(LD(g†
z
(Q), TzQ) − LD(TzQ, TzQ)).
Following Lemma C.5 and the conclusion that A K,+
(cid:101)μ it holds that
B,L ⊆ N K
B,L
from Lemma 3.1, under any measure
kg†
z
(Q) − TzQk2
(cid:101)μ ≤ kg‡
z
(Q) − TzQk2
(cid:101)μ ≤ 722L2
d
(K − 1)−4/d,
where g‡
arg min
Bernstein's inequality, we have
z(Q) := σ(g‡
f ∈A K−1
B,L
z(Q)) is the truncated estimator, where σ denotes ReLU function and g‡
= L(g†
z(Q) :=
z(Q), TzQ)−L(TzQ, TzQ), and following
L(f, TzQ). Note that kg†
z(Q)−TzQk2
(cid:101)μ
|L(g†
z
(Q), TzQ) − L(TzQ, TzQ) − LD(g†
(Q), TzQ) + LD(TzQ, TzQ)|
z
(cid:115)
≤
2B2 log 1
δ
3M
+ 4Bkg†
z
(Q) − TzQk
(cid:101)μ
log 1
δ
M
.
It follows that with probability at least 1 − δ/2
LD(g†
z
(Q), TzQ) − LD(TzQ, TzQ) ≤ 722d2L2(K − 1)−4/d + 288BdLK−2/d
(cid:115)
log 2
δ
M
+
2B2 log 2
δ
3M
.
Combine the upper bounds above together, we have with probability at least 1 − δ
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46)
(d + 1)(K + 1)
(1 − γ)4
log M
M
+ d2L2(K − 1)−4/d + BdLK−2/d
(cid:115)
log 2
δ
M
+
B2 log 2
δ
M
+ (cid:15).
Take K = dM d/(d+4)e, then it holds that
k (cid:98)f − TzQk2
(cid:101)μ
(cid:46) (d + 1)B4M −4/(d+4) log M + d2L2M −4/(d+4)
(cid:114)
+ BdLM −4/(d+4)
log
+
2
δ
B2 log 2
δ
M
+ (cid:15).
Lemma B.13. Let B := 1/(1 − γ) and L := Lr/(1 − γ). For the MDP induced by any mean-field
B,L with K = dM d/(d+4)e at all τ iterations,
term z, if Algorithm 2 achieves (cid:15)-approximate LSE in N K
then the approximation error of (cid:101)Qτ
z under any measure
(cid:101)μ is upper bounded by
z with respect to the optimal value function Q?
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ (cid:46)
√
D
1 − γ
(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M +
√
D(cid:15)
1 − γ
with probability at least 1 − δ for the number of iterations
τ (cid:16) log M 4/(d+4)
√
d2L2
D
/ log
1
γ
40
for any sample size M = |D| such that
M (cid:38)
1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
,
M
M (cid:38)
τ
exp(2(d + 1)M d/(d+4))δ
,
M
d
d+4 (cid:38) B2
d2L2
2d+4
d+4 log M (cid:38) B3(B + 4dL)
,
d + 1
2τ
δ
log
.
Proof. Combining Lemma B.7 and Lemma B.10, we have with probability at least 1 − δ that the
total approximation error of the output (cid:101)Qτ
(cid:101)μ
z
is upper bounded by
to the optimal value function Q?
z
under any measure
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ ≤
τ
(cid:88)
√
γτ −'
D * k (cid:101)Q'
z − T (cid:101)Q'−1
z k
(cid:101)μ + γτ
1 − γ
'=1
1
1 − γ
(cid:46)
√
(cid:16)
D *
(cid:46)
1
1 − γ
√
(cid:16)
D *
(d + 1)B4M −4/(d+4) log M + d2L2M −4/(d+4)
+ BdLM −4/(d+4)
(cid:114)
log
2τ
δ
+
B2 log 2τ
δ
M
(cid:17)
+ (cid:15)
+ γτ
1 − γ
(d + 1)B4M −4/(d+4) log M + 2d2L2M −4/(d+4)
+ BdLM −4/(d+4)
(cid:114)
log
2τ
δ
(cid:17)
+ (cid:15)
+ γτ
1 − γ
,
τ
exp(2(d+1)M d/(d+4))δ
d+4 log M (cid:38) B3(B+4dL)
for M (cid:38)
. The first inequality follows from
Lemma B.7, the second inequality is due to applying Lemma B.8 such that the upper bound on
(cid:101)μ holds with probability at least 1 − δ/τ for all ' ∈ [τ ], and the last inequality follows
k (cid:101)Q'
from M d/(d+4) ≥ B2
. Take the number of iteration
z − T (cid:101)Q'−1
z k
and M
d+1
2d+4
d2L2 log 2τ
δ
τ =
(cid:38)
log M 4/(d+4)
d2L2
D
√
/ log
(cid:39)
,
1
γ
it follows that for M ≥ 1
δ log 1
γ
log M 4/(d+4)
d2L2
D
√
, the approximation error
k (cid:101)Qτ
z − Q?
zk
(cid:101)μ (cid:46)
√
D
1 − γ
(cid:0)(d + 1)B4 + (B + dL)dL(cid:1) M − 4
d+4 log M +
√
D(cid:15)
1 − γ
.
B.7 Proof of Lemma 3.1
Lemma 3.1 shows the existence of a set N K
of ICNNs that covers the set of all non-negative
B,L
L-Lipschitz K-piece max-affine functions bounded by B with a convex parameter set. Under such
parameter set, we show that N K
is equivalent to the set of all truncated L-Lipschitz K-piece
B,L
max-affine functions bounded by B, which is a subset of all positive L-Lipschitz (K + 1)-piece
max-affine functions bounded by B.
Proof. The proof is based on the construction of a K-layer ICNN similar to that in Chen et al.
(2018, Theorem 1), where they showed that any K-piece max-affine function can be represented
41
exactly by a K-layer ICNN. However, Chen et al. (2018) did not provide a parameter set for the
neural network such that the K-layer ICNN is able to represent non-negative L-Lipschitz functions
bounded by B exclusively, which is what we are going to show in this proof.
is a set of K-layer ICNNs with input dimension 2d and all hidden layer dimension 1.
Especially, N K
B,L
(cid:124)
For any input x ∈ X and L-Lipschitz K-max-affine function fK(x) = max{α
Kx + cK}
that maps from X to [0, B], the corresponding input vector for the network representation of
(cid:124)](cid:124). More specifically, we have all layers yi of the network
fK in N K
B,L
representation of fK defined as
is given by x‡ := [x
(cid:124)
1x + c1, . . . , α
, −x
(cid:124)
yi = σ(yi−1 + (αi − αi+1)(cid:124)
+x − (αi+1 − αi)(cid:124)
+x + (ci − ci+1))
for all i = 2, . . . , K − 1 and
y1 = σ((α1 − α2)(cid:124)
+x − (α2 − α1)(cid:124)
+x + (c1 − c2)),
+x + cK).
+x − (−αK)(cid:124)
yK = σ(yK−1 + (αK)(cid:124)
= 0 and W (y)
Notice that we have W (y)
and βi = ci+1 − ci+2 for all i = 0, . . . , K − 2. Further, we have for all i = 0, . . . , K − 2
= 1 fixed for all i ∈ [K − 1]; the shifting terms βK−1 = cK
0
i
W (x)
i
+, (−αK)(cid:124)
+
= [(αK)(cid:124)
= [(αi+1 − αi+2)(cid:124)
](cid:124)
∈ R2d
+
+, (αi+2 − αi+1)(cid:124)
+
](cid:124)
∈ R2d
+
, such that W (x)
(cid:124)
x‡ = (αi+1 − αi+2)(cid:124)
i
i k∞ = kαi+1 − αi+2k∞ for all i = 0, . . . , K − 2 as well as W (x)
K−1k∞ = kαKk∞.
K−1
and W (x)
K−1
and kW (x)
and kW (x)
+x − (αi+2 − αi+1)(cid:124)
+x − (−αK)(cid:124)
x‡ = (αK)(cid:124)
+x
+x
(cid:124)
On the other hand, for any set of parameters {(W (x)
i = 0, . . . , K − 1, we deem W (x)
any input x‡, we have
(cid:124)
i,1, w
= [w
(cid:124)
i,2
i
and βi ∈ R for all
](cid:124) as concatenations of vectors wi,1, wi,2 ∈ Rd , then for
i ∈ R2d
+
, βi)}K−1
i=0
with W (x)
i
hW (x)
i
, x‡i = w
(cid:124)
i,1x − w
(cid:124)
i,2x.
(cid:124)
Further notice that for a concise representation wi := wi,1 − wi,2, we have w
, x‡i.
such that we have αK = wK−1 and αi = wi−1 + αi+1 for all
There exists a set of vectors {αi}K
i=1
such that cK = βK−1 and ci = βi−1 + ci+1
i ∈ [K − 1]; similarly, there exists a set of scalars {ci}K
i=1
for all i ∈ [K − 1]. Solve the system of equations to get αi = (cid:80)K−1
j=i−1 βj
for all i ∈ [K], and the ICNN with parameterization {(W (x)
represents function fK :=
Kx + cK}). Under the convex constraint set k (cid:80)K−1
σ(max{α
j=i−1 wjk∞ ≤ L, it holds
that the represented max-affine function fK is L-Lipschitz. Moreover, the represented max-affine
(cid:124)
i x + ci for
function fK is upper bounded by B on X if and only if the composing affine functions α
(cid:124)
all i ∈ [K] are upper bounded; this is due to fK ≥ α
i x + ci for all i ∈ [K] by definition. It requires
that α
(cid:124)
i x + ci ≤ B for all i ∈ [K] and x ∈ X, which can be equivalently written as
j=i−1 wj and ci = (cid:80)K−1
(cid:124)
1x + c1, . . . , α
, βi)}K−1
i=0
i x = hW (x)
(cid:124)
i
i
max
x∈X
K−1
(cid:88)
w
(cid:124)
j x +
K−1
(cid:88)
j=i−1
j=i−1
βj ≤ B.
(cid:124)
Note that for any α1, α2 ∈ Rd, it holds that maxx∈X(α
2x, and
the boundedness requirement forms a convex constraint set following the convexity of X. It is not
hard to see that under the convex constraint set described by all the aforementioned conditions,
the set N K
ICNN represents only the truncated K-max-affine functions that are L-Lipschitz and
B,L
upper bounded by B.
(cid:124)
2x) ≤ maxx∈X α
(cid:124)
1x + maxx∈X α
(cid:124)
1x + α
42
C Supporting Lemmata
Lemma C.1. Let f : (cid:70) → R ∩ {∞} be a differentiable ζ-strongly convex function with respect to a
norm k * k, where (cid:70) is the set of all measurable functions on A ⊆ Rdw . Let the effective domain of f
be S = {x ∈ (cid:70) : f (x) ∈ R} and f ? be the Fenchel conjugate of f . Then, we have
1. f ? is differentiable on (cid:70);
2. ∇f ?(y) = arg maxx∈S{hx, yi − f (x)};
3. f ? is 1
ζ -smooth with respect to the dual norm k * k∗. That is, for all y1, y2 ∈ (cid:70), we have
k∇f ?(y) − ∇f ?(y0)k ≤
1
ζ
ky − y0k∗.
Proof. This lemma is adopted from Shalev-Shwartz and Singer (2007), and we provide a brief
proof here for completeness. Suppose we assume there exist x, x0 ∈ S such that x ∈ ∂f ∗(y) and
x0 ∈ ∂f ∗(y) for any y ∈ S. For any x ∈ ∂f ∗(y), it holds
for any g ∈ S. Rearrange the terms to get Since (f ∗)∗ = f and the fact that for any y0
f ∗(g) ≥ f ∗(y) + hy, g − xi
f ∗(y0) = sup
g∈S
{hg, y0i − f (g)}
≥ hx, y0i − f (x)
= f ∗(y) + hx, y0 − yi,
we conclude that y ∈ ∂f (x) and y ∈ ∂f (x0). Since f is ζ-strongly convex function, then for any
ζ hx − x0, y − y0i. Following Holder's
x, x0 ∈ (cid:70) and y ∈ ∂f (x), y0 ∈ ∂f (x0), we have kx − x0k2 ≤ 1
inequality, we conclude that
k∇f ?(y) − ∇f ?(y0)k ≤
1
ζ
ky − y0k∗.
i=1 generated from distribution (X, Y ) ∼ D such
Theorem C.2. We assume a data set {(Xi, Yi)}n
that there exists B > 1 and |Y | ≤ B almost surely. We further define m(x) := E[Y | X = x]. Let F
be a set of functions f : Rd → R and let |f (x)| ≤ B. Then, it holds for each n ≥ 1 that
(cid:110)
∃f ∈ F : E |f (X) − Y |2 − E |m(X) − Y |2 −
P
1
n
n
(cid:88)
i=1
≥ % * (α + β + E |f (X) − Y |2 − E |m(X) − Y |2)
(cid:18)
(cid:19)
(cid:19)
, F , xn
1
exp
−
%2(1 − %)αn
214(1 + %)B4
,
≤ 14 sup
xn
1
N1
(cid:18) β%
20B
(cid:111)
{|f (Xi) − Yi|2 − |m(Xi) − Yi|2}
where xn
1
:= (x1, . . . , xw) denotes n fixed points in Rd, α, β > 0, and 0 < % ≤ 1/2.
Proof. This is Gy ̈orfi et al. (2002, Theorem 11.4).
43
Lemma C.3. Define the class of uniformly B-bounded, subdifferentiable, and uniformly L-Lipschitz
functions on X ⊆ Rd as
CX,B,L := {f : X → R | f is convex, kf k∞ ≤ B, ∀x ∈ X : ∂f (x) 6= ∅, ∀g ∈ ∂f (x) : kgk∞ ≤ L} .
:= max{8Ld, 2B + 4Ld} where Ld := dL diam(X), then for all ε ∈ (0, 80Ld], the covering
Let R∗
d
entropy of CX,B,L is bounded by
log N∞(ε, CX,B,L) ≤ 2(d + 1)
(cid:19)d/2
(cid:18) 80Ld
ε
ln
(cid:18) 10R∗
d
ε
(cid:19)
.
Proof. This is Bal ́azs et al. (2015, Lemma 4.3).
Lemma C.4. For any K ∈ Z+, define the class of uniformly B-bounded and L-Lipschitz K-piece
max-affine functions on X ⊆ Rd as
A K
X,B,L
:= {h : X → R | h(x) = max
k∈[K]
α
(cid:124)
kx + ck, kαkk∞ ≤ L, h(x) ∈ [−Bd, B]}
where Bd := B + dL diam(X). Then for any Rd := 2B + 4Ld with Ld := dL diam(X) and any
ε ∈ (0, Rd],
log N∞(ε, A K
X,B,L
) ≤ (d + 1)K log Rd
ε
.
Proof. This is Bal ́azs et al. (2015, Lemma 4.2).
Lemma C.5. For all B-bounded and L-Lipschitz convex function f ∈ CX,B,L on X ⊆ Rd and any
K ∈ Z+, it holds that the best approximation h of f in the set of A K
X,B,L satisfies
inf
h∈A K
X,B,L
kf − hk∞ ≤ 72LdK−2/d,
where Ld := dL diam(X).
Proof. This is Bal ́azs et al. (2015, Lemma 4.1).
44
|
|
http://arxiv.org/abs/2302.12749v1 | 2023-02-24T17:03:51 | 2023-02-24T17:03:51 | SurvivalGAN: Generating Time-to-Event Data for Survival Analysis | Synthetic data is becoming an increasingly promising technology, and
successful applications can improve privacy, fairness, and data
democratization. While there are many methods for generating synthetic tabular
data, the task remains non-trivial and unexplored for specific scenarios. One
such scenario is survival data. Here, the key difficulty is censoring: for some
instances, we are not aware of the time of event, or if one even occurred.
Imbalances in censoring and time horizons cause generative models to experience
three new failure modes specific to survival analysis: (1) generating too few
at-risk members; (2) generating too many at-risk members; and (3) censoring too
early. We formalize these failure modes and provide three new generative
metrics to quantify them. Following this, we propose SurvivalGAN, a generative
model that handles survival data firstly by addressing the imbalance in the
censoring and event horizons, and secondly by using a dedicated mechanism for
approximating time-to-event/censoring. We evaluate this method via extensive
experiments on medical datasets. SurvivalGAN outperforms multiple baselines at
generating survival data, and in particular addresses the failure modes as
measured by the new metrics, in addition to improving downstream performance of
survival models trained on the synthetic data. | [
"Alexander Norcliffe",
"Bogdan Cebere",
"Fergus Imrie",
"Pietro Lio",
"Mihaela van der Schaar"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12749v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12749v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | 3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
9
4
7
2
1
.
2
0
3
2
:
v
i
X
r
a
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Alexander Norcliffe*
University of Cambridge
[email protected]
Bogdan Cebere*
University of Cambridge
[email protected]
Fergus Imrie
University of California, Los Angeles
[email protected]
Pietro Liò
University of Cambridge
[email protected]
Mihaela van der Schaar
University of Cambridge
Alan Turing Institute
[email protected]
Abstract
1
INTRODUCTION
Synthetic data is becoming an increasingly
promising technology, and successful applications
can improve privacy, fairness, and data democra-
tization. While there are many methods for gen-
erating synthetic tabular data, the task remains
non-trivial and unexplored for specific scenarios.
One such scenario is survival data. Here, the key
difficulty is censoring: for some instances, we
are not aware of the time of event, or if one even
occurred. Imbalances in censoring and time hori-
zons cause generative models to experience three
new failure modes specific to survival analysis:
(1) generating too few at-risk members; (2) gener-
ating too many at-risk members; and (3) censor-
ing too early. We formalize these failure modes
and provide three new generative metrics to quan-
tify them. Following this, we propose Survival-
GAN, a generative model that handles survival
data firstly by addressing the imbalance in the cen-
soring and event horizons, and secondly by using
a dedicated mechanism for approximating time-
to-event/censoring. We evaluate this method via
extensive experiments on medical datasets. Sur-
vivalGAN outperforms multiple baselines at gen-
erating survival data, and in particular addresses
the failure modes as measured by the new metrics,
in addition to improving downstream performance
of survival models trained on the synthetic data.
* Equal Contribution.
Proceedings of the 26th International Conference on Artificial Intel-
ligence and Statistics (AISTATS) 2023, Valencia, Spain. PMLR:
Volume 206. Copyright 2023 by the author(s).
Deep learning has seen incredible success in recent years,
yet generally deep models still require large amounts of
high-quality data to train well. Data collection is expensive,
and often privacy constraints limit how much data can ac-
tually be used or shared (De Capitani Di Vimercati et al.,
2012; Jain et al., 2016). Synthetic data generation is a pop-
ular solution that aims to create new data that mirrors the
statistical properties of the original dataset, tackling the need
for privacy and more data in parallel (Jordon et al., 2022).
Synthetic data has significant promise, with the potential to
improve: (1) fairness & bias by generating data from under-
represented groups (van Breugel et al., 2021); (2) robustness
by augmenting an original dataset (Perez and Wang, 2017);
(3) privacy by not using identifiable data to train a supervised
model (Zhang et al., 2017; Jordon et al., 2018; Yoon et al.,
2020), and (4) data democracy by allowing researchers with
fewer resources to access inexpensive data (Benedetti et al.,
2020; Wang et al., 2021). As a result, significant attention
has been placed on developing generative models (Prakash
et al., 2019; Tobin et al., 2017). Prominent examples can be
found across many domains such as images (Karras et al.,
2019; Hinterstoisser et al., 2019), audio (Oord et al., 2016),
and medicine (Chen et al., 2021; Singh and Mukhopadhyay,
2011). One area that remains vastly unexplored is survival
data.
Survival analysis seeks to answer the question: given some
measurements at a fixed point in time, how long will it take
until a specific event occurs? In engineering for example,
given a machine's current condition when do we expect
there to be mechanical failure (de Cos Juez et al., 2010), or
in finance if a company's stock price is at a certain value
how long will it be before they declare bankruptcy. Survival
models are incredibly impactful; for instance in medicine
(Lee and Go, 1997; Arsene and Lisboa, 2007) they can be
used to estimate how long a patient is expected to survive
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
with a given disease such as Covid-19 (Kaso et al., 2022;
Lu et al., 2021; Salinas-Escudero et al., 2020; Ali et al.,
2022). They can also be used in clinical trials (Singh and
Mukhopadhyay, 2011) to investigate how long it may be
before a death, relapse, or adverse reaction. Further applica-
tion areas include economics (Danacica and Babucea, 2010;
LeClere, 2005) and sociology (Kent, 2010; Gross et al.,
2014). Given these models' impact, we wish to generate the
highest quality synthetic data for survival analysis.
Naively, generating synthetic data for survival analysis
seems straightforward. However, there are two significant
obstacles: tabular data and censored data. The tabular setup
is notably more complex than image or text data where
generative models have typically been applied (Xu et al.,
2019). This is due to the mixture of categorical and continu-
ous features and their joint distributions. On top of tabular
complexity, in most cases survival data is not completely
observed: we may not know when an event occurred – if at
all. This data is said to be "censored". For instance in a drug
trial, if the event is being cured of a disease and a subject
withdraws from the trial, we will not know when, or even
if, they were cured. As a result, the subject is censored at
the point of withdrawal. In spite of missing the time of the
event (if indeed an event occurred), censored data still con-
tains information, we know that the event has not occurred
before the time of censoring. Further, censored data is often
more abundant than non-censored, hence, a good generative
model will incorporate this data and the imbalance, despite
the missing event.
Contributions.
In this work we present a synthetic gen-
eration framework for efficiently handling censored tabular
survival data. Our contributions are three-fold:
1. We formalize the synthetic data generation problem for
survival analysis, identify three failure modes unique to
the survival setting, and introduce three metrics to quan-
titatively evaluate these failures and provide a clearer
understanding of the synthetic data's utility (Sections 3
& 4).
2. We propose SurvivalGAN, a method that is able to effi-
ciently incorporate censored data, tabular data, and cen-
soring & time-horizon imbalance to generate synthetic
data to train survival models (Section 5).
3. We investigate SurvivalGAN via extensive experiments
on five medical datasets. We demonstrate its ability to
generate high-quality synthetic data relative to five robust
benchmarks, as measured by established generative met-
rics, the new survival specific metrics, and downstream
model performance (Section 6).
2 RELATED WORK
Generative Models. Generative models come in various
flavors. Classically, Bayesian networks represent a high di-
mensional distribution with a directed acyclic graph to com-
pactly give the dependency structure (Niedermayer, 2008).
These can often be slow to sample from, requiring methods
such as Markov Chain Monte-Carlo. More recent gener-
ative models include Variational Auto-Encoders (Kingma
and Welling, 2013; Vahdat and Kautz, 2020), Generative
Adversarial Networks (Goodfellow et al., 2014) and Nor-
malizing Flows (Rezende and Mohamed, 2015; Kingma and
Dhariwal, 2018). Exact training techniques and architec-
tures differ, but typically modern models use deep networks
to learn a mapping from an easy-to-sample latent space
(such as Gaussian noise) to the data distribution, leading
to fast sampling. The exception is diffusion-based models
(Song and Ermon, 2019; Ho et al., 2020; Ramesh et al.,
2022) which learn a reverse diffusion process in observation
space to take noisy points to regions of higher probability
via a series of (possibly many) function evaluations.
In their standard implementations, these methods are not
well suited to tabular data, due to the mixture of continu-
ous and categorical variables. Variants have been proposed
that are designed to work in the tabular domain. Tabular
GAN (Xu and Veeramachaneni, 2018) works on tabular
data and CTGAN (Xu et al., 2019) is a GAN designed to
work specifically with tabular data that mixes categorical
and continuous variables. This is achieved with a tabular
encoding and training by sampling. TabFairGAN (Rajabi
and Garibay, 2022) extends this to include a fairness con-
straint generating accurate and fair data. Tabular variants
of other models also exist, such as TVAE (Xu et al., 2019),
RTVAE (Akrami et al., 2022), and GOGGLE (Liu et al.,
2023), which adapt VAEs, while Vahdat et al. (2021) adapt
score-based models to generate tabular data by running the
diffusion in latent space. These principled methods are well
suited to tabular data, however, survival data contains the
added difficulty of censored data which these models are
not able to handle.
Survival Data. Few models exist to generate synthetic
survival data. Existing survival models learn to sample from
the conditional distribution of event time given the initial
state (known as the covariates), for example Bender et al.
(2005) and Austin (2012) present statistical models that
transform samples from a uniform distribution to survival
times by inverting the cumulative hazard function, condi-
tioned on the covariates. Sampling from p(t|x) is a proba-
bilistic survival model and does not generate the covariates,
which we desire to make a full synthetic dataset. More mod-
ern techniques incorporate deep learning in the generative
process. Ranganath et al. (2016) use deep exponential fami-
lies to generate survival data, limiting the flexibility of the
learnt distribution. Miscouridou et al. (2018) and Zhou et al.
(2022) relax this assumption but still generate survival times
and censoring statuses conditioned on covariates, rather than
generating covariates and times. None of these models are
able to generate survival data that considers censoring and
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
still generates covariates with high fidelity.
3 PROBLEM FORMULATION AND
BACKGROUND
3.1 Generating Synthetic Survival Data
j }M
Synthetic data generation is concerned with creating new
data points that resemble but are not identical to real data.
Given a dataset of N training observations, D = {zi}N
i=1
drawn from an unknown distribution zi ∼ pz, the task is
to generate M new observations DSyn = {zSyn
j=1 that
appear to have been sampled from the same distribution. In-
stances from survival data are of the form zi = (xi, ti, Ei).
Here, x ∈ X are m-dimensional tabular covariates giving a
subject's state at an initial time, containing continuous and
categorical features. ti ∈ T is the time of a given event, usu-
ally the initial time is 0 such that T = R≥0 . Finally, E ∈ E
is the event indicator, typically E = {0, 1}, where E = 0
means the individual is censored at t, and E = 1 means
the event of interest occurred at t. In this exposition we
consider a single event, but this can be naturally extended
to competing events by extending E to include new discrete
events.
3.2 Survival Analysis
Here we give a brief summary of classical survival analysis1
relevant to this work. This is meant as a way to introduce
key terms from survival analysis that we will use throughout
the paper; for a thorough introduction see Jenkins (2005)
and Machin et al. (2006).
Survival function. We can conduct survival analysis with
the probability density function p(t|x), giving the likelihood
that the event of interest happens at time t given covariate x.
With this, the survival function is defined as the probability
that the event has not occurred by time t,
S(t|x) =
(cid:90) ∞
t
p(t(cid:48)|x)dt(cid:48).
(1)
Equation (1) gives us the proportion of the subjects with
covariate x that have survived up to point t. When the
initial time is zero, the event cannot happen before t = 0, so
S(0|x) = 1, and p(t|x) is a valid probability distribution
(non-negative) so S(t|x) is a decreasing function.
Time-to-event approximation. This is the task of approxi-
mating the expected lifetime for any x. By definition this
is given by μ(x) = (cid:82) ∞
t(cid:48)p(t(cid:48)|x)dt(cid:48). Via integration by
parts, this is equal to the area under the survival curve
μ(x) = (cid:82) ∞
0 S(t|x)dt. The above properties can be calcu-
lated at a population level by marginalizing out x. Survival
0
1Predicting the time of event given a covariate, not generating
survival data itself.
models usually fall into one of these two categories, i.e.
(1) estimate the survival function, or (2) estimate the time-
to-event. The first category is well-studied, with solutions
ranging from linear models (Cox, 1972) to random forests
(Ishwaran et al., 2008) to gradient boosting (Barnwal et al.,
2022). The second category can be derived from the sur-
vival probabilities, but has also been studied independently
using neural networks (Lee et al., 2018; Chapfuwa et al.,
2018). Finally, it is possible to combine approaches from
both categories via ensembling methods (Imrie et al., 2022).
3.3 Challenges of Generating Survival Data
Tabular Data. Handling tabular data is non-trivial for
most generative models. Some of the reasons are the mixed
feature types (categorical or continuous), non-Gaussian dis-
tribution of the features, or highly imbalanced categorical
features (Xu et al., 2019).
Time and Censoring Failure Modes. We are attempting
to generate data from the full distribution p(x, t, E); gener-
ating covariates x is subject to the traditional failure modes
of generative modeling. However, modeling the marginal
distribution of the time and event pair p(t, E) is specific to
survival analysis and introduces three new failure modes,
driven by two key dataset imbalances:
1. Censoring imbalance: There is often an imbalance in
the amount of censoring. By not incorporating this bal-
ance, a model could generate unusable data, for example
consisting of too many censored records. This makes
a model over-optimistic because the event in question
occurs less frequently than expected and the model pre-
dicts too high an expected lifetime; this is the first failure
mode. On the other hand, by not generating enough cen-
sored data, the predicted lifetime could become too low,
resulting in the model being over-pessimistic; this is the
second failure mode.
2. Time imbalance: It is also possible for datasets to have
a time-horizons imbalance. Where the majority of events
are early, t is early regardless of E. A model is at risk
of learning this imbalance and making events too early.
We don't want to focus only on short-term examples we
want to have a broad view of the timeline. Such a model
is short-sighted; this is the third failure mode.
We illustrate these failure modes in Figure 1. These show
the Kaplan-Meier (KM) curves (Kaplan and Meier, 1958),
which plot an approximation of the survival function at a
given time. For a finite sample size, the KM curves show the
proportion of the subjects that have made it to time t without
the event happening. We assume the sample size is large
enough, such that the curve approaches the true survival
function. To quantify these failure modes we introduce
three metrics in the next section.
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
(a) Over-optimism. The area under the syn-
thetic curve is larger than the true curve, the
model is over-optimistic.
(b) Over-pessimism. The area under the syn-
thetic curve is lower than the true curve, the
model is over-pessimistic.
(c) Short-sightedness. The synthetic curve
ends noticeably earlier than the true curve,
the model is short-sighted.
Figure 1: The three possible failure modes specific to survival data, illustrated with Kaplan-Meier plots.
4 ASSESSING SYNTHETIC SURVIVAL
DATA
Various metrics exist to evaluate the similarity between syn-
thetic data and real data. For example, Maximum Mean
Discrepancy (Sutherland et al., 2017), Inception Score (Sal-
imans et al., 2016), and Fréchet Inception Distance (Heusel
et al., 2017) are used to evaluate sample quality. However,
representing the performance of a synthetic dataset with
one metric is prone to over-simplifying the situation. In
Alaa et al. (2022), three further model-independent metrics
are proposed to overcome this, α-Precision β-Recall and
Authenticity. These are designed to evaluate sample quality,
diversity, and similarity to real data, respectively. Impor-
tantly, none of these metrics are designed for survival data
and are unable to capture the failure modes that originate
from censoring imbalance and time imbalance.
We introduce three new metrics specific to evaluating syn-
thetic survival data, targeting the failure modes in mod-
eling the marginal distribution of p(t, E). We have seen
that as well as traditional generative failure modes (e.g.
mode collapse or low sample quality), survival data presents
three new ones: over-optimism, over-pessimism, and short-
sightedness. We quantify these phenomena by looking at
the differences in survival probabilities. Survival curves
have been used to quantify the performance of predictive
survival models but have not been used to evaluate synthetic
survival data.
Optimism. The total area under the Kaplan-Meier plot
gives us the expected lifetime of the population μ =
(cid:82) ∞
0 S(t)dt. We call the model over-optimistic if μSyn >
μReal, and over-pessimistic for the reverse. Therefore we
are interested in the quantity μSyn − μReal. The KM plots
are only available in a finite interval, after which censoring
is present. This can make the expected lifetime diverge
if the survival function has not reached zero by this point.
Instead, we consider the plots up to the latest available time
T . If the synthetic KM plot ends before the real one (due
to short-sightedness), it is extrapolated assuming a constant
rate of events. This gives the definition of optimism
Optimism =
1
T
(cid:90) T
0
(cid:0)SSyn(t) − SReal(t)(cid:1)dt.
(2)
This is the mean difference between the two Kaplan-Meier
plots, and can also be viewed as a scaled difference in their
areas. This metric takes values between -1 and 1, with
0 predicting the exact same expected lifetime, not over-
optimistic or over-pessimistic. Positive values represent a
synthetic expected lifetime higher than the true one, making
the data over-optimistic and vice versa.
Short-Sightedness. Models trained on synthetic data may
not be able to predict past a certain time horizon, meaning
that the synthetic data is censored from that point. To quan-
tify this using the KM plots, we consider the two end times
TSyn and TReal and take their relative difference:
Short-Sightedness =
TReal − TSyn
TReal
.
(3)
This quantifies the relative amount that the time horizons
in the generated data stop before the real data. This met-
ric takes values between 0 and 1, with 0 giving no short-
sightedness and 1 giving full short-sightedness.
This metric can be generalized to also measure long-
sightedness, where the predicted times are larger than the
Instead of dividing by TReal, we divide by
true times.
max(TReal, TSyn), giving a value between -1 and 1, 0 be-
ing perfect, 1 being maximally short-sighted and -1 being
maximally long-sighted. We observed that this does not
happen in practice and therefore use the simpler definition
in Equation (3).
Kaplan-Meier Divergence.
It is possible to have scores
of zero for both optimism and short-sightedness but still
have non-matching Kaplan-Meier curves. Therefore we
0100020003000400050006000Days0.750.800.850.900.951.00Event ProbabilityReal dataSynthetic data01000200030004000500060000.00.20.40.60.81.0020004000600080000.00.20.40.60.81.0Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
finally include the mean absolute difference between the
curves, which we call the Kaplan-Meier divergence (KM
Divergence),
KM Divergence =
1
T
(cid:90) T
0
(cid:12)SSyn(t) − SReal(t)(cid:12)
(cid:12)
(cid:12)dt.
(4)
This will be between 0 and 1 (because S(t) is always be-
tween 0 and 1), with 0 when the curves match perfectly, and
1 when they have the maximum difference possible at all
times. In Appendix B, we demonstrate the need for all three
metrics, showing they target different ways the KM curves
can differ; with optimism and short-sightedness having an
interpretable meaning. We also show that it is possible to
bound the optimism by the total-variation divergence of the
underlying probability density functions.
Other Metrics. Besides measuring the quality of p(t, E)
using these new metrics, we can measure the quality of
the covariate marginal distribution p(x) using a standard
generative metric of choice. To measure the quality of
the full distribution p(x, t, E), we evaluate the downstream
performance of models trained with synthetic data compared
to those trained with real data.
5 OUR MODEL - SURVIVALGAN
Below we describe our solution – SurvivalGAN – in depth.
A block diagram is given in Figure 2. Briefly, to generate
synthetic data, a condition vector C and event E are given
by the user. The condition is a one-hot vector with both inter-
pretable features (sex for example) and latent encodings (see
full description below) and the event indicates censoring or
true event (0 or 1). These can either be sampled according to
the training data frequencies (C, E ∼ pC,E) or by manually
selecting them. A conditional GAN is used to generate a
covariate x ∼ px|C,E. Finally, a survival function and time-
to-event/censoring regressor are used together to generate
the time t ∼ pt|x,E. One key insight is that the method
assumes that censoring occurs independently and at random,
and given some new covariates and a censoring status, a
separate model determines the time of event/censoring. This
allows us to follow a similar censoring ratio as the training
dataset, without risking censoring all the synthetic instances.
5.1 Model and Training
Conditional GAN. The conditional GAN (part 1 of Fig-
ure 2), allows us to sample x ∼ px|C,E, where C is a user
determined condition that the generator takes as input. We
start by training a tabular encoder. This is critical as: (1) it
allows us to handle censoring and time imbalance (as well as
imbalance in the covariates) during training and generation
and (2) it enables us to handle continuous and categorical
variables; these were the key difficulties specific to survival
data as described in Section 3.3. We follow the approach by
Xu et al. (2019). For each continuous feature, a Gaussian
Mixture Model (GMM) (Reynolds, 2009) with NC com-
ponents is trained. The tabular encoder for that feature is
then given by Encoder : R −→ {0, 1}NC × R, where the first
part of the output is a one-hot encoding telling us which
component of the GMM the feature belongs to, and the
second part is the number of standard deviations away from
that component's mean (x − μ)/σ. Note that the inverse
of this encoding is trivial and does not need to be learnt
since we include the one hot encoding of which mode the
feature is in, and we know μ and σ for that mode. For cate-
gorical features, the encoding is simply a one-hot encoding
of the feature. Following this we also define a class en-
coder, ClassEncoder : R −→ {0, 1}NC , which simply takes
the one-hot vector from the tabular encoding, saying which
GMM component the feature belongs to without the loca-
tion within that component. This allows us to represent a
condition, C, for the generator. For extensive information
on the tabular encoding see Reynolds (2009).
Once the tabular encoder has been trained, we train the
GAN, which consists of generator Gθg and discrimina-
tor Dθd . For a given sample (x, t, E) from the training
dataset, the covariate is encoded first, xe = Encoder(x).
Following this, the condition is encoded from the input
C = ClassEncoder(x, t, E). We then sample (cid:15) ∼ U[0,1]
and z ∼ N (0, I) and train with the Wasserstein GAN losses
with gradient penalty:
̃xe = (cid:15)xe + (1 − (cid:15))Gθg (C, z)
LG = −Dθd (C, Gθg (C, z))
LD = Dθd (C, Gθg (C, z)) − Dθd (C, xe)
+ λ((cid:107)∇ ̃xe Dθd (C, ̃xe)(cid:107)2 − 1)2,
where λ is the gradient penalty. We found that using the
Wasserstein GAN with gradient penalty and the tabular en-
coder made training more stable.
Survival Function. The survival function (part 2 of Fig-
ure 2), is used with a time regressor (see next model com-
ponent) to sample from pt|x,E. The survival function
S : X × T −→ [0, 1] is a decreasing function predicting
the survival probability at a given time horizon for given
covariates x. This is used in the generation process to
create a set of survival probabilities at NH time horizons
{S(x, ti)}NH
i=1. In practice, we use 100 evenly spread times
between the minimum and maximum horizons in the train-
ing data. Any survival model can be used in this setup, thus
the training is general. We use DeepHit (Lee et al., 2018)
because, beyond strong predictive performance, it can be
extended to competing risks, making it a flexible solution
for future extensions. DeepHit uses a custom loss function
consisting of two terms, one for log-likelihood of the joint
distribution of t and E, and one incorporating cause-specific
losses. We refer the reader to Lee et al. (2018) for more
detail.
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Figure 2: Block diagram of SurvivalGAN's components, their interaction, and the generation process. Both the specific survival function
and time regressor may be chosen, hence the generic training for those components. Arrows pointing to the parentheses around vectors
imply the whole vector is the input/output of a function. Arrows pointing to specific vector components only use those.
Time Regressor. The time regressor (part 3 of Figure 2)
is trained after the survival function as it relies on using a
trained survival model. It is used with the survival function
to sample from pt|x,E. The time regressor is a function
T : X × [0, 1]NH × E −→ T , which takes as input a covariate,
event type and NH outputs of the survival function. The
function then predicts the time that the event or censoring
happens such that T (x, S(x, t1), S(x, t2), ..., S(x, tNH ), 0)
gives the time to censoring for a given covariate, and
T (x, S(x, t1), S(x, t2), ..., S(x, tNH ), 1) is the time to
event for a given covariate. Any time regressor may be
used, hence the training is general. We use XGBoost (Chen
and Guestrin, 2016), with the mean squared error of log(t)
as the loss.
5.2 Generation
Generation from the model is shown in part 4 of Fig-
ure 2. First, a one-hot condition vector C and type of
event E are provided by the user. The user can choose
these, allowing us to sample underrepresented groups within
the covariates, and target specific edge cases when creat-
ing a synthetic dataset if desired. Alternatively, and the
method we opt for in our empirical evaluation, one can sam-
ple conditions from a categorical distribution constructed
from training data frequencies, which we call the Imbal-
anced Sampler. The generator uses this condition vector
to produce an encoded covariate xe = Gθg (C, z), where
z ∼ N (0, I). This is deterministically inverted to produce
the covariate x = Encoder−1(xe). Finally, this is used
in the survival function with predefined time horizons and
the time regressor to generate the time of event/censoring
t = T (x, S(x, t1), S(x, t2), ..., S(x, tNH ), E).
Necessity of Components. To demonstrate that all com-
ponents of SurvivalGAN are necessary, we carry out an
ablation study in Section 6.3 individually testing each mod-
ule. Table 3 demonstrates that all are crucial for the quality
of the synthetic survival data.
6 EXPERIMENTS
To assess the quality of SurvivalGAN, we evaluate the fol-
lowing aspects:
1. Quality of Marginals: Section 6.1 analyses how closely
the distribution of synthetic samples matches the origi-
nal from two perspectives: (1) the marginal distribution
of covariates p(x). This is done using Jensen-Shannon
distance and Wasserstein distance between real and syn-
thetic covariates. We do not necessarily expect Survival-
GAN to perform better than the baselines here, but we
check it does not perform worse. (2) the censoring and
temporal marginal p(t, E), evaluated using the optimism,
KM divergence, and short-sightedness metrics. We ex-
amine t-SNE plots (van der Maaten and Hinton, 2008) to
provide a qualitative performance of the covariates and
Kaplan-Meier plots for time and censoring variables in
Appendix E.
2. Downstream Performance: Section 6.2 compares the
performance of survival models trained with synthetic
data generated by SurvivalGAN to models trained with
data generated from the baselines. This is used to quan-
tify the quality of the full p(x, t, E) distribution. Here, a
good result is when a model trained with synthetic data
performs similarly to one trained with real data or in rare
cases better (Luo and Lu, 2018), and outperforms models
trained with different synthetic data.
2 3 1 4 Conditional Generator Conditional Discriminator WGAN Loss Trained Survival Function Train Survival Function Train Time to Event Encoder x,t,E Survival Function s 1...s NH Train Survival Function Train Time Regressor x,t,E t1...tNH t Train GAN x,t,E C xe x e User provides conditions and event C Conditional Generator Generate Synthetic Survival Data xe Survival Function Time Regressor Inverse Encoder E x t1,...,tNH s1,...,sNH x,t,E t Synthetic Sample t1...tNH s1...sNH Time Regressor Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
Table 1: The mean and standard deviation of the covariate and time-censoring metrics. The best values are in bold, for short-sightedness
extreme failure cases are underlined. ∗: Not evaluated.
Metric
Method
AIDS
CUTRACT
PHEART
SEER
METABRIC
Jensen-Shannon Distance
(Lower is Better)
Wasserstein Distance
(Lower is Better)
Optimism
(Closer to Zero is Better)
KM Divergence
(Lower is Better)
Short-sightedness
(Closer to Zero is Better)
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
0.012±0.02
0.028±0.01
0.052±0.01
0.031±0.01
0.054±0.01
0.048±0.01
0.153±0.02
1.080±0.27
1.694±0.51
0.851±0.07
1.967±0.05
1.701±0.19
-0.006±0.01
0.006±0.02
0.038±0.04
-0.061±0.03
0.064±0.01
-0.183±0.05
0.011±0.01
0.035±0.01
0.054±0.02
0.073±0.02
0.064±0.01
0.185±0.05
0.007±0.01
0.013±0.01
0.074±0.02
0.000±0.00
0.000±0.00
0.001±0.01
0.024±0.01
0.020±0.01
0.054±0.02
0.011±0.01
0.040±0.01
0.038±0.01
0.228±0.11
0.101±0.01
2.393±0.21
0.032±0.01
1.430±0.20
0.325±0.05
-0.012±0.03
-0.017±0.01
0.113±0.01
-0.334±0.02
0.079±0.01
-0.236±0.06
0.031±0.02
0.034±0.01
0.113±0.01
0.334±0.02
0.083±0.01
0.238±0.06
0.046±0.05
0.004±0.01
0.137±0.10
0.001±0.01
0.003±0.01
0.002±0.01
0.013±0.01
0.008±0.01
0.039±0.02
0.015±0.01
0.017±0.01
0.044±0.01
0.441±0.12
0.828±0.02
2.207±0.55
0.621±0.05
0.892±0.30
2.086±0.03
-0.036±0.05
0.129±0.01
0.096±0.21
-0.099±0.02
-0.115±0.03
0.091±0.02
0.079±0.01
0.134±0.01
0.167±0.15
0.099±0.02
0.115±0.03
0.100±0.01
0.127±0.15
0.135±0.01
0.479±0.05
0.438±0.01
0.410±0.01
0.106±0.09
0.022±0.01
0.022±0.01
0.036±0.01
0.008±0.01
0.034±0.01
0.030±0.01
0.420±0.29
0.146±0.01
2.108±0.01
0.019±0.01
1.902±0.10
0.169±0.04
-0.079±0.02
-0.001±0.01
0.026±0.01
-0.386±0.04
0.024±0.01
-0.398±0.10
0.080±0.02
0.007±0.01
0.026±0.01
0.386±0.04
0.024±0.01
0.392±0.10
0.010±0.04
0.000±0.00
0.080±0.05
0.000±0.00
0.000±0.00
0.0001±0.01
0.015±0.01
0.043±0.01
0.041±0.01
0.015±0.01
0.013±0.01
0.007±0.01
5.861±3.01
15.718±4.39
17.806±0.28
9.343±3.81
9.421±2.85
14.649±0.76
-0.113±0.01
0.384±0.01
0.290±0.03
0.183±0.08
0.140±0.03
0.003±0.01
0.121±0.01
0.383±0.01
0.308±0.03
0.133±0.04
0.168±0.03
0.054±0.01
0.027±0.02
∗
∗
0.131±0.03
0.147±0.03
∗
3. Ablation study: In Section 6.3, we perform an ablation
study to demonstrate and quantify the importance of each
component of SurvivalGAN. This provides insight into
what each component of SurvivalGAN offers the overall
model, and by using the new time and censoring metrics
we are able to determine how SurvivalGAN fails when
certain components are missing.
Benchmarks. We compare SurvivalGAN against the fol-
lowing benchmarks: generative adversarial networks for
anonymization (ADS-GAN) (Yoon et al., 2020); conditional
generative adversarial networks for tabular data (CTGAN)
(Xu et al., 2019); variational autoencoder for tabular data
(TVAE) (Xu et al., 2019); a variant of Bayesian Networks
(PrivBayes) (Zhang et al., 2017); and Normalizing flows
for tabular data (NFlows) (Papamakarios et al., 2021). For
a fair comparison, we preprocess the data using our tabular
encoder for all methods that are not specifically adapted to
support tabular data (ADS-GAN, Normalizing flows).
Datasets. We test SurvivalGAN on a variety of medical
survival analysis datasets. The datasets are: (1) ACTG
320 clinical trial dataset (AIDS) (Hammer et al., 1997);
(2) Cambridge Urology Translational Research and Clini-
cal Trials dataset for prostate cancer mortality in the UK
(CUTRACT) (CUTRACT, 2019); (3) a private heart fail-
ure dataset (PHEART); (4) SEER dataset for prostate can-
cer mortality in the US (SEER) (SEER, 2019) and (5) The
Molecular Taxonomy of Breast Cancer International Consor-
tium dataset (METABRIC) (Pereira et al., 2016). Details
on each dataset can be found in Appendix C.1.
Evaluation. For each dataset, benchmark, and experimen-
tal setting, evaluations are performed using 5 different ran-
dom seeds, and we report the mean and standard devia-
tions of the desired metric. Further experimental details
are provided in Appendix C and additional experiments in
Appendix D. Code reproducing all experiments and imple-
menting SurvivalGAN is publicly available at: https://
github.com/vanderschaarlab/survivalgan.
6.1 Quality of Marginal Distributions
Covariates. To evaluate the quality of the covariates, in
Table 1 we report the values of the Jensen-Shannon distance
and Wasserstein distance. We do not expect SurvivalGAN to
produce higher quality covariates than the baselines but we
must confirm that they are not significantly worse. We see
that SurvivalGAN provides robust coverage of the covariate
space, as well as the benchmarks, often achieving the best
or close to the best score.
Time & Censoring. To evaluate p(t, E) we report the
optimism, KM divergence, and short-sightedness metrics
in Table 1. SurvivalGAN shows stable results across all
datasets, consistently achieving the best value or close to
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Table 2: Predictive performance of discriminative models trained with synthetic data. ∗: The discriminative models failed to train on the
generated data. We provide the results when training with the original real data for reference.
Metric
Method
AIDS
C-Index
(Higher is Better)
Brier Score
(Lower is Better)
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
Original
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
Original
0.678±0.03
0.504±0.09
0.541±0.06
0.546±0.08
0.564±0.04
0.522±0.08
0.742±0.02
0.057±0.01
0.058±0.01
0.060±0.01
0.061±0.01
0.061±0.02
0.097±0.03
0.072±0.01
CUTRACT
0.799±0.02
0.544±0.15
0.607±0.10
0.791±0.02
0.779±0.03
0.730±0.07
0.826±0.01
0.084±0.01
0.100±0.02
0.117±0.01
0.172±0.03
0.099±0.01
0.171±0.04
0.095±0.01
PHEART
0.638±0.01
0.557±0.01
0.565±0.03
0.612±0.01
0.621±0.02
0.566±0.02
0.668±0.01
0.181±0.01
0.209±0.02
0.231±0.03
0.188±0.02
0.206±0.02
0.192±0.01
0.166±0.01
SEER
METABRIC
0.835±0.01
0.550±0.16
∗
0.830±0.01
0.808±0.02
0.776±0.04
0.856±0.01
0.023±0.01
0.025±0.02
∗
0.115±0.03
0.025±0.01
0.164±0.08
0.025±0.01
0.734±0.01
0.334±0.24
0.546±0.03
0.499±0.04
0.711±0.02
0.482±0.01
0.706±0.02
0.179±0.01
0.562±0.31
0.260±0.05
0.183±0.02
0.161±0.01
0.173±0.01
0.161±0.001
Table 3: Source-of-Gain Analysis on Multiple Datasets. ∗: The discriminative model failed to train on the generated data.
Metric
Method
C-Index
(Higher is Better)
Brier Score
(Lower is Better)
Optimism
(Closer to Zero is Better)
Short-sightedness
(Closer to Zero is Better)
SurvivalGAN
w/o Time Regressor
w/o Imbalanced Sampling
w/o Temporal Sampling
w/o Cond. GAN
SurvivalGAN
w/o Time Regressor
w/o Imbalanced Sampling
w/o Temporal Sampling
w/o Cond. GAN
SurvivalGAN
w/o Time Regressor
w/o Imbalanced Sampling
w/o Temporal Sampling
w/o Cond. GAN
SurvivalGAN
w/o Time Regressor
w/o Imbalanced Sampling
w/o Temporal Sampling
w/o Cond. GAN
AIDS
0.723±0.02
0.688±0.03
∗
0.713±0.04
0.714±0.04
0.066±0.01
0.144±0.02
∗
0.152±0.01
0.187±0.01
-0.006±0.01
0.067±0.01
0.066±0.01
-0.284±0.07
-0.309±0.03
0.007±0.01
0.009±0.01
0.008±0.01
0.012±0.01
0.019±0.02
CUTRACT
0.804±0.01
0.719±0.07
0.671±0.12
0.792±0.01
0.655±0.13
0.083±0.01
0.182±0.02
0.109±0.01
0.113±0.01
0.247±0.06
-0.012±0.03
-0.025±0.15
0.051±0.11
-0.266±0.01
-0.369±0.01
0.046±0.05
0.117±0.08
0.064±0.06
0.051±0.07
0.127±0.03
PHEART
0.644±0.01
0.558±0.02
0.590±0.02
0.614±0.01
0.563±0.04
0.176±0.01
0.233±0.02
0.229±0.01
0.223±0.01
0.234±0.04
-0.036±0.05
-0.070±0.06
0.048±0.16
-0.116±0.07
-0.130±0.04
0.127±0.15
0.497±0.05
0.228±0.14
0.128±0.12
0.085±0.13
SEER
0.834±0.01
0.677±0.02
0.504±0.01
0.636±0.13
0.573±0.12
0.022±0.01
0.252±0.05
0.025±0.01
0.153±0.11
0.224±0.11
-0.079±0.02
0.123±0.01
0.096±0.01
-0.644±0.03
-0.445±0.11
0.010±0.04
0.040±0.01
0.132±0.12
0.145±0.05
0.049±0.01
the best optimism and KM divergences. On the whole, the
majority of baselines do not suffer significantly from short-
sightedness. We see that SurvivalGAN is always close to
the best value for a given dataset. Crucially, we see that
SurvivalGAN is never extremely short-sighted. Whereas
we see ADS-GAN, CTGAN and TVAE can suffer extreme
failure cases measured by short-sightedness. This underlines
one of our main novelties: good coverage of both covariate
and temporal space by handling the censoring of the data,
to robustly generate survival data.
6.2 Downstream Performance
To assess downstream performance, we train a set of discrim-
inative models on the synthetic data and test them on the real
data, known as the Train on Synthetic Test on Real (TSTR)
metric (Esteban et al., 2017). The discriminative models fall
into different categories of survival models: linear models
(CoxPH) (Cox, 1972), gradient boosting (SurvivalXGBoost)
(Barnwal et al., 2022), random forests (RandomSurvivalFor-
est) (Ishwaran et al., 2008), and neural networks (DeepHit)
(Lee et al., 2018). For each experiment, we report the con-
cordance index (C-Index) (Harrell et al., 1982), a standard
metric for assessing the quality of the ranking in survival
models, and the Brier Score (Brier et al., 1950), which mea-
sures the calibration of the probabilistic predictions. We
evaluate the performance using 3-fold cross-validation on
the real data for each discriminative model. The genera-
tive models are trained with training data, the predictive
models are then trained on the synthetic data and tested on
a held-out test set. Table 2 shows the downstream perfor-
mance of the survival models. We select the best-performing
predictive model for each metric and report its score. Sur-
vivalGAN consistently leads to better-performing survival
models, both in terms of prediction quality (C-Index) and
calibration (Brier Score).
6.3 Sources of Gain
SurvivalGAN is characterized by:
the time-to-
event/censoring regressor; (2) the imbalanced sampling with
respect to time horizons and censoring and (3) the condi-
(1)
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
Figure 3: Sources of gain visualization for temporal quality using Kaplan-Meier plots. The sightedness is improved by the time regressor
(2nd plot) and by the imbalanced sampling (3rd plot). The optimism is improved by the temporal sampling (4th plot) and by the
conditional GAN (5th plot).
the survival functions to quantify these phenomena. On top
of this, we introduced SurvivalGAN, a generative model
that generates synthetic survival data. This is accomplished
by incorporating censored and non-censored data into the
training process, unlocking the use of abundant censored
data. Additionally, the time-to-event/censoring data is gen-
erated in a more principled way, using a pre-trained survival
function and time-to-event model, which permits future ex-
tensions to competing events. SurvivalGAN was tested on
multiple medical datasets, generating more faithful data and
leading to better downstream models than standard baseline
generative methods.
Limitations. Currently SurvivalGAN is not able to ad-
dress distribution shifts over time, where for example due to
advances in medicine we might expect better survival rates
in the future than we do now. In addition, it currently only
operates in the static setting, with extensions to temporal
data future work. Additionally, SurvivalGAN does not pro-
vide guarantees on privacy such as those in Jordon et al.
(2018). We view these as exciting lines of future research.
Acknowledgements
We thank the anonymous reviewers for their comments and
suggestions. Alexander Norcliffe is supported by a Glaxo-
SmithKline grant. Fergus Imrie and Mihaela van der Schaar
are supported by the National Science Foundation (NSF,
grant number 1722516). Mihaela van der Schaar is addition-
ally supported by the Office of Naval Research (ONR).
tional GAN used for the data generation. To examine the
importance of each contribution, we apply the following
modifications to SurvivalGAN: (1) with a standard time re-
gressor (DATE) (Chapfuwa et al., 2018) instead of ours; (2)
without the imbalanced sampling; (3) with imbalanced sam-
pling, but only targeting the censoring instead of censoring
and time horizon and (4) without the conditional GAN. We
then evaluate downstream performance of predictive models.
The ablation study was conducted in an in-distribution man-
ner, leading to minor performance differences with Table
2. In addition to predictive performance, we also evaluate
optimism and short-sightedness. We observe in Table 3
that all three components make significant contributions to
improving the quality of the generated data.
Insight. The time regressor has an essential role in the
quality of the rankings in the survival data (C-Index), as
seen in the AIDS and CUTRACT datasets. It is also impor-
tant with respect to short-sightedness: we see in particular
for PHEART that, without a dedicated time regressor, the
model is noticeably short-sighted. The imbalanced sampler
plays a key role in the downstream models' ability to rank
samples (measured by C-Index) for all datasets, but notably
the large datasets, as seen in PHEART and SEER. Inter-
estingly, without the temporal sampling or the conditional
GAN, the model is severely pessimistic (negative optimism).
Finally, without the conditional GAN, the model typically
has a far worse Brier score across all datasets, showing that
the conditional GAN significantly improves calibration.
We also visualize these sources of gain qualitatively using
KM plots on the PHEART dataset in Figure 3. We see that
all components of SurvivalGAN are required for optimal
performance. This supports the idea that the imbalanced
sampler and time regressor are crucial for the quality of
the time values, while the conditional GAN is critical for
temporal calibration.
7 CONCLUSION
We investigated the problem of generating synthetic survival
data with censoring. We first formalized the problem, iden-
tifying three possible failure modes specific to the survival
setting. We then introduced three new metrics based on
02000400060008000SurvivalGAN0.00.20.40.60.81.0Survival ProbabilityReal dataSynthetic data02000400060008000w/o TTE Regressor02000400060008000w/o Imbalanced Sampling02000400060008000w/o Temporal Sampling02000400060008000w/o Cond. GAN Dataset: pheartSurvivalGAN: Generating Time-to-Event Data for Survival Analysis
References
Akrami, H., Joshi, A. A., Li, J., Aydöre, S., and Leahy,
R. M. (2022). A robust variational autoencoder using
beta divergence. Knowledge-Based Systems, 238:107886.
Alaa, A., van Breugel, B., Saveliev, E. S., and van der
Schaar, M. (2022). How Faithful is your Synthetic Data?
Sample-level Metrics for Evaluating and Auditing Gener-
ative Models. In International Conference on Machine
Learning, pages 290–306. PMLR.
Ali, M. M., Malik, M. R., Ahmed, A. Y., Bashir, A. M.,
Mohamed, A., Abdi, A., and Obtel, M. (2022). Survival
analysis of all critically ill patients with COVID-19 ad-
mitted to the main hospital in Mogadishu, Somalia, 30
March–12 June 2020: which interventions are proving
effective in fragile states? International Journal of Infec-
tious Diseases, 114:202–209.
Arsene, C. and Lisboa, P. (2007). Artificial Neural Networks
Used in the Survival Analysis of Breast Cancer Patients:
A Node-Negative Study. In Outcome prediction in cancer,
pages 191–239. Elsevier.
Austin, P. C. (2012). Generating survival times to simu-
late cox proportional hazards models with time-varying
covariates. Statistics in Medicine, 31(29):3946–3958.
Barnwal, A., Cho, H., and Hocking, T. (2022). Survival
Regression with Accelerated Failure Time Model in XG-
Boost. Journal of Computational and Graphical Statis-
tics, pages 1–25.
Bender, R., Augustin, T., and Blettner, M. (2005). Generat-
ing survival times to simulate Cox proportional hazards
models. Statistics in Medicine, 24(11):1713–1723.
Benedetti, J. d., Oues, N., Wang, Z., Myles, P., and Tucker,
A. (2020). Practical Lessons from Generating Synthetic
Healthcare Data with Bayesian Networks. In Joint Euro-
pean Conference on Machine Learning and Knowledge
Discovery in Databases, pages 38–47. Springer.
Bretagnolle, J. and Huber, C. (1978). Estimation des den-
sités: risque minimax. In Séminaire de Probabilités XII,
pages 342–363. Springer.
Cox, D. R. (1972). Regression Models and Life-Tables.
Journal of the Royal Statistical Society: Series B (Method-
ological), 34(2):187–202.
Csiszár, I. and Körner, J. (2011). Information Theory: Cod-
ing Theorems for Discrete Memoryless Systems. Cam-
bridge University Press.
CUTRACT (2019). UK, P. C. Prostate Cancer. https:
//prostatecanceruk.org/.
Danacica, D.-E. and Babucea, A.-G. (2010). Using Survival
Analysis in Economics. Survival, 11:15.
De Capitani Di Vimercati, S., Foresti, S., Livraga, G., and
Samarati, P. (2012). Data Privacy: Definitions and Tech-
niques. International Journal of Uncertainty, Fuzziness
and Knowledge-Based Systems, 20(06):793–817.
de Cos Juez, F. J., Nieto, P. G., Torres, J. M., and Castro,
J. T. (2010). Analysis of lead times of metallic compo-
nents in the aerospace industry through a supported vector
machine model. Mathematical and computer modelling,
52(7-8):1177–1184.
Esteban, C., Hyland, S. L., and Rätsch, G. (2017). Real-
valued (Medical) Time Series Generation with Recurrent
Conditional GANs. arXiv preprint arXiv:1706.02633.
Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B.,
Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y.
(2014). Generative Adversarial Nets. Advances in Neural
Information Processing Systems, 27.
Gross, S. R., O'brien, B., Hu, C., and Kennedy, E. H. (2014).
Rate of false conviction of criminal defendants who are
sentenced to death. Proceedings of the National Academy
of Sciences, 111(20):7230–7235.
Hammer, S. M., Squires, K. E., Hughes, M. D., Grimes,
J. M., Demeter, L. M., Currier, J. S., Eron Jr, J. J., Fein-
berg, J. E., Balfour Jr, H. H., Deyton, L. R., et al. (1997).
A Controlled Trial of Two Nucleoside Analogues Plus In-
dinavir in Persons with Human Immunodeficiency Virus
Infection and CD4 Cell Counts of 200 per Cubic Mil-
limeter or Less. New England Journal of Medicine,
337(11):725–733.
Brier, G. W. et al. (1950). Verification of Forecasts Ex-
pressed in Terms of Probability. Monthly weather review,
78(1):1–3.
Harrell, F. E., Califf, R. M., Pryor, D. B., Lee, K. L., and
Rosati, R. A. (1982). Evaluating the yield of medical
tests. JAMA, 247(18):2543–2546.
Chapfuwa, P., Tao, C., Li, C., Page, C., Goldstein, B.,
Duke, L. C., and Henao, R. (2018). Adversarial Time-to-
Event Modeling. In International Conference on Machine
Learning, pages 735–744. PMLR.
Harsha, P., Jain, R., McAllester, D., and Radhakrishnan,
J. (2007). The Communication Complexity of Correla-
tion. In IEEE Conference on Computational Complexity
(CCC'07), volume 27, pages 10–23. IEEE.
Chen, R. J., Lu, M. Y., Chen, T. Y., Williamson, D. F.,
and Mahmood, F. (2021). Synthetic data in machine
learning for medicine and healthcare. Nature Biomedical
Engineering, 5(6):493–497.
Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and
Hochreiter, S. (2017). GANs Trained by a Two Time-
Scale Update Rule Converge to a Local Nash Equilibrium.
Advances in Neural Information Processing Systems, 30.
Chen, T. and Guestrin, C. (2016). XGBoost. In Proceedings
of the 22nd ACM SIGKDD International Conference on
Knowledge Discovery and Data Mining. ACM.
Hinterstoisser, S., Pauly, O., Heibel, H., Martina, M., and
Bokeloh, M. (2019). An Annotation Saved is an Annota-
tion Earned: Using Fully Synthetic Training for Object
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
Instance Detection. In Proceedings of the IEEE/CVF In-
ternational Conference on Computer Vision Workshops.
Ho, J., Jain, A., and Abbeel, P. (2020). Denoising Diffusion
Probabilistic Models. Advances in Neural Information
Processing Systems, 33:6840–6851.
Imrie, F., Cebere, B., McKinney, E. F., and van der Schaar,
M. (2022). AutoPrognosis 2.0: Democratizing Diagnostic
and Prognostic Modeling in Healthcare with Automated
Machine Learning. arXiv preprint arXiv:2210.12090.
Ishwaran, H., Kogalur, U. B., Blackstone, E. H., and Lauer,
M. S. (2008). Random survival forests. The Annals of
Applied Statistics, 2(3):841–860.
Jain, P., Gyanchandani, M., and Khare, N. (2016). Big
Data Privacy: A Technological Perspective and Review.
Journal of Big Data, 3(1):1–25.
Jenkins, S. P. (2005). Survival analysis. Unpublished
manuscript, Institute for Social and Economic Research,
University of Essex, Colchester, UK, 42:54–56.
Jordon, J., Szpruch, L., Houssiau, F., Bottarelli, M., Cheru-
bin, G., Maple, C., Cohen, S. N., and Weller, A. (2022).
arXiv preprint
Synthetic data–what, why and how?
arXiv:2205.03257.
Jordon, J., Yoon, J., and van Der Schaar, M. (2018). PATE-
GAN: Generating Synthetic Data with Differential Pri-
vacy Guarantees. In International Conference on Learn-
ing Representations.
Kaplan, E. L. and Meier, P. (1958). Nonparametric Esti-
mation from Incomplete Observations. Journal of the
American statistical association, 53(282):457–481.
Karras, T., Laine, S., and Aila, T. (2019). A Style-based Gen-
erator Architecture for Generative Adversarial Networks.
In Proceedings of the IEEE/CVF conference on computer
vision and pattern recognition, pages 4401–4410.
Kaso, A. W., Agero, G., Hurissa, Z., Kaso, T., Ewune, H. A.,
Hareru, H. E., and Hailu, A. (2022). Survival analysis of
COVID-19 patients in Ethiopia: A hospital-based study.
Plos one, 17(5):e0268280.
Kent, S. L. (2010). Predicting Abolition: A Cross-National
Survival Analysis of the Social and Political Determinants
of Death Penalty Statutes. International Criminal Justice
Review, 20(1):56–72.
Kingma, D. P. and Dhariwal, P. (2018). Glow: Generative
Flow with Invertible 1x1 Convolutions. Advances in
Neural Information Processing Systems, 31.
Kingma, D. P. and Welling, M. (2013). Auto-Encoding
Variational Bayes. arXiv preprint arXiv:1312.6114.
Lee, C., Zame, W., Yoon, J., and van Der Schaar, M. (2018).
DeepHit: A Deep Learning Approach to Survival Anal-
ysis with Competing Risks. In Proceedings of the AAAI
conference on artificial intelligence.
Lee, E. T. and Go, O. T. (1997). Survival analysis in public
health research. Annual review of public health, 18:105.
Liu, T., Qian, Z., Berrevoets, J., and van der Schaar, M.
(2023). GOGGLE: Generative Modelling for Tabular
Data by Learning Relational Structure. In International
Conference on Learning Representations.
Lu, W., Yu, S., Liu, H., Suo, L., Tang, K., Hu, J., Shi, Y.,
and Hu, K. (2021). Survival Analysis and Risk Factors
in COVID-19 Patients. Disaster Medicine and Public
Health Preparedness, pages 1–6.
Luo, Y. and Lu, B.-L. (2018). EEG Data Augmentation for
Emotion Recognition Using a Conditional Wasserstein
GAN. In 2018 40th Annual International Conference of
the IEEE engineering in Medicine and Biology Society,
pages 2535–2538. IEEE.
Machin, D., Cheung, Y. B., and Parmar, M. (2006). Survival
Analysis: A Practical Approach. John Wiley & Sons.
Miscouridou, X., Perotte, A., Elhadad, N., and Ranganath,
R. (2018). Deep Survival Analysis: Nonparametrics
and Missingness. In Machine Learning for Healthcare
Conference, pages 244–256. PMLR.
Naeem, M. F., Oh, S. J., Uh, Y., Choi, Y., and Yoo, J. (2020).
Reliable Fidelity and Diversity Metrics for Generative
Models. In International Conference on Machine Learn-
ing, pages 7176–7185. PMLR.
Niedermayer, D. (2008). An Introduction to Bayesian Net-
works and their Contemporary Applications. Innovations
in Bayesian networks: Theory and applications, pages
117–130.
Oord, A. v. d., Dieleman, S., Zen, H., Simonyan, K.,
Vinyals, O., Graves, A., Kalchbrenner, N., Senior, A.,
and Kavukcuoglu, K. (2016). WaveNet: A Generative
Model for Raw Audio. arXiv preprint arXiv:1609.03499.
Papamakarios, G., Nalisnick, E., Rezende, D. J., Mohamed,
S., and Lakshminarayanan, B. (2021). Normalizing Flows
for Probabilistic Modeling and Inference. Journal of
Machine Learning Research, 22(57):1–64.
Pereira, B., Chin, S., and Rueda, O. e. a. (2016). The
somatic mutation profiles of 2,433 breast cancers refine
their genomic and transcriptomic landscapes. https:
//www.nature.com/articles/ncomms11479.
Perez, L. and Wang, J. (2017). The Effectiveness of Data
Augmentation in Image Classification using Deep Learn-
ing. arXiv preprint arXiv:1712.04621.
LeClere, M. J. (2005). Preface Modeling Time to Event:
Applications of Survival Analysis in Accounting, Eco-
nomics and Finance. Review of Accounting and Finance.
Prakash, A., Boochoon, S., Brophy, M., Acuna, D., Camer-
acci, E., State, G., Shapira, O., and Birchfield, S. (2019).
Structured Domain Randomization: Bridging the Reality
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Gap by Context-Aware Synthetic Data. In 2019 Inter-
national Conference on Robotics and Automation, pages
7249–7255. IEEE.
Vahdat, A. and Kautz, J. (2020). NVAE: A Deep Hier-
archical Variational Autoencoder. Advances in Neural
Information Processing Systems, 33:19667–19679.
Rajabi, A. and Garibay, O. O. (2022). TabFairGan: Fair
Tabular Data Generation with Generative Adversarial
Networks. Machine Learning and Knowledge Extraction,
4(2):488–501.
Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen, M.
(2022). Hierarchical Text-Conditional Image Generation
with CLIP Latents. arXiv preprint arXiv:2204.06125.
Ranganath, R., Perotte, A., Elhadad, N., and Blei, D. (2016).
Deep Survival Analysis. In Machine Learning for Health-
care Conference, pages 101–114. PMLR.
Reynolds, D. A. (2009). Gaussian Mixture Models. Ency-
clopedia of biometrics, 741(659-663).
Rezende, D. and Mohamed, S. (2015). Variational Inference
with Normalizing Flows. In International Conference on
Machine Learning, pages 1530–1538. PMLR.
Vahdat, A., Kreis, K., and Kautz, J. (2021). Score-based
Generative Modeling in Latent Space. Advances in Neu-
ral Information Processing Systems, 34:11287–11302.
van Breugel, B., Kyono, T., Berrevoets, J., and van der
Schaar, M. (2021). DECAF: Generating fair Syn-
thetic Data Using Causally-Aware Generative Networks.
Advances in Neural Information Processing Systems,
34:22221–22233.
van der Maaten, L. and Hinton, G. (2008). Visualizing
Data using t-SNE. Journal of machine learning research,
9(11).
Wang, Z., Myles, P., and Tucker, A. (2021). Generating and
evaluating cross-sectional synthetic electronic healthcare
data: Preserving data utility and patient privacy. Compu-
tational Intelligence, 37(2):819–851.
Sajjadi, M. S., Bachem, O., Lucic, M., Bousquet, O., and
Gelly, S. (2018). Assessing Generative Models via Pre-
cision and Recall. Advances in Neural Information Pro-
cessing Systems, 31.
Xu, L., Skoularidou, M., Cuesta-Infante, A., and Veera-
machaneni, K. (2019). Modeling Tabular Data using
Conditional GAN. Advances in Neural Information Pro-
cessing Systems, 32.
Xu, L. and Veeramachaneni, K. (2018). Synthesizing Tabu-
lar Data using Generative Adversarial Networks. arXiv
preprint arXiv:1811.11264.
Yoon, J., Drumright, L. N., and van Der Schaar, M. (2020).
Anonymization Through Data Synthesis Using Genera-
tive Adversarial Networks (ADS-GAN). IEEE Journal
of Biomedical and Health Informatics, 24(8):2378–2388.
Zhang, J., Cormode, G., Procopiuc, C. M., Srivastava, D.,
and Xiao, X. (2017). PrivBayes: Private Data Release via
Bayesian Networks. ACM Trans. Database Syst., 42(4).
Zhou, X., Su, W., Liu, C., Jiao, Y., Zhao, X., and Huang, J.
(2022). Deep Generative Survival Analysis: Nonparamet-
ric Estimation of Conditional Survival Function. arXiv
preprint arXiv:2205.09633.
Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V.,
Radford, A., and Chen, X. (2016). Improved Techniques
for Training GANs. Advances in Neural Information
Processing Systems, 29.
Salinas-Escudero, G., Carrillo-Vega, M. F., Granados-
García, V., Martínez-Valverde, S., Toledano-Toledano,
F., and Garduño-Espinosa, J. (2020). A Survival Analysis
of COVID-19 in the Mexican Population. BMC public
health, 20(1):1–8.
SEER (2019). Surveillance, Epidemiology, and End Results
(SEER) Program. https://www.seer.cancer.
gov/.
Singh, R. and Mukhopadhyay, K. (2011). Survival Anal-
ysis in Clinical Trials: Basics and Must Know Areas.
Perspectives in clinical research, 2(4):145.
Song, Y. and Ermon, S. (2019). Generative Modeling by
Estimating Gradients of the Data Distribution. Advances
in Neural Information Processing Systems, 32.
Sutherland, D. J., Tung, H.-Y., Strathmann, H., De, S., Ram-
das, A., Smola, A., and Gretton, A. (2017). Generative
Models and Model Criticism via Optimized Maximum
Mean Discrepancy. In International Conference on Learn-
ing Representations.
Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W., and
Abbeel, P. (2017). Domain Randomization for Transfer-
ring Deep Neural Networks from Simulation to the Real
World. In 2017 IEEE/RSJ International Conference on
Intelligent Robots and Systems, pages 23–30. IEEE.
Tsybakov, A. B. (2009). Introduction to Nonparametric
Estimation. Springer Series in Statistics.
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
Supplementary Material for:
SurvivalGAN: Generating time-to-event Data for Survival Analysis
A BROADER IMPACT
Applications.
In general, there exist malicious applications of generative models. For example, when creating image or
speech data, it is possible to make counterfeit images or recordings of an opponent, falsely damaging their reputation. Our
paper is on survival data and we do not envision such malicious uses. Survival data is specific to the domain it is being
applied to, which limits the possibility of using fake data for unethical purposes. As with all generative models, it is possible
to reinforce biases in the training data. However, by providing a condition to the generator we are able to sample from
underrepresented groups and our work makes progress in that respect.
Further, the use of SurvivalGAN allows us to train survival models without original data, removing real, sensitive human
data from the supervised training process. This also makes it possible to generate more data quickly, helping to train survival
models, which we have seen have positive societal impacts (Gross et al., 2014; Arsene and Lisboa, 2007; Danacica and
Babucea, 2010).
Datasets.
In our experiments we use medical datasets. In general, these can contain sensitive information about participants.
We note that we did not collect any data; all data was collected by external labs/medical researchers. All identifiable
information has been removed from the datasets by the curators and permission was given by the subjects, making the
datasets suitable for this paper.
B METRICS
In Section 4, we introduced three new metrics: optimism, short-sightedness, and Kaplan-Meier divergence. These metrics
capture different nuances in generating data for survival analysis. In particular, we can see that we require three metrics
because it is possible for one value to be zero, while the other two are non-zero. Figure 4 provides an illustration of this,
showing the Kaplan-Meier plots for different situations and how the metrics differ. While KM divergence is enough to
indicate when synthetic data is inadequate, it does not tell us how, for this we need the other two metrics because they target
specific failure modes when modeling p(t, E), giving us an interpretable meaning. Note that a KM divergence of zero
means that optimism and short-sightedness must also both be zero.
Figure 4: Illustrative examples of Kaplan-Meier plots to show the need for all three metrics. Left: Optimism is zero, but short-sightedness
and KM divergence are greater than zero. Middle: Short-sightedness is zero but optimism and KM divergence are greater than zero. Right:
Optimism and short-sightedness are both zero, but KM divergence is greater than zero.
Bounds on Optimism. Optimism is trivially bounded by -1 and 1 from its definition. Here we demonstrate that it is
possible to bound the optimism by twice the total variation between the synthetic and real distributions pSyn(t) and pReal(t);
which may be a tighter bound than -1 and 1 in certain situations. Recall that p(t) is the probability density that the event of
interest happens at time t, and the survival function is defined as S(t) = (cid:82) ∞
t p(t(cid:48))dt(cid:48). These can both be conditioned on
covariate x which is omitted here for clarity. Differentiating this expression with respect to t we obtain
7 L P H 6 X U Y L Y D O 7 U X H . 0 6 \ Q W K H W L F . 0 7 L P H 6 X U Y L Y D O 7 L P H 6 X U Y L Y D OSurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Now we look at the definition of optimism
dS
dt
= −p(t).
Optimism =
1
T
(cid:90) T
0
(cid:0)SSyn(t) − SReal(t)(cid:1)dt.
Applying integration by parts we get
(cid:18)
(cid:19)
Optimism =
SSyn(T ) − SReal(T )
+
(cid:90) T
0
t
T
(cid:0)pSyn(t) − pReal(t)(cid:1)dt.
Rewriting the first bracketed term using the definition of the survival function we get
Optimism =
(cid:90) ∞
T
1 × (cid:0)pSyn(t) − pReal(t)(cid:1)dt +
(cid:90) T
0
t
T
× (cid:0)pSyn(t) − pReal(t)(cid:1)dt.
We then define f (t) piecewise as
f (t) =
(cid:40)
t/T,
1,
for 0 ≤ t ≤ T
t > T
for
.
Giving the optimism as a single integral
Optimism =
(cid:90) ∞
0
f (t)(cid:0)pSyn(t) − pReal(t)(cid:1)dt.
We then use the fact that f (t) ≤ 1 and (pSyn(t) − pReal(t)) ≤ |pSyn(t) − pReal(t)| to conclude that
Optimism < 2
(cid:90) ∞
0
1
2
|pSyn(t) − pReal(t)|dt.
The strict inequality comes from the fact that f (t) < 1 for t < T . The integral is the definition of the total-variation
divergence. We obtain the lower bound by considering the negative of the above step, that is (pSyn(t) − pReal(t)) ≥
−|pSyn(t) − pReal(t)|. Giving us
− 2DT V (pReal||pSyn) < Optimism < 2DT V (pReal||pSyn).
(5)
This allows us to apply other known bounds between different probability distances and the total variation. For example, we
can use Pinkser's inequality (Csiszár and Körner, 2011) to bound Optimism with the Kullback-Leibler divergence
(cid:113)
2DKL(pReal||pSyn) < Optimism <
(cid:113)
2DKL(pReal||pSyn).
−
We can also apply the inequality of Bretagnolle and Huber (Bretagnolle and Huber, 1978; Tsybakov, 2009)
(cid:113)
− 2
1 − exp(−DKL(pReal||pSyn)) < Optimism < 2
(cid:113)
1 − exp(−DKL(pReal||pSyn)).
Another example is with the Hellinger distance (Harsha et al., 2007)
√
− 2
2DH (pReal||pSyn) < Optimism < 2
√
2DH (pReal||pSyn).
(6)
(7)
(8)
The total-variation distance is symmetric. Therefore, despite the Kullback-Leibler divergence and Hellinger distance not
being symmetric themselves, we are able to swap pReal and pSyn in Equations (6), (7) and (8) to obtain the tightest bounds.
In specific situations there may be a closed-form solution for some of these divergences, allowing us to quickly establish
bounds on the optimism.
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
C EXPERIMENTAL DETAILS
In this section we give full experimental details, giving the dataset descriptions and hyperparameters.
Reproducibility. All hyperparameters are given in this section for reproducibility. Three of our datasets (SEER, AIDS
and METABRIC) are public, making those experiments straightforward to run. It is possible to run all experiments with
limited compute. Ours were run locally on a machine with 32GB RAM, Intel Core i7-6700 HQ, GeForce GTX 950M.
C.1 Data Description
In Table 4 we provide details about the datasets used in our evaluation. Of the datasets, AIDS, SEER and METABRIC are
public, CUTRACT and PHEART are licensed. AIDS contains people with HIV and SEER with Prostate Cancer. CUTRACT
is owned by Cambridge Prostate Cancer (https://cambridgeprostatecancer.com/)2, and focuses on patients
with Prostate Cancer. PHEART consists of patients from 30 medical studies who have experienced heart failure. The
Molecular Taxonomy of Breast Cancer International Consortium (METABRIC) database is a Canada-UK Project which
contains targeted sequencing data of primary breast cancer samples, this version contains samples 1,980 and 689 features
(Pereira et al., 2016).
Table 4: Datasets used for evaluation.
Dataset
No. instances
No. censored instances
No. features
Experiment label
ACTG 320 clinical trial dataset
CUTRACT
PHEART
SEER prostate cancer
METABRIC
1151
10086
40409
171942
1093
1055
8881
25664
167568
609
11
6
29
6
689
AIDS
CUTRACT
PHEART
SEER
METABRIC
Evaluation Horizons. The evaluation process is averaged over 5 time horizons, specific to each dataset. Given time-to-
event T in the training set, we select the 5 evaluation horizons, evenly spaced between [T.min(), T.max()]. Table 5 gives
the evaluation horizons for each dataset.
Table 5: Time horizons used for evaluation by dataset (can represent days/months, depending on the datasets).
Dataset
Horizon 1
Horizon 2
Horizon 3
Horizon 4
Horizon 5
AIDS (Months)
CUTRACT (Days)
61.5
1051.
PHEART (Days)
1404.6
SEER (Days)
METABRIC (Months)
775.
56.25
122.
2082.
2809.3
1550.
112.41
182.5
3113.
4214.
2325.
168.56
243.
4144.
5618.6
3100.
224.72
303.5
5175.
7023.3
3875.
280.87
2Terms and Conditions:
https://cambridgeprostatecancer.com/terms-privacy-policy-gdpr-cookies/
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
C.2 Hyperparameters
In Table 6, we present the full configuration of SurvivalGAN used in our experiments. Table 7 contains the hyperparameters
used by the predictive models trained with synthetic data for downstream tasks. Finally, Table 8 details the hyperparameters
used for the synthetic benchmarks.
Table 6: SurvivalGAN Hyperparameters by Component.
Component
Parameter
Parameter Value
Survival Function
Time-to-event Regressor
Conditional GAN
Model
No. Durations
Batch Size
No. Epochs
Learning Rate
Hidden Width
α
σ
Dropout Rate
Patience
Using Batch Normalization
Model
No. Estimators
Depth
Booster
Tree Method
Data Sampling Strategy
No. Iterations
Generator No. Hidden Layers
Generator Hidden Width
Generator Non-linearity
Generator Dropout Rate
Discriminator No. Hidden Layers
Discriminator Hidden Width
Discriminator Non-linearity
Discriminator Dropout Rate
Learning Rate
Weight Decay
Batch Size
Gradient Penalty (λ)
Encoder Max Clusters
Deephit
100
100
2000
1 × 10−3
300
0.28
0.38
0.02
20
True
XGBoostRegressor
200
5
Dart
Histogram
With Data Frequencies
1500
3
250
Tanh
0.1
2
250
Leaky ReLU
0.1
1 × 10−3
1 × 10−3
500
10
10
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
Table 7: Hyperparameters used for the baseline time-to-event benchmarks, used as downstream models.
Method
CoxPH
Weibull AFT
SurvivalXGBoost
RandomSurvivalForest
Deephit
DATE
Parameter
Estimation Method
Penalizer
L1 Ratio
α
Penalizer
L1 Ratio
Objective
Evaluation Metric
AFT Loss Distribution
AFT Loss Distribution Scale
No. Estimators
Column Subsample Ratio (by node)
Maximum Depth
Subsample Ratio
Learning Rate
Minimum Child Weight
Tree Method
Booster
Max Depth
No. Estimators
Criterion
No. Durations:
Batch Size
Epochs
Learning Rate
Hidden Width
α
σ
Dropout Rate
Patience
Using Batch Normalization
Generator No. Hidden Layers
Generator Hidden Width
Generator Non-linearity
Generator No. Iterations
Generator Using Batch Normalization
Generator Dropout Rate
Generator Learning Rate
Generator Weight Decay
Generator Residual
Discriminator No. Hidden Layers
Discriminator Hidden Width
Discriminator Non-linearity
Discriminator No. Iterations
Discriminator Using Batch Normalization
Discriminator Dropout Rate
Discriminator Learning Rate
Discriminator Weight Decay
Patience
Batch Size
Parameter Value
Breslow
0.0
0.0
0.05
0.0
0.0
Survival: AFT
AFT Negative Log Likelihood
Normal
1.0
100
0.5
8
0.5
5 × 10−2
50
Histogram
Dart
3
100
Gini
1000
100
2000
1 × 10−3
300
0.28
0.38
0.02
20
True
2
250
Leaky ReLU
1000
False
0.0
2 × 10−4
1 × 10−3
True
3
300
Leaky ReLU
1
False
0.1
2 × 10−4
1 × 10−3
10
100
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Table 8: Hyperparameters for the synthetic benchmarks.
Method
PrivBayes
Parameter
(cid:15)
θ Usefulness
(cid:15) Split
ADS-GAN
CTGAN
TVAE
NFlows
No. Iterations
Generator no. Hidden Layers
Generator Hidden Width
Generator Non-linearity
Generator Dropout Rate
Discriminator No. Hidden Layers
Discriminator Hidden Width
Discriminator Non-linearity
Discriminator Dropout Rate
Learning Rate
Weight Decay
Batch Size
Gradient Penalty (λ)
Identifiability Penalty
Encoder Max Clusters
Embedding Width
Generator No. Hidden Layers
Generator Hidden Width
Generator Learning Rate
Generator Decay
Discriminator No. Hidden Layers
Discriminator Hidden Width
Discriminator Learning Rate
Discriminator Decay
Batch Size
Discriminator Steps
No. Iterations
Pac
Embedding Width
Encoder No. Hidden Layers
Encoder Hidden Width
Decoder No. Hidden Layers
Decoder Hidden Width
L2 Scale
Batch Size
No. Iterations
Loss Factor
No. Iterations
No. Hidden Layers
Hidden Width
Batch Size
No. Transform Blocks
Dropout Rate
No. Bins
Tail Bound
Learning Rate
Base Distribution
Linear Transform Type
Base Transform Type
Parameter Value
1.0
4
0.3
1500
3
250
Tanh
0.1
2
250
Leaky ReLU
0.1
1 × 10−3
1 × 10−3
500
10
0.1
10
10
2
256
2 × 10−4
1 × 10−6
2
256
2 × 10−4
1 × 10−6
500
1
300
10
128
2
128
2
128
1 × 10−5
500
300
2
500
1
100
100
1
0.1
8
3
1 × 10−3
Standard Normal
Permutation
Affine-Coupling
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
D ADDITIONAL EXPERIMENTS
Here we present extended results from the experiments in the main paper. We first conduct further evaluation of the
covariates. We then look at three further ablations of SurvivalGAN: using a dedicated censoring network; replacing the
conditional GAN with a conditional VAE and replacing the GAN with a Gaussian mixture model. Finally, we provide
qualitative results in the form of t-SNE and Kaplan-Meier plots in Appendix E.
D.1 Statistical Metrics for the Covariates
In Table 1, we reported the Jensen-Shannon distance and Wasserstein distance of synthetic covariates compared to real
covariates. We saw that SurvivalGAN generates data close to the real distribution, either similar to or better than the
baselines. Here we extend this and record four further metrics:
1. The Precision (Sajjadi et al., 2018) - measures the rate by which the generative model synthesizes realistic-looking
samples, higher is better.
2. The Recall (Sajjadi et al., 2018) - measures the fraction of real samples that are covered by the synthetic data, higher is
better.
3. The Density (Naeem et al., 2020) - improves the precision metric and measures how many real-sample neighborhood
spheres contain the generated data, higher is better.
4. The Coverage (Naeem et al., 2020) - improves the recall metric and reports the fraction of real samples whose neighbor-
hoods contain at least one generated sample, higher is better.
We give these values in Table 9. We see that SurvivalGAN again performs on par with the baselines. This shows that
SurvivalGAN does not generate worse covariates than the baselines, which is not the main aim of this work, but is crucial to
generate a full synthetic survival dataset.
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Table 9: Precision, recall, density, and coverage given the covariates manifolds, higher values are better. The SEER dataset evaluation
failed due to memory limits. ∗: Not evaluated.
Metric
Method
AIDS
CUTRACT
PHEART
METABRIC
Precision
(Higher is Better)
Recall
(Higher is Better)
Density
(Higher is Better)
Coverage
(Higher is Better)
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
SurvivalGAN
PrivBayes
ADS-GAN
CTGAN
TVAE
NFlows
0.964±0.01
0.885±0.02
0.898±0.13
0.878±0.04
0.970±0.01
0.880±0.03
0.911±0.02
0.968±0.01
0.829±0.10
0.947±0.01
0.712±0.07
0.972±0.02
1.018±0.06
0.719±0.03
0.991±0.25
0.758±0.07
1.179±0.03
0.641±0.09
0.919±0.02
0.834±0.04
0.792±0.09
0.845±0.05
0.825±0.04
0.669±0.07
0.986±0.01
0.962±0.01
0.989±0.01
0.976±0.01
0.960±0.02
0.864±0.02
0.714±0.10
0.981±0.01
0.621±0.10
0.980±0.01
0.798±0.02
0.967±0.01
0.976±0.04
0.876±0.01
1.001±0.10
0.940±0.02
1.107±0.01
0.605±0.03
0.505±0.06
0.903±0.01
0.472±0.02
0.927±0.01
0.742±0.03
0.582±0.05
0.958±0.02
0.811±0.01
0.941±0.04
0.929±0.03
0.987±0.01
0.582±0.02
0.689±0.06
0.975±0.01
0.489±0.08
0.931±0.02
0.665±0.01
0.991±0.01
0.902±0.05
0.557±0.02
0.889±0.10
0.823±0.08
1.264±0.02
0.292±0.01
0.546±0.01
0.685±0.01
0.493±0.05
0.874±0.02
0.638±0.03
0.261±0.04
0.009±0.01
∗
0.001±0.01
0.006±0.01
0.014±0.01
0.004±0.01
0.698±0.04
∗
0.982±0.02
0.914±0.06
0.762±0.14
0.950±0.03
0.009±0.01
∗
0.001±0.01
0.003±0.01
0.013±0.01
0.001±0.01
0.034±0.02
∗
0.002±0.01
0.011±0.01
0.049±0.03
0.006±0.01
We additionally evaluate the quality of the covariates by looking at the negative log-likelihood of the synthetic covariates
compared to that of the true covariates in Table 10. We see that SurvivalGAN typically matches the real data well, often the
best or close to best, and never fails significantly, whereas the baselines occasionally contain noticeable failure cases, in
particular CTGAN, TVAE and NFlows.
Table 10: Negative log-likelihood in the presence of the covariates. The closer to the real data the better. The values closest to the real
data are given in bold. Extreme failure cases are underlined. ∗: Not evaluated.
Source
Real data
SurvivalGAN
PrivBayes
CTGAN
TVAE
NFlows
AIDS (/102) CUTRACT (/103) PHEART (/105)
SEER (/104) METABRIC (/103)
6.21
9.79
6.37±0.72
4.53±2.83
10.04±1.04
0.12±0.14
26.42±3.78
11.24±4.51
10.31±0.25
47.72±1.38
2.98±0.73
55.33±1.82
1.40
1.40±0.25
1.41±0.18
2.03±0.02
1.31±0.13
1.97±0.39
4.66
4.41±2.21
4.84±0.08
99.95±16.05
0.27±0.15
93.79±30.93
2.02
1.35±0.14
∗
1.19±0.19
1.20±0.37
∗
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
D.2 Censoring network
As a further ablation, we aim to investigate if a dedicated censoring network would improve the quality of SurvivalGAN. We
design the following experiment: We use an XGBoost classifier - denoted Censoring network - to predict the censored/not
censored status, based on the covariates. We keep our mechanisms in place: unbalanced time/censoring sampling, and
time-to-event/censoring regression. The results are given in Tables 11, 12 and 13. We see that on the whole, SurvivalGAN
performs better without the censoring network.
Table 11: Censoring network training performance. We evaluate the classifier using only the real data and we report the AUROC. We
observe that the classifier has a good performance for distinguishing the classes, on the evaluation datasets.
Dataset
AUROC
AIDS
CUTRACT
PHEART
SEER
0.719±0.037
0.753±0.004
0.719±0.004
0.837±0.003
METABRIC 0.717±0.015
Table 12: Number of censored/not censored rows, from the real data, SurvivalGAN, and the censoring network. We want the numbers
from the generative models to be as close as possible to those from the real data. While the predictive performance is good overall, there
are scenarios like for the AIDS or CUTRACT datasets, where the number of non-censored synthetic subjects from the Censoring Network
is too low.
Dataset
AIDS
CUTRACT
MAGGIC
SEER
METABRIC
Real data
SurvivalGAN
Censored Event Censored Event Censored
Censoring network
Event
1055
8881
25664
167568
609
96
1205
14745
4374
484
1045
8868
26019
168866
817
106
1218
14390
3076
276
1134
9926
27282
132260
738
17
160
13127
4872
355
Table 13: Predictive performance for SurvivalGAN with and without the Censoring network. C-Index is better if higher and Brier score is
better if lower. We see SurvivalGAN performs better without the censoring network.
Dataset
SurvivalGAN
Censoring network
C-Index
Brier score
C-Index
Brier score
AIDS
CUTRACT
PHEART
SEER
0.723±0.020
0.804±0.010
0.644±0.010
0.834±0.010
METABRIC 0.719±0.020
0.066±0.010
0.083±0.010
0.176±0.010
0.022±0.010
0.200±0.002
0.730±0.010
0.770±0.010
0.640±0.005
0.774±0.001
0.710±0.005
0.067±0.001
0.100±0.001
0.179±0.004
0.032±0.002
0.210±0.005
D.3 SurvivalGAN vs. SurvivalVAE
Our method can be adapted to other architectures as well to generate covariates. In this section, we perform another ablation
by analyzing the performance of the synthetic data when using a variational autoencoder (SurvivalVAE) instead of a GAN.
For the experiment, we keep the same additional mechanisms in-place: imbalanced sampling around time and censoring,
and the time-to-event/censoring regression. Table 14 contains the predictive performance of models trained on the synthetic
data. We see that SurvivalGAN outperforms SurvivalVAE on the majority of datasets.
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
Table 14: Predictive performance for models trained with synthetic data from SurvivalGAN vs. SurvivalVAE. C-Index is better if higher
and Brier score is better if lower. SurvivalGAN tends to generate better quality data.
Dataset
Method
C-Index
Brier score
AIDS
0.638±0.020
SurvivalVAE
SurvivalGAN 0.678±0.030
0.058±0.000
0.057±0.010
CUTRACT
0.791±0.010
SurvivalVAE
SurvivalGAN 0.799±0.020
0.103±0.003
0.084±0.010
PHEART
SEER
0.600±0.001
SurvivalVAE
SurvivalGAN 0.638±0.010
0.206±0.002
0.181±0.010
0.609±0.010
SurvivalVAE
SurvivalGAN 0.835±0.010
0.024±0.010
0.023±0.010
METABRIC
0.724±0.010
SurvivalVAE
SurvivalGAN 0.734±0.010
0.191±0.002
0.189±0.010
D.4 SurvivalGAN vs. SurvivalGMM
We test SurvivalGAN against the simplest possible generative model for the covariates, a Gaussian Mixture Model
(SurvivalGMM). This uses the same Gaussian Mixture Model that is used in the tabular encoder and class encoder with 100
mixture components (see Section 5.1 for information on these), but now to generate covariates instead of using the GAN.
We provide the downstream performances in Table 15. We see that using a GAN performs better than using the GMM.
Table 15: Predictive performance for models trained with synthetic data from SurvivalGAN vs. SurvivalGMM. C-Index is better if higher
and Brier score is better if lower. We see SurvivalGAN is significantly better than SurvivalGMM.
Dataset
Method
C-Index
Brier score
AIDS
SurvivalGMM 0.510±0.157
SurvivalGAN 0.678±0.030
0.061±0.002
0.057±0.010
CUTRACT
SurvivalGMM 0.780±0.008
SurvivalGAN 0.799±0.020
0.089±0.001
0.084±0.010
PHEART
SEER
SurvivalGMM 0.627±0.002
SurvivalGAN 0.638±0.010
0.205±0.001
0.181±0.010
SurvivalGMM 0.662±0.017
SurvivalGAN 0.835±0.010
0.024±0.010
0.023±0.010
METABRIC
SurvivalGMM 0.564±0.013
SurvivalGAN 0.734±0.010
0.282±0.036
0.189±0.010
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
E QUALITATIVE RESULTS
Here we provide qualitative results in the form of t-SNE plots for the covariates (van der Maaten and Hinton, 2008) and
Kaplan-Meier plots for the time and event (Kaplan and Meier, 1958).
E.1 Downstream Predictive Models
Figure 5 presents the Kaplan-Meier plots for the time-to-event models (the downstream models). The observed trend is
visible in the datasets, leading to over-optimistic or over-pessimistic time-to-event values, and it supports the need for a
reliable method to overcome the time-to-event/censoring problem.
Figure 5: Kaplan-Meier plots of reference time-to-event models. The first five survival-function-based methods tend to be over-optimistic,
while the last model is over-pessimistic.
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
E.2 Data Fidelity and Diversity
Figure 6, includes the t-SNE plots for covariate coverage and the Kaplan-Meier visualizations for temporal fidelity, using
all datasets. Qualitatively, we see SurvivalGAN is robust in generating the covariate and temporal distributions across all
datasets. The t-SNE plots show the covariates typically cover the data distribution at least as well as the other baselines.
More importantly, the KM plots show the ability to model p(t, E) is significantly better for SurvivalGAN than the baselines.
Figure 6: Data diversity visualization for all datasets, from a single random seed. For each dataset, the 1st row contains the t-SNE plots on
the covariates, and the 2nd row contains the Kaplan-Meier plots for time and censoring. Each column provides the visualization for each
of the available benchmarks.
Alexander Norcliffe, Bogdan Cebere, Fergus Imrie, Pietro Liò, Mihaela van der Schaar
E.3 Sources of Gain
Figure 3 reports the sources of gain visualizations for all datasets (apart from METABRIC) with t-SNE for the covariates
and KM plots for the time/censoring. We observe that the conditional GAN has an important impact on the quality of the
covariates (final column of the t-SNE plots), while all the components contribute to the temporal calibration and sightedness
(KM plots).
Figure 7: Sources of gain visualizations using t-SNE and Kaplan-Meier plots. For each dataset, the 1st row contains the t-SNE plots of
the covariates, and the 2nd row contains the Kaplan-Meier plots for time and censoring. Each column corresponds to a given ablation
scenario (certain component missing).
SurvivalGAN: Generating Time-to-Event Data for Survival Analysis
E.4 SurvivalGAN vs. SurvivalVAE
Finally, Figure 8 shows the qualitative differences between SurvivalGAN and SurvivalVAE. The biggest difference is in the
Kaplan-Meier plots, showing SurvivalGAN models p(t, E) more faithfully than SurvivalVAE. We include CTGAN and
TVAE as well to show that generally VAE based models are more over-optimistic than GAN based models.
Figure 8: Data diversity visualization for SurvivalVAE, from a single random seed. For each dataset, the 1st row contains the t-SNE plots
of the covariates, and the 2nd row contains the Kaplan-Meier plots for time and censoring. Each column provides the visualization for
each of the 4 benchmarks.
|
|
http://arxiv.org/abs/2302.12744v2 | 2023-04-07T08:58:59 | 2023-02-24T16:54:47 | Anomalous NO2 emitting ship detection with TROPOMI satellite data and
machine learning | Starting from 2021, more demanding $\text{NO}_\text{x}$ emission restrictions
were introduced for ships operating in the North and Baltic Sea waters. Since
all methods currently used for ship compliance monitoring are financially and
time demanding, it is important to prioritize the inspection of ships that have
high chances of being non-compliant. The current state-of-the-art approach for
a large-scale ship $\text{NO}_\text{2}$ estimation is a supervised machine
learning-based segmentation of ship plumes on TROPOMI/S5P images. However,
challenging data annotation and insufficiently complex ship emission proxy used
for the validation limit the applicability of the model for ship compliance
monitoring. In this study, we present a method for the automated selection of
potentially non-compliant ships using a combination of machine learning models
on TROPOMI satellite data. It is based on a proposed regression model
predicting the amount of $\text{NO}_\text{2}$ that is expected to be produced
by a ship with certain properties operating in the given atmospheric
conditions. The model does not require manual labeling and is validated with
TROPOMI data directly. The differences between the predicted and actual amount
of produced $\text{NO}_\text{2}$ are integrated over observations of the ship
in time and are used as a measure of the inspection worthiness of a ship. To
assure the robustness of the results, we compare the obtained results with the
results of the previously developed segmentation-based method. Ships that are
also highly deviating in accordance with the segmentation method require
further attention. If no other explanations can be found by checking the
TROPOMI data, the respective ships are advised to be the candidates for
inspection. | [
"Solomiia Kurchaba",
"Jasper van Vliet",
"Fons J. Verbeek",
"Cor J. Veenman"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12744v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12744v2",
"@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
r
p
A
7
]
G
L
.
s
c
[
2
v
4
4
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Anomalous NO2 emitting ship detection with TROPOMI satellite
data and machine learning
Solomiia Kurchaba
[email protected]
Leiden Institute of Advanced Computer Science (LIACS)
Leiden University
Leiden, The Netherlands
Fons J. Verbeek
[email protected]
Leiden Institute of Advanced Computer Science (LIACS)
Leiden University
Leiden, The Netherlands
ABSTRACT
Starting from 2021, more demanding NOx emission restrictions
were introduced for ships operating in the North and Baltic Sea
waters. Since all methods currently used for ship compliance moni-
toring are financially and time demanding, it is important to pri-
oritize the inspection of ships that have high chances of being
non-compliant. The current state-of-the-art approach for a large-
scale ship NO2 estimation is a supervised machine learning-based
segmentation of ship plumes on TROPOMI/S5P images. However,
challenging data annotation and insufficiently complex ship emis-
sion proxy used for the validation limit the applicability of the model
for ship compliance monitoring. In this study, we present a method
for the automated selection of potentially non-compliant ships
using a combination of machine learning models on TROPOMI
satellite data. It is based on a proposed regression model predicting
the amount of NO2 that is expected to be produced by a ship with
certain properties operating in the given atmospheric conditions.
The model does not require manual labeling and is validated with
TROPOMI data directly. The differences between the predicted and
actual amount of produced NO2 are integrated over observations
of the ship in time and are used as a measure of the inspection
worthiness of a ship. To assure the robustness of the results, we
compare the obtained results with the results of the previously
developed segmentation-based method. Ships that are also highly
deviating in accordance with the segmentation method require
further attention. If no other explanations can be found by check-
ing the TROPOMI data, the respective ships are advised to be the
candidates for inspection.
KEYWORDS
TROPOMI, machine learning, IMO 2020, seagoing ships, NO2
1 INTRODUCTION
The industry of international shipping is one of the strongest
sources of anthropogenic emission of NOx - a substance harm-
ful both to ecology and human health. The contribution of the
shipping industry to the global emission of NOx is estimated to
vary between 15% − 35% [8, 17], causing approximately 60,000
Jasper van Vliet
[email protected]
Human Environment and Transport Inspectorate (ILT)
Utrecht, The Netherlands
Cor J. Veenman
[email protected]
Leiden University
Leiden, The Netherlands
Data Science Department, TNO
The Hague, The Netherlands
premature deaths annually [7]. To mitigate the negative impact of
this industry, the International Maritime Organization (IMO) step-
wisely tightens the restrictions put on emission factors of marine
engines. The latest step is an 80% reduction of NOx emission for
ships operating in the North and Baltic Sea [16].
The monitoring of the compliance of ships with the IMO regula-
tions is being performed by manual onboard inspections. However,
due to the high costs, a selection of ships that will undergo inspec-
tion is needed. Among the sources of information currently used
for the selection of ships are in-situ emission measurement stations
[1, 18, 25] usually located at the entrance of the harbors, or airborne
platform-based measurements such as planes, drones or helicopters
[31]. The data collected with such methods give limited informa-
tion on how much the selected ships emit outside of a port and are
usually done near-shore. In addition, the above-mentioned methods
are spot checks that usually only happen once. This does not give a
possibility of having a wider perspective on ship performance. As a
result, the decisions regarding the worthiness of a ship inspection
do not have sufficient justification.
The TROPOspheric Monitoring Instrument onboard the Sen-
tinel 5 Precursor (TROPOMI / S5P) satellite launched in 2018 [32]
is the first remote sensing instrument that is able to distinguish
NO2 plumes from individual ships [13, 21]. This technical improve-
ment allows to consider remote sensing as a potential solution
for ship compliance monitoring [29]. In particular, the data from
the TROPOMI instrument could be used for the development of a
data-driven inspection recommendation.
The current state-of-the-art of large-scale methods for NO2 ship
plume modeling use thresholding or supervised machine learning-
based segmentation of TROPOMI images to attribute the measured
NO2 to individual ships [21, 22]. The latter methodology is an au-
tomated procedure improving significantly upon previously-used
manual methods. However, due to the low signal-to-noise ratio
of TROPOMI measurements, ship plumes are often hard to delin-
eate, which makes the process of manual data annotation time-
consuming and potentially erroneous. The absence of ground truth
for a given task requires an alternative measure of validation. The
ship emission proxy is an option, though often it does not cover
the full list of factors that can potentially influence the levels of
ship emissions. This does not allow a proper quantification of the
effects of the errors coming from manual labeling. Consequently,
the possibilities of the application of this approach to the task of
monitoring NO2 emissions from individual ships are limited.
In this study, we propose a robust method for automated selec-
tion of anomalously NO2 emitting seagoing ships. The presented
approach does not require data labeling and is validated using
TROPOMI data directly. Moreover, our method is based on the in-
tegration of multiple observations, which gives a more complete
perspective on ship performance. This is achieved by training a
specifically designed regression model, which predicts the amount
of NO2 that is expected to be registered by the TROPOMI sensor for
a given ship operating in certain atmospheric conditions. The differ-
ence between the predicted and actual amount of registered NO2 is
integrated over the available number of ship observations. The in-
tegrated difference we consider a measure of inspection worthiness
of the ship.
We train the regression model with an automatically delineated
Region of Interest (RoI) based on ship, wind speed, and direction.
We apply Automated Machine Learning (AutoML) to optimize the
machine learning-based regression pipeline for the NO2 prediction.
To assure the robustness of the proposed method, we compare the
results obtained with the regression model with the previously
developed [22] method for ship plume segmentation. Ships that
are also ranked as highly deviating in accordance with the ship
plume segmentation model are nominated as anomalous emitters
and require further attention. We manually check the TROPOMI
data for objective explanations of anomalous results. If no other
explanations are found, the ships are advised to be the candidates
for further inspection.
The rest of this paper is organized as follows: In Section 2, we
present an overview of the relevant literature. In Section 3, we
describe the data sources used in this study. In Section 4, we intro-
duce the developed methodology, which is followed by the results
presented in Section 5. In Sections 6 and 7, the reader can find the
discussion and final conclusions respectively.
2 RELATED WORK
Remote sensing is a well-established technique for the measurement
of emission levels. In particular, there is an extensive list of studies
using satellites-predecessors of the TROPOMI / S5P to quantify the
aggregated NO2 emission levels produced by the shipping indus-
try. For instance, with the Global Ozone Monitoring Experiment
(GOME) [4] satellite image, the NO2 emission levels were quan-
tified for the shipping lane between Indonesia and Sri Lanka [2].
The ship traces in the Red Sea were estimated using the SCanning
Imaging Absorption spectroMeter for Atmospheric CartograpHY
(SCIAMACHY) [3] onboard the ENVIronmental SATellite (Envisat)
mission [28]. With the data from the Ozone Monitoring Instrument
(OMI) [23] aboard the NASA Aura, a ship NOx emission inventory
for the Baltic Sea was visualized [33]. Because of the low spatial
resolution of the above-mentioned instruments (GOME: 40 × 320
km2, SCIAMACHY: 30 × 60 km2, OMI: 13 × 25 km2), all the de-
scribed studies were based on multi-month averaging of satellite
data. While being able to identify the shipping lanes as areas with
S.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
high concentrations of pollutants, these approaches are unsuitable
for the quantification of emissions from individual ships.
In [13], the authors for the first time reported that with TROPOMI
satellite data, the NO2 plumes produced by individual ships can be
distinguished. The study was focused on the analysis of the plumes
from the biggest ships in the area, using a basic approach for ship
plume allocation. In [21], we showed that the application of data pre-
processing techniques allows for the distinction of a greater amount
of ships. Moreover, the introduced wind error-robust method of
ship-plume allocation allowed for a more accurate estimation of
NO2 produced by ships. The plume-background separation, how-
ever, was made using a univariate method of the locally optimized
detection threshold. This approach had problems with the differen-
tiation of plumes produced by the studied ships from all the other
NO2 concentration peaks within the ship's proximity. In [11], using
elements of automatic machine learning, the authors developed
a model for the automatic distinction of TROPOMI images into
those that contain NO2 plumes and those that do not. The possi-
bilities of quantification of the intensity of the detected plumes,
however, have not been provided. In [22], we introduced a multi-
variate supervised learning method for automated segmentation of
NO2 ship plumes. This was a notable improvement over existing
baselines. Nevertheless, the method requires manual annotation
of the images. Due to the low signal-to-noise ratio of TROPOMI
data, the distinguishability of the boundaries of the plume is often
challenging, which makes such an annotation time-consuming and
possibly misleading. Because of the lack of ground truth, the vali-
dation of the proposed approach was performed using a theoretical
ship emission proxy [13] that does not take into account many fac-
tors (such as the amount of cargo on board, or local meteorological
conditions) that can influence the NO2 levels produced by a given
ship. As a result, validation of human labeling and consequently
the approach as a whole cannot be done with the proxy. This limits
the possibilities of the usage of this approach for the task of ship
compliance monitoring.
In this study, we propose an approach for the automated detec-
tion of anomalously NO2 emitting ships. We specifically design a
regression model for ship NO2 prediction, and integrate the dif-
ference between the real and predicted amount of NO2, leading
to a ship emission profile. The method does not require manual
labeling and is validated using TROPOMI measurements directly.
To assure the robustness of the obtained results, we combine the
newly developed approach with the methodology proposed in [22].
3 DATA
To prepare the dataset used in this study, we combine several
sources of data. We use the TROPOMI file1 to retrieve an NO2
tropospheric vertical column density (VCDtrop ) variable, which is
the objective of this study; wind data that is used to define the RoI
of a ship, and as a feature of a segmentation and regression machine
learning models; albedo data, as well as two VCDtrop priors (slant
column density (SCD) and air mass factor (AMS)) that are used as
features of the regression model. We use Automatical Identification
System (AIS) data for the positions of ships in the studied area at
the moment of the satellite overpass. Finally, official ship registries
1Open access under https://s5phub.copernicus.eu/
are used to retrieve data about the dimensions of the studied ships.
In the following section, we provide a detailed description of all
used data sources.
3.1 TROPOMI data
TROPOMI/S5P [32] – TROPOspheric Monitoring Instrument on-
board the Sentinel 5 Precursor (S5P) satellite is a UV-Vis-NIR-SWIR
(UV, visible, near-infrared, short-wave infrared) spectrometer that
entered its operational phase starting from May 2018. It is a sun-
synchronous satellite that in 24 hours performs approximately 14
orbits covering the full globe. The local equatorial overpass time of
the satellite is 13:30.
The TROPOMI instrument measures spectra of multiple trace
gasses, including the one of our interest – nitrogen dioxide (NO2).
The NO2 gas is the most important outcome of photochemical
reactions of NOx emitted by ships. Therefore, it is suitable for com-
pliance monitoring of ships [22]. In this study, the variable of our
interest is NO2 tropospheric vertical column density (VCDtrop )2
[10].
The retrieval of VCDtrop consists of three steps [10]. The first
step is spectra fitting, where the total NO2 slant column density
(SCD) is obtained from radiance and irradiance spectra measured
by TROPOMI instrument. During the second step, the total SCD is
separated into stratospheric (SCDstrat ) and tropospheric (SCDtrop )
components. Finally, as a third step, the tropospheric air mass factor
(AMF) is calculated to convert the SCDtrop into VCDtrop . The
AMF is obtained on the basis of historical emission inventories
(highly dependent on i.a. satellite geometry, cloud fraction, surface
albedo) and a TM5-MP chemistry transport model that calculates
vertical distributions of NO2 at a resolution of 1 × 1◦ [34]. As
a result, the third step is considered to be the biggest source of
the uncertainties related to VCDtrop retrieval [6, 24]. Among the
implication of such possible uncertainties is the fact that areas with
historically higher emission levels (e.g. shipping lanes or close-to-
land sea regions) will tend to be more sensitive to measuring small
and temporally emission sources such as plumes from individual
ships. To minimize the negative impact of potential uncertainties
on the obtained results, such variables as background NO2 SCD,
AMF, surface albedo, and sun/satellite geometry will be used as
model features for ship NO2 estimation.
The studied region is the area in the eastern Mediterranean Sea
restricted by the Northern coast of Libya and Egypt from the south
and South coast of Crete from the north (long: [19.5◦; 29.5◦], lat:
[31.5◦; 34.2◦]). An outline of the studied area is presented in Figure
1. The reason for selecting this particular region for analysis is
the high frequency of sunny days in the area and relatively low
levels of the background NO2 concentrations. Those are favorable
conditions for testing the suitability of the proposed solutions for
ship NO2 estimations. The study period is 20 months, starting from
1 April 2019 until 31 December 2020.
The maximal ground pixel resolution of the TROPOMI spectrom-
eter equals 3.5 × 5.5 km2 at nadir. Because of the projection of
the satellite images, the real size of a pixel will vary depending on
the true distance between the satellite and the captured part of the
earth's surface. In order to obtain the images of a regular size, we
2TROPOMI / S5P data version: 2.3.1
perform regridding3 of the original TROPOMI data into a grid of
a regular size 0.045◦ × 0.045◦. For the studied area the size of the
pixel after regridding translates to approximately 4.2 × 5 km2.
To assure the best possible quality of the TROPOMI retrieval,
only measurements flagged with qa_value > 0.5 [30] are taken
into consideration. In addition, since the TROPOMI measurements
of scenes covered with clouds should not be considered valid, we
filtered out from the data pixels with a cloud fraction higher than
0.05. The resulting distribution of the corresponding variable is
provided in Figure 2.
3.2 Meteorological data
For the study, the wind information is taken from wind speed data
from the European Center for Medium-range Weather Forecast
(ECMWF) at 10 m height, available with 0.25◦ resolution at a 6-
hourly time step. The used surface albedo data is the OMI minimum
Lambertian equivalent reflectance (LER) at a resolution of 0.5◦. Both
ECMWF wind data and OMI surface albedo data are available as
support products in the TROPOMI/S5P data file.
3.3 Ship-related data
Another data source used in this study is relayed through Automatic
Identification System (AIS) transponders4. The data include the
position, speed, heading, and unique identifier (MMSI) of each ship
carrying an active transponder. Due to the fact that at the moment
there is no open-access AIS data available, for the scope of this
study, the AIS data as well as information about the dimensions of
the ships (such as length, type, and gross tonnage) were provided by
the Netherlands Human Environment and Transport Inspectorate
(ILT). This is the Dutch national designated authority for shipping
inspections, has access to commercial databases for the AIS data
set used in this study, and is participating in this research.
In order to prevent the occurrence in our dataset of ships below
the detection limit, we focus our analysis on the seagoing ships
that are longer than 150 meters and faster than 12 kt. Another sit-
uation we want to prevent is when too many ships contribute to
the creation of the detected NO2 plume, as in this case, quantifi-
cation of individual contributions is extremely challenging. Thus,
we remove the ships, whose trajectories within 2 hours before the
satellite overpass, intersect with more than 3 other neighboring
ships. This is a trade-off between a sufficient size of the dataset and
the complexity of the problem of the quantification of individual
contributions. Among all ship types present in the dataset, for the
detection of anomalously emitting ships, we focus our attention on
two ship types only: containers and tankers. Other ship types have
not been represented in the dataset in a sufficient amount to obtain
statistically significant results.
4 METHOD
In this Section, we present the method for automated detection of
ships that produce anomalously high amounts of NO2. The method
is composed of the following steps: we train a regression model for
the prediction of the amount of NO2 within the Region of Interest
3The regridding is performed using the Python package HARP v.1.13.
4Since 2002 all commercial sea-going vessels are obliged to carry on board an AIS
transponder [26].
S.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Figure 1: The NO2 tropospheric column. Visualized day: June 14th, 2019. Study area: part of the Mediterranean Sea, bound
by the Northern coasts of Libya and Egypt in the South and South of Crete in the North. Magenta lines indicate tracks of
ships based on AIS data. The elevated background concentrations (green) in the east correspond to outflow from a variety of
land-based sources. To visualize the TROPOMI data, a native local pixel size is plotted before regridding.
are considered to be potentially anomalously emitting. We vali-
date the obtained results by visual inspection of the corresponding
TROPOMI measurements. Figure 3 provides a high-level expla-
nation of the proposed method for the detection of anomalously
emitting ships. Below, each step of the methodology is described in
detail.
4.1 Regression model
Here, we describe our proposed regression model as part of a
method for the detection of anomalously emitting ships. We first
provide a formal definition of the proposed way for ship NO2 es-
timation with the regression model. Then we discuss the process
of definition of an RoI of a studied ship. Finally, we introduce the
details of training, optimization, and evaluation of the machine
learning methodology proposed in this study.
Formalization of the problem. For a given ship s ∈ S on a
4.1.1
given day d ∈ D, the real amount of NO2 registered by TROPOMI
is calculated as:
NO2;d,s =
∑︁
i ∈RoId,s
VCDN O2;i
(1)
where VCDN O2 is the value of the retrieved TROPOMI pixel
within the RoI of the analyzed ship (see Section 4.1.2 for more
details of RoI definition).
We then use a machine learning model f that based on values of
features X ∈ R predicts the expected amount of NO2: ˆNO 2;d,s ∈ R.
ˆNO 2;d,s = f (Xd,s )
The list of features X can be found in Table 1. In Appendix A,
we provide histograms of distributions of the features, as well as
other dataset details.
(2)
Subsequently, we calculate a percentage difference between the
predicted and real registered amount of NO2:
Figure 2: Histogram of the variable cloud fraction for the
dataset used in this study. Values above 0.05 were filtered
out.
(RoI) of the analyzed ship. We calculate the difference between the
observed and predicted amount of NO2 and integrate this value
over all observations of the same ship within the studied period.
The integrated difference between the real and predicted value of
NO2 we consider as a measure of the inspection worthiness of the
ship. We rank the studied ships accordingly. To assure the robust-
ness of the results, we apply the ship plume segmentation model
[22] to the same dataset. We compare the results obtained using the
segmentation model with the value of the theoretical ship emission
proxy. The results of the comparison we consider to be a mea-
sure of the inspection worthiness according to the segmentation
model. The ships that are high on the inspection worthiness list of
both independently trained and validated machine learning models
LongitudeLatitude31.5°N32.5°N33.5°N19.5°E20.5°E21.5°E22.5°E23.5°E24.5°E25.5°E26.5°E27.5°E28.5°ETROPOMI Tropospheric NO2 [molec/cm2]0.500.751.001.251.501.752.002.252.50×10150.000.010.020.030.040.05Cloud fraction050100150200250300350400CountsDistribution of cloud fraction for applied dataFigure 3: High-level diagram of the proposed methodology.
(3)
* 100%
di f fd,s = 2 *
NO2;d,s − ˆNO 2;d,s
NO2;d,2 + ˆNO 2;d,s
Finally, for each ship s ∈ S : |Ds | > min_obs_nb, we integrate
the obtained differences over the observed number of days calculat-
ing arithmetic mean μ (di f fs ) and standard deviation σ (di f fs ) of
the observed differences. The |Ds | is the number of days when the
ship s was observed, min_obs_nb is the minimal number of days
we require the ship to be present in the dataset so that its profile
is representative enough to make the decision about being anoma-
lously emitting. Figure 4 represents the number of ship occurrences
in the dataset used for the training of the regression model. In this
study5, we set min_obs_nb = 3.
:
IW regr
s
A high value of μ (di f fs ) represents a situation when the real
value of NO2 for a given ship was repeatedly underestimated by
the model. This means that the amount of NO2 that was registered
by the TROPOMI for a given ship was consistently higher than
can be expected given the ship's characteristics and operational
atmospheric conditions. Thus, we consider μ (di f fs ) to be a measure
of the inspection worthiness of the ship in accordance with the
regression model IW regr
s
= μ (di f fs )
(4)
The value σ (di f fs ) is a measure of the consistency of the ob-
tained results. Since the satellite measurement results have a lower
limit and do not have an upper limit, a very high σ (di f fs ) can only
occur from the fact that very high values of NO2 were assigned to
a ship that on a regular basis does not produce that much – only
high NO2 outliers can cause a high standard deviation. Such a situ-
ation is not of our interest. Therefore, ships with outlying values of
σ (di f fs ) will be removed from the analysis. The value of σ (di f fs ) is
considered to be outlying if σ (di f fs ) > μ (σ (di f fs )) +2σ (σ (di f fs )),
which corresponds to 5% of the highest observations of σ (di f fs ).
5Providing more ship observation data is available, the level of min_obs_nb can be
increased further.
Figure 4: Histogram of occurrences of the same ship in the
created dataset. The black line indicates the set level of
min_obs_nb. Only ships that have been observed more than
min_obs_nb = 3 days are taken into account for the detection
of anomalously emitting ships.
4.1.2 Defining region of interest. The RoI of the ship defines a re-
gion within which the concentration of NO2 caused by a given ship
will be predicted. In this study, we use a method of RoI assignation
presented in [21].
First, we estimate the trajectory of the ship – a ship track – using
AIS ship data, starting from two hours before, until the moment of
the satellite overpass (c.f. Figure 5a). The observation duration of
two hours was selected considering an average lifetime of NOx [9].
Secondly, we assume that the plume emitted by a ship has moved
in accordance with wind direction by a distance d = v × |Δt |, where
v is the local wind speed for a coinciding time, and |Δt | is a time
difference between the time of the satellite overpass and the time
of a given AIS ship position. In this way, we obtain a trajectory that
123456789Number of ship occurance in the dataset0100200300400500600700800CountsHistogram of ships' observations in the dasetS.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Figure 5: Ship sector definition pipeline. Background – the TROPOMI NO2 signal for the area around the analyzed ship. Two
ship plumes can be distinguished, but only one is of interest. (a) Ship track – estimated, based on AIS data records. The ship
track is shown for the time period starting from 2 hours before until the moment of the satellite overpass. (b) Wind-shifted
ship track – a ship track shifted in accordance with the speed and direction of the wind. It indicates the expected position
of the ship plume. A black arrow indicates the wind direction. (c) Extreme wind-shifted ship tracks – calculated, based on
wind information with assumed uncertainties; define the borders of the ship sector. (d) A resulting ship sector – an ROI of an
analyzed ship. For all presented images, the size of the pixel is equal to 4.2 × 5 km2.
Feature type
Ship related
State of the atmosphere
Priors for background
Feature name
Ship length
Ship speed
Ship heading
Gross tonnage
Ship type
Wind speed
Wind direction
Surface albedo
Solar zenith angle
Measurement month
Average NO2 VCDtrop outside RoI
Average NO2 SCD outside RoI
AMF outside RoI
Sensor zenith angle
Table 1: List of features used for the regression model.
we call a wind-shifted ship track. An illustration of a wind-shifted
ship track is depicted in Figure 5b.
Both wind speed and wind direction are assumed to be constant
for the whole time during which we study the plume. Such an
assumption may create uncertainties in the expected position of
the plume of the ship. Therefore, in the third step, we calculate the
extreme wind-shifted tracks, by adding the margin of wind-related
uncertainty to each side of the wind-shifted ship track – c.f. Figure
5c. The extreme wind-shifted tracks define the borders of the RoI of
the analyzed ship that we refer to as a ship sector. The ship sector
delineates the area within which we study the plume produced by
the analyzed ship. In Figure 5d an example of a resulting RoI that
we call a ship sector is presented.
4.1.3 Model optimization. In this study, we use a nested scheme
of cross-validation (see Figure 6). Within the outer 5-fold loop of
cross-validation we create 5 "hold out" non-overlapping test sets
and 5 training and validation sets. The test sets are used for:
(1) Performance evaluation of the regression model.
(2) Detection of anomalously emitting ships.
We use the training and validation datasets for the optimization of
the regression model, which is happening within the inner loop of
cross-validation.
The task of model optimization is tackled using automated ma-
chine learning (AutoML) [15]. With AutoML, we aim to solve a
so-called CASH problem, which stands for Combined Algorithm
Selection and Hyperparameter optimization [19]. Given the absence
of available benchmarks for our original dataset, such a technique
allows for an efficient selection of a regression model and fea-
ture preprocessor from among a wide variety of machine learning
models and feature transformation techniques without preliminary
model selection experiments. In this study, we address the CASH
problem using TPOT (Tree-based Pipeline Optimization Tool) [27]
– a Python package for automatic selection of machine learning
pipelines based on genetic programming (GP) [20].
The results obtained using the TPOT AutoML library are bench-
marked towards the results obtained using the eXtreme Gradient
Boosting (XGBoost) [5] regression model with the default hyperpa-
rameters settings. The XGBoost model is considered to be a good
choice when it comes to tabular data [14], as well as showed the
best performance on the same type of data in our previous study
[22]. We, therefore, have adapted it as a baseline method.
4.1.4 Model evaluation metrics. In this study, we used three mea-
sures of regression model quality. The first one is the Pearson
correlation coefficient – a measure of linear correlation between
(a)Ship trackShip track(b)Wind-shifted ship trackShip trackWind-shifted track(c)Extreme wind-shifted tracksWind-shifted trackExtreme tracks(d)Ship sectorExtreme tracksFigure 6: Applied scheme of cross-validation. In the outer loop, we generated five test sets that were used for the regression
model performance evaluation, as well as for the detection of anomalously emitting ships. In the inner loop, the generated
training and validation sets were used by AutoML algorithms to optimize machine learning pipelines for regression models.
two variables. The Pearson correlation coefficient ρ is defined as:
ρ =
Cov (Y , ˆY )
σ (Y )σ ( ˆY )
(5)
where Cov is the covariance, σ (Y ), and σ ( ˆY ) are standard deviations
of real and predicted values of a target variable respectively. The
value ρ = 1 indicates a perfect linear correlation, value ρ = −1
indicates perfect linear anti-correlation, and ρ = 0 is the total
absence of linear correlation.
The second measure used is a coefficient of determination R2.
The R2 is defined as:
R2 = 1 −
(cid:205)(yi − ˆyi )2
(cid:205)(yi − ̄y)2
(6)
The R2 ∈ [0; 1] is a measure of the goodness of fit of a model and
is interpreted as the part of the variation of the predicted variable
that is explained by the regression model. The R2 = 1 suggests
that the predictions obtained with a regression model fit the data
perfectly well. In this study, we use R2 as the objective function for
all regression models evaluated during the AutoML selection of the
optimal regression model.
The third evaluation metric is a Spearman correlation coefficient.
Assuming R(Y ) and R( ˆY ) are ranks of the corresponding variables,
we define the Spearman correlation coefficient rs ∈ [−1; 1] as:
rs = ρ (R(Y )R( ˆY ))
(7)
The Spearman coefficient tells how well a relationship between
real and predicted values of a target variable can be described by
a monotonic function. A perfect Spearman correlation of rs = 1
or rs = −1 is achieved when one variable is a perfect monotonic
function of the other.
4.2 Detection of anomalously emitting ships
In order to assure the robustness of the proposed method for detect-
ing anomalously emitting ships, we compare the results obtained
with the regression model with another, independently trained and
validated machine learning model applied to the same dataset. We
intersect the results obtained with both considered models in order
to obtain a list of potentially anomalously emitting ships. Hereafter,
we introduce the ship plume segmentation model [22] that is added
to the presented regression model as a decision support tool, and
explain how the results of both models are used to make a decision
regarding the candidate selection of anomalously emitting ships.
Segmentation Model. As a support tool for the presented
4.2.1
regression model, we use the ship plume segmentation model pre-
pared in accordance with the methodology introduced in [22] and
trained using the dataset (for details, see Appendix B) provided in
the same study. Here, we provide a formal introduction of the used
approach.
For a given ship s ∈ S on a given day d ∈ D, the estimated
amount of NO2 can be expressed as:
ˆNO 2;d,s =
∑︁
ˆyi * ˆNO 2,i,
(8)
i ∈RoId,s
where RoI is defined in the same way as it was explained for the
regression model (see Section 4.1.2), and ˆyi ∈ {0, 1} is an output of
the segmentation model for a TROPOMI pixel i within a RoI of the
ship s on a day d. Details on the segmentation model can be found
in Appendix C.
EntireavailabledatasetTraining setTest setTraining setValidationOuter loopModel performance evaluationInner loopModel selectionand optimizationof hyperparametersFollowing the methodology from [22], to validate the results
obtained with the segmentation model, we use a theoretical ship
emission proxy Ed,s [13] defined as:
(9)
where Ls is the length of the ship s in m, and ud,s is its average
speed on a day d in m/s, derivation details see [13].
Ed,s = L2
s * u3
d,s
For each ship s ∈ S : |Ds | > min_obs_nb, we integrate the
ˆNO 2;d,s and Ed,s over the days of observation by calculating their
arithmetic means μ ( ˆNO 2;d,s ) and μ (Ed,s ) respectively.
We assume that μ ( ˆNO 2;s ) is linearly proportional to μ (Es ). There-
fore, we can express it as:
μ ( ˆNO 2;s ) = α * μ (Es ) + β + εs,
(10)
where α and β are the parameters of the fitted linear equation. We
consider εs the measure of the inspection worthiness of the ship in
accordance with the segmentation model:
IW segm
s
= εs
(11)
In the case of the ship plume segmentation model, the measure of
consistency of the results is a standard deviation of estimated values
of NO2, σ ( ˆNO 2;s ). The ships for which σ ( ˆNO 2;s ) > μ (σ ( ˆNO 2;s )) +
2σ (σ ( ˆNO 2;s )) are considered to be outlying and will not be taken
into consideration.
4.3 Merge of two models to identify anomalous
ships
In order to identify anomalously emitting ships, we intersect the
results obtained with the two independently trained/validated ma-
chine learning models: a newly developed regression model for the
prediction of ship's NO2 within the assigned RoI, and ship plume
segmentation model developed in previous study [22]. To assure
the comparability of the results, we perform a normalization of the
inspection worthiness measures obtained from both used methods,
defining norm_IW regr
∈ [0, 1]. The normalization
s
is performed using min-max scaling applied on IWregrs and IWsegms
such that:
, norm_IW segm
s
s
)
=
(12)
norm_IW regr
norm_IW segm
− min(IW regr
s
) − min(IW regr
s
− min(IW segm
s
) − min(IW segm
IW regr
s
max (IW regr
s
IW segm
s
max (IW segm
s
Providing a decision threshold t, the ship is assigned to the list
of anomalously emitting ships in accordance with the following
rule:
norm_IW regr
> t ∧ norm_IW segm
(13)
=
)
)
)
s
s
s
s
> t ⇐⇒ s ∈ Anomalous_emitters,
such that:
(14)
S.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Method
Pearson
Spearman
R2
TPOT
Default XGBoost
0.740 ± 0.058
0.715 ± 0.057
0.664 ± 0.042
0.622 ± 0.037
0.538 ± 0.08
0.497 ± 0.098
Table 2: Regression model results. Hyperparameters applied
for AutoML optimization: Maximal evaluation time: 10 min;
Population size: 50; Number of generations: 50; Early stop-
ping criteria: 10.
Feature processor
Model
MaxAbs Scaler
MaxAbs Scaler
Polynomial Features (2nd deg.)
Standard Scaler
Standard Scaler
Gradient Boosting [12]
Gradient Boosting
XGBoost [5]
Gradient Boosting
XGBoost
Table 3: A model and a feature pre-processor selected by
TPOT as optimal at a given iteration of cross-validation.
The decision about the selection of the used threshold level t is
left to the user. In this study, the threshold was manually selected
as t = 0.55.
5 RESULTS
In this Section, we present the obtained results. We first present
the results of the regression model optimization. We then show the
aggregated results of the application of the regression and segmen-
tation models and perform the selection of potentially anomalously
emitting ships. Finally, using a one-way ANOVA analysis of group
differences, we inspect the obtained results on the presence of a de-
cision bias resulting from the merge of regression and segmentation
models.
5.1 Regression model optimization
In Table 2, we present the results of the regression model optimiza-
tion. The application of the TPOT pipeline optimization algorithm
allowed us to substantially improve the results over the default XG-
Boost regression model that was used as a baseline, in accordance
with all three used quality measures. In Table 3, we provide the
models and feature pre-processing methods that were selected as
optimal (best performance on validation set) at each iteration of
cross-validation. The XGBoost model was still one of the most often
selected optimal models. Even in this scenario, the advantage of the
application of AutoML was gained by the possibility of selection of
feature pre-processing method, as well as by the performance of
automatic optimization of the hyperparameters of the model such
as a number of estimators, maximal depth, learning rate, subsample,
and minimal child weight. Another selected model was the related
Gradient Boosting algorithm.
Anomalous_emitters = {s1, ..., sn } :
norm_IW regr
* norm_IW segm
si
si
< norm_IW regr
si+1
* norm_IW segm
si+1
(15)
5.2 Detection of anomalously emitting ships
Here, we analyze the results of the application of the regression and
plume segmentation model with the aim of detecting anomalously
Ship type
Ship Id σ (di f f )
Tanker
Container
1
2
3
1
2
3
0.36
0.33
0.12
0.57
0.17
0.22
σ ( ˆNO 2)
2.03 *1016
1.4 *1016
0.65 *1016
1.5 *1016
0.99 *1016
1.5 *1016
Table 4: Measures of results consistency of regression
(σ (di f f )) and segmentation (σ ( ˆNO 2)) models, for ships iden-
tified as anomalous emitter. Ship Ids are in accordance to the
numbers assigned in Figures 11 and 12 for containers and
tankers respectively.
of μ ( ˆNO 2;s ) for each ship and averaged ship emission proxy μ (Es ).
The black line indicates the fitted linear trend. The gray dashed
lines indicate the ship inspection worthiness IW segm
in accordance
with the segmentation model. The ships for which the IW segm
is
s
the highest are of our main interest.
s
As a next step, we combine the errors obtained from the regres-
sion model with the errors of the ship plume segmentation model.
Figures 11, 12 visualize the combined inspection worthiness for
containers and tankers respectively. Each of the figures is split
into four zones: green, red, and two yellow. The size of the ship
markers is scaled in accordance with the average value of the emis-
sion proxy calculated for this ship. The ships located in the green
zone of the plots, we consider as weak emitters, because both of
the models overestimate the actual level of NO2 produced by the
respective ship. The two yellow zones of the figures indicate ships
for which one of the models overestimates the actual level of NO2,
while the other model underestimates the actual level. This can be
due to the low resistance of the particular machine learning model
to certain types of difficult modeling conditions as, for instance, a
combination of land-based NO2 sources, plume accumulated within
one TROPOMI pixel, etc. Finally, the red zone of the plot indicates
ships for which the measures of inspection worthiness of both
models achieve the highest values. We call those ships potentially
anomalously emitting since throughout two years of analysis they
were producing more than is expected based on their characteris-
tics and operational atmospheric conditions. Clearly, to make final
conclusions, the detected ships should be studied closer.
5.3 Visual verification of potential anomalous
emitters
In order to make final conclusions regarding the ships that were
identified by the proposed method as anomalously emitting, as a
next step, we visually analyzed the TROPOMI measurements re-
lated to those ships. Figures 13 – 15 provide the TROPOMI images
for red-zone container ships, while Figures 16 – 18 provide the
measurements for the red-zone tankers. We also checked the con-
sistency of the results obtained for the red-zone ships (c.f. Table
4).
We can see that for containers, even if there were other ships
present in the area, the NO2 plumes produced by the ship of interest
Figure 7: A measure of the consistency of results of the re-
gression model σ (di f fs ). The ships s for which the values of
σ (di f f ) are higher than the threshold indicated by the verti-
cal lines will be removed from the analysis.
Figure 8: A measure of the consistency of results of the ship
plume segmentation model σ ( ˆNO 2;s ). The ships s for which
the values of σ ( ˆNO 2) are higher than the threshold indicated
by the vertical lines will be removed from the analysis.
emitting ships. First, for each model, we calculated the measures of
the consistency of the results, i.e. σ (di f fs ) and σ ( ˆNO 2;s ), removing
the resulting outlying values from the analysis. The histograms of
the consistency measures of the regression and the segmentation
models along with the cut-off thresholds are presented in Figures 7
and 8 respectively.
In Figure 9, we depict the integrated results of the regression
model for each studied ship (μ (di f fs ), σ (di f fs )) and rank them in
ascending order of inspection worthiness, IW regr
= μ (di f fs ). Ships
for which the difference between the real and predicted values of
NO2 is strongly positive are the most interesting for us. Figure 10
presents the resulting relationship between the averaged amounts
s
20406080100120(diff)0246810121416CountsMeasure of results' consistency - regression modelContainerTanker0.00.51.01.52.02.53.0(NO2)1e16024681012CountsMeasure of results' consistency - segmentation modelContainerTankerS.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Figure 9: The triangle-shaped markers indicate the measure of ship inspection worthiness in accordance with the regression
model IW regr
. The vertical lines indicate σ (di f fs ) - the measure of the consistency of results for a given ship.
s
Figure 10: Relation between the estimated amount of NO2 using the segmentation model and ship emission proxy with a fitted
linear trend. Gray dashed lines indicate the measure ship inspection worthiness IW segm
according to the plume segmentation
model.
s
can always be visually distinguished from the background and
from the other plumes. Moreover, for each ship, there are at least
two measurement days where there are no other candidates for
producing the registered NO2 plumes apart from the studied ship.
We can also see that the obtained values of the consistency of the
results are always from the middle of the data distribution (see
Figures 8, 7). Therefore, to this point, we do not have reasons to
remove any of the selected ships from the list of anomalous emitters.
In the case of tankers, the situation is different. We can notice
that for anomalous emitter with Id 1 the obtained σ ( ˆNO 2) is very
high and close to the applied cut-off threshold. Analyzing Figure
16, we can see that the cause of such a high standard deviation is
a potential plume of land origin present in one of the ship's RoI
(measurement from 2019-09-06). This makes us conclude that the
given ship should be removed from the list of potential anomalous
emitters.
Analyzed ship10050050100IWregrs±(diffs) [%]Inspection worthiness and results' consistency for analyzed ship - regression modelTankerContainer0.000.250.500.751.001.251.501.752.00Es [m5/s3]1e8012345(NO2;s)1e16Relation between estimated amount of NO2 and emission proxy EsContainerTankerFor the tanker with Id 2, both σ ( ˆNO 2) and σ (di f f ) are within
the distributions. However, analyzing Figure 17, we can see that at
least three times the ship was observed at the moment of crossing
the plume from another ship. From this, we conclude that the ship
was attributed to the list of anomalous emitters due to the con-
sistent NO2 contributions of nearby ships, rather than consistent
production of anomalously high levels of emission.
Finally, for the tanker with Id 3, we observe that one of the
images (measurement date: 2019-06-14) has a relatively high level
of background NO2 concentration. As a consequence, we cannot
take it into consideration in our analysis. The rest of the images,
nevertheless, show visually distinguishable NO2 plume that can be
attributed to the ship of our interest. Consequently, we conclude
that we do not have reasons to remove a given ship from the list of
anomalous emitters.
5.4 Decision bias
To select the anomalously emitting ships, we combined the results
of two independently trained models: a regression model for ship
NO2 estimation and a model of ship plume segmentation. Taking
this into account, as a final step of the analysis, we would like to
know if such a model fusion did not create any decision bias that
would pre-determine the attribution of a certain ship to a class of
strong or weak emitters. For this, we decided to study five variables
that are interesting from the point of view of result interpretability.
Three of the selected variables (ship length, ship speed, and wind
speed) were features of both regression and segmentation models.
Another two variables (Year of built – stands for the ship built year,
and Average IoU – stands for an average score of Intersection over
Union of ships RoI with the RoI of other ships6) were not a part of
any model7 but can have a potential influence on the attribution of
a ship to a class of weak or strong emitters.
To check the potential presence of decision bias, for each stud-
ied ship type, we compared the averages of the above-mentioned
features (see Table 5) and performed a univariate one-way ANOVA
test (Table 6), analyzing the statistical significance of the differ-
ences between the values of the variables from two groups of ships
– strong or weak emitters. From the obtained results, we conclude
that none of the analyzed variables had a statistically significant
influence on attributing a certain ship to a class of strong or weak
emitters. This implies the absence of decision bias related to these
variables.
6 DISCUSSION
In this study, we presented a method for detecting anomalously
NO2 emitting ships. For this, we first introduced a specifically de-
signed regression model for the prediction of the level of NO2 of
an individual ship. The presented regression model estimates NO2
levels using remote sensing - it does not require manual labeling
and is validated using TROPOMI data directly rather than by using
emission proxy of limited flexibility like it has been done before.
The model was trained on historical TROPOMI data. Therefore,
6Given two areas of interest, IoU is computed as the surface of their overlap divided
by the surface of their joint area.
7The variables were tested in the preliminary phase of our regression model experi-
ments but were removed due to the negative impact on model performance.
Figure 11: Ship type: Container. Combination of results of
segmentation and regression models. Values of the inspec-
tion worthiness obtained from each model were normalized
using min-max scaler.
Figure 12: Ship type: Tanker. Comparison between results of
segmentation and regression models. Values of the inspec-
tion worthiness obtained from each model were normalized
using min-max scaler.
0.00.20.40.60.81.0norm_IWregrs0.00.20.40.60.81.0norm_IWsegms123Ship type: ContainerEmission proxy0.81.62.43.24.00.00.20.40.60.81.0norm_IWregrs0.00.20.40.60.81.0norm_IWsegms123Ship type: TankerEmission proxy1.53.04.56.0S.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Figure 13: Ship type: Container. Example of an outlying ship 1. Ship length: 398 m. Average ship speed: 19.6 kt. Year of built:
2008. Lines represent shifted ship tracks. Magenta line – ship of interest. Cyan line – other ships in the area. Pixels with higher
intensity indicate RoIs of the analyzed ship and ships in its neighborhood, if present.
Figure 14: Ship type: Container. Example of an outlying ship 2. Ship length: 363 m. Average ship speed: 17.5 kt. Year of built:
2009\2011 (The information about the year of built of the ship differs in dependence on the used source.). Lines represent
shifted ship tracks. Magenta line – ship of interest. Cyan line – other ships in the area. Pixels with higher intensity indicate
RoIs of the analyzed ship and ships in its neighborhood, if present.
Figure 15: Ship type: Container. Example of an outlying ship 3. Ship length: 397 m. Average ship speed: 18.4 kt. Year of built:
2006. Lines represent shifted ship tracks. Magenta line – ship of interest. Cyan line – other ships in the area. Pixels with higher
intensity indicate RoIs of the analyzed ship and ships in its neighborhood, if present.
2020-11-282020-10-042020-06-132019-07-130.250.500.751.001.251.501.751e152020-08-142020-05-212019-04-112019-06-270.250.500.751.001.251.501.751e152020-06-272019-07-292020-07-262019-04-112019-06-290.250.500.751.001.251.501.751e15Figure 16: Ship type: Tanker. Example of an outlying ship 1. Ship type: Tanker. Ship length: 180 m. Average ship speed: 15.3
kt. Year of built: 2016. Lines represent shifted ship tracks. Magenta line – ship of interest. Cyan line – other ships in the area.
Pixels with higher intensity indicate RoIs of the analyzed ship and ships in its neighborhood, if present.
Figure 17: Ship type: Tanker. Example of an outlying ship 2. Ship length: 315 m. Average ship speed: 16.1 kt. Year of built: 2008.
Lines represent shifted ship tracks. Magenta line – ship of interest. Cyan line – other ships in the area. Pixels with higher
intensity indicate RoIs of the analyzed ship and ships in its neighborhood, if present.
Figure 18: Ship type: Tanker. Example of an outlying ship 3. Ship length: 179.5 m. Average ship speed: 13 kt. Year of built: 2017.
Lines represent shifted ship tracks. Magenta line – ship of interest. Cyan line – other ships in the area. Pixels with higher
intensity indicate RoIs of the analyzed ship and ships in its neighborhood, if present.
2019-09-132019-09-062020-07-292020-07-012020-05-130.250.500.751.001.251.501.751e152020-04-112020-08-122020-06-222019-06-112019-07-192020-04-282020-08-290.250.500.751.001.251.501.751e152019-09-112020-07-052019-06-142020-07-290.40.60.81.01.21.41e15S.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Ship type
Variable
Strong emitters Weak Emitters
Tanker
Container
Year of built
Ship length [m]
Ship speed [kt]
Wind speed [m/s]
Average IoU
Year of built
Ship length [m]
Ship speed [kt]
Wind speed [m/s]
Average IoU
2013 ± 5
224 ± 78
14.8 ± 1.5
4.9 ± 0.4
0.07 ± 0.1
2008 ± 2
386 ± 20
18.5 ± 1.
4.8 ± 0.5
0.07 ± 0.02
2009 ± 4
253 ± 66
14.8 ± 1.6
5.0 ± 0.7
0.05 ± 0.06
2012 ± 5
340 ± 70
17.1 ± 1.7
5.1 ± 0.8
0.04 ± 0.04
Table 5: Statistical summary for important factors that influence levels of produced NO2 for ships that by both models were
identified as strong and weak emitters. IoU stands for Intersection over Union.
Ship type
Variable
F statistic p-value
Tanker
Container
Year of built
Ship length
Ship speed
Wind Speed
Average IoU
Year of built
Ship length
Ship speed
Wind Speed
Average IoU
2.3
0.48
0.004
0.12
0.4
1.7
0.24
1.95
0.53
1.32
0.13
0.49
0.95
0.72
0.53
0.19
0.27
0.16
0.47
0.25
Table 6: One way ANOVA for the significance of the statisti-
cal difference between samples of ships identified as strong
and weak emitters. IoU stands for Intersection over Union.
the developed model is able to predict how much NO2 is expected
to be registered by the TROPOMI sensor for a ship with certain
properties operating at certain atmospheric conditions. Ships for
which the real registered amount of NO2 is higher than predicted
by the model were of our highest interest.
However, there are many factors that potentially can result in a
situation when the TROPOMI sensor registers more NO2 than could
have been expected: atmospheric chemistry processes, intersection
with another plume, NO2 plumes produced by land-based sources,
etc. To minimize the effect of such factors, we studied the ship
performance over an extended period of time (2 years), creating
ships' profiles composed of multiple observations. We checked how
consistent the obtained results are – if the results' variability is too
high, such a profile cannot be used for making conclusions.
We bear in mind that due to the many factors (i.a. atmospheric
processes affecting NOx → NO2 transformations, and other model-
based priors that are part of VCDtrop calculations, as described
in 3.1) the TROPOMI NO2 columns cannot be treated as a ground
truth that precisely quantifies the amount of NOx emitted by a
studied ship. Therefore, to use the proposed regression model for
the detection of anomalously emitting ships, we combined it with
another machine learning model for ship NO2 estimation. This is a
ship plume segmentation model that takes into account the spatio-
temporal distribution of a ship plume, which compensates for the
main disadvantage of the proposed regression model, where the
NO2 within the ship sector is summarized rather than treated pixel-
wise. The used plume segmentation model is trained with human-
made annotations and is validated using a theoretical ship emission
proxy. All above-mentioned allow us to assume that the results
produced with the segmentation model will be independent of those
obtained with the regression model applied to the same dataset. The
ships that were nominated as repeatedly highly emitting by both
of the models, we considered potentially anomalously emitting.
For ships identified as anomalous emitters, we visually inspected
the corresponding TROPOMI measurements. For 4 out of 6 ships
that were initially classified as anomalous emitters we did not find
any major factors unrelated to that ship that could have affected
the obtained results. The two other ships, however, were selected
as anomalous emitters as a result of repeated intersection with the
plumes from another source or land outflow. Even though measures
to prevent such situations were taken upon the construction of
the method, due to the high irregularities of both atmospheric
chemistry processes and ship trajectories, it is still very difficult to
fully eliminate from the analysis or properly process such signal
interference cases.
As a last step of the analysis, we checked whether the performed
fusion of models did not create the additional biases that predeter-
mine the attribution of a ship to a class of anomalous emitters. For
this, we performed a one-way ANOVA test of group differences.
We selected a set of variables that were model features of both used
machine learning approaches and a set of variables that were not
used by any of the models but can potentially introduce the bias
into results. None of the studied variables showed a statistically
significant difference between the group of high and low emitters.
Nevertheless, the used one-way ANOVA test allows us to study
the influence of single variables only, ignoring the inter-group ef-
fects that may come from the combination of variables. The small
number of anomalous ships restricts us from the application of
multivariate approaches to this problem.
In this study, by observing a ship throughout several days of
performance, we took into account the temporal consistency of the
levels of emission from that ship. As a future work, we propose to
examine also spatial consistency. This can be done by performing
similar experiments on multiple parts of a shipping route. However,
due to the different meteorological conditions, different levels of
concentration of outflows from land, as well as possibly different
priors (such as AMF) taken for VCD calculations, such an extension
will require the training of separate regression and segmentation
machine learning models, which in case of segmentation model
comes with labeling a new dataset.
Finally, the dynamic of the atmospheric processes affects how
fast and how much NO2 will be created from NOx emitted by a ship.
In this study, we implicitly addressed the atmospheric chemistry
processes by using features such as the month the observation took
place (seasonability) and solar angle. As an improvement of the
current methodology, we suggest the explicit modeling of atmo-
spheric chemistry through a regression model. For instance, by
the introduction of such features as ozone concentration or air
temperature.
7 CONCLUSIONS
In this study, we applied a combination of machine learning-based
methods on TROPOMI satellite data and presented an approach
for automatic identification of anomalously NO2 emitting ships.
Our approach allows the automatic processing of a huge amount
of satellite remote sensing data in order to select ships for inspec-
tion the ships that consistently emit more than can be inferred
based on their properties and sailing conditions. With the proposed
methodology, the selected cases for inspection are based on multi-
day observations of a given ship. With this, we harvest the main
advantage of satellite observations over the existing approaches
for ship compliance monitoring, with which the decisions have to
be made on the basis of a single observation only. The proposed
methodology can be used as a recommendation system for ship
inspectors.
ACKNOWLEDGMENTS
This work is funded by the Netherlands Human Environment and
Transport Inspectorate, the Dutch Ministry of Infrastructure and
Water Management, and the SCIPPER project, which receives fund-
ing from the European Union's Horizon 2020 research and innova-
tion program under grant agreement Nr.814893.
REFERENCES
[1] Jörg Beecken, Johan Mellqvist, Kent Salo, Johan Ekholm, and J-P Jalkanen. 2014.
Airborne emission measurements of SO 2, NO x and particles from individual
ships using a sniffer technique. Atmospheric Measurement Techniques 7, 7 (2014),
1957–1968. https://doi.org/10.5194/amt-7-1957-2014
[2] S Beirle, U Platt, R Von Glasow, M Wenig, and T Wagner. 2004. Estimate of
nitrogen oxide emissions from shipping by satellite remote sensing. Geophysical
Research Letters 31, 18 (2004). https://doi.org/10.1029/2004GL020312
[3] Heinrich Bovensmann, JP Burrows, M Buchwitz, Johannes Frerick, Suresh Noel,
VV Rozanov, KV Chance, and APH Goede. 1999. SCIAMACHY: Mission objectives
and measurement modes. Journal of the atmospheric sciences 56, 2 (1999), 127–150.
https://doi.org/10.1175/1520-0469(1999)056<0127:SMOAMM>2.0.CO;2
[4] John P Burrows, Mark Weber, Michael Buchwitz, Vladimir Rozanov, Annette
Ladstätter-Weissenmayer, Andreas Richter, Rüdiger DeBeek, Ricarda Hoogen,
Klaus Bramstedt, Kai-Uwe Eichmann, et al. 1999. The global ozone monitoring
experiment (GOME): Mission concept and first scientific results. Journal of
the Atmospheric Sciences 56, 2 (1999), 151–175. https://doi.org/10.1175/1520-
0469(1999)056<0151:TGOMEG>2.0.CO;2
[5] Tianqi Chen and Carlos Guestrin. 2016. Xgboost: A scalable tree boosting system.
In Proceedings of the 22nd acm sigkdd international conference on knowledge
discovery and data mining. 785–794. https://doi.org/10.1145/2939672.2939785
[6] Liangxiao Cheng, Jinhua Tao, Pieter Valks, Chao Yu, Song Liu, Yapeng Wang,
Xiaozhen Xiong, Zifeng Wang, and Liangfu Chen. 2019. NO2 retrieval from the
environmental trace gases monitoring instrument (EMI): preliminary results and
intercomparison with OMI and TROPOMI. Remote sensing 11, 24 (2019), 3017.
https://doi.org/10.3390/rs11243017
[7] James J Corbett, James J Winebrake, Erin H Green, Prasad Kasibhatla, Veronika
Eyring, and Axel Lauer. 2007. Mortality from ship emissions: a global assessment.
Environmental science & technology 41, 24 (2007), 8512–8518. https://doi.org/10.
1021/es071686z
[8] Monica Crippa, Diego Guizzardi, Marilena Muntean, Edwin Schaaf, Frank Den-
tener, John A Van Aardenne, Suvi Monni, Ulrike Doering, Jos GJ Olivier, Va-
lerio Pagliari, et al. 2018. Gridded emissions of air pollutants for the period
1970–2012 within EDGAR v4. 3.2. Earth Syst. Sci. Data 10, 4 (2018), 1987–2013.
https://doi.org/10.5194/essd-2018-31
[9] Benjamin de Foy, Zifeng Lu, David G. Streets, Lok N. Lamsal, and Bryan N.
Duncan. 2015. Estimates of power plant NOx emissions and lifetimes from
OMI NO2 satellite retrievals. Atmospheric Environment 116 (2015), 1–11. https:
//doi.org/10.1016/j.atmosenv.2015.05.056
[10] Henk Eskes, Jos van Geffen, Folkert Boersma, Kai-Uwe Eichmann, Arnoud Apit-
uley, Mattia Pedergnana, Maarten Sneep, J. Pepijn Veefkind, and Diego Loyola.
2022. Sentinel-5 precursor/TROPOMI Level 2 Product User Manual Nitrogendioxide.
Technical Report S5P-KNMI-L2-0021-MA.
[11] Douglas P Finch, Paul I Palmer, and Tianran Zhang. 2022. Automated detection of
atmospheric NO 2 plumes from satellite data: a tool to help infer anthropogenic
combustion emissions. Atmospheric Measurement Techniques 15, 3 (2022), 721–733.
https://doi.org/10.5194/amt-15-721-2022
[12] Jerome H Friedman. 2002. Stochastic gradient boosting. Computational statistics &
data analysis 38, 4 (2002), 367–378. https://doi.org/10.1016/S0167-9473(01)00065-
2
[13] Aristeidis K Georgoulias, K Folkert Boersma, Jasper van Vliet, Xiumei Zhang,
Prodromos Zanis, Jos de Laat, et al. 2020. Detection of NO2 pollution plumes
from individual ships with the TROPOMI/S5P satellite sensor. Environmental
Research Letters 15, 12 (2020), 124037. https://doi.org/10.1088/1748-9326/abc445
[14] Léo Grinsztajn, Edouard Oyallon, and Gaël Varoquaux. 2022. Why do tree-based
models still outperform deep learning on tabular data? arXiv:arXiv:2207.08815
[15] Frank Hutter, Lars Kotthoff, and Joaquin Vanschoren. 2019. Automated machine
learning: methods, systems, challenges. Springer Nature. https://doi.org/10.1007/
978-3-030-05318-5
[16] IMO. 1997.
Amendments to the annex of the protocol of 1978 relat-
ing to the international convention for the prevention of pollution from
ships.
https://wwwcdn.imo.org/localresources/en/KnowledgeCentre/
IndexofIMOResolutions/MEPCDocuments/MEPC.75(40).pdf
[17] Lasse Johansson, Jukka-Pekka Jalkanen, and Jaakko Kukkonen. 2017. Global
assessment of shipping emissions in 2015 on a high spatial and temporal resolu-
tion. Atmospheric Environment 167 (2017), 403–415. https://doi.org/10.1016/j.
atmosenv.2017.08.042
[18] L. Kattner, B. Mathieu-Üffing, J. P. Burrows, A. Richter, S. Schmolke, A. Seyler,
and F. Wittrock. 2015. Monitoring compliance with sulfur content regulations of
shipping fuel by in situ measurements of ship emissions. Atmospheric Chemistry
and Physics 15, 17 (2015), 10087–10092. https://doi.org/10.5194/acp-15-10087-
2015
[19] Lars Kotthoff, Chris Thornton, Holger H Hoos, Frank Hutter, and Kevin Leyton-
Brown. 2019. Auto-WEKA: Automatic model selection and hyperparameter
optimization in WEKA. In Automated machine learning. Springer, Cham, 81–95.
https://doi.org/10.1007/978-3-030-05318-5_4
[20] John R Koza. 1994. Genetic programming as a means for programming computers
by natural selection. Statistics and computing 4, 2 (1994), 87–112. https://doi.org/
10.1007/BF00175355
[21] Solomiia Kurchaba, Jasper van Vliet, Jacqueline J Meulman, Fons J Verbeek, and
Cor J Veenman. 2021. Improving evaluation of NO2 emission from ships using
spatial association on TROPOMI satellite data. In 29th International Conference on
Advances in Geographic Information Systems. 454–457. https://doi.org/10.1145/
3474717.3484213
[22] Solomiia Kurchaba, Jasper van Vliet, Fons J. Verbeek, Jacqueline J. Meulman, and
Cor J. Veenman. 2022. Supervised Segmentation of NO2 Plumes from Individual
Ships Using TROPOMI Satellite Data. Remote Sensing 14, 22 (2022). https:
//doi.org/10.3390/rs14225809
[23] Pieternel F Levelt, Ernest Hilsenrath, Gilbert W Leppelmeier, Gijsbertus HJ
van den Oord, Pawan K Bhartia, Johanna Tamminen, Johan F de Haan, and
J Pepijn Veefkind. 2006. Science objectives of the ozone monitoring instrument.
IEEE Transactions on Geoscience and Remote Sensing 44, 5 (2006), 1199–1208.
https://doi.org/10.1109/TGRS.2006.872336
[24] A. Lorente, K. Folkert Boersma, H. Yu, S. Dörner, A. Hilboll, A. Richter, M. Liu,
L. N. Lamsal, M. Barkley, I. De Smedt, M. Van Roozendael, Y. Wang, T. Wagner,
S. Beirle, J.-T. Lin, N. Krotkov, P. Stammes, P. Wang, H. J. Eskes, and M. Krol.
2017. Structural uncertainty in air mass factor calculation for NO2 and HCHO
satellite retrievals. Atmospheric Measurement Techniques 10, 3 (2017), 759–782.
https://doi.org/10.5194/amt-10-759-2017
[25] Robert McLaren, Patryk Wojtal, Jamie D Halla, Cris Mihele, and Jeffrey R Brook.
2012. A survey of NO2: SO2 emission ratios measured in marine vessel plumes
in the Strait of Georgia. Atmospheric environment 46 (2012), 655–658. https:
//doi.org/10.1016/j.atmosenv.2011.10.044
[26] Jun Min Mou, Cees Van der Tak, and Han Ligteringen. 2010. Study on collision
avoidance in busy waterways by using AIS data. Ocean Engineering 37, 5-6 (2010),
483–490. https://doi.org/10.1016/j.oceaneng.2010.01.012
[27] Randal S Olson, Nathan Bartley, Ryan J Urbanowicz, and Jason H Moore. 2016.
Evaluation of a tree-based pipeline optimization tool for automating data science.
In Genetic and evolutionary computation conference. 485–492. https://doi.org/10.
1145/2908812.2908918
[28] Andreas Richter, Veronika Eyring, John P Burrows, Heinrich Bovensmann, Axel
Lauer, Bernd Sierk, and Paul J Crutzen. 2004. Satellite measurements of NO2
from international shipping emissions. Geophysical Research Letters 31, 23 (2004).
https://doi.org/10.1029/2004GL020822
[29] SCIPPER. 2020. Shipping Contributions to Inland Pollution Push for the Enforce-
ment of Regulations. https://www.scipper-project.eu/
[30] Maarten Sneep. 2021. Sentinel 5 precursor/TROPOMI KNMI and SRON level 2 Input
Output Data Definition. Technical Report S5P-KNMI-L2-0009-SD.
[31] W Van Roy and K Scheldeman. 2016. Results MARPOL Annex VI Monitoring
Report: Belgian Sniffer Campaign 2016. (2016).
[32] JP Veefkind, I Aben, K McMullan, H Förster, J De Vries, G Otter, J Claas, HJ Eskes,
JF De Haan, Q Kleipool, et al. 2012. TROPOMI on the ESA Sentinel-5 Precursor:
A GMES mission for global observations of the atmospheric composition for
climate, air quality and ozone layer applications. Remote sensing of environment
120 (2012), 70–83. https://doi.org/10.1016/j.rse.2011.09.027
[33] GCM Vinken, KF Boersma, A van Donkelaar, and L Zhang. 2014. Constraints
on ship NO x emissions in Europe using GEOS-Chem and OMI satellite NO
2 observations. Atmospheric Chemistry and Physics 14, 3 (2014), 1353–1369.
https://doi.org/10.5194/acp-14-1353-2014
[34] Jason E Williams, K Folkert Boersma, Phillipe Le Sager, and Willem W Verstraeten.
2017. The high-resolution version of TM5-MP for optimized satellite retrievals:
description and validation. Geoscientific Model Development 10, 2 (2017), 721–750.
https://doi.org/10.5194/gmd-10-721-2017
S.Kurchaba, J. van Vliet, F.J. Verbeek, and C.J. Veenman
Appendices
Appendix A REGRESSION MODEL
The dataset used for the regression model is composed of 4153 rows
(aggregated ship plume images). Figure 19 presents the histograms
of the distributions of the variables from the regression model
dataset.
Appendix B SEGMENTATION MODEL
DATASET
The dataset used for the training of ship plume segmentation model
is composed of 68 days of NO2 TROPOMI measurements taken
between 1 April 2019 and 31 December 2019. The dataset covers
the same area in the Mediterranean Sea as the regression model
dataset (see Section 3.1).
Appendix C SEGMENTATION MODEL
OPTIMIZATION
In [22] it was shown that the highest performance quality of the
ship plume segmentation task was achieved with XGBoost classifier.
Therefore, in this study, for the task of ship plume segmentation,
we use XGBoost model and optimize it using the methodology
from the original article. The hyperparameters The obtained cross-
validation-averaged average precision score is equal to 0.753. For
the extensive reports of the model performance evaluation, we
direct the reader to [22].
Figure 19: Distribution of variables of the dataset used in this study.
150200250300350400Ship length [m]0100200300400500600Counts121416182022Average ship speed [kt]0100200300400500600700800100200300Ship heading [deg]02004006008001000120014001600051015Wind speed [m/s]01002003004005006000100200300Wind direction [deg]02004006008001000Counts123456789101112Measurement month01002003004005006007000.00.51.01.52.02.5NO2 VCD AVG outside of ship RoI [molec/cm2]1e1501002003004005006007008000.000100.000150.000200.00025NO2 SCD AVG outside of ship RoI [mol/m2]01002003004005006001.01.52.0AMF AVG outside of ship RoI0100200300400500600Counts0.050.060.070.08Surface albedo0100200300400500600700102030405060Solar zenith angle [deg]01002003004000204060Sensor zenith angle [deg]050100150200250300350Distribution of variables from the dataset |
|
http://arxiv.org/abs/2302.13855v1 | 2023-02-24T16:47:10 | 2023-02-24T16:47:10 | Data Augmentation with GAN increases the Performance of Arrhythmia
Classification for an Unbalanced Dataset | Due to the data shortage problem, which is one of the major problems in the
field of machine learning, the accuracy level of many applications remains well
below the expected. It prevents researchers from producing new artificial
intelligence-based systems with the available data. This problem can be solved
by generating new synthetic data with augmentation methods. In this study, new
ECG signals are produced using MIT-BIH Arrhythmia Database by using Generative
Adversarial Neural Networks (GAN), which is a modern data augmentation method.
These generated data are used for training a machine learning system and real
ECG data for testing it. The obtained results show that this way the
performance of the machine learning system is increased. | [
"Okan Düzyel",
"Mehmet Kuntalp"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.13855v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.13855v1",
"@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.AI",
"cs.LG",
"68T01",
"I.2.0"
] | (Abstracts and Full-Text Papers)
4 th
4 th
(EurasianSciEnTech 2022)
(EurasianSciEnTech 2022)
14 - 16 December 2022
14 - 16 December 2022
Ankara / Turkey
Ankara / Turkey
ISBN
978-605-72134-1-9
EurasianSciEnTech 2022
EurasianSciEnTech 2022
w w w . e u r a s i a n s c i e n t e c h . o r g
w w w . e u r a s i a n s c i e n t e c h . o r g
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
➢ ORAL PRESENTATION
Data Augmentation with GAN increases the Performance of Arrhythmia Classification for an Unbalanced
Dataset
Okan Düzyel1* (ORCID: https://orcid.org/0000-0002-9123-3146),
Mehmet Kuntalp1 (ORCID: https://orcid.org/0000-0002-3381-9026.),
1Dokuz Eylül University, The Graduate School of Natural and Applied Sciences, Izmir, Turkey.
*Corresponding author e-mail: [email protected]
Abstract
Due to the data shortage problem, which is one of the major problems in the field of machine learning, the accuracy
level of many applications remains well below the expected. It prevents researchers from producing new artificial
intelligence-based systems with the available data. This problem can be solved by generating new synthetic data
with augmentation methods. In this study, new ECG signals are produced using MIT-BIH Arrhythmia Database
by using Generative Adversarial Neural Networks (GAN), which is a modern data augmentation method. These
generated data are used for training a machine learning system and real ECG data for testing it. The obtained
results show that this way the performance of the machine learning system is increased.
Keywords: ECG, generative adversarial neural networks, data augmentation.
INTRODUCTION
In today's world, it has become easy to access data thanks to the development of advanced computers, the spread
of the internet and increase in information sharing, However, data in some fields, such as medicine and
biomedicine, are insufficient in number due to the lack of data sharing and the purpose of protecting personal data.
Re-collecting and acquiring data via sensors is both time-consuming and costly. For such works, electronic devices
should be purchased, working systems should be established and necessary permits should be obtained according
to the policies. A machine learning model trained with a dataset with insufficient data and unequal sample numbers
(i.e. unbalanced data) will not be able to interpret real-life data properly and will give erroneous results. This
problem is one of the biggest obstacles to developing artificial intelligence-based devices. To overcome this
problem, classical data augmentation methods (Hoelzemann et al., 2021) can be used. However, with these
methods, the existing data is changed, and new data is not suitably produced. Although this solution works
partially, it does not give us successful results when compared to real-life data. With innovative approaches such
as Variational Auto Encoder (VAE) (Kingma & Welling, 2013) and Generative Adversarial Neural Networks
(GAN) (Goodfellow et al., 2014), new data can be effectively synthesized. These data may have more resemblance
to reality as if they were collected from real life.
With the introduction of VAE, there has been a minor revolution in data augmentation (Saldanha et al., 2022).
VAE has a structure based on Auto Encoder (AE). The auto encoder compresses the input data and then tries to
reconstruct it. In the meantime, it causes some data loss, but several features are formed on the middle layer, i.e.
the latent space, which has the lowest number of neurons. These features may be input-related features, or they
may be the information of unwanted noise at the input. For this reason, the AE features can be used for both feature
extraction purposes as well as for identifying and blocking noise (Lee et al., 2021). However, there is some data
loss as the part where VAE is insufficient compresses the data towards the latent space. This is reflected as blurring
in images and muffled sound in audio files (Hou et al., 2017; Zhu et al., 2021)
With the announcement of the GAN, there has been a real revolution in this field. Because GAN, contrary to VAE,
does not experience data loss and could synthesize much more realistic data. The working logic of GAN is based
on the principle that two deep neural networks compete with each other, i.e. Generator and Discriminator networks.
The Generator generates random data and sends the data it generates to the Discriminator. This network decides
how similar the generated data is to the real data. If it finds the data to be unrealistic, it trains the generator's
545
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
neurons by the loss value between the real data and unreal data. As a result of this training, the data produced by
the generator starts to be more realistic each time. The loss values of the Generator and Discriminator intersect at
a point. This point is called the Nash equilibrium, and at this point the generator has confused the discriminator.
At this moment, new data production is finished. GAN was first used in image synthesis (Goodfellow et al., 2014;
Ouyang et al., 2018; Siarohin et al., 2017) and later adapted to many fields. With GAN, audio files can be
synthesized (Donahue et al., 2018), as well as tabular data (Xu et al., 2019).
Many studies have been done in the literature on ECG signal synthesis with classical methods (Mukhopadhyay &
Sircar, 1995; Zigel et al., n.d.). In addition to different methods, there are studies in which GAN based ECG
synthesis (Delaney et al., 2019) and VAE based synthesis (Kuznetsov et al., 2020) are performed.
In this paper, ECG data from MIT-BIH Arrhythmia Database (Moody & Mark, 2001), is first generated by a GAN.
Then the mathematical analysis of the synthesized data and its classification success are examined.
MATERIALS AND METHODS
The MIT-BIH Arrhythmia Database comes with two parts, which are train and test sides, and consists of five
classes in total. Due to the unequal distribution of data in different classes, it is a highly unbalanced dataset. The
names and sample distributions of train data (light blue) and test data (orange) are shown in Figure1 below.
80000
70000
60000
50000
40000
30000
20000
10000
0
MIT-BIH Arrhythmia Database distribution
72471
18118
556
2223
Normal
(Class0)
Artial Premature
(Class1)
5788
1448
Premature
ventricular
contraction
(Class2)
162
641
Fusion of
ventricular and
normal
(Class3)
6431
1608
Fusion of paced
and normal
(Class4)
Figure 1. MIT-BIH Arrhythmia database distribution
When Figure 1 is examined carefully, the Normal (Class0) class dominates all other classes. This is a typical
example of unbalanced data distribution, which is not good for machine learning models. Because the model tends
to memorize data in Class 0. This causes it to be unable to successfully separate other classes from this class. A
solution is to increase the number of classes that are less in number with classical data augmentation methods.
These classical methods used to generate signals can be Time-shifting, Pitch scaling, Noise addition,
Low/High/Band-pass filters, and Polarity inversion, but ultimately this approach does not yield successful results
for every application.
We designed a GAN to augment the available ECG signals. All ECG signals in the MIT-BIH Arrhythmia Database
have been digitized by taking 187 samples, and each sample is correlated with the previous sample value. This
shows us that we should consider all the values in the signal and points out that we should use a memory-based
model. Therefore, Long Short-Term Memory GAN (LSTM-GAN) can be used to synthesize new ECG signals.
Due to its structure, LSTM does not forget previous information and tries to correlate the next values with the
546
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
previous values. In this way, information such as the rise and fall of the signal, amplitude values, frequency
changes are processed. The architecture of the LSTM-GAN model used in this study is shown in Figure 2 below.
Figure 2. LSTM-GAN Architecture
Unlike other machine learning models of GAN, there are two different loss functions defined for generator and
discriminator, and these functions are used coherently.
LD = Error(D(x), 1) + Error(D(G(z)), 0)
LG = Error(D(G(z)), 1)
H(p, q) = Ex~p(x)[−logq(x)]
min
G
max
D
V(D, G) = Ex~pdata(x)[logD(x)] + Ez~pz(z)[log (1 − D(g(z)))]
(1)
(2)
(3)
(4)
The difference of the LSTM-GAN model from the classical GAN is that there are LSTM modules inside the
Generator and Discriminator units. Apart from that, LSTM-GAN tries to decrease the loss of the Generator,
increase the loss of the Discriminator and find the Nash equilibrium value between the two, just like the classical
GAN. When this equation is established, new ECG signals are synthesized. Since Class0 is the largest class, there
is no need to synthesize new data for this class. Moreover, the make the dataset more balanced, we eliminate
uniformly some data from Class0. The following Table 1 shows the number and types of data created by GAN for
all classes and final shape of train dataset in this study.
547
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
Table 1. Data Augmentation and Balancing for all classes
Class Name
Original number
of train data
Added-Sub.
Train Data
Final Number of
Train Data
Used Method
Class 0
72471
-62471
10000
Down Sampling
Class 1
Class 2
Class 3
Class 4
2223
5788
641
6431
+7777
+4212
+9359
+3569
10000
LSTM-GAN
10000
LSTM-GAN
10000
LSTM-GAN
10000
LSTM-GAN
Now that the train dataset is balanced, it can now be used to train the machine learning model, which is used as
the classifier. Since the ECG is a 1D time-domain signal, the 1D Convolutional Neural Network (1D CNN) model
is preferred as the classifier. The architecture of the 1D CNN model used in this study is shown below in Figure
3.
RESULTS and DISCUSSION
Figure 3. 1D CNN model architecture
In order to produce new data with LSTM-GAN, each class is augmented separately by a different GAN, each of
which is optimized for generating new data especially for one class. Example of the result of these processes is
given in Figure 4.
548
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
Figure 4. A sample of Real and Synthetic ECG output for Fusion of paced and normal class
Batch Size:64 and Epoch:10 was set in the experiments and the test data was not touched in both experiments.
This is to make the test data distribution as if it was taken from real life. Number of test data used in classes is
shown in Tables 2 and Table 3, which show the experimental results of using original unbalanced and synthetically
balanced datasets.
Table 2. Classification results of original and unbalanced MIT-BIH Arrhythmia Dataset
MCC
Precision
Recall
F1-Score
Number of
Test Data
0.42
0.56
0.70
0.29
0.86
Class 0
Class 1
Class 2
Class 3
Class 4
Accuracy
Macro Avg
Weighted
Avg
0.34
0.93
0.94
1.00
0.95
0.83
0.45
0.99
0.44
0.63
0.11
0.86
0.61
0.93
0.51
0.59
0.75
0.20
0.90
0.93
0.59
0.56
18118
556
1448
162
1608
21892
21892
21892
549
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
Figure 5. Confusion matrix of original and unbalanced MIT-BIH Arrhythmia Dataset
Table 3. Classification results of augmented and balanced MIT-BIH Arrhythmia Dataset
MCC
Precision
Recall
F1-Score
Number of
Test Data
Class 0
Class 1
Class 2
Class 3
Class 4
Accuracy
Macro Avg
Weighted
Avg
0.66
0.75
0.80
0.79
0.93
-
-
-
0.67
0.88
0.89
0.79
0.97
-
0.84
0.71
0.80
0.72
0.82
0.91
0.92
-
0.83
0.81
0.73
0.79
0.84
0.84
0.94
0.83
0.83
0.75
18118
556
1448
162
1608
21892
21892
21892
550
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
Figure 6. Confusion matrix of augmented and balanced MIT-BIH Arrhythmia Dataset
Although the Accuracy values in Table 2 seems high, especially when the Recall and F1-Score values are
considered, it seems that the model failed in the classification process. In addition, when the confusion matrix in
Figure 5 is examined, it can be observed that the model trained with the unbalanced dataset makes serious errors
especially in Class1, Class2 and Class3. Recall and F1-Score values in Table 3 were improved when the dataset
was balanced with the new data synthesized with GAN. In addition, this difference is clearly seen from the
confusion matrix results in Figure 6. The reason why the accuracy value seems to decrease after the dataset is
balanced is because Class0 dominates the model in unbalanced experiment, making the system appear as if it is
successful. However, the separation of disease classes in the unbalanced case is unsuccessful.
CONCLUSION
As a result of this study, it is shown how the MIT-BIH Arrhythmia Dataset can be transformed from unbalanced
to balanced with synthesizing new ECG signals by LSTM-GAN and then how the obtained new balanced dataset
can be successfully classified using a 1D CNN architecture. The GAN based data augmentation system designed
in this study can be used to create any number of synthetic but realistic data for any ECG arrhythmia studies.
REFERENCES
Delaney, A. M., Brophy, E., & Ward, T. E. (2019). Synthesis of Realistic ECG using Generative Adversarial
Networks. http://arxiv.org/abs/1909.09150
Donahue, C., McAuley, J., & Puckette, M. (2018). Adversarial Audio Synthesis. http://arxiv.org/abs/1802.04208
Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., & Bengio, Y.
(2014). Generative Adversarial Networks. http://arxiv.org/abs/1406.2661
Hoelzemann, A., Sorathiya, N., & van Laerhoven, K. (2021). Data Augmentation Strategies for Human Activity
Data Using Generative Adversarial Neural Networks. 2021 IEEE International Conference on Pervasive
551
4th International Eurasian Conference on Science, Engineering and Technology (EurasianSciEnTech 2022) December 14-16, 2022
www.EurasianSciEnTech.org
Computing and Communications Workshops and Other Affiliated Events (PerCom Workshops), 8–13.
https://doi.org/10.1109/PerComWorkshops51409.2021.9431046
Hou, X., Shen, L., Sun, K., & Qiu, G. (2017). Deep feature consistent variational autoencoder. Proceedings - 2017
IEEE Winter Conference on Applications of Computer Vision, WACV 2017, 1133–1141.
https://doi.org/10.1109/WACV.2017.131
Kingma, D. P., & Welling, M. (2013). Auto-Encoding Variational Bayes. http://arxiv.org/abs/1312.6114
Kuznetsov, V. v., Moskalenko, V. A., & Zolotykh, N. Yu. (2020). Electrocardiogram Generation and Feature
Extraction Using a Variational Autoencoder. http://arxiv.org/abs/2002.00254
Lee, W.-H., Ozger, M., Challita, U., & Sung, K. W. (2021). Noise Learning-Based Denoising Autoencoder. IEEE
Communications Letters, 25(9), 2983–2987. https://doi.org/10.1109/LCOMM.2021.3091800
Moody, G. B., & Mark, R. G. (2001). The impact of the MIT-BIH Arrhythmia Database. IEEE Engineering in
Medicine and Biology Magazine, 20(3), 45–50. https://doi.org/10.1109/51.932724
Mukhopadhyay, S., & Sircar, P. (1995). ECG signal synthesis by exponential AM model. Proceedings of the First
Regional Conference, IEEE Engineering in Medicine and Biology Society and 14th Conference of the
Biomedical
SPC7–SPC8.
India.
https://doi.org/10.1109/RCEMBS.1995.533063
International Meet,
Engineering
Society
An
of
Ouyang, X., Zhang, X., Ma, D., & Agam, G. (2018). Generating Image Sequence from Description with LSTM
Conditional GAN. http://arxiv.org/abs/1806.03027
Saldanha, J., Chakraborty, S., Patil, S., Kotecha, K., Kumar, S., & Nayyar, A. (2022). Data augmentation using
Variational Autoencoders for improvement of respiratory disease classification. PLOS ONE, 17(8),
e0266467. https://doi.org/10.1371/journal.pone.0266467
Siarohin, A., Sangineto, E., Lathuiliere, S., & Sebe, N. (2017). Deformable GANs for Pose-based Human Image
Generation. http://arxiv.org/abs/1801.00055
Xu, L., Skoularidou, M., Cuesta-Infante, A., & Veeramachaneni, K. (2019). Modeling Tabular data using
Conditional GAN. http://arxiv.org/abs/1907.00503
Zhu, Y., Wu, Y., Latapie, H., Yang, Y., & Yan, Y. (2021). Learning Audio-Visual Correlations From Variational
Cross-Modal Generation. ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and
Signal Processing (ICASSP), 4300–4304. https://doi.org/10.1109/ICASSP39728.2021.9414296
Zigel, Y., Cohen, A., Abu-Ful, A., Wagshal, A., & Katz, A. (n.d.). Analysis by synthesis ECG signal compression.
Computers in Cardiology 1997, 279–282. https://doi.org/10.1109/CIC.1997.647885
552
|
|
http://arxiv.org/abs/2302.12736v1 | 2023-02-24T16:44:46 | 2023-02-24T16:44:46 | Balanced Off-Policy Evaluation for Personalized Pricing | We consider a personalized pricing problem in which we have data consisting
of feature information, historical pricing decisions, and binary realized
demand. The goal is to perform off-policy evaluation for a new personalized
pricing policy that maps features to prices. Methods based on inverse
propensity weighting (including doubly robust methods) for off-policy
evaluation may perform poorly when the logging policy has little exploration or
is deterministic, which is common in pricing applications. Building on the
balanced policy evaluation framework of Kallus (2018), we propose a new
approach tailored to pricing applications. The key idea is to compute an
estimate that minimizes the worst-case mean squared error or maximizes a
worst-case lower bound on policy performance, where in both cases the
worst-case is taken with respect to a set of possible revenue functions. We
establish theoretical convergence guarantees and empirically demonstrate the
advantage of our approach using a real-world pricing dataset. | [
"Adam N. Elmachtoub",
"Vishal Gupta",
"Yunfan Zhao"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12736v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12736v1",
"@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"
] | Balanced Off-Policy Evaluation for Personalized Pricing
3
2
0
2
b
e
F
4
2
]
L
M
.
t
a
t
s
[
1
v
6
3
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Adam N. Elmachtoub
Columbia IEOR and DSI
Vishal Gupta
USC Marshall
Yunfan Zhao
Columbia IEOR
Abstract
We consider a personalized pricing problem in
which we have data consisting of feature infor-
mation, historical pricing decisions, and binary
realized demand. The goal is to perform off-
policy evaluation for a new personalized pric-
ing policy that maps features to prices. Methods
based on inverse propensity weighting (includ-
ing doubly robust methods) for off-policy evalua-
tion may perform poorly when the logging policy
has little exploration or is deterministic, which is
common in pricing applications. Building on the
balanced policy evaluation framework of Kallus
(2018), we propose a new approach tailored to
pricing applications. The key idea is to com-
pute an estimate that minimizes the worst-case
mean squared error or maximizes a worst-case
lower bound on policy performance, where in
both cases the worst-case is taken with respect to
a set of possible revenue functions. We establish
theoretical convergence guarantees and empiri-
cally demonstrate the advantage of our approach
using a real-world pricing dataset.
1 INTRODUCTION
Data-driven and personalized pricing has received consid-
erable attention over the past two decades (Cohen et al.,
2017; Besbes et al., 2010; Ferreira et al., 2016; Bu et al.,
2022; Baardman et al., 2019; Wang and Zheng, 2021;
Qi et al., 2022; Biggs, 2022). Utilizing contextual informa-
tion in pricing is especially popular due to applications in
online shopping (Nambiar et al., 2019; Elmachtoub et al.,
2021), auto lending (Phillips et al., 2015; Ban and Keskin,
2021), air travel (Kolbeinsson et al., 2022) and beyond
(Chen et al., 2022; Wang et al., 2021; Aouad et al., 2019).
The increasing availability of customer data enables per-
sonalized pricing strategies. However, experimenting with
Proceedings of the 26th International Conference on Artificial
Intelligence and Statistics (AISTATS) 2023, Valencia, Spain.
PMLR: Volume 206. Copyright 2023 by the author(s).
a new personalized pricing policy that is potentially more
profitable or fairer (Cohen et al., 2022) can be costly
and difficult, motivating the use of off-policy evaluation.
Specifically, we study the problem of off-policy evaluation
for personalized pricing where feature information such as
customer order history, demographics, and market condi-
tions are observed alongside the offered prices and binary
purchase decisions.
There is an extensive literature on off-policy evalua-
tion. Inverse propensity weighting (IPW) and doubly ro-
bust (DR) methods are especially popular (Dud ́ık et al.,
2011; Hanna et al., 2017; Swaminathan and Joachims,
2015a; Thomas and Brunskill, 2016; Wang et al., 2017;
Bottou et al., 2013; Athey and Wager, 2021). Both ap-
proaches reweight historical data to make the data look as
if they were generated by the target policy that we wish
to evaluate. While initial research in the area focused on
finite, discrete action spaces, more recently Sondhi et al.
(2020); Kallus and Zhou (2018); Cai et al. (2021) propose
extensions to more general, potentially infinite, action
spaces. Biggs et al. (2021) recasts IPW methods as opti-
mizing a particular loss function and uses this insight to
propose suitable generalizations.
Each of the aforementioned methods leverages an approxi-
mation of the inverse propensity score to form weights. As
noted by Kallus (2018), an inherent shortcoming of such
approaches is that when the overlap between the target
and logging policy is limited, these methods assign large
weights to a small number of data points in the overlap
and assign zero weight elsewhere. This weighting scheme
yields high variance estimates, especially on small datasets.
In the worst-case when there is zero overlap, IPW methods
are not even well-defined.
While such cases might seem pathological, they are com-
mon in pricing applications. Many real-world firms are ret-
icent to engage in extensive randomized pricing, making
limited overlap fairly prevalent. When firms price deter-
ministically, even simple policy adjustments such as rais-
ing all prices 2% yield zero overlap. These features make
the aforementioned methods less attractive.
Many authors have proposed general purpose modifica-
tions of traditional methods to address these shortcomings.
Balanced Off-Policy Evaluation for Personalized Pricing
Elliott (2008); Ionides (2008); Swaminathan and Joachims
(2015a,b) each propose various ways to regularize the naive
IPW weights, e.g. by clipping large values, to reduce vari-
ance. These methods introduce additional bias into esti-
mates, often in ways that are instance dependent and diffi-
cult to quantify.
Other authors attempt to circumvent the issue with IPW by
focusing on policy learning – i.e., identifying a good pol-
icy – rather than policy evaluation. In cases of zero overlap,
Sachdeva et al. (2020) compares three different approaches
– restricting the action space, extrapolating reward, and re-
stricting policy spaces – and argues in favor of restricting
policy spaces. Kallus (2021) proposes a retargeting ap-
proach which reframes the optimal policy as the solution to
an alternate off-policy problem with better overlap proper-
ties and near-optimal asymptotic variance. As stated, how-
ever, neither approach directly addresses policy evaluation.
Insofar as firms are often interested in the performance of
a specific, target pricing policy that may have been chosen
for qualitative, business-specific reasons, there remains a
need for effective policy evaluation methods that balance
bias and variance and provide provable performance guar-
antees.
Inspired by the balanced policy evaluation method of
Kallus (2018), we propose an alternate approach to off-
policy evaluation for pricing applications. Like IPW and
DR methods, we estimate the performance of the policy by
a weighted average of the historical data points. However,
unlike these methods, we use weights that either (i) min-
imize the worst-case mean squared error of our estimated
revenue or (ii) maximize a worst-case lower bound on the
unknown target revenue. In both cases, the worst-case is
taken over a set of plausible revenue functions.
Our work differs from Kallus (2018) in three critical as-
(i) We focus on a binary demand response vari-
pects:
able rather than a continuous one with a homoscedastic
variance. Binary demand induces a more complex form
for the variance of our estimator and consequently com-
plicates the worst-case optimization problem defining our
weights. By contrast, the corresponding optimization in
Kallus (2018) is an unconstrained, convex quadratic pro-
gram with a closed-form solution. (ii) Although we treat
worst-case mean squared error (MSE) (similar to Kallus
(2018)), firms are also concerned with operational criteria
such as a guaranteed lower bound on revenue. We show
how our approach can be modified to compute such a lower
bound (via Bernstein's inequality) and contrast the behav-
ior of the resulting estimator with the MSE approach. (iii)
Kallus (2018) focuses primarily on the case of a small num-
ber of discrete actions, while typical pricing problems in-
volve continuous action spaces. In particular, one cannot
apply Kallus (2018) "out-of-the-box" to continuous action
spaces, since the approach assumes no structure across ac-
tions (prices) and would thus yields overly conservative es-
timates (Kallus (2020) suggests a way to address this). By
contrast, we enforce smoothness of the demand function
across prices by assuming this revenue function belongs to
a particular reproducing kernel Hilbert space (RKHS).
Paper Outline: We start in Section 2 with the notation and
setup, followed by an analysis of weighted revenue estima-
tors in Section 3. We present our off-policy evaluation ap-
proach in Section 4. In Section 5, we establish theoretical
guarantees for our approaches. We present experimental
results on both synthetic datasets and a real world pricing
dataset in Section 6. We describe heuristics for estimating
parameters in Section 7 and conclude in Section 8.
2 NOTATION AND MODEL
We assume the following (fixed-design) data generation
mechanism: We are given a set features xi ∈ X
for
i = 1 . . . , n. Price-demand pairs are distributed as
Pi ∼
Pi ∼
Di |
, xi),
g0(
*
Bernoulli(d(xi, Pi)),
i = 1, . . . , n,
i = 1, . . . , n,
,
) that maps fea-
for some unknown demand function d(
*
tures and prices to [0, 1]. Here the density g0(
) en-
*
codes our logging pricing policy, i.e. we draw a random
, x) when presented with a feature
price from density g0(
*
x. When the logging policy is deterministic, we interpret
g0(
*
, x) as a Dirac delta function.
*
*
,
Our dataset
0, 1
consists of single a realization of this process.
(xi, pi, di)
⊆ X ×
R+ × {
{
: i
[n]
}
∈
}
Loosely, our goal is to evaluate a target policy that draws
, x) when presented
a random price from the density g1(
*
with feature x. Formally, let
, xi)
i = 1, . . . , n,
Pn+i ∼
g1(
*
R for i
[n] be a corresponding realization.
and let pn+i ∈
Then, if we define the expected revenue function r(x, p) :=
pd(x, p), the expected revenue under the target policy is
∈
R
:= 1
n
= 1
n
P
n
i=1 pn+id(xi, pn+i)
n
i=1 r(xi, pn+i),
(Target Revenue)
which we emphasize is a constant. Our goal is to estimate
and provide high confidence bounds on this constant.
P
We stress that, in what follows, our method does not require
explicit knowledge of g0(
*
) or g1(
*
).
*
,
,
*
In keeping with the literature on doubly-robust estimators,
we define a reference revenue function:
Definition 1 (Reference Revenue Function). The revenue
function can be written as r(
), for a
,
) + ∆(
) = ˆr(
*
*
*
*
known reference revenue ˆr(
), and a perturbation func-
,
*
*
tion ∆(
*
).
,
,
*
*
,
*
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
,
This decomposition is without loss of generality (take
) = 0). In practice, we may have a good reference
ˆr(
*
*
model ˆr(
) that we believe reasonably captures the rev-
*
enue curve. Thus, the estimators are best thought of as a
perturbation to this reference.
,
*
R2n to be the vec-
To streamline notation, we define p
tor of prices p1, ..., p2n. Similarly, we define the vectors
r, ˆr, ∆
R2n such that for for i
[2n],
∈
∈
∈
and, of course, MSE(w, r) = Bias(w, r)2 + V ar(w, r).
3.2 High-Probability Bound
in terms of the estimate ˆ
R
We next provide a high-confidence lower bound on the true
(w). From an opera-
revenue
tional perspective, lower bounds provide "safe" guarantees
on potential revenue. Although similar techniques could be
used to form upper bounds, they are less useful in practice.
R
ri = r(xi, pi), ˆri = ˆr(xi, pi), ∆i = ∆(xi, pi).
Define
We focus on the doubly robust weighted revenue estimator
Bern(w, r) := b(w)⊤(r
n
(w) :=
ˆ
R
1
n
wi(piDi −
ˆri) +
1
n
i=n+1
X
for some weights w that we will specify.
i=1
X
2n
ˆri, (Estimator)
3 PROPERTIES OF WEIGHTED
REVENUE ESTIMATORS
We first introduce general properties of weighted revenue
estimators with honest weights, i.e., the weights are inde-
pendent of demand realizations. These properties depend
on the vector r which in practice is unknown. Nonetheless,
these properties serve as a building block for our approach
later on where we take a worst-case perspective on r.
3.1 Mean Squared Error
Define
MSE(w, r) := E
(R − ˆR(w))2
R − 1
n
h
2n
i=n+1
X
ˆri − 1
n
n
i
wi(piDi − ˆri)
i=1
X
.
(1)
2
!
=E
R
and E [pjDj] depend on the unknown revenue r.
Note
In Lemma 1 below, we provide a more explicit expression
for the MSE, which takes into account the binary nature of
demand. (See Appendix A for proofs.)
Lemma 1 (Bias and Variance Decomposition). Let
b(w) :=
v(w) :=
1
n
1
n2
(w1, . . . , wn,
1, . . . ,
1)⊤
−
−
1p1, . . . , w2
w2
npn, 0, . . . , 0
∈
⊤
R2n
R2n
∈
(cid:0)
(cid:1)
Then, we have
Bias(w, r) := E
V ar(w, r) := E
(w)
ˆ
R
h
(w)
ˆ
R
− R
i
E
(cid:20)(cid:16)
= v(w)⊤r
−
1
n2
h
r⊤
−
(cid:18)
= b(w)⊤ (r
ˆr) ,
−
2
(w)
ˆ
R
(cid:21)
i(cid:17)
1, . . . , w2
diag(w2
0
n) 0
0
(cid:19)
ˆr) +
2V ar(w; r) log(1/ǫ)
−
max
1
i
≤
≤
n |
wi|
p
pi log(1/ǫ).
(2)
+
1
3n
Lemma 2 (Revenue Lower Bound). With probability at
ǫ over the realization of (D1, . . . , Dn), we have
least 1
ˆ
that
R
Bern(w, r).
−
R ≥
(w)
−
The lemma is a direct application of Bernstein's inequality.
Remark 1 (Convexity in w). Since the expectation of a
convex function is convex, Eq. (1) shows the map w
7→
MSE(w, r) is convex in w for a fixed r. Similarly, the
function Bern(w, r) is convex in w for a fixed r since
n
1
i=1 w2
ri) is a weighted
n2
Bern(w, r) is a sum of convex
l2-norm, and, hence, w
p
functions. We will leverage these convexity properties when
formulating optimization problems to compute our weights.
V ar(w; r) =
i ri(pi −
P
7→
q
4 A BALANCED APPROACH FOR
OFF-POLICY EVALUATION IN
PRICING
The expression for mean squared error and the lower bound
in Eq. (2) depend on the unknown revenue vector r. Our
approach will be to compute weights w that optimize these
metrics over "plausible" worst case realizations of r. To
define "plausible," we make the following assumption for
the remainder of the paper:
*
*
)
k
∈ H
k * kH
∆(
*
H
and
*
.
∞
) and norm
with kernel K(
,
*
<
,
Assumption 1 (Perturbation Function is in RKHS). There
exists an RKHS
such
that ∆(
,
*
)
kH
Assumption 1 asserts that the unknown perturbation func-
tion is "smooth" in the sense that it has a bounded RKHS
), we can en-
norm. By suitably choosing the kernel K(
*
force structural constraints on ∆(
) is
*
linear in price or Sobolev smooth in the covariates. See
(Smola and Sch ̈olkopf, 2004) for details.
,
*
), e.g., that ∆(
*
*
,
*
,
For notational convenience, we let Γ :=
the Graham matrix G
2n by
R2n
×
∈
,
∆(
*
)
kH
*
k
. Define
Gij := K ((xi, pi), (xj, pj))
i, j
1
≤
≤
2n.
r,
Balanced Off-Policy Evaluation for Personalized Pricing
Under Assumption 1, the Representer Theorem (Wahba,
1990) implies that there exists α
R2n such that
∈
∆ = Gα and α⊤Gα = Γ2.
We further make the following common assumption.
Assumption 2. The Graham matrix G is invertible.
From Assumptions 1 and 2,
∆⊤G−
1∆ = Γ2.
Since d(x, p)
∈
[0, 1] for any x, p, we have
0
r
≤
≤
p.
(3)
(4)
Combining (3) and (4), we seek weights that minimize a
worst-case metrics φ(w, r) over plausible revenue func-
tions:
w∗
∈
s.t. 0
argmin
w
max
r
φ(w, r)
(5)
r
≤
≤
p ,
(r
−
ˆr)⊤G−
1(r
ˆr)
−
≤
ˆΓ2.
Here φ(w, r) can be MSE(w, r) or Bern(w, r). We de-
note the corresponding solutions by wMSE and wB, re-
spectively.
Since in practice, we do not know the ground truth Γ, we
proxy Γ by user-specified constant ˆΓ in Problem 5. (We
discuss heuristics for estimating ˆΓ in Section 7.)
Remark 2 (Unconstrained Weights). In contrast to Kallus
(2018), we do not impose an additional simplex constraint
on the weights. Indeed, the value of the target policy need
not be on the same order of magnitude as the logging pol-
icy, e.g., when we raise price significantly. Thus, an ideal
set of weights might not satisfy such a constraint. That said,
our Bernstein variant (wB) does regularize away from
norm in Eq. (2).
overly large weights via the weighted l
This regularization emerges naturally via the probabilistic
analysis rather than being imposed via an artificial sim-
plex, or normalizing, constraint.
Remark 3 (Honest vs. Dishonest Weights). When ˆr, ˆΓ,
and the kernel K(
) are specified exogenously, i.e., in-
*
dependently of the demand realizations, both wMSE and
wB are honest. We study the corresponding estimators
ˆR(wMSE) and ˆR(wB) theoretically in Section 5.
∞
,
*
In practice, we suggest fitting these parameters to the data
via the heuristics in Section 7. The resulting weights are
"dishonest." While it might be possible to extend our theo-
retical results to this setting by assuming that (ˆr, ˆΓ, K(
))
*
are chosen from a suitably low-complexity class, we do not
pursue this theoretical analysis here. Rather, we present
numerical evidence in Sec. 6 that even with dishonest
weights, our estimator performs well.
,
*
4.1 Solution Approach
We next discuss how to solve (5).
For a fixed w, consider the inner problem of finding the
worst case (WC) revenue:
rW C (w) := argmax
r
φ(w, r)
s.t. 0
r
≤
≤
p ,
(r
−
ˆr)⊤G−
1(r
ˆr)
−
≤
ˆΓ2.
Let h(w) = φ(w, rW C (w)).
φ(w, r)
is convex for each r by Remark 1, Danskin's Theorem
(Bertsekas, 1997) shows that h(w)is in fact convex in w,
and, when rW C (w) is the unique optimizer,
Since w
7→
h(w) =
wφ(w, r)
|
∇
∇
r=rW C (w).
Thus, we can minimize h(w) using any number of
gradient-based algorithms.
(In our numerical experi-
ments, we use the a first order trust-region method from
scipy.optimize.) Evaluating a gradient requires determin-
ing rW C (w), i.e., solving the inner problem.
That said, for large n, computing gradients in the Bernstein
objective is perhaps easier than for the MSE objective. For
the Bernstein objective, the inner maximization problem
can be reformulated as a concave quadratic maximization
problem in r (see Appendix B). By contrast, for the MSE
objective, the inner problem is an in-definite quadratic pro-
gramming problem. Such problems can, in the worst-case,
be NP-Hard, but are often practically solvable with modern
solvers for moderate sized instances. In our experiments,
we use Gurobi for both computations.
5 THEORETICAL RESULTS
Recall our approach to off-policy evaluation for pricing ap-
plications is partially motivated by the observation that in
typical pricing applications, the overlap between the log-
ging and evaluation policies may be small since both poli-
cies may entail little randomization. This feature precludes
the use of methods based on inverse propensity scores that
require sufficient overlap, including doubly-robust meth-
ods.
In this section we establish a "sanity-check" result, i.e., that
when sufficient overlap does exist, our method achieves
convergence rates similar to the doubly-robust methods.
R+ × X
Assumption 3 (Overlap). For all (p, x)
g0(p, x) = 0 then g1(p, x) = 0.
, if
∈
From Assumption 3, the inverse propensity (IP) weights
W IP
i
:=
g1(Pi, xi)
g0(Pi, xi)
(6)
are well-defined for all i = 1, . . . , n.
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
5.1 Mean Squared Error
We first consider wMSE and the corresponding estimator
ˆ
(wMSE ). Theorem 1 shows that true (unknown) MSE of
R
this estimator converges to zero at a rate of 1
n , despite not
) or Γ. (See Appendix C for proof.)
knowing g0(
,
*
), g1(
*
*
,
*
For convenience, let Zi = (xi, Pi) for i = 1, . . . , 2n.
Theorem 1 (Convergence of MSE). Suppose that
Bern(w, r).
If one sought a stronger two-sided conver-
gence, one could instead introduce an absolute value in
Eq. (2) and define the corresponding estimator.
In our numerical experiments, we found this "two-sided"
estimator performs worse than our proposed one-sided es-
timator. Hence we have chosen to only present theoretical
results for the one-sided estimator.
i) 1
n
n
i=1
E
ii) 1
n
P
n
i=1
E
W IP
1
i −
i Pi)2
(cid:2)(cid:0)
(W IP
K(Zn+i, Zn+i)
= O(1)
(cid:1)
= O(1)
(cid:3)
6 NUMERICAL RESULTS
We describe our numerical results, but please see our
GitHub for for reproducibility code and documentation. 1
P
(cid:2)
Then, under Assumptions 1,
MSE(wMSE , r) = Op
(cid:3)
.
1
n
2, and
3, we have
6.1 Mean Squared Error
(cid:0)
(cid:1)
,
.
}
{
}
{
∈
[n]
and
[2n]
Pi : i
Di : i
For clarity, the "probability" in Theorem 1 is taken over the
randomness in both
∈
To help develop intuition around the assumptions of the
above theorem, consider the case where K(
) is the gaus-
*
sian kernel, so that K(Zn+i, Zn+i) is almost surely a
constant. Then the first condition i) holds trivially since
E
= 1 by construction. The second condition
ii) essentially requires that for a typical point, the in-
verse propensity score weights are not too large – they are
O(1). This requirement is analogous to requiring sufficient
overlap between the logging and evaluation policies, since
W IP explodes as the overlap shrinks. In this sense, Theo-
rem 1 is a "sanity-check" result.
W IP
i
(cid:2)
(cid:3)
*
5.2 Bernstein Bound
(wB)
We next consider wB and corresponding estimator
ˆ
(wB). Recall Lemma 2 shows that, with high proba-
R
bility, ˆ
Bern(wB, r) lower bounds the true (un-
R
known) revenue. We will next show that this lower bound is
not too loose, specifically, that Bern(wB, r) = Op(1/√n).
(See Appendix D for proof.)
−
Theorem 2 (Safe Guarantee). Suppose that
i) 1
n
n
i=1
E
ii) 1
n
P
n
i=1
E
W IP
1
i −
i Pi)2
(cid:2)(cid:0)
(W IP
K(Zn+i, Zn+i)
= O(1)
(cid:1)
= O(1)
(cid:3)
P
(cid:2)
Then, under Assumptions 1,
max
0, Bern(wB, r)
= Op
(cid:3)
2, and
3, we have
1
√n
.
(cid:0)
(cid:16)
In other words, the unknown true revenue cannot exceed
our estimate by more than Op(1/√n). In this sense, our
estimate provides a "safe" guarantee that is not too loose.
(cid:17)
(cid:1)
Remark 4 (One-Sided vs. Two-Sided Bounds). In The-
orem 2, we obtain a one-sided convergence result be-
cause we used a one-sided probability bound to define
study wMSE and corresponding estimator
We first
ˆ
(wMSE ). We denote our corresponding method as
R
BOPE-B for "Balanced Off-Policy Evaluation for Binary
response."
We compare the performance of the following methods on
synethetic and real-world datasets:
• (LASSO) A "direct" regression estimator correspond-
ing to ˆ
(0). This linear regression method with l1
R
penalty predict the demand d(
), and revenue is ob-
,
*
tained from multiplying it by the price. This serves as
a baseline.
*
• (SPPE)
policy
Semi-parametric
evaluation
(Chernozhukov et al., 2019) which is an exten-
sion of the classical DR method to a setting where
the dependence of the policy value on the treatment
is known.
In pricing applications, this amounts to
specifying a priori how demand depends on price.
In our experiments, we apply the method assuming
demand is linear in price.
n
i=1 w2
• (BOPE) The Balanced Off-Policy Evaluation method
of Kallus (2018). This method can be seen as an in-
stance of Problem 5 with φ(w, r) = Bias2(w, r) +
1
i for some user-defined σ2. Loosely,
n2 σ2
this objective is the worst-case mean squared error if
piDi were homoscedastic random variables with vari-
ance σ2 and mean r(pi, xi). Thus, this method does
not exploit the binary structure of demand. We select
hyperparameters according to the heuristic proposed
in Kallus (2018) (see Section 7).
P
• (BOPE-B) Our proposed Balanced Off-Policy Evalu-
ation estimator for Binary response, ˆ
(wMSE), with
R
hyper-parameters chosen according to heuristics de-
scribed in Section 7.
1https://github.com/yzhao3685/pricing-evaluation
Balanced Off-Policy Evaluation for Personalized Pricing
For each of BOPE-B, BOPE, and LASSO, we use a
LASSO linear regression to estimate ˆr(
*
).
,
*
Before delving into the details of the experiments, we sum-
marize our main findings:
• By exploiting the binary nature of demand, the BOPE-
B estimator generally has an advantage over the BOPE
estimator, and substantive advantage of the SPPE es-
timator.
• When the baseline LASSO, itself, has small MSE,
there is little room for improvement and both BOPE
and BOPE-B perform comparably. When the base-
line estimate is poor, both BOPE and BOPE-B peform
substantively better than baseline.
• Generally, the improvements in the BOPE-B estimator
over the BOPE estimator are driven by improvements
in both bias and variance, but in many cases, the im-
provement in variance is the dominant factor.
• The SPPE method can perform quite poorly when the
assumption on the apriori structure of demand does
not hold.
6.1.1 Synthetic Datasets
We present results for two different demand functions.
(a) A Simple Demand Function
The features xi are generated uniformly random from the
1, 1]2. The logging pricing policy is Pi =
square [
−
1
2 x⊤i [1,
(0, 2) are i.i.d. noise.
1] + 7 + ǫi, where ǫi ∼ N
−
The target pricing policy is Pi = 1
2 x⊤i [1,
1] + b + ǫi,
−
where b is chosen from
and then fixed throughout
2, 3, 4
each experiment. We present results for each value of b.
}
{
The demand function is
d(x, p) =
1
4
+
3
4
where σ(y) =
1
1 + e−
σ
5
(cid:18)
y .
1
2
p
−
−
x⊤[
−
1, 1]
,
(cid:19)
The sigmoid function σ(y) is used to ensure (i) demand is
within [0,1] (ii) demand decreases while price increases.
We fix the sample size to be n = 50 throughout the exper-
iment. We use the ground truth to simulate realizations of
the binary demand vector corresponding to these 50 sam-
ple points. We repeat the procedure 100 times to obtain the
bias, variance, and MSE of the four estimators. We perform
the experiment for 30 different random seeds and report the
average results in Table 1. Notice for each random seed, we
sample a different set of features and prices.
(b) A Different Demand Function
Metrics
BOPE-B BOPE LASSO SPPE
Target Policy has b = 2.
MSE
Bias2
Variance
1.63
0.22
1.41
1.83
0.27
1.56
1.71
0.25
1.46
Target Policy has b = 3.
MSE
Bias2
Variance
1.73
0.33
1.40
1.95
0.40
1.55
1.80
0.35
1.45
Target Policy has b = 4.
MSE
Bias2
Variance
1.50
0.31
1.19
1.81
0.38
1.43
1.57
0.33
1.24
1.08
0.17
0.91
1.92
0.17
1.75
1.60
0.16
1.44
Table 1: Decomposition of the mean squared error. Syn-
thetic dataset setting (a).
We consider a different demand function
d(x, p) =
1
4
+
3
4
σ
5
(cid:18)
−
1
2
p
−
arctan(x1/x2)
.
(cid:19)
Notice this demand function is more complicated than that
in setting (a). In the sigmoid function, we now have a non-
linear function arctan(x1/x2) instead of the linear func-
tion x⊤[
1, 1].
−
The rest of the set up is the same as in part (a). We repeat
the experiment for 30 different random seeds and report the
average results in Table 2.
Metrics
BOPE-B BOPE LASSO SPPE
Target Policy has b = 2.
MSE
Bias2
Variance
1.18
0.20
0.98
1.47
0.25
1.22
1.21
0.22
0.99
Target Policy has b = 3.
MSE
Bias2
Variance
2.09
0.52
1.57
2.30
0.57
1.73
2.13
0.54
1.59
Target Policy has b = 4.
MSE
Bias2
Variance
1.99
0.38
1.61
2.18
0.45
1.73
2.05
0.41
1.64
1.43
0.14
1.29
2.22
0.46
1.76
2.42
0.27
2.15
Table 2: Decomposition of the mean squared error. Syn-
thetic dataset setting (b).
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
6.1.2 A Real World Dataset
Metrics
BOPE-B BOPE LASSO SPPE
We conduct experiments on a real world dataset of auto
loan applications collected by a major auto lender in North
America. The dataset was first studied by Phillips et al.
(2015) and later used to evaluate personalized pricing al-
gorithms by Ban and Keskin (2021). The dataset includes
data collected over a period of several years. We present
results for 5 different subsets of the Nomis dataset. To
train the models, we use two covariates: FICO score and
requested loan amount. We use the offered interest rate as
price. We consider four target policies that take the original
prices and increase/decrease them by 5 or 10%.
We impute counterfactuals,
including the expected de-
mand, using XGBoost trained on the entire subset to repre-
sent the ground truth model. We choose n = 50 and sample
these points randomly from the dataset. We use the ground
truth to simulation 100 realizations of the demand vector
corresponding to these 50 sample points, which we use to
obtain the bias and variance of the different estimators. We
repeat the experiment 30 times (with a different training set
each time) and report the average results.
In Table 3 and 4, we present results obtained from 2 dif-
ferent subsets of the Nomis dataset.
In Appendix E, we
provide results obtained from 3 other subsets of the Nomis
dataset.
Target Policy is 5% increase.
MSE
Bias2
Variance
0.39
0.09
0.30
0.46
0.11
0.35
0.45
0.11
0.34
Target Policy is 5% decrease.
MSE
Bias2
Variance
0.69
0.25
0.44
0.75
0.29
0.46
0.77
0.30
0.47
Target Policy is 10% increase.
MSE
Bias2
Variance
0.78
0.26
0.52
0.92
0.30
0.62
0.86
0.30
0.56
Target Policy is 10% decrease.
MSE
Bias2
Variance
0.38
0.10
0.28
0.56
0.10
0.46
0.36
0.10
0.26
0.80
0.15
0.65
0.58
0.14
0.44
0.80
0.13
0.67
0.38
0.10
0.28
Table 4: For each target policy and for each method, we
present the MSE, bias squared, and variance. Results ob-
tained from a subset of the Nomis dataset with Year from
2002 to 2004, Tier = 3, Car Type = Used, Term = 48, and
Partner Bin = 3. There are 578 datapoints in the subset.
Metrics
BOPE-B BOPE LASSO SPPE
6.2 Bernstein Bounds
Target Policy is 5% increase.
MSE
Bias2
Variance
0.11
0.03
0.08
0.13
0.04
0.09
0.17
0.06
0.11
Target Policy is 5% decrease.
MSE
Bias2
Variance
0.03
0.01
0.02
0.05
0.02
0.03
0.10
0.05
0.05
Target Policy is 10% increase.
MSE
Bias2
Variance
0.37
0.12
0.25
0.41
0.13
0.28
0.44
0.15
0.29
Target Policy is 10% decrease.
0.80
0.34
0.46
0.20
0.10
0.10
1.23
0.49
0.74
MSE
Bias2
Variance
0.009
0.003
0.006
0.007
0.003
0.004
0.018
0.008
0.010
0.034
0.012
0.022
Table 3: For each target policy and for each method, we
present the MSE, bias squared, and variance. Results ob-
tained from a subset of the Nomis dataset with Year = 2003,
Tier = 1, Car Type = Used, Term = 60, and Partner Bin = 1.
There are 1,065 datapoints in the subset.
We next consider wB and the corresponding estimator
ˆ
(wB). We denote the corresponding method BOPE-
R
Bern. Since the primary motivation of BOPE-Bern was
to provide high-quality safe guarantees on the revenue, we
focus our experiments on such safe guarantees, and specif-
ically comparisons to BOPE.
Recall Lemma 2 provides a safe guarantee for any set of
honest weights. Hence, to form a safe guarantee for BOPE,
we take the weights computed by BOPE, and then solve
the inner maximization problem in (5) with the Bernstein
bound objective for those weights. Since the revenue must
be non-negative, we take the positive part of the optimal
value.
If weights computed by BOPE were honest, this
procedure would yield a theoretically valid safe guaran-
tee.
Insofar as we specify hyperparameters in BOPE in
a "dishonest" fashion, the resulting safe guarantee is only
heuristically valid. (The same criticism holds for our own
method, BOPE-B, making it a fair comparison.)
Our experiments suggest BOPE-B yields much better safe
guarantees than BOPE, while providing comparably good
estimates of the actual revenue.
In Tables 5 and 6, we present results on the two synthetic
datasets described in Section 6.1.1. In Tables 7 and 8,
we present results on subsets of the Nomis dataset. The
Balanced Off-Policy Evaluation for Personalized Pricing
Target Policy
R
BOPE-Bern
Bern(wB , rW C (wB))
b = 2
b = 3
b = 4
3.51
5.10
4.95
1.07
1.97
1.81
±
±
±
0.050
0.098
0.064
ˆ
R
3.03
4.51
4.91
BOPE-B
Bern(wMSE , rW C (wMSE))
(wB)
0.054
0.102
0.048
±
±
±
0.10
0.10
0.04
±
±
±
0.016
0.024
0.014
ˆ
R
3.08
4.53
4.75
(wMSE)
0.053
0.099
0.054
±
±
±
Table 5: We present average and standard error of revenue bounds, computed from 100 demand realizations. The bounds in
BOPE-B are the worst-case Bernstein bounds with BOPE-B weights. Results obtained from synthetic dataset (a) described
in Section 6.1.1.
Target Policy
R
BOPE-Bern
Bern(wB , rW C (wB))
b = 2
b = 3
b = 4
3.86
4.59
5.23
1.29
1.76
1.57
±
±
±
0.051
0.082
0.081
ˆ
R
3.29
4.30
4.86
BOPE-B
Bern(wMSE , rW C (wMSE))
(wB)
0.054
0.073
0.072
±
±
±
0.08
0.05
0.01
±
±
±
0.017
0.021
0.008
ˆ
R
3.36
4.29
4.85
(wMSE)
0.054
0.075
0.075
±
±
±
Table 6: We present average and standard error of revenue bounds, computed from 100 demand realizations. The bounds in
BOPE-B are the worst-case Bernstein bounds with BOPE-B weights. Results obtained from synthetic dataset (b) described
in Section 6.1.1.
Target Policy
R
BOPE-Bern
Bern(wB , rW C (wB))
4.22
+5%
4.16
-5%
+10% 3.85
4.05
-10%
1.99
1.72
1.55
1.97
±
±
±
±
0.020
0.007
0.034
0.003
ˆ
R
4.13
3.87
3.70
3.82
BOPE-B
Bern(wMSE , rW C (wMSE))
(wB)
0.017
0.005
0.031
0.004
±
±
±
±
1.52
1.17
1.06
1.46
±
±
±
±
0.031
0.009
0.043
0.005
ˆ
R
4.24
4.05
3.84
4.08
(wMSE)
0.014
0.004
0.028
0.003
±
±
±
±
Table 7: We present average and standard error of revenue bounds, computed from 100 demand realizations. The bounds in
BOPE-B are the worst-case Bernstein bounds with BOPE-B weights. Results obtained from a subset of the Nomis dataset
with year = 2003, Tier = 1, Car Type = Used, Term = 60, and Partner Bin = 1. There are 1,065 datapoints in the subset.
Target Policy
R
BOPE-Bern
Bern(wB , rW C (wB))
2.77
+5%
3.35
-5%
+10% 2.87
3.67
-10%
0.45
0.53
0.21
0.55
±
±
±
±
0.021
0.028
0.018
0.027
ˆ
R
2.42
2.64
2.45
2.81
BOPE-B
Bern(wMSE , rW C (wMSE))
(wB)
0.031
0.033
0.042
0.034
±
±
±
±
0.00
0.00
0.00
0.00
±
±
±
±
0.000
0.000
0.000
0.000
ˆ
R
2.52
2.75
2.48
2.93
(wMSE)
0.032
0.030
0.045
0.034
±
±
±
±
Table 8: We present average and standard error of revenue bounds, computed from 100 demand realizations. The bounds in
BOPE-B are the worst-case Bernstein bounds with BOPE-B weights. Results obtained from a subset of the Nomis dataset
with year from 2002 to 2004, Tier = 3, Car Type = Used, Term = 48, and Partner Bin = 3. There are 578 datapoints in the
subset.
experiment details are the same as described in Section 6.
For each method, we present the one-sided 90% confidence
lower bound on revenue (i.e. we choose ǫ = 0.1). For all
experiments in this subsection, we use sample size n = 50.
7 HYPER-PARAMETER HEURISTICS
Our heuristics for fitting hyper-parameters are inspired by
the heuristics of Kallus (2018) for BOPE.
Define the revenue random variable Ri := piDi. Loosely,
Kallus (2018) assumes that the Ri are homoscedastic with
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
variance σ2 and mean r(pi, xi) for each i
[n]. They
then compute the worst-case MSE of the weighted doubly
robust estimator over a suitable RKHS ball. It turns out the
resulting expression is identical to the expected MSE of this
same estimator assuming the unknown expected revenue
function was drawn from the following Gaussian Process
Prior:
∈
r(
*
(ˆr(
*
Said differently, the worst-case MSE is equal to an ex-
pected MSE under a suitable prior.
∼ GP
), ˆΓ2K(
*
(7)
)).
)
,
*
,
,
*
*
Thus, Kallus (2018) proposes to fit any hyperparameters
needed for BOPE by using standard marginal likelihood
techniques (Williams and Rasmussen, 2006, Chapt. 5) to
instead fit the above Gaussian Process prior and then "read
off" the parameters needed for BOPE.
We follow this same strategy in our experiments. For the
kernel, we adopt a Gaussian kernel but standardize each
component by its variance. Specifically, we take
z)⊤Σ−
1(z
z)
,
K(z, z) := exp
(z
−
R+ × X
(cid:0)
(cid:1)
∈
−
−
and Σ is a diagonal matrix.
where z = (p, x)
We then optimize the choice of Σ, σ2 and ˆΓ2 to maximize
the marginal likelihood of the data under the prior Eq. (7)
(r(pi, xi), σ2).
assuming the likelihood Ri |
Because the Gaussian process prior and Gaussian like-
lihood are conjugate,
the resulting marginal likelihood
has a nice closed-form expression and the entire op-
(Again, see
timization can be represented tractably.
Williams and Rasmussen (2006) for details.)
r(
*
∼ N
)
*
,
Pi = pi ∼
Unfortunately, for the case of BOPE-B, our expression
for the worst-case MSE does not seem to match the ex-
pected MSE under a simple prior. Hence, we heuristically
seek parameters that maximize the marginal likelihood of
the data under the model Eq. (7), but now assuming that
Bernoulli(d(pi, xi)) and Ri = piDi. In
Di|
other words, we adjust the previous heuristic to account for
the binary nature of demand. For this binary likelihood, we
do not have conjugacy, and so there is no simple closed-
form expression for the marginal likelihood. Instead, we
follow Flaxman et al. (2015) and employ a Laplace approx-
imation to the marginal likelihood. The resulting approxi-
mate likelihood does admit a simple form and the resulting
maximal marginal likelihood optimization is tractable.
For our BOPE-B method, we optimize this approximate
marginal likelihood to fit Eq. (7), and read off the neces-
sary hyper-parameters.
8 CONCLUSION
(i) demand observations are binary; (ii) revenue per cus-
tomer is nonnegative and no greater than the price offered;
(iii) revenue equals demand times price; (iv) the value of
the target policy can be very different from that of the log-
ging policy, and thus weights do not need to sum to n. We
compute weights to optimize either (i) the worst-case mean
squared error of our estimate or (ii) a worst-case lower
bound on the unknown revenue of the target policy. In both
cases, the worst-case is taken over a set of plausible revenue
functions described by an RKHS ball. We establish theo-
retical guarantees showing our weighted revenue estima-
tor converges under overlap assumptions and empirically
demonstrate the advantage of our approach using a real-
world pricing dataset where there is little overlap. Future
work might consider specialized algorithms for computing
the weights in our method given its special structure, e.g.,
adapting the Mirror Prox algorithm of (Nemirovski, 2004),
the primal-dual method in (Nesterov, 2007), or various al-
gorithms for saddle point problems (Juditsky et al., 2011;
Mertikopoulos et al., 2019).
Acknowledgements
The authors are listed in alphabetical order. We acknowl-
edge the support of NSF grants CMMI-1763000, CMMI-
1944428, and IIS-2147361
References
Aouad, A., Elmachtoub, A. N., Ferreira, K. J., and McNel-
lis, R. (2019). Market segmentation trees. arXiv preprint
arXiv:1906.01174.
Athey, S. and Wager, S. (2021). Policy learning with ob-
servational data. Econometrica, 89(1):133–161.
Baardman, L., Cohen, M. C., Panchamgam, K., Perakis,
G., and Segev, D. (2019). Scheduling promotion vehicles
to boost profits. Management Science, 65(1):50–70.
Ban, G.-Y. and Keskin, N. B. (2021). Personalized dy-
namic pricing with machine learning: High-dimensional
features and heterogeneous elasticity. Management Sci-
ence, 67(9):5549–5568.
Bertsekas, D. P. (1997). Nonlinear programming. Journal
of the Operational Research Society, 48(3):334–334.
Besbes, O., Phillips, R., and Zeevi, A. (2010). Testing
the validity of a demand model: An operations perspec-
tive. Manufacturing & Service Operations Management,
12(1):162–183.
Biggs, M. (2022). Convex loss functions for contex-
tual pricing with observational posted-price data. arXiv
preprint arXiv:2202.10944.
In this paper, we have proposed a new approach for policy
evaluation tailored to pricing applications. Our approach-
ing uses special structures of pricing problems, including:
Biggs, M., Gao, R., and Sun, W. (2021). Loss functions
for discrete contextual pricing with observational data.
arXiv preprint arXiv:2111.09933.
Balanced Off-Policy Evaluation for Personalized Pricing
Bottou, L., Peters, J., Qui ̃nonero-Candela, J., Charles,
D. X., Chickering, D. M., Portugaly, E., Ray, D., Simard,
P., and Snelson, E. (2013). Counterfactual reasoning and
learning systems: The example of computational adver-
tising. Journal of Machine Learning Research, 14(11).
Boucheron, S., Lugosi, G., and Massart, P. (2013). Con-
centration inequalities: A nonasymptotic theory of inde-
pendence. Oxford university press.
Bu, J., Simchi-Levi, D., and Wang, L. (2022). Offline pric-
ing and demand learning with censored data. Manage-
ment Science.
Cai, H., Shi, C., Song, R., and Lu, W. (2021). Deep jump
learning for off-policy evaluation in continuous treat-
ment settings. Advances in Neural Information Process-
ing Systems, 34:15285–15300.
Chen, X., Owen, Z., Pixton, C., and Simchi-Levi, D.
(2022). A statistical learning approach to personal-
ization in revenue management. Management Science,
68(3):1923–1937.
Chernozhukov, V., Demirer, M., Lewis, G., and Syrgka-
nis, V. (2019). Semi-parametric efficient policy learning
with continuous actions. Advances in Neural Informa-
tion Processing Systems, 32.
Cohen, M. C., Elmachtoub, A. N., and Lei, X. (2022). Price
discrimination with fairness constraints. Management
Science, 68(12):8536–8552.
Cohen, M. C., Leung, N.-H. Z., Panchamgam, K., Perakis,
G., and Smith, A. (2017). The impact of linear opti-
mization on promotion planning. Operations Research,
65(2):446–468.
Dud ́ık, M., Langford, J., and Li, L. (2011). Doubly robust
policy evaluation and learning. In International Confer-
ence on Machine Learning, page 1097–1104. PMLR.
Elliott, M. R. (2008). Model averaging methods for weight
trimming. Journal of official statistics, 24(4):517.
Elmachtoub, A. N., Gupta, V., and Hamilton, M. L. (2021).
The value of personalized pricing. Management Science,
67(10):6055–6070.
Ferreira, K. J., Lee, B. H. A., and Simchi-Levi, D. (2016).
Analytics for an online retailer: Demand forecasting and
price optimization. Manufacturing & service operations
management, 18(1):69–88.
Flaxman, S., Wilson, A., Neill, D., Nickisch, H., and
Smola, A. (2015). Fast kronecker inference in gaus-
sian processes with non-gaussian likelihoods. In Inter-
national Conference on Machine Learning, pages 607–
616. PMLR.
Hanna, J. P., Stone, P., and Niekum, S. (2017). Bootstrap-
ping with models: Confidence intervals for off-policy
In Thirty-First AAAI Conference on Artifi-
evaluation.
cial Intelligence.
Ionides, E. L. (2008). Truncated importance sampling.
Journal of Computational and Graphical Statistics,
17(2):295–311.
Juditsky, A., Nemirovski, A., and Tauvel, C. (2011). Solv-
ing variational inequalities with stochastic mirror-prox
algorithm. Stochastic Systems, 1(1):17–58.
Kallus, N. (2018). Balanced policy evaluation and learning.
Advances in neural information processing systems, 31.
Kallus, N.
(2020).
for dynamic treatment
arXiv:2004.02778.
Comment:
regimes.
Entropy learning
arXiv preprint
Kallus, N. (2021). More efficient policy learning via opti-
mal retargeting. Journal of the American Statistical As-
sociation, 116(534):646–658.
Kallus, N. and Zhou, A. (2018). Policy evaluation and op-
timization with continuous treatments. In International
conference on artificial intelligence and statistics, pages
1243–1251. PMLR.
Kolbeinsson, A., Shukla, N., Gupta, A., Marla, L., and
Yellepeddi, K. (2022). Galactic air improves ancillary
revenues with dynamic personalized pricing. INFORMS
Journal on Applied Analytics.
Mertikopoulos, P., Lecouat, B., Zenati, H., Foo, C.-S.,
Chandrasekhar, V., and Piliouras, G. (2019). Optimistic
mirror descent in saddle-point problems: Going the extra
(gradient) mile. In ICLR 2019-7th International Confer-
ence on Learning Representations, pages 1–23.
Nambiar, M., Simchi-Levi, D., and Wang, H. (2019). Dy-
namic learning and pricing with model misspecification.
Management Science, 65(11):4980–5000.
Nemirovski, A. (2004). Prox-method with rate of conver-
gence o (1/t) for variational inequalities with lipschitz
continuous monotone operators and smooth convex-
concave saddle point problems. SIAM Journal on Op-
timization, 15(1):229–251.
Nesterov, Y. (2007). Dual extrapolation and its applications
to solving variational inequalities and related problems.
Mathematical Programming, 109(2):319–344.
Phillips, R., S ̧ ims ̧ek, A. S., and Van Ryzin, G. (2015).
The effectiveness of field price discretion: Empirical
evidence from auto lending. Management Science,
61(8):1741–1759.
Qi, Z., Tang, J., Fang, E., and Shi, C. (2022). Offline per-
sonalized pricing with censored demand. Available at
SSRN.
Sachdeva, N., Su, Y., and Joachims, T. (2020). Off-policy
bandits with deficient support. In Proceedings of the 26th
ACM SIGKDD International Conference on Knowledge
Discovery & Data Mining, pages 965–975.
Smola, A. J. and Sch ̈olkopf, B. (2004). A tutorial on
Statistics and computing,
support vector regression.
14(3):199–222.
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
Sondhi, A., Arbour, D., and Dimmery, D. (2020). Bal-
anced off-policy evaluation in general action spaces. In
International Conference on Artificial Intelligence and
Statistics, pages 2413–2423. PMLR.
Swaminathan, A. and Joachims, T. (2015a). Counterfactual
risk minimization: Learning from logged bandit feed-
back. In International Conference on Machine Learning,
pages 814–823. PMLR.
Swaminathan, A. and Joachims, T. (2015b). The self-
normalized estimator for counterfactual learning. ad-
vances in neural information processing systems, 28.
Thomas, P. and Brunskill, E. (2016). Data-efficient off-
policy policy evaluation for reinforcement learning. In
International Conference on Machine Learning, pages
2139–2148. PMLR.
Wahba, G. (1990). Spline models for observational data.
SIAM.
Wang, Y., Chen, X., Chang, X., and Ge, D. (2021). Uncer-
tainty quantification for demand prediction in contextual
dynamic pricing. Production and Operations Manage-
ment, 30(6):1703–1717.
Wang, Y. and Zheng, Z. (2021). Measuring policy perfor-
mance in online pricing with offline data. Available at
SSRN 3729003.
Wang, Y.-X., Agarwal, A., and Dudık, M. (2017). Opti-
mal and adaptive off-policy evaluation in contextual ban-
dits. In International Conference on Machine Learning,
pages 3589–3597. PMLR.
Williams, C. K. and Rasmussen, C. E. (2006). Gaussian
processes for machine learning, volume 2. MIT press
Cambridge, MA.
Balanced Off-Policy Evaluation for Personalized Pricing
A Proof of Properties of Weighted Revenue Estimators
Proof of Lemma 1. By definition of
definitions of ˆ
R
For the variance, we see that
(w) that Bias(w, r) = E
R
and rj , we have that
(w)
ˆ
R
h
− R
i
= 1
n
R
= b(w)⊤ (r
n
i=1 rn+i. Since E [piDi] = ri, it follows from the
ˆr).
P
−
V ar(w, r) = Var( ˆ
R
(w)) = Var
1
n
n
i=1
X
wipiDi
=
1
n2
!
=
1
n2
n
i=1
X
= v(w)⊤r
w2
i p2
i d(xi, pi)(1
−
d(xi, pi)) =
1
n2
−
r⊤
(cid:18)
diag(w2
1, . . . , w2
0
1
n2
n) 0
0
(cid:19)
w2
i p2
i Var (Di)
w2
i ri(pi −
ri) =
1
n2
n
i=1
X
w2
i piri −
1
n2
n
i=1
X
w2
i (ri)2
n
i=1
X
n
i=1
X
r.
The expression for MSE follows from the usual bias-variance decomposition.
Proof of Lemma 2. Write
n
(w)
ˆ
R
− R
= b(w)⊤ (r
ˆr) +
−
wi (piDi −
ri)
i=1
X
The first term is the bias of our estimator, evaluated in Lemma 1. The second term is a sum of mean-zero independent
random variables. From (Boucheron et al., 2013, Thm. 2.10) and surrounding discussion (i.e. Bernstein's inequality), we
have that with probability at least 1
ǫ,
−
1
n
n
i=1
X
wi(piDi −
ri)
≤
2V ar(w; r) log(1/ǫ)
max1
≤
i
≤
n |
wi|
3n
−
pi log(1/ǫ)
.
p
Combining completes the proof.
B Reformulation of the Worst-Case Bernstein Inner Problem
For the Bernstein objective, the inner maximization problem can be reformulated as follows:
rW C (w)
argmax
r,t
∈
w⊤ (r
−
ˆr) +
2 log(1/ǫ)
t
*
s.t.
0
t2
≤
r
p
≤
v(w)⊤r
p
r⊤Q(w)r,
ˆr)⊤ G−
−
1 (r
≤
−
ˆr)
−
≤
Γ2,
where Q(w) := diag
w2
1, . . . , w2
n, 0, . . . , 0
C Proof of Theorem 1
(cid:0)
(r
R2n
×
2n.
∈
(cid:1)
Recall the following classical fact about inverse propensity score weights:
Lemma 3. For any function f : R
identity:
7→
R and any i = 1, . . . , n such that the expectations exist, we have the following
Proof. Simply write the integrals:
E
W IP
i f (Pi)
(cid:2)
(cid:3)
= E [f (Pn+i)] .
E
W IP
i f (Pi)
=
(cid:2)
(cid:3)
f (p)
g1(p, xi)
g0(p, xi)
R
Zp
∈
g0(p, xi)dp =
R
Zp
∈
f (p)g1(p, xi)dp = E [f (Pn+i)] .
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
In particular, the lemma implies that E
estimator.
(wIP /n)
R
= E [
(cid:2)
(cid:3)
Finally, for convenience, define the function
] , i.e., using the (scaled) IP weights yields an unbiased
R
WCMSE(w; ˆΓ) := max
∆⊤b(w)b(w)⊤∆ + Var(w; ˆr + ∆).
r
s.t. 0
r
≤
≤
π,
(r
−
ˆr)⊤G−
1(r
ˆr)
−
≤
ˆΓ2.
A challenge in our analysis that ˆΓ might be misspecified, i.e., it might be much smaller than Γ. Hence, WCMSE(w; ˆΓ)
may not upper bound M SE(w, r).
The next lemma shows we can cover such misspecification by inflating the worst-case MSE by a constant.
Lemma 4. For any w, MSE(w, r)
max
≤
2
1, Γ
ˆΓ2
(cid:16)
*
(cid:17)
WCMSE(w; ˆΓ).
Proof. If Γ
so that MSE(wMSE(ˆΓ); ˆr + ∆)
≤
≤
ˆΓ, then the unknown revenue function r = ˆr + ∆ is feasible in the inner maximization defining wMSE(ˆΓ),
WCMSE(wMSE(ˆΓ); ˆΓ). We thus focus on the case when Γ > ˆΓ . Then,
MSE(w, ˆr + ∆) = ∆⊤b(w)b(w)⊤∆ + Var(w; ˆr + ∆)
ˆΓ
Γ
∆⊤b(w)b(w)⊤∆
=
Γ2
ˆΓ2
ˆΓ
Γ !
+ Var(w; ˆr + ∆).
Now consider the variance term. From the proof of Lemma 1,
Var(w, ˆr + ∆) =
1
n2
n
i=1
X
w2
i (ˆri + ∆i)(pi −
ˆri −
∆i).
Since ˆri ≥
0, and ˆri ≤
pi,
ˆri + ∆i ≤
Γ
ˆΓ
ˆri +
ˆΓ
Γ
∆i
,
!
and
pi −
ˆri −
∆i ≤
Γ
ˆΓ
pi −
ˆri −
ˆΓ
Γ
∆i
.
!
Substituting above shows that Var(w, ˆr + ∆)
≤
2
Γ
ˆΓ2 Var(w, ˆr + ˆΓ
Γ
∆). In summary, we have shown that
MSE(w; ˆr + ∆)
Γ2
ˆΓ2
≤
MSE(w; ˆr +
ˆΓ
Γ
∆).
To complete the proof, note that ˆr + ˆΓ
Γ
∆ is feasible in the optimization defining WCMSE(w; ˆΓ).
Proof of Theorem 1. From Lemma 4, it suffices to show that WCMSE(wMSE(ˆΓ); ˆΓ) = Op(1/n). We show this latter
claim by relating wMSE(ˆΓ) with the scaled inverse propensity weights W IP /n.
Specifically, since W IP /n is feasible in the outer optimization problem defining wMSE(ˆΓ) we have that
WCMSE(wMSE(ˆΓ); ˆΓ)
≤
≤
WCMSE(W IP /n; ˆΓ)
max
ˆr)⊤G−1(r
r:(r
−
ˆr)
≤
−
ˆΓ2
MSE(W IP /n; r)
max
ˆr)⊤G−1(r
≤
r:(r
−
ˆr)
≤
−
ˆΓ2
(r
−
ˆr)⊤b(W IP /n)b(W IP /n)⊤(r
ˆr) +
−
1
4n2
n
(W IP
i Pi)2,
i=1
X
where the second to last inequality follows by expanding the feasible region and the last by upper bounding the variance
since di(1
1
4 . We evaluate the maximization in closed form and round the constants up to 1 yielding
di)
−
≤
Balanced Off-Policy Evaluation for Personalized Pricing
WCMSE(wMSE(ˆΓ); ˆΓ)
≤
ˆΓ2b(W IP )⊤Gb(W IP ) +
1
n2
n
i=1
X
(W IP
i Pi)2.
(8)
We tackle the first term by upper bounding its expectation and applying Markov's inequality. Using the definition of G
and b(W IP ), write
E
b(W IP )⊤Gb(W IP )
=
(cid:2)
(cid:3)
1
n2
n
n
E
W IP
i W IP
j K(Zi, Zj)
j=1
X
n
(cid:2)
n
i=1
X
2
n2
−
(cid:3)
i K(Zi, Zn+j)
W IP
,
E
(cid:2)
(cid:3)
+
1
n2
n
n
i=1
X
j=1
X
E [K(Zn+i, Zn+j)]
j=1
X
where for convenience Zi = (xi, Pi) for i = 1, . . . , 2n.
i=1
X
Next fix some (i, j) with i
= j. By Lemma 3,
E
W IP
i W IP
j K(Zi, Zj)
= E
W IP
j K(Zn+i, Zj)
= E [K(Zn+i, Zn+j)] .
Similarly,
(cid:2)
E
(cid:3)
W IP
i K(Zi, Zn+i)
Hence, substituting above, we see that all terms with i
(cid:2)
E
b(W IP )⊤Gb(W IP )
(cid:2)
(cid:3)
= E [K(Zn+i, Zn+i)] .
= j drop out and we have that
(cid:3)
=
=
=
1
(cid:2)
n2
1
n2
1
n2
n
i=1
X
n
i=1
X
n
i=1
X
E
E
(cid:2)
(cid:2)
E
(W IP
i
)2K(Zi, Zi)
(cid:3)
+
(cid:2)
(cid:3)
i K(Zn+i, Zn+i)
wIP
+
i=1
X
n
1
n2
i=1
X
(cid:3)
(W IP
i −
1)K(Zn+i, Zn+i)
,
(cid:3)
1
n2
n
E [K(Zn+i, Zn+i)]
2
n2
−
n
E
W IP
i K(Zi, Zn+i)
E [K(Zn+i, Zn+i)]
−
(cid:2)
E [K(Zn+i, Zn+i)]
(cid:3)
i=1
X
n
2
n2
i=1
X
by applying Lemma 3 again.
By assumption i), this last term is O(1/n). Thus, by Markov's inequality, the first term of Eq. (8) is Op(1/n).
For the second term of Eq. (8), observe that
E
1
n2
"
i=1
X
n
W IP
i Pj
2
=
#
1
n
1
n
n
E
W IP
i Pi
2
i=1
X
h(cid:0)
!
i
= O(1/n),
(cid:1)
by assumption ii). Thus, by Markov's inequality, the second term of Eq. (8) is also Op(1/n).
(cid:0)
(cid:1)
Combining these two pieces completes the proof.
D Proof of Theorem 2
For convenience, define the functions
1
n
qmax(w) :=
wi|
WCBern(w; ˆΓ) := max
max
1
i
≤
≤
n |
pi
r
s.t. 0
b(w)⊤(r
r
≤
≤
−
π,
ˆr) +
2Var(w; r) log(1/ǫ) +
(r
ˆr)⊤G−
p
−
1(r
ˆr)
−
≤
ˆΓ2.
qmax(w) log(1/ǫ)
3
.
Our proof technique follows Theorem 1 closely.
6
6
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
Lemma 5. For any w, max(Bern(w, ˆr + ∆), 0)
≤
max
1, Γ
ˆΓ
(cid:16)
*
(cid:17)
WCBern(w; ˆΓ).
Proof. Notice by considering the feasible solution r = ˆr that WCBern(w, ˆΓ)
qmax(w) log(1/ǫ)
3
0. Hence, when Bern(w, ˆr + ∆)
0, the inequality is trivially satisfied.
≥
2 log(1/ǫ)Var(w, ˆr) +
p
≥
≤
ˆΓ, r feasible in the inner maximization defining wB(ˆΓ), so that Bern(wB(ˆΓ); r)
≤
Similarly, when Γ
WCBern(wB(ˆΓ); ˆΓ).
We thus focus on the case when Γ > ˆΓ and Bern(w, ˆr + ∆)
≤
0. Then,
≥
Bern(w, ˆr + ∆) = b(w)⊤∆ +
2 log(1/ǫ)Var(w; ˆr + ∆) +
qmax(w) log(1/ǫ)
3
p
ˆΓ
b(w)⊤∆
Γ
Γ
ˆΓ
≤
+
qmax(w) log(1/ǫ)
3
!
+
2 log(1/ǫ)Var(w; ˆr + ∆),
p
since Γ/ˆΓ > 1 and qmax ≥
Now consider the variance term. From the proof of Lemma 1,
0 by construction.
Var(w, ˆr + ∆) =
1
n2
n
i=1
X
w2
i (ˆri + ∆i)(pi −
ˆri −
∆i).
Since ˆri ≥
0, and ˆri ≤
pi,
ˆri + ∆i ≤
Γ
ˆΓ
ˆri +
ˆΓ
Γ
∆i
,
!
and
pi −
ˆri −
∆i ≤
Γ
ˆΓ
pi −
ˆri −
ˆΓ
Γ
∆i
.
!
Substituting above shows that Var(w, ˆr + ∆)
2
Γ
ˆΓ2 Var(w, ˆr +
ˆΓ
Γ
≤
∆). In summary, we have shown that
Bern(w; ˆr + ∆)
Γ
ˆΓ
≤
Bern(w; ˆr +
ˆΓ
Γ
∆).
To complete the proof, note that ˆr +
ˆΓ
Γ
∆ is feasible in the optimization defining WCBern(w; ˆΓ).
We can now prove our main result.
Proof of Theorem 2. From Lemma 5, it suffices to show that WCBern(wB(ˆΓ); ˆΓ) = Op(1/√n). We show this latter claim
by relating wB(ˆΓ) with the scaled inverse propensity weights W IP /n.
Specifically, since W IP /n is feasible in the outer optimization problem defining wB(ˆΓ) we have that
WCBern(wB(ˆΓ); ˆΓ)
≤
≤
WCBern(W IP /n; ˆΓ)
max
ˆr)⊤G−1(r
r:(r
−
ˆr)
≤
−
ˆΓ2
Bern(W IP /n; r)
max
ˆr)⊤G−1(r
≤
r:(r
−
ˆr)
≤
−
ˆΓ2
b(W IP /n)⊤(r
ˆr) +
−
2 log(1/ǫ)
4
p
1
n2
n
i=1
X
(W IP
i Pi)2 +
qmax(W IP /n) log(1/ǫ)
3
,
v
u
u
t
where the second to last inequality follows by expanding the feasible region and the last by upper bounding the variance
since dj (1
1
4 . We evaluate the maximization in closed form and round the constants up to 1 yielding
dj)
−
≤
WCBern(wB(ˆΓ); ˆΓ)
ˆΓ
≤
b(W IP )⊤Gb(W IP ) +
log(1/ǫ)
q
p
v
u
u
t
1
n2
n
i=1
X
(W IP
i Pi)2 + qmax(W IP /n) log(1/ǫ).
(9)
Balanced Off-Policy Evaluation for Personalized Pricing
term by upper bounding its expectation and applying Markov's inequality.
Specifically,
We tackle the first
E
b(W IP )
Gb(W IP )
⊤
E [b(W IP )
⊤
≤
Gb(W IP )] by Jensen's inequality.
hp
Following an identical argument to that in Theorem 1 which uses assumption i), we have that E
O(1/n). Thus, by Markov's inequality, the first term of Eq. (9) is Op(1/√n).
i
p
b(W IP )⊤Gb(W IP )
=
(cid:2)
(cid:3)
For the second term of Eq. (9), observe again by Jensen's inequality that
n
1
n2
i=1
X
(cid:0)
E
v
u
u
t
W IP
i Pi
2
≤
(cid:1)
1
n
1
√n v
u
u
t
n
E
W IP
i Pi
2
= O(1/√n),
i=1
X
h(cid:0)
i
(cid:1)
again by assumption ii). Thus, by Markov's inequality, the second term of Eq. (9) is also Op(1/√n).
Finally, for the last term, observe that
qmax(W IP /n) =
1
n
max
i
W IP
i Pi
(cid:12)
(cid:12)
≤
(cid:12)
(cid:12)
n
i=1
X
1
n v
u
u
t
W IP
i Pi
2
,
(cid:0)
(cid:1)
since the l2-norm bounds the l
shows the last term is also Op(1/√n).
∞
-norm. Taking expectations and applying the above inequality with Markov's inequality
Combining these three pieces completes the proof.
E Additional Experiments
We present results for 3 more subsets of the Nomis dataset. Apart from the subset of data used, the experiment set up are
same as that in Table 3.
Metrics
BOPE-B BOPE LASSO SPPE
Target Policy is 5% increase.
MSE
Bias2
Variance
0.60
0.28
0.32
0.69
0.32
0.37
0.90
0.43
0.47
Target Policy is 5% decrease.
MSE
Bias2
Variance
0.09
0.04
0.05
0.09
0.04
0.05
0.18
0.09
0.09
Target Policy is 10% increase.
MSE
Bias2
Variance
1.77
0.84
0.93
1.94
0.92
1.02
2.22
1.06
1.16
Target Policy is 10% decrease.
MSE
Bias2
Variance
0.02
0.01
0.01
0.02
0.01
0.01
0.03
0.01
0.02
3.15
1.51
1.64
0.71
0.34
0.37
5.78
2.79
2.99
0.08
0.03
0.05
Table 9: Decomposition of the mean squared error. Tier = 2, Car Type = Used, Term = 60, Partner Bin = 1, and year 2003.
There are 609 datapoints in the subset.
Adam N. Elmachtoub, Vishal Gupta, Yunfan Zhao
Metrics
BOPE-B BOPE LASSO SPPE
Target Policy is 5% increase.
MSE
Bias2
Variance
0.54
0.12
0.42
0.62
0.14
0.48
0.61
0.15
0.46
Target Policy is 5% decrease.
MSE
Bias2
Variance
0.47
0.10
0.37
0.54
0.10
0.44
0.48
0.11
0.37
Target Policy is 10% increase.
MSE
Bias2
Variance
0.98
0.31
0.67
1.13
0.37
0.76
1.10
0.37
0.73
Target Policy is 10% decrease.
MSE
Bias2
Variance
0.55
0.11
0.44
0.58
0.09
0.49
0.51
0.10
0.41
0.64
0.06
0.59
0.47
0.08
0.39
1.23
0.22
1.01
0.90
0.25
0.65
Table 10: Decomposition of the mean squared error. Tier = 3, Car Type = Used, Term = 72, Partner Bin = 3, and year
2002-2004. There are 667 datapoints in the subset.
Metrics
BOPE-B BOPE LASSO SPPE
Target Policy is 5% increase.
MSE
Bias2
Variance
0.39
0.08
0.31
0.52
0.12
0.40
0.49
0.12
0.37
Target Policy is 5% decrease.
MSE
Bias2
Variance
0.66
0.24
0.42
0.81
0.29
0.52
0.78
0.30
0.48
Target Policy is 10% increase.
MSE
Bias2
Variance
0.64
0.20
0.44
0.88
0.25
0.63
0.75
0.25
0.50
Target Policy is 10% decrease.
MSE
Bias2
Variance
0.50
0.14
0.36
0.56
0.15
0.41
0.50
0.15
0.35
1.11
0.24
0.87
0.38
0.06
0.32
1.08
0.17
0.91
0.46
0.10
0.36
Table 11: Decomposition of the mean squared error. Tier = 3, Car Type = Used, Term = 60, Partner Bin = 3, and year
2002-2004. There are 1851 datapoints in the subset.
|
|
http://arxiv.org/abs/2302.12735v1 | 2023-02-24T16:44:15 | 2023-02-24T16:44:15 | Regulating Clients' Noise Adding in Federated Learning without
Verification | In federated learning (FL), clients cooperatively train a global model
without revealing their raw data but gradients or parameters, while the local
information can still be disclosed from local outputs transmitted to the
parameter server. With such privacy concerns, a client may overly add
artificial noise to his local updates to compromise the global model training,
and we prove the selfish noise adding leads to an infinite price of anarchy
(PoA). This paper proposes a novel pricing mechanism to regulate
privacy-sensitive clients without verifying their parameter updates, unlike
existing privacy mechanisms that assume the server's full knowledge of added
noise. Without knowing the ground truth, our mechanism reaches the social
optimum to best balance the global training error and privacy loss, according
to the difference between a client's updated parameter and all clients' average
parameter. We also improve the FL convergence bound by refining the aggregation
rule at the server to account for different clients' noise variances. Moreover,
we extend our pricing scheme to fit incomplete information of clients' privacy
sensitivities, ensuring their truthful type reporting and the system's ex-ante
budget balance. Simulations show that our pricing scheme greatly improves the
system performance especially when clients have diverse privacy sensitivities. | [
"Shu Hong",
"Lingjie Duan"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12735v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12735v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.GT",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.GT",
"cs.LG"
] | Regulating Clients' Noise Adding in Federated
Learning without Verification
Shu Hong
Singapore University of Technology and Design, Singapore
shu [email protected]
Lingjie Duan
Singapore University of Technology and Design, Singapore
lingjie [email protected]
3
2
0
2
b
e
F
4
2
]
T
G
.
s
c
[
1
v
5
3
7
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-In federated learning (FL), clients cooperatively
train a global model without revealing their raw data but
gradients or parameters, while the local information can still be
disclosed from local outputs transmitted to the parameter server.
With such privacy concerns, a client may overly add artificial
noise to his local updates to compromise the global model
training, and we prove the selfish noise adding leads to an infinite
price of anarchy (PoA). This paper proposes a novel pricing
mechanism to regulate privacy-sensitive clients without verifying
their parameter updates, unlike existing privacy mechanisms
that assume the server's full knowledge of added noise. Without
knowing the ground truth, our mechanism reaches the social
optimum to best balance the global training error and privacy
loss, according to the difference between a client's updated
parameter and all clients' average parameter. We also improve
the FL convergence bound by refining the aggregation rule at the
server to account for different clients' noise variances. Moreover,
we extend our pricing scheme to fit incomplete information of
clients' privacy sensitivities, ensuring their truthful type report-
ing and the system's ex-ante budget balance. Simulations show
that our pricing scheme greatly improves the system performance
especially when clients have diverse privacy sensitivities.
I. INTRODUCTION
The proliferation of Internet of Things (IoT) technologies
has led to the creation of enormous amounts of user data.
In an effort to safeguard data privacy, decentralized machine
learning approaches such as Federated Learning (FL) [1] have
been proposed without sharing individuals' raw data. During
the training phase, each client periodically downloads the
global model from a parameter server and updates their local
model with their own data. By only transferring gradient
parameters instead of raw data, data privacy can be preserved.
Sharing model updates or gradients, however, can also
compromise clients' private information, as analyzing the
differences in training parameters uploaded by clients can
reveal it. For example, model inverse attack [2], [3] allows
training data reconstruction by matching model gradients and
optimizing randomly initialized inputs. These attacks for data
reconstruction or membership inference [4] are significant
threats to FL security and privacy. To prevent privacy leakage,
each client can add artificial noise [5]–[7] to the transmitted
parameters. However, this approach can lead to significant
training accuracy loss while making it harder for attackers
to inverse the original local data.
Despite of the privacy concerns in FL, clients might also
take advantage of the returned global model for benefits. For
example, in the "cross-silo" scenario of FL [1] (e.g., in medical
and financial institutions), an AI model is trained on clients
with large amounts of data and clients also care about the
convergence performance. Given both privacy concerns and
model training benefits, Noble et al. [8] and Sun et al. [9]
studied the tradeoff between utility and privacy for FL. It is
also critical to study the clients' selfish noise-adding strategy
based on each individual's preference of learning performance
and privacy requirement.
Our analysis of the worst-case ratio of social costs under
clients' selfish behavior and the social optimum prompts us to
study incentive mechanisms to regulate clients' noise adding
and approach the social optimum. Existing works on noise-
adding privacy protection mechanisms [5]–[7]) assume that the
server can verify and know all clients' contributions, which is
challenging to achieve in practice without access to clients'
local data. In contrast, our paper incentivizes honest contri-
butions from clients with performance-based pricing schemes
that penalize individuals based on the difference between their
local parameters and the average parameter benchmark of
all clients. Although the average benchmark may not be the
ground truth, we prove its effectiveness in preventing clients
from adding excessive local noise.
Specifically, considering clients' varying privacy sensitivi-
ties, we analyse their equilibrium strategies under a properly
improved weighted aggregation rule, and optimally design the
price charged to each client for achieving the social opti-
mum. Additionally, we extend our pricing scheme to account
for incomplete information about clients' privacy sensitivity,
where some clients may not
their types.
Our refined pricing mechanism includes a reward function,
a penalty function, and a compensation payment to ensure
truthful reporting, social efficiency, and FL system's ex-ante
budget balance. Simulation results demonstrate significant
improvement in equilibrium performance, particularly when
clients have diverse privacy sensitivities.
truthfully report
The rest of this paper is structured as follows. In Section
II we introduce the system model and problem formulation.
In Sections III and IV we present the equilibrium analysis
and pricing mechanism design under complete and incomplete
information of clients' privacy sensitivity types, respectively.
We conclude the paper in Section V. Due to page limit, we
put the detailed proofs in the on-line technical report [10].
II. SYSTEM MODEL AND PROBLEM FORMULATION
In this section, we introduce the system model and formu-
late the privacy-preserving problem with noise adding.
proposed in [13], (ε, δ)-Differential Privacy (DP) provides a
criterion for privacy preservation of distributed data processing
systems, and the definition is formally given as follows.
A. Preliminaries
First, we present preliminaries about backgrounds on fed-
erated learning (FL) and differential privacy (DP).
Federated Learning. Consider an FL system consisting
of one parameter server (PS) and N clients in set N =
{1, 2, * * * , N }. Each client i ∈ N holds the local database
Di and aims to iteratively minimize a local loss function Fi
by training the local parameter vector wi, i.e.,
wi = arg min
w
Fi(w, Di).
The goal of the server is to learn a global model over data at
all N distributed clients. The problem to minimize the global
loss function F is:
w∗ = arg min
w
F (w, D) = arg min
ρiFi(w, Di),
(cid:88)
(1)
w
i∈N
where D = ∪i∈N Di includes the datasets from all N clients.
Formally, in each iteration the server aggregates the updated
parameters received from all clients as
ρiwi,
̄w(ρ, w) =
(cid:88)
(2)
i∈N
where ̄w is the parameter vector aggregated at the server and
ρi ≥ 0 is the weightage parameter for aggregation.
Each training iteration of such an FL system usually con-
training and
tains the following three steps: clients' local
the server, and parameter
updating, global aggregation at
broadcast
to clients. After a sufficient number of training
iterations (say, T rounds) and update exchanges between
the server and the distributed clients,
the solution to the
optimization problem (1) converges to that of the global model.
Thus, the training accuracy loss can be defined as the expected
global error, i.e.,
Lu = E{F (w(T )) − F (w∗)},
(3)
which depends on the aggregation rule in (2). To quantify
the convergence bound for the learning, we here make some
typical assumptions about the loss functions.
1. The
Assumption
convex and LF -smooth,
LF (cid:107)x − x(cid:48)(cid:107)2 , ∀x, x(cid:48).
global
loss
is
i.e., (cid:107)∇F (x) − ∇F (x(cid:48))(cid:107)2 ≤
function F (*)
As in most of the literature (e.g., [6], [17]), the convergence
or accuracy error of the FL process is difficult to quantify
and is analysed using the convergence bound. Let ̄Lu(σ, ̄w)
denote the upper bound of the expected global error Lu in
(3), then clients will take it into account when making noise-
adding decisions in each iteration. Note that the bound of
the training accuracy loss function is for all FL clients, and
depends on all clients' noise-adding strategies as well as the
server's aggregation rule.
Differential Privacy. Despite that all clients locally com-
pute training gradient parameter wi and send it to the server,
attacks such as gradient inverse attack [2], [3] might disclose
the original training data without accessing the datasets. As
Definition 1 (Differential Privacy). A randomized algorithm
P : X → R with domain X and range R is (ε, δ)-
differentially-private if for all S ⊆ R and for all x, y ∈ X
such that ||x − y||1 ≤ 1:
Pr[P(x) ∈ S] ≤ eε Pr[P(y) ∈ S] + δ,
where ε is the distinguishable bound of all outputs on adjacent
datasets x and y in a database, and δ represents the event that
the ratio of the probabilities for two adjacent datasets x and
y cannot be bounded by eε after the algorithm P.
Given this privacy definition, we aim to provide useful
privacy protection to the transmitted parameters wi and thus
the raw dataset Di, as in [6]. Specifically, in the t-th round,
suppose client i adds Gaussian noise ni ∼ N (0, σ2
i ) locally
to the transmitted parameter wi, as
̃w(t)
i = w(t)
i + n(t)
i
.
According to the Gaussian mechanism [13], the noise1 ni
with standard deviation σi = cS
ensures (εi, δ)-DP for any
εi
εi ∈ (0, 1), where c (cid:62) (cid:112)2 ln(1.25/δ) is a constant, S =
i)||2 is the sensitivity of
maxDi,D(cid:48)
i:d(Di,D(cid:48)
the local training process.
i)=1 ||wi(Di) − wi(D(cid:48)
Under the DP definition and the Gaussian mechanism,
the privacy algorithm P outputs the noise-adding parameter
̃wi and provides a privacy guarantee to clients' transmitted
parameters wi. Following Definition 1, [13] also defines a
quantity to measure the privacy loss of the privacy algorithm
after observing the output ̃wi as o, i.e.,
Lp
i = ln
(cid:18) Pr[P(wi) = o]
i) = o]
i are two adjacent local parameters (without
Pr[P(w(cid:48)
(cid:19)
,
i can be positive or negative. Then we have
where wi and w(cid:48)
noise) and Lp
Pr(Lp
i ≤ εi) > 1 − δ.
That is, the privacy loss Lp
is upper-bounded by εi with a
i
large probability (given δ is small). Thus, we use ̄Lp
i = εi
as the approximate bound of privacy loss for client i, to be
a privacy factor affecting the client's noise-adding decision.
Equivalently, we have the bound of the privacy loss
̄Lp
(4)
i (σi) =
cS
σi
from the Gaussian mechanism for client i.
B. Our Mechanism Design at the Server
Given the bounds for the global training error ̄Lu and pri-
vacy loss ̄Lp
i in (4), we denote α = {αi ∈ G = [0, 1]|i ∈ N }
as the N clients' privacy sensitivity types, which are private
information and need to be reported by themselves to the
server. Each client i minimizes a total cost function Ji:
i (σi),
(5)
by designing the noise scale σi based on their own privacy
sensitivity types αi. Note that such a type αi is a constant
Ji(αi, σi, σ−i, ̄w) = (1 − αi) ̄Lu(σ, ̄w) + αi ̄Lp
1For the sake of simplicity, we neglect the superscript (t) for each round.
parameter, to measure a client's individual preference on the
utility-privacy tradeoff [18].
After receiving ̃wi with the artificial noise,
the server
aggregates all the local parameters as a weighted sum in (2).
With the aim to utilize pricing schemes for achieving better
social performance at the server, a deterministic mechanism
f outputs a pricing scheme P according to clients' reporting
ˆα of their privacy sensitivities and local training outcomes ̃w,
i.e., f ( ˆα, ̃w) = {P( ˆα, ̃w)}.
Considering the server's pricing scheme, each client i's cost
function Ji(αi, σi, σ−i, ̄w) in (5) can be modified as
̄Ji(f ( ˆα, ̃w)|σ, α) = Ji(αi, σi, σ−i, ̄w) + Pi( ˆα, ̃w)
= (1 − αi) ̄Lu(σ, ̄w) + αi ̄Lp
i (σi) + Pi( ˆα, ̃w),
where Pi( ˆα, ̃w) is the ex-post price charged to client i after
his reporting and computation.
FL clients are self-interested and cost-driven, such that
they will respond to the pricing with the best noise-adding
strategies to minimize their costs. Next, we explicitly model
the interaction between FL clients and the server in a two-stage
dynamic Bayesian game as follows.
• In Stage I,
the server announces the number of whole
training rounds or end-time T , the mechanism including the
global aggregation rule ̄w( ̃w, ˆα) and the (ex-post) pricing
scheme P ( ˆα, ̃w) to clients. The pricing schemes aim to
incentivize truthful reporting of clients' types and socially
optimal strategies. The clients' cost functions Ji's in (5) are
common knowledge.
• In Stage II, clients report their types ˆαi's to the server
and upload parameters ̃wi with noise level σi in distributed
computation. Correspondingly, the server returns the global
parameter ̄w and charges a price Pi( ˆα, ̃w) to each client i
at the end of each iteration.
Given that clients' privacy sensitivity αi's are private infor-
mation, for achieving better social performance, the mecha-
nism design at the server needs to be truthful and efficient.
Next we formally define the truthfulness.
Definition 2 (Truthfulness). A mechanism is truthful if no
agent can benefit
from misreporting his type i. Formally,
given client i, type profile α = {αi, α−i} ∈ GN , and any
misreported type ˆαi ∈ G, it holds that
̄Ji(f (αi, α−i, ̃w)|σ, α) ≤ ̄Ji(f (ˆαi, α−i, ̃w)|σ, α).
We are also interested in designing truthful mechanisms that
perform well with respect to minimizing the social cost. Define
the social cost of a mechanism f ( ˆα, ̃w) as the sum of costs
of N agents, i.e.,
SC(f ( ˆα, ̃w)|σ, α) =
(cid:88)
Ji(αi, σ, ̄w).
(6)
i∈N
Let OP T (α) denote the optimal minimum social cost, i.e.,
OP T (α) = min
σ
SC(f ( ˆα, ̃w)|σ, α).
Then we use the concept of price of anarchy (PoA) to tell the
maximum efficiency loss due to clients' selfish behavior by
adding too much noise or misreporting types.
Definition 3 (Price of Anarchy). The ratio between the social
cost and the socially optimal cost for mechanism f ( ˆα, ̃w) is
SC(f ( ˆα, ̃w)|σ, α)
OP T (α)
The Price of Anarchy (PoA) is defined as the maximum of the
ratio by scanning through all possible parameters:
≥ 1.
γ =
P oA =
max
α,N,c,S,T,λF ,LF
γ.
The PoA definition describes an efficiency gap between
clients' equilibrium strategy and the social optimum. If it
is non-small, it motivates us to design a mechanism which
approaches or even achieves social optimum with γ = 1. Next,
we will analyse clients' equilibrium strategy and prepare the
server's mechanism design.
III. GAME ANALYSIS AND MECHANISM DESIGN UNDER
COMPLETE INFORMATION
In this section, we assume that all clients' types are known
to the parameter server (or equivalently, ˆαi = αi), which
may be done by checking their historical activities on similar
FL tasks. In this scenario, the server's mechanism f ( ˆα, ̃w)
reduces to a function of parameters ̃w. We derive clients'
equilibrium noise-adding strategy after introducing a properly
improved aggregation rule at the server, and then we design a
mechanism to achieve the minimum social cost.
A. Improved Aggregation Rule at the Server
Given the clients' training accuracy loss ̄Lu(σ, ̄w) in (5)
depends on the server's aggregation rule, we first consider an
aggregation rule ̄w( ˆα, ̃w) = ̄w(α, ̃w) from (2) to ensure the
training convergence performance.
The standard aggregation rule in the FedAvg algorithm [17]
uses a simple mean aggregation as
̄wmean(α, ̃w) =
,
(7)
(cid:80)
i∈N ̃wi
N
which does not take clients' strategic behaviours or added
noise variances into consideration. Alternatively, predicting
any client i' strategy with distinct standard deviation σi(αi)
from cost function (5), we properly use the maximum likeli-
hood estimator (MLE) for better aggregation with ˆα = α:
̄wM LE(α, ̃w) =
.
(8)
(cid:80)
i∈N
σ2
(cid:80)
i∈N
̃wi
i (αi)
1
i (αi)
σ2
(cid:18)
Proposition 1. With the MLE aggregation rule in (8), we give
the upper bound of the training accuracy loss function Lu in
(3) as
1 +
∆M LE(σ)
̄Lu(σ, ̄w) = κ∆M LE(σ)
1
2LF
where κ = 16||w0 −w∗||2 with T = LF
∆ ||w0 −w∗||2, step size
η = 1/LF , ∆M LE = ((cid:80)N
i=1 σ−2
2 measures the bound of
i
the expected error E|ˆμ − μ| achieved by MLE. Our improved
aggregation rule in (8) leads to a smaller convergence bound
than the mean aggregation in (7).
)− 1
(9)
,
(cid:19)
Proposition 1 guides us to choose the MLE aggregation rule
for better convergence performance at the server.
B. Clients' Strategy under Equilibrium and Social Optimum
By substituting (9) into the cost function (without pricing)
for client i in (5), the cost for client i becomes
Ji(σi, σ−i) = κ(1 − αi)∆M LE(σ)(1 +
∆M LE(σ)
2LF
) +
αicS
σi
.
By minimizing the individual's and social costs, we give
the equilibrium and social optimal noise-adding strategies for
client i.
Proposition 2. Given that the server chooses the MLE aggre-
gation rule in (8), the equilibrium noise level σ∗
for client i
i
with privacy sensitivity type αi is the unique solution to
(cid:16)(cid:80)
(cid:17)− 1
2
+ LF
κ(1 − αi)(
σ−2
j
)− 3
2
(cid:88)
j∈N
j∈N σ−2
j
LF
= αicSσi,
(10)
for client i is
while under social optimum, the noise level σ∗∗
the unique solution to
i
(cid:33)
(1 − αi)
(
(cid:32)
(cid:88)
κ
i∈N
σ−2
j
)− 3
2
(cid:88)
j∈N
(cid:17)− 1
2
+ LF
(cid:16)(cid:80)
j∈N σ−2
j
LF
= αicSσi.
(11)
To show the maximum gap of social costs defined in (6)
under clients' equilibrium in (10) and the social optimum in
(11), we use the PoA definition in Definition 3.
Proposition 3. Price of anarchy under complete information
goes to infinity under the worst case.
C. Pricing Mechanism for Achieving Social Optimum
To incentivize client i to choose noise level σ∗∗
rather
than σ∗
i , we design the ex-post pricing scheme P( ˆα, ̃w) =
P(α, ̃w) to impose penalty to clients who add too much noise
to their local parameters wi's.
i
Definition 4 (Pricing Mechanism under Complete Informa-
tion). Under complete information of clients' types α, the
mechanism f (α, ̃w) = {P(α, ̃w)} decides pricing function
(cid:32)
(cid:33)2
Pi(α, ̃w) = β∗
i (α)
̃wi −
̃wi
− q,
1
N
N
(cid:88)
i=1
charged to client i, where the penalty coefficient is
N 2 (cid:80)
2(N − 1)2((cid:80)
and the compensation payment is
j(cid:54)=i,j∈N (1 − αj)αjcS
i∈N (1 − αi)(σ∗∗
β∗
i (α) =
i )3)
q =
2(N − 1)2
N
where σ∗∗
i
is given in (11).
(cid:88)
i∈N
i (α)σ∗∗
β∗
i
,
,
(12)
Fig. 1. Social costs under complete information with or without our pricing
mechanism in Definition 4 versus the variance of clients' types αi. Here we
set αi to follow a normal distribution with mean 0.5.
achieves the social optimum. Even when all clients have the
same sensitivity types, they worry their randomly computed
parameters to be an outlier and do not dare to add much
noise. Ex-ante budget balance for each client (achieved by
compensation q) is an important property in economics [19]
and helps ensure long-term client participation.
Without a pricing scheme, Fig. 1 shows a substantial in-
crease in social cost as the variance of αi rises. This trend
can be attributed to the increasingly diverse objectives of
varying clients, leading to differences in their training goals
and privacy concerns. Self-interested client behavior to protect
privacy leads to more noise and higher training accuracy loss.
However, our pricing scheme maintains lower social costs due
to clients' sensitivity to penalties.
IV. GAME ANALYSIS AND MECHANISM DESIGN UNDER
INCOMPLETE INFORMATION
Under incomplete information, all clients' real types α are
private information while the only common knowledge is the
random type distribution αi ∼ G(α) in [0, 1]. We propose that
the server asks each client i to report his type ˆαi, which might
not be truthful due to clients' selfish behaviours. The Bayesian
game for server-client interaction is formulated as in Section
II-B. We refine our pricing scheme in Definition 4 to fit.
Definition 5 (Pricing Mechanism under Incomplete Informa-
tion). Under incomplete information of clients' types α, our
mechanism f ( ˆα, ̃w) = {P( ˆα, ̃w)} decides:
Pi( ˆα, ̃w) = pi( ˆα, ̃w) − ri( ˆα) − q.
• The penalty pi( ˆα, ̃w) aims to incentivize client i to update
local parameters with only socially optimal noise variance
σ∗∗
. It takes a similar form from Definition 4 as pi( ˆα, ̃w) =
i
, yet here we need to design new
βi( ˆα)
parameters β( ˆα) under incomplete information.
̃wi − 1
N
i=1 ̃wi
(cid:80)N
(cid:17)2
(cid:16)
Proposition 4. Under complete information, our pricing
mechanism in Definition 4 simultaneously reaches the social
optimum with γ = 1 and ex-ante budget balance.
Though our pricing scheme with (12) does not verify each
client's noise/contribution and simply compares each client's
it already
performance to the noisy average benchmark,
• The reward function ri( ˆα) is to incentivize client i's truthful
reporting of αi under incomplete information.
• The constant compensation payment q is refunded to each
client to make the FL system ex-ante budget balanced.
Next, we analyse the Bayesian game between clients and the
server under incomplete information by backward induction.
0.020.040.060.080.10.120.140.160.1805101520253035Benchmark without any pricing schemeWith pricing scheme as Definition 4A. Each Client's Decision of ˆαi and σi in Stage II
Given the pricing mechanism P = (r( ˆα), p( ˆα, ̃w), q)
announced in Stage I from Definition 5, client i's strategy
based on his own private type αi includes two parts: the type
reporting strategy ˆαi(αi) and the noise variance σi(αi).
Aggregation Rule under Incomplete Information. Similar
to the aggregation rule under complete information in Section
III-A, we still use the MLE aggregation rule in (8), yet we
have to replace real σi with σ∗
i (αi = ˆαi) according to clients'
reported type ˆαi. In this case, we modify the training accuracy
loss function ̄Lu(σ, ̄w) in (9) with
∆inc(σ∗, ˆα) =
(cid:16)(cid:80)N
i=1
(cid:80)N
i=1
(cid:17) 1
2
,
(σ∗
(σ∗
i (αi))2
i (αi= ˆαi))4
1
i (αi= ˆαi))2
(σ∗
which depends on clients' reported types ˆα and actual noise
strategies σ∗(α) at the Bayesian Nash equilibrium (BNE).
Client i's Expected Cost. Given all clients' types follow an
i.i.d. distribution G, client i needs to estimate all other N − 1
clients' strategies ˆα−i(α−i) and σ−i(α−i) with αj ∼ G(α)
(j ∈ N /i) when making his own strategies. With the pricing
scheme Pi( ˆα, ̃w) in Definition 5, we take expectation over
α−i to obtain the expected cost function for client i:
Eα−iJi(αi, ˆαi, σi|ri( ˆα), pi( ˆα, ̃w), q)
̄Lu(ˆαi, σi, ˆα−i(α−i), σ−i(α−i)) + αi ̄Lp
i (σi)
=(1 − αi)Eα−i
−Eα−iri( ˆα) − q
(cid:32)
(cid:34)
(
+Eα−i
βi( ˆα)
∂Eα−i Ji(αi, ˆαi,σi)
∂σi
announced in Stage I, client i will optimize noise level σ∗
the solution to
(13)
Given the pricing mechanism P = (r( ˆα), p( ˆα, ̃w), q)
i as
= 0 and ˆα∗
i as the solution
= 0 at the BNE to minimize Eα−iJi in
to
(13). Next we only focus on the symmetric BNE strategy for
each client due to the symmetry of (13), i.e., the noise-adding
strategy σ(αi) and the type reporting strategy ˆα(αi) without
subscripts in these two functions.
∂Eα−i Ji(αi, ˆαi,σi)
∂ ˆαi
B. Clients' Equilibrium Strategies with Binary Type Values
To simplify the analysis, we limit clients' i.i.d. private type
distribution of αi to be two discrete values in {αL, αH } with
0 ≤ αL < αH ≤ 1, though similar analysis methods holds for
the continuous distribution. The common knowledge is the
proportion η of all clients' types:
(cid:40)
αi =
with probability η,
αL,
αH , with probability 1 − η.
Considering the deterministic reporting strategy ˆαi ∈
{αL, αH }, clients may truthfully report or misreport. Due to
the symmetry of both types of clients, there are three cases
for all clients' type reporting strategies ˆα in general.
1) Case 1: all clients reports the same type αL or αH , i.e.,
ˆα(αL) = ˆα(αH ) ∈ {αL, αH } for any i ∈ N .
In this case, receiving the same type reporting from all
clients, the server has to assign the same weight with ρi = 1
(1 − αL)κ
in the aggregation rule in (2). Also, the reward function and
penalty coefficient are indistinctive among all agents.
Lemma 1. In Case 1 where all clients report the same type
ˆα(αL) = ˆα(αH ) ∈ {αL, αH } to the server, all clients' noise
adding strategies σcase1(αL) and σcase1(αH ) at the BNE are
solutions to the equation set:
p(n)((n + 1)σ2(αL) + (N − 1 − n)σ2(αH ))−1/2(cid:111)
(cid:80)N −1
n=0
)2σ(αH ) = αH
(1 − αH )κ
+2β( N −1
where β = βL if ˆα(αL) = ˆα(αL) = αL, and β = βH if
ˆα(αL) = ˆα(αL) = αH , p(n) = Pr(NL = n) = C n
N −1ηn(1 −
η)N −1−n.
p(n)(nσ2(αL) + (N − n)σ2(αH ))−1/2(cid:111)
(cid:80)N −1
n=0
)2 σ(αL) = αL
(cid:20) σ(αL)
N
+ 2β( N −1
cS
σ2(αH )
cS
σ2(αL)
σ(αH )
N 2LF
σ(αL)
N 2LF
σ(αH )
N
N
N
+
+
(cid:110)
(cid:110)
(cid:35)
(cid:34)
,
,
(cid:35)
2) Case 2: All clients misreport their private types to the
server, i.e., ˆα(αL) = αH and ˆα(αH ) = αL. In this case, the
server will use the aggregation rule (8) with σ∗
i (αi = ˆαi)
according to clients' misreported type ˆαi.
Lemma 2. In Case 2 where all clients misreport their types
to the server, all clients' noise adding strategies σcase2(αL)
and σcase2(αH ) at the BNE are solutions to the equation set:
(1 − αL)κ
σ(αL)
σ4 (αH )
(cid:80)N −1
n=0 p(n)
(cid:32)
(n+1)
+(N −1−n)
(n+1)
+(N −1−n)
σ2 (αL)
σ4 (αH )
1
σ2(αH )
(cid:33)− 1
2
σ2(αH )
σ4(αL)
1
σ2(αL)
+
LF ((n+1)
1
σ2(αH )
1
+(N −1−n)
)2
+ 2βH ( N −1
N
)2σ(αL ) = αL
cS
σ2 (αL)
,
1
σ2 (αL)
(cid:32)
n
σ2(αL)
σ4(αH )
n
1
σ2(αH )
+(N −n)
+(N −n)
(cid:33)− 1
2
σ2(αH )
σ4(αL)
1
σ2(αL)
+
LF (n
1
σ2(αH )
1
+(N −n)
1
σ2(αL)
)2
+ 2βL ( N −1
N
)2 σ(αH ) = αH
cS
σ2(αH )
.
3) Case 3: All clients report their types truthfully, i.e.,
ˆα(αL) = αL, ˆα(αH ) = αH . In this case, the server will
use the aggregation rule (8) with σ∗
i (αi = ˆαi) according to
clients' reported type ˆαi. Similarly, the reward function and
penalty coefficient β( ˆα) include two parts, depending on the
outcome type ˆαi.
Lemma 3. In Case 3 where all clients reports their types
ˆαL(αL) = αL and ˆαH (αH ) = αH truthfully to the server, all
clients' noise adding strategies σcase3(αL) and σcase3(αH )
at the BNE are solutions to the equation set:
(cid:16)
(n+1)σ−2(αL)+(N −1−n)σ−2(αH )
(1 − αL)κσ−3 (αL) (cid:80)N −1
n=0 p(n)
(1 +
LF
(cid:17)− 1
2
)
(cid:16)
(n + 1)σ−2 (αL) + (N − 1 − n)σ−2 (αH )
(cid:17)− 3
2
(cid:35)
+2βL( N −1
N
)2σ(αL) = αL
cS
σ2(αL)
,
(1 − αH )κσ−3(αH ) (cid:80)N −1
n=0 p(n)
(1 +
(cid:16)
nσ−2(αL)+(N −n)σ−2(αH )
(cid:17)− 1
2
LF
)
(cid:16)
nσ−2(αL) + (N − n)σ−2(αH )
(cid:17)− 3
2
(cid:35)
+ 2βH ( N −1
N
)2 σ(αH ) = αH
cS
σ2(αH )
.
Notice that in all cases, the server imposes penalties and
rewards predicated on all clients' reported types ˆα. For
example, we give the penalty coefficient βi(ˆαi) as
(cid:40)
βi(ˆαi) =
βL,
βH ,
if ˆαi = αL,
if ˆαi = αH .
Both noise-adding strategies σ(αL) and σ(αH ) are functions
N − 1
N
)2σ2
i +
(cid:80)N
j=1,j(cid:54)=i(σj(αj))2
N 2
(cid:33)(cid:35)
.
(1 − αH )κ
σ(αH )
σ4(αL)
(cid:80)N −1
n=0 p(n)
of clients' actual type αi ∈ {αL, αH }, and depends on clients'
type distribution parameter η, total number of clients N , and
the penalty coefficients β. By comparing the expected cost for
the minimum, each client i will choose the type reporting ˆαi
at the BNE from the three cases above.
C. Pricing Mechanism Design in Stage I
After analysing all clients' type reporting and noise adding
strategies in Stage II, in this subsection we are ready to proac-
tively design the pricing mechanism P = (r( ˆα), p( ˆα, ̃w), q)
from Definition 5 in Stage I, with the goal of truthful reporting,
social efficiency and ex-ante budget balance.
Fig. 2. Social costs with or without the pricing scheme in Definition 5 versus
η. The setting is N = 100, T = 30, αL = 0.25, αH = 0.75.
n=0 C n
First we define some notations to simplify the BNE results:
N −1ηn(1 − η)N −1−n * p(N − 1 − n), Q2 =
let Q1 = (cid:80)N −1
(cid:80)N −1
n=0 C n
X1(n) = (n + 1)(σ∗∗(αL))−2 + (N − 1 − n)(σ∗∗(αH ))−2,
X2(n) = n(σ∗∗(αL))−2 + (N − n)(σ∗∗(αH ))−2,
N −1ηn(1 − η)N −1−n * p(n + 1),
where (σ∗∗(αL), σ∗∗(αH )) is the social optimal noise level,
N ηn(1 − η)N −n denote the probability that the true
p(n) = C n
number of clients with type αL is exactly n.
=
Proposition
(r( ˆα), p( ˆα, ̃w), q) in Definition 5, by setting the penalty
coefficient β( ˆα) with
pricing mechanism P
the
In
5.
L
β
=
κN 2
2(N − 1)2(σ∗∗ (αL))4
(1 − αL)
N −1
(cid:88)
n=0
p(n)n
1 +
X
− 1
2
1
LF
(n)
− 3
2
1
X
(n)
+
1 − η
η
(1 − αH )
N −1
(cid:88)
n=0
p(n)n
1 +
X
− 1
2
2
LF
(n)
− 3
2
2
X
(n)
,
H
β
=
κN 2
2(N − 1)2(σ∗∗ (αH ))4
η
1 − η
(1 − αL)
N −1
(cid:88)
n=0
p(n)(N − 1 − n)
1 +
X
− 1
2
1
LF
(n)
− 3
2
1
X
(n)
+ (1 − αH )
N −1
(cid:88)
p(n)(N − n)
1 +
X
− 1
2
2
LF
(n)
− 3
2
2
X
(n)
,
n=0
and the reward function
ri( ˆα) =
with
rL
=
(cid:40)
rLp( ˆNL( ˆα)),
rH p( ˆNL( ˆα)),
if ˆαi = αL,
if ˆαi = αH ,
(cid:16) Q2(A3−A1)−Q1(A2−A4)
Q2
(cid:17)
,
, 0
max
2−Q2
1
(cid:16) Q1(A3−A1)−Q2(A2−A4)
Q2
=
max
rH
and
2−Q2
1
ˆNL( ˆα) = (cid:80)
i∈N 1 ˆαi=αL denoting the number of received
reporting types of αL, our pricing mechanism ensures
all clients' truthful type reporting and achieves the social
optimum of noise-adding. The detailed forms of Ai (i=1,2,3,4)
are given in the on-line technical report [10].
, 0
,
(cid:17)
Notice that p( ˆNL( ˆα)) denote the probability that the real
number of clients with type αL is exactly the number ˆNL( ˆα)
of received number of reporting with type αL. This probability
guarantees the incorporation of all reporting decisions into the
reward function, thereby preventing clients from deviating.
For instance, one cannot misreport for a higher reward, as
such symmetric misreporting by other clients of the same
type would result in a reduced reward for all. The penalty
.
q =
(cid:0)(cid:80)
i∈N ri( ˆα(α))(cid:1)
coefficients are designed through a comparison of clients'
equilibrium and socially optimal strategies, as seen in complete
information scenarios. We also ensure the ex-ante budget
balance by numerically designing the compensation payment
in Definition 5 as:
Eα∼GN
i∈N pi( ˆα(α)) − (cid:80)
N
When we fix αL and αH , the parameter η can be used to
measure the divergence of clients' types αi's. When η = 0.5,
the diversity of clients' type distribution is at its maximum.
In our experiments on FL systems, we use a squared-SVM
training model based on the original MNIST dataset with a loss
(cid:9)2
function Fi (w, xj, yj) = λ
2 (cid:107)w(cid:107)2 + 1
and λ is a constant. The training output is a binary model, and
each client has 1000 training and 1000 testing data samples in
each simulation round. Fig. 2 shows the social costs under
our proposed pricing scheme in Definition 5 and the no-
pricing benchmark. Both social costs increase as the variance
of αi's increases (i.e., η → 0.5), and our pricing scheme
more significantly reduces the social cost compared to the
benchmark with the maximum , which are consistent with our
findings under complete information.
2 max (cid:8)0; 1 − yjwTxj
V. CONCLUSION
In this paper, we adopt a game-theoretic perspective to
examine clients' privacy-preserving strategies in federated
learning systems. We propose a two-stage game model to
capture the interactions between clients and the server, and
introduce pricing mechanisms to regulate clients' selfish be-
haviors. Our pricing scheme is designed to reach the social
optimum without verifying the actual noise-adding level. Even
under incomplete information of clients' private types, our
mechanism incentivizes truthful reporting. Our analysis of the
ratio of social costs shows that our approach outperforms
the unguided one, with simulation results revealing greater
improvement as the diversity of clients' types increases.
REFERENCES
[1] 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.
00.20.40.60.8120253035404550Social CostWith pricing scheme as Definition 5Benchmark without any pricing scheme[2] 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.
[3] B. Zhao, K. R. Mopuri, and H. Bilen, "idlg: Improved deep leakage
from gradients," arXiv preprint arXiv:2001.02610, 2020.
[4] R. Shokri, M. Stronati, C. Song, and V. Shmatikov, "Membership
inference attacks against machine learning models," in IEEE symposium
on security and privacy (SP), 2017, pp. 3–18.
[5] M. Abadi, A. Chu, I. Goodfellow, H. B. McMahan, I. Mironov, K. Tal-
war, and L. Zhang, "Deep Learning with Differential Privacy," in ACM
SIGSAC Conference on Computer and Communications Security, Vienna
Austria, 2016, pp. 308–318.
[6] K. Wei, J. Li, M. Ding, C. Ma, H. H. Yang, F. Farokhi, S. Jin,
T. Q. S. Quek, and H. V. Poor, "Federated Learning With Differential
Privacy: Algorithms and Performance Analysis," IEEE Transactions on
Information Forensics and Security, vol. 15, pp. 3454–3469, 2020.
[7] X. Yang, Y. Feng, W. Fang, J. Shao, X. Tang, S.-T. Xia, and R. Lu, "An
accuracy-lossless perturbation method for defending privacy attacks in
federated learning," in ACM Web Conference, 2022, pp. 732–742.
[8] M. Noble, A. Bellet, and A. Dieuleveut, "Differentially private feder-
ated learning on heterogeneous data," in International Conference on
Artificial Intelligence and Statistics. PMLR, 2022, pp. 10 110–10 145.
[9] 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, 2021.
[10] S. Hong and L. Duan, "On-line technical report," https://www.dropbox.
com/s/kt2dcmyopzp4is4/ICC2023.pdf?dl=0.
[11] H. B. McMahan, D. Ramage, K. Talwar, and L. Zhang, "Learn-
ing differentially private recurrent language models," arXiv preprint
arXiv:1710.06963, 2017.
[12] R. C. Geyer, T. Klein, and M. Nabi, "Differentially private federated
learning: A client level perspective," arXiv preprint arXiv:1712.07557,
2017.
[13] C. Dwork, A. Roth et al., "The algorithmic foundations of differential
privacy." Foundations and Trends® in Machine Learning, vol. 9, no.
3-4, pp. 211–407, 2014.
[14] M. Tang and V. W. Wong, "An incentive mechanism for cross-silo
federated learning: A public goods perspective," in IEEE Conference
on Computer Communications(INFOCOM).
IEEE, 2021, pp. 1–10.
[15] T. Song, Y. Tong, and S. Wei, "Profit allocation for federated learning,"
IEEE, 2019,
in IEEE International Conference on Big Data (Big Data).
pp. 2577–2586.
[16] A. Richardson, A. Filos-Ratsikas, and B. Faltings, "Budget-bounded
Springer,
incentives for federated learning," in Federated Learning.
2020, pp. 176–188.
[17] X. Li, K. Huang, W. Yang, S. Wang, and Z. Zhang, "On the convergence
of fedavg on non-iid data," in International Conference on Learning
Representations, 2020.
[18] X. Wang, Y. Xiang, J. Gao, and J. Ding, "Information laundering for
model privacy," arXiv preprint arXiv:2009.06112, 2020.
[19] C. Courcoubetis and R. R. Weber, "Economic issues in shared infras-
tructures," in ACM workshop on Virtualized infrastructure systems and
architectures, 2009, pp. 89–96.
|
|
http://arxiv.org/abs/2302.12721v1 | 2023-02-24T16:20:40 | 2023-02-24T16:20:40 | LightTS: Lightweight Time Series Classification with Adaptive Ensemble
Distillation -- Extended Version | Due to the sweeping digitalization of processes, increasingly vast amounts of
time series data are being produced. Accurate classification of such time
series facilitates decision making in multiple domains. State-of-the-art
classification accuracy is often achieved by ensemble learning where results
are synthesized from multiple base models. This characteristic implies that
ensemble learning needs substantial computing resources, preventing their use
in resource-limited environments, such as in edge devices. To extend the
applicability of ensemble learning, we propose the LightTS framework that
compresses large ensembles into lightweight models while ensuring competitive
accuracy. First, we propose adaptive ensemble distillation that assigns
adaptive weights to different base models such that their varying
classification capabilities contribute purposefully to the training of the
lightweight model. Second, we propose means of identifying Pareto optimal
settings w.r.t. model accuracy and model size, thus enabling users with a space
budget to select the most accurate lightweight model. We report on experiments
using 128 real-world time series sets and different types of base models that
justify key decisions in the design of LightTS and provide evidence that
LightTS is able to outperform competitors. | [
"David Campos",
"Miao Zhang",
"Bin Yang",
"Tung Kieu",
"Chenjuan Guo",
"Christian S. Jensen"
] | 10.1145/3589316 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1145/3589316",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12721v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12721v1",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Proceedings of the ACM on Management of Data 1, 2 (2023),\n 171:1-171:27"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.DB"
] | LightTS: Lightweight Time Series Classification with Adaptive
Ensemble Distillation-Extended Version
David Campos1, Miao Zhang1,2, Bin Yang1,3, Tung Kieu1, Chenjuan Guo1,3, and Christian S. Jensen1
1Aalborg University, Denmark 2Harbin Institute of Technology, Shenzhen, China 3East China Normal University, China
1{dgcc,tungkvt,csj}@cs.aau.dk [email protected] 3{byang, cjguo}@dase.ecnu.edu.cn
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
1
2
7
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Due to the sweeping digitalization of processes, increasingly vast
amounts of time series data are being produced. Accurate classifi-
cation of such time series facilitates decision making in multiple
domains. State-of-the-art classification accuracy is often achieved
by ensemble learning where results are synthesized from multiple
base models. This characteristic implies that ensemble learning
needs substantial computing resources, preventing their use in
resource-limited environments, such as in edge devices. To extend
the applicability of ensemble learning, we propose the LightTS
framework that compresses large ensembles into lightweight mod-
els while ensuring competitive accuracy. First, we propose adaptive
ensemble distillation that assigns adaptive weights to different base
models such that their varying classification capabilities contribute
purposefully to the training of the lightweight model. Second, we
propose means of identifying Pareto optimal settings w.r.t. model
accuracy and model size, thus enabling users with a space budget
to select the most accurate lightweight model. We report on experi-
ments using 128 real-world time series sets and different types of
base models that justify key decisions in the design of LightTS and
provide evidence that LightTS is able to outperform competitors.
1 INTRODUCTION
With the instrumentation of processes in a broad range of settings,
time series data is increasingly prevalent. As a result, the ability
to analyze and create value from time series data is increasingly
important. For example, accurate classification of time series is
important in applications related to health, in industrial automation,
in web services, and in cybersecurity [1, 18, 48].
Time series classification methods are already capable of high
accuracy [44]. Most state-of-the-art methods [32, 36, 37] rely on en-
semble learning, where multiple base models perform classification
jointly. Ensemble learning is based on the wisdom of the crowd,
suggesting that a joint result from the crowd is often superior to
any result from a single source [2]. As shown in Figure 1(a), N
base models (BMs), e.g., classifiers based on InceptionTime [19],
Temporal Dictionary [38], or Forest Classifier [14], are combined
to provide a joint result. A simple and effective combination ap-
proach that is used commonly is to assign identical weights to all
base model, e.g., 1/N in Figure 1(a), such that all models contribute
equally to the result of the ensemble [6, 16, 31, 59].
While ensemble based methods achieve state-of-the-art accu-
racy, the use of multiple base models requires significant resources
for storing and executing the base models, which prevents their
use in resource-limited environments, e.g., on edge devices. For
example, the ongoing transformation of power grids to support
sustainable energy sources, e.g., wind and solar, relies on power
electronics (PE) devices that often have limited memory and com-
putational capabilities. It is of great interest to be able to perform
time series classification on PE devices-classifying workload time
series into different load levels can enable adaptive control and
maintenance [58]. To enable such uses, it is important to develop
lightweight models, e.g., using quantized (e.g., 4, 8, or 16 bits) param-
eters instead of full-precision (i.e., 32 bits) parameters. For instance,
a 16-bit quantized model may use only 50% of the storage of its full-
precision 32-bit counterpart. Focusing on the domain of time series
classification enables demonstrating the applicability of the pro-
posed method in real-world use cases such as PE adaptive control,
in addition to enabling evaluation of the proposal. Our methodology
is applicable in other domains with minor adjustments.
One approach to building such lightweight models in the setting
of large ensembles is Knowledge Distillation [25]. The idea is to
treat the large ensemble as a Teacher and then train a lightweight
Student model to mimic the results from the teacher-cf. Figure 1(b).
Though being an effective approach, two main challenges remain.
Lack of Distillation Flexibility: An important design consider-
ation in ensemble learning is to ensure a high level of diversity
among the base models. However, existing knowledge distillation
employs a single distillation step that employs the ensemble's com-
bined output to teach the lightweight model, causing the contri-
bution by each base model to be fixed. When an ensemble uses
equal weights to combine the results of its base models, all base
models contribute equally to the lightweight model. This signifi-
cantly reduces the distillation flexibility. For example, some base
models may be more suitable for guiding the training of a 4-bit
quantized student model, while other base models may be more
suitable for a 16-bit model. Existing solutions are unable to identify
and exploit such diversity in the distillation process. As an analogy,
in a real-world teacher-student context, it is a good strategy to align
different subject teachers, e.g., physics or math teachers, with the
students who lack of the corresponding knowledge, e.g., physics
or math. Thus, using the same teacher, i.e., the ensemble, to teach
different quantized student models is too rigid. To enhance distilla-
tion flexibility, an approach is needed that can select different base
models adaptively, disregarding some models, and can assign appro-
priate weights to the selected models, thereby distilling knowledge
according to each student model's level of compression.
Lack of Support for Pareto Optimal Settings: Existing knowl-
edge distillation considers distillations under specific student set-
tings [40]. For instance, for a deep learning based student model, a
student setting often specifies the number of layers and the quan-
tization bits of the parameters, e.g., 3 layers, 8 bits, and 40 filter
length as shown in Figure 1(b). However, in practical settings, we
often do not know how to configure such specific student settings
for different devices. Instead, only storage constraints are known.
(a) Ensemble classifier.
(b) Knowledge distillation.
(c) LightTS.
Figure 1: Ensemble Classifier, Knowledge Distillation, and LightTS.
Thus, it is beneficial to obtain Pareto optimal settings considering
accuracy vs. model sizes, a.k.a. Pareto frontiers (see the example in
Figure 2) over a large number of possible student settings. Given
edge devices with different storage constraints, Pareto frontiers
facilitate the selection of model settings with the highest accuracy
while meeting the storage constraints. For example, consider De-
vice #1 with a memory constraint of 100K. The Pareto frontier in
Figure 2 implies that Model U is the optimal model for the device, as
it has the highest accuracy among all models whose size is within
100K. The settings of Model U , 4 layers and 4-bit parameters, should
be used for Device #1. Similarly, for Device #2 with a memory con-
straint of 140K, we can use the frontier to identify an optimal model,
i.e., Model V . Thus, an effective and efficient method to identify the
Pareto frontier from a large number of student settings is called for
since the search space can reach sizes of 105 or even more.
y
c
a
r
u
c
c
A
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
Device #1
Device #2
V:l=5,b=8
U:l=4,b=4
60 K
80 K
100 K 120 K 140 K 160 K 180 K
Model Size
Figure 2: Pareto Frontier Example. Circles and crosses repre-
sent possible student settings. The Pareto frontier consists
of circles that represent optimal settings, as no other set-
tings exist with higher accuracy and smaller model size.
To address the two limitations, we propose LightTS, a flexible
framework to obtain Lightweight Time Series classification models
using novel adaptive ensemble distillation, as illustrated in Fig-
ure 1(c). LightTS is flexible in that it is model-agnostic-different
types of base models, including both deep and non-deep learning,
can be used in an ensemble that serves as input to LightTS.
Addressing Challenge 1: To ensure high distillation flexibility,
we propose a novel adaptive ensemble distillation. LightTS treats
all base models as teachers, rather than using the ensemble as a
single teacher, as done in classic knowledge distillation. In addi-
tion, LightTS adaptively assigns appropriate weights to different
2
teachers (λi for teacher i in Figure 1(c)). Given a specific quantized
student model, e.g., a 16-bit model, LightTS enables assignment of
higher weights to the teachers that may contribute more knowledge
to the training of the 16-bit model. It is also possible to disregard
unimportant teachers by assigning them zero weight. When a dif-
ferently quantized student model is called for, LightTS is able to
assign a different set of weights to the teachers. This offers con-
siderable distillation flexibility. We achieve this by a novel bi-level
optimization approach-an inner level optimization learns the quan-
tized model parameters of the student model, while an outer level
optimization adjusts the teacher weights {λi }N
Addressing Challenge 2: We propose a novel encoded multi-
objective Bayesian optimization method to identify the Pareto fron-
tiers (see the lower part in Figure 1(c)). To do so, we first define a
search space that models a wide variety of quantized student model
settings. As shown in Figure 1(c), the search space specifies possible
layers per block (e.g., 1, 2, 3, 4, or 5), quantized parameter bit-widths
(e.g., 4, 8, 16, or 32 bits), and filter length (e.g., 10, 20, 40, 80, or 160).
Each layer can use parameters of a distinct size, thus giving rise to
a wide variety of quantized model settings.
i=1.
Given a quantized model setting, we are able to obtain its accu-
racy, by using the proposed adaptive ensemble distillation, along
with its model size, by counting the total bits. However, it is prohib-
itively inefficient to compute the accuracy and size of all quantized
student model settings in the search space. Instead, we propose a
novel encoded multi-objective Bayesian optimization method to
explore the most promising settings while considering both accu-
racy and model size. In particular, we propose a novel encoding
scheme for the search space such that the encoded space captures
appropriate semantics and fits Bayesian optimization better. This
enables effective identification of Pareto frontiers.
Contributions: To the best of our knowledge, this is the first study
that introduces an adaptive ensemble distillation scheme and a
generic framework to identify a set of Pareto optimal lightweight
models that comply with different storage constraints for time
series classification. The paper makes the following contributions.
• It proposes an ensemble distillation strategy that is able to
adaptively select important base models and assign these
appropriate weights, while disregarding unimportant base
models, thus enabling more flexible knowledge distillation
to lightweight models than hitherto possible.
BM 1EnsembleBM NBM 3BM 2...Full precision modelQuantized modelRegular EnsembleKnowledge DistillationOptimization FlowLegend:Adaptive DistillationλTeacher removalBM 1Ensemble/TeacherBM NBM 3BM 2Knowledge distillation...Under a specific setting, e.g., 3-layers, 8-bits, 40-lengthStudentBM 1 Teacher 1BM N Teacher NBM 3 Teacher 3BM 2 Teacher 2...Studentλ1λ2λNλ3Encoded Multi-objective Bayesian OptimizationSearch Space Layers: {1,2,3,4,5}
Bits: {4,8,16,32}
Length: {10,20,40,80,160}Optimized Settings• It proposes a novel encoding scheme along with an encoded
multi-objective Bayesian optimization method to find Pareto
frontiers, facilitating the identification of optimal models
under different storage constraints.
• It reports on comprehensive experiments that justify key
design decisions and demonstrate that LightTS is able to
outperform state-of-the-art solutions.
The remainder of the paper is organized as follows. Section 2 covers
preliminaries. Section 3 details the framework, and Section 4 reports
on the experiments. Section 5 reviews related work, and Section 6
concludes.
2 PRELIMINARIES
This section presents concepts that are necessary to introduce the
proposed framework.
2.1 Time Series Classification
2.1.1 Time Series. A time series T = ⟨t1, t2, . . . , tC ⟩ is a sequence
of C observations where each observation is an M-dimensional
vector, so tj ∈ RM .
2.1.2 Labeled Time Series. A labeled time series set D is a collec-
tion of (Ti, li ) pairs, where Ti is a time series and li ∈ L is the time
series's label, indicating a specific class among a set of classes L. For
example, in a human activity time series data set, L includes labels
representing different activity classes, such as walking, jumping,
and jogging.
2.1.3 Time Series Classification. A time series classifier is a func-
tion that takes as input a time series and returns its corresponding
label. During training, we are given a labeled time series set to train
the classifier. The accuracy of the classifier is evaluated on time
series that do not appear in the labeled time series set using for
training.
2.2 The InceptionTime Classifier
We use InceptionTime [19], a state-of-the-art neural classifier for
time series, as the student model in LightTS. Two considerations
lead to this choice of a neural classifier for achieving lightweight
student models. First, neural classifiers achieve state-of-the-art time
series classification accuracy [19]. Second, neural classifiers offer a
high degree of compressibility to be discussed in Section 2.3.
InceptionTime is a convolution neural network that employs
variable-length convolution filters to capture temporal patterns
of different time spans. Figure 3 shows an InceptionTime model
with 3 blocks, each with multiple convolutional layers (cf. the
zoom-in of the first block). A layer uses a specific number of same-
length convolution filters to extract features from the time series
T . Then, the different convolution layers are stacked. Specifically,
T (i) = (cid:13)
(cid:13)k T (i−1) ∗ Fk where F is a convolution filter, ∗ denotes
1D convolution, (cid:13)
(cid:13) denotes concatenation, and T (i) is the output of
the i-th block and T (0) = T . The lengths of convolution filters in
different layers generally vary, enabling the capture of patterns of
varying lengths. More specifically, the filter lengths are decreased
by half. For the 3-layer block, the filter lengths may be 40, 20, and
10. Processing time series with multiple layers with different fil-
ters provides a comprehensive context for classifying time series
since patterns of different length will fit better on the filters with
the closer length, as their receptive field [33] matches the pattern.
Thus, the concatenated output of the layers is the input for the
following block. Finally, the output of the last block is passed to a
fully connected (FC) layer with a Softmax function to assign a class
distribution to the time series.
Figure 3: InceptionTime Classifier.
2.3 Quantized Neural Classifiers
Neural classifiers offer a high degree of compressibility. A neural
classifier like InceptionTime often consists of blocks, each with
multiple layers, each of which in turn includes convolutional filters
with different lengths. The parameters in the filters are often 32-bit
float, so full-precision InceptionTime always use 32-bit parame-
ters. Thus, to compress a neural classifier, it is possible to reduce the
number of blocks, the number of layers in a block, the filter lengths,
and the bit-width of the parameters in the different layers (i.e., pa-
rameter quantization), as shown in Figure 3. For example, Figure 4
illustrates how full-precision parameters, i.e., 32-bit floats, can be
quantized into 3-bit parameters using uniform quantization [23].
As 8.623728 falls into the interval [7.5, 12.5), it maps to 10, which is
then mapped to the 3-bit bucket 101.
Figure 4: Quantization Mapping.
2.4 Knowledge Distillation
Knowledge Distillation (KD) [25] aims to transfer knowledge from
a teacher model to a student model, where the teacher is often a
larger model with higher discriminative capacity than the student.
In classification, the knowledge is represented by a probability
3
InceptionTimeBlock 2 Layers: 2
Filters: 20, 10
Bits: 4Block 3 Layers: 3
Filters: 80, 40, 20
Bits: 8Block 1 Layers: 3
Filters: 40, 20, 10
Bits: 16Time SeriesFiltersConcatenationConvolution
*FkClass
probabilitiesFCFloatQuantized levels8.62372810515Binary buckets0000010100111001011107.512.5distribution over classes produced by the teacher model. Let q
and p represent the class distributions from the teacher and the
student, respectively. Then, knowledge distillation is formalized in
Equation 1, where α ∈ [0, 1] is a hyper-parameter [54].
L = α × LCE (p, y) + (1 − α) × Dist (q, p)
(1)
Specifically, the loss function is computed over two components
that are weighted by α. The first component is the cross-entropy
(CE) between the student class probabilities p and the ground truth
label y, which provides supervision from the ground truth labels.
The second component represents the distance between the teacher
and student distributions q and p, e.g., Kullback–Leibler (KL) di-
vergence, to encourage a student to mimic the behavior of a more
powerful teacher. They both contribute to training an accurate
student.
When a group of base models is available as the teachers, their
average-ensemble, q = 1/N ×(cid:205) qi , where qi is the class distribution
returned by the i-th base model, is typically considered as the
knowledge source [17]. Figure 5 shows an example of the knowledge
distillation with an ensemble consisting of three base models.
However, establishing student settings that achieve good ac-
curacy vs. space trade-offs is non-trivial, and it is inefficient to
manually identify such promising settings. Therefore, we consider
a second problem scenario, where the setting for the quantized
student model is not given. Instead, we define a search space that
covers a wide variety of lightweight student settings. Here, the goal
of LightTS is to identify the Pareto frontier in this space, which
includes Pareto optimal settings with the property that no other
settings have higher accuracy and smaller model size. We propose
an encoded multi-objective Bayes optimization method to identify
the Pareto frontier (cf. Section 3.3). Then, given a device with a
specific memory constraint, we can choose the setting that achieves
the highest accuracy while complying with the memory constraint.
Figure 6: LightTS Workflow.
3.2 Adaptive Ensemble Distillation
In the first problem scenario where a lightweight student setting is
given, we propose an adaptive ensemble distillation (AED) process
which assigns the teachers with learnable, adaptive weights, such
that different teachers can contribute differently to the student. The
scenario is aligned with the real-world analogy of taking advantage
from the skills of particular teachers to prepare the students who
require them the most, such as focusing on a specific subject teacher.
Learning adaptive weights. To obtain an accurate lightweight
3.2.1
student, we need to consider two perspectives. First, we need the su-
pervision from the ground truth labels in the training data. Second,
we need the guidance from the knowledge of the already trained
full-precision teachers. To distill knowledge from an ensemble of
already trained full-precision teachers, the classic knowledge distil-
lation (cf. Figure 5 in Section 2.4) utilizes the average knowledge of
the N base models. Instead, in AED, we propose to introduce direct
connections from every base model to the student, such that each
base model works as a teacher, as shown in Figure 7. In the upper
part, the knowledge distillation is drawn by a direct link between
every teacher and the student. The knowledge from each teacher,
i.e., its class distribution qi , guides the learning of the student's class
distribution pw, through a distance metric Dist (qi, pw), controlled
by a weight λi . In the bottom, the student's class distribution pw
is also adjusted with respect to the ground truth y using the cross-
entropy (CE) loss. Here, we denote the student's class distribution
by pw, meaning that it is the distribution returned by the student
with model parameter w.
Figure 5: Classic Ensemble Knowledge Distillation.
3 LightTS
We first introduce the two problem scenarios supported by LightTS.
Then, we proceed to introduce two main building blocks of LightTS,
adaptive ensemble distillation and Pareto frontier identification, which
each targets one of the two problem scenarios.
3.1 Problem Scenarios
The input to LightTS is an already trained ensemble consisting of
N full-precision base models {BMi }N
i=1, as shown in Figure 6. Al-
though we employ InceptionTime as the quantized student model,
LightTS is not limited to InceptionTime but can also support other
bases models, including both deep and non-deep learning models.
It is only required that the base models output class distributions.
This design makes LightTS a generic framework.
The two problem scenarios supported by LightTS are shown
in Figure 6. First, a specific lightweight student setting is given,
e.g., the number of layers, filters length, and the quantization bits
per layer. Here, the goal of LightTS is to build an accurate student
model under this lightweight setting. We propose adaptive ensemble
distillation to support this scenario (cf. Section 3.2).
4
StudentBM 1BM 2BM 3q1:{0.4, 0.6}q2:{0.5, 0.5}q3:{0.7, 0.3}Ensemble/Teacher q:(0.4+0.5+0.7)/3, (0.6+0.5+0.3)/3pDist(q,p)Guidance from teacher knowledge yLCE(p,y)Supervision from ground truthAccurate Lightweight Student ModelPareto FrontierA Specific Student SettingStudent Setting Search SpaceLightTSEncoded Multi-objective Bayesian OptimizationBM 2 Teacher 2...BM 3 Teacher 3BM 1 Teacher 1BM N Teacher NAdaptive Ensemble Distillationdenote λi with a box to indicate that it is not changing during the
inner optimization step, usually referred as parameters freezing [3].
Here, the Softmax function σ (*) assures (cid:205) σ (λi ) = 1.
In Equation 3, representing the outer-level optimization, the goal
is to find the best λ given that the student has already an optimal
weight w ∗, so the distances with respect to all teachers are set and
weighted by λ. The step uses a validation set to assure that its
optimization is independent with respect to the w ∗ adjustments,
and the λ is optimized using back-propagation (BP). The λ set
acts as hyper-parameters to the inner step, so also using the same
training set could derive on unsought conditions such as overfitting,
and thus we use the validation set instead. The step is shown in
line 8 in Algorithm 1. Similarly to line 6, we use boxes to indicate
that the classification cross entropy loss and the distances w.r.t. the
teachers are fixed during the outer optimization. We run multiple
inner-level steps for each outer-level one to have a stable training,
meaning that the model will not get different λ values at every
iteration. It gets a single set of λ, train for v iterations, and then get
another updated set for λ.
Complexity: Algorithm 1 executes E training epochs. In each, BP
updates the model parameters w; and every v epochs, BP updates λ.
This gives cost E × BPw + E/v × BPλ, where BPw and BPλ are the
costs for updating the parameters w and λ using BP, respectively.
Since there are many more parameters in w than in λ and v is a
small constant, we obtain an asymptotic complexity of O (E × BPw),
the same as for classic Knowledge Distillation.
Algorithm 1 Learning Adaptive Weights
1: Input: [q1, q2, . . . , qN ]: N class distributions from full preci-
sion teachers.
2: [λ1, λ2, . . . , λN ] ← Uniform weight initialization: 1/N
3: v ← Validation steps
4: Quantized weight w: ← Random initialization
5: for training epochs e ← 1, 2, . . . , E do
⊲ Using training data
arg minw α × LCE (pw, y) +
6:
7:
8:
(1 − α) × (cid:205)N
i=1
σ (λi ) × Dist (qi, pw)
if e mod v = 0 then
⊲ Using validation data
arg minλ α × LCE (pw, y) +
(1 − α) × (cid:205)N
i=1
σ (λi ) × Dist (qi, pw)
In addition to classification, the proposal can be applied to fore-
casting by replacing the cross entropy term in Equation 2 by a
forecasting error term, e.g., mean square error.
3.2.2 Removing Unimportant Teachers. We have teachers and stu-
dents with different strengths and limitations. Recall that a design
principle of ensemble learning is to maintain high diversity among
the base models, i.e., the teachers in our setting. The students are
also diverse as they are constrained in different ways, e.g., different
layers, filter lengths, and bit-widths. Ideally, we want to associate
the students with the teachers that offer them the most knowledge
(already achieved in the proposed AED), while removing teachers
who are not contributing or even affecting adversely the student
learning. In addition, removing teachers that do not contribute
Figure 7: Adaptive Ensemble Distillation (AED).
Formally, in contrast to the ensemble distillation loss shown in
Equation 1, now the distance among every teacher and the student is
included as the second component weighted by their corresponding
λi ∈ [0, 1], where (cid:205) λi = 1, as shown in Equation 2. Thus, instead
of having one consolidated guidance between the ensemble and
the student, we now consider individual guidances between the
teachers and the student weighted by their associated weight λi .
L = α × LCE (pw, y) + (1 − α) ×
N
∑︁
i=1
λi × Dist (qi, pw)
(2)
As it can be observed in the new loss function, the two compo-
nents represent different types of weights that we want to optimize.
First, the classification cross-entropy loss LCE (pw, y) involves pw,
which is associated with quantized model parameters w from the
student, e.g., quantized convolutional filters. Second, the degree
of contribution λi comes from each teacher. Both components are
dependent to each other because (i) when w is learned, it requires
to know how much the teachers are contributing via their λi ; and
(ii) while adjusting the set λ = {λi }N
i=1, it requires to perceive the
student accuracy, i.e., depending on w. The condition of having two
optimization objectives leads us to consider a bi-level optimization
modeling, where each objective can be adjusted alternatively while
considering the results from each other.
In the inner-level optimization stage, we learn the model param-
eters w for the student. While adjusting w, the λ is kept static, the
distances with respect to the teachers Dist (qi, pw) and the classi-
fication loss LCE (pw, y) can change, as they are dependent on w.
This step uses the training data set. In the outer-level optimization
stage, the λ is adjusted using the validation set, while the distances
w.r.t. the teachers and the cross-entropy loss remain unchangeable.
Formally, the above bi-level optimization is detailed next in Equa-
tions (3) and (4), where Dtrain and Dvalidation denote the data for
training and validation, respectively. It is detailed in Algorithm 1.
L (λ, w ∗, Dvalidation)
arg min
s.t ., w ∗ = arg minw
λ
L (λ, w, Dtrain)
(3)
(4)
Equation 4 represents the inner-level optimization. Under a specific
disposition of λ, it finds the optimized student weights w ∗, meaning
that under this specific λ, the student with w ∗ gives the best accu-
racy on the training data. It uses the training set, since in this step
it is where the model is supervised trained in terms of classification
performance, where cross-entropy loss with ground truths is used.
The step is shown in line 6 in Algorithm 1. Here, pw represents
the class distribution for the student, given its parameters w. We
5
Teacher 1, q1...Student, pwTeacher 2, q2Teacher N, qNλ2×Dist(q2,pw)λ1×Dist(q1,pw)λN×Dist(qN,pw)yLCE(pw,y)to the student makes it easier to assign more accurate adaptive
weights in future iterations.
A simple yet effective principle for removing unnecessary teach-
ers is considering the student classification accuracy as the indicator
of improvement. In the current scenario, we can use the student
accuracy as the metric for evaluating if the removal of one teacher
is contributing to a better guidance to the student. The criteria can
be applied with the leave-one-out idea [39] that iteratively removes
teachers. After removing a teacher, we can check whether the stu-
dent improves the classification accuracy. For example, in Figure 8
we present a scenario with five teachers. If we want to remove
one teacher, there are five different ways to do so, i.e., removing
T1, T2, T3, T4, or T5. Then, we can evaluate whether removing Ti
results in student accuracy improvement. If so, we consider further
removing. Otherwise, we stop removing. For example, if removing
T1 or T4 further improves the student performance, while T2, T3,
and T5 decrease it, we continue the leave-one-out removal for T1
and T4 branches, but stop further removal for the other 3 cases, as
Figure 8 shows.
This solution is not efficient if we only rely on the student per-
formance, because we only rely on results but not criteria to choose
the teachers that will be removed. Therefore, conducting an ex-
haustive exploration becomes very costly, as shown in Figure 8,
where leave-one-out of five teachers, marked as −Ti , at the first two
iterations are exemplified. In the worst case, the number of cases
to evaluate following this strategy grows at a factorial pace, so it
becomes an intractable problem with relatively few cases, e.g., ten
teachers require 10! ≈ 3.6 × 106 evaluations.
Figure 8: Leave-one-out Based Teacher Removal, Yielding
Factorial Growth in the Worst Case.
We propose to utilize the weight λ associated with the teachers to
facilitate a more efficient teacher removal strategy. More specifically,
the teacher with the lowest λi is removed. After removing the
teacher, we conduct a new round of AED. We keep removing the
teacher with the lowest λ until running out of base models. The
maximum possible number of iterations is linear, i.e., removing all
N teachers. Finally, we return the teacher configuration with the
highest accuracy. Figure 9 shows an example where we remove T5
and then T3.
A condition that arises over using λ as the indicator for removing
teachers is that, after assuring (cid:205) σ (λi ) = 1 using a Softmax func-
tion, sometimes the λ values become very close. Thus, it becomes
ambiguous which is the weakest teacher to be removed since more
than one can be suitable. An example of five teachers is shown in
6
Figure 9: LightTS Teacher Removal.
Figure 10(a), where the first three teachers have similarly small λ
values.
(a) Softmax, Teacher
Importance.
(b) Gumbel, Teacher
Unimportance.
(c) Gumbel, Teacher
Importance.
Figure 10: Confident Teacher Removal.
To contend with the above undesired condition, we need a dis-
tribution where the majority of weights have similarly large values
and only one is significantly smaller, as Figure 10(c) shows. In such
a scenario, the removal decision is more confident, as a clearly weak
teacher is removed.
To this end, we consider a reparameterization trick, specifically
the Gumbel-Max Trick [28, 35], to introduce stochastic noises
gs into weights λ during the teacher removal to make the "re-
moving" part differentiable, and leverage a temperature factor
τ to control the sharpness of the reparameterized distribution,
exp ( (λi +gsi )/τ)
λ∗
i =
(cid:205)j exp ( (λ j +gs j )/τ) . In this way, the reparameterized weight
contains a deterministic part, i.e., λ, and a stochastic part, i.e., gs,
enabling to sample a teacher to be removed instead of just taking
the argmax, given their different probabilities. The Gumbel-Max
Trick considers the Gumbel distribution [24] for noises gs which is
stable under operations that involve finding maximums [34]. More
importantly, through controlling τ, the reparameterized weights
smoothly approach the discrete argmax computation, so as enlarg-
ing the gap between largest weight and the remaining ones and
making it likely to become the maximum, as shown in Figure 10(b).
Although a Gumbel-Softmax function on λ enables the "remov-
ing" differentiable, it behaves similarly to the argmax as the tem-
perature τ decreases close to zero, while is contrary to our intuition
which is supposed to remove the minimal one, i.e., argmin. Thus,
instead of reparameterizing the "importance" of each teacher, we
apply the Gumbel-Softmax function to the negative of the set of λ
to get the opposite behavior, which we call the "unimportance" of
exp ( (−λi +gsi )/τ)
teachers γi =
(cid:205)j exp ( (−λj +gs j )/τ) , which is shown in Figure 10(b).
Thus, we manage to maximize the teachers unimportance, identi-
fying the teacher that it is most likely to be disregarded based on
γ , as shown in Figure 10(b). Then, the values are re-parameterized
to teacher importance by applying a Softmax function to the neg-
ative of the unimportance ˆλi = σ (−γi ). In ˆλ, the minimal value is
confidently identifiable, as Figure 10(c) shows. In Algorithm 1, ˆλ
is utilized in lines 6 and 8. After Algorithm 1 finishes, the teacher
with the minimal weight ˆλ is removed.
5 Teachers T1,T2,T3,T4,T5−T2−T1−T3−T5−T44 Teachers T1,T3,T4,T54 Teachers T1,T2,T4,T54 Teachers T1,T2,T3,T54 Teachers T1,T2,T3,T4−T2−T3−T4−T5−T1−T2−T3−T54 Teachers T2,T3,T4,T5λ1λ2λ3λ4λ5Ambiguous removalγ1γ2γ3γ4γ5Confident removal̂λ1̂λ2̂λ3̂λ4̂λ5Complexity: Given an ensemble with N base models, i.e., teachers,
we can remove at most N −1 teachers. This implies that Algorithm 1
executes at most N − 1 times. Thus, the complexity of AED with
teacher removal is O (N × E × BPw).
3.3 Identifying Pareto Frontiers
In the second problem scenario, instead of identifying a well-per-
forming student for a specific setting, we explore a search space of
settings to find optimal sets of student settings that target different
space restrictions. To achieve this goal, we first define a search
space that fits neural classifiers as well define the notion of the
Pareto frontier. Then, we propose an effective encoding scheme,
that enables use of a novel multi-objective Bayesian optimization
method for identifying Pareto optimal solutions in the search space.
Search Space. The neural classifiers introduced in Section 2.3
3.3.1
have four components that contribute to the model size of a student:
the number of blocks, the number of layers per block, the filter
length, and the bit-width.
The number of blocks controls the network depth. When keeping
the number of blocks fixed, changing the number of layers per
block also controls the network depth. Thus, we consider a search
space that includes only three dimensions: the number of layers per
block, the filter length, and the bit-with per block, while keeping
the number of blocks B fixed. Different filter length enables the
capture of time series patterns of different time spans [19], which
often vary across data sets. Thus, in addition to contributing to the
model size, dynamic adjustment of the filter length enables better
classification accuracy.
Given B blocks, each block may choose the number of layers from
L = {1, 2, 3, 4, 5}, a filter length from F = {10, 20, 40, 80, 160}, and a
bit-width from W = {4, 8, 16, 32}. The selected filter length applies
to the first layer. In the remaining layers, the filter lengths are
reduced by half. The search space then includes (|L| × |W| × |F|)B
different student settings, which amounts to a very large space.
A student setting xi in the search space is a sequence of B entries,
corresponding to B blocks. For the j-th entry, 1 ≤ j ≤ B, tuple
(Lj , F j ,Wj ) indicates that there are Lj layers, that the filter length
in the first layer is F j , and that the bit-width is Wj , as shown in
Equation 5. For example, with B = 3 blocks, the student setting x0
has three entries, where the first entry (3, 20, 8) indicates that there
are 3 layers in the first block, that the filter length of the first layer
is 20, meaning that the filter lengths of the following layers are 10
and 5, and that the bit-width of filters is 8 bits.
xi =
(L1, F1,W1)
(L2, F2,W2)
. . .
(LB, FB,WB)
(cid:169)
(cid:173)
(cid:173)
(cid:173)
(cid:171)
(cid:170)
(cid:174)
(cid:174)
(cid:174)
(cid:172)
(3, 20, 8)
(4, 40, 4)
(2, 10, 16)
(cid:170)
(cid:174)
(cid:172)
, x0 = (cid:169)
(cid:173)
(cid:171)
(5)
Applicability to Other Neural Classifiers: Although we use
InceptionTime as the base model, the proposed method is not lim-
ited to InceptionTime. With minor adjustments, the search space
can be adapted to accommodate a variety of neural classifiers. More
specifically, the choices of the numbers of blocks and layers and
the bit-widths apply universally across different neural classifiers.
The filter lengths are specific to convolutional classifiers such as
7
InceptionTime. When using other types of classifiers, other com-
ponents need to be considered. For fully-connected classifiers [49],
the number of neurons per layer needs to be included into the
search space; for recurrent neural network based classifiers [30],
the sizes of their recurrent weight matrices need to be included into
the search space; for Transformer-based classifiers [57], the sizes
of the projection matrices need to be included. Thus, the search
space can be adapted easily to different classifiers. In this paper,
we consider a search space based on InceptionTime because it
outperforms other classifiers at time series classification [44].
3.3.2 Pareto Frontier. Given a student setting, we can obtain its
accuracy using the proposed AED, but this is costly. Next, it is also
possible to compute the size based on the setting using the infor-
mation on the bits per layer, the number of filters, and filter lengths
(see Section 2.3), which is very efficient. Thus, for each setting, we
can define a tuple s that includes its associated accuracy and its
model size-see Equation 6.
si = (xi, accuracyi, sizei )
(6)
We use S to denote the set of all student settings. Given two settings
s1, s2 ∈ S, s2 dominates s1, denoted as s2 ≻ s1, if s2 is more accurate
and not larger than s1 or if s2 is smaller than s1 and is not worse
than s1 in terms of accuracy.
The Pareto frontier P (S) is a subset of S, where for every tuple
s ∈ P (S) no other tuple s ′ exists that dominates s, as shown in
Equation 7.
P (S) = {s ∈ S | (cid:154){s ′ ∈ S | s ′ ≻ s ∧ s ′ ≠ s}}
(7)
The frontier facilitates the identification of the setting with the
highest accuracy under specific model size constraints. Thus, the
aim is to identify the Pareto frontier.
3.3.3 Encoded Multi-objective Bayesian Optimization. To get the
exact Pareto frontier, it is necessary to perform domination com-
parisons on the (|L| × |W| × |F|)B settings in the search space, e.g.,
using skyline querying algorithms [5]. However, since evaluat-
ing the accuracy for a setting using AED is costly, it is infeasi-
ble to evaluate the accuracy of all (|L| × |W| × |F|)B settings us-
ing AED. Instead, we evaluate the accuracy of a small subset of Q
(Q ≪ (|L| × |W| × |F|)B) settings, to obtain an approximate fron-
tier.
A naive way to select the Q settings is to apply random sampling.
Although being simple, random sampling may not be effective
as it takes into account neither accuracy nor model size. We pro-
pose instead a novel encoded multi-objective Bayesian optimization
method to focus on exploring the most promising settings in the
search space, by considering both accuracy and model size-see
Figure 11.
To initialize the optimization process, we first randomly select
P settings, P < Q. We evaluate these using AED to obtain their
accuracies and also compute their sizes. They constitute the set of
evaluated settings (ES).
In classic multi-objective Bayesian optimization (MOBO), as
shown in the white boxes in Figure 11, the evaluated settings ES
are used to build a Gaussian Process (GP) that estimates the accura-
cies of the unevaluated settings. We use a GP because it is able to
estimate not only the accuracy but also a probability distribution
GP estimator is O (n3) due to the matrix inverse operation, where n
is the size of the covariance matrix K. The size of K keeps increasing
as the steps continues and reaches Q in the last step. Thus, the GP
part is O (Q4). In total, we get O (Q × N × E × BPw + Q4).
Problems of the Original Space: Consider three settings x1, x2,
and x3, all with three blocks, as shown in Equation 10. We also
show their accuracies and the Euclidean distances x1x2 and x1x3
in the original space.
x1 = (cid:169)
(cid:173)
(cid:171)
Accuracy:
(4, 40, 8)
(4, 40, 8)
(4, 40, 8)
0.37
,
(cid:170)
(cid:174)
(cid:172)
x2 = (cid:169)
(cid:173)
(cid:171)
Distances
Original
Encoded
,
(cid:170)
(cid:174)
(cid:172)
(1, 40, 8)
(1, 40, 8)
(1, 40, 8)
0.24
x1x2 = 5.19
x1x2 = 3.33
x3 = (cid:169)
(cid:173)
(cid:171)
(cid:170)
(cid:174)
(cid:172)
(4, 40, 16)
(4, 40, 16)
(4, 40, 16)
0.38
x1x3 = 13.85
x1x3 = 1.70
(10)
Figure 11: Encoded Multi-Objective Bayesian Optimization.
of the estimated accuracy, which is helpful for guiding the subse-
quent exploration. An objective function is built considering both
the estimated accuracies and model sizes, and then an acquisition
function helps identify the most promising setting ˆx based on the
objective function. We evaluate ˆx's accuracy using AED, compute
its size, and feed it back to the GP estimator to get it updated. Then,
a new iteration starts until we have evaluated Q settings.
GP estimator: A GP is a probabilistic regression model, that learns
a mapping f (*) from a multidimensional point, e.g., a student setting
xi , to a real value, e.g., the accuracy μi of the setting, along its
i ). Given P evaluated
probability distribution, so f (xi ) ∼ N (μi, σ2
settings x1:P , the joint distribution is:
f (x1:P ) ∼ N (AED(x1:P ), K(x1:P , x1:P )),
(8)
where AED(x1:P ) is the evaluated accuracies for the P settings, and
K is the covariance matrix with kernel function κ (xi, xj ). A gener-
ally used kernel κ is the squared exponential covariance function:
(cid:17)
κ (xi, xj ) = θ f exp
with variance θ f , scaled by the
noise level Θ of the observations.
(xi −xj ) 2
2Θ2
−
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:16)
Taking the GP as the prior [42], the posterior predictive distri-
bution for an unevaluated setting x∗ is defined as:
f (x∗) ∼ N (μ (x∗), σ2 (x∗)),
(9)
where μ (x∗) = κ (x∗, x1:P )K(x1:P , x1:P )−1f (x1:P ), and σ2 (x∗) =
κ (x∗, x∗) − κ (x∗, x1:P ) K(x1:P , x1:P )−1κ (x∗, x1:P )T .
As the kernel function κ (xi, xj ) suggests, the distance between
two different settings affects the GP estimator significantly: if the
distance between two settings is small, the are expected to have
similar accuracy. Therefore, a meaningful distance metric between
settings is important. We proceed to illustrate why the Euclidean
distance on the space of original settings fails to be meaningful and
then elaborate a novel encoding scheme such that the Euclidean
distance on the encoded space offers meaningful distances.
Complexity: The process shown in Figure 11 requires running AED
with teacher removal Q times, yielding O (Q × N × E × BPw). In
addition, the GP estimator is run Q − P times. The complexity of a
8
Settings x1 and x2 have the same bit-width, but they have different
numbers of layers, 4 vs. 1, yielding quite different neural structures
and dissimilar accuracies. In contrast, x1 and x3 differ on the bit-
width, 8 vs. 16, but share the same number of layers and have similar
accuracy. Based on the above, x1x3 should be smaller than x1x2, as
x1 and x3 have more similar accuracies.
However, in the original space, x1x3 is much larger than x1x2, as
the bit-width difference (16 − 8)2 is larger than the layer difference
(4 − 1)2. Thus, the distance in the original space is not aligned with
the accuracy similarity. This happens because the values are discrete
and the different semantics of the different values are also different
dimensions, so adding up the distances directly is semantically
incorrect.
A Novel Encoding Scheme: To address the problem of inconsis-
tent distances, we propose to utilize a continuous latent space in-
stead of the original discrete values to capture semantic similarities.
In addition, a continuous space is known to fit GPs better [15, 46].
Thus, we propose an encoder Φ : x → z that maps the setting xi to
a continuous feature vector zi. Then, we use the encoded zi as the
input to the GP.
We proceed to cover the training of the encoder Φ. The training
involves two phases, as illustrated in Figure 12 and detailed in Algo-
rithm 2. In the first phase, we connect the encoder with a decoder
Γ(*). To train the encoder and decoder jointly, we random sample
R unevaluated settings, without knowing the accuracies of the R
settings, where R >> P. We use the decoder to reconstruct the R
settings {xr}R
r =1. It computes x′
r = Γ(Φ(xr)) and then minimizes
(cid:205)R
the loss Lrecons (xr, x′
r =1 (xr −x′
r ) = 1
r )2. In other words, the en-
R
coder and decoder work together as an autoencoder. This enables an
encoder that is able to transform a discrete setting xr into a contin-
uous vector zr. However, since the training data remains "accuracy
blind," the encoded continuous space fails to capture the seman-
tics related to accuracy. In the second phase, we therefore connect
the encoder with an accuracy predictor Ψ(*) and train the encoder
and predictor jointly using the P evaluated settings {xp}P
p=1, so
the predictor estimates accuracyp ′ = Ψ(Φ(xp)) by minimizing the
loss Laccur (accurp, accurp ′) = 1
p=1 (accurp − accurp ′)2. Since
P
the encoder is already trained with the decoder using R unevalu-
ated settings, we use an only small amount of P, where P << R,
evaluated settings to fine tune it, such that the encoded space is
(cid:205)P
Randomly Select R settings -No need to evaluate accuracy
-R>>PRandomly Select P settings -Evaluate accuracy via AED
-Compute the model sizeEvaluated Settings (ES) (xi,accuracyi,sizei)Train Encoder (Alg. 2) -Autoencoder training: R unevaluated
-Accuracy training: P evaluated settingsΦ(⋅)Encoded Evaluated Settings (EES) (Φ(xi),accuracyi,sizei)Encoder Φ(⋅)Build GP Estimator -Estimate accuracy of unevaluated settingsMulti-objective Optimization -Objective w.r.t. accuracy and size
-Acquisition function considering and its uncertaintyg(⋅)g(⋅)Select new setting -Maximizes acquisition function
-Evaluate accuracy via AED
-Compute the model sizêxQ-P iterations(̂x,accuracy,size)aligned better with accuracy. As Algorithm 2 shows, we use the
two training phases interchangeably.
Figure 12: Two-phase Training for Encoder Φ(*).
Algorithm 2 Two-phase Encoder Φ(*) Training.
1: Input: R unevaluated settings: {xr}, P evaluated settings:
(xi, accuracyi )
2: Output: Encoder Φ
3: ps ← Predictor steps
4: Encoder Φ, Decoder Γ, Predictor Ψ
5: for e ← 1, 2, . . . , Epochs do
x′
r ← Γ(Φ(xr))
6:
arg minΦ,Γ Lrecons (xr, x′
r )
if e mod ps = 0 then
8:
7:
⊲ Autoencoder training, using R
⊲ Predictor training, using P
9:
10:
p ← Ψ(Φ(xp))
accuracy ′
arg minΦ,Ψ Laccur (accuracyp, accuracy ′
p )
The integration of the encoding scheme into the overall Bayesian
Optimization process is shown in Figure 11 using grey boxes. After
training the Encoder Φ(*) using R unevaluated settings and P evalu-
ated settings, it is used to map all the evaluated settings (ES) to the
corresponding encoded space, getting the Encoded Evaluated Set-
tings (EES). Then, based on the EES, we build a GP to estimate the ac-
curacy of the unevaluated settings. To facilitate the identification of
settings on the Pareto frontier, given an unevaluated setting x∗, we
define a joint objective function g(x∗) = β×f (x∗)−(1−β)×Size (x∗)
that considers both the estimated accuracy f (x∗) and the computed
model size Size (x∗), preventing divergent optimizations if they are
considered separately. We use different β in different optimization
iterations, facilitating searches with different trade-offs between
accuracy and model size. More specifically, β is randomly sam-
pled following the PACE model strategy [29]. Since the estimated
accuracy f (x∗) is uncertain, the joint objective g(x∗) is also un-
certain. Next, we use the Expected Improvement (EI ) acquisition
function [10, 11] based on the joint objective g(*), to determine the
most promising setting ˆx. We evaluate ˆx's accuracy using AED and
compute its size, and we use the trained encoder Φ(*) to encode ˆx
and then add it to EES. Based on the updated EES, the GP estimator
is also updated. Then, a new iteration starts.
4 EXPERIMENTS
4.1 Experimental Setup
4.1.1 Data Sets. We use the UCR time series archive [9] that com-
prises an extensive catalogue of time series from different domains.
9
Experiments are conducted on the 128 available data sets, and we
focus on data sets with many classes since they are the most chal-
lenging and have important real-world uses. Details of the selected
subset of the data sets are shown in Table 1, including the number
of classes, the sizes of the training, validation, and testing sets, the
domains, and the average time series lengths.
Table 1: Data Sets.
Data set
Adiac
Crop
FaceAll
NonInvECG1
NonInvECG2
Phoneme
PigAirway
PigArt
UWave
Classes
37
27
14
42
42
39
52
52
8
Train/Val/Test
312/78/391
5720/1440/16800
448/112/1690
1440/360/1965
1440/360/1965
171/43/1896
83/19/208
83/19/208
1680/560/2241
Domain
Images
Images
Images
ECG
ECG
Sound
Blood flow
Blood flow
Motion
Avg. Len.
176
46
131
750
750
1024
2000
2000
315
4.1.2 Evaluation Metrics. To assess performance, we consider sev-
eral metrics. First, Accuracy is the percentage of cases where the
class with the highest output probability has the correct class label.
It is also used in conjunction with the null-hypothesis Friedman
test [20] and the Wilcoxon-Holm post-hoc method [27, 50] to eval-
uate all data sets. Next, Top-5 Accuracy evaluates the classification
results based on the top-5 output probabilities. If the probability
associated with the correct label is within the top-5, the result
is considered as correct. It is used in the experiments involving
data sets with many labels. Finally, Model size indicates how much
memory a model requires for a specific configuration of layers and
bit-width.
4.1.3 Baselines. LightTS is compared to four knowledge distilla-
tion methods. Although these methods use different strategies to
combine the results from base models into a single teacher model,
they share the same distillation scheme-the distillation is con-
ducted between a single teacher and a student. (1) In Classic Knowl-
edge Distillation (Classic KD) [25, 52], the teacher is the average
of the class probabilities across all base models, as shown in Equa-
tion 1 in Section 2.4. The next three baselines aims at improving
Classic KD by proposing different techniques to weigh the base
models differently, i.e., finding values other than the 1/N in Fig-
ure 1(b). (2) Adaptive Ensemble (AE-KD) [17] optimizes the weights
using Support Vector Machines according to the teachers diver-
sity derived from gradient changes. (3) Reinforced Multi-Teacher
(Reinforced) [54] computes the weights following a reinforced
learning process using the training losses as the reward metric.
(4) Cross-validation Accuracy Weighted Probabilistic Ensemble
(CAWPE) [31] uses the cross-validation accuracy results to assign the
weights. Thus, if a model has a high accuracy during validation,
it has a high weight in the final ensemble. In addition, we include
two variations of LightTS. (5) AED-LOO: we use AED with leave-
one-out teacher removal. (6) AED-One: we use AED without teacher
removal, i.e., Algorithm 1 is run only once. Finally, we also include
the full-precision ensemble FP-Ensem for reference. As knowledge
distillation can boost student performance [45, 53], a quantized
student can possibly outperform FP-Ensem.
xx′ zEncoder Φ(⋅)Decoder Γ(⋅)Predictor Ψ(⋅)Autoencoder training with R unevaluated settingsAccuracy training with P evaluated settingsaccuracy′ Lrecons(x,x′ )Laccur(accuracy,accuracy′ )4.1.4 Ensemble Teachers. To evaluate the generality of LightTS
on different types of ensembles, we consider ensembles with a wide
variety of base models. The ensembles for all cases have N = 10 base
models, and the base models are initialized with different random
states to ensure diversity. The base models used are detailed as
follows. (1) InceptionTime [19] is the state-of-the-art deep learning
method [44]. It is the default base model in the experiments. We
consider three types of non-deep learning based methods that are
components for state-of-the-art meta-ensemble classifiers [37]. (2)
Temporal Dictionary Ensemble (TDE) [38] transforms a time series
into a bag of segments of a given size and discretizes them as words.
Then, it draws a histogram for the word counting and applying a
nearest neighbor algorithm to classify the transformed series. (3)
Canonical Interval Forest Classifier (CIF) [36] builds a Time Series
Forest using a set of 22 particular features [32] to summarize them
in intervals that are used to classify the time series. (4) Time Series
Forest Classifier (Forest) [14] builds several trees for representing
a time series, summarizing them in intervals. Then, a forest is
built over the trees to identify singular features in the intervals to
perform the classification of the series.
Implementation Details. The LightTS framework is imple-
4.1.5
mented using Python 3.9.7, the machine learning architecture Py-
Torch 1.9.1, and the Bayesian Optimization infrastructure of BoTorch
0.5.1. The source code is publicly available at https://github.com/d-
gcc/Distiller. All the models are tested using Titan RTX GPUs with
24GB of VRAM under Ubuntu 20.04.3 on an Intel Xeon W-2155
with 128GB of RAM.
To ensure fair comparisons, we follow common machine learning
practices and use the validation set to adjust the hyper-parameters
for all methods. The ensemble of ten base teacher models is trained
in full-precision using different random seeds to ensure diversity.
They are trained for 1,500 epochs, with a learning rate of 0.01, Adam
optimized, and using a batch size of 64. Then, following the same
configuration, the distilled student is quantized according to the
testing configuration, uses a validation set of 20% with Stochastic
Gradient Descent as the optimizer, and the weights λ are adjusted
every v = 50 epochs. The predictor for the encoded MOBO is also
adjusted every 50 epochs.
4.2 Experimental Results
4.2.1 Problem Scenario 1. We consider lightweight students with
3 blocks and 3 layers per block. All layers use the same bit-width,
chosen among 4-bit, 8-bit, and 16-bit. This means that the light-
weight students obtained by different methods have the same size.
Thus, we only evaluate their accuracy.
InceptionTime as Base Models: We report the results for the
complete UCR data sets using InceptionTime as the base models.
Figure 13 shows the critical difference diagram on Accuracy after
applying the null-hypothesis Friedman test and the Wilcoxon-Holm
post-hoc test to rank the evaluated methods. The evaluated methods
are ranked according to the pairwise comparison of accuracy for
every set and bit-width. Then, the average rank across all the data
sets and all bit-width settings is computed, as the diagram shows.
Figure 13 shows that our proposals LightTS and AED-LOO achieve
the best results. They are clustered in the first rank, and they are
statistically more accurate than the other methods. In particular,
Figure 13: Accuracy Ranking, Full UCR Archive.
LightTS and AED-LOO are statistically more accurate than the full-
precision ensemble FP-Ensem, which is ranked in second. This
may sound counter-intuitive, but this is possible because knowl-
edge distillation can boost student performance, enabling a well-
distilled quantized student to outperform FP-Ensem. Then comes
Reinforced, which is followed by a statistically similar cluster of
the remaining baselines led by AED-One. Disaggregated results for
4-bit, 8-bit, and 16-bit are shown in Figures 14, 15, and 16, respec-
tively.
Figure 14: 4-bit Accuracy Ranking.
Figure 15: 8-bit Accuracy Ranking.
Figure 16: 16-bit Accuracy Ranking.
For data sets with 2 or 3 classes, representing 46% of the UCR
data sets, we explore the results in Figure 17. It shows a similar
ranking as in the overall results, with all the methods having closer
results, which is expected as several pairwise comparisons are tied
giving the reduced number of classes. This suggests that LightTS
works equally well on data sets with few classes.
Detailed results for challenging data sets with many labels are
shown in Table 2. For those cases, in addition to the baselines,
we consider a full-precision student, denoted as FP-Stud. This is
a student model with 32-bit model parameters, which based on
knowledge distilled from the full precision ensemble using AED.
FP-Stud is supposed to offer an accuracy upper bound to the quan-
tized student with 4-bit, 8-bit, and 16-bit model parameters, denoted
by a rectangle, e.g., the fourth row of Table 2.
The main observation is the leading performance in terms of
Accuracy and Top-5 Accuracy of LightTS on all data sets. The
metrics for LightTS are consistently better on all data sets, and they
are close to the accuracy of FP-Ensem. On data sets such as Adiac
and PigArt, some of the quantized models are able to outperform
FP-Ensem, which can be explained by the two sources of training in
10
123456785.6042CAWPE5.5404Classic KD5.2734AE-KD5.1185AED-One4.4102Reinforced3.7096FP-Ensem3.2214LightTS3.1224AED-LOO123456785.5469Classic-KD5.5352CAWPE5.3555AE-KD5.0859AED-One4.4219Reinforced3.6445FP-Ensem3.2734LightTS3.1367AED-LOO123456785.6602CAWPE5.5938Classic-KD5.3906AE-KD4.9766AED-One4.3438Reinforced3.7812FP-Ensem3.1289AED-LOO3.1250LightTS123456785.6172CAWPE5.4805Classic-KD5.2930AED-One5.0742AE-KD4.4648Reinforced3.7031FP-Ensem3.2656LightTS3.1016AED-LOOTable 2: Accuracy of Lightweight Student Models, using an Ensemble of InceptionTime Base Models.
Bit-width
FP-Ensem/FP-Stud
Classic KD
AE-KD
Reinforced
CAWPE
AED-LOO
LightTS
FP-Ensem/FP-Stud
Classic KD
AE-KD
Reinforced
CAWPE
AED-LOO
LightTS
FP-Ensem/FP-Stud
Classic KD
AE-KD
Reinforced
CAWPE
AED-LOO
LightTS
Accuracy
8
4
Adiac
Top-5 Accuracy
16
8
4
Accuracy
8
4
16
Top-5 Accuracy
16
8
4
16
NonInvECG1
Accuracy
8
PigAirway
4
16
Top-5 Accuracy
16
8
4
0.79 / 0.83
0.41
0.36
0.23
0.27
0.78
0.77
0.48
0.38
0.40
0.38
0.78
0.79
0.29
0.29
0.20
0.23
0.76
0.77
Crop
0.95 / 0.97
0.80
0.56
0.51
0.56
0.97
0.97
0.65
0.51
0.41
0.48
0.96
0.97
0.83
0.74
0.87
0.82
0.97
0.97
0.76 / 0.76
0.68
0.69
0.70
0.69
0.72
0.73
0.67
0.68
0.69
0.68
0.71
0.72
FaceAll
0.69
0.69
0.71
0.70
0.73
0.73
0.95 / 0.97
0.96
0.96
0.96
0.96
0.97
0.97
0.96
0.96
0.96
0.96
0.96
0.97
0.96
0.96
0.96
0.96
0.96
0.97
0.81 / 0.85
0.77
0.76
0.72
0.70
0.83
0.82
0.75
0.74
0.68
0.69
0.81
0.81
0.80
0.75
0.79
0.76
0.82
0.84
0.97 / 0.99
0.88
0.88
0.86
0.85
0.98
0.98
0.84
0.83
0.85
0.83
0.99
0.98
0.89
0.94
0.86
0.86
0.98
0.98
0.96 / 0.96
0.68
0.63
0.62
0.77
0.95
0.94
0.55
0.57
0.56
0.72
0.94
0.92
NonInvECG2
0.78
0.78
0.78
0.77
0.94
0.95
0.96 / 0.96
0.81
0.61
0.81
0.78
0.95
0.94
0.80
0.55
0.79
0.74
0.94
0.94
Phoneme
0.83
0.82
0.82
0.81
0.95
0.95
0.29 / 0.30
0.27
0.23
0.28
0.23
0.26
0.27
0.26
0.24
0.26
0.22
0.27
0.26
0.29
0.26
0.29
0.26
0.26
0.27
1.00 / 1.00
0.94
0.98
0.95
0.99
1.00
1.00
0.91
0.98
0.92
0.97
1.00
1.00
0.99
0.99
0.99
0.99
1.00
1.00
1.00 / 1.00
0.99
0.93
0.99
0.99
1.00
1.00
0.99
0.88
0.99
0.99
1.00
1.00
0.99
0.99
0.99
0.99
1.00
1.00
0.61 / 0.64
0.61
0.57
0.60
0.61
0.60
0.62
0.59
0.56
0.60
0.58
0.61
0.61
0.62
0.58
0.62
0.63
0.60
0.63
0.56 / 0.59
0.24
0.22
0.21
0.21
0.57
0.54
0.18
0.19
0.14
0.17
0.56
0.53
PigArt
0.27
0.24
0.26
0.26
0.59
0.55
0.99 / 1.00
0.63
0.69
0.24
0.42
0.98
1.00
0.53
0.27
0.18
0.24
0.96
0.99
UWave
0.67
0.73
0.28
0.43
0.98
1.00
0.93 / 0.95
0.79
0.79
0.72
0.79
0.87
0.88
0.75
0.77
0.72
0.66
0.86
0.87
0.81
0.81
0.80
0.81
0.87
0.89
0.91 / 0.93
0.50
0.55
0.57
0.48
0.91
0.90
0.32
0.42
0.54
0.44
0.91
0.90
0.63
0.55
0.59
0.68
0.92
0.90
0.99 / 1.00
0.89
0.78
0.65
0.57
1.00
1.00
0.64
0.62
0.54
0.40
1.00
1.00
0.99
0.94
0.74
0.76
1.00
1.00
1.00 / 1.00
1.00
1.00
0.99
0.99
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
0.99
0.99
1.00
1.00
Figure 17: Accuracy Ranking, 59 Data Sets with 2 or 3
Classes.
the quantized student, i.e., distillation loss and the classification loss.
However, even when quantized models outperform the ensemble,
they still perform below the upper-bound performance of FP-Stud.
The condition is explained by the fact that 32-bit provides more
information, so that model captures better the complete parameters
representation, without any precision loss. Therefore, it is expected
that it outperforms all quantization settings since they lose some
level of precision.
The AED-LOO baseline achieves very good performance for Accu-
racy and Top-5 Accuracy. In most of the cases, it is second best. This
is expected since AED-LOO shares the AED component with LightTS.
Also, the differences between the two methods are related to how
they remove teachers. LightTS can evaluate all the N possible en-
sembles, regardless the changes in accuracy when some teachers are
removed, while AED-LOO stops when the accuracy drops because
of its factorial growth in the number of evaluations.
The rather reduced performance of the remaining baselines is
related to the premises on which they are built. In all cases, they
estimate the weights for the classes probabilities and combine them
in a single ensemble, instead of considering independently each
base model contribution to the student. This works well in full
precision models, but it conflicts with the quantization because the
final ensemble does not provide enough support for the compressed
student in contrast to the independent distillation for each member.
In addition, the evaluation on the UWave shows the model ap-
plicability in multi-dimensional time series, so the compression
process it is not constrained by the input dimensions. Also, the
small number of labels in the data set, only eight, gives the perfect
score for the Top-5 Accuracy metric for all the baselines.
Teacher removal: To assess the effect of using the Gumbel-Softmax
based teacher removal strategy, we compare it with two variants:
using the Softmax function to remove teachers and no removing
teachers from the ensemble. The results are shown in Table 3 for
the Adiac data set. Other data sets show similar results. Using the
Gumbel-Softmax yields 16–24% improvement in the Accuracy and
around 5–13% improvement in the Top-5 Accuracy with respect to
Softmax removal and no removal. Thus, the choice of the Gumbel-
Softmax for disregarding base models is justified.
Table 3: Teacher Removal Strategies for Adiac Data Set.
Bit-width
No removal
Softmax
Gumble
Accuracy
8-bit
0.61
0.57
0.77
16-bit
0.64
0.63
0.79
4-bit
0.55
0.53
0.77
Top-5 Accuracy
8-bit
0.92
0.85
0.97
16-bit
0.93
0.92
0.97
4-bit
0.86
0.84
0.97
Running time: We cover training time and inference time sep-
arately. The training time is evaluated using the complete UCR
archive in Figure 18(a) for all bit settings also considering the null-
hypothesis Friedman and the Wilcoxon-Holm post-hoc tests. The
11
123456784.9520CAWPE4.9520Classic KD4.7486AE-KD4.7345AED-One4.5395FP-Ensem4.4350Reinforced3.8277LightTS3.8107AED-LOOranking places Classic KD and AED-One in the first group. This
is expected, as they share the same complexity as shown by the
complexity analysis in Section 3.2.1. Reinforced and LightTS are
second, while CAWPE and AE-KD are third, and AED-LOO is last, as
it uses an inefficient leave-one-out strategy to remove teachers.
The overall results for LightTS show an appropriate trade-off be-
tween accuracy and training time. It achieves the best accuracy
with a very competitive running time, and the efficiency contenders
(Reinforced, AED-One, and Classic KD) are in the bottom segment
in terms of overall accuracy. In addition, the training time on the
full UCR archive is shown in Figure 18(b) using box plots. Next,
inference occurs online, where we use the quantized model to per-
form classification. Its running time depends only on its size (e.g.,
4, 8, or 16 bits) and is independent of the distillation method used.
To conclude, since training occurs offline and thus is often not time
critical, LightTS is the best choice as it offers the best accuracy. If
the training time is critical, AED-One is the best choice as it is as
efficient as Classic KD, but is more accurate.
)
s
(
e
m
T
i
104
102
Reinforced
AED-LO O
AED-One
CA W PE
LightTS
AE-KD
Classic
KD
(b) Training Time.
(a) Ranking.
Figure 18: Total Training Time, Full UCR Archive.
Non-deep Learning Based Models: To verify that LightTS is
a generic framework, which can also apply to base models other
than InceptionTime, we consider non-deep learning based models,
TDE, CIF, and Forest, Table 4 shows results on data sets Adiac and
PigAirway, due to the space limitation. Results on the remaining
data sets exhibit similar trends.
The main observation is that LightTS offers much better Accu-
racy and Top-5 Accuracy performance than the baselines. Specif-
ically for Accuracy, the level of improvement with respect to the
baselines is, for most of the cases, around a factor of three. The
reason for the large difference is the adaptability of LightTS when
choosing teachers. It is able to identify the candidates that are better
aligned with the student settings and distills knowledge from them,
while the other methods include all the base models regardless of
their performance.
Next, in all cases, the full-precision ensemble outperforms the
distilled cases at Accuracy, meaning that there is still room for
improvement of the quantized student models. As the differences
between the non-deep learning base models and LightTS are higher
than when using InceptionTime as base models, it appears that
the architectural differences between the teachers and the student
have some effect on the distillation performance.
Hyper-parameter sensitivity: In Figure 19, the sensitivity for
the hyper-parameters α and τ is evaluated for the Adiac data set
in a configuration of 4 bits. It shows that α is stable when the two
losses are balanced. Then, the accuracy changes are steeper with
τ modifications, meaning that it leads to a different selection of
teachers, affecting the overall performance. The choice of 0.5 for
12
y
c
a
r
u
c
c
A
0.77
0.74
0.71
y
c
a
r
u
c
c
A
0.77
0.74
0.71
0.1
0.3
0.5
α
0.7
0.9
0.1
0.3
0.7
0.9
0.5
τ
Figure 19: Hyper-parameter Sensitivity, Adiac, 4-bit.
Accuracy
Time
y
c
a
r
u
c
c
A
0.8
0.79
0.78
0.77
250
200
150
)
s
(
e
m
T
i
y
c
a
r
u
c
c
A
0.5
0.4
)
s
(
e
m
T
i
200
100
y
c
a
r
u
c
c
A
0.94
0.92
0.9
2 K
1.5 K
1 K
0.5 K
)
s
(
e
m
T
i
10 20 30
N
10 20 30
N
10 20 30
N
(a) Adiac.
(b) PigAirway.
(c) NonInvECG2.
Figure 20: Effect of the Number of Base Models N .
both parameters seems precise, since it is among the best possible
options. Other data sets and bit settings show similar trends.
Effect of the number of base models N: Figure 20 shows the
impact of the number of base models N on Accuracy and Training
time for data sets Adiac, PigAirway, and NonInvECCG2. In all cases,
when N is small, the accuracy results are significantly affected
mainly because the opportunities to choose appropriate base models
and to disregard unsuitable base models are reduced. Then, as N
increases, the accuracy is relatively stable within a range of 5%,
achieving the best accuracy with some 25 or 30 base models. For
PigAirway and NonInvECCG2, the results decrease slightly when the
number of base models reaches 30, which we attribute to the added
uncertainty caused by having more base models, i.e., removing
base models becomes increasingly arbitrary as more options are
available. The changes for Adiac are very slightly after considering
25 models, suggesting it will reach a maximum closer closer to that
range. The total training time grows linearly as the number of base
models increases, which is consistent with the complexity analysis.
4.2.2 Problem Scenario 2. To find optimal student settings using
the proposed encoded multi-objective Bayesian optimization, we
initialize the process with P = 10 random settings and search for 40
additional settings, meaning that Q = 50. We show the results on the
data set Adiac given the space limitation. Experiments conducted
in other data sets show similar observations.
Feature transformation effect: To evaluate the effect of using
the two-phase encoder, we assess it in comparison to (1) a single
phase encoder using the reconstruction loss only (i.e., an autoen-
coder) but without considering the accuracy adjustment loss func-
tion, (2) using the original space where the values are normalized,
and (3) the original discrete space. We use these different spaces to
train a GP accuracy estimator and evaluate the estimated accuracy
vs. ground truth accuracy of 50 randomly sampled settings. The
results for data sets Adiac, PigAirway, and NonInvECCG2 in Table 5
show that the proposed two-phase encoder gives the most accurate
Table 4: Accuracy of Lightweight Students, using Ensembles with Base Models other than InceptionTime.
Bit-width
FP-Ensem/FP-Stud
Classic KD
AE-KD
Reinforced
CAWPE
LightTS
FP-Ensem/FP-Stud
Classic KD
AE-KD
Reinforced
CAWPE
LightTS
c
a
i
d
A
y
a
w
r
i
A
g
i
P
0.40
0.14
0.49
0.13
0.39
0.11
0.33
0.12
0.32 0.37 0.41 0.65 0.69 0.75 0.66 0.71 0.71 0.93 0.94 0.95 0.68 0.69 0.71 0.93 0.93 0.95
0.57
0.55
0.41
0.34
0.56
0.47
0.37
0.34
0.12
0.16
0.14
0.14
0.31
0.37
0.30
0.33
0.24
0.21
0.19
0.14
0.21
0.23
0.15
0.12
0.18
0.21
0.19
0.14
0.37
0.35
0.30
0.34
0.48
0.46
0.53
0.35
0.24
0.21
0.24
0.15
CIF
16
TDE
4
16
Accuracy
8
0.50 / 0.61
0.13
0.18
0.13
0.15
0.76 / 0.80
0.23
0.20
0.13
0.12
Top-5 Accuracy
16
8
4
0.79 / 0.83
0.32
0.41
0.31
0.35
0.97 / 0.98
0.63
0.49
0.43
0.38
4
Accuracy
8
0.79 / 0.84
0.27
0.24
0.19
0.14
0.42 / 0.46
0.13
0.13
0.10
0.12
Top-5 Accuracy
16
8
4
0.97 / 0.97
0.43
0.43
0.37
0.31
0.93 / 0.94
0.39
0.35
0.31
0.35
Forest
4
16
Accuracy
8
0.74 / 0.77
0.23
0.29
0.18
0.15
0.42 / 0.45
0.15
0.10
0.10
0.12
Top-5 Accuracy
16
8
4
0.95 / 0.96
0.42
0.71
0.36
0.35
0.94 / 0.95
0.43
0.33
0.37
0.38
0.34
0.22
0.32
0.15
0.40
0.13
0.11
0.35
0.60 0.66 0.70 0.93 0.95 0.96 0.36 0.40 0.45 0.68 0.73 0.77 0.33 0.38 0.42 0.66 0.70 0.74
0.11
0.17
0.07
0.12
0.10
0.11
0.14
0.12
0.14
0.11
0.08
0.11
0.34
0.47
0.27
0.36
0.42
0.49
0.49
0.35
0.40
0.33
0.25
0.33
0.11
0.11
0.12
0.11
0.14
0.18
0.19
0.12
0.33
0.35
0.29
0.32
0.63
0.39
0.36
0.33
estimation for the unevaluated settings' accuracy, which outper-
forms the one-phase autoencoder. In addition, simply normalizing
the values in settings fails to improve accuracy.
Table 5: Gaussian Processes Accuracy Estimation.
PigAirway
Adiac
NonInvECG2
MAE MAPE MAE MAPE MAE MAPE
Original
0.06
0.12
Normalized
0.06
0.11
Single Encoder
0.05
0.09
Two-phase Encoder 0.08
0.05
0.04
0.05
0.04
0.04
0.25
0.27
0.23
0.16
0.05
0.05
0.05
0.04
0.31
0.31
0.24
0.23
Base settings improvement: In Figure 21(a), 21(b), and 21(c), we
show how the encoded Bayesian optimization is able to improve
the results of the fixed settings used in the first set of experiments
for the Adiac, PigAirway, and NonInvECCG2 data sets, respectively.
In the figure, we include the three lightweight student cases of 4, 8,
and 16 bits (c.f. Table 2) denoted as "Base settings," and denoting
upper-left areas for possible improvements, meaning that any point
in that area has a better accuracy at a reduced size. We only show
the results in the areas for improvement to keep the figures clear,
so fewer than Q = 50 points are shown. Then, we illustrate the
effect of the optimization with two levels of flexibility. First, we
keep the number of layers fixed as the base settings and apply
the optimization limiting the search space to only bit-width. In
the figure, these are denoted as "Fixed layers." Then, we explore
the complete search space, varying the number of layers, filter
length, and bit-width, shown in the figure as "Encoded MOBO."
The evaluation shows that the optimization process is able to find
better student settings than with the base settings, i.e., improving
accuracy while consuming less space. In addition, the figure shows
that exploring only the bit-width space enables better settings, but
that it is potentially more beneficial to explore the complete search
space, since there are better settings when also the layers can be
varied.
Pareto frontiers: Using the Adiac, PigAirway, and NonInvECCG2
data sets, we show in Figures 22(a), 22(b), and 22(c) a comparison of
the Pareto frontiers when using different methods. We include the
13
Table 6: Optimization Running Time (hours).
Random
MOBO
Encoded MOBO
Adiac PigAirway NonInvECG2
4.61
5.78
5.85
19.65
28.77
29.82
2.72
3.45
3.48
proposed encoded Multi-objective Bayesian optimization ("Encoded
MOBO"); classic Multi-objective Bayesian optimization ("MOBO"),
where the settings are not encoded; and randomly choosing all Q
settings ("Random"). The Encoded MOBO obtains a better Pareto
frontier than do the other two methods, i.e., it is closer to the upper,
left corner. Thus, the frontier includes settings with relatively small
model size and high accuracy, meaning that it is possible to find
very competitive settings with very strict memory constraints.
The methods are evaluated in terms of running time, as shown
in Table 6. The "Random" search is faster since it does not optimize
the search, but that leads to a poor Pareto frontier. Next, the differ-
ences in running time between the "MOBO" and "Encoded MOBO"
optimizations are relatively small, which is expected because of the
similar optimization processes.
To evaluate the effect of initializing the optimization process
with evaluated settings sets of different size, i.e., with fixed Q while
changing P, we build the Pareto frontiers with P equal to 5, 10,
20, 30, and 40-see Figure 23. Using P = 5 constrains the process
substantially, and it only identifies models of relatively large size,
implying that a poorly-initialized GP may mislead the optimization
process of BO. In contrast, using P = 10, 20, 30 yields similar Pareto
frontiers, and we empirically find that P = 10 is a good choice since
it successfully initializes the exploration similarly to larger values.
5 RELATED WORK
Time Series Classification: Time series classification has seen
substantial advances, and state-of-the-art methods offer impres-
sive accuracy [18, 44]. However, the state-of-the-art methods re-
quire significant computing resources, making them inapplicable
in resource-limited settings. Some methods (e.g., [37]) use large
ensembles, that combine the results from dozens of single mod-
els to compute a result, while other methods (e.g.,[12, 13, 22, 32])
0.82
0.8
0.78
0.76
0.74
y
c
a
r
u
c
c
A
0.81
0.77
0.73
0.69
y
c
a
r
u
c
c
A
0.82
0.78
0.74
0.7
y
c
a
r
u
c
c
A
4-bit
8-bit
16-bit
Base settings
Fixed layers
Bayesian search
50 K
Model Size
100 K
(a) Adiac.
Encoded MOBO
MOBO
Random
20 K
30 K
Model Size
40 K
(a) Adiac.
y
c
a
r
u
c
c
A
0.6
0.55
0.5
0.45
8-bit
4-bit
16-bit
Base settings
Fixed layers
Bayesian search
50 K
Model Size
100 K
(b) PigAirway.
Figure 21: Base Settings Improvement.
y
c
a
r
u
c
c
A
0.6
0.52
0.44
0.36
Encoded MOBO
MOBO
Random
20 K
30 K
Model Size
40 K
(b) PigAirway.
Figure 22: Identifying Pareto Frontiers.
y
c
a
r
u
c
c
A
0.96
0.95
0.94
0.93
0.92
y
c
a
r
u
c
c
A
0.95
0.91
0.87
0.83
4-bit
8-bit
16-bit
Base settings
Fixed layers
Bayesian search
100 K
50 K
Model Size
(c) NonInvECG2.
Encoded MOBO
MOBO
Random
40 K
30 K
Model Size
20 K
(c) NonInvECG2.
P=5
P=10
P=20
P=30
P=40
20 K
30 K
Model Size
40 K
Figure 23: Varying P, Encoded MOBO, Adiac.
require multiple data transformations for exploring time series
properties [4, 26], which requires substantial memory. Then, deep
learning [19, 49] and non-deep learning [14, 32, 36, 38, 52] based
ensembles are competitive models, so they are considered as inputs
for LightTS.
Knowledge Distillation: Knowledge distillation has been studied
since its introduction [25], with studies considering single teach-
ers [8, 41, 43, 45], ensembles of diverse teachers [17, 21, 54, 56], and
techniques that aim to improve performance via self-distillation [55]
and online student feedback [7]. When compressing from an en-
semble of diverse teachers into a student, existing studies consider
mainly a student with full-precision parameters, while we consider
lightweight students, e.g., with 4, 8, or 16-bit quantized parameters.
This difference calls for a more flexible distillation strategy and
means to identify the Pareto optimal frontier, which is not con-
sidered by existing studies. Although different methods exist that
balance different teachers' contributions to an ensemble [17, 31, 54],
which then guides the knowledge distillation, no studies consider
the removal of teachers. We propose a novel bi-level optimiza-
tion modeling that not only assigns appropriate weights to useful
teachers, but also facilitates removal of irrelevant teachers, thus
achieving more flexible distillation and higher accuracy, as shown
in the experiments.
14
Pareto frontier: Existing studies do not consider how to build a
Pareto frontier, partially because they consider only students with
full-precision parameters [45, 47, 53]. In our setting, it is possible to
use different bit-widths in different layers, making it challenging to
identify Pareto frontiers efficiently. To contend with this challenge,
we propose a novel encoding scheme along with an Encoded MOBO
method to identify a Pareto frontier by only evaluating a small
number of student model settings. Skyline querying [5, 51] is able
to efficiently identify the Pareto frontier for an input data set D in
the form of (accuracy, size) pairs. However, naively constructing
D requires evaluating the accuracy of large numbers of student
settings, which is prohibitively expensive. The Encoded MOBO
aims at constructing an appropriate input data set D by evaluating
the accuracy of a small number of student settings, upon which any
skyline querying algorithm can be applied. Thus, skyline querying
and Encoded MOBO are orthogonal.
6 CONCLUSIONS AND FUTURE WORK
This paper proposes LightTS, a novel and flexible framework that
extends state-of-the-art time series classification to resource-limited
devices. First, LightTS is able to adaptively distil the knowledge
from a set of high-capacity, large base models to a lightweight
model. In doing this, it employs a bi-level optimization approach
to estimate the benefit of each base model during the distillation.
Second, an encoded multi-objective Bayesian optimization method
is proposed to search for the Pareto optimal settings for lightweight
models under varying space constraints. The results of experimental
studies offer evidence of the effectiveness of LightTS when used
on a variety of real-world time series data sets with different base
models.
In future work, it is of interest to explore more flexible distil-
lation paradigms, such as online distillation that does not require
pretrained base models. It is also of interest to study how to adapt
distillation to streaming settings.
REFERENCES
[1] U. Rajendra Acharya, Hamido Fujita, Shu Lih Oh, Yuki Hagiwara, Jen Hong Tan,
and Muhammad Adam. 2017. Application of deep convolutional neural network
for automated detection of myocardial infarction using ECG signals. Inf. Sci. 415
(2017).
[2] Charu C. Aggarwal and Saket Sathe. 2017. Outlier Ensembles - An Introduction.
[3] Charles Blake, Vitaly Kurin, Maximilian Igl, and Shimon Whiteson. 2021.
Snowflake: Scaling GNNs to high-dimensional continuous control via parameter
freezing. In NIPS.
[4] Paul Boniol and Themis Palpanas. 2020. Series2Graph: Graph-based Subsequence
Anomaly Detection for Time Series. Proc. VLDB Endow. 13, 11 (2020).
[5] Stephan Börzsönyi, Donald Kossmann, and Konrad Stocker. 2001. The Skyline
Operator. In ICDE.
[6] David Campos, Tung Kieu, Chenjuan Guo, Feiteng Huang, Kai Zheng, Bin Yang,
and Christian S. Jensen. 2021. Unsupervised Time Series Outlier Detection with
Diversity-Driven Convolutional Ensembles. Proc. VLDB Endow. 15, 3 (2021).
[7] Defang Chen, Jian-Ping Mei, Can Wang, Yan Feng, and Chun Chen. 2020. Online
Knowledge Distillation with Diverse Peers. In AAAI.
[8] Tri Dao, Govinda M. Kamath, Vasilis Syrgkanis, and Lester Mackey. 2021. Knowl-
edge Distillation as Semiparametric Inference. In ICLR.
[9] Hoang Anh Dau, Anthony J. Bagnall, Kaveh Kamgar, Chin-Chia Michael Yeh,
Yan Zhu, Shaghayegh Gharghabi, Chotirat Ann Ratanamahatana, and Eamonn J.
Keogh. 2019. The UCR time series archive. IEEE CAA J. Autom. Sinica 6, 6 (2019).
[10] Samuel Daulton, Maximilian Balandat, and Eytan Bakshy. 2020. Differentiable
Expected Hypervolume Improvement for Parallel Multi-Objective Bayesian Opti-
mization. In NIPS.
[11] Samuel Daulton, Maximilian Balandat, and Eytan Bakshy. 2021. Parallel Bayesian
Optimization of Multiple Noisy Objectives with Expected Hypervolume Improve-
ment. In NIPS.
[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 Min. Knowl. Discov. 34, 5 (2020).
[13] Angus Dempster, Daniel F. Schmidt, and Geoffrey I. Webb. 2021. MiniRocket: A
Very Fast (Almost) Deterministic Transform for Time Series Classification. In
KDD.
[14] Houtao Deng, George C. Runger, Eugene Tuv, and Vladimir Martyanov. 2013. A
time series forest for classification and feature extraction. Inf. Sci. 239 (2013).
[15] Aryan Deshwal and Janardhan Rao Doppa. 2021. Combining Latent Space and
Structured Kernels for Bayesian Optimization over Combinatorial Spaces. In
NIPS.
[16] Thomas G. Dietterich. 2000. Ensemble Methods in Machine Learning. In MCS
(Lecture Notes in Computer Science), Vol. 1857.
[17] Shangchen Du, Shan You, Xiaojie Li, Jianlong Wu, Fei Wang, Chen Qian, and
Changshui Zhang. 2020. Agree to Disagree: Adaptive Ensemble Knowledge
Distillation in Gradient Space. In NIPS.
[18] Hassan Ismail Fawaz, Germain Forestier, Jonathan Weber, Lhassane Idoumghar,
and Pierre-Alain Muller. 2019. Deep learning for time series classification: a
review. Data Min. Knowl. Discov. 33, 4 (2019).
[19] 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. Data Min. Knowl. Discov. 34, 6 (2020).
[20] Milton Friedman. 1940. A Comparison of Alternative Tests of Significance for
the Problem of $m$ Rankings. Annals of Mathematical Statistics 11 (1940).
[21] Takashi Fukuda, Masayuki Suzuki, Gakuto Kurata, Samuel Thomas, Jia Cui, and
Bhuvana Ramabhadran. 2017. Efficient Knowledge Distillation from an Ensemble
of Teachers. In Interspeech.
[22] Anna Gogolou, Theophanis Tsandilas, Karima Echihabi, Anastasia Bezerianos,
and Themis Palpanas. 2020. Data Series Progressive Similarity Search with
Probabilistic Quality Guarantees. In SIGMOD.
[23] Ruihao Gong, Xianglong Liu, Shenghu Jiang, Tianxiang Li, Peng Hu, Jiazhen Lin,
Fengwei Yu, and Junjie Yan. 2019. Differentiable Soft Quantization: Bridging
Full-Precision and Low-Bit Neural Networks. In ICCV.
[24] Emil Gumbel. 1955. Statistical theory of extreme values and some practical
applications: a series of lectures. Journal of the Royal Statistical Society 118, 1
(1955).
[25] Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. 2015. Distilling the Knowl-
edge in a Neural Network. In NIPS.
[26] Van Long Ho, Nguyen Ho, and Torben Bach Pedersen. 2021. Efficient Temporal
Pattern Mining in Big Time Series Using Mutual Information. Proc. VLDB Endow.
15, 3 (2021).
[27] Sture Holm. 1979. A Simple Sequentially Rejective Multiple Test Procedure.
Scandinavian Journal of Statistics 6, 2 (1979).
[28] Eric Jang, Shixiang Gu, and Ben Poole. 2017. Categorical Reparameterization
with Gumbel-Softmax. In ICLR.
[29] Donald R. Jones, Matthias Schonlau, and William J. Welch. 1998. Efficient Global
Optimization of Expensive Black-Box Functions. J. Glob. Optim. 13, 4 (1998).
15
[30] Fazle Karim, Somshubra Majumdar, and Houshang Darabi. 2019. Insights Into
LSTM Fully Convolutional Networks for Time Series Classification. IEEE Access
7 (2019).
[31] James Large, Jason Lines, and Anthony J. Bagnall. 2019. A probabilistic classifier
ensemble weighting scheme based on cross-validated accuracy estimates. Data
Min. Knowl. Discov. 33, 6 (2019).
[32] Carl Henning Lubba, Sarab S. Sethi, Philip Knaute, Simon R. Schultz, Ben D.
Fulcher, and Nick S. Jones. 2019. catch22: CAnonical Time-series CHaracteristics
- Selected through highly comparative time-series analysis. Data Min. Knowl.
Discov. 33, 6 (2019).
[33] Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard S. Zemel. 2016. Understanding
the Effective Receptive Field in Deep Convolutional Neural Networks. In NIPS.
[34] Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. 2017. The Concrete Distri-
bution: A Continuous Relaxation of Discrete Random Variables. In ICLR.
[35] Chris J. Maddison, Daniel Tarlow, and Tom Minka. 2014. A* Sampling. In NIPS.
[36] Matthew Middlehurst, James Large, and Anthony J. Bagnall. 2020. The Canonical
Interval Forest (CIF) Classifier for Time Series Classification. In BigData.
[37] Matthew Middlehurst, James Large, Michael Flynn, Jason Lines, Aaron Bostrom,
and Anthony J. Bagnall. 2021. HIVE-COTE 2.0: a new meta ensemble for time
series classification. Mach. Learn. 110, 11 (2021).
[38] Matthew Middlehurst, William Vickers, and Anthony J. Bagnall. 2019. Scalable
Dictionary Classifiers for Time Series Classification. In IDEAL, Vol. 11871.
[39] Sayan Mukherjee, Partha Niyogi, Tomaso A. Poggio, and Ryan M. Rifkin. 2006.
Learning theory: stability is sufficient for generalization and necessary and suffi-
cient for consistency of empirical risk minimization. Adv. Comput. Math. 25, 1-3
(2006).
[40] James O'Neill. 2020. An Overview of Neural Network Compression. CoRR
abs/2006.03669 (2020).
[41] Antonio Polino, Razvan Pascanu, and Dan Alistarh. 2018. Model compression
via distillation and quantization. In ICLR.
[42] Carl Edward Rasmussen and Christopher K. I. Williams. 2004. Gaussian Processes
for Machine Learning.
[43] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang,
Carlo Gatta, and Yoshua Bengio. 2015. FitNets: Hints for Thin Deep Nets. In
ICLR.
[44] Alejandro Pasos Ruiz, Michael Flynn, James Large, Matthew Middlehurst, and
Anthony J. Bagnall. 2021. The great multivariate time series classification bake
off: a review and experimental evaluation of recent algorithmic advances. Data
Min. Knowl. Discov. 35, 2 (2021).
[45] Yonglong Tian, Dilip Krishnan, and Phillip Isola. 2020. Contrastive Representation
Distillation. In ICLR.
[46] Austin Tripp, Erik A. Daxberger, and José Miguel Hernández-Lobato. 2020.
Sample-Efficient Optimization in the Latent Space of Deep Generative Models
via Weighted Retraining. In NIPS.
[47] Frederick Tung and Greg Mori. 2018. CLIP-Q: Deep Network Compression
Learning by In-Parallel Pruning-Quantization. In CVPR.
[48] Jindong Wang, Yiqiang Chen, Shuji Hao, Xiaohui Peng, and Lisha Hu. 2019. Deep
learning for sensor-based activity recognition: A survey. Pattern Recognit. Lett.
119 (2019).
[49] Zhiguang Wang, Weizhong Yan, and Tim Oates. 2017. Time series classification
from scratch with deep neural networks: A strong baseline. In IJCNN.
[50] Frank Wilcoxon. 1945. Individual Comparisons by Ranking Methods. Biometrics
Bulletin 1, 6 (1945).
[51] Bin Yang, Chenjuan Guo, Christian S. Jensen, Manohar Kaul, and Shuo Shang.
2014. Stochastic skyline route planning under time-varying uncertainty. In ICDE.
[52] Ze Yang, Linjun Shou, Ming Gong, Wutao Lin, and Daxin Jiang. 2020. Model Com-
pression with Two-stage Multi-teacher Knowledge Distillation for Web Question
Answering System. In WSDM.
[53] Junho Yim, Donggyu Joo, Ji-Hoon Bae, and Junmo Kim. 2017. A Gift from
Knowledge Distillation: Fast Optimization, Network Minimization and Transfer
Learning. In CVPR.
[54] Fei Yuan, Linjun Shou, Jian Pei, Wutao Lin, Ming Gong, Yan Fu, and Daxin Jiang.
2021. Reinforced Multi-Teacher Selection for Knowledge Distillation. In AAAI.
[55] Linfeng Zhang, Chenglong Bao, and Kaisheng Ma. 2022. Self-Distillation: To-
wards Efficient and Compact Neural Networks. IEEE Trans. Pattern Anal. Mach.
Intell. 44, 8 (2022).
[56] Wentao Zhang, Jiawei Jiang, Yingxia Shao, and Bin Cui. 2020. Efficient Diversity-
Driven Ensemble for Deep Neural Networks. In ICDE.
[57] Xuchao Zhang, Yifeng Gao, Jessica Lin, and Chang-Tien Lu. 2020. TapNet: Mul-
tivariate Time Series Classification with Attentional Prototypical Network. In
AAAI.
[58] Shuai Zhao, Frede Blaabjerg, and Huai Wang. 2021. An Overview of Artificial
IEEE Transactions on Power
Intelligence Applications for Power Electronics.
Electronics 36, 4 (2021).
[59] Zhi-Hua Zhou, Jianxin Wu, and Wei Tang. 2002. Ensembling neural networks:
Many could be better than all. Artif. Intell. 137, 1-2 (2002).
|
http://arxiv.org/abs/2302.12716v1 | 2023-02-24T16:16:41 | 2023-02-24T16:16:41 | Supervised Hierarchical Clustering using Graph Neural Networks for
Speaker Diarization | Conventional methods for speaker diarization involve windowing an audio file
into short segments to extract speaker embeddings, followed by an unsupervised
clustering of the embeddings. This multi-step approach generates speaker
assignments for each segment. In this paper, we propose a novel Supervised
HierArchical gRaph Clustering algorithm (SHARC) for speaker diarization where
we introduce a hierarchical structure using Graph Neural Network (GNN) to
perform supervised clustering. The supervision allows the model to update the
representations and directly improve the clustering performance, thus enabling
a single-step approach for diarization. In the proposed work, the input segment
embeddings are treated as nodes of a graph with the edge weights corresponding
to the similarity scores between the nodes. We also propose an approach to
jointly update the embedding extractor and the GNN model to perform end-to-end
speaker diarization (E2E-SHARC). During inference, the hierarchical clustering
is performed using node densities and edge existence probabilities to merge the
segments until convergence. In the diarization experiments, we illustrate that
the proposed E2E-SHARC approach achieves 53% and 44% relative improvements over
the baseline systems on benchmark datasets like AMI and Voxconverse,
respectively. | [
"Prachi Singh",
"Amrit Kaul",
"Sriram Ganapathy"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12716v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12716v1",
"@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.LG",
"eess.AS"
] | SUPERVISED HIERARCHICAL CLUSTERING USING GRAPH NEURAL NETWORKS FOR
SPEAKER DIARIZATION
Prachi Singh , Amrit Kaul, Sriram Ganapathy
LEAP Lab, Electrical Engineering, Indian Institute of Science,Bangalore.
[email protected]
3
2
0
2
b
e
F
4
2
]
D
S
.
s
c
[
1
v
6
1
7
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Conventional methods for speaker diarization involve windowing an
audio file into short segments to extract speaker embeddings, fol-
lowed by an unsupervised clustering of the embeddings. This multi-
step approach generates speaker assignments for each segment. In
this paper, we propose a novel Supervised HierArchical gRaph Clus-
tering algorithm (SHARC) for speaker diarization where we intro-
duce a hierarchical structure using Graph Neural Network (GNN) to
perform supervised clustering. The supervision allows the model to
update the representations and directly improve the clustering per-
formance, thus enabling a single-step approach for diarization. In
the proposed work, the input segment embeddings are treated as
nodes of a graph with the edge weights corresponding to the sim-
ilarity scores between the nodes. We also propose an approach to
jointly update the embedding extractor and the GNN model to per-
form end-to-end speaker diarization (E2E-SHARC). During infer-
ence, the hierarchical clustering is performed using node densities
and edge existence probabilities to merge the segments until con-
vergence. In the diarization experiments, we illustrate that the pro-
posed E2E-SHARC approach achieves 53% and 44% relative im-
provements over the baseline systems on benchmark datasets like
AMI and Voxconverse, respectively.
Index Terms- Supervised Hierarchical Clustering, Graph
Neural Networks, Speaker Diarization.
1. INTRODUCTION
Speaker Diarization (SD) is the task of segmenting an audio file
based on speaker identity. The task has important applications in
rich speech transcription for multi-speaker conversational audio like
customer call center data, doctor patient conversations and meeting
data.
The conventional approach for the task of SD involves multiple
steps. In the first step, the audio is windowed into short segments
(1-2 s) and fed to a speaker embedding extractor. The speaker em-
bedding extractors are deep neural networks trained for the speaker
classification task. The output of penultimate layer, called as embed-
dings, provides a good initial speaker representation (for example,
x-vectors) [1,2]. In a subsequent step, these speaker embeddings are
clustered based on similarity scores computed using methods like
Probabilitic Linear Discriminant Analysis (PLDA) scoring [3, 4].
The most common clustering approach is the agglomerative hierar-
chical clustering (AHC) [5], which merges two clusters at each time
step based on similarity scores until the required number of clus-
ters/speakers are attained. Other approaches involve spectral cluster-
ing (SC) [6], k-means clustering [7] and graph based clustering [8,9].
This work was supported by the grants from the British Telecom Re-
search Center.
Recently, the end-to-end neural diarization [10, 11] approaches
involving transformers have proved effective in handling overlaps.
However, due to the difficulty in handling more than 4 speakers, pair-
wise metric learning loss is proposed recently [12]. There have been
recent efforts on clustering algorithms to improve the diarization per-
formance over the conventional approach. A graph-based agglomer-
ative clustering called path integral clustering proposed by Zhang et
al. [8] is shown to outperform other clustering approaches on CALL-
HOME and AMI datasets [9]. Similarly, metric learning approaches
are introduced in [6, 13] to improve the speaker similarity scores. In
a recent work, Singh et al. [9, 14] introduced self-supervised metric
learning using clustering output labels as the pseudo labels for model
training.
Most of the previous approaches for diarization are trained to
improve the similarity scores. However, they still use an unsuper-
vised clustering algorithm to obtain the final labels. We hypothesize
that this limits their performance as they are not trained with the clus-
tering objectives. On the other hand, EEND models require a large
amount of data and hundreds of hours of training. We propose a sim-
ple approach to SD which is not data intensive and can handle large
number of speakers (more than 7) while training and evaluation. The
approach is called as Supervised HierArchical gRaph Clustering al-
gorithm (SHARC). Our work is inspired by Xing et al. [15], where
a supervised learning approach to image clustering was proposed.
We perform supervised representation learning and clustering jointly
without requiring an external clustering algorithm. The major con-
tributions are:
1. Introducing supervised hierarchical clustering using Graph
Neural Networks (GNN) for diarization.
2. Developing the framework for joint representation learning
and clustering using supervision.
3. Achieving state-of-the-art performance on two benchmark
datasets.
2. RELATED WORK AND BACKGROUND
This section highlights previous works on SD by representing multi-
speaker audio file in the form of a graph. We first introduce GNN
and their use in metric learning and supervised clustering in other
domains. Then, we describe a variant of GNN, called GraphSAGE
[16] which is used in our approach.
Wang et al. [17] proposed GNN for metric learning. The in-
puts to the model are x-vectors/d-vectors and the PLDA similarity
score. The output of the model is a probability score of whether
two nodes are connected or not. The Graph Convolution Network
(GCN) [18], the most common variant of GNNs, are used in [19] for
semi-supervised training using clustering output as "pseudo-labels".
Fig. 1. Block diagram of proposed SHARC method. The ETDNN model and GNN are the extended time delay network model for x-vector
extraction and the graph neural network for score prediction. FFN stands for feed forward network. The left side (a) shows the training steps
and the right side (b) shows the inference steps.
GraphSAGE: The GCN is inherently transductive and does not
generalize to unseen nodes. The GraphSAGE [16], another vari-
ant of GNN, is a representation learning technique suitable for dy-
namic graphs. It can predict the embedding of a new node without
requiring a re-training procedure. The GraphSAGE learns aggrega-
tor functions that can induce the embedding of a new node given its
features and neighborhood. First, a graph is constructed using the
embeddings as the nodes. The edges are connected using the simi-
larity scores between the embeddings. Instead of training individual
embeddings for each node, a function is learnt that generates em-
beddings by sampling and aggregating features from a node's local
neighborhood. The aggregate function outputs a single neighbor-
hood embedding by taking a weighted average of each neighbor's
embedding.
3. PROPOSED APPROACH
The Supervised HierArchical gRaph Clustering algorithm (SHARC)
model is shown in Figure 1.
It introduces a hierarchical struc-
ture in the GNN-based clustering. Figure 1(a), shows the training
procedure using R audio recordings r ∈ {1, 2, .., R} where r
is the recording-id assigned to each recording in the dataset.
It
involves extracting short segment embeddings such as x-vectors
X = {X1, X2, ..., XR} from an Extended Time Delay Neural
Network (ETDNN) [1] for all recordings where Xr ∈ RNr ×F , Nr
is the number of x-vectors for recording r and F is the dimension
of x-vectors. These are used to form graphs at different levels of
hierarchy denoted as G = {G0
1, G0
r is
a graph of recording r at level m and Mr is the maximum number
of levels created for r. The nodes of the graphs are obtained from
X , and edges are connected using k-nearest neighbors with weights
coming from similarity matrices Sm = {Sm
1 , ..., Sm
R } for level m
r ×N m
where, Sm
is number of nodes at level m for
recording r. The graphs are constructed at different clustering levels
R } where Gm
r ∈ RN m
1, ..., GM r
2, ..., G1
r , N m
r
by merging the node features of each cluster and recomputing the
similarity matrix, as discussed in Section 3.1. For training, a set
of graphs G are fed to the GNN module in batches. The module
comprises of GNN along with a feed forward network to predict
edge weights ˆEm ∈ RN m
r ×k of all nodes with their k-nearest
neighbors. The loss is computed using Eq (true edge weights) and
ˆEm (predicted edge weights). The details of the GNN scoring and
loss computation are given in Section 3.4.
Figure 1(b), shows the inference block diagram. For a test
recording t, x-vectors Xt and St are extracted and a graph G0
t is
constructed at level 0. Then it is passed to the clustering module
which iteratively performs clustering using edge predictions from
GNN module followed by merging nodes of same cluster and then,
reconstructing graph for next level m. This process stops if the
graph has no edges (Gm = {φ}) or maximum allowed level M
is attained. The algorithm outputs cluster labels predicted for the
nodes at the top level, propagating down to the original embeddings.
The process is summarized in Algorithm 1.
3.1. Graph generation
r = {h(m)
r = (V m, Em), is created
In this step, a hierarchy of graphs, Gm
r where V m = {v1, v2, ..., vn} is the set of the
using Xr and Sm
nodes and Em is the set of the edges. Each graph consists of node
n } ∈ RF (cid:48)Xn where
, h(m)
representations H m
2
n = N m
is the number of nodes at level m. Em is obtained using
r
Sm
r ∈ [0, 1] considering k-nearest neighbors of each node in V m.
At level m = 0, we consider each embedding as individual cluster.
Therefore, node representations are given as H 0
r = [Xr; Xr]. For
any level m > 0, the node representation is obtained by concatenat-
ing the identity feature and the average feature of the current cluster,
as described in Section 3.3.
, ..., h(m)
1
ETDNN ModelX!k-nngraphGNN ModuleSimilarity matrix (S!)ClusteringDiarizationoutput(b) SHARC inferenceTest recording ETDNN Modelk-nngraphsSimilarity matrices (S", ..., S#)GNN ModuleTraining setX"X#Loss(a) SHARC trainingLevel 0Level 1True Edge weightsE!Predicted Edge weights )EGNNFFN +softmaxAppend pairs)EG"$,E%"$G#$,E%&$G"",E%""repeattill convergenceS!$G"',E%"'Level 2G#",E%&"speaker1speaker2AggregationFinal outputScoringAlgorithm 1: SHARC Inference
Initialize: M ← maximum no. of levels; m ← 0;
k ← no. of nearest neighbors; H 0 ← [X; X]
while m ≤ M do
1. Graph generation: Gm ← graph(H m, S, k)
If (Gm ← {φ}) : M = m; break
2. GNN Scoring: ˆEm ← Φ(Gm, H m)
3. C (cid:48)
4. Aggregation: H m+1 ← Ψ(H m, C (cid:48)
5. m ← m + 1
m ← Clustering( ˆEm)
m)
end
Output: Predicted ˆY = {ˆy1, .., ˆyN } using C (cid:48)
{1:m−1}
3.2. GNN scoring and clustering
The node representations H m at each level m are passed to the GNN
scoring function Φ. It predicts edge linkage probability (pij) which
indicates presence of an edge (vi, vj) ∈ V m along with node den-
sity ( ˆdi) which measures how densely the node is connected with its
neighbors. After GNN scoring, the clustering is performed. At each
level of hierarchy m, it creates a candidate edge set ε(i), for the node
vi, with edge connection threshold pτ , as given below.
ε(i) = {j|(vi, vj) ∈ Em,
ˆdi ≤ ˆdj
and pij ≥ pτ }
(1)
For any i, if ε(i) is not empty, we pick j = argmaxj∈ε(i)ˆeij and add
(vi, vj) to E(cid:48)
m where ˆeij is the predicted edge weights, given as,
ˆeij = 2pij − 1 ∈ [−1, 1]∀j ∈ N k
i
(2)
Here, N k
i are the k-nearest neighbors of node vi. After a full pass
over every node, E(cid:48)
m,
which serves as the designated clusters for the next level (m + 1).
The clustering stops when there are no connected components
present in the graph.
m forms a set of connected components C (cid:48)
3.3. Feature aggregation
To obtain node representations for next level H m+1, the connected
components C (cid:48)
m obtained from the clustering along with H m are
passed to an aggregation function Ψ . The function Ψ concatenates
identity feature ̃h(m+1)
of each cluster i
; ̄h(m+1)
to obtain hi
]. The identity feature of node
i
i at level m + 1 is the feature of the node which has highest node
density at level m in the cluster i. The average feature is computed
by taking average of all the identity features from previous level of
that cluster, given as,
and average feature ̄h(m+1)
(m+1) = [ ̃h(m+1)
i
i
i
̃h(m+1)
i
= ̃h(m)
zi
;
̄h(m+1)
i
=
1
(m)|
|ci
(cid:88)
̃h(m)
j
j∈ci
(m)
(3)
where zi = argmaxj∈ci
(m) ˆd(m)
j
.
3.4. GNN module architecture and training
GNN scoring function Φ is implemented as a learnable GNN mod-
ule designed for supervised clustering. The module consists of
one GraphSAGE [16] layer with F (cid:48) = 2048 neurons. Each graph
Gm
r , containing source and destination node pairs, is fed to the
It takes node representations H m and their edge
GNN module.
connections as input and generates latent representations denoted as
ˆH (m) ∈ RF (cid:48)×n, with n being the number of embeddings at a level
m. The pair of embeddings are concatenated [ˆhi; ˆhj] and passed to
a three-layer fully connected feed-forward network with a size of
{1024, 1024, 2} followed by softmax activation to generate linkage
probability pij. The predicted node density is computed as:
ˆdi =
1
k
(cid:88)
j∈N k
i
ˆeijSr(i, j)
(4)
The ground truth density di is obtained using ground truth edge
weight eq
ij = 2qij − 1 ∈ Eq{−1, 1}Nr Xk, where qij = 1 if nodes
vi and vj belong to the same cluster, otherwise qij = 0. A node
with higher density is a better representative of the cluster than a
node with lower density. Each node vi has a cluster (speaker) label
yi in the training set, allowing the function to learn the clustering
criterion from the data. The loss function for training is given as
follows:
L = Lconn + Lden
(5)
where Lconn is the pairwise binary cross entropy loss based on link-
age probability across all the possible edges in E accumulated across
all levels and recordings in a batch. Lden represents mean squared
error (MSE) loss between ground truth node density di and predicted
node density ˆdi ∀i ∈ {1, ..., |V |}, where |V | is the cardinality of V .
3.5. E2E-SHARC
The SHARC model described in the previous section also allows
the computation of gradients of the loss function w.r.t the input x-
vector embeddings. The computation of these gradients enables the
fine-tuning of the embedding extractor. We remove the classifica-
tion layer from the 13-layer ETDNN model [20] and connect the
11th affine layer output with the SHARC model input. This model
is trained using 40-D mel-spectrogram feature vectors and similarity
matrices as input. The details of ETDNN embedding extractor are
described in Section 4.2. The training loss is the same as the SHARC
model (Equation 5). This approach is referred as End-to-End Super-
vised HierArchical gRaph Clustering (E2E-SHARC).
4. EXPERIMENTS
4.1. Datasets
4.1.1. AMI
• Train, dev and eval sets: The AMI dataset [21] contains meet-
ing recordings from four different sites (Edinburgh, Idiap, TNO,
Brno).
It comprises of training, development (dev) and evalua-
tion (eval) sets consisting of 136, 18 and 16 recordings sampled
at 16kHz, respectively. The number of speakers and the duration
ranges of each recording from 3-5 and 20-60 mins, respectively.
4.1.2. Voxconverse
• Train set: The dataset used for training Voxconverse model is
simulated using Voxceleb 1 and 2 [22, 23] and Librispeech [24]
using the recipe from [10]. We simulated 5000 mixtures contain-
ing 2-5 speakers with duration ranging from 150-440 s. This gen-
erates 1000 hrs of data with 6, 023 speakers.
• Voxconverse dev and eval sets: It is an audio-visual diarization
dataset [25] consisting of multispeaker human speech recordings
extracted from YouTube videos. It is divided into a development
(dev) set and an evaluation (eval) set consisting of 216 and 232
recordings respectively. The duration of a recording ranges from
22-1200 s. The number of speakers per recording varies from 1-
21.
Table 1. Choice of hyper-parameters for train, dev, eval split of
AMI and Voxconverse datasets. The parameters k∗ and p∗
τ are used
in E2E-SHARC training.
Table 3. DER (%, w/out overlap + with collar) comparison with
state-of-the-art on AMI MDM (without TNO sets) and Voxconverse
datasets.
Parameters
k
pτ
k∗
p∗
τ
AMI
Train Dev
60
-
30
-
60
0.0
50
0.0
Eval
60
0.0
50
0.0
Voxconverse
Train Dev
60
-
60
-
30
0.5
30
0.9
Eval
30
0.8
30
0.8
Table 2. DER (%) comparison on the AMI SDM and Voxconverse
datasets with the baseline methods. OVP: overlap, COL: collar.
AMI MDM System
x-vec(ResNet101)+AHC+VBx [29]
ECAPA-TDNN [30]
SelfSup-PLDA-PIC (+VBx) [14]
SHARC (+VBx)
Voxconverse System
Voxconverse challenge [25]
VBx BUT system [31]
Wang et. al. [32]
E2E-SHARC +VBx
Dev.
2.78
3.66
5.38 (2.18)
3.58 (3.72)
Dev.
24.57
4.36
4.41
3.94
Eval.
3.09
3.01
4.63 (3.27)
2.29 (2.11)
Eval.
−
−
5.82
5.51
AMI SDM System
x-vec + PLDA + AHC [26]
x-vec + PLDA + SC
x-vec + PLDA + SHARC
E2E-SHARC
−
+ VBx [27]
Voxconverse System
x-vec + PLDA + AHC [26]
x-vec + PLDA + SC
x-vec + PLDA + SHARC
E2E-SHARC
−
+ VBx [27]
4.2. Baseline system
with OVP + no COL w/out OVP + COL
Dev.
24.50
19.8
19.71
20.59
19.35
Eval.
29.51
22.29
21.44
19.83
19.82
Eval.
14.59
5.76
4.88
2.89
2.73
Dev.
7.61
4.1
3.91
5.15
3.46
12.68
10.78
10.25
9.90
8.29
13.41
14.02
13.29
11.68
9.67
7.82
6.52
6.06
5.68
3.94
9.28
9.92
9.40
7.65
5.51
The baseline method is an x-vector-clustering based approach fol-
lowed in [14, 26]. First, the recording is divided into 1.5 s short seg-
ments with 0.75 s shift. The 40-D mel-spectrogram features are com-
puted from each segment which is passed to the ETDNN model [1]
to extract 512-D x-vectors. The ETDNN model follows the Big-
DNN architecture described in [20] and is trained on the VoxCeleb1
[22] and VoxCeleb2 [23] datasets, for speaker identification task,
to discriminate among the 7, 146 speakers. The whitening trans-
form, length normalization and recording level PCA are applied to
the x-vectors as pre-processing steps to compute the PLDA similar-
ity score matrix and perform clustering to generate speaker labels
for each segment. For comparison, we have used two most popular
clustering approaches - AHC [5] and SC [28]. To perform AHC, the
PLDA is used directly. For SC, we convert the scores in [0, 1] range
by applying sigmoid with temperature parameter τ = 10 (best value
obtained from experimentation).
4.3. Training configuration
For training the SHARC model, we extract x-vectors with a window
of duration 1.5 s with 0.75 s shift, from single speaker regions of the
training set. The similarity score matrices, Sm, are obtained using
baseline PLDA models which are fed to the GNN module described
in Section 3.4. The possible levels of each recording depend on the
number of x-vectors (Nr) and the choice of k.
To train the end-to-end SHARC model, the weights of the x-
vector model are initialized with the pre-trained ETDNN model
while the SHARC model weights are initialized with the one ob-
tained from SHARC training. The input to the model is 40-D
mel-spectrogram computed from 1.5 s with 0.75 s shift. To prevent
overfitting of the embedding extractor, the pre-trained x-vectors are
added to the embedding extractor output before feeding to the GNN.
4.4. Choice of hyper-parameters
The SHARC model is trained with Stochastic Gradient Descent
(SGD) optimizer with a learning rate lr=0.01 (for Voxconverse) and
lr=0.001(for AMI) for 500 epochs. Similarly, the E2E-SHARC is
also trained with an SGD optimizer. In this case, the learning rate
is 1e-06 for the ETDNN model and 1e-03 for the SHARC model,
trained for 20 epochs. The hyperparameters k, pτ are selected based
on the best performance on the dev set for the eval set and vice
versa. The maximum number of levels M is initially set to 15 to
avoid infinite loops but the algorithm converges at M ≤ 3. Table
1 shows the values of hyperparameters obtained for the AMI and
Voxconverse datasets.
5. RESULTS
The proposed approaches are evaluated using the diarization error
rate (DER) metric [26]. In our work, we use ground truth speech
regions for performance comparison. The DERs are computed for
two cases. The first case considers overlaps and without collar re-
gions, and the second case ignores overlaps and incorporates a tol-
erance collar of 0.25 s. Table 2 shows that the proposed SHARC
model improves over the baseline systems, and the performance fur-
ther improves with the E2E-SHARC model for both datasets. To
incorporate temporal continuity, we applied a re-segmentation ap-
proach using Variational Bayes inference (VBx) [27] with the E2E-
SHARC clustering labels as initialization, which further boosted the
performance. As shown in Table 2, for the AMI SDM dataset, we
obtain 15.6% and 52.6% relative improvements for the dev and eval
set, respectively over the PLDA-SC baseline (best). Similarly, we
achieve 39.6% and 44.4% relative improvements over the Voxcon-
verse baseline (PLDA- SC) for the dev and eval set, respectively.
Table 3 compares proposed approach performance with state-of-
the-art systems. The widely reported beamformed AMI multi-distant
microphone (MDM) dataset, without TNO recordings, is used for
benchmarking. The beamformed recordings are obtained using [33].
The proposed SHARC model has the lowest DER for eval set com-
pared to all previous SOTA approaches. For the Voxconverse dataset,
we compare it with the challenge baseline and other published re-
sults. Here, the E2E-SHARC with VBx shows the best results com-
pared to previously published results.
6. SUMMARY
We have proposed a supervised hierarchical clustering algorithm us-
ing graph neural networks for speaker diarization. The GNN module
learns the edge linkages and node densities across all levels of hierar-
chy. The proposed approach enables the learnt GNN module to per-
form clustering hierarchically based on merging criteria which can
handle a large number of speakers. The method is further extended to
perform end-to-end diarization by jointly learning the embedding ex-
tractor and the GNN module. With challenging diarization datasets,
we have illustrated the performance improvements obtained using
the proposed approach.
7. ACKNOWLEDGEMENTS
The authors would like to thank Michael Free, Rohit Singh, Shakti
Srivastava of British Telecom Research for their valuable inputs.
8. REFERENCES
[1] David Snyder, Daniel Garcia-Romero, Gregory Sell, Alan Mc-
Cree, Daniel Povey, and Sanjeev Khudanpur, "Speaker recog-
nition for multi-speaker conversations using x-vectors,"
in
IEEE ICASSP, 2019, pp. 5796–5800.
[2] David Snyder, Daniel Garcia-Romero, Gregory Sell, Daniel
Povey, and Sanjeev Khudanpur, "X-vectors: Robust DNN em-
beddings for speaker recognition," in IEEE ICASSP, 2018, pp.
5329–5333.
[3] Sergey Ioffe, "Probabilistic linear discriminant analysis," in
European Conference on Computer Vision. Springer, 2006, pp.
531–542.
[4] Gregory Sell and Daniel Garcia-Romero, "Speaker diarization
with PLDA i-vector scoring and unsupervised calibration," in
IEEE Spoken Language Technology Workshop (SLT), 2014, pp.
413–417.
[5] William H. E. Day and Herbert Edelsbrunner, "Efficient al-
gorithms for agglomerative hierarchical clustering methods,"
Journal of Classification, vol. 1, pp. 7–24, 1984.
[6] Quan Wang, Carlton Downey, Li Wan, Philip Andrew Mans-
field, and Ignacio Lopz Moreno, "Speaker diarization with
LSTM," in IEEE ICASSP, 2018, pp. 5239–5243.
[7] Aristidis Likas, Nikos Vlassis, and Jakob J Verbeek,
"The
global k-means clustering algorithm," Pattern recognition, vol.
36, no. 2, pp. 451–461, 2003.
[8] Wei Zhang, Deli Zhao, and Xiaogang Wang, "Agglomerative
clustering via maximum incremental path integral," Pattern
Recognition, vol. 46, no. 11, pp. 3056–3065, 2013.
[9] Prachi Singh and Sriram Ganapathy,
"Self-supervised rep-
resentation learning with path integral clustering for speaker
diarization," IEEE/ACM Transactions on Audio, Speech, and
Language Processing, vol. 29, pp. 1639–1649, 2021.
[10] Yusuke Fujita et al., "End-to-End Neural Speaker Diarization
with Self-attention," in ASRU, 2019, pp. 296–303.
[11] Shota Horiguchi, Yusuke Fujita, Shinji Watanabe, Yawen Xue,
and Kenji Nagamatsu, "End-to-End Speaker Diarization for an
Unknown Number of Speakers with Encoder-Decoder Based
Attractors," in INTERSPEECH, 2020.
[12] Shota Horiguchi, Shinji Watanabe, Paola Garc ́ıa, Yawen Xue,
Yuki Takashima, and Yohei Kawaguchi, "Towards neural di-
arization for unlimited numbers of speakers using global and
local attractors," in IEEE ASRU, 2021, pp. 98–105.
[13] Qingjian Lin, Ruiqing Yin, Ming Li, Herv ́e Bredin, and Claude
Barras, "LSTM Based Similarity Measurement with Spectral
Clustering for Speaker Diarization," in Proc. INTERSPEECH,
2019, pp. 366–370.
[14] Prachi Singh and Sriram Ganapathy, "Self-supervised metric
learning with graph clustering for speaker diarization," in IEEE
ASRU, 2021, pp. 90–97.
[15] Yifan Xing, Tong He, Tianjun Xiao, Yongxin Wang, Yuan-
jun Xiong, Wei Xia, David Wipf, Zheng Zhang, and Stefano
Soatto, "Learning hierarchical graph neural networks for im-
age clustering," in Proc. IEEE ICCV, 2021, pp. 3467–3477.
[16] Will Hamilton, Zhitao Ying, and Jure Leskovec, "Inductive
representation learning on large graphs," Advances in neural
information processing systems, vol. 30, 2017.
[17] Jixuan Wang et al., "Speaker diarization with session-level
speaker embedding refinement using graph neural networks,"
in IEEE ICASSP, 2020, pp. 7109–7113.
[18] Thomas N Kipf and Max Welling, "Semi-supervised classi-
fication with graph convolutional networks," arXiv preprint
arXiv:1609.02907, 2016.
[19] Fuchuan Tong et al.,
"Graph convolutional network based
semi-supervised learning on multi-speaker meeting data," in
IEEE ICASSP, 2022, pp. 6622–6626.
[20] Hossein Zeinali et al.,
celeb speaker recognition challenge 2019,"
arXiv:1910.12592, 2019.
"BUT system description to vox-
arXiv preprint
[21] I McCowan, J Carletta, W Kraaij, S Ashby, S Bourban,
M Flynn, M Guillemot, T Hain, J Kadlec, V Karaiskos, et al.,
"The AMI meeting corpus," in International Conference on
Methods and Techniques in Behavioral Research, 2005, pp.
137–140.
[22] Arsha Nagrani, Joon Son Chung, and Andrew Zisserman,
"Voxceleb: A large-scale speaker identification dataset," Proc.
of INTERSPEECH, pp. 2616–2620, 2017.
[23] Joon Son Chung, Arsha Nagrani, and Andrew Zisserman,
"Voxceleb2: Deep speaker recognition," in Proc. of INTER-
SPEECH, 2018, pp. 1086–1090.
[24] Vassil Panayotov et al., "Librispeech: an asr corpus based on
public domain audio books," in IEEE ICASSP, 2015, pp. 5206–
5210.
[25] Joon Son Chung et al., "Spot the Conversation: Speaker Diari-
sation in the Wild," in Proc. INTERSPEECH 2020, 2020, pp.
299–303.
[26] Neville Ryant et al., "The Third DIHARD Diarization Chal-
lenge," in Proc. INTERSPEECH, 2021, pp. 3570–3574.
[27] Federico Landini et al., "BUT system for the second DIHARD
in IEEE ICASSP, 2020, pp.
speech diarization challenge,"
6529–6533.
[28] Andrew Ng, Michael Jordan, and Yair Weiss, "On spectral
clustering: Analysis and an algorithm," Advances in neural
information processing systems, vol. 14, 2001.
[29] Federico Landini et al.,
"Bayesian HMM clustering of x-
vector sequences (VBx) in speaker diarization:
theory, im-
plementation and analysis on standard tasks," arXiv preprint
arXiv:2012.14952, 2020.
[30] Nauman Dawalatabad et al., "ECAPA-TDNN embeddings for
speaker diarization," arXiv preprint arXiv:2104.01466, 2021.
[31] Federico Landini et al., "Analysis of the BUT diarization sys-
tem for voxconverse challenge," in IEEE ICASSP, 2021, pp.
5819–5823.
[32] Weiqing Wang et al., "Similarity measurement of segment-
level speaker embeddings in speaker diarization," IEEE/ACM
Transactions on Audio, Speech, and Language Processing, vol.
30, pp. 2645–2658, 2022.
[33] X. Anguera, C. Wooters, and J. Hernando, "Acoustic beam-
forming for speaker diarization of meetings," IEEE Transac-
tions on Audio, Speech, and Language Processing, vol. 15, no.
7, pp. 2011–2021, 2007.
|
|
http://arxiv.org/abs/2302.12715v2 | 2023-06-01T14:45:19 | 2023-02-24T16:16:19 | Hiding Data Helps: On the Benefits of Masking for Sparse Coding | Sparse coding, which refers to modeling a signal as sparse linear
combinations of the elements of a learned dictionary, has proven to be a
successful (and interpretable) approach in applications such as signal
processing, computer vision, and medical imaging. While this success has
spurred much work on provable guarantees for dictionary recovery when the
learned dictionary is the same size as the ground-truth dictionary, work on the
setting where the learned dictionary is larger (or over-realized) with respect
to the ground truth is comparatively nascent. Existing theoretical results in
this setting have been constrained to the case of noise-less data. We show in
this work that, in the presence of noise, minimizing the standard dictionary
learning objective can fail to recover the elements of the ground-truth
dictionary in the over-realized regime, regardless of the magnitude of the
signal in the data-generating process. Furthermore, drawing from the growing
body of work on self-supervised learning, we propose a novel masking objective
for which recovering the ground-truth dictionary is in fact optimal as the
signal increases for a large class of data-generating processes. We corroborate
our theoretical results with experiments across several parameter regimes
showing that our proposed objective also enjoys better empirical performance
than the standard reconstruction objective. | [
"Muthu Chidambaram",
"Chenwei Wu",
"Yu Cheng",
"Rong Ge"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12715v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12715v2",
"@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"
] | Hiding Data Helps: On the Benefits of Masking for Sparse Coding
Muthu Chidambaram 1 Chenwei Wu 1 Yu Cheng 2 Rong Ge 1
Abstract
Sparse coding, which refers to modeling a signal
as sparse linear combinations of the elements of
a learned dictionary, has proven to be a success-
ful (and interpretable) approach in applications
such as signal processing, computer vision, and
medical imaging. While this success has spurred
much work on provable guarantees for dictionary
recovery when the learned dictionary is the same
size as the ground-truth dictionary, work on the
setting where the learned dictionary is larger (or
over-realized) with respect to the ground truth is
comparatively nascent. Existing theoretical re-
sults in this setting have been constrained to the
case of noise-less data. We show in this work
that, in the presence of noise, minimizing the
standard dictionary learning objective can fail to
recover the elements of the ground-truth dictio-
nary in the over-realized regime, regardless of
the magnitude of the signal in the data-generating
process. Furthermore, drawing from the grow-
ing body of work on self-supervised learning, we
propose a novel masking objective for which re-
covering the ground-truth dictionary is in fact op-
timal as the signal increases for a large class of
data-generating processes. We corroborate our
theoretical results with experiments across several
parameter regimes showing that our proposed ob-
jective also enjoys better empirical performance
than the standard reconstruction objective.
3
2
0
2
n
u
J
1
]
G
L
.
s
c
[
2
v
5
1
7
2
1
.
2
0
3
2
:
v
i
X
r
a
1. Introduction
Modeling signals as sparse combinations of latent variables
has been a fruitful approach in a variety of domains, and
has been especially useful in areas such as medical imag-
ing (Zhang et al., 2017), neuroscience (Olshausen & Field,
2004), and genomics (Tibshirani & Wang, 2008), where
1Department of Computer Science, Duke University
2Department of Computer Science, Brown University. Correspon-
dence to: Muthu Chidambaram <[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
learning parsimonious representations of data is of high
importance. The particular case of modeling data in some
high-dimensional space Rd as sparse linear combinations
of a set of p vectors in Rd (referred to as a dictionary) has
received significant attention over the past two decades,
leading to the development of many successful algorithms
and theoretical frameworks.
In this case, the typical assumption is that we are given
data yi generated as yi ∼ Azi + εi, where A ∈ Rd×p is
a ground truth dictionary, zi is a sparse vector, and εi is
some potentially non-zero noise. When the dictionary A
is known a priori, the goal of modeling is to recover the
sparse representations zi, and the problem is referred to as
compressed sensing. However, in many applications we do
not have access to the ground truth A, and instead hope to
simultaneously learn a dictionary B that approximates A
along with learning sparse representations of the data.
This problem is referred to as sparse coding or sparse dic-
tionary learning, and is the focus of this work. One of the
primary goals of analyses of sparse coding is to provide
provable guarantees on how well one can hope to recover
the ground truth dictionary A, both with respect to specific
algorithms and information theoretically. Prior work on
such guarantees has focused almost exclusively on the set-
ting where the learned dictionary B also belongs to Rd×p
(same space as the ground truth), which is in line with the
fact that recovery error is usually formulated as some form
of the Frobenius norm of the difference between B and A.
Unfortunately, in practice, one does not necessarily have
access to the structure of A, and it is thus natural to consider
what happens (and how to formulate recovery error) when
learning a B ∈ Rd×p′
with p′ ̸= p. Of particular interest is
the case where p′ > p, where it is possible to recover A as
a sub-dictionary of B.
The study of this over-realized setting was recently taken
up in the work of Sulam et al. (2020), in which the authors
showed (perhaps surprisingly) that a modest level of over-
realization can be empirically and theoretically beneficial.
However, the results of Sulam et al. (2020) are restricted
to the noise-less setting where data is generated simply as
yi ∼ Azi. We thus ask the following questions:
On the Benefits of Masking for Sparse Coding
Does over-realized sparse coding run into pitfalls
when there is noise in the data-generating pro-
cess? And if so, is it possible to prevent this by
designing new sparse coding algorithms?
1.1. Main Contributions and Outline
In this work, we answer both of these questions in the affir-
mative. After providing the necessary background on sparse
coding in Section 2, we show in Theorem 3.2 of Section 3
that, as intuition would lead one to suspect, using standard
sparse coding algorithms for learning over-realized dictio-
naries in the presence of noise leads to overfitting. In fact,
our result shows that even if we allow the algorithms access
to infinitely many samples and allow for solving NP-hard
optimization problems, the learned dictionary B can still
fail to recover A.
The key idea behind this result is that existing approaches
to sparse coding rely largely on a two-step procedure (out-
lined in Algorithm 1) of solving the compressed sensing
problem B ˆz = yi for a learned dictionary B, and then up-
dating B based on a reconstruction objective ∥yi − B ˆz∥2.
However, because we force ˆz to be sparse, by choosing B to
have columns that correspond to linear combinations of the
columns of A, we can effectively "cheat" and get around the
sparsity constraint on ˆz. In this way, it can be optimal for re-
constructing the data yi to not recover A as a sub-dictionary
of B.
On the other hand, we show in Theorem 3.6 that for a large
class of data-generating processes, it is possible to prevent
this kind of cheating in B by performing the compressed
sensing step on a subset of the dimensions yi and computing
the reconstruction loss on the complement of that subset.
This is the idea of masking that has seen great success in
large language modeling (Devlin et al., 2019), and our result
shows that it can lead to provable benefits even in the context
of sparse coding.
Finally, in Section 4 we conduct experiments comparing
the standard sparse coding approach to our masking ap-
proach across several parameter regimes. In all of our ex-
periments, we find that the masking approach leads to better
ground truth recovery, with this being more pronounced as
the amount of over-realization increases.
1.2. Related Work
Compressed Sensing. The seminal works of Candes et al.
(2006), Candes & Tao (2006), and Donoho (2006) estab-
lished conditions on the dictionary A ∈ Rd×p, even in the
case where p ≫ d (the overcomplete case), under which
it is possible to recover (approximately and exactly) the
sparse representations zi from Azi + εi.
In accordance
with these results, several efficient algorithms based on con-
2
vex programming (Tropp, 2006; Yin et al., 2008), greedy
approaches (Tropp & Gilbert, 2007; Donoho et al., 2006;
Efron et al., 2004), iterative thresholding (Daubechies et al.;
Maleki & Donoho, 2010), and approximate message passing
(Donoho et al., 2009; Musa et al., 2018) have been devel-
oped for solving the compressed sensing problem. There
has also been work on modifying these approaches to in-
clude a cross-validation step (Boufounos et al., 2007; Ward,
2009), which is similar to the idea of our masking objective.
For comprehensive reviews on the theory and applications
of compressed sensing, we refer the reader to the works of
Candes & Wakin (2008) and Duarte & Eldar (2011).
Sparse Coding. Different framings of the sparse coding
problem exist in the literature (Krause & Cevher, 2010; Bach
et al., 2008; Zhou et al., 2009), but the canonical formulation
involves solving a non-convex optimization problem. De-
spite this hurdle, a number of algorithms (Engan et al., 1999;
Aharon et al., 2006a; Mairal et al., 2010; Arora et al., 2013;
2014; 2015) have been established to (approximately) solve
the sparse coding problem under varying conditions, dating
back at least to the groundbreaking work of Olshausen &
Field (1997) in computational neuroscience. A summary
of convergence results and the conditions required on the
data-generating process for several of these algorithms may
be found in Table 1 of Gribonval et al. (2014).
In addition to algorithm-specific analyses, there also exists a
complementary line of work on characterizing the optimiza-
tion landscape of dictionary learning. This type of analysis
is carried out by Gribonval et al. (2014) in the general set-
ting of an overcomplete dictionary and noisy measurements
with possible outliers, extending the previous line of work
of Aharon et al. (2006b), Gribonval & Schnass (2010), and
Geng et al. (2011).
However, as mentioned earlier, these theoretical results rely
on learning dictionaries that are the same size as the ground
truth. To the best of our knowledge, the over-realized case
has only been studied by Sulam et al. (2020), and our work
is the first to analyze over-realized sparse coding in the
presence of noise.
Self-Supervised Learning. Training models to predict
masked out portions of the input data is an approach to
self-supervised learning that has led to strong empirical
results in the deep learning literature (Devlin et al., 2019;
Yang et al., 2019; Brown et al., 2020; He et al., 2022). This
success has spurred several theoretical studies analyzing
how and why different self-supervised tasks can be used to
improve model training (Tsai et al., 2020; Lee et al., 2021;
Tosh et al., 2021). The most closely related works to our
own in this regard have studied the use of masking objec-
tives in autoencoders (Cao et al., 2022; Pan et al., 2022) and
hidden Markov models (Wei et al., 2021).
2. Preliminaries and Setup
we use the same formulation in this work:
On the Benefits of Masking for Sparse Coding
We first introduce some notation that we will use throughout
the paper.
Notation. Given n ∈ N, we use [n] to denote the set
{1, 2, ..., n}. For a vector x, we write ∥x∥ for the L2-norm
of x and ∥x∥0 for the number of non-zeros in x. We say
a vector x is k-sparse if ∥x∥0 ≤ k and we use supp(x) to
denote the support of x. For a vector x ∈ Rd and a set
S ⊆ [d], we use [x]S ∈ R|S| to denote the restriction of x
to those coordinates in S.
For a matrix A, we use Ai to denote the i-th column of A.
We write ∥A∥F for the Frobenius norm of A, and ∥A∥op for
the operator norm of A, and we write σmin(A) and σmax(A)
for the minimum and maximum singular values of A. For
a matrix A ∈ Rd×q and S ⊆ [q], we use AS ∈ Rd×|S| to
refer to A restricted to the columns whose indices are in
S. We use Id to denote the d × d identity matrix. Finally,
for M ⊆ [d], we use PM ∈ R|M |×d to refer to the matrix
whose action on x is PM x = [x]M . Note that for a d × q
matrix A, PM A would give a subset of rows of A, which is
different from the earlier notation AS which gives a subset
of columns.
2.1. Background on Sparse Coding
We consider the sparse coding problem in which we are
given measurements y ∈ Rd generated as Az + ε, where
A ∈ Rd×p is a ground-truth dictionary, z ∈ Rp is a k-
sparse vector distributed according to a probability measure
Pz, and ε ∈ Rd is a noise term with i.i.d. entries. The goal
is to use the measurements y to reconstruct a dictionary B
that is as close as possible to the ground-truth dictionary A.
In the case where B has the same dimensions as A, one may
want to formulate this notion of "closeness" (or recovery
error) as ∥A − B∥2
F . However, directly using the Frobenius
norm of (A − B) is too limited, as it is sufficient to recover
the columns of A up to permutations and sign flips. There-
fore, a common choice of recovery error (Gribonval et al.,
2014; Arora et al., 2015) is the following:
min
P ∈Π
∥A − BP ∥2
F
(2.1)
where Π is the set of orthogonal matrices whose entries are
0 or ±1.
In the over-realized setting, when B ∈ Rd×p′
with p′ > p,
Equation (2.1) no longer makes sense as A and B do not
have the same size. In this case, one can generalize Equation
(2.1) to measure the distance between each column of A and
the column closest to it in B (up to change of sign). This
notion of recovery was studied by Sulam et al. (2020), and
dR(A, B) ≜ 1
p
p
(cid:88)
i=1
min
j∈[p′],c∈{−1,1}
∥Ai − cBj∥2
(2.2)
Note that Equation (2.2) introduced the coefficient 1/p in
the recovery error and thus corresponds to the average dis-
tance between Ai and its best approximation in B. Also,
Equation (2.2) only allows sign changes, even though for
reconstructing Az, it is sufficient to recover the columns of
A up to arbitrary scaling. In our experiments we enforce
A and B to have unit column norms so a sign change suf-
fices; in theory one can always modify the B matrix to have
correct norm so it also does not change our results.
Given access to only measurements y, the algorithm can-
not directly minimize the recovery error dR(A, *). Instead,
sparse coding algorithms often seek to minimize the follow-
ing surrogate loss:
l(B) = Ey
(cid:20)
min
ˆz∈Rp′
(cid:21)
∥y − B ˆz∥2 + h(ˆz)
(2.3)
where h is a sparsity-promoting penalty function. Typical
choices of h include hard sparsity (h(ˆz) = 0 if ˆz is k-sparse
and h(ˆz) = ∞ otherwise) as well as the L1 penalty h(ˆz) =
∥ˆz∥1. While hard sparsity is closer to the assumption on the
data-generating process, it is well-known that optimizing
under exact sparsity constraints is NP-hard in the general
case (Natarajan, 1995). When h(ˆz) = ∥ˆz∥1 is used, the
learning problem is also known as basis pursuit denoising
(Chen & Donoho, 1994) or Lasso (Tibshirani, 1996).
Equation (2.3) is the population loss one wishes to minimize
when learning a dictionary B. In practice, sparse coding
algorithms must work with a finite number of measurements
y1, y2, . . . , yn obtained from the data-generating process
and instead minimize the empirical loss ̃l(B):
̃l(B) =
n
(cid:88)
i=1
min
ˆz∈Rp′
∥yi − B ˆz∥2 + h(ˆz)
(2.4)
2.2. Sparse Coding via Orthogonal Matching Pursuit
Most existing approaches for optimizing Equation (2.4) can
be categorized under the general alternating minimization
approach described in Algorithm 1. For simplicity we state
Algorithm 1 in terms of a single input signal y ∈ Rd, but in
practice the dictionary update in Algorithm 1 is performed
after batching over several input signals.
At iteration t, Algorithm 1 performs a decoding/compressed
sensing step using the current learned dictionary B(t) and
the input data y. As mentioned in Section 1.2, there are sev-
eral well-studied algorithms for this decoding step. Because
we are interested in enforcing a hard-sparsity constraint, we
3
On the Benefits of Masking for Sparse Coding
Algorithm 1 Alternating Minimization Framework
Input: Data y ∈ Rd, Dictionary B(t) ∈ Rd×p′
Decoding Step: Solve B(t) ˆz = y for k-sparse ˆz
Update Step: Update B(t) to B(t+1) by performing a
gradient step on loss computed using B(t) ˆz and y
restrict our attention to algorithms that are guaranteed to
produce a k-sparse representation in the decoding step.
We thus focus on Orthogonal Matching Pursuit (OMP) (Mal-
lat & Zhang, 1993; Rubinstein et al., 2008), which is a
simple greedy algorithm for the decoding step. The basic
procedure of OMP is to iteratively expand a subset T ⊂ [p′]
of atoms (until |T | = k) by considering the correlation be-
tween the unselected atoms in the current dictionary B(t)
2(cid:19)
(cid:18)
and the residual
y − B(t)
T argminˆz∈R|T |
(cid:13)
(cid:13)
(cid:13)y − B(t)
(cid:13)
(cid:13)
T ˆz
(cid:13)
(i.e., the least squares solution using atoms in T ). A
more precise description of the algorithm can be found
in Rubinstein et al. (2008). Moving forward, we will use
gOMP(y, B, k) to denote the k-sparse vector ˆz ∈ Rp′
ob-
tained by running the OMP algorithm on an input dictionary
B and a measurement y.
2.3. Conditions on the Data-Generating Process
For the data-generating process y ∼ Az + ε, it is in general
impossible to successfully perform the decoding step in
Algorithm 1 even with access to the ground-truth dictionary
A. As a result, several conditions have been identified in the
literature under which it is possible to provide guarantees
on the success of decoding the sparse representation z. We
recall two of the most common ones (Candes & Tao, 2005).
Definition 2.1. [Restricted Isometry Property (RIP)] We say
that a matrix A ∈ Rd×p satisfies (s, δs)-RIP if the following
holds for all s-sparse x ∈ Rp:
(1 − δs)∥x∥2 ≤ ∥Ax∥2 ≤ (1 + δs)∥x∥2
(2.5)
Definition 2.2. [μ-Incoherence] A matrix A ∈ Rd×p with
unit norm columns is μ-incoherent if:
|⟨Ai, Aj⟩| ≤ μ for all i ̸= j
(2.6)
These two properties are closely related. For example, as
a consequence of the Gershgorin circle theorem, (δs/s)-
incoherent matrices must satisfy (s, δs)-RIP.
Given the prominence of RIP and incoherence conditions in
the compressed sensing and sparse coding literature, there
has been a large body of work investigating families of
matrices that satisfy these conditions. We refer the reader
to Baraniuk et al. (2008) for an elegant proof that a wide
class of random matrices in Rd×p (i.e. subgaussian) satisfy
4
(k, δ)-RIP with high probability depending on δ, k, p, and
d. For an overview of deterministic constructions of such
matrices, we refer the reader to Bandeira et al. (2012) and
the references therein.
3. Main Results
Having established the necessary background, we now
present our main results. Our first result shows that minimiz-
ing the population reconstruction loss with a hard-sparsity
constraint can lead to learning a dictionary B that is far from
the ground truth. We specifically work with the loss defined
as:
L(B, k) = Ey
(cid:20)
min
∥ˆz∥0≤k
(cid:21)
∥y − B ˆz∥2
(3.1)
Note that in the definition of L(B, k), we are considering an
NP-hard optimization problem (exhaustively searching over
all k-sparse supports). We could instead replace this exhaus-
tive optimization with an alternative least-squares-based
approach (so long as it is at least as good as performing least
squares on a uniformly random choice of k-sparse support),
and our proof techniques for Theorem 3.2 would still work.
We consider this version only to simplify the presentation.
We now show that, under appropriate settings, there exists a
dictionary B whose population loss L(B, k) is smaller than
that of A, while dR(A, B) is bounded away from 0 by a
term related to the noise in the data-generating process.
Assumption 3.1. Let A ∈ Rd×p be an arbitrary matrix with
(cid:17)
unit-norm columns satisfying (2k, δ)-RIP for k = o
and δ = o(1), and suppose σ2
min(A) = Ω(p/d). We assume
each measurement y is generated as y ∼ Az + ε, where
z is a random vector drawn from an arbitrary probability
measure Pz on k-sparse vectors in Rp, and ε ∼ N (0, σ2Id)
for some σ > 0.
(cid:16) d
log p
Theorem 3.2. [Overfitting to Reconstruction Loss] Con-
sider the data-generating model in Assumption 3.1 and de-
fine Λ(z) to be:
Λ(z) = inf{t | Pz(∥z∥ ≥ t) ≤ 1/d}.
Then for q = Ω(p2 max(dσ2, Λ(z)2)/σ2), there exists a
B ∈ Rd×q such that L(B, k) ≤ L(A, k) − Ω(kσ2) and
dR(A, B) = Ω(σ2).
(3.2)
Proof Sketch. The key idea is to first determine how much
the loss can be decreased by expanding from k-sparse com-
binations of the columns of A to 2k-sparse combinations,
i.e., lower bound the gap between L(A, k) and L(A, 2k).
After this, we can construct a dictionary B whose columns
form an ε-net (with ε = σ2) for all 2-sparse combinations
of columns of A. Any 2k-sparse combination of columns in
A can then be approximated as a k-sparse combination of
columns in B, which is sufficient for proving the theorem.
On the Benefits of Masking for Sparse Coding
Remark 3.3. Before we discuss the implications of Theorem
3.2, we first verify that Assumption 3.1 is not vacuous, and
in fact applies to many matrices of interest. This follows
from a result of Rudelson & Vershynin (2008), which shows
that after appropriate rescaling, rectangular matrices with
i.i.d. subgaussian entries satisfy the singular value condition
in Assumption 3.1. Furthermore, such matrices will also
satisfy the RIP condition so long as k is not too large relative
to d and p, as per Baraniuk et al. (2008) as discussed in the
previous section.
Theorem 3.2 shows that learning an appropriately over-
realized dictionary fails to recover the ground truth indepen-
dent of the distribution of z. This means that even if we let
the norm of the signal Az in the data-generating process be
arbitrarily large, with sufficient over-realization we may still
fail to recover the ground-truth dictionary A by minimizing
L(B, k).
We also observe that the amount of over-realization neces-
sary in Theorem 3.2 depends on how well z ∼ Pz can be
bounded with reasonably high probability. If z is almost
surely bounded (as is frequently assumed), we can obtain
the following cleaner corollary of Theorem 3.2.
Corollary 3.4. Consider the same settings as Theorem 3.2
with the added stipulation that Pz(∥z∥ ≤ C) = 1 for a
universal constant C. Then for q = Ω(p2d), there exists a
B ∈ Rd×q such that dR(A, B) = Ω(σ2) and L(B, k) ≤
L(A, k) − Ω(kσ2).
The reason that we can obtain a smaller population loss than
the ground truth in Theorem 3.2 is because we can make
use of the extra capacity in B to overfit the noise ε in the
data-generating process. To prevent this, our key idea is
to perform the decoding step B ˆz = y on a subset of the
dimensions of y - which we refer to as the unmasked part of
y - and then evaluate the loss of B using the complement of
that subset (the masked part of y). Intuitively, because each
coordinate of the noise ε is independent, a dictionary B that
well-approximates the noise in the unmasked part of y will
have no benefit in approximating the noise in the masked
part of y.
We can formalize this as the following masking objective:
Lmask(B, k, M ) = Ey
(cid:104)(cid:13)
(cid:13)[y][d]\M − [B ˆz][d]\M
2(cid:105)
(cid:13)
(cid:13)
where ˆz([y]M ) = gOMP([y]M , PM B, k)
(3.3)
(3.4)
In defining Lmask, we have opted to use gOMP in the inner
minimization step, as opposed to the exhaustive argmin in
the definition of L. Similar to the discussion earlier, we
could have instead used any other approach based on least
squares to decode ˆz (including the exhaustive approach),
so long as we have guarantees on the probability of failing
to recover the true code z given access to the ground-truth
dictionary A. This choice of using OMP is mostly to tie our
theory more closely with our experiments.
Now we present our second main result which shows, in
contrast to Theorem 3.2, that optimizing Lmask prevents
overfitting noise (albeit in a different but closely related
setting).
Assumption 3.5. Let A ∈ Rd×p be an arbitrary matrix such
that there exists an M ⊂ [d] with PM A being μ-incoherent
with μ ≤ C/(2k − 1) for a universal constant C < 1. We
assume each measurement y is generated as y ∼ Az + ε,
where [z]supp(z) ∼ N (0, σ2
z Ik) with supp(z) drawn from
an arbitrary probability distribution over all size-k subsets
of [d], and ε ∼ N (0, σ2Id) for some σ > 0.
Theorem 3.6. [Benefits of Masking] Consider the data-
generating model in Assumption 3.5. For any non-empty
mask M ⊂ [d] such that PM A satisfies the μ-incoherence
condition in the assumption, we have
(cid:16)
lim
σz→∞
Lmask(A, k, M ) − min
B
Lmask(B, k, M )
(cid:17)
= 0
(3.5)
That is, as the expected norm of the signal Az increases,
there exist minimizers B of Lmask such that dR(A, B) → 0.
Proof Sketch. The proof proceeds by expanding out
Lmask(B, k, M ) and using the fact that [B ˆz∗][d]\M is in-
dependent of [ε][d]\M to obtain a quantity that closely re-
sembles the prediction risk considered in analyses of linear
regression. From there we show that the Bayes risk is lower
bounded by the risk of a regularized least squares solution
with access to a support oracle. We then rely on a result of
Cai & Wang (2011) to show that gOMP([y]M ) recovers the
support of z with increasing probability as σz → ∞, and
hence its risk converges to the aforementioned prediction
risk.
Remark 3.7. As before, so long as the mask M is not too
small (i.e. Ω(kpolylog(p))), matrices with i.i.d. subgaus-
sian entries will satisfy the assumptions on A in Assumption
3.5. In particular, the set of ground truth dictionaries satis-
fying Assumptions 3.1 and 3.5 is non-trivial, once again by
results in Rudelson & Vershynin (2008).
Comparing Theorem 3.6 to Theorem 3.2, we see that approx-
imate minimizers of Lmask can achieve arbitrarily small
recovery error, so long as the signal Az is large enough;
whereas for L, there always exist minimizers whose recov-
ery error is bounded away from 0. We note that having the
expected norm of the signal be large is effectively necessary
to hope for recovering the ground truth in our setting, as in
the presence of Gaussian noise there is always some non-
zero probability that the decoding step can fail. Full proofs
of Theorems 3.2 and 3.6 can be found in Section A of the
Appendix.
5
On the Benefits of Masking for Sparse Coding
4. Experiments
In this section, we examine whether the separation between
the performance of sparse coding with or without mask-
ing (demonstrated by Theorems 3.2 and 3.6) manifests in
practice. Code for the experiments in this section can be
found at: https://github.com/2014mchidamb/
masked-sparse-coding-icml.
For our experiments, we need to make a few concessions
from the theoretical settings introduced in Sections 2.1 and
2.3. Firstly, we cannot directly optimize the expectations
in L and Lmask as defined in Equations (3.1) and (3.3), so
we instead optimize the corresponding empirical versions
defined in the same vein as Equation (2.4). Another issue is
that the standard objective L requires solving the optimiza-
tion problem min∥ˆz∥0≤k ∥y − B ˆz∥2, which is NP-hard in
general. In order to experiment with reasonably large values
of d, p, and p′ and to be consistent with the decoding step
in Lmask, we thus approximately solve the aforementioned
optimization problem using OMP.
Algorithm 2 Algorithm for Optimizing L
Input: Data {y1, ..., yT }, Dictionary B(0) ∈ Rd×p′
Learning Rate η ∈ R+
for t = 0 to T − 1 do
,
z ← gOMP(yt+1, B(t))
B(t+1) ← B(t) − η∇B(t)
B(t+1) ← ProjSd−1B(t+1)
(cid:13)yt+1 − B(t)z(cid:13)
(cid:13)
2
(cid:13)
end for
Algorithm 3 Algorithm for Optimizing Lmask
Input: Data {y1, ..., yT }, Dictionary B(0) ∈ Rd×p′
Learning Rate η ∈ R+, Mask Size m ∈ [d]
for t = 0 to T − 1 do
,
M ← Uniformly random subset of size m from [d]
z ← gOMP([yt+1]M , B(t))
(cid:13)
(cid:13)[yt+1]M c − [B(t)z]M c
B(t+1) ← B(t) − η∇B(t)
B(t+1) ← ProjSd−1B(t+1)
(cid:13)
2
(cid:13)
end for
The approaches for optimizing L and Lmask given n sam-
ples from the data-generating process are laid out in Algo-
rithms 2 and 3, in which we use ProjSd−1B to denote the
result of normalizing all of the columns of B. We also use
M c as a shorthand in Algorithm 3 to denote [d] \ M .
We point out that Algorithm 3 introduces some features
that were not present in the theory of the masking objec-
tive; namely, in each iteration, we randomly sample a new
mask of a pre-fixed size. This is because if we were to
run gradient descent using a single, fixed mask M at each
iteration, as we don't differentiate through the OMP steps,
the gradient with respect to B(t) computed on the error
6
(cid:13)
2
(cid:13)
(cid:13)
(cid:13)[y][d]\M − [Bz][d]\M
would be non-zero only for those
rows of B corresponding to the indices [d]\M . To avoid this
issue, we sample new masks in each iteration so that each
entry of B can be updated. There are alternative approaches
that can achieve similar results; i.e. deterministically cycling
through different masks, but they have similar performance.
While we will analyze the performance of Algorithms 2 and
3 across several different experimental setups over the next
few subsections, we describe the following facets shared
across all setups. We generate a dataset of n = 1000 sam-
ples yi = Azi + εi, where A ∈ Rd×p is a standard Gaussian
ensemble with normalized columns, the zi have uniformly
random k-sparse supports whose entries are i.i.d. N (0, 1),
and the εi are mean zero Gaussian noise with some fixed
variance (which we will vary in our experiments). We also
normalize the zi so as to constrain ourselves to the bounded-
norm setting of Corollary 3.4. In addition to the 1000 sam-
ples constituting the dataset, we also assume access to a
held-out set of p′ samples from the data-generating process
for initializing the dictionary B(0) ∈ Rd×p′
.
For training, we use batch versions of Algorithms 2 and 3
in which we perform gradient updates with respect to the
mean losses computed over {y1, ..., yB} with B = 200 as
the batch size. For the actual gradient step, we use Adam
(Kingma & Ba, 2014) with its default hyperparameters of
β1 = 0.9, β2 = 0.999 and a learning rate of η = 0.001, as
we found Adam trains significantly faster than SGD (and we
ran into problems when using large learning rates for SGD).
We train for 500 epochs (passes over the entire dataset) for
both Algorithms 2 and 3. For Algorithm 3, we always use
a mask size of d − ⌊d/10⌋, which we selected based off of
early experiments. We ensured that, even for this fairly large
mask size, the gradient norms for both L and Lmask were
of the same order in our experiments and that 500 epochs
were sufficient for training.
We did not perform extensive hyperparameter tuning, but
we found that the aforementioned settings performed better
than the alternative choices we tested for both algorithms
across all experimental setups. Our implementation is in
PyTorch (Paszke et al., 2019), and all of our experiments
were conducted on a single P100 GPU.
4.1. Scaling Over-realization
We first explore how the choice of p′ for the learned dic-
tionary B affects the empirical performance of Algorithms
2 and 3.6 when the other parameters of the problem re-
main fixed. Theorem 3.2 and Corollary 3.4 indicate that the
performance of Algorithm 2 should suffer as we scale p′
relative to d and p.
In order to test whether this is actually the case in prac-
tice, we consider samples generated as described above with
On the Benefits of Masking for Sparse Coding
(a) Sample init, p′ scaling
(b) Sample init, d, p, k, p′ scaling
(c) Sample init, noise scaling
(d) Local init, p′ scaling
(e) Local init, d, p, k, p′ scaling
(f) Local init, noise scaling
Figure 1. Comparison of Algorithm 2 (Baseline) and Algorithm 3 (Masking) under the settings of Sections 4.1, 4.2, and 4.3 (from left to
right). Each curve represents the mean of 5 training runs, with the surrounded shaded area representing one standard deviation.
A ∈ Rd×p for d = 100, p = 200, and ∥z∥0 = k = 5 fixed,
while scaling the number of atoms p′ in B from p′ = p
(exactly realized) to p′ = n (over-realized and overparame-
terized). We choose εi ∼ N (0, 1/d), which is a high noise
regime as the expected norm of the noise εi will be compa-
rable to that of the signal Azi. To make it computationally
feasible to run several trials of our experiments, we con-
sider the p′ values {200, 400, 600, 800, 1000} and do not
consider more fine-grained interpolation between p and n.
For the training process, we consider two different initial-
ization of B(0). In the first case, we initialize B(0) to have
columns corresponding to the aforementioned set of held-
out p′ (normalized) samples from the data-generating pro-
cess, as this is a standard initialization choice that has been
known to work well in practice (Arora et al., 2015). How-
ever, this initialization choice in effect corresponds to a
dataset of n + p′ samples, and it is fair to ask whether this
initialization benefit is worth the sample cost relative to a
random initialization. Our initial experiments showed that
this was indeed the case, i.e. random initialization with
access to p′ additional samples did not perform better, so we
focus on this sample-based initialization. That being said,
we did not find the ordering of the performances of Algo-
rithms 2 and 3 sensitive to the initializations we considered,
only the final absolute performance in terms of dR(A, B).
In addition to this purely sample-based initialization, we
also consider a "local" initialization of B(0) to the ground
truth A itself concatenated with p′ − p normalized samples.
This is obviously not intended to be a practical initialization;
the goal here is rather to analyze the extent of overfitting to
the noise εi in the dataset for both algorithms. Namely, we
expect that Algorithm 2 will move further away from the
ground truth than Algorithm 3.
The results for training using these initializations for both
algorithms and then computing the final dictionary recovery
errors dR(A, B) are shown in Figure 1(a, d). We use co-
sine distance when reporting the error dR(A, B) since the
learned dictionary B also has normalized columns, so Eu-
clidean distance only changes the scale of the error curves
and not their shapes.
For both choices of initialization, we observe that Algorithm
3 outperforms Algorithm 2 as p′ increases, with this gap
only becoming more prominent for larger p′. Furthermore,
we find that recovery error actually worsens for Algorithm
2 for every choice of p′ > p for both initializations in our
setting. While this is possibly unsurprising for initializing
at the ground truth, it is surprising for the sample-based
initialization which does not start at a low recovery error.
On the other hand, training using Algorithm 3 improves the
7
On the Benefits of Masking for Sparse Coding
recovery error from initialization when using sample-based
initialization for every choice of p′ except p′ = n, which
again corresponds to the overparameterized regime in which
it is theoretically possible to memorize every sample as an
atom of B.
Additionally, we also see that the performance of Algorithm
3 is much less sensitive to the level of over-realization in
B. When training from local initialization, Algorithm 3 re-
tains a near-constant level of error/overfitting as we scale p′.
Similarly, when training from sample initialization, perfor-
mance does not degrade as we scale p′, and in fact improves
initially with a modest level of over-realization.
This improvement up to a certain amount of over-realization
(in our case p′ = 2p) is seen even in the performance of
Algorithm 2 for sample initialization (although note that
while the recovery error is better for p′ = 2p compared to
p′ = p, training still makes the error worse than initialization
for Algorithm 2). A similar phenomenon was observed in
Sulam et al. (2020) in the setting where yi = Azi (no
noise), and we find it interesting that the phenomenon is
(seemingly) preserved even in the presence of noise. We
do not investigate the optimal level of over-realization any
further, but believe it would be a fruitful direction for future
work.
truth atoms that need to be recovered well in order to have
small dR(A, B).
4.3. Analyzing Different Noise Levels
The performance gaps shown in the plots of Figure 1(a, b,
d, e) are in the high noise regime, and thus it is fair to ask
whether (and to what extent) these gaps are preserved at
lower noise settings. We thus revisit the settings of Section
4.1 (choosing d, p, and k to be the same) and fix p′ = 1000
(the maximum over-realization we consider). We then vary
the variance of the noise εi from 1/d2 to 1/d linearly, which
corresponds to the standard deviations of the noise being
{0.01, 0.0325, 0.055, 0.0775, 0.1}.
Results are shown for the sample-based initialization as
well as the local initialization in Figure 1(c, f). Here we see
that when the noise variance is very low, there is virtually
no difference in performance between Algorithms 2 and
3. Indeed, when the variance is 1/d2 we observe that both
algorithms are able to near-perfectly recover the ground
truth, even from the sample-based initialization.
However, as we scale the noise variance, the gap between the
performance of the two algorithms resembles the behavior
seen in the experiments of Sections 4.1 and 4.2.
4.2. Scaling All Parameters
5. Conclusion
The experiments of Section 4.1 illustrate that for the fixed
choices of d, p, and k that we used, scaling the over-
realization of B leads to rapid overfitting in the case of
Algorithm 2, while Algorithm 3 maintains good perfor-
mance. To verify that this is not an artifact of the choices
of d, p, and k that we made, we also explore what happens
when over-realization is kept at a fixed ratio to the other
setting parameters while they are scaled.
For these experiments, we consider A ∈ Rd×p for d ∈
{100, 150, 200, 250} and scale p as p = 2d and k as
k = ⌊d/20⌋ to (approximately) preserve the ratio of atoms
and sparsity to dimension from the previous subsection.
We choose to scale p′ as p′ = 2p since that was the best-
performing setting (for the baseline) from the experiments
of Figure 1. We keep the noise variance at 1/d to stay in the
relatively high noise regime.
As before, we consider a sample-based initialization as well
as a local initialization near the ground truth dictionary
A. The results for both Algorithms 2 and 3 under the de-
scribed parameter scaling are shown in Figure 1(b, e). Once
again we find that Algorithm 3 has superior recovery error,
with this gap mostly widening as the parameters are scaled.
However, unlike the case of fixed d, p, and k, this time the
performance of Algorithm 3 also degrades with the scaling.
This is to be expected, as increasing p leads to more ground
In summary, we have shown in Sections 3 and 4 that ap-
plying the standard frameworks for sparse coding to the
case of learning over-realized dictionaries can lead to over-
fitting the noise in the data. In contrast, we have also shown
that by carefully separating the data used for the decoding
and update steps in Algorithm 1 via masking, it is possible
to alleviate this overfitting problem both theoretically and
practically. Furthermore, the experiments of Section 4.3
demonstrate that these improvements obtained from mask-
ing are not at the cost of worse performance in the low noise
regime, indicating that a practitioner may possibly use Al-
gorithm 3 as a drop-in replacement for Algorithm 2 when
doing sparse coding.
Our results also raise several questions for exploration in
future work. Firstly, in both Theorem 3.6 and our experi-
ments we have constrained ourselves to the case of sparse
signals that follow Gaussian distributions. It is natural to
ask to what extent this is necessary, and whether our re-
sults can be extended (both theoretically and empirically)
to more general settings (we expect, at the very least, that
parts of Assumptions 3.1 and 3.5 can be relaxed). Addition-
ally, we have focused on sparse coding under hard-sparsity
constraints and using orthogonal matching pursuit, and it
would be interesting to study whether our ideas can be used
in other sparse coding settings.
8
On the Benefits of Masking for Sparse Coding
Beyond these immediate considerations, however, the intent
of our work has been to show that there is still likely much
to be gained from applying ideas from recent developments
in areas such as self-supervised learning to problems of a
more classical nature such as sparse coding. Our work has
only touched on the use of a single such idea (masking),
and we hope that future work looks into how other recently
popular ideas can potentially improve older algorithms.
Finally, we note that this work has been mostly theoretical
in nature, and as such do not anticipate any direct misuses
or negative impacts of the results.
Acknowledgements
Rong Ge, Muthu Chidambaram, and Chenwei Wu are sup-
ported by NSF Award DMS-2031849, CCF-1845171 (CA-
REER), CCF-1934964 (Tripods), and a Sloan Research
Fellowship. Yu Cheng is supported in part by NSF Award
CCF-2307106.
References
Aharon, M., Elad, M., and Bruckstein, A. K-svd: An algo-
rithm for designing overcomplete dictionaries for sparse
representation. IEEE Transactions on Signal Process-
ing, 54(11):4311–4322, 2006a. doi: 10.1109/TSP.2006.
881199.
Aharon, M., Elad, M., and Bruckstein, A. M. On
the uniqueness of overcomplete dictionaries, and a
practical way to retrieve them. Linear Algebra and
its Applications, 416(1):48–67, 2006b.
ISSN 0024-
doi: https://doi.org/10.1016/j.laa.2005.06.035.
3795.
https://www.sciencedirect.com/
URL
science/article/pii/S0024379505003459.
Special Issue devoted to the Haifa 2005 conference on
matrix theory.
Arora, S., Ge, R., and Moitra, A. New algorithms for
learning incoherent and overcomplete dictionaries, 2013.
URL https://arxiv.org/abs/1308.6273.
Arora, S., Bhaskara, A., Ge, R., and Ma, T. More
algorithms for provable dictionary learning. CoRR,
abs/1401.0579, 2014. URL http://arxiv.org/
abs/1401.0579.
Bandeira, A. S., Fickus, M., Mixon, D. G., and Wong, P. The
road to deterministic matrices with the restricted isometry
property, 2012. URL https://arxiv.org/abs/
1202.1234.
Baraniuk, R., Davenport, M., DeVore, R., and Wakin, M.
A simple proof of the restricted isometry property for
random matrices. Constructive Approximation, 28(3):
253–263, December 2008. ISSN 0176-4276. doi: 10.
1007/s00365-007-9003-x.
Boufounos, P., Duarte, M. F., and Baraniuk, R. G. Sparse
signal reconstruction from noisy compressive measure-
In 2007 IEEE/SP 14th
ments using cross validation.
Workshop on Statistical Signal Processing, pp. 299–303,
2007. doi: 10.1109/SSP.2007.4301267.
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan,
J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry,
G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger,
G., Henighan, T., Child, R., Ramesh, A., Ziegler, D.,
Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E.,
Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C.,
McCandlish, S., Radford, A., Sutskever, I., and Amodei,
D. Language models are few-shot learners. In Larochelle,
H., Ranzato, M., Hadsell, R., Balcan, M., and Lin,
H. (eds.), Advances in Neural Information Processing
Systems, volume 33, pp. 1877–1901. Curran Asso-
ciates, Inc., 2020. URL https://proceedings.
neurips.cc/paper/2020/file/
1457c0d6bfcb4967418bfb8ac142f64a-Paper.
pdf.
Cai, T. T. and Wang, L. Orthogonal matching pursuit for
sparse signal recovery with noise. IEEE Transactions
on Information Theory, 57(7):4680–4688, 2011. doi:
10.1109/TIT.2011.2146090.
Candes, E. and Tao, T. Decoding by linear programming.
IEEE Transactions on Information Theory, 51(12):4203–
4215, 2005. doi: 10.1109/TIT.2005.858979.
Candes, E., Romberg, J., and Tao, T. Robust uncertainty
principles: exact signal reconstruction from highly in-
IEEE Transactions
complete frequency information.
on Information Theory, 52(2):489–509, 2006.
doi:
10.1109/TIT.2005.862083.
Arora, S., Ge, R., Ma, T., and Moitra, A. Simple, effi-
cient, and neural algorithms for sparse coding. CoRR,
abs/1503.00778, 2015. URL http://arxiv.org/
abs/1503.00778.
Candes, E. J. and Tao, T. Near-optimal signal recovery from
random projections: Universal encoding strategies? IEEE
Transactions on Information Theory, 52(12):5406–5425,
2006. doi: 10.1109/TIT.2006.885507.
Bach, F., Mairal, J., and Ponce, J. Convex sparse matrix
factorizations, 2008. URL https://arxiv.org/
abs/0812.1869.
Candes, E. J. and Wakin, M. B. An introduction to compres-
sive sampling. IEEE Signal Processing Magazine, 25(2):
21–30, 2008. doi: 10.1109/MSP.2007.914731.
9
On the Benefits of Masking for Sparse Coding
Cao, S., Xu, P., and Clifton, D. A. How to understand
masked autoencoders. arXiv preprint arXiv:2202.03670,
2022.
Chen, S. and Donoho, D. Basis pursuit. In Proceedings of
1994 28th Asilomar Conference on Signals, Systems and
Computers, volume 1, pp. 41–44. IEEE, 1994.
Daubechies, I., Defrise, M., and De Mol, C. An iterative
thresholding algorithm for linear inverse problems with
a sparsity constraint. URL https://arxiv.org/
abs/math/0307152.
Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. BERT:
Pre-training of deep bidirectional transformers for lan-
guage understanding. In Proceedings of the 2019 Confer-
ence of the North American Chapter of the Association for
Computational Linguistics: Human Language Technolo-
gies, Volume 1 (Long and Short Papers), pp. 4171–4186,
Minneapolis, Minnesota, June 2019. Association for
Computational Linguistics. doi: 10.18653/v1/N19-1423.
URL https://aclanthology.org/N19-1423.
Donoho, D. Compressed sensing. IEEE Transactions on
Information Theory, 52(4):1289–1306, 2006. doi: 10.
1109/TIT.2006.871582.
Donoho, D., Elad, M., and Temlyakov, V. Stable recovery
of sparse overcomplete representations in the presence of
noise. IEEE Transactions on Information Theory, 52(1):
6–18, 2006. doi: 10.1109/TIT.2005.860430.
Donoho, D. L., Maleki, A.,
and Montanari, A.
Message-passing algorithms for compressed sensing.
the National Academy of Sciences,
Proceedings of
10.1073/pnas.
doi:
106(45):18914–18919, 2009.
0909892106. URL https://www.pnas.org/doi/
abs/10.1073/pnas.0909892106.
Duarte, M. F. and Eldar, Y. C.
Structured com-
pressed sensing: From theory to applications. CoRR,
abs/1106.6224, 2011. URL http://arxiv.org/
abs/1106.6224.
Efron, B., Hastie, T.,
and Tibshi-
Johnstone,
The Annals of
rani, R.
Least angle regression.
Statistics, 32(2):407 – 499, 2004.
doi: 10.1214/
009053604000000067. URL https://doi.org/10.
1214/009053604000000067.
I.,
Engan, K., Aase, S., and Hakon Husoy, J. Method of optimal
directions for frame design. In 1999 IEEE International
Conference on Acoustics, Speech, and Signal Processing.
Proceedings. ICASSP99 (Cat. No.99CH36258), volume 5,
pp. 2443–2446 vol.5, 1999. doi: 10.1109/ICASSP.1999.
760624.
10
Geng, Q., Wang, H., and Wright, J. On the local correct-
ness of lˆ1 minimization for dictionary learning. CoRR,
abs/1101.5672, 2011. URL http://arxiv.org/
abs/1101.5672.
Gribonval, R. and Schnass, K. Dictionary identifica-
tion-sparse matrix-factorization via l1 -minimization.
IEEE Transactions on Information Theory, 56(7):3523–
3539, 2010. doi: 10.1109/TIT.2010.2048466.
Gribonval, R., Jenatton, R., and Bach, F. R. Sparse and
spurious: dictionary learning with noise and outliers.
CoRR, abs/1407.5155, 2014. URL http://arxiv.
org/abs/1407.5155.
He, K., Chen, X., Xie, S., Li, Y., Doll ́ar, P., and Girshick, R.
Masked autoencoders are scalable vision learners. In Pro-
ceedings of the IEEE/CVF Conference on Computer Vi-
sion and Pattern Recognition (CVPR), pp. 16000–16009,
June 2022.
Kingma, D. P. and Ba, J. Adam: A method for stochastic op-
timization, 2014. URL https://arxiv.org/abs/
1412.6980.
Krause, A. and Cevher, V. Submodular dictionary selection
In Proceedings of the 27th
for sparse representation.
International Conference on International Conference on
Machine Learning, ICML'10, pp. 567–574, Madison, WI,
USA, 2010. Omnipress. ISBN 9781605589077.
Lee, J. D., Lei, Q., Saunshi, N., and Zhuo, J. Predicting
what you already know helps: Provable self-supervised
learning. Advances in Neural Information Processing
Systems, 34:309–323, 2021.
Mairal, J., Bach, F., Ponce, J., and Sapiro, G. Online learn-
ing for matrix factorization and sparse coding. J. Mach.
Learn. Res., 11:19–60, mar 2010. ISSN 1532-4435.
Maleki, A. and Donoho, D. L. Optimally tuned iterative
reconstruction algorithms for compressed sensing. IEEE
Journal of Selected Topics in Signal Processing, 4(2):
330–341, 2010. doi: 10.1109/JSTSP.2009.2039176.
Mallat, S. and Zhang, Z. Matching pursuits with time-
IEEE Transactions on Signal
frequency dictionaries.
Processing, 41(12):3397–3415, 1993. doi: 10.1109/78.
258082.
Musa, O., Jung, P., and Goertz, N. Generalized approximate
message passing for unlimited sampling of sparse sig-
nals, 2018. URL https://arxiv.org/abs/1807.
03182.
Natarajan, B. K. Sparse approximate solutions to linear
systems. SIAM Journal on Computing, 24(2):227–234,
1995. doi: 10.1137/S0097539792240406.
On the Benefits of Masking for Sparse Coding
Olshausen, B. A. and Field, D. J. Sparse coding with an over-
complete basis set: A strategy employed by v1? Vision
Research, 37(23):3311–3325, 1997. ISSN 0042-6989.
doi: https://doi.org/10.1016/S0042-6989(97)00169-7.
https://www.sciencedirect.com/
URL
science/article/pii/S0042698997001697.
Olshausen, B. A. and Field, D. J. Sparse coding of sensory
inputs. Current opinion in neurobiology, 14(4):481–487,
2004.
Pan, J., Zhou, P., and Yan, S. Towards understanding why
mask-reconstruction pretraining helps in downstream
tasks. arXiv preprint arXiv:2206.03826, 2022.
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J.,
Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga,
L., Desmaison, A., K ̈opf, A., Yang, E. Z., DeVito, Z.,
Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B.,
Fang, L., Bai, J., and Chintala, S. Pytorch: An imperative
style, high-performance deep learning library. CoRR,
abs/1912.01703, 2019. URL http://arxiv.org/
abs/1912.01703.
Rubinstein, R., Zibulevsky, M., and Elad, M. Efficient imple-
mentation of the k-svd algorithm using batch orthogonal
matching pursuit. 2008.
Rudelson, M. and Vershynin, R. The smallest singu-
lar value of a random rectangular matrix. 2008. doi:
10.48550/ARXIV.0802.3956. URL https://arxiv.
org/abs/0802.3956.
Sulam, J., You, C., and Zhu, Z. Recovery and gener-
alization in over-realized dictionary learning. CoRR,
abs/2006.06179, 2020. URL https://arxiv.org/
abs/2006.06179.
Journal of
Tibshirani, R. Regression shrinkage and selection via
the Royal Statistical Soci-
the lasso.
ety. Series B (Methodological), 58(1):267–288, 1996.
ISSN 00359246. URL http://www.jstor.org/
stable/2346178.
Tibshirani, R. and Wang, P. Spatial smoothing and hot spot
detection for cgh data using the fused lasso. Biostatistics,
9(1):18–29, 2008.
Tosh, C., Krishnamurthy, A., and Hsu, D. Contrastive learn-
ing, multi-view redundancy, and linear models. In Algo-
rithmic Learning Theory, pp. 1179–1206. PMLR, 2021.
Tropp, J. Just relax: convex programming methods for
identifying sparse signals in noise. IEEE Transactions
on Information Theory, 52(3):1030–1051, 2006. doi:
10.1109/TIT.2005.864420.
11
Tropp, J. A. and Gilbert, A. C. Signal recovery from random
measurements via orthogonal matching pursuit. IEEE
Transactions on Information Theory, 53(12):4655–4666,
2007. doi: 10.1109/TIT.2007.909108.
Tsai, Y.-H. H., Wu, Y., Salakhutdinov, R., and Morency, L.-
P. Self-supervised learning from a multi-view perspective.
arXiv preprint arXiv:2006.05576, 2020.
Vershynin, R. High-dimensional probability. 2019. URL
https://www.math.uci.edu/ ̃rvershyn/
papers/HDP-book/HDP-book.pdf.
Ward, R. Compressed sensing with cross validation. IEEE
Transactions on Information Theory, 55(12):5773–5782,
2009. doi: 10.1109/TIT.2009.2032712.
Wei, C., Xie, S. M., and Ma, T. Why do pretrained language
models help in downstream tasks? an analysis of head
and prompt tuning. Advances in Neural Information
Processing Systems, 34:16158–16170, 2021.
Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov,
R. R., and Le, Q. V. Xlnet: Generalized autoregressive
pretraining for language understanding.
In Wallach,
H., Larochelle, H., Beygelzimer, A., d'Alch ́e-Buc, F.,
Fox, E., and Garnett, R. (eds.), Advances in Neural
Information Processing Systems, volume 32. Curran As-
sociates, Inc., 2019. URL https://proceedings.
neurips.cc/paper/2019/file/
dc6a7e655d7e5840e66733e9ee67cc69-Paper.
pdf.
Yin, W., Osher, S., Goldfarb, D., and Darbon, J. Bregman
iterative algorithms for l1-minimization with applications
to compressed sensing. SIAM Journal on Imaging Sci-
ences, 1(1):143–168, 2008. doi: 10.1137/070703983.
Zhang, R., Shen, J., Wei, F., Li, X., and Sangaiah, A. K.
Medical image classification based on multi-scale non-
negative sparse coding. Artificial intelligence in medicine,
83:44–51, 2017.
Zhou, M., Chen, H., Ren, L., Sapiro, G., Carin, L.,
and Paisley, J. Non-parametric bayesian dictionary
In Bengio,
learning for sparse image representations.
Y., Schuurmans, D., Lafferty, J., Williams, C., and
Culotta, A. (eds.), Advances in Neural Information Pro-
cessing Systems, volume 22. Curran Associates,
URL https://proceedings.
Inc.,
neurips.cc/paper/2009/file/
cfecdb276f634854f3ef915e2e980c31-Paper.
pdf.
2009.
On the Benefits of Masking for Sparse Coding
A. Full Proofs
A.1. Proof of Theorem 3.2
We first recall the setting of Theorem 3.2.
Assumption 3.1. Let A ∈ Rd×p be an arbitrary matrix with unit-norm columns satisfying (2k, δ)-RIP for k = o
and δ = o(1), and suppose σ2
min(A) = Ω(p/d). We assume each measurement y is generated as y ∼ Az + ε, where z is a
random vector drawn from an arbitrary probability measure Pz on k-sparse vectors in Rp, and ε ∼ N (0, σ2Id) for some
σ > 0.
(cid:17)
(cid:16) d
log p
And now we prove:
Theorem 3.2. [Overfitting to Reconstruction Loss] Consider the data-generating model in Assumption 3.1 and define Λ(z)
to be:
Λ(z) = inf{t | Pz(∥z∥ ≥ t) ≤ 1/d}.
(3.2)
Then for q = Ω(p2 max(dσ2, Λ(z)2)/σ2), there exists a B ∈ Rd×q such that L(B, k) ≤ L(A, k) − Ω(kσ2) and
dR(A, B) = Ω(σ2).
Proof. Our proof technique will be to first lower bound the gap L(A, k) − L(A, 2k), and then to construct a B matrix that
closely approximates the 2k-sparse combinations of the columns of A.
From the definition of L(B, k) we have that:
L(A, k) − L(A, 2k) = Ey
(cid:20)
min
∥ˆz∥0=k
∥y − Aˆz∥2
(cid:21)
− Ey
(cid:20)
min
∥ˆz∥0=2k
(cid:21)
∥y − Aˆz∥2
Now let ˆz∗(y) = argmin∥ˆz∥0=k ∥y − Aˆz∥ and S∗ = supp(ˆz∗), and further define:
̃z(y) = argmin
∥ˆz∥0=k
∥(y − Aˆz∗(y)) − Aˆz∥
(A.1)
(A.2)
We will also use ̃S = supp( ̃z(y)). For convenience, we will write ˆz∗ and ̃z when y is clear from context. Applying this
notation to Equation (A.1) gives:
L(A, k) − L(A, 2k) ≥ Ey[∥y − Aˆz∗∥2] − Ey[∥y − Aˆz∗ − A ̃z∥2]
= Ey[2 ⟨y − Aˆz∗, A ̃z⟩] − Ey[∥A ̃z∥2]
= Ey[∥A ̃z∥2]
(A.3)
Where we obtained the last line above by using the fact that A ̃z is the orthogonal projection of y − Aˆz∗ on to the span of
A ̃S. Now using the fact that A is (2k, δ)-RIP we have that:
Ey[∥A ̃z∥2] ≥ (1 − δ)2Ey
≥ (1 − δ)2Ey
≥ (1 − δ)4Ey
= (1 − o(1))Ey
2(cid:21)
(cid:104)
(y − Aˆz∗)
∥ ̃z∥2(cid:105)
(cid:20)(cid:13)
(cid:13)
(cid:13)A+
(cid:13)
(cid:13)
(cid:13)
̃S
(cid:104)(cid:13)
2(cid:105)
̃S (y − Aˆz∗)(cid:13)
(cid:13)AT
(cid:13)
(cid:104)(cid:13)
̃S (y − Aˆz∗)(cid:13)
(cid:13)AT
(cid:13)
2(cid:105)
(A.4)
Where above we used the fact that A+
̃S
penultimate step. It remains to compute (or lower bound) the expectation in Equation (A.4). Towards this end, we let S
≥ 1/(1 + δ), which led to the
and RIP to obtain
A ̃S)−1AT
̃S
= (AT
̃S
(cid:13)
(cid:13)
(cid:13)(AT
̃S
A ̃S)−1(cid:13)
(cid:13)
(cid:13)op
12
On the Benefits of Masking for Sparse Coding
denote a (uniformly) random subset of size k from [p]. Then we have that (using Assumption 3.1):
̃S (y − Aˆz∗)(cid:13)
(cid:13)
(cid:104)(cid:13)
(cid:13)AT
≥ Ey
2(cid:105)(cid:105)
Ey
2(cid:105)
(cid:104)(cid:13)
(cid:13)AT
S (y − Aˆz∗)(cid:13)
(cid:13)
2(cid:105)
(cid:104)
ES
(cid:104)(cid:13)
(cid:13)AT (y − Aˆz∗)(cid:13)
(cid:13)
∥y − Aˆz∗∥2(cid:105)
(cid:104)
Ey
min(A)Ey
σ2
(cid:18) k
d
Ey
(cid:104)
∥y − Aˆz∗∥2(cid:105)(cid:19)
=
≥
k
p
k
p
= Ω
(A.5)
Now the expectation in Equation (A.5) can be lower bounded in the same vein as Equation (A.4) (i.e. relying on the RIP
property). Below we use S∗
2k to denote the optimal support for the minimization problem.
(cid:104)
∥y − Aˆz∗∥2(cid:105)
Ey
= Ez,ε
(cid:20)
min
∥ˆz∥0=k
∥ε − A(ˆz − z)∥2
(cid:21)
(cid:21)
∥ε − Aˆz∥2
(cid:20)
≥ Eε
(cid:104)
= Eε
min
∥ˆz∥0=2k
∥ε∥2(cid:105)
− 2Eε
(cid:104)(cid:68)
A+
S∗
2k
(cid:69)(cid:105)
ε, ε
+ Eε
≥ Eε
(cid:104)
∥ε∥2(cid:105)
− (1 + o(1))Eε
(cid:20)(cid:13)
(cid:13)AT
(cid:13)
S∗
2k
ε
(cid:20)
max
i∈[p]
≥ dσ2 − (1 + o(1))2kEε
≥ dσ2 − O (cid:0)kσ2 log p(cid:1)
= Ω(dσ2)
(AT
i ε)2
(cid:20)(cid:13)
(cid:13)A+
(cid:13)
2(cid:21)
S∗
2k
(cid:13)
(cid:13)
(cid:13)
(cid:21)
2(cid:21)
(cid:13)
(cid:13)
ε
(cid:13)
(A.6)
Where above we used Lemma A.2 since the random variables (AT
of freedom 1, and for the last line we use k = o
(cid:17)
(cid:16) d
log p
i ε)2 follows a scaled chi-square distribution with degree
. Now putting Equations (A.3)-(A.6) together, we obtain:
L(A, k) − L(A, 2k) ≥ Ω(kσ2)
(A.7)
Given the gap between L(A, k) and L(A, 2k) shown in Equation (A.7), our goal is now to construct a matrix B such that
we can approximate sufficiently large 2k-sparse combinations of the columns of A via B ˆz (where ˆz is k-sparse). We recall
from standard concentration of measure arguments (see Vershynin (2019) for details) that P(∥ε∥2 ≥ 2dσ2) ≤ exp(−Ω(d)).
Furthermore, by Assumption 3.1, ∥Az∥ ≤ Λ(z)(1 + o(1)) with probability at least 1 − 1/d. Thus, we only need the columns
d, Λ(z))
of B to approximate Ax for 2-sparse x (since we are interested in B ˆz and ˆz is k-sparse) and ∥Ax∥ ≤ γ1 max(σ
for an appropriately large constant γ1 (as this will imply we get the same gap as Equation A.6).
√
To do this, we can construct ε-nets for each of the following sets (indexed by the different possible 2-sparse supports
S ⊂ [p]):
VS = {Ax | supp(x) = S, ∥Ax∥ ≤ γ1 max(σ
√
d, Λ(z))}
(A.8)
Since A has p columns, we need Θ(p2) such ε-nets. As long as we choose ε = γ2σ2 with γ2 a constant, we can approximate
2k-sparse combinations of the columns of A with error kγ2σ2 using k-sparse combinations from these nets, which is
sufficient for our purposes given the result of Equation (A.7).
Now let the columns of B be the union of the ε-nets for the sets VS and define E = {∥Az∥ + ∥ε∥ ≤ γ1 max(σ
After choosing γ2 to be sufficiently small, we then get from Equations (A.3)-(A.7) and the fact that P (E) ≥ 1 − 1/d:
(cid:104)
(cid:105)
d, Λ(z))}.
L(A, k) − L(B, k) ≥ Ey
∥A ̃z∥2 (cid:12)
(cid:12) E
P (E) − kγ2σ2
√
= Ω(kσ2)
13
(A.9)
On the Benefits of Masking for Sparse Coding
Noting that the ε-nets for each VS are of size O(max(dσ2, Λ(z)2)/σ2) from our choice of ε (once again, refer to Vershynin
(2019) for bounds on the size of ε-nets), this construction of B requires O(p2 max(dσ2, Λ(z)2)/σ2) columns. As we can
choose these columns to be different from those of A by γ2σ2 (in norm), we obtain the desired result.
A.2. Proof of Theorem 3.6
Again, we first recall the setting of Theorem 3.6.
Assumption 3.5. Let A ∈ Rd×p be an arbitrary matrix such that there exists an M ⊂ [d] with PM A being μ-incoherent
with μ ≤ C/(2k − 1) for a universal constant C < 1. We assume each measurement y is generated as y ∼ Az + ε, where
[z]supp(z) ∼ N (0, σ2
z Ik) with supp(z) drawn from an arbitrary probability distribution over all size-k subsets of [d], and
ε ∼ N (0, σ2Id) for some σ > 0.
In order to prove Theorem 3.6, we will need a result from Cai & Wang (2011), which we restate below.
Theorem A.1 (Theorem 9 in Cai & Wang (2011)). For y ∼ Az + ε with ε ∼ N (0, σ2I) and A ∈ Rd×p being μ-incoherent
with μ < 1/(2k − 1), let us define:
(cid:40)
S =
Ai : i ∈ [p], |zi| ≥
2σ
√
k(cid:112)2(1 + η) log p
1 − (2k − 1)μ
(cid:41)
Then OMP (as defined in Algorithm) selects a column from S at each step with probability at least 1 −
(A.10)
√
1
2 log p
pη
for η ≥ 0.
Now we may prove:
Theorem 3.6. [Benefits of Masking] Consider the data-generating model in Assumption 3.5. For any non-empty mask
M ⊂ [d] such that PM A satisfies the μ-incoherence condition in the assumption, we have
(cid:16)
lim
σz→∞
Lmask(A, k, M ) − min
B
Lmask(B, k, M )
(cid:17)
= 0
(3.5)
That is, as the expected norm of the signal Az increases, there exist minimizers B of Lmask such that dR(A, B) → 0.
Proof. We have from the definition of Lmask that:
Lmask(B, k, M ) = Ez,ε
= Ez,ε
= Ez,ε
= Ez,ε
(cid:104)(cid:13)
(cid:13)[Az][d]\M + [ε][d]\M − [B ˆz][d]\M
(cid:104)(cid:13)
(cid:13)[Az][d]\M − [B ˆz][d]\M
(cid:104)(cid:13)
(cid:13)
(cid:13)[Az][d]\M − [B ˆz][d]\M
(cid:13)
(cid:104)(cid:13)
(cid:13)P[d]\M Az − P[d]\M B ˆz(cid:13)
(cid:13)
+ Eε
2(cid:105)
2(cid:105)
2(cid:105)
(cid:13)
(cid:13)
+ (d − |M |)σ2
+ (d − |M |)σ2
2(cid:105)
(cid:13)
(cid:13)
(cid:104)(cid:13)
(cid:13)[ε][d]\M
2(cid:105)
(cid:13)
(cid:13)
− Ez,ε
(cid:2)(cid:10)[B ˆz][d]\M , [ε][d]\M
(cid:11)(cid:3)
(A.11)
Since [B ˆz][d]\M is necessarily independent1 of [ε]d\M (by the construction of ˆz). Now the quantity in Equation A.11
depending on B looks almost identical to the prediction risk considered in linear regression.
With this in mind, let us define:
RM (ˆy) = Ez,ε
(cid:104)(cid:13)
(cid:13)P[d]\M Az − ˆy(cid:13)
(cid:13)
2(cid:105)
(A.12)
Where ˆy is any estimator that depends only on [y]M (i.e. in the interest of brevity we are omitting writing ˆy([Az + ε]M )).
We can lower bound Equation (A.11) by analyzing RM (ˆy):
inf
ˆy
RM = inf
ˆy
Ez,ε
= inf
ˆy
Ez,ε
2(cid:105)
(cid:104)(cid:13)
(cid:13)P[d]\M Az − ˆy(cid:13)
(cid:13)
(cid:20)
Ez,ε
(cid:20)
(cid:13)P[d]\M Asupp(z)[z]supp(z) − ˆy(cid:13)
(cid:13)
2
(cid:13)
(cid:21)(cid:21)
supp(z)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(A.13)
1There is actually a slight technicality here; we need gOMP to be Borel measurable, which is the case because it consists of the
composition of Borel measurable functions.
14
On the Benefits of Masking for Sparse Coding
Equation (A.13) can be lower bounded by considering the infimum over the inner expectation with respect to estimators ˆy
that have access to [Az + ε]M and the support S∗ = supp(z). In this case, the Bayes estimator ˆy∗ is:
ˆy∗ = Ez,ε
(cid:20)
P[d]\M AS∗ [z]S∗
= P[d]\M AS∗ Ez,ε
(cid:20)
[z]S∗
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
PM AS∗ [z]S∗ + [ε]M
(cid:21)
(cid:21)
PM AS∗ [z]S∗ + [ε]M
(A.14)
Since [z]S∗ ∼ N (0, σ2
ridge regression estimator:
z Ik), we can explicitly compute the conditional expectation in Equation (A.14). Indeed, it is just the
ˆy∗ = P[d]\M AS∗
(cid:18)
ΛT
S∗ ΛS∗ +
(cid:19)−1
1
σ2
z
Ik
ΛT
S∗ (PM AS∗ [z]S∗ + [ε]M )
(A.15)
Where we have set ΛS∗ = PM AS∗ above to keep notation manageable. Thus, putting all of the above together we have:
Lmask(B, k, M ) ≥ RM (ˆy∗) + (d − |M |)σ2
Now let ˆyLS be the least squares estimator with access to the support supp(z):
ˆyLS = P[d]\M AS∗ Λ+
S∗ (PM AS∗ [z]S∗ + [ε]M )
(A.16)
(A.17)
Then we have RM (ˆyLS) → RM (ˆy∗) as σ2
be done by Equation (A.16).
z → ∞. If we can now show that RM (P[d]\M Aˆz) → RM (ˆyLS), then we will
Showing this essentially boils down to controlling the error of ˆz when OMP fails to recover the true support S∗ (because
when it recovers the true support, P[d]\M Aˆz is exactly ˆyLS). We do this by appealing to Theorem A.1.
Recall that [ˆz]S = Λ+
be the vector whose non-zero components correspond to [ˆzLS]S∗ = Λ+
σz → ∞, since then we will be done due to the fact that (cid:13)
S [y]M , where ΛS = PM AS with S = supp(ˆz) being the support predicted by OMP. Letting ˆzLS
S∗ [y]M , it will suffice to show ∥ˆzLS − ˆz∥2 → 0 as
(cid:13)op is constant with respect to σz.
(cid:13)P[d]\M A(cid:13)
Now letting ̃z = ˆz − Λ+
S [ε]M (i.e. ̃z represents the part of the signal z recovered by OMP), we have:
∥ˆzLS − ˆz∥2 = (cid:13)
(cid:13)z − ̃z + (Λ+
≤ ∥z − ̃z∥2 + (cid:13)
S∗ − Λ+
(cid:13)(Λ+
S )[ε]M
(cid:13)
2
(cid:13)
S∗ − Λ+
S )[ε]M
(cid:13)
2
(cid:13)
+ 2∥z − ̃z∥(cid:13)
(cid:13)(Λ+
S∗ − Λ+
S )[ε]M
(cid:13)
(cid:13)
(A.18)
We begin by first analyzing ∥z − ̃z∥2. To do so, we introduce the notation [z]U,0 to represent the vector in Rk whose
non-zero entries correspond to [z]U for U ⊂ [d], |U | ≤ k. Then we can make use of the following decomposition of
ΛS∗ [z]S∗ :
ΛS∗ [z]S∗ = ΛS[z]S∗∩S,0 + ΛS∗ [z]S∗\S,0
(A.19)
From Equation (A.19) we get:
∥z − ̃z∥2 = (cid:13)
≤ (cid:13)
(cid:13)
2
(cid:13)[z]S∗\S,0 − Λ+
S ΛS∗ [z]S∗\S,0
(cid:13)
+ (cid:13)
S ΛS)−1ΛT
(cid:13)(ΛT
(cid:13)[z]S∗\S,0
(cid:13)
2
(cid:13)
S ΛS∗ [z]S∗\S,0
(cid:88)
=
O(z2
i )
i∈S∗\S
(cid:13)
2
(cid:13)
+ 2 max
(cid:16)(cid:13)
(cid:13)[z]S∗\S,0
(cid:13)
2
(cid:13)
, (cid:13)
(cid:13)Λ+
S ΛS∗ [z]S∗\S,0
2(cid:17)
(cid:13)
(cid:13)
(A.20)
where we passed from the penultimate to the last line by using the μ-incoherence of PM A to control the middle term in the
bound. With Equation (A.20) in hand, we are finally in a position to apply Theorem A.1. Let η = C ′ log σz for a sufficiently
large constant C ′. Now for convenience we define:
2σ
γ =
√
k(cid:112)2(1 + η) log p
1 − (2k − 1)μ
15
(A.21)
which corresponds to the lower bound in Equation (A.10). Using Theorem A.1 with Equation (A.20) we obtain:
On the Benefits of Masking for Sparse Coding
Ez,ε
(cid:104)
∥z − ̃z∥2(cid:105)
≤
=
(cid:88)
i∈S∗
(cid:88)
i∈S∗
P({|zi| ≥ γ} ∩ {i /∈ S})O(E[z2
i ]) + P(|zi| < γ)O(γ2)
(cid:18)
O
σ2
z
√
log p
+
(cid:19)
γ3
σz
σC′
z
(A.22)
And clearly Equation (A.22) goes to 0 as σz → ∞. We can apply similar analysis techniques to the term
(cid:13)
(cid:13)(Λ+
in Equation (A.18) as well, but for this term we can afford to be less precise.
Namely, when S = S∗, this term is 0. The probability that S ̸= S∗ can be bounded as:
S∗ − Λ+
S )[ε]M
(cid:13)
2
(cid:13)
P(S ̸= S∗) ≤ O
= O
(cid:19)
P(min
i∈S∗
(cid:19)
|zi| ≥ γ)
(cid:18)
(cid:18)
σC′
z
k
√
log p
kγk
√
σC′+k
z
log p
(A.23)
where again above we used the naive bound for P(mini∈S∗ |zi| ≥ γ) (i.e. replacing the density with 1 and integrating from
±γ). Now we have:
Ez,ε
(cid:104)(cid:13)
(cid:13)(Λ+
S∗ − Λ+
S )[ε]M
2(cid:105)
(cid:13)
(cid:13)
(cid:104)(cid:13)
(cid:13)Λ+
S∗ [ε]M
(cid:104)
(cid:13)
2
(cid:13)
+ (cid:13)
(cid:13)Λ+
i ε)2(cid:105)(cid:19)
(AT
S [ε]M
≤ P(S ̸= S∗)Ez,ε
(cid:18)
≤ P(S ̸= S∗)O
max
i∈[p]
≤ P(S ̸= S∗)O(kσ2 log p)
kEε
(cid:13)
2
(cid:13)
+ 2 max
(cid:16)(cid:13)
(cid:13)Λ+
S∗ [ε]M
(cid:13)
2
(cid:13)
, (cid:13)
(cid:13)Λ+
S [ε]M
2(cid:17)(cid:105)
(cid:13)
(cid:13)
(A.24)
Putting together Equations (A.22) and (A.24) shows that Equation (A.18) goes to 0 as σz → ∞, which proves the result.
A.3. Auxiliary Lemmas
Lemma A.2. Let X1, * * * , Xn be n chi-square random variables with 1 degree of freedom, then
E
(cid:20)
(cid:21)
max
i∈[n]
Xi
= O(log n).
Proof. We bound the maximum via the moment-generating function.
From Jensen's inequality, for t ∈ (0, 1
2 ), we have
(cid:18)
tE
exp
(cid:20)
(cid:21)(cid:19)
max
i∈[n]
Xi
≤ E
(cid:20)
(cid:18)
exp
t max
i∈[n]
Xi
(cid:19)(cid:21)
≤
n
(cid:88)
i=1
E (cid:2)etXi(cid:3) = n(1 − 2t)− 1
2 .
Setting t = 1
3 gives us
E
(cid:20)
(cid:21)
max
i∈[n]
Xi
≤ 3 log n −
3
2
log
1
3
= O(log n).
16
|
|
http://arxiv.org/abs/2302.12695v2 | 2023-02-27T10:58:12 | 2023-02-24T15:48:23 | Cross-Lingual Transfer of Cognitive Processing Complexity | When humans read a text, their eye movements are influenced by the structural
complexity of the input sentences. This cognitive phenomenon holds across
languages and recent studies indicate that multilingual language models utilize
structural similarities between languages to facilitate cross-lingual transfer.
We use sentence-level eye-tracking patterns as a cognitive indicator for
structural complexity and show that the multilingual model XLM-RoBERTa can
successfully predict varied patterns for 13 typologically diverse languages,
despite being fine-tuned only on English data. We quantify the sensitivity of
the model to structural complexity and distinguish a range of complexity
characteristics. Our results indicate that the model develops a meaningful bias
towards sentence length but also integrates cross-lingual differences. We
conduct a control experiment with randomized word order and find that the model
seems to additionally capture more complex structural information. | [
"Charlotte Pouw",
"Nora Hollenstein",
"Lisa Beinborn"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12695v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12695v2",
"@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",
"I.2.7"
] | Cross-Lingual Transfer of Cognitive Processing Complexity
Charlotte Pouw
ILLC, University of Amsterdam∗
[email protected]
Nora Hollenstein
University of Copenhagen
[email protected]
Lisa Beinborn
Vrije Universiteit Amsterdam
[email protected]
Abstract
When humans read a text,
their eye move-
ments are influenced by the structural com-
plexity of the input sentences. This cogni-
tive phenomenon holds across languages and
recent studies indicate that multilingual lan-
guage models utilize structural similarities
between languages to facilitate cross-lingual
transfer. We use sentence-level eye-tracking
patterns as a cognitive indicator for structural
complexity and show that
the multilingual
model XLM-RoBERTa can successfully pre-
dict varied patterns for 13 typologically di-
verse languages, despite being fine-tuned only
on English data. We quantify the sensitivity
of the model to structural complexity and dis-
tinguish a range of complexity characteristics.
Our results indicate that the model develops a
meaningful bias towards sentence length but
also integrates cross-lingual differences. We
conduct a control experiment with randomized
word order and find that the model seems to
additionally capture more complex structural
information.
1
Introduction
Approximately 7,000 languages are currently spo-
ken in the world, exhibiting differences at almost
every level of linguistic organization (Eberhard
et al., 2022). Nonetheless, psycholinguistic the-
ories are predominantly supported by evidence
from a handful of Indo-European languages (Nor-
cliffe et al., 2015). Only recently, researchers have
started to explore cross-linguistic differences in
the neural implementation of language, uncover-
ing both striking similarities across languages and
empirical differences that cannot be explained by a
unitary account (Malik-Moraleda et al., 2022).
In natural language processing, multilingual lan-
guage models are optimized for tasks such as ma-
chine translation or cross-lingual information re-
∗This research was developed when the first author was
affiliated to Vrije Universiteit Amsterdam.
trieval (Conneau et al., 2020) and follow a linguis-
tically naïve training regime. They are trained on
dozens of languages simultaneously and do not
account for typological differences between lan-
guages. Nevertheless, their cross-lingual transfer
performance sets new records, even in zero-shot
settings (Pires et al., 2019). The ability to transfer
knowledge across languages has been attributed
to the shared vocabulary that is used for all lan-
guages (Wu and Dredze, 2019) because it enables
the reuse of common morphological roots for lan-
guages from the same family. However, recent
studies indicate that vocabulary sharing is not a pre-
requisite for cross-lingual transfer (Artetxe et al.,
2020) and that structural commonalities between
languages play a more prevalent role in models
(Karthikeyan et al., 2020).
Human sentence processing is sensitive to struc-
tural complexity. Eye movement data recorded
during reading provide insights into cognitive pro-
cessing patterns with a temporal accuracy of mil-
liseconds (Winke, 2013). Structural processing
difficulty materializes as regressions towards the
complex region and an increase of fixations on that
region (Clifton and Staub, 2011). For example,
sentences with an object-relative structure trigger
more regressions than sentences with more com-
mon subject-relative clauses (Gordon et al., 2006).
A classical example of structural complexity are
garden-path sentences which initially trigger a sim-
plified interpretation that must be revised when
reading the rest of the sentence (Bever, 1970).
On the surface level, eye movement patterns are
language-specific since they are influenced by vi-
sual factors such as orthography and word length
(Kliegl et al., 2004). For example, the Chinese
script is much more visually dense than the al-
phabetic script, resulting in longer fixations and
saccades that move to positions relatively close to
the current word (Liversedge et al., 2016). On a
deeper processing level, reading patterns seem to
3
2
0
2
b
e
F
7
2
]
L
C
.
s
c
[
2
v
5
9
6
2
1
.
2
0
3
2
:
v
i
X
r
a
converge across languages. Predictability effects
have been demonstrated in multiple languages (Al-
Jassmi et al., 2022; Laurinavichyute et al., 2019)
and sentences that are matched for content are read
at a similar speed in Chinese, English, and Finnish
(Liversedge et al., 2016).
Sarti et al. (2021) find that the representations of
an English pre-trained transformer-based language
model encode structural complexity more promi-
nently when they are fine-tuned to predict English
eye-tracking patterns. Interestingly, Rama et al.
(2020) claim that structural similarity between lan-
guages is only weakly represented in multilingual
models. Nevertheless, Hollenstein et al. (2021)
show that multilingual models are able to predict
eye movement patterns of reading even for lan-
guages that are not seen during fine-tuning, which
indicates a general learnability of the relationship
between structural complexity and eye movement
patterns. Their results are restricted to four lan-
guages (three of them are from the Germanic fam-
ily), and it remains unclear which structural cues
are leveraged for the cross-lingual prediction be-
cause the test sentences are not aligned across lan-
guages.
Contributions We examine whether the multilin-
gual model XLM-RoBERTa (henceforth XLM-R)
is sensitive to the structural complexity patterns
that can be found in eye-tracking data. We use
data from the newly released Multilingual Eye-
tracking Corpus (Siegelman et al., 2022) to predict
eye movement patterns for parallel texts in 13 ty-
pologically diverse languages. This allows us to
specifically target the model's sensitivity towards
structural information and rules out the possibil-
ity that the results are influenced by differences in
semantics or dataset sizes.
We show that XLM-R can apply cross-lingual
transfer to predict eye-tracking patterns for all 13
languages while being fine-tuned only on English
eye-tracking data. Our results indicate that the
model develops a meaningful bias towards sentence
length, but also integrates cross-lingual differences.
For a more detailed analysis of structural sensitiv-
ity, we probe the model's final layer for complexity
features. Based on a control experiment with ran-
domized word order, we conclude that the model
seems to additionally capture more complex struc-
tural information.1
1https://github.com/CharlottePouw/
crosslingual-complexity-transfer
2 Related Work
We introduce recent findings on the role of struc-
tural information for cross-lingual transfer in multi-
lingual models and motivate the use of eye-tracking
data as a proxy for cognitive processing complex-
ity.
2.1 Cross-lingual Transfer in Multilingual
Models
Massive multilingual language models such as
mBERT (Devlin et al., 2019) and XLM-R (Con-
neau et al., 2020) are trained on more than a hun-
dred languages simultaneously. Wu and Dredze
(2019) show that this approach leads to surpris-
ingly strong performances in cross-lingual trans-
fer settings and attribute the improvements to the
shared subword vocabulary. Pires et al. (2019)
note that the model's ability to generalize "cannot
be attributed solely to vocabulary memorization".
Complementary, Artetxe et al. (2020) and Liu et al.
(2020) find that a shared vocabulary is not neces-
sary for cross-lingual transfer. Instead, the multi-
lingual model seems to exploit structural similarity
between the training and the target language to
facilitate transfer (Karthikeyan et al., 2020).
Structural similarity is loosely defined as an over-
lap on a subset of typological characteristics which
seem to be better reflected in multilingual language
models explicitly optimizing for cross-lingual trans-
fer (Beinborn and Choenni, 2020; Choenni and
Shutova, 2022). In language-agnostic models such
as mBERT and XLM-R, the multilingual represen-
tations of the input can be separated into language-
specific and language-neutral components (Tanti
et al., 2021; Libovický et al., 2020; Gonen et al.,
2020). While Rama et al. (2020) find that struc-
tural similarity between languages is only weakly
represented in these models, Bjerva et al. (2019) ob-
serve that structural similarity between languages
correlates most with representational similarity. Ex-
periments with artificial languages indicate that
multilingual models are sensitive to hierarchical
structure (De Varda and Zamparelli, 2022) and to
word order (Chai et al., 2022; Deshpande et al.,
2022). Ahmad et al. (2021) show that cross-lingual
transfer can be improved by explicitly encoding
structural information via an auxiliary syntactic
objective and Guarasci et al. (2022) find that struc-
tural complexity knowledge can even be transferred
across languages without explicit training.
2.2 Predicting Processing Complexity
Recent studies indicate that transformer-based lan-
guage models are sensitive to structural character-
istics of the input sentence when predicting eye-
tracking patterns. Hollenstein et al. (2021) find a
correlation between the Flesch reading ease score
and eye-tracking prediction accuracy of pre-trained
multilingual transformer models which disappears
after fine-tuning. Wiechmann et al. (2022) detect
similar correlations between the prediction accu-
racy of English transformer models and a wider
range of readability features. Finally, Hollenstein
et al. (2022b) find that eye-tracking metrics pre-
dicted by multilingual transformer models corre-
late in a similar way with readability features as
eye-tracking metrics recorded from human readers.
Sensitivity to structural complexity also seems
to increase when incorporating eye-tracking data
in NLP models. Learning eye movement behavior
as an auxiliary task has been shown to facilitate the
prediction of text complexity in English and Por-
tuguese (González-Garduño and Søgaard, 2017;
Evaldo Leal et al., 2020). Barrett et al. (2016)
show that English eye-tracking features improve
the performance a French part-of-speech tagger,
suggesting that information learned from monolin-
gual eye-tracking data is transferable across lan-
guages.
In this work, we explicitly test for sensitivity
to a range of structural characteristics in multi-
lingual models and analyze if structural sensitiv-
ity increases by learning to predict eye-tracking
patterns. We extend previous analyses to a much
wider range of languages from five different fam-
ilies (Indo-European, Koreanic, Semitic, Turkic,
and Uralic).
3 Methodology
We fine-tune a pre-trained multilingual transformer
model to predict eye-tracking metrics in a setting
of zero-shot cross-lingual transfer.
3.1 Data
We use the aligned multilingual eye-tracking cor-
pus MECO for testing. As the multilingual data
consists of only few samples, we use the larger
monolingual English eye-tracking dataset GECO
for training. Size statistics of both corpora can be
found in the appendix in Table 3.
allel eye-tracking data of reading in 13 different
languages (Siegelman et al., 2022).2 The reading
material consists of 12 short Wikipedia-style texts
about various topics, which participants read in
their native language. The texts were either directly
translated or carefully matched for topic, genre, and
readability. Each of the 12 texts was presented on
a single screen and in the same fixed order in all
languages. The number of participants ranged from
29 to 54 per language (45 on average).
Ghent Eye-tracking Corpus
(GECO) The
Ghent Eye-tracking Corpus contains eye-tracking
data from 14 monolingual English readers (Cop
et al., 2016). They were reading the entire novel
The Mysterious Affair at Styles by Agatha Christie
which was presented on the screen one paragraph
at a time.
3.2 Experimental Setup
We use multi-task learning for predicting four
sentence-level eye-tracking metrics.
Sentence-Level Eye-Tracking Metrics Liv-
ersedge et al. (2016) find that eye movement
patterns are more comparable across languages
at the sentence level than at the word level. We
select four sentence-level eye-tracking metrics that
cover both early and late language processing in
line with Sarti et al. (2021). For each sentence s,
we consider:
1. Fixation count: number of fixations on s
2. Total fixation duration: total duration of all
fixations on s
3. First-pass duration: duration of the first read-
ing pass over s
4. Regression duration: total duration of all re-
gressions within s.
Duration values are measured in milliseconds. To
obtain generalized eye movement patterns, we av-
erage all eye-tracking metrics over participants and
scale each eye-tracking feature to fall in the range
0–100, so that the loss can be calculated uniformly
for durations and counts (Hollenstein et al., 2021).
The distribution of the four metrics is shown in the
appendix in Figure 7.
Model We use XLM-R (Conneau et al., 2020)
as our multilingual transformer model since it
achieved the best zero-shot results in the CMCL
Multilingual Eye-tracking Corpus (MECO)
The Multilingual Eye-tracking Corpus contains par-
2Dutch, English, Estonian, Finnish, German, Greek, He-
brew, Italian, Korean, Norwegian, Russian, Spanish, Turkish.
Figure 1: Cross-lingual transfer results for predicting cognitive processing complexity (i.e. sentence-level fixation
duration). Prediction performance is evaluated with explained variance and R2 for each language in MECO. The
results are averaged over 5 folds; error bars denote the standard deviation over folds.
2022 Shared Task on Multilingual and Crosslingual
Prediction of Human Reading Behaviour (Srivas-
tava, 2022; Hollenstein et al., 2022a). The model
was pre-trained on 2.5TB CommonCrawl data con-
taining 100 languages using the Masked Language
Modelling objective and uses SentencePiece sub-
word tokenization (Kudo and Richardson, 2018).
We select the Huggingface checkpoint xlm-roberta-
base and add a linear dense layer to predict four
sentence-level eye-tracking metrics.
Multi-Task Learning We employ multi-task
learning with hard parameter sharing to fine-tune
the model on all eye-tracking metrics simultane-
ously in line with Sarti et al. (2021). This means
that all model parameters are shared except for the
task-specific regression heads in the final prediction
layer. More specifically, the same sentence repre-
sentation is fed into each of the four regression
heads which predict their respective eye-tracking
metric. The model parameters are optimized jointly
for all regression tasks by summing the individual
MSE losses in line with previous work (Hollenstein
et al., 2021, 2022a; Wiechmann et al., 2022).
Training Parameters We fine-tune XLM-R for
15 epochs with early stopping after 5 epochs with-
out an improvement in the validation accuracy. We
use 10% of the training data as validation data and
evaluate every 40 steps. We employ a batch size of
32 and a learning rate of 1e-5. The sentence repre-
sentation is obtained by mean pooling over token
representations. We train the model on the GECO
data using 5-fold cross-validation and report the
average over the folds for each language in MECO.
Evaluation We report explained variance and R-
Squared (R2) to capture the proportion of variance
in the dependent variable that can be explained by
our model in line with Sarti et al. (2021). Explained
variance uses the biased variance to determine what
fraction of the variance is explained. R2 uses the
raw sums of squares instead and provides comple-
mentary information about systematic offsets in the
predictions. We report both metrics and evaluate
the performance of the fine-tuned model individu-
ally for each of the four eye-tracking metrics.3
4 Cross-Lingual Transfer Results
Figure 1 shows the explained variance and R2
scores of the fine-tuned model for total fixation
duration across languages. In terms of explained
variance, we see that the model achieves a similar
performance across languages, i.e. it captures 60
to 80 percent of the variance in the original eye-
tracking signal for all languages. The R2 scores,
on the other hand, vary much more depending on
the language. Similar results were observed for
two of the other eye-tracking metrics, i.e. fixa-
tion count and first-pass duration, but the model is
worse at predicting regression duration (see Figure
8 in the appendix). To better control for spurious
correlations, we ran the experiment on permuted
input-output pairs, i.e., we paired input sentences
with eye-tracking values corresponding to another
random sentence and averaged the results over 5
folds. For this random baseline setup, both ex-
plained variance and R2 are always strictly nega-
tive for all languages.
To better understand the varied R2 scores for
3In previous work on token-level eye-tracking prediction,
the mean absolute error was reported instead but it is less
informative for sentence-level predictions because sentence-
level eye-tracking metrics are generally more centered around
the mean.
KoreanItalianEnglishGreekSpanishRussianHebrewDutchTurkishNorwegianGermanFinnishEstonian1.51.00.50.00.51.0scoreTotal fixation durationR-squaredExplained varianceFigure 2: The left plot shows the distribution of true and predicted values for total fixation duration for Estonian,
Turkish, English and Korean sentences in MECO. The right figure shows the distribution of values with respect to
sentence length.
different languages, we show the distribution of
the true and predicted values for total fixation du-
ration for two languages with high R2 (Estonian,
Turkish) and two languages with low R2 (English,
Korean) in Figure 2. We see that the low R2 for
English and Korean is caused by predictions that
are consistently too high. For Estonian and Turkish,
the difference between true and predicted values
is clearly smaller, resulting in a higher R2. Nev-
ertheless, the model is able to predict a significant
amount of the variance in the eye-tracking signal of
all languages, as expressed by the stable explained
variance scores across languages.
Interestingly, the model performs slightly bet-
ter for most zero-shot languages than for the fine-
tuning language English. Recall that this perfor-
mance difference cannot be attributed to cross-
lingual differences in semantics, since all sentences
are parallel with respect to content. On the right
side of Figure 2, we analyze the predictions with
respect to sentence length and find that both the
model predictions and the true values for fixa-
tion duration correlate with sentence length in all
languages. As sentence length is an indicator of
structural complexity, we further dissect this phe-
nomenon and conduct an analysis of a range of
structural characteristics in the following section.
5 Sensitivity to Structural Complexity
We explore four categories of sentence-level
complexity features: length, frequency, morpho-
syntactic, and syntactic. Word frequencies are ob-
tained as standardized Zipf frequencies using the
Python package wordfreq (Speer et al., 2018). The
package combines several frequency resources, in-
cluding SUBTLEX lists (e.g. Brysbaert and New
(2009)) and OpenSubtitles (Lison and Tiedemann,
2016). The morpho-syntactic and syntactic features
are computed using the Profiling-UD tool (Brunato
et al., 2020).
Cross-Lingual Differences We showcase an in-
dividual example sentence in Table 1 to compare
the predicted fixation duration for English, Finnish
and Turkish. We observe that the highest value
is predicted for the English version. This is most
likely caused by its length, as the sentence is less
complex than the Finnish and Turkish versions in
terms of all other linguistic features.
Interestingly, the model predicts that Finnish
readers will fixate on the sentence longer than Turk-
ish readers, even though both sentences have the
same length. The Turkish sentence contains longer,
less frequent words, and is lexically more dense,
but the Finnish sentence contains longer depen-
dency links. This indicates that the model is more
sensitive to dependency structure than to low-level
complexity (i.e. word length and frequency) when
predicting eye-tracking values for sentences of the
same length.
5.1 Sensitivity to Fine-Tuning Input
To analyze the model's sensitivity to the structural
complexity of the fine-tuning data, we compare
the performance of the fine-tuned model for in-
domain data (English GECO) and cross-domain
data (English MECO). Table 2 shows the explained
variance and R2 scores of the fine-tuned model
predictions for each eye-tracking metric for both
domains. We see that the model consistently yields
more accurate predictions for the in-domain data
EstonianTurkishEnglishKorean020406080100120milliseconds (scaled)TruePredicted0255075100125EstonianTruePredictedTurkish020400255075100125English02040Koreansentence lengthmilliseconds (scaled)Example
English
Finnish
Turkish
In ancient Roman religion and myth, Janus is the god of beginnings and gates.
Muinaisen roomalaisen mytologian mukaan Janus oli alkujen ja porttien jumala.
Antik Roma inanı ̧slarında ve mitlerinde, Janus ba ̧slangıçların ve kapıların tanrısıdır.
42.96
38.91
32.28
Prediction
Structural Complexity
English
Finnish
Turkish
Length
Frequency
Morpho-Syntactic
Syntactic
Sentence length (tokens)
Avg. word length (characters)
Avg. word frequency (Zipf)
# low frequency words
Lexical density
Parse tree depth
Avg. dependency link length
Max. dependency link length
# verbal heads
14
4.57
5.63
2
0.57
3
2.15
7
1
10
6.80
4.36
6
0.70
3
2.78
7
1
10
7.60
3.46
6
0.73
3
1.90
4
1
Table 1: Predicted values for total fixation duration for the same example sentence in English, Finnish, and Turkish
(top), and the respective values for the nine structural complexity features (bottom).
than for the cross-domain data.
MECO
EV
.78 (.02)
.75 (.02)
.50 (.03)
-.28 (.14)
R2
-.63 (.35)
-.65 (.24)
-.87 (.27)
-.96 (.45)
GECO
EV
.93 (.00)
.92 (.00)
.95 (.00)
.44 (.04)
R2
.93 (.01)
.92 (.01)
.95 (.01)
.45 (.05)
FC
TFD
FPD
RD
Table 2: Explained variance (EV) and R2-scores of the
fine-tuned model predictions for four eye-tracking met-
rics from the English parts of MECO and GECO: fixa-
tion count (FC), total fixation duration (TFD), first-pass
duration (FPD), and regression duration (RD). The re-
sults are averaged over 5 folds; standard deviations are
indicated in parentheses.
To better understand why the model does not
generalize well across domains for English, we vi-
sualize the Spearman correlation between complex-
ity features and eye-tracking metrics for English
GECO and MECO sentences in Figure 3. We see
that the predicted values for the MECO sentences
exhibit a similar correlation pattern with the com-
plexity features as the GECO sentences. The true
values of MECO are less consistent with this pat-
tern. Literary texts contain very different words
than encyclopedic texts, which might influence fix-
ation durations and trigger regressions that cannot
solely be explained by structural complexity. In ad-
dition, MECO is significantly smaller than GECO
(99 vs 4,041 English sentences) and contains data
from a higher number of participants (46 vs 14).
The smaller amount of sentences and the larger
amount of readers increase the effect of individ-
ual differences4 which might obscure correlations
between structural complexity and eye movement
patterns. Directly applying the learned correlations
from GECO to MECO might explain why the fine-
tuned model fails to generalize across domains.
The average sentence length is considerably
higher in GECO than in MECO (21 vs 13 words,
see Table 3). As the model predictions strongly
correlate with sentence length, we speculate that
the model overestimates eye-tracking values for
sentences that are longer than the majority of fine-
tuning sentences which would explain the higher
mean of the predictions in Figure 2.
Multi-Task Learning Effect Figure 3 further
shows that regression duration is only weakly cor-
related with the complexity metrics in contrast to
the other eye-tracking metrics. Nevertheless, the
correlations between the model predictions and the
complexity features are similar for all four metrics.
This indicates a drawback of multi-task learning:
since the loss is computed jointly over all tasks, ac-
curate predictions for three out of four tasks already
yield a small loss. The model seems to overfit to
first-pass duration, total fixation duration and fixa-
tion count, which can all be predicted from similar
complexity features, and does not learn the deviat-
4A higher number of participants leads to more diversity
across readers with respect to individual factors that could
influence reading strategies (e.g. age, education level). The
GECO data came from 14 English readers who were all under-
graduate students with an age range of 18-26. The MECO data
came from 29 to 54 readers per language (45 on average), who
had more diverse educational backgrounds and a wider age
range (18-45). Based on these statistics, we assume that the
increased heterogeneity of the MECO participants influences
the correlations observed in Figure 3.
Figure 3: Spearman correlations between complexity features and eye-tracking metrics of GECO and the English
part of MECO (predicted versus true). A darker color represents a stronger correlation. All GECO correlations are
significant (p < 0.001); MECO correlations above 0.2 are significant (p < 0.01).
ing patterns to predict regression duration. Further
research is needed to better understand the linguis-
tic features underlying regression duration.
5.2 Feature-Based Prediction
To further establish which complexity features are
good predictors for each individual eye-tracking
metric, we examine the extent to which the four
eye-tracking metrics can be predicted from explicit
features. Since multi-task learning seems to have a
negative impact on learning the structural features
underlying each individual eye-tracking metric, we
train a separate feature-based model for each eye-
tracking metric individually. We use support vector
machines (SVM) with a linear kernel as our feature-
based regression models. We employ the SVR
implementation from scikit-learn (Pedregosa et al.,
2011) with all default parameters and use different
subsets of features from Table 1: 1) only the two
length features, 2) only the two frequency features,
3) only the five structural (i.e., morpho-syntactic
and syntactic) features, and 4) all nine features.
As the SVM models predict a simpler problem (a
single eye-tracking metric), it is not surprising that
they outperform the fine-tuned multi-task model
with respect to the absolute predictions (as mea-
sured by R2, see appendix Figure 9). More inter-
estingly, Figure 4 shows that the multi-task model
is able to capture a similar amount of variance as
the length-based SVM. Furthermore, we see that
the length-based SVM performs almost identically
to the SVM trained on all complexity features, out-
performing the SVMs trained on frequency features
and structural features. This shows that length is
a strong predictor for sentence-level eye-tracking
metrics, and suggests that structural and frequency
features do not provide much additional informa-
tion. We further investigate if length is the main
factor affecting the predictions of the fine-tuned
model in the following section.
Figure 4: Explained variance of the four feature-
based SVM models and the fine-tuned XLM-R model.
The models are trained on GECO using 5-fold cross-
validation and evaluated on the English part of MECO;
error bars denote the standard deviation over folds.
6 The Role of Sentence Length
To test whether the fine-tuned XLM-R model cap-
tures more sophisticated structural information than
sentence length, we conduct two additional exper-
iments. First, we probe the final-layer represen-
tations of the model for the complexity features
from Table 1, both before and after fine-tuning on
eye-tracking data. Second, we compare the per-
formance of the fine-tuned model to a control con-
dition: we randomize the word order within each
MECO sentence to analyze the prediction perfor-
mance on scrambled input.
6.1 Probing Set-up
We train regressors gi to predict a value for each
of the nine latent factors of structural complexity
first-pass dur.total fixation dur.fixation countregression dur.sentence length (tokens)max. dependency link lengthparse tree depthnumber of verbal headsnumber of low frequency wordsavg. dependency link lengthavg. word length (characters)lexical densityavg. word frequency0.950.920.930.660.790.770.780.550.780.760.770.550.710.690.700.500.590.600.600.410.610.600.600.430.150.170.170.080.110.130.120.07-0.14-0.17-0.16-0.09GECOfirst-pass dur.total fixation dur.fixation countregression dur.0.940.940.930.860.590.580.580.520.650.670.670.600.560.560.550.500.580.570.590.500.370.360.360.290.060.070.060.07-0.10-0.09-0.10-0.140.080.080.070.10MECO (predicted)first-pass dur.total fixation dur.fixation countregression dur.0.670.840.870.160.370.450.460.070.420.610.630.190.420.510.520.080.420.550.540.180.280.260.270.030.160.010.02-0.020.07-0.11-0.12-0.16-0.050.090.100.07MECO (true)fixation counttotal fixation dur.first-pass dur.regression dur.0.40.20.00.20.40.60.8Explained varianceSVM LengthSVM FrequencySVM StructuralSVM All featuresFine-tuned XLM-RZ = z1,...,z9 using XLM-R's final-layer represen-
tation θ(x) of our input sentence x. The prediction
accuracy of gi is an indication of how prominently
the linguistic property zi is encoded in θ. We an-
alyze this both for the pre-trained and fine-tuned
representations of XLM-R to quantify the relative
increase of sensitivity to zi after fine-tuning on
eye-tracking metrics.
We conduct the probing experiments for three
typologically different languages to analyze if the
structural sensitivity that was acquired from En-
glish eye-tracking data transfers to other languages.
As input, we use 1,000 parallel sentences from the
English, Korean and Turkish parts of the Parallel
Universal Dependencies (PUD) treebanks which
were randomly selected from Wikipedia and news
articles (Zeman et al., 2017). We apply a 5-fold
cross-validation setting with 800 sentences for
training the probing regressors for each language
and the remaining 200 for testing. We use the same
architecture as described in Section 3.2, but freeze
the encoder model and only update the final re-
gression layer during training. The regression layer
contains nine probing heads (one for each linguistic
feature) and is trained for 5 epochs.5
6.2 Results
We report the results of the probing experiments
and the model performance on scrambled inputs.
Probing Figure 5 shows the relative probing per-
formance for each complexity feature. We see
that fine-tuning yields the largest improvements for
probing sentence length and average dependency
link length. For the other complexity features, we
see that the fine-tuned representations yield little
to no improvement in probing accuracy compared
to the pre-trained representations. This mostly con-
cerns the features for which sentence length is fac-
tored out, i.e., average word frequency, average
word length and lexical density. Sarti et al. (2021)
report similar results and show that increased prob-
ing performance for dependency features persists
for sentences of the same length. This provides
additional evidence that structural information is
learned in addition to low-level length information.
We observe only minor differences in probing
accuracy for individual complexity features of En-
5We report results for a multi-task set-up for probing in
line with Sarti et al. (2021) and use the same hyperparameters
as for the fine-tuning experiments but without intermediate
evaluation on a development set. We also ran single-task
probing as a sanity check and obtained similar results.
Figure 5: Relative improvement in R2 for complexity
features of English, Korean and Turkish sentences in
fine-tuned XLM-R sentence representations over pre-
trained representations. The results are calculated us-
ing probing regressors and averaged over 5 folds.
glish, Korean and Turkish sentences. The gen-
eral pattern is consistent for all languages: fea-
tures related to the structural complexity of sen-
tences are more easily predicted after fine-tuning
on eye-tracking metrics. This indicates that the fine-
tuned model is able to transfer structural complex-
ity knowledge acquired from English eye-tracking
data to other languages.
Influence of Word Order We compare the per-
formance of the fine-tuned model on sentences with
normal versus scrambled word order, both in terms
of explained variance and R2. We measure simi-
lar explained variance scores for both input types.
This indicates that the model is able to account for
a large portion of the variance in our eye-tracking
data by merely considering sentence length. The
R2 scores, on the other hand, are consistently lower
for scrambled inputs, as shown for total fixation
duration in Figure 6 (see appendix Figure 10 for the
other eye-tracking metrics). We conclude that the
model is sensitive to word order and bases its eye-
tracking predictions not only on sentence length
but also on more complex structural characteristics.
Figure 6: R2 scores for total fixation duration for each
language in MECO, both for sentences with normal and
scrambled word order. The results are averaged over 5
folds; error bars denote the standard deviation.
sentence lengthavg. dep. link length# low freq. wordsmax. dep. link length# verbal headsavg. token freq.parse tree depthavg. word lengthlexical density0.000.050.100.150.200.250.300.35R-Squared improvementEnglishKoreanTurkishKoreanItalianEnglishGreekSpanishRussianHebrewDutchTurkishNorwegianGermanFinnishEstonian3210R-squaredTotal fixation durationnormal inputscrambled input7 Conclusion
per language.
We find that XLM-R can apply cross-lingual trans-
fer to predict cognitive processing difficulty with
similar performance across 13 typologically di-
verse languages, despite being fine-tuned only on
English data. We conducted a range of experiments
to quantify the model's sensitivity to structural com-
plexity and find that the fine-tuned model promi-
nently encodes sentence length, but also considers
more complex structural information such as depen-
dency structure and word order for the prediction
of eye-tracking metrics.
Our analyses suggest that domain differences
in training and testing data have a greater im-
pact on model performance than language differ-
ences within the same domain. More specifically,
XLM-R performs better on in-domain GECO data
than cross-domain MECO data, but within MECO,
XLM-R shows similar performance across lan-
guages. This aligns with the findings of Morger
et al. (2022), who show that the correlation be-
tween relative importance metrics and total fixa-
tion duration is influenced by text domain. Our
study highlights the significance of controlling for
text domain and size, as it allows to evaluate cross-
lingual generalization that is independent of dataset
characteristics.
In future work, we plan to better account for in-
dividual differences between readers (Brandl and
Hollenstein, 2022) and spill-over effects across sen-
tence boundaries (Wiechmann et al., 2022). The
modeling approach for learning eye-tracking pat-
terns also needs further exploration. We find that
sentence-level prediction of eye-tracking patterns
works well for learning about structural complex-
ity, but that it is not optimal for capturing lexical
complexity. Token-level measures, as predicted
in Hollenstein et al. (2021), are more likely to be
informative about lexical phenomena. A joint loss
for sentence and token-level eye-tracking metrics
might lead to sensitivity to a wider range of linguis-
tic complexity features.
8 Limitations
The main limitation of our work is the use of rela-
tively small datasets for testing our models due to
limited availability of eye-tracking data in multi-
ple languages. The dataset used for testing cross-
lingual transfer (MECO) contains approximately
100 sentences per language. For probing structural
complexity, we used a sample of 1,000 sentences
As in related work, we averaged the eye-tracking
metrics over readers to obtain a more robust indi-
cation of human reading behavior. This approach
disregards the fact that reading is a highly individ-
ual process that is dependent on cognitive factors
and experience. A computational model might de-
velop a better sense of linguistic complexity when
it learns about the linguistic properties that lead
to variation across readers and we are working to-
wards methods for integrating this information.
Acknowledgements
We thank the anonymous reviewers for their in-
sightful feedback. L. Beinborn's research was sup-
ported by the Dutch National Science Organisation
(NWO) through the projects CLARIAHPLUS (CP-
W6-19-005) and VENI (Vl.Veni.211C.039).
References
Wasi Ahmad, Haoran Li, Kai-Wei Chang, and Yashar
Syntax-augmented multilingual
Mehdad. 2021.
BERT for cross-lingual transfer. In Proceedings of
the 59th Annual Meeting of the Association for Com-
putational Linguistics and the 11th International
Joint Conference on Natural Language Processing
(Volume 1: Long Papers), pages 4538–4554, Online.
Association for Computational Linguistics.
Maryam AlJassmi, Kayleigh Warrington, Victoria Mc-
Gowan, Sarah White, and Kevin Paterson. 2022. Ef-
fects of word predictability on eye movements dur-
ing Arabic reading. Attention, Perception, & Psy-
chophysics, 84(1):10–24.
Mikel Artetxe, Sebastian Ruder, and Dani Yogatama.
2020. On the cross-lingual transferability of mono-
lingual representations. In Proceedings of the 58th
Annual Meeting of the Association for Computa-
tional Linguistics, pages 4623–4637, Online. Asso-
ciation for Computational Linguistics.
Maria Barrett, Frank Keller, and Anders Søgaard. 2016.
Cross-lingual transfer of correlations between parts
of speech and gaze features. In Proceedings of COL-
ING 2016, the 26th International Conference on
Computational Linguistics: Technical Papers, pages
1330–1339, Osaka, Japan. The COLING 2016 Orga-
nizing Committee.
Lisa Beinborn and Rochelle Choenni. 2020. Semantic
drift in multilingual representations. Computational
Linguistics, 46(3):571–603.
Thomas Bever. 1970. The Cognitive Basis for Linguis-
tic Structures, pages 279–352. Cognition and the De-
velopment of Language.
Johannes Bjerva, Robert Östling, Maria Han Veiga,
Jörg Tiedemann, and Isabelle Augenstein. 2019.
What Do Language Representations Really Repre-
sent? Computational Linguistics, 45(2):381–389.
with mBERT. In Proceedings of the 4th Workshop
on Research in Computational Linguistic Typology
and Multilingual NLP, pages 1–10, Seattle, Wash-
ington. Association for Computational Linguistics.
Stephanie Brandl and Nora Hollenstein. 2022. Every
word counts: A multilingual analysis of individual
human alignment with model attention. In Proceed-
ings of the 2nd Conference of the Asia-Pacific Chap-
ter of the Association for Computational Linguistics
and the 12th International Joint Conference on Nat-
ural Language Processing (Volume 2: Short Papers),
pages 72–77, Online only. Association for Computa-
tional Linguistics.
Dominique Brunato,
Andrea Cimino,
Felice
Dell'Orletta, Giulia Venturi,
and Simonetta
Montemagni. 2020. Profiling-UD: a tool for linguis-
tic profiling of texts. In Proceedings of the Twelfth
Language Resources and Evaluation Conference,
pages 7145–7151, Marseille, France. European
Language Resources Association.
Marc Brysbaert and Boris New. 2009. Moving beyond
Kucera and Francis: A critical evaluation of current
word frequency norms and the introduction of a new
and improved word frequency measure for Ameri-
can English. Behavior research methods, 41:977–
90.
Yuan Chai, Yaobo Liang, and Nan Duan. 2022. Cross-
lingual ability of multilingual masked language mod-
els: A study of language structure. In Proceedings
of the 60th Annual Meeting of the Association for
Computational Linguistics (Volume 1: Long Papers),
pages 4702–4712, Dublin, Ireland. Association for
Computational Linguistics.
Rochelle Choenni and Ekaterina Shutova. 2022. Inves-
tigating language relationships in multilingual sen-
tence encoders through the lens of linguistic typol-
ogy. Computational Linguistics, 48(3):635–672.
Charles Clifton and Adrian Staub. 2011. Syntactic in-
fluences on eye movements during reading. In The
Oxford Handbook of Eye Movements, pages 896–
909. Oxford University Press.
Alexis Conneau, Kartikay Khandelwal, Naman Goyal,
Vishrav Chaudhary, Guillaume Wenzek, Francisco
Guzmán, Edouard Grave, Myle Ott, Luke Zettle-
moyer, and Veselin Stoyanov. 2020. Unsupervised
cross-lingual representation learning at scale.
In
Proceedings of the 58th Annual Meeting of the Asso-
ciation for Computational Linguistics, pages 8440–
8451, Online. Association for Computational Lin-
guistics.
Uschi Cop, Nicolas Dirix, Denis Drieghe, and Wouter
Duyck. 2016. Presenting GECO: An eyetracking
corpus of monolingual and bilingual sentence read-
ing. Behavior Research Methods, 49.
Ameet Deshpande, Partha Talukdar, and Karthik
Narasimhan. 2022. When is BERT multilingual?
isolating crucial ingredients for cross-lingual trans-
In Proceedings of the 2022 Conference of the
fer.
North American Chapter of the Association for Com-
putational Linguistics: Human Language Technolo-
gies, pages 3610–3623, Seattle, United States. Asso-
ciation for Computational Linguistics.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and
Kristina Toutanova. 2019. BERT: Pre-training of
deep bidirectional transformers for language under-
In Proceedings of the 2019 Conference
standing.
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. Associ-
ation for Computational Linguistics.
David Eberhard, Gary Simons, and Charles Fen-
nig (eds.). 2022. Ethnologue: Languages of the
World, twenty-fifth edition. SIL International, Dal-
las, Texas.
Sidney Evaldo Leal, João Marcos Munguba Vieira, Er-
ica dos Santos Rodrigues, Elisângela Nogueira Teix-
eira, and Sandra Aluísio. 2020. Using eye-tracking
the readability of Brazilian Por-
data to predict
tuguese sentences in single-task, multi-task and se-
In Proceed-
quential transfer learning approaches.
ings of the 28th International Conference on Com-
putational Linguistics, pages 5821–5831, Barcelona,
Spain (Online). International Committee on Compu-
tational Linguistics.
Hila Gonen, Shauli Ravfogel, Yanai Elazar, and Yoav
Goldberg. 2020. It's not Greek to mBERT: Induc-
ing word-level translations from multilingual BERT.
In Proceedings of the Third BlackboxNLP Workshop
on Analyzing and Interpreting Neural Networks for
NLP, pages 45–56, Online. Association for Compu-
tational Linguistics.
Ana Valeria González-Garduño and Anders Søgaard.
2017. Using gaze to predict text readability. In Pro-
ceedings of the 12th Workshop on Innovative Use of
NLP for Building Educational Applications, pages
438–443, Copenhagen, Denmark. Association for
Computational Linguistics.
Peter Gordon, Randall Hendrick, Marcus Johnson, and
Yoonhyoung Lee. 2006. Similarity-based interfer-
ence during language comprehension: Evidence
from eye tracking during reading. Journal of exper-
imental psychology. Learning, memory, and cogni-
tion, 32:1304–21.
Andrea De Varda and Roberto Zamparelli. 2022. Mul-
tilingualism encourages recursion: a transfer study
Raffaele Guarasci,
Stefano Silvestri, Giuseppe
De Pietro, Hamido Fujita, and Massimo Esposito.
2022. BERT syntactic transfer: A computational ex-
periment on Italian, French and English languages.
Comput. Speech Lang., 71(C).
and Evaluation (LREC'16), pages 923–929, Por-
torož, Slovenia. European Language Resources As-
sociation (ELRA).
Nora Hollenstein, Emmanuele Chersoni, Cassandra Ja-
cobs, Yohei Oseki, Laurent Prévot, and Enrico San-
tus. 2022a. CMCL 2022 shared task on multilin-
gual and crosslingual prediction of human reading
behavior. In Proceedings of the Workshop on Cogni-
tive Modeling and Computational Linguistics, pages
121–129, Dublin, Ireland. Association for Computa-
tional Linguistics.
Nora Hollenstein, Itziar Gonzalez-Dios, Lisa Beinborn,
and Lena Jäger. 2022b. Patterns of text readability
In Pro-
in human and predicted eye movements.
ceedings of the Workshop on Cognitive Aspects of
the Lexicon, pages 1–15, Taipei, Taiwan. Associa-
tion for Computational Linguistics.
Nora Hollenstein, Federico Pirovano, Ce Zhang, Lena
Jäger, and Lisa Beinborn. 2021. Multilingual lan-
guage models predict human reading behavior.
In
Proceedings of the 2021 Conference of the North
American Chapter of the Association for Computa-
tional Linguistics: Human Language Technologies,
pages 106–123, Online. Association for Computa-
tional Linguistics.
K. Karthikeyan, Zihan Wang, Stephen Mayhew, and
Dan Roth. 2020. Cross-lingual ability of multilin-
In International
gual BERT: An empirical study.
Conference on Learning Representations.
Reinhold Kliegl, Ellen Grabner, Martin Rolfs, and Ralf
Engbert. 2004. Length, frequency, and predictability
effects of words on eye movements in reading. Euro-
pean Journal of Cognitive Psychology, 16(1-2):262–
284.
Taku Kudo and John Richardson. 2018. SentencePiece:
A simple and language independent subword tok-
enizer and detokenizer for neural text processing. In
Proceedings of the 2018 Conference on Empirical
Methods in Natural Language Processing: System
Demonstrations, pages 66–71, Brussels, Belgium.
Association for Computational Linguistics.
Anna K. Laurinavichyute, Irina A. Sekerina, Svet-
lana Alexeeva, Kristine Bagdasaryan, and Reinhold
Kliegl. 2019. Russian Sentence Corpus: Benchmark
measures of eye movements in reading in Russian.
Behavior Research Methods, 51:1161–1178.
Jindˇrich Libovický, Rudolf Rosa, and Alexander Fraser.
2020. On the language neutrality of pre-trained mul-
tilingual representations. In Findings of the Associ-
ation for Computational Linguistics: EMNLP 2020,
pages 1663–1674, Online. Association for Computa-
tional Linguistics.
Pierre Lison and Jörg Tiedemann. 2016. OpenSub-
titles2016: Extracting large parallel corpora from
movie and TV subtitles. In Proceedings of the Tenth
International Conference on Language Resources
Chi-Liang Liu, Tsung-Yuan Hsu, Yung-Sung Chuang,
and Hung-Yi Lee. 2020. A study of cross-lingual
ability and language-specific information in multilin-
gual bert. arXiv preprint arXiv:2004.09205.
Simon P. Liversedge, Denis Drieghe, Xin Li, Guoli
Yan, Xuejun Bai, and Jukka Hyönä. 2016. Univer-
sality in eye movements and reading: A trilingual
investigation. Cognition, 147:1–20.
Saima Malik-Moraleda, Dima Ayyash, Jeanne Gallée,
Josef Affourtit, Malte Hoffmann, Zachary Mineroff,
Olessia Jouravlev, and Evelina Fedorenko. 2022. An
investigation across 45 languages and 12 language
families reveals a universal language network. Na-
ture Neuroscience, 25:1–6.
Felix Morger, Stephanie Brandl, Lisa Beinborn, and
Nora Hollenstein. 2022. A cross-lingual compari-
son of human and model relative word importance.
In Proceedings of the 2022 CLASP Conference on
(Dis)embodiment, pages 11–23, Gothenburg, Swe-
den. Association for Computational Linguistics.
Elisabeth Norcliffe, Alice C. Harris, and T. Florian
Jaeger. 2015. Cross-linguistic psycholinguistics and
its critical role in theory development: early begin-
nings and recent advances. Language, Cognition
and Neuroscience, 30(9):1009–1032.
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. Duch-
Scikit-learn: Machine learning in
esnay. 2011.
Journal of Machine Learning Research,
Python.
12:2825–2830.
Telmo Pires, Eva Schlinger, and Dan Garrette. 2019.
In Pro-
How multilingual is multilingual BERT?
ceedings of the 57th Annual Meeting of the Asso-
ciation for Computational Linguistics, pages 4996–
5001, Florence, Italy. Association for Computa-
tional Linguistics.
Taraka Rama, Lisa Beinborn, and Steffen Eger. 2020.
Probing multilingual BERT for genetic and typo-
In Proceedings of the 28th Inter-
logical signals.
national Conference on Computational Linguistics,
pages 1214–1228, Barcelona, Spain (Online). Inter-
national Committee on Computational Linguistics.
Gabriele Sarti, Dominique Brunato,
and Felice
Dell'Orletta. 2021. That looks hard: Characterizing
linguistic complexity in humans and language mod-
In Proceedings of the Workshop on Cognitive
els.
Modeling and Computational Linguistics, pages 48–
60, Online. Association for Computational Linguis-
tics.
Siva Reddy, Dima Taji, Nizar Habash, Herman Le-
ung, Marie-Catherine de Marneffe, Manuela San-
guinetti, Maria Simi, Hiroshi Kanayama, Valeria
de Paiva, Kira Droganova, Héctor Martínez Alonso,
Ça ̆grı Çöltekin, Umut Sulubacak, Hans Uszkoreit,
Vivien Macketanz, Aljoscha Burchardt, Kim Harris,
Katrin Marheinecke, Georg Rehm, Tolga Kayadelen,
Mohammed Attia, Ali Elkahky, Zhuoran Yu, Emily
Pitler, Saran Lertpradit, Michael Mandl, Jesse Kirch-
ner, Hector Fernandez Alcalde, Jana Strnadová,
Esha Banerjee, Ruli Manurung, Antonio Stella, At-
suko Shimada, Sookyoung Kwak, Gustavo Men-
donça, Tatiana Lando, Rattima Nitisaroj, and Josie
Li. 2017. CoNLL 2017 shared task: Multilingual
parsing from raw text to Universal Dependencies. In
Proceedings of the CoNLL 2017 Shared Task: Mul-
tilingual Parsing from Raw Text to Universal Depen-
dencies, pages 1–19, Vancouver, Canada. Associa-
tion for Computational Linguistics.
Noam Siegelman, Sascha Schroeder, Cengiz Acartürk,
Hee-Don Ahn, Svetlana Alexeeva, Simona Amenta,
Raymond Bertram, Rolando Bonandrini, Marc Brys-
baert, Daria Chernova, Sara Maria Da Fonseca,
Nicolas Dirix, Wouter Duyck, Argyro Fella, Ram
Frost, Carolina A Gattei, Areti Kalaitzi, Nayoung
Kwon, Kaidi Lõo, Marco Marelli, Timothy C Pa-
padopoulos, Athanassios Protopapas, Satu Savo,
Diego E Shalom, Natalia Slioussar, Roni Stein,
Longjiao Sui, Analí Taboh, Veronica Tønnesen,
Kerem Alp Usal, and Victor Kuperman. 2022. Ex-
panding horizons of cross-linguistic research on
reading: The multilingual eye-movement corpus
(meco). Behavior Research Methods, page 1–21.
Robyn Speer, Joshua Chin, Andrew Lin, Sara Jew-
Luminosoin-
and Lance Nathan. 2018.
ett,
sight/wordfreq: v2.2.
Harshvardhan Srivastava. 2022. Poirot at CMCL 2022
shared task: Zero shot crosslingual eye-tracking data
prediction using multilingual transformer models.
In Proceedings of the Workshop on Cognitive Model-
ing and Computational Linguistics, pages 102–107,
Dublin, Ireland. Association for Computational Lin-
guistics.
Marc Tanti, Lonneke van der Plas, Claudia Borg, and
Albert Gatt. 2021. On the language-specificity of
multilingual BERT and the impact of fine-tuning. In
Proceedings of the Fourth BlackboxNLP Workshop
on Analyzing and Interpreting Neural Networks for
NLP, pages 214–227, Punta Cana, Dominican Re-
public. Association for Computational Linguistics.
Daniel Wiechmann, Yu Qiao, Elma Kerz, and Justus
Mattern. 2022. Measuring the impact of (psycho-
)linguistic and readability features and their spill
over effects on the prediction of eye movement pat-
terns. In Proceedings of the 60th Annual Meeting of
the Association for Computational Linguistics (Vol-
ume 1: Long Papers), pages 5276–5290, Dublin, Ire-
land. Association for Computational Linguistics.
Paula M. Winke. 2013. Eye-Tracking Technology for
Reading, chapter 62. John Wiley & Sons, Ltd.
Shijie Wu and Mark Dredze. 2019. Beto, bentz, be-
cas: The surprising cross-lingual effectiveness of
BERT. In Proceedings of the 2019 Conference on
Empirical Methods in Natural Language Processing
and the 9th International Joint Conference on Natu-
ral Language Processing (EMNLP-IJCNLP), pages
833–844, Hong Kong, China. Association for Com-
putational Linguistics.
Daniel Zeman, Martin Popel, Milan Straka, Jan Ha-
jiˇc, Joakim Nivre, Filip Ginter, Juhani Luotolahti,
Sampo Pyysalo, Slav Petrov, Martin Potthast, Fran-
cis Tyers, Elena Badmaeva, Memduh Gokirmak,
Anna Nedoluzhko, Silvie Cinková, Jan Hajiˇc jr.,
Jaroslava Hlaváˇcová, Václava Kettnerová, Zdeˇnka
Urešová, Jenna Kanerva, Stina Ojala, Anna Mis-
silä, Christopher D. Manning, Sebastian Schuster,
A Additional Tables and Figures
Dataset Language
#Words
#Sentences Avg. sent. length Avg. word length
GECO
English
52131
4041
MECO
English
Dutch
German
Finnish
Estonian
Norwegian
Italian
Spanish
Greek
Turkish
Russian
Hebrew
Korean
2092
2226
2019
1462
1542
2106
2111
2412
2082
1696
1827
1943
1699
99
112
115
110
112
116
90
98
99
104
101
121
101
12.90
21.13
19.88
17.56
13.29
13.77
18.16
23.46
24.61
21.03
16.31
18.09
16.06
16.82
4.60
5.32
5.54
6.38
8.19
7.35
5.62
5.70
5.01
5.67
6.92
6.53
4.89
3.21
Table 3: Size characteristics for the reading materials of GECO and MECO. GECO sentences which are shorter
than five words are removed to ensure that the model sees an adequate amount of complex structures during
training.
Figure 7: Distribution of four sentence-level eye-tracking metrics in English parts of GECO and MECO. All
metrics are scaled between 0-100.
fixation counttotal fixation dur.first-pass dur.regression dur.020406080100milliseconds (scaled)GECOMECOFigure 8: Cross-lingual transfer results for predicting cognitive processing complexity (i.e. fixation count, first-
pass duration and regression duration). Prediction performance is evaluated with explained variance and R2 for
each language in MECO. The results are averaged over 5 folds; error bars denote the standard deviation over folds.
Figure 9: R2 of the four feature-based SVM models and the fine-tuned XLM-R model. The models are trained on
GECO using 5-fold cross-validation and evaluated on the English part of MECO; error bars denote the standard
deviation over folds.
KoreanItalianEnglishGreekSpanishRussianDutchTurkishHebrewNorwegianGermanFinnishEstonian1.51.00.50.00.51.0scoreFixation countR-squaredExplained varianceKoreanItalianEnglishGreekSpanishHebrewRussianTurkishDutchGermanNorwegianFinnishEstonian1.51.00.50.00.51.0scoreFirst-pass durationR-squaredExplained varianceKoreanItalianEnglishSpanishGreekDutchTurkishGermanFinnishRussianEstonianHebrewNorwegian1.51.00.50.00.51.0scoreRegression durationR-squaredExplained variancefixation counttotal fixation dur.first-pass dur.regression dur.1.51.00.50.00.5R-SquaredSVM LengthSVM FrequencySVM StructuralSVM All featuresFine-tuned XLM-RFigure 10: R2 for fixation count, first-pass duration and regression duration for each language in MECO, both
for sentences with normal and scrambled word order. The results are averaged over 5 folds; error bars denote the
standard deviation.
KoreanItalianEnglishGreekSpanishRussianDutchTurkishHebrewNorwegianGermanFinnishEstonian3210R-squaredFixation countnormal inputscrambled inputKoreanItalianEnglishGreekSpanishHebrewRussianTurkishDutchGermanNorwegianFinnishEstonian3.53.02.52.01.51.00.50.00.5R-squaredFirst-pass durationnormal inputscrambled inputKoreanItalianEnglishSpanishGreekDutchTurkishGermanFinnishRussianEstonianHebrewNorwegian43210R-squaredRegression durationnormal inputscrambled input |
|
http://arxiv.org/abs/2302.12693v1 | 2023-02-24T15:36:51 | 2023-02-24T15:36:51 | Wasserstein Projection Pursuit of Non-Gaussian Signals | We consider the general dimensionality reduction problem of locating in a
high-dimensional data cloud, a $k$-dimensional non-Gaussian subspace of
interesting features. We use a projection pursuit approach -- we search for
mutually orthogonal unit directions which maximise the 2-Wasserstein distance
of the empirical distribution of data-projections along these directions from a
standard Gaussian. Under a generative model, where there is a underlying
(unknown) low-dimensional non-Gaussian subspace, we prove rigorous statistical
guarantees on the accuracy of approximating this unknown subspace by the
directions found by our projection pursuit approach. Our results operate in the
regime where the data dimensionality is comparable to the sample size, and thus
supplement the recent literature on the non-feasibility of locating interesting
directions via projection pursuit in the complementary regime where the data
dimensionality is much larger than the sample size. | [
"Satyaki Mukherjee",
"Soumendu Sundar Mukherjee",
"Debarghya Ghoshdastidar"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12693v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12693v1",
"@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.ST",
"stat.ML",
"stat.TH"
] | 3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
3
9
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Wasserstein Projection Pursuit of Non-Gaussian Signals
Satyaki Mukherjee*
Technical University of Munich
Soumendu Sundar Mukherjee*
Indian Statistical Insititute, Kolkata
Debarghya Ghoshdastidar
Technical University of Munich
February 27, 2023
Abstract
We consider the general dimensionality reduction problem of locating in a high-dimensional data cloud, a k-
dimensional non-Gaussian subspace of interesting features. We use a projection pursuit approach-we search for
mutually orthogonal unit directions which maximise the 2-Wasserstein distance of the empirical distribution of data-
projections along these directions from a standard Gaussian. Under a generative model, where there is a underlying
(unknown) low-dimensional non-Gaussian subspace, we prove rigorous statistical guarantees on the accuracy of
approximating this unknown subspace by the directions found by our projection pursuit approach. Our results
operate in the regime where the data dimensionality is comparable to the sample size, and thus supplement the
recent literature on the non-feasibility of locating interesting directions via projection pursuit in the complementary
regime where the data dimensionality is much larger than the sample size.
1 Introduction
A central question in statistics and machine learning concerns the recovery of useful or interesting features from
data. A huge body of literature exists that focuses on such feature extraction tasks. Often the statistician encounters
high-dimensional data of which only a relatively low-dimensional subspace is of interest. A family of algorithms,
often described by the umbrella term projection pursuit [FT74, Hub85], are particularly well-suited for such tasks. By
restricting attention to low-dimensional subspaces, projection pursuit allows the statistician to evade the so-called
"curse-of-dimensionality", which plagues most classical learning algorithms in high-dimensional settings. Further-
more, projection pursuit helps the statistician to discard noisy and information-poor features. Some prominent mem-
bers of this family of techniques include Principal Component Analysis (PCA), Independent Component Analysis
(ICA), matching pursuit, etc.
Perhaps the simplest projection pursuit algorithm is PCA (see, e.g., [Jol02],[JC16]), which considers the subspace
generated by the top k eigenvectors of the sample covariance matrix. In effect, PCA tries to find linear combina-
tions of the original features which explain the most variability. While very useful in its own regard, PCA is limited
by the fact that it only considers variances. Thus it works very well when the superfluous features have consider-
ably lower variance than the signal, e.g., in noise reduction problems. On the other hand, consider a setup where
the interesting components are non-Gaussian, while the rest are Gaussian of comparable variability. The Gaussian
components cannot be treated as noise (in the sense of having smaller variance than the signal component) but are
simply superfluous or "uninteresting". PCA has difficulty separating the interesting non-Gaussian components in
such scenarios.
To overcome this limitation, various methods conceptually similar to PCA have been proposed. A broad class
of such methods goes by the name of ICA([LL98]). Broadly speaking, there are two families of ICA algorithms.
*Equal contribution.
1
One class of algorithms focuses more on ensuring that the signal directions are statistically independent, thus they
minimize mutual information. The other focuses on finding directions in which the data is the "least Gaussian" (i.e.
most interesting). In this paper, we are also interested in the latter objective.
Many approaches are possible for finding non-Gaussian directions, depending upon our definition of "non-Gaussian".
A natural way to quantify non-Gaussianity would be to measure the deviation of some aspect of a probability mea-
sure of interest from that of a standard Gaussian. For instance, one could use measures such as kurtosis([GF96])
or negentropy ([CCC+03],[NA08]). Alternatively, one could measure the deviation from a Gaussian using suitable
probability metrics such as the Kolmogorov-Smirnov (KS) distance, the Wasserstein distance, etc.
We now state the general projection pursuit approach in the context of the problem of identifying non-Gaussian
components with the following simple example. Consider a p-dimensional random vector X which satisfies the
following: there is a unknown direction u∗ such that u⊤
∗ )X , the distribution of X in
the orthogonal complement of u∗, is (p−1)-dimensional standard Gaussian, and, further, the non-Gaussian component
∗ )X are statistically independent. Suppose ρ(ν, ν ′) is some measure of quantifying
∗ X and the Gaussian part (I − u∗u⊤
u⊤
the distance between two probability measures ν and ν ′. ρ could be a divergence between probability measures (e.g.,
the Kullback-Liebler divergence) or a proper metric (e.g., KS distance). Suppose we observe a sample X1, ... , Xn from
ν, the distribution of X . Our goal is to recover the unknown direction u∗. The main idea of projection pursuit is
then to find a unit direction ̂u such that the empirical distribution of the data projected on ̂u (i.e. 1
) is the
farthest from the standard Gaussian distribution with respect to ρ, i.e.
∗ X is non-Gaussian, while (I − u∗u⊤
i=1 δ̂u⊤Xi
n ∑n
̂u = argmax
u ∶
=1
u
ρ
(
1
n
n
∑
i=1
δu⊤Xi , ν
,
where ν
is the standard Gaussian measure. We will later formalise a version of this for general k. Our paper is
interested in the case when ρ is the 2-Wasserstein distance between probability measures with finite second moment.
Specifically, we analyse the question of whether the recovered directions can be guaranteed (with high probability)
to be from the signal space or not.
)
g
‖
‖
g
Some work in this regard has been done in [BKN18] and [MZ22]. [BKN18] use the KS distance for ρ. They show
that if the data is purely Gaussian (i.e. in a null model with no interesting directions), then two completely different
goes to zero or infinity. In
phenomena occur according as whether the data-dimensionality-to-sample-size ratio
the former regime, all projections are Gaussians (in fact, this is known from the earlier work of [DF84]). On the
other hand, in the latter regime, given any arbitrary probability distribution ̃ν, with high probability, one can find a
(data-dependent) direction along which the data set is distributed as ̃ν. In other words, one can find directions along
which the data is as far from Gaussianity (in the KS metric) as one desires. This means that projection-pursuit can
spot fake signal amidst complete noise. When applied to actual data in this regime, there is no way of knowing if
the found direction came from some underlying signal space, or if it is a mirage of signal in a Gaussian desert!
p
n
,
[MZ22] prove a similar result for the 2-Wasserstein distance. Both the above papers argue that under the null
n converges to a sufficiently small constant, the empirical distributions of projections of
model of N
the data points in every direction are close to the standard Gaussian distribution. This obviously begs the question
if, under a spiked alternative, one could find directions along which the data projections are non-Gaussian. [MZ22,
Theorem 4.6] study the question of obtaining such a signal direction under a specific model of supervised learning.
, when p
Ip)
(0
/
Our contributions. Our analysis is done in the context of an alternative model of unsupervised learning. We
suppose that the sample comes from a spiked Gaussian model, i.e. there is a k-dimensional subspace in which the
distribution is decidedly not Gaussian. We first show that under subgaussian tail assumptions, in every direction,
the empirical distribution formed by the data-projections and the true marginal distribution in the same direction
are uniformly close. This result is a substantial extension of similar results in [BKN18] and [MZ22] to a more general
setting. Further, we also show, using a peculiar property of the
-Wasserstein distance, that one can recover an
orthonormal set of vectors which form an approximate basis of the signal space. (This can be thought of as an instance
of the general strategy of matching pursuit.) In particular, each recovered vector's component in the independent
Gaussian space is inversely proportional to the signal-to-noise ratio. Finally, if the signal-to-noise ratio is sufficiently
large, then we give a methodology to accurately estimate k, i.e. the dimension of the signal space. This allows one
to use our sequential procedure even in cases where very little is known about the signal space.
2
2
2 Set-up
Given a probability measure μ in
density of μ in the direction v. In particular,
, and a vector v
, we define the action of v on μ, v♯μ to be the marginal
Definition 2.1. If X is a random variable in
v♯μ is defined to be the density function of the real-valued random variable v⊤X .
from the measure μ and v⊤X is the dot product of v and X , then
p
R
p
∈ R
p
R
-Wasserstein distance dW2
We also need the notion of the
via
μ, ν
between two probability measures μ and ν, defined
2
d2
W2
μ, ν
(
) ∶=
inf
all couplings π of X ,Y
X ∼μ,Y ∼ν
(
)
π [X − Y ]2.
E
We now introduce a formal set-up for the non-Gaussian component recovery problem which we will analyse.
Assumption 1. Suppose that we have data X1, ... , Xn i.i.d. from a σ-subgaussian distribution ν on
the following structure: Suppose X ∼ Ψ.
p,1 where Ψ has
R
1.
X =
X
2.
Ip
2. There is a (unknown) k-dimensional subspace U such that
U X has a sufficiently non-Gaussian distribution,
X has a close-to-Gaussian distribution, in the sense that there exists constants κ1, κ2 with,
E
and
0; var(
U
) =
⟂
Π
inf
u
u∈U ,
=1
dW2
3.
U
and
U
‖
are independent.
‖
Π
(u♯Ψ, Φ) > κ1 > κ2 >
u∈U
u
,
sup
⟂
‖
=1
‖
dW2
u♯
,
(
Ψ
Φ).
X
Π
Π
⟂X
We will denote the gaussian subspace,
1 and
. The quantities
κ
n, our goal is to recover the space
2, as we will see below, dictate a separation condition necessary to distinguish the non-
W
Gaussian signal components from the Gaussian part.
U
κ
. Given the sample
, ⋯ , X
by
U
X
⟂
1
To further motivate our setup let us quickly look at a simple distribution satisfying the assumptions above :
Example 2.1. Let the data
p. Note quickly that if v is any norm
in
of u⊤
i X . Clearly then this is a specific example of our model, with U
to the subspace W is the distribution N
projection of
R
be generated from a mixture of gaussians i.e.
, Ip−k
X
1
.
vector orthogonal to all ui, then v⊤X follows N
k
i=1
N (ui,
k
p)
I
u1, ..., uk
{
}
Span
∑
=
, where ui's are some vectors
and is independent
. In fact the
U
,
and W
(0
1)
⟂
=
Ψ
(0
)
Before moving onto the technical results we also quickly define the following notations we will be using through-
out.
Definition 2.2. Given a p-dimensional distribution ν and a
-dimensional distribution μ
Note that when p
, this is simply the
-Wasserstein distance between the ν and μ. For larger p, when μ
d
ν, μ
∶=
(
)
u∶
=1
u
sup
‖
‖
1
dw2
u♯ν, μ
(
).
our distance d captures how non-gaussian the distribution ν can become in a particular direction.
= 1
2
Definition 2.3. Given a p-dimensional distribution ν and a
-dimensional distribution μ
,
= Φ
d
ν, μ
min(
)
∶= inf
u
u∶
1
=1
dw2(u♯ν, μ)
.
1A random variable X ∈
‖
2While for the purposes of our proof, we have assumed that the covariance matrix is identity throughout, this assumption is heuristically not
p with mean μ is subgaussian with parameter σ or the distribution is in SGp(σ ) iff P
‖
X − μ
t2
2σ 2
Ce
−
t
.
much different from working with whitened data.
R
(‖
‖
‖
‖
3
≥
≤
)
In essence, when
= Φ,
m
gives a measure of separation from the 1-dimensional gaussian.
μ
d
Definition 2.4. Let
whose columns are given by
of
W
T
.
be some subspace of
in
p, and let
1
then given a random variable
R
q
qi
t be some orthonormal basis of
∼
∈
, ..., q
X
, we define
p, where
X
μ
μ
|
. If
is the matrix
Q to be the distribution
W
Q
X
Q
We remark that as the distance
(
regardless of what orthonormal basis one chooses. Thus one can consider the quantity
R
Φ) is rotationally invariant, given a fixed subspace
(
d
μ,
Finally for the sake of clarity of our conclusion we define a signal to noise ratio for the distribution Ψ,
W
W
,
d
μ
|
(
Q
Φ) is the same
,
Φ) unambiguously.
d
,
μ
|
R as
SN
SN R =
√
d(Ψ, Φ)2 − d(Ψ
d(Ψ, Φ)2 − dm
W , Φ)2
, Φ)2
(Ψ
|
.
in
U
|
Note that based on our definition of κ1 and κ2, our SNR is always larger than
construct with high probability k orthonormal vectors v1, ..., v
such that
(Ψ
(Ψ
,
,
√ d
d
Φ)2−
Φ)2−
2
2
2
1
κ
κ
. We will show that we can
We also show that we can estimate k if k
3 Main results
k
2
SN R
.
Proj
( ̂v
)
W
j
‖
‖
‖
≤
‖
‖
‖
R2
4
SN
.
≤
The following proposition is the central pivot granting us leverage to most of our results.
Proposition 3.1. Let X1, ..., X
a positive constant
n
be
data points from Ψ. Let
,p go to infinity in a way such that p/
. Then given
, there exists a positive constant
n
depending on
n
and
such that when
, we have
n → γ
ε
⎛
⎜
supu∈Sp−1
⎜
⎜
P
|
|
|
|
|
|
|
dW2
Σ
=1δu⊤Xi
n
i
γσ ,ε
u
Ψ
−
X1,...,Xn
W2
,
♯
n
E
)
(
where
is some positive constant dependent on
⎝
Σ
σ
=1
n
i
ε
u⊤Xi
δ
n
u
Ψ
,
♯
|
⎤
|
|
⎥
|
|
⎥
|
⎦
|
)
> ε
⎞
⎟
⎟
⎟
⎠
γ ≤ γσ ,ε
−
σ,γ ,ε
nc
< De
,
cσ ,γ ,ε
Proposition 3.1 uniformly bounds the difference between the data dependent (and thus random) quantity,
⎡
d
⎢
⎢
⎣
, and
(
.
,
σ
γ
ε
and the deterministic quantity,
1
n
u
Ψ
dependent only on u.
♯
Then given our assumptions 1 on the distribution Ψ above, we will state the following theorem (proved in Sec-
,
,
X
,...,X
E
Σn
i=1
u⊤Xi
δ
n
2
dW
[
(
)]
Theorem 3.1 (Empirical non-gaussianity implies true non-gaussianity). Let X1, ..., X
0, there exists a constants
,p go to infinity in a way such that p/
n
γσ ,ε
data points from Ψ. Let
and
, the following statement is true with high probability for all unit vectors u in
dependent on
n
such that if
. Given an
n → γ
and
ε >
be
σ
ε
tion 5):
depending on
p simultaneously :
σ
n
Cσ
R
γ ≤ γσ ,ε
dW2
|
|
|
|
|
|
Σ
=1δu⊤Xi
n
i
n
Φ
−
(u
Ψ
Φ)
W2
,
d
♯
,
+
≤ ε
σ
4
C
√n
.
|
|
|
|
|
|
We note that Theorem 3.1 needs very little assumptions on the distribution Ψ. We only need Ψ to be
-subgaussian.
The main upshot of the theorem is that it implies with uniform high probability that in every direction the empir-
ical distribution of the projection is as far away from Gaussian, as the true marginal distribution in that direction.
σ
(
)
Σn
i=1
u⊤Xi
δ
n
u
Ψ
,
♯
,
)
2
dW
(
4
Thus heuristically if we want to find directions in which Ψ is not gaussian it makes sense to maximise the quantity
Φ
We can now proceed to state conditions under which the recovered directions have a very small
. A proof of Theorem 3.2 is written in Section 5.
Σn
i=1δ
u⊤Xi
W2
component in the Gaussian subspace,
d
.
)
(
n
,
1
Theorem 3.2 (recovered direction is almost orthogonal to gaussian subspace). Let
Let
constant
X
that dW2
be
dependent on
, ..., Xn
Σn
i=1δ
γσ ,ε
W
data points from Ψ. Let
and
be the gaussian subspace of Ψ.
0, there exists a
W
, then with asymptotic high probability for any u ∈ Sp−1 such
n → γ
,p go to infinity in a way such that p/
1 − δ2d(Ψ, Φ) + ε +
, we have that
such that if
. Given
n
u⊤Xi
ε >
, Φ
σ
n
ε
n
≥ √
(
)
σ
γ ≤ γσ ,ε
4
C
√n
Proj
(u)
δ
‖
‖
W
≤
‖
‖
√
d(Ψ, Φ)
d(Ψ, Φ)2 − d(Ψ
.
, Φ)2
W
|
Now that we have introduced most of our bulky technology, we can use it to prove the following simple Corollary.
In the interest of space we have moved a detailed proof of the Corollary to the Appendix in Section A. This in turn
allows us to argue the validity of procedure in the vein of the general idea of matching pursuit.
p, where k is a constant.
Corollary 3.1 (Guarantee that recovery is possible). Let U be a k-dimensional sub-space of
p. Then there exists
Let X1, ..., X
some constant Cσ , depending on σ such that given ε > 0 there exists with high probability a unit vector, u which is
n
orthonormal to all v
be some integer. Let v1, ..., v
data points from Ψ. Let
be some vectors in
such that
l < k
be
R
n
l
R
i
d
2
W
1
n
=1
n
∑i
(
Φ
u⊤Xi
δ
,
)
m
(Ψ
Φ) −
−
≥ d
in
U ,
ε
4
Cσ
√n
.
|
dimensional subspace
Suppose now that the distribution Ψ is such that there is a
1 −
Φ) =
directions" are a constant factor far from gaussian as the maximum possible. Then
k,
U
such that for every 1
using Corollary 3.1 we can with high probability sequentially construct vectors v1, ..., v
√
Φ). That is the "top
such that
U ,
j
dmin
(Ψ
(Ψ
k
2
|
δ
d
,
k
Σ
=1δvT
n
i
j
Xi
d
2
W
⎛
⎜
⎜
⎝
,
≥ √
n
large enough such that 4Cσ
4
⎞
⎟
⎟
⎠
Φ
1 −
2
(Ψ
Φ) −
−
δ
d
,
2
(Ψ
ε
4
C
√n
Φ), we have that
.
k
σ
≤
≤
Then setting
= δ 2d(Ψ,Φ)
2
, and
ε
Σ
n
vT
j
Xi
=1
n
i
δ
2
dW
Φ
1 −
2
(Ψ
Φ) −
−
1 − 4
2
(Ψ
Φ) +
+
σ
√n ≤ δ
d
,
σ
≥ √
4
C
√n
converges to a sufficiently small constant
4
C
√n
d
δ
..
ε
,
Now we can use Theorem 3.2 with
large enough
⎞
ε
d
⎟
⎟
as set above. Thus if p/
⎠
with high probability we have that for every
≥ √
⎛
⎜
⎜
⎝
n
δ
,
,
n
ProjW (vj)
2δ
ε
‖
‖
‖
,
n
j
d(Ψ, Φ)
d(Ψ, Φ)2 − d(Ψ
.
W , Φ)2
≤
‖
‖
‖
√
In other words the k-space that we found (i.e.
the one spanned by v1, ..., vk) is mostly orthogonal to W , the
subspace where the distribution is close to Gaussian. The above discussion then gives the following natural method
to estimate k vectors which are almost orthogonal to W . For 1
k, let
j
|
, then for
γ
̂vj =
argmax
=1;∀t<j∶ ̂vT
j
̂vj
̂vt =0
dW2
‖
‖
‖
‖
‖
‖
≤
1
≤
n
=1
n
∑i
(
vT
j
δ ̂
Φ
Xi
,
.
)
5
The above discussion then implies that, with high probability for large enough
we have that (by invoking Theo-
rem 3.2 with
such that
m
(Ψ
Φ) =
1 −
2
(Ψ
Φ)):
δ
d
in
|
U ,
Proj
√
v
)
(
‖
‖
‖
W
j
̂
‖
‖
‖
,
d(Ψ, Φ)2 − d
d(Ψ, Φ)2 − d(Ψ
min
(Ψ
δ
2
d
√
≤
|
W
n
, Φ)2
, Φ)2 =
U
2
SN R
.
A common problem that often occurs in such problems is that k is unknown. To give some answer to this question
|
we first consider the following corollary which is proved in detail in the Appendix in Section B.
Corollary 3.2. Given integers m > k + 1, let δ be a positive real number such that 4δ2 < 1
X1, ..., X
,p go to infinity in a way such that p/
data points from Ψ. Let
Given
be
, where
then with high probability there does not exist a set of
)
m
d
n → γ
ε > 0
. Let
(Ψ
Φ)2
Φ)2
,
1 −
W
(Ψ
d
|
there is a
(
,
γσ ,ε
is a constant depending on
n
n
orthonormal unit vectors v1, ..., v
γσ ,ε
σ
k
d
,
, such that if
n
+1 such that
ε
2
n
=1
vT
j
γ ≤ γσ ,ε
Xi
≥ √1 − 4δ
Continuing the discussion prior to the corollary, we consider
∑i
, Φ
(
)
W
δ
when
1
4
(Ψ
d
Φ)2−
,
(Ψ
Φ)2−
(Ψ
Φ)2
W
(Ψ
|
d
dmin
,
|U ,
Φ)2
k + 1 <
for our sequential algorithm. We can stop at
have that
=
d
,
, if for
̂k
ε =
1
n
R2
4
SN
2
d(Ψ, Φ) + ε +
such that
m
σ
4
C
√n
.
k + 1
2
. Note that
the hypothesis of Corollary 3.2 is true. This gives us a natural cutoff point
in(Ψ
|
U , Φ) = √1 − δ
d(Ψ, Φ)
d
δ
δ 2d(Ψ,Φ)
2
, and
large enough such that 4C
4
2
we
d(Ψ, Φ)
σ
√n ≤ δ
n
2
σ
4
C
.
√n
Corollary 3.2 then implies that this stopping rule ensures with high probability that
∑i
discussion following Corollary 3.1 means that the same stopping rule ensures that
d(Ψ, Φ) + ε +
< √1 − 4δ
+1
T
δ ̂
̂k
2
dW
i , Φ
1
n
(
)
v
X
n
=1
. On the other hand, the
. In effect we have that if
̂k ≤ k
̂k ≥ k
SN R2
4
, then with high probability
.
k + 1 <
4 Conclusion
̂k = k
In this article, we have considered the problem of isolating a non-Gaussian independent component from a Gaussian
counterpart under certain separability assumptions. We have theoretically analysed the approximation accuracy of
a projection pursuit procedure. In contrast to more traditional procedures like PCA, we do not need the variances
of the superfluous feature directions to be small. We only need a distributional gap between directions which are
Gaussian and those which are not.
Since the proposed method involves optimisation of the objective function
as v varies over
the unit sphere, two natural questions immediately come to mind. First of all, since our objective function is markedly
non-convex, designing an efficient algorithm that can find a global minimum (or even good local minima) would be
a significant addition to present work.
=1
n
i
∑
i , Φ
)
W2
d
(
δ
X
v
n
⊤
1
Secondly, it needs to be investigated if similar results are true for distances other than the
-Wasserstein distance.
It is plausible that some distances would be more suitable both from a theoretical perspective and also the practical
optimisation aspect. We leave the investigation of these questions for future work.
2
5 Proofs
5.1 Proof of Proposition 3.1
Quickly noting that for any vector u
p, with
u
we have,
∈
P
R
μ
‖
‖
−
u.
X
(
(|
|
= 1
t
P
X
μ
t
,
≥
)
|
|
≤
)
6
−
≥
‖
‖
)
(‖
‖
we get the following simple proposition :
Proposition 5.1. If X
p is in SGp
σ
and u
p be any unit norm vector (i.e.
u
), then u⊤X
SG1
σ
.
The following is a simple proposition which bounds the norms of the sample covariance matrix of subgaussian
= 1
‖
‖
∈
(
)
∈
R
(
)
∈
R
random variables. It is a slightly reworded version of Theorem 6.5 of [Wai19]
Proposition 5.2. Let X1, ..., X
there exists universal constants c1, c2, c3 such that we have for all δ >
be iid sample from a σ subgaussian distribution in
that
n
X
X
T
i
∑
i
n
‖
‖
‖
‖
‖
P
⎛
‖
‖
⎜
‖
‖
⎜
‖
⎝
2
1
c
√
2
≥ 1 + σ
p
p
+
n
n
(
= 2
0
+ δ
⎞
⎟
⎟
)
⎠
−
3 min(
2)
2
nc
δ,δ
≤ c
e
We will also use the following result (for p
[BL19] as Corollary 7.17.
p with covariance matrix
. Then
R
I
(
) on Wasserstein distances and sample convergences found in
)
Proposition 5.3. Let p be some positive integer. Let μ be some distribution such that for some s > p its s'th moment
exists and is bounded. Then if X1, ..., X
are iid random variables sampled from μ, we have
n
1
d
p
p
=1δu⊤X
n
i
i
Σ
,...,Xn ⎡
⎢
⎢
is some absolute constant dependent upon the upper bound of the s'th moment.
⎣
⎤
⎥
⎥
⎦
, μ
(
)
E
W
≤
n
X
,
C
√n
where
C
1
To prove Proposition 3.1, we will finally be needing the following lemma (proved in the Appendix in section C,)
on the concentration of the 2-Wasserstein distance between a subgaussian measure μ and the empirical measure
from μ (a similar result with a log-Sobolev assumption on μ appears as
=1 δ
μ
Theorem 7.1 in [BL19]).
n
n =
i
∑
Lemma 5.1. Let μ be a σ-subgaussian measure. Let μ
from
be the empirical measure formed from an i.i.d. sample of size
of an i.i.d. sample X1,
. Then
, X
...
Xi
n
n
n
n
μ
for some absolute constants
2
dW
(μn, μ) −
2
dW
E
.
P(
|
|
|
(μn, μ)|
|
|
≥ t
)
≤ Ce
C, c > 0
−
2
2
cnt
σ
.
Now armed with the above preliminaries we can move onto proving our central results:
Proof of Proposition 3.1. As mentioned before we begin by using Lemma 5.1 and the hypothesis that u
subgaussian to get that for any fixed u (with
) we have
u
X is σ-
⊤
= 1
‖
‖
u
X1,...,X
W2
=1δu
n
i
X
⊤
i
2
P
Σ
W
d
|
⎛
|
⎜
|
|
⎜
|
⎜
|
where the constants
|
⎝
A
n ⎡
⎢
⎢
⎣
Let Ep,δ be the smallest delta net on the unit sphere in
It is known that there exists such a net for any p such that
R
E
(
are absolute constants
♯Ψ
)
, c
−
n
d
′
,
u
X
⊤
=1
n
i
Σ
(
δ
n
u
′
−
i
,
e
≥ t
♯Ψ
≤ A
|
⎤
|
|
⎥
|
|
⎥
)
|
⎦
|
p−1,
δ p . Then we have that
⎞
⎟
⎟
⎟
⎠
a v
∈
∈
∃
S
p, i.e. given any u
Ep,δ
A′′ 1
2
2
cnε
σ
,
Ep,δ such that
u
v
δ.
−
≤
‖
‖
dW2
=1δu⊤X
n
i
i
Σ
n
(
u
X1,...,X
,
♯Ψ
−
)
E
P
u∈Ep,δ |
|
sup
|
|
|
|
|
⎛
⎜
⎜
⎜
⎝
|
|
|
W2
d
n ⎡
⎢
⎢
⎣
7
(
≤
=1
n
i
|
|
|
Σ
u
X
⊤
i
δ
n
u
,
p
♯Ψ
⎤
⎥
⎥
)
⎦
|
|
|
|
|
|
|
≥ ε
⎞
⎟
⎟
⎟
⎠
≤
1
δ
(
)
−
2
2
cnε
σ
.
Ae
To go from taking the supremum over the net to that on the entire sphere then we would have to control how
δ. Then
small changes in u affect the quantity of interest. To that end let u
we have
p,δ such that
p−1. Let v
v
u
dW2
=1δu
n
i
X
⊤
i
Σ
n
(
|
|
|
|
|
|
u
W2
,
♯Ψ
− d
)
(
=1
n
i
Σ
v
X
⊤
i
,
δ
n
v.
Ψ
|
|
|
|
)
|
|
≤
+
≤
n
v
X
⊤
(
W2
Σ
=1
n
i
∈
S
=1δu
n
i
∈
E
X
⊤
i
u
Σ
,
♯Ψ
− d
u
)
i
,
♯Ψ
=1
n
i
X
⊤
i
Σ
,
− d
X
v
)
δ
n
⊤
i
δ
n
=1δu
n
i
n
‖
v
X
⊤
i
−
≤
‖
u
,
♯Ψ
δ
n
v
⊤
δ
n
u
|
|
|
|
)
|
|
X
v.
i
,
v.
Ψ
|
|
|
|
)
|
|
(
♯Ψ,
Ψ)|
|
|
W2
=1
n
i
Σ
W2
(
=1
n
i
Σ
(
W2
|
|
|
|
|
|
)
d
+|
|
|
dW2
|
|
|
|
|
|
|
|
d
|
|
|
|
|
|
|
|
|
|
dW2
(
Σ
(
Let us then quickly bound both of the two terms above. The second term can be upper bounded as
dW2
u
v.
2
|
|
|
(
♯Ψ,
=
Ψ)|
|
|
inf
(X ,X ′)∶ the marginals
X and X ′ distributed as Ψ
E
X ∼Ψ[(u⊤X − v⊤X )2]
[(u⊤X − v⊤X ′)2]
= (u − v)T
≤
E
δ2.
[X X T ](u − v)
E
≤
Similarly for the first term we note
(Considering the coupling X = X ′)
(as
[X X T ] =
p)
E
I
dW2
Σ
=1δu
n
i
X
⊤
i
n
(
|
|
|
|
|
|
Σ
=1
n
i
,
v
X
⊤
i
δ
n
2
|
|
|
|
)
|
|
(u
X
− v
X
)2
n
=1
⊤
i
⊤
i
(u − v)
n
1
T
2
2
(
n
,
n
=1
∑i
T
XiX
i
)
≤
∑i
= (u − v)
δ
̂Σ
≤
(
n‖
‖
‖
‖
‖
‖
)
where ̂Σ
is the sample covariance matrix and
.
2 denotes the operator or L2 norm. We will now use a technical claim
that the operator norm of the sample covariance matrix is with high probability smaller than 2 + C′σ 2
n
for some universal constant C′. This follows from invoking Proposition 5.2.
‖
‖
p
+ p
,
√
n
n
Then we can condition on this event as this is true with high probability (1 − e−
(
). Thus we have whp
)
d
2
W
|
|
|
|
|
|
δ
n
Combining everything then we have whp
(
Σ
=1δu
n
i
X
⊤
i
n
Σ
=1
n
i
,
v
X
⊤
i
δ
n
3 +
′
2
|
|
|
|
)
|
|
≤ δ
C
σ
(
p
n
√
(
θn
p
+
.
n
))
Σ
=1
n
i
W2
d
u
X
⊤
i
Σ
u
Ψ
−
,
♯
W2
d
=1
n
i
v
X
⊤
,
i
δ
n
p−1 with
v.Ψ
δ
3 + C′σ 2
≤
|
|
|
|
|
|
)
(
p
n
+
p
n
√
(
))
|
|
|
|
|
|
(
We then have that whenever there exists an u ∈
)
(
dW2
Σ
=1δu
n
i
X
⊤
i
n
(
|
|
|
|
|
|
|
u
Ψ
−
X1,...,X
W2
,
♯
E
)
d
n ⎡
⎢
⎢
⎣
S
Σ
=1
n
i
(
u
X
⊤
i
δ
n
8
u
Ψ
+ 2
3 +
′
2
,
♯
⎤
⎥
⎥
)
⎦
|
|
|
|
|
|
|
≥ ε
δ
C
σ
(
p
n
√
(
.
+
p
n
,
))
there exists a v ∈ Ep,δ whp (with the property that
u − v
δ) such that
Σ
dW2
=1δv
n
i
X
⊤
i
‖
−
≤
‖
X1,...,X
W2
u
Ψ
n ⎡
d
⎢
⎢
(
Thus using the probability bound on the delta net gives us
⎣
)
E
n
♯
,
|
|
|
|
|
|
|
Σ
=1
n
i
u
X
⊤
i
δ
n
(
u
Ψ
,
♯
≥ ε.
|
⎤
|
|
⎥
|
|
⎥
|
⎦
|
)
u⊤X
u
i
W2
=1
n
i
Σ
(
δ
n
P
d
u∈Sp−1|
|
sup
|
|
|
|
|
⎛
⎜
⎜
⎜
⎝
≤ P
Σ
=1
n
i
δ
n
e−θ
W2
d
v∈Ep,δ |
⎛
|
sup
⎜
|
|
⎜
p
|
Ae−
⎜
|
|
1δ
⎝
2
(
2
cnε
σ
,
♯Ψ
−
v⊤X
)
v.
E
X1,...,X
W2
n ⎡
d
⎢
⎢
⎣
X1,...,X
(
dW2
i
,
Ae−
Ψ
−
E
2
)
2 −p log δ
cnε
σ
n ⎡
⎢
⎢
e−θ
⎣
,
n
+
n
=
u
X
⊤
δ
n
=1δv
n
i
n
u
i
,
♯Ψ
)
X
⊤
i
v.
,
Ψ
=1
n
i
Σ
Σ
(
p
n
√
2 p
′
+ C
σ
n
⎞
⎟
⎟
)
⎟
⎠
′
2
≥ ε + 2δ
3 + C
σ
(
e−θ
n
ε
≥
+
⎞
⎟
⎟
⎟
⎠
|
⎤
|
|
⎥
|
|
⎥
|
⎦
|
|
⎤
|
|
⎥
|
|
⎥
|
⎦
|
)
term as it is no longer true that p
≪
p
(and from invoking Proposition 5.2) Using the
≤
+
where we get the extra p
)
(
hypothesis that p
n
γ and choosing a δ such that
n →
we get :
δ
=
√
n
n
ε
C′σ 2
γ
C′σ 2γ
,
)
3 +
2
(
√
+
dW2
−
P
u∈Sp−1|
|
sup
|
|
|
|
exp
|
⎛
⎜
⎜
⎜
⎝
≤ A
(
A exp −
→
n
=1δu⊤X
n
i
i
Σ
(
n
2
2 − p log
cnε
σ
2
2 +
cε
σ
u
,
♯Ψ
−
)
6 + 2C′σ 2
E
X1,...,X
W2
n ⎡
d
⎢
⎢
ε
⎣
γ + 2C′σ 2γ
(
u
X
⊤
i
=1
n
i
Σ
δ
n
+ e−θ
u
,
♯Ψ
)
|
⎤
|
|
⎥
|
|
⎥
|
⎦
|
≥ 2ε
⎞
⎟
⎟
⎟
⎠
n
−
θn
e
log
6 + 2
γ
√
2
′
C
σ
,
)
2
′
+
+ 2
ε
√γ
2
2 +
cε
σ
σ
C
log
γ
6+2
γ
As there is some constant
the proof follows.
(
such that for all
γσ ,t
γ ≤ γσ ,ε
)
′
2
C
σ
ε
√γ
+2
′
2
C
σ
γ
is positive and lower bounded,
5.2 Proof of Theorem 3.1
Proof of Theorem 3.1. Note that Proposition 3.1 probabilistically bounds the difference between
and the deterministic quantity
1
X
as in Proposition 3.1. Thus when γ
that
E
,...,Xn
γ
u⊤X
Σ
=1
n
i
δ
n
u
Ψ
i
,
♯
2
dW
[
σ ,ε
≤
(
)]
we have with high probability for all unit vectors u ∈
♯
as u varies over all possible unit vectors. Define γ
,
u⊤X
u
Ψ
i
Σ
=1
n
i
δ
n
2
dW
)
(
σ ,ε
p simultaneously
R
(1)
dW2
Σ
=1δu
n
i
X
⊤
i
n
(
|
|
|
|
|
|
|
u
Ψ
−
X1,...,X
W2
,
♯
E
)
n ⎡
d
⎢
⎢
⎣
9
Σ
=1
n
i
u
X
⊤
i
δ
n
(
u
Ψ
,
♯
≤ ε
|
⎤
|
|
⎥
|
|
⎥
|
⎦
|
)
-subgaussian we can conclude that all its moments are upper bounded (by a suitable function of
Since u
). Choose any s > 4 and combine the upper bound on s'th moment of u⊤X with Proposition 5.3 (Corollary 7.17 of
Ψ is
♯
σ
[BL19]). We then get that there is a constant Cσ , dependent on σ, such that
σ
Σ
=1δu
n
i
X
⊤
i
2
u
Ψ
Σ
W2
=1
n
i
u
X
⊤
i
δ
n
⎤
⎥
⎥
Combining equations 1 and 2 with the triangle inequality we can write with high probability that
⎦
⎡
d
⎢
⎢
⎣
⎤
⎥
⎥
⎦
(
)
)
(
E
E
≤
≤
n
♯
♯
,
.
,
C
√n
dW2
⎡
⎢
⎢
⎣
2
u
Ψ
2
σ
(2)
Σ
=1
n
i
u
X
⊤
i
,
δ
n
W2
d
|
|
|
|
|
|
(
Φ
−
(u
Ψ
Φ)
W2
d
♯
,
)
|
|
|
|
|
|
Σ
=1
n
i
W2
≤ d
≤ ε
(
+
W2
E
⎡
d
⎢
⎢
⎣
u
X
δ
n
⊤
i
,
Σ
=1
n
i
(
5.3 Proof of Theorem 3.2
u
Ψ
♯
u
⊤
δ
n
2
σ
+
C
√n
.
)
X
i
u
Ψ
,
♯
≤ ε
⎤
⎥
⎥
)
⎦
Proof of Theorem 3.2. Let u = αv +
variable distributed as Ψ. Thus u⊤X = αv⊤X +
√
following the distributions v.Ψ and w
variables from the distributions v.Ψ and w
= 1. Let X be a random
w
1 − α 2w⊤X , where v⊤X and w⊤X are independent random variables
2 are two independent random
1 and
‖
‖
⟂
Ψ respectively. In other words if
Ψ respectively we can write
1 − α 2w, where w ∈ W , v ∈ W
and
√
=
v
‖
‖
♯
Y
Y
√
d
= means equal in distribution. Note then that if Z is a random variable distributed as Φ(i.e. N (0, 1)), and Z2, Z3
where
are two iid copies distributed as Φ, we can also write
♯
u⊤X
d
= αY1 +
1 − α 2Y2,
(3)
Z d= αZ1 +
1 − α 2Z2.
(4)
√
Ψ and Φ. Similarly, let Ω1 (resp. Ω2) be the set of
Let Ω, be the set of all possible couplings of the distributions of u
Ψ and Φ). Then there is a natural way to construct a
all possible couplings of the distributions of v.Ψ and Φ (resp. w
in Ω1 whose marginals
coupling in Ω given a coupling in Ω1 and another in Ω2. That given any joint distribution
are v.Ψ and Φ respectively, define Y1 and Z1 be the corresponding marginal random variables i.e.
(Y1, Z1) ∼ μ.
Similarly given any joint distribution ν in Ω2, we can define random variables Y2, Z2 where (Y2, Z2) ∼ ν. Note that
by construction we can keep the pair (Y1, Z1) independent of (Y2, Z2). Then equations 3 and 4 can be used to define
a joint distribution in Ω. We then derive the following inequality,
μ
♯
♯
(
]
1 +
1 −
2
2 −
1 −
1 −
2
2)2
αY
(
√
1 −
α
Y
+ (1 −
αZ
2)
1)2
√
(
α
2 −
Z
2)2
+ 2
]
1 −
2
(
1 −
1)(
2 −
2)
Z
Y
1 −
1)2
]
+ (1 −
E [
(
2)
E [
(
Z
Y
2 −
2)2
]
α√
α
E [
Y
Z
Y
Z
]
α
α
(u⊤X − Z )2
(u
X ,Z )∈Ω
inf
⊤
E [
(Y1,Z1)∈Ω1 and (Y2,Z2)∈Ω2
inf
(Y1,Z1)∈Ω1 and (Y2,Z2)∈Ω2
inf
2
E [
α
2
dW2
(u
Ψ
Φ)2 =
♯
,
≤
=
=
=
=
(Y1,Z1)∈Ω1 and (Y2,Z2)∈Ω2
inf
2
(
1 −
α
1)2
Y
+ (1 −
E [
(Y1,Z1)∈Ω1
Y
inf
(v.Ψ, Φ)2 + (1 − α 2)dW2
E [
Φ)2 + (1 −
]
(Ψ
W
W2
(Ψ
2)
Z
d
(w
Φ)2
2
2
α
α
]
(Y2,Z2)∈Ω2
inf
Φ)2
Z
2)
α
Ψ
♯
,
(
Z
2)2
Y
E [
2 −
Y
Z
]
]
E [
≤ α
d
,
α
d
,
|
.
10
Rewriting the above we get
ProjW
(u)
2 = α 2
dW2
(u
(Ψ
Ψ
Φ)2 −
♯
,
,
≥
Φ) −
(Ψ
Φ)2
W
Φ)2
,
(Ψ
d
W
|
,
|
σ ,ε and
.
σ that
‖
d
‖
Using Theorem 3.1 and the hypothesis, we have for an appropriate
d
‖
‖
⟂
ProjW
2
(u)
dW2
(u
(Ψ
Finally, we get
‖
‖
ProjW (u)
‖
‖
⟂
‖
‖
‖
‖
≥
1 −
=
d
ProjW
√
‖
‖
γ
(1 −
Φ)2
W
Φ)2
,
≥
d(Ψ,Φ)
d(Ψ,Φ)2−d(Ψ
,Φ)2
2)
(Ψ
Φ)2 −
(Ψ
d
δ
,
,
d
.
Φ) −
(Ψ
(Ψ
d
W
|
,
d
|
δ
Ψ
Φ)2 −
♯
,
,
2
(u)
⟂
‖
‖
(u
Ψ
Φ)
W2
(1 −
2)
(Ψ
Φ)
d
(Ψ
C
Φ)2 −
(Ψ
W
d
♯
,
Φ)2
≥ √
δ
d
,
.
W
Φ)2
,
|
d
,
|
≤
√
|W
11
References
[BKN18] Peter J Bickel, Gil Kur, and Boaz Nadler. Projection pursuit in high dimensions. Proceedings of the National
Academy of Sciences, 115(37):9151–9156, 2018.
[BL19]
Sergey Bobkov and Michel Ledoux. One-dimensional empirical measures, order statistics, and Kantorovich
transport distances, volume 261. American Mathematical Society, 2019.
[CCC+03] LJ Cao, Kok Seng Chua, WK Chong, HP Lee, and QM Gu. A comparison of pca, kpca and ica for dimen-
sionality reduction in support vector machine. Neurocomputing, 55(1-2):321–336, 2003.
[DF84]
[FT74]
[GF96]
Persi Diaconis and David Freedman. Asymptotics of graphical projection pursuit. The annals of statistics,
pages 793–815, 1984.
Jerome H Friedman and John W Tukey. A projection pursuit algorithm for exploratory data analysis.
IEEE Transactions on computers, 100(9):881–890, 1974.
Mark Girolami and Colin Fyfe. Negentropy and kurtosis as projection pursuit indices provide generalised
ica algorithms. In Advances in Neural Information Processing Systems Workshop, volume 9. Denver, CO,
1996.
[Hub85]
Peter J Huber. Projection pursuit. The annals of Statistics, pages 435–475, 1985.
[JC16]
Ian T Jolliffe and Jorge Cadima.
Principal component analysis: a review and recent develop-
ments. Philosophical transactions of the royal society A: Mathematical, Physical and Engineering Sciences,
374(2065):20150202, 2016.
[Jol02]
Ian T Jolliffe. Principal component analysis for special types of data. Springer, 2002.
[LL98]
Te-Won Lee and Te-Won Lee. Independent component analysis. Springer, 1998.
[MZ22]
Andrea Montanari and Kangjie Zhou. Overparametrized linear dimensionality reductions: From projec-
tion pursuit to two-layer neural networks. arXiv preprint arXiv:2206.06526, 2022.
[NA08] Michael Novey and Tulay Adali. Complex ica by negentropy maximization. IEEE Transactions on Neural
Networks, 19(4):596–609, 2008.
[Wai19] Martin J Wainwright. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge
university press, 2019.
A Proof of Corollary 3.1
Here we restate Corollary 3.1 for convenience.
Corollary. Let U be a k-dimensional sub-space of
Let
such that given ε > 0 there exists with high probability a unit vector, u which is orthonormal to all v
data points from Ψ.
p. Then there exists some constant Cσ , depending on σ
be some integer. Let v1, ..., v
p, where k is a constant. Let X1, ..., X
be some vectors in
be
n
n
R
l < k
such that
i
l
d
2
W
Σ
=1δu
n
i
X
⊤
i
n
) =
W
k
R
Φ
m
(Ψ
Φ) −
−
,
≥ d
in
U ,
|
ε
4
Cσ
√n
.
Proof of Corollary 3.1. As
orthogonal to all the vectors {v1, ..., v
l < k
get that with high probability
and dim(
(
}. As k is constant. k ≪
, by rank nullity theorem, there exists a unit vector u in U which is
thus we can invoke Proposition 3.1 with p = k to
)
l
n
sup
v∶v∈U and
v
‖
‖
=1|
|
|
|
|
|
|
dW2
Σ
=1δv
n
i
X
⊤
i
n
(
v.ΨΦ
−
X1,...,X
dW2
,
)
E
12
n ⎡
⎢
⎢
⎣
Σ
=1δv
n
i
X
⊤
i
n
(
< ε.
v.ΨΦ
,
⎤
⎥
⎥
)
⎦
|
|
|
|
|
|
|
In particular then
dW2
Σ
=1δu
n
i
X
⊤
i
u
ΨΦ
−
X1,...,X
W2
,
♯
n
E
)
n ⎡
d
⎢
⎢
⎣
|
|
|
|
|
|
|
Σ
=1
n
i
u
X
⊤
i
δ
n
u
ΨΦ
,
♯
< ε.
⎤
⎥
⎥
)
⎦
|
|
|
|
|
|
|
Finally similar to the proof of Theorem 3.1 invoking Proposition 5.3 gives us
(
(
Therefore we have
X1,...,X
W2
E
d
n ⎡
⎢
⎢
⎣
(
Σ
=1
n
i
u
X
⊤
i
δ
n
u
ΨΦ
,
♯
σ
4
C
√n
.
≤
⎤
⎥
⎥
)
⎦
Σ
=1
n
i
u
X
⊤
i
δ
n
W2
d
(
Φ
(u
Ψ
Φ) −
W2
W2
,
≥ d
♯
,
d
Σ
=1
n
i
)
m
(Ψ
Φ) −
−
≥ d
in
m
U ,
|
(Ψ
ε
Φ) −
−
≥ d
in
U ,
|
ε
(
2
⎡
dW
⎢
E
⎢
4
⎣
Cσ
√n
u
X
⊤
i
u
Ψ
,
♯
δ
n
Σ
=1
n
i
u
δ
n
X
)
i
⊤
u
Ψ
,
♯
⎤
⎥
⎥
)
⎦
(
B Proof of Corollary 3.2
We will need the following simple linear algebraic lemma.
Lemma B.1. Let v1, ..., v
Let H be a subspace of V . Then ∀g ∈ G and h ∈ H such that
k
be a set of orthonormal vectors in a vector space V . Let G be the subspace spanned by v1, ..., v
.
k
2
g
h
T
≤
‖
‖
k
=1
(
)
g
=
h
= 1, we have that
‖
‖
Proj
‖
2
‖
(v
)
H
j
‖
∑j
‖
‖
= 1 as
‖
‖
‖
= 1 and v1, ... , v
(v)
. Then we can write g =
Proof. We first remember from basic linear algebra that for any unit vectors v ∈ V and h ∈ H , we have
Proj
G. Combining these we get
|
|
=1 α
k
j
j
∑
form an orthonormal basis of
≤
, where
j
∑
v.h
α 2
v
‖
‖
‖
‖
g
H
|
|
k
|
|
j
j
2
(v
h)2
by Cauchy-Schwarz
(g
h)2 =
T
⎛
⎜
⎜
⎝
≤ ⎛
⎜
⎜
⎝
≤
k
=1
∑j
k
=1
∑j
k
=1
∑j
‖
‖
‖
α
v
h
T
j
j
⎞
⎟
⎟
⎠
k
=1
⎛
⎜
∑j
⎜
(v
⎝
H
j
α 2
i ⎞
⎟
⎟
Proj
⎠
⎞
⎟
⎟
⎠
T
j
2
)
‖
‖
‖
Armed with this we restate Corollary 3.2 and prove it:
13
σ
4
C
√n
.
σ
4
C
√n
.
⎞
⎟
⎟
⎠
⎞
⎟
⎟
⎠
⎛
⎜
⎜
⎝
⎛
⎜
⎜
⎝
‖
‖
‖
Corollary. Given integers m > k +1, let δ be a positive real number such that 4δ2 < 1
1 −
. Let X1, ..., X
data points from Ψ. Let
be
is a constant depending on
orthonormal unit vectors v1, ..., v
n
,
n
ε
σ
,p go to infinity in a way such that p/
, such that if
, where
then with high probability there does not exist a set of
Given
m
n → γ
(
ε >
)
γσ ,ε
n
+ 1
γσ ,ε
k
(Ψ
Φ)2
d
(Ψ
Φ)2
|W ,
0 there is a
d
,
+1 such that
γ ≤ γσ ,ε
k
d
2
W
Σ
=1δv
n
i
T
j
X
i
,
n
Φ
1 − 4
2
(Ψ
Φ) +
+
≥ √
δ
d
,
ε
Proof of Corollary 3.2. To prove this we will use Theorem 3.2 along with the trivial linear algebraic Lemma B.1. We
prove by contradiction. Suppose a orthonormal set v1, ..., vk+1 exists satisfying the hypothesis :
Σ
=1δv
n
i
T
j
dW2
X
i
Φ
1 − 4
2
(Ψ
Φ) +
+
≥ √
We can invoke Theoremm 3.2 to get with high probability,
n
,
δ
d
,
ε
ProjW (vj)
2δ
d(Ψ, Φ)
d(Ψ, Φ)2 − d(Ψ
.
W , Φ)2
≤
‖
‖
‖
√
Then let G = Span{v1, ..., vk+1}. As As dim(G) + dim(W ) = dim(V ) + 1, there exists a non-zero vector s ∈ G ∩ W such
that
= 1. Invoking Lemma B.1 with H = W and g = h = s, we get the contradiction
s
|
‖
‖
2
k+1
1 =
sT s
ProjH (vj)
≤
j=1
‖
∑
‖
‖
(
)
2
‖
‖
‖
≤
C Proof of Lemma 5.1
4(k + 1)δ2d(Ψ, Φ)2
d(Ψ, Φ)2 − d(Ψ
|
W , Φ)2 < 1.
To prove Lemma 5.1, we need a bound on the concentration function of subgaussian random variables. For a Borel
set A, let A
r
-fattening of
denote the
= {x ∶ d(x, A) <
}
:
Let
be a probability measure on
Ar
r
.
r
A
. Let
μ
R
denote the concentration function of
(
) = {1 −
(
) ∶
(
)
1/2}
0
αμ
.
r
r
A
μ
μ
A
≥
, r >
,
Lemma C.1. Let
be a
-subgaussian probability measure. Then there exist absolute constants
μ
0 such that
(
)
−
2
2 for all
cr
σ
μ
0.
σ
C, c >
r
r >
≤ Ce
αμ
Proof. Without loss of generality, we may assume that
that
Then one must have
>
1
2 must intersect (−
, r
A
μ
r
(
)
0
σ
0), for otherwise one would get
= 1. Choose
(
r
A
μ
)
0 such that
)
0
((−
≤ μ
+
r
(−
)
x0 + (−(
0 +
)
0 +
Now, by subgaussianity, there exist constants
r , r
⊆
1
1
r
r
0 such that
, r
r
((−
⊆ A
r0
)
r
)
.
−
1
where the last inequality holds for some constants
0.) Thus for all
take
1 = 2
and
=
1
1
= 1
2
c
c
, C
C
e
r
r
1
2 Br
2
0
1 −
(
+
C
, c
((−
>
)
)
)
1
r0
r
A
μ
≤ μ
c
r , r
−
μ
r , r
c
−
≤ C
+
(
)
e
2
2
r
c
e
c1r
≤ Ce
r0
≤ C
0 for all large enough
(
1, we have that
0 +
r
r
αμ
r
C, c >
r > r
14
((−
)
0)
r
c
μ
, r
)
1
2 . Then any
0)
1
c
2 . Take x0 ∈ A ∩ (−
A
r
<
such
0).
0
, r
0
, r
<
2
c1r
for all
0. Therefore
r >
1. (For example, one can
.
,
, say
)
−
r > r
2
cr
≤ Ce
We can always increase the constant
so that one has sup
∈(0
+
]
(
)
C
)
(
(
)
sup
+
∈(0
]
r1
αμ
r
≤
αμ
r
≤ Ce
r
−
,r0
+
(
r1
)
αμ
r
≤ Ce
−
2
c
r0
r1
≤ Ce
,r0
We conclude that there exist absolute constants
r
0 such that
(
)
For clarity's sake we restate Lemma 5.1.
C, c >
αμ
r
≤ Ce
2
cr
.
−
2
cr
for all
0.
r >
−
(
+
)
2
c
r0
r1
. Then for any
0 +
1,
r ≤ r
r
be a
-subgaussian measure. Let
be the empirical measure formed from an i.i.d. sample of size
Lemma. Let
. Then
from
μ
μ
σ
for some absolute constants
μn
) −
(
(
dW2
μn, μ
0.
P(
|
|
|
dW2
μn, μ
E
−
cnt2
σ2
.
)
|
|
|
≤ Ce
≥ t
)
n
Proof of Lemma 5.1. The proof is the same as the proof of Theorem 7.1 in [BL19], except that we replace their log-
Sobolev assumption on
with a subgaussianity assumption, which yields a stronger bound on the concentration
function as in Lemma C.1, which in turns gives us a tail bound of the form
C, c >
μ
for some absolute constants
C, c >
(
) −
(
μn, μ
0.
P(
dW2
|
|
|
dW2
μn, μ
E
−
cnt2
σ2
)
|
|
|
≤ Ce
≥ t
)
15
|
|
http://arxiv.org/abs/2302.12838v1 | 2023-02-24T15:36:28 | 2023-02-24T15:36:28 | A Multimodal Graph Neural Network Framework for Cancer Molecular Subtype
Classification | The recent development of high-throughput sequencing creates a large
collection of multi-omics data, which enables researchers to better investigate
cancer molecular profiles and cancer taxonomy based on molecular subtypes.
Integrating multi-omics data has been proven to be effective for building more
precise classification models. Current multi-omics integrative models mainly
use early fusion by concatenation or late fusion based on deep neural networks.
Due to the nature of biological systems, graphs are a better representation of
bio-medical data. Although few graph neural network (GNN) based multi-omics
integrative methods have been proposed, they suffer from three common
disadvantages. One is most of them use only one type of connection, either
inter-omics or intra-omic connection; second, they only consider one kind of
GNN layer, either graph convolution network (GCN) or graph attention network
(GAT); and third, most of these methods lack testing on a more complex cancer
classification task. We propose a novel end-to-end multi-omics GNN framework
for accurate and robust cancer subtype classification. The proposed model
utilizes multi-omics data in the form of heterogeneous multi-layer graphs that
combines both inter-omics and intra-omic connections from established
biological knowledge. The proposed model incorporates learned graph features
and global genome features for accurate classification. We test the proposed
model on TCGA Pan-cancer dataset and TCGA breast cancer dataset for molecular
subtype and cancer subtype classification, respectively. The proposed model
outperforms four current state-of-the-art baseline models in multiple
evaluation metrics. The comparative analysis of GAT-based models and GCN-based
models reveals that GAT-based models are preferred for smaller graphs with less
information and GCN-based models are preferred for larger graphs with extra
information. | [
"Bingjun Li",
"Sheida Nabavi"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12838v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12838v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "q-bio.GN",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"q-bio.GN",
"cs.LG"
] | Li and Nabavi
RESEARCH
A Multimodal Graph Neural Network Framework
for Cancer Molecular Subtype Classification
Bingjun Li and Sheida Nabavi*
*Correspondence:
[email protected]
Department of Computer Science
and Engineering, University of
Connecticut, Storrs, US
Full list of author information is
available at the end of the article
3
2
0
2
b
e
F
4
2
]
N
G
.
o
i
b
-
q
[
1
v
8
3
8
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Background: The recent development of high-throughput sequencing creates a
large collection of multi-omics data, which enables researchers to better
investigate cancer molecular profiles and cancer taxonomy based on molecular
subtypes. Integrating multi-omics data has been proven to be effective for
building more precise classification models. Most current multi-omics integrative
models use either an early fusion in the form of concatenation or late fusion with
a separate feature extractor for each omic, which are mainly based on deep neural
networks. Due to the nature of biological systems, graphs are a better structural
representation of bio-medical data. Although few graph neural network (GNN)
based multi-omics integrative methods have been proposed, they suffer from
three common disadvantages. One is most of them use only one type of
connection, either inter-omics or intra-omic connection; second, they only
consider one kind of GNN layer, either graph convolution network (GCN) or
graph attention network (GAT); and third, most of these methods have not been
tested on a more complex classification task, such as cancer molecular subtypes.
Results: In this study, we propose a novel end-to-end multi-omics GNN
framework for accurate and robust cancer subtype classification. The proposed
model utilizes multi-omics data in the form of heterogeneous multi-layer graphs,
which combine both inter-omics and intra-omic connections from established
biological knowledge. The proposed model incorporates learned graph features
and global genome features for accurate classification. We test the proposed
model on the Cancer Genome Atlas (TCGA) Pan-cancer dataset and TCGA
breast invasive carcinoma (BRCA) dataset for molecular subtype and cancer
subtype classification, respectively. The proposed model shows superior
performance compared to four current state-of-the-art baseline models in terms
of accuracy, F1 score, precision, and recall. The comparative analysis of
GAT-based models and GCN-based models reveals that GAT-based models are
preferred for smaller graphs with less information and GCN-based models are
preferred for larger graphs with extra information.
Keywords: graph attention network; multi-omics integration; cancer subtype;
molecular subtype
Background
The fast-growing high-throughput sequencing technology has made DNA and RNA
sequencing more efficient and accessible, resulting in a large collection of multi-omics
data which makes molecular profiling possible. Due to the heterogeneity in cancer
and the complexity of the biological processes, employing multi-omics sequencing
data are crucial to more accurate cancer classification and tumor profiling. Many
researchers have proposed methods that incorporate multi-omics data for either
Li and Nabavi
Page 2 of 18
cancer type classification or cell type clustering [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].
These methods show that utilizing multi-omics data improves performance, and
provides a better understanding of the key pathophysiological pathways across dif-
ferent molecular layers [12]. A typical multi-omics data generated from DNA and
RNA sequencing usually consists of mRNA expression, microRNA (miRNA) ex-
pression, copy number variation (CNV), and DNA methylation [13]. The difference
in data distributions across each omic, and the complex inter-omics and intra-omic
connections (certain omic can act as a promotor or suppressor to genes) add more
challenges to developing an integrative multi-omics classification method for cancer
molecular subtypes.
Recent studies have shown that cancer taxonomy based on molecular subtypes
can be crucial for precision oncology [13, 14]. An accurate cancer molecular subtype
classifier is crucial for early-stage diagnosis, prognosis, and drug development. Tra-
ditional cancer taxonomy is based on its tissue origin. In 2014, The Cancer Genome
Atlas (TCGA) Research Network proposed a new clustering method for cancers
based on their integrated molecular subtypes that share mutations, copy-number
alterations, pathway commonalities, and micro-environment characteristics instead
of their tissue of origin [13]. They found 11 subtypes from 12 cancer types. In 2018,
they applied the new taxonomy method to 33 cancer types and found 28 molec-
ular subtypes [15]. The new cancer taxonomy provides a better insight into the
heterogeneous nature of cancer.
With the recent development in deep learning models, data-driven models benefit
from the powerful feature extraction capability of deep learning networks in many
fields [16, 17, 18, 19]. Most multi-omics integrative models employ an early fusion
approach that aggregates multi-omics data (mainly by concatenation) and then ap-
plies a deep neural network as a feature extractor; or a late fusion approach that
first extracts features from each omic by deep neural networks and then aggregates
extracted features as inputs to the classification network. For efficient implementa-
tion of multi-omics integrative models, convolutional neural networks (CNNs) are
widely used [20].
Traditional deep neural networks are based on the assumption that the inner
structure of the data is in Euclidean space [21]. Because of the complex interactions
across many biological processes, such data structure is not a proper representa-
tion of bio-medical data, and researchers proposed graph-based data structures to
tackle this limitation. In 2016, a graph convolution network (GCN), ChebNet, was
proposed [16]. It uses the Chebyshev polynomial as the localized learning filter to
extract the graph feature representation. In 2017, Petar Velickovic et al. proposed a
graph attention network (GAT) that overcomes GCN's disadvantage of dependence
on the Laplacian eigenbasis [22]. GAT uses masked self-attention layers to enable
nodes to attend over their neighborhoods' features [22]. With the recent growing
interest in the graph neural network, many graph-based classification methods have
been proposed in the bio-medical field.
To utilize the power of graph-structured data, Ramirez et al. proposed a GCN
method to use intra-omic connections, protein-protein interaction networks, and
gene co-expression networks. The model achieves a 94.71% classification accuracy
for 33 cancer types and normal tissue on TCGA data [23]. To use the intra-omic
Li and Nabavi
Page 3 of 18
connection across multiple omics, Wang et al. proposed MOGONET, a late-fusion
GCN-based method that integrates multi-omics data for bio-medical data classifica-
tion. And they achieve 80.61% accuracy on breast cancer subtype classification with
BRCA dataset [5]. To compensate for the limitation of GCN, that it only extracts lo-
cal representation on the graph, Li et al. proposed a parallel-structured GCN-based
method that utilizes a gene-based prior knowledge graph for cancer molecular sub-
type classification [1]. There are also other ways to structure the graph. Wang et
al. proposed a GCN-based method that uses a KNN-generated cell-cell similarity
graph for single-cell sequencing data classification [24].
Since the introduction of GAT in 2017, it has gained more and more interest.
Shanthamallu et al. proposed a GAT-based method, GrAMME, with two variations
that use a supra-graph approach and late-fusion approach to extract features from a
multi-layer graph with intra-omic connections only for classification in social science
and political science datasets [25]. On the other hand, Kaczmarek et al. proposed a
multi-omics graph transformer to utilize an inter-omics connection only graph, the
miRNA-gene target network, for cancer classification on 12 cancer types from the
TCGA data [7].
There are three common disadvantages of these approaches. First, most of them
consider only one kind of connections in their model, either inter-omics or intra-omic
connections. They do not aim to utilize both inter-omics and intra-omic connections
for more effective feature extraction. Second, they only consider one kind of GNN
models, either GCN or GAT. We find that GAT and GCN have their strength in
different scenarios as shown in our experiments. Different graph layers are preferred
for different tasks even with datasets in a similar domain. Third, most of these
methods have not been tested on a more complex classification task. They are used
for classification based on the cell-of-origin taxonomy such as cancer type classifica-
tion and have not been applied to a more complex classification task such as cancer
molecular subtype classification, which is more useful for diagnosis, prognosis, and
treatment. Inspired by our previous work on the cancer molecular subtype clas-
sification based solely on intra-omic connections, we aim to develop a multi-omics
integrative framework that exploits the powerful data aggregation property of GCN
or GAT models (depending on the situation) and utilizes both the intra-omic net-
work and the inter-omics network for more precise classification.
Our goal is to build an accurate, robust, and efficient multi-omics integrative pre-
dictive model to classify these cancer molecular subtypes. In this work, we propose
a general framework that can be used with any graph neural networks as the feature
extractor, incorporate both gene-based and non-gene-based prior biological knowl-
edge (primarily miRNA), and learn a knowledge graph consisting of both intra-omic
and inter-omics connections. We apply the proposed model to classify cancer molec-
ular subtypes and breast cancer molecular subtypes. We choose breast cancer as it
is one of the most common and lethal cancers with a large number of samples in
TCGA. It can be categorized into four major molecular subtypes based on the gene
expression of the cancer cells, and breast cancer subtypes have significant impacts
on the patient's survival rates
[26]. Our experimental results show the proposed
method outperforms both the graph-based and CNN-based state-of-the-art meth-
ods.
Li and Nabavi
Page 4 of 18
Our contributions in this study are i) a novel generalized GNN-based multi-omics
integrative framework for cancer molecular subtype classification, ii) a supra-graph
approach that can incorporate both intra-omic and inter-omics prior biological
knowledge in the form of graphs, iii) a representation of multi-omics data in the
form of heterogeneous multi-layer graph, and iv) a comparative analysis of GCN
and GAT based models at different combinations of omics and different graph struc-
tures.
Method and Materials
The overview of the proposed framework structure is shown in Figure 1. The in-
put data for the proposed framework is shown as a graph structure on the leftmost
side. The data consists of three omics, mRNA expression (orange boxes), copy num-
ber variation (CNV) (yellow boxes), and miRNA (green boxes). The details of the
network structure are discussed in the following Network Section. The proposed
framework consists of 4 major modules: Module 1) a linear dimension-increase neu-
ral network, Module 2) a graph neural network (GNN), Module 3) a decoder, and
Module 4) a shallow parallel network. Any kind of graph neural network can be
used in Module 2. In this study, we focus on graph convolutional network (GCN)
and graph attention network (GAT), which are two major kinds of GNN. Experi-
ments about the effect of the decoder and the shallow parallel network modules are
discussed in our ablation study.
Network
We build a heterogeneous multi-layer graph based on the prior biological knowledge,
i.e. gene-gene interaction (GGI) network from BioGrid and miRNA-gene target
network from miRDB [27, 28]. Inspired by the meta-path and supra-graph approach
for the multi-layered network models [29, 25], we build a supra-graph with miRNA-
miRNA meta-paths. A miRNA-miRNA meta-path is defined as if two miRNA nodes
are connected to the same gene node from the GGI network and miRNA-gene
network. An example of how we construct the supra-graph is shown in Figure 2.
Meta-paths are shown as dotted lines in the figure.
The adjacency matrix of the supra-graph is an (N + M ) × (N + M ) matrix, where
N is the number of genes and M is the number of miRNA. Every node in the graph
is assumed to be self-connected, thus the diagonal elements of the adjacency matrix
in the study are 1. The adjacency matrix of the supra-graph is shown in Equation
(1).
ASupra =
(cid:34)
Agene−gene Agene−mi
AT
gene−mi Ami−mi,
(cid:35)
,
(1)
where Agene−gene ∈ RN ×N , Agene−mi ∈ RN ×M , and Ami−mi ∈ RM ×M .
We also construct four different kinds of graphs other than supra-graph in our
ablation study and apply them to five input combinations of omics: mRNA, miRNA,
mRNA + miRNA, mRNA+CNV, mRNA + MiRNA + CNV, to test the effect of
the different graphs on the model performance. The four different graphs are defined
as follows.
Li and Nabavi
Page 5 of 18
Figure 1: The overall structure of the proposed model has four major mod-
ules shown as dotted grey rectangles. The input graph consists of inter-omics
(red edges), intra-omic (blue edges) edges and miRNA-miRNA meta-path (black
dashed edges), and three omics data, mRNA (orange boxes), CNV (yellow boxes),
and miRNA (green boxes) is shown as the leftmost side. Module 1 consists of two
parallel linear dimension-increase layers for gene-based nodes and miRNA-based
nodes. The upgraded graph shown in the middle is obtained by feeding the node
attributes from the input graph through module 1, where the dark orange boxes
are the updated gene-based node attributes and the dark green boxes are the
updated miRNA-based node attributes. Module 2 consists of two graph neural
network layers, which can be any graph neural networks. The output of module
2 is then fed into a max pooling layer and then a transformation layer to obtain
the learned graph representation (blue boxes). Module 3 consists of a decoder to
reconstruct the graph representation back to the input graph node attributes.
Module 4 consists of a shallow fully connected network that takes the updated
node attributes as the input. The output of the parallel network (grey cubes) is
then concatenated with the learned graph representation, and passes through a
classification layer for the classification task.
Li and Nabavi
Page 6 of 18
Figure 2: The overall graph, supra-graph, is constructed from three different omic
data on the left-hand side and two prior knowledge graphs on the right-hand side.
mRNA (orange table) and CNV (yellow table) data are considered gene-based,
which have the same dimension. miRNA (green table) data has the same number
of rows but different feature lengths for each sample.
Only Gene-based Nodes: When the input combination of omics is mRNA or
mRNA+mRNA+CNV (M = 0), the graph is built with the GGI network, A =
Agene−gene ∈ RN ×N .
Only miRNA-based Nodes: When the input combination of omics is miRNA
(N = 0), the graph is built with only miRNA meta-path network, A = Ami−mi ∈
RM ×M .
Only Intra-class Edges: The graph only contains GGI network and miRNA
meta-path network.
ASupra =
(cid:34)
Agene−gene
0M,N
(cid:35)
0N,M
Ami−mi
∈ R(N +M )×(N +M ).
(2)
Only Inter-class Edges: The graph only contains miRNA-gene target network.
ASupra =
(cid:34)
IN,N
AT
gene−mi
(cid:35)
Agene−mi
IM,M
∈ R(N +M )×(N +M ).
(3)
The input graph is denoted as a tuple G = (V, E, XV ), where V is the set of
nodes, E is the set of edges, and xV is the node attributes. The prior knowledge is
incorporated into the model through the supra-graph defined above. In the supra-
graph, nodes consist of both gene-based nodes and miRNA-based nodes, and edges
are assigned by the adjacency matrix. Each gene-based node has a node attribute
of a vector consisting of both gene expression and CNV data, xv∈Vgene ∈ R2. Each
miRNA-based node has a node attribute as a scalar, xv∈VmiRNA ∈ R. The gene-based
nodes and miRNA-based nodes are fed through a linear dimension-increase layer,
Li and Nabavi
Page 7 of 18
denoted as Module 1 in Figure 1 to achieve the same node attribute dimension,
X(cid:48)
V ∈ R(N +M )×F , where F is the increased node attribute dimension.
Graph Neural Network: Convolution-based
As mentioned before, any graph neural network can be used in the GNN module. We
use ChebNet [16] to implement the GCN in this study. The supra-graph adjacency
matrix introduced in the previous network section is first Laplacian normalized to
L as expressed in Equation (4).
L = I + D−1/2AD1/2,
(4)
where I ∈ R(N +M )×(N +M ) is an identity matrix, and the degree matrix D ∈
R(N +M )×(N +M ) is a diagonal matrix. The eigen decomposition form of L can be
obtained as
L = UΛUT ,
(5)
where U = (u1, u2, . . . , un) is a matrix of n orthonormal eigenvectors of L, therefore
UUT = I. And Λ = diag(λ1, λ2, . . . , λn) is the eigenvalue matrix [16].
After transforming the graph on the Fourier domain, the learning filter can be
approximated by a K th-order Chebshev polynomial. The convolution on the graph
by such localized learning filter, h(Λ) can be expressed in Equation (6).
y = Uh(Λ)UT Xj = U
K−1
(cid:88)
k=1
βkTk( ̃Λ)UT Xj =
K−1
(cid:88)
k=0
βkTk( ̃LXj),
(6)
where Xj ∈ R(N +M )×F is the features of j-th sample, ̃L = 2L/λmax − I, and
Tk( ̃L) = 2 ̃LTk−1( ̃L) − Tk−2( ̃L) with T0( ̃L) = I and T1( ̃L) = ̃L. K is a hyper-
parameter, where K = 5 in our study. A max-pooling layer with p = 8 is used to
reduce the number of nodes and one layer of fully connected network is used to
transform the learned local feature representation to a vector of length 64 for each
sample, θ1 ∈ R64.
Graph-Neural Network: Attention-based
GAT aims to solve the problem of GCN's dependence on Laplacian eigenbasis of the
graph adjacency matrix [22]. The updated node attributes are first passed through
a linear transformation by a learnable weight, denoted as W ∈ RF (cid:48)×F , where F is
the updated node attribute dimension and F (cid:48) is the intended output dimension for
this GAT layer. Then, the self-attention coefficients for each node can be calculated
as Equation (7).
eij = a(Wxi, Wxj),
(7)
where eij represents the importance of node j to node i and xi, xj are the node
attributes for node i, j. Such attention score is only calculated for j ∈ N B(i), where
N B(i) is all the first-order neighbor nodes around node i. The method normalizes
Li and Nabavi
Page 8 of 18
the attention score by a softmax layer of eij and uses LeakyReLU as the activation
function as express in Equation (8).
αij =
(cid:80)
exp(LeakyReLU((cid:126)a T [Wxi||Wxj]))
k∈N B(i) exp(LeakyReLU((cid:126)a T [Wxi||Wxk]))
The output for each node can be expressed as Equation (9).
x(cid:48)
i = σ(
(cid:88)
αijWxj).
j∈N B(i)
(8)
(9)
A multi-head attention mechanism is used to stabilize the attention score. In our
study, the number of heads is 8. Similar to the GCN-based GNN module, the output
is then passed through a max-pooling layer and a transformation layer to obtain
the local graph representation, θ1 ∈ R64.
Decoder & Shallow Parallel Network
As shown in Figure 1, the decoder is a two-layer fully connected network that is
used to reconstruct the node attributes on the input graph. To compensate the
localization property of either GCN or GAT layer in the GNN module, we use a
parallel shallow fully connected network. Since the prior knowledge graphs have
many limitation [1], we may neglect some global patterns in the data when extract-
ing features based on the graph structure only. A shallow two-layer fully connected
network is able to learn the global features of the data while ignoring the actual
inner structure of the data. These two modules help the framework to better extract
the overall sample feature representation. The effect of including vs. excluding these
two modules is discussed in detail in the Ablation Study Section.
The input of the parallel network is the updated node attributes, X(cid:48)
V ∈ R(N +M )×F
and the output global representation of the sample, θ1 is in the same dimension as
the local feature representation from the GNN module, θ2 ∈ R64. θ1 and θ2 are
then concatenated and passed through a classification layer for prediction.
Loss Function
In the proposed framework, we define the loss function L as a linear combination
of three loss functions in Equation (10).
L = λ1Lent + λ2Lrecon + λ3Lreg,
(10)
where λ1, λ2 and λ3 are linear weights, Lent is the standard cross-entropy loss for
the classification results, Lrecon is the mean squared error for the reconstruction
loss when the decoder is included, and Lreg is the squared l2 norm of the model
parameters to penalize the number of parameters to avoid overfitting. Lrecon is
defined as
Lrecon =
(cid:88)
(xj − ˆxj)2,
j
(11)
Li and Nabavi
Page 9 of 18
where xj is the flattened feature vector of j-th sample and ˆxj is the corresponding
reconstructed vector. We denote Wall as the vector consists of all parameters in
the model and the Lreg is defined as
Lreg =
(cid:88)
w2.
w∈Wall
(12)
Results and Discussion
We apply the proposed model to two different classification problems. The first
is cancer molecular subtype classification on the TCGA Pan-cancer dataset and
the second is breast cancer subtype classification on the TCGA breast invasive
carcinoma (BRCA) dataset [15, 30].
Data and Experiment Settings
The TCGA Pan-cancer RNA-seq data, CNV data, miRNA data, and molecular
subtype labels are obtained from the University of California Santa Cruz's Xena
website [31]. We only keep samples that have all three omics data and molecular
subtype labels, and collect 9,027 samples in total. We use 17,946 genes that are
common in both the gene expression data and the CNV data, and 743 miRNAs.
The total number of molecular subtypes is 27 and there is a clear imbalance among
these 27 classes as shown in Figure 3. All samples from class 24 are excluded from
the study due to the lack of miRNA data. For BRCA subtype classification, there
are 981 samples in total with 4 subtypes as shown in Table 1. For the experiments
on both datasets, 80% of the data is used for training, 10% is used for validation,
and 10% is used for testing. All classes are present in the test set.
Table 1: Number of Cases in Each BRCA Subtype
BRCA Subtypes
LumA
LumB
Basal
Her2
Counts
529
197
175
80
All expression values are normalized within their own omics. We select the top
700 genes ranked by gene expression variances across the samples, and the top 100
miRNAs by miRNA expression variance. Results are averaged from five individual
trials. The model is implemented using Pytorch Geometric Library.
Baseline Models
We selected four state-of-the-art models [1, 7, 23, 25] as baseline models to eval-
uate the performance of the proposed approach. These four baseline models are
implemented within the proposed framework in two forms, one is with the original
structure, and the other is with some modifications to accommodate the multi-
omics data. The details of all graph-based baseline implementation configurations
are shown in Table 2. We also included a fully-connected neural network (FC-NN)
as a Euclidean-based baseline model. Conventional machine learning methods, such
as Random Forest and SVM are not included in the scope of this study because they
do not scale well to the multi-omics data as mentioned in our previous work [1].
Li and Nabavi
Page 10 of 18
Figure 3: The number of cases in each molecular subtypes is shown. All samples
from class 24 are excluded due to lack of miRNA data.
Table 2: Configurations of Baseline Models on Omics, Graph Structure, GNN Lay-
ers, and Regularizaiton Modules
Omics
CNV miRNA
GAT Decoder
Module
Model
Graph
GCN (Original) [23]
GCN (Modified)
Multi-omics GCN (Original) [1]
Multi-omics GCN (Modified)
GrAMME (Modified) [25]
Multi-omics GAT (Original) [7]
Multi-omics GAT (Modified)
mRNA
(cid:88)
(cid:88)
(cid:88)
(cid:88)
(cid:88)
(cid:88)
(cid:88)
–
(cid:88)
(cid:88)
(cid:88)
(cid:88)
–
(cid:88)
–
(cid:88)
–
(cid:88)
(cid:88)
(cid:88)
(cid:88)
Intra-omic
(cid:88)
(cid:88)
(cid:88)
(cid:88)
–
(cid:88)
(cid:88)
Inter-omic
–
–
–
–
(cid:88)
–
–
GNN Layer
GCN
(cid:88)
(cid:88)
(cid:88)
(cid:88)
–
–
–
–
–
–
–
(cid:88)
(cid:88)
(cid:88)
–
–
(cid:88)
(cid:88)
–
–
–
Parallel
–
–
(cid:88)
(cid:88)
–
–
–
Fully-connected Neural Network (FC-NN)
The FC-NN is one of the widely used deep learning model for data in Euclidean
space. The implemented structure is the same as the parallel structure. The input
data is passed through a dimension-increase layer and then flattened. The flattened
data is passed through three hidden layers and a softmax layer for classification.
GCN Models by Ramirez et. al.
The GCN model on cancer type classification is designed for gene expression data
with intra-omic connections only [23]. The implementation of the original structure
and the modified structure is a GCN model with no regularization modules.
Multi-omics GCN Models by Li et al.
The multi-omics GCN model on cancer molecular subtype classification is designed
for gene expression and CNV data with intra-omic connections only [1]. The im-
plementation of both structures is a GCN model with a decoder and a parallel
structure as shown in Table 2.
Li and Nabavi
Page 11 of 18
GrAMME
Since GrAMME is not designed for cancer type classification [25], we modified the
original structure for multi-omics data. GrAMME is designed for a GAT model
with intra-omic connections only. The implementation is a GAT model with no
regularization modules.
Multi-omics GAT by Kaczmarek et al.
The multi-omics graph transformer on 12 cancer type classification is designed for
gene expression and miRNA data with inter-omics connections only [7]. As shown
in Table 2, the main difference between multi-omics GAT and GrAMME is the
construction of the graph.
Performance on Classification
Table 3: Results of the Proposed and Baseline Models with 700 Genes for Molecu-
lar Subtype Classification on the TCGA Pan-cancer Dataset And Cancer Subtype
Classificaiton on the TCGA BRCA Dataset
Model
Proposed w/ GAT
Proposed w/ GCN
FC-NN
GCN (Original) [23]
GCN (Modified)
Multi-omics GCN (Original) [1]
Multi-omics GCN (Modified)
GrAMME (Modified) [25]
Multi-omics GAT (Original) [7]
Multi-omics GAT (Modified)
The bold font indicates the highest values
1 Accu. stands for Accuracy.
2 Prec. stands for Precision.
Accu.1
83.9% 0.84
81.2% 0.81
78.4% 0.75
77.6% 0.76
78.5% 0.77
78.6% 0.78
80.2% 0.79
81.4% 0.81
76.3% 0.76
79.7% 0.79
Pan-cancer
F1
Prec.2 Recall
0.84
0.82
0.75
0.77
0.78
0.78
0.80
0.82
0.76
0.79
0.85
0.82
0.78
0.78
0.78
0.78
0.81
0.82
0.77
0.80
BRCA
F1
Accu.1
86.4% 0.87
83.8% 0.84
80.8% 0.80
82.8% 0.84
81.8% 0.82
81.8% 0.82
82.8% 0.83
82.8% 0.84
81.8% 0.82
82.8% 0.84
Prec.2 Recall
0.87
0.85
0.80
0.85
0.83
0.82
0.84
0.83
0.82
0.84
0.88
0.84
0.81
0.84
0.81
0.81
0.83
0.83
0.82
0.81
For both classification tasks, the results of the proposed model and the baseline
models are shown in Table 3. The proposed model with GAT layers outperforms
all the baseline models for both tasks in all four metrics and the proposed model
with GCN layers achieves third for the pan-cancer classification, and second for the
breast cancer subtype classification. For the task of pan-cancer molecular subtype
classification, the additional omic data in the modified structure improve the model
performance in all three cases of the baseline model with the original structure vs.
the baseline model with the modified structure. For the same task, the multi-omics
GCN model with the decoder and parallel structure shows superior performance
among all the baseline models that utilize GCN layers. And GrAMME, which uti-
lizes intra-omic connections, performs better than GAT models that utilize inter-
omics connections. GrAMME is the best-performing one among the baseline models
for the pan-cancer task. Overall, we see the proposed model achieves the best per-
formance for the classification task on the complex pan-cancer molecular subtype
classification in all four metrics and we can conclude that more omics improve the
performance of models, and the models with more restriction modules or GAT layers
have better performance.
For breast cancer subtype classification, the overall trend is slightly different from
that in the previous task. In most cases of including more omics, the performance
Li and Nabavi
Page 12 of 18
of the models shows little or no improvement. We believe it is due to the nature of
breast cancer taxonomy. The subtype is based on the expression level of multiple
proteins. Thus, it makes the breast cancer subtype to be more closely related to the
gene expression omic than the pan-cancer molecular subtype does. Such character-
istic of the breast cancer subtype makes the model only using gene expression data
perform very well such as the original GCN model. However, the proposed model
still outperforms any baseline models by a large margin in all four metrics.
Ablation Study
We conduct an ablation study to evaluate the effects of different numbers of genes,
different combinations of modules within the model, and different combination of
omics and graphs on the performance of the proposed model.
Different Numbers of Genes
Table 4: Results of the Proposed Model and Baseline Models with 300 and 500
Genes for Molecular Subtype Classification Using the TCGA Pan-cancer Dataset
300
500
Model
F1
Accu.1
77.6% 0.76
75.8% 0.74
65.9% 0.59
74.5% 0.72
75.5% 0.72
76.4% 0.76
77.4% 0.76
77.4% 0.76
73.4% 0.71
75.8% 0.74
Proposed w/ GAT
Proposed w/ GCN
FC-NN
GCN (Original)
GCN (Modified)
Multi-omics GCN (Original)
Multi-omics GCN (Modified)
GrAMME (Modified)
Multi-omics GAT (Original)
Multi-omics GAT (Modified)
The bold font indicates the highest values
1 Accu. stands for Accuracy.
2 Prec. stands for Precision.
Prec.2 Recall
0.76
0.74
0.57
0.72
0.73
0.75
0.76
0.76
0.70
0.74
0.77
0.74
0.59
0.71
0.72
0.76
0.77
0.77
0.71
0.74
F1
Accu.
81.6% 0.80
80.0% 0.79
77.5% 0.74
76.1% 0.73
77.9% 0.77
77.4% 0.77
78.2% 0.75
79.6% 0.79
75.1% 0.74
77.4% 0.74
Prec.
0.80
0.78
0.73
0.73
0.77
0.77
0.74
0.79
0.74
0.75
Recall
0.81
0.79
0.74
0.72
0.76
0.78
0.77
0.80
0.74
0.75
We trained the proposed model and all baseline models at the 300 and 500 genes
for pan-cancer molecular subtype classification and 300, 500, 1000, 2000, and 5000
genes for breast cancer subtype classification. The limitation of the test scope on
pan-cancer classification is due to the computation constraints caused by its large
number of samples. As shown in Table 4, increasing the number of gene nodes im-
proves the performance of all models. FC-NN model demonstrates great improve-
ment in performance as the number of genes increases. And the proposed model
with the GAT layer outperforms the baseline models at both numbers of genes.
The accuracy and F1 scores of the proposed model and the baseline models for
BRCA subtype classification are shown in Figure 4. The proposed model with GAT
performs best when the number of genes is smaller than 1000 and the proposed
model with GCN performs best when the number of genes is larger than 1000. The
proposed GAT-based model yields the best result with an accuracy of 88.9% and
an F1 score of 0.89 when using 700 genes; and the proposed GCN-based model
yields the best result with an accuracy of 90.1% and an F1 score of 0.90 when using
5000 genes. The detailed results are shown in the Table S1. The performance of the
proposed model with GAT deteriorates beyond 1,000 genes, but the performance of
the proposed model with GCN continues to rise as the number of genes grows beyond
1,000 genes. All GAT-based baseline models show similar deterioration around 1000
Li and Nabavi
Page 13 of 18
Figure 4: Performance of the Proposed Models and Baseline Models with Differ-
ent Numbers of Genes on BRCA Dataset
(a) The accuracy of the proposed model with GAT (blue solid line) or GCN
(orange solid line) and baseline models (dashed line) are plotted against differ-
ent numbers of genes (300, 500, 700, 1000, 2000, and 5000) for BRCA subtype
classification.
(b) The F1 scores of the proposed model with GAT (blue solid line) or GCN
(orange solid line) and baseline models (dashed line) are plotted against differ-
ent numbers of genes (300, 500, 700, 1000, 2000, and 5000) for BRCA subtype
classification.
Li and Nabavi
Page 14 of 18
genes. We think the high computation cost of the GAT-based model can cause it
to perform worse on a large graph than on a small graph. Overall, we can conclude
that the proposed model with GCN layers scales better than that with GAT layers
at a large number of genes.
In the process of testing the models on a large graph, we also find that a GAT-
based model is more stable on a smaller learning rate compared to a GCN-based
model. We believe it is caused by GAT's high computation costs since a high learning
rate may cause the model to be stuck in a local optimum.
Overall, we see the proposed model achieves the best performance and scales well
with a larger number of genes. We can also conclude that more genes and more omics
mostly improve the performance of models, the models with more modules have
better performance, and GAT-based models perform better with smaller graphs
while GCN-based models scale better at larger graphs.
Different Combinations of Modules
To examine the effect of different modules within the proposed model, we test
three different variants of the proposed model for the Pan-cancer molecular subtype
classification. All variants of the proposed model are trained with all three omics
data at 300, 500, and 700 genes. The proposed model without the decoder acts as a
parallel structured GNN model, the proposed model without the parallel structure
acts as a graph autoencoder model, and the proposed model without both the
decoder and the parallel structure acts as a graph-classification GNN model.
Table 5: Results of the Variants of the Proposed Model for Molecular Subtype
Classification Using the TCGA Pan-cancer Dataset.
300
GNN Layers (Module)
GAT (No Decoder)
GCN (No Decoder)
GAT (No Parallel)
GCN (No Parallel)
GAT (No Decoder & Parallel)
GCN (No Decoder & Parallel)
The bold font indicates the highest values
1 Accu. stands for Accuracy.
F1
Accu.1
76.3% 0.76
75.3% 0.74
75.4% 0.73
73.5% 0.72
74.9% 0.73
73.1% 0.73
500
F1
Accu.1
78.2% 0.77
76.8% 0.75
76.1% 0.73
75.4% 0.73
76.4% 0.74
75.6% 0.73
700
F1
Accu.1
80.2% 0.79
0.78
79.3%
79.8%
0.78
76.7 % 0.75
0.79
80.1%
0.76
77.3%
As shown in Table 5, models without the parallel structure perform poorly com-
pared to those without the decoder at any number of genes in general. It shows
that the parallel structure plays an important role in feature extraction, which also
demonstrates the benefit of including both local features and global features. When
the graph size is small (300 genes), the model without the decoder and the parallel
structure performs more poorly compared to those with either component. However,
when the graph size is large enough (500 genes and 700 genes), the model without
the decoder and the parallel structure performs relatively the same compared to
those with either of the component. We believe the extra information in the large
graph compensates for the loss in performance caused by the exclusion of either the
decoder or the parallel structure.
Different Combination of Omics and Graphs
To test the effect of different choices of omics and different graphs, we generate five
different combinations of omics. The five combinations of omics are mRNA, miRNA,
Li and Nabavi
Page 15 of 18
Table 6: Results of the Proposed Model on Different Combinations of Omics and
Networks at 500 Genes Using the TCGA Pan-cancer Dataset.
Data
mRNA1
miRNA2
mRNA+CNV1
mRNA+miRNA
mRNA+CNV+miRNA
Network
Intra-omic3
Intra-omic4
Intra-omic3
Inter-omic
Intra-omic
Inter-omic
Intra-omic
GAT
F1
Accu.5
77.0% 0.748
74.0% 0.698
79.1% 0.770
76.1% 0.733
77.3% 0.750
80.3% 0.800
80.5% 0.802
GCN
F1
Accu.5
76.1% 0.734
68.2% 0.634
77.1% 0.757
75.4% 0.733
76.8% 0.735
77.4% 0.742
78.2% 0.753
The bold font indicates the highest values
1 Data contains no miRNA-based nodes, so only 500 gene nodes in the graph
2 Data contains no gene-based nodes, so only 100 miRNA nodes in the graph
3 The graph contains only gene-gene connections.
4 The graph contains only miRNA-miRNA meta-path connections.
5 Accu. stands for accuracy.
mRNA + CNV, mRNA + miRNA, and mRNA + CNV + miRNA. For mRNA +
miRNA and mRNA + CNV + miRNA, two different variants of graphs are also
tested. All models are conducted for Pan-cancer molecular subtype classification,
and trained with 500 genes except for only miRNA omic, which contains only 100
miRNA nodes. As shown in Table 6, the best-performing setting is mRNA + CNV
+ miRNA with intra-omic edges for both GAT-based and GCN-based models. The
worst-performing setting is miRNA, which has the smallest graph size and informa-
tion. Models on mRNA + CNV perform better than those on mRNA + miRNA, but
adding miRNA to mRNA + CNV (mRNA + CNV + miRNA setting) still improves
the model performance. Models with intra-omic graph performs slightly better than
models with inter-omics graph. The performance difference across different settings
is the same for both GAT-based and GCN-based models.
Conclusion
In this study, we propose a novel end-to-end multi-omics GNN framework for ac-
curate and robust cancer subtype classification. The proposed model utilizes multi-
omics data in the form of a heterogeneous multi-layer graph, which is the supra-
graph built from GGI network, miRNA-gene target network, and miRNA meta-
path. The supra-graph approach combines both inter-omics and intra-omic connec-
tions from established biological knowledge. The proposed model outperforms all
four baseline models for cancer molecular subtype classification. We do a thorough
comparative analysis of GAT and GCN based models at different numbers of gene
settings, different combinations of omics, and different graphs.
Comparing the proposed model to the baseline models, it achieves the best perfor-
mance for cancer molecular subtype classification and BRCA subtype classification.
The proposed model with GAT layers performs better than that with GCN layers
at smaller-size graphs (smaller than 1,000 genes). However, the performance of the
GAT-based model deteriorates as the size of the graph grows beyond a certain
threshold. On the other hand, the performance of the GCN-based model contin-
ues to improve as the size of the graph grows. Therefore, we can conclude that a
GAT-based model is more suitable on a smaller graph, where it has a higher feature
extraction ability and its computation cost isn't that high yet.
Li and Nabavi
Page 16 of 18
By studying the effect of different modules within the proposed model and dif-
ferent combinations of omics, we find the addition of a decoder and the parallel
structure, and including other omics improves the performance of the proposed
model. The benefit of using parallel structure outweighs that of decoder, especially
on smaller-size graphs, and the benefit of adding CNV is higher than that of adding
miRNA. We also find that using a graph with only intra-omic edges yields a better
performance than using a graph with only inter-omics edges, which agrees with the
results from the previous study [7].
The proposed model also has some limitations. We investigate only two well-
established and widely adopted GNN models. New models are emerging with the
recent blooming of studies in GNN models. As the size of the graph grows or more
omics are added, GAT-based models become more sensitive to parameters and take
a much longer time to train. It is our future research direction to overcome such
limitations.
In summary, incorporating gene-based and non-gene-based omic data in the form
of a supra-graph with inter-omics and intra-omic connections improves the cancer
subtype classification. The GAT-based model is preferable on smaller graphs than
the GCN-based model. GCN-based model is preferable when dealing with large and
complex graphs.
Acknowledgements
Not applicable.
Funding
This work is supported by the National Science Foundation (NSF) under grant No. 1942303, PI: Nabavi.
Abbreviations
Not applicable.
Availability of data and materials
TCGA Pan-cancer dataset and TCGA BRCA dataset are both obtained from Xena database
(https://xenabrowser.net) [31].
Ethics approval and consent to participate
Not applicable.
Competing interests
The authors declare that they have no competing interests.
Consent for publication
Not applicable.
Authors' contributions
B.L. obtained the TCGA data and network data. B.L. designed the new method and analyzed the results. B.L. and
S.N. drafted the manuscript and revised the manuscript together. Both authors have approved the final manuscript.
Author details
Department of Computer Science and Engineering, University of Connecticut, Storrs, US.
References
1. Li, B., Wang, T., Nabavi, S.: Cancer molecular subtype classification by graph convolutional networks on
multi-omics data. Proceedings of the 12th ACM Conference on Bioinformatics, Computational Biology, and
Health Informatics, BCB 2021 1 (2021). doi:10.1145/3459930.3469542
2. Zhang, X., Zhang, J., Sun, K., Yang, X., Dai, C., Guo, Y.: Integrated multi-omics analysis using variational
autoencoders: Application to pan-cancer classification. Proceedings - 2019 IEEE International Conference on
Bioinformatics and Biomedicine, BIBM 2019, 765–769 (2019). doi:10.1109/BIBM47256.2019.8983228
3. Yang, B., Zhang, Y., Pang, S., Shang, X., Zhao, X., Han, M.: Integrating multi-omic data with deep subspace
fusion clustering for cancer subtype prediction. IEEE/ACM Transactions on Computational Biology and
Bioinformatics XX, 1–1 (2019). doi:10.1109/tcbb.2019.2951413
4. Sharifi-Noghabi, H., Zolotareva, O., Collins, C.C., Ester, M.: Moli: Multi-omics late integration with deep neural
networks for drug response prediction. Bioinformatics 35, 501–509 (2019). doi:10.1093/bioinformatics/btz318
Li and Nabavi
Page 17 of 18
5. Wang, T., Shao, W., Huang, Z., Tang, H., Zhang, J., Ding, Z., Huang, K.: Mogonet integrates multi-omics
data using graph convolutional networks allowing patient classification and biomarker identification. Nature
Communications 12, 3445 (2021). doi:10.1038/s41467-021-23774-w
6. Ma, T., Zhang, A.: Integrate multi-omics data with biological interaction networks using multi-view
factorization autoencoder (mae). BMC Genomics 20, 1–11 (2019). doi:10.1186/s12864-019-6285-x
7. Kaczmarek, E., Jamzad, A., Imtiaz, T., Nanayakkara, J., Renwick, N., Mousavi, P.: Multi-omic graph
transformers for cancer classification and interpretation. Pacific Symposium on Biocomputing. Pacific
Symposium on Biocomputing 27, 373–384 (2022)
8. Lotfollahi, M., Litinetskaya, A., Theis, F.J.: Multigrate : single-cell multi-omic data integration, 1–5 (2022).
doi:10.1101/2022.03.16.484643
9. Huang, Z., Zhan, X., Xiang, S., Johnson, T.S., Helm, B., Yu, C.Y., Zhang, J., Salama, P., Rizkalla, M., Han,
Z., Huang, K.: Salmon: Survival analysis learning with multi-omics neural networks on breast cancer. Frontiers
in Genetics 10, 1–13 (2019). doi:10.3389/fgene.2019.00166
10. Bai, J., Li, B., Nabavi, S.: Semi-supervised classification of disease prognosis using cr images with clinical data
structured graph. In: Proceedings of the 13th ACM International Conference on Bioinformatics, Computational
Biology and Health Informatics, pp. 1–9 (2022)
11. Chai, H., Zhou, X., Zhang, Z., Rao, J., Zhao, H., Yang, Y.: Integrating multi-omics data through deep learning
for accurate cancer prognosis prediction. Computers in biology and medicine 134, 104481 (2021)
12. Heo, Y.J., Hwa, C., Lee, G.H., Park, J.M., An, J.Y.: Integrative multi-omics approaches in cancer research:
From biological networks to clinical subtypes. Molecules and Cells 44, 433–443 (2021).
doi:10.14348/molcells.2021.0042
13. Hoadley, K.A., Yau, C., Wolf, D.M., Cherniack, A.D., Tamborero, D., Ng, S., Leiserson, M.D., Niu, B.,
McLellan, M.D., Uzunangelov, V., et al.: Multiplatform analysis of 12 cancer types reveals molecular
classification within and across tissues of origin. Cell 158(4), 929–944 (2014)
14. Mateo, J., Steuten, L., Aftimos, P., Andr ́e, F., Davies, M., Garralda, E., Geissler, J., Husereau, D.,
Martinez-Lopez, I., Normanno, N., et al.: Delivering precision oncology to patients with cancer. Nature
Medicine 28(4), 658–665 (2022)
15. Hoadley, K.A., Yau, C., Hinoue, T., Wolf, D.M., Lazar, A.J., Drill, E., Shen, R., Taylor, A.M., Cherniack, A.D.,
Thorsson, V., et al.: Cell-of-origin patterns dominate the molecular classification of 10,000 tumors from 33
types of cancer. Cell 173(2), 291–304 (2018)
16. Defferrard, M., Bresson, X., Vandergheynst, P.: Convolutional neural networks on graphs with fast localized
spectral filtering. Advances in Neural Information Processing Systems, 3844–3852 (2016)
17. Zou, J., Huss, M., Abid, A., Mohammadi, P., Torkamani, A., Telenti, A.: A primer on deep learning in
genomics. Nature genetics 51(1), 12–18 (2019)
18. He, S., Pepin, L., Wang, G., Zhang, D., Miao, F.: Data-driven distributionally robust electric vehicle balancing
for mobility-on-demand systems under demand and supply uncertainties. In: 2020 IEEE/RSJ International
Conference on Intelligent Robots and Systems (IROS), pp. 2165–2172. IEEE
19. Wang, T., Li, B., Nabavi, S.: Single-cell rna sequencing data clustering using graph convolutional networks. In:
2021 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pp. 2163–2170 (2021). IEEE
20. Nicora, G., Vitali, F., Dagliati, A., Geifman, N., Bellazzi, R.: Integrated multi-omics analyses in oncology: a
review of machine learning methods and tools. Frontiers in oncology 10, 1030 (2020)
21. Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Philip, S.Y.: A comprehensive survey on graph neural networks.
IEEE transactions on neural networks and learning systems (2020)
22. Velickovi ́c, P., Cucurull, G., Casanova, A., Romero, A., Li`o, P., Bengio, Y.: Graph attention networks. arXiv,
1–12 (2017)
23. Ramirez, R., Chiu, Y.-C., Hererra, A., Mostavi, M., Ramirez, J., Chen, Y., Huang, Y., Jin, Y.-F.: Classification
of cancer types using graph convolutional neural networks. Frontiers in physics 8 (2020)
24. Wang, T., Bai, J., Nabavi, S.: Single-cell classification using graph convolutional networks. BMC bioinformatics
22(1), 1–23 (2021)
25. Shanthamallu, U.S., Thiagarajan, J.J., Song, H., Spanias, A.: Gramme: Semisupervised learning using
multilayered graph attention models. IEEE Transactions on Neural Networks and Learning Systems 31,
3977–3988 (2020). doi:10.1109/TNNLS.2019.2948797
26. Onitilo, A.A., Engel, J.M., Greenlee, R.T., Mukesh, B.N.: Breast cancer subtypes based on er/pr and her2
expression: comparison of clinicopathologic features and survival. Clinical medicine & research 7(1-2), 4–13
(2009)
27. Oughtred, R., Rust, J., Chang, C., Breitkreutz, B.J., Stark, C., Willems, A., Boucher, L., Leung, G., Kolas, N.,
Zhang, F., Dolma, S., Coulombe-Huntington, J., Chatr-Aryamontri, A., Dolinski, K., Tyers, M.: The BioGRID
database: A comprehensive biomedical resource of curated protein, genetic, and chemical interactions. Protein
Sci 30(1), 187–200 (2021)
28. Chen, Y., Wang, X.: mirdb: an online database for prediction of functional microrna targets. Nucleic acids
research 48(D1), 127–131 (2020)
29. Lee, B., Zhang, S., Poleksic, A., Xie, L.: Heterogeneous multi-layered network model for omics data integration
and analysis. Frontiers in Genetics 10, 1–11 (2020). doi:10.3389/fgene.2019.01381
30. 13, B..W.H..H.M.S.C.L...P.P.J..K.R., data analysis: Baylor College of Medicine Creighton Chad J. 22 23
Donehower Lawrence A. 22 23 24 25, G., for Systems Biology Reynolds Sheila 31 Kreisberg Richard B. 31
Bernard Brady 31 Bressler Ryan 31 Erkkila Timo 32 Lin Jake 31 Thorsson Vesteinn 31 Zhang Wei 33
Shmulevich Ilya 31, I., et al.: Comprehensive molecular portraits of human breast tumours. Nature 490(7418),
61–70 (2012)
31. Goldman, M.J., Craft, B., Hastie, M., Repeˇcka, K., McDade, F., Kamath, A., Banerjee, A., Luo, Y., Rogers,
D., Brooks, A.N., et al.: Visualizing and interpreting cancer genomics data via the xena platform. Nature
biotechnology 38(6), 675–678 (2020)
Li and Nabavi
Page 18 of 18
Additional Files
Additional file 1: Detailed Results for BRCA
|
|
http://arxiv.org/abs/2302.12692v4 | 2023-05-04T18:04:49 | 2023-02-24T15:35:36 | Language Models are Few-shot Learners for Prognostic Prediction | Clinical prediction is an essential task in the healthcare industry. However,
the recent success of transformers, on which large language models are built,
has not been extended to this domain. In this research, we explore the use of
transformers and language models in prognostic prediction for immunotherapy
using real-world patients' clinical data and molecular profiles. This paper
investigates the potential of transformers to improve clinical prediction
compared to conventional machine learning approaches and addresses the
challenge of few-shot learning in predicting rare disease areas. The study
benchmarks the efficacy of baselines and language models on prognostic
prediction across multiple cancer types and investigates the impact of
different pretrained language models under few-shot regimes. The results
demonstrate significant improvements in accuracy and highlight the potential of
NLP in clinical research to improve early detection and intervention for
different diseases. | [
"Zekai Chen",
"Mariann Micsinai Balan",
"Kevin Brown"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12692v4",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12692v4",
"@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",
"q-bio.QM"
] | Language Models Are Few-shot Learners for Prognostic Prediction
Zekai Chen and Mariann Micsinai Balan and Kevin Brown
Bristol-Myers Squibb, NJ, USA
{zekai.chen}@bms.com
3
2
0
2
y
a
M
4
]
L
C
.
s
c
[
4
v
2
9
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Clinical prediction is an essential task in the
healthcare industry. However, the recent suc-
cess of transformers, on which large language
models are built, has not been extended to this
domain. In this research, we explore the use of
transformers and language models in prognos-
tic prediction for immunotherapy using real-
world patients' clinical data and molecular pro-
files. This paper investigates the potential
of transformers to improve clinical prediction
compared to conventional machine learning
approaches and addresses the challenge of few-
shot learning in predicting rare disease areas.
The study benchmarks the efficacy of base-
lines and language models on prognostic pre-
diction across multiple cancer types and inves-
tigates the impact of different pretrained lan-
guage models under few-shot regimes. The
results demonstrate significant improvements
in accuracy and highlight the potential of NLP
in clinical research to improve early detection
and intervention for different diseases.
1
Introduction
Predicting and measuring treatment response is
among the most fundamental tasks in clinical
medicine. Particularly, in cancer immunother-
apy (Pardoll, 2012), antibodies against pro-
grammed death-1/programmed death ligand 1 (PD-
1/PD-L1) have led to US FDA approval of several
PD-1/PD-L1 treatment strategies for patients with
metastatic cancer. However, not all patients derive
clinical benefits (Topalian et al., 2016), empha-
sizing the need to identify who will respond to im-
munotherapy (Chowell et al., 2021). Thus, accurate
treatment response and disease progress forecast
based on the patient's clinical features and molec-
ular profile will effectively improve the treatment
efficiency and spur the development of precise med-
ication.
In order to facilitate medical decision-
making and health outcomes, clinical prediction
models (Steyerberg, 2008; Smeden et al., 2021)
Figure 1: Pilot study. We evaluate the prediction
performance (AUC) of a patient's probability of im-
munotherapy response across multiple cancer types un-
der settings with a small number of training samples on
a public clinical dataset from Chowell et al. (2021).
play an increasingly crucial role in contemporary
clinical care by informing professionals, patients,
and their relatives about outcome risks.
Given the fact that most clinical data is stored in
tabular form, current mainstream machine learning
approaches (Topol, 2019; Rajkomar et al., 2019)
to cancer prognosis (Chowell et al., 2021) are
still tree-based ensemble models such as boost-
ing (Chen and Guestrin, 2016; Ke et al., 2017) and
bagging (Breiman, 2004; Ishwaran et al., 2019). In
contrast, transformers (Vaswani et al., 2017) have
revolutionized enormous fields including natural
language processing (NLP) (Devlin et al., 2019;
Brown et al., 2020) and computer vision (Doso-
vitskiy et al., 2021). Many attempts to apply
transformers on tabular modeling (e.g., TabTrans-
former Huang et al., 2020) have also achieved suc-
cess. Considering that the disparity between clini-
cal data and other natural tabular data is not large,
it is appealing that we can also translate this suc-
cess from other domains to clinical prediction. As
such, we seek to answer the first question in this
612182430364248Number of Samples0.500.550.600.650.700.750.80Area Under Curve w.r. Best Overall ResponseLogistic RegressionRandom ForestXgBoostTransformerBaseline
Figure 2: An illustration of adapting LLMs for clinical prediction. The clinical data entry is first serialized
into sequences of natural language tokens and then fed into the frozen LLMs, followed by a randomly initialized
encoder (transformers or MLPs or identical blocks) to finetune with the multi-loss objective same as Eq. 1.
paper: To what extent can transformers promote
the performance of clinical prediction compared to
conventional machine learning approaches?
Although transformers have advantages in mod-
eling high-dimensional tabular data thanks to the
capacity of long-distance dependency modeling,
their efficacy can still be hampered when labeled
data is scarce given the nature of data-hungry and
low inductive bias (d'Ascoli et al., 2021). This
could be vital to predicting many rare disease areas
where historical patient records are extremely lim-
ited (Haendel et al., 2019). Our pilot investigations
(see Figure 1) also confirmed this. Meanwhile, we
seek to provide a systematic solution to the clini-
cal prediction that functions both in the presence
and absence of much labeled data. Recently, large
language models (LLMs) built as a stack of trans-
formers such as BERT (Devlin et al., 2019), GPT-
3 (Brown et al., 2020) provide a viable direction.
The simple and scalable self-supervised learning
(e.g., masked signal prediction (Devlin et al., 2019;
Chen et al., 2022)) on a nearly unlimited corpus
of text (e.g., PubMed1, PMC2) has led LLMs to
not only continuous performance improvements
but also a surprising emergence of in-context learn-
ing capability, which is especially powerful under
settings with only a small number of learning sam-
ples also known as few-shot learning (Snell et al.,
2017; Sanh et al., 2022). Though recent work has
demonstrated that LLMs are good few-shot clinical
information extractors (Agrawal et al., 2022), this
success has yet not been extended to tasks with a
higher precision requirement, such as cancer prog-
nostic prediction. In this work, we therefore seek
to address this second question: How can language
models boost clinical prediction in few-shot set-
tings?
In addressing these questions, we conduct a
1https://pubmed.ncbi.nlm.nih.gov/
2https://www.ncbi.nlm.nih.gov/pmc/
benchmarking study on a real-world clinical dataset
MSK-IMPACT (Chowell et al., 2021) to assess
the efficacy of a set of baselines and LLMs on
prognostic prediction across multiple cancer types
(melanoma, NSCLC, bladder, etc.). More impor-
tantly, we explore how different pretrained LLMs
using different knowledge resources (domain-
specific or domain-agnostic) may affect the down-
stream performance of clinical prediction, espe-
cially under few-shot settings. Our results show sig-
nificant improvements in accuracy through overall
survival, progression-free survival and best overall
response prediction across multiple disease types.
2 LLMs for Few-Shot Clinical Prediction
Figure 2 is an overview of applying LLMs for clin-
ical prediction. As discussed in Section 1, purely
supervised learning via transformer encoders is of-
ten hampered when training samples are limited.
LLMs provide a viable direction with astonishing
in-context learning capability that exploits knowl-
edge from other resources to downstream tasks
with minimal tuning.
Serialization. To leverage LLMs on clinical tab-
ular data, the feature columns must be serialized
into sequences of natural language tokens that
LLMs can comprehend and encode. Recently, there
have been a few trials (Yin et al., 2020; Bertsi-
mas et al., 2022) investigating various serializa-
tion techniques and exploring the corresponding
performance across different tasks, which turns
out that LLMs for tabular modeling rely more on
the correct values than the structure of the fea-
tures (Hegselmann et al., 2022). To avoid repetitive
work, in this work, we focus more on how dif-
ferent pretrained LLMs using different knowledge
sources may affect the prediction performance by
simply following a manual serialization template,
The {attribute} is {value}., which has been
proven to generate competitive results compared to
CancerTypeAgeAlbuminDrug ClassOS MonthsBladder744.1PD1/PDL19.1NSCLC724.2Combo27.3Input: A patient has been diagnosed withBladder cancer. The age is 74. The albumin is4.1. The drug class is PD1/PDL1, etc. Template: The {attribute} is {value}.LLMs Encoder FinetuningMulti-LossObjetiveSerializationother LLMs prompting-based regeneration meth-
ods by Hegselmann et al. (2022).
Knowledge Sources. The pretraining corpus is
also known as the knowledge source for LLMs.
Clinical language is notably different from the stan-
dard NLP text in terms of vocabulary and syn-
tax (Wu et al., 2019). As a result, following ad-
vancements in language modeling from the larger
NLP community, the clinical NLP sub-community
frequently trains domain-specific models on clin-
ical corpora. Following BERT (Devlin et al.,
2019), various clinical and biomedical versions
appeared quickly, including BioBERT (Lee et al.,
2019), ClinicalBERT (Alsentzer et al., 2019), SciB-
ERT (Beltagy et al., 2019), PubMedBERT (Gu
et al., 2020), etc. However, domain-agnostic LLMs
like GPT-3 have so far been unable to achieve com-
petitive results on biomedical NLP tasks (Moradi
et al., 2021; Gutierrez et al., 2022), revealing the
fact that the relevance and the knowledge reserva-
tion of pretraining sources have a significant impact
to the knowledge migration in downstream tasks
(e.g., finetuning or prompting). Thus, we aim to
evaluate the downstream performance in few-shot
settings with a few different LLMs pretrained on
different resources and benchmark the gaps.
Omnivorous Loss Objective. Compared to con-
ventional machine learning approaches, deep learn-
ing allows efficient end-to-end learning of im-
age/text encoders in the presence of multi-modality
along with tabular data benefiting from the modu-
larized design. More importantly, the customized
loss objectives corresponding to different tasks can
often be combined for joint training, also known
as multi-task learning (Ruder, 2017). The induc-
tive transfer across related tasks can help improve
a model by introducing an inductive bias, which
causes a model to prefer some hypotheses over
others, that generally leads to solutions that gen-
eralize better. In cancer prognostic prediction, we
usually have multiple endpoints to predict. For
example, overall survival (OS), progression-free
survival (PFS), and best overall response (BOR),
etc. As such, in this work, we consistently adopt a
join learning paradigm that merges multiple end-
points into one unified loss objective Lf for all
studies using the following term:
Lf =
I
(cid:88)
i
αi(cid:96)i
(1)
Figure 3: An illustration of ClinTaT (right). Com-
pared to original TabTransformer (left), we add a con-
tinuous embedding layer for modeling continuous fea-
tures (e.g., lab values) and feed the concatenated inputs
into the transformer backbone.
where I is the total number of tasks and αi repre-
sents the soft weight for any task i. More specifi-
cally, in our experiments, we adopt CrossEntropy
loss for BOR and CoxPH loss for OS and PFS pre-
diction following DeepSurv (Katzman et al., 2018).
3 Experiments and Results
Data. This dataset is acquired by Memorial
Sloan Kettering Cancer Center (MSKCC) from a
comprehensively curated cohort (MSK-IMPACT)
with 1,479 patients treated with immune check-
point blockade (ICB) across 16 different cancer
types (Chowell et al., 2021), where patients are
either responder (R) or non-responders (NR) to
the treatment (PD-1/PD-L1 inhibitors, CTLA-4
blockade or a combination) based on Response
Evaluation Criteria in Solid Tumors (RECIST)
v1.1 (Eisenhauer et al., 2009) or best overall re-
sponse on imaging. Each patient was collected
up to 16 biological features, including genomic,
molecular, clinical, and demographic variables.
The train set contains 1,184 patients, and the test
set contains 295 patients. The evaluation target is
to predict clinical response to immunotherapy (bi-
nary classification) and both overall survival and
progression-free survival (regression) in the test
data across different cancer.
Transformers for Tabular Modeling. As we
need to compare with transformer baselines, we
also introduce ClinTaT (see Figure 3 right) with
some improvements based on the original Tab-
Transformer (Huang et al., 2020), including 1)
adding a continuous embedding layer which is con-
sisted of several independent linear layers corre-
sponding to the number of continuous features; 2)
directly concatenating the embedded categorical
FlattenedTransformerCategoricalEmbedding LayerNormalizeCategoricalFeaturesContinuousFeaturesConcatCategoricalEmbedding LayerCategoricalFeaturesContinuousFeaturesMLPMLPContinuousEmbedding LayerConcatTransformerTabTransformerClinTaTFigure 4: Model performance across multiple cancer types on test data. Comparison of predictive performance
on MSK-IMPACT in terms of ROC curves and AUC between ClinTaT and other baselines in melanoma, NSCLC,
other cancer types and Pan-cancer.
Figure 5: Model predicts OS and PFS across multiple cancer types on the test data. Comparison of differences
in overall survival between predicted responders and non-responders across multiple cancer types by ClinTaT.
and continuous variables together, and feed them
into the transformer instead of only categorical vari-
ables.
Training settings. For fair comparison, we adopt
a hidden dimensionality of 768 for both ClinTaT
and BERTs (base versions). Specifically, ClinTaT
is a stack of 6 transformer encoder layers with 8
heads. To prevent overfitting, we set the attention
dropout rate to 0.3 and feedforward dropout rate
to 0.1. For BERTs, all layers are frozen while
we add one independent encoder on top of it to
finetune. In the main figures and tables, we utilize
a single linear layer to demonstrate the feasibility
of LLMs for few-shot regimes. In ablation studies,
we also investigate other encoder types such as
another small transformer encoder. The optimizer
of AdamW is adopted consistently for all trainings,
and the basic learning rates for ClinTaT and BERTs
are 1.25e−4 and 1.25e−5 with a weight decay of
0.01, correspondingly. A linear warmup (up to 5
epochs with a total training of 200 epochs) with
cosine annealing strategy (warmup learning rate is
set to 2.5e−7) is also applied. For other machine
learning baselines, we utilize the grid search to find
the optimal hyper-parameters and report the best
results. More details can be found in the appedix.
How do transformers promote clinical predic-
tion performance? We first calculated the area
under the receiver operating characteristic (ROC)
curves using the response probabilities computed
by transformers and other baselines. Our proposed
ClinTaT achieved superior performance on the test
set, as indicated by the area under the curve (AUC),
in predicting responders and non-responders across
cancer types compared to conventional machine
learning models such as logistic regression, ran-
dom forest, and XgBoost, suggesting that the self-
attention mechanism for long-range dependency
modeling contributed to the overall prediction per-
formance. (Figure 4, Table 1 using all samples).
Furthermore, the differences in OS between respon-
ders and non-responders predicted by transformers
were significantly higher than differences between
responder and non-responder groups predicted by
other baselines across various cancer types (Fig-
ure 5). Especially for the predicted non-responders,
the predicted survival curves almost fit the ground-
truth ones perfectly, while it is interesting to ob-
serve that transformers tend to underestimate the
response probability with an attempt to balance out
the prediction performance across different can-
cer types compared to other baselines (0.809 of
0.00.20.40.60.81.0False Positive Rate0.00.20.40.60.81.0True Positive RateMelanomaLR (AUC: 0.788)RF (AUC: 0.776)XGB (AUC: 0.785)ClinTaT (AUC: 0.797)0.00.20.40.60.81.0False Positive Rate0.00.20.40.60.81.0True Positive RateNSCLCLR (AUC: 0.768)RF (AUC: 0.825)XGB (AUC: 0.828)ClinTaT (AUC: 0.809)0.00.20.40.60.81.0False Positive Rate0.00.20.40.60.81.0True Positive RateOthersLR (AUC: 0.743)RF (AUC: 0.785)XGB (AUC: 0.791)ClinTaT (AUC: 0.800)0.00.20.40.60.81.0False Positive Rate0.00.20.40.60.81.0True Positive RatePan-CancerLR (AUC: 0.758)RF (AUC: 0.795)XGB (AUC: 0.796)ClinTaT (AUC: 0.815)0612182430364248Overall survival (months)0.000.250.500.751.00Survival probabilityMelanomaGroundtruth RGroundtruth NRPredicted RPredicted NRPredicted NR At risk 11 Censored 0 Events 0Predicted R At risk 26 Censored 0 Events 0407240230819253081466218911612841480382168038018803801880612182430364248Overall survival (months)0.000.250.500.751.00Survival probabilityNSCLCGroundtruth RGroundtruth NRPredicted RPredicted NRPredicted NR At risk 61 Censored 0 Events 0Predicted R At risk 47 Censored 0 Events 0382213501224433300171211381613184154212171831543619222164322322017440242301744024230612182430364248Overall survival (months)0.000.250.500.751.00Survival probabilityPan-CancerGroundtruth RGroundtruth NRPredicted RPredicted NRPredicted NR At risk 179 Censored 0 Events 0Predicted R At risk 116 Censored 0 Events 0109466950216812998033332341135324391348118344141851120155249356120561501571211645105812106551Model
LogRes
RandomForest
XgBoost
ClinTaTours
Number of Samples
6
0.534
0.643
0.500
0.641
12
0.535
0.527
0.602
0.619
18
0.573
0.672
0.670
0.653
24
0.511
0.539
0.586
0.607
30
0.527
0.594
0.613
0.584
36
0.570
0.667
0.664
0.659
42
0.601
0.651
0.651
0.664
48
0.678
0.701
0.681
0.676
all
0.758
0.795
0.796
0.815
Table 1: Test AUC performance on treatment response prediction of ClinTaT and other baselines on MSK-IMPACT.
Each column reports the k-shot performance for different values of k. ClinTaT outperforms other traditional ap-
proaches with all training samples, however not significant in the most few-shot regimes.
Model
LogRes
RandomForest
XgBoost
ClinTaTours
Number of Samples
6
0.500
0.637
0.500
0.583
12
0.503
0.502
0.555
0.615
18
0.551
0.614
0.601
0.614
24
0.511
0.536
0.539
0.639
30
0.545
0.591
0.618
0.610
36
0.557
0.610
0.628
0.647
42
0.549
0.626
0.614
0.643
48
0.564
0.631
0.609
0.645
all
0.649
0.682
0.688
0.724
Table 2: Test C-index performance on Overall Survival prediction of ClinTaT and other baselines on MSK-
IMPACT. ClinTaT generally outperforms other traditional approaches under many settings, however still not sig-
nificant in the very-few-shot regime (e.g., ≤ 6 samples).
Model
LogRes
RandomForest
XgBoost
ClinTaTours
Number of Samples
6
0.515
0.611
0.500
0.585
12
0.513
0.529
0.514
0.505
18
0.538
0.612
0.594
0.547
24
0.514
0.532
0.569
0.520
30
0.537
0.580
0.600
0.538
36
0.549
0.619
0.619
0.553
42
0.565
0.615
0.612
0.555
48
0.596
0.627
0.620
0.617
all
0.648
0.666
0.671
0.684
Table 3: Test C-index performance on Progression-free Survival prediction of ClinTaT and other baselines on
MSK-IMPACT. ClinTaT performs better than other approaches only with all training samples.
ClinTaT versus 0.828 of XGB in Fig. 4). It is addi-
tionally beneficial to rare diseases prediction when
the training sample pool is not large.
To test whether our approach could also pre-
dict overall survival (OS) before the administration
of immunotherapy, we further calculated the con-
cordance index (C-index) for OS and PFS, which
ranges between 0 and 1 (0.5 being random perfor-
mance). We found that the C-indices of the ClinTaT
predictions were significantly higher than those
generated by other baselines (Table 2, pan-cancer
C-index 0.724 for ClinTaT versus 0.688 for Xg-
Boost versus 0.682 for Random Forest, p < 0.05;
Table 3, pan-cancer C-index 0.684 for ClinTaT ver-
sus 0.671 for XgBoost versus 0.666 for Random
Forest, p < 0.05). These results demonstrate that
the transformers can accurately forecast response,
OS, and PFS before administering immunotherapy.
However, Table 1, 2 and 3 also show that under
settings with only a small number of samples, the
prediction capability of transformers does not gen-
eralize well (e.g., 0.583 for ClinTaT versus 0.637
for Random Forest with only 6 samples on OS pre-
diction; 0.585 for ClinTaT versus 0.611 for Ran-
dom Forest with only 6 samples on PFS prediction)
due to the nature of data-hungry and low inductive
bias (discussed in Section 1).
How do LLMs boost few-shot learning? Ta-
ble 4 shows the performance of different BERTs
pretrained on different resource corpus followed
by a single linear layer for finetuning using only
[cls] token on MSK-IMPACT test data (averaged
over three seeds). The PubMedBERT (Gu et al.,
2020) outperforms all other variants and the base-
line transformer across all k-shot settings with an
average of improvements over 5%. In the very few
shot settings (4 samples), the language model fine-
tuning shows significant improvements over the
baseline (Table 4, 9.4%), indicating the benefit of
the capability of knowledge transferring to down-
stream tasks brought by LLMs when samples are
insufficient. Also, our results indicate that the sam-
Model
ClinTaTbaseline
BERT (Devlin et al., 2019)
BioBERT (Lee et al., 2019)
SciBERT (Beltagy et al., 2019)
ClinBERT (Alsentzer et al., 2019)
PubMedBERT (Gu et al., 2020)
Number of Samples
4
0.593
6
0.641
8
0.638
10
0.628
12
0.619
14
0.643
16
0.639
18
0.653
0.590
0.570
0.506
0.604
0.649(↑9.4%)
0.618
0.512
0.506
0.550
0.643(↑0.3%)
0.652
0.527
0.578
0.545
0.641(↑0.5%)
0.636
0.532
0.577
0.560
0.657(↑4.6%)
0.633
0.536
0.560
0.567
0.663(↑7.1%)
0.637
0.532
0.549
0.576
0.677(↑5.3%)
0.632
0.524
0.513
0.574
0.695(↑8.8%)
0.631
0.530
0.557
0.558
0.685(↑4.9%)
Table 4: Few-shot learning AUC performance of ClinTaT and variants of language models pretrained with different
corpus sources on MSK-IMPACT. Best results are in bold and the relative improvements have been marked in
purple. PubMedBERT (Gu et al., 2020) generally outperforms all the other variants across most settings with an
average of improvements over 5%.
Backbone
Encoder
BERT
BioBERT
SciBERT
ClinBERT
PubMedBERT
linear
transformer
linear
transformer
linear
transformer
linear
transformer
linear
transformer
AUC
0.725
0.773
0.678
0.766
0.689
0.786
0.669
0.751
0.745
0.771
COS
0.593
0.699
0.590
0.707
0.588
0.711
0.591
0.719
0.599
0.700
CPFS
0.622
0.657
0.625
0.672
0.620
0.656
0.616
0.665
0.634
0.662
Table 5: Ablation study on applying different encoders
for finetuning of treatment response prediction, includ-
ing a simple linear layer and a six-layer transformer en-
coder. Best results across backbones are in bold. Best
results across encoders are marked by purple. An addi-
tional transformer encoder on top of LLMs consistently
performs better than a simple linear layer.
ple efficiency of using LLMs' embeddings is highly
domain knowledge dependent. The performance
of SciBERT is worse than that of BioBERT and
ClinicalBERT as SciBERT was pretrained on all
semantic scholar 1.14M articles towards a more
general scientific knowledge learning.
In contrast, BioBERT and ClinicalBERT were
pretrained on the more domain-specific corpus,
such as PubMed, PMC, and clinical MIMIC III
notes3. However, we cannot claim that domain-
specific pretraining is necessary for all clinical pre-
diction tasks as Table 4 also reveals that vanilla
BERT is the second best and performs even bet-
ter than SciBERT pretrained on medical and com-
puter science articles. As we know, vanilla BERT
learns more general knowledge understanding from
domain-agnostic corpora such as Wikipedia and
Book corpus. One of our preliminary conjectures
is that domain-specific knowledge transfer is su-
3https://mimic.mit.edu/
perior when the pretraining corpus is sufficiently
profound. However, the generalization capability
learned by domain-agnostic models also works un-
der scenarios where the resource knowledge is nei-
ther domain-agnostic nor morally domain-specific.
Additionally, the performance down gradation
on BioBERT and ClinicalBERT compared to Pub-
MedBERT released more interesting findings as
PubMedBERT was pretraining from scratch. At the
same time, the other two models were pretrained
by inheriting vanilla BERT and BioBERT v1.04,
correspondingly. Gu et al. (2020) has also pointed
out that pretraining only sometimes benefits from
more text, including out-domain text. The prior
biomedical-related BERT models have yet to be
pretrained using purely biomedical text. Our Ta-
ble 4 also shows that domain-specific pretraining
from scratch can be superior to mixed-domain pre-
training for downstream applications.
Though all the results in Table 4 are generated
by adding one single linear layer on top of LLMs
for finetuning, we conduct more ablation studies in
Table 5 to evaluate the performance change using
different encoders (see Figure 2). The transformer
in Table 5 consists of only the transformer encoder
of a depth of six layers with a dimension of 768.
The results indicate that adding compute complex-
ity to LLMs can still lift the semantic representa-
tion learning of clinical features, as transformer
architecture performs better than a superficial lin-
ear layer. It also provides an alternative way to
reexamine the right size of LLMs and inspires us
for the next step, which is to adopt more scaled
LLMs such as PubMedGPT5, GPT-3 or T5 (Raffel
et al., 2019) for clinical prediction.
4https://huggingface.co/dmis-lab/biobert-v1.1
5https://crfm.stanford.edu/2022/12/15/
pubmedgpt.html
4 Limitations
This study is based on a single clinical cohort con-
sisted of 1479 patients, which may limit the gen-
eralizability of the results to other clinical cohorts.
This specific cohort of patients may not be represen-
tative enough of the general population, which may
inject certain level of bias brought by the dissimilar
distributions of gender, age, race, etc. While we en-
vision the generalization capability of the language
models is applicable to other clinical prediction
tasks, the focus of this work is majorly about prog-
nostic prediction of cancer immunotherapy, and we
hereby have not provided solid evidence to prove
that the success can also be extended to other rel-
evant trials. Additionally, we have yet only com-
pared a limited set of transformers and language
models, and it is possible that other models may
perform better on the tasks evaluated in this study.
Finally, it is important to note that while the mod-
els in this study achieve high accuracy in clinical
prediction, the ultimate value of these models in im-
proving patient outcomes will depend on how well
they are integrated into clinical decision-making
processes and the impact they have on patient care.
5 Ethical Considerations
As this work uses real-world patients' clinical data
and molecular profiles, which may raise concerns
about data privacy and confidentiality. We ensure
that all the patients' data is de-identified and pro-
tected from unauthorized access and use. The
public patient data was approved by the Memo-
rial Sloan Kettering Cancer Center (MSKCC) 6
institutional review board. Researchers have en-
sured that they obtain proper ethical approval and
informed consent from patients before using their
data. Even though this is a dataset that has been
carefully curated to prevent the negative impact
brought by human bias, there maybe existing a risk
of introducing bias into the clinical cohort of data
we analyze, particularly in the selection of patients
and the choice of clinical features and molecular
profiles. Additionally, the use of predictive models
to guide clinical decision-making might raise con-
cerns about fair access to healthcare. We hereby
ensure that the use of predictive models does not
result in the inequitable distribution of healthcare
resources and that patients from all socioeconomic
backgrounds have equal access to the best possi-
6https://www.mskcc.org/
ble care. This study uses natural language pro-
cessing and machine learning algorithms to predict
disease prognosis, which may raise broader ethi-
cal considerations related to the responsible use of
technology in healthcare. We ensure that the use
of all approaches discussed in this work is guided
by general ethical principles, such as transparency,
accountability, and patient-centered care.
Even though we focus on relatively large scale
language models in this work, our finetuning strat-
egy only requires a considerably small amount of
computation as only the encoder part needs to be
finetuned. In practice, the single linear layer fine-
tuning can be obtained in about 2 hours on a ma-
chine with single Nvidia A10 GPU; training com-
pletes within 5 hours on a machine with one Nvidia
A10 GPU for another transformer encoder with
a depth of 6 and dimensionality of 768. All the
pretrained language model weights are publicly
available (e.g., huggingface).
References
Monica Agrawal, Stefan Hegselmann, Hunter Lang,
Yoon Kim, and David A. Sontag. 2022. Large lan-
guage models are zero-shot clinical information ex-
tractors. ArXiv, abs/2205.12689.
Emily Alsentzer, John R. Murphy, Willie Boag, Wei-
Hung Weng, Di Jin, Tristan Naumann, and Matthew
B. A. McDermott. 2019. Publicly available clinical
bert embeddings. ArXiv, abs/1904.03323.
Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. Scib-
ert: A pretrained language model for scientific text.
EMNLP.
Dimitris Bertsimas, Kimberly Villalobos Carballo,
Yu Ma, Liangyuan Na, Léonard Boussioux, Cyn-
thia Zeng, Luis R. Soenksen, and Ignacio Fuentes.
2022. Tabtext: a systematic approach to aggregate
knowledge across tabular data structures. ArXiv,
abs/2206.10381.
L. Breiman. 2004. Random forests. Machine Learning,
45:5–32.
Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie
Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind
Neelakantan, Pranav Shyam, Girish Sastry, Amanda
Askell, Sandhini Agarwal, Ariel Herbert-Voss,
Gretchen Krueger, T. J. Henighan, Rewon Child,
Aditya Ramesh, Daniel M. Ziegler,
Jeff Wu,
Clemens Winter, Christopher Hesse, Mark Chen,
Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin
Chess, Jack Clark, Christopher Berner, Sam Mc-
Candlish, Alec Radford, Ilya Sutskever, and Dario
Amodei. 2020. Language models are few-shot learn-
ers. NeurIPS, abs/2005.14165.
Tianqi Chen and Carlos Guestrin. 2016. Xgboost: A
scalable tree boosting system. SIGKDD.
Zekai Chen, Devansh Agarwal, Kshitij Aggarwal,
Wiem Safta, Mariann Micsinai Balan, Venkat S.
Sethuraman, and Kevin Brown. 2022. Masked im-
age modeling advances 3d medical image analysis.
WACV, abs/2204.11716.
Diego Chowell, Seong-Keun Yoo, Cristina Valero,
Alessandro Pastore, Chirag Krishna, Mark Lee, Dou-
glas R. Hoen, Hongyu Shi, Daniel W. Kelly, Neal Pa-
tel, Vladimir Makarov, Xiaoxiao Ma, Lynda Vuong,
Erich Sabio, Kate Weiss, Fengshen Kuo, Tobias L.
Lenz, Robert M. Samstein, Nadeem Riaz, Prasad S.
Adusumilli, Vinod P. Balachandran, George Plitas,
A. Ari Hakimi, Omar Abdel-Wahab, Alexander N.
Shoushtari, Michael A. Postow, R. Motzer, Marc
Ladanyi, Ahmet Zehir, Michael F. Berger, Mithat
Gönen, Luc G. T. Morris, Nils Weinhold, and Timo-
thy A. Chan. 2021. Improved prediction of immune
checkpoint blockade efficacy across multiple cancer
types. Nature biotechnology.
Stéphane d'Ascoli, Hugo Touvron, Matthew L. Leav-
itt, Ari S. Morcos, Giulio Biroli, and Levent Sagun.
2021. Convit: improving vision transformers with
soft convolutional inductive biases. ICLR, 2022.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and
Kristina Toutanova. 2019. Bert: Pre-training of deep
bidirectional transformers for language understand-
ing. NAACL, abs/1810.04805.
Alexey Dosovitskiy,
Lucas Beyer, Alexander
Kolesnikov, Dirk Weissenborn, Xiaohua Zhai,
Thomas Unterthiner, Mostafa Dehghani, Matthias
Minderer, Georg Heigold, Sylvain Gelly, Jakob
Uszkoreit, and Neil Houlsby. 2021. An image
is worth 16x16 words: Transformers for image
recognition at scale. ICLR, abs/2010.11929.
E. A. Eisenhauer, Patrick Therasse, Jan Bogaerts,
Lawrence H. Schwartz, Daniel J. Sargent, Robert
Ford, Janet E. Dancey, Susan G. Arbuck, S. Gwyther,
Margaret Mooney, Larry V. Rubinstein, Lalitha K
Shankar, Lori E. Dodd, Richard S. Kaplan, Denis
Lacombe, and Jaap Verweij. 2009. New response
evaluation criteria in solid tumours: revised recist
guideline (version 1.1). European journal of cancer,
45 2:228–47.
Yuxian Gu, Robert Tinn, Hao Cheng, Michael R.
Lucas, Naoto Usuyama, Xiaodong Liu, Tris-
tan Naumann, Jianfeng Gao, and Hoifung Poon.
2020. Domain-specific language model pretrain-
language processing.
ing for biomedical natural
ACM Transactions on Computing for Healthcare
(HEALTH), 3:1 – 23.
Bernal Jimenez Gutierrez, Nikolas McNeal, Clay
Washington, You Chen, Lang Li, Huan Sun, and
Thinking about gpt-3 in-context
Yu Su. 2022.
think again. ArXiv,
learning for biomedical ie?
abs/2203.08410.
Melissa A. Haendel, N Vasilevsky, Deepak R. Unni,
Cristian G Bologa, Nomi L. Harris, Heidi L. Rehm,
Ada Hamosh, Gareth S. Baynam, Tudor Groza,
Julie A. McMurry, Hugh J. S. Dawkins, Ana
Rath, Courtney Thaxon, Giovanni Bocci, marcin p.
joachimiak, Sebastian Köhler, Peter N. Robinson,
Chris J. Mungall, and Tudor I. Oprea. 2019. How
many rare diseases are there? Nature Reviews Drug
Discovery, 19:77–78.
Stefan Hegselmann, Alejandro Buendia, Hunter Lang,
Monica Agrawal, Xiaoyi Jiang, and David A. Son-
tag. 2022.
Tabllm: Few-shot classification of
tabular data with large language models. ArXiv,
abs/2210.10723.
Xin Huang, Ashish Khetan, Milan W. Cvitkovic, and
Zohar S. Karnin. 2020. Tabtransformer: Tabular
data modeling using contextual embeddings. ArXiv,
abs/2012.06678.
Hemant Ishwaran, Udaya B. Kogalur, Eugene H. Black-
stone, and Michael S. Lauer. 2019. Random survival
forests. Wiley StatsRef: Statistics Reference Online.
Jared Katzman, Uri Shaham, Alexander Cloninger,
Jonathan Bates, Tingting Jiang, and Yuval Kluger.
2018. Deepsurv: personalized treatment recom-
mender system using a cox proportional hazards
BMC Medical Research
deep neural network.
Methodology, 18.
Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang,
Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu.
2017. Lightgbm: A highly efficient gradient boost-
ing decision tree. In NeurIPS.
Jinhyuk Lee, Wonjin Yoon,
Sungdong Kim,
Donghyeon Kim, Sunkyu Kim, Chan Ho So,
and Jaewoo Kang. 2019. Biobert: a pre-trained
biomedical
for
biomedical text mining. Bioinformatics, 36:1234 –
1240.
language representation model
Milad Moradi, Kathrin Blagec, Florian Haberl, and
Matthias Samwald. 2021. Gpt-3 models are poor
few-shot learners in the biomedical domain. ArXiv,
abs/2109.02555.
Drew M. Pardoll. 2012. The blockade of immune
checkpoints in cancer immunotherapy. Nature Re-
views Cancer, 12:252–264.
Colin Raffel, Noam M. Shazeer, Adam Roberts,
Katherine Lee, Sharan Narang, Michael Matena,
Yanqi Zhou, Wei Li, and Peter J. Liu. 2019. Ex-
ploring the limits of transfer learning with a unified
text-to-text transformer. ArXiv, abs/1910.10683.
Alvin Rajkomar, Jeffrey Dean, and Isaac S. Kohane.
2019. Machine learning in medicine. The New Eng-
land Journal of Medicine, 380:1347–1358.
Sebastian Ruder. 2017.
task learning in deep neural networks.
abs/1706.05098.
An overview of multi-
ArXiv,
Victor Sanh, Albert Webson, Colin Raffel, Stephen H.
Bach, Lintang Sutawika, Zaid Alyafeai, Antoine
Chaffin, Arnaud Stiegler, Teven Le Scao, Arun
Raja, Manan Dey, M Saiful Bari, Canwen Xu, Ur-
mish Thakker, Shanya Sharma, Eliza Szczechla,
Taewoon Kim, Gunjan Chhablani, Nihal V. Nayak,
Debajyoti 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, Ab-
heesht Sharma, Andrea Santilli, Thibault Févry, Ja-
son Alan Fries, Ryan Teehan, Stella Rose Bider-
man, Leo Gao, Tali Bers, Thomas Wolf, and Alexan-
der M. Rush. 2022. Multitask prompted train-
ICLR,
ing enables zero-shot task generalization.
abs/2110.08207.
Maarten Van Smeden, Johannes B. Reitsma, Richard D.
Riley, Gary Stephen Collins, and Karel G. M.
Moons. 2021. Clinical prediction models: diagnosis
versus prognosis. Journal of clinical epidemiology,
132:142–145.
Jake Snell, Kevin Swersky, and Richard S. Zemel.
2017. Prototypical networks for few-shot learning.
NeurIPS, abs/1703.05175.
Ewout Willem Steyerberg. 2008. Clinical prediction
models: A practical approach to development, vali-
dation, and updating. In Springer.
Suzanne L. Topalian, Janis M. Taube, Robert A Anders,
and Drew M. Pardoll. 2016. Mechanism-driven
biomarkers to guide immune checkpoint blockade
in cancer therapy. Nature Reviews Cancer, 16:275–
287.
Eric J. Topol. 2019. High-performance medicine: the
convergence of human and artificial intelligence.
Nature Medicine, 25:44–56.
Ashish Vaswani, Noam M. Shazeer, Niki Parmar,
Jakob Uszkoreit, Llion Jones, Aidan N. Gomez,
Lukasz Kaiser, and Illia Polosukhin. 2017. Atten-
tion is all you need. NeurIPS, abs/1706.03762.
Stephen T Wu, Kirk Roberts, Surabhi Datta, Jingcheng
Du, Zongcheng Ji, Yuqi Si, Sarvesh Soni, Qiong
Wang, Qiang Wei, Yang Xiang, Bo Zhao, and Hua
Xu. 2019. Deep learning in clinical natural language
Journal of the
processing: a methodical review.
American Medical Informatics Association : JAMIA.
Pengcheng Yin, Graham Neubig, Wen tau Yih, and Se-
bastian Riedel. 2020. Tabert: Pretraining for joint
understanding of textual and tabular data. ACL,
abs/2005.08314.
|
|
http://arxiv.org/abs/2302.12689v1 | 2023-02-24T15:29:43 | 2023-02-24T15:29:43 | GANterfactual-RL: Understanding Reinforcement Learning Agents'
Strategies through Visual Counterfactual Explanations | Counterfactual explanations are a common tool to explain artificial
intelligence models. For Reinforcement Learning (RL) agents, they answer "Why
not?" or "What if?" questions by illustrating what minimal change to a state is
needed such that an agent chooses a different action. Generating counterfactual
explanations for RL agents with visual input is especially challenging because
of their large state spaces and because their decisions are part of an
overarching policy, which includes long-term decision-making. However, research
focusing on counterfactual explanations, specifically for RL agents with visual
input, is scarce and does not go beyond identifying defective agents. It is
unclear whether counterfactual explanations are still helpful for more complex
tasks like analyzing the learned strategies of different agents or choosing a
fitting agent for a specific task. We propose a novel but simple method to
generate counterfactual explanations for RL agents by formulating the problem
as a domain transfer problem which allows the use of adversarial learning
techniques like StarGAN. Our method is fully model-agnostic and we demonstrate
that it outperforms the only previous method in several computational metrics.
Furthermore, we show in a user study that our method performs best when
analyzing which strategies different agents pursue. | [
"Tobias Huber",
"Maximilian Demmler",
"Silvan Mertes",
"Matthew L. Olson",
"Elisabeth André"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12689v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12689v1",
"@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
4
2
]
G
L
.
s
c
[
1
v
9
8
6
2
1
.
2
0
3
2
:
v
i
X
r
a
GANterfactual-RL: Understanding Reinforcement Learning
Agents' Strategies through Visual Counterfactual Explanations
Tobias Huber
University of Augsburg
Augsburg, Germany
[email protected]
Maximilian Demmler
University of Augsburg
Augsburg, Germany
[email protected]
Silvan Mertes
University of Augsburg
Augsburg, Germany
[email protected]
Matthew L. Olson
Oregon State University
Corvallis, OR, United States
[email protected]
Elisabeth André
University of Augsburg
Augsburg, Germany
[email protected]
ABSTRACT
Counterfactual explanations are a common tool to explain artificial
intelligence models. For Reinforcement Learning (RL) agents, they
answer "Why not?" or "What if?" questions by illustrating what
minimal change to a state is needed such that an agent chooses
a different action. Generating counterfactual explanations for RL
agents with visual input is especially challenging because of their
large state spaces and because their decisions are part of an overar-
ching policy, which includes long-term decision-making. However,
research focusing on counterfactual explanations, specifically for
RL agents with visual input, is scarce and does not go beyond
identifying defective agents. It is unclear whether counterfactual
explanations are still helpful for more complex tasks like analyz-
ing the learned strategies of different agents or choosing a fitting
agent for a specific task. We propose a novel but simple method to
generate counterfactual explanations for RL agents by formulating
the problem as a domain transfer problem which allows the use
of adversarial learning techniques like StarGAN. Our method is
fully model-agnostic and we demonstrate that it outperforms the
only previous method in several computational metrics. Further-
more, we show in a user study that our method performs best when
analyzing which strategies different agents pursue.
KEYWORDS
Explainable Deep Reinforcement Learning; Explainable Artificial
Intelligence; Interpretable Machine Learning
ACM Reference Format:
Tobias Huber, Maximilian Demmler, Silvan Mertes, Matthew L. Olson,
and Elisabeth André. 2023. GANterfactual-RL: Understanding Reinforce-
ment Learning Agents' Strategies through Visual Counterfactual Explana-
tions . 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
Modern Reinforcement Learning (RL) agents use increasingly com-
plex state spaces and deep learning algorithms, making the deci-
sions and strategies of such agents hard to understand [13]. At the
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.
(a) Original state where
Pacman goes left.
(b) Counterfactual state
where Pacman goes right.
Figure 1: Example for a counterfactual explanation: In the
original situation (a), the agent does not take the fastest path
to the pill in the top right corner. It is unclear if the agent is
afraid of the ghost or does not recognize the shortest path.
The counterfactual state (b) shows that the agent would have
taken the fastest path to the pill if the ghost was not there.
This indicates that the agent is afraid of the ghost.
same time, these deep RL agents are being deployed into increas-
ingly high-risk domains like healthcare, autonomous driving, and
robotic navigation [11, 20, 43]. In such domains, it is crucial to be
able to understand the agents to enable appropriate use of them
and to facilitate human-agent cooperation [37]. One prominent
paradigm to make the decisions of intelligent agents transparent
and comprehensible are so-called Counterfactual Explanations. By
providing an alternative reality where the agent would have made
a different decision, these explanations follow a rather human way
of describing decisions [4, 26]. For example, if a person would have
to explain why a warehouse robot took a detour instead of directly
moving to its desired target, they would probably give an expla-
nation similar to If there was no production worker in the way, the
robot would have moved straight to its target - and, by doing so, give
a counterfactual explanation of the warehouse robot's behavior.
Figure 1 shows a similar situation from the Atari game Pacman.
In other machine learning domains, such as image classification,
counterfactual explanations are already frequently used. However,
this is not the case for RL, as several factors make explaining the
decisions of RL agents more challenging. For one, RL agents are
used for sequential decision-making tasks: their actions are not
isolated. These actions are part of a long-term strategy that might
be influenced by delayed rewards. Secondly, RL agents are not
trained on a given ground truth strategy. The reward function only
indirectly specifies the agent's goals [10]. The emerging strategies
might not be what humans would expect, even if the strategy is
optimal for the reward function. Finally, for RL agents, there is
no direct counterpart to the training datasets used by supervised
models. Therefore, counterfactual explanation approaches for su-
pervised models that utilize the training data cannot be applied to
RL agents without adjustment [41].
Due to the difficulties mentioned above, there is only one ap-
proach that focuses on creating counterfactual explanations for
deep RL agents with visual input [31]. This approach utilizes a
complex combination of models where the final generator is only
indirectly trained to change the action. Olson et al. [31] show that
their approach can be applied to a variety of RL environments and
helps users identify a flawed agent. With the help of their coun-
terfactual explanations, users were able to differentiate between a
normal RL agent for the Atari game Space Invaders and a flawed
agent that did not see a specific in-game object. For this task, it
is sufficient for the counterfactual explanation to not change the
particular object at all while other objects frequently change. This
clearly communicates that the unchanged object is irrelevant and
ignored by the agent, implying that it is not seen at all.
But for counterfactual explanations to be employed more widely,
they also have to be useful for more complex tasks. According to
Hoffman et al. [14], one of the main goals of a good explanation
is to refine the user's mental model of the agent. For RL agents,
this includes understanding what strategy and intentions an agent
pursues. Another critical goal for explanations is that they should
help users to calibrate their trust in different agents [14]. For RL
agents, this entails that users should be able to choose fitting agents
for specific problems, which is more complex than simply identify-
ing defective agents. The two aforementioned challenges require
counterfactual explanations to not only convey what objects need
to change but also how the objects need to be altered to change the
agents' policy.
To tackle these challenges, this paper proposes a novel method
for generating counterfactual explanations for RL agents with visual
input. We do so by formulating the generation problem as a domain
transfer problem where the domains are represented by sets of
states that lead the agent to different actions. Our approach is fully
model-agnostic, easier to train than the approach presented by
Olson et al., and includes the counterfactual actions more directly
into the training routine by solving an action-to-action domain
transfer problem. We evaluate our approach with computational
metrics (e.g., how often do the counterfactuals change the agent's
decision) and a user study using the Atari Learning Environment
(ALE) [3], a common benchmark for RL agents with visual input.
In our user study, we present participants with different kinds of
counterfactual explanations and investigate whether this helps
them to understand the strategies of Pacman agents. Furthermore,
we investigate if the counterfactuals help them to calibrate their
trust, so they can choose fitting agents for specific tasks (surviving
or receiving points).
As such, the contributions of this paper are as follows: We formu-
late a novel, model-agnostic approach for generating counterfactual
explanations for RL agents. We demonstrate that our approach out-
performs the previous method in several computational metrics.
Furthermore, we conduct a user study that shows, for the first time,
that counterfactual explanations can help to understand the strate-
gies of RL agents. This user study also identifies current deficiencies
of counterfactual explanations for RL agents that point the way for
future work.
2 RELATED WORK
Our work deals with post-hoc explanations that are generated for
fully trained black-box agents. Recent years saw a plethora of work
on such explanations for (deep) RL agents. The literature often
divides them by scope into global and local explanations. Global
explanations try to explain the agent's overall strategy. This can be
done by picking a subset of important state-action pairs that sum-
marize the agent's strategy [1, 15] or by distilling the agent's policy
into a simpler model like a finite state machine [8] or a soft decision
tree [7]. In this paper, we focus on local explanations that explain a
specific decision of an agent. The most common approach to local
explanations for RL agents are Feature Attribution or Saliency Map
methods [17, 33, 44]. These methods try to identify the most impor-
tant input features for a specific decision and highlight them, for
example in a heatmap. However, recent work questioned whether
one can rely on post-hoc feature attribution to faithfully represent
the agent's internal reasoning [2, 16]. Furthermore, previous studies
showed that saliency maps for visual RL agents are hard to under-
stand for end-users [18]. Counterfactual explanations are another
type of local explanation. Since they follow the human thinking
paradigm of counterfactual reasoning, it is often argued that they
are easier to interpret than feature attribution methods [4, 26].
For classification models, there is a growing body of work on
counterfactual explanations. In 2017, Wachter et al. [39] were the
first to introduce counterfactual explanations into the XAI domain
by defining them as an optimization problem. Since then, various
approaches to generate such counterfactuals were proposed, e.g.,
van Looveren and Klaise [22], and [12].
As various research has observed that generating counterfactual
explanations is, at its core, a generative problem, the use of genera-
tive models like Generative Adversarial Networks (GANs) quickly
became prevailing in state-of-the-art counterfactual explanation
generation algorithms. E.g., Nemirovsky et al. [30] proposed Coun-
terGAN, a framework to build highly realistic and actionable coun-
terfactual explanations. Zhao et al. [46] propose an approach for
generating counterfactual image explanations by using text descrip-
tions of relevant features of an image to be explained. Furthermore,
various specialized GAN-based algorithms were introduced to gen-
erate counterfactual explanations in the medical domain [23, 24, 38].
More recent frameworks for counterfactual explanation generation
make use of the StyleGAN architecture, which implicitly models
style-related aspects of an image, which makes it perfectly suitable
for a whole range of image classification tasks [21, 35]. As for a
broad range of use cases, it is essential to be able to provide ex-
planations for multiple counter-classes, various approaches have
focused on that particular capability by using architectures based
on StarGAN, an adversarial framework that was specifically de-
signed for image translation between multiple domains [42, 47].
One drawback of the aforementioned approaches for supervised
learning is that their GANs are trained to transfer between domains
given by the labeled classes from the classifier's training dataset.
Then they add additional measures (e.g., loss functions [24, 47]), to
ensure that the generated counterfactuals are actually classified as
the desired class by the classifier that is to be explained. This is not
possible for RL agents that do not have a training set. Furthermore,
the additional measures are often not model-agnostic.
RL is often used to create counterfactual explanations for other
models (for example in [5]). However, to the best of the authors'
knowledge, there is only one previous work on generating visual
counterfactual explanations for RL agents [31]. Olson et al. [31]
train an encoder E that creates an action-invariant latent represen-
tation of the agent's latent space. This is achieved by adversarially
training E in tandem with a discriminator D, where D tries to pre-
dict the agent's action and E aims to make the decision of D as
uncertain as possible. In addition, they train a generative model G
to replicate states s based on the action-invariant latent represen-
tation E (s) and the agent's action probability distribution π (s) for
this state. By providing G with a counterfactual action distribution
π (s) ′, they obtain a state that is similar to s but brings the agent's
action distribution closer to the desired counterfactual distribution.
However, Olson et al. argue that an arbitrary counterfactual ac-
tion distribution does not represent a realistic agent output and
thus leads to unrealistic counterfactual states. To avoid this, they
train an additional Wasserstein Auto Encoder and use it to perform
gradient descent in the latent space of the agent towards an agent
output that resembles the desired counterfactual action. Olson et al.
refer to their approach as Counterfactual State Explanations (CSE),
therefore we will also refer to it as CSE in this paper.
The CSE approach is fairly complex and requires extensive access
to the agent's inner workings. Furthermore, as Olson et al. mention
themselves, the loss function of the generator G does not directly
force the resulting state G (E (s), π (s) ′) to be classified as the coun-
terfactual action distribution π (s) ′. This is only learned indirectly
by replicating states based on the action-invariant latent space and
the desired action distribution π (s) ′. As we show in Section 4, this
does not seem to be enough to change the agent's decision correctly.
To solve those problems, we formulate a simpler counterfactual
generation method that uses the counterfactual actions in a more
direct way.
3 APPROACH
3.1 GANterfactual-RL
RL agents are usually employed in a Markov Decision Process
(MDP) which consists of states s ∈ S, actions a ∈ A, and rewards
r . Given a state s, the goal of an RL agent π : S → A is to choose
an action π (s) that maximizes its cumulative future rewards. To
explain such an agent, the objective of a counterfactual explanation
approach for RL agents is defined as follows. Given an original state
s and a desired counterfactual action a′, we want a counterfactual
state s ′ that makes the agent choose the desired action π (s ′) = a′.
Hereby, the original state s should be altered as little as possible. On
an abstract level, the action π (s) that the agent chooses for a state
s can be seen as a top-level feature that describes a combination
of several underlying features which the agent considers to be
relevant for its decision. Thus, the counterfactual state s ′ should
only change the features that are relevant to the agent's decision,
while maintaining all other features not relevant to the decision.
Figure 2: Schematic of our counterfactual generation ap-
proach. We formulate the problem as domain transfer
where each domain represents an action. States are assigned
to domains based on the action that the agent chooses for
them.
This is similar to image-to-image translation, where features that
are relevant for a certain image domain should be transformed
into features leading to another image domain, while all other
features have to be maintained (e.g., the background should remain
constant when transforming horses to zebras). Taken together,
we can formulate the generation of counterfactual states for RL
agents as a domain transfer problem similar to image-to-image
translation: The agent's action space A defines the different domains
Ai = {s ∈ S |π (s) = ai }, where each state belongs to the domain
that corresponds to the action that the agent chooses for this state
(see Figure 2).
To solve the reformulated domain transfer problem, we base our
system on the StarGAN architecture [6], since RL agents usually
use more than two actions. The StarGAN architecture incorporates
multiple loss components that can be reformulated to be applicable
to the RL domain. The first component, the so-called adversarial
loss, leads the network to produce highly realistic states that look
like states from the original environment. Reformulated for the task
of generating RL states, we define it as follows (following Choi et al.
[6] we use a Wasserstein objective with gradient penalty):
Ladv = Es [Dsrc (s)] − Es,a′ [Dsrc (G (s, a′))]
− λgp Eˆs
(cid:2)(||∇ˆs Dsrc ( ˆs)||2 − 1)2(cid:3) ,
where Dsrc is the StarGAN's discriminator network and G its gener-
ator network. The second loss component, which is specific to the
StarGAN architecture, guides the generator network to produce
states that lead to the desired counterfactual actions. It consists of
two sub-objectives, one that is applied while the network is fed
with original (real) states from the training set (Eq. 1), and the other
while the network is generating counterfactual states (Eq. 2):
La
cls = Es,a [− log Dcls (a|s)],
La′
cls = Es,a′ [− log Dcls (a′|G (s, a′))],
(2)
where Dcls refers to the StarGAN discriminator's classification
output, which learns to approximate the action that the agent is
performing in a particular state. Further, as counterfactual states
(1)
should be as close to the original states as possible, a Reconstruction
Loss is used. This loss forces the network to only change features
that are relevant to the agent's choice of action:
Lrec = Es,a,a′ [||s − G (G (s, a′), a)||1]
Taken together, the whole loss of the StarGAN architecture, refor-
mulated for RL counterfactual explanations, is defined as follows:
LD = −Ladv + λcls La
LG = Ladv + λcls La′
cls,
cls + λrec Lrec,
where λcls and λrec are weights controlling the corresponding
loss component's relevance. Since our approach utilizes a GAN
architecture to generate counterfactuals for RL agents, we refer to
it as GANterfactual-RL.
3.2 Dataset Generation
As described above, our GANterfactual-RL approach relies on train-
ing data in the form of state-action pairs. Olson et al. [31] train
their CSE approach on state-action pairs generated by concurrently
running an MDP with a trained agent. This strategy is simple but
allows for little control over the training data, which can lead to
the following complications:
Frames extracted from a running MDP contain a temporal
pattern since consecutive states typically have a high corre-
lation. Such correlations and patterns can lead to bias and
sub-optimal convergence during training.
For episodic MDPs, there is a high probability of reaching
the same state throughout several episodes. This is amplified
by the fact that RL agents often learn to execute only a few
optimal trajectories. This results in duplicate samples that
are effectively over-sampled during training.
RL agents generally do not execute each action equally fre-
quently, since most environments contain actions that are
useful more often than others. This leads to an imbalanced
amount of training samples per domain.
To mitigate the aforementioned issues, we propose to generate
datasets as follows: Data is gathered by running a trained agent
in an MDP. Each state corresponds to one dataset sample and is
labeled with the action that the agent chooses to execute in this
state. An ε-greedy policy (ε=0.2 in our case) is used to increase the
diversity of states reached over multiple episodes. State-action pairs
with an explored (randomly chosen) action are not added to the
dataset. After the data is gathered, duplicates are removed. Then, a
class balancing technique (under-sampling in our case) is used to
account for over- or underrepresented actions. Finally, the dataset
is split into a training set, a test set, and potentially a validation set.
Most of these techniques are commonly used in other application
domains of machine learning. However, to our best knowledge, this
is the first work to generate and preprocess datasets for generating
counterfactual explanations for RL agents.
3.3 Application to Atari Domain
Environment. The environments we use for our experiments are
the Atari 2600 games MsPacman (henceforth referred to as Pacman)
and Space Invaders, included in the Arcade Learning Environment
(ALE) [3]. The ALE states are based on the raw pixel values of the
game. Each input frame is cropped so that only the actual playing
field remains. This removes components such as the score and life
indicators which would allow participants to easily see which agent
receives higher scores. After that, we use the same preprocessing as
Mnih et al. [28]. Two steps from this preprocessing are particularly
important for us. First, the frames are gray-scaled and downsized.
Second, in addition to the current frame, the agent receives the last
three preprocessed frames as input. This allows the agent to detect
temporal relations. The ALE actions normally correspond to the
meaningful actions achieved with an Atari 2600 controller (e.g. six
actions for Space Invaders). Since we wanted to use our Pacman
agents in a user study we removed 4 redundant actions (e.g., Up &
Right) whose effect differs between situations and is therefore hard
to convey to participants. This left us with 5 actions for Pacman
(Do nothing, Up, Down, Left, Right).
Agent Training. To evaluate participants' ability to differentiate
between alternative agents and analyze their strategies, we modified
the reward function of three Pacman agents. This is a more natural
method of obtaining different agents compared to withholding
information from the agent as Olson et al. [31] did. Furthermore,
it results in agents that behave qualitatively differently. Therefore
participants have to actually analyze the agents' strategies instead
of simply looking for objects that the agents ignore.
Blue-Ghost Agent: This agent was trained using the de-
fault reward function of the ALE, where blue ghosts get the
highest reward.
Power Pill Agent: This agent only received positive rewards
for eating power pills.
Fear-Ghost Agent: This agent got a small positive reward
of 1 for every step in which it did not die to ghosts.
For training the first two Pacman agents, we use the DQN algorithm
[28]. Each agent was trained for 5 Million steps. The fear-ghosts
agent was trained using the ACER algorithm [40] for 10M steps.
At the end of the training period, the best-performing policy is
restored. For all three agents, we build upon the OpenAI baselines
[9] repository. For Space Invaders, we used the two Asynchronous
Advantage Actor-Critic (A3C) agents trained by Olson et al. [31].
For training details, we refer to their paper. One agent is trained
normally, while the other agent is flawed and does not see the laser
cannon at the bottom of the screen.
GANterfactual-RL on Atari. To generate human-understandable
counterfactual explanations for our Atari agents, the generated
counterfactual states should represent the frames that humans see
during gameplay. That means we cannot train our GANterfactual-
RL model on the preprocessed and stacked frames that the Atari
agents use. Instead, we train it on the cropped RGB frames before
preprocessing. The only preprocessing we still use on those frames
is a countermeasure against flickering objects in Atari games, which
was proposed by Mnih et al. [28]. While generating the dataset,
we only save the most recent of the four stacked frames for each
state s. This frame generally influences the agent's decision the
most. For feeding the counterfactual frame back into the agent (e.g.,
to evaluate the approach), we stack it four times and then apply
preprocessing.
Our implementation details can be found in the appendix. The
full code is available online.1
4 COMPUTATIONAL EVALUATION
4.1 Used Metrics
We evaluate our approach using the metrics validity (or success
rate), proximity (or cost), sparsity, and generation time. We consider
these metrics to be the most suitable and widely used metrics for
image-based counterfactual explanations [5, 19, 29, 32].
Validity captures the rate of CounterFactuals (CFs) that actually
evoke the targeted action when fed to the agent. With NT being
true CFs (correctly changing the agent's action), NF being false CFs,
and N the total amount of evaluated CFs, this metric is defined as:
V alidity =
NT
NT + NF
Proximity measures the similarity between an original state
image and its CF via the L1-norm. We normalize the metric to
measure the proximity in the range [0, 1].
NT
N
=
Proximity (s, G) = 1 −
1
255 * S
||s − G (s, a)||1
where s is the original state image, G (s, a) is the generated CF for
an arbitrary target action domain a and S is the domain of color
values of s (S = 3 * W idth * Height for RGB-encoded images). The
normalization with 255 * S assumes an 8-bit color encoding with
color values in range [0, 255]. High proximity values are desirable
since they indicate small adjustments to the original state.
Sparsity quantifies the number of unmodified pixel values be-
tween an original state image and its CF via the L0-norm (a pseudo-
norm that counts the number of non-zero entries of a vector/matrix).
The sparsity is normalized to the range [0, 1] as well.
Sparsity(s, G) = 1 −
1
S
||s − G (s, a)||0
A completely altered image has a sparsity of 0, an unmodified image
has a sparsity of 1. High sparsity values are thus desirable.
Generation Time determines the time it takes to generate one
CF with a trained generator, not including pre- or post-processing.
4.2 Computational Results
The computational results for the three Pacman agents are shown
in Table 1 and the results for the two Space Invaders agents in
Table 2. For the Pacman agents, we generated fully cleaned datasets
(Section 3.2) and sampled 10% of each action for the evaluation test
set. To show the contribution of our proposed dataset generation,
we additionally trained a GANterfactual-RL model for the blue-
ghost agent without the steps proposed in Section 3.2 and evaluated
it on the test set from the clean dataset. This dropped the validity
to 0.45 and sparsity to 0.50 ± 0.01 while the other values stayed
comparable. To be more comparable to the results by Olson et al.
[31], we do not remove duplicates from the Space Invaders datasets
and do not apply class balancing. Here we create the test set by
sampling 500 states for each action and removing all duplicates of
these states from the training set. Our GANterfactual-RL approach
outperforms the CSE counterfactuals in every single metric.
1https://github.com/hcmlab/GANterfactual-RL
Table 1: Computational evaluation results for the Pacman
agents. Proximity, sparsity and generation time are specified
by mean ± standard deviation.
Approach
Validity (↑)
Proximity (↑)
Sparsity (↑) Gen. Time [s] (↓)
Blue-Ghost Agent
Ours
CSE
Power-Pill Agent
Ours
CSE
Fear-Ghost Agent
Ours
CSE
0.59
0.28
0.49
0.20
0.46
0.20
0.997 ± 0.001
0.992 ± 0.002
0.73 ± 0.02
0.33 ± 0.03
0.011 ± 0.012
0.085 ± 0.021
0.997 ± 0.001
0.993 ± 0.002
0.70 ± 0.02
0.32 ± 0.02
0.011 ± 0.008
0.566 ± 0.731
0.995 ± 0.001
0.992 ± 0.002
0.45 ± 0.01
0.32 ± 0.04
0.013 ± 0.014
0.020 ± 0.017
Table 2: Computational evaluation results for the Space In-
vaders agents. Proximity, sparsity and generation time are
specified by mean ± standard deviation.
Approach
Validity (↑)
Proximity (↑)
Sparsity (↑) Gen. Time [s] (↓)
Normal Agent
Ours
CSE
Flawed Agent
Ours
CSE
0.70
0.18
0.53
0.17
0.998 ± 0.002
0.995 ± 0.003
0.97 ± 0.02
0.89 ± 0.05
0.011 ± 0.013
6.180 ± 9.727
0.998 ± 0.002
0.995 ± 0.004
0.96 ± 0.01
0.94 ± 0.01
0.011 ± 0.015
0.020 ± 0.035
Agent:
Original Action:
Pacman
Fear Ghosts
Move Down
Space Invader
Flawed
Right & Fire
Space Invader
Normal
Right & Fire
Original State:
Target Action: Move Up
Move Left
Move Left
CSE Counterfac-
tual State:
GANterfactual-
RL Counterfac-
tual State:
Figure 3: Example counterfactual states. Our approach does
not change the Laser Cannon (marked in blue) for the flawed
agent, who does not see it, but changes it for the normal
agent.
Figure 3 shows example counterfactuals generated for the Pac-
man fear-ghosts agent and the two Space Invaders agents. Additional
examples for all our agents can be seen in the appendix.
5 USER STUDY
5.1 Study Design
5.1.1 Research Question and Hypothesis. The research question for
our study was which counterfactual explanations help users to un-
derstand the strategies of RL agents and help them to choose fitting
agents for a specific task. We hypothesized that our GANterfactual-
RL method is more useful than the CSE method and is more useful
than a presentation of the original states without counterfactuals.
Further, we thought that the counterfactuals generated by the CSE
approach might mislead participants due to the low validity of the
generated counterfactual explanations (see Section 4). Therefore,
we hypothesized that only providing the original states is more
useful than adding CSE counterfactuals.
5.1.2 Dependent Variables and Main Tasks.
Agent Understanding Task. To measure whether participants un-
derstand the strategies of different agents and build a correct mental
model of them, we used an agent understanding task inspired by
Hoffman et al. [14] and Huber et al. [18]. Here, participants were
presented with five states and the actions that the agent chooses in
these states. This was done for each of the three Pacman agents de-
scribed in Section 3.3 (one agent at a time). The states were selected
by the HIGHLIGHTS-Div algorithm [1]. To this end, we let each
trained agent play for additional 50 episodes and chose the most im-
portant states according to HIGHLIGHTS-Div. The resulting states
show gameplay that is typical for the agent, without the need to
manually select states that might be biased toward our approach.
Based on these states (and additional explanations depending on
the condition), participants had to select up to two in-game objects
that were most important for the agent's strategy from a list of
objects (Pacman, normal pills, power pills, ghosts, blue ghosts, or
cherries). As described in Section 3.3, each agent, strongly focuses
on a different single in-game object depending on their reward
function (e.g., the fear-ghosts agent focuses on normal ghosts). If
the participants select this object and none of the other objects,
they receive a point. The only exception is Pacman. Every agent
heavily relies on the position of Pacman as a source of informa-
tion. Therefore, participants receive the point whether they select
Pacman or not.
Agent Comparison Task. To measure how well the participants'
trust is calibrated, we used an agent comparison task inspired by
Amir and Amir [1] and Miller [27]. Here, we implicitly measure
if the participants' trust is appropriate by asking them, for each
possible pair of the three Pacman agents, which agent they would
like to play on their behalf to obtain certain goals. Since a single
agent can be good for one goal but bad for another, this requires
a deeper analysis than the distinction between a normal and a
defective agent. For each pair, the participants are shown their own
descriptions of each agent from the agent understanding task and
the same states and explanations that they saw during the agent
understanding task. Then they have to decide which agent should
play on their behalf to achieve more points and which agent should
play on their behalf to survive longer. We know the ground truth
for this by measuring the agents' average score and amount of
steps for the 50 episodes used to find the HIGHLIGHTS states. The
amount of steps that the blue-ghost agent and the power pill agent
Figure 4: A simplified scheme of the beginning of our agent
understanding task with a single example state.
survive is so close that we do not include this specific comparison
in the evaluation.
Explanation Satisfaction. To measure the participant's subjective
satisfaction, we use statements adapted from the Explanation Satis-
faction Scale by Hoffman et al. [14]. Participants have to rate their
agreement with each statement on a 5-point Likert scale. Partici-
pants' final rating was averaged over all those ratings, reversing
the rating of negative statements. We do this once after the agent
understanding task and once after the agent comparison task in
case there are satisfaction differences between the tasks.
5.1.3 Conditions and Explanation Presentation. We used three in-
dependent conditions, one Control condition without explanations
and two conditions where the states during the agent understand-
ing task and the agent comparison task are accompanied by coun-
terfactual explanations. In the CSE condition, the counterfactuals
are generated by the approach from Olson et al. [31], and in the
GANterfactual-RL condition the counterfactuals are generated by
our proposed method. The presentation of the counterfactual ex-
planations is designed as follows. For each state, we generate a
single counterfactual state. We were concerned that too many coun-
terfactual states would cause too much cognitive load. The way
that MsPacman is implemented, actions that do nothing or move
directly into a wall are ignored. To generate meaningful counterfac-
tual states, we limited the counterfactual action to turning around
in a corridor and randomly selecting a new direction at an intersec-
tion (do not turn around). The counterfactual states are presented
by a slider under each state. Moving the slider from left to right
linearly interpolates the original state to the counterfactual state
(per-pixel interpolation). The original and counterfactual actions are
written above the state. Figure 4 shows a simplified version of the
beginning of our agent understanding task.
5.1.4 Procedure and Compensation. After completing a consent
form, participants were asked to answer demographic questions
(age and gender) and questions regarding their experience with
Pacman and their views on AI. Then, they were shown a tutorial
explaining the rules of the game Pacman and were asked to play
the game to familiarize themselves with it. To verify that partic-
ipants understood the rules, they were asked to complete a quiz
and were only allowed to proceed with the survey after answering
all questions correctly. Afterward, participants in the counterfac-
tual conditions received additional information and another quiz
regarding the counterfactual explanations. Then, they proceeded to
the agent understanding task which was repeated three times, once
for each agent. The order of the agents was randomized. After that,
participants filled the explanation satisfaction scale and continued
to the agent comparison task. Again, this task was repeated three
times, once for each possible agent pair, and the order was random-
ized. Finally, participants had to complete another satisfaction scale
for the agent comparison task. Participants got a compensation of
5$ for participating in the study. As an incentive to do the tasks
properly, they received a bonus payment of 10 cents for each point
they get in the agent understanding task and 5 cents for each point
in the agent comparison task. The complete questionnaire can be
seen in the appendix. We preregistered our study online.2
5.1.5 Participants. We recruited participants through Amazon Me-
chanical Turk. Participation was limited to Mechanical Turk Mas-
ters from the US, UK, or Canada (to ensure a sufficient English level)
with a task approval rate greater than 95% and without color vision
impairment. We conducted a power analysis with an estimated
medium effect size of 0.7 based on previous similar experiments
[18, 24, 25]. This determined that we need 28 participants per con-
dition to achieve a power of 0.8. and a significance level of 0.05. To
account for participant exclusions, we recruited 30 participants per
condition. Participants were excluded if they did not look at any of
the counterfactual explanations for any of the agents during the
agent understanding task, if their textual answers were nonsensical
or if they took considerably less time than the average. This left us
with 30 participants in the Control condition, 28 participants in the
CSE condition, and 23 in the GANterfactual-RL condition.
The distribution of age, AI experience, and Pacman experience
was similar between the conditions (see the appendix). There was
a difference in the gender distribution and the attitude towards
AI between the conditions. The Control condition had 40% female
participants, the CSE condition had 32% and the GANterfactual-RL
condition had 26%. The mean attitude towards AI was the highest
in the GANterfactual-RL condition and the lowest in the Control
condition (see the appendix).
5.2 Results
The results for the participants' scores during the main tasks can
be seen in Figure 5, while their explanation satisfaction values are
shown in Figure 6. In the following, we will summarize the results
of our main hypotheses, which we analyzed using non-parametric
one-tailed Mann-Whitney U tests.
Counterfactuals helped participants to understand the agents'
strategies. In the agent understanding task, there was a signifi-
cant difference between the Control condition (M=0.8) and the
GANterfactual-RL condition (M=1.65), U =181, p=0.001, r =0.477.3
Contrary to our hypothesis, the Control condition got lower scores
than the CSE condition (M=0.8 vs M=1.18), p=0.953.
Our GANterfactual-RL explanations were significantly more
useful than the CSE approach for understanding the agents'
strategies. In the agent understanding task, the CSE condition got
2https://aspredicted.org/m9fi5.pdf
3M is the mean and r is rank biserial correlation.
(a) Total score (summed over all
three agents) for the agent
understanding task.
(b) Number of correct agent
selections in the agent
comparison task (Out of five).
Figure 5: Comparison of participants' average performance
in each task, by condition. Error bars show the 95% CI.
(a) Agent Understanding Task.
(b) Agent Comparison Task.
Figure 6: Comparison of participants' average explanation
satisfaction in each task, by condition.
a mean score of 1.18, while the GANterfactual-RL condition got a
mean score of 1.65 (U =232, p=0.038, r =0.2795).
The increased understanding of the agents' strategies did
not result in a more calibrated trust. Contrary to our hypothe-
sis, there were no significant differences in the trust task (Control
vs CSE: p=0.536, Control vs. GANterfactual-RL: p=0.852, CSE vs
GANterfactual-RL: p=0.876).
Counterfactuals did not increase explanation satisfaction.
Even though participants objectively had a better understanding of
the agents' strategies, they did not feel more satisfied with them.
Participants in the Control condition were significantly more satis-
fied than participants in the CSE condition in both the agent un-
derstanding task (Control: M=3.77, CSE: M=3.20; U =249, p=0.004,
r =0.4071) and the agent comparison task (Control: M=3.75, CSE:
M=3.14; U =267, p=0.008, r =0.3643). Contrary to our expectations,
the participants in the GANterfactual-RL condition were not more
satisfied than the participants in the Control condition or the
CSE condition in both the agent understanding task (Control vs.
GANterfactual-RL: p=0.996, CSE vs GANterfactual-RL: p=0.546) or
the agent comparison task (Control vs. GANterfactual-RL: p=0.967,
CSE vs GANterfactual-RL: p=0.334).
6 DISCUSSION
6.1 Computational Evaluation
Our computational evaluation shows that our proposed approach is
correctly changing the agents' actions in 46% to 70% of the cases de-
pending on the agent. While this is not perfect, one has to consider
that this is not a binary task but that the agents have 5 or 6 different
actions. Furthermore, CSE [31], the only previous method that fo-
cuses on generating counterfactual explanations for RL agents, only
successfully changed the agent's decision in 17% to 28% of the cases.
We can think of two reasons for the low validity values for the CSE
approach. First, they only incorporate the agent's action in their
loss functions related to the latent space (where their discriminator
and WAE were trained). The generation of the final pixels did not
include constraints to faithfully ensure that a specific action was
taken by the agent. Second, their loss functions for the latent space
focus on creating action-invariant states. Olson et al. [31] showed
that their CSE approach was useful for differentiating between a
normal agent and a flawed agent. We think this is due to the fact
that CSE is good at generating action-invariant states. This can
help to identify the object that the flawed agent did not see since
irrelevant objects are not changed for action-invariant states. We
found that our approach also does not change the irrelevant object
for the flawed agent (illustrated in Figure 3). This demonstrates
that the counterfactuals generated by our approach are similarly
effective for identifying the flawed agent. Looking at the distance
between the original and the counterfactual states in pixel-space,
we see that counterfactual states generated by our GANterfactual-
RL approach on average have less distance to the original states
and change fewer pixel values compared to the counterfactuals
generated by the previous CSE method by Olson et al. [31]. This
indicates that our GANterfactual-RL method is better at achieving
the goal of finding the smallest possible modification of the original
state to change the agent's decision. Since our method only requires
a single forward pass to generate a counterfactual state, it is faster
than the CSE method, which relies on potentially time-consuming
gradient descent for the counterfactual generation.
6.2 User Study
Our user study showed that counterfactual explanations help users
to understand which strategies different agents pursue. In particu-
lar, our method was significantly more useful than both the CSE
method and not providing counterfactuals. Contrary to our hy-
pothesis, even the counterfactuals generated by the CSE method
resulted in a better understanding of the agents than not provid-
ing counterfactual explanations. This demonstrates the usefulness
of counterfactual explanations for RL agents even in more com-
plex tasks than identifying defective agents. Two recent studies
evaluated the usefulness of other explanation techniques for under-
standing the strategies of RL agents in a similar way to our study.
Huber et al. [18] looked at saliency map explanations and found
that they did not help more than showing HIGHLIGHTS states
without saliency maps. Their participants achieved 37% of the max-
imum possible score in their agent understanding task, while the
participants with our counterfactual explanations obtained 50%.
Septon et al. [36] investigated so-called reward decomposition ex-
planations and found that they helped participants to achieve 60%
of the maximum score in their agent understanding task. However,
reward decomposition is an intrinsic explanation method which
the agent and the reward function have to be specifically designed
for. Our counterfactual explanations resulted in only 10% less aver-
age score even though they are post-hoc explanations that can be
generated for already trained black-box agents.
Our agent comparison task showed that the increased under-
standing of the agent's strategies through both counterfactual expla-
nation methods did not help participants choose fitting agents for
specific tasks. For choosing the correct agent for a given problem, it
is not enough to identify the strategies of the agents. It also requires
enough expertise in the environment (e.g., Pacman) to judge which
strategy is better suited for the problem at hand. For example, in
Pacman, humans often assume that an agent that survives longer
will accumulate more points in the long run. However, this is not
necessarily the case since an aggressive agent can better exploit
the very high rewards of eating blue ghosts. Our results for this
task are in line with the results of the agent comparison task for
saliency maps by Huber et al. [18].
Finally, our study showed that participants subjectively were not
satisfied with the counterfactual explanations even though they
objectively helped them to understand the agents. This might be
due to the additional cognitive load of interpreting the explana-
tions. The two aforementioned studies [18, 36] also did not find a
significant difference in user satisfaction for their local explana-
tion techniques. Only the choice of states, which does not provide
additional information, influenced the satisfaction in [18]. How-
ever, our study is the first to see significantly higher satisfaction
for the no-explanation condition than one of the two explanation
conditions. This indicates that counterfactuals are subjectively less
satisfying than saliency maps or reward decomposition. One possi-
ble explanation for this is the visual quality of the counterfactuals.
Some participants from both counterfactual conditions commented
that the counterfactuals had too many artifacts. One participant
from the GANterfactual-RL condition for example wrote that "the
counterfactuals were somewhat helpful, but they would have worked
better if there were fewer or no artifacts". Another possible reason
for the low satisfaction is the presentation of the explanation. Be-
cause our study primarily aimed at investigating the benefits and
drawbacks of our specific counterfactual approach, we did not use
a user-friendly explanatory system where different types of expla-
nations are provided according to the requests of the explainee.
7 CONCLUSION AND FUTURE WORK
In this work, we formulated a novel method for generating counter-
factual explanations for RL agents. This GANterfactual-RL method
is fully model-agnostic, which we demonstrate by applying it to
three RL algorithms, two actor-critic methods, and one deep Q-
learning method. Using computational metrics, we show that our
proposed method is better at correctly changing the agent's deci-
sion while modifying less of the original input and taking less time
than the only previous method that focuses on generating visual
counterfactuals for RL. Furthermore, it significantly improved users'
understanding of the strategies of different agents in a user study.
Our user study also identified two remaining deficiencies of coun-
terfactual explanations. First, participants were subjectively not
satisfied with the explanations, which might be due to unnatural ar-
tifacts in some counterfactuals. Second, the counterfactuals did not
help them to calibrate their trust in the agents. Future work should
try to improve counterfactual explanations in these directions.
While there is still room for improvement, we can confidently
say that our approach can be considered the current state of the art
for counterfactual explanations for RL agents with visual input.
ACKNOWLEDGMENTS
This paper was partially funded by the DFG through the Leibniz
award of Elisabeth André (AN 559/10-1).
REFERENCES
[1] Dan Amir and Ofra Amir. 2018. HIGHLIGHTS: Summarizing Agent Behavior
to People. In Proceedings of the 17th International Conference on Autonomous
Agents and MultiAgent Systems, AAMAS 2018, Stockholm, Sweden, July 10-15,
2018. International Foundation for Autonomous Agents and Multiagent Systems
Richland, SC, USA / ACM, 1168–1176.
[2] Akanksha Atrey, Kaleigh Clary, and David D. Jensen. 2020. Exploratory Not
Explanatory: Counterfactual Analysis of Saliency Maps for Deep Reinforcement
Learning. In 8th International Conference on Learning Representations, ICLR 2020,
Addis Ababa, Ethiopia, April 26-30, 2020.
https://openreview.net/forum?id=
rkl3m1BFDB
[3] Marc G. Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. 2013. The
Arcade Learning Environment: An Evaluation Platform for General Agents. J.
Artif. Intell. Res. 47 (2013), 253–279. https://doi.org/10.1613/jair.3912
[4] Ruth M. J. Byrne. 2019. Counterfactuals in Explainable Artificial Intelligence
(XAI): Evidence from Human Reasoning. In Proceedings of the Twenty-Eighth
International Joint Conference on Artificial Intelligence, IJCAI-19. International
Joint Conferences on Artificial Intelligence Organization, 6276–6282. https:
//doi.org/10.24963/ijcai.2019/876
[5] Ziheng Chen, Fabrizio Silvestri, Gabriele Tolomei, He Zhu, Jia Wang, and Hong-
shik Ahn. 2021. ReLACE: Reinforcement Learning Agent for Counterfactual
Explanations of Arbitrary Predictive Models. CoRR abs/2110.11960 (2021).
[6] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and
Jaegul Choo. 2018. Stargan: Unified generative adversarial networks for multi-
domain image-to-image translation. In Proceedings of the IEEE conference on
computer vision and pattern recognition. 8789–8797.
[7] Youri Coppens, Kyriakos Efthymiadis, Tom Lenaerts, Ann Nowé, Tim Miller,
Rosina Weber, and Daniele Magazzeni. 2019. Distilling deep reinforcement
learning policies in soft decision trees. In Proceedings of the IJCAI 2019 workshop
on explainable artificial intelligence. 1–6.
[8] Mohamad H. Danesh, Anurag Koul, Alan Fern, and Saeed Khorram. 2021. Re-
understanding Finite-State Representations of Recurrent Policy Networks. In
Proceedings of the 38th International Conference on Machine Learning, ICML 2021,
18-24 July 2021, Virtual Event. 2388–2397. http://proceedings.mlr.press/v139/
danesh21a.html
[9] Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plap-
pert, Alec Radford, John Schulman, Szymon Sidor, Yuhuai Wu, and Peter Zhokhov.
2017. OpenAI Baselines. https://github.com/openai/baselines.
[10] Lauro Langosco Di Langosco, Jack Koch, Lee D Sharkey, Jacob Pfau, and David
Krueger. 2022. Goal Misgeneralization in Deep Reinforcement Learning. In
International Conference on Machine Learning. PMLR, 12004–12019.
[11] Tingxiang Fan, Pinxin Long, Wenxi Liu, and Jia Pan. 2020. Distributed multi-
robot collision avoidance via deep reinforcement learning for navigation in
complex scenarios.
Int. J. Robotics Res. 39, 7 (2020). https://doi.org/10.1177/
0278364920916531
[12] Yash Goyal, Ziyan Wu, Jan Ernst, Dhruv Batra, Devi Parikh, and Stefan Lee.
2019. Counterfactual Visual Explanations. In Proceedings of the 36th International
Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California,
USA (Proceedings of Machine Learning Research, Vol. 97), Kamalika Chaudhuri and
Ruslan Salakhutdinov (Eds.). PMLR, 2376–2384. http://proceedings.mlr.press/
v97/goyal19a.html
[13] Alexandre Heuillet, Fabien Couthouis, and Natalia Díaz Rodríguez. 2021. Explain-
ability in deep reinforcement learning. Knowl. Based Syst. 214 (2021), 106685.
[14] Robert R Hoffman, Shane T Mueller, Gary Klein, and Jordan Litman. 2018. Metrics
for explainable AI: Challenges and prospects. arXiv preprint arXiv:1812.04608
(2018).
[15] Sandy H. Huang, Kush Bhatia, Pieter Abbeel, and Anca D. Dragan. 2018. Es-
tablishing Appropriate Trust via Critical States. In 2018 IEEE/RSJ International
Conference on Intelligent Robots and Systems (IROS). 3929–3936. https://doi.org/
10.1109/IROS.2018.8593649
[16] Tobias Huber, Benedikt Limmer, and Elisabeth André. 2022. Benchmarking
Perturbation-Based Saliency Maps for Explaining Atari Agents. Frontiers in
Artificial Intelligence 5 (2022). https://doi.org/10.3389/frai.2022.903875
[17] Tobias Huber, Dominik Schiller, and Elisabeth André. 2019. Enhancing Explain-
ability of Deep Reinforcement Learning Through Selective Layer-Wise Relevance
Propagation. In KI 2019: Advances in Artificial Intelligence, Christoph Benzmüller
and Heiner Stuckenschmidt (Eds.). Springer International Publishing, Cham,
188–202.
[18] Tobias Huber, Katharina Weitz, Elisabeth André, and Ofra Amir. 2021. Local
and global explanations of agent behavior: Integrating strategy summaries with
saliency maps. Artif. Intell. 301 (2021), 103571. https://doi.org/10.1016/j.artint.
2021.103571
[19] Mark T. Keane, Eoin M. Kenny, Eoin Delaney, and Barry Smyth. 2021. If Only
We Had Better Counterfactual Explanations: Five Key Deficits to Rectify in the
Evaluation of Counterfactual XAI Techniques. In Proceedings of the Thirtieth
International Joint Conference on Artificial Intelligence, IJCAI 2021, Virtual Event
/ Montreal, Canada, 19-27 August 2021. ijcai.org, 4466–4474. https://doi.org/10.
24963/ijcai.2021/609
[20] B Ravi Kiran, Ibrahim Sobh, Victor Talpaert, Patrick Mannion, Ahmad A. Al Sallab,
Senthil Yogamani, and Patrick Pérez. 2022. Deep Reinforcement Learning for
Autonomous Driving: A Survey. IEEE Transactions on Intelligent Transportation
Systems 23, 6 (2022), 4909–4926. https://doi.org/10.1109/TITS.2021.3054625
[21] Oran Lang, Yossi Gandelsman, Michal Yarom, Yoav Wald, Gal Elidan, Avinatan
Hassidim, William T. Freeman, Phillip Isola, Amir Globerson, Michal Irani, and
Inbar Mosseri. 2021. Explaining in Style: Training a GAN to explain a classifier
in StyleSpace. In 2021 IEEE/CVF International Conference on Computer Vision,
ICCV 2021, Montreal, QC, Canada, October 10-17, 2021. IEEE, 673–682. https:
//doi.org/10.1109/ICCV48922.2021.00073
[22] Arnaud Van Looveren and Janis Klaise. 2021. Interpretable Counterfactual Expla-
nations Guided by Prototypes. In Machine Learning and Knowledge Discovery in
Databases. Research Track - European Conference, ECML PKDD 2021, Bilbao, Spain,
September 13-17, 2021, Proceedings, Part II (Lecture Notes in Computer Science,
Vol. 12976), Nuria Oliver, Fernando Pérez-Cruz, Stefan Kramer, Jesse Read, and
José Antonio Lozano (Eds.). Springer, 650–665. https://doi.org/10.1007/978-3-
030-86520-7_40
[23] Teppei Matsui, Masato Taki, Trung Quang Pham, Junichi Chikazoe, and Koji
Jimura. 2022. Counterfactual explanation of brain activity classifiers using image-
to-image transfer by generative adversarial network. Frontiers in Neuroinformatics
15 (2022), 79.
[24] Silvan Mertes, Tobias Huber, Katharina Weitz, Alexander Heimerl, and Elisabeth
André. 2022. GANterfactual - Counterfactual Explanations for Medical Non-
experts Using Generative Adversarial Learning. Frontiers Artif. Intell. 5 (2022),
825565. https://doi.org/10.3389/frai.2022.825565
[25] Silvan Mertes, Christina Karle, Tobias Huber, Katharina Weitz, Ruben
Schlagowski, and Elisabeth André. 2022. Alterfactual Explanations - The Rel-
evance of Irrelevance for Explaining AI Systems. CoRR abs/2207.09374 (2022).
https://doi.org/10.48550/arXiv.2207.09374 arXiv:2207.09374
[26] Tim Miller. 2019. Explanation in artificial intelligence: Insights from the social
sciences. Artif. Intell. 267 (2019), 1–38. https://doi.org/10.1016/j.artint.2018.07.007
[27] Tim Miller. 2022. Are we measuring trust correctly in explainability, inter-
pretability, and transparency research? CoRR abs/2209.00651 (2022). https:
//doi.org/10.48550/arXiv.2209.00651
[28] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness,
Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg
Ostrovski, et al. 2015. Human-level control through deep reinforcement learning.
Nature 518, 7540 (2015), 529.
[29] Ramaravind Kommiya Mothilal, Amit Sharma, and Chenhao Tan. 2020. Explain-
ing machine learning classifiers through diverse counterfactual explanations.
In FAT* '20: Conference on Fairness, Accountability, and Transparency, Barcelona,
Spain, January 27-30, 2020. ACM, 607–617. https://doi.org/10.1145/3351095.
3372850
[30] Daniel Nemirovsky, Nicolas Thiebaut, Ye Xu, and Abhishek Gupta. 2022. Coun-
teRGAN: Generating counterfactuals for real-time recourse and interpretability
using residual GANs. In Uncertainty in Artificial Intelligence, Proceedings of the
Thirty-Eighth Conference on Uncertainty in Artificial Intelligence, UAI 2022, 1-
5 August 2022, Eindhoven, The Netherlands (Proceedings of Machine Learning
Research, Vol. 180), James Cussens and Kun Zhang (Eds.). PMLR, 1488–1497.
https://proceedings.mlr.press/v180/nemirovsky22a.html
[31] Matthew L. Olson, Roli Khanna, Lawrence Neal, Fuxin Li, and Weng-Keen Wong.
2021. Counterfactual state explanations for reinforcement learning agents via
generative deep learning. Artif. Intell. 295 (2021), 103455. https://doi.org/10.1016/
j.artint.2021.103455
[32] Martin Pawelczyk, Sascha Bielawski, Johannes van den Heuvel, Tobias Richter,
and Gjergji Kasneci. 2021. CARLA: A Python Library to Benchmark Algorithmic
Recourse and Counterfactual Explanation Algorithms. In Proceedings of the Neural
Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS
Datasets and Benchmarks 2021, December 2021, virtual.
[33] Nikaash Puri, Sukriti Verma, Piyush Gupta, Dhruv Kayastha, Shripad Deshmukh,
Balaji Krishnamurthy, and Sameer Singh. 2020. Explain Your Move: Under-
standing Agent Actions Using Specific and Relevant Feature Attribution. In 8th
International Conference on Learning Representations, ICLR. OpenReview.net.
[34] Stuart Russell and Peter Norvig. 2016. Artificial Intelligence: A Modern Approach
Global Edition. Pearson (2016).
[35] Kathryn Schutte, Olivier Moindrot, Paul Hérent, Jean-Baptiste Schiratti, and
Simon Jégou. 2021. Using StyleGAN for Visual Interpretability of Deep Learning
Models on Medical Images. CoRR abs/2101.07563 (2021).
[36] Yael Septon, Tobias Huber, Elisabeth André, and Ofra Amir. 2022. Integrating
Policy Summaries with Reward Decomposition for Explaining Reinforcement
Learning Agents. arXiv preprint arXiv:2210.11825 (2022).
[37] Andrew Silva, Mariah Schrum, Erin Hedlund-Botti, Nakul Gopalan, and Matthew
Gombolay. 2022. Explainable Artificial Intelligence: Evaluating the Objective and
Subjective Impacts of xAI on Human-Agent Interaction. International Journal of
Human–Computer Interaction (2022), 1–15.
[38] Sumedha Singla, Motahhare Eslami, Brian Pollack, Stephen Wallace, and Kayhan
Batmanghelich. 2023. Explaining the black-box smoothly - A counterfactual
approach. Medical Image Anal. 84 (2023), 102721.
[39] Sandra Wachter, Brent Mittelstadt, and Chris Russell. 2017. Counterfactual
explanations without opening the black box: Automated decisions and the GDPR.
Harv. JL & Tech. 31 (2017), 841.
[40] Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray
Kavukcuoglu, and Nando de Freitas. 2016. Sample efficient actor-critic with
experience replay. arXiv preprint arXiv:1611.01224 (2016).
[41] Lindsay Wells and Tomasz Bednarz. 2021. Explainable AI and Reinforcement
Learning - A Systematic Review of Current Approaches and Trends. Frontiers
Artif. Intell. 4 (2021), 550030. https://doi.org/10.3389/frai.2021.550030
[42] Adam White, Kwun Ho Ngan, James Phelan, Saman Sadeghi Afgeh, Kevin
Ryan, Constantino Carlos Reyes-Aldasoro, and Artur d'Avila Garcez. 2021. Con-
trastive Counterfactual Visual Explanations With Overdetermination. CoRR
abs/2106.14556 (2021). arXiv:2106.14556
[43] Chao Yu, Jiming Liu, Shamim Nemati, and Guosheng Yin. 2021. Reinforcement
Learning in Healthcare: A Survey. 55, 1, Article 5 (2021), 36 pages. https:
//doi.org/10.1145/3477600
[44] Tom Zahavy, Nir Ben-Zrihem, and Shie Mannor. 2016. Graying the black box:
Understanding DQNs. In Proceedings of the 33nd International Conference on
Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016. 1899–
1908. http://proceedings.mlr.press/v48/zahavy16.html
[45] Baobao Zhang and Allan Dafoe. 2019. Artificial intelligence: American attitudes
and trends. Available at SSRN 3312874 (2019).
[46] Wenqi Zhao, Satoshi Oyama, and Masahito Kurihara. 2020. Generating Natural
Counterfactual Visual Explanations. In Proceedings of the Twenty-Ninth Interna-
tional Joint Conference on Artificial Intelligence, IJCAI 2020, Christian Bessiere
(Ed.). ijcai.org, 5204–5205. https://doi.org/10.24963/ijcai.2020/742
[47] Yunxia Zhao. 2020.
Fast Real-time Counterfactual Explanations.
CoRR
abs/2007.05684 (2020). arXiv:2007.05684
A IMPLEMENTATION DETAILS
In this section, we provide implementation details regarding the
training of our counterfactual generation methods. Our full imple-
mentation can be found online.4
B USER STUDY DEMOGRAPHICS
In this section, we provide more details regarding the demographic
of the participants in our user study. As Fig. 7 shows, the mean age
for each condition was around 40.
A.1 Training Data
For the size of our training data sets, we aimed for around 200000
states, since the StarGAN architecture from Choi et al. [6] that
we use in our approach was fine-tuned for the CelebA dataset,
which contains around 200000 images. To this end, we started by
sampling 400000 states for each game and each RL agent. For the
Pacman agents, after duplicate removal and under-sampling (see
Section 3.2), this leaves us with 230450 states for the blue-ghost
agent, 277045 states for the power pill agent and 40580 states for
the fear-ghosts agent. For Space Invaders, the dataset size is only
slightly reduced due to the removal of training samples that are
duplicates of test samples. For the normal agent, this resulted in
382989 states and for the flawed agent it resulted in 376711 states.
As is custom for the Atari environment [3, 28], we use a random
amount (in the range [0, 30]) of initial Do Nothing actions for each
episode to make the games less deterministic.
A.2 Training GANterfactual-RL
For training the StarGAN within our GANterfactual-RL approach,
we tried to stay as close to Choi et al. [6] as possible. We built our
implementation upon the published source code5 of Choi et al. [6]
and used their original settings. The network architecture is the
same as in Choi et al. [6]. For the loss functions specified in the main
paper, we use λcls = 1, λrec = 10, and λgp = 10. For training, we
use an ADAM optimizer with α = 0.0001, β1 = 0.5 and β2 = 0.999.
The model is trained for 200, 000 batch iterations with a batch size
of 16. The learning rate α linearly decays after half of the batch
iterations are finished. The Critic is updated 5 times per generator
update during training.
One thing we change compared to Choi et al. [6] is that we do not
flip images horizontally during training. This is an augmentation
step that improves the generalization on datasets of face images.
However, it is counterproductive for Atari frames since flipped
frames would often leave the space of possible Atari states or change
the action that the agent would select.
A.3 Training the Counterfactual State
Explanations Model
For training the counterfactual state explanation model proposed by
Olson et al. [31], we reuse their published source code6 to ensure
comparability and reproducibility. For this reason, we also use
the same Training parameters and network architecture. The only
change we had to make to the network architecture is that the size
of the latent space of our DQN Pacman agents is 256 compared to
the Space Invaders agents in Olson et al. [31] that have a latent
space size of 32.
4https://github.com/hcmlab/GANterfactual-RL
5https://github.com/yunjey/stargan
6https://github.com/mattolson93/counterfactual-state-explanations/
Figure 7: The participants' age per condition.
We verified that participants in different conditions did not differ
much in their AI experience and views and their Pacman experience.
To this end, we asked them when they played Pacman for the last
time. The results are shown in Figure 8.
Figure 8: The Pacman experience across all conditions
where the bars depict when the participants played Pacman
the last time. From left to right the bars represent: "more
than 5 years ago", "less than 5 years ago" and "less than 1
year ago".
For the AI experience we adapted a description of AI from Zhang
et al. [45] and Russel [34] to "The following questions ask about
Artificial Intelligence (AI). Colloquially, the term 'artificial intelli-
gence' is often used to describe machines (or computers) that mimic
'cognitive' functions that humans associate with the human mind,
such as 'learning' and 'problem solving'." After this description,
participants had to select one or more of the following items:
1: I know AI from the media.
2: I use AI technology in my private life.
3: I use AI technology in my work.
4: I took at least one AI-related course.
5: I do research on AI-related topics.
Other:
The distribution of the items for each condition is shown in Fig. 9.
The option Other was never chosen.
To measure the participants' attitude towards AI we adapted a
question from Zhang et al [45] and asked them to rate their answer
to the question "Suppose that AI agents would achieve high-level
performance in more areas one day. How positive or negative do
(excluding the time they spent on the instructions, quizzes, and sat-
isfaction questions). Figure 12 shows that the time that participants
spend on the main tasks does not differ much between conditions.
Figure 12: How much time (in seconds) the participants
spent on our two main tasks.
Finally, we want to report the average in-game score and survival
time of our Pacman agents since we used this as ground truth for
the agent comparison task. The blue-ghost agent got a mean score of
2035.6 and survived for 708.36 steps on average. The power pill agent
got a mean score of 1488 and survived for 696.4 steps on average.
The fear-ghosts agent got a mean score of 944.4 and survived for
6490.16 steps on average.
D EXAMPLE COUNTERFACTUALS
Figures 13, 14, 15, 16, and 17 show example counterfactuals for both
approaches tested in this work.
E FULL USER STUDY
Figures 18 to 29 present screenshots of our user study. Exemplarily,
we show the CSE condition.
Control
CSE
GANterfactual-RL
Figure 9: Distribution of the chosen AI experience items
for each condition. The x-axis depicts the items described
above.
you expect the overall impact of such AI agents to be on humanity
in the long run?" on a 5-point Likert scale from "Extremely negative"
to "Extremely positive". The results are shown in Fig. 10.
Figure 10: The average attitude towards AI, rated on a 5-
point Likert scale.
C SUPPLEMENTARY RESULTS
In this section, we present additional information about the results
of the user study that did not fit the scope of the main paper.
During our agent understanding task participants got the point
for each agent independent of whether they selected Pacman as
important since Pacman is the main source of information for all
our agents. We still wanted to exploratively look at how often the
participants picked Pacman in each condition. Figure 11 shows that
the results for picking Pacman are similar to the results for the
participants' scores in this task.
Figure 11: How often the participants in each condition se-
lected Pacman as important for the agent's strategy.
Another value we exploratively looked at is how long the par-
ticipants in each condition spent on doing the two main tasks
Move Right
Move Up
Move Up
Move Down
Move Up
Move Down
Move Left
Move Down
Move Right
Move Right
Figure 13: Example counterfactual states for the blue-ghost agent. The first row shows the original states and the second and
third rows show counterfactual states by Olson et al. [31] and our GANterfactual-RL approach respectively. The states and
actions are the same states that were used during our user study and were chosen by the HIGHLIGHTS-Div algorithm [1].
Move Left
Move Right
Move Up
Do Nothing/Keep Direction
Move Up
Move Down
Move Down
Move Down
Move Down
Move Right
Figure 14: Example counterfactual states for the power pill agent. The first row shows the original states and the second and
third rows show counterfactual states by Olson et al. [31] and our GANterfactual-RL approach respectively. The states and
actions are the same states that were used during our user study and were chosen by the HIGHLIGHTS-Div algorithm [1].
Move Right
Move Down
Move Down
Move Right
Move Right
Move Left
Move Up
Move Up
Move Left
Move Left
Figure 15: Example counterfactual states for the fear-ghosts agent. The first row shows the original states and the second and
third rows show counterfactual states by Olson et al. [31] and our GANterfactual-RL approach respectively. The states and
actions are the same states that were used during our user study and were chosen by the HIGHLIGHTS-Div algorithm [1].
Move Left
Right & Fire
Left & Fire
Right & Fire
Right & Fire
Right & Fire
Move Left
Move Right
Move Left
Move Left
Figure 16: Example counterfactual states for the flawed Space Invader agent. The first row shows the original states and the
second and third rows show counterfactual states by Olson et al. [31] and our GANterfactual approach respectively. The states
were chosen by the HIGHLIGHTS-Div algorithm [1]. The counterfactual actions were chosen to be complete opposites of the
original action. Despite this big difference in the action, both approaches do not move the laser cannon (highlighted with a
blue circle in the original frames) that the flawed agent does not see.
Right & Fire
Right & Fire
Right & Fire
Left & Fire
Right & Fire
Move Left
Move Left
Move Left
Move Right
Move Left
Figure 17: Example counterfactual states for the normal Space Invader agent. The first row shows the original states and the
second and third rows show counterfactual states by Olson et al. [31] and our GANterfactual approach respectively. The states
are chosen by the HIGHLIGHTS-Div algorithm [1]. The counterfactual actions are chosen to be complete opposites of the
original action. In contrast to the counterfactuals for the flawed Space Invaders Agent, both approaches sometimes modify
the laser cannon.
Figure 18: Demographic information.
Figure 19: The Pacman tutorial.
Figure 20: The Pacman quiz.
Figure 21: The first part of the counterfactual tutorial, which is built upon the tutorial by Olson et al. [31].
Figure 22: The second part of the counterfactual tutorial, which is built upon the tutorial by Olson et al. [31].
Figure 23: The quiz about counterfactual explanations.
Figure 24: The first part of the agent understanding task. This task was repeated for all three agents. The order of the agents
was randomized.
Figure 25: The second part of the agent understanding task. This task was repeated for all three agents. The order of the agents
was randomized.
Figure 26: Explanation Satisfaction for the agent understanding task.
Figure 27: The first part of the agent comparison task. This task was repeated for all three agent pairs. The order of the pairs
was randomized.
Figure 28: The second part of the agent comparison task. This task was repeated for all three agent pairs. The order of the
pairs was randomized.
Figure 29: Explanation Satisfaction for the agent comparison task.
|
|
http://arxiv.org/abs/2302.12688v1 | 2023-02-24T15:26:31 | 2023-02-24T15:26:31 | Video4MRI: An Empirical Study on Brain Magnetic Resonance Image
Analytics with CNN-based Video Classification Frameworks | To address the problem of medical image recognition, computer vision
techniques like convolutional neural networks (CNN) are frequently used.
Recently, 3D CNN-based models dominate the field of magnetic resonance image
(MRI) analytics. Due to the high similarity between MRI data and videos, we
conduct extensive empirical studies on video recognition techniques for MRI
classification to answer the questions: (1) can we directly use video
recognition models for MRI classification, (2) which model is more appropriate
for MRI, (3) are the common tricks like data augmentation in video recognition
still useful for MRI classification? Our work suggests that advanced video
techniques benefit MRI classification. In this paper, four datasets of
Alzheimer's and Parkinson's disease recognition are utilized in experiments,
together with three alternative video recognition models and data augmentation
techniques that are frequently applied to video tasks. In terms of efficiency,
the results reveal that the video framework performs better than 3D-CNN models
by 5% - 11% with 50% - 66% less trainable parameters. This report pushes
forward the potential fusion of 3D medical imaging and video understanding
research. | [
"Yuxuan Zhang",
"Qingzhong Wang",
"Jiang Bian",
"Yi Liu",
"Yanwu Xu",
"Dejing Dou",
"Haoyi Xiong"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12688v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12688v1",
"@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"
] | VIDEO4MRI: AN EMPIRICAL STUDY ON BRAIN MAGNETIC RESONANCE IMAGE
ANALYTICS WITH CNN-BASED VIDEO CLASSIFICATION FRAMEWORKS
Yuxuan Zhang†1,2, Qingzhong Wang†1, Jiang Bian†1, Yi Liu1, Yanwu Xu1, Dejing Dou1, Haoyi Xiong∗1
1 Baidu Inc., Beijing, China.
2 School of Data Science, The Chinese University of Hong Kong, Shenzhen, China.
3
2
0
2
b
e
F
4
2
]
V
C
.
s
c
[
1
v
8
8
6
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
To address the problem of medical image recognition, com-
puter vision techniques like convolutional neural networks
(CNN) are frequently used. Recently, 3D CNN-based mod-
els dominate the field of magnetic resonance image (MRI)
analytics. Due to the high similarity between MRI data and
videos, we conduct extensive empirical studies on video
recognition techniques for MRI classification to answer the
questions: (1) can we directly use video recognition models
for MRI classification, (2) which model is more appropriate
for MRI, (3) are the common tricks like data augmentation
in video recognition still useful for MRI classification? Our
work suggests that advanced video techniques benefit MRI
classification. In this paper, four datasets of Alzheimer's and
Parkinson's disease recognition are utilized in experiments,
together with three alternative video recognition models and
data augmentation techniques that are frequently applied to
In terms of efficiency, the results reveal that
video tasks.
the video framework performs better than 3D-CNN models
by 5% ∼ 11% with 50% ∼ 66% less trainable parameters.
This report pushes forward the potential fusion of 3D medical
imaging and video understanding research.
Index Terms- Brain MRI, CNN, Video Models
1. INTRODUCTION
Magnetic Resonance Imaging (MRI) is a common diagnostic
tool established for the identification of brain lesions caused
by neurological diseases, such as Alzheimer's Disease (AD),
Parkinson's Disease (PD), etc. Early identification is crucial
for these diseases since treatment can halt the progression and
lessen symptoms. Degenerative illnesses like AD and PD, in
contrast to brain tumors, cause age-related brain deterioration
throughout the entire brain rather than just one specific area.
For instance, the gyri may shrink, the sulci may deepen, and
the cerebral cortex may grow thinner [1]. In clinical practice,
the indicators of brain degeneration are manually identified by
physicians and doctors. However, such identifications would
be challenging when clinical staffs are not well-experienced
or the patient's case is not typical.
† Equal contribution. The work was done when Yuxuan Zhang was an in-
tern at Baidu. ∗Correspondence to Haoyi Xiong via [email protected].
Fig. 1. Test accuracy vs. the number of parameters of differ-
ent models. We test all models on the PPMI dataset.
With the development of deep neural networks [2], data-
driven medical image analysis experiences rapid growth,
serving as auxiliary tools for physicians to reduce the prob-
ability of misdiagnosis and speed up diagnosis processes.
Previous studies have demonstrated that recognition pipelines
developed for natural images can be transferred [3] to medi-
cal image classification with good performance. For 3D MRI
classification most well-implemented frameworks are based
on 3D CNNs, which extracts feature in 3 axes. However,
compared with 2D networks, 3D networks have more pa-
rameters and higher computational complexity, slow down
the training process. Researchers in the field of video recog-
nition have proposed many solutions to effectively extract
both space and time features, speeding up training and infer-
ence processes, and boosting the performance. The goal of
this work is to determine whether architectures designed for
video applications can efficiently and effectively extract both
plane and axial spatial features from 3D MRI for the purpose
of identifying diseases or diagnosing.
In this work, empirical studies of video recognition frame-
works for MRI classification are conducted. Specifically, we
compare 3D and advanced 2D models on 4 MRI datasets with
different diseases (AD and PD) and views (sagittal and axial).
To test the ability of different models and for fair compar-
isons, we train all models from scratch using raw magnetic
resonance images, i.e., model parameters are randomly ini-
tialized and input images are not pre-processed, keeping the
same as video recognition. Our experimental results show
that (1) directly applying video recognition frameworks to
MRI classification is able to achieve satisfying performance,
i.e., Temporal Shift Module (TSM) [4] with ResNet-50 [5] as
the backbone achieves 86.6% accuracy on PPMI dataset [6],
(2) advanced 2D models are more efficient and effective than
the widely applied 3D models, e.g., TSM with less training
time and fewer parameters obtains better performance on 4
datasets than 3D models. Fig. 1 presents a comparison among
different models in the perspective of performance and the
number of model parameters, (3) data augmentations which
are widely used in video recognition benefit MRI classifica-
tion, e.g., using data augmentation remarkably improve the
performance by around 10%.
2. PRELIMINARY
In this section, we present a brief overview of Brain MRI tasks
and video analytical models.
2.1. Brain MRI classification
The task of brain MRI classification requires a model to pro-
vide a label that indicates whether the patient is healthy given
a set of magnetic resonance images. Over the past decade,
CNN-based models are widely used in dozens of studies on
brain disorders like Parkinson's disease[7, 8], Alzheimer's
disease[9, 10, 11, 12], Schezo-phrenia[13], etc. Those pro-
posed models can be divided into two main categories. The
first trend is 3D CNN-based models that use 3D convolutional
kernels to sufficiently use voxel information in the whole MRI
[11]. 3D methods normally require high computational costs
and have high computational complexity. The second trend
is 2D CNN models that process slices of MRI independently
and fuse the decision of the model in late stage [12]. These
approaches reduce computational costs and complexity. Also,
one can easily plug pre-trained 2D backbones into classifiers,
so as to accelerate their convergence during fine-tuning [14].
However, 2D approaches neglect spatial correlation among
slices, which is crucial for classification.
2.2. Video recognition frameworks
Video recognition is a representative task in computer vision
[15]. Compared with image recognition, the main challenge
in video recognition is to efficiently extract temporal infor-
mation from videos. A straightforward idea is to extend a
2D model to its 3D version using 3D convolutional kernels to
replace 2D kernels. Representative works include I3D [16],
R3D [17], etc. These architectures achieve satisfying perfor-
mance but have much higher computational costs, requiring
more training time and GPU memory. Alternatively, some
2D models extract features from video frames or other auxil-
iary features like optical flow using 2D convolutional kernels.
The representative works include Two-stream network[18],
Temporal Segment Network (TSN) [19], etc. These meth-
ods reduce computational costs and complexity but they just
aggregate the frame-level labels to obtain a video-level label,
Table 1. Detailed information of used datasets.
Dataset
PPMI
ADNI
OASIS-1
OASIS-2
Total subjects
97(PD):81(NC)
228(AD):188(NC)
100(AD):136(NC)
80(AD):86(NC)
Total images
222
416
236
1368
View
sagital
sagital
axial
sagital
which cannot capture much temporal information.
In con-
trast, TSM [4] employs 2D convolutional kernels and designs
a shift module to imitate 3D convolution, reducing computa-
tional costs and achieving better performance than 3D mod-
els. SlowFast [20] applies two branches to model slow and
fast motions in videos, where the slow branch uses a low sam-
pling rate and the fast branch uses a high sampling rate. In this
paper, we focus on 3 typical video recognition frameworks:
TSN, TSM and SlowFast.
TSN is a 2D video recognition network. In the training
process, the input video is divided into segments and it ran-
domly selects one frame from each segment. A 2D CNN is
applied to each selected frame to extract features and finally
TSN uses the mean feature of each frame for classification.
In addition to frames, the optical flows of each selected frame
are used to provide motion information.
TSM also employ 2D CNNs to extract frame-level fea-
tures, but it models temporal motion by shifting the feature
maps on the temporal axis. Such operation does not increase
computational cost but well captures temporal information in
videos.
In TSM, residual networks (ResNet) are used and
temporal shift performs on each residual block. Thus, tempo-
ral information can be captured in multiple stages with differ-
ent scales. Finally, TSM outputs results with a linear model.
SlowFast leverages a multi-path architecture [21] and is
composed of two independent paths which sample the input
video at different rates. The slow path has a lower sample rate
and employs more convolutional kernels to capture semantic
features, whereas the fast path has a higher sample rate and
fewer convolutional kernels to capture motion features. The
slow path uses both 2D and 3D convolutional kernels and the
fast path is a small 3D network. Such model efficiently cap-
tures features along 3 axes simultaneously.
3. EXPERIMENTAL SETTINGS
3.1. Datasets
To illustrate that video recognition frameworks are adap-
tive to MRI classification, the models are separately tested
on 4 datasets for two diseases, including ADNI1, OASIS-1,
OASIS-22 for Alzheimer's Disease (AD) and PPMI [6]3 for
Parkinson's Disease (PD). Each dataset contains brain MRIs
of demented patients (with AD/PD) and Non-demented con-
trol (NC) patients. More information is shown in Table 1.
1https://adni.loni.usc.edu
2https://www.oasis-brains.org
3https://www.ppmi-info.org
3.2. Models
Three series of video models are modified for MRI tasks and
used in this research: TSN, TSM, and SlowFast. The models
take raw magnetic resonance images as the only input modal-
ity. Given the characteristics of MRI data, we employ the
TSN sampling technique, which divides the input MRI into
K evenly spaced segments and randomly selects 1 frame from
each segment during training. In order to acquire testing re-
sults under set conditions, the sampler takes the middle frame
from each segment during the testing procedure. The TSN
model in this work simply feeds K frames of images with
shape W × H into the 2D backbone network with shared pa-
rameters and we can obtain a D-dimensional feature vector
for each frame, thereby acquiring a K × D feature matrix of
the input MRI. The final feature vector for classification is
D-dimensional and is obtained by simply taking the mean of
K frame features. Then a fully connected classification head
outputs the probability of 2 classes. In our experiments, we
set K = 32, W = 224, H = 224 and D = 2048. We also
conduct ablation studies on K.
The TSM model has the same basic structure as the TSN
with the addition of a temporal-shift operator on each resid-
ual block of the backbone. Two versions of the backbone,
ResNet-18, and ResNet-50 are tested in TSN and TSM. Slow-
Fast model with ResNet-50 architecture is used, where the
frame rate in the fast path is 8 times larger than that of the
slow path in this paper, i.e., the slow path samples 4 frames
and fast path samples 32 frames.Finally, 3D-ResNet-18 and
3D-ResNet-50 are compared with the above video recogni-
tion models using the same experimental settings.
3.3. Data Augmentation
Since deep models are normally large, leading to overfitting
on small-scale datasets with hundreds of data samples. One
of the most widely applied techniques to mitigate this issue
is using data augmentations during training. In this paper, we
employ video recognition frameworks for MRI classification,
hence the data augmentation strategies that are commonly
used in video recognition can also be employed to alleviate
the problem of overfitting, improving the performance.
In
video recognition frameworks, a training sample is composed
of a sequence of images and we successively apply random
resize crop, brightness transform, and random rotation with
a small angle to each image as a simple augmentation. Re-
cently, VideoMix [22] shows a strong ability to improve the
performance of deep models.
In this paper, we investigate
random rotation, CutMix [23], and MixUp [24] for MRI clas-
sification. Specifically, we rotate each image with a random
angle ranging from [−15◦, 15◦], and randomly apply spatial
CutMix and MixUp with 60% and 40% chances.
3.4. Training and test
All models are trained from scratch using a single Tesla V100
GPU. The batch size is 4 to fully utilize GPU memory. Model
parameters are initialized using Kaiming initialization [25]
and optimized using cross-entropy loss. The learning rate is
set to 5 × 10−5 after 5 warm-up epochs, then arrives at zero
with a single cosine cycle. Models are trained for 100 epochs
for all datasets, and in the first 80 epochs, we use mix-based
augmentation. We also use weight decay for the final FC layer
in the classification head of TSM and TSN, and the coefficient
of weight decay is set to 10−4 and the dropout [26] rate is 0.4.
All 4 datasets are split into the training set and test set
with a ratio of 7:3 on the subject level such that images ob-
tained from the same individual will not appear in the train-
ing set and test set simultaneously. Since the test set for each
dataset is small, the final accuracy is calculated by bootstrap-
ping the test set. Specifically, the bootstrapping algorithm
samples 40% of the test set with replacement and calculate
accuracy for 100 times, then the mean accuracy and its 95%
confidence interval are used as evaluation metrics of model
performance. We also tested the training time for each epoch,
the total number of trainable parameters, and inference time
per sample to evaluate the efficiency of each model.
4. RESULTS AND DISCUSSIONS
Table 2 shows the results of all models on 4 datasets. Obvi-
ously, directly applying advanced video recognition frame-
works to MRI classification can achieve satisfying perfor-
mance. Compared to the most widely used 3D models in
MRI classification, advanced video recognition frameworks
show superiority in both effectiveness and efficiency. For
example, SlowFast achieves 0.868 accuracy on PPMI, 5.72%
higher than that obtained by 3DResNet-50 (0.868 vs. 0.821),
and the training time decreases by 11.6% (33.61 vs. 46.16).
TSN and TSM are much faster in both training and inference
phases, e.g., the inference time of TSM-Res18 is 24.4% less
than that of 3DResNet-18 (28.9 vs. 38.4) and around 1/3 of
In terms of the effective perfor-
SlowFast (28.9 vs. 87.9).
mance, TSM-Res50 is superior to 3D ResNet on all datasets
and the improvement ranges from 4.75% to 16.23%. Though
TSM and TSN are slightly inferior to SlowFast on PPMI
and OASIS-1, they have fewer learnable parameters and run
faster. One possible reason for the superiority of 2D models
is that they use 2D kernels to extract plane features frame by
frame, which is similar to manual diagnosis by physicians.
4.1. Ablation study the number of extracted frames
There are hundreds of magnetic resonance images for a pa-
tient and it is difficult to feed all images into a deep model
due to the limitation of computation resources. A common
way is to draw K images as input, thus the value of K is cru-
cial for the final performance. In this section, we conduct ab-
lation studies on K. Fig. 2 presents the performance of TSM-
Res50 and TSN-Res50 on PPMI and ADNI with different val-
ues of K. Obviously, a large K slows down the training and
inference processes and a small K could reduce the recog-
nition accuracy. We can see that for both TSM-Res50 and
TSN-Res50, K = 32 is a better choice, which achieves much
Table 2. Results of test accuracy and confidence interval on 4 datasets.
Acc. (95%CI)
PPMI
ADNI
OASIS-1
OASIS-2
Training
time(s)
Params
number(M)
Inference
time(ms)
3DResNet-18
3DResNet-50
TSN-Res18
TSN-Res50
TSM-Res18
TSM-Res50
SlowFast
0.809(0.122)
0.821(0.118)
0.828(0.108)
0.840(0.111)
0.849(0.103)
0.866(0.102)
0.868(0.107)
0.622(0.101)
0.581(0.108)
0.739(0.083)
0.736(0.078)
0.738(0.094)
0.732(0.089)
0.737(0.095)
0.752(0.143)
0.758(0.126)
0.725(0.133)
0.777(0.109)
0.753(0.131)
0.794(0.106)
0.809(0.101)
0.647(0.062)
0.657(0.062)
0.716(0.056)
0.689(0.060)
0.752(0.054)
0.718(0.057)
0.730(0.050)
36
43
19
24
20
26
38
33.16
46.16
11.19
23.56
11.19
23.56
33.61
38.4
61.5
28.9
59.6
28.9
59.6
87.9
Table 3. Ablation study on data augmentation
PPMI
ADNI
TSM
TSM+rotate
TSM+MixUp/CutMix
TSM+rotate+MixUp
TSM+rotate+CutMix
TSM+rotate+MixUp/CutMix
0.793(0.121)
0.832(0.106)
0.810(0.117)
0.813(0.110)
0.853(0.114)
0.866(0.102)
0.630(0.092)
0.659(0.096)
0.730(0.092)
0.516(0.106)
0.732(0.089)
0.708(0.087)
as TSM and SlowFast performance significantly better than
the widely used 3D models, (2) TSM is a better choice for
MRI classification when considering both effectiveness and
efficiency, (3) video recognition techniques like data augmen-
tation are useful for MRI classification. Possible future direc-
tions include leveraging advanced pre-training [27] & fine-
tuning strategies [28] to solve MRI tasks and explaining the
diagnosis resultss [29, 30] delivered by MRI models.
6. REFERENCES
[1] K A N N P Gunawardena, R N Rajapakse, and N D
Kodikara, "Applying convolutional neural networks for
pre-detection of alzheimer's disease from structural mri
data," in M2VIP, 2017, pp. 1–7.
[2] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton,
"Deep learning," Nature, vol. 521, no. 7553, pp. 436–
444, 2015.
[3] Xingjian Li, Haoyi Xiong, Haozhe An, Cheng-Zhong
Xu, and Dejing Dou, "Rifle: Backpropagation in depth
for deep transfer learning through re-initializing the
fully-connected layer," in ICML, 2020, pp. 6010–6019.
[4] Ji Lin, Chuang Gan, and Song Han, "Tsm: Tempo-
ral shift module for efficient video understanding," in
ICCV, 2019, pp. 7083–7093.
[5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian
Sun, "Deep residual learning for image recognition," in
CVPR, 2016, pp. 770–778.
[6] Kenneth Marek, Danna Jennings, Shirley Lasch, An-
drew Siderowf, Caroline Tanner, Tanya Simuni, Chris
Coffey, Karl Kieburtz, Emily Flagg, Sohini Chowdhury,
et al.,
"The parkinson progression marker initiative
(ppmi)," Progress in neurobiology, vol. 95, no. 4, pp.
629–635, 2011.
[7] Tahjid Ashfaque Mostafa and Irene Cheng, "Parkinson's
disease detection using ensemble architecture from mr
images," in BIBE, 2020, pp. 987–992.
[8] Jing Zhang, "Mining imaging and clinical data with ma-
chine learning approaches for the diagnosis and early
Fig. 2. The performance of TSM-Res50 and TSN-Res50 with
different values of K on PPMI(left) and ADNI(right) datasets.
higher accuracy than using K = 16 and K = 8. Though
using K = 64 can achieve similar accuracy on ADNI, the
computational complexity doubles. In this paper, we suggest
using K = 32 to balance effectiveness and efficiency.
4.2. Ablation study on data augmentation
Data augmentation plays a vital role in existing video recog-
nition frameworks. Particularly, if the training set is small,
data augmentation is useful for mitigating overfitting.
In
this section, we investigate the effects of using different data
augmentation strategies - random rotation, CutMix and
MixUp which are popular techniques in video recognition.
Table 3 shows the performance of TSM-Res50 with different
data augmentation strategies on PPMI and ADNI. We can
easily make the conclusion that data augmentation can sig-
nificantly boost the performance, e.g., the performance on
PPMI surges from 0.793 to 0.866.
Interestingly, applying
MixUp hurts the performance, e.g., TSM+rotate achieves
0.832 and 0.659 on PPMI and ADNI, while the performance
of TSM+rotate+MixUp decreases to 0.813 and 0.516 respec-
tively. The possible reason is that magnetic resonance images
are similar and the directly weighted sum of two images
could make the lesion areas less distinctive, leading to mis-
classification. In contrast, CutMix remarkably improves the
performance, since it crops an image area and the lesion areas
are still distinguishable.
5. CONCLUSION
In this paper, we have investigated MRI classification using
advanced video recognition frameworks, finding that (1) di-
rectly applying advanced video recognition frameworks, such
detection of parkinson's disease," npj Parkinson's Dis-
ease, vol. 8, no. 1, pp. 1–15, 2022.
segment networks: Towards good practices for deep ac-
tion recognition," in ECCV. Springer, 2016, pp. 20–36.
[9] Rafsanjany Kushol, Abbas Masoumzadeh, Dong Huo,
Sanjay Kalra, and Yee-Hong Yang,
"Addformer:
Alzheimer's disease detection from structural mri using
fusion transformer," in ISBI. IEEE, 2022, pp. 1–5.
[10] Chao Li, Yue Cui, Na Luo, Yong Liu, Pierrick Bourgeat,
Jurgen Fripp, and Tianzi Jiang, "Trans-resnet: Integrat-
ing transformers and cnns for alzheimer's disease clas-
sification," in ISBI. IEEE, 2022, pp. 1–5.
[11] Nikhil J Dhinagar, Sophia I Thomopoulos, Conor
Owens-Walton, Dimitris Stripelis, Jose Luis Ambite,
Greg Ver Steeg, Daniel Weintraub, Philip Cook, Corey
McMillan, and Paul M Thompson, "3d convolutional
neural networks for classification of alzheimer's and
in
parkinson's disease with t1-weighted brain mri,"
SIPAIM. SPIE, 2021, vol. 12088, pp. 277–286.
[12] Gongbo Liang, Xin Xing, Liangliang Liu, Yu Zhang,
Qi Ying, Ai-Ling Lin, and Nathan Jacobs, "Alzheimer's
disease classification using 2d convolutional neural net-
works," in EMBC. IEEE, 2021, pp. 3008–3012.
[13] Jihoon Oh, Baek-Lok Oh, Kyong-Uk Lee, Jeong-Ho
Chae, and Kyongsik Yun, "Identifying schizophrenia
using structural mri with a deep learning algorithm,"
Frontiers in psychiatry, vol. 11, pp. 16, 2020.
[14] Haoyi Xiong, Ruosi Wan, Jian Zhao, Zeyu Chen,
Xingjian Li, Zhanxing Zhu, and Jun Huan, "Grod: Deep
learning with gradients orthogonal decomposition for
knowledge transfer, distillation, and adversarial train-
ing," ACM Transactions on Knowledge Discovery from
Data (TKDD), vol. 16, no. 6, pp. 1–25, 2022.
[15] Fei Wu, Qingzhong Wang, Jiang Bian, Ning Ding, Feix-
iang Lu, Jun Cheng, Dejing Dou, and Haoyi Xiong, "A
survey on video action recognition in sports: Datasets,
methods and applications," IEEE Transactions on Mul-
timedia, 2022.
[16] Joao Carreira and Andrew Zisserman, "Quo vadis, ac-
tion recognition? a new model and the kinetics dataset,"
in CVPR, 2017, pp. 6299–6308.
[17] Kensho Hara, Hirokatsu Kataoka, and et al., "Learning
spatio-temporal features with 3d residual networks for
action recognition," in ICCV Workshops, 2017.
[18] Karen Simonyan and Andrew Zisserman,
"Two-
stream convolutional networks for action recognition in
videos," NIPS, vol. 27, 2014.
[19] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao,
Dahua Lin, Xiaoou Tang, and Luc Van Gool, "Temporal
[20] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik,
and Kaiming He, "Slowfast networks for video recogni-
tion," in ICCV, 2019, pp. 6202–6211.
[21] Baoxin Zhao, Haoyi Xiong, Jiang Bian, Zhishan Guo,
Cheng-Zhong Xu, and Dejing Dou,
"Como: Effi-
cient deep neural networks expansion with convolu-
tional maxout," IEEE Transactions on Multimedia, vol.
23, pp. 1722–1730, 2021.
[22] Sangdoo Yun, Seong Joon Oh, Byeongho Heo, Dongy-
"Videomix: Rethink-
oon Han, and Jinhyung Kim,
ing data augmentation for video classification," arXiv
preprint arXiv:2012.03457, 2020.
[23] Sangdoo Yun, Dongyoon Han, Seong Joon Oh,
Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo,
"Cutmix: Regularization strategy to train strong clas-
sifiers with localizable features," in ICCV, 2019, pp.
6023–6032.
[24] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and
David Lopez-Paz, "mixup: Beyond empirical risk min-
imization," arXiv preprint arXiv:1710.09412, 2017.
[25] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian
Sun, "Delving deep into rectifiers: Surpassing human-
level performance on imagenet classification," in ICCV,
2015, pp. 1026–1034.
[26] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky,
Ilya Sutskever, and Ruslan Salakhutdinov, "Dropout: a
simple way to prevent neural networks from overfitting,"
JMLR, vol. 15, no. 1, pp. 1929–1958, 2014.
[27] Weibin Liao, Haoyi Xiong, Qingzhong Wang, and et al.,
"Muscle: Multi-task self-supervised continual learning
to pre-train deep models for x-ray images of multiple
body parts," in MICCAI. Springer, 2022, pp. 151–161.
[28] Xingjian Li, Haoyi Xiong, Hanchao Wang, Yuxuan Rao,
Liping Liu, and Jun Huan, "Delta: Deep learning trans-
fer using feature map with attention for convolutional
networks," in ICLR, 2019.
[29] Xuhong Li, Haoyi Xiong, Xingjian Li, Xuanyu Wu,
Xiao Zhang, Ji Liu, Jiang Bian, and Dejing Dou, "Inter-
pretable deep learning: Interpretation, interpretability,
trustworthiness, and beyond," Knowledge and Informa-
tion Systems, vol. 64, no. 12, pp. 3197–3234, 2022.
[30] Xuhong Li, Haoyi Xiong, Xingjian Li, Xuanyu Wu,
"Interpretdl: Explain-
Zeyu Chen, and Dejing Dou,
ing deep models in paddlepaddle," Journal of Machine
Learning Research, vol. 23, no. 197, pp. 1–6, 2022.
|
|
http://arxiv.org/abs/2302.12685v2 | 2023-07-24T21:11:55 | 2023-02-24T15:21:39 | Active Membership Inference Attack under Local Differential Privacy in
Federated Learning | Federated learning (FL) was originally regarded as a framework for
collaborative learning among clients with data privacy protection through a
coordinating server. In this paper, we propose a new active membership
inference (AMI) attack carried out by a dishonest server in FL. In AMI attacks,
the server crafts and embeds malicious parameters into global models to
effectively infer whether a target data sample is included in a client's
private training data or not. By exploiting the correlation among data features
through a non-linear decision boundary, AMI attacks with a certified guarantee
of success can achieve severely high success rates under rigorous local
differential privacy (LDP) protection; thereby exposing clients' training data
to significant privacy risk. Theoretical and experimental results on several
benchmark datasets show that adding sufficient privacy-preserving noise to
prevent our attack would significantly damage FL's model utility. | [
"Truc Nguyen",
"Phung Lai",
"Khang Tran",
"NhatHai Phan",
"My T. Thai"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12685v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12685v2",
"@rel": "related",
"@type": "application/pdf"
}
] | [
"Proceedings of The 26th International Conference on Artificial\n Intelligence and Statistics, PMLR 206:5714-5730, 2023"
] | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"cs.AI",
"cs.CR"
] | Active Membership Inference Attack under Local Differential Privacy in
Federated Learning
3
2
0
2
l
u
J
4
2
]
G
L
.
s
c
[
2
v
5
8
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Truc Nguyen
University of Florida
[email protected]
Phung Lai
New Jersey Institute of Technology
[email protected]
Khang Tran
New Jersey Institute of Technology
[email protected]
NhatHai Phan
New Jersey Institute of Technology
[email protected]
My T. Thai*
University of Florida
[email protected]
Abstract
Federated learning (FL) was originally regarded
as a framework for collaborative learning among
clients with data privacy protection through a co-
ordinating server. In this paper, we propose a new
active membership inference (AMI) attack carried
out by a dishonest server in FL. In AMI attacks,
the server crafts and embeds malicious parameters
into global models to effectively infer whether a
target data sample is included in a client's private
training data or not. By exploiting the correlation
among data features through a non-linear decision
boundary, AMI attacks with a certified guarantee
of success can achieve severely high success rates
under rigorous local differential privacy (LDP)
protection; thereby exposing clients' training data
to significant privacy risk. Theoretical and ex-
perimental results on several benchmark datasets
show that adding sufficient privacy-preserving
noise to prevent our attack would significantly
damage FL's model utility.
1
INTRODUCTION
Federated Learning (FL) has emerged as a promising large-
scale collaborative learning framework in recent years. By
design, FL enables participating clients to collaboratively
train a global model through a coordinating server. Al-
though training data never leaves clients' devices, a dis-
honest server can still infer the membership information
Proceedings of the 26th International Conference on Artificial Intel-
ligence and Statistics (AISTATS) 2023, Valencia, Spain. PMLR:
Volume 206. Copyright 2023 by the author(s).
*Corresponding author
of any client's training data through observing their local
model updates by using (passive or active) membership
inference attacks [Shokri et al., 2017, Salem et al., 2019,
Song and Mittal, 2021, Nasr et al., 2019]. For that reason,
FL in its primitive form offers little to no privacy protection.
To address the problem, several privacy-preserving mecha-
nisms, such as local differential privacy (LDP), have been
developed to challenge membership inference (MI) attacks
in general and active membership inference (AMI) attacks
in particular by effectively protecting the membership in-
formation of client's training data with upper-bounded
privacy leakage [Arachchige et al., 2019, Sun et al., 2021,
Lai et al., 2021, Lyu et al., 2020]. Recent studies appar-
ently show that LDP protection is effective in mitigating MI
and AMI attacks [Rahman et al., 2018, Bernau et al., 2021,
Gu et al., 2022]. The key reason for this result is that exist-
ing attacks have not fully conveyed privacy risks in FL by
under-exploiting the correlation among data features and
LDP protection. That poses previously unexplored privacy
risk to the clients' local training data.
Key Contributions. To tackle that problem, we first formal-
ize a new AMI threat model equipped with an AMI attack
from a dishonest server. The key idea is that, given a target
data sample, the server carefully crafts malicious weights
of the global model such that the model updates from the
clients would expose the membership information of the
target data sample through the behavior of a chosen neuron.
A chosen neuron is only activated given the target data sam-
ple controlled by a non-linear decision boundary embedded
inside the malicious weights. With our non-linear decision
boundary, the server can infer this membership information
with severely high success rates. Furthermore, the server
effortlessly achieves this result with a minimal change to
the global model parameters within one training iteration.
In addition, we take a step forward and devise an AMI attack
strategy under LDP protection to significantly amplify the
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
privacy risk in FL. By adding a certain amount of privacy-
preserving noise to the local data before training, LDP can
protect the data with formal privacy leakage bounds (con-
trolled by a privacy budget ε) [Dwork et al., 2014]. The
key advantage of our AMI attack is exploiting the corre-
lation among data features to distinguish the target data
sample from others under LDP protection (Eq. 7). If LDP-
preserving noise is insufficient to break this correlation (i.e.,
large privacy budgets ε), clients' local data will be at risk of
our AMI attack with certified guarantees of success. Mean-
while, large privacy-preserving noise (i.e., small privacy
budgets ε) can significantly damage the FL's model utility.
Our theoretical and experimental results in many benchmark
datasets show that our AMI attacks stress-test the fundamen-
tal trade-offs between model utility and privacy risk in FL
to a new level. This is reflected through notably high suc-
cess rates under rigorous LDP protection (i.e., small privacy
budgets ε which significantly degenerate FL's model utility).
Organization. The remainder of the paper is structured
as follows. Section 2 presents background and establishes
our threat model. Section 3 introduces our AMI attack
from a dishonest server in FL. We devise an attack strategy
under LDP protection with certified guarantees of success
in Section 4. Section 5 evaluates the performance of AMI
attacks in several benchmark datasets. Section 6 discusses
related work and Section 7 provides concluding remarks.
2 BACKGROUND AND THREAT MODEL
In this section, we briefly review the background of feder-
ated learning and differential privacy, and then introduce
our active membership inference threat model.
2.1 Background
Federated Learning (FL). We focus on a horizontal set-
ting of FL in which different clients hold the same set of fea-
tures but different sets of samples. We denote fθ : Rd → Rk
as a k-class neural network model that is parameterized by
a set of weights θ. The aim of fθ is to map a data point
x ∈ Rd to a vector of posterior probabilities fθ(x) = Y
over k classes, where the sum of all values in Y is 1.
FL is an iterative learning framework for training a global
model fθ on distributed data owned by N different clients
{uj}N
j=1. A central server coordinates the training of fθ
by iteratively aggregating gradients computed locally by
the clients. Let i ∈ Z≥0 be the current iteration of the
FL protocol, and θi be the set of parameters at iteration
i. At iteration i = 0, the global θi is initialized randomly
by the central coordinating server. At every iteration i, a
subset of M < N clients is randomly selected to participate
in the training. Each of the selected clients uj receives
fθi from the central server and calculates the gradients Gi
j
for fθi using their local training batch Dj. Specifically,
j = ∇θiL(Dj, θi) where L is a loss function. Then,
Gi
each uj uploads its gradients to the central server, who
averages all of these gradients to compute the global model's
parameters with a learning rate η:
Gi =
1
M
M
(cid:88)
j=1
Gi
j,
θi+1 = θi − ηGi
(1)
The training continues until fθi converges.
FL with Local Differential Privacy (LDP). Recent at-
tacks have shown that clients' training data samples can
be extracted from the shared gradients [Zhu et al., 2019,
Yin et al., 2021]. These attacks underscore privacy risks in
FL. Therefore, privacy-preserving mechanisms are needed
to control and mitigate the privacy risks introduced by gra-
dient sharing while optimizing utility.
Local differential privacy (LDP)
[Dwork et al., 2006,
Erlingsson et al., 2014] is one of the auspicious solutions,
given its formal protection without an undue sacrifice in
computation efficiency. LDP builds on the ideas of ran-
domized response [Warner, 1965], which was initially intro-
duced to allow survey respondents to provide their inputs
while maintaining their confidentiality. The definition of
ε-LDP is as follows:
Definition 1. ε-LDP. A randomized algorithm M fulfills
ε-LDP, if for any two inputs x and x′, and for all pos-
sible outputs O ∈ Range(M), we have: P r[M(x) =
O] ≤ eεP r[M(x′) = O], where ε is a privacy budget and
Range(M) denotes every possible output of M.
The privacy budget ε controls the amount by which the
distributions induced by inputs x and x′ may differ. A
smaller value of ε enforces a stronger privacy guarantee but
reduces model utility.
2.2 Active Membership Inference Threat Model
Previous studies typically focus on a scenario in which the
central server is interested in uncovering client information
by examining local updates from the clients, but still abid-
ing by the system protocol. This threat model is commonly
referred to as honest-but-curious or semi-honest. However,
this threat model undermines the vulnerability of the FL
system as in practice, the server can deviate from the proto-
col to strengthen the privacy attacks [Boenisch et al., 2021,
Nguyen et al., 2022, Fowl et al., 2021]. In this work, we are
thus interested in explicitly malicious (or actively dishon-
est) servers that may modify the model architecture and/or
model parameters before dispatching them to the clients.
In this regard, we propose an active membership inference
threat model, in which a dishonest server maliciously ad-
justs the model parameters to determine whether a target
data sample is in the local training dataset of a client.
Truc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
Exp(A, L, D):
D ∼ Dn # Sample n data points from D into D
b $← {0, 1} # Flip a bit b uniformly at random
if b = 1 then
t $← D # Choose t uniformly from D
end
else
t ∼ D \ D # Sample t from D s.t. t /∈ D
INIT(t) # The adversary receives t and returns a set
end
θ ← AD
of parameters θ
G ← ∇θL(D, θ) # Compute the gradients from θ and D
b′ ← AD(t, G) # The adversary receives t, G and returns a
bit b′
Ret [b′ = b] # The game returns 1 if b′ = b (the adversary
wins), 0 otherwise
Figure 1: AMI Threat Model as a Security Game.
We describe the active membership inference threat model
as follows. We denote A as the central server in FL, which
is also the adversary. Note that this threat model repre-
sents an attack at an arbitrary iteration that targets a spe-
cific client. Let D = {(xi, yi)} be the batch of train-
ing data of the target client. The set D contains sample
xi ∈ Rd and its ground-truth label yi ∈ {1, ..., k} with k
classes. Suppose that D is sampled from a distribution D on
(xi, yi) that the adversary A has knowledge of (i.e., similar
to existing studies [Carlini et al., 2022, Yeom et al., 2018,
Shokri et al., 2017]). This is practical in the real world since
the server can collect a massive amount of data that covers
the local data distribution of a sufficient number of clients
[Shokri et al., 2017]. The adversary outputs maliciously
crafted model parameters θ to the target client. The client
sends the local gradients G = ∇θL(D, θ) back to the ad-
versary. By observing the local gradients G, the goal of the
server's attack is to determine whether a target (data) sample
t ∈ Rd is included in the local training set D. More formally,
the adversary can be defined as the following function:
AD : t, G → {0, 1}
(2)
where AD denotes the query access to D, 1 means t ∈ D,
and 0 otherwise.
We formalize this threat model as a security game
Exp(A, L, D) between a challenger and the adversary in
Fig. 1. From that, the adversary's advantage, or the attack
success rate, is defined as follows:
AdvA = Pr[Exp(A, L, D) = 1]
=
1
2
Pr[b′ = 1|b = 1] +
Pr[b′ = 0|b = 0]
(3)
1
2
where Pr[b′ = 1|b = 1] is the True Positive Rate (TPR),
and Pr[b′ = 0|b = 0] is the True Negative Rate (TNR). The
success rate AdvA should be greater than 0.5, which is the
probability of random guessing.
3 ACTIVE MEMBERSHIP INFERENCE
(AMI) ATTACK
This section first discusses the technical intuition of mem-
bership inference through gradients. Based on this concept,
we then describe our proposed strategy to launch the AMI
attack from a dishonest server.
3.1
Inferring Membership via Gradients
As shown in Fig. 1, the adversary A receives the gradients
G that was computed on the training set D, and A wishes
to determine whether t ∈ D. This section discusses how the
membership information can be inferred through gradients.
Suppose that, on an input data point x ∈ Rd, the output of
the first fully-connected layer is expressed as ReLU(W x +
b) = max(0, W x + b) where W ∈ Rr×d is the weight
matrix of that layer and b ∈ Rr is the bias vector (r is the
number of neurons in the layer). To express the output of the
i-th neuron of that layer, we denote Wi as the corresponding
row in the weight matrix and bi as the corresponding compo-
nent in the bias vector. We observe that, when Wix+bi ≤ 0,
the ReLU outputs zero, in other words, the neuron i is not
activated by x. As a result, the gradient of neuron i, de-
noted by G(x)
, is zero at the data point x. Otherwise, when
Wix + bi > 0, the gradient G(x)
is non-zero.
i
i
As the gradient G is computed over the whole training set
D, the gradient of a neuron i received by the adversary is
the average of gradients over all data points x ∈ D, i.e.,
Gi = 1
. If there exists a neuron i that is
|D|
activated only by a target data sample t (t ∈ Rd), and not
activated by any other data samples x ̸= t, then we have:
x∈D G(x)
(cid:80)
i
d
(cid:88)
j=1
d
(cid:88)
j=1
Wijtj > 0
Wijxj ≤ 0,
∀x ∈ D \ t
(4)
note that we suppress the bias term for simplicity.
If t ∈ D, then Gi will be non-zero; otherwise, t /∈ D results
in Gi being zero. From that, the adversary upon seeing Gi
can easily infer whether the target data sample t was a part of
the training set D or not. The formulation in Eq. (4) is sim-
ilar to the framework proposed by [Boenisch et al., 2021]
for conducting data reconstruction attacks where a neuron
that is activated only by one sample can be used to perfectly
reconstruct that sample. However, we shall see below that
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
this simple formulation is actually inapplicable to the mem-
bership inference attack, thus requiring a more advanced
strategy to launch the attack.
3.2 Attack Strategy: Manipulating Model Parameters
via Training a Chosen Neuron
As aforementioned, if there exists a neuron that is activated
only by the target data sample t, it is sufficient to determine
whether t is in the training set D or not. From the threat
model, the adversary can determine the model parameters
θ, which includes the weight matrix W . Obviously, the
adversary can choose some neuron i and try to solve Eq. (4)
for W to realize the conditions of the chosen neuron. Since
the adversary does not know D, it can only approximate Eq.
(4) for all of its observed data samples x that are different
from t (i.e., x ̸= t and x /∈ D). However, that makes Eq. (4)
infeasible due to the linearity of the functions (cid:80)d
j=1 Wijtj
and (cid:80)d
j=1 Wijxj, as shown in Appendix A.
To address this issue, we introduce non-linearity into the
equation. To do so, instead of relying on the first layer,
the adversary can choose a neuron in the second fully-
connected layer such that the neuron is activated only by
the target data sample t, and not activated by any other data
samples x ̸= t. Let us denote h ∈ Rr as the weight vec-
tor of the chosen neuron in the second layer, the attack is
successful if we can find (h, W ) such that:
r
(cid:88)
i=1
r
(cid:88)
i=1
hi ReLU(
hi ReLU(
d
(cid:88)
j=1
d
(cid:88)
j=1
Wijtj) > 0
Wijxj) ≤ 0,
∀x ̸= t
(5)
To solve Eq. (5), we can train the chosen neuron to be
activated only by the target data sample t. For the training,
we first put forth a logistic sigmoid function (σ) on the
output of the chosen neuron. As a result, the function of the
chosen neuron becomes:
r
(cid:88)
s(x) = σ(
hi ReLU(
i=1
d
(cid:88)
j=1
Wijxj))
(6)
= σ(h * ReLU(W x))
Next, we sample a dataset X ∼ Dm, in which we assign a
label 1 for the target data sample t and label 0 for all other
data samples x ∈ X \ t. After that, we train the chosen
neuron using cross-entropy loss. The key idea is that the
training process tries to make s(t) = 1, and s(x) = 0 for
x ̸= t. When s(t) > 0.5, it means that h * ReLU(W t) > 0;
otherwise, when s(x) < 0.5, we have h * ReLU(W x) < 0
and that conforms to Eq. (5).
When the adversary receives the gradient G, it can observe
the gradient of that chosen neuron to determine whether
INIT(t):
x∈X \t{(x, 0)}
adversary AD
X ∼ Dm
DA ← (cid:83)
DA ← DA ∪ {(t, 1)}
Train h, W (Eq. 6) from dataset DA
Initialize θ
θ ← θ ∪ (h, W )
Ret θ
adversary AD(t, G):
Extract gt as the gradient of the chosen neuron from G
Ret [gt ̸= 0]
Figure 2: AMI Attack Strategy of the Adversary A.
the target data sample t is in the training set D (t ∈ D)
or not, as discussed in the previous section. In particular,
the adversary extracts the gradient of the chosen neuron,
denoted by gt, from G and sees whether gt is non-zero. If
gt is zero, the adversary predicts that the target data sample
t is not in the training set D (i.e., t /∈ D). This is because
the chosen neuron was not activated during the gradient
computation on the training set D. Otherwise, if gt is non-
zero, then the adversary predicts that the target data sample
t is in the training set D (i.e., t ∈ D).
Fig. 2 shows a design of the adversary A according to the
threat model in Fig. 1. Note that our attack strategy only
modifies the parameters of 1 chosen neuron in the second
layer and r associated neurons in the first layer. That makes
our attack feasible by enabling us to make a minimal change
to the model parameters, and the attack can be carried out
within one FL training iteration.
4 AMI ATTACK UNDER LDP WITH
CERTIFIED GUARANTEE OF SUCCESS
LDP is generally regarded as an effective defense against
privacy inference attacks given its rigorous privacy protec-
tion compared with other approaches [Wagh et al., 2021].
To tolerate such mechanisms, our AMI attack exploits the
correlation among input features captured through a non-
linear decision boundary to distinguish the target data sam-
ple t from others (Eq. 5) under LDP protection. If LDP-
preserving noise is insufficient to break this correlation (i.e.,
large privacy budgets ε), clients' local data will be at risk of
our AMI attack. Meanwhile, large privacy-preserving noise
(i.e., small privacy budgets ε) can significantly damage the
model utility. In FL, it is challenging for clients to identify
suitable privacy budgets given their limited local training
data. Therefore, they usually rely on the server to provide
the privacy budget ε and the LDP-preserving mechanism
M. That increases the risk of exposing their local training
data to a dishonest server under our AMI attack. We focus
on shedding light on the fundamental trade-offs between
Truc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
ε-LDP protection, model utility, and privacy risk with a
certified bound for our AMI attack to be successful.
Each client independently perturbs every training data sam-
ple in their local training data D using an LDP-preserving
mechanism M (Def. 1) to obtain a randomized local train-
ing set D′ = M(D, ε) = {M(x, ε)}x∈D. The client
sends the gradients derived from the randomized training
set G = ∇θL(D′, θ) to the server. The mechanism M and
the privacy budget ε are known to the adversary A, thus,
the adversary function in Eq. (2) is re-defined under LDP
D,M
context as A
LDP : t, G, ε → {0, 1}. We enhance the threat
model to reflect the use of LDP in Fig. 3.
Attack Strategy. Given the gradients G computed on
LDP-perturbed data D′, applying the same attack strategy
that was discussed in Section 3.2 would not work effec-
tively. Suppose that the target sample t is in D, and that
the adversary were able to train a neuron that is activated
only by the target sample t, i.e., h * ReLU(W t) > 0 and
h*ReLU(W x) < 0 for x ̸= t. However, it is very likely that
t is not in the randomized local training set D′ since t was
randomized under LDP. As the client uses D′ for gradients
computation, the chosen neuron may remain inactivated,
i.e., h * ReLU(W * M(t, ε)) < 0. Hence, the attack fails to
infer the correct membership of t.
Therefore, it is necessary for the adversary to ensure that the
chosen neuron is activated only by the randomized target
sample M(t, ε). Similar to Eq.
(5), we formulate this
observation as finding (h, W ) such that:
(cid:40)
h * ReLU(W M(t, ε)) > 0
h * ReLU(W x) ≤ 0,
∀x ̸= M(t, ε)
(7)
To develop an effective attack for Eq. (7), it is essential
for the chosen neuron to be activated if the client uses
M(t, ε) regardless of the randomness introduced by the
LDP-preserving mechanism M(*, ε). To achieve our goal,
we strengthen our attack by generating a set T of l per-
turbations M(t, ε), that is, invoking M(t, ε) l times with
independent draws of LDP-preserving noise. Next, we sam-
ple a training set X ∼ Dm such that X ∩ T = ∅. Then, we
assign label 1 for samples in T (which contains randomized
versions of t) and label 0 for samples in X . Finally, we train
the chosen neuron using cross-entropy loss. The remaining
steps follow Section 3.2. Fig. 4 shows the design of the
adversary ALDP with respect to the threat model in Fig. 3.
Certified Guarantee of Success for AMI. Now, we de-
rive certified guarantees for the adversary (Fig. 4) to be
D,M
successful under ε-LDP protection. The AMI attack A
LDP
is successful in determining the membership of the target
sample t if it can ensure that the chosen neuron is activated
only by the LDP-preserving M(t, ε). Following the ex-
pected output stability property in DP [Lecuyer et al., 2019],
ExpLDP (ALDP , L, D, M, ε):
D ∼ Dn
b $← {0, 1}
if b = 1 then
t $← D
end
else
t ∼ D \ D
D,M
LDP,INIT(t, ε)
end
θ ← A
D′ ← M(D, ε) # Apply the LDP mechanism on D
G ← ∇θL(D′, θ)
D,M
b′ ← A
LDP (t, G, ε)
Ret [b′ = b]
Figure 3: AMI Threat Model under LDP Mechanisms.
D,M
LDP,INIT(t, ε):
adversary A
Choose l ∈ N
T ← ∅
for i = 1 to l do
T ← T ∪ {M(t, ε)}
x∈X {(x, 0)}
end
X ∼ Dm \ T # Sample X ∼ Dm s.t. X ∩ T = ∅
DA ← (cid:83)
DA ← DA ∪ (cid:0)(cid:83)
Train h, W (Eq. 6) from dataset DA
Initialize θ
θ ← θ ∪ (h, W )
Ret θ
x∈T {(x, 1)}(cid:1)
D,M
LDP (t, G, ε):
adversary A
Extract gt as the gradient of the chosen neuron from G
Ret [gt ̸= 0]
Figure 4: Attack Strategy of the Adversary ALDP .
in which the expected value of an ε-LDP algorithm with
bounded output is not sensitive to small changes in the input,
D,M
the trained attack A
LDP is certifiably robust to M(*, ε) if
the following condition holds:
(cid:40)E(cid:2)v(t)(cid:3) > 0
E(cid:2)v(x)(cid:3) ≤ 0,
x ̸= M(t, ε)
(8)
where v(t) = h * ReLU(W M(t, ε)) and v(x) = h *
ReLU(W x) are the values of the chosen neuron, given
the randomized target sample M(t, ε) and any other data
samples x ̸= M(t, ε), respectively.
However, due to the potentially complex nature of the post-
noise computation, we cannot precisely compute the ex-
pectations in Eq. (8). We therefore resort to Monte Carlo
sampling to estimate the expectations ˆE(*). This estimation
is obtained by invoking M(*) multiple times with indepen-
dent draws of the noise over the input. We denote vp(t) as
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
the p draws of M(t, ε) from the target sample t and vq(x)
as the q draws of M(x, ε) from the sample x. Then, we
replace E(cid:2)v(t)(cid:3) with ˆE(cid:2)v(t)(cid:3) = 1
p vp(t) and replace
E(cid:2)v(x)(cid:3) with ˆE(cid:2)v(x)(cid:3) = 1
q vq(x), where p an q are the
number of invocations of M(*) for t and x, respectively.
(cid:80)
(cid:80)
p
q
The key idea is to simultaneously ensure that the lower
bound ˆElb(cid:2)v(t)(cid:3) is larger than 0 and the upper bound
ˆEub(cid:2)v(x)(cid:3) is smaller than or equal to 0 with a broken prob-
ability δ. That provides a certified guarantee for the Eq. (8)
to hold. We compute (1 − δ)-confidence the lower bound
ˆElb(cid:2)v(t)(cid:3) and the upper bound ˆEub(cid:2)v(x)(cid:3) by using Hoeffd-
ing's inequality [Hoeffding, 1963], as follows:
ˆElb(cid:2)v(t)(cid:3) ≜ ˆE(cid:2)v(t)(cid:3) − Range (cid:0)v(t)(cid:1)
(cid:115)
−
(cid:115)
ˆEub(cid:2)v(x)(cid:3) ≜ ˆE(cid:2)v(x)(cid:3) + Range (cid:0)v(x)(cid:1)
ln(δ)
2p
−
ln(δ)
2q
(9)
(10)
where Range (cid:0)v(*)(cid:1) is the range of v(*).
By replacing the bounds in Eqs. (9) and (10) to the expec-
tations in Eq. (8), we derive the certified guarantee so that
Eq. (8) holds as in Theorem 1.
Theorem 1. (Certified Guarantee Condition) Suppose that
clients in FL apply the LDP-preserving M(*, ε) to their
local data. ˆElb(cid:2)v(t)(cid:3) and ˆEub(cid:2)v(x)(cid:3), computed as in Eqs. 9
and 10, are the (1 − δ)-confidence lower and upper bounds,
D,M
LDP is successful in in-
respectively. The AMI attack A
ferring the membership of the target sample t in D if the
following condition is satisfied:
(cid:40)ˆElb(cid:2)v(t)(cid:3) > 0
ˆEub(cid:2)v(x)(cid:3) ≤ 0,
x ̸= M(t, ε)
(11)
Proof of Theorem 1 is in Appendix B. At the attack time,
we implement a certified guarantee of success as a search to
return the minimal privacy budget ε and broken probability
δ so that the condition in Theorem 1 holds, as follows:
Corollary 1. Given a well-trained model fθ and the target
D,M
sample t, the AMI attack A
LDP is guaranteed to be success-
ful up to the privacy budget ε∗ and the broken probability
δ∗ for which the condition in Theorem 1 checks out:
(ε∗, δ∗)= arg min
ε,δ
s.t.
(cid:40)ˆElb(cid:2)h * ReLU(W M(t, ε))(cid:3) > 0
ˆEub(cid:2)h * ReLU(W x)(cid:3) ≤ 0, x̸=M(t, ε)
(12)
Since the mechanism M(*) and the privacy budget ε are
known to the adversary A, we only do a line search to find
the minimal δ for a given ε∗.
5 EVALUATION
This section validates the effectiveness of our AMI at-
tack by gauging its success rate. We particularly focus
on evaluating how well it performs under LDP protec-
tion. Our implementation of the attack is available at
https://github.com/trucndt/ami.
ImageNet
evaluate AMI
Experimental Settings. We
attack
including CIFAR-10
with three benchmark datasets,
[Krizhevsky et al., 2009],
[Deng et al., 2009],
and CelebA [Liu et al., 2015]. Each dataset includes a
training set and a validation set. The training set is used to
sample the local training set D in the threat model (Figs. 1
and 3), while the validation set is used as the sampled set
X of the adversary. Our experiment follows the security
game in Figs. 1 and 3, and the success rate is calculated
using Eq. (3) after executing the game 10,000 times. The
batch size |D| is chosen to be 20 for the CelebA dataset
according to its specification (i.e., 20 face images per
person). As in [Fowl et al., 2021, Boenisch et al., 2021,
Geiping et al., 2020], we set |D| to 64 and 100 for the
ImageNet and CIFAR-10 datasets, respectively. We modify
r = 1, 000 neurons in the first layer and 1 neuron in the
second layer to carry out AMI attacks. Further details on
the experimental settings can be found in Appendix D.
To realize M in Fig. 3, we use two different
LDP mechanisms: OME [Lyu et al., 2020] and BitRand
[Lai et al., 2021]. These mechanisms add LDP noises to the
embeddings of data samples. Such embeddings are obtained
via a pre-trained Resnet-18 model which results in feature
vectors of 512 dimensions [He et al., 2016]. We show the
results when using BitRand in this section and refer the read-
ers to Appendix D for the results on OME. A background
on BitRand and OME is provided in Appendix C.
Attack Performance without LDP.
In three datasets, our
attack achieves near 100% success rate. The key reason
behind this impressive success rate is that our attack strat-
egy can easily train the chosen neuron to satisfy the attack
objective, i.e., Eq. (5). Intuitively, the problem formulation
in Eq. (5) is equivalent to finding a decision boundary over-
fitting to t in a way that can distinguish t against all other
samples. As a result, increasing the number of neurons in
the first layer (r) helps improve the attack performance, as it
makes the model more over-fitting. In our experiments, we
can achieve a 100% success rate with as few as 5 neurons
(r = 5) in the first layer. We refer the readers to Appendix
D for further analysis of this scenario as we focus the rest
of this section on evaluating the attack under LDP.
Attack Performance under LDP. Fig. 5 shows that our
attack introduces severe privacy risk to clients' local training
data through strong attack success rates under LDP protec-
tion. Large privacy budgets ε (e.g., ε ≥ 5) does minimal to
Truc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
(a) CelebA
(b) ImageNet
(c) CIFAR-10
Figure 5: Attack success rate of AMI against an ε-LDP mechanism on CelebA, ImageNet, and CIFAR-10 datasets. The
success rate is represented via the advantage (Adv), true positive rate (TPR), and true negative rate (TNR) according to Eq.
3. The baseline of random guessing is 0.5. The model accuracy illustrates the utility loss of the data when using LDP.
(a) ε = 10
(b) ε = 7
(c) ε = 5
Figure 6: Visualizing the distribution of the target sample t among other samples in the training set D using t-SNE
embeddings. The red dots denote the target sample t and a multitude of its LDP noises M(t, ε), while the blue dots denote
other non-target samples. These data samples are obtained from the CelebA dataset.
defend against our AMI attack. Across all three datasets,
the model accuracy on the legitimate classification task re-
mains acceptable given ε ≥ 5. However, our attack imposes
a severely high success rate (≥ 0.77), which approaches
a near perfect success rate of 0.99 with ε ≥ 9. When
we reduce the privacy budget (ε ∈ [3, 4]), our attack still
maintains a success rate of at least 0.67, 0.58, and 0.62, on
CelebA, ImageNet, and CIFAR-10, respectively. With very
low ε (ε ∈ [1, 2]), the model accuracy is severely damaged.
Furthermore, Fig. 5 depicts the TPR and TNR of our attack.
Recall that TPR denotes how well the attack detects the
presence of the target sample t in the training data D, and
TNR measures the ability to detect the absence of t. From
the result, we can see that our attack has high TPR across
all scenarios, which means it is sensitive to detecting the
case where t ∈ D. Moreover, our TNR is greater than 0.5
indicating the capability of discerning the absence of t in
the training data (except for the ImageNet dataset at ε ≤ 4).
Training the Chosen Neuron under LDP. Training the
chosen neuron is equivalent to determining a decision bound-
ary that can distinguish the target sample (and its random-
ized variants) from any other samples. Fig. 6 visualizes how
the samples in the training set D are distributed using t-SNE
[Van der Maaten and Hinton, 2008]. At ε = 10, Fig. 6a
shows that the t-SNE algorithm is able to group together the
target sample t and its randomized variants. This is because
the LDP mechanism imposes a small amount of noise such
that t and its randomized variants M(t, ε) closely resemble
one another. Hence, t-SNE models these by nearby points.
Therefore, it is easy for our attack to train a neuron that
can distinguish M(t, ε) from other samples, resulting in an
attack success rate of about 0.99 as shown in Fig. 5.
At ε = 5, Fig. 6c shows that M(t, ε) blends into other
samples, meaning that t-SNE is unable to group together the
randomized variants of t as in the previous Fig. 6a. This is
because the mechanism M(*, ε) imposes a high amount of
noise at ε = 5, so that all randomized variants M(t, ε) no
longer closely resemble one another. This makes the task of
finding the decision boundary between M(t, ε) and other
samples more difficult. Nevertheless, our AMI attack can
still attain a success rate of 0.80 (Fig. 5).
Certified Guarantee of Success. Given a privacy bud-
get ε ∈ [1, 10], in order to check the certified guanran-
tee conditions as in Theorem 1, we obtain the the lower
and upper bounds ˆElb(cid:2)v(t)(cid:3) and ˆEub(cid:2)v(x)(cid:3) (Eqs. 9 and 10)
by using 4, 000 ε-LDP target samples M(t, ε) and all ε-
LDP non-target samples M(x, ε) from the validation set of
each dataset. Here we use BitRand [Lai et al., 2021] as the
12345678910Privacybudgetε0.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR0.50.60.70.80.91.0ModelaccuracyModelaccuracy12345678910Privacybudgetε0.40.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR0.40.50.60.70.80.91.0ModelaccuracyModelaccuracy12345678910Privacybudgetε0.40.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR0.40.50.60.70.80.91.0ModelaccuracyModelaccuracyActive Membership Inference Attack under Local Differential Privacy in Federated Learning
(a) CelebA
(b) ImageNet
(c) CIFAR-10
Figure 7: Certified guarantee of success for ε ∈ [1, 10]: Expectation (solid lines), upper-bound, and lower-bound (shaded
areas surrounding the expectation) of the values of the chosen neuron. The larger the gap between the lower bound of the
noisy target samples and the upper bound of the noisy non-target samples, the higher success rate the AMI achieves.
M(*, ε) mechanism for the embeddings since BitRand is
designed and well-suited for randomizing the embeddings.
Fig. 7 shows the certified guarantee of success for the
CelebA, ImageNet, and CIFAR-10 datasets. We can de-
rive certified guarantee of success for our AMI attack given
ε ≥ 1 with a small broken probability 10−8. For rigorous
privacy budgets, e.g., ε ≤ 3, the output of the chosen neuron
for both the target and non-target samples approaches the
borderline associated with v(*) = 0 (i.e., the dotted green
lines), indicating a higher chance for AMI attacks to be
failed given a broken probability δ. When the privacy bud-
get ε increases, the output of the chosen neuron fits well
with the attack objective. As a result, the expected value of
the chosen neuron departs from the borderline, i.e., more
positive given the target samples (i.e., the solid red lines)
and more negative given the non-target samples (i.e., the
solid blue lines). That implies a better attack success rate.
Also, we observed that the overlapping area between the
two distributions of the target samples and the non-target
samples reduce significantly, which is consistent with our
certified guarantee of success (Fig. 10, Appendix D) and
our empirical results in Fig. 5.
6 RELATED WORK
Membership inference (MI) is one of the most fundamental
privacy problems in machine learning [Carlini et al., 2022].
Several research has been carried out
to convey the
practical consequences of MI attacks [Backes et al., 2016,
Pyrgelis et al., 2018] and analyze the models' vulnerability
to MI [Carlini et al., 2019, Song and Mittal, 2021]. Along
this direction, multiple MI attacks have been proposed
in which the attacker only queries the model or observes
its parameters to conduct the attacks [Shokri et al., 2017,
Salem et al., 2019, Carlini et al., 2022]. Such attacks can
be straightforwardly adapted to FL in which the central
server is a passive adversary who tries to infer the mem-
bership information of clients' private data via inspect-
ing their local models' parameters [Nguyen and Thai, 2022,
Melis et al., 2019]. Recently, an AMI attack in FL pro-
posed by [Nasr et al., 2019] considers a dishonest server
that can interfere with the FL training protocol. How-
ever, this attack must be repeated in multiple training it-
erations to attain a high success rate. Furthermore, LDP has
been shown to be an effective defense against these attacks
[Rahman et al., 2018, Bernau et al., 2021, Gu et al., 2022].
Our work proposes a new AMI attack in FL where the
dishonest server can maliciously modify the model weights
to its advantage. We have proposed a strategy that results
in minimal modifications to the model and can be executed
in only one training iteration. More importantly, our attack
can maintain a strong success rate even when the clients'
data are protected by an LDP mechanism.
7 CONCLUSION AND DISCUSSION
In this paper, we have introduced a formal threat model for
our AMI attack with dishonest FL servers, showing a more
realistic privacy threat. Accordingly, we have proposed a
new active membership inference (AMI) attack, exploiting
the correlation among data features through a non-linear
decision boundary. AMI attacks can achieve high success
rates even under LDP protection, confirmed by both theoret-
ical analysis and experimental evaluations. From this attack,
our research has demonstrated that current implementations
of FL provide virtually no privacy protection for clients.
With such a strong AMI attack, our future work would focus
on the defenses. We discuss some challenges in devising
such a solution as follows.
Noisy gradients with DPSGD. A potential defense against
our attack is to let clients add DP noise to their gradients
using DPSGD [Abadi et al., 2016] before sending them to
the server, hindering the attacker from knowing the true
value of the chosen neuron's gradient. However, recent
work [Boenisch et al., 2021, Tram`er and Boneh, 2021] sug-
gests that using DPSGD makes it impossible to train a good
model for datasets like CIFAR-10 or ImageNet. Further-
Truc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
(2019). Local differential privacy for deep learning. IEEE
Internet of Things Journal, 7(7):5827–5842.
[Backes et al., 2016] Backes, M., Berrang, P., Humbert,
M., and Manoharan, P. (2016). Membership privacy in
microrna-based studies. In Proceedings of the 2016 ACM
SIGSAC Conference on Computer and Communications
Security, pages 319–330.
[Bernau et al., 2021] Bernau, D., Robl, J., Grassal, P. W.,
Schneider, S., and Kerschbaum, F. (2021). Comparing
local and central differential privacy using membership
inference attacks. In Barker, K. and Ghazinour, K., edi-
tors, Data and Applications Security and Privacy XXXV,
pages 22–42, Cham. Springer International Publishing.
[Boenisch et al., 2021] Boenisch, F., Dziedzic, A., Schus-
ter, R., Shamsabadi, A. S., Shumailov, I., and Papernot,
N. (2021). When the curious abandon honesty: Federated
learning is not private. arXiv preprint arXiv:2112.02918.
[Carlini et al., 2022] Carlini, N., Chien, S., Nasr, M., Song,
S., Terzis, A., and Tramer, F. (2022). Membership in-
ference attacks from first principles. In 2022 IEEE Sym-
posium on Security and Privacy (SP), pages 1897–1914.
IEEE.
[Carlini et al., 2019] Carlini, N., Liu, C., Erlingsson, ́U.,
Kos, J., and Song, D. (2019). The secret sharer: Evaluat-
ing and testing unintended memorization in neural net-
works. In 28th USENIX Security Symposium (USENIX
Security 19), pages 267–284.
[Deng et al., 2009] Deng, J., Dong, W., Socher, R., Li, L.-
J., Li, K., and Fei-Fei, L. (2009). Imagenet: A large-scale
hierarchical image database. In 2009 IEEE conference on
computer vision and pattern recognition, pages 248–255.
Ieee.
[Dwork et al., 2006] Dwork, C., McSherry, F., Nissim, K.,
and Smith, A. (2006). Calibrating noise to sensitivity in
private data analysis. In TCC, pages 265–284.
[Dwork et al., 2014] Dwork, C., Roth, A., et al. (2014).
The algorithmic foundations of differential privacy. Foun-
dations and Trends® in Theoretical Computer Science,
9(3–4):211–407.
[Erlingsson et al., 2014] Erlingsson, U., Pihur, V., and Ko-
rolova, A. (2014). Rappor: Randomized aggregatable
privacy-preserving ordinal response. In Proceedings of
the 2014 ACM SIGSAC CCS, pages 1054–1067.
[Fowl et al., 2021] Fowl, L. H., Geiping, J., Czaja, W.,
Goldblum, M., and Goldstein, T. (2021). Robbing the
fed: Directly obtaining private data in federated learning
with modified models. In International Conference on
Learning Representations.
Figure 8: The kernel density estimation (KDE) of malicious
and normal weights.
more, even if DPSGD is used, the attacker can still circum-
vent it by aggregating the noisy gradients over multiple FL
iterations and potentially cancelling out the added DP noise.
A detailed analysis on this can be found in Appendix E.
Detecting Malicious Weights is Challenging. The hard-
ness in detecting malicious weights can be evaluated by
examining the difference between malicious weights and
normal weights (i.e., the weights that could be obtained from
an honest server). Fig. 14 (Appendix) shows the distribution
of the normal weights together with the distribution of the
malicious weights when attacking under LDP protection
at ε = 2, 3, and 5, and they largely resemble one another.
Fig. 8 shows the 4 distributions using their respective kernel
density estimation (KDE), which is used to visualize the
shape of a data distribution, and represent the data using a
continuous probability density curve. We can see that the
malicious weights do not result in any abnormal distribu-
tion, making it indistinguishable from normal weights. This
implies that, by observing the distribution of model weights,
it is infeasible to determine whether the model weights have
been modified maliciously by our attack.
Acknowledgements
This material is based upon work supported by the Na-
tional Science Foundation under grants CNS-1935928, CNS-
1935923, and CNS-2140477.
References
[Abadi et al., 2016] Abadi, M., Chu, A., Goodfellow, I.,
McMahan, H. B., Mironov, I., Talwar, K., and Zhang,
L. (2016). Deep learning with differential privacy. In
Proceedings of the 2016 ACM SIGSAC conference on
computer and communications security, pages 308–318.
[Arachchige et al., 2019] Arachchige, P. C. M., Bertok, P.,
Khalil, I., Liu, D., Camtepe, S., and Atiquzzaman, M.
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
[Geiping et al., 2020] Geiping, J., Bauermeister, H., Dr ̈oge,
H., and Moeller, M. (2020). Inverting gradients-how easy
is it to break privacy in federated learning? Advances
in Neural Information Processing Systems, 33:16937–
16947.
[Gu et al., 2022] Gu, Y., Bai, Y., and Xu, S. (2022). Cs-mia:
Membership inference attack based on prediction confi-
dence series in federated learning. Journal of Information
Security and Applications, 67:103201.
[He et al., 2016] He, K., Zhang, X., Ren, S., and Sun, J.
(2016). Deep residual learning for image recognition.
In IEEE Conference on Computer Vision and Pattern
Recognition, pages 770–778.
[Hoeffding, 1963] Hoeffding, W. (1963). Probability in-
equalities for sums of bounded random variables. Journal
of the American statistical association.
[Krizhevsky et al., 2009] Krizhevsky, A., Hinton, G., et al.
(2009). Learning multiple layers of features from tiny
images.
[Lai et al., 2021] Lai, P., Phan, H., Xiong, L., Tran, K. P.,
Thai, M., Sun, T., Dernoncourt, F., Gu, J., Barmpalios,
N., and Jain, R. (2021). Bit-aware randomized response
for local differential privacy in federated learning.
[Lecuyer et al., 2019] Lecuyer, M., Atlidakis, V., Geam-
basu, R., Hsu, D., and Jana, S. (2019). Certified robust-
ness to adversarial examples with differential privacy. In
2019 IEEE Symposium on Security and Privacy (SP),
pages 656–672. IEEE.
[Liu et al., 2015] Liu, Z., Luo, P., Wang, X., and Tang, X.
(2015). Deep learning face attributes in the wild.
In
Proceedings of International Conference on Computer
Vision (ICCV).
[Lyu et al., 2020] Lyu, L., Li, Y., He, X., and Xiao, T.
(2020). Towards differentially private text representa-
tions. In Proceedings of the 43rd International ACM
SIGIR Conference on Research and Development in In-
formation Retrieval, pages 1813–1816.
[Melis et al., 2019] Melis, L., Song, C., De Cristofaro, E.,
and Shmatikov, V. (2019). Exploiting unintended fea-
In 2019 IEEE
ture leakage in collaborative learning.
symposium on security and privacy (SP), pages 691–706.
IEEE.
[Nasr et al., 2019] Nasr, M., Shokri, R., and Houmansadr,
A. (2019). Comprehensive privacy analysis of deep
learning: Passive and active white-box inference attacks
against centralized and federated learning. In 2019 IEEE
Symposium on Security and Privacy, SP 2019, San Fran-
cisco, CA, USA, May 19-23, 2019, pages 739–753. IEEE.
[Nguyen and Thai, 2022] Nguyen, T. and Thai, M. T.
(2022). Preserving privacy and security in federated
learning. arXiv preprint arXiv:2202.03402.
[Nguyen et al., 2022] Nguyen, T., Thai, P., Tre'R, J., Dinh,
T. N., and Thai, M. T. (2022). Blockchain-based secure
client selection in federated learning. In 2022 IEEE Inter-
national Conference on Blockchain and Cryptocurrency
(ICBC), pages 1–9. IEEE.
[Pyrgelis et al., 2018] Pyrgelis, A., Troncoso, C., and
Cristofaro, E. D. (2018). Knock knock, who's there?
membership inference on aggregate location data.
In
25th Annual Network and Distributed System Security
Symposium, NDSS 2018, San Diego, California, USA,
February 18-21, 2018. The Internet Society.
[Rahman et al., 2018] Rahman, M. A., Rahman, T., La-
gani`ere, R., Mohammed, N., and Wang, Y. (2018). Mem-
bership inference attack against differentially private
deep learning model. Trans. Data Priv., 11(1):61–79.
[Salem et al., 2019] Salem, A., Zhang, Y., Humbert, M.,
Berrang, P., Fritz, M., and Backes, M. (2019). Ml-leaks:
Model and data independent membership inference at-
tacks and defenses on machine learning models. In 26th
Annual Network and Distributed System Security Sympo-
sium, NDSS 2019, San Diego, California, USA, February
24-27, 2019. The Internet Society.
[Shokri et al., 2017] Shokri, R., Stronati, M., Song, C., and
Shmatikov, V. (2017). Membership inference attacks
against machine learning models. In 2017 IEEE Sympo-
sium on Security and Privacy (SP), pages 3–18. IEEE.
[Song and Mittal, 2021] Song, L. and Mittal, P. (2021).
Systematic evaluation of privacy risks of machine learn-
In 30th USENIX Security Symposium
ing models.
(USENIX Security 21), pages 2615–2632.
[Sun et al., 2021] Sun, L., Qian, J., and Chen, X. (2021).
LDP-FL: practical private aggregation in federated learn-
ing with local differential privacy. In Zhou, Z., editor,
Proceedings of the Thirtieth International Joint Confer-
ence on Artificial Intelligence, IJCAI 2021, Virtual Event
/ Montreal, Canada, 19-27 August 2021, pages 1571–
1578. ijcai.org.
[Tram`er and Boneh, 2021] Tram`er, F. and Boneh, D.
(2021). Differentially private learning needs better fea-
tures (or much more data). In 9th International Confer-
ence on Learning Representations, ICLR 2021, Virtual
Event, Austria, May 3-7, 2021. OpenReview.net.
[Van der Maaten and Hinton, 2008] Van der Maaten, L.
and Hinton, G. (2008). Visualizing data using t-sne.
Journal of machine learning research, 9(11).
Truc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
[Wagh et al., 2021] Wagh, S., He, X., Machanavajjhala, A.,
and Mittal, P. (2021). Dp-cryptography: marrying differ-
ential privacy and cryptography in emerging applications.
Communications of the ACM, 64(2):84–93.
[Wang et al., 2019] Wang, N., Xiao, X., Yang, Y., Zhao,
J., Hui, S. C., Shin, H., Shin, J., and Yu, G. (2019).
Collecting and analyzing multidimensional data with
local differential privacy. In IEEE ICDE, pages 638–649.
[Warner, 1965] Warner, S. L. (1965). Randomized re-
sponse: A survey technique for eliminating evasive an-
swer bias. Journal of the American Statistical Associa-
tion, 60(309):63–69.
[Yeom et al., 2018] Yeom, S., Giacomelli, I., Fredrikson,
M., and Jha, S. (2018). Privacy risk in machine learning:
Analyzing the connection to overfitting. In 2018 IEEE
31st computer security foundations symposium (CSF),
pages 268–282. IEEE.
[Yin et al., 2021] Yin, H., Mallya, A., Vahdat, A., Alvarez,
J. M., Kautz, J., and Molchanov, P. (2021). See through
gradients: Image batch recovery via gradinversion. In
Proceedings of the IEEE/CVF Conference on Computer
Vision and Pattern Recognition, pages 16337–16346.
[Zhao et al., 2020] Zhao, Y., Zhao, J., Yang, M., Wang, T.,
Wang, N., Lyu, L., Niyato, D., and Lam, K. Y. (2020).
Local differential privacy based federated learning for
internet of things. IEEE Internet of Things Journal.
[Zhu et al., 2019] Zhu, L., Liu, Z., and Han, S. (2019).
Deep leakage from gradients. Advances in neural in-
formation processing systems, 32.
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
A INFEASIBILITY OF LINEARITY FOR AMI
Suppose that, given the target data sample t ∈ Rd, there exists a W that can satisfy Eq. (4) for all x ̸= t. We choose
x1 = t1 + c and xi = ti for i > 1 and c > 0. Denoting w ≡ Wi, from the second condition in Eq. (4), we have that:
w1c +
d
(cid:88)
j=1
wjtj ≤ 0 =⇒ −w1c ≥
d
(cid:88)
j=1
wjtj
Likewise, choosing x′
1 = t1 − c and x′
i = ti for i > 1, from the second condition in Eq. (4), we have:
−w1c +
c
(cid:88)
j=1
wjtj ≤ 0 =⇒ w1c ≥
d
(cid:88)
j=1
wjtj
(13)
(14)
As (cid:80)d
there exists no W that can satisfy Eq. (4) for all x ̸= t.
j=1 wjtj > 0 by the first condition in Eq. (4), the two equations (13) and (14) contradicts one another. Therefore,
B PROOF OF THEOREM 1
D,M
Given the target sample t and any data samples x ̸= M(t, ε), the AMI attack A
LDP is successful in determining the
membership of t if it can ensure that the chosen neuron is activated only by the LDP-preserving M(t, ε). Following the
expected output stability property in DP [Lecuyer et al., 2019], in which the expected value of an ε-LDP algorithm with
D,M
bounded output is not sensitive to small changes in the input, the trained attack A
LDP is certifiably robust to M(*, ε) if the
following condition holds:
(cid:40)E(cid:2)v(t)(cid:3) > 0
E(cid:2)v(x)(cid:3) ≤ 0,
x ̸= M(t, ε)
(15)
where v(t) = h * ReLU(W M(t, ε)) and v(x) = h * ReLU(W x) are the values of the chosen neuron, given the randomized
target sample M(t, ε) and any other data samples x ̸= M(t, ε), respectively.
However, due to the potentially complex nature of the post-noise computation, we cannot precisely compute the expectations
in Eq. 8. We therefore resort to Monte Carlo sampling to estimate the expectations ˆE(*). This estimation is obtained by
invoking M(*) multiple times with independent draws of the noise over the input. We denote vp(t) as the p draws of M(t, ε)
from the target sample t and vq(x) as the q draws of M(x, ε) from the sample x.
Denoting Range (cid:0)v(*)(cid:1) as the range of v(*), v(*) ∈ Range (cid:0)v(*)(cid:1). In other words, v(*) is bounded in Range (cid:0)v(*)(cid:1). Given a
broken probability δ, using Hoeffding's inequality, with t ≥ 0 we have:
(cid:16)
(
P
1
p
p
(cid:88)
i=1
v(t)) − E[v(t)] ≥ t
(cid:17)
= P
(cid:16) 1
p
p
(cid:88)
i=1
≤ exp
(cid:16)
−
(cid:0)v(t) − E[v(t)](cid:1) ≥ t
(cid:17)
2pt2
(cid:80)p
i=1 Range (cid:0)v(t)(cid:1)2
1
p
(cid:17)
= exp
(cid:16)
−
2pt2
Range (cid:0)v(t)(cid:1)2
(cid:17)
As mentioned in Section 4, we replace E[v(t)] in Eq. 16 with ˆE[v(t)]. Given a broken probability δ, we have:
(cid:16)
−
exp
2pt2
Range(v(t))2
(cid:17)
= δ ⇔ t = Range (cid:0)v(t)(cid:1)
−
(cid:115)
ln(δ)
2p
Similarly, with the non-target samples, we have:
t = Range (cid:0)v(x)(cid:1)
(cid:115)
−
ln(δ)
2q
(16)
(17)
(18)
Truc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
By leveraging the Monte Carlo sampling for the expectation estimation, we can replace E(cid:2)v(t)(cid:3) with ˆE(cid:2)v(t)(cid:3) = 1
and replace E(cid:2)v(x)(cid:3) with ˆE(cid:2)v(x)(cid:3) = 1
respectively.
The key idea is to simultaneously ensure that the lower bound ˆElb(cid:2)v(t)(cid:3) is larger than 0 and the upper bound ˆEub(cid:2)v(x)(cid:3) is
smaller than or equal to 0 with a broken probability δ. That provides a certified guarantee for the Eq. (8) to hold. From
Eqs. 17 and 18, we can compute (1 − δ)-confidence the lower bound ˆElb(cid:2)v(t)(cid:3) and the upper bound ˆEub(cid:2)v(x)(cid:3), as follows:
p vp(t)
q vq(x), where p an q are the number of invocations of M(*) for t and x,
(cid:80)
(cid:80)
p
q
ˆElb(cid:2)v(t)(cid:3) ≜ ˆE(cid:2)v(t)(cid:3) − Range (cid:0)v(t)(cid:1)
(cid:115)
−
(cid:115)
ˆEub(cid:2)v(x)(cid:3) ≜ ˆE(cid:2)v(x)(cid:3) + Range (cid:0)v(x)(cid:1)
−
ln(δ)
2p
ln(δ)
2q
(19)
(20)
By replacing the bounds in Eqs. 19 and 20 to the expectations in Eq. 15, we we derive the certified guarantee so that Eq.
D,M
LDP is successful in inferring the membership of the target sample t in D if
(15) holds. In other words, The AMI attack A
the following condition is satisfied:
(cid:40)ˆElb(cid:2)v(t)(cid:3) > 0
ˆEub(cid:2)v(x)(cid:3) ≤ 0,
x ̸= M(t, ε)
(21)
Consequently, Theorem 1 holds.
C OME [Lyu et al., 2020] AND BITRAND [Lai et al., 2021]
Apart from applying LDP-preserving mechanisms in real values of inputs or gradients [Warner, 1965, Zhao et al., 2020,
Wang et al., 2019], there is a line of work introducing LDP-preserving mechanisms to inputs or embedding features
[Lai et al., 2021, Lyu et al., 2020, Arachchige et al., 2019]. In these mechanisms, they encode the original data or embedding
features into binary vectors, then apply the LDP mechanisms on top of the binary vectors, before training the local models.
In OME, each bit i is randomized differently depending on whether it is the odd or even bit or it is bit 0 or 1, as follows:
∀i ∈ [0, rl − 1] : P (v′
x(i) = 1) =
p1X =
p2X =
, if i ∈ 2j, vx(i) = 1
α
1 + α
1
1 + α3 , if i ∈ 2j + 1, vx(i) = 1
qX =
1
1 + α exp( ε
rl )
, if vx(i) = 0
(22)
where ε the total privacy budget.
This mechanism is
to the Utility enhancing randomization (UER) mechanism (Theorem III.4
[Arachchige et al., 2019]). As shown in [Arachchige et al., 2019, Lyu et al., 2020], model accuracy is almost con-
stant although ε is changed.
similar
However, existing LDP mechanisms suffer from the curse of privacy composition in which excessive privacy budgets
are consumed proportionally to the large dimensions of input or embedded features [Arachchige et al., 2019], gradients
[Zhao et al., 2020, Wang et al., 2019], and training rounds [Zhao et al., 2020, Wang et al., 2019], causing loose privacy
protection or inferior model accuracy [Wagh et al., 2021].
To mitigate the curse of privacy composition and to optimize the trade-off among privacy and model utility, [Lai et al., 2021]
introduce bit-aware term i%l
l and a temperature α for better control of the randomization probabilities. In BITRAND, the
randomization probabilities are adaptively randomized such that "bits with a more substantial impact" on model utility will
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
have "smaller randomization probabilities (less noisy)" and vice-versa under the same privacy budget, as follows:
∀i ∈ [0, rl − 1] : P (v′
x(i) = 1) =
pX =
qX =
1
1 + α exp( i%l
α exp( i%l
l ε)
1 + α exp( i%l
l ε)
l ε)
, if vx(i) = 1
, if vx(i) = 0
(23)
where vx(i) ∈ {0, 1} is the value of vx at the bit i, v′
privacy budget, and α is a parameter bounded with 0 < α ≤
x is the perturbed vector created by randomizing all the bits in vx, ε is a
to indicate the
. The bit-aware term i%l
l
(cid:113)
2r (cid:80)l−1
ε+rl
i=0 exp(2 ε
l i%l)
location of bit i, which is associated with the sensitivity of the bit at that location, in its l-bit binary encoded vector among
rl concatenated binary bits.
D ADDITIONAL EXPERIMENTS
This section provides more details on the experimental settings, and presents additional experiments.
Settings. Our experiments in this paper are implemented using Python 3.8 and conducted on a single GPU-assisted
compute node that is installed with a Linux 64-bit operating system. The allocated resources include 8 CPU cores (AMD
EPYC 7742 model) with 2 threads per core, and 60GB of RAM. The node is also equipped with 8 GPUs (NVIDIA DGX
A100 SuperPod model), with 80GB of memory per GPU.
The model accuracies in Figs. 5 and 11 are measured by evaluating the model on legitimate classification tasks. For the
CelebA dataset [Liu et al., 2015], the task is to classify whether a person is smiling or not based on face images. With regard
to the CIFAR-10 dataset [Krizhevsky et al., 2009], we use its original classification task with 10 classes. For the ImageNet
dataset [Deng et al., 2009], we extract a subset of 10 classes: tench, English springer, cassette player, chain saw, church,
French horn, garbage truck, gas pump, golf ball, and parachute1. Then, we evaluate the model performance on classifying
those 10 classes.
To obtain the feature embeddings of data samples, we use the pre-trained Resnet-18 model from Img2Vec2.
Attack performance without LDP.
In this setting, the attack strategy in Fig. 2 requires the attacker to train the malicious
parameters h, W , which takes multiple local training epochs. Fig. 9 shows the attack success rate per local epoch with
2,000 neurons in the first layer (r = 2, 000). As can be seen, over time, the attack success rate reaches 100% across all three
datasets. Table 1 shows the average number of local training epochs needed to train those parameters to achieve the 100%
success rate, as we vary r. We observe that increasing r helps the attacker find the optimal parameters h, W faster. For
CIFAR-10, with r = 2, 000 neurons in the first layer, the attacker can easily train h, W within 50 epochs.
(a) CelebA
(b) ImageNet
(c) CIFAR-10
Figure 9: Attack success rate of AMI during local epochs of training h, W . The success rate is represented via the advantage
(Adv), true positive rate (TPR), and true negative rate (TNR) according to Eq. 3. The baseline of random guessing is 0.5.
To understand the reason behind this behavior, we note that training h, W in this attack strategy is equivalent to finding a
non-linear decision boundary that overfits to the target sample t (Eq. 5), thereby distinguishing the target sample t from
1https://github.com/fastai/imagenette
2https://github.com/christiansafka/img2vec
20406080100Localtrainingepoch0.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR01020304050Localtrainingepoch0.00.20.40.60.81.0AttacksuccessrateAdvTPRTNR01020304050Localtrainingepoch0.00.20.40.60.81.0AttacksuccessrateAdvTPRTNRTruc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
any other samples. Hence, increasing r raises the chance of over-fitting which, in turn, shortens the time to find h, W .
Furthermore, Table 1 indicates that as few as r = 5 neurons are needed to attain the 100% success rate, albeit the longer
training time.
Table 1: Number of local epochs needed to train h, W by the adversary A (Fig. 2) to obtain a 100% success rate. We vary
the number of neurons in the first layer (r) and get the average number of local epochs over multiple runs.
Dataset
CelebA
ImageNet
CIFAR-10
r
5
500
1000
2000
5
500
1000
2000
5
500
1000
2000
No. of local epochs
3585
763
497
297
1610
131
88
63
309
91
54
44
Attack performance under LDP. To shed light into how the privacy budget ε in the LDP mechanism, i.e., BitRand,
affects the AMI success rate, we visualize the distribution of the values of the chosen neuron associated with the target
and non-target samples. In Fig. 10a, with rigorous privacy budget (e.g., ε = 1), the mean values of the chosen neuron is
positive given the target samples and negative given the non-target samples. However, there is a notable overlap in the two
distributions of the target samples (i.e., red distribution) and the non-target samples (i.e., blue distribution). This makes the
attack difficult in distinguishing the target and non-target samples, based on the value of the chosen neuron. Consequently,
the attack success rate is moderate. On the other hand, when ε increases (Figs. 10b-10d), the distribution of the target
samples shift to the right, meanwhile the distribution of the non-target samples shift to the left. The shifts result in a less
overlap between the two distributions. As a result, when the privacy budget ε increases, the attack success rate of AMI
increases. We observe this phenomenon in all three datasets.
(a) ε = 1
(b) ε = 3
(c) ε = 5
(d) ε = 10
Figure 10: Histograms of the values of the chosen neuron when attacking against the BitRand mechanism with ε = 1, 3, 5,
and 10, respectively. The higher ε, the less overlapping distribution of the values of the chosen neuron, given the target
samples and the non-target samples. This indicates the higher attack success rate of AMI. These data samples are obtained
from the CelebA dataset.
In addition to evaluating the attack under the BitRand mechanism in Section 5, Fig. 11 shows our attack performance under
the OME mechanism [Lyu et al., 2020]. First, we observe the same phenomenon of OME as in [Arachchige et al., 2019,
Lyu et al., 2020] in which the model accuracy does not change much for ε ∈ [1, 10]. Second, our attack maintains a severe
success rate of about 90% for CelebA and CIFAR-10. More importantly, the attack success rate reaches more than 95% for
ImageNet. These results demonstrate that our AMI attack remains very effective even with low privacy budget ε when the
training set D is protected by the OME mechanism.
Fig. 12 shows the certified guarantee of success for the CelebA, ImageNet, and CIFAR-10 datasets when the LDP-preserving
OME mechanism is used. We can derive a certified guarantee of success for our AMI attack given ε ≥ 1 with a small broken
Active Membership Inference Attack under Local Differential Privacy in Federated Learning
(a) CelebA
(b) ImageNet
(c) CIFAR-10
Figure 11: Attack success rate of AMI under the OME mechanism on CelebA, ImageNet, and CIFAR-10 datasets. The
success rate is represented via the advantage (Adv), true positive rate (TPR), and true negative rate (TNR) according to Eq.
3. The baseline of random guessing is 0.5. The model accuracy illustrates the utility loss of the data when using LDP.
(a) CelebA
(b) ImageNet
(c) CIFAR-10
Figure 12: Certified guarantee of success for ε ∈ [1, 10] in OME [Lyu et al., 2020]: Expectation (solid lines), upper-bound,
and lower-bound (shaded areas surrounding the expectation) of the values of the chosen neuron.
probability 10−8. This result is consistent with our attack success rate reported in Fig. 11. In addition to the unaffected
model accuracy and attack success rate, the effect of the privacy budget ε is modest in the certified guarantee of success,
given ε ∈ [1, 10] used in OME.
E NOISY GRADIENTS WITH DPSGD
Aside from LDP where clients perturb their own local training data D before computing the gradients, another method is to
let clients add DP noise to their gradients using DPSGD [Abadi et al., 2016] before sending them to the server, hindering
the attacker from knowing the true value of the chosen neuron's gradient gt. Nevertheless, recent work suggests that using
DPSGD makes it impossible to train models with reasonable accuracy for datasets like CIFAR-10 or ImageNet, even in a
non-distributed setting [Boenisch et al., 2021, Tram`er and Boneh, 2021].
√
2 ln(1.25/δ)
Moreover, even when DPSGD is used to add noise to the gradients, we can leverage the fact that the FL training is done in
multiple iterations to circumvent this DP noise. In [Abadi et al., 2016], the DP noise is sampled from a zero-mean Gaussian
ε
distribution with a standard deviation of σ =
, where ε is the privacy budget and δ is a broken probability.
However, as the noise is zero-mean, averaging the noise samples over multiple iterations will cancel out the noise and reveal
the true value of the gradients. This is also referred to as the privacy composition problem in DP [Dwork et al., 2014].
Specifically, denoting g(i)′
t = gt + zi (where zi ∼ N (0, σ2I)) as the noisy gradient of the chosen neuron at iteration i, the
server can obtain the true gradient gt by averaging over multiple iterations, i.e., gt = 1
. From this gt, the attacker
P
can determine whether the target sample was used in at least one of those iterations, following the same principle in Section
3. Fig. 13a shows the number of iterations needed to eliminate the DP noise. Previous work shows that training a neural
network for CIFAR-10 up to a modest accuracy of 66.2% requires a privacy budget ε ≥ 7.53 [Tram`er and Boneh, 2021],
hence we evaluate with ε ≥ 7.5. When ε ≥ 8, we need less than 100 iterations.
i=1 g(i)′
(cid:80)P
t
To reduce the number of iterations, we can increase the number of chosen neurons in the second layer, and average the noisy
gradients over all of the chosen neurons. Simply speaking, having K chosen neurons would reduce the number of iterations
12345678910Privacybudgetε0.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR0.50.60.70.8ModelaccuracyModelaccuracy12345678910Privacybudgetε0.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR0.650.700.750.800.850.90ModelaccuracyModelaccuracy12345678910Privacybudgetε0.50.60.70.80.91.0AttacksuccessrateAdvTPRTNR0.60.70.80.9ModelaccuracyModelaccuracyTruc Nguyen, Phung Lai, Khang Tran, NhatHai Phan, My T. Thai
(a) 1 chosen neuron
(b) δ = 10−2
Figure 13: Number of iterations needed to eliminate DP noises. 13a shows the results for 1 chosen neuron, while 13b varies
the number of chosen neurons and fixes δ = 10−2.
(a) Normal weights
(b) ε = 2
(c) ε = 3
(d) ε = 5
Figure 14: Histograms of the distribution of normal weights and malicious weights. 14a shows the normal weights, while
14b, 14c, and 14d show the malicious weights when attacking under BitRand with ε = 2, 3, and 5, respectively. The solid
blue line is the kernel density estimation (KDE).
by K-fold. Fig. 13b shows the number of iterations needed to eliminate the DP noise with multiple neurons. As can be
seen, with only 4 chosen neurons, we only need less than 60 iterations to cancel out the DP noise at ε = 7.5. With 8 chosen
neurons, the noise can be canceled out within 10 iterations.
−0.040.000.040.02.55.07.510.0Density−0.040.000.040.02.55.07.510.0Density−0.050.000.050.02.55.07.510.0Density−0.050.000.050.02.55.07.510.0Density |
|
http://arxiv.org/abs/2302.12683v1 | 2023-02-24T15:15:32 | 2023-02-24T15:15:32 | Intersectional Fairness: A Fractal Approach | The issue of fairness in AI has received an increasing amount of attention in
recent years. The problem can be approached by looking at different protected
attributes (e.g., ethnicity, gender, etc) independently, but fairness for
individual protected attributes does not imply intersectional fairness. In this
work, we frame the problem of intersectional fairness within a geometrical
setting. We project our data onto a hypercube, and split the analysis of
fairness by levels, where each level encodes the number of protected attributes
we are intersecting over. We prove mathematically that, while fairness does not
propagate "down" the levels, it does propagate "up" the levels. This means that
ensuring fairness for all subgroups at the lowest intersectional level (e.g.,
black women, white women, black men and white men), will necessarily result in
fairness for all the above levels, including each of the protected attributes
(e.g., ethnicity and gender) taken independently. We also derive a formula
describing the variance of the set of estimated success rates on each level,
under the assumption of perfect fairness. Using this theoretical finding as a
benchmark, we define a family of metrics which capture overall intersectional
bias. Finally, we propose that fairness can be metaphorically thought of as a
"fractal" problem. In fractals, patterns at the smallest scale repeat at a
larger scale. We see from this example that tackling the problem at the lowest
possible level, in a bottom-up manner, leads to the natural emergence of fair
AI. We suggest that trustworthiness is necessarily an emergent, fractal and
relational property of the AI system. | [
"Giulio Filippi",
"Sara Zannone",
"Adriano Koshiyama"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12683v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12683v1",
"@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",
"cs.CY"
] | 3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
3
8
6
2
1
.
2
0
3
2
:
v
i
X
r
a
INTERSECTIONAL FAIRNESS: A FRACTAL APPROACH
Giulio Filippi∗, Sara Zannone∗, Adriano Koshiyama
Holistic AI
London
UK
ABSTRACT
The issue of fairness in AI has received an increasing amount of attention in recent years. The
problem can be approached by looking at different protected attributes (e.g., ethnicity, gender, etc)
independently, but fairness for individual protected attributes does not imply intersectional fairness.
In this work, we frame the problem of intersectional fairness within a geometrical setting. We project
our data onto a hypercube, and split the analysis of fairness by levels, where each level encodes the
number of protected attributes we are intersecting over. We prove mathematically that, while fairness
does not propagate "down" the levels, it does propagate "up" the levels. This means that ensuring
fairness for all subgroups at the lowest intersectional level (e.g., black women, white women, black
men and white men), will necessarily result in fairness for all the above levels, including each of
the protected attributes (e.g., ethnicity and gender) taken independently. We also derive a formula
describing the variance of the set of estimated success rates on each level, under the assumption of
perfect fairness. Using this theoretical finding as a benchmark, we define a family of metrics which
capture overall intersectional bias. Finally, we propose that fairness can be metaphorically thought of
as a "fractal" problem. In fractals, patterns at the smallest scale repeat at a larger scale. We see from
this example that tackling the problem at the lowest possible level, in a bottom-up manner, leads to
the natural emergence of fair AI. We suggest that trustworthiness is necessarily an emergent, fractal
and relational property of the AI system.
Keywords Intersectional Fairness * Dynamic Programming * Statistical Parity * Geometry
1
Introduction
A num-
The issue of fairness in AI has received an increasing amount of attention in recent years.
like recruitment or credit scoring, were found to
ber of AI systems involved in sensitive applications,
be biased against minority groups [Dastin(2018), Telford(2019)].
the machine learn-
ing research community has focused on finding solutions to reduce the bias found in these models
[Agarwal et al.(2018), Agarwal et al.(2019), Li and Vasconcelos(2019), Mehrabi et al.(2021)]. Many of these
solutions focused on comparing either the outputs of the model (Equality of Outcome [Feldman et al.(2015)]) or the
error made by the algorithm (Equality of Opportunity [Hardt et al.(2016)]) for different groups. These groups are
classically identified by splitting the population using individual protected attributes, for instance according to gender,
ethnicity or age.
For these reasons,
However, what happens when these attributes intersect? The concept of intersectional fairness, initially introduced by
Black feminist scholars [Crenshaw(2013a), Crenshaw(2013b)], has only recently been introduced in the context of AI.
In their seminal work, Buolamwini and Gebru [Buolamwini and Gebru(2018)] performed a thorough analysis of three
of the most popular facial recognition algorithms on the market (Microsoft, IBM, and Face++). They found that all
algorithms were better at recognizing men and people with lighter skin, but the performance drastically decreased
for darker-skinned females. The fact that the discrimination faced by Black women was "greater than the sum" of
the discrimination experienced by Black men and white women is a well-known concept in the feminist literature
*These authors contributed equally to this work. contact: [email protected].
[Crenshaw(2013a)], also known as fairness gerrymandering in the AI literature [Kearns et al.(2018)].
These results have sparked an interest and motivated the need for studying the intersectional fairness of AI algorithms.
Practically, this has meant extending the study of bias from individual protected attributes to their intersectional groups.
Most of the works on intersectional fairness thus far has been concerned with measuring bias when intersecting all
the protected attributes [Foulds et al.(2020b), Foulds et al.(2020a), Jin et al.(2020), Morina et al.(2019)]. Since every
dataset may include an arbitrary number of protected attributes, which can be combined in any number of ways, it is not
clear how one should pick the right level of granularity for the analysis [Kong(2022)].
In our paper, we tackle the problem from a slightly different perspective. Instead of fixing the level of analysis a
priori, we develop a framework that allows us to examine all possible intersectional groups, at all levels of granularity,
and their relationship to each other. We frame the problem of intersectional fairness using a geometrical structure,
specifically a hypercube, where each protected attribute can be seen as a different dimension of the hypercube. We then
project our data on the hypercube and use it to analyse how bias-related metrics like success rate or accuracy vary for
different subgroups. The geometrical and mechanistic nature of our framework also allows us to compute the fairness
of all possible subgroups in a computationally efficient way.
This allows us to see how the fairness properties vary for different levels. From our framework it is easy to
see that fairness indeed does not propagate downwards (i.e., gerrymandering). However, we prove that it does
propagate upwards. This means that ensuring fairness at the most granular level, the intersection of all protected
attributes in the dataset, implies fairness at any possible intersection. We will show that these results hold for
both Equality of Outcome and Equality of Opportunity frameworks. This mirrors and extends the results of
[Foulds et al.(2020b), Morina et al.(2019), Yang et al.(2020)]. Finally, we find that, under perfect fairness, the variance
of the set of estimated success rates on a given level decreases exponentially with increasing levels. We use this formula
as a benchmark, and propose a family of metrics which capture overall intersectional bias.
We argue that the novelty of our work lies especially in the fact that our framework provides a tool to observe fairness
for all the possible intersectional subgroups at once, and how their fairness properties interlink. Not only this could
be great for visualisation, but it could be useful for modelling, possibly improving a mechanistic understanding of
intersectional fairness.
2 Problem Setting
We are given a binary classification dataset D with N instances along with M protected attributes (named p1, ..., pM ).
We assume all M protected attributes are binary with groups labelled as 0 and 1. Please note that our analysis can be
easily extended beyond the binary case, however, we choose to have binary protected attributes so that the results
have a simple geometric interpretation. The first insight of our framework is that we can see our data as living on a M
dimensional hypercube.
A hypercube is a geometrical figure that can be extended to an arbitrary number of dimensions. A 1-dimensional hyper-
cube is a line (Fig. 1a), a 2-dimensional hypercube is a square (Fig. 1b), and a 3-dimensional hypercube is a cube (Fig.
1c). Each hypercube is made of two copies of the previous one linked together. Higher dimensional hypercubes are dif-
ficult to visualise, but share the same property (see Fig. 1d for an example of a projection of a 4-dimensional hypercube).
First, we would like to explain the analogy between intersectional subgroups and hypercubes. If we consider a dataset
with only one protected attribute, our dataset can be seen as belonging to a line, with each vertex being one of the
subgroups (Fig. 1a). For example, if we consider gender as our protected attribute, then one vertex will be "male"
and the other vertex will be "female". If instead we consider two protected attributes, such as gender and ethnicity,
our data will lie on a square (Fig. 1b). In this case, each vertex will be the intersection of gender and ethnicity (e.g.,
white male, black male, white female and black female), and each line will be an individual attribute. Adding a third
protected attribute, such as age, will increase the dimensionality again, and make our geometrical structure into a cube
(Fig. 1c). In this case a single protected attribute will corresponds to the face of the cube, while the intersection of
two attributes will correspond to an edge. The vertices of the cube will be the intersection of all three protected attributes.
2
(a)
(c)
(b)
(d)
Figure 1: Hypercubes. (a) 1D hypercube. Assuming we have only one protected attribute (gender) with subgroups
male/female. (b) 2D hypercube. Assuming there are two protected attributes (gender and ethnicity), with subgroups
male/female and white/black respectively. (c) 3D hypercube. Assuming there are three protected attributes (gender,
ethnicity and age), with subgroups male/female, white/black and <40/40+ respectively. (d) 4D hypercube. Projection
of 4D hypercube.
The idea is that each protected attribute creates a division in the data, which can be seen as adding a dimension to the
hypercube. The number of protected attributes therefore defines the dimensionality of the main-hypercube, which
contains the whole dataset. The vertices of the hypercube, instead, comprise the intersection of all the protected
attributes (e.g., p1 = 0, ..., pM = 0). On the other hand, each edge contains the intersection of all protected attributes
but one. We denote the unspecified protected attribute with the star symbol (*). More generally, if K of the M protected
attributes are unspecified (denoted by *), the associated hypercube will be a K-dimensional hypercube embedded in the
main-hypercube. Each hypercube will then have an associated vector x ∈ {0, 1, ∗}M , which we refer to as it's vectorial
specification.
We will often speak of the hypercubes as separated by levels. The level refers to the number of stars in the vectorial
specification, and encodes the dimensionality of the embedded hypercube. There are M + 1 possible levels (0, ..., M ).
Level 0 (the lowest level) corresponds to the vertices, which are the deepest intersectional groups and have dimensionality
0. Level M (the highest level) consists only of the main-hypercube, which contains the whole dataset and has
dimensionality M . The total number of hypercubes (intersectional groups), Htot, can be computed by summing the
number of hypercubes HK at each level K, with K ∈ {0, . . . , M }:
Htot =
M
(cid:88)
K=0
HK =
M
(cid:88)
K=0
(cid:19)
(cid:18)M
K
2M −K = 3M
(1)
3
For each vertex v of the hypercube, we can compute the number of data points belonging to that specific subgroup. We
denote this number by N (v). We can similarly compute the number of data points with positive label that fall in the
same intersection (vertex), N (1)(v). From these we can compute the success rate for any vertex as
SR(v) =
N (1)(v)
N (v)
(2)
Note that it only takes one run through the dataset to compute all success rates at vertex level. We do so by updating a
dictionary with keys being all possible vertices. For each of the N instances, we are comparing arrays of length M , so
the total time complexity is O(N × M ). In the next section, we explain how this can be used to compute the success
rates for all hypercubes by propagating the computation upwards.
3 Propagation Algorithm
We extend the definitions of N and N (1) to work on any hypercube x ∈ {0, 1, ∗}M . The definition is the same as the
one for vertices, N (x) and N (1)(x) are respectively the number of datapoints and successful datapoints on a given
structure. From these we can compute the success rate of a hypercube as
SR(x) =
N (1)(x)
N (x)
(3)
If x is fully unspecified, the associated structure is the main-hypercube, in this case we use special notation SR(x) =
SRtot. Let x be a hypercube which is not a vertex. Then by definition x contains at least one star. Pick the first star
in x and consider the two sub-hypercubes contained by setting that star to 0 or 1, which we denote as x(0) and x(1)
respectively. x(0) and x(1) are a partition of x, meaning that they are disjoint and their union is x. So the following
formulas immediately follow
and
N (x) = N (x(0)) + N (x(1))
N (1)(x) = N (1)(x(0)) + N (1)(x(1))
(4)
(5)
Using these, we can also compute the success rate for hypercube x, as SR(x) = N (1)(x)/N (x). With equations 4 and
5, we are in a position to devise a dynamic programming algorithm for computing all the success rates.
To help in visualizing the propagation process, we think of each possible split as a branching on a network graph (See
Fig. 2). We refer to the resulting graph G as the hypercube graph. It's nodes consist of all possible hypercubes, and the
edges encode how these hypercubes split into lower dimensional ones. It is useful to separate the nodes of the graph
by levels when visualising it. If we have M protected attributes, the resulting graph G has 3M nodes in total, with
HK = (cid:0)M
(cid:1)2M −K of them at level K.
K
Algorithm 1. We start by computing N (v) and N (1)(v) for all vertices v. If there is no data on a given vertex, we
store a value of 0 for both of these. Then, while there exists a hypercube with uncomputed values. Since this hypercube
is not a vertex, it's vector must contain a star. Pick the first star within the vector and let x(0) and x(1) be the hypercubes
obtained by setting the star to 0, 1 respectively. We recursively compute the result of equations 4 and 5. Use these to
store the success rate if needed. Finish. See Algorithm 1 for pseudo-code.
In Appendix A, we include a study of the complexity of the propagation algorithm, as opposed to the "brute force"
approach. The results of the analysis are summarised in Table 1. The main takeaway is that for large N and 3M , the
difference between the multiplicative ("brute force") and additive ("propagation") complexities becomes considerable.
4
Figure 2: Hypercube graph. Example of a hypercube graph G with M = 2 protected attributes. The nodes of the
graph are all hypercubes. The edges represent the possible splits.
Algorithm 1 SR propagation
1: Initialize to_compute as a set containing all 3M hypercube vectors.
2: Initialize N, N (1) as dictionaries with keys being all elements of to_compute.
3: Loop once through dataset updating N, N (1) at vertex level.
4: Remove all vertex vectors from to_compute.
5: while to_compute non empty do
6:
7:
8:
9:
10: end while
Pick first element x of to_compute.
Find first star in x and decompose into x(0) and x(1).
Recursively compute values of N, N (1) using equations 4 and 5.
Remove x from to_compute.
4 Fairness Propagation
4.1 Equality of Outcome
We are given a dataset D of size N with M binary protected attributes p1, ..., pM and one binary label y. Define the
minimum and maximum success at level K as
SRmin(K) = min
x∈Level K
SR(x)
SRmax(K) = max
x∈Level K
SR(x)
(6)
(7)
In Theorem 1, we will show that the minimum and maximum success rates must narrow down as we go up the levels.
This result is similar to (Theorem IV.1. [Foulds et al.(2020b)]), although derived in a different framework.
Theorem 1. SRmin(K) is an increasing function of K and SRmax(K) is a decreasing function of K. In language,
we refer to this result as: "success rates narrow as we go up the levels".
Algorithm
Complexity
Brute Force Approach O(N × 3M )
O(N + 3M )
SR Propagation
Table 1: Complexity Table. Brute force approach consists of filtering the dataset for each intersectional subgroup,
and computing success rate on filtered data. SR Propagation first computes success rates at vertex level, and then
propagates them upwards (Algorithm 1).
5
Proof. Let x be a non-vertex hypercube (of dimension K) and let x(0)
Recall that we can compute the success rate as
i
and x(1)
i
be a partition of it using the ith star.
SR(x) =
N (1)(x)
N (x)
Using equation 5, this is equivalent to
SR(x) =
N (1)(x(0)
i
) + N (1)(x(1)
N (x)
i
)
Which can be rewritten as
SR(x) =
)
N (x(0)
i
N (x)
SR(x(0)
i
) +
)
N (x(1)
i
N (x)
SR(x(1)
i
)
(8)
(9)
(10)
Note that equation 10 is a weighed average of the success rates of the two sub-hypercubes. The weights are given by
the respective proportions of datapoints coming from each of the two sub-hypercubes. A weighed average lies between
the minimum and maximum values we are averaging over. So by looking at the ith split, we obtain the following bound
on the success rate SR(x).
If we instead choose to look at all K ways of splitting the hypercube x, we obtain a better bound.
SR(x(j)
i ) ≤ SR(x) ≤ max
SR(x(j)
i )
min
j
max
i
min
j
SR(x(j)
i ) ≤ SR(x) ≤ min
max
j
SR(x(j)
i )
j
i
(11)
(12)
Using equation 12, we conclude the proof of the theorem.
SRmin(K) = min
x∈Level K
SR(x) ≥ min
x∈Level K
max
i
min
j
SR(x(j)
i ) ≥
min
x∈Level K−1
SR(x) = SRmin(K − 1)
(13)
SRmax(K) = max
x∈Level K
SR(x) ≤ max
x∈Level K
min
i
max
j
SR(x(j)
i ) ≤ max
x∈Level K−1
SR(x) = SRmax(K − 1)
(14)
Please note that we didn't need to use all K ways of splitting (equation 12) to obtain the above result, picking any one
of them (equation 11) would have sufficed. We choose to include all ways of splitting within the formula, because it
highlights an important property of how the success rates relate across levels. That is that each hypercube at level K is
constrained in K different ways.
If we further define the worst case disparate impact [Feldman et al.(2014)] and the worst case statistical parity
[Feldman et al.(2014)] at level K as
and
DI(K) =
SRmin(K)
SRmax(K)
SP (K) = SRmax(K) − SRmin(K)
(15)
(16)
We can prove the following corollary:
Corollary 1.1. DI(K) increases with increasing K, and SP (K) decreases with increasing K. In language, we refer
to these results as: "Equality of Outcome fairness propagates up the levels".
Proof. As follows from Theorem 1:
DI(K) =
SRmin(K)
SRmax(K)
≥
SRmin(K − 1)
SRmax(K − 1)
= DI(K − 1)
(17)
and
SP (K) = SRmax(K) − SRmin(K) ≤ SRmax(K − 1) − SRmin(K − 1) = SP (K − 1)
(18)
6
4.2 Equality of Opportunity
In Appendix B we extend the above analysis to the Equality of Opportunity setting. We do so by adapting Theorem 1,
to show that other fairness measures also narrow as we progress up the levels such as: accuracy, precision, true positive
rates, false positive rates, true negative rates, false negative rates [Hardt et al.(2016)]. In language, these results can be
summarized as follows: "Equality of Opportunity fairness also propagates up the levels".
5
Intersectional Statistical Parity
In the previous sections, we used a minimum and maximum approach, to get worst case scenario proofs about
the evolution of fairness metrics as we progress up the levels. In this section, we use a statistical interpretation
of our framework. First, it will be useful to introduce some notation from probability theory. We let A1, . . . , AM
denote the random variables associated with our M protected attributes and Y be the random variable associated to
the label. Intersectional Statistical Parity (ISP) holds when there is independence between the protected attributes
(including intersections of an arbitrary number of them) and the output label ([Dwork et al.(2012), Agarwal et al.(2018),
Kearns et al.(2018), Foulds et al.(2020b)]). In equations,
In the presence of ISP, every single hypercube has precisely the same probability of success P (Y = 1) = ptot. For each
hypercube x, the success rate SR(x) can therefore be seen as the sample mean of N (x) draws of a Bernoulli(ptot)
random variable. Hence, the mean and variance are given by:
P (Y |Ai1 , . . . , Aip ) = P (Y )
(19)
and
E[SR(x)] = ptot
V ar[SR(x)] =
ptot(1 − ptot)
N (x)
(20)
(21)
We first consider the simplified case where each subgroup on a given level has an equal number of instances. In this
case, the number of datapoints for each hypercube at level K is exactly NK = N 2K−M (Appendix C). In this scenario,
all success rates SR(x) have the same distribution, with mean and variance given by equations 20 and 21 respectively
and N (x) = NK. The theoretical value for the variance (at level K) is then:
V arISP (K) =
ptot(1 − ptot)
NK
=
2M ptot(1 − ptot)
N
× 2−K
(22)
Note that the variance decreases exponentially with increasing levels. By setting α = 2M ptot(1−ptot)
to the log domain, we get a simpler formulation
N
and transforming
This means that, if ISP holds, the log of the variance at level K decreases linearly with increasing K. The slope of the
linear curve is − log 2 and the intercept is log α.
log V arISP (K) = log α − K log 2
(23)
Supposing we are now in possession of data, obtained from an ISP classifier. We can use the empirical success rates at
each level to compute an estimate of the variance as:
1
HK
(cid:88)
x∈Level K
(SR(x) − SR(K))2
(24)
The above formula is known to be an estimator of the theoretical variance, under the assumption of independent samples.
However, on any level above Level 0, the samples are technically not independent. That is because different hypercubes
share vertices and we find that especially at very high levels, the approximation of assuming independence breaks down.
We mitigate this issue by using sub-sampling. By sub-sampling our dataset several times, we solve two problems at
once. The first is that we ensure the dataset is balanced, which is a crucial assumption in the derivations. The second is
that we produce more samples, that are less correlated overall. We call the empirical estimate of the variance obtained
using sub-sampling V ar(K). If we subsample our data nsub times, V ar(K) can be defined mathematically as
nsub(cid:88)
(cid:88)
(SRi(x) − SR(K))2
(25)
V ar(K) =
1
nsub × HK
i=1
x∈Level K
7
What happens if ISP does not hold? In this case, the set of success rates SR(x) at each level is made up of copies of
random variables with different means. Since the means are different, we expect the variance to be greater than the
theoretically computed minimum V arISP (K). We can then use this theoretical value for the variance as a benchmark,
to define a measure of intersectional bias at each level. We call this family of metrics V arRatio(K), and define it
mathematically as
V arRatio(K) =
V ar(K)
V arISP (K)
(26)
In this paper, we restrict our focus to the metric obtained at vertex level, for K = 0. Once again using α = 2M ptot(1−ptot)
to simplify the expression, the metric can be written as:
nsub
V arRatio(0) =
V ar(0)
α
(27)
There are three cases that can arise:
1. V arRatio(0) ≈ 1 indicating the classifier satisfies (or is close to satisfying) ISP.
2. V arRatio(0) > 1 indicating the classifier contains some intersectional bias.
3. V arRatio(0) < 1 hinting that the classifier was trained or post-processed with some bias mitigation proce-
dures.
Please note that if the data is unbalanced and we do not use a sub-sampling approach, V arISP (K) still serves as an
approximate lower bound for the expected variance at Level K (Appendix D).
In conclusion, we showed that, under perfect fairness, the variance of the empirical success rates decreases exponentially
across levels. This means that the log-variance against level curve is linear, and this can be used as a test for the ISP
criterion. These theoretical findings helped us define a family of metrics V arRatio(K) which capture intersectional
bias, and because of how they are constructed, we expect them to be less affected by small sample variance than other
approaches within the literature.
6 Experiments
6.1 Synthetic Data
Figure 3: Success Rate Distributions. Estimated empirical distributions of the success rates over all the hypercubes at
levels 1, 4 and 7 for Experiment 1. The distributions get narrower around SRtot = 0.5 as we travel up the levels.
In order to verify our theoretical results, we run experiments with synthetic data. We create a function to generate
random datasets, with M = 10 protected attributes, and one label. Each of the 210 = 1024 smallest intersectional
groups (vertices), v, contains N (v) = 200R instances, where R is a randomly selected integer between 1 and
8
10. Each vertex also has an associated probability of success p(v), which we use to sample its binary label data
from a Bernoulli(p(v)) distribution. We sub-sample the dataset nrepeats = 20 times so as to have all vertices
contain precisely nsub = 100 datapoints. The sub-sampling is crucial for two reasons. The first is that it allows
us to generate a larger number of samples, with minimal amounts of correlation. The second is that it ensures
all hypercubes have equal number of datapoints. Both of these conditions were assumptions in our theoretical derivations.
In this first example, we will consider a fair dataset, where p(v) = 0.5 for all vertices. Since the output label is here
independent of all the protected attributes, this example satisfies Intersectional Statistical Parity. We run the Propagation
Algorithm 1 to compute the empirical success rates over all the possible intersectional groups, that is, all the hypercubes
in our geometrical model. Fig. 3 shows the distribution of the empirical success rates at different levels. As predicted
by our theoretical results, the distribution gets narrower around SRtot = 0.5 as we go up the levels. Fig. 4a shows how
the minimum and maximum values evolve as we progress up the levels. The maximum value decreases and minimum
value increases, as shown in Theorem 1. Fig. 4b and Fig. 4c show plots of V ar(K) and log V ar(K) as a function of
K. Both curves match the theoretical results precisely, except for small numerical approximations.
9
(a) minimum and maximum
(b) variance
(c) log variance
Figure 4: Experiment 1. (a) Evolution of the minimum and maximum empirical success rates across levels. As
expected from the theoretical results, these values tend to 0.5. (b) Evolution of the Variance across levels. The variance
decreases exponentially, as predicted by our theoretical results. (c) Evolution of the log-Variance across levels. The
log-variance linearly, as predicted by our theoretical results.
In our second experiment, we want to analyse how these results change in the presence of bias. We model bias by
allowing each vertex v to have a different probability of success p(v). Specifically, we select a set of 100 vertices to have
probability of success p(v) = 0.5 − δ, and a separate set of 100 vertices to have probability of success p(v) = 0.5 + δ.
We set our parameter δ to vary in the interval {0, 0.1, 0.2, 0.3, 0.4}. When δ = 0, we retrieve the case of perfect fairness
from the previous example. Otherwise, ISP will not be satisfied, and indeed our dataset will get less and less fair as
δ increases. The results show that, as expected, the minimum and maximum success rates narrow down as fairness
increases, that is, for lower values of δ (Fig. 5a). We also show that, just as our theoretical results had predicted, the
variance of the empirical success rates increases with higher levels of bias (Fig. 5b). Accordingly, the evolution of
the log-variance across levels is not linear but concave for higher levels of δ, another indicator that ISP is not satisfied.
Finally, we calculate our metric V arRatio(0) (Table 2), and find that it increases for increasing values of δ, which
indicate larger bias.
10
(a) minimum and maximum
(b) variance
(c) log variance
Figure 5: Experiment 2. (a) Evolution of the minimum and maximum empirical success rates across levels. As
expected from the theoretical results, these values tend to 0.5. These values narrow down for smaller δ, as bias decreases.
(b) Evolution of the Variance across levels. The variance increases in the presence of bias. (c) Evolution of the
log-Variance across levels. The log-variance curve departs from the theoretical value as we increase δ.
Level 0
δ = 0
0.98
δ = 0.1
1.73
δ = 0.2
4.19
δ = 0.3
7.96
δ = 0.4
13.34
Table 2: Metrics Table. V arRatio(0) calculated for experiment 2.
11
6.2 Real Data Experiment
For the real data test, we chose to use the Adult dataset. The Adult dataset is one of the most commonly used datasets
in fair-AI research. That is because it has many attributes that can be considered sensitive (sex, race, age, etc) and the
task is that of binary classification. The dataset consists of N = 48842 instances with 14 features and one label feature.
The usual task given on this dataset is the prediction of the binary attribute of salary being above 50K from the other
features.
For the purposes of our experiments, we performed some simple prepossessing on the data. The first step is we keep
only 5 of the 15 provided columns. That is M = 4 protected attributes (sex, race, age, marital-status) and the binary
label (class). We also performed some grouping on the attributes age, race and marital-status. For age, we binarize
the data so that instances with age ≥ 40 are set to 1 and all others are set to 0. For race we grouped Black, Asian-
Pac-Islander and Amer-Indian-Eskimo with the Other group. For marital-status we grouped the 7 provided statuses
(Married-civ-spouse, Never-married, Divorced, Separated, Widowed, Married-spouse-absent, Married-AF-spouse) into
Married and Not-Married. The reason we had to perform grouping on some attributes is to match the setting of the
theoretical work (all protected attributes binary). Furthermore the grouping ensures all intersectional subgroups contain
sufficient data. For the average and minimum number of datapoints over all hypercubes per level, see Table 3.
Level 0 Level 1 Level 2 Level 3 Level 4
6105
521
Table 3: Adult Dataset. Minimum number and average number of datapoints at each level K = 0, . . . , 4.
Average Number
Minimum Number
48842
48842
24421
7080
12210
2511
3052
228
The following results are obtained by sub-sampling the dataset nrepeats = 20 times so that each vertex contains exactly
nsub = 100 samples. In Fig. 6a the minimum and maximum success rates are displayed as a function of level. As we
have shown, the success rates must narrow with increasing levels, although they narrow more slowly for the Adult
dataset. Fig. 6b and Fig. 6c show the evolution of the variance and log-variance across levels. Observe the big difference
in variance between the theoretically computed values (obtained under ISP condition) and Adult dataset values. All
results indicate the presence of intersectional bias within the data.
7 Fractal Fairness
Intersectional fairness in the context of AI typically focuses on splitting groups of people into smaller identity categories
by intersecting multiple protected attributes. Although it is commendable that the issue of intersectionality is being
tackled by the community, we feel that the current approaches have some limitations. For example, it is not clear how
many protected attributes one should consider, which protected attributes one should consider and how to select the
level of granularity for the analysis [Kong(2022)].
On the other hand, we sought a framework that would allow us to think of intersectional fairness as a whole: one
complex system involving all possible intersectional groups at all levels of description. We turned to geometry,
and particularly fractals, for inspiration. Fractals are geometrical objects that, informally, can be broken down into
smaller objects that resemble the original shape [Mandelbrot and Mandelbrot(1982)]. Although our framework is not
mathematically a fractal, we identified a geometrical structure where each hypercube separates into further instances of
hypercubes. This provided us with a mathematical model to study a nested and recursive notion of fairness. In fractals,
patterns at a small scale repeat at a larger scale. Similarly, our framework asks that our data is fair for any possible
subgroup of the population, no matter which or how many attributes are intersected.
Furthermore, the geometrical nature of our setting allows us to examine how fairness propagates and scales. We found
that fairness necessarily propagates up the levels, while bias propagates down. This suggests that we should, first and
foremost, think of fairness in a bottom-up and local way. It also indicates that we cannot think of individual parts of a
system in isolation from the whole. We propose that the trustworthiness of an AI system cannot thus be enforced in
a top-down way, or by separating individual components from the larger system. Instead, we argue for a bottom-up
emergent and holistic approach to trustworthy AI.
12
(a) minimum and maximum
(b) variance
(c) log variance
Figure 6: Adult Dataset Experiment. (a) Evolution of the minimum and maximum empirical success rates across
levels. (b) Evolution of the Variance across levels. (c) Evolution of the log Variance across levels.
8 Discussion
In this paper, we introduced a geometrical setting for studying the fairness properties of all possible intersectional
subgroups together, in a unified framework. There are multiple advantages to this setting. Firstly, it allows for a quicker
computation of all the success rates (or other metrics if needed), using a dynamic programming approach. Secondly, it
reveals the inter-connectivity between the fairness properties of groups at different levels. In particular, we prove that
success rates must narrow as we go up the levels. We use that to prove worst case disparate impact increases with
increasing levels, and worst case statistical parity decreases with increasing levels. We summarise these results as
"Equality of Outcome fairness propagates up the levels". We then extend our results to the Equality of Opportunity
setting. In particular, we show that accuracy, precision, true positive rates, false positive rates, true negative rates
and false negative rates all narrow down as we progress up the levels. We summarise these results as "Equality of
Opportunity fairness also propagates up the levels". In the future, it might be interesting to derive a mathematical
description of all metrics for which this method of proof applies.
13
Furthermore, we suggest that the variance of the empirically computed success rates on a given level can be used as a
fairness measure. We prove that under perfect fairness (Intersectional Statistical Parity), the variance follows a simple
exponential scaling law. Using this theoretical value as benchmark, we define a family of metrics which capture the
intersectional bias on each level. Future work will definitely focus on examining these metrics further and studying the
behaviour of the variance and log-variance curves more closely in different settings. One of the hopes is that, the shape
of the log-variance curve can help in detecting but also in locating the source of bias. For instance if bias was injected
into the system using combinations of two protected attributes (Level M − 2), we might see a bend in the log-variance
curve at around those values of K. This could help answer questions related to the sources of bias and identi-
fying gerrymandering. Alternatively, the variance scaling law could be used to devise similarly structured statistical tests.
One of the advantages of our framework is that it allows us to analyse the whole system at once. Bias is not exclusively
measured for given groups at a prescribed intersectional level, but instead its evolution is examined across all levels.
However, most of our analyses aggregate over groups. This issue could be mitigated, for example, by using our
framework in conjunction with other bias measures. In the future, it would be interesting to employ our propagation
algorithm for more detailed modelling. For example, we could analyse how the success rates for two specific attributes
interact and spread across levels. Otherwise, we could study the evolution of the fairness metrics for one specific
attribute (e.g. gender) across levels or even specific paths within the hypercube. This would provide us with further
insight into how bias affects that specific attribute. More broadly, our way of framing the problem of intersectionality
can reveal the interconnections among intersectional subgroups, which could be key to developing appropriate metrics
and mitigation techniques.
References
[Agarwal et al.(2018)] Alekh Agarwal, Alina Beygelzimer, Miroslav Dudík, John Langford, and Hanna Wallach. 2018.
A reductions approach to fair classification. In International Conference on Machine Learning. PMLR, 60–69.
[Agarwal et al.(2019)] Alekh Agarwal, Miroslav Dudík, and Zhiwei Steven Wu. 2019. Fair Regression: Quantitative
Definitions and Reduction-based Algorithms. 36th International Conference on Machine Learning, ICML 2019
2019-June (5 2019), 166–183. https://doi.org/10.48550/arxiv.1905.12843
[Buolamwini and Gebru(2018)] Joy Buolamwini and Timnit Gebru. 2018. Gender shades: Intersectional accuracy
disparities in commercial gender classification. In Conference on fairness, accountability and transparency.
PMLR, 77–91.
[Crenshaw(2013a)] Kimberlé Crenshaw. 2013a. Demarginalizing the intersection of race and sex: A black feminist
critique of antidiscrimination doctrine, feminist theory and antiracist politics. In Feminist legal theories. Routledge,
23–51.
[Crenshaw(2013b)] Kimberlé Williams Crenshaw. 2013b. Mapping the margins: Intersectionality, identity politics,
and violence against women of color. In The public nature of private violence. Routledge, 93–118.
[Dastin(2018)] Jeffrey Dastin. 2018. Amazon scraps secret AI recruiting tool that showed bias against women. In
Ethics of data and analytics. Auerbach Publications, 296–299.
[Dwork et al.(2012)] Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel. 2012.
Fairness through awareness. In Proceedings of the 3rd innovations in theoretical computer science conference.
214–226.
[Feldman et al.(2014)] Michael Feldman, Sorelle A. Friedler, John Moeller, Carlos Scheidegger, and Suresh Venkata-
subramanian. 2014. Certifying and removing disparate impact. Proceedings of the ACM SIGKDD Interna-
tional Conference on Knowledge Discovery and Data Mining 2015-August (12 2014), 259–268.
https:
//doi.org/10.48550/arxiv.1412.3756
[Feldman et al.(2015)] Michael Feldman, Sorelle A Friedler, John Moeller, Carlos Scheidegger, and Suresh Venkatasub-
ramanian. 2015. Certifying and removing disparate impact. In proceedings of the 21th ACM SIGKDD international
conference on knowledge discovery and data mining. 259–268.
[Foulds et al.(2020a)] James R Foulds, Rashidul Islam, Kamrun Naher Keya, and Shimei Pan. 2020a. Bayesian
Modeling of Intersectional Fairness: The Variance of Bias. In Proceedings of the 2020 SIAM International
Conference on Data Mining. SIAM, 424–432.
[Foulds et al.(2020b)] James R. Foulds, Rashidul Islam, Kamrun Naher Keya, and Shimei Pan. 2020b. An intersectional
definition of fairness. Proceedings - International Conference on Data Engineering 2020-April (4 2020), 1918–
1921. https://doi.org/10.1109/ICDE48307.2020.00203
14
[Hardt et al.(2016)] Moritz Hardt, Eric Price, and Nati Srebro. 2016. Equality of opportunity in supervised learning.
Advances in neural information processing systems 29 (2016).
[Jin et al.(2020)] Zhongjun Jin, Mengjing Xu, Chenkai Sun, Abolfazl Asudeh, and HV Jagadish. 2020. Mithracoverage:
a system for investigating population bias for intersectional fairness. In Proceedings of the 2020 ACM SIGMOD
International Conference on Management of Data. 2721–2724.
[Kearns et al.(2018)] Michael Kearns, Seth Neel, Aaron Roth, and Zhiwei Steven Wu. 2018. Preventing Fairness
Gerrymandering: Auditing and Learning for Subgroup Fairness. (2018).
[Kong(2022)] Youjin Kong. 2022. Are "Intersectionally Fair" AI Algorithms Really Fair to Women of Color?
https:
A Philosophical Analysis. ACM International Conference Proceeding Series (6 2022), 485–494.
//doi.org/10.1145/3531146.3533114
[Li and Vasconcelos(2019)] Yi Li and Nuno Vasconcelos. 2019. Repair: Removing representation bias by dataset
resampling. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 9572–9581.
[Mandelbrot and Mandelbrot(1982)] Benoit B Mandelbrot and Benoit B Mandelbrot. 1982. The fractal geometry of
nature. Vol. 1. WH freeman New York.
[Mehrabi et al.(2021)] Ninareh Mehrabi, Fred Morstatter, Nripsuta Saxena, Kristina Lerman, and Aram Galstyan. 2021.
A survey on bias and fairness in machine learning. ACM Computing Surveys (CSUR) 54, 6 (2021), 1–35.
[Morina et al.(2019)] Giulio Morina, Viktoriia Oliinyk, Julian Waton, Ines Marusic, and Konstantinos Georgatzis.
2019. Auditing and Achieving Intersectional Fairness in Classification Problems. (11 2019). https://doi.
org/10.48550/arxiv.1911.01468
[Telford(2019)] Taylor Telford. 2019. Apple Card algorithm sparks gender bias allegations against Goldman Sachs.
Washington Post 11 (2019).
[Yang et al.(2020)] Forest Yang, Moustapha Cisse, Google Research, and Accra Sanmi Koyejo. 2020. Fairness with
Overlapping Groups. (2020).
A Complexity of Success Rate Propagation Algorithm
We first study the complexity of the "brute force" approach to computing all success rates. Suppose we filter the
dataset by the appropriate intersectional group and then compute the success rates on the filtered data for each of the
3M intersections. For each of the 3M intersections, we are looping over N instances and for each instance we must
compare arrays of length M . So this method would have time complexity O(N × M × 3M ).
As we have seen, we can compute the quantities at vertex-level in O(N × M ) time. What is the time complexity of the
propagation algorithm? To compute the complexity of the propagation algorithm, we consider the hypercube graph G
(see Fig. 2). Each hypercube at level K has K stars, so it is connected with 2K hypercubes one level below. Recall that
level K consists of HK = (cid:0)M
(cid:1)2M −K hypercubes. So the total number of edges E(G) in G can be written as a sum
K
over levels K ∈ {1, . . . , M }.
E(G) =
M
(cid:88)
K=1
2K
(cid:19)
(cid:18)M
K
2M −K ≤
M
(cid:88)
K=0
2M
(cid:19)
(cid:18)M
K
2M −K = 2M × 3M
(28)
Since our algorithm functions with recursion on the graph G, by reusing values that have already been computed, it
would never cross the same edge twice. So the number of edges in G is a strict upper bound on the time taken by the
algorithm. So the time complexity of the dynamic programming approach is upper bounded by O(N × M + M × 3M ).
Assuming M is small compared to N and 3M (and therefore modelled as a constant), the complexities of both
approaches are summarized in Table 1.
B Extension to Equality of Opportunity
B.1 Accuracy
Until now we have only been working in an Equality of Outcome fairness framework. Meaning that we are seeking to
equalize the outcomes of our model for different subgroups of the population. There are also Equality of Opportunity
fairness notions, that seek to equalize the performance of our model on different subgroups. There is a quick way to
translate our findings from an Equality of Outcome framework to an Equality of Opportunity framework. Suppose that
15
(30)
(31)
we are given the true labels as well as the predicted labels. Name these vectors ytrue and ypred respectively. Consider
the new vector
ycorrect = ytrue ∧ ypred
(29)
Suppose we use Theorem 1 with ycorrect instead of ypred. We can show that the success rate of ycorrect narrows as we
go up the levels. However, the success rate of ycorrect is precisely the accuracy of ytrue, ypred. So we have shown
that accuracy also narrows as we go up the levels. If we define the worst case accuracy ratio and worst case accuracy
difference at level K as
Accratio(K) =
Accmin(K)
Accmax(K)
By using Corollary 2, we can show that Accratio(K) increases and Accdif f (K) decreases with increasing K.
Accdif f (K) = Accmax(K) − Accmin(K)
B.2 Other Metrics
In the previous section, we showed how we can extend the original result about success rates to the analogous result
about accuracy. The method we used to do so can be framed more generally. In particular, we can show analogous
results for any metric that can be written as a success rate of a binary vector ynew obtained from ytrue, ypred. We also
allow for filtering the dataset if convenient in defining the metric (as shown in the next example).
Suppose we wish to prove that the worst case true positive rates (T P R) narrow as we go up the levels. We first filter our
dataset D to contain only rows where ytrue = 1, we temporarily discard other rows. Then create a new binary vector
ytruepos which is an indicator on true positives (1 if instance is a true positive, 0 otherwise). Observe that the success
rate of this new vector is precisely the true positive rate of the original predictions and true labels. In equations
T P R(x) =
# true positives(x)
# true(x)
=
N (1)(x)
N (x)
= SR(x)
(32)
By using Theorem 1 with this new dataset and new binary vector, we show true positive rates also narrow as we go up
the levels. Using the same approach, we can also show that false positive rates, true negative rates, false negative rates
and precision all narrow as we go up the levels.
C Average number of datapoints on hypercube at Level K
We claim the following formula for the average number of datapoints on a hypercube at level K:
1
HK
N (x) = N 2M −K
NK =
(cid:88)
x∈Level K
Proof. For K = 0, the formula holds
For any level K > 0,
N0 =
1
2M
(cid:88)
N (x) =
x∈Level 0
NK =
1
HK
(cid:88)
N (x) =
x∈Level K
1
HK
(cid:88)
x∈Level K
N
2M
1
K
(cid:88)
(cid:88)
N (x(j)
i )
i
j
Each hypercube at level K − 1 appears precisely M − K + 1 times in the triple sum, so we can rewrite it as
and since, HK = (cid:0)M
K
M − K + 1
K
1
HK
Therefore
NK =
1
HK
M − K + 1
K
(cid:88)
N (x)
x∈Level K−1
(cid:1)2M −K, we have
K!(M − K)!
M !
=
2K−M M − K + 1
K
= 2
(K − 1)!(M − K + 1)!
M !
2K−1−M = 2
1
HK−1
NK = 2
1
HK−1
(cid:88)
N (x) = 2NK−1
x∈Level K−1
Which concludes the proof by induction.
16
(33)
(34)
(35)
(36)
(37)
(38)
D Variance of empirical success rates at Level K under ISP assumption
We claimed that under ISP (and uncorrelated samples), the expected empirical variance can be lower bounded by
HK −1
HK
. The proof is as follows
ptot(1−ptot)
NK
Proof. We make 2 assumptions (A1, A2)
1. The classifier generating the label data is ISP.
2. The samples SR(x), x ∈ Level K are uncorrelated.
E[V ar(K)] = E
1
HK
(cid:88)
SR(x)2 −
x∈Level K
(cid:32)
1
HK
(cid:88)
x∈Level K
(cid:33)2
SR(x)
Expand the sum
(cid:34)
= E
1
HK
(cid:88)
x
SR(x)2 −
1
H 2
K
(cid:88)
x,y
(cid:35)
SR(x)SR(y)
Remove the cross terms that amount to squares, and aggregate them in the first sum
= E
(cid:18) 1
HK
−
1
H 2
K
(cid:19) (cid:88)
x
SR(x)2 −
1
H 2
K
(cid:88)
x(cid:54)=y
SR(x)SR(y)
(39)
(40)
(41)
Now we use linearity of expectation and both assumptions A1, and A2. A1 is used to replace expectations with their
theoretical value ptot. A2 is used to transform expectations of products into products of expectations.
=
(cid:18) 1
HK
−
1
H 2
K
(cid:19) (cid:88)
x
E[SR(x)2] −
1
H 2
K
(cid:88)
x(cid:54)=y
p2
tot
=
HK − 1
H 2
K
(cid:88)
x
E[SR(x)2] −
HK − 1
HK
p2
tot
=
HK − 1
H 2
K
(cid:88)
x
E[SR(x)2] − E[SR(x)]2
=
HK − 1
H 2
K
(cid:88)
x
V ar[SR(x)]
=
HK − 1
H 2
K
(cid:88)
x
ptot(1 − ptot)
N (x)
Using Jensen's inequality applied to concave function 1/X,
1
HK
(cid:88)
x∈Level K
1
N (x)
≥
1
1
HK
(cid:80)
x∈Level K N (x)
=
1
NK
So we obtain
And the bound is tight iff all sample sizes are the same on the given level.
E[V ar(K)] ≥
HK − 1
HK
ptot(1 − ptot)
NK
17
(42)
(43)
(44)
(45)
(46)
(47)
(48)
E Metrics for Experiment 2 measured across all levels
Level 0
Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
Level 7
Level 8
Level 9
δ = 0
0.989688
0.993014
0.995939
1.000630
1.009613
1.024945
1.046565
1.069158
1.074935
1.013403
δ = 0.1
1.735759
2.219624
3.001205
4.251804
6.221990
9.240775
13.636296
19.405291
25.157049
25.073643
δ = 0.2
4.191394
6.220185
9.507072
14.776882
23.086325
35.823894
54.377402
78.747043
103.123825
103.158698
δ = 0.3
7.966448
12.409443
19.598287
31.110746
49.241288
77.001449
117.403449
170.448156
223.490712
223.463451
δ = 0.4
13.347224
21.233369
34.003209
54.461175
86.686218
136.032915
207.857395
302.164360
396.491092
396.570403
Table 4: Experiment 2 Metrics Table. We show the values of the metric V arRatio(K) for K = 0, . . . , 9 and
parameter δ = 0, . . . , 0.4
18
|
|
http://arxiv.org/abs/2302.12682v2 | 2023-06-28T16:27:38 | 2023-02-24T15:15:07 | A DeepONet multi-fidelity approach for residual learning in reduced
order modeling | In the present work, we introduce a novel approach to enhance the precision
of reduced order models by exploiting a multi-fidelity perspective and
DeepONets. Reduced models provide a real-time numerical approximation by
simplifying the original model. The error introduced by the such operation is
usually neglected and sacrificed in order to reach a fast computation. We
propose to couple the model reduction to a machine learning residual learning,
such that the above-mentioned error can be learned by a neural network and
inferred for new predictions. We emphasize that the framework maximizes the
exploitation of high-fidelity information, using it for building the reduced
order model and for learning the residual. In this work, we explore the
integration of proper orthogonal decomposition (POD), and gappy POD for sensors
data, with the recent DeepONet architecture. Numerical investigations for a
parametric benchmark function and a nonlinear parametric Navier-Stokes problem
are presented. | [
"Nicola Demo",
"Marco Tezzele",
"Gianluigi Rozza"
] | 10.1186/s40323-023-00249-9 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1186/s40323-023-00249-9",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12682v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12682v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "math.NA",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"math.NA",
"cs.LG",
"cs.NA"
] | 3
2
0
2
n
u
J
8
2
]
A
N
.
h
t
a
m
[
2
v
2
8
6
2
1
.
2
0
3
2
:
v
i
X
r
a
A DeepONet multi-fidelity approach for residual learning in
reduced order modeling
Nicola Demo∗1, Marco Tezzele†1,2, and Gianluigi Rozza‡1
1Mathematics Area, mathLab, SISSA, via Bonomea 265, I-34136 Trieste, Italy
2Oden Institute for Computational Engineering and Sciences, University of Texas
at Austin, Austin, 78712, TX, United States
June 29, 2023
Abstract
In the present work, we introduce a novel approach to enhance the precision of reduced or-
der models by exploiting a multi-fidelity perspective and DeepONets. Reduced models provide
a real-time numerical approximation by simplifying the original model. The error introduced
by the such operation is usually neglected and sacrificed in order to reach a fast computation.
We propose to couple the model reduction to a machine learning residual learning, such that
the above-mentioned error can be learned by a neural network and inferred for new predictions.
We emphasize that the framework maximizes the exploitation of high-fidelity information, us-
ing it for building the reduced order model and for learning the residual. In this work, we
explore the integration of proper orthogonal decomposition (POD), and gappy POD for sen-
sors data, with the recent DeepONet architecture. Numerical investigations for a parametric
benchmark function and a nonlinear parametric Navier-Stokes problem are presented.
Contents
1 Introduction
2 Methods
2.1 Proper Orthogonal Decomposition for low-fidelity modeling . . . . . . . . . . . . .
2.1.1 Gappy POD for sensors data . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 DeepONet for residual learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Numerical results
3.1 Algebraic parametric problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Navier Stokes problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Summary discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Conclusions and future perspectives
1 Introduction
1
2
4
5
6
6
7
9
12
14
Multi-fidelity (MF) methods emerged as a solution to deal with complex models, which usually
need a high computational budget to be solved [58]. Such a framework aims to exploit not only the
so-called high-fidelity information, but also the response of low-fidelity models in order to increase
the accuracy of the prediction. This feature plays a fundamental role, especially for outer loop
applications such as uncertainty propagation and optimization, since it allows to achieve good ac-
curacy without requiring evaluating the high-fidelity model (typically expensive) at every iteration.
∗[email protected]
†[email protected]
‡[email protected]
1
Thus, its employment is widespread for optimization purposes, and among all the contributions
in literature, we highlight the successful application to naval engineering problems [13, 12, 69], to
multiple fidelities modeling [28], and in the presence of uncertainty [54]. All these cases, as well as
many others, build the correlation between the different fidelities by involving Gaussian process re-
gression (GPR). Another approach with nonlinear autoregressive schemes is described in [59, 62],
whereas in [64] a possible extension for high-dimensional parameter spaces is investigated. Re-
cently, an alternative to such a probabilistic framework is offered by neural networks, where the
mapping between the low-fidelity model and the high-fidelity one is learned by the network during
the training procedure [79, 51, 33]. Among the different types of architecture, DeepONet [44, 41]
has been proposed to approximate operators and it has been successfully applied to MF prob-
lems in [45, 37]. It has also been successfully used to create a fast PDE-constrained optimization
method in [73]. Another type of architecture that has been successfully applied to multi-fidelity
data is the Bayesian neural network [50], resulting in a framework robust to noisy measurements.
We also highlight the employment of multi-fidelity techniques for uncertainty quantification. We
cite [35, 34] for a Bayesian framework capable to deal with model discrepancy using different fi-
delities, whereas we refer to [27] for an analysis of the trade-off between high- and low-fidelity data
in a Monte Carlo estimation.
Reduced order modeling (ROM) [10, 19, 65] is a family of methods that aims at reducing the
computational burden of evaluating complex models. Instead of combining data from heteroge-
neous models, ROM builds a simplified model, typically from some high-fidelity information. Also,
in this case, the capabilities of ROM led to its diffusion in several industrial contexts [52, 69, 67],
especially for optimization tasks [11, 3, 78, 70, 25, 22] or inverse problems [31, 38]. In the ROM
community, proper orthogonal decomposition (POD) is one of the most employed methods to build
the reduced model [60, 61, 7, 8, 9]. Given a limited set of high-fidelity data, POD is able to com-
pute the reduced space of an arbitrary rank which optimally (in a least squares sense) represents
the data. In the last years, its diffusion led to several variants including shifted POD [56, 63],
weighted POD [18, 71], and gappy POD [26, 75, 17, 46]. This latter exploit a compressive sensing
approach [14, 16, 40], in order to use only a few information at certain locations of the domain
(sensors) to compute the approximation. A generalization of gappy POD can be found in [1], where
linear stochastic estimation allows the reconstruction of the linear map between the available data
and the system state by an l2 minimization. A novel approach where such a relation between
sensor data and the reduced state is approximated in a nonlinear way employing neural networks
can be found in [53].
In the present contribution, we explore the possibility of coupling these two methodologies, MF
and ROM, to enhance the accuracy of the model. ROM indeed creates a simplified model from
a few high-fidelity data. Such approximation can be considered the low-fidelity model, because
of the projection error introduced by the ROM. In this context, MF could be adopted in order
to find the correlation between the original model and the ROM one, resulting in a more precise
prediction. We can therefore exploit twice the collected high-fidelity data: initially, it is used to
build the reduced model, then again during the computation of the MF relation. From this point
of view, the proposed improvement does not need any additional high-fidelity evaluations. Here
we take into consideration the POD with interpolation or the gappy POD as low-fidelity modeling
techniques and the DeepONet to learn the residual. POD with interpolation [74, 68, 29, 24] is
applied here for a completely data-driven approach, while gappy POD is used in order to make
the pipeline applicable even for sensor data. The framework aims then to exploit the capability of
POD models for linear prediction, adding the nonlinear term through the DeepONet, which can
be viewed as a data-driven closure model. See [76] for another data-driven modelling approach
to close ROMs, while for other recent works that propose nonlinear model order reduction, we
cite [4, 2, 39, 66, 30, 49, 42].
The manuscript is organized as follows.
In Section 2 we present the end-to-end numerical
pipeline, with a focus on POD, gappy POD, and DeepONets. We continue in Section 3 by showing
the numerical experiments, and finally we conclude with Section 4 by summarizing the results and
drawing some future extensions.
2 Methods
This section is devoted to present the numerical methods used within the proposed approximation
scheme, together with the methods used for comparison. We describe their integration in order to
2
provide a global overview, then we discuss in the following sections the algorithmic details.
Proper orthogonal decomposition (POD) is a widespread technique providing a linear model
order reduction, particularly suited to deal with parametric problems [65, 48, 20]. Such a repre-
sentation is computationally very cheap to acquire, however, it suffers from the linear limitations
of POD that may decrease its accuracy, especially when dealing with nonlinear problems.
We are interested in efficiently computing a parametric field u(μ) with u : P
is the parametric space,
ROMs compute the approximation uPOD(μ) such that:
V
a generic norm equipped vector space with dim(
V
, where P
) = n. POD-based
→ V
uPOD(μ)
≈
u(μ) = uPOD(μ) + r(μ),
(1)
→ V
where r : P
is the projection error introduced by the model order reduction, which we assume
here to be dependent on the parameter. In a classical POD framework, this residual r is usually
neglected, due to its marginal contribution. In the present contribution, we aim instead to learn it
by means of machine learning techniques, in order to improve the accuracy of the final prediction.
Artificial neural networks (ANNs) can be used to model it, thanks to their general approximation
capabilities, learning it by exploiting the snapshots already pre-computed to build the ROM. In
particular, dealing with parametric problems, we exploit the DeepONet architecture to learn the
residual. The light computational demand to infer the DeepONet enables a nonlinear but still
real-time improvement of the POD model, at the cost of additional training during the offline
phase.
The only input needed by the proposed methodology is the numerical solutions database
N
μi, u(μi)
i=1 computed by sampling the parameter space and exploiting any consolidated dis-
{
}
cretization method (e.g. finite element or finite volume method). These snapshots are combined
in order to find the POD space, which can be used for intrusive or non-intrusive ROM. We explore
in this contribution only the non-intrusive (data-driven) approach, while future works will study
the application to POD-Galerkin contexts. We investigate two options for the non-intrusive ROM:
• POD with radial basis functions (POD-RBF) interpolation, which enables the prediction of
new solutions (for new parameters) by means of the above-mentioned interpolation tech-
nique. In this case, the ROM takes as input the actual parameter providing as output the
approximated solution.
• Gappy POD, which allows us to compute the approximated solution by providing only some
sensor data thanks to a compressing strategy.
Once the ROM is built, we can exploit it to compute the low-fidelity representation of the original
snapshots by passing the corresponding parameters (or sensor data). The high-fidelity and low-
fidelity databases are then used to learn the difference between them through the DeepONet
network with the final aim of generalizing such residual even to unseen parameters and improving
is obtained by discretizing a
the final prediction. It is important to note that typically the space
generic Rd space. Depending on the complexity of the equation to solve and on the target accuracy,
this kind of space can exhibit a high number of degrees of freedom.
V
V
Approximating the error over such a high-dimensional space with a neural network leads to two
major issues: i.) the number of the neurons in the last layer is equal to the number of degrees of
, resulting in a model too large to treat; ii.) the parameter-to-error relation
freedom of the space
becomes too complex to be efficiently learned. Thus we extract the spatial coordinates of the
degrees of freedom of
. Since we know the error (the difference between the original snapshots
and the POD predictions) in any of these coordinates, we can arrange the data in the format
R
where i = 1, . . . , n and j = 1, . . . , N , to isolate
(xi, μj, r(μj)i)
{
}
the spatial and parametric dependency of the error. We can use such a dataset to learn the scalar
error rnet : Rd
R given the parametric and spatial coordinates. In this way, the network
maintains a limited number of output dimensions, improving the identification of spatial recurrent
patterns. The loss function which is minimized during the training procedure is then:
P, r(μj)i
Rd, μj
∈ V ⊂
→
xi
×
∈
∈
P
V
|
=
L
1
N
N
(cid:88)
i=1
rNN(μi) + uPOD(μi)
∥
−
u(μi)
∥
2,
(2)
where rNN(μ) is not the high-dimensional output of a single network evaluation, but the array
containing the result of the network inference for any spatial coordinates belonging to the dis-
Rd for
cretized space such that rNN(μ)
rnet(xn, μ)(cid:3), where xi
(cid:2)rnet(x1, μ)
rnet(x2, μ)
. . .
∈
≡
3
i = 1, . . . , n. In the case of gappy POD, it is important to note that the DeepONet takes as input
the sensors data and not the actual parameters. We emphasize that the DeepONet training does
not need any additional high-fidelity solutions besides those already collected for the POD space
construction.
Figure 1: Scheme for the multi-fidelity POD framework. The arrows indicate the relationship
between the different methods. In the blue box the dashed arrows indicate the online phase when
the input parameter is provided. In the purple box the dotted arrows indicate the information flow
if only sensor data are provided. The central red frame emphasizes the computationally expensive
offline phase.
For the prediction of solutions for new parameters, the non-intrusive POD model and the
DeepONet are finally queried, as sketched in Figure 1. POD returns the low-fidelity (linear)
approximation by providing the test parameter or sensor data, while the neural network returns the
nonlinear residual. In some sense, this pipeline aims to exploit the advantages of the consolidated
POD model, but at the same time improves it by adding a nonlinear term. So it can be also seen
as a closure model.
2.1 Proper Orthogonal Decomposition for low-fidelity modeling
POD is a consolidated technique widely used for model order reduction. In this section, we briefly
introduce how to compute the POD modes, and we devote section 2.1.1 to present the gappy POD
variant in detail.
The method consists of the computation of the optimal reduced basis to represent the para-
Rn be the discrete solution corre-
Rn×N be the snapshots matrix, whose
metric solution manifold through a linear projection. Let ui
sponding to the i-th parameter, and U = [u1, . . . , uN ]
columns are the solution vectors. We want to find a linear approximation such that:
∈
∈
ui
≈
r
(cid:88)
k=1
ak
i ψk,
for r
≪
n, and for i = 1, . . . , N,
(3)
∈
∈
Rn are the vectors comprising the reduced basis, the so-called modes, and ai
(cid:1)
i , . . . , ar
i
where ψi
:=
(cid:0)a1
Rr are the coordinates of the corresponding solution at the reduced level, called
i , a2
modal coefficients or latent variables. These reduced variables are obtained by a projection of the
solution snapshots onto the modes.
The POD modes can be obtained from the matrix U in different ways: by computing its singular
value decomposition (SVD), or by decomposing its correlation matrix [72]. Moreover, all the modes
have a corresponding singular value, which represents their energetic contribution. By arranging
these modes in decreasing order (with respect to the singular values), we can express the original
system with a hierarchical basis, from which we can discard the less meaningful modes. The energy
4
GAPPY PODLOW-FIDELITYDATABASERESIDUAL LEARNINGSENSORS DATAPREDICTIONHIGH-FIDELITYDATABASEPOD WITH INTERPOLATIONINPUT PARAMETERPREDICTIONDEEPONET INFERENCEDEEPONET INFERENCEonlinesensor dataonlineofflinecriterion based on the singluar values decay reads as
(cid:80)r
j=1 σj
j=1 σj
(cid:80)N
> ε,
(4)
10−1. In other words,
where σj is the j-th singular value, and ε is a tolerance, usally set
by providing some samples of the solution manifold, POD is able to detect correlations between
the data and reduce the dimensionality of these discrete solutions. This the approach becomes
a fundamental tool for solving parametric partial differential equations (PDEs) in a many-query
context, mainly due to the high-dimensional discrete spaces involved.
9.9
×
≥
: P
Rr such that
The POD space can be exploited in a Galerkin framework, by projecting the differential oper-
ators, or in a data-driven fashion by coupling it with an interpolation (or regression) technique.
N
i=1 is used as input to build the mapping
In this case, the database of reduced snapshots
(μi) = ai for i = 1, . . . , N , which is used for interpolating the modal
I
coefficients for any new parameter. Depending on the chosen regression technique, the equality
ai. Finally, exploiting such a mapping, we
could not hold in principle, and we have
have the possibility to query for the modal coefficients at any test parameter belonging to the
space P and finally exploit the POD modes to map back the approximated solution in the original
high-dimensional space.
μi, ai
(μi)
→
≈
I
I
}
{
2.1.1 Gappy POD for sensors data
The main assumption for using gappy POD is to have access to only some sensor data. These
sensors are placed at specific locations, given by the projection matrix, or point measurement
matrix, C
n, which contains 1 at measurements location and 0 elsewhere. Using
the canonical basis vectors of Rn it takes the following form
Rc×n, with c
≪
∈
C = (cid:2)eγ1
eγ2
(cid:3)T
,
eγc
* * *
for some indices γi
state vector u∗
[1, . . . , n], with i
Rn are thus given by
∈
∈
[1, . . . , c]. The measurements ̃u∗
∈
̃u∗ = Cu∗.
(5)
Rc of a generic full
∈
(6)
If we now consider a parametric framework we can collect the parameter–solution snapshot
Rn is the corresponding full state. We arrange the
Rp, and ui
μi, ui
P
pairs
∈
snapshots by column in U as
N
i=1, where μi
}
{
⊂
∈
U =
|
|
u1 u2
|
|
. . . uN
.
(7)
|
We take the r-rank SVD of the snapshots matrix U and compute the POD modes Ψr, so we can
project the full states to their low-rank representation a
Rr×N :
|
|
|
U = ΨΣV T
ΨrΣrV T
r ,
≈
U
≈
Ψra.
(8)
∈
In the classical POD setting, where we deal with the full snapshots, we would just use the modal
coefficients matrix a to describe the solution manifold. For the gappy POD, instead, we have to
consider the point measurement matrix. So, putting all together we have
where ̃U is the matrix containing the sensors measurements
̃ui
{
for the snapshots matrix. For a generic snapshot ̃ui we have:
̃U
≈
(CΨr)a,
(9)
N
i=1 arranged by columns, as done
}
(10)
̃ui
C
≈
r
(cid:88)
k=1
ak
i ψk,
where ψk are the columns of Ψr, and ak
i are the modal coefficients, that is the i-th column of a. A
possible solution to find the modal coefficients is to minimize the residual in a least-squares sense
using the L2 norm over the sensors locations which means considering the following quantity [15]
(cid:90)
supp[ ̃ui]
(cid:32)
̃ui
−
r
(cid:88)
k=1
(cid:33)2
̃ak
i ψk
.
5
(11)
There are many ways in the literature to select the locations of the sensors: optimal sensor
locations that improve the condition number of CΨ [75, 47], which are robust to sensor noise, the
sample maximal variance positions [77], or using information contained in secant vectors between
data points [55], for example.
In this work, we are going to use the sparse sensor placement
optimization for reconstruction described in details in [47] and implemented in PySensors [21].
The main idea is to find C that minimizes the reconstruction error using the modes Ψr as in the
following
C ∗ = argmin
U
∥
−
C
Ψr(CΨr)† ̃U
2
2,
∥
(12)
where the symbol
†
stands for the Moore-Penrose pseudoinverse.
2.2 DeepONet for residual learning
DeepONet [44] is a neural network architecture able to learn nonlinear operators. Referring to
the original work for all the details, we emphasize its architecture composed by two separate
networks whose final outputs are multiplied to obtain the final DeepONet outcome. The two
networks, called trunk and branch, can be any available architecture - e.g. convolutional network,
graph network -.
In this work we consider feedforward networks (FFNs). The networks are
trained simultaneously during the learning loop: the input is indeed divided into two independent
RNy , which feed the two networks N Nx and N Ny, respectively.
RNx and y
components, x
∈
RNp are finally multiplied to approximate the operator
The outputs N Nx(x), N Ny(y)
∈
∈
G
:
(x)(y)
G
p
(cid:88)
≈
i=1
[N Nx(x)]i[N Ny(y)]i.
(13)
We underline that the choice of the two networks must satisfy the dimensional constraint: they have
to produce outputs with the same number of components such that it is possible to compute their
inner product. The scheme in Figure 2 graphically summarizes the structure of the DeepONet.
Figure 2: The DeepONet scheme.
In this work we adopt it to approximate the residual
uPOD(x, μ) in a multi-
fidelity approach. We can think at the mapping between the low-fidelity model (the POD/gappy
(x)(μ). This operator is numerically
POD) and the high-fidelity model as a parametric operator
approximated by means of the DeepONet, using as dataset the low- and high-fidelity databases
already computed. This architecture has demonstrated a great capability in fighting overfitting
issues [44], allowing to generalize the residual even with a limited set of information.
(x)(μ) = u(x, μ)
R
R
−
3 Numerical results
In this section we present the numerical results obtained by applying the proposed numerical
framework to a simple algebraic problem and to a Navier-Stokes problem in a 2D domain. We
are going to compare the proposed method with the POD model, the gappy POD model, and
with the pure deep learning approach by using DeepONet, aiming for a fair comparison with two
state-of-the-art techniques for (linear and nonlinear) data-driven modeling. All the computations
are performed using PyTorch [57] for the artificial neural networks, EZyRB [23] for the POD with
interpolation and gappy POD calculations. To solve the Navier-Stokes equations with the finite
element method we use FEniCS [43].
6
3.1 Algebraic parametric problem
The first test case is a simple benchmark problem inspired by [6]. The high-fidelity parametric
function f H : Ω
R is defined as
P
×
→
f H (x; μ) :=
1
2
(μ1x
−
2)2 sin(12x
−
4) + sin(μ2 cos(5x)),
(14)
Ω = [0, 1]
R2. The first step is to
where x
∈
compute the function value in some points in order to build the high-fidelity database. We use
different sampling strategies for the spatial and parametric domain:
R, and μ = (μ1, μ2)
P = [2, 15]
[3, 20]
×
⊂
⊂
∈
• we collect n = 500 equispaced samples
xs
i }
{
n
i=1 in Ω;
• we collect 36 samples using the latin hypercube sampling, plus 4 additional samples at the
corners of the domain, for a total of N = 40 points
μs
i }
{
N
i=1 in P .
We thus compose the snapshots matrix, varying the parametric coordinates along the columns as
follows:
f (xs
1, μs
1)
...
n, μs
f (xs
1)
. . .
. . .
. . .
f (xs
f (xs
N )
1, μs
...
n, μs
N )
Rn×N .
∈
(15)
×
−
Regarding the residual learning, we use the DeepONet model structured as follows: the spatial
network (branch) is composed by 2 inner layers of 30 neurons each, with the softplus activation
function, which is the smooth version of the Rectifier Linear Unit (ReLU) [32]; the parametric
network (trunk) counts 2 inner layers with 30 neurons and the softplus function. The output layer
has 30 neurons for both networks, without applying any additional function at this layer. The
learning rate is equal to 5
regularization factor is 1
10−3, the L2
10−4.
We propose a comparison between the MF approach, POD, and DeepONet in terms of accuracy
on test parameters with a fixed input database of solutions. We use different POD spaces in
the comparison by selecting an increasing energetic threshold for the modes selection, aiming to
analyze the difference in the error by varying the accuracy of the original POD model before getting
improved by MFDeepONet1. We emphasize that no preprocessing or data centering is performed
on the snapshots matrix, resulting in the first mode representing a large amount of energy. This
corresponds to the minimal tolerance (0.99) in the experiments below. Regarding the DeepONet
architecture, we employ the one described above also to learn the target function without the MF
setting, such that the network learns the actual unknown field instead of the residual.
In this
way, we want to investigate the benefit of using the two methodologies (POD and DeepONet) in
a multi-fidelity fashion instead of only separately. We measure the relative error on an equispaced
grid of 20
20 parametric points.
×
×
×
POD with energy threshold 0.99. For the POD model, we select an energy threshold ε =
10−1 corresponding to N = 1 mode and radial basis function (RBF) interpolation to ap-
9.9
proximate the map between the parameters and the latent variables. The training for DeepONet
104 epochs. Figure 3 shows a quantitative comparison of the
and MFDeepONet lasts 1.0000
three investigated techniques, presenting the relative error in the whole parametric domain, the
high-fidelity samples, and the error distribution. The last plot (bottom right corner) graphically
shows the technique which best performs in all the tested parameters.
×
In this experiment, the proposed methodology outperforms both POD and DeepONet. The
relative error distribution suggests that mixing the techniques helps in terms of accuracy. Indeed,
even if the error shows a greater variance, the MFDeepONet is able on average to achieve the best
precision among the tested methods, resulting the better approach in almost all the parametric
domain. We can also note that a direct correlation between the samples location and the error
distribution is not visible, confirming the DeepONet capabilities in terms of generalization and
making the proposed framework effective also during the testing phase.
1For the remaining of this work, with MFDeepONet we are going to refer to the proposed technique.
7
Figure 3: Comparison between POD (0.99 energy threshold), DeepONet, and multi-fidelity Deep-
ONet. From top to bottom, we have the relative error in the parametric domain, the location of
the high-fidelity samples in the parametric domain, the relative error distribution, and the best
performers.
Figure 4 illustrates the error obtained after a 2.0000
POD with energy threshold 0.999.
In this experiment, we replicate the previous settings
with the exception of the new energy threshold for POD modes and a higher number of epochs for
10−1
the machine learning models (DeepONet and MFDeepONet). Here we increase it to ε = 9.99
(N = 6 modes), addressing a more accurate original model, and balancing it with longer training.
104 epochs training. The results of the
previous experiments are confirmed, even if with a lower overall benefit. The error distribution in
the parametric space illustrates again how the MF enhancement combines the original methods:
the regions of the parametric space where the methods work better are merged using MFDeepONet,
resulting in a globally more accurate model. However, using a more precise POD model (as low-
fidelity) reduces the benefits of the MF approach, even with the higher number of epochs.
×
×
Gappy POD. Here we propose the same experiments as before, this time in a sensor data
scenario. Here we use 5 sensor locations and a rank truncation equal to 10. The involved neural
networks are trained in this case for 5.0000
104 epochs.
Figure 5 summarizes the accuracy of the three tested methods, which are gappy POD, Deep-
ONet, and MFDeepONet. The error distribution demonstrates that the multi-fidelity approach
performs statistically better than the other methods. Looking at the competition between the
techniques, we can also note that the multi-fidelity approach reaches the best accuracy in almost
the whole parametric domain, even if at the boundaries there is a precision decrease. Such an issue
could be mitigated by exploiting a better sampling strategy for the high-fidelity data.
×
The plots in Figure 6 provide the comparison in the spatial domain at four test parameters.
The statistical results are confirmed in these examples, with the multi-fidelity approach that is able
to predict most of the oscillations that the target function exhibits, contrarily to the single-fidelity
approaches.
8
51015μ15101520μ2POD51015μ15101520DeepONet51015μ15101520MFDeepONet10−110051015μ15101520μ2Samples10−1100RelativeerrorErrordistribution51015μ15101520μ2BestperformerPODDeepONetMFDeepONetFigure 4: Comparison between POD (0.999 energy threshold), DeepONet, and multi-fidelity Deep-
ONet. From top to bottom, we have the relative error in the parametric domain, the location of
the high-fidelity samples in the parametric domain, the relative error distribution, and the best
performers.
3.2 Navier Stokes problem
In the second numerical experiment, we test the accuracy of the proposed method for solving
a parametric nonlinear PDE: the incompressible Navier-Stokes equation on a 2D domain. The
numerical setting is inspired by [5].
R2 and the parametric scalar field p :
We define the parametric vector field u : Ω
P
R such that:
P
×
→
Ω
×
→
ν∆u + (u
* ∇
)u +
p = 0
∇
u = 0
∇ *
u = μ(cid:8) 1
u = 0
pn = 0
2.25 (x1
2)(5
−
−
x1), 0(cid:9)
in Ω,
in Ω,
on Γin,
on Γwall,
on Γout,
(16)
∈
Ω
⊂
where x = (x0, x1)
P = [1, 80]. The L-shape spatial domain Ω, together with
the boundaries, is sketched in Figure 7. For this test case, the parametric solution is computed
numerically by means of finite element discretization. The spatial domain has been tessellated
into 1639 non-overlapping elements, and for stability we apply the Taylor-Hood P 2
P 1 scheme.
The high-fidelity dataset is composed of 20 equispaced parametric samples in P , arranged in the
snapshots matrix U
Rn×N with N = 20 and n = 1639.
−
∈
The DeepONet structure for this problem is the following:
∈
• the spatial network (branch) is composed by 3 hidden layers of 50 neurons each;
• the parameter network (trunk) is composed by 3 hidden layers of 20 neurons each.
Also in this case, the last layer of the networks has the same number of neurons, 20. The activation
function used in all the hidden layers is the Parametric ReLU (PReLU) [36], with the learning rate
10−3. The learning phase lasted
equal to 3
regularization factor equal to 1
10−3 and the L2
×
−
×
9
ν ∂u
∂n −
R2 and μ
51015μ15101520μ2POD51015μ15101520DeepONet51015μ15101520MFDeepONet10−210−110051015μ15101520μ2Samples10−210−1100RelativeerrorErrordistribution51015μ15101520μ2BestperformerPODDeepONetMFDeepONetFigure 5: Comparison between gappy POD, DeepONet, and multi-fidelity DeepONet. From top
to bottom, we have the relative error in the parametric domain, the location of the high-fidelity
samples in the parametric domain, the relative error distribution, and the best performers.
×
104 epochs. The accuracy of the MF approach is compared to the gappy POD and to the
2.5
standard DeepONet, with the same architecture (single-fidelity). The relative error is evaluated
over 500 testing points, randomly sampled in the parametric space.
POD with energy threshold 0.99. As before, we start with a relatively poor POD model,
using N = 1 mode selected by the energetic criterion. RBF is employed also here to approximate
104 for the
the solution manifold at the reduced level. The number of epochs is fixed at 1.0000
deep learning training.
×
Figure 8 shows the plot of the mean relative error over the spatial domain for all the test
parameters, reporting also the location of the samples in the parameter space. As for the previous
experiment, the proposed technique is able to keep a higher precision in the entire domain, without
showing a visible correlation between the location of the high-fidelity data and the error trend,
demonstrating its robustness in terms of possible overfitting. Employing the DeepONet architecture
to learn the residual (between the POD and high-fidelity models) rather than the target function
results in a more efficient learning procedure, capable to ourperform the single-fidelity approaches
in the entire parametric space here considered.
×
POD with energy threshold 0.999. As for the previous test case, we repeat the same ex-
periment with a more accurate POD model. Here we use N = 3, raising the training time to
2.0000
104 epochs.
The trend showed in the previous investigations is confirmed, as depicted in Figure 9. The
MFDeepONet method is able to produce a more accurate prediction in all the testing points,
with no visible correlation with the training data. For a fair comparison, we also investigated the
predicted field in the only point of the parametric domain where the MFDeepONet shows a slightly
higher error with respect to the POD model (whereas the standard DeepONet performs poorly
there).
10
51015μ15101520μ2GappyPOD51015μ15101520DeepONet51015μ15101520MFDeepONet10−210−110051015μ15101520μ2Samples10−210−1100RelativeerrorErrordistribution51015μ15101520μ2BestperformerGappyPODDeepONetMFDeepONetFigure 6: Examples of prediction using gappy POD, DeepONet and multi-fidelity DeepONet at
different test parameters. Top left: μ = [4, 8]. Top right: μ = [3, 16]. Bottom left: μ = [5, 18].
Bottom right: μ = [8, 11].
Figure 7: Domain description.
Figure 10 shows the x-component of the velocity field for the parameter μ = 69.12 obtained by
the three methods, with a statistical summary of the relative error. The MF approach shows here
a smaller spatial variance, even if on average performs equally to the POD model. Looking instead
at a different parametric coordinate (Figure 11), the benefits of the proposed approach become
clear. The considerations regarding the variance of the error are still valid, but the solution for
μ = 39.95 shows a remarkable improvement in the accuracy over the testing points.
Gappy POD. The last numerical experiment focuses on the Navier-Stokes model, for which
sensor data are used by the gappy POD for the low-fidelity approximation. Here we use 7 sensor
locations and a rank truncation equal to 8. We trained the DeepONet and the MFDeepONet for
5.0000
104 epochs.
Figure 12 reports the relative test error measured in all the test points.
In this case, the
×
Figure 8: Comparison between POD (0.99 energy threshold), DeepONet, and multi-fidelity Deep-
ONet in terms of relative error in the parametric domain. The vertical dotted lines indicate the
location of the high-fidelity samples.
11
0.00.20.40.60.81.0x−202f(x)MFDeepONetDeepONetGappyPODTruthhigh0.00.20.40.60.81.0x−2−101f(x)MFDeepONetDeepONetGappyPODTruthhigh0.00.20.40.60.81.0x−2024f(x)MFDeepONetDeepONetGappyPODTruthhigh0.00.20.40.60.81.0x−505101520f(x)MFDeepONetDeepONetGappyPODTruthhigh01020304050607080μ10−210−1RelativeErrorPODDeepONetMFDeepONetsamplesFigure 9: Comparison between POD (0.999 energy threshold), DeepONet, and multi-fidelity Deep-
ONet in terms of relative error in the parametric domain. The vertical dotted lines indicate the
location of the high-fidelity samples. The 2 dashed vertical lines indicate the test parameters rep-
resented in Figures 10 and 11.
Figure 10: Representation over the spatial domain of the velocity (along x) in the Navier-Stokes
testcase for μ = 69.12. The approximation computed by POD (0.999 energy threshold), Deep-
ONet, and multi-fidelity DeepONet is shown at the bottom together with the relative error. The
distribution of the error is summarized in the box plot.
standard DeepONet, is able to outperform the POD model in a large region of the parametric
10−2. Gappy POD is able to reach the best
domain, with a relative error that remains close to 1
precision in a few test points, but also here the MF approach is the best compromise in terms of
global accuracy, even if it is actually less precise than the POD model for high parameter values
(μ > 70).
×
3.3 Summary discussion
This section is devoted to a summary discussion of the results obtained in the numerical investiga-
tions. For a fair comparison, we computed the mean relative test error2 for each method, reporting
the accuracy for different neural networks training times. In addition to the previous tests, we
show in Table 1 the results obtained by employing a POD space whose modes are selected with
10−1. The error charts for the missing cases, as well as
an energetic threshold of ε = 9.999
some graphical representations of the parametric solutions, are reported in Appendix 4. The latter
experiment aims to analyze the final accuracy when the low-fidelity POD is even more precise:
the Mf approach is able to reach the best mean relative error, but its effectiveness is marginal,
confirming the trend already defined in the previous tests. The combination of the POD model
and DeepONet in the cascade fashion is able to reach the best accuracy in almost all the cases,
×
2We recall the test error is computed over a 20 × 20 regular grid for the algebraic problem, and at 460 random
sample for the Navier-Stokes problem.
12
01020304050607080μ10−310−210−1RelativeErrorPODDeepONetMFDeepONetsamplestestpoints05101520x024yVelocityalongx(μ=69.12)10110010−110−210−310−410−510−610−7RelativeerrorPODDeepONetMFDeepONet024yPOD01020x024y024DeepOnet01020x024024MFDeepOnet01020x024−10.003.3316.6730.0043.3356.6770.00−10622385470−51127435975−106223854700.000.060.130.004.088.160.000.040.08Figure 11: Representation over the spatial domain of the velocity (along x) in the Navier-Stokes
testcase for μ = 39.95. The approximation computed by POD (0.999 energy threshold), Deep-
ONet, and multi-fidelity DeepONet is shown at the bottom together with the relative error. The
distribution of the error is summarized in the box plot.
Figure 12: Comparison between gappy POD, DeepONet, and multi-fidelity DeepONet in terms
of relative error in the parametric domain. The vertical dotted lines indicate the location of the
high-fidelity samples.
but its improvement becomes marginal when the POD has good accuracy. Learning the residual
however does not seem to affect the final outcome in a pejorative way, provided that the DeepONet
is trained for a proper number of epochs. This is for sure a critical issue inherited by deep learning
in general: we can indeed see that a longer training step does not always ensure better accuracy,
producing instead over-fitting. On the practical side, the optimal settings of the network - e.g.
training epochs, number of layers, type of activation function - need to be calibrated with a trial
and error procedure or using more sophisticated approaches such as grid search. This calibration
is out of the scope of this investigation where we want to formalize the novel framework, but surely
sensitivity analysis regarding the hyper-parameters will be explored in future works. The general-
ization of the DeepONet, assisted also by the L2-regularization imposed during the optimization,
is able to improve accuracy over the entire parametric space, without showing a visible correlation
between the location of the high-fidelity snapshots and the relative error spatial distribution.
To conclude, we highlight that the numerical experiments demonstrate a great improvement
when the original POD model lacks accuracy, resulting in a great tool to treat problems where
POD is not able to capture all the fluid characteristics, due to the complexity of the mathematical
model or to the limited number of high-fidelity snapshots.
13
05101520x024yVelocityalongx(μ=27.26)10110010−110−210−310−410−510−610−7RelativeerrorPODDeepONetMFDeepONet024yPOD01020x024y024DeepOnet01020x024024MFDeepOnet01020x024−23813182328−2410162228−4.02.48.815.221.628.0−24101622280.000.240.480.002.404.800.000.120.2401020304050607080μ10−410−2RelativeErrorGappyPODDeepONetMFDeepONetsamplesTable 1: The mean relative error computed in all the experiments. In bold the best results for
each row.
testcase #1
testcase #2
POD rank = 0.99
POD rank = 0.999
POD rank = 0.9999
POD rank = 0.99
POD rank = 0.999
POD rank = 0.9999
POD
0.324
0.203
0.098
0.105
0.033
0.011
10k
0.270
0.270
0.270
0.116
0.116
0.116
DeepONet
20k
50k
MFDeepONet
20k
50k
10k
0.265
0.265
0.265
0.068
0.068
0.068
0.217
0.217
0.217
0.072
0.072
0.072
0.293
0.196
0.093
0.030
0.025
0.011
0.247
0.193
0.104
0.022
0.023
0.009
0.308
0.127
0.178
0.030
0.009
0.009
Gappy POD
testcase #1
testcase #2
0.260
0.135
DeepONet
20k
0.380
0.033
50k
0.278
0.017
10k
0.419
0.035
MFDeepONet
20k
50k
10k
0.218
0.029
0.217
0.010
0.197
0.009
4 Conclusions and future perspectives
In this work, we introduced a novel approach to enhance POD-based reduced order models thanks
to a residual learning procedure by DeepONet. It operates by building from a limited set of data an
initial low-fidelity approximation exploiting established reduced order modeling techniques. Then
it learns the difference between this low-fidelity representation and the original model through the
artificial neural networks, that will be inferred to predict the solution at unseen parameters. We
emphasize that such an enhancement neither needs any additional evaluation of the original model
nor the knowledge of the high-fidelity model, resulting in a generic data-driven improvement at a
fixed computational budget. This framework has demonstrated its effectiveness in two different
testcases: a univariate parametric function and a Navier-Stokes problem on a 2-dimensional do-
main, showing a higher precision in both experiments with respect to the use of single-fidelities.
We highlight that in these experiments the number of considered POD modes is voluntarily kept
small, simulating a POD model with poor accuracy.
The present work illustrates the pipeline for POD and gappy POD for the construction of the
low-fidelity model and the DeepONet architecture for residual learning. Due to its modularity, the
framework is general, admitting in principle to replace the low-fidelity models with different ones.
Possible future extensions should investigate adaptive samplings and sensor placement exploiting
the proposed numerical framework.
Acknowledgements
This work was partially supported by an industrial Ph.D. grant sponsored by Fincantieri S.p.A.
(IRONTH Project), by the MIT-FVG project "Multi-disciplinary Ship Design by Reduced Order
Models and Machine Learning", and partially funded by European Union Funding for Research and
Innovation - Horizon 2020 Program - in the framework of European Research Council Executive
Agency: H2020 ERC CoG 2015 AROMA-CFD project 681447 "Advanced Reduced Order Methods
with Applications in Computational Fluid Dynamics" P.I. Professor Gianluigi Rozza.
Appendix
This section presents additional plots for the POD energy threshold equal to 0.9999 case, for the
algebraic function (Figure 13) and for the parametric Navier-Stokes problem (Figures 14 and 15).
14
Figure 13: Predictions at two different test parameters using gappy POD, DeepONet, and multi-
fidelity DeepONet with different configurations, varying the number of epochs and the POD energy
threshold. The left column shows the results for μ = [4, 8], while in the right one we have μ = [3, 16].
Top row : POD energy threshold equal to 0.99, 10000 epochs. Center row : POD energy threshold
equal to 0.999, 50000 epochs. Bottom row : POD energy threshold equal to 0.9999, 50000 epochs.
Figure 14: Comparison between POD (0.9999 energy threshold), DeepONet, and multi-fidelity
DeepONet. From top to bottom we have the relative error in the parametric domain, the location
of the high-fidelity samples in the parametric domain, the relative error distribution, and the best
performers.
15
0.00.20.40.60.81.0x−2−10123f(x)0.00.20.40.60.81.0x−2−101f(x)0.00.20.40.60.81.0x−2−10123f(x)0.00.20.40.60.81.0x−2−101f(x)0.00.20.40.60.81.0x−2024f(x)MFDeepONetDeepONetPODTruthhigh0.00.20.40.60.81.0x−2−1012f(x)51015μ15101520μ2POD51015μ15101520DeepONet51015μ15101520MFDeepONet10−210−110051015μ15101520μ2Samples10−210−1100RelativeerrorErrordistribution51015μ15101520μ2BestperformerPODDeepONetMFDeepONetFigure 15: Comparison between POD (0.9999 energy threshold), DeepONet, and multi-fidelity
DeepONet in terms of relative error in the parametric domain. The vertical dotted lines indicate
the location of the high-fidelity samples.
References
[1] R. J. Adrian. On the role of conditional averages in turbulence theory. In J. L. Zakin and
G. K. Patterson, editors, Turbulence in Liquids: Proceedings of the 4th Biennial Symposium
on Turbulence in Liquids, pages 323–332. University of Missouri–Rolla, 1975.
[2] A. Alla and J. N. Kutz. Nonlinear model order reduction via dynamic mode decomposition.
SIAM Journal on Scientific Computing, 39(5):B778–B796, 2017. doi:10.1137/16M105930.
[3] D. Amsallem, M. Zahr, Y. Choi, and C. Farhat. Design optimization using hyper-reduced-
order models. Structural and Multidisciplinary Optimization, 51(4):919–940, 2015. doi:10.
1007/s00158-014-1183-y.
[4] D. Amsallem, M. J. Zahr, and C. Farhat. Nonlinear model order reduction based on local
reduced-order bases. International Journal for Numerical Methods in Engineering, 92(10):891–
916, 2012. doi:10.1002/nme.4371.
[5] F. Ballarin, A. Manzoni, A. Quarteroni, and G. Rozza. Supremizer stabilization of POD–
Galerkin approximation of parametrized steady incompressible Navier–Stokes equations. In-
ternational Journal for Numerical Methods in Engineering, 102(5):1136–1161, 2015. doi:
10.1002/nme.4772.
[6] T. Benamara, P. Breitkopf, I. Lepot, and C. Sainvitu. Multi-fidelity extension to non-
intrusive proper orthogonal decomposition based surrogates. In Proceedings of the VII Euro-
pean Congress on Computational Methods in Applied Sciences and Engineering (ECCOMAS
Congress 2016), pages 4129–4145, 2016.
[7] P. Benner, S. Grivet-Talocia, A. Quarteroni, G. Rozza, W. H. A. Schilders, and L. M. Silveira,
editors. Volume 1: System- and Data-Driven Methods and Algorithms. De Gruyter, Berlin,
Boston, 2021. doi:10.1515/9783110498967.
[8] P. Benner, S. Grivet-Talocia, A. Quarteroni, G. Rozza, W. H. A. Schilders, and L. M. Silveira,
editors. Volume 2: Snapshot-Based Methods and Algorithms. De Gruyter, Berlin, Boston,
2021. doi:10.1515/9783110671490.
[9] P. Benner, S. Grivet-Talocia, A. Quarteroni, G. Rozza, W. H. A. Schilders, and L. M.
doi:
Silveira, editors. Volume 3: Applications. De Gruyter, Berlin, Boston, 2021.
10.1515/9783110499001.
[10] P. Benner, M. Ohlberger, A. Patera, G. Rozza, and K. Urban. Model Reduction of
Parametrized Systems, volume 17 of MS&A series. Springer, 2017.
[11] P. Benner, E. Sachs, and S. Volkwein. Model order reduction for PDE constrained optimiza-
tion. Trends in PDE constrained optimization, pages 303–326, 2014.
[12] L. Bonfiglio, P. Perdikaris, S. Brizzolara, and G. Karniadakis. Multi-fidelity optimization
of super-cavitating hydrofoils. Computer Methods in Applied Mechanics and Engineering,
332:63–85, 2018. doi:10.1016/j.cma.2017.12.009.
16
01020304050607080μ10−310−210−1RelativeErrorPODDeepONetMFDeepONetsamples[13] L. Bonfiglio, P. Perdikaris, G. Vernengo, J. S. de Medeiros, and G. Karniadakis. Improving
SWATH Seakeeping Performance using Multi-Fidelity Gaussian Process and Bayesian Opti-
mization. Journal of Ship Research, 62(4):223–240, 2018. doi:10.5957/JOSR.11170069.
[14] I. Bright, G. Lin, and J. N. Kutz. Compressive sensing based machine learning strategy for
characterizing the flow around a cylinder with limited pressure measurements. Physics of
Fluids, 25(12):127102, 2013. doi:10.1063/1.4836815.
[15] S. L. Brunton and J. N. Kutz. Data-Driven Science and Engineering: Machine Learning,
Dynamical Systems, and Control. Cambridge University Press, 2019.
[16] S. L. Brunton, J. H. Tu, I. Bright, and J. N. Kutz. Compressive sensing and low-rank libraries
for classification of bifurcation regimes in nonlinear dynamical systems. SIAM Journal on
Applied Dynamical Systems, 13(4):1716–1732, 2014. doi:10.1137/130949282.
[17] T. Bui-Thanh, M. Damodaran, and K. Willcox. Aerodynamic data reconstruction and inverse
design using proper orthogonal decomposition. AIAA journal, 42(8):1505–1516, 2004. doi:
10.2514/1.2159.
[18] G. Carere, M. Strazzullo, F. Ballarin, G. Rozza, and R. Stevenson. A weighted POD-reduction
approach for parametrized PDE-constrained optimal control problems with random inputs
and applications to environmental sciences. Computers & Mathematics with Applications,
102:261–276, 2021.
[19] F. Chinesta, A. Huerta, G. Rozza, and K. Willcox. Model reduction methods. In E. Stein,
R. de Borst, and T. J. R. Hughes, editors, Encyclopedia of Computational Mechanics, Second
Edition, pages 1–36. John Wiley & Sons, Ltd., 2017.
[20] E. Cueto, F. Chinesta, and A. Huerta. Model order reduction based on proper orthogonal
decomposition. Separated Representations and PGD-Based Model Reduction: Fundamentals
and Applications, pages 1–26, 2014.
[21] B. M. de Silva, K. Manohar, E. Clark, B. W. Brunton, J. N. Kutz, and S. L. Brunton.
PySensors: A Python package for sparse sensor placement. Journal of Open Source Software,
6(58):2828, 2021. doi:10.21105/joss.02828.
[22] N. Demo, M. Tezzele, A. Mola, and G. Rozza. Hull Shape Design Optimization with Parameter
Space and Model Reductions, and Self-Learning Mesh Morphing. Journal of Marine Science
and Engineering, 9(2):185, 2021. doi:10.3390/jmse9020185.
[23] N. Demo, M. Tezzele, and G. Rozza. EZyRB: Easy Reduced Basis method. The Journal of
Open Source Software, 3(24):661, 2018. doi:10.21105/joss.00661.
[24] N. Demo, M. Tezzele, and G. Rozza. A non-intrusive approach for reconstruction of POD
modal coefficients through active subspaces. Comptes Rendus M ́ecanique de l'Acad ́emie des
Sciences, 347(11):873–881, November 2019. doi:10.1016/j.crme.2019.11.012.
[25] N. Demo, M. Tezzele, and G. Rozza. A Supervised Learning Approach Involving Active
Subspaces for an Efficient Genetic Algorithm in High-Dimensional Optimization Problems.
SIAM Journal on Scientific Computing, 43(3):B831–B853, 2021. doi:10.1137/20M1345219.
[26] R. Everson and L. Sirovich. Karhunen–Lo`eve procedure for gappy data. JOSA A, 12(8):1657–
1664, 1995. doi:10.1364/JOSAA.12.001657.
[27] I.-G. Farcas, B. Peherstorfer, T. Neckel, F. Jenko, and H.-J. Bungartz. Context-aware learning
of hierarchies of low-fidelity models for multi-fidelity uncertainty quantification. arXiv preprint
arXiv:2211.10835, 2022.
[28] A. I. Forrester, A. S ́obester, and A. J. Keane. Multi-fidelity optimization via surrogate mod-
elling. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences,
463(2088):3251–3269, 2007. doi:10.1098/rspa.2007.1900.
[29] M. Gadalla, M. Cianferra, M. Tezzele, G. Stabile, A. Mola, and G. Rozza. On the comparison
of LES data-driven reduced order approaches for hydroacoustic analysis. Computers & Fluids,
216:104819, 2021. doi:10.1016/j.compfluid.2020.104819.
17
[30] R. Geelen, S. Wright, and K. Willcox. Operator inference for non-intrusive model reduc-
tion with quadratic manifolds. Computer Methods in Applied Mechanics and Engineering,
403:115717, 2023. doi:10.1016/j.cma.2022.115717.
[31] O. Ghattas and K. Willcox. Learning physics-based models from data: perspectives from
inverse problems and model reduction. Acta Numerica, 30:445–554, 2021. doi:10.1017/
S0962492921000064.
[32] X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In Proceedings of
the fourteenth international conference on artificial intelligence and statistics, pages 315–323.
JMLR Workshop and Conference Proceedings, 2011.
[33] M. Guo, A. Manzoni, M. Amendt, P. Conti, and J. S. Hesthaven. Multi-fidelity regression using
artificial neural networks: Efficient approximation of parameter-dependent output quantities.
Computer Methods in Applied Mechanics and Engineering, 389:114378, 2022. doi:10.1016/
j.cma.2021.114378.
[34] J. Hart and B. v. B. Waanders. Hyper-differential sensitivity analysis with respect to model
discrepancy: Calibration and optimal solution updating. arXiv preprint arXiv:2210.09044,
2022.
[35] J. Hart and B. v. B. Waanders. Hyper-differential sensitivity analysis with respect to model
discrepancy: mathematics and computation. arXiv preprint arXiv:2210.09037, 2022.
[36] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level
performance on imagenet classification. In Proceedings of the IEEE international conference
on computer vision, pages 1026–1034, 2015.
[37] A. A. Howard, M. Perego, G. E. Karniadakis, and P. Stinis. Multifidelity deep operator
networks. arXiv preprint arXiv:2204.09157, 2022.
[38] A. Ivagnes, N. Demo, and G. Rozza. Towards a machine learning pipeline in reduced order
modelling for inverse problems: neural networks for boundary parametrization, dimensionality
reduction and solution manifold approximation. arXiv preprint arXiv:2210.14764, 2022.
[39] B. Kramer and K. E. Willcox. Nonlinear model order reduction via lifting transformations
and proper orthogonal decomposition. AIAA Journal, 57(6):2297–2307, 2019. doi:10.2514/
1.J057791.
[40] J. N. Kutz, S. Sargsyan, and S. L. Brunton. Leveraging sparsity and compressive sensing
for reduced order modeling. In P. Benner, M. Ohlberger, A. Patera, G. Rozza, and K. Ur-
ban, editors, Model Reduction of Parametrized Systems, volume 17 of MS&A, pages 301–315.
Springer, Cham, 2017. doi:10.1007/978-3-319-58786-8\_19.
[41] G. Lin, C. Moya, and Z. Zhang. B-deeponet: An enhanced bayesian deeponet for solving noisy
parametric pdes using accelerated replica exchange sgld. Journal of Computational Physics,
473:111713, 2023.
[42] C. Little and C. Farhat. Nonlinear Projection-Based Model Order Reduction in the Presence
In AIAA SCITECH 2023 Forum, 2023. doi:10.2514/6.
of Adaptive Mesh Refinement.
2023-2682.
[43] A. Logg, K.-A. Mardal, and G. Wells. Automated solution of differential equations by the finite
element method: The FEniCS book, volume 84. Springer Science & Business Media, 2012.
[44] L. Lu, P. Jin, G. Pang, Z. Zhang, and G. E. Karniadakis. Learning nonlinear operators
via deeponet based on the universal approximation theorem of operators. Nature Machine
Intelligence, 3(3):218–229, 2021.
[45] L. Lu, R. Pestourie, S. G. Johnson, and G. Romano. Multifidelity deep neural operators
for efficient learning of partial differential equations with application to fast inverse design of
nanoscale heat transport. arXiv preprint arXiv:2204.06684, 2022.
18
[46] L. Mainini and K. Willcox. Surrogate modeling approach to support real-time structural
assessment and decision making. AIAA Journal, 53(6):1612–1626, 2015. doi:10.2514/1.
J053464.
[47] K. Manohar, B. W. Brunton, J. N. Kutz, and S. L. Brunton. Data-driven sparse sensor
placement for reconstruction: Demonstrating the benefits of exploiting known patterns. IEEE
Control Systems Magazine, 38(3):63–86, 2018. doi:10.1109/MCS.2018.2810460.
[48] A. Manzoni, F. Negri, and A. Quarteroni. Dimensionality reduction of parameter-dependent
problems through proper orthogonal decomposition. Annals of Mathematical Sciences and
Applications, 1(2):341–377, 2016.
[49] L. Meneghetti, N. Shah, M. Girfoglio, N. Demo, M. Tezzele, A. Lario, G. Stabile, and
G. Rozza. A Deep Learning Approach to Improving Reduced Order Models. In G. Rozza,
G. Stabile, and F. Ballarin, editors, Advanced Reduced Order Methods and Applications
in Computational Fluid Dynamics, CS&E Series, chapter 20. SIAM Press, 2022.
doi:
10.1137/1.9781611977257.ch20.
[50] X. Meng, H. Babaee, and G. E. Karniadakis. Multi-fidelity Bayesian neural networks: Al-
doi:
Journal of Computational Physics, 438:110361, 2021.
gorithms and applications.
10.1016/j.jcp.2021.110361.
[51] X. Meng and G. E. Karniadakis. A composite neural network that learns from multi-fidelity
data: Application to function approximation and inverse PDE problems. Journal of Compu-
tational Physics, 401:109020, 2020. doi:10.1016/j.jcp.2019.109020.
[52] U. E. Morelli, P. Barral, P. Quintela, G. Rozza, and G. Stabile. A numerical approach for heat
flux estimation in thin slabs continuous casting molds using data assimilation. International
Journal for Numerical Methods in Engineering, 122(17):4541–4574, 2021.
[53] N. J. Nair and A. Goza. Leveraging reduced-order models for state estimation using deep
learning. Journal of Fluid Mechanics, 897, 2020. doi:10.1017/jfm.2020.409.
[54] L. W. Ng and K. E. Willcox. Multifidelity approaches for optimization under uncertainty.
International Journal for numerical methods in Engineering, 100(10):746–772, 2014. doi:
10.1002/nme.4761.
[55] S. E. Otto and C. W. Rowley. Inadequacy of linear methods for minimal sensor placement and
feature selection in nonlinear systems: A new approach using secants. Journal of Nonlinear
Science, 32(5):1–51, 2022. doi:10.1007/s00332-022-09806-9.
[56] D. Papapicco, N. Demo, M. Girfoglio, G. Stabile, and G. Rozza. The neural network shifted-
proper orthogonal decomposition: A machine learning approach for non-linear reduction of
hyperbolic equations. Computer Methods in Applied Mechanics and Engineering, 392:114687,
2022. doi:10.1016/j.cma.2022.114687.
[57] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin,
N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani,
S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala. PyTorch: An Imperative Style,
In Advances in Neural Information Processing
High-Performance Deep Learning Library.
Systems 32, pages 8024–8035. Curran Associates, Inc., 2019.
[58] B. Peherstorfer, K. E. Willcox, and M. Gunzburger. Survey of multifidelity methods in
uncertainty propagation, inference, and optimization. SIAM Review, 60(3):550–591, 2018.
doi:10.1137/16M1082469.
[59] P. Perdikaris, M. Raissi, A. Damianou, N. D. Lawrence, and G. E. Karniadakis. Nonlinear
information fusion algorithms for data-efficient multi-fidelity modelling. Proceedings of the
Royal Society A, 473(2198):20160751, 2017. doi:10.1098/rspa.2016.0751.
[60] F. Pichi, M. Strazzullo, F. Ballarin, and G. Rozza. Finite Element-Based Reduced Basis
Method in Computational Fluid Dynamics. In G. Rozza, G. Stabile, and F. Ballarin, editors,
Advanced Reduced Order Methods and Applications in Computational Fluid Dynamics, CS&E
Series, chapter 2, pages 13–58. SIAM Press, 2022. doi:10.1137/1.9781611977257.ch2.
19
[61] E. Qian, B. Kramer, B. Peherstorfer, and K. Willcox. Lift & learn: Physics-informed ma-
chine learning for large-scale nonlinear dynamical systems. Physica D: Nonlinear Phenomena,
406:132401, 2020. doi:10.1016/j.physd.2020.132401.
[62] M. Raissi, P. Perdikaris, and G. E. Karniadakis. Inferring solutions of differential equations
using noisy multi-fidelity data. Journal of Computational Physics, 335:736–746, 2017. doi:
10.1016/j.jcp.2017.01.060.
[63] J. Reiss, P. Schulze, J. Sesterhenn, and V. Mehrmann. The shifted proper orthogonal de-
composition: A mode decomposition for multiple transport phenomena. SIAM Journal on
Scientific Computing, 40(3):A1322–A1344, 2018.
[64] F. Romor, M. Tezzele, M. Mrosek, C. Othmer, and G. Rozza. Multi-fidelity data fu-
sion through parameter space reduction with applications to automotive engineering. arXiv
preprint arXiv:2110.14396, Submitted, 2021.
[65] G. Rozza, G. Stabile, and F. Ballarin. Advanced Reduced Order Methods and Applications in
Computational Fluid Dynamics. Society for Industrial and Applied Mathematics, Philadel-
phia, PA, 2022. doi:10.1137/1.9781611977257.
[66] O. San and R. Maulik. Neural network closures for nonlinear model order reduction. Advances
in Computational Mathematics, 44:1717–1750, 2018. doi:10.1007/s10444-018-9590-z.
[67] M. Tezzele, N. Demo, G. Stabile, A. Mola, and G. Rozza. Enhancing CFD predictions in shape
design problems by model and parameter space reduction. Advanced Modeling and Simulation
in Engineering Sciences, 7(40), 2020. doi:10.1186/s40323-020-00177-y.
[68] M. Tezzele, N. Demo, G. Stabile, and G. Rozza. Nonintrusive Data-Driven Reduced Order
Models in Computational Fluid Dynamics. In G. Rozza, G. Stabile, and F. Ballarin, editors,
Advanced Reduced Order Methods and Applications in Computational Fluid Dynamics, CS&E
Series, chapter 9. SIAM Press, 2022. doi:10.1137/1.9781611977257.ch9.
[69] M. Tezzele, L. Fabris, M. Sidari, M. Sicchiero, and G. Rozza. A multi-fidelity approach cou-
pling parameter space reduction and non-intrusive POD with application to structural opti-
mization of passenger ship hulls. International Journal for Numerical Methods in Engineering,
124(5):1193–1210, 2023. doi:10.1002/nme.7159.
[70] M. Tezzele, F. Salmoiraghi, A. Mola, and G. Rozza. Dimension reduction in heteroge-
neous parametric spaces with application to naval engineering shape design problems. Ad-
vanced Modeling and Simulation in Engineering Sciences, 5(1):25, Sep 2018. doi:10.1186/
s40323-018-0118-3.
[71] L. Venturi, F. Ballarin, and G. Rozza. A weighted POD method for elliptic PDEs with
doi:10.1007/
Journal of Scientific Computing, 81(1):136–153, 2019.
random inputs.
s10915-018-0830-7.
[72] S. Volkwein. Proper orthogonal decomposition: Theory and reduced-order modelling. Lecture
Notes, University of Konstanz, 4(4):1–29, 2013.
[73] S. Wang, M. A. Bhouri, and P. Perdikaris. Fast PDE-constrained optimization via self-
supervised operator learning. arXiv preprint arXiv:2110.13297, 2021.
[74] Y. Wang, B. Yu, Z. Cao, W. Zou, and G. Yu. A comparative study of pod interpola-
tion and pod projection methods for fast and accurate prediction of heat transfer prob-
lems. International Journal of Heat and Mass Transfer, 55(17-18):4827–4836, 2012. doi:
10.1016/j.ijheatmasstransfer.2012.04.053.
[75] K. Willcox. Unsteady flow sensing and estimation via the gappy proper orthogonal decompo-
sition. Computers & fluids, 35(2):208–226, 2006. doi:10.1016/j.compfluid.2004.11.006.
[76] X. Xie, M. Mohebujjaman, L. G. Rebholz, and T. Iliescu. Data-driven filtered reduced order
modeling of fluid flows. SIAM Journal on Scientific Computing, 40(3):B834–B857, 2018.
doi:10.1137/17M1145136.
20
[77] B. Yildirim, C. Chryssostomidis, and G. Karniadakis. Efficient sensor placement for ocean
measurements using low-dimensional concepts. Ocean Modelling, 27(3-4):160–173, 2009. doi:
10.1016/j.ocemod.2009.01.001.
[78] M. J. Zahr and C. Farhat. Progressive construction of a parametric reduced-order model for
PDE-constrained optimization. International Journal for Numerical Methods in Engineering,
102(5):1111–1135, 2015. doi:10.1002/nme.4770.
[79] X. Zhang, F. Xie, T. Ji, Z. Zhu, and Y. Zheng. Multi-fidelity deep neural network surrogate
model for aerodynamic shape optimization. Computer Methods in Applied Mechanics and
Engineering, 373:113485, 2021. doi:10.1016/j.cma.2020.113485.
21
|
http://arxiv.org/abs/2303.13525v1 | 2023-02-24T14:51:30 | 2023-02-24T14:51:30 | Uncertainty-Aware Workload Prediction in Cloud Computing | Predicting future resource demand in Cloud Computing is essential for
managing Cloud data centres and guaranteeing customers a minimum Quality of
Service (QoS) level. Modelling the uncertainty of future demand improves the
quality of the prediction and reduces the waste due to overallocation. In this
paper, we propose univariate and bivariate Bayesian deep learning models to
predict the distribution of future resource demand and its uncertainty. We
design different training scenarios to train these models, where each procedure
is a different combination of pretraining and fine-tuning steps on multiple
datasets configurations. We also compare the bivariate model to its univariate
counterpart training with one or more datasets to investigate how different
components affect the accuracy of the prediction and impact the QoS. Finally,
we investigate whether our models have transfer learning capabilities.
Extensive experiments show that pretraining with multiple datasets boosts
performances while fine-tuning does not. Our models generalise well on related
but unseen time series, proving transfer learning capabilities. Runtime
performance analysis shows that the models are deployable in real-world
applications. For this study, we preprocessed twelve datasets from real-world
traces in a consistent and detailed way and made them available to facilitate
the research in this field. | [
"Andrea Rossi",
"Andrea Visentin",
"Steven Prestwich",
"Kenneth N. Brown"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2303.13525v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2303.13525v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.DC",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.DC",
"cs.AI",
"cs.LG"
] | 3
2
0
2
b
e
F
4
2
]
C
D
.
s
c
[
1
v
5
2
5
3
1
.
3
0
3
2
:
v
i
X
r
a
Uncertainty-Aware Workload Prediction in Cloud
Computing
Andrea Rossi, Andrea Visentin, Steven Prestwich, and Kenneth N. Brown
1
Abstract-Predicting future resource demand in Cloud Computing is essential for managing Cloud data centres and guaranteeing
customers a minimum Quality of Service (QoS) level. Modelling the uncertainty of future demand improves the quality of the prediction
and reduces the waste due to overallocation. In this paper, we propose univariate and bivariate Bayesian deep learning models to
predict the distribution of future resource demand and its uncertainty. We design different training scenarios to train these models,
where each procedure is a different combination of pretraining and fine-tuning steps on multiple datasets configurations. We also
compare the bivariate model to its univariate counterpart training with one or more datasets to investigate how different components
affect the accuracy of the prediction and impact the QoS. Finally, we investigate whether our models have transfer learning capabilities.
Extensive experiments show that pretraining with multiple datasets boosts performances while fine-tuning does not. Our models
generalise well on related but unseen time series, proving transfer learning capabilities. Runtime performance analysis shows that the
models are deployable in real-world applications. For this study, we preprocessed twelve datasets from real-world traces in a consistent
and detailed way and made them available to facilitate the research in this field.
Index Terms-Bayesian Neural Networks, Cloud Computing, Workload Prediction, Uncertainty, Deep Learning, Transfer Learning.
1 INTRODUCTION
T HE advent of cloud computing services is relatively
new. However, in recent years they have gained enor-
mous popularity because of benefits including reduction
of the cost of the business and increase in productivity
[1]. These advantages gained even more importance during
the COVID-19 pandemic [2], where work from home was
widely adopted. The advances in Artificial Intelligence (AI)
and Big Data have led more companies to use cloud com-
puting systems, increasing their demand. Workload fore-
casting and scheduling play a fundamental role in the cost
of operating the data centres, but predicting the resource
demand is a challenging task [3]. Moreover, data centres
have a high environmental impact. In this regard, the energy
consumption of data centres will grow from 292 TWh in
2016 to 353 TWh in 2030 due to the increase in the number
of users [4] and, if it is left uncontrolled, the greenhouse gas
emission due to ICT technologies might increase over 14%
in 2040, compared to 1-1.6% from 2007 to 2016 [5]. Cloud
computing providers aim to preconfigure the machines to
guarantee a high Quality of Service (QoS). The benefits of
predicting future demand include better resource utilisation
and a reduction of the overallocation with the opportunity
of serving more customers, which leads to an increase in
profit and an overall decrease in energy consumption, CO2
emission and maintenance costs. Machine learning (ML)
and deep learning (DL) approaches have been widely used
to forecast future demand in the cloud environment [6, 7, 8],
with a focus on probabilistic and uncertainty aspects as well
• A. Rossi is with the Centre for Research Training in Artificial Intelligence,
University College Cork, Ireland.
E-mail: [email protected]
• A. Visentin, S. Prestwich and K. N. Brown are with the Insight Centre for
Data Analytics, University College Cork, Ireland.
E-mail: [email protected], {s.prestwich, k.brown}@cs.ucc.ie
(cid:70)
[9, 10].
In this paper, we evaluate the performance of probabilis-
tic forecasts based on Hybrid Bayesian Neural Networks
(HBNNs), built upon our previous work [11]. We consider
bivariate time series to predict processing units and memory
usage simultaneously, training the models using multiple
datasets to increase our model's generalisation capabilities
and analyse the impact of Bayesian components in the net-
work. We assess the performance of the predictive models
using four publicly available datasets from Google Cloud
[12, 13] and Alibaba clusters [14, 15]. We preprocess them to
overcome the inconsistency and often undetailed versions
in the literature for replicability.
Moreover, we investigate the transfer learning (TL) ap-
proach to predict the future workload of traces that are not
part of the training set. To the best of our knowledge, this
is the first time that TL has been applied in the context of
workload prediction in cloud computing.
The contributions in this paper are as follows:
• We preprocess and make available twelve different
datasets of the resource demand divided into win-
dows of 5 minutes from cluster cells of four public
traces from Alibaba and Google Cloud Computing
systems. These are the most used datasets in the
cloud workload computing literature.
• We validate the results by applying the model to
multiple datasets and extending them to variations
of the model, which includes bivariate predictions.
• We provide a comparison of a bivariate model to
the univariate counterpart, training with one or more
traces, showing the importance of the training with
multiple datasets.
• We investigate the generalisation capabilities of the
model with a deep analysis of the training scenarios
in the context of data-driven applications for work-
load prediction in Cloud Computing, focusing on the
TL approach.
• All the investigations are centred on the proba-
bility distribution estimation and modelling of the
uncertainty of the prediction, with a focus on the
epistemic uncertainty and, specifically, the data vari-
ability problem (distributional representation of the
training set).
The remainder of the paper is structured as follows.
Section 2 introduces related work. We describe the baseline
and the proposed models in Section 3. Section 4 presents the
training scenarios that are compared in this paper. Section 5
describes the experiments' methodology and discusses the
proposed methods' results based on real-world load traces
data. Section 6 concludes the paper and discusses the future
works.
2 RELATED WORK
In cloud computing management, workload prediction
plays an important role that has been broadly studied over
the past 20 years. Starting with statistical methods such
as Autoregressive Integrated Moving Average (ARIMA) by
Calherios et al. [16], in the last few years, research has
focused on ML and DL approaches that have been shown to
outperform statistical methods. For this reason, this section
is focused on ML and DL techniques. Some of the work
is centred on prediction at the machine level, others at the
cluster level and design and evaluate models in a wide
variety of datasets for univariate and multivariate forecasts.
A large selection of ML methods has tackled cloud
workload forecasting. Khan et al. [17] combined clustering
algorithms to group Virtual Machines (VMs) with similar
patterns and used Hidden Markov Modelling to forecast
changes in workload patterns. Banerjee et al. [18] proposed a
multi-step-ahead prediction framework composed of a set of
supervised learning approaches such as Linear Regression,
k-Nearest Neighbours, Support Vector Regressor (SVR),
Gradient Boosting and decision tree. The authors applied
a prediction-based VM placement algorithm to minimise
resource utilisation and power consumption. Kim et al. [19]
designed an ensemble model based on eight ML predictors
for an online forecast to reduce the Service Level Agreement
violations. The experiments are run on Google Cloud Trace
2011 and Facebook Hadoop trace.
With the advent of DL, many architectures have been
investigated. Leka et al. [20] implemented a hybrid neu-
ral network with a Convolutional Neural Network (CNN)
followed by a Long Short-Term Memory (LSTM), which
improved the accuracy compared to the single components
alone in a real-world dataset with 12 samples of VMs with
the most common workload patterns. Dang-Quang et al.
[21] proposed a multivariate Bidirectional LSTM (Bi-LSTM),
which improves the accuracy of the prediction w.r.t. the
univariate counterpart using a real trace workload dataset
from the Delft University of Technology called GWA-T-12
Bitbrains. This is due to the strong correlation between the
CPU and HTTP workload traces, which do not hold in our
traces for processing unit and memory demand. Ouhame
et al. [22] proposed a hybrid multivariate CNN and LSTM
2
model which performs better than ARIMA-LSTM, Vector
Autoregressive GRU and Vector Autoregressive Multilayer
Perceptron models on Bitbrains dataset. Huidan Xi et al.
[6] implemented an attention-based LSTM and compare
it with an LSTM without the attention mechanism. They
predicted the CPU workload at the machine level over
three machines on the Alibaba CDC dataset, showing that
attention improves accuracy. Qian et al. [23] evaluated the
performance of an encoder-decoder model based on the
attention mechanism at the machine level over a sample
of 1,024 machines from the Google Cloud trace 2011. They
compared their model to a standard LSTM and an Echo
State Network at different prediction steps, showing that
their model outperformed the baseline. Patel et al. [24]
predicted CPU usage with a hybrid prediction method com-
posed of 1-dimensional convolution (1DConv) and LSTM on
three real-world datasets, Google Cloud trace 2011, Alibaba
2018 and Bitbrains. The first part of the model combines
three different CNN blocks, which capture patterns from
dilated versions of the trace. The model outperformed the
sequential versions of the network with one single CNN
block. Ruan et al. [25] proposed a turning point-based trend
prediction using a cloud feature-enhanced deep learning
model. The model
is based on LSTM components and
applied to real-world datasets by Google Cloud trace 2011.
Karim et al. [26] implemented a multi-step-ahead prediction
model called BHyPreC, which combined a Bi-LSTM on the
top of the stacked LSTM and GRU blocks, outperforming
baselines such as ARIMA, LSTM, GRU and Bi-LSTM. The
authors showed that combining different RNN components
enhances the accuracy of CPU workload prediction.
Combining the architectures mentioned above to build
ensemble models has also become trendy in cloud workload
prediction. This is because different models can capture
various aspects of the trace to improve the accuracy of
the forecast. Valarmathi et al.[27] proposed an ensemble of
Random Forests (RF) followed by an LSTM for predicting
the CPU utilisation of VMs in the Alibaba 2018 dataset. It
outperformed ML models such as linear regression, SVR,
Gradient Boosting, RF and Gaussian Process Regression. An
outlier detection mechanism is applied to the RF ensemble's
output before training the LSTM module. Yazdanian et al.
[28] proposed a hybrid model named E2LG, which decom-
poses first the workload time series into components of
different frequency bands and then they use an ensemble of
Generative Adversarial Network and LSTM to predict each
sub-band. In this architecture, LSTM blocks are used as gen-
erators, and 1DConv blocks are used as a discriminator. The
model is experimentally tested on HTTP workload datasets
for both one-step-ahead and multi-step-ahead predictions.
The research has also moved on to the probabilistic
aspects of time series forecasting in recent years. In our pre-
vious work [11], we extend the DL model to a probabilistic
approach employing an HBNN that captures the epistemic
and aleatory uncertainty of the prediction. We showed the
advantages of forecasting a probability distribution in con-
trast to a point estimate but limited to univariate forecast
and using only one dataset at a time in the training phase.
While the aleatory uncertainty cannot be eliminated, more
training data can reduce epistemic uncertainty [29]. Salinas
et al. [30] designed a probabilistic DL method called DeepAR
trained on large related time series (electricity demand and
traffic forecast), reaching state-of-the-art performance.
Another common technique used for improving the ac-
curacy of the predictive models is transfer learning (TL).
This technique aims to learn a task (target domain) by
transferring the knowledge of another model trained for
a different but related task (source domain). Generally, it
can also apply using a pretrained model to predict related
but unseen datasets [31]. In this context, the source domain
comprises the datasets used in the pretrained model, while
the unseen datasets are the target domain. Fawaz et al. [32]
investigated the TL approach in the context of time series
classification showing that the performance can improve or
degrade according to the dataset used for the transfer. Hao et
al. [33] built a QoS Bayesian Network to efficiently estimate
the QoS of VMs by quantifying the uncertain relation-
ships among their relevant features on Alibaba published
datasets. Khan et al. [34] applied TL to clustering algorithms
to estimate the energy state of the VMs.
We surveyed a total of 72 works on Cloud Computing
Workload. For the sake of brevity, we did not include them
all. None of them used the Google Cloud Trace 2019, and
Alibaba Cluster traces 2020 in the context of workload
prediction. A GPU trace from the latter is also available,
which has become essential in DL and AI applications. Most
papers use Google Cloud Trace 2011, Alibaba 2018, Bitbrains
and other HTTP server traces. Still, the preprocessing steps
of the datasets are usually inconsistent or not well described,
limiting the possibility of replicating the research. Further-
more, none of the previous works investigated the concept
of transfer learning in the context of probabilistic workload
prediction and the generalisation capabilities of DL models
exploiting multiple datasets, a milestone step in the era of
big data.
3 PREDICTIVE MODEL
In the resource management scheme in a cloud comput-
ing environment (see Fig. 1), the resource manager is the
leading actor, which uses the future demand prediction
to configure the VM in the cloud servers. The forecast is
provided by the predictive model, which is the focus of this
paper. Predictive models are trained based on the historical
workload data. Every time a new configuration occurs, the
workload history is updated to feed the predicted model
with newly available data. We can classify the models based
on the training datasets, the prediction type, and the DL
architecture used to forecast future demand.
We propose a wide variety of models. We add a prefix to
their name to identify them better.
The model can be trained using one trace (S) from the
twelve preprocessed datasets or all of them (M).
Regarding the type of prediction, we can distinguish
between univariate (U) models and bivariate (B) models.
In the former case, we predict just one resource at a time; in
the latter, we simultaneously predict both processing units
and memory demand.
The architectures used as a predictive model are an
LSTM-based model (LSTM), used as the baseline, while the
proposed models are the HBNN and the LSTMD, where
D stands for distribution. Each model in the analysis is
3
given by combining these three categories. For instance, M-
B-HBNN refers to an HBNN model trained with multiple
datasets for a bivariate time series. In the following sections,
we describe these models in more detail. A graphical repre-
sentation of the three compared architectures is depicted in
Fig. 2.
3.1 LSTM
An LSTM-based model is used as the baseline of our exper-
iments. The network consists of an input layer with a size
of 288, corresponding to the past 24 hours of workload. The
input size has been found experimentally. The sequence is
given to a succession (between one and three) of 1DConv
layers followed by an LSTM layer, frequently used to deal
with sequential data. The combination of these two types
of layers has been proven effective in time series forecasting
[20, 24]. The LSTM is followed by a sequence of dense layers
whose number varies with the training set's size and the
prediction type. For instance, for the M-B-LSTM, the number
of dense layers is 3, while for the S-U-LSTM is 2. The last
layer has one single neuron in the case of univariate models
or two in the case of bivariate models. The Mean Squared
Error (MSE) is used as the metric for the optimization via
the Adam algorithm [35]. The training converges in a few
hundred epochs, and an early stopping strategy is applied
to prevent overfitting. More details about the training/test
split can be found in the following sections. The network
is implemented in Keras1 and the hyperparameter tuning,
which also includes the number of layers in the network,
has been performed using the Talos2 optimization library.
3.2 HBNN
Similarly to our previous work [11], we design a Bayesian
Last Layer network to capture the epistemic uncertainty.
The architecture differs from the LSTM model only on the
last two layers so that we can understand the impact of
the Bayesian layer. The sequential input is fed to one or
more 1DConv layers, followed by an LSTM layer. As in the
previous model, the LSTM is placed behind a sequence of
dense layers and a Bayesian dense layer, which replaces the
last dense layer of the baseline. A dense layer follows the
Bayesian one with two neurons for the univariate prediction
or 4 for the bivariate forecast to predict the mean and the
variance of one or two Normal distributions embedded in
a distributional layer which is the output of our model.
The output distribution captures the aleatory uncertainty
given by the noise of the workload demand. The network
is optimized by minimizing the loss function, which is the
negative log-likelihood between the target demand and the
distribution predicted by the model. Except for these dif-
ferences in architecture and loss function, a similar training
strategy to the baseline is applied. The Bayesian layer and
the distribution layer are implemented using TensorFlow
probability3, the rest of the network is implemented in
Keras, and the hyperparameterization has been run in the
same way as the LSTM model.
1. https://keras.io/
2. https://github.com/autonomio/talos
3. https://www.tensorflow.org/probability
4
The second part is focused on the TL approach ap-
plied to the M-B-HBNN model, using the same network's
architecture (i.e. with the hyperparameters found on the
optimisation for the M-B-HBNN model). We apply different
training scenarios, including fine-tuning (FT) the network's
weights, i.e. starting from the weights of the pretrained
model, we proceed with further training of the network on
the datasets we want to predict. We can enumerate seven
different approaches:
• All: the model is trained with all 12 clusters. We
then predict the specific datasets without any further
training.
• All FT: We start from All. We then fine-tune the
network on the specific dataset before making the
prediction. This assesses whether the FT process
leads to a better weight configuration for the dataset
we want to predict.
• All-but-one: the model is trained with 11 out of
12 datasets (source domain). We then predict the
remaining dataset (target domain). With this ex-
periment, we want to further investigate the M-B-
HBNN model's generalisation capabilities and eval-
uate models on unseen clusters (zero-shot TL). This
would be very helpful when a new cluster is avail-
able, and we want to deploy a predictive model
immediately.
• All-but-one FT: We start with the All-but-one version.
We then fine-tune the network on the remaining
dataset before making the prediction (one-shot TL).
This investigates the TL approach with the FT on
newly available data.
• GC19: This applies only to the datasets from the
Google Cloud Trace 2019. This approach is similar
to All, but we used only Google Cloud Trace 2019
datasets. This assesses whether pretraining a model
on related datasets from the same providers helps the
predictive capabilities.
• GC19 FT: We start with GC19 but with a fine-tuning
on the specific dataset to predict. This is similar to
GC19 but with the evaluation of the FT effect.
• Random: this corresponds to the S-U-HBNN with
random initialisation of the weights and trained on a
single dataset at a time. This assesses whether start-
ing from a pretrained model's weights or a random
initialisation is better.
Fig. 1. Workload Prediction Scheme
Fig. 2. Network architectures comparison
3.3 LSTMD
The LSTMD model's architecture is the same as the HBNN,
but a standard dense layer replaces the Bayesian dense layer.
The output is still a Gaussian distribution in the case of a
univariate prediction or two Gaussian distributions in the
case of a bivariate prediction. Also, in this case, the weights
are optimized with the negative log-likelihood as the loss
function.
4 TRAINING SCENARIOS
The first part of the experiments focuses on comparing
univariate and bivariate predictive models trained with one
or more traces. We keep the same training procedure as our
previous work [11], with a bigger hyperparameter space, a
different scaling and the use of data shuffling to improve the
overall performance of the models. Moreover, we preprocess
and extend the work to more datasets. Furthermore, we
investigate the impact of training a bivariate version of the
predictive model in contrast with the univariate case and the
benefits of training a deep learning model using multiple
datasets.
5
Fig. 3. Training scenarios and transfer learning
We also train GC19-but-one and GC19-but-one FT ver-
sions, specific for the Google Cloud Trace 2019, but we omit
the results due to the poor performance compared to the
other models. Fig. 3 depicts a graphical representation of
these training scenarios.
5 EXPERIMENTS
In this section, we first describe the experimental setup and
the datasets used in our experiments. We then evaluate the
models in terms of point estimate accuracy, the efficiency of
the predicted resources and runtime performance. In each
subsection, we first assess the extension to bivariate models
and those trained with multiple datasets. We then discuss
the results based on the TL approach.
5.1 Experimental Setup
The training of the models has been run with a CPU In-
tel®Xeon®Gold 6240 at 2.60GHz and GPU NVIDIA Quadro
RTX 8000 with 48 GB of memory where Ubuntu 20.04 is
installed. The experiments are conducted over twelve real-
world traces to train an LSTM model, used as a baseline,
and the proposed models. For each dataset, the first 80%
is used as the training set, 20% of which is used as the
validation set. The remaining 20% of each dataset is used
as the test set. In the case of multiple datasets, 80% of each
dataset is concatenated and shuffled to make each batch
more representative of each cluster. Still, there is never a
time overlap between data in the training and test sets, such
that the prediction of one trace cannot exploit information of
a particular timestamp in another trace. We share a GitHub
repository4 that contains further information on the models'
architecture and the search space for the hyperparameters
optimisation. In particular, the search space is based on the
number of layers, the number of neurons for each layer,
4. https://github.com/andreareds/UncertaintyAwareWorkloadPr
ediction
the batch size, the activation functions, the learning rate,
the momentum and decay coefficients and the number of
kernels in the 1DConv layer. Once the hyperparameters are
tuned, we train the models ten times for each cluster and re-
source using various random seeds as initialisation to assess
the optimisation algorithm's convergence. We forecast the 5-
minute interval of demand 10 minutes in the future, where
10 minutes is a sufficient time interval for most applications
[36, 37], e.g. resource allocation, vertical scaling etc.
5.2 Datasets
The twelve datasets used in our experiments include one
cluster from Google Cloud 2011, eight clusters from Google
Cloud trace 2019, one from Alibaba Cluster Trace 2018 and
two from Alibaba Cluster Trace 2020. More details on the
datasets and the preprocessing phase are given for repro-
ducibility in the following sections. All the preprocessed
datasets can be downloaded from the shared repository.
5.2.1 Google Cloud Trace 2011 and 2019
The Google Cloud Trace 2011 [12] and 2019 [13] are publicly
available datasets published by Google from the Google
Cloud Platform and contain details about the resource utili-
sation of the cluster cells. In particular, Google Cloud Trace
2011 is composed of 29 days of resource usage collected in
May 2011 from 12,500 machines in a single cluster cell, while
Google Cloud Trace 2019 is composed of data of 29 days
from 8 different cluster cells distributed around the world
with around 10,000 machines for each cell. While Google
Cloud Trace 2011 is preprocessed offline, the Google Cloud
Trace 2019, about 2.4TiB compressed, is preprocessed using
Google BigQuery. For each trace, we create a time series
dataset that includes the average CPU and average memory
usage for all the machines with a 5-minute interval, as done
in other works in workload forecasting in cloud computing
[38, 39, 40] with 8352 data points in total. Missing records are
neglected for simplicity. For the tasks that run only partially
in a 5-minute window, we multiply the average resource
by a weight corresponding to the fraction of the window in
which the task is in execution. Data is finally scaled in the
range [0, 1] using a MinMax scaling strategy for speeding
up the convergence of the training.
5.2.2 Alibaba Cluster Trace 2018 and 2020
Consistently with the preprocessing phase for Google Cloud
Trace, we preprocessed the Alibaba Cluster Trace 2018 [14]
and 2020 [15]. The 2018 version includes the workload
history for CPU and memory of about 4,000 machines in 8
days. The 2020 version is a longer trace of about two months
from about 1,800 machines that contain over 6,500 GPUs.
From this trace, we compile two datasets, one related to the
CPU and memory usage and one for the GPU and GPU
memory usage. As for the Google Cloud Trace, the average
resource usage is aggregated in windows of 5 minutes each.
Tasks that run only partially in the specified time interval
are weighted with the fraction of time in which the task is
running. Missing records are neglected for simplicity, and
the data are scaled in the range [0, 1].
5.3 Point Estimate Accuracy
In this section, we compare the models in terms of predic-
tion errors. The metrics used for this evaluation are MSE and
Mean Absolute Error (MAE), as usually done in time series
forecasting approaches. In the case of HBNN and LSTMD
models, the error is computed w.r.t. the mean of the pre-
dicted distribution, while for the LSTM, the error is calcu-
lated based on the point prediction. Tables 1 and 2 show the
results for the four combinations of single/multiple datasets
and univariate/bivariate for CPU and memory demand,
respectively. For each model combination, the average MSE
and MAE are computed based on the results achieved on
the twelve traces. As confirmed from the previous findings
[41], learning patterns from multivariate time series is very
hard, especially when the size of the training data is small,
when there is no strong correlation between time series
[42] and when we are focused on more short-term predic-
tions [43]. In our traces, we analyse the Pearson correlation
between the CPU/GPU and memory demand, finding no
strong correlation between the time series and determining
that homoscedasticity holds according to the Breusch-Pagan
test [44]. We can appreciate the improvement achieved by
training the model using multiple dataset traces. All the
bivariate models improve their performance compared to
the univariate case. We can see that the HBNN model is
the one which benefits most from more training data. The
model trained on multiple datasets does not require an
extra tuning phase on the specific dataset we want to make
the prediction: on the contrary, MSE and MAE metrics get
worse if we apply FT. Overall the LSTMD-based models
are the ones that achieve the best score in terms of these
metrics. On the contrary, the S-B-HBNN failed to converge;
the S-B-LSTMD struggles and does not achieve the same
performance as the univariate, while S-B-LSTM worsens to
a lesser extent.
However, for each possible combination, except for the
single bivariate models, the models have the same accuracy
according to the statistical difference test for time series
6
forecasting models at 95% of confidence level (Diebold-
Mariano Test [45]). For this reason, we cannot limit the
analysis to these metrics.
Tables 3 and 4 show the results of the average MSE
and MAE, respectively, for the TL approach. Again, the
average is w.r.t. the clusters used to train the models. We
can see the importance of training the model on multiple
traces. A pretrained network on similar datasets is more
impactful than training on the specific dataset we want to
make the prediction, showing the model's TL capabilities
when predicting a probability distribution. Moreover, the
fine-tuning process never improves the performance of the
pretrained models. We believe this is because the model
achieves a local optimum that can hardly be improved with
fine-tuning on much smaller datasets than those used to
pretrain it. Specifically, the TL approach is the one that
degrades the accuracy less when FT is applied. Among the
considered training scenarios, M-B-HBNN is the one that
achieves the best performance. We believe this is because
when more data is available, the network has the chance to
learn more patterns from the time series used in training
due to a bigger and richer training set.
5.4 Impact of Prediction on QoS
This section evaluates the models using the metrics defined
in [11]. The goal is to assess the quality of the prediction
w.r.t. a target QoS level that the providers should ensure to
the customers. In particular, these metrics are:
•
Success Rate (SR): the percentage of future demand
within the confidence interval
• Overprediction (OP): the total amount of overpre-
diction defined as the difference between the upper
bound of the prediction and the real demand for the
requests within the confidence interval
• Underprediction (UP): the total amount of underpre-
diction defined as the difference between the real
demand and the upper bound of the prediction for
the requests greater than the upper bound
• Total Predicted Resources (TPR): the sum of all the
upper bounds of the predictions
In the case of HBNN and LSTMD models that predict a
probability distribution, these scores are computed w.r.t. the
upper bound of the confidence interval with a confidence
level of 95%, 97% and 99%. To compute an interval from
a point estimate, we can predict the output of the network
plus a fixed threshold, e.g. 5%, as done in [9, 10]. The HBNN
and LSTMD are compared to their LSTM counterpart with
a fixed threshold s.t. its accuracy is close to the SR of
the compared model. Table 5 lists all the results for all
the possible combinations of models at the aforementioned
confidence levels. We also draw a graphical representation
of the total predicted resources versus the success rate for
CPU demand in Fig. 4. The graph is drawn by varying the
confidence level between 90% and 99.5% and computing the
SR and TPR, respectively. If one curve is above the other, the
model achieves better performance because, with the same
SR, it predicts a lower TPR. On the other hand, with the
same TPR, it reaches a higher SR, achieving a higher number
of correctly forecasted values within the upper bound of
TABLE 1
Average MSE/MAE comparison for CPU demand. In bold, the
best model overall, in italic the best model in their groups
TABLE 2
Average MSE/MAE comparison for memory demand. In bold, the
best model overall, in italic the best model in their groups
7
Univariate
MSE MAE
0.0457
0.0455
0.0502
0.0474
0.0464
0.0485
LSTM 0.0041
LSTMD 0.0040
HBNN
0.0047
LSTM 0.0044
LSTMD 0.0041
HBNN
0.0047
Bivariate
MSE MAE
0.0500
0.0047
0.0556
0.0061
0.1285
0.0299
0.0479
0.0044
0.0446
0.0046
0.0042
0.0471
Single
Multi
Single
Multi
Univariate
Bivariate
LSTM 0.0042
LSTMD 0.0041
HBNN
0.0044
LSTM 0.0048
LSTMD 0.0044
HBNN
0.0052
MSE MAE MSE MAE
0.0487
0.0631
0.1533
0.0438
0.0446
0.0436
0.0054
0.0088
0.0386
0.0044
0.0046
0.0043
0.0425
0.042
0.0455
0.0447
0.0439
0.0498
TABLE 3
Average MSE comparison for resource demand
TABLE 4
Average MAE comparison for resource demand
Initialization
Fine-
Tuning
Yes
No
Yes
No
Random
All
0.1292
NA
0.0347
NA
0.0058
0.0042
0.0062
0.0043
All-but-
one
0.0057
0.0044
0.0058
0.0045
GC19
only
0.0059
0.0043
0.0063
0.0044
CPU
Memory
Initialization
Fine-
Tuning
Yes
No
Yes
No
Random
All
0.2108
NA
0.1224
NA
0.0561
0.0471
0.0561
0.0436
All-but-
one
0.0563
0.0481
0.0538
0.0448
GC19
only
0.0562
0.0474
0.0546
0.0444
CPU
Memory
Fig. 4. Total Predicted CPU for S-U, M-U and M-B models
Fig. 5. Total Predicted CPU for M-B and S-B models
the distribution but with a lower amount of total predicted
resources. For the readability of the graph, we removed
the plot of the single bivariate models, which achieve poor
performance under this metric. From the aforementioned
table and figure, we can see that the LSTMD and HBNN
models consistently outperform the LSTM counterpart, with
HBNN performing well for the CPU and LSTMD perform-
ing better for the memory prediction and showing the
advantage of predicting the probability. Training a model
with multiple datasets compared to the model trained with
one single dataset has more advantages, despite the single
univariate model seeming superior in the case of memory
prediction at a 99% confidence level. Again, it is clear that
the univariate prediction is an easier task compared to the
bivariate version.
Fig. 5 compares the bivariate models trained with single
and multiple datasets. As the point estimate experiment
shows, if the bivariate model is trained with a single dataset,
it struggles to converge. For this picture, it is clear that the
model benefits significantly if it is trained with more data.
In particular, the M-B models achieve between around 25%
and 60% saving in terms of TPR for both CPU and memory
demand, with a higher SR.
Regarding the TL part, Table 6 lists the results for the dif-
ferent training scenarios. Similarly, we plot the TPR versus
SR for the CPU demand in Fig. 5. This experiment shows
the advantages of using multiple datasets for training the
network compared to training with random initialization
with the specific dataset. Moreover, we can see that with the
FT on the specific dataset we want to make the prediction,
the quality of prediction under our metrics gets worse due
to the overfitting of the pretrained model. These results also
8
TABLE 5
CPU and Memory allocation statistics of the models
CPU/GPU
Memory
Target QoS
Model
SR
OP
95%
97%
99%
S-U-LSTM
S-U-HBNN
S-U-LSTMD
S-U-LSTM
M-U-LSTM
M-U-HBNN
M-U-LSTMD
M-U-LSTM
S-B-LSTM
S-B-HBNN
S-B-LSTMD
S-B-LSTM
M-B-LSTM
M-B-HBNN
M-B-LSTMD
M-B-LSTM
S-U-LSTM
S-U-HBNN
S-U-LSTMD
S-U-LSTM
M-U-LSTM
M-U-HBNN
M-U-LSTMD
M-U-LSTM
S-B-LSTM
S-B-HBNN
S-B-LSTMD
S-B-LSTM
M-B-LSTM
M-B-HBNN
M-B-LSTMD
M-B-LSTM
S-U-LSTM
S-U-HBNN
S-U-LSTMD
S-U-LSTM
M-U-LSTM
M-U-HBNN
M-U-LSTMD
M-U-LSTM
S-B-LSTM
S-B-HBNN
S-B-LSTMD
S-B-LSTM
M-B-LSTM
M-B-HBNN
M-B-LSTMD
M-B-LSTM
93.86
93.86
93.14
93.1
91.45
91.41
94.62
94.62
91.93
91.93
92.61
92.61
95.66
95.7
96.95
96.99
95.18
95.22
94.58
94.54
93.82
93.82
95.95
95.99
93.42
93.46
93.58
93.58
96.75
96.75
97.75
97.75
97.03
97.03
96.35
96.31
96.47
96.47
97.79
97.75
181.68
181.83
171.98
166.55
157.07
154.71
196.45
197.69
863.11
825.14
846.79
895.31
227.28
216.83
283.94
259.69
201.68
202.32
192.27
194.59
183.61
180.01
219.12
216.67
957.91
918.34
940.42
964.9
254.86
242.97
316.68
293.65
247.30
241.64
231.27
229.15
228.65
229.15
262.69
275.80
94.458
94.58
94.42
94.42
97.95
97.95
99.04
99.04
1138.38
1096.57
1118.85
1117.13
300.96
292.95
379.16
367.20
UP
5.31
5.09
5.64
6.36
7.62
7.02
4.30
4.65
32.83
29.46
30.21
30.16
3.91
3.81
2.46
2.70
4.13
3.92
4.37
4.51
5.51
5.04
3.16
3.70
25.50
22.26
23.47
25.02
2.85
2.81
1.59
1.78
2.32
2.31
2.67
2.95
3.22
2.67
1.75
1.80
14.11
10.89
12.37
15.33
1.62
1.55
0.59
0.61
TPR
SR
OP
1181.36
1181.72
1171.32
1165.17
1154.44
1152.67
1197.14
1198.03
1835.26
1800.66
1821.57
1870.14
1228.35
1218.01
1286.46
1261.98
1202.54
1203.89
1192.88
1195.06
1183.08
1179.95
1220.95
1217.96
1937.39
1901.07
1921.93
1944.87
1256.99
1245.15
1320.07
1296.85
1249.87
1244.31
1233.59
1231.18
1230.41
1231.46
1265.92
1278.99
2129.20
2090.67
2111.46
2106.78
1304.32
1296.39
1383.55
1371.58
93.62
93.54
93.26
93.26
95.74
95.78
95.18
95.22
91.89
91.89
92.45
92.45
97.43
97.39
99.0
99.0
95.02
95.06
94.86
94.9
96.95
96.91
96.39
96.39
94.78
94.78
94.58
94.58
98.03
98.03
99.44
99.44
97.59
97.55
97.07
97.11
98.11
98.07
97.63
97.67
98.11
98.07
97.91
97.87
99.04
99.04
99.8
99.8
118.94
128.57
111.61
117.54
146.99
143.77
137.45
141.04
676.14
675.94
679.97
686.47
188.17
184.19
229.80
229.80
131.64
143.98
125.88
130.45
164.98
162.14
154.76
157.76
755.57
767.76
765.92
734.34
200.34
206.17
258.94
276.75
171.30
173.76
153.41
159.16
195.35
197.21
187.88
183.17
904.42
947.24
933.59
898.32
244.60
248.08
314.17
321.44
UP
3.69
3.61
3.87
3.79
2.57
2.85
3.07
2.86
12.58
13.53
13.18
11.70
1.28
1.51
0.54
0.56
2.93
2.66
2.94
3.00
1.89
2.22
2.36
2.14
7.32
7.13
7.35
8.52
1.00
1.03
0.31
0.19
1.49
1.55
1.77
1.81
1.12
1.41
1.47
1.39
1.73
1.14
1.71
1.86
0.42
0.54
0.10
0.04
TPR
1061.05
1070.75
1053.54
1059.55
1090.21
1086.72
1080.18
1083.98
1609.35
1608.21
1612.59
1620.56
1132.69
1128.48
1175.06
1175.03
1074.50
1087.12
1068.74
1073.25
1108.89
1105.72
1098.19
1101.42
1694.05
1706.43
1704.37
1671.63
1145.14
1150.93
1204.43
1222.36
1115.60
1118.02
1097.44
1103.15
1140.03
1141.60
1132.21
1127.57
1848.49
1891.91
1877.68
1842.26
1189.98
1193.33
1258.87
1267.20
TABLE 6
CPU and Memory allocation statistics of the models
9
Target QoS
Model
SR
OP
UP
TPR
SR
OP
UP
TPR
CPU/GPU
Memory
95%
97%
99%
All
All FT
All-but-one
All-but-one FT
GC19
GC19 FT
Random
All
All FT
All-but-one
All-but-one FT
GC19
GC19 FT
Random
All
All FT
All-but-one
All-but-one FT
GC19
GC19 FT
Random
94.58
87.47
95.7
94.1
98.55
77.7
92.29
95.95
91.01
96.75
95.46
99.42
84.0
93.98
97.19
94.5
97.95
97.35
99.86
92.76
96.31
206.29
167.17
216.83
204.32
108.99
49.82
190.49
230.14
197.1
242.97
227.05
125.95
60.71
212.67
275.76
255.78
292.95
270.77
158.17
83.18
255.44
5.08
11.69
3.81
4.71
0.38
8.55
6.53
3.97
8.45
2.81
3.5
0.23
5.94
4.96
2.45
4.47
1.55
2.01
0.14
2.89
2.87
1206.2
1160.46
1218.01
1204.6
1126.04
1058.69
1188.94
1231.16
1193.64
1245.15
1228.53
1143.15
1072.2
1212.69
1278.3
1256.29
1296.39
1273.74
1175.46
1097.72
1257.56
95.74
85.87
97.39
95.14
97.18
89.36
85.75
97.11
90.85
98.03
96.15
98.19
92.9
89.64
98.35
96.07
99.04
97.71
98.84
96.6
94.5
156.71
92.17
184.19
160.2
116.24
74.61
559.49
175.27
112.9
206.17
176.18
133.11
87.48
626.76
210.79
154.39
248.08
206.75
165.23
112.81
760.59
2.41
7.83
1.51
2.68
1.26
3.84
28.22
1.75
5.17
1.03
2.03
0.92
2.61
18.71
1.0
2.49
0.54
1.2
0.54
1.3
7.53
1100.1
1030.13
1128.48
1103.32
1032.09
987.87
1477.07
1119.31
1053.52
1150.93
1119.95
1049.29
1001.97
1553.85
1155.59
1097.7
1193.33
1151.35
1081.79
1028.61
1698.85
additional clusters join the cloud computing system.
5.5 Accuracy of the Predicted Uncertainty
In this section, we evaluate the prediction accuracy of the
probabilistic models HBNN and LSTMD. To do so, we
plot the targeted confidence levels versus the success rate
achieved by the models by varying the confidence level be-
tween 90% and 99.5%. A perfect model would achieve an SR
equal to the targeted confidence level. This evaluation does
not apply to LSTM, which predicts a point estimate, so we
should compute a fixed threshold differently. Moreover, we
compute the MSE and MAE of the curve w.r.t. the line y = x
to aggregate the plot results in a single numerical value to
evaluate the overall performance. The results are depicted
in Fig. 7 and Tables 7 and 8 for MSE and MAE, respectively.
Although w.r.t. these metrics, the M-U-LSTMD is the model
that overall achieves the best accuracy, there are interesting
differences between each combination of the model, with
the HBNN outperforming the LSTMD counterpart in the
case of S-U and M-B versions.
Similarly, we show the results for the TL experiments in
Table 9 and Fig. 8. From the accuracy point of view, we can
see the benefits of training a model using multiple datasets
and more data, even for prediction on unseen datasets.
Again, the FT degrades the quality of the prediction also
from an accuracy point of view. Moreover, in contrast with
what we discussed in the previous experiments, we do not
see any advantage in training the model using datasets
from the same cluster type. However, the models generalize
better when more datasets are used for the training.
Furthermore, we should also consider that MSE and
MAE are symmetric metrics. Regarding the QoS, we should
prefer models that achieve a higher SR than the target con-
fidence level rather than a lower one, even if the MSE and
MAE are lower. For instance, we should favour a model that
Fig. 6. Total Predicted CPU for transfer learning experiments
show the benefits of having a pretrained model that can
be used to predict the datasets that have never been seen
before by the model. To the best of our knowledge, this is the
first time this technique has been applied to cloud workload
prediction. Interestingly, training the model only on the
datasets from the same distribution (eight clusters from
GC2019) allows the training to achieve better performance
in terms of these metrics. Overall, we believe that training
the model with multiple datasets leads to many benefits
in terms of performance, also in the case of prediction on
unseen datasets in the training set. More available data
allows the model to capture more patterns shared among
similar traces. Also, it will enable the service provider to
accelerate the deployment process by avoiding the need to
retrain new models from scratch or wait for new data when
TABLE 7
Average MSE comparison for resource demand accuracy
TABLE 8
Average MAE comparison for resource demand accuracy
Univariate
Bivariate
CPU/
GPU
2.96
1.69
1.24
12.07
Memory
3.07
1.80
1.14
2.42
CPU/
GPU
8.15
11.80
6.89
1.97
Memory
6.51
11.81
21.05
8.66
Single
Multi
LSTMD
HBNN
LSTMD
HBNN
Univariate
Bivariate
CPU/
GPU
1.47
1.10
0.98
3.34
Memory
1.67
1.27
0.92
1.25
CPU/
GPU
2.66
3.32
2.08
1.11
Memory
2.34
3.03
3.94
2.39
Single
Multi
LSTMD
HBNN
LSTMD
HBNN
10
Fig. 7. Memory prediction accuracy
Fig. 8. Memory prediction accuracy for transfer learning experiments
TABLE 9
Average MSE/MAE comparison for resource prediction accuracy for
transfer learning experiments
CPU/GPU
Memory
Model
All
All FT
All-but-one
All-but-one FT
GC19
GC19 FT
Random
MSE MAE MSE MAE
1.27
1.22
8.88
48.83
2.39
1.97
1.27
1.19
2.07
10.21
5.32
327.91
8.52
5.36
0.93
6.67
1.11
0.94
2.92
16.54
2.17
2.76
99.44
8.66
2.40
6.44
33.72
83.73
achieves a 96% SR compared to 94% w.r.t. a 95% confidence
level, despite the score being the same in terms of MSE and
MAE. For this reason, asymmetric metrics would be more
suitable to evaluate the model's accuracy combined with
the QoS we aim to provide to the customers.
5.6 Runtime Performance
The applicability of these DL models to real-world scenarios
strongly depends on the time necessary for training and
deploying the model in a cloud resource management setup.
The three critical aspects in determining the usability of DL
models are the training time, the fine-tuning time (i.e. how
often we refresh the network weights with newly available
data) and the inference time. The training time depends,
for instance, on the size of the training set; the fine-tuning
time depends on how often we retune the weights of the
deep learning model, and the inference time is related to the
forecast time once the model is trained. We measure these
three metrics by varying the size of the training set in 20%,
40%, 60% and 80%, by changing the number of steps among
6, 12, 18 and 24 for the fine-tuning time, which correspond
to 30, 60, 90 and 120 minutes frequency and we measure
the inference time of predicting one sample. The results are
computed as an average of 10 runs for all the preprocessed
traces. Table 10 lists all the time measurements in seconds
for all the combinations of the models. We omit the mea-
sures for the TL part, where the speed of convergence of
the network is strictly correlated to the size of the training
set, and it is applied only to the HBNN model (the DL
architecture is the same). As we can see, the models take
more or less the same time for the fine-tuning and inference
steps, with the HBNN often being the faster architecture.
The training time, instead, varies with the type of training
and the prediction. The HBNN is the slowest model, except
for the univariate version trained with multiple datasets.
However, the training phase generally is infrequent and
done offline, e.g. overnight, so it is not a critical factor. At the
same time, fine-tuning and inference are the most frequent
actions in resource management operations. We would also
like to underline that the results for the S-U versions refer
to the training of one single (trace, resource) pair, which
means that we need to run this phase 24 times (12 clusters
× 2 resources). This also applies to the S-B (12 times) and
M-U versions (2 times). With this runtime analysis, we
observe that all the models can be practically deployed in
11
TABLE 10
Runtime performance analysis. In italics the best model for each subgroup.
Model
20%
12
S-U-LSTM
S-U-HBNN
35
S-U-LSTMD
15
S-B-LSTM
11
S-B-HBNN
57
10
S-B-LSTMD
M-U-LSTM 1121
486
M-U-HBNN
M-U-LSTMD
714
M-B-LSTM
1441
M-B-HBNN
2123
954
M-B-LSTMD
Training
Time [s]
40%
21
140
25
21
106
16
947
425
518
1323
3210
1559
60%
29
268
38
32
154
25
869
530
706
1603
3230
1477
Fine-Tuning
Time [s]
18
12.77
1.7
2.22
1.34
1.88
2.98
2.37
1.63
5.35
11.81
2.6
2.09
12
7.4
1.63
2.32
1.61
2.01
4.06
2.44
1.63
2.3
1.73
2.3
3.0
24
9.29
1.64
1.68
1.54
2.01
2.26
3.41
1.79
1.49
5.45
2.78
3.33
Inference
Time [s]
1 sample
0.0002
0.0058
0.00002
0.0002
0.0001
0.0001
0.0001
0.0001
0.0001
0.0002
0.0001
0.0001
80%
48
325
52
53
172
237
1050
621
836
1602
2281
1592
6
5.38
1.57
2.49
3.03
1.84
3.17
2.54
1.7
4.92
2.29
2.54
3.41
real-world scenarios, with the advantage of having a model
trained with multiple datasets, which does not require any
parallelization of the systems for each possible cluster cell.
computing environment, integrating the predictive model
and the resource allocator in the same pipeline.
6 CONCLUSION AND FUTURE WORK
Probabilistic forecasting and uncertainty modelling provide
a broader picture to the resource manager in a cloud
computing environment, helping the scheduling decision
process. In this paper, we analysed the performance of
probabilistic models that capture the uncertainty in the pre-
diction by forecasting a probability distribution of the future
demand. We evaluated univariate and bivariate models for
predicting processing units and memory usage by training
the models with one or more related time series from Google
Cloud and Alibaba traces. We also investigated the TL
technique and the generalisation capabilities of the models
for related but unseen historical workload data. We showed
that the training phase using multiple datasets allows the
models to achieve better performance regarding resource
prediction efficiency and accuracy w.r.t. a target QoS level
and to reach good results for more challenging tasks such
as bivariate forecasting. Moreover, the TL method allows
predictions on unseen traces in the training phase, opening
the chance of not retraining from scratch a model when new
cluster cells are available or waiting for enough historical
data. Finally, we analysed the runtime performance of the
models for their deployment in practical applications. This
analysis showed that the models could be practically ap-
plied to predict the demand for future resources.
In future, we would like to analyse further the perfor-
mance of the HBNN model in the case of different loss
functions, including non-symmetrical loss, to address the
target QoS level in the training phase and compare it to
a full Bayesian version of the network, also in the case of
multi-step-ahead prediction. We will also focus on extend-
ing the TL concept to a machine-level workload forecast to
understand and analyse the amount of training data and
their representativeness necessary for the model to reach
high generalisation capabilities. Finally, the predictions can
be exploited for scheduling, resource allocation, scaling and
workload balancing problem for managing VMs in a cloud
ACKNOWLEDGMENTS
This work was conducted with the financial support of
Science Foundation Ireland under Grant Nos. 18/CRT/6223,
16/RC/3918 and 12/RC/2289-P2. which are co-funded un-
der the European Regional Development Fund; by TAI-
LOR (GA No. 952215), a project funded by EU Hori-
zon 2020 research and innovation programme, and by the
Google Cloud Research Credits program with the award
GCP203677602. The authors thank Dr Diego Carraro from
Insight Centre of Data Analytics, University College Cork,
for helpful conversation and feedback. Andrea Rossi is the
corresponding author.
REFERENCES
[1] S. D. M ̈uller, S. R. Holm, and J. Søndergaard, "Benefits
of cloud computing: literature review in a maturity
model perspective," Communications of the Association
for Information Systems, vol. 37, no. 1, p. 42, 2015.
[2] Z. R. Alashhab, M. Anbar, M. M. Singh, Y.-B. Leau, Z. A.
Al-Sai, and S. A. Alhayja'a, "Impact of coronavirus
pandemic crisis on technologies and cloud computing
applications," Journal of Electronic Science and Technol-
ogy, vol. 19, no. 1, p. 100059, 2021.
[3] M. Tirmazi, A. Barker, N. Deng, M. E. Haque, Z. G. Qin,
S. Hand, M. Harchol-Balter, and J. Wilkes, "Borg: the
next generation," in Proceedings of the Fifteenth European
Conference on Computer Systems, 2020, pp. 1–14.
[4] M. Koot and F. Wijnhoven, "Usage impact on data
center electricity needs: A system dynamic forecasting
model," Applied Energy, vol. 291, p. 116798, 2021.
[5] L. Belkhir and A. Elmeligi, "Assessing ict global emis-
sions footprint: Trends to 2040 & recommendations,"
Journal of cleaner production, vol. 177, pp. 448–463, 2018.
[6] H. Xi, C. Yan, H. Li, and Y. Xiao, "An attention-based
recurrent neural network for resource usage prediction
in cloud data center," in Journal of Physics: Conference
Series, vol. 2006, no. 1.
IOP Publishing, 2021, p. 012007.
[7] Q. Zhang, L. T. Yang, Z. Yan, Z. Chen, and P. Li,
"An efficient deep learning model to predict cloud
[8]
workload for industry informatics," IEEE transactions
on industrial informatics, vol. 14, no. 7, pp. 3170–3178,
2018.
J. Kumar, A. K. Singh, and R. Buyya, "Self directed
learning based workload forecasting model for cloud
resource management," Information Sciences, vol. 543,
pp. 345–366, 2021.
[9] D. Minarolli and B. Freisleben, "Cross-correlation pre-
diction of resource demand for virtual machine re-
source allocation in clouds," in 2014 Sixth International
Conference on Computational Intelligence, Communication
Systems and Networks.
IEEE, 2014, pp. 119–124.
[10] D. Minarolli, A. Mazrekaj, and B. Freisleben, "Tackling
uncertainty in long-term predictions for host overload
and underload detection in cloud computing," Journal
of Cloud Computing, vol. 6, no. 1, pp. 1–18, 2017.
[11] A. Rossi, A. Visentin, S. Prestwich, and K. N. Brown,
"Bayesian uncertainty modelling for cloud workload
prediction," in 2022 IEEE 15th International Conference
on Cloud Computing (CLOUD).
IEEE, 2022, pp. 19–29.
[12] C. Reiss, J. Wilkes, and J. L. Hellerstein, "Google
format+ schema," Google Inc.,
cluster-usage traces:
White Paper, vol. 1, 2011.
[13] J. Wilkes, "Google cluster-usage traces v3," Google Inc.,
Mountain View, CA, USA, Technical Report, Apr. 2020,
posted at https://github.com/google/cluster-data/b
lob/master/ClusterData2019.md.
[14] C. Jiang, Y. Qiu, W. Shi, Z. Ge, J. Wang, S. Chen,
C. Cerin, Z. Ren, G. Xu, and J. Lin, "Characterizing co-
located workloads in alibaba cloud datacenters," IEEE
Transactions on Cloud Computing, 2020.
[15] Q. Weng, W. Xiao, Y. Yu, W. Wang, C. Wang, J. He, Y. Li,
L. Zhang, W. Lin, and Y. Ding, "MLaaS in the wild:
Workload analysis and scheduling in large-scale het-
erogeneous GPU clusters," in 19th USENIX Symposium
on Networked Systems Design and Implementation (NSDI
22), 2022, pp. 945–960.
[16] R. N. Calheiros, E. Masoumi, R. Ranjan, and R. Buyya,
"Workload prediction using arima model and its im-
pact on cloud applications' qos," IEEE transactions on
cloud computing, vol. 3, no. 4, pp. 449–458, 2014.
[17] A. Khan, X. Yan, S. Tao, and N. Anerousis, "Workload
characterization and prediction in the cloud: A multiple
time series approach," in 2012 IEEE Network Operations
and Management Symposium.
IEEE, 2012, pp. 1287–
1294.
[18] S. Banerjee, S. Roy, and S. Khatua, "Efficient resource
utilization using multi-step-ahead workload prediction
technique in cloud," The Journal of Supercomputing,
vol. 77, pp. 1–28, 2021.
[19] I. K. Kim, W. Wang, Y. Qi, and M. Humphrey, "Fore-
casting cloud application workloads with cloudinsight
for predictive resource management," IEEE Transactions
on Cloud Computing, 2020.
[20] H. L. Leka, Z. Fengli, A. T. Kenea, A. T. Tegene, P. Atan-
doh, and N. W. Hundera, "A hybrid cnn-lstm model
for virtual machine workload forecasting in cloud data
center," in 2021 18th International Computer Conference
on Wavelet Active Media Technology and Information Pro-
cessing (ICCWAMTIP).
IEEE, 2021, pp. 474–478.
[21] N.-M. Dang-Quang and M. Yoo, "Multivariate deep
12
learning model for workload prediction in cloud com-
puting," in 2021 International Conference on Informa-
tion and Communication Technology Convergence (ICTC).
IEEE, 2021, pp. 858–862.
[22] S. Ouhame, Y. Hadi, and A. Ullah, "An efficient fore-
casting approach for resource utilization in cloud data
center using cnn-lstm model," Neural Computing and
Applications, pp. 1–13, 2021.
[23] S. Qian, Y. Yu, L. Li, and Y. Chang, "An attention-based
gru encoder decoder for hostload prediction in a data
center," in 2021 International Conference on Computer
Communication and Artificial Intelligence (CCAI).
IEEE,
2021, pp. 121–125.
[24] E. Patel and D. S. Kushwaha, "A hybrid cnn-lstm
model for predicting server load in cloud computing,"
The Journal of Supercomputing, pp. 1–30, 2022.
[25] L. Ruan, Y. Bai, S. Li, J. Lv, T. Zhang, L. Xiao, H. Fang,
C. Wang, and Y. Xue, "Cloud workload turning points
prediction via cloud feature-enhanced deep learning,"
IEEE Transactions on Cloud Computing, 2022.
[26] M. E. Karim, M. M. S. Maswood, S. Das, and A. G. Al-
harbi, "Bhyprec: a novel bi-lstm based hybrid recurrent
neural network model to predict the cpu workload of
cloud virtual machine," IEEE Access, vol. 9, pp. 131 476–
131 495, 2021.
[27] K. Valarmathi and S. Kanaga Suba Raja, "Resource
utilization prediction technique in cloud using knowl-
edge based ensemble random forest with lstm model,"
Concurrent Engineering, vol. 29, no. 4, pp. 396–404, 2021.
[28] P. Yazdanian and S. Sharifian, "E2lg: a multiscale
ensemble of lstm/gan deep learning architecture for
multistep-ahead cloud workload prediction," The Jour-
nal of Supercomputing, vol. 77, pp. 1–31, 2021.
[29] E. H ̈ullermeier and W. Waegeman, "Aleatoric and epis-
temic uncertainty in machine learning: An introduction
to concepts and methods," Machine Learning, vol. 110,
no. 3, pp. 457–506, 2021.
Salinas, V.
and
[30] D.
T.
Januschowski, "Deepar: Probabilistic forecasting
with autoregressive recurrent networks," International
Journal of Forecasting, vol. 36, no. 3, pp. 1181–1191, 2020.
[31] D. Sarkar, R. Bali, and T. Ghosh, Hands-On Transfer
Learning with Python: Implement advanced deep learning
and neural network models using TensorFlow and Keras.
Packt Publishing Ltd, 2018, pp. 166–168.
J. Gasthaus,
Flunkert,
[32] H. I. Fawaz, G. Forestier, J. Weber, L. Idoumghar, and
P.-A. Muller, "Transfer learning for time series classifi-
cation," in 2018 IEEE international conference on big data
(Big Data).
IEEE, 2018, pp. 1367–1376.
[33] J. Hao, K. Yue, B. Zhang, L. Duan, and X. Fu, "Transfer
learning of bayesian network for measuring qos of
virtual machines," Applied Intelligence, vol. 51, no. 12,
pp. 8641–8660, 2021.
[34] T. Khan, W. Tian, S. Ilager, and R. Buyya, "Workload
forecasting and energy state estimation in cloud data
centres: Ml-centric approach," Future Generation Com-
puter Systems, vol. 128, pp. 320–332, 2022.
[35] D. P. Kingma and J. Ba, "Adam: A method for stochastic
optimization," arXiv preprint arXiv:1412.6980, 2014.
[36] M. Mao, J. Li, and M. Humphrey, "Cloud auto-scaling
with deadline and budget constraints," in 2010 11th
IEEE/ACM International Conference on Grid Computing.
IEEE, 2010, pp. 41–48.
[37] F. J. Baldan, S. Ramirez-Gallego, C. Bergmeir, F. Her-
rera, and J. M. Benitez, "A forecasting methodology for
workload forecasting in cloud systems," IEEE Trans-
actions on Cloud Computing, vol. 6, no. 4, pp. 929–941,
2016.
[38] J. Kumar and A. Singh, "An efficient machine learning
approach for virtual machine resource demand pre-
diction," International Journal of Advanced Science and
Technology, vol. 123, pp. 21–30, 2019.
[39] B. Liu, Y. Lin, and Y. Chen, "Quantitative workload
analysis and prediction using google cluster traces,"
in 2016 IEEE Conference on Computer Communications
Workshops (INFOCOM WKSHPS).
IEEE, 2016, pp. 935–
940.
[40] N. R. Herbst, N. Huber, S. Kounev, and E. Amrehn,
"Self-adaptive workload classification and forecasting
for proactive resource provisioning," Concurrency and
computation: practice and experience, vol. 26, no. 12, pp.
2053–2078, 2014.
[41] Z. He, C. Zhao, and Y. Huang, "Multivariate time se-
ries deep spatiotemporal forecasting with graph neural
network," Applied Sciences, vol. 12, no. 11, p. 5731, 2022.
[42] J. Du Preez and S. F. Witt, "Univariate versus mul-
tivariate time series forecasting: an application to in-
ternational tourism demand," International Journal of
Forecasting, vol. 19, no. 3, pp. 435–451, 2003.
[43] M. Chayama and Y. Hirata, "When univariate model-
free time series prediction is better than multivariate,"
Physics Letters A, vol. 380, no. 31-32, pp. 2359–2365,
2016.
[44] T. S. Breusch and A. R. Pagan, "A simple test for
heteroscedasticity and random coefficient variation,"
Econometrica: Journal of the econometric society, pp. 1287–
1294, 1979.
[45] F. X. Diebold and R. S. Mariano, "Comparing predic-
tive accuracy," Journal of Business & economic statistics,
vol. 20, no. 1, pp. 134–144, 2002.
13
Andrea Rossi is a PhD student at the SFI Cen-
tre for Research Training in Artificial Intelligence
at University College Cork since October 2019.
He got a bachelor's in Information Engineering
and a master's in Computer Engineering at the
University of Padua (Italy). His research is fo-
cused on time series analysis and predictive
models for resource management problems in
cloud computing environments.
Andrea Visentin has a BSc and an MSc in
Computer Engineering from the University of
Padua (Italy) and completed a PhD at the Insight
Centre for Data Analytics at UCC. He is currently
a permanent lecturer at the School of Computer
Science & IT. Moreover, he is a researcher at the
Confirm Centre for Smart Manufacturing and the
Insight Centre for Data Analytics.
Steven Prestwich is a Lecturer in the School of
Computer Science & IT, University College Cork,
Ireland. He has a PhD in Computer Science
from the University of Manchester (UK) and an
MA in mathematics from the University of Oxford
(UK). He is currently an investigator in the Insight
Centre for Data Analytics and the Confirm smart
manufacturing centre. His current work includes
deep learning, forecasting and supply chain op-
timisation and constraint acquisition.
Kenneth N. Brown is a Professor in the School
of Computer Science & IT, Deputy Director of In-
sight@UCC and he co-leads the research chal-
lenge on decision making. He is a Funded Inves-
tigator on Confirm, the national centre for smart
manufacturing. He is a PI and executive commit-
tee member of Enable, the inter-centre spoke on
smart cities and IoT. His research interests are
in the areas of artificial intelligence, optimisation
and constraint-based reasoning.
|
|
http://arxiv.org/abs/2302.12670v1 | 2023-02-24T14:50:47 | 2023-02-24T14:50:47 | Personalized Pricing with Invalid Instrumental Variables:
Identification, Estimation, and Policy Learning | Pricing based on individual customer characteristics is widely used to
maximize sellers' revenues. This work studies offline personalized pricing
under endogeneity using an instrumental variable approach. Standard
instrumental variable methods in causal inference/econometrics either focus on
a discrete treatment space or require the exclusion restriction of instruments
from having a direct effect on the outcome, which limits their applicability in
personalized pricing. In this paper, we propose a new policy learning method
for Personalized pRicing using Invalid iNsTrumental variables (PRINT) for
continuous treatment that allow direct effects on the outcome. Specifically,
relying on the structural models of revenue and price, we establish the
identifiability condition of an optimal pricing strategy under endogeneity with
the help of invalid instrumental variables. Based on this new identification,
which leads to solving conditional moment restrictions with generalized
residual functions, we construct an adversarial min-max estimator and learn an
optimal pricing strategy. Furthermore, we establish an asymptotic regret bound
to find an optimal pricing strategy. Finally, we demonstrate the effectiveness
of the proposed method via extensive simulation studies as well as a real data
application from an US online auto loan company. | [
"Rui Miao",
"Zhengling Qi",
"Cong Shi",
"Lin Lin"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12670v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12670v1",
"@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",
"econ.EM",
"stat.ML"
] | 3
2
0
2
b
e
F
4
2
]
E
M
.
t
a
t
s
[
1
v
0
7
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Personalized Pricing with Invalid
Instrumental Variables: Identification,
Estimation, and Policy Learning
Rui Miao1
Zhengling Qi2∗
Cong Shi3
Lin Lin4
1University of California, Irvine
2George Washington University
3University of Michigan at Ann Arbor
4Duke University
Abstract
Pricing based on individual customer characteristics is widely used to maximize
sellers' revenues. This work studies offline personalized pricing under endogeneity
using an instrumental variable approach. Standard instrumental variable methods in
causal inference/econometrics either focus on a discrete treatment space or require
the exclusion restriction of instruments from having a direct effect on the outcome,
which limits their applicability in personalized pricing.
In this paper, we propose
a new policy learning method for Personalized pRicing using Invalid iNsTrumental
variables (PRINT) for continuous treatment that allow direct effects on the outcome.
Specifically, relying on the structural models of revenue and price, we establish the
identifiability condition of an optimal pricing strategy under endogeneity with the
help of invalid instrumental variables. Based on this new identification, which leads
to solving conditional moment restrictions with generalized residual functions, we
construct an adversarial min-max estimator and learn an optimal pricing strategy.
Furthermore, we establish an asymptotic regret bound to find an optimal pricing
strategy. Finally, we demonstrate the effectiveness of the proposed method via exten-
sive simulation studies as well as a real data application from an US online auto loan
company.
1
Introduction
In the era of Big Data and artificial intelligence, business models and decisions have been
changed profoundly. The massive amount of customer and/or product information offers
∗[email protected]
1
an exciting opportunity to study personalized pricing strategies. Specifically, based on
the information collected from past selling seasons, sellers can leverage powerful machine
learning tools to discover their customers' preferences and offer an attractive personalized
price for each customer to maximize their revenue.
This problem can be formulated as an offline policy learning problem for continuous
treatment space. In particular, offline data often consist of customer/product information,
the offered price, and the resulting revenue. Our goal of personalized pricing is to leverage
such data to discover an optimal data-driven pricing strategy for each X that maximizes
the overall revenue.
Because we have no control over the collection of the offline data, one major challenge
of this task is that there may exist unmeasured confounders besides the offline data, which
could possibly result in endogeneity. Endogeneity typically hinders us from identifying an
optimal pricing decision using offline data. Thus, using standard policy learning methods
may lead to suboptimal pricing decisions.
In the literature on causal inference and econometrics, instrumental variable (IV) models
are commonly used to account for unmeasured confounding in identifying the causal effect
of treatment. This task is closely related to personalized pricing because evaluating a
particular pricing strategy is almost equivalent to its causal effect estimation. Therefore,
an IV model is a promising solution for addressing the endogeneity in finding an optimal
pricing strategy. A valid IV is a pretreatment variable independent of all unobserved
covariates, and only affects the outcome through the treatment. Meanwhile, it requires
that the variability of IV can account for that of the unobserved covariates. Prominent
examples include using the season of birth as an instrument for understanding the impact of
compulsory schooling on earnings in education (Angrist and Keueger, 1991), estimating the
spatial separation of racial and ethnic groups on the economic performance using political
factors, topographical features, and residence before adulthood as instruments in social
economics (Cutler and Glaeser, 1997), estimating the effect of childbearing on labor supply
using the parental preferences for a mixed sibling-sex composition as an instrument in labor
economics, justifying the Engel curve relationship of individual household's expenditure
on the commodity demand using individual's expenses on nondurables and services as
an instrument in microeconomics (Blundell et al., 2007), and leveraging genetics variants
as instruments for investigating the causal relationship between low-density lipoprotein
cholesterol on coronary artery disease in medical study (Burgess et al., 2013).
We study offline personalized pricing under endogeneity via an IV approach. Instead
of assuming a valid IV, we use an invalid IV that can potentially have an additional direct
effect on the outcome. Relying on the structural models of revenue and price, we establish
the identifiability condition of an optimal pricing strategy given observed covariates with
the help of invalid IVs. Based on the identification, which can be formulated as a problem of
solving conditional moment restrictions with generalized residual functions, we develop an
adversarial min-max estimator and learn an optimal pricing decision from the offline data.
We call our proposed policy learning method PRINT: Personalized pRicing using Invalid
iNsTruments. Most existing literature focuses on developing methods for either a discrete
treatment space with some valid/invalid IVs or a continuous treatment space with a valid
2
IV. While Lewbel (2012); Tchetgen Tchetgen et al. (2021) also considered the causal effect
estimation for a continuous treatment using an invalid IV, their IV models do not allow
for the causal heterogeneity, e.g., the interaction effect of the price with covariates. This
cannot serve our purpose of finding an optimal personalized pricing strategy.
1.1 Motivating Example
One of our motivating examples is the pricing problem of an auto loan company. (Later,
we will conduct extensive numerical experiments on this problem using a real dataset.)
Customer lending is a prominent industry in which personalized prices (i.e., lending rates)
are both socially acceptable and in current practice, albeit at varying degrees of granu-
larity (Ban and Keskin, 2021). The norm of price negotiation, high variation in customer
willingness to pay, low cost of bargaining, and other considerations provide tremendous
opportunities for offering personalized lending rates for customers in order to maximize the
profit (Phillips et al., 2015).
In this example, the offline data consist of customer information (e.g., FICO score, loan
amount, loan term, living state), the offered loan price calculated by net present value, and
the resulting revenue determined by the final contract result (accepted or not). However,
when recording the information of past deals in the offline data, some local information,
such as the operating costs of the lender, the competitor's rate on individual deals, and some
unknown customer demographics, may not be available, which hinders the decision maker
from designing an optimal pricing strategy based on the available covariates information.
Thus, it is essential to devise an offline learning algorithm for personalized pricing under
endogeneity, which learns the pricing strategy based on available covariates (i.e., a mapping
from covariates to prices).
To account for unmeasured confounding, the loan rate, or the so-called APR (annual
percentage rate), can be served as an instrument variable G for dealing with the endogeneity
of the price of the loan, because it is strongly relevant to the price and satisfies specific
properties. We also note that using an APR as an IV has been adopted in the literature (e.g.,
Blundell-Wignall et al. 1992). However, a caveat is that the loan rate may inevitably affect
the demand directly and, subsequently, the revenue of the loan company, which breaks the
exclusion restriction to be a valid IV. In fact, in many problems, the IV exclusion restriction
is hard to be verified. To overcome this difficulty, it is necessary for us to develop a new
policy learning approach using an invalid IV.
1.2 Major Contributions
We study the problem of offline personalized pricing under endogeneity. Our contribu-
tion can be summarized four-fold. First, we develop a novel policy learning method for
continuous treatment space using invalid IVs. Our identification using invalid IVs for an
optimal pricing strategy relies on two practical non-parametric models of revenue and price.
To the best of our knowledge, this is the first work studying policy learning for continuous
treatment space under unmeasured confounding. Second, we generalize the causal inference
3
literature on treatment effect estimation under unmeasured confounding. In particular, the
existing literature is predominantly focused on discrete treatment settings, where various
approaches using a valid IV are developed. Much less attention has been paid to dealing
with continuous treatment. While there is also a stream of recent literature studying causal
effects under invalid IVs, the significant works still concentrate on the discrete treatment
setting. Our identification using an invalid IV for the effect of a continuous treatment fills
the gap of causal inference literature, which could be of independent interest. The key step
for establishing the identification is to impose orthogonality conditions in terms of the high-
order moments between the effect of all covariates related to the price on the outcome and
the effect of that on the price, while the degree of unmeasured confounding is not restricted.
Third, we establish an asymptotic regret guarantee for our policy learning algorithm in find-
ing an optimal pricing decision, based on a newly developed adversarial min-max estimator
for solving conditional moment restrictions with generalized (non-linear) residual functions.
This adversarial min-max estimator is motivated by solving a zero-sum game that can in-
corporate flexible machine learning models. Lastly, compared with two baseline methods,
we demonstrate our method's superior performance via extensive simulation studies and a
real data application from an auto loan company.
1.3 Related Work
Since the seminal work of Manski (2004), there has been a surging interest in studying
offline policy learning in economics, statistics, and computer science communities such
as Qian and Murphy (2011); Dud ́ık et al. (2011); Zhao et al. (2012); Chen et al. (2016);
Kitagawa and Tetenov (2018); Cai et al. (2021); Biggs (2022); Qi et al. (2022b) and many
others. However, most existing works rely on the unconfoundedness assumption, which is
hardly satisfied in practice. To remove the effect of possible endogeneity, practitioners often
collect and adjust for as many covariates as possible. While this may be the best approach,
it is often very costly and even infeasible as we have no control over offline data collection.
To address this limitation, more recently, various policy learning methods under unmea-
sured confounding have been proposed, such as using a binary and valid IV for a point or
partially identifying the optimal policy (Cui and Tchetgen Tchetgen, 2021; Qiu et al., 2021;
Han, 2019; Pu and Zhang, 2020; Stensrud and Sarvet, 2022), using a sensitivity model for
policy improvement (Kallus and Zhou, 2020), and leveraging the proximal causal inference
(Qi et al., 2022a; Miao et al., 2022; Wang et al., 2022; Shen and Cui, 2022). However, none
of the aforementioned works studies the policy learning for continuous treatment space un-
der endogeneity.
Our work is also closely related to IV models, which have been extensively studied
in the literature on causal inference and econometrics. See Angrist and Imbens (1995);
Ai and Chen (2003); Newey and Powell (2003); Hall and Horowitz (2005); Chen and Reiss
(2011); Chen and Christensen (2018); Darolles et al. (2011); Blundell-Wignall et al. (1992);
Wang and Tchetgen (2018) for earlier references. A typical assumption in the aforemen-
tioned literature is the existence of a valid IV that satisfies (i) independence from all
unobserved covariates U, (ii) the exclusion restriction that prohibits the direct effect of
4
IVs on the outcome, and (iii) correlated with the endogenous variable. Tremendous ef-
forts have been made to develop statistical and econometric methods to account for the
possible violation of these assumptions. See Staiger and Stock (1994); Stock and Wright
(2000); Stock et al. (2002); Chao and Swanson (2005); Newey and Windmeijer (2009) and
many others for relaxing (iii), and Lewbel (2012); Kang et al. (2016); Guo et al. (2018);
Tchetgen Tchetgen et al. (2021); Sun et al. (2021) for relaxing (i) and (ii).
In particu-
lar, Kang et al. (2016); Guo et al. (2018); Koles ́ar et al. (2015); Windmeijer et al. (2019)
considered the multiple IV setting and restricted to some specific parametric models. In
contrast, Lewbel (2012); Tchetgen Tchetgen et al. (2021), which are closely related to our
proposal, mainly focused on the discrete treatment setting and only considered the con-
stant causal effect for continuous treatment setting. Therefore, none of the existing works
studies the causal identification with heterogeneity under continuous treatment using an
invalid IV, which is a distinct aspect of our paper.
2 Problem Formulation and Challenges
In this section, we introduce the problem of personalized pricing under the framework of
causal inference. We also illustrate the challenges of finding an optimal pricing strategy in
the observational study due to endogeneity.
2.1 Personalized Pricing without Unmeasured Confounding
≤
∈ P
Let P be the price of a product that takes values in a known and continuous action space
p2. Define the potential revenue under the intervention of
p1 ≤
= [p1, p2] with 0
P
P = p as Y (p) for p
. In the counterfactual world, Y (p) is a random variable of the
revenue had the company used the price p for their product. Denote X as the observed q-
Rq.
dimensional covariate associated with the product that belongs to a covariate space
A personalized pricing policy π is determined by the covariate X, which is a measurable
function mapping from the covariate space
. Then the potential
X
revenue under a policy π is defined as Y (π). For any pricing strategy π, we use the expected
revenue (also called policy value) to evaluate its performance, i.e.,
into the action space
X ⊆
P
Finally, the goal of personalized pricing is to find an optimal policy π∗, such that
(π) = E [Y (π)] .
V
(1)
π∗
arg max
(π),
(2)
π
∈
Π V
∈
where Π is a class of policies depending on X. However, since for each instance of the
random tuple (X, P, Y ), we only observe one Y corresponding to the price P , but not other
Y and P , the joint distribution of (X, P,
) is impossible to learn without any
(π) from the
assumptions. Therefore, identification conditions are needed for learning
observed data. We first consider the following three standard causal assumptions.
Y (p)
}p
∈P
V
{
5
Assumption 1 (Standard Causal Assumptions) The following conditions hold.
(a) (Consistency) Y = Y (p) if P = p for any p
∈ P
(b) (Positivity) The probability density function f (p
.
(c) (No unmeasured confounding) Y (p)
P
|
⊥⊥
X) > 0 for p
almost surely.
∈ P
|
X for p
.
∈ P
Assumption 1(a) ensures that the observed Y matches the potential revenue under the
intervention P . Assumption 1(b) guarantees that each pricing decision has a chance of
being observed. The unconfoundedness assumption, i.e., Assumption 1(c), indicates that
by conditioning on X, there are no other factors that confound the effect of the price P on
the revenue Y . Under Assumptions 1(a) and 1(c), one can show that for each π
Π,
∈
(π) = E[Q(X, π(X)],
V
where Q(x, p) = E[Y
Assumption 1(b),
satisfies π∗
∈
almost surely.
V
arg maxπ
|
∈
X = x, P = p], and the expectation is taken over X. Together with
(π) can be nonparametrically identified by the observed data. Then π∗
Q(X, p),
E[Q(X, π(X)], whose explicit form is π∗(X)
arg maxp
Π
∈
∈P
2.2 Challenges due to Endogeneity
In practice, the unconfoundedness assumption (i.e., Assumption 1(c)) cannot be ensured
without further restriction on the data-generating procedure such as an ideal randomized
experiment. The failing of Assumption 1(c) incurs non-identifiability issue and thus could
(π). Consider the following toy
lead to a seriously biased estimation for the policy value
example of a revenue model for illustration that
V
Y =
P 2 + X ⊤β
−
P + U + ε,
where U is some unmeasured covariate with E[U
β is the parameter of interest, and ε is some random noise such that E[ε
surely. Suppose that we aim to evaluate a policy π0(X)
P = 1, then one can show that
≡
|
×
X] = X ⊤γ for some unknown parameter γ;
X, U, P ] = 0 almost
1, i.e., always assigning the price
|
(3)
(π0) = EX
1 + X ⊤(β + E [U
X]
= EX
1 + X ⊤(β + γ)
.
V
−
|
Due to the unobserved factor U, we cannot identify the parameter of interest β, which is the
effect associated with π0, based on the observed data. Meanwhile, if one carelessly imple-
ments the previous approach by assuming unconfoundedness, then, since E [U
=
E [U
X] in general, we have
X, P = 1]
−
(cid:2)
(cid:2)
(cid:3)
(cid:3)
|
|
E[Q(X, π0(X)] = EX
1 + X ⊤β + E [U
−
(cid:2)
X, P = 1]
=
(π0).
V
|
(cid:3)
6
6
6
In the causal inference, to account for unmeasured confounding, IV models are widely
It is often
used in identifying the average treatment effect (e.g., Angrist et al., 1996).
assumed that there exists an IV, denoted by G, such that
P = Υ(X, U, G) +
ε,
(4)
for some function Υ and random noise
ε. A valid IV satisfies the following three conditions:
e
Assumption 2
(a) (IV relevance) G
e
6⊥⊥
P
|
(U, X);
(b) (IV independence) G
U
|
⊥⊥
X;
(c) (IV Exclusion restriction) G
Y
|
⊥⊥
(P, X, U).
It is well-known that Assumption 2 is sufficient for a valid statistical test of no individual
causal effect of P on Y , but not to point identify the average treatment effect, e.g., E[X ⊤β]
in (3). An additional assumption is often needed to achieve the latter goal. However, even
identifying the average treatment effect does not suffice in personalized pricing because to
learn an optimal pricing strategy π∗, we need to identify the causal heterogeneity effect.
For example, in (3), one can find π∗ via solving
π∗
∈
arg max
Π
π
∈
E[
π2(X) + X ⊤β
−
π(X)],
×
and the key is then to estimate the function X ⊤β. Therefore, compared with the standard
causal inference using a valid IV, this posits an additional challenge.
|
P
×
−
X ⊤β
Furthermore, when P is continuous, existing literature often assumes an additively
ε. The identification
separable structural model such as (3) and further restricts that G
of X ⊤β in the toy example is then given by solving a conditional moment restriction
E[Y + P 2
X, P, G] = 0 (e.g., Ai and Chen, 2003; Newey and Powell, 2003).
Later on, researchers found that the separable structural equation could be dropped by
restricting the dimensionality and heterogeneity of U in affecting Y . See, for example,
Chernozhukov et al. (2007). While significant efforts have been made recently to further
relax the condition on the outcome/revenue model in terms of U, none of them consider the
ε fails. For example,
circumstance where the exclusion restriction in Assumption 2 or G
in our auto loan application, the APR of a loan is used as the IV, which may have an
unavoidable direct effect on the eventual revenue.
⊥⊥
⊥⊥
Given these challenges, in the following section, we consider invalid IVs and develop a
novel identification for an optimal pricing strategy from the observational data.
3 Assumptions and Identification
In this section, we present an identification result using invalid IVs, denoted by G, which can
be multi-dimensional, for finding π∗ defined in (2) under endogeneity. Our result is based
on realistic non-parametric models for the price and revenue, together with the restriction
on the directions and strength of instruments in affecting the price and revenue.
7
3.1 Model Assumptions
In the following, we introduce our non-parametric revenue and price models in the presence
of unmeasured confounders U, which could be multi-dimensional as well. Denote the space
of U as
. We assume the following structural equation models for our data-generating
process of a random tuple (X, U, G, P, Y ) that
U
P, G, X, U] = βp,1(U, X)P + βp,2(U, X)P 2 + βg(U, X, G) + βu,x(U, X),
E [Y
|
E [P
G, X, U] = αg(U, X, G) + αu,x(U, X).
|
(5)
(6)
For simplicity, we assume that βp,2(U, X)
c almost surely for some constant c > 0.
≤ −
We term (5) and (6) as revenue and price models, respectively. In the revenue model, we
consider a quadratic model of the price P on the revenue Y , which is practical when consid-
ering the linear demand function (Bastani et al., 2022). The unknown coefficient functions
βp,1(U, X) and βp,2(U, X) represent the linear and quadratic effects of the price P on the ex-
pected revenue Y . In addition, the coefficient functions βg(U, X, G) and βu,x(U, X) denote
the generic effect of (X, U, G) on the revenue Y . Specifically, βg(U, X, G) characterizes the
interaction effect of G and (X, U). We remark that without any additional assumptions,
both βg(U, X, G) and βu,x(U, X) cannot be identified due to the unobserved U. However,
the non-identifiability of these two functions does not necessarily hinder from finding π∗ as
they are irrelevant to the price P in (5). For ease of presentation, the revenue model (5)
considered here rules out the interaction effect between the instrumental variable G and
the price P on the revenue Y . Our method can be naturally extended to that scenario as
well. In comparison, clearly, our revenue model (5) is more general than the parametric
In addition,
and additive models used in the standard instrumental variable regression.
we allow for the direct effect of G on Y , which is typically not allowed in most existing
literature on causal inference and econometrics.
Our price model (6) is very flexible and describes a distributional aspect of the prices in
our offline data, stemming from all relevant variables (X, U, G). Note that it is unnecessary
to identify nuisance functions αg(U, X, G) and αu,x(U, X) because they are irrelevant to the
price P and finding the optimal pricing strategy.
Due to the unmeasured confounding U, in our offline data, for each instance, we can
only observe a sample of a random tuple (X, G, P, Y ). Under this model setup, our goal is
to find the optimal personalized pricing strategy that maximizes the expected revenue. We
do not consider π∗ that depends on G, as indicated by model (5), there is no interaction
effect between G and P on the expected revenue Y . Then we have the following proposition.
Proposition 1 Under the revenue model (5), the optimal policy π∗ is
π∗(X) = arg max
In particular,
p
∈P
(cid:8)
E [βp,1(U, X)
|
X] p + E [βp,2(U, X)
X] p2
.
|
(cid:9)
π∗(X) = min
{
max
p1,
{
E [βp,1(U, X)
−
|
X] /E [βp,2(U, X)
X]
}
, p2}
,
|
almost surely for given p1 and p2.
(7)
(8)
8
|
Let βp,1(X) = E [βp,1(U, X)
X] and βp,2(X) = E [βp,2(U, X)
X] . Since U is not observed
in our data, without any assumptions, βp,1(X) and βp,2(X) cannot be uniquely identified
by the observed data non-parametrically. The non-identification issue indicates that there
may exist two different expected revenues under the distribution of the observed random
tuple (X, G, P, Y ). Directly applying supervised learning from Y on (X, G, P, P 2) will
lead to biased estimation of E [βp,1(U, X)
X], and thus the resulting
estimated policy will be sub-optimal. See the toy example (3) in the previous section for
illustration.
X] and E [βp,2(U, X)
|
|
|
3.2
Identification Assumptions
We impose the following identification assumptions on βp,1(X) and βp,2(X) by leveraging
an invalid IV G.
Assumption 3 The following statements hold.
(a) (IV relavance) G
X;
P
|
6⊥⊥
(b) (IV independence) G
U
|
⊥⊥
X;
(c) (Orthogonality) The following conditions hold for k = 1, 2, 3, almost surely, that
Cov
Cov
(cid:0)
Cov
βg(U, X, G), E [P
βp,1(U, X), E[P k
βp,2(U, X), E[P k
(cid:0)
G, U, X]
G, U, X]
G, U, X]
|
|
|
X, G
= 0,
X, G
(cid:1)
X, G
(cid:1)
= 0,
= 0.
|
|
|
(9)
(10)
(11)
(cid:0)
(cid:1)
Assumption 3(a) ensures that the IV G is correlated with the price P given the observed
covariates X, which is mild. This is a typical assumption for IVs approach so that we can
use for adjusting the unmeasured confounding. Assumption 3(b) essentially requires that
there is no unmeasured confounding to infer the effect of G on Y by adjusting the observed
confounders X. This holds for example, when U is some private information owned by the
competitor in our auto loan example. Assumption 3(c) is a technical condition used to
ensure that there are no common effect modifiers resulting from the unobserved covariates
U in both Models (5) and (6).
Intrinsically, orthogonality conditions (9) – (11) impose
further strength requirements of the IV G and covariates X such that the effects of un-
measured confounding U on the revenue are orthogonal to the conditional pricing moments
E[poly3(P )
G, X, U] with poly3(P ) being any polynomial of price P up to the third order.
Note that we do not impose any restriction on the relationship between βu,x(U, X) and
αu,x(U, X), and hence the effect of unmeasured confounding can be arbitrarily large.
|
Below we provide a sufficient condition so that Assumption 3(c) holds.
Assumption 4 The following statements hold.
(a) βp,1(U, X) = βp,1(U1, X), βp,2(U, X) = βp,2(U1, X), βg(U, X, G) = βg(U1, X, G) almost
surely; αg(U, X, G) = αg(U2, X, G), αu,x(U, X) = αu,x(U2, X) almost surely.
9
⊥⊥
U1 |
U2 |
(X, G), P
(X, U2, G).
(b) U1 ⊥⊥
Assumption 4 basically states that there exist two independent variables U1 and U2, which
have separate effects on the price and revenue, respectively. In the context of the car loan
example, U1 could be the competitor's rate on individual deals, whereas U2 could be the
operating costs of the lender. Then we have the following proposition.
Proposition 2 If Assumption 4 is satisfied, then Assumption 3(c) holds.
3.3
Identification Results
Now, by the aforementioned assumption, we establish our identification results for βp,1(X)
and βp,2(X) using our offline data. This relies on the following two lemmas.
Lemma 1 Under Models (5) and (6) and Assumption 3, we have
E [(G
E [G
|
−
X])(P
E [P
G, X])Y
|
X]
|
= E [(G
|
E [G
|
−
E [P
|
G, X])P
X]
}
|
βp,1(X)
×
−
Ω1(X)
X])(P
{z
−
Ω2(X)
+ E
|
(G
E [G
|
−
(cid:2)
E [P
X])(P
{z
−
Ω3(X)
G, X])P 2
|
βp,2(X).
×
X
}
|
(cid:3)
Lemma 2 Under Models (5) and (6) and Assumption 3, we have
}
|
Cov(G(G
E [G
|
−
X]), (P
−
G, X])Y
|
X)
|
{z
E [P
= Cov(G(G
|
E [G
−
Υ1(X)
X]), P (P
{z
|
E [P
−
G, X])
}
|
|
X)
βp,1(X)
×
+ Cov(G(G
|
E [G
−
Υ2(X)
X]), P 2(P
{z
Υ3(X)
|
E [P
|
−
G, X])
X)
}
|
βp,2(X).
×
We then have the following theorem for identifying βp,1(X) and βp,2(X).
{z
|
}
Theorem 1 Under Models (5) and (6), if Assumption 3 holds, or Assumptions 3(a)-(b)
and 4 hold, then we have
βp,1(X) = (Υ3(X)Ω1(X)
βp,2(X) = (Ω3(X)Ω1(X)
−
−
Υ2(X)Υ1(X)) / (Υ3(X)Ω2(X)
Ω2(X)Υ1(X)) / (Ω3(X)Υ2(X)
Υ2(X)Ω3(X)) ,
Ω2(X)Υ3(X)) ,
−
−
provided that Υ3(X)Ω2(X)
almost surely.
−
Υ2(X)Ω3(X)
= 0 and (Ω3(X)Υ2(X)
Ω2(X)Υ3(X))
= 0
−
Given the identification result, we are able to perform policy learning. This basically
consists of two steps. The first step is to use the offline data to estimate βp,1(X) and
βp,2(X) based on Theorem 1, after which we can obtain the optimal policy π∗ via Equation
(8).
10
6
6
4 Estimation and Policy Learning
In this section, we discuss how to leverage the offline data to estimate βp,1(X) and βp,2(X),
and perform policy optimization. To estimate βp,1(X) and βp,2(X), one can first estimate
nuisance parameters Ω1-Ω3 and Υ1-Υ3, and then construct estimators based on Theorem 1.
However, one cannot directly implement supervised learning techniques for obtaining these
nuisance parameters as they involve a nested conditional expectation structure. For exam-
ple, the response variable in Ω1 is not directly observed, and one has to estimate E[G
X]
and E[P
G, X] first, which will induce additional errors in estimating Ω1. In the following,
we formulate the estimation problem as solving conditional moment restrictions with gener-
alized residual functions, and develop an adversarial min-max approach to simultaneously
estimating βp,1(X) and βp,2(X).
|
|
Denote relevant nuisance parameters as h = (h1,
, h6)⊤, where
X] ,
h1(X) = E [G
|
h3(X) = E
G2
|
h5(X) = E [P (P
(cid:2)
X
,
h2(X, G))
(cid:3)
−
|
X] ,
* * *
h2(X, G) = E [P
h4(X) = E [(P
h6(X) = E
−
P 2(P
|
(cid:2)
X, G] ,
h2(X, G))Y
|
h2(X, G))
−
X] ,
X
,
|
(cid:3)
W1 =
P (P
f
W2 = (w7, w8)⊤, where
h1(X),
h3(X),
G
−
G2
−
h2(X, G))
−
−
(P
−
h5(X), P 2(P
h2(X, G)
−
P
h2(X, G))Y
h2(X, G))
−
h4(X)
h6(X)
−
−
,
and let
and let
w7(Y, P, G, X, h1, h2) = ρ1(Y, X, G, h1, h2)
f
ρ2(X, G, h1, h2)βp,1(X)
ρ3(X, G, h1, h2)βp,2(X),
w8(Y, P, G, X, h1, . . . , h6) = ρ4(Y, X, G, h1, h2)
ρ5(X, G, h1, h2)
ρ6(X, G, h1, h2)
−
−
(cid:8)
−
−
(h3(X)
(h3(X)
(h3(X)
h2
1(X))h4(X)
h2
1(X))h5(X)
h2
1(X))h6(X)
−
−
−
−
−
−
In particular,
(cid:8)
βp,1(X)
βp,2(X).
(cid:9)
(cid:9)
ρ =
(G
−
(G
−
G(G
h1(X))(P
h1(X))(P
−
−
h1(X))(P
h2(X, G))Y,
(G
h2(X, G))P 2, G(G
h2(X, G))P, G(G
h1(X))(P
h1(X))(P
h1(X))(P
−
−
−
−
−
−
h2(X, G))P
h2(X, G))Y
h2(X, G))P 2
,
−
with Vec(ρ) = (ρ1,
, ρ6)⊤. Then we have the following lemma that characterizes the
property of all nuisance parameters. To lighten the notation, let Z = (Y, X, G, P ), α0 =
* * *
−
(βp,1, βp,2, h1, . . . , h6) and W (Z; α) =
Vec⊤(
W1), Vec⊤(
W2)
⊤ for any generic α.
Lemma 3 Under Assumptions in Theorem 1, the following conditional moment restriction
f
holds almost surely that
f
(cid:16)
(cid:17)
E [W (Z; α0)
X] = 0.
|
11
(12)
Equation (12) is called a non-parametric non-linear instrumental variable problem (Chen and Pouzo,
2012), where Z = (Y, X, P, G) are endogenous variables, and X is an instrumental variable.
The IV X in (12) is for estimating all the nuisance parameters α, and the IV G in the
revenue model (5) is for identifying βp,1(X) and βp,2(X) in the presence of the unobserved
confounder U. While both of them are called IVs, they serve different purposes. The
non-parametric nonlinear IV problem is much more challenging than the standard non-
parametric IV regression, i.e., W is a linear function of α, which has been extensively
studied in statistics and econometric literature. In contrast, the general non-parametric
nonlinear IV problem is much less studied theoretically, where Chen and Pouzo (2012, 2015)
only studied this problem under the linear sieve model. Given a wide range of machine
learning approaches, it is essential to study this estimation problem under flexible non-
parametric function classes such as reproducing kernel Hilbert spaces (RKHSs), neural
networks, high-dimensional linear models, etc. Motivated by these and also Dikkala et al.
(2020); Bennett and Kallus (2020), we reformulate Equation (12) into an unconditional
moment restriction via a min-max criterion, based on which we estimate α0 via solving a
zero-sum game.
Specifically, suppose that we are given n independent and identically distributed samples
αn as an
α of α0. We propose to obtain
n
i=1, and a initial guess
Zi = (Xi, Gi, Pi, Yi)
Dn =
}
estimator of α0 via solving
{
sup
f
Ψn(α, f )
min
α
∈H
n
i=1 W (Zi, α)⊤f (Xi),
∈F
− k
f
2
eα,n −
k
e
λnk
f
2
k
F
+ μnk
α
,
2
k
H
b
(13)
2
|
f
=
H
* * *
RdW
P
→
F
and
f = (f1,
, fdW )⊤ with fi ∈ Fi for 1
where Ψn(α, f ) = 1
n
f : RdX
=
{
and
Fi are some user defined function spaces. Examples of
random forests, neural networks, and many others. The norm associated with
as
associated with the space
P
}
include RKHSs,
is defined
F
is the norm
, and λn, μn > 0 are regularization parameters. In addition,
2, where W (Zi;
f
α) is used to balance the weights of
k
conditional moment restrictions. The validity of using this min-max criterion in finding α0
can be verified by the following lemma.
e
Lemma 4 Suppose that λn, μn →
If α0 ∈ H
i
≤
Fi and
k • kFi is some functional norm, and
α)
fik
Fi, where
H
f (Xi)⊤W (Zi;
e
, and for every
k
k
eα,n = 1
, then we have that
dW
i=1 k
n
i=1{
, E [W (Z;
dW = 8
k • kH
0 as n
→ ∞
∈ H
∈ F
X]
P
α)
H
≤
α
}
k
F
n
|
,
2
2
.
α0 ∈
arg min
α
∈H
sup
f
∈F
lim
n
→∞
Ψn(α, f )
f
k
− k
eα,n −
2
λnk
e
f
k
2
F
+ μnk
α
2
k
H
e
,
for any
(cid:9)
α in the neighborhood of α0 that satisfies Assumption 5 in Section 5.
(cid:8)
After obtaining
e
αn, we compute an estimator of π∗ by policy learning that
π = min
max
{
{
p1,
βp,1/[2
−
βp,2]
}
, p2}
.
(14)
b
Notice that
unsatisfactory estimator
α may not serve as an accurate initial guess of α0, which may lead to an
b
αn. However, we can update it iteratively (see Algorithm 1).
b
b
e
b
12
π by solving a zero-sum game.
n
Zi = (Yi, Xi, Gi, Pi)
Input: Batch data
i=1. Initial
λn, μn > 0. Price range [p1, p2]. Maximum iteration K.
b
For k
Algorithm 1: Estimation of
Dn =
:
1
}
Ψn(
0, . . . , K
arg maxf
α(k), f )
−
{
}
f (k)
∈ {
∈
α(k+1)
b
End For
Output: Pricing policy
b
∈F
arg minα
n
∈H
∈
Ψn(α,
b
f
− k
k
f (k)) + μnk
n
b
π = min
{
max
p1,
{
2
bα(k),n −
2
α
λnk
;
f
2
k
F
;
o
k
H
o
β(K)
p,1 /[2
−
β(K)
p,2 ]
}
.
, p2}
α(0). Tuning parameters
b
5 Theoretical Analysis
b
b
b
|
L
H
and
π by (14). We show
X], the min-max estimator
αn measured by a pseudometric
2-error. Based on the consistency of
that contains α0 and a proper adversary space
In this section, we evaluate the performance of the learned policy
that with a given function space
F
containing a function that can well approximate the projected generalized residual functions
b
m(X; α) , E[W (Z; α)
αn obtained by (13) is consistent to α0
αn, we further obtain an asymptotic rate
in terms of
of
k • kps,α0 defined in (15) below, in terms of the critical
radii of spaces
. Finally, we show that an asymptotic bound for regret of the
learned policy
H
π by imposing a link condition for the pseudometric and
b
We start with some preliminary notations and definitions. For a given normed func-
. For a vector valued
. Define
p
lq]1/p and the empirical norm as
g
GM =
, let
k
G|k be the k-th coordinate projection of
, let
p(lq,PX ) = [E
g
k
k
kL
p
lq]1/p.
g(Xi)
tional space
with norm
b
G
functional class
X →
g
the population norm as
(cid:8)
k
p(lq,X1:n) = [ 1
g
n
kn,p,q =
Our main results rely on some quantities from empirical process theory (Wainwright,
be a class of uniformly bounded real-valued functions defined on a random
2019). Let
vector X. The local Rademacher complexity of the function class
k • kG
Rd
kp,q =
(cid:9)
k
n
i=1 k
is defined as
2 norm.
2
G ≤
g(X)
∈ G
P
kL
M
=
F
F
L
G
G
(cid:9)
(cid:8)
b
b
k
k
k
k
g
g
:
F
Rn(δ,
F
) , E
{
n
i=1,
ǫi}
Xi}
{
n
i=1
f
∈F
sup
f
,
k
k
n,2
≤
ǫif (Xi)
,
1
n
n
i=1
X
δ (cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
{−
=
(cid:8)
{
n
i=1 are i.i.d. Rademacher random variables taking values in
ǫi}
where
ability, and
is the largest possible δ such that maxk=1,...,d Rn(δ, star(
hull of class
∈
n
i=1 are i.i.d. samples of X. The critical radius δn of
G|k))
[0, 1]
.
}
is defined as star(
Xi}
{
rf : f
) ,
, r
≤
1, 1
}
g :
k∞
X →
δ2, where the star convex
with equiprob-
Rd,
G
k
g
,2 ≤
1
(cid:9)
F
F
, α)
[
−
1, 1]dW for all α
{
Without loss of generality, suppose that there exist constants A, B such that
and W (
∈ HA, and
•
for any α
are populational analogues of Ψn(α, f ) and
E[W (Z; α)W (Z; α)⊤
2
Φ(α) = E[m(X; α)⊤
α
1
,2 ≤
k
∈ FB. Furthermore,
k∞
∈
, let Ψ(α, f ) , E[W (Z, α)⊤f (X)] and
2], which
∈ H
}
kn,α, respectively. By letting Σα(X) ,
In addition, let
1 for all f
α , E[
{
f (X)⊤Σα(X)f (X)
k
1m(X; α)].
f
k
α = E
f (X)⊤W (Z; α)
,2 ≤
f
k
k
∈ F
k∞
k
k
f
f
.
2
X], we have that
|
Σα0(X)
{
}
−
(cid:2)
(cid:3)
13
5.1 Preliminary Assumptions
In this section, we introduces some preliminary assumptions to establish the convergence
rates of the adversarial min-max estimator and the corresponding regret bounds. The
assumptions are two fold: First, Assumptions 5 – 7 form the foundation for the consistency
of the estimator, which is summarized in Lemma 5. Second, with the definition of a
pseudometric and a link condition, Assumption 8 facilitates the convergence rates and
regret bounds.
We first impose some basic assumptions on identification, function spaces, sample cri-
teria, and penalty parameters.
Assumption 5 (Identifiability and space conditions) The following conditions hold.
(a) The true α0 ∈ H
E [W (Z; α)
X] = 0, we have that
and m(X; α0) , E [W (Z; α0)
|
α0k2,2 = 0.
α
−
|
(b) For any α
0 < ηL =
O
, let fα ∈
∈ H
(1) such that
k
(c) For all α
α
∈ {
∈ H
:
α
k
−
k
arg minf
fα(
)
∈F
m(
•
−
α0k2,2,
k
α
:
F
)
f
k
k
; α)
•
f (
α0
L
α
H k
−
≤
k
−
k
ηL for all α
k2,2 ≤
α0kH ≤
ηΣ}
•
−
X] = 0. For any α
with
∈ H
k2,2. There exists
m(
; α)
•
∈ HA.
cηΣ > 0 almost surely for all X. We assume the initial
α belongs to this set.
, the smallest singular value σmin (Σα(X))
≥
∈F
Ψn(α, f )
Φn(α) = supf
Assumption 6 (Sample criterion)
f
and
αn)
≤
f
λnk
ζ)/n), where ̄δn upper bounds
Assumption 7 (Parameters) Let δn = ̄δn +
) : h
, α)f (
α
α0kH}
. The
the critical radii of
FB, and
−
δ2
parameters ηL, λn, μn and ηn in Assumptions 5 and 6 satisfy that ηL . ηn ≍
μn ≍
λn ≍
n,
as n
+ μnk
b
log(1
(
O
∈ HA, f
p
Op(ηn), where 0 < ηn =
e
Φn(
2
eα,n −
b
b
Φn(α)+
α
.
−
∈ FB,
inf α
2
kF ≤
L
k
(1),
− k
W (
∈H
b
∗
k
k
k
k
{
f
H
O
F
.
*
2
→ ∞
, and the solution of conditional moment restrictions is unique in (
Assumption 5(a) states that the true α0 can be captured by the user-defined space
k • k2,2). The
H
uniqueness is typically required in the literature on conditional moment problems (e.g.,
Ai and Chen, 2003; Chen and Pouzo, 2012). With Assumption 5(a) on the space
, we are
able to find a good adversary function f for any α in the neighborhood of α0. Assumption
5(b) guarantees that the change of α measured by W (Z; α) can be continuously projected
space. Assumption 5(c) is also commonly imposed in the literature such that there is
in
no degenerate conditional moment restrictions.
H
F
F
,
Assumption 6 is a common assumption in the M-estimation theory (Van der Vaart,
2000) and holds by implementing the optimization algorithm correctly. Assumption 7
imposes the conditions on the asymptotic rate of tuning parameters according to the critical
radii of user-defined function classes, which are typically required in penalized M-estimation
methods. The following lemma on the consistency of the min-max estimator follows directly
from Assumptions 5 – 7.
14
αn obtained by (13)
Lemma 5 (Consistency) Suppose that Assumptions 5 – 7 hold. Then
is a consistent estimator of α0 in norm
Op(1) as n
α0k2,2 =
.
Furthermore,
b
k • k2,2, i.e.,
αn −
→ ∞
=
k
αnkH
k
Op(1).
Given the consistency results in Lemma 5, to obtain a local convergence rate, we can
b
b
restrict the space
to a neighborhood of α0 defined as
H
Hα0,M0,ǫ ,
α
:
α
k
−
α0k2,2 ≤
ǫ,
α
k
k2,2 ≤
M0,
∈ H
α
2
H ≤
k
k
M0
.
In this restricted space, following Chen and Pouzo (2012), we define the pseudometric
(cid:9)
(cid:8)
α2kps,α for any α1, α2 ∈ Hα0,M0,ǫ as
α1 −
k
E
v
u
u
t
dm(X; α0)
dα
[α1 −
α2]
α1 −
k
α2kps,α ,
"(cid:18)
(cid:19)
where the pathwise derivative in the direction α
dE[W (Z; (1
dm(X; α0)
dα
[α
α0] ,
−
⊤
1
dm(X; α0)
dα
(cid:18)
α2]
Σα(X)−
[α1 −
,
(cid:19)#
α0 evaluated at α0 is defined as
r)α0 + rα)
dr
r=0, and
X]
|
−
−
dm(X; α0)
dα
[α2 −
We further introduce the following assumption for the restricted space
[α1 −
[α1 −
α2] ,
α0]
−
dm(X; α0)
dα
dm(X; α0)
dα
(cid:12)
(cid:12)
(cid:12)
α0].
Hα0,M0,ǫ.
Assumption 8 (Local curvature) The following conditions hold.
(15)
with respect to α
(a) The local space
Hα0,M0,ǫ is convex, and m(X; α) is continuously pathwise differentiable
∈ Hα0,M0,ǫ.
(b) There exists a finite constant ccurv > 0 such that
Φ(α).
ccurv
α
k
−
α0kps,α0 ≤
Assumption 8(a) and Assumption 5(c) ensure that the pseudometric is well defined in the
neighborhood of α0, and Assumption 8(b) restricts local curvature of Φ(α) at α0, which
enables us to attain a fast convergence rate in the sense of
p
k • kps,α0.
5.2 Convergence Rates and Regret Bounds
,
F
H
ω(δ,
In this subsection, we establish general convergence rate of the min-max estimator and
π, which depend on sample size, complexities of spaces
the regret bound of learned policy
, and the local modulus of continuity. Furthermore, concrete examples and
related to
results will be given in Subsection 5.3.
b
To derive the convergence rate in
HM ) at α0, which is defined as
HM ) ,
k • k2,2, we introduce the local modulus of continuity
The local modulus of continuity ω(δ,
by
We now present a general theorem for the convergence rate in
∈HM :
α
Hα0,M0,ǫ) enables us to link the local errors quantified
α0k2,2. For a detailed discussion, see Chen and Pouzo (2012).
α0kps,α0 and
α0k2,2.
αn −
αn −
sup
α0
α
ps,α0 ≤
k
(16)
ω(δ,
δ k
−
α
k
k
−
k
k • kps,α0 and
k • k2,2.
b
b
15
Theorem 2 (Convergence rate) Suppose that Assumptions 5 – 8 hold, we have that
k
αn −
α0kps,α0 =
Op(δn), and
αn −
Theorem 2 states that the convergence rate in pseudometric depends on the critical radii,
b
. The convergence rate
which measures the complexities, of spaces related to
k • k2,2 is a direct consequence by applying the local modulus of continuity. Following
in
Theorem 2, we have the following general regret bound for our estimated policy
Hα0,M0,ǫ)).
Op(ω(δn,
α0k2,2 =
and
π.
H
F
b
k
Theorem 3 (Regret bound) Under Models (5) and (6), if Assumption 3 holds, or Assump-
cp,2
tions 3(a)-(b) and 4 hold, with technical assumptions in Theorem 2 and that
for some constant cp,2 > 0, we have the following regret bound:
b
βp,2 ≥
−
(π∗)
V
− V
(
π) =
Op(ω(δn,
Hα0,M0,ǫ)) .
Theorem 3 shows that bounding the regret of
b
π is as easy as bounding
k • k2,2 error of
the nuisance functions βp,1 and βp,2.
5.3 Regret Bounds for RKHSs
b
To apply the general convergence rate and regret bound in Theorems 2 and 3, we need to
compute the upper bound of critical radii δn, and local modulus of continuity ω(δn,
Hα0,M0,ǫ).
In this subsection, we focus on the case when
are some RKHSs and provide
sufficient conditions to bound these terms, which lead to concrete results on convergence
rates and regret bounds.
and
H
F
Assumption 9 (Polynomial eigen-decay RKHS kernels) Let
dowed with Mercer kernels K
∞j=1 and
)
∞j=1, respectively. There exist constants γ
)
}
F
2γH and λj(K
cR
j−
be RKHSs en-
H
, with non-increasingly sorted eigenvalue sequences
> 1/2 and cR > 0
)
{
H
such that λj(K
λj(K
cR
and K
λj(K
2γF .
and
j−
, γ
F
}
H
H
)
F
F
{
≤
H
*
F
≤
*
RKHSs endowed with a kernel of polynomial eigenvalue decay rate are commonly
used in practice. For example, the γ-order Sobolev space has a polynomial eigen decay
rate. Neutral networks with a ReLU activation function can approximate functions in
H γ
A([0, 1]d), the A-ball in the Sobolev space with an order γ on the input space [0, 1]d
(Korostelev and Korosteleva, 2011).
Corollary 1 (Convergence rate for RKHSs in pseudometric) Suppose that assumptions in
Theorem 2 hold. Then, together with Assumption 9, we have that
α
k
α0kps,α0 =
−
Op
n−
(cid:16)
1
2+1/ min(γH,γF ) log(n)
.
(cid:17)
16
To obtain the rate of convergence in
continuity for RKHS
the eigen decomposition of kernel K
H
∞j=1 a2
2
ei, eji2,2 = 0. Then
α0k
1 and
2,2 =
P
−
m a2
)M0. In addition,
Therefore,
α
k
λm(K
by ∆α =
H
h
j
≥
j ≤
H
P
k • k2,2, we now quantify the local modulus of
α0 ∈ HM0 by
−
Rd with
2
ejk
2,2 =
k
M0.
j /λj(K
)
≤
H
∞j=1 ajej, where ej :
=
j and
∞j=1 a2
α0k
Z →
−
α
k
H
2
. By Mercer's theorem, we can decompose ∆α = α
P
P
α0k
−
α
k
2
ps,α0 =
aiajE
i,j
X
For any positive integer m, let
dm(X; α0)
dα
"(cid:18)
[ei]
⊤
Σα0(X)−
1
(cid:19)
dm(X; α0)
dα
(cid:18)
.
[ej]
(cid:19)#
Γm = E
dm(X; α0)
dα
[ei]
(cid:19)
"(cid:18)
⊤
Σα0(X)−
1
dm(X; α0)
dα
[ej]
(cid:18)
.
(cid:19)#i,j
[m]
∈
Then we have the following lemma on the local modulus of continuity.
Lemma 6 For any positive integer m, suppose that λmin(Γm)
m < j, there exists c > 0 such that
≥
τm > 0 and for all i
≤
dm(X; α0)
dα
E
"(cid:18)
[ei]
⊤
Σα0(X)−
1
(cid:19)
dm(X; α0)
dh
(cid:18)
[ej]
(cid:19)# ≤
cτm.
Then
ω(η,
HM0)2 =
∆α
∈HM0 :
max
∆α
ps,α0 ≤
k
k
∆α
2
2,2
k
η k
min
N+
m
∈
≤
η2
τm
∞
2c
+ M0
v
u
u
t
i=1
X
∞
v
u
u
t
j=m+1
X
λi(K
)
H
λj(K
H
) + λm+1(K
.
)
H
Lemma 6 allows us to quantify the local modulus of continuity at α0 for the RKHS case
by finding an optimal m∗, which is determined by the decay rate of τm. We consider two
cases in the following corollary.
Corollary 2 (Convergence rates and regret bounds for RKHS cases) Suppose that assump-
tions in Corollary 1 and Lemma 6 hold. Then the following statements hold.
(a) Mild ill-posedness: If τm ∼
2b for some b > 0, then
m−
α
k
α0k2,2 =
−
Op
(cid:18)h
1
2+1/ min(γH ,γF ) log(n)
n−
γH−1/2
γH−1/2+b
.
(cid:19)
i
Furthermore, under Models (5) and (6), if Assumption 3 holds, or Assumptions 3(a)-
(b) and 4 hold, then
(π∗)
V
− V
(
π) =
Op
b
1
2+1/ min(γH,γF ) log(n)
n−
(cid:18)h
17
γH−1/2
γH−1/2+b
;
(cid:19)
i
(b) Severe ill-posedness: If τm ∼
e−
mb for some b > 0, then
α
k
α0k2,2 =
−
Op
(log n)−
γH −1/2
2b
.
(cid:16)
Furthermore, under Models (5) and (6), if Assumption 3 holds, or Assumptions 3(a)-
(b) and 4 hold, then
(cid:17)
(π∗)
V
− V
(
π) =
Op
(cid:16)
(log n)−
γH−1/2
2b
.
(cid:17)
If b is large for
Corollary 2 considers two scenarios of the local modulus of continuity.
the mild ill-posed case or the severe ill-posed case is considered, the convergence rate of
the regret can be much slower. While for the mild ill-posed case with b
0, we nearly
attain the minimax optimal rate, n−
2+1/ min(γH ,γF ) , in the classical non-parametric regression
(Stone, 1982).
→
1
b
6 Numerical Studies
In this section, we perform thorough simulation studies to evaluate the numerical perfor-
mance of the proposed pricing policy learning method, PRINT, in terms of revenue regret.
Two benchmark offline pricing policy learning methods are compared with our method
under various simulation settings and a dataset from an online auto loan company.
1. Kallus and Zhou (2018) (and also Chen et al. (2016)) considered an inverse propen-
sity score-based policy learning method for continuous treatment under no unmea-
sured confounding. The method is implemented by first estimating the generalized
x, g), which is given by the ratio of two kernel density
propensity scores fP
|
fX,G(x, g). Then one can learn a linear policy
Q(x, g) =
estimators
πKZ that maximizes the estimated value
X,G(p
fP,X,G(p, x, g)/
|
b
b
n
b
K (h−
Yi
i=1
X
b
πKL(Xi)])
1[Pi −
Q(Xi, Gi)
n
K (h−
,
i=1
X
πKL(Xi)])
1[Pi −
Q(Xi, Gi)
.
2. We also compare with a regression-based method by using the following model that
b
b
|
p,1 , βreg
where βreg
p,2 , and βreg
g
optimal policy is given as
E[Y
P, G, X] = βreg
p,1 (X)P + βreg
p,2 (X)P 2 + βreg
g
(X, G),
are some nonparametric functions. Then the estimated
πreg(X) = min
{
max
p1,
{
βreg
p,1 (X)/[2
−
βreg
p,2 (X)]
.
, p2}
}
b
b
b
18
6.1 Simulation
6.1.1 Simulated Data Generation
We first generate (G, X, U) to satisfy Assumptions 3(a), (b), and (c), in which Assumption
3(c) can be guaranteed by Assumption 4. Specifically, let X
((0.25, 0.25)⊤, Σx = I2).
Then we generate G and U = (U1, U2) by
∼ N
(G, U1, U2)
X
|
∼ N
[μg + c⊤g X, μu1 + c⊤u1X, μu2 + c⊤u2X]⊤, diag(σ2
(cid:0)
g , σ2
u1, σ2
u2)
.
(cid:1)
According to structural equations (5) and (6), we generate price P and revenue Y with
previously generated (G, X, U). The coefficient functions
c⊤1 X,
βp,1(U, X) = U 2
1 −
βg(U, X, G) = (U 2
αg(U, X, G) = (U 2
1 + c⊤3 X)G + c4G,
2 + c⊤6 X)G + c7G,
βp,2(U, X) =
U1 + c⊤2 X
,
exp
βu,x(U, X) = cos(U1U2 + c⊤5 X),
(cid:9)
αu,x(U, X) = cos U2.
−
(cid:8)
It can be verified that they satisfy Assumption 3(a) and Assumption 4 and that βp,2(u, x)
≤
cp,2 for some cp,2 > 0 for all (u, x). Based on structural equations (5) and (6), we add two
−
independent noises to generate Y and P respectively, i.e.,
Y = βp,1(U, X)P + βp,2(U, X)P 2 + βg(U, X, G) + βu,x(U, X) + ǫy,
P = αg(U, X, G) + αu,x(U, X) + ǫp,
Uniform[
where ǫy, ǫp ∼
to calculate the regret.
−
1, 1], independently.
Under the above setting, an optimal pricing policy is given below, which will be used
π∗(X) = min
p2, max
(cid:26)
(cid:26)
c⊤1 X + (μu1 + c⊤u1X)2 + σ2
u1
μu1 + σ2
u1/2 + (c2 + cu1)⊤X
p1, −
exp
{
.
} (cid:27)(cid:27)
(17)
To control the degree of violation to Assumption 2(c) (IV exclusion restriction), in the
function βg(U, X, G), we consider c4 = 1 for a mild violation and c4 = 5 for a severe violation.
To control the strength of the invalid IV G, in αg(U, X, G), we set c7 = 1 for a weak IV
and c7 = 5 for a strong IV. The values of other parameters are given in Appendix B.
6.1.2 Simulation Results
(
(π∗)
We evaluate the learned policy 100 times by the Monte Carlo method on a noise-free
testing dataset of size 10,000. Figure 1 shows the box plots of the regrets of revenue
π)) of learned policies by different methods from 100 replicates of simulation.
(
V
For all combinations of IV strength and the violation of exclusion restriction, the policies
learned by the PRINT outperform the other two benchmark methods for both sample
sizes n = 1, 000 and 2, 000 and can achieve better performance with a larger sample size
n = 2, 000. When the IV is strongly relevant the price, the policies learned by the regression
− V
b
19
could achieve small regrets. However, when the IV is weakly relevant to the price, the
performance of policies learned by regression is unstable. Finally, the overall performance
of linear policies learned by Kallus and Zhou (2018) is not stable, partially due to that the
inverse of the generalized propensity scores is hard to estimate, and the confounding bias
caused by the unmeasured U.
IV = strong | Violation = mild
IV = strong | Violation = severe
40
35
t
e
r
g
e
r
30
25
40
35
t
e
r
g
e
r
30
25
IV = weak | Violation = mild
IV = weak | Violation = severe
1000
2000
1000
2000
n_samp
n_samp
PRINT
Regression
Kallus&Zhou(2018)
Figure 1: Boxplots of the regrets of learned pricing policy for 4 combinations of IV strength and
violation of exclusion restriction.
6.2 Real Data Applications
In this subsection, we study the numerical performance of the pricing strategy of person-
alized loans for an anonymous US auto lending company. We compare our method by
Kallus and Zhou (2018), a regression-based method, and the historical decision made by
the company. A major difference between the real data application and the previous simu-
lation study is that the structural equations (5) and (6) are potentially misspecified in the
real data.
We obtain the dataset CPRM-12-001: On-Line Auto Lending from the Center for
Pricing and Revenue Management at Columbia University1. It records the online auto loan
applications received by the company from Jul. 2002 to Nov. 2004. For each approved
application, the requested term, loan amount, annual percentage rate (APR), monthly
1https://www8.gsb.columbia.edu/cprm/research/datasets
20
London interbank offered rate (LIBOR), whether contracted or not, and some personal
information (e.g., FICO score) are recorded. For detailed descriptions, we refer the readers
to Phillips et al. (2015) and Ban and Keskin (2021, Table 3).
6.2.1 Problem Settings and Evaluation Method
For the pricing of the online auto loan company, we adopt the price defined in Ban and Keskin
(2021), which is the net present value of future payments less the loan amount, i.e.,
Term
P = Monthly Payment
×
τ =1
X
(1 + monthly LIBOR)−
τ
−
Loan Amount.
(18)
We set the feasible price range to be [$0, $40, 000].
To evaluate the pricing policy, it is necessary to construct a generative model since
the revenue depends on the price selected by the policy, which is not available in the
dataset. This is in contrast to supervised learning, where a testing dataset can be used to
evaluate prediction accuracy. Since the outcomes of whether contracted or not are binary
(accept/reject), instead of a linear demand, we adopt a logistic demand model used by
Ban and Keskin (2021) for generating the demand. Therefore the true expected revenue is
not a quadratic function of the price, conditioning on other factors. While this causes a
model mis-specification for our method, we indeed find that our method works well and is
robust to such a mis-specified revenue model. In addition, this serves as a complement to
the previous simulation study, where we studied a correctly specified model. In particular,
for a given feature vector x (including the constant term) and a price p, the probability of
. Then
accepting the contract, i.e., the expected demand, is modeled by
the expected revenue is p/[1 + exp
]. The population demand model,
−
which will be used to evaluate the revenue, is obtained by fitting a logistic regression with
l2-penalty with all records. We select the penalty parameter by 5-fold cross-validation.
1
α⊤x
α⊤x
β⊤x
1+exp
{−
β⊤x
×
{−
}
p
×
−
p
}
6.2.2
Implementation
It is worth noting that even a competitor's rate is available in this dataset. In practice,
however, we actually do not have reliable data to represent the competition in the auto
lending industry during the analyzed period of time (Phillips et al., 2015). Therefore, we
intentionally treat the competitor's rate as an unmeasured confounding and exclude it from
the feature vector. Further, given the loan amount, term, and LIBOR, the price of a loan
can be purely determined by the monthly payment. Therefore, to ensure that Assumption
2 (a) holds, we also exclude the monthly payment from the feature vector.
For PRINT, we choose the APR (annual percentage rate) for a loan as the instrumental
variable, which was used as the instrument for dealing with the endogeneity of the price
by Blundell-Wignall et al. (1992). Meanwhile, the loan rate is continuous and has a strong
direct effect on the continuous price, which indicates that it could be used as a strong
relevant IV. However, using the loan rate as a valid IV is questionable, since it may have a
21
direct effect on the eventual revenue, hence breaking the IV exclusion restriction. However,
we can safely use the loan APR as the invalid IV for our method since the IV exclusion
restriction has been relaxed.
For comparison, in addition to the two benchmark methods compared in Section 6.1, we
also consider the company's actual pricing policy and the optimal policy by maximizing the
revenue according to the learned population demand model. We use the first 60,000 records
(ordered by application time) of the dataset as the training data to learn the policies for
PRINT and two benchmark methods. Then we apply those learned policies to the testing
dataset of the rest 148,084 records and calculate the revenues by the learned demand model.
6.2.3 Results and Discussion
Table 1 summarizes the expected revenue for the pricing policy learned by the PRINT
against the benchmark policies, optimal policy, and policy used by the firm. The firm's
historical policy could attain 77.3% of the revenue if the optimal policy were used. This
satisfactory revenue is reasonable since the firm may have external information at the
pricing time that is not available in the offline records. The expected revenues obtained by
the policies learned by direct regression and Kallus and Zhou (2018) do not reach the firm's
historical revenue, partially because of the unobserved confounding issue and insufficient
offline data. In contrast, the policy learned by PRINT attains about 82.3% of the expected
revenue of the optimal policy and improves the firm's revenue by 6.5%.
Table 1: Values of pricing policies on the testing dataset.
Pricing Policy
Revenue ($1000)
Optimal
Firm PRINT Kallus and Zhou (2018) Regression
1.0766
0.8318
0.8858
0.1452
0.0913
0.20
0.15
y
t
i
s
n
e
D
0.10
0.05
0.00
Pricing Policy
Firm
Optimal
PRINT
Kallus&Zhou'18
Regression
0
2
4
6
8
10
Price ($1,000)
Figure 2: Personalized Pricing distributions on the testing dataset.
In Figure 2, we provide the density plots of the prices by the five pricing policies on the
testing dataset. It is clear that the distribution of prices suggested by PRINT is the closest
to the oracle optimal policy.
22
4.0
3.9
3.8
3.7
3.6
3.5
3.4
4.0
3.8
3.6
3.4
3.2
3.0
]
R
O
B
I
L
.
d
n
a
t
S
|
e
c
i
r
p
[
E
]
e
r
o
c
s
O
C
I
F
.
d
n
a
t
S
|
e
c
i
r
p
[
E
]
m
r
e
T
.
d
n
a
t
S
|
e
c
i
r
p
[
E
3.8
3.6
3.4
3.2
3.0
−1
0
1
2
3
−2.0 −1.5 −1.0 −0.5 0.0
0.5
1.0
1.5
Stand. LIBOR
Stand. Term
(a) LIBOR
(b) Term
]
l
a
v
o
r
p
p
a
l
i
t
n
u
s
y
a
d
.
d
n
a
t
S
|
e
c
i
r
p
[
E
4.0
3.8
3.6
3.4
3.2
−3
−2
−1
0
1
2
3
−2.0 −1.5 −1.0 −0.5
0.0
0.5
1.0
Stand. FICO score
Stand. days until approval
(c) FICO score
(d) Days until approval
Figure 3: Partial dependence plots of by pricing strategy by PRINT on important factors. All
factors are standardized by their mean and standard deviation, respectively.
23
To study the interpretability of the policy learned by PRINT, in Figure 3, we provide the
partial dependence plots of the learned policy on the four most important features. First,
as shown in Figure 3(a) and (b), the price increases with LIBOR and term, which agrees
with the definition of the price in (18). Second, Figure 3(c) shows that for customers with
higher FICO scores, we suggest lower prices as those customers have low risks of bad debts.
Finally, as shown in Figure 3(d), our policy tends to set higher prices for the applications
with longer processing times, this is likely because those applications have potential risks
that require longer review processes.
7 Conclusions
In this paper, we study offline personalized pricing under endogeneity by leveraging an
instrumental variable. The key challenges are (a) identification of the heterogeneous effect
of continuous price on revenue under unmeasured confounding; (b) a possibly invalid IV
that may violate the exclusion restriction; (c) solving conditional moment restrictions of
generalized residual functions. For (a) and (b), we generalized the identification results in
causal inference literature on relaxing exclusion restriction for discrete treatment to con-
tinuous treatment. For (c), we develop an adversarial min-max algorithm for learning the
optimal pricing strategy. Theoretically, we established the consistency and the convergence
rate of the proposed policy learning algorithm. For future work, it is interesting to extend
our work to learning a multi-stage policy strategy with offline data under endogeneity with
invalid IVs.
References
Ai, Chunrong and Xiaohong Chen (2003): "Efficient estimation of models with condi-
tional moment restrictions containing unknown functions," Econometrica, 71 (6), 1795–
1843. 4, 7, 14
Angrist, Joshua and Guido Imbens (1995): "Identification and estimation of local
average treatment effects," . 4
Angrist, Joshua D, Guido W Imbens, and Donald B Rubin (1996): "Identifica-
tion of causal effects using instrumental variables," Journal of the American Statistical
Association, 91 (434), 444–455. 7
Angrist, Joshua D and Alan B Keueger (1991): "Does compulsory school atten-
dance affect schooling and earnings?" The Quarterly Journal of Economics, 106 (4),
979–1014. 2
Ban, Gah-Yi and N Bora Keskin (2021): "Personalized dynamic pricing with machine
learning: High-dimensional features and heterogeneous elasticity," Management Science,
67 (9), 5549–5568. 3, 21
24
Bastani, Hamsa, David Simchi-Levi, and Ruihao Zhu (2022): "Meta dynamic pric-
ing: Transfer learning across experiments," Management Science, 68 (3), 1865–1881. 8
Bennett, Andrew and Nathan Kallus (2020): "The variational method of moments,"
arXiv preprint arXiv:2012.09422. 12
Biggs, Max (2022): "Convex Loss Functions for Contextual Pricing with Observational
Posted-Price Data," arXiv preprint arXiv:2202.10944. 4
Blundell, Richard, Xiaohong Chen, and Dennis Kristensen (2007): "Semi-
nonparametric IV estimation of shape-invariant Engel curves," Econometrica, 75 (6),
1613–1669. 2
Blundell-Wignall, Adrian, Marianne Gizycki, et al. (1992): Credit supply and
demand and the Australian economy, Economic Research Department, Reserve Bank of
Australia. 3, 4, 21
Burgess, Stephen, Adam Butterworth, and Simon G Thompson (2013):
"Mendelian randomization analysis with multiple genetic variants using summarized
data," Genetic Epidemiology, 37 (7), 658–665. 2
Cai, Hengrui, Chengchun Shi, Rui Song, and Wenbin Lu (2021): "Jump Interval-
Learning for Individualized Decision Making," arXiv preprint arXiv:2111.08885. 4
Chao, John C and Norman R Swanson (2005): "Consistent estimation with a large
number of weak instruments," Econometrica, 73 (5), 1673–1692. 5
Chen, Guanhua, Donglin Zeng, and Michael R Kosorok (2016): "Personalized
dose finding using outcome weighted learning," Journal of the American Statistical As-
sociation, 111 (516), 1509–1521. 4, 18
Chen, Xiaohong and Timothy M Christensen (2018): "Optimal sup-norm rates and
uniform inference on nonlinear functionals of nonparametric IV regression," Quantitative
Economics, 9 (1), 39–84. 4
Chen, Xiaohong and Demian Pouzo (2012): "Estimation of nonparametric condi-
tional moment models with possibly nonsmooth generalized residuals," Econometrica,
80 (1), 277–321. 12, 14, 15
--- (2015): "Sieve Wald and QLR inferences on semi/nonparametric conditional mo-
ment models," Econometrica, 83 (3), 1013–1079. 12
Chen, Xiaohong and Markus Reiss (2011): "On rate optimality for ill-posed inverse
problems in econometrics," Econometric Theory, 27 (3), 497–521. 4
Chernozhukov, Victor, Guido W Imbens, and Whitney K Newey (2007): "In-
strumental variable estimation of nonseparable models," Journal of Econometrics, 139
(1), 4–14. 7
25
Cui, Yifan and Eric Tchetgen Tchetgen (2021): "A semiparametric instrumen-
tal variable approach to optimal treatment regimes under endogeneity," Journal of the
American Statistical Association, 116 (533), 162–173. 4
Cutler, David M and Edward L Glaeser (1997): "Are ghettos good or bad?" The
Quarterly Journal of Economics, 112 (3), 827–872. 2
Darolles, Serge, Yanqin Fan, Jean-Pierre Florens, and Eric Renault (2011):
"Nonparametric instrumental regression," Econometrica, 79 (5), 1541–1565. 4
Dikkala, Nishanth, Greg Lewis, Lester Mackey, and Vasilis Syrgkanis (2020):
"Minimax estimation of conditional moment models," arXiv preprint arXiv:2006.07201.
12
Dud ́ık, Miroslav, John Langford, and Lihong Li (2011): "Doubly robust policy
evaluation and learning," arXiv preprint arXiv:1103.4601. 4
Foster, Dylan J and Vasilis Syrgkanis (2019): "Orthogonal statistical learning,"
arXiv preprint arXiv:1901.09036. 39
Guo, Zijian, Hyunseung Kang, T Tony Cai, and Dylan S Small (2018): "Confi-
dence intervals for causal effects with invalid instruments by using two-stage hard thresh-
olding with voting," Journal of the Royal Statistical Society: Series B (Statistical Method-
ology), 80 (4), 793–815. 5
Hall, Peter and Joel L Horowitz (2005): "Nonparametric methods for inference in
the presence of instrumental variables," Annals of Statistics, 33 (6), 2904–2929. 4
Han, Sukjin (2019): "Optimal dynamic treatment regimes and partial welfare ordering,"
arXiv preprint arXiv:1912.10014. 4
Kallus, Nathan and Angela Zhou (2018): "Policy evaluation and optimization with
continuous treatments," in International Conference on Artificial Intelligence and Statis-
tics, PMLR, 1243–1251. 18, 20, 22
--- (2020): "Confounding-robust policy evaluation in infinite-horizon reinforcement
learning," arXiv preprint arXiv:2002.04518. 4
Kang, Hyunseung, Anru Zhang, T Tony Cai, and Dylan S Small (2016): "In-
strumental variables estimation with some invalid instruments and its application to
Mendelian randomization," Journal of the American statistical Association, 111 (513),
132–144. 5
Kitagawa, Toru and Aleksey Tetenov (2018): "Who should be treated? empirical
welfare maximization methods for treatment choice," Econometrica, 86 (2), 591–616. 4
26
Koles ́ar, Michal, Raj Chetty, John Friedman, Edward Glaeser, and
Guido W Imbens (2015): "Identification and inference with many invalid instruments,"
Journal of Business & Economic Statistics, 33 (4), 474–484. 5
Korostelev, Aleksandr Petrovich and Olga Korosteleva (2011): Mathematical
statistics: asymptotic Minimax theory, vol. 119, American Mathematical Soc. 16
Lewbel, Arthur (2012): "Using heteroscedasticity to identify and estimate mismeasured
and endogenous regressor models," Journal of Business & Economic Statistics, 30 (1),
67–80. 3, 5
Manski, Charles F (2004): "Statistical treatment rules for heterogeneous populations,"
Econometrica, 72 (4), 1221–1246. 4
Miao, Rui, Zhengling Qi, and Xiaoke Zhang (2022): "Off-policy evaluation for
episodic partially observable markov decision processes under non-parametric models,"
arXiv preprint arXiv:2209.10064. 4, 35
Newey, Whitney K and James L Powell (2003): "Instrumental variable estimation
of nonparametric models," Econometrica, 71 (5), 1565–1578. 4, 7
Newey, Whitney K and Frank Windmeijer (2009): "Generalized method of mo-
ments with many weak moment conditions," Econometrica, 77 (3), 687–719. 5
Phillips, Robert, A Serdar S ̧ims ̧ek, and Garrett Van Ryzin (2015): "The effec-
tiveness of field price discretion: Empirical evidence from auto lending," Management
Science, 61 (8), 1741–1759. 3, 21
Pu, Hongming and Bo Zhang (2020): "Estimating optimal treatment rules with
an instrumental variable: A partial identification learning approach," arXiv preprint
arXiv:2002.02579. 4
Qi, Zhengling, Rui Miao, and Xiaoke Zhang (2022a): "Proximal learning for indi-
vidualized treatment regimes under unmeasured confounding," Journal of the American
Statistical Association, (just-accepted), 1–33. 4
Qi, Zhengling, Jingwen Tang, Ethan Fang, and Cong Shi (2022b): "Offline
Personalized Pricing with Censored Demand," Available at SSRN. 4
Qian, Min and Susan A Murphy (2011): "Performance guarantees for individualized
treatment rules," The Annals of Statistics, 39 (2), 1180. 4
Qiu, Hongxiang, Marco Carone, Ekaterina Sadikova, Maria Petukhova,
Ronald C Kessler, and Alex Luedtke (2021): "Optimal individualized decision
rules using instrumental variable methods," Journal of the American Statistical Associ-
ation, 116 (533), 174–191. 4
27
Shen, Tao and Yifan Cui (2022): "Optimal Individualized Decision-Making with Prox-
ies," arXiv preprint arXiv:2212.09494. 4
Staiger, Douglas O and James H Stock (1994): "Instrumental variables regression
with weak instruments," . 5
Stensrud, Mats J and Aaron L Sarvet (2022): "Optimal regimes for algorithm-
assisted human decision-making," arXiv preprint arXiv:2203.03020. 4
Stock, James H and Jonathan H Wright (2000): "GMM with weak identification,"
Econometrica, 68 (5), 1055–1096. 5
Stock, James H, Jonathan H Wright, and Motohiro Yogo (2002): "A survey of
weak instruments and weak identification in generalized method of moments," Journal
of Business & Economic Statistics, 20 (4), 518–529. 5
Stone, Charles J (1982): "Optimal global rates of convergence for nonparametric re-
gression," The Annals of Statistics, 1040–1053. 18
Sun, Baoluo, Zhonghua Liu, and Eric Tchetgen Tchetgen (2021): "Semi-
parametric Efficient G-estimation with Invalid Instrumental Variables," arXiv preprint
arXiv:2110.10615. 5
Tchetgen Tchetgen, Eric, BaoLuo Sun, and Stefan Walter (2021): "The GE-
NIUS approach to robust Mendelian randomization inference," Statistical Science, 36 (3),
443–464. 3, 5
Van der Vaart, Aad W (2000): Asymptotic statistics, vol. 3, Cambridge university
press. 14
Wainwright, Martin J (2019): High-dimensional statistics: A non-asymptotic view-
point, vol. 48, Cambridge University Press. 13, 37, 39
Wang, Jiayi, Zhengling Qi, and Chengchun Shi (2022): "Blessing from Ex-
perts: Super Reinforcement Learning in Confounded Environments," arXiv preprint
arXiv:2209.15448. 4
Wang, Linbo and Eric Tchetgen Tchetgen (2018): "Bounded, efficient and multi-
ply robust estimation of average treatment effects using instrumental variables," Journal
of the Royal Statistical Society. Series B, Statistical methodology, 80 (3), 531. 4
Windmeijer, Frank, Helmut Farbmacher, Neil Davies, and George
Davey Smith (2019): "On the use of the lasso for instrumental variables estimation
with some invalid instruments," Journal of the American Statistical Association, 114
(527), 1339–1350. 5
28
Zhao, Yingqi, Donglin Zeng, A John Rush, and Michael R Kosorok (2012):
"Estimating individualized treatment rules using outcome weighted learning," Journal of
the American Statistical Association, 107 (499), 1106–1118. 4
A A Detailed Practical Algorithm
F
H
and
In this section, we give a detailed practical implementation of Algorithm 1 when the func-
tion classes
are neural networks (NNs), in which the functions can be parameter-
ized by some NN parameters. Specifically, suppose that
H}
and that
.
F }
F
In the case of a large sample size, one can apply the stochastic gradient ascent/descent
Dn in each iteration in Algo-
with sub-sampled mini-batch data from the total batch data
α(k) by the respective optimization points, we can
f (k) and
rithm 1. Instead of updating
apply one-step update in each iteration. See details in Algorithm 2.
αθα(
for some Euclidean subspaces Θ
; θf ) : θf ∈
; θα) : θα ∈
Θ
and Θ
) = f (
) = α(
fθf (
H
Θ
=
=
F
{
•
•
•
•
{
H
b
π by solving a zero-sum game.
b
Algorithm 2: Estimation of
Dn =
n. Step sizes γα, γf > 0.
nB ≤
:
1
}
∈ {
Randomly sample a mini-batch DI =
Input: Batch data
parameters λnB, μnB > 0. Price range [p1, p2]. Maximum iteration K. Batch size
1
≤
For k
Zi = (Yi, Xi, Gi, Pi)
b
θ(0)
α . Tuning
n
i=1. Initial
0, . . . , K
θ(
−
f
−
b
b
{
}
1)
,
Zi}i
I with
∈
{
I
|
|
= nB.
θ(k)
f ←
θ(k)
f + γf ∇θf
b
θ(k)
α
b
θ(k+1)
α
End For
b
Output: Pricing policy
γα∇θα
←
−
b
ΨnB (αb
(cid:20)
θ(k)
α
, fb
θ(k−1)
f
)
fb
θ(k−1)
f
2
αb
(k)
θ
α
k
− k
,nB −
λnBk
fb
θ(k−1)
f
2
k
F
;
(cid:21)
ΨnB (αb
h
π = min
{
θ(k)
α
, fb
θ(k)
f
αb
) + μnBk
β(K)
p,1 /[2
2
H
θ(k)
α k
;
i
β(K)
p,2 ]
}
.
, p2}
max
{
p1,
−
b
b
b
B Details of Numerical Study
Following the data generating procedure in Section 6.1, the ground truth nuisance functions
of policy are
βp,1(X) = E [βp,1(U, X)
βp,2(X) = E [βp,2(U, X)
e
|
|
X] =
X] =
e
c⊤1 X + (μu1 + c⊤u1X)2 + σ2
u1,
exp
μu1 + σ2
u1/2 + (c2 + cu1)⊤X
−
−
(cid:8)
29
.
(cid:9)
Table 2: Simulation data parameters.
Parameter
μx
Σx
Value
[0.25, 0.25]⊤ diag(1, 1)
Parameter
cg
cu1
μg
2
cu2
Value
[0.25, 0.25]⊤ [0.3, 0.4]⊤
[0.2, 0.2]⊤
μu1
0.5
σ2
g
1
c3
μu2
0.3
σ2
u1
3
c4
Parameter
Value
Parameter
σ2
u2
1
c5
c1
c2
[0.3, 0.2]⊤ [0.1,
c6
0.3]⊤ [0.2,
−
c7
0.1]⊤ 1 or 5
−
Value
[0.4, 0.1]⊤
[1.2, 0.4]⊤
1 or 5
Then the oracle optimal pricing policy is
π∗(X) = min
p2, max
p1,
βp,1(X)/
βp,2(X)
−
= min
n
(
p2, max
n
(
e
p1, −
exp
oo
c⊤1 X + (μu1 + c⊤u1X)2 + σ2
e
u1
μu1 + σ2
u1/2 + (c2 + cu1)⊤X
.
))
All parameters used for the data generating procedure are listed in Table 2.
(cid:8)
(cid:9)
C Technical Proofs
C.1 Proof of Identification Results.
Proof of Lemma 1.. Without loss of generality, we assume X =
we have
∅
. By direct calculation,
P βp,1(U) + P 2βp,2(U) + βg(U, G) + βu(U)
G])Y ]
E [P
−
E [G])(P
E [(G
−
= E
(G
−
= E [(G
(cid:2)
−
+ E [(G
+ E
(G
+ E
(G
(cid:2)
+ E [(G
(cid:2)
E [G])(P
−
E [G])(P
−
E [G])(P
E [G])(P
E [G])(P
E [G])(P
−
−
−
−
−
−
−
|
E [P
|
E [P
|
E [P
E [P
E [P
E [P
−
|
|
|
|
G])
G])P ]
(cid:8)
E [βp,1(U)]
×
G])P (βp,1(U)
G])P 2
×
G])P 2 (βp,2(U)
(cid:3)
G])
E [βp,1(U)])]
−
E [βp,2(U)]
−
E [βp,2(U)])
] .
βg(U, G) + βu(U)
{
}
(cid:9)(cid:3)
(L1.A)
(L1.B)
(L1.C)
(cid:3)
30
It suffices to prove that (L1.A) – (L1.C) are zeros. By direct calculations,
E [βp,1(U)])]
G])P (βp,1(U)
−
E [βp,1(U)])
−
= E
E [P
−
= E
E [G])(P
−
|
E [G])P 2 (βp,1(U)
E [G])E [P
(L1.A) = E [(G
(G
−
E [(G
(cid:2)
−
E [G])Cov(βp,1(U), E
(G
−
E [(G
(cid:2)
−
= E [(G
−
+ E [(G
= 0.
E [G])E [P
−
E [G])E [P
|
E [G])E [P
−
|
|
−
G] P (βp,1(U)
E [βp,1(U)])]
G
(cid:3)
)
−
U, G
G] (αg(U, G) + αu,x(U)) (βp,1(U)
P 2
|
|
(cid:2)
(cid:3)
|
G] Cov (αg(U, G), βp,1(U)
G] Cov (αu,x(U), βp,1(U)
(cid:3)
G)]
G)]
|
|
E [βp,1(U)])]
−
Similarly, we can show that
(L1.B) = E
= E
(cid:2)
E
(cid:2)
−
= E
= 0.
(cid:2)
(G
−
(G
−
(G
(G
(cid:2)
−
E [P
E [G])(P
|
−
E [G])P 3 (βp,2(U)
E [G])E [P
−
E [G])Cov(βp,2(U), E
−
|
G])P 2 (βp,2(U)
E [βp,2(U)])
E [βp,2(U)])
−
G] P 2 (βp,2(U)
E [βp,2(U)])
(cid:3)
G
)
−
U, G
|
(cid:3)
(cid:3)
P 3
|
(cid:2)
(cid:3)
(cid:3)
Lastly, we show that
(L1.C) = E [(G
−
= E [(G
−
+ E [(G
−
E [P
E [G])(P
E [G])(αg(U, G)
E [G])(αu,x(U)
= E [(G
−
+ E [(G
= 0.
−
E [G])
{
E [G])
−
G])
βg(U, G) + βu(U)
{
]
}
|
E [αg(U, G)
G])
|
−
E [αu,x(U)])
βg(U, G) + βu(U)
{
−
G) + Cov(αg(U, G), βu(U)
Cov(αg(U, G), βg(U, G)
|
|
G) + Cov(αu,x(U)), βu(U)
Cov(αu,x(U), βg(U, G)
{
βg(U, G) + βu(U)
{
}
}
|
]
]
G)
]
}
G)
]
}
|
Proof of Lemma 2.. Without loss of generality, we assume X =
we have
∅
. By direct calculation,
P βp,1(U) + P 2βp,2(U) + βg(U, G) + βu(U)
E [G(G
−
= E
G(G
−
= E [G(G
(cid:2)
−
+ E [G(G
+ E
−
+ E
G(G
(cid:2)
+ E [G(G
(cid:2)
(G
E [G])(P
E [P
G])Y ]
−
E [G])(P
−
E [G])(P
−
E [G])(P
|
E [P
|
E [P
|
E [P
G])
G])P ]
(cid:8)
E [βp,1(U)]
×
G])P (βp,1(U)
E [βp,1(U)])]
−
E [G])(P
−
E [P
|
G])P 2
−
E [βp,2(U)]
−
E [G])(P
E [G])(P
|
E [P
E [P
×
G])P 2 (βp,2(U)
G])
(cid:3)
βg(U, G) + βu(U)
{
E [βp,2(U)])
] .
−
}
|
|
−
−
−
−
(cid:9)(cid:3)
(L2.A)
(L2.B)
(L2.C)
(cid:3)
31
Note that
E [βp,1(U)])]
G])P (βp,1(U)
−
E [βp,1(U)])
−
= E
E [P
−
= E
(L2.A) = E [G(G
E [G])(P
−
|
E [G])P 2 (βp,1(U)
G(G
−
E [G(G
E [G])E [P
(cid:2)
−
E [G])Cov(βp,1(U), E
G(G
−
E [G])E [P
E [G(G
(cid:2)
−
−
E [G])E [P
= E [G(G
|
−
E [G])E [P
+ E [G(G
= 0.
−
|
|
−
G] P (βp,1(U)
P 2
E [βp,1(U)])]
G
−
U, G
G] (αg(U, G) + αu,x(U)) (βp,1(U)
(cid:3)
)
|
|
(cid:2)
(cid:3)
|
G] Cov (αg(U, G), βp,1(U)
G] Cov (αu,x(U), βp,1(U)
(cid:3)
G)]
G)]
|
|
E [βp,1(U)])]
−
Similarly, we can show that
G(G
G(G
(L2.B) = E
= E
(cid:2)
E
(cid:2)
−
= E
G(G
(cid:2)
= 0.
−
−
G(G
−
(cid:2)
E [P
E [G])(P
|
−
E [G])P 3 (βp,2(U)
E [G])E [P
−
E [G])Cov(βp,2(U), E
−
|
G])P 2 (βp,2(U)
E [βp,2(U)])
E [βp,2(U)])
−
G] P 2 (βp,2(U)
E [βp,2(U)])
(cid:3)
G
)
−
U, G
|
(cid:3)
(cid:3)
P 3
|
(cid:2)
(cid:3)
(cid:3)
Lastly, we can show that
βg(U, G) + βu(U)
{
}
]
−
G])
(L2.C) = E [G(G
−
= E [G(G
−
+ E [G(G
= E [G(G
−
+ E [G(G
= E [G(G
|
−
−
E [G])(P
E [P
E [αg(U, G)
E [G])(αg(U, G)
|
E [αu,x(U)])
E [G])(αu,x(U)
{
−
E [G])
Cov(αg(U, G), βg(U, G)
|
{
E [G])
Cov(αu,x(U), βg(U, G)
−
|
{
E [G])] Cov(αu,x(U), βu(U)).
−
]
{
βg(U, G) + βu(U)
G])
βg(U, G) + βu(U)
G) + Cov(αg(U, G), βu(U)
G) + Cov(αu,x(U), βu(U)
}
}
]
Summarizing the first equation with (L2.A) – (L2.C) together, we have that
−
E [G(G
= E [G(G
−
+ E
G(G
+ E [G(G
(cid:2)
−
−
E [G])(P
E [P
G])Y ]
|
E [P
−
E [G])(P
×
E [G
G])P 2
−
E [G])] Cov(αu,x(U), βu(U)).
(cid:3)
G])P ]
|
E [P
−
X])(P
|
|
E [βp,1(U)]
E [βp,2(U)]
×
Next, we derive that
G])Y ]
|
E [P
E [P
−
(P
E [(P
= E
−
= E [P (P
G])]
(cid:8)
(cid:2)
+ Cov(αu(U), βu(U)).
|
E [P
G])
−
|
×
βp,1(U)P + βp,2(U)P 2 + βg(U, G) + βu(U)
P 2(P
E [βp,1(U)] + E
E [P
G])
−
|
×
E [βp,2(U)]
(cid:9)(cid:3)
(cid:2)
32
(cid:3)
|
G)
|
G)
]
}
]
}
(19)
(20)
By substituting (20) into (19), we obtain that
E [G])(P
E [P
G])Y ]
−
E [G(G
= E [G(G
−
+ E
G(G
−
+ E [G(G
(cid:2)
−
E [(P
−
E [G])(P
−
E [G])(P
E [G])]
E [P
× {
−
G])Y ]
|
= Cov(G(G
−
+ Cov(G(G
+ E [G(G
−
E [G]), P (P
−
E [G]), P 2(P
E [(P
−
E [G])]
×
|
E [P
|
E [P
−
G])P ]
×
G])P 2
|
E [βp,1(U)]
E [βp,2(U)]
×
(cid:3)
E [P (P
−
E
P 2(P
E [P
(cid:2)
|
E [P
E [P
−
−
|
|
|
−
G])]
E [P
E [P
G])
G]))E [βp,1(U)]
(cid:3)
−
|
G]))E [βp,2(U)]
G])Y ] ,
E [βp,1(U)]
E [βp,2(U)]
×
×
(cid:9)
−
which concludes our proof.
C.2 Proof of Estimation and Policy Learning
C.2.1 Proof of Consistency
Proof of Lemma 5. First, by Lemma 10,
Pr
Pr [
k
αn −
α0k2,2 > ǫ]
2
H ≤
For any b > 0, we select M0 , M0(b) such that Pr [
αnk
b
k
HM0 ,
(by Lemma 10). We only need to focus on the set
first part on the RHS of the inequality (21),
b
α0k2,2 > ǫ,
αn −
αnk
k
(cid:2)
≤
b
b
k
H
2
αnkH
k
+ Pr
b
=
Op(1). We consider
αnk
(21)
> M0
H
.
2
M0
> M0] < b for sufficiently large n
. For the
b
α
:
∈ H
k
2
H ≤
k
(cid:3)
M0}
(cid:3)
α
{
k
(cid:2)
Pr
αn −
k
(cid:2)
= Pr
b
α0k2,2 > ǫ,
αn −
αnk
α0k2,2 > ǫ,
b
k
k
2
H ≤
αnk
k
(cid:20)
M0
(cid:3)
2
M0,
H ≤
Φn(
αn)
inf
α
∈H
≤
Φn(α) +
Op(ηn)
(cid:21)
≤
≤
≤
Pr
b
∈HM0 :
α
(cid:20)
inf
α
−
k
α0
2,2>ǫ
k
b
Φn(α)
inf
α
∈H
≤
b
Φn(α) +
b
Op(ηn)
b
(cid:21)
(22)
Pr
Pr
∈HM0 :
α
(cid:20)
min
α0
inf
α
−
k
δn
2√cηΣ
"
n
q
b
Φn(α)
≤
2,2>ǫ
k
b
inf α
∈HM0 :
b
α0
α
k
−
b
Φn(α0) +
Op(ηn)
(cid:21)
2,2>ǫ Φ(α), inf α
k
k
α
−
α0
∈HM0 :
≤ Op(max
Φ(α)
2,2>ǫ
cηΣ
k
δ2
n, ηn}
)#
o
{
where the first equality is due to Assumption 6, the first inequality follows by the definition
αn and relaxing conditions of the event, the second inequality is due to optimality, and
of
the last inequality follows by Lemma 9.
b
33
Let φ0(ǫ) = inf α
only if Φ(α) = 0 for α
∈HM0 :
α
α0
2,2>ǫ
k
−
k
∈ H
α0k2,2 > ǫ,
δn
2√cηΣ
p
αnk
k
φ0(ǫ),
b
(cid:26)
Pr
≤
αn −
k
(cid:2)
min
Pr
b
(cid:20)
Then by letting b
↓
0, we have that Pr [
k
Φ(α), which is strictly positive since
α0 −
δ2
n, we have that
k2,2 = 0
α
k
. Then, with the Assumption 7 that ηn ≍
M0
2
H ≤
φ0(ǫ)2
(cid:3)
≤ Op(δ2
n)
cηΣ (cid:27)
αn −
α0k2,2 > ǫ]
→
0, as n
.
→ ∞
→
(cid:21)
0 for any ǫ > 0.
C.2.2 Proof for Convergence Rates
b
Proof of Theorem 2..
positive numbers. Let
proof of Lemma 5,
H
For all M > 1, suppose
is a sequence of non-increasing
Hα0,M0,ǫ for simplicity. By similar arguments of (22) in the
rn}
{
=
α0kps,α0 ≥
e
Mrn,
αn ∈
H
Pr
αn −
k
h
b
Pr
≤
i
e
≤
"
α
e
:
H
k
α
∈
−
inf
α0
ps,α0 ≥
k
M rn
b
Φn(α)
Φn(α0) +
Op(ηn)
#
Pr
≤
min
δn
2√cηΣ
(cid:26)
inf α
∈
b
e
:
H
q
b
ps,α0 ≥
k
α0
M rn
Φ(α), inf α
∈
e
:
H
α
k
−
By Assumption 8 that
α
k
α0k
−
2
ps,α0 ≤
δn
2√cηΣ
δn
2√cηΣccurv
Mrn ≤
ccurvΦ(α) for any α
inf
α0
e
H
:
k
α
∈
−
α
r
ps,α0 ≥
k
Φ(α)
cηΣ
.
M 2r2
n
cηΣccurv ≤
α
e
:
H
k
α
∈
−
inf
α0
ps,α0 ≥
k
M rn
Φ(α)
M rn
cηΣ
(cid:27)
)
δ2
n, ηn}
{
α
k
α0
−
ps,α0 ≥
k
≤ Op(max
, we have
∈
H
e
Φ(α), and
M rn
(23)
.
Therefore, by taking rn ≍
M
. Hence,
→ ∞
δn, the probability in LHS of (23) can be arbitrarily small as
k
αn −
αn −
k
b
α0kps,α0 =
α0k2,2 =
Op(δn), and
Op(ω(δn,
Hα0,M0,ǫ)),
where we directly apply the definition of local modulus of continuity.
b
34
C.2.3 Proof of Regret Rates
Proof of Theorem 3.. By (7) and (14), the regret can be bounded by
(π∗)
V
− V
(
π) =
= E
(cid:0)
{
= E (
b
Eπ∗
Ebπ
{
{
−
X, G, P ]
}
E[Y
βp,1(X)[π∗(X)
(cid:1)
|
−
β1,p(X) + β2,p(X)[π∗(X) +
b
π]
k2k
β2,pk2)
k
b
β1,p + β2,p[π∗ +
β1,pk2 + 2p2k
k2,
π
π∗
−
π∗
π∗
−
−
π
k2
π
k2
b
b
≤ k
(
≤
k
= Cβk
π(X)] + βp,2(X)[π∗(X)2
−
[π∗(X)
π(X)2]
}
π(X)])
π(X)]
}
b
−
b
b
(24)
k
b
Since
β1,pk2 + 2p2k
where Cβ ,
β2,pk2 > 0, the first inequality is due to the Cauchy-Schwartz
inequality, and the second inequality is due to the triangle inequality and the upper bound
of the policy price.
βp,2 ≥
−
π
k2 =
.
cp,2 for some constant cp,2 > 0, we have that
βp,1/[2βp,2]
}
, p2} −
β2,p]
, p2}k2
max
{
βp,1/[2
min
p1,
p1,
π∗
−
−
k
{
min
max
{
k
{
1, p2}
max
{
2cp,2
αn −
(cid:16)
α0k2,2,
k
−
[β1,p −
b
k
βp,2]
}
β1,p, β2,p −
b
b
b
b
.
k2,2
(cid:17)
where the first inequality is due to the range of βp,2 and that of policies in Π, and the
second inequality follows by the definition of α.
b
The results follow by directly applying the definition of local modulus of continuity.
C.2.4 Proof of Results in RKHS cases
Then Corollary 1 is a direct consequence of Theorem 2 by Example 1 in Miao et al.
(2022) and Lemma 11.
Proof of Corollary 2.. Corollary 2 can be obtained by directly applying Lemma 6 and
Corollary 1.
Specifically, for part (a), i.e., the mild ill-posed case: given λm(K
τm ∼
m−
2b, then the optimum m
∗
that solves
)
H
∼
m−
2γH and
η2
τm
min
N+
m
∈
2c
+ M0
∞
v
u
u
t
i=1
X
λi(K
λj(K
H
) + λm+1(K
)
H
,
is such that m
∗ ∼
(η2)−
1
2(γH −1/2+b) , and ω(η,
(η2)
γH −1/2
γH −1/2+b .
∼
∞
j=m+1
X
)
H
v
u
u
t
HM0)2
35
Thus, by Corollary 1 and Theorem 2, we have with probability at least 1
ζ,
−
α
k
α0k2,2 . ω(n−
−
1
2+1/ min(γH,γF ) log(n) +
. ω(n−
1
2+1/ min(γH,γF ) log(n) +
.
n−
1
2+1/ min(γH,γF ) log(n) +
log(1/ζ)
n
log(1/ζ)
n
,
,
r
r
log(1/ζ)
r
n !
Hα0,M0,ǫ)
HM0)
γH −1/2
γH −1/2+b
.
(π∗)
V
− V
(
π) =
Then the result follows by letting ζ = 1/n. By applying Theorem 3,
1
2+1/ min(γH,γF ) log(n)
n−
.
Op
(cid:16)
For part (b), the severe ill-posed case, given λm(K
(cid:17)
similarly obtain that the optimum m
∼
Thus, by Corollary 1 and Theorem 2, we have with probability at least 1
∗ ∼
m−
[log(1/η)]1/b, and ω(η,
∼
H
)
2γH and τm ∼
HM0)2
e−
[log(1/η)]−
b
mb, we can
2γH−1
.
b
ζ,
−
α
k
−
α0k2,2 . ω(n−
1
2+1/ min(γH,γF ) log(n) +
. ω(n−
1
2+1/ min(γH,γF ) log(n) +
. (log n)−
γH−1/2
2b
.
log(1/ζ)
n
log(1/ζ)
n
,
,
r
r
Hα0,M0,ǫ)
HM0)
By applying Theorem 3,
(π∗)
V
− V
(
π) =
Op
C.3 Additional Lemmas
b
(log n)−
γH−1/2
2b
(cid:16)
.
(cid:17)
Lemma 7 (Relating empirical and population regularization) For any given
have that with probability at least 1
ζ, uniformly for all f
,
f
2
eα
k
≤
1
2 k
f
k
2
eα + δ2
n max
n,eα − k
∈ F
f
k
B
1, k
2
F
,
(cid:27)
(cid:26)
−
(cid:12)
(cid:12)
2
f
k
k
(cid:12)
(cid:12)
log(1/ζ)
n
where δn = ̄δn +
2δ2
When λn ≥
B , with probability at least 1
n
q
O
(
ζ, uniformly for all f
,
∈ F
−
) and ̄δn upper bounds the critical radius of class
f
λnk
2
k
F
+
f
k
k
2
n,eα ≥
λn
2 k
f
2
k
F
+
1
2 k
f
2
eα −
k
δ2
n.
Lemma 8 (Relating Ψn and Ψ)
36
, we
∈ H
α
e
(25)
FB ×
W (
•
;
α).
e
(26)
(a) For any fixed α
∈ H
radius of the class W (
all f
,
*
∈ F
, let δn = ̄δn +
, α)
O
(
log(1/ζ)
n
) with ̄δn upper bounds the critical
ζ, uniformly for
× FB. Then with probability at least 1
q
−
Ψn(α, f )
|
−
Ψ(α, f )
| ≤ O
(cid:18)
f
δnk
k2,2 + δ2
n max
(cid:26)
1, k
f
kF
√B (cid:27)(cid:19)
.
(b) Given M0 > 0, uniformly for all α
upper bounds the critical radius of the class
∈ HM0 ⊂ H
, let δn = ̄δn +
log(1/ζ)
n
) with ̄δn
(
O
q
*
Then with probability at least 1
{
W (
, α)f (
) : α
∗
∈ HM0, f
.
∈ FB}
ζ, uniformly for all f
and h
∈ HM0,
∈ F
−
Ψn(α, f )
|
−
Ψ(α, f )
| ≤ O
(cid:18)
f
δnk
k2,2 + δ2
n max
2
F
f
k
B
1, k
(cid:26)
.
(cid:27)(cid:19)
Lemma 9 Suppose that Assumptions 5 – 7 are satisfied. With δn defined in Lemma 8,
(a) At the ground truth α0, we have that
Ψn(α0, f )
f
2
n,eα −
f
λnk
2
F ≤
k
k
− k
Φ(α0) +
Op(δ2
n) =
Op(δ2
n).
sup
f
∈F
(b) We have that unformly for all α
∈ HM0,
Ψn(α, f )
f
2
n,eα −
f
λnk
2
F ≥
k
k
− k
min
sup
f
∈F
δn
2√cηΣ
(cid:26)
Φ(α),
p
Φ(α)
cηΣ (cid:27)
− Op(δ2
n).
Lemma 10 (Bounded penalty) Suppose that Assumptions 5 – 7 are satisfied. Then
Op(1).
Lemma 11 (Critical radius for RKHS, Corollary 14.5 of Wainwright (2019)) Let
k
αnkH
=
b
FB =
is the reproducing
∞j=1 sorted in a decreasing order. Then the localized
. Suppose that K
F
F
f
f
B
2
k
}
F ≤
with eigenvalues
∈ F | k
{
kernel of
population Rademacher complexity is upper bounded by
λj(K
F
}
{
)
F
be the B-ball of a RKHS
Rn(
FB, δ)
≤ r
2B
n v
u
u
t
∞
j=1
X
min
λj(K
{
F
), δ2
.
}
37
C.3.1 Proof of Additional Lemmas
Proof of Lemma 6.. For any m
∈
N+, let a[m] = (a1, . . . , am)⊤. We have that
k
∆α
2
ps,α0
= a⊤[m]Γma[m]
k
+ 2
aiajE
i
m<j
X
≤
+
aiajE
i,j>m
X
a⊤[m]Γma[m]
((cid:18)
≥
≥
2
−
i
m<j
X
≤
a⊤[m]Γma[m] −
2
τmk
a[m]k
2
2 −
≥
dm(X; α0)
dα
((cid:18)
dm(X; α0)
dα
[ei]
⊤
Σα0(X)−
1
(cid:19)
[ei]
⊤
Σα0(X)−
1
(cid:19)
(cid:18)
dm(X; α0)
dα
(cid:18)
dm(X; α0)
dα
[ej]
(cid:19))
[ej]
(cid:19))
aiaj|
|
dm(X; α0)
dα
E
((cid:18)
[ei]
⊤
Σα0(X)−
1
(cid:19)
(cid:18)
dm(X; α0)
dα
[ej]
(cid:19))
aiaj|
|
cτm
i
m<j
X
≤
2cτm
ai|
|
j>m
X
aj|
|
m
i
X
≤
τmk
a[m]k
2
2 −
≥
2cτm
λi(K
)
H
s
m
i
X
≤
i
sX
m
≤
2
ai|
|
λi(K
λj(K
)
H
j>m
sX
)
H
2
aj|
|
λj(K
)
H
v
u
u
t
∞
j>m
X
aj|
|
λj(K
2
j=1
X
M0.
) ≤
H
τmk
a[m]k
2
2 −
≥
Therefore,
2cτmM0v
u
u
t
∞
i=1
X
λi(K
)
H
j>m
sX
λj(K
H
),
since
∆α
2
2,2 ≤ k
a[m]k
k
k
2
2 + M0λm+1(K
)
H
2
∆α
k
≤ k
ps,α0/τm + 2cM0v
u
u
t
i=1
X
η, by taking minimum over m
∞
λi(K
H
H
j>m
sX
N+, we have that
∈
)
λj(K
) + M0λm+1(K
).
H
Since
∆α
k
kps,α0 ≤
[ω(η,
HM0)]2
≤
2c
η2/τm + M0
∞
v
u
u
t
i=1
X
λi(K
)
H
j>m
sX
min
N+
m
∈
λj(K
H
) + λm+1(K
)
H
38
.
By Theorem 14.1 in Wainwright (2019), we have that with
Proof of Lemma 7..
probability at least 1
−
ζ, for all f
f (
2
n,2 − k
which, by definition, is equivalent to
)⊤W (
α)
∗
k
*
;
k
(cid:12)
(cid:12)
e
∈ FB =
)⊤W (
f (
*
f
∈ F
{
;
α)
2
2
k
∗
:
k
≤
f
k
1
2k
2
F ≤
B
,
}
f (
*
)⊤W (
;
α)
k
∗
2 + δ2
2
n,
(cid:12)
(cid:12)
1
2k
f
k
eα + δ2
2
n,
e
≤
e
f
k
k
2
n,eα − k
f
2
eα
k
(cid:12)
(cid:12)
) and ̄δn upper bounds the critical radius of
(cid:12)
(cid:12)
(
log(1/ζ)
n
where δn = ̄δn +
some given B > 0. Due to the star-convexity of
above inequality with f
f
f √B/
kF
←
q
O
k
f
,
∈ F
, for any f with
. Therefore, with probability at least 1
F
k
k
f
F
2
;
α) for
W (
FB ×
> B, we can apply
ζ, for any
e
∗
−
and as a result,
f
k
2
n,eα − k
f
2
eα
k
≤
1
2 k
f
k
(cid:12)
(cid:12)
k
(cid:12)
(cid:12)
eα + δ2
2
n max
1, k
(cid:26)
2
F
f
k
B
,
(cid:27)
f
λnk
2
k
F
+
f
k
k
2
n,eα ≥
f
λnk
k
2
+
1
2k
f
2
eα −
k
f
2
k
F
k
+
1
2 k
(cid:19)
δ2
n max
1, k
(cid:26)
f
2
eα −
k
δ2
n.
F
δ2
n
B
2
F
f
k
B
(cid:27)
λn −
≥
(cid:18)
When λn ≥
2δ2
B , we have that with probability at least 1
n
ζ, uniformly for all f
,
∈ F
−
f
λnk
2
k
F
+
f
k
k
2
n,eα ≥
λn
2 k
f
2
k
F
+
1
2 k
f
2
eα −
k
δ2
n.
(27)
(28)
Proof of Lemma 8..
f (X) for any f
Foster and Syrgkanis (2019), we have that
Part (a): For any fixed α, f (X)⊤W (Z; α) is Lipschitz in
∈ FB and the boundedness of W (Z; α). By applying Lemma 11 in
Ψn(α, f )
|
−
Ψ(α, f )
| ≤ O
f
δnk
k2,2 + δ2
n
,
where δn = ̄δn +
2
f
FB. If
F ≥
with probability at least 1
log(1/ζ)
n
k
k
(
) and ̄δn upper bounds the critical radius of the class W (
, α)
(cid:0)
(cid:1)
O
B, we apply the above inequality for the function f √B/
q
*
×
kF ∈ FB, then
f
k
ζ, uniformly for all f
,
−
Ψn(α, f )
|
−
Ψ(α, f )
f
δnk
| ≤ O
(cid:18)
∈ F
k2,2 + δ2
n max
1, k
(cid:26)
f
kF
√B (cid:27)(cid:19)
.
Part (b): Similarly, f (X)⊤W (Z; α) is Lipschitz in (f (X), W (Z; α)) for any f
α
∈ HM0. By applying Lemma 11 in Foster and Syrgkanis (2019) again, we have that
∈ FB and
Ψn(α, f )
|
−
Ψ(α, f )
| ≤ O
W (
(δnk
*
, h)⊤f (
)
k2 + δ2
n)
∗
f
(δnk
k2,2 + δ2
n),
≤ O
39
(
log(1/ζ)
n
) and ̄δn upper bounds the critical radius of
where we require that δn = ̄δn +
the class
O
q
, α)f (
f
If
probability at least 1
2
F ≥
k
k
∗
B, we apply the above inequality for the function f √B/
{
*
) : α
∈ HM0, f
.
∈ FB}
W (
ζ, uniformly for all f
−
Ψn(α, f )
|
−
Ψ(α, f )
| ≤ O
(cid:18)
δnk
and h
∈ F
k2,2 + δ2
f
k
∈ HM0, we have that
f
k
B
1, k
F
.
2
n max
(cid:26)
(cid:27)(cid:19)
f
kF ∈ FB, then with
Proof of Lemma 9..
Part (a): Notice that
sup
f
∈F
Ψn(α0, f )
f
k
− k
2
F
f
λnk
k
k2,2 + δ2
f
2
n,eα −
δnk
h
f
≤
sup
f
∈F
−
sup
f
≤
Ψ(α0, f ) + C1
1
2 k
f
k
2
eα +
(cid:20)
Ψ(α0, f )
λn
2 k
1
4k
−
f
k
∈F
+ sup
f
∈F
C1δnk
f
k2,2 −
2
F −
k
2
eα −
1
4 k
f
+ sup
f
∈F
C1/√Bδ2
nk
f
kF −
n + δ2
nk
f
kF
/√B
δ2
n
(cid:21)
λn
4 k
w.p. at least 1
f
2
k
F
2
eα
k
λn
4 k
f
2
k
F
+
O
(δ2
n),
i
−
2ζ
where the first inequality is due to Lemma 7 and Lemma 8 with δn satisfies conditions
therein. In the second inequality,
sup
f
∈F
C1δnk
f
k2,2 −
1
4 k
f
2
eα ≤
k
sup
f
∈F
C1δnk
f
k2,2 −
2
2,2 ≤ Op(δ2
n), and
C1/√Bδ2
nk
f
kF −
sup
f
∈F
λn
4 k
f
k
n/λn) =
Op(δ2
n).
f
ceα
4 k
k
F ≤ Op(δ4
2
Ψ(α0, f )
at least 1
The result follows by that supf
1
eα −
4k
k
Part (b): By Lemma 8 (b), we have that there is a constant C such that, with probability
∈ HM0,
k2,2 + δ2
f
ζ, uniformly for all f
Ψn(α, f )
|
Ψ(α, f )
λn
4 k
and α
/√B
= 0.
∈ F
1 +
| ≤
kF
−
−
−
C
∈F
k
k
f
f
f
F
n
.
2
2
where δn also upper bounds the critical radius of the class
FL2
. Consider two cases:
2
H}
k
α0
−
α
k
n
W (
*
{
; α)fα(
) : α
∈ HM0, f
∈
o(cid:17)
∗
δnk
(cid:16)
40
fαk2,2 ≥
Case 1◦:
k
have that rfα ∈ FL2
Ψn(α, f )
sup
f
k
∈F
δn. Then let r = δn/(2
[0, 1/2]. By star convexity of
fαk2,2)
k
∈
, we
F
α
α0
−
H as well. Then, by optimality,
2
k
f
2
n,eα −
f
λnk
2
F ≥
k
k
− k
Ψn(α, rfα)
= rΨn(α, fα)
2
2
rfαk
− k
r2
n,eα −
fαk
λnk
n,eα + λnk
rfαk
fαk
F
2
−
k
.
2
F
(cid:1)
For the second term, by Lemma 7,
(cid:0)
r2
fαk
k
2
n,eα + λnk
fαk
2
F
(cid:0)
(cid:1)
≤
≤
≤
≤
2
F
eα + δ2
2
r2(2
fαk
k
2,2 + δ2
2
r2(2ceαk
fαk
(ceα/2 + 1/4)δ2
n +
(ceα/2 + 1/4)δ2
n +
n + δ2
fαk
/B + λnk
nk
n + δ2
fαk
nk
F
δ2
n/4B + λn
δ2
n/4B + λn
fαk
/B + λnk
fαk
k
F
L2
α
k
(cid:0)
(cid:1)
2
2
2
F
)
fαk
)
2
F
2
α0k
ζ, for some constant C > 0,
−
(cid:1)
H
.
For the first term, by Lemma 8, with probability at least 1
(cid:0)
rΨn(α, fα)
rΨ(α, fα)
rΨ(α, fα)
rΨ(α, fα)
−
−
−
≥
≥
≥
−
rCδn
W (
; α)⊤fα(
)
∗
*
fαk2,2 + δn)
Cδnr (C1k
(cid:0)
Cδn (C1δn/2 + δn/2) ,
k
k2 + δn
(cid:1)
where
rΨ(α, fα) =
2
k
E[m(X; α)⊤fα(X)]
δn
fαk2,2
δn
fαk2,2
=
≥
≥
≥
2
k
δn
2 {k
δn
2 {k
δn
2 (s
k
(cid:8)
fαk2,2 − k
fαk2,2 −
Φ(α)
cηΣ −
ηL}
fαk
2
2,2 −
E[fα(X)
−
m(X; α)]⊤fα(X)
fα(
)
•
−
m(
•
; α)
k2,2}
(cid:9)
2ηL
)
by definition of Φ(α) and triangle ineq.
Combining above inequalities we have, uniformly for all α
∈ HM0,
Ψn(α, f )
f
2
n,eα −
f
λnk
2
F ≥
k
k
− k
sup
f
∈F
δn
2√cηΣ
p
Φ(α)
(δ2
n).
− O
Case 2◦:
that
fαk2,2 < δn. Choose r = 1, and repeat the same procedure in Case 1◦, we claim
k
Ψn(α, f )
f
2
n,eα −
f
λnk
2
F ≥
k
k
− k
sup
f
∈F
Φ(α)
cηΣ − O
(δ2
n).
41
In fact, since
Ψn(α, f )
f
2
n,eα −
f
λnk
2
F ≥
k
k
− k
Ψn(α, fα)
fαk
2
n,eα −
λnk
fαk
,
2
F
− k
sup
f
∈F
where by Lemma 7, with probability at least 1
ζ,
fαk
k
2
n,eα −
λnk
fαk
2
F ≤
≤
≤
−
eα + δ2
2
n + δ2
fαk
2
nk
k
fαk2,2 + δ2
2ceαk
n +
n + (δ2
(2ceα + 1)δ2
2
2
F
fαk
δ2
n/B + λn
n/B + λn)L2
/B + λnk
fαk
F
L2
α
k
−
2
α0k
α
(cid:1)
−
k
(cid:0)
H
2
H
α0k
,
and by Lemma 8, with probability at least 1
ζ,
Ψn(α, fα)
Ψ(α, fα)
Ψ(α, fα)
Ψ(α, fα)
≥
≥
≥
−
Cδn
W (
k
Cδn (C1k
(cid:0)
(δ2
n),
−
−
− O
, α)⊤fα(
)
∗
*
fαk2,2 + δn)
k2 + δn
(cid:1)
where
Ψ(α, fα)
≥
=
E
m(X; α)⊤fα(X)
2
k
m(
(cid:2)
•
m(
; α)
k
; α)
m(
; α)
•
•
k
; α)
m(
•
Φ(α)
cηΣ − O
≥ k
≥ k
≥ k
≥
k
k
)
2,2 + E
m(X; α)⊤ [fα(X)
(cid:3)
2
m(
; α)
(cid:8)
k2,2k
2,2 − k
•
2
fαk2,2 +
(
2,2 −
k
k
2
(δn + ηL) ηL
2,2 −
(δ2
n).
fα(
•
)
fα(
−
•
m(X; α)]
−
m(
−
m(
•
; α)
; α)
(cid:9)
k2,2
fα(
k2,2)
k
•
)
•
−
m(
•
; α)
k2,2
Then the claim follows by substituting above inequalities into supf
λnk
Proof of Lemma 10.. First, by definition of
αn, we have that
k
f
F
.
2
Ψn(α, f )
f
2
n,eα −
k
− k
∈F
Φn(
b
αn) = sup
f
∈F
sup
f
b
Ψn(
αn, f )
f
− k
Ψn(α0, f )
b
k
2
f
2
n,eα −
b
n,eα −
2
F
k
2
f
λnk
f
λnk
2
H
+ μnk
+ μnk
αnk
α0k
b
2
∈F
≤
− k
k
Op(δ2
n),
where the first inequality is due to the optimization, the second is due to Lemma 9(a).
2
λnk
α0k
f
k
F ≥
Op(1).
b
f
n,eα −
− k
k
2
Op(1) =
+
H
0, we have that μnk
Because supf
n). Hence
αn, f )
α0k
Op(δ2
2
H ≤
αnk
αnk
αnk
μnk
μnk
≤
+
∈F
k
k
H
H
F
2
2
+
2
H
Ψn(
2
H ≤ k
b
b
b
42
|
|
http://arxiv.org/abs/2302.12668v2 | 2023-05-16T09:56:52 | 2023-02-24T14:48:28 | Improving the Data Efficiency of Multi-Objective Quality-Diversity
through Gradient Assistance and Crowding Exploration | Quality-Diversity (QD) algorithms have recently gained traction as
optimisation methods due to their effectiveness at escaping local optima and
capability of generating wide-ranging and high-performing solutions. Recently,
Multi-Objective MAP-Elites (MOME) extended the QD paradigm to the
multi-objective setting by maintaining a Pareto front in each cell of a
map-elites grid. MOME achieved a global performance that competed with NSGA-II
and SPEA2, two well-established Multi-Objective Evolutionary Algorithms (MOEA),
while also acquiring a diverse repertoire of solutions. However, MOME is
limited by non-directed genetic search mechanisms which struggle in
high-dimensional search spaces. In this work, we present Multi-Objective
MAP-Elites with Policy-Gradient Assistance and Crowding-based Exploration
(MOME-PGX): a new QD algorithm that extends MOME to improve its data efficiency
and performance. MOME-PGX uses gradient-based optimisation to efficiently drive
solutions towards higher performance. It also introduces crowding-based
mechanisms to create an improved exploration strategy and to encourage
uniformity across Pareto fronts. We evaluate MOME-PGX in four simulated robot
locomotion tasks and demonstrate that it converges faster and to a higher
performance than all other baselines. We show that MOME-PGX is between 4.3 and
42 times more data-efficient than MOME and doubles the performance of MOME,
NSGA-II and SPEA2 in challenging environments. | [
"Hannah Janmohamed",
"Thomas Pierrot",
"Antoine Cully"
] | 10.1145/3583131.3590470 | [
{
"@title": "doi",
"@href": "http://dx.doi.org/10.1145/3583131.3590470",
"@rel": "related",
"@type": null
},
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12668v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12668v2",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.NE",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.NE",
"cs.AI",
"cs.LG",
"cs.RO"
] | Improving the Data Efficiency of Multi-Objective
Quality-Diversity through Gradient Assistance and Crowding
Exploration
Hannah Janmohamed
Imperial College London, InstaDeep
London, United Kingdom
[email protected]
Thomas Pierrot
InstaDeep
Boston, USA
[email protected]
Antoine Cully
Imperial College London
London, United Kingdom
[email protected]
3
2
0
2
y
a
M
6
1
]
E
N
.
s
c
[
2
v
8
6
6
2
1
.
2
0
3
2
:
v
i
X
r
a
ABSTRACT
Quality-Diversity (qd) algorithms have recently gained traction
as optimisation methods due to their effectiveness at escaping lo-
cal optima and capability of generating wide-ranging and high-
performing solutions. Recently, Multi-Objective MAP-Elites (mome)
extended the qd paradigm to the multi-objective setting by main-
taining a Pareto front in each cell of a map-elites grid. mome
achieved a global performance that competed with nsga-ii and
spea2, two well-established multi-objective evolutionary algorithms,
while also acquiring a diverse repertoire of solutions. However,
mome is limited by non-directed genetic search mechanisms which
struggle in high-dimensional search spaces. In this work, we present
Multi-Objective MAP-Elites with Policy-Gradient Assistance and
Crowding-based Exploration (mome-pgx): a new qd algorithm that
extends mome to improve its data efficiency and performance. mome-
pgx uses gradient-based optimisation to efficiently drive solutions
towards higher performance. It also introduces crowding-based
mechanisms to create an improved exploration strategy and to
encourage greater uniformity across Pareto fronts. We evaluate
mome-pgx in four simulated robot locomotion tasks and demon-
strate that it converges faster and to a higher performance than
all other baselines. We show that mome-pgx is between 4.3 and 42
times more data-efficient than mome and doubles the performance
of mome, nsga-ii and spea2 in challenging environments.
CCS CONCEPTS
• Theory of computation → Evolutionary algorithms; • Ap-
plied computing → Multi-criterion optimization and decision-
making; • Computer systems organization → Evolutionary ro-
botics.
KEYWORDS
Quality-Diversity, Multi-Objective Optimisation, MAP-Elites, Neu-
roevolution
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 ACM
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].
GECCO '23, July 15–19, 2023, Lisbon, Portugal
© 2023 Association for Computing Machinery.
ACM ISBN 979-8-4007-0119-1/23/07. . . $15.00
https://doi.org/10.1145/3583131.3590470
ACM Reference Format:
Hannah Janmohamed, Thomas Pierrot, and Antoine Cully. 2023. Improving
the Data Efficiency of Multi-Objective Quality-Diversity through Gradient
Assistance and Crowding Exploration. In Proceedings of Genetic and Evolu-
tionary Computation Conference (GECCO '23). ACM, New York, NY, USA,
10 pages. https://doi.org/10.1145/3583131.3590470
Figure 1: mome-pgx algorithm. At each iteration, solutions
are sampled, mutated and added back to the archive based
on their Pareto-dominance and crowding distance. Separate
to this main qd loop, a critic network per objective function
is trained periodically, using transitions from a buffer.
1 INTRODUCTION
Quality-Diversity (qd) algorithms form a new optimisation par-
adigm designed to acquire a set of high-performing and diverse
solutions, rather than the single optimum obtained by many tra-
ditional optimisation methods. This approach has proven useful
in many domains where having more than one solution is a de-
sirable outcome. For example, in robotics, learning a repertoire of
controllers allows the robot to adapt in the event of damage [1, 4].
Similarly, qd algorithms have also been used to generate portfolios
of architectural designs [15], create video game content [20] and
manage scheduling tasks [30]. Even in applications where only
a single solution is sought, qd has been observed to be a highly
effective optimisation approach [14]. Specifically, maintaining a
divergent population of solutions creates an implicit exploration
GECCO '23, July 15–19, 2023, Lisbon, Portugal
Janmohamed, et al.
strategy, helping the optimisation process to avoid getting stuck in
local minima and resulting in a higher global performance [14, 21].
As qd optimisation becomes increasingly capable of tackling
complex problems, attention turns to how we can leverage them in
the multi-objective case. Indeed, many real-life applications don't in-
volve just a single objective, but rather a multitude of sophisticated
and potentially contrasting ones. Canonical examples, such as wind
turbine control [16] or computer hardware design [36], often seek
the maximisation of some performance objective whilst minimising
a cost function and obeying other safety constraints. But the scope
and range of multi-objective problems is vast, including domains
that range from drug design [18] to satellite communication [7].
The recently introduced Multi-Objective MAP-Elites (mome) [28]
unifies methods from Multi-Objective (mo) optimisation with the
qd framework. Traditional mo algorithms don't aim to find a single
optimal solution, but rather a set of solutions, each of which repre-
sents a different optimal trade-off of the given objectives. This set,
referred to as the Pareto front, provides the end user with a variety
of solutions to pick from. To incorporate this goal into qd, mome
aims to find a large collection of Pareto fronts, each of which occu-
pies a different behavioural niche. While mome shows promising
results, it relies on non-directed genetic mutation operators, making
it limited to simple tasks with low-dimensional search spaces.
In this paper, we present Multi-Objective MAP-Elites with Policy-
Gradient Assistance and Crowding-based Exploration (mome-pgx):
a data-efficient and high-performing Multi-objective Quality-Diversity
(moqd) algorithm for tasks that can be formulated as Markov Deci-
sion Processes (MDP). The algorithm is visualised in Figure 1 and
builds on top of mome: Pareto fronts of solutions are stored in cells
of a map-elites grid and, at each iteration, solutions are selected,
mutated and potentially re-added to the grid based on their fit-
ness. However, our proposed method makes two key contributions
to improve the performance and data efficiency of mome. Firstly,
mome-pgx uses gradient-based mutations to find high performing
solutions for each objective. Secondly, it uses crowding-based crite-
ria to alter the selection and addition mechanisms of mome in order
to increase exploration in sparse regions of the objective space and
encourage a uniform distribution of points on the Pareto fronts.
We evaluate mome-pgx on four simulated robotic control tasks
using large neural-networks and compare its performance to a
variety of standard qd and mo baselines. We find that mome-pgx
outperforms all standard baselines across all moqd metrics in each
of the tasks and doubles the performance of mome, nsga-ii and
spea2 in challenging tasks. Furthermore, mome-pgx is shown to be
between 4.3 and 42 times more data-efficient than mome. Finally,
we provide an ablation study to demonstrate that encompassing
gradients and using crowding-mechanisms are both essential for
improving the performance of mome. Our code implementation
was containerised and implemented using the QDax framework
[22] for all methods and baselines, and is available at: https://github.
com/adaptive-intelligent-robotics/MOME_PGX.
2 BACKGROUND
2.1 Quality-Diversity Optimisation
Traditional optimisation problems aim to find the single solution
x from a search space X which maximises an objective function
f : X → R. By contrast, Quality-Diversity (qd) algorithms extend
this objective by additionally encompassing a descriptor function
c : X → Rd which maps solutions from the search space to d-
dimensional descriptor vectors. Rather than seek a single solution
x, qd algorithms aim to find a population of solutions xi ∈ X which
both maximise the objective f and have diverse descriptor vectors.
map-elites algorithms [25, 28, 31] are a simple, yet powerful
family of qd algorithms which achieve the qd goal by discretising
the set of possible behaviour descriptors S = c (X), referred to as the
descriptor space, into a grid structure with k cells Si which is used
to store solutions. Specifically, the solution xi is stored in the cell
Si that corresponds to its descriptor c (xi ). In each iteration of map-
elites, a batch of solutions is selected from the grid and mutated
to form new solutions. Then, the new solutions are evaluated and
potentially added back to the grid structure. Specifically, if the cell
corresponding to the new solution's descriptor is empty, it is added.
Otherwise, the new solution only replaces the existing one if it is
higher-performing. This loop is repeated for a set budget and, as
the algorithm progresses, the grid structure becomes incrementally
populated with more diverse and higher-quality solutions.
2.2 Multi-objective Optimisation
A multi-objective optimisation problem considers the simultaneous
maximisation of many objectives, f1 (x), f2 (x), ...fm (x), rather than
a single one. Usually, these objectives come as a trade-off so there
is not a single optimal solution, but rather a set of solutions that
achieve different compromises across these objectives. Accordingly,
the notion of Pareto-dominance is often used to induce a prefer-
ence over solutions. Given two solutions x1 and x2 we say that x1
dominates x2 [36], or x1 ≻ x2, if:
∀i ∈ {1, 2, ..., m} : fi (x1) ≥ fi (x2)
∧
∃j ∈ {1, 2, ..., m} : fj (x1) > fj (x2) .
(1)
That is, one solution dominates another if it scores at least as
high as the other across all objectives and strictly higher in at least
one. Given a set of candidate solutions S, the Pareto front is the
set of solutions P (S) ∈ S that are not dominated by any other
solutions in S. In other words, the Pareto front represents all of
the best possible trade-offs of the objective functions. The goal of
mo optimisation is to approximate the Pareto front over the entire
search space of solutions, P (X), known as the optimal Pareto front.
The performance of mo algorithms is commonly quantified via
the hypervolume metric [2, 34] which reflects the coverage of the
objective space achieved by solutions on the Pareto front. As visu-
alised in Figure 2, for two objectives, this corresponds to the union
of rectangles covered by solutions on the Pareto front [37]. More
generally, the hypervolume Ξ of a Pareto front P is defined as:
Ξ(P) = λ(x ∈ X | ∃ s ∈ P, s ≻ x ≻ r ) ,
(2)
where λ denotes the Lebesgue measure and r is a pre-determined
and fixed reference point [2, 28]. Limitations to this metric include
its reliance on defining a suitable reference point r which can impact
on its magnitude. However, it is regarded as a reliable mo perfor-
mance metric due to its monotonic and scale-invariant properties
[2].
Improving the Data Efficiency of Multi-Objective Quality-Diversity
GECCO '23, July 15–19, 2023, Lisbon, Portugal
unnecessary computation can be avoided. While this can reduce
the number of required evaluations by more than an order of mag-
nitude [23], it relies on having a accurate surrogate model which
may be difficult to obtain.
Other works focus on creating a better exploration strategy.
For example, Covariance Matrix Adaptation MAP-Elites (cma-me)
[10] uses several emitter distributions to guide the exploration
process toward the direction of, for example, highest diversity or
performance. Or, more recently, Multi-Emitter MAP-Elites (me-map-
elites) includes a heterogeneous set of emitters and then uses a
bandit algorithm to determine which combination of them to use to
maximise the proportion of solutions that are added to the archive.
Some qd methods only consider the subset of problems that can
be formalised as MDPs. In these tasks, solutions xi ∈ X actually
encode parameters for policies πxi , for an agent that interacts in a
sequential environment at discrete time-steps t. At each time step,
the agent observes its current state st and chooses an action at
which leads to a subsequent state st +1 and reward rt . The policy
of the agent determines which action is taken in each time-step,
P(at |st ), and the aim of the task is to find the policy that maximises
the expected return of the agent over T time-steps:
J (x) =
T
∑︁
j=0
γ jr (s j , a j ) .
(3)
Here, γ is known as a discount factor: a weighting coefficient that
expresses the preferences between short-term and future rewards.
Policy Gradient Assisted MAP-Elites (pga-me) takes tasks from
this MDP setting and employs techniques from the td3 algorithm
[12] in order to improve the optimisation process. Specifically, as
solutions are evaluated in the main qd loop, transition tuples of
(st , at , rt , st +1) are collected and stored in a replay buffer B. These
samples are used to train a critic network Qθ that approximates
the action-value function,
Q (st , at ) = E
(cid:20) T
∑︁
γ jr (s j , a j )
(cid:21)
,
(4)
j=t
which captures the value of taking action at from the state st .
These critic estimates can consequently be used to form a policy
gradient estimate:
∇xi J (xi ) = E(cid:2) ∇xi πxi (s) ∇aQθ (s, a) | a=πxi (s)
(cid:3) .
(5)
Intuitively, the policy gradient provides the direction in which a
solution xi should be updated in order to maximise the reward of
the agent. In each iteration of pga-me some solutions are mutated
via gradient-based updates and, to maintain exploration, others are
mutated via genetic mutations. This accelerates the optimisation
process since gradient-information quickly highlights promising re-
gions of the solution space, while genetic search enforces thorough
exploration in these regions [8].
More recently, Pierrot and Macé et al. [27] built upon pga-me
by using gradients to improve both the fitness and the diversity
of solutions. Specifically, rather than rely on genetic variations for
exploration, they introduced a Diversity Policy Gradient operator
to improve exploration of states at each time step. Alternatively,
Differentiable Quality-Diversity (dqd) [9] is a gradient-based ap-
proach that does not rely on an MDP formulation but assumes
Figure 2: Two Pareto fronts and their hypervolumes with re-
spect to a given reference point for a bi-objective problem.
All of the points on the blue (outer) Pareto front strictly dom-
inate the points on the green (inner) Pareto front and, ac-
cordingly, the blue Pareto front has a larger hypervolume.
3 RELATED WORKS
3.1 Multi-Objective Quality-Diversity
Multi-Objective Quality-Diversity (moqd) combines the goals of
qd and mo optimisation, with the aim of returning the Pareto front
with maximum hypervolume in each cell of the descriptor space. To
the best of our knowledge, Multi-Objective MAP-Elites (mome) [28]
is the only proposed method that has been specifically designed
to tackle the moqd problem. Its algorithmic approach is a natural
extension to map-elites where, in each iteration of the algorithm,
solutions are randomly selected from the population, mutated and
potentially re-added to the population based on their fitness. How-
ever, unlike map-elites which stores at most one solution in each
cell, mome stores a Pareto front in each descriptor cell. If a new
solution is on the Pareto front of the cell that corresponds to its
descriptor, it is added to the grid. Otherwise, if the new solution
dominates an existing solution on this front, it replaces it. Since the
new solution could dominate several solutions in the cell's existing
Pareto front, it is possible for it to replace more than one solu-
tion. mome was shown to achieve a competitive mo performance
compared to popular mo baselines, while also acquiring a diverse
repertoire of behaviours.
Another method of note is Multi-Criteria Exploration (mcx) [15]
which also follows a usual map-elites loop but uses a tournament
ranking strategy to assess a solution's performance across multiple
objectives. Specifically, mcx uses a "T-DominO score" which reflects
how balanced solutions are across all objectives. If new a solution
achieves a higher T-DominO score than the existing solution in the
cell, it replaces it. While this approach is desirable in some contexts,
it makes the assumption a priori that all objectives are of equal
preference. Furthermore, mcx does not aim to obtain a Pareto front
of solutions and so, while we note its relevance, we consider it to
be closer related to traditional mono-objective qd methods.
3.2 Data-efficient Quality-Diversity
Recent works have proposed modifications to qd algorithms in
order to improve their computational cost. For example, some meth-
ods use surrogate models to estimate the performance of solutions
without directly evaluating them [13, 19, 23, 24]. As such, solutions
that are predicted to be low-performing can be filtered out and
GECCO '23, July 15–19, 2023, Lisbon, Portugal
Janmohamed, et al.
differentiable objective and descriptor functions, and incorporates
their gradients into a variation operator which greatly improves
search efficiency. Subsequently, Tjanaka et al. adapted this algo-
rithm for MDP tasks where the environment is not differentiable
by instead using evolutionary strategies and techniques from td3
to form gradient approximations [29].
3.3 Multi-objective Evolutionary Algorithms
Evolutionary algorithms are often applied to mo problems since
their population-based approach lends itself naturally to finding
Pareto fronts. In general, they work by initialising a population of
solutions and then employing carefully designed selection, muta-
tion and replacement operators in order to encourage exploration
in promising regions of the solution space and hence drive perfor-
mance of solutions toward the optimal Pareto front.
nsga-ii [6] is one such method that is driven by biased selection
mechanisms. At each iteration, the population is first organised
into sets of Pareto fronts: the first front is the Pareto front over
all solutions; the second front is the Pareto front over all solutions
except those that belong to the first front, and so on. Then solutions
in each front are assigned a crowding distance score which reflects
the density of the region of objective space that they occupy. Finally,
an ordering over all solutions is calculated based on the previous
two steps: solutions belonging to higher fronts and lying in less
dense areas of the objective space are preferred. This ordering is
used to bias the selection probability of solutions. As a result, nsga-
ii has been demonstrated to achieve Pareto fronts that are both
high performing and well spread.
spea2 [35] is an alternative, long-established mo algorithm that
has a similar approach. Specifically, each individual is assigned a
strength score that reflects the number of solutions that it domi-
nates. Then, each solution is assigned a raw strength equal to the
total strength scores of the solutions that dominate it. A lower raw
strength is desirable as it means that it is dominated by fewer solu-
tions. The selection probability of a solution is proportional to its
raw strength and the corresponding density of the objective space
that it lies in. Similar to nsga-ii, this encourages more exploration
around individuals that are high-performing and that lie in less
populated regions of the objective space.
A multitude of other mo evolutionary algorithms exist and we
refer the reader to a comprehensive survey [34] for a summary of
other approaches. However, to the best of our knowledge, mome
is the only mo method that actively maintains diversity over the
descriptor space.
4 MOME-PGX
In this section, we present mome-pgx, a new moqd algorithm. Our
proposed method uses policy gradient (pg) mutation operators
in order to efficiently drive solutions towards high performance
in each objective, while maintaining a divergent search through
traditional genetic variation operators. mome-pgx also improves on
the uniform selection and replacement mechanisms from mome by
instead encouraging exploration around solutions that lie in less
crowded regions of the objective space. Details for each of these
contributions are found in the next sections and the pseudo-code
for the mome-pgx can be found in Algorithm 1.
Algorithm 1 mome-pgx pseudo-code
Input:
• A map-elites archive A, with k cells, and an empty Pareto
front of size P in each cell
• the batch size B and total number of iterations N
• m objective functions f1, ..., fm and a descriptor function c
• an empty replay buffer B
• pairs of actor, critic and target networks for f1, ..., fm
// Initialisation
Generate initial candidate solutions xk
Find descriptors c (xk ) and fitnesses f1 (xk ), ..., fm (xk ) of xk
Add initial solutions to A and update Pareto fronts
Add transitions collected by xk to buffer B
Train actor and critic networks on samples from B
// Main loop
for iter = 1 → N do
// Sample solutions
Sample B non-empty cells from A with uniform probability
Calculate crowding distances in each sampled cell
In each sampled cell's Pareto front, sample a solution x with
probability proportional to the crowding distances of solutions
// Generate offspring
Apply ga variation to B/2 sampled solutions
Apply pg variation to (B/2) ÷ m sampled solutions for m
objective functions
// Evaluate offspring
Find descriptors and fitness values for offspring
Store transitions from offspring in buffer B
Train pg networks
// Add to archive
Find cell corresponding to descriptor of each offspring
Add offspring to cells and recompute Pareto fronts
if Pareto front length > P then
Calculate crowding distances of solutions in cell
Remove solutions with minimum crowding distance
// Update iterations
iter ← iter +1
return A
4.1 Gradient-Assisted Mutations
In mome-pgx, we extend the benefits of gradient-based optimisa-
tion that have been observed in pga-me to the multi-objective case
by maintaining a critic network per objective function. In each
iteration, half of the solutions are mutated via a Genetic Algorithm
(ga) variation operator and the remaining solutions are divided
into equal batch-sizes to be mutated with policy-gradients per ob-
jective function. So, for example, given a total batch-size of 256
and a bi-objective task, 128 of the solutions are mutated via the ga
variation operator, 64 are mutated according to the gradient for the
Improving the Data Efficiency of Multi-Objective Quality-Diversity
GECCO '23, July 15–19, 2023, Lisbon, Portugal
first objective and the remaining 64 solutions are mutated according
to the gradient of the second objective. mome-pgx also employs
the same network training procedures as the td3 and pga-me al-
gorithms, such as using an actor network πφ to calculate a target
value for critic training and introducing pairs of critic networks
to minimise bootstrapping errors. We refer the interested
Qθ1
reader to the original pga-me [26] and td3 [12] papers for further
implementation details.
, Qθ2
4.2 Crowding-based selection and replacement
In mome-pgx, we also introduce crowding-based selection and re-
placement mechanisms in order to induce a more targeted explo-
ration strategy and improve the quality of the Pareto fronts obtained
in each cell of the map-elites grid.
To select offspring solutions at each iteration, mome first uni-
formly samples a cell from the map-elites grid and then uniformly
samples a solution from the corresponding Pareto front. To illustrate
the limitations of this, we first note that since the objective func-
tions are continuous, it is possible to fill gaps in a Pareto front with
solutions that represent marginally different trade-offs, making the
existing Pareto front more dense rather than actively extending its
coverage. Therefore, if solutions are not well spread on the Pareto
front, uniform selection mechanisms can create an unintentional
cycle: exploration is more likely to take place in more crowded ar-
eas of the Pareto front since there are more solutions there, which
in turn may make that region even more dense, and so on. As this
cycle continues, solutions that lie in sparser regions of the objec-
tive space will become increasingly less likely to be picked, and
exploration in these regions will be neglected.
To address this, mome-pgx uses a biased selection mechanism
based on a solution's crowding distance, similar to nsga-ii [6]. As
illustrated in Figure 3, the crowding distance is calculated as the
average Manhattan distance between solutions and their neigh-
bours in the objective space [6]. For most solutions, we take the
average distance to their two neighbouring solutions. However,
for solutions at the boundaries of the Pareto front, we use the sin-
gle nearest-neighbour. When sampling solutions in each iteration
of mome-pgx: first, a cell is chosen with uniform probability and
then a solution from the corresponding Pareto front is selected
with probability proportional to its crowding distance. By conse-
quence, solutions in sparser regions of the front are more likely to
be selected.
Figure 3: Left: crowding distances calculations for creating
selection probabilities. Right: illustration of mome-pgx re-
placement mechanism. When the Pareto Front is at maxi-
mum capacity, the new solution replaces the solution which
has the smallest crowding distance.
Another point of difference between mome and mome-pgx is
their Pareto front addition mechanisms. In both algorithms, the
Pareto front in each cell is chosen to be a fixed maximum size (e.g.,
50), which allows the algorithm to be parallelised and enables us
to exploit the recent advances in massive hardware acceleration
[22]. However, in mome, if a new solution is added to a cell that is
at full capacity according to this maximum, it randomly replaces an
existing solution. This approach pays no attention to the value of
different solutions in terms of the trade-off of objectives they pro-
vide, and may result in loss of objective space coverage if boundary
solutions are replaced. In particular, we note that two solutions that
lie close together in the objective space provide the end user with
a more similar trade-off of objectives than two solutions that lie
farther apart. Therefore, we should prefer to retain solutions that
are dissimilar in the objective space, to provide the end-user with
the greatest variety and smoothness of contiguous trade-offs.
mome-pgx addresses this limitation by retaining solutions ac-
cording to their crowding distances. As illustrated in Figure 3, if the
Pareto front exceeds the maximum length, the solutions with the
maximum crowding distances are retained. In order to prevent ero-
sion of coverage of the front, boundary points are always assigned
infinite crowding distances, as in spea2 [35].
5 EXPERIMENTS
5.1 Evaluation Tasks
Figure 4: Brax tasks: agents aim to move forward as quickly
as possible, while minimising their energy consumption.
We evaluate our approach on continuous control robotic tasks
using the Brax suite [11]. We choose four robot morphologies from
the suite: the Ant, HalfCheetah, Hopper and Walker2d, visualised
in Figure 4. The solutions of the task correspond to the parameters
of closed-loop neural-network controllers that control the torque
commands at ∈ [−1, 1] of the robot at each time step t, based
on their current state st characterised by the robot's propriocep-
tive sensors. For each task, we used a two layer neural network
each with 64 neurons, corresponding to solution space sizes of
6472, 5766, 5123 and 5702 for the Ant, HalfCheetah, Hopper and
Walker2d respectively.
The aim of the task is to acquire a set of controllers that enable
the robot to walk forward in different gaits, as fast as possible
while minimising its energy consumption over T = 1000 timesteps.
To characterise a solution's gait, its descriptor corresponds to the
proportion of time that the robot spends on each of its legs [4, 26, 28]:
ci (x) =
1
T
T
∑︁
t =1
ci,t
for i = 1, ..., L ,
(6)
GECCO '23, July 15–19, 2023, Lisbon, Portugal
Janmohamed, et al.
Figure 5: Performance of mome-pgx and all other baseline algorithms for each of the tasks. The curves show the median
performance across 15 replications and the shaded regions show the inter-quartile range.
where L is the number of legs of the robot and ci,t = 1 when the
leg is in contact with the floor at time step t and 0 otherwise. The
energy consumption f1 and forward motion f2, are taken as:
f1 = − (cid:205)T
t =1 ||at ||2 ,
f2 = (cid:205)T
t =1
xt −xt −1
δt
,
(7)
where || * ||2 denotes the Euclidean norm, xt denotes the robot's
center of gravity position at time step t and δt denotes the length of
one time-step. Following the implementation of the Brax authors,
we also add a weighting coefficient to f1, which is different for each
task, to satisfy constraints on the robot's centre of gravity.
5.2 Evaluation Metrics
We evaluate the performance of algorithms based on four metrics:
1) moqd-score. Given the set of all solutions in the current
archive A and a descriptor space S that has been tessellated into
k cells Si , the moqd-score is the sum of hypervolumes of Pareto
fronts from each cell in the map-elites grid [28]:
k
∑︁
i=1
Ξ(Pi ), where ∀i, Pi = P (x ∈ A|c (x) ∈ Si ) .
(8)
Analogous to the qd-score in the mono-objective case [5], this
metric aims to reflect both the coverage of the descriptor space and
the performance of the solutions.
2) global-hypervolume. We also evaluate performance via
the global hypervolume. This is the hypervolume of the Pareto front
formed from all solutions in the archive, equivalent to the standard
Pareto front of canonical mo algorithms [28]. This metric allows us
to compare the best set of possible trade-offs of the objectives that
we can achieve regardless of a solution's descriptor.
3) maximum sum of scores. We also compare the performance
of solutions using the maximum sum of scores of the objective func-
tions. This allows direct comparison with traditional qd algorithms,
which use the sum of rewards as a single objective.
4) coverage. The coverage is the proportion of cells of the
archive that are non-empty, reflecting the diversity of solutions in
the descriptor space. This metric is reported in Appendix A as all
qd methods achieve a similar coverage.
5.3 Baselines
We compare mome-pgx to the following four baselines: 1) mome,
2) pga-me, 3) nsga-ii, 4) spea2. Since pga-me is not explicitly a
multi-objective algorithm, we sum the two objectives in Equation
7 to form a single objective. Additionally, we note that using the
same number of cells for pga-me would not be a fair comparison.
For example, when we use a map-elites grid with k cells each with
a maximum Pareto front length of P, this would lead to a maximum
population size of k × P in mome-pgx, but only a maximum popula-
tion size of k in pga-me. Therefore, we use a grid tessellated into
k × P cells for pga-me. By the same logic, we use a population size
of k × P for nsga-ii and spea2.
On the other hand, having a different number of cells for pga-
me and mome-pgx also makes comparison of the moqd-score and
coverage unfair. Moreover, neither nsga-ii or spea2 even use a
tessellated grid to maintain their populations. Therefore, for these
baselines, we also maintain a passive archive with the same number
Improving the Data Efficiency of Multi-Objective Quality-Diversity
GECCO '23, July 15–19, 2023, Lisbon, Portugal
of cells and maximum Pareto front length as mome and mome-pgx.
At each iteration we take all of the solutions from the pga-me, nsga-
ii and spea2 archives and use them to fill the passive archives via
the normal Pareto front addition rules. All metrics that we report for
comparison are then calculated from these passive archives. Since
the passive archives do not interact within the main algorithmic
loop, the behaviour of the baselines remains unchanged.
5.4 Experiment designs
We run each experiment for the same total budget of 4000 itera-
tions with a batch-size of 256, corresponding to a total of 1,024,000
evaluations. For mome and mome-pgx, we use a CVT tessellation
[31] with 128 centroids and a maximum Pareto front length of 50
in each centroid. Accordingly, pga-me uses a CVT tessellation of
128 × 50 = 6400 centroids, while nsga-ii and spea2 have popula-
tion sizes of 6400. For all experiments, we chose the ga variation
operator to be Iso+LineDD operator [32] with σ1 = 0.005 and
σ2 = 0.05. The reference points were chosen to be the empirically
observed minima of the objective functions for of the each environ-
ments, as given in Appendix B, and were kept the same for each of
the experiments. The hyperparameters used for neural networks
in pga-me, mome-pgx and the ablations were the same for each
experiment and are provided in Appendix C. Each experiment was
repeated for 15 different seeds.
Figure 6: The final repertoires obtained from one optimisa-
tion run of mome-pgx, colour-coded by hypervolume. Only
tasks with two-dimensional descriptors are visualised.
5.5 Experimental Results
The results of our experiments are displayed in Figure 5. We also
report the p-values obtained from a Wilcoxon signed-rank test [33]
with a Holm-Bonferroni correction [17], under the null hypothesis
that the mome-pgx results come from the same distribution as the
other baselines. The key conclusion is that mome-pgx outperforms
or matches the performance of all other baselines, across all metrics
in each of the environments.
The results demonstrate that mome-pgx achieves a higher moqd-
score in all tasks (p < 2.2 × 10−2 in every experiment), indicating
that it is better at finding high-performing Pareto fronts that span
the descriptor space compared to other baselines. This performance
is highlighted by the final archives visualised in Figure 6. Notably,
Figure 5 shows that in the challenging Ant and Hopper tasks, the
moqd-score of mome-pgx is double that of mome, nsga-ii and
Figure 7: The global Pareto fronts obtained from one optimi-
sation run for mome-pgx and all other baseline algorithms.
spea2. Across all tasks, mome-pgx requires between 4.3 and 42
times fewer evaluations than mome to reach the same moqd-score.
mome-pgx also outperforms all other baselines on the global-
hypervolume metric (p < 4.3 × 10−3 in every experiment) in all of
the tasks, meaning that it is able to produce the best set of possible
trade-offs across each of the objectives. Interestingly, pga-me also
outperformed the other mo baselines, despite the fact that it does not
actively seek a Pareto front of solutions. The strong performance
of mome-pgx and pga-me highlights the value of gradient-based
approaches for tasks with large search spaces. Indeed, examining
the global Pareto fronts attained by each of the algorithms in Figure
7, we see that mome-pgx and pga-me were able to find solutions
that were high-performing across both of the objectives but mome,
spea2 and nsga-ii often failed to find solutions with high forward
velocity. We also note that, although pga-me does explicitly include
energy consumption within its reward, mome-pgx finds many so-
lutions that achieve the same forward velocity as solutions from
pga-me, but at a lower energy cost. This is most likely due to the
difference in scales of each of the objectives, meaning that the
mono-objective fitness used in pga-me is predominantly composed
of the forward velocity reward and does not sufficiently prioritise
energy consumption. However, this highlights one problem with
using such a scalarised reward, which is that finding the coefficients
with which to weight each objective can prove difficult.
Finally, we note that mome-pgx also demonstrates excellent
mono-objective performance via the maximum sum of scores met-
ric. mome-pgx outperforms all other mo baselines (p < 4.8 × 10−4
in every experiment). Moreover, mome-pgx outperformed pga-me
in the Ant task (p = 5 × 10−4) and there was no statistically signifi-
cant difference between mome-pgx and pga-me on the other three
tasks. This result is particularly interesting because while pga-me
GECCO '23, July 15–19, 2023, Lisbon, Portugal
Janmohamed, et al.
Figure 8: Performance of mome-pgx and all ablation algorithms for each of the tasks. The curves show the median performance
across 15 replications and the shaded regions show the inter-quartile range.
explicitly optimises for the sum of rewards, mome-pgx does not.
This suggests that optimising over each of the objectives separately
could help to provide better stepping stone solutions than those
found in pga-me.
5.6 Ablation Study
We also compare mome-pgx to a series of ablations. The first, mo-
pga, is the same as mome but with pg variations for each objective.
The second, mo-pga (only forward), is the same as mo-pga but
only uses pg variations for the forward velocity. Similarly, mo-pga
(only energy), is also the same as mo-pga but only uses pg varia-
tions for the energy consumption. Finally, mome-crowding uses
no policy gradients and simply extends mome to include crowding-
based sampling and addition.
The first key observation from the ablation study is that mome-
pgx outperforms all ablation algorithms in the Ant, Hopper and
Walker2d tasks (p < 1 × 10−2 in all experiments). This highlights
that neither the crowding-based mechanism nor the policy gradient
variation operator is solely responsible for the strong performance
of mome-pgx but rather a combination of the two. Interestingly,
the value each of the mome-pgx components varies according to
the task. For example, in the Hopper task, mome-crowding has a
higher moqd-score than mo-pga (p = 4.8 × 10−4) but the reverse is
true in the Ant and Walker2d tasks (p = 6.1 × 10−5 on both tasks).
The second key observation is that mo-pga (only forward) out-
performs mo-pga (only energy) in the Ant, Hopper and Walker2d
tasks (p < 1 × 10−2 in all experiments), demonstrating that pol-
icy gradient mutations across different objectives are not equally
valuable. In fact, mo-pga (only forward) led to a higher a global-
hypervolume and maximum sum of scores than mo-pga in the
Ant task, and there was no statistical difference between mo-pga
and mo-pga (only forward) on the moqd-score in the Ant, Hop-
per and Walker2d tasks. This can be explained by the fact that the
objectives are not equally straightforward to optimise. Specifically,
we note that low-energy solutions can be found relatively straight-
forwardly through ga search mechanisms alone, as demonstrated
by mome, spea2 and nsga-ii performances. This lessens the need
to use pg mutations to directly minimise the energy cost and weak-
ens the benefit of these mutations for the overall performance of
the algorithm. Despite this, since this result is likely to be highly
task-specific, we still propose that mome-pgx uses mutations from
all objective functions. However, we note that an interesting fu-
ture line of work would be to dynamically adjust the proportion of
solutions mutated according to each objective [3].
6 CONCLUSION
In this work, we introduced mome-pgx, a new moqd algorithm that
demonstrably succeeds at generating large collections of diverse
and high-performing solutions, across multiple objective functions.
Our experimental analysis shows that mome-pgx improves the
sample-efficiency of mome in tasks that can be formalised as MDPs.
It does this by using pg variation operators to accelerate the search
process and crowding-based mechanisms to maintain exploration
over the objective space. In future lines of work, we would like to
explore moqd approaches in tasks with many more objectives.
Improving the Data Efficiency of Multi-Objective Quality-Diversity
GECCO '23, July 15–19, 2023, Lisbon, Portugal
[22] Bryan Lim, Maxime Allard, Luca Grillotti, and Antoine Cully. 2022. Acceler-
ated Quality-Diversity for Robotics through Massive Parallelism. arXiv preprint
arXiv:2202.01258 (2022).
[23] Bryan Lim, Luca Grillotti, Lorenzo Bernasconi, and Antoine Cully. 2022.
Dynamics-aware quality-diversity for efficient learning of skill repertoires. In
2022 International Conference on Robotics and Automation (ICRA). IEEE, 5360–
5366.
[24] Bryan Lim, Alexander Reichenbach, and Antoine Cully. 2022. Learning to walk
autonomously via reset-free quality-diversity. In Proceedings of the Genetic and
Evolutionary Computation Conference. 86–94.
[25] Jean-Baptiste Mouret and Jeff Clune. 2015. Illuminating search spaces by mapping
elites. arXiv preprint arXiv:1504.04909 (2015).
[26] Olle Nilsson and Antoine Cully. 2021. Policy gradient assisted map-elites. In
Proceedings of the Genetic and Evolutionary Computation Conference. 866–875.
[27] Thomas Pierrot, Valentin Macé, Felix Chalumeau, Arthur Flajolet, Geoffrey
Cideron, Karim Beguir, Antoine Cully, Olivier Sigaud, and Nicolas Perrin-Gilbert.
2022. Diversity Policy Gradient for Sample Efficient Quality-Diversity Optimiza-
tion. In ICLR Workshop on Agent Learning in Open-Endedness.
[28] Thomas Pierrot, Guillaume Richard, Karim Beguir, and Antoine Cully. 2022.
Multi-Objective Quality Diversity Optimization. arXiv preprint arXiv:2202.03057
(2022).
[29] Bryon Tjanaka, Matthew C. Fontaine, Julian Togelius, and Stefanos Nikolaidis.
2022. Approximating Gradients for Differentiable Quality Diversity in Reinforce-
ment Learning. In Proceedings of the Genetic and Evolutionary Computation Confer-
ence (Boston, Massachusetts) (GECCO '22). Association for Computing Machinery,
New York, NY, USA, 1102–1111. https://doi.org/10.1145/3512290.3528705
[30] Neil Urquhart, Emma Hart, and William Hutcheson. 2019. Quantifying the effects
of increasing user choice in map-elites applied to a workforce scheduling and
routing problem. In International Conference on the Applications of Evolutionary
Computation (Part of EvoStar). Springer, 49–63.
[31] Vassilis Vassiliades, Konstantinos Chatzilygeroudis, and Jean-Baptiste Mouret.
2018. Using Centroidal Voronoi Tessellations to Scale Up the Multidimensional
Archive of Phenotypic Elites Algorithm.
IEEE Transactions on Evolutionary
Computation 22, 4 (2018), 623–630. https://doi.org/10.1109/TEVC.2017.2735550
[32] Vassiiis Vassiliades and Jean-Baptiste Mouret. 2018. Discovering the elite hyper-
volume by leveraging interspecies correlation. In Proceedings of the Genetic and
Evolutionary Computation Conference. 149–156.
[33] Frank Wilcoxon. 1992. Individual comparisons by ranking methods. Springer.
[34] Aimin Zhou, Bo-Yang Qu, Hui Li, Shi-Zheng Zhao, Ponnuthurai Nagaratnam
Suganthan, and Qingfu Zhang. 2011. Multiobjective evolutionary algorithms: A
survey of the state of the art. Swarm and Evolutionary Computation 1, 1 (2011),
32–49. https://doi.org/10.1016/j.swevo.2011.03.001
[35] Eckart Zitzler, Marco Laumanns, and Lothar Thiele. 2001. SPEA2: Improving the
strength Pareto evolutionary algorithm. TIK-report 103 (2001).
[36] Eckart Zitzler and Lothar Thiele. 1998. An evolutionary algorithm for multiob-
jective optimization: The strength pareto approach. TIK-report 43 (1998).
[37] Eckart Zitzler and Lothar Thiele. 1998. Multiobjective optimization using evolu-
tionary algorithms-a comparative case study. In Parallel Problem Solving from
Nature-PPSN V: 5th International Conference Amsterdam, The Netherlands Sep-
tember 27–30, 1998 Proceedings 5. Springer, 292–301.
ACKNOWLEDGEMENTS
This work was supported by PhD scholarship funding for Hannah
from InstaDeep.
REFERENCES
[1] Maxime Allard, Simón C Smith, Konstantinos Chatzilygeroudis, Bryan Lim,
and Antoine Cully. 2022. Online Damage Recovery for Physical Robots with
Hierarchical Quality-Diversity. arXiv preprint arXiv:2210.09918 (2022).
[2] Yongtao Cao, Byran J Smucker, and Timothy J Robinson. 2015. On using the
hypervolume indicator to compare Pareto fronts: Applications to multi-criteria
optimal experimental design. Journal of Statistical Planning and Inference 160
(2015), 60–74.
[3] Antoine Cully. 2021. Multi-emitter MAP-elites: improving quality, diversity and
data efficiency with heterogeneous sets of emitters. In Proceedings of the Genetic
and Evolutionary Computation Conference. 84–92.
[4] Antoine Cully, Jeff Clune, Danesh Tarapore, and Jean-Baptiste Mouret. 2015.
Robots that can adapt like animals. Nature 521, 7553 (2015), 503–507.
[5] Antoine Cully and Yiannis Demiris. 2018. Quality and Diversity Optimization: A
Unifying Modular Framework. IEEE Transactions on Evolutionary Computation
22, 2 (April 2018), 245–259. https://doi.org/10.1109/TEVC.2017.2704781
[6] Kalyanmoy Deb, Samir Agrawal, Amrit Pratap, and Tanaka Meyarivan. 2000. A
fast elitist non-dominated sorting genetic algorithm for multi-objective optimiza-
tion: NSGA-II. In International conference on parallel problem solving from nature.
Springer, 849–858.
[7] Paulo Victor R. Ferreira, Randy Paffenroth, Alexander M. Wyglinski, Timo-
thy M. Hackett, Sven G. Bilen, Richard C. Reinhart, and Dale J. Mortensen.
2019. Reinforcement Learning for Satellite Communications: From LEO to
IEEE Communications Magazine 57, 5 (2019), 70–75.
Deep Space Operations.
https://doi.org/10.1109/MCOM.2019.1800796
[8] Manon Flageat, Felix Chalumeau, and Antoine Cully. 2022. Empirical analysis of
PGA-MAP-Elites for Neuroevolution in Uncertain Domains. ACM Transactions
on Evolutionary Learning (2022).
[9] Matthew Fontaine and Stefanos Nikolaidis. 2021. Differentiable quality diversity.
Advances in Neural Information Processing Systems 34 (2021), 10040–10052.
[10] Matthew C Fontaine, Julian Togelius, Stefanos Nikolaidis, and Amy K Hoover.
2020. Covariance matrix adaptation for the rapid illumination of behavior space.
In Proceedings of the 2020 genetic and evolutionary computation conference. 94–102.
[11] C Daniel Freeman, Erik Frey, Anton Raichuk, Sertan Girgin, Igor Mordatch, and
Olivier Bachem. 2021. Brax–A Differentiable Physics Engine for Large Scale
Rigid Body Simulation. arXiv preprint arXiv:2106.13281 (2021).
[12] Scott Fujimoto, Herke Hoof, and David Meger. 2018. Addressing function ap-
proximation error in actor-critic methods. In International conference on machine
learning. PMLR, 1587–1596.
[13] Adam Gaier, Alexander Asteroth, and Jean-Baptiste Mouret. 2018. Data-efficient
design exploration through surrogate-assisted illumination. Evolutionary compu-
tation 26, 3 (2018), 381–410.
[14] Adam Gaier, Alexander Asteroth, and Jean-Baptiste Mouret. 2019. Are Quality
Diversity Algorithms Better at Generating Stepping Stones than Objective-Based
Search?. In Proceedings of the Genetic and Evolutionary Computation Conference
Companion (Prague, Czech Republic) (GECCO '19). Association for Comput-
ing Machinery, New York, NY, USA, 115–116. https://doi.org/10.1145/3319619.
3321897
[15] Adam Gaier, James Stoddart, Lorenzo Villaggi, and Peter J Bentley. 2022. Explor-
ing Multiple Criteria with Quality-Diversity and the Tournament Dominance
Objective. arXiv preprint arXiv:2207.01439 (2022).
[16] Conor F Hayes, Roxana Rădulescu, Eugenio Bargiacchi, Johan Källström, Matthew
Macfarlane, Mathieu Reymond, Timothy Verstraeten, Luisa M Zintgraf, Richard
Dazeley, Fredrik Heintz, et al. 2022. A practical guide to multi-objective rein-
forcement learning and planning. Autonomous Agents and Multi-Agent Systems
36, 1 (2022), 26.
[17] Sture Holm. 1979. A simple sequentially rejective multiple test procedure. Scan-
dinavian journal of statistics (1979), 65–70.
[18] Julien Horwood and Emmanuel Noutahi. 2020. Molecular design in synthetically
accessible chemical space via deep reinforcement learning. ACS omega 5, 51
(2020), 32984–32994.
[19] Leon Keller, Daniel Tanneberg, Svenja Stark, and Jan Peters. 2020. Model-based
quality-diversity search for efficient robot learning. In 2020 IEEE/RSJ International
Conference on Intelligent Robots and Systems (IROS). IEEE, 9675–9680.
[20] Ahmed Khalifa, Scott Lee, Andy Nealen, and Julian Togelius. 2018. Talakat: Bullet
hell generation through constrained map-elites. In Proceedings of The Genetic and
Evolutionary Computation Conference. 1047–1054.
[21] Joel Lehman and Kenneth O Stanley. 2011. Abandoning objectives: Evolution
through the search for novelty alone. Evolutionary computation 19, 2 (2011),
189–223.
GECCO '23, July 15–19, 2023, Lisbon, Portugal
Janmohamed, et al.
APPENDICES
A COVERAGE RESULTS
Figure 9 and Figure 10 show the coverage achieved across 15 repli-
cations in each of the experiments. The results show that all qd
algorithms manage to find solutions which span the entire descrip-
tor space. Since spea2 and nsga-ii do not seek diversity over the
descriptor space, they achieve comparably poor coverage.
Figure 9: Coverage performance of mome-pgx and all base-
line algorithms for each of the tasks. The curves show the
median performance across 15 replications and the shaded
regions show the inter-quartile range.
B HYPERVOLUME REFERENCE POINTS
Table 1 presents the reference points used to calculate the hypervol-
ume metrics in each of the tasks. The same reference points were
used for all of the experiments.
Table 1: Reference points
Ant
HalfCheetah
Hopper
Walker2d
[-350, -4500]
[-2000, -800]
[-50, -2]
[-210, -15]
C POLICY GRADIENT HYPERPARAMETERS
Table 2 presents all of the policy gradient hyperparameters that are
used for our algorithms. All hyperparameters were kept the same
for each task and for all algorithms which used PG variations.
Table 2: Policy Gradient Network Hyperparameters
Replay buffer size
Critic training batch size
Critic layer hidden sizes
Critic learning rate
Actor learning rate
Policy learning rate
Number of critic training steps
Number of policy gradient training steps
Policy noise
Noise clip
Discount factor
Soft τ-update proportion
Policy delay
1,000,000
256
[256, 256]
3 × 10−4
3 × 10−4
1 × 10−3
300
100
0.2
0.2
0.99
0.005
2
Figure 10: Coverage performance of mome-pgx and all abla-
tion algorithms for each of the tasks. The curves show the
median performance across 15 replications and the shaded
regions show the inter-quartile range.
|
http://arxiv.org/abs/2302.12666v1 | 2023-02-24T14:41:48 | 2023-02-24T14:41:48 | Modelling Temporal Document Sequences for Clinical ICD Coding | Past studies on the ICD coding problem focus on predicting clinical codes
primarily based on the discharge summary. This covers only a small fraction of
the notes generated during each hospital stay and leaves potential for
improving performance by analysing all the available clinical notes. We propose
a hierarchical transformer architecture that uses text across the entire
sequence of clinical notes in each hospital stay for ICD coding, and
incorporates embeddings for text metadata such as their position, time, and
type of note. While using all clinical notes increases the quantity of data
substantially, superconvergence can be used to reduce training costs. We
evaluate the model on the MIMIC-III dataset. Our model exceeds the prior
state-of-the-art when using only discharge summaries as input, and achieves
further performance improvements when all clinical notes are used as input. | [
"Clarence Boon Liang Ng",
"Diogo Santos",
"Marek Rei"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12666v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12666v1",
"@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",
"cs.CL"
] | Modelling Temporal Document Sequences for Clinical ICD Coding
Clarence Boon Liang Ng1
Diogo Santos2
Marek Rei1,2
1 Imperial College London, United Kingdom
2 Transformative AI, United Kingdom
{clarence.ng21,marek.rei}@imperial.ac.uk
{santos}@transformative.ai
Abstract
Past studies on the ICD coding problem focus
on predicting clinical codes primarily based
on the discharge summary. This covers only
a small fraction of the notes generated during
each hospital stay and leaves potential for im-
proving performance by analysing all the avail-
able clinical notes. We propose a hierarchical
transformer architecture that uses text across
the entire sequence of clinical notes in each
hospital stay for ICD coding, and incorporates
embeddings for text metadata such as their po-
sition, time, and type of note. While using
all clinical notes increases the quantity of data
substantially, superconvergence can be used to
reduce training costs. We evaluate the model
on the MIMIC-III dataset. Our model exceeds
the prior state-of-the-art when using only dis-
charge summaries as input, and achieves fur-
ther performance improvements when all clin-
ical notes are used as input.
1
Introduction
ICD (International Classification of Diseases
(World Health Organization, 1978)) coding refers
to the task where medical professionals classify
clinical diagnoses and medical procedures asso-
ciated with each patient using standardised tax-
onomies, which in turn supports billing, service
planning and research. The process is manual and
laborious in nature (O'Malley et al., 2005), how-
ever there is potential to automate it by identifying
relevant information from clinical notes, which are
already captured in EHR systems. With this in
mind, researchers have started to explore whether
machine learning models can succeed at this task
(Mullenbach et al., 2018).
The current research on the ICD coding task fo-
cuses on the extraction of codes from the discharge
summary. This document is commonly written at
the end of a hospital stay and provides a textual de-
scription of the important diagnoses and procedures
for a given patient, making it particularly helpful
for the task. However, many other clinical notes are
also created during the hospital stay, which can pro-
vide important details or useful additional context
that may be missing from the discharge summary
itself. Analysing the full sequence of notes would
allow models to make more accurate decisions and
make the problem more similar to a real-life setting,
where clinicians have to consider all information
about a patient for ICD coding, rather than infor-
mation only in a single document.
In this work we study how the inclusion of clin-
ical notes across the entire hospital stay can af-
fect performance on the ICD coding task. We pro-
pose the Hierarchical Transformers for Document
Sequences (HTDS) model, which is an adapta-
tion of the hierarchical transformer model (Zhang
et al., 2019) for temporal modelling of document
sequences. The model takes text and metadata
(such as the time and type of note) from a sequence
of multiple documents as input and achieves im-
proved performance when additional clinical notes
are used for modelling. We compare different pri-
oritisation criteria for selecting which notes to use
as input and how to best represent the sequence
information. Methods related to superconvergence
are applied to speed up the model training process
in order to handle the increased size of the data that
needs to be processed.
Our experiments show that the inclusion of ad-
ditional clinical notes indeed improves model ac-
curacy and leads to better predictions. We evaluate
our models against the MIMIC-III-50 (Johnson
et al., 2016) test set. When considering only the
discharge summaries of each hospital stay as in-
put, our model exceeds the current state-of-the-art
performance in terms of Micro-F1. When consider-
ing all clinical notes as input, further performance
improvements across all metrics of interest are ob-
served, exceeding the state-of-the-art performance
in Micro-F1, Micro-AUC, Macro-AUC, and Preci-
sion@5 scores.
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
6
6
6
2
1
.
2
0
3
2
:
v
i
X
r
a
2 Related Work
Publicly available electronic health record (EHR)
datasets, such as the Medical Information Mart
for Intensive Care III (MIMIC-III) dataset (John-
son et al., 2016), provide a shared context for re-
searchers to work on ICD coding. Recent work on
ICD coding concentrates on the benchmark tasks
presented by Mullenbach et al. (2018), which ex-
tracts ICD codes from the free-text discharge sum-
mary generated at the end of each hospital stay.
Mullenbach et al. (2018) also publicly release their
data preprocessing codes and train/dev/test data
splits, and these were followed by later works for
comparability of result.
In recent years, state-of-the-art work on the ICD
coding problem commonly used methods based
on convolutional neural networks (CNNs) or re-
current neural networks (RNNs) for text encoding.
CAML (Mullenbach et al., 2018) uses a single con-
volutional layer along with "per-label attention" to
extract representations for each label from the con-
volution output. MSAttKG (Xie et al., 2019) im-
proves the performance further by using a densely
connected convolutional network with variable n-
gram features, and incorporating knowledge graphs
to capture relationships between medical codes. Ef-
fectiveCAN (Liu et al., 2021) uses a deep convo-
lutional approach, with a "squeeze-and-excitation"
module that repeatedly compresses and then de-
compresses the convolutional features. LAAT (Vu
et al., 2021) uses a bidirectional LSTM to encode
the texts, with a per-label attention step on the out-
put to get the final classification. MSMN (Yuan
et al., 2022) uses the same architecture as LAAT,
with an additional step of extending code descrip-
tions from the Unified Medical Language System
(UMLS) with synonyms, and using an attention
layer with a separate head for each code synonym.
Researchers using transformer-based models for
text encoding experienced difficulties in matching
state-of-the-art performance. Ji et al. (2021) ap-
ply a range of different transformer-based mod-
els but found that none of them outperformed
their reimplementation of a simple CNN-based
model. Pascual et al. (2021) similarly found it
difficult to achieve competitive performance and
concluded that better methods of handling long in-
put sequences are required to improve the models
further. Gao et al. (2021) also find that a sim-
ple self-attention network with far less parame-
ters outperformed BERT-based models on many
tasks. Dai et al. (2022) show that incorporating
task-adaptive pre-training, overlapping chunks, and
using a large pretrained language model make it
possible to achieve performance that is close to,
but still slightly below the state-of-the-art. In gen-
eral, language models that were pretrained on texts
in the biomedicine domain, such as ClinicalBERT
(Alsentzer et al., 2019), BioBERT (Lee et al., 2020),
BlueBERT (Peng et al., 2019), and PubMedBERT
(Gu et al., 2021) tend to achieve higher perfor-
mance (Dai et al., 2022; Ji et al., 2021) as compared
to language models such as BERT (Devlin et al.,
2019) and RoBERTa (Liu et al., 2019) which are
trained on general domain corpora, as the models
have been adapted to the specialised language used
in clinical notes. Among the range of pretrained
language models available for the biomedicine do-
main, better performance was achieved when a
specialised token vocabulary is used (Gu et al.,
2021; Lewis et al., 2020) and when the pre-training
corpora is closer in nature to those used for the
downstream task (Gururangan et al., 2020). Very re-
cently, Huang et al. (2022) identified the restricted
capacity of the [CLS] token as a potential limiting
factor, and showed how using all tokens in the label
attention step leads to state-of-the-art performance
on the MIMIC-III-Full problem. However, they do
not report results on the MIMIC-III-50 problem.
While transformer-based language models have
been very successful on short sequences of text
(BERT (Devlin et al., 2019) and RoBERTa (Liu
et al., 2019) use a maximum sequence length of 512
tokens), challenges arise when attempting to apply
it to longer text sequences due to the quadratic com-
putational complexity of the self-attention mecha-
nism. Experiments conducted by Gao et al. (2021)
show that transformer models require 3x more pro-
cessing time compared to CNNs, making it more
tedious to explore different hyperparameters and
modelling strategies. Various modifications have
been proposed to the transformer architecture to
reduce computation costs, in models such as Trans-
formerXL (Dai et al., 2019), LongFormer (Beltagy
et al., 2020), and BigBird (Zaheer et al., 2020),
however domain-pretrained models for these archi-
tectures are relatively scarce. Most transformer-
based models for the ICD coding problem adapt
the hierarchical transformer (Zhang et al., 2019),
which splits the text into chunks that are encoded
separately with the pre-trained language model,
and then feeds the output of the [CLS] token into a
second transformer to allow interaction of informa-
tion across chunks.
To the best of our knowledge, there has been no
prior work that attempts to extend the ICD coding
task with other clinical documents.
3 Approach
Our Hierarchical Transformers for Document
Sequences (HTDS) model is based on the hierar-
chical transformer architecture (Zhang et al., 2019),
with additional adaptations specifically to handle
document sequences. Figure 1 provides an illus-
trated diagram of the full HTDS model architecture.
We process documents using the following steps:
Step 1 - Preprocess and Chunk: The text in
each document is sequentially tokenized and split
into chunks, each containing up to Tc tokens. Every
new document or clinical note always starts a new
chunk.
From these tokenized chunks we select up to Nc
chunks for processing. If more than Nc chunks are
available, various prioritisation strategies can be
considered to select which chunks to use as model
input. In our main model we use a strategy that
prioritized diversity in the categories of notes used.
To do this, we select the last note by timestamp
of each category, and then the second last note of
each category, and so on until Nc chunks of text
are selected.
Step 2 - Encode with Language Model: The
chunks are encoded using the pre-trained language
model, producing an output of dimension Nc x Tc x
He, where He is the dimension of the hidden state
in the pre-trained LM.
Step 3 - Add Chunk Meta-Information: Meta-
information of each chunk is added. These are
learnable embeddings, retrieved via index lookup,
with size He. Positional Embeddings (PE) capture
the positional index of the chunk, and are num-
bered from 0 for the first chunk until N-1 for the
last chunk. Temporal Sequence Embeddings (TE)
capture the temporal order in which the documents
were captured, and are indexed in running order
from 0 for chunks belonging to the first document
and incremented with each subsequent document.
We noted that this indexing approach would often
assign varying indices to the last chunk or docu-
ment, as the number of chunks and documents for
each case would vary. This might limit the ability
of the model to identify the last chunk or document
of the text. Hence, we also include Reversed Po-
sitional Embeddings (Rev-PE) and Reversed Tem-
poral Sequence Embeddings (Rev-TE), which start
from 0 for the last chunk (or document) and are
then incremented with each preceding chunk (or
document). Category Embeddings (CE) capture
the category of the note, with a unique index for
each CATEGORY code. All learnable embeddings
use values initialised from a N (0, 0.1) distribution.
We hypothesise that these embeddings can help the
model to factor in chunk meta-information which
may be relevant for classification.
Step 4 - Second Transformer: The embeddings
are added together (token embeddings + meta-
information embeddings), then concatenated across
all the chunks and given as input to a second trans-
former with Ne encoder layers. This allows for
information from each chunk to interact with all
the other chunks and the use of only a small num-
ber of layers in this second transformer will keep
the computational requirements feasible. The out-
put is an updated embedding of each token, with
dimensions (Nc x Tc) x He.
Step 5 - Label Attention: A label attention
layer is applied. We train learnable embeddings
αl for each label (α = [α1...αNl] has dimen-
sions Nl x He, where Nl is the number of labels)
which are applied against the chunk embeddings
(H = [h1...hNc]) in an attention step as follows:
A = sof tmax(HαT )
V = H T A
Dim(A) = (Nc × Tc) × Nl
Dim(V ) = He × Nl
The i-th column in V would be an independent
representation, of dimension He, for the i-th label
for classification.
Step 6 - Generate Final Classification: A clas-
sification layer is applied. We take σ(Wlvl) to get
the probability of label l, where Wl is a learnable
weight matrix of dimension He for label l, vl is the
l-th item of matrix V, and σ is the sigmoid activa-
tion function. To obtain the final classification we
apply a threshold t for positive classification that is
optimised for micro-F1 on the validation set.
4 Experiment Setup
Dataset: For our experiments, we use the MIMIC-
III (Medical Information Mart for Intensive Care)
Figure 1: HTDS Model Architecture. The document sequence is first split into chunks (Step 1) and encoded with
a pre-trained language model (Step 2). Meta-information of each chunk is then added to the token encodings (Step
3) before a second transformer is applied to allow attention of information across chunks (Step 4). Finally a label
attention layer is applied (Step 5) and the outputs are used for classification (Step 6).
Discharge Summaries
Total Documents
Total Words
Total Tokens
Mean
SD
1.1
1896
3594
0.4
929
1760
All Notes
Total Documents
Total Words
Total Tokens
33
10442
21916
59
21334
46461
Table 1: Summary statistics: Amount of text contained
in clinical documents per hospital stay, measured in
terms of total number of documents, words, tokens (us-
ing the RoBERTa-PM-M3-Voc tokenizer).
dataset (Johnson et al., 2016), which contains multi-
modal information on patients admitted to criti-
cal care between 2001 and 2012 at the Beth Is-
rael Deaconess Medical Center in Boston, Mas-
sachusetts. To limit computational costs, we focus
on the MIMIC-III-50 problem, which limits the
problem to the top 50 ICD codes by frequency.
To construct the task dataset, we follow Mul-
lenbach et al. (2018) preprocessing steps, with a
few exceptions: (1) we keep the text and meta-
data (specifically the datetime and the category of
note) of all notes rather than just the discharge sum-
maries, (2) we do not remove punctuation as we
found that performance drops when punctuation is
excluded. Each record represents one hospital stay
(uniquely identified by the HADM_ID value) and
contains the texts and ICD codes linked to that hos-
pital stay. There are 8066, 1573 and 1729 records
in the train, dev and test sets respectively, giving us
a total of 11368 records.
During the data cleaning process, we noticed that
the train set contains clinical notes tagged under
the category "Nursing/Other", but no clinical notes
were tagged in this category in the dev and test sets.
For our experiments we grouped "Nursing/Other"
and "Nursing" into a single category.
Table 1 shows summary statistics of the dataset.
In general, discharge summaries are far longer than
other documents, with an average of 1724 words
per document as compared to the overall average
of 316 words per document. However, the text in
discharge summaries only accounts for less than
20% of the words generated in each hospital stay,
suggesting the possibility that the other notes might
carry additional information that can improve ICD
coding accuracy. We also provide the number of
tokens produced when the text is tokenized with
the RoBERTa-PM-M3-Voc (Lewis et al., 2020) to-
Tokenised Chunk 2(512, 768)Doc 1Doc 2Token Encodings(512, 768)PE (0) (1,768)Rev-PE (2) (1,768)TE (0) (1,768)Rev-TE (1) (1,768)CE (0) (1,768)Token Encodings(512, 768)PE (1) (1,768)Rev-PE (1) (1,768)TE (0) (1,768)Rev-TE (1) (1,768)CE (0) (1,768)Token Encodings(512, 768)PE (2) (1,768)Rev-PE (0) (1,768)TE (1) (1,768)Rev-TE (0) (1,768)CE (1) (1,768)+TransformerEncoderLabelAttentionQ = LabelEmbeddingK = V = ChunkEncodingLabelEmbeddingsL1L50L2L49...L3L48Label 1 Encoding(1, 768)Label 2 Encoding(1, 768)Label 3 Encoding(1, 768)Label 50 Encoding(1, 768)......ClassificationStep 1 - Chunk for LM EncodingStep 2 -Encode with LMStep 3 - Add chunk meta-informationStep 4 - SecondTransformerStep 5 - Label AttentionStep 6 - Final Classification LayerTextEncoding(1536,768)FinalPredictionsp1p50p2p49...p3p48LanguageModel** SharedparametersLanguageModel*Tokenised Chunk 1(512, 768)Tokenised Chunk 2(512, 768)LanguageModel*++kenizer, and we see from the numbers that most
hospital stays involve text data that is beyond the
512-token maximum of a single transformer lan-
guage model.
We also note that the amount of text in each hos-
pital stay can vary widely and has a right-skewed
distribution. There is a notable proportion of longer
hospital stays which generate substantially more
documents and text as compared to the rest. The
90th percentile for Total Words and Total Docu-
ment Count across all notes is 20556 and 72 respec-
tively. For these hospital stays, the effects of the
note prioritisation strategy on model performance
would be more prominent.
Task Definition: We investigate two variations
of the ICD classification task on this dataset. For
Task 1, the notes that are available for modelling
are restricted to discharge summaries only. Some
hospital stays (11% of stays) have multiple dis-
charge summaries, typically because of addenda,
and in these cases we keep all of them. This would
be equivalent to the MIMIC-III-50 task attempted
by past works. For Task 2, all notes in each hospital
stay are available for use in modelling. This vastly
increases the number of documents (from an aver-
age of 1.1 to 33 per hospital stay) and the number
of words (from an average of 1896 to 10442) to be
considered. Task 2 uses the same data splits and
labels as Task 1, allowing us to compare the results
to assess whether information from the additional
notes is able to improve performance.
For both tasks, we use the same evaluation met-
rics as defined by Mullenbach et al (Mullenbach
et al., 2018) and then subsequently followed by
other researchers: micro-F1, macro-F1, micro-
AUC, macro-AUC, and Precision at k=5.
Implementation and Model Hyperparame-
ters: Pytorch was used for the implementation
of our models, and NVIDIA Tesla A100 80GB
GPUs were used for finetuning. Hyperparameters
were tuned manually; Table 2 details the search
space and final hyperparameter values used for
the HTDS model. The pretrained language model
was initialised to the RoBERTa-base-PM-M3-Voc
(Lewis et al., 2020) model checkpoint, which was
pretrained on texts in PubMed, PubMed Central,
and MIMIC-III physician notes. The second trans-
former uses 1 encoder layer with 8 attention heads.
Texts are tokenized into chunks of Tc=512 to-
kens and a maximum of Nc=32 chunks were used
as model input. With these values for Tc and Nc,
Hyperparameter
Optimization
Peak Learning Rate
Number of Epochs
Early Stopping Pa-
tience Threshold
Effective Batch Size
Values
1e-6 to 1e-4 (5e-5)
10-50 (20)
None, 3, 5, 10
1-64 (16)
Language Model
Pre-trained LM
Tokens per chunk, Tc
Max Chunks, Nc
PubMedBERT,
RoBERTa-base-
PM-M3-Voc,
RoBERTa-large-
PM-M3-Voc
512
1-48 (32)
Second Transformer
Encoder Layers
Attention Heads
0, 1, 2
8, 12
Table 2: Hyperparameter search space. Bolded text
indicates hyperparameters used in the HTDS model.
the note selection strategy to maximise diversity
of document categories (detailed earlier in Section
3) was applied for 45% of samples which have
more than 32 chunks of text. The model has 136M
parameters in total.
These hyperparameters were selected to max-
imise Micro-F1 on the dev set, with a few excep-
tions to manage training and computation costs: (1)
while using the larger RoBERTa-large-PM-M3-Voc
model was found to achieve better performance,
we kept to the smaller RoBERTa-base-PM-M3-Voc
model; (2) while increasing the maximum num-
ber of chunks Nc in general leads to better perfor-
mance, we limit our model to a maximum of 32
chunks.
Training models that take text across all clini-
cal documents as inputs, compared to using only
the discharge summary, requires substantially more
computational resources. With A100 GPUs, 15.5
samples are processed per second when training
on discharge summaries only1, and 4.9 samples
are processed per second when training with all
clinical documents. To speed up the model op-
timisation process, we apply the 3-phase 1cycle
1TrLDC (Dai et al., 2022), which we consider to be a
comparable model in terms of architecture, processed 7.4
samples per second when training on discharge summaries on
NVIDIA V100 GPUs.
CNN-based Models
CAML (Mullenbach et al., 2018)
MSAttKG (Xie et al., 2019)
EffectiveCAN (Liu et al., 2021)
RNN-based Models
LAAT (Mullenbach et al., 2018)
MSMN (Yuan et al., 2022)
Transformer-based Models
Hier-PubMedBERT (Ji et al., 2021)
TrLDC (Base) (Dai et al., 2022)
TrLDC (Large) (Dai et al., 2022)
Our Models
HTDS (Discharge Summaries)
HTDS (All Notes)
Micro F1 Macro F1 Micro AUC Macro AUC
P@5
63.3
68.4
71.7
71.5
72.5
68.1
70.1
71.1
57.6
63.8
66.8
66.6
68.3
63.3
63.8
65.5
91.6
93.6
94.5
94.6
94.7
90.8
93.7
94.1
88.4
91.4
92.0
92.5
92.8
88.6
91.4
91.9
61.8
64.4
66.4
67.5
68.0
64.4
65.9
66.4
72.60.3
73.30.3
66.61.2
67.90.4
94.50.1
95.00.2
92.60.3
93.20.2
67.40.3
68.20.2
Table 3: Performance of models on the MIMIC-III-50 test set. Models are sorted by Micro-F1 within each category.
Metrics are averaged across 5 replications. Subscripts indicate the standard deviation across runs. Bolded values
indicate the best score achieved for each metric.
learning rate scheduler for superconvergence as
described in (Smith and Topin, 2019). The learn-
ing rate (LR) progresses via cosine annealing from
1/25 of the peak LR to the peak LR (5e-5) in the
first phase (30% of iterations) and then goes back
to 1/25 of the peak LR in the second phase (30%
of iterations). Finally in the third phase (40% of
iterations), LR is annealed to 1/1000 of the peak
LR. The AdamW optimizer is used, with an ef-
fective batch size of 16 achieved through gradient
accumulation. The model is trained for up to 20
epochs with an early stopping patience threshold of
5. With this setup, training is stopped at around the
14th epoch on average. We note that this is at least
50% less (in terms of number of epochs) compared
to past works on the MIMIC-III-50 problem where
transformer-based models would be trained for 30
epochs or more (Dai et al., 2022; Ji et al., 2021;
Pascual et al., 2021).
5 Results
5.1 Main Results
Table 3 shows the results when our models are
evaluated against the MIMIC-III-50 test set, as well
as comparisons against published works. We report
the averaged metrics across 5 training replications.
As we can see from the table, prior works
with transformer-based models faced challenges
in achieving competitive performance on this prob-
lem. Dai et al. (2022) managed substantial im-
provements with the TrLDC model over the work
of Ji et al. (2021), however even with a large-sized
model their performance still fell slightly behind
the best-performing CNN-based and RNN-based
models. When using only discharge summaries,
HTDS achieves state-of-the-art performance in
terms of Micro-F1, the primary metric used for
comparison. It also exceeds past CNN-based and
Transformer-based models on all metrics of inter-
est.
When including all clinical documents, as com-
pared to including only discharge summaries, the
performance of HTDS improves on all metrics of
interest (all differences are statistically significant
at p<0.05), including an additional 0.7% increase
in Micro-F1. Comparing against all other models,
we see that the model achieves state-of-the-art per-
formance in terms of all metrics except for Macro-
F1. We hypothesize that the modelling of code
synonyms in MSMN (Yuan et al., 2022) helped to
increase its performance on rarer ICD codes and
hence achieve a higher Macro-F1 score, but also
note that steps used to improve performance by
incorporating synonyms based on UMLS concepts
could also be adapted into our model to achieve
similar improvements.
Put together, our results demonstrate the value of
including clinical documents beyond the discharge
summary in modelling.
5.2 Ablation Experiments
To analyse the effect of various components and
hyperparameter choices on model performance, we
start with our main model and then ablate or vary
individual components one at a time, keeping all
other components constant, and evaluate their per-
formance on the development set. We share our
results in this section.
For all ablation experiments, we report the im-
pact on Micro-F1, the primary metric of interest,
averaged across 5 replications.
Quantity of Text Input: Table 4 shows how
performance varies as the quantity of text is varied.
The quantity of text used as input has a substantial
impact on the compute requirements of the entire
model architecture. When Nc is reduced 16, 7.5
samples are processed per second when training
on A100 GPUs, an increase of 0.5x as compared
to 4.9 samples per second for HTDS which uses
Nc=32. However, as we can see from the results
of this ablation experiment, reducing the quantity
of text input leads to a substantial drop in model
performance.
HTDS (Max 32 Chunks)
Max 16 Chunks
Micro F1
74.0
73.0
Table 4: Performance when the quantity of text input
is varied on the development set.
Metadata embeddings: Table 5 shows how the
performance varies as the metadata embeddings
used in the model are varied. The ablation of each
of the embedding types in isolation results in small
but consistent decreases in model performance. It
is possible that the model compensates by learning
to capture some of this information from the text
itself without explicit embeddings. Indeed, past
works have observed that the clinical notes in the
MIMIC-III dataset have a high degree of structure
and templating (Liu, 2018). Nevertheless, in our ex-
periments the overall best results were obtained by
using the combination of all the proposed metadata
embeddings.
Chunk Representations: In a traditional hierar-
chical transformer, only the encoding of the [CLS]
token is kept and used as an aggregate representa-
tion of the chunk. However, recent works have sug-
gested that the [CLS] token might have insufficient
capacity to capture information for the large num-
ber of labels in the ICD coding problem (Huang
HTDS (All meta embeddings)
Ablate CE
Ablate PE+Rev-PE
Ablate TE+Rev-TE
Micro F1
74.0
73.9
73.9
73.8
Table 5: Performance when metadata embeddings are
varied on the development set.
et al., 2022). In Table 6, we show the results when
only the [CLS] token is used as an aggregate rep-
resentation of each chunk, and see that there is a
sizeable decrease in performance.
HTDS (All token representations)
CLS token representation only
Micro F1
74.0
71.7
Table 6: Performance when the embeddings used for
chunk representation are varied on the development set.
Second Transformer: The second transformer
in Step 4 allows tokens from each chunk to attend
to tokens from other chunks. While earlier studies
(Dai et al., 2022; Ji et al., 2021) include this second
transformer, it also adds to the computational costs
of the model due to the quadratic complexity of
the attention step and (Huang et al., 2022) show
that the second transformer can be dropped if the
encodings of all tokens (rather than just the [CLS]
token) are kept for the label attention step.
Our ablation experiments in Table 7 provide
some additional insight on this. When consider-
ing only the discharge summary, the second trans-
former can be dropped without substantial impact
on performance. However, when modelling the
sequence of all clinical documents, ablating the
second transformer leads to a noticeable decrease
in performance, suggesting that the information
in other documents can help further refine token
representations before classification.
HTDS (Discharge Summaries)
Ablate 2nd Transformer
HTDS (All Notes)
Ablate 2nd Transformer
Micro F1
73.2
73.3
74.0
73.6
Table 7: Performance when second transformer is ab-
lated on the development set.
Note Selection: In around 45% of admissions,
tokenizing the text in all available clinical notes
will produce more than 32 chunks of 512 tokens. In
those cases, we would need to select which chunks
are used as inputs to our model. Table 8 shows our
results. We considered the following strategies to
prioritise which chunks to use:
• By timestamp: We select the first or last 32
chunks by the timestamp of the clinical notes.
Taking the last chunks achieved far superior
performance.
• By category: We select first the discharge sum-
mary2, then notes of a certain category (Ra-
diology/Nursing/Physician), and then other
notes until 32 chunks of text are selected. Our
results indicate that the differences in perfor-
mance are mostly marginal, suggesting that
there could be multiple possible strategies that
achieve close to optimal performance.
• Prioritise diversity: We select first the last
note by timestamp of each category, and then
the second last note of each category, and so
on until 32 chunks of text are selected. This
maximises the diversity (in terms of categories
of notes) used as inputs to the model. This
approach was found to have the highest score
on the development set, and hence used for
HTDS.
HTDS (Prioritise diversity)
Prioritise First
Prioritise Last
Prioritise Radiology
Prioritise Nursing
Prioritise Physician
Micro F1
74.0
68.4
73.8
73.8
73.7
73.8
Table 8: Performance when note selection is varied on
the development set.
In general, we also note that the effects of note se-
lection strategies would be more pronounced when
the maximum number of chunks Nc for model in-
put is smaller, as it would result in a greater propor-
tion of text being excluded.
2Our exploratory tests find that the discharge summaries
contain the most relevant information. We note also that
prior work achieved good performance with just the discharge
summaries, without the need for other notes.
6 Conclusion
As we work towards automated ICD coding, it
would be helpful to build models that can consider
information that is captured across the patient's
EHR record, rather than just the discharge sum-
mary (which may not always be exhaustive). Such
an approach would also be more similar to a real-
life setting, where clinicians consider all available
information for ICD coding, rather than informa-
tion in a single document.
In this paper, we demonstrated the HTDS model,
which is an adaptation of the hierarchical trans-
former model that considers the text and meta-
data from the entire clinical document sequence
for ICD coding. While transformer-based models
have faced difficulties achieving competitive per-
formance on the ICD coding problem in the past,
with HTDS we show that these challenges can be
overcome. When evaluated on the MIMIC-III-50
test set using only discharge summaries, HTDS
exceeded the prior state-of-the-art performance in
terms of Micro-F1 score. When all clinical docu-
ments were considered, the performance of HTDS
improved further on all performance metrics of
interest, and exceeded prior state-of-the-art perfor-
mance in all metrics except for Macro-F1. The
results demonstrate the value of including clinical
documents beyond the discharge summary in the
ICD coding problem.
Possibilities for improving performance even fur-
ther are plenty. These include: using a large-sized
language model or using overlapping text chunks
to reduce fragmentation in the initial encoding step
(Dai et al., 2022), considering other transformer ar-
chitectures for long texts (Beltagy et al., 2020; Dai
et al., 2019; Zaheer et al., 2020), smarter strategies
for chunking the input text to reduce fragmentation,
further improving the strategy for selecting which
text to use as model input (possibly going down to
text-level rather than document-level approaches),
and incorporating methods to better model rare
ICD codes (Vu et al., 2021; Yuan et al., 2022).
Approaches for improving the computational effi-
ciency and training time of the model can be consid-
ered to help to reduce GPU resource requirements,
and enable the testing of more models and hyper-
parameter settings. Going even further from here,
we could consider multi-modal models that use in-
formation across the entire EHR database for ICD
coding.
We hope that our findings will encourage future
studies that tap on the full breadth and depth of
information available in modern EHR databases
today in order to further push the limits of perfor-
mance on the ICD coding problem in future.
Limitations
Although applying HTDS on the full clinical docu-
ment sequence in each hospital stay helped to push
performance on the ICD coding problem further
as compared to the prior state-of-the-art, we note a
few limitations to our work.
Firstly, the computational requirements to train
HTDS is not trivial. When using NVIDIA A100
GPUs, one training run took 8 GPU-hours on aver-
age (for 5 replications this would require 40 GPU-
hours). The increased computation cost for HTDS,
as compared to other models on the ICD coding
problem, could be attributed to the higher number
of model parameters in transformers as compared
to CNN/RNNs and the increase in input data size as
a result of using all clinical documents as input. It
is hoped that this issue of high compute costs can be
mitigated in future by either further refinements in
modelling to improve efficiency or improvements
in the compute capabilities of hardware used for
model training.
Secondly, we note that our work focuses only
on the MIMIC-III-50 problem, where only the top
50 ICD codes by frequency are considered. This
would be insufficient in a real-life setting, which
would require clinicians to consider all ICD codes.
Extending our work on the MIMIC-III-Full prob-
lem, which uses a dataset that is 4x in size, was not
attempted due to limitations on compute resources.
However, we speculate that the benefits of using all
clinical documents to perform ICD coding would
apply similarly to the MIMIC-III-Full problem.
Finally, while we have taken the actual ICD
codes assigned by clinicians as the "ground truth"
for the purpose of model evaluation, there have
been errors made during the process. We would
not expect clinicians to thoroughly read the entire
clinical document sequence (consisting an aver-
age of over 10,000 words) for every patient when
performing ICD coding, and hence there is a pos-
sibility that some codes could have been missed.
A more thorough approach for model evaluation
could involve extracting a sample of records where
different codes were assigned by the clinicians and
our models for further evaluation by experts, in
order to determine the extent to which this might
have affected our evaluation metrics.
Ethics Statement
No conflicts of interest are declared by the au-
thors. Clinical data in the MIMIC-III database
is de-identified through removal of identifying
data elements and date-shifting in accordance with
Health Insurance Portability and Accountability
Act (HIPAA) standards, and protected health infor-
mation was further removed from clinical notes
using dictionary look-ups and pattern-matching
(Johnson et al., 2016). The use of the data is in ac-
cordance with the MIMIC-III data use agreement.
References
Emily Alsentzer, John Murphy, William Boag, Wei-
Hung Weng, Di Jindi, Tristan Naumann, and
Matthew McDermott. 2019. Publicly available clini-
cal bert embeddings. In Proceedings of the 2nd Clin-
ical Natural Language Processing Workshop, pages
72–78.
Iz Beltagy, Matthew E Peters, and Arman Cohan.
2020. Longformer: The long-document transformer.
arXiv preprint arXiv:2004.05150.
Xiang Dai,
Ilias Chalkidis, Sune Darkner,
and
Revisiting transformer-
long document classification.
Desmond Elliott. 2022.
based models for
arXiv preprint arXiv:2204.06683.
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G Car-
bonell, Quoc Le, and Ruslan Salakhutdinov. 2019.
Transformer-xl: Attentive language models beyond
In Proceedings of the 57th
a fixed-length context.
Annual Meeting of the Association for Computa-
tional Linguistics, pages 2978–2988.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and
Kristina Toutanova. 2019. Bert: Pre-training of
deep bidirectional transformers for language under-
standing. In Proceedings of the 2019 Conference of
the North American Chapter of the Association for
Computational Linguistics: Human Language Tech-
nologies, Volume 1 (Long and Short Papers), pages
4171–4186.
Shang Gao, Mohammed Alawad, M Todd Young, John
Gounley, Noah Schaefferkoetter, Hong Jun Yoon,
Xiao-Cheng Wu, Eric B Durbin, Jennifer Doherty,
Antoinette Stroup, et al. 2021. Limitations of trans-
formers on clinical text classification. IEEE journal
of biomedical and health informatics, 25(9):3596–
3607.
Yu Gu, Robert Tinn, Hao Cheng, Michael Lucas,
Naoto Usuyama, Xiaodong Liu, Tristan Naumann,
Jianfeng Gao, and Hoifung Poon. 2021. Domain-
specific language model pretraining for biomedical
natural language processing. ACM Transactions on
Computing for Healthcare (HEALTH), 3(1):1–23.
code accuracy. Health Services Research, 40(5 Pt
2):1620.
Damian Pascual, Sandro Luck, and Roger Wattenhofer.
2021. Towards bert-based automatic icd coding:
Limitations and opportunities. In Proceedings of the
20th Workshop on Biomedical Language Processing,
pages 54–63.
Yifan Peng, Shankai Yan, and Zhiyong Lu. 2019.
Transfer learning in biomedical natural language
processing: An evaluation of bert and elmo on ten
benchmarking datasets. BioNLP 2019, page 58.
Leslie N Smith and Nicholay Topin. 2019. Super-
convergence: Very fast training of neural networks
using large learning rates. In Artificial intelligence
and machine learning for multi-domain operations
applications, volume 11006, pages 369–386. SPIE.
Thanh Vu, Dat Quoc Nguyen, and Anthony Nguyen.
2021. A label attention model for icd coding from
clinical text. In Proceedings of the Twenty-Ninth In-
ternational Conference on International Joint Con-
ferences on Artificial Intelligence, pages 3335–3341.
World Health Organization. 1978. International classi-
fication of diseases:[9th] ninth revision, basic tabu-
lation list with alphabetic index. World Health Or-
ganization.
Xiancheng Xie, Yun Xiong, Philip S Yu, and Yangyong
Zhu. 2019. Ehr coding with multi-scale feature at-
tention and structured knowledge graph propagation.
In Proceedings of the 28th ACM international con-
ference on information and knowledge management,
pages 649–658.
Zheng Yuan, Chuanqi Tan, and Songfang Huang. 2022.
Code synonyms do matter: Multiple synonyms
matching network for automatic icd coding. In Pro-
ceedings of the 60th Annual Meeting of the Associa-
tion for Computational Linguistics (Volume 2: Short
Papers), pages 808–814.
Manzil Zaheer, Guru Guruganesh, Kumar Avinava
Dubey, Joshua Ainslie, Chris Alberti, Santiago On-
tanon, Philip Pham, Anirudh Ravula, Qifan Wang,
Li Yang, et al. 2020. Big bird: Transformers for
longer sequences. Advances in Neural Information
Processing Systems, 33:17283–17297.
Xingxing Zhang, Furu Wei, and Ming Zhou. 2019.
Hibert: Document level pre-training of hierarchi-
cal bidirectional transformers for document summa-
In Proceedings of the 57th Annual Meet-
rization.
ing of the Association for Computational Linguistics,
pages 5059–5069.
Suchin Gururangan, Ana Marasovi ́c,
Swabha
Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey,
and Noah A Smith. 2020. Don't stop pretraining:
In
Adapt language models to domains and tasks.
Proceedings of
the
the 58th Annual Meeting of
Association for Computational Linguistics, pages
8342–8360.
Chao-Wei Huang, Shang-Chi Tsai, and Yun-Nung
Chen. 2022. Plm-icd: Automatic icd coding with
pretrained language models. In Proceedings of the
4th Clinical Natural Language Processing Work-
shop, pages 10–20.
Shaoxiong Ji, Matti Hölttä, and Pekka Marttinen. 2021.
Does the magic of bert apply to medical code assign-
ment? a quantitative study. Computers in Biology
and Medicine, 139:104998.
Alistair EW Johnson, Tom J Pollard, Lu Shen, Li-
wei H Lehman, Mengling Feng, Mohammad Ghas-
semi, Benjamin Moody, Peter Szolovits, Leo An-
thony Celi, and Roger G Mark. 2016. Mimic-iii,
a freely accessible critical care database. Scientific
data, 3(1):1–9.
Biobert:
J Lee, W Yoon, S Kim, D Kim, CH So, and J Kang.
2020.
lan-
guage representation model for biomedical text min-
ing. Bioinformatics (Oxford, England), 36(4):1234–
1240.
a pre-trained biomedical
Patrick Lewis, Myle Ott, Jingfei Du, and Veselin Stoy-
anov. 2020. Pretrained language models for biomed-
ical and clinical tasks: understanding and extending
the state-of-the-art. In Proceedings of the 3rd Clin-
ical Natural Language Processing Workshop, pages
146–157.
Peter J Liu. 2018. Learning to write notes in electronic
health records. arXiv preprint arXiv:1808.02622.
Yang Liu, Hua Cheng, Russell Klopfer, Matthew R
Gormley, and Thomas Schaaf. 2021. Effective con-
volutional attention network for multi-label clinical
document classification. In Proceedings of the 2021
Conference on Empirical Methods in Natural Lan-
guage Processing, pages 5941–5953.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Man-
dar Joshi, Danqi Chen, Omer Levy, Mike Lewis,
Luke Zettlemoyer, and Veselin Stoyanov. 2019.
Roberta: A robustly optimized bert pretraining ap-
proach. arXiv preprint arXiv:1907.11692.
James Mullenbach, Sarah Wiegreffe, Jon Duke, Jimeng
Sun, and Jacob Eisenstein. 2018. Explainable pre-
diction of medical codes from clinical text. In Pro-
ceedings of the 2018 Conference of the North Amer-
ican Chapter of the Association for Computational
Linguistics: Human Language Technologies, Vol-
ume 1 (Long Papers), pages 1101–1111.
Kimberly J O'Malley, Karon F Cook, Matt D Price,
Kimberly Raiford Wildes, John F Hurdle, and
Carol M Ashton. 2005. Measuring diagnoses: Icd
|
|
http://arxiv.org/abs/2302.12636v1 | 2023-02-24T13:55:33 | 2023-02-24T13:55:33 | Streamlining Multimodal Data Fusion in Wireless Communication and Sensor
Networks | This paper presents a novel approach for multimodal data fusion based on the
Vector-Quantized Variational Autoencoder (VQVAE) architecture. The proposed
method is simple yet effective in achieving excellent reconstruction
performance on paired MNIST-SVHN data and WiFi spectrogram data. Additionally,
the multimodal VQVAE model is extended to the 5G communication scenario, where
an end-to-end Channel State Information (CSI) feedback system is implemented to
compress data transmitted between the base-station (eNodeB) and User Equipment
(UE), without significant loss of performance. The proposed model learns a
discriminative compressed feature space for various types of input data (CSI,
spectrograms, natural images, etc), making it a suitable solution for
applications with limited computational resources. | [
"Mohammud J. Bocus",
"Xiaoyang Wang",
"Robert. J. Piechocki"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12636v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12636v1",
"@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",
"eess.SP"
] | 1
Streamlining Multimodal Data Fusion in Wireless
Communication and Sensor Networks
Mohammud J. Bocus ∗, Xiaoyang Wang †, Robert. J. Piechocki∗
∗Department of Electrical and Electronic Engineering, University of Bristol, UK
†Department of Computer Science, University of Exeter, UK
{[email protected], [email protected], [email protected]}
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
6
3
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract-This paper presents a novel approach for multi-
modal data fusion based on the Vector-Quantized Variational
Autoencoder (VQVAE) architecture. The proposed method is
simple yet effective in achieving excellent reconstruction perfor-
mance on paired MNIST-SVHN data and WiFi spectrogram data.
Additionally, the multimodal VQVAE model is extended to the
5G communication scenario, where an end-to-end Channel State
Information (CSI) feedback system is implemented to compress
data transmitted between the base-station (eNodeB) and User
Equipment (UE), without significant loss of performance. The
proposed model learns a discriminative compressed feature space
for various types of input data (CSI, spectrograms, natural
images, etc), making it a suitable solution for applications with
limited computational resources.
Index Terms-VQVAE, WiFi CSI, CSI feedback, deep learning,
multimodal data fusion.
I. INTRODUCTION
Multimodal fusion is an important aspect of modern ar-
is a
intelligence and machine learning systems. It
tificial
process of combining data from multiple sensors to create a
comprehensive understanding of the environment. In various
applications, such as robotics, autonomous vehicles, and In-
ternet of Things (IoT), multiple sensors are used to capture
information from the environment, including vision, audio,
lidar, radar, sonar, GPS and more. By combining this data,
a more accurate and robust representation of the environment
can be created. Multimodal sensor fusion is important because
it helps to overcome the limitations of individual sensors and
allows for more reliable and robust decision-making. However,
compression of multimodal data is also needed for increasing
efficiency, decreasing the cost of storage and transmission, and
facilitating real-time processing of substantial datasets in a
variety of applications.
For example, in 5G networks, Channel State Information
(CSI) feedback plays a critical role in the communication
system. To enhance communication performance, 5G networks
make use of sophisticated multi-antenna techniques such as
massive MIMO, which necessitate accurate CSI feedback. This
feedback is utilized to modify the transmission parameters
the transmitter to account for the fluctuating wireless
at
channel conditions and improve communication quality. Due
to the large number of antennas employed in 5G networks,
significant amounts of CSI data are generated. To maintain
efficient operation, 5G networks need to apply advanced and
smart compression techniques to minimize the size of the CSI
feedback data, thereby reducing the latency and overhead of
the feedback process.
In the scope of multimodal sensor fusion and compression,
we propose a multimodal Vector-Quantized Variational Au-
toencoder (VQVAE) model that can handle multiple modalities
within a single model. We first evaluate our straightforward
and yet highly efficient model on paired MNIST-SVHN data
as a feasibility check for fusion and reconstruction. We then
extend our model for two different use cases. In the first case,
we apply the multimodal VQVAE model to WiFi spectro-
gram data to obtain a compressed and discriminative feature
space for passive sensing and Human Activity Recognition
(HAR) applications. In the second case, the proposed model
is evaluated in a 5G communication network perspective, more
specifically, we use our model to compress CSI feedback
data efficiently that are transmitted from a User Equipment
(UE) to a gNodeB (base-station), while maintaining excellent
reconstructed channel estimate quality.
This paper is organised as follows: Related works on multi-
modal data fusion are presented in Section II. The background,
methodology and system design are described in Section III.
Section IV provides detailed information on the experimental
setup and corresponding results. Finally, conclusions are drawn
in Section V.
II. RELATED WORK
In this section, we review previous research on the topic
of multimodal generative modeling and sensor fusion. The
goal of Multimodal Variational Autoencoders (MVAEs) is to
learn a joint representation for different kinds of modalities in
a self-supervised way, without the need for manual labeling
of large amounts of data [1]. However, obtaining a unified
representation from multiple modalities can be challenging
as they are often of different data types, having different
distributions, levels of sparsity, and dimensions [2]. To learn a
shared representation across multiple modalities, the authors of
[3] employ a joint inference network. To tackle the challenge
of a missing modality, they train individual (single-modal)
inference networks for each modality as well as a bi-modal
inference network to learn the joint posterior through the
use of the Product-of-Experts (PoE) method. MVAE [4],
which is similarly based on PoE, only takes into account
a partial combination of the observed modalities, resulting
in a smaller number of parameters and increased computing
2
Fig. 1: Multimodal VQVAE model.
efficiency. On the other hand, the Mixture-of-Experts (MoE)
technique is used in [5] to learn the shared representation
across several modalities. To get the best of both worlds, [6]
attempts to integrate the benefits of both MoE and PoE in their
model, which is referred to as MoPoE (Mixture-of-Products-
of-Experts)-VAE. In [1], the authors proposed a technique for
multimodal sensor fusion. The method consists of a two-stage
process, whereby a multimodal generative model is trained on
unlabelled data in the first stage. Then, in the second stage,
this trained generative model serves as a reconstruction prior
and the search manifold for various sensor fusion tasks such
as multisensory classification, denoising, and recovery from
subsampled (compressed) observations.
features from Passive WiFi Radar (PWR) and CSI data such as
spectrograms, scalograms and Markov Transition Field (MTF).
As compared to the conventional
transformer architecture
which divides an image into small patches, the authors instead
use a different technique whereby each patch represents a
different image-based feature. They developed both supervised
and self-supervised models and demonstrated their excellent
performance on the HAR task compared to traditional Con-
volutional Neural Networks (CNNs). Other approaches used
in HAR applications include contrastive learning methods
[11]–[13], which necessitate either multiple views per sensor
modality or robust data augmentation methods to generate
pairs of negative and positive samples.
When it comes to multimodal sensor fusion for human
activity detection employing Radio-Frequency (RF), inertial,
and/or vision sensors, the bulk of publications have either
investigated feature-level fusion or decision-level fusion [1].
For example, [7] uses a hybrid Deep Neural Network (DNN)
model to perform multimodal fusion at the decision level
by exploiting the advantages of both WiFi and vision-based
sensors. [8] describes a method for activity recognition that
makes use of four different sensor modalities, including WiFi
fingerprints, inertial and motion capture measurements, and
skeletal sequences. The measurements from each modality are
transformed into images and the fusion of the multimodal
data is formulated as a matrix concatenation. A multimodal
Human Activity Recognition (HAR) system that uses WiFi and
wearable sensor modalities to jointly infer human behaviours
was proposed by the authors in [9]. They gather measure-
ments of the user's body motions through a wearable Inertial
Measurement Unit (IMU) and WiFi CSI data. Their method
consists of calculating the magnitude of the inertial data for
each sensor of the IMU and the time-variant Mean Doppler
Shift (MDS) from the processed CSI data. The magnitude
and the MDS are then independently used to extract different
temporal and frequency domain features. The authors adopt
the feature-level fusion, whereby feature vectors from the
same activity sample are concatenated sequentially. Finally,
supervised machine learning methods are employed to classify
human activities. The authors of [10] leverage the transformer
architecture for multimodal sensor fusion. They use different
signal processing techniques to extract multiple image-based
Recently, some models which leverage discrete represen-
tation through vector quantisation have been proposed. Such
examples are VQVAE [14] and VQVAE-2 [15]. VQVAE is
a type of generative model that combines the principles of
autoencoders and vector quantization to generate high-quality,
compact representations of data. VQVAE is used in various
applications, such as image and audio synthesis, to generate
high-quality, compressed representations of data that can be
used for further analysis or manipulation. The VQVAE model
is made up of three parts; an encoder that converts an image
into latent variables, a shared codebook that is used to quantize
these continuous latent vectors to a set of discrete latent
variables (each vector is replaced with the nearest vector from
the codebook), and a decoder that uses the indices of the
vectors from the codebook to reconstruct back the image.
VQ-VAE-2 extends the original VQVAE by implementing
a two-level hierarchical encoder-decoder model (with multi-
scale latent maps) which uses an autoregressive prior, namely,
PixelCNN to sample diverse high resolution samples [15].
In this work, we extend the VQVAE model
to a mul-
timodal setting. More specifically, our proposed model can
take multimodal data as input, then it compresses the data
to a shared low-dimensional discrete latent representation
space and reconstruct
the data from the quantized output
of the vector quantizer with low reconstruction error using
corresponding decoders.
Encoder 1Encoder 2WiFiactivity spectrogramsModality 1(view 1)Modality 2(view2)Layers of:1.Convolution2.ReLUReshapeReshapeFla�enComputedistance 1ComputemeandistanceargminIndex fromcodebookReshapedquan�zedoutputLatentcodebookVector quantizationDecoder 1Decoder 2ReconstructedspectrogramsLayers of:1.TransposeConvolution2.ReLUCopy gradients (straight through)quantized =input_1+input_2 + (quantized-input_1-input_2).detach()Xnchwn11224224��(,,,)(,,,)Xnchwn21224224��(,,,)(,,,)zndhwneee11285656��(,,,)(,,,)zndhwneee21285656��(,,,)(,,,)(,,,)(,,,)nhwdnee�5656128(**,)nhwdee(**,)nhwkee(**,)nhwee1znq�(,,,)1285656Xn11224224^(,,,)�Xn21224224^(,,,)�[,,,](,)(,)eeekdk12512128��Fla�enComputedistance 2(**,)nhwdee3
VQVAE model. For M input modalities, there will be M
encoders and decoders. Each modality data will go through
their respective encoders. In the VQ stage, each encoder's
output will be reshaped, flattened and the distance is computed
using the codebook. Then the mean distance is computed
across all input modalities. After the VQ stage, the quantized
output serves as input to each corresponding modality decoder
to reconstruct their data. We propose a simple but yet very
effective framework for multimodal data fusion, as we shall
see in section IV where we carry out various experiments on
paired MNIST-SVHN data and real WiFi spectrogram data, as
well as simulated 5G communication CSI feedback data.
C. WiFi CSI-based Sensing
WiFi-CSI based sensing systems have been implemented
for many applications. For example, human motions within
an indoor environment affect
the propagation of wireless
signals transmitted by the passive WiFi sensors [19]. These
applications include HAR [20]–[22], fall detection [23], [24],
sign language recognition [25], gesture recognition [26], [27],
occupancy detection [28], crowd counting [29], respiration
monitoring [30], among others. Specific IEEE 802.11 Net-
work Interface Cards (NICs), such as the Intel 5300 [31] or
Atheros [32], can be used to retrieve CSI data. These WiFi
devices leverage Orthogonal Frequency Division Multiplexing
(OFDM) at the physical layer. The CSI is represented as a
3D matrix of complex values holding information about the
wireless signal characteristics, including propagation delay,
amplitude attenuation, and phase shift of multiple propagation
paths [10]. WiFi-based sensing is an active area of research.
In future real-world large-scale applications, CSI data will be
transmitted to a cloud server for computation and data record,
thereby creating new challenges for WiFi sensing in terms of
reducing communication cost and simultaneously performing
model inference [33].
The OPERAnet dataset [34], which contains freely acces-
sible data from WiFi-based systems, is used in this study.
The dataset also contains Kinect and ultra-wideband data.
The dataset was gathered with the goal of analysing HAR
and localization methods using data from synchronised RF
devices and vision-based sensors. The various sensors recorded
measurements for six human activities carried out by six
participants. These activities include sitting down on a chair,
standing from chair, lying down on the floor, standing from
floor, body rotating, and walking. The aforementioned ac-
tivities were completed by the participants in two separate
rooms at different locations. The CSI data were collected
across 3 transmit and 3 receive antennas over 30 subcarriers,
giving rise to 270 complex CSI values per packet and the
sampling rate was set at 1.6 kHz. The data were also captured
using two synchronised WiFi CSI receivers. As a result, a
substantial volume of data must be processed. Therefore,
the computational complexity of such data may be reduced
by using dimensionality reduction techniques like Principal
Component Analysis (PCA). Additionally, the resulting data
may be subjected to the Short Time Fourier Transform (STFT)
to produce spectrograms that resemble those produced by
Fig. 2: Illustration of communication between a gNodeB (base
station) and User Equipment (UE) in a conventional 5G radio
network.
III. METHODOLOGY AND SYSTEM DESIGN
A. VQVAE
The VQVAE model consists of an encoder and decoder net-
work, a Vector Quantization (VQ) layer and a reconstruction
loss function [16]. The encoder takes as input the data sample
x, and outputs the vector zu = f (x). The VQ layer maintains
an embedding table, e ∈ Rk×d, which consists of k vectors of
dimension d, to quantize the encoder outputs. The VQ layer
outputs an index c and the corresponding embedding ec, which
is closest to the input vector zu in Euclidean distance. Given an
input signal (e.g. an RGB image), the encoder first encodes it
as a he ×we ×d tensor, where he and we denote the height and
width of the latent representation, respectively. Then, every
d dimensional vector is quantized using a nearest-neighbor
lookup on the embedding table [17] as per the following:
zij = arg min
e∈e
(cid:107) enc(x)ij − e (cid:107)2,
(1)
where i, j refers to a spatial location. The decoder then uses
the embedding ec to reconstruct the input data, ˆx. Since the
quantization operation is non-differentiable, the gradient is
approximated using the straight-through estimator. That is, the
gradient from the first layer of the decoder is passed directly
to the last layer of the encoder, bypassing the codebook. The
latter is updated via exponential moving average of the encoder
outputs. The loss function is represented as
Lt = Lr(ˆx, x) + β (cid:107) zu − sg(ec) (cid:107)2,
(2)
where sg(*) denotes the stop gradient function. The first term
is the reconstruction loss while second term is the commitment
loss which is used to regularize the encoder to produce vectors
close to the embeddings in order to minimize the quantization
error [16]. The embedding table is updated independently from
the encoder and decoder by minimizing mine (cid:107) sg[enc(x)ij]−
e (cid:107)2 [17]. It should be pointed out that in order to reconstruct
the input, only the he ×we indices are required, thus achieving
a high compression rate. Compression ratio can be defined
as the ratio of the codeword dimension to the original data
dimension [18]. For RGB images, the compression rate, γ, is
given by h×w×3×log2(256)
he×we×(cid:100)log2(k)(cid:101) .
B. Proposed Multimodal VQVAE Model
Our proposed multimodal VQVAE model is shown in Fig.
1. Our model follows the same principles as the original
gNBUECSI referencesignal (RS)Downlink dataCSI feedback4
Fig. 3: CSI feedback pre-processing steps.
Fig. 4: End-to-end CSI feedback multimodal VQVAE model.
Doppler radars. The interested reader can learn more about
the signal processing pipeline for WiFi CSI in our earlier
studies [20]–[22]. The conversion of raw WiFi CSI data to
spectrograms can be regarded as a pre-processing step to
data compression. Using the multimodal VQVAE model, the
data can be further compressed and used in downstream tasks
like human activity classification. Future CSI-based sensing
systems will require both a compressed and discriminative
feature space for sensing and recognition applications [33].
D. CSI Compression in Communication
Massive Multiple-Input Multiple-Output (MIMO) technol-
ogy has been extensively embraced as a top-tier solution for
5G connectivity. The MIMO system can greatly lessen multi-
user interference by utilising CSI at base stations [33]. To
do this, the CSI is collected at the UE which is ultimately
sent back via a feedback communication link to the base
station [35]. The CSI feedback overhead consumes a sizable
portion of the uplink bandwidth, especially when there are a
lot of transmit antennas. Many research have been presented to
decrease feedback overhead for CSI encoding and decoding in
a MIMO system, for example, using LASSO L1-solver [36] or
compressive sensing [37]. However, because the channel ma-
trix is only roughly sparse, the simple prior cannot completely
recover compressed CSI [33], [38]. In [38], an unsupervised
deep learning algorithm (closely related to the autoencoder) is
proposed to effectively use the channel structure from training
samples in the contexts of CSI sensing and recovery. The
algorithm, named CsiNet, basically learns to transform CSI
into a near-optimal number of representations (or codewords),
and vice-versa (inverse transformation). Comparing CsiNet to
current compressed sensing (CS)-based approaches, the recon-
struction quality of the recovered CSI is much better. In [39],
the authors introduce two new structures, ConvCsiNet (based
[NscNsymNrxNtxNslot],,,,[NscNrxNtxNslot],,,Ndelay[NrxNtxNslot],,,[NscNrxNtxNslot],,,Ndelay[NrxNtxNslot],,,Ndelay[NrxNtxNslot],,,,2for each receiverAverage oversymbols2D-DFTTruncate delayNdelay2D-IDFTComplex toreal-imaginaryRealTxAntennas(8)Subcarriers(28)ImaginaryTxAntennas(8)Subcarriers(28)RealTxAntennas(8)Subcarriers(28)ImaginaryTxAntennas(8)Subcarriers(28)zndhwneee11285656��(,,,)(,,,)zndhwneee21285656��(,,,)(,,,)Receiver1Receiver2Encoder 1Encoder 2ReshapeReshapeFla�enFla�enCompute distance 2Compute distance 1Compute meandistanceargminIndex fromcodebookReshapedquan�zedoutputLatent codebook(e1, e2, ...., ek)(k,d) = (512,128)VectorquantizationDecoder 1Decoder 2Copy gradients(straight through)quantized = input_1 + input_2 + (quantized-input_1-input_2).detach()Concatenatereal andimaginary partsas 2 channelsConcatenatereal andimaginary partsas 2 channelsAfter post-processingRealTxAntennas(8)Subcarriers(28)ImaginaryTxAntennas(8)Subcarriers(28)(,,,)(,,,)nhwdnee�5656128(,,,)(,,,)nhwdnee�5656128(**,)nhwdee(**,)nhwdee(**,)nhwkee(**,)nhwkee(**,)nhwkee(**,)nhwee1znq�(,,,)1285656RealTxAntennas(8)Subcarriers(28)ImaginaryTxAntennas(8)Subcarriers(28)TxAntennas(8)Subcarriers(624)TxAntennas(8)Subcarriers(624)(**,)nhwdee5
example from [40]. The main parameters used to generate
the CDL channel are as follows: RMS Delay spread of 300
ns, maximum Doppler of 5 Hz, 52 resource blocks each
consisting of 12 subcarrriers, subcarrier spacing of 15 kHz, 14
symbols per slot, 8 transmit antennas and 2 receive antennas.
After simulating the channel, the perfect channel estimate
matrix, Hest is represented as an [Nsc, Nsym , Nrx , Ntx] array
for each slot, where Nsc, Nsym , Nrx , and Ntx correspond to the
number of subcarriers, symbols, receive antennas and transmit
antennas, respectively.
2) CSI feedback pre-processing: Here, we pre-process the
CSI feedback data to reduce its size and then we convert
it to a real-valued arrays, as shown in Fig. 3. In the first
step, we assume that the channel coherence time is much
larger than the slot time, and therefore we average the channel
estimate over a slot to obtain an [Nsc, 1, Nrx , Ntx ] array. In the
second step, a 2D Discrete Fourier Transform (DFT) is applied
over the subcarriers and transmit (tx) antennas dimensions for
each receive (rx) antenna and slot to transform the CSI data
into a sparse angular-delay domain [38]. Since the channel's
multipath delay is limited, the delay dimension is truncated to
eliminate values that do not hold any information. The sam-
pling period on the delay dimension is Tdelay = 1/(Nsc ∗ Fss),
where Fss is the subcarrier spacing. The expected RMS delay
spread, represented as the number of delay samples, is given
by τRMS/Tdelay, where τRMS is the channel's RMS delay spread
in seconds. Next, the channel estimate is truncated to an even
number of samples that is 10 times the expected RMS delay
spread. Using a greater truncation factor value can decrease
the performance loss due to pre-processing. However, this
increases the number of required training data points, training
time and model complexity, and a model with more learnable
parameters might not converge to a better solution [40].
To revert back to the subcarriers-transmit antennas domain
(frequency-spatial), a 2D Inverse DFT (IDFT) is applied to
the truncated array [41]. This process effectively decimates
the channel estimate across the subcarrier dimension (from
52 × 12 = 624 subcarriers to 28 subcarriers). Finally, the
complex channel estimate is broken down into its real and
imaginary parts to obtain an [Ndelay, Ntx, 2] array for each
receiver channel and slot. In an end-to-end CSI feedback
system, the UE utilizes the CSI-RS signal to obtain the channel
estimate for one slot, Hest. The pre-processed channel estimate,
Htr is obtained using the steps in Fig. 3, which is then encoded
by using the encoder-VQ portion of the multimodal VQVAE
model in Fig. 4 to generate a compressed array. The latter
is decompressed by the decoder portion of the multimodal
VQVAE model to obtain ˆHtr, which is then post-processed to
produce ˆHest. Post-processing basically consists of the inverse
steps in Fig. 3 (real-imaginary to complex conversion, 2D-
DFT, etc.).
IV. EXPERIMENTS & RESULTS
In this section, the experiments carried out using the multi-
modal VQVAE architecture are described and the results are
presented. The default model's encoder and decoder structures
used in each experiment are provided in Table I.
Fig. 5: Examples of paired MNIST and SVHN images re-
constructed using multimodal VQVAE model: (a) (k, d) =
(512, 128), mean reconstruction error across test data =
0.0033, (b) (k, d) = (64, 128), mean reconstruction error
across test data = 0.0056.
on a CNN autoencoder) and ShuffleCsiNet (based on ConvC-
siNet), for CSI compression. Both structures outperform the
previously proposed CsiNet in terms of reconstruction quality
as measured by the Normalized Mean Squared Error (NMSE).
While ShuffleCsiNet has a lower complexity compared to
ConvCsiNet, it still remains more complex than CsiNet.
E. CSI Feedback System
In this section, we introduce the concept of CSI feedback for
a conventional 5G radio network, as illustrated in Fig. 2. Our
objective is to show how our multimodal VQVAE model in
Fig. 1 can be adapted to compress CSI feedback information
(raw channel estimate) over a Clustered Delay Line (CDL)
channel. CSI parameters are values linked to a channel's status
that are extracted from the channel estimate array in typical
5G radio networks. These parameters include Rank Indicator
(RI), Precoding Matrix Indices (PMI) with different codebook
sets and Channel Quality Indication (CQI) [40]. In Fig. 2, the
UE uses the CSI Reference Signal (CSI-RS) to measure and
calculate the CSI parameters. The UE then sends (as feedback)
the CSI parameters to the base-station (gNodeB) so that the
latter can adapt the downlink data transmission in terms of
MIMO precoding, number of transmission layers, code rate,
and modulation scheme [40]. In order to reduce the amount of
overhead in the CSI feedback data, the UE must process the
raw channel estimate. While the authors of [38], [39] assume
a single receiving antenna at the UE, we, on the other hand,
propose a model which is applicable to MIMO contexts. In our
approach, we aim for the UE to compress the channel estimate
array using a multimodal VQVAE model and then feed it back
to the gNodeB. The latter then decompresses and processes the
received channel estimate to schedule the downlink data link
parameters accordingly.
1) 5G channel generation: We use the MATLAB 5G
ToolboxTM to generate a 5G downlink channel, following the
Modality 1Modality 2TrueReconstructedTrueReconstructed(a)(b)6
TABLE I: Multimodal VQVAE network architecture used in 3 experiments. Conv2d represents 2D convolution and ConvTrans-
pose2d represents 2D transposed convolution. A×(H,W): A denotes the channel number, and (H,W) represents the height and
width of the operation kernel.
Input to each
encoder
WiFi CSI (2 receivers)
Spectrogram data: (B×1×224×224)
Paired MNIST-SVHN
Encoder 1: MNIST: (B×1×32×32)
Encoder 2: SVHN: (B×3×32×32)
CSI feedback (2 receivers)
Pre-processed CSI feedback data: (B×2×28×8)
No. of channels = 2 because of real and imaginary
components.
28×8 corresponds to 28 subcarriers and 8 transmit
antennas after pre-processing.
Decoder
Conv2d 128×(3,3),
stride=(1, 1),
padding=(1,1)
Encoder
Conv2d 64×(4,4),
stride=(2, 2),
padding=(1,1)
ReLU
Conv2d
128×(4,4),
stride=(2, 2),
padding=(1,1)
ReLU
Conv2d
128×(3,3),
stride=(1, 1),
padding=(1,1)
Encoder
Conv2d
64×(4,4),
stride=(2, 2),
padding=(1,1)
ReLU
Conv2d
128×(4,4),
stride=(2, 2),
padding=(1,1)
ReLU
Conv2d
128×(3,3),
stride=(1, 1),
padding=(1,1)
Decoder
Conv2d 128×(3,3),
stride=(1, 1),
padding=(1,1)
Encoder
Conv2d 64×(4,3),
stride=(2, 1),
padding=(1,1)
ReLU
Conv2d 128×(2,3),
stride=(2, 1),
padding=(1,1)
Decoder
Conv2d 128×(3,3), stride=(1,
1), padding=(1,1)
Residual
Stack
(no. of
residual
blocks=2)
Encoder
output
dimension
Pre-VQ-Conv
layer
B×128×56×56
Conv2d
128×(1,1),
stride=(1, 1)
ReLU
Conv2d 32×(3,3), stride=(1, 1), padding=(1,1) , bias=False
ReLU
Conv2d 128×(1,1), stride=(1, 1) , bias=False
ReLU
Conv2d 32×(3,3), stride=(1, 1), padding=(1,1) , bias=False
ReLU
Conv2d 128×(1,1), stride=(1, 1) , bias=False
B×128×8×8
B×128×8×8
Conv2d
128×(1,1),
stride=(1, 1)
Conv2d 128×(1,1),
stride=(1, 1)
ConvTranspose2d
64×(4,4), stride=(2,
2), padding=(1,1)
ReLU
ConvTranspose2d
2×(4,4), stride=(2,
2), padding=(1,1)
ConvTranspose2d
64×(4,4), stride=(2,
2), padding=(1,1)
ReLU
ConvTranspose2d
2×(4,4), stride=(2,
2), padding=(1,1)
ConvTranspose2d 64×(3,3),
stride=(2, 1), padding=(1,1)
ReLU
ConvTranspose2d 2×(2,3),
stride=(2, 1),
padding=(1,1)
Compression
rate, γ
= 2×(1×224×224×8) / (56×56×9)
= 28.44
(consdering k=512 embeddings in
the codebook, 2 input spectrograms
and 8 bits per channel)
= [(1×32×32×8) + (3×32×32×8)] /
(8×8×9) = 56.89
(consdering k=512 embeddings in the
codebook, MNIST data with 1 channel,
SVHN data with 3 channels, and 8 bits
per channel)
=2×(2×28×8×(4×8))
/ (8×8×9) = 49.78
(considering pre-processed CSI feedback data, 2
receivers each with 2 channels (real and
imag), k=512 embeddings in the codebook, and one
float number occupies 4 bytes=32 bits)
TABLE II: Classification results using DenseNet-121 on WiFi
data.
Data input type
Original spectrograms (1 channel)
Modality 1
Original spectrograms (1 channel)
Modality 2
Original spectrograms (2 channels)
Modality 1 + Modality 2
Reconstructed spectrograms (2 channels)
Modality 1 + Modality 2
Multimodal VQVAE latent vector
F1-macro
0.916205
0.936949
0.947357
0.925473
0.905211
A. Paired MNIST-SVHN Data
We first evaluate the effectiveness of our multimodal VQ-
VAE model on more common datasets, namely, MNIST and
SVHN. The multimodal dataset is constructed from pairs of
MNIST (1 × 32 × 32) and SVHN (3 × 32 × 32) images as in
[42], such that each pair represents the same digit class. Each
example of a digit class in one dataset is paired randomly
with 20 examples of the same digit class from the other
dataset. The training set consists of 50,000 samples while
the validation set consists of 48,930 samples. The number of
embeddings in the codebook is k = 512 and the embedding
dimension is d = 128. The other parameters used in the model
include a commitment cost of 0.25, learning rate of 1e-4,
batch size of 64 and 500 epochs for training. The encoder
and decoder structures are given in Table I. The trained latent
space for the paired MNIST-SVHN data is shown in Fig.
7(b). The trained latent space shows distinct clusters for the
10 digits classes using t-SNE visualization (on the quantized
output). The reconstruction results are shown in Fig. 5. The
mean reconstruction error across the test set is 0.003 when
(k, d) = (512, 128), and good visual reconstruction quality
is observed. When the number of codebook embeddings is
changed from k = 512 to k = 64, keeping embedding
dimension fixed at d = 128, that is, the compression rate,
γ, increases from from 56.89 to 85.33 considering combined
modalities, the mean reconstruction error also increases. How-
ever, the reconstruction quality is not seriously compromised.
B. WiFi Spectrogram Data
In this experiment, we use the WiFi CSI dataset previously
described in section III-C. We use various signal processing
techniques to convert the raw WiFi CSI data acquired from
two synchronised receivers into image-like spectrograms (rep-
resenting 4s of a human activity), which were resized to a
7
Fig. 8: WiFi CSI spectrograms classification model.
Fig. 6: Examples of WiFi human activity spectrograms re-
constructed using multimodal VQVAE model: (a) (k, d) =
(512, 128), mean reconstruction error across test data =
0.0006, (b) (k, d) = (64, 128), mean reconstruction error
across test data = 0.0006.
Fig. 7: t-SNE representation of trained latent space: (a) WiFi
spectrogram data, (b) Paired MNIST-SVHN data
dimension of 1 × 224 × 224 (1-channel). As depicted in Fig.
1, the spectrogram data from each modality (receiver) serve
as input to the encoders in the multimodal VQVAE model.
The multimodal data are fused in the VQ stage. We split
the spectrogram data into a training set (60%=1464 samples),
validation set (20%=488 samples) and test set (20%=488
samples). The number of embeddings in the codebook is
k = 512 and the embedding dimension is d = 128. The
other parameters used in the model include a commitment
cost of 0.25,
learning rate of 1e-4, batch size of 64 and
500 epochs for training. Some examples of the reconstruction
results using the test set are shown in Fig. 6. We observe
very good reconstruction results from both modalities, with a
reconstruction error of 0.0006 (across the test set). Moreover,
when the codebook size is reduced from 512 to 64 while
keeping the embedding dimension fixed at 128, the recon-
struction error stays the same. That is, even if the compression
rate, γ, increases from 28.44 to 42.66 considering combined
modalities, the mean reconstruction error does not increase for
the WiFi spectrogram data. This implies that a high level of
compression is possible with such data, without degradation
in reconstruction quality. The trained latent space for WiFi
spectrogram data is shown in Fig. 7(a). The trained latent
Fig. 9: Examples of true and reconstructed CSI feedback
samples (real and imaginary) for each receiver (modality)
considering different encoder output dimensions: (a) 28×8
(mean reconstruction error across test data = 0.00002062),
(b) 8×8 (mean reconstruction error across test data =
0.00006185), (c) 4×8 (mean reconstruction error across test
data = 0.00006679), (d) 4×4 (mean reconstruction error across
test data = 0.00006738), and (e) 2×2 (mean reconstruction
error across test data = 0.00016221).
space shows distinct clusters using t-SNE visualization (on the
quantized output). The model was trained in a self-supervised
fashion, and the six clusters in Fig.7(a) represent the six human
activities.
We also evaluate the classification performance of the
trained multimodal VQVAE model on the spectrogram data
for the purpose of HAR. For this, we use the classification
model illustrated in Fig. 8, where training of the DenseNet-121
(pre-trained on ImageNet) is conducted with the original WiFI
spectrograms, compressed latent vectors, and reconstructed
spectrograms. We use an Adam optimizer with a learning
rate of 0.0001. The classifier is trained for 100 epochs. The
classification results, in terms of macro F1-score, are given
in Table II. The classification results on individual modalities
are shown in the first and second rows of Table II. We also
combine the original data from both modalities as a 2-channel
input data to the classifier. We observe that the macro F1-score
(a)(b)Modality 1Modality 2TrueReconstructedTrueReconstructed(a)(b)Encoder 1Encoder 2WiFiactivity spectrogramsModality 1(view 1)Modality 2(view2)X1 = (n,c,h,w) =(n,1,224,224)X2 = (n,c,h,w) =(n,1,224,224)Compressedlatent vector(1,56, 56)Decoder 1Decoder 2ReconstructedspectrogramsX1 =(n,1,224,224)X2 =(n,1,224,224)DenseNet-121ClassifierInput toclassifierInput toclassifier(3,56, 56)Transposeconvolution(a)(b)(c)(d)(e)rx1_real_truerx1_real_reconrx1_imag_reconrx1_imag_truerx2_real_truerx2_real_reconrx2_imag_reconrx2_imag_trueModality 1Modality 28
drops only marginally when classification is performed on
the compressed multimodal VQVAE latent vector, which is
acceptable because a large compression rate may hinder the
discriminative nature of the feature space.
C. CSI Feedback Data
Next, we evaluate the multimodal VQVAE model on the
CSI feedback data previously described in section III-E. The
model architecture for the CSI feedback data is depicted in
Fig. 4, where the CSI data are regarded as a special type
of "image". 7,500 channel realizations were generated, from
which 4,500 samples were used for training the multimodal
model, and 1,500 samples were used as validation set and
1,500 samples as test set. The other parameters used in the
model include a commitment cost of 0.25, learning rate of 1e-
4, batch size of 64 and 1,000 epochs for training. The model
is trained in an end-to-end manner and the reconstructed data
is shown in Fig. 9 for the real and imaginary parts of the CSI
data for each modality (receiver). Depending on the encoder
output dimension (achieved by modifying the number of layers
and kernel size), that is, different compression rate, the mean
reconstruction error will vary accordingly. The encoder output
dimension of 28 × 8 is the same as the pre-processed CSI data
dimension (refer to Fig. 3), and it is not further compressed by
the multimodal VQVAE model. This serves as a baseline and
it can be observed from Fig. 9(a), that this encoder dimension
achieves the best mean reconstruction error across the test set.
The worst mean reconstruction error is achieved by the en-
coder with an output dimension of 2×2. After post-processing
the real and imaginary components of the reconstructed CSI
data from each receiver, we obtain the reconstructed complex
channel estimate, ˆHest, with the same dimension as the true
channel estimate, Hest, that is 624×2×8, corresponding to 624
subcarriers, 2 receive antennas and 8 transmit antennas. The
performance of the end-to-end CSI feedback system is shown
in Fig. 10 for different encoder output dimensions (and thus
compression rates) in terms of mean end-to-end correlation,
(ρ) and Normalized Mean Squared Error (NMSE). The cosine
correlation, ρ, is defined as
Nsc(cid:88)
ρ (cid:44) E
1
Nsc
(cid:12)
(cid:12)
(cid:12)
(cid:13)
ˆhp
(cid:13)
(cid:13)
where hp and ˆhp are the true and reconstructed channel esti-
mates of the pth subcarrier, respectively. NMSE is computed
as
(cid:12)
(cid:12)
(cid:12)
(cid:107)hp(cid:107)2
ˆhH
p hp
(cid:13)
(cid:13)
(cid:13)2
(3)
p=1
,
NMSE (cid:44) E
,
(4)
(cid:41)
(cid:40)
(cid:107)H − ˆH(cid:107)2
2
(cid:107)H(cid:107)2
2
Fig. 10: Performance of multimodal VQVAE CSI feedback
system considering different encoder output dimensions and
(k, d) = (512, 128): (a) Mean end-to-end correlation (ρ), and
(b) Mean NMSE. Encoder output dimension of 28 × 8 refers
to uncompressed pre-processed CSI data. Encoder output
dimensions of 2 × 2, 4 × 4, 4 × 8 and 8 × 8 correspond to
compression rates (γ) of 796.44, 199.11, 99.56 and 49.78,
respectively.
Fig. 11: Performance of multimodal VQVAE CSI feedback
system for different number of codebook embeddings, consid-
ering a fixed embedding dimension (d) of 128 and encoder
output dimension of 8 × 8 (compression rate, γ, of 49.78): (a)
Mean end-to-end correlation (ρ), and (b) Mean NMSE.
Fig. 12: Examples of true and reconstructed channel estimate
data using multimodal VQVAE model: (a) indoor environment
(mean reconstruction error across test data = 0.00008826), and
(b) outdoor environment (mean reconstruction error across test
data = 0.00044909). Encoder output dimension is 8 × 8 and
(k, d) = (256, 128).
for the reconstructed data from the two modalities (treated
as a 2-channel input) is slightly lower than with the original
input data. For the classification on the multimodal VQVAE
latent vector, we first apply a 2D transpose convolution on
the quantized output to obtain a latent vector of dimension
3 × 56 × 56. The resultant latent vector is then used to train
the DenseNet-121 classifier. It is observed that the accuracy
where H and ˆH denote the true channel and recovered
channel, respectively. The number of embeddings (k) in the
codebook and embedding dimension (d) are 512 and 128,
respectively. It can be observed from Fig. 10 that as the
compression rate increases, the performance also degrades as
expected. However, considering the encoder output dimensions
of 4 × 4, 4 × 8 and 8 × 8, which correspond to compression
rates of 199.11, 99.56 and 49.78, respectively, we observe
28x82x24x44x88x80.880.90.920.940.960.98128x82x24x44x88x8-16-14-12-10-8-6(a)(b)641282565120.9570.9580.9590.960.9610.9620.9630.9640.96564128256512-11.6-11.4-11.2-11-10.8-10.6(a)(b)TrueReconTrueRecon(a)(b)D. Comparison with State-of-the-Art CSI Feedback Models
Ours
that there is only very slight difference in their performance.
Furthermore, in Fig. 11 we analyse the performance of the
end-to-end CSI feedback system in terms of different number
of embeddings, k, in the codebook. An encoder with output
dimension of 8 × 8 (compression rate of 49.78) is considered
and the embedding dimension (d) is 128. It can be observed
that when k = 256, the best performance is achieved in terms
of end-to-end correlation (ρ) and NMSE. This means that we
can use a smaller number of embeddings (k) in the codebook
to achieve an even higher compression rate (γ) with still a
better performance.
In this experiment, we compare our multimodal VQVAE
model
to CsiNet [38] and ConvCsiNet/ShuffleCsiNet [39]
using the same wireless channel data [43]. The training and
testing samples are generated for indoor (picocellular scenario
the
the 5.3 GHz band) and outdoor (rural scenario at
at
300 MHz band) environments using the COST 2100 channel
model [44]. The base-station is located at the centre of a
square of dimension 20 m×20 m and 400 m×400 m for the
indoor and outdoor environments, respectively. The UE in each
environment is randomly positioned within the measurement
area and is equipped with a single receiving antenna. The base-
station consists of a Uniform Linear Array (ULA) of Ntx = 32
antennas and the number of subcarriers is Nsc = 1024. When
the channel matrix is converted to the angular-delay domain
using 2D-DFT, only the first 32 rows of the channel matrix,
H, are retained, thus resulting in a dimension of 32 × 32 [38].
The training, validation, and testing sets consist of 100,000,
30,000, and 20,000 samples, respectively. We trained our
multimodal VQVAE model in Fig. 4 for 1,000 epochs, with
a learning rate of 1e-4 and batch size of 64. Note that since
there is only one receiving antenna in this case, the real and
imaginary parts of the channel matrix, H, were considered
as two modalities. Therefore, each encoder in Fig. 4 takes
as input a 1 × 32 × 32 channel data (real and imaginary
separately). We use the same encoder/decoder structure as in
Table I for the WiFi CSI data. Each encoder output thus has
a dimension of 8 × 8. We consider an embedding dimension
d = 128 and number of embeddings, k = 256 and k = 512
in the evaluation of the correlation, ρ, and NMSE in Table
III. Note that the channel matrices (true and reconstructed) are
transformed back to their original dimensions when computing
these two metrics. The compression rates, γ, are 114 and 128
for k = 512 and k = 256, respectively. We also include
γ = 32 for an encoder output dimension of 16 × 16 and
(k, d) = (256, 128). The results in Table III show that the
overall performance of our model is much better than CsiNet,
ConvCsiNet and ShuffleCsiNet. For example, considering the
same compression rate of γ = 32, our model achieves higher
correlation values (ρ) and better NMSE than the other models
for both the indoor and outdoor environments. Also, when we
use a compression rate as high as γ = 128, our model still
performs better than the other models which use a four times
lower compression rate of γ = 32. Some samples of the true
and reconstructed channel data are shown in Fig. 12 for the
9
TABLE III: Performance comparison between CsiNet, Con-
vCsiNet, ShuffleCsiNet and our multimodal VQVAE model
on the same wireless channel data.
Method
Compression rate, γ
Cosine similarity, ρ
NMSE
Indoor
Outdoor
Indoor Outdoor
CsiNet [38]
ConvCsiNet [39]
ShuffleCsiNet [39]
4
16
32
64
16
32
16
32
32
114
128
0.99
0.93
0.89
0.87
0.98
0.95
0.97
0.94
0.98
0.96
0.95
0.91
0.79
0.67
0.59
0.85
0.82
0.82
0.74
0.93
0.85
0.84
-17.36
-8.65
-6.24
-5.84
-13.79
-10.10
-12.14
-9.41
-14.52
-10.63
-10.41
-8.75
-4.51
-2.81
-1.93
-6.00
-5.21
-5.00
-3.50
-9.99
-6.06
-5.56
indoor and outdoor environments where good reconstruction
performance is observed across the test set samples. For
instance, when the encoder output dimension is 8 × 8 and
(k, d) = (256, 128), the mean reconstruction errors across the
test data are 0.00008826 and 0.00044909 for the indoor and
outdoor environments, respectively.
V. CONCLUSION
In conclusion, our proposed multimodal VQVAE archi-
tecture is a highly efficient solution for multimodal data
fusion and compression. Its simple structure and excellent
performance on paired MNIST-SVHN data, WiFi spectrogram
data, and CSI feedback data in a massive MIMO system
demonstrate its potential for a wide range of applications.
The added compression achieved by the model without se-
vere degradation in reconstruction performance is particularly
beneficial in bandwidth-limited scenarios.
CONFLICT OF INTEREST STATEMENT
The authors declare that they have no conflict of interest.
DATA AVAILABILITY STATEMENT
The WiFi CSI spectrogram data have been generated us-
ing the dataset which is openly available in figshare at
https://doi.org/10.6084/m9.figshare.c.5551209.v1 [34]. We use
the torchvision package to import commonly used datasets
such as MNIST and SVHN. The simulated CSI feedback data
were generated using the MATLAB 5G Toolbox. The data
used in the CsiNet or ConvCsiNet/ShuffleCsiNet systems can
be accessed from [43].
FUNDING INFORMATION
This work was performed as a part of the OPERA Project,
funded by the UK Engineering and Physical Sciences Research
Council (EPSRC), Grant EP/R018677/1. This work has also
been funded in part by the Next-Generation Converged Digital
Infrastructure (NG-CDI) Project, supported by BT and En-
gineering and Physical Sciences Research Council (EPSRC),
Grant ref. EP/R004935/1.
REFERENCES
[1] R. Piechocki, X. Wang, and M. Bocus, "Multimodal sensor fusion in
the latent representation space," Scientific Reports, vol. 13, Feb. 2023.
[2] J. Gao, P. Li, Z. Chen, and J. Zhang, "A survey on deep learning for
multimodal data fusion," Neural Computation, vol. 32, no. 5, pp. 829–
864, 2020.
[3] M. Suzuki, K. Nakayama, and Y. Matsuo, "Joint multimodal learning
with deep generative models," Preprint at https://arxiv.org/abs/1611.
01891, 2016.
[4] M. Wu and N. Goodman, "Multimodal generative models for scalable
weakly-supervised learning," in Proceedings of the 32nd International
Conference on Neural Information Processing Systems, ser. NIPS'18.
Red Hook, NY, USA: Curran Associates Inc., 2018, p. 5580–5590.
[5] Y. Shi, S. N, B. Paige, and P. Torr, "Variational mixture-of-experts
autoencoders for multi-modal deep generative models," in Advances
in Neural Information Processing Systems, H. Wallach, H. Larochelle,
A. Beygelzimer, F. d'Alch ́e-Buc, E. Fox, and R. Garnett, Eds., vol. 32.
Curran Associates, Inc., 2019.
[6] T. M. Sutter, I. Daunhawer, and J. E. Vogt, "Generalized multimodal
ELBO," Preprint at https://arxiv.org/abs/2105.02470, 2021.
[7] H. Zou, J. Yang, H. P. Das, H. Liu, Y. Zhou, and C. J. Spanos, "WiFi and
vision multimodal learning for accurate and robust device-free human
activity recognition," in 2019 IEEE/CVF Conference on Computer Vision
and Pattern Recognition Workshops (CVPRW), 2019, pp. 426–433.
[8] R. Memmesheimer, N. Theisen, and D. Paulus, "Gimme signals: Dis-
criminative signal encoding for multimodal activity recognition," in 2020
IEEE/RSJ International Conference on Intelligent Robots and Systems
(IROS), 2020, pp. 10 394–10 401.
[9] M. Muaaz, A. Chelli, A. A. Abdelgawwad, A. C. Mallofr ́e, and
M. P ̈atzold, "WiWeHAR: Multimodal human activity recognition using
Wi-Fi and wearable sensing modalities," IEEE Access, vol. 8, pp.
164 453–164 470, 2020.
[10] A. K. Koupai, M. J. Bocus, R. Santos-Rodriguez, R. J. Piechocki,
and R. McConville, "Self-supervised multimodal fusion transformer for
passive activity recognition," IET Wireless Sensor Systems, vol. 12, no.
5-6, pp. 149–160, 2022.
[11] M. J. Bocus, H.-S. Lau, R. McConville, R. J. Piechocki, and R. Santos-
Rodriguez, "Self-supervised wifi-based activity recognition," in 2022
IEEE Globecom Workshops (GC Wkshps), 2022, pp. 552–557.
[12] C. I. Tang, I. Perez-Pozuelo, D. Spathis, and C. Mascolo, "Exploring
contrastive learning in human activity recognition for healthcare," 2020.
[Online]. Available: https://arxiv.org/abs/2011.11542
[13] H. Haresamudram, I. Essa, and T. Ploetz, "Contrastive predictive
coding for human activity recognition," 2020. [Online]. Available:
https://arxiv.org/abs/2012.05333
[14] A. van den Oord, O. Vinyals, and K. Kavukcuoglu, "Neural discrete
representation learning," in Proceedings of the 31st International Con-
ference on Neural Information Processing Systems, ser. NIPS'17. Red
Hook, NY, USA: Curran Associates Inc., 2017, p. 6309–6318.
[15] A. Razavi, A. van den Oord, and O. Vinyals, Generating Diverse
High-Fidelity Images with VQ-VAE-2. Red Hook, NY, USA: Curran
Associates Inc., 2019.
[16] S. Ozair, Y. Li, A. Razavi,
I. Antonoglou, A. v. d. Oord, and
O. Vinyals, "Vector quantized models for planning," 2021. [Online].
Available: https://arxiv.org/abs/2106.04615
[17] L. Caccia, E. Belilovsky, M. Caccia, and J. Pineau, "Online learned
continual compression with adaptive quantization modules," 2019.
[Online]. Available: https://arxiv.org/abs/1911.08019
[18] J. Guo, C.-K. Wen, S. Jin, and G. Y. Li, "Overview of deep learning-
based CSI feedback in massive MIMO systems," IEEE Transactions on
Communications, vol. 70, no. 12, pp. 8017–8045, 2022.
[19] Y. Ma, G. Zhou, and S. Wang, "WiFi sensing with channel state
information: A survey," ACM Comput. Surv., vol. 52, no. 3, jun 2019.
[20] M. J. Bocus, W. Li, J. Paulavicius, R. McConville, R. Santos-Rodriguez,
K. Chetty, and R. Piechocki, "Translation resilient opportunistic WiFi
sensing," in 2020 25th International Conference on Pattern Recognition
(ICPR), 2021, pp. 5627–5633.
[21] W. Li, M. J. Bocus, C. Tang, R. J. Piechocki, K. Woodbridge, and
K. Chetty, "On CSI and passive Wi-Fi radar for opportunistic physical
activity recognition," IEEE Transactions on Wireless Communications,
vol. 21, no. 1, pp. 607–620, 2022.
[22] W. Li, M. J. Bocus, C. Tang, S. Vishwakarma, R. J. Piechocki,
K. Woodbridge, and K. Chetty, "A taxonomy of WiFi sensing: CSI vs
passive WiFi radar," in 2020 IEEE Globecom Workshops (GC Wkshps,
2020, pp. 1–6.
10
[23] S. Palipana, D. Rojas, P. Agrawal, and D. Pesch, "FallDeFi: Ubiquitous
fall detection using commodity Wi-Fi devices," Proc. ACM Interact.
Mob. Wearable Ubiquitous Technol., vol. 1, no. 4, jan 2018.
[24] N. Damodaran, E. Haruni, M. Kokhkharova, and J. Sch ̈afer, "Device free
human activity and fall recognition using WiFi channel state information
(CSI)," CCF Trans. Pervasive Comput. Interact., vol. 2, no. 1, pp. 1–17,
2020.
[25] Y. Ma, G. Zhou, S. Wang, H. Zhao, and W. Jung, "SignFi: Sign language
recognition using WiFi," Proc. ACM Interact. Mob. Wearable Ubiquitous
Technol., vol. 2, no. 1, mar 2018.
[26] Z. Tian, J. Wang, X. Yang, and M. Zhou, "WiCatch: A Wi-Fi based hand
gesture recognition system," IEEE Access, vol. 6, pp. 16 911–16 923,
2018.
[27] S. Tan and J. Yang, "WiFinger: Leveraging commodity WiFi for fine-
grained finger gesture recognition," in Proceedings of the 17th ACM
International Symposium on Mobile Ad Hoc Networking and Computing,
ser. MobiHoc '16. New York, NY, USA: Association for Computing
Machinery, 2016, p. 201–210.
[28] H. Zou, Y. Zhou, J. Yang, W. Gu, L. Xie, and C. Spanos, "FreeDetector:
Device-free occupancy detection with commodity WiFi," in 2017 IEEE
International Conference on Sensing, Communication and Networking
(SECON Workshops), 2017, pp. 1–5.
[29] H. Zou, Y. Zhou, J. Yang, and C. J. Spanos, "Device-free occupancy
detection and crowd counting in smart buildings with WiFi-enabled IoT,"
Energy and Buildings, vol. 174, pp. 309–322, 2018.
[30] J. Liu, Y. Zeng, T. Gu, L. Wang, and D. Zhang, "WiPhone: Smartphone-
based respiration monitoring using ambient reflected WiFi signals,"
Proc. ACM Interact. Mob. Wearable Ubiquitous Technol., vol. 5, no. 1,
mar 2021.
[31] D. Halperin, W. Hu, A. Sheth, and D. Wetherall, "Tool release: Gathering
802.11n traces with channel state information," SIGCOMM Comput.
Commun. Rev., vol. 41, no. 1, p. 53, Jan. 2011.
[32] Y. Xie, Z. Li, and M. Li, "Precise power delay profiling with commodity
WiFi," in Proceedings of the 21st Annual International Conference on
Mobile Computing and Networking, ser. MobiCom '15. New York,
NY, USA: ACM, 2015, p. 53–64.
[33] J. Yang, X. Chen, H. Zou, D. Wang, Q. Xu, and L. Xie, "EfficientFi:
Toward large-scale lightweight WiFi sensing via CSI compression,"
IEEE Internet of Things Journal, vol. 9, no. 15, pp. 13 086–13 095,
2022.
[34] M. J. Bocus, W. Li, S. Vishwakarma, and C. Tang, "A comprehensive
multimodal activity recognition dataset acquired from radio frequency
and vision-based sensors," figshare https://doi.org/10.6084/m9.figshare.
c.5551209.v1, 2022.
[35] E. G. Larsson, O. Edfors, F. Tufvesson, and T. L. Marzetta, "Massive
MIMO for next generation wireless systems," IEEE Communications
Magazine, vol. 52, no. 2, pp. 186–195, 2014.
[36] I. Daubechies, M. Defrise, and C. De Mol, "An iterative thresholding
algorithm for
inverse problems with a sparsity constraint,"
Communications on Pure and Applied Mathematics, vol. 57, no. 11,
pp. 1413–1457, 2004. [Online]. Available: https://onlinelibrary.wiley.
com/doi/abs/10.1002/cpa.20042
linear
[37] D. L. Donoho, A. Maleki, and A. Montanari, "Message passing algo-
rithms for compressed sensing: I. motivation and construction," in 2010
IEEE Information Theory Workshop on Information Theory (ITW 2010,
Cairo), 2010, pp. 1–5.
[38] C.-K. Wen, W.-T. Shih, and S. Jin, "Deep learning for massive MIMO
CSI feedback," IEEE Wireless Communications Letters, vol. 7, no. 5,
pp. 748–751, 2018.
[39] Z. Cao, W.-T. Shih, J. Guo, C.-K. Wen, and S. Jin, "Lightweight
convolutional neural networks for csi feedback in massive mimo," IEEE
Communications Letters, vol. 25, no. 8, pp. 2624–2628, 2021.
[40] "CSI feedback with autoencoders," https://uk.mathworks.com/help/5g/
ug/csi-feedback-with-autoencoders.html, (Accessed on 01/20/2023).
[41] E. Zimaglia, D. G. Riviello, R. Garello, and R. Fantini, "A novel
deep learning approach to CSI feedback reporting for NR 5G cellular
systems," in 2020 IEEE Microwave Theory and Techniques in Wireless
Communications (MTTW), vol. 1, 2020, pp. 47–52.
[42] "Github - iffsid/mmvae: Multimodal Mixture-of-Experts VAE," https:
//github.com/iffsid/mmvae, (Accessed on 01/20/2023).
[43] W.-T. Shih and C.-K. Wen, "Python code for "Deep learning for massive
MIMO CSI feedback"," https://github.com/sydney222/Python CsiNet,
2018, (Accessed on 01/26/2023).
[44] L. Liu, C. Oestges, J. Poutanen, K. Haneda, P. Vainikainen, F. Quitin,
F. Tufvesson, and P. D. Doncker, "The COST 2100 MIMO channel
model," IEEE Wireless Communications, vol. 19, no. 6, pp. 92–99, 2012.
|
|
http://arxiv.org/abs/2302.12619v1 | 2023-02-24T13:30:35 | 2023-02-24T13:30:35 | T-Phenotype: Discovering Phenotypes of Predictive Temporal Patterns in
Disease Progression | Clustering time-series data in healthcare is crucial for clinical phenotyping
to understand patients' disease progression patterns and to design treatment
guidelines tailored to homogeneous patient subgroups. While rich temporal
dynamics enable the discovery of potential clusters beyond static correlations,
two major challenges remain outstanding: i) discovery of predictive patterns
from many potential temporal correlations in the multi-variate time-series data
and ii) association of individual temporal patterns to the target label
distribution that best characterizes the underlying clinical progression. To
address such challenges, we develop a novel temporal clustering method,
T-Phenotype, to discover phenotypes of predictive temporal patterns from
labeled time-series data. We introduce an efficient representation learning
approach in frequency domain that can encode variable-length,
irregularly-sampled time-series into a unified representation space, which is
then applied to identify various temporal patterns that potentially contribute
to the target label using a new notion of path-based similarity. Throughout the
experiments on synthetic and real-world datasets, we show that T-Phenotype
achieves the best phenotype discovery performance over all the evaluated
baselines. We further demonstrate the utility of T-Phenotype by uncovering
clinically meaningful patient subgroups characterized by unique temporal
patterns. | [
"Yuchao Qin",
"Mihaela van der Schaar",
"Changhee Lee"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12619v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12619v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG",
"q-bio.QM"
] | 3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
9
1
6
2
1
.
2
0
3
2
:
v
i
X
r
a
T-PHENOTYPE: DISCOVERING PHENOTYPES OF
PREDICTIVE TEMPORAL PATTERNS IN DISEASE PROGRESSION
Yuchao Qin
University of Cambridge, UK
Mihaela van der Schaar
University of Cambridge, UK
The Alan Turing Institute, UK
Changhee Lee
Chung-Ang University, South Korea
ABSTRACT
1
INTRODUCTION
Clustering time-series data in healthcare
is crucial for clinical phenotyping to un-
derstand patients' disease progression
patterns and to design treatment guide-
lines tailored to homogeneous patient
subgroups. While rich temporal dynam-
ics enable the discovery of potential clus-
ters beyond static correlations, two ma-
jor challenges remain outstanding: i) dis-
covery of predictive patterns from many
potential temporal correlations in the
multi-variate time-series data and ii) as-
sociation of individual temporal patterns
to the target label distribution that best
characterizes the underlying clinical pro-
gression. To address such challenges,
we develop a novel temporal clustering
method, T-Phenotype, to discover phe-
notypes of predictive temporal patterns
from labeled time-series data. We in-
troduce an efficient representation learn-
ing approach in frequency domain that
can encode variable-length, irregularly-
sampled time-series into a unified repre-
sentation space, which is then applied to
identify various temporal patterns that
potentially contribute to the target la-
bel using a new notion of path-based
similarity. Throughout the experiments
on synthetic and real-world datasets, we
show that T-Phenotype achieves the best
phenotype discovery performance over
all the evaluated baselines. We further
demonstrate the utility of T-Phenotype
by uncovering clinically meaningful pa-
tient subgroups characterized by unique
temporal patterns.
Discovering predictive patterns of disease progression has
been a long pursuit in healthcare. Clinicians have consid-
ered specific clinical (disease) status and the associated
patterns as a phenotype to uncover the heterogeneity of
diseases and to design therapeutic guidelines tailored to ho-
mogeneous subgroups (Hripcsak and Albers, 2013; Riches-
son et al., 2016). While rule-based phenotypes identified
by domain experts have been widely used (Denny et al.,
2013; Richesson et al., 2016), designing and validating
such rules require tremendous effort. Unfortunately, dis-
ease progression can manifest through a broad spectrum
of clinical factors, collected as a sequence of measure-
ments in electronic health records (EHRs), that may vary
greatly across individual patients. This makes it even more
daunting for domain experts to transform such raw and
complex clinical observations into clinically relevant and
interpretable patterns.
Temporal clustering has been recently used as a data-
driven framework for phenotyping to partition patients
with sequences of observations into homogeneous sub-
groups. To discover different temporal patterns, traditional
notions of similarity focus on either adjusting similarity
measures (Zhang et al., 2019; Baytas et al., 2017) or finding
low-dimensional representations (Ho et al., 2014; Gian-
noula et al., 2018) for longitudinal observations. These
approaches are purely unsupervised and discard valuable
information about the disease status that is often available
in the clinical data. More recently, predictive clustering
methods (Lee and van der Schaar, 2020; Lee et al., 2020;
2022; Aguiar et al., 2022) have introduced a new notion of
similarity such that each cluster shares similar disease sta-
tus to provide a better prognostic value. Despite the effort
to understand temporal dynamics in their mutual context,
these clustering methods fail to capture the full picture
of disease progression as reflected by covariate trajecto-
ries of prognostic characteristics, i.e., temporal patterns
associated with specific disease status. Figure 1 illustrates
a pictorial depiction of the notion of phenotypes behind
different temporal clustering methods.
T-Phenotype
Figure 1: Different Notions of Temporal Phenotypes. Purely unsupervised clustering approaches focus on trajectory-oriented
phenotypes (blue) and disregard the valuable information in patient outcomes. Predictive clustering methods aim at discovering
outcome-oriented phenotypes (purple) which may not reflect the heterogeneity in patient trajectories despite the same diagnosis
outcome. A desirable phenotyping method shall address both types of similarity and discover comprehensive phenotypes (red).
Contribution.
In this paper, we propose a novel tem-
poral clustering method to correctly uncover predictive
temporal patterns descriptive of the underlying disease
progression from the labeled time-series data. First, we
formally define the notion of temporal phenotypes as pre-
dictive temporal patterns. Then, the association of indi-
vidual temporal patterns with the target disease status is
assessed by proposing a novel path-based similarity score.
For effective evaluation of the path-based similarity, we
introduce a representation learning approach based on the
Laplace transform to convert variable-length, irregularly
sampled time-series data into unified embeddings. Finally,
based on the resulting path-based similarity graph, we for-
mulate the task of temporal phenotyping as a temporal
predictive clustering problem that can be efficiently solved
by adopting the graph-constrained K-means clustering.
We validate our approach through experiments on synthetic
and real-world time-series datasets. Our method discov-
ers temporal phenotypes that provide superior prediction
performance compared to state-of-the-art benchmarks, and
we corroborate the interpretability of our discovered phe-
notypes with supporting medical and scientific literature.
2 TEMPORAL PHENOTYPING
Suppose disease progression manifests through a multi-
variate continuous-time trajectory x(t) ∈ X defined on
t ∈ [0, 1], where X is the functional space of all pos-
sible patient trajectories.1 Each trajectory consists of
1Trajectories defined within the interval R+ can be simply
scaled to the unit interval [0, 1].
dimx-dimensional time-varying covariates, i.e., x(t) =
[x1(t), . . . , xdimx (t)](cid:62), each of which can be described
by a continuous-time function xi in L2
[0,1] (i.e., L2-space
under the interval [0, 1]).2 Thus, the considered trajec-
tory space can be given as X = (cid:78)
[0,1]. Each
trajectory x is correlated with a target label vector y =
[y1, . . . , ydimy ](cid:62) ∈ Y that describes the clinical status
of the underlying disease progression (e.g., clinical end-
points). Throughout the paper, we focus our description
on the case where the outcome of interest y is categorical
and represented by a one-hot vector, i.e., Y = {0, 1}dimy .
dimx
L2
Let p(x, y) be the joint distribution of the continuous-
time trajectory and the label vector. To discover temporal
patterns that are predictive of the clinical status of pa-
tients, we first define a vector-valued function g(x) =
[p(y1|x), . . . , p(ydimy |x)](cid:62) which implies the categorical
conditional distribution p(y|x). We assume the clinical sta-
tus conditioned on a patient trajectory can be represented
by one of the δ-separable modes in g(x). These modes
are δ-separable such that they can be separated based on
a proper distance metric dy with some threshold δ > 0.
Here, we choose the Jensen–Shannon (JS) divergence as
our distance metric, i.e., dy(v, u) = 1
2 KL(g(v)||m) +
1
2 KL(g(u)||m), where KL is the Kullback-Leibler diver-
gence, m = g(v)+g(u)
.
2
2In many practical scenarios, the continuous-time functions
for time-varying covariates are bounded and fall into the L2-space
which has a natural extension of Euclidean distance.
2
Phenotype 1Phenotype 2Trajectory-orientedphenotypesOutcome-orientedphenotypesPhenotype 2Phenotype 1ComprehensivephenotypesSimilar trajectoriesSimilar outcomesPhenotype 1Phenotype 2Phenotype 3Past observed patientPast observed patientPast observed patientPast observed patientPast observed patientNew arrival patientsABCSimilar outcomesSimilar temporal patterns (predictive)T-Phenotype
2.1 Phenotypes: Predictive Temporal Patterns
tories, that satisfies the following two properties:
In this subsection, we introduce the formal definition of
phenotypes as temporal patterns that are predictive of dis-
ease progression. To this goal, we start by describing how
the temporal patterns in continuous-time trajectories can
be discovered and how the specific disease progression can
be associated with each individual pattern.
Temporal Patterns. A temporal pattern characterizes
some temporal dynamics that are shared by a subset of
trajectories in X . Here, we introduce a novel definition to
describe temporal patterns in the general form based on
connectivity in trajectory space X . Given two trajectories
x1, x2 ∈ X , we define a translation from x1 to x2, de-
noted as Γ(x1 → x2), as a continuous path Γ connecting
the two trajectories in space X . Typically, Γ(x1 → x2)
can continuously morph the shape of x1 into that of x2.
Then, we formally define a temporal pattern as a connected
set Φ ⊂ X such that all the trajectories in Φ can be inter-
connected by translations within Φ. That is, there exists
a series of translations from any trajectory to any other
trajectory in Φ.
Phenotypes. Considering multivariate continuous-time
trajectories, a variety of temporal patterns may exist in X
while only a few of them are relevant to the target label.
In the meantime, the clinical status marked by the same
target label may manifest in patient trajectories through
different temporal characteristics. For instance, in lung
transplant referral of cystic fibrosis patients, (i) low lung
function score, (ii) rapid declining lung function score, and
(iii) multiple exacerbations requiring intravenous antibi-
otics are identified as distinct predictive temporal patterns
(Ramos et al., 2019) among various temporal dynamics.
To provide insights on disease progression, desirable phe-
notypes shall be defined based on distinct predictive tem-
poral patterns. In line with such notion of phenotypes, we
propose a new path-based similarity score that measures
the variation of conditional label distribution (described
by function g(x)) along a translation between two trajec-
tories. Specifically, consider two continuous-time trajec-
tories x1, x2 and a translation Γ(x1 → x2), the score
function evaluates the similarity between x1 and x2 via
their impact on label y through path Γ as follows:
dΓ(x1, x2) =
max
x∈Γ(x1→x2)
i∈{1,2}
dy(g(x), g(xi)).
(1)
Small value of dΓ(x1, x2) indicates that trajectories x1
and x2 share similar clinical status y and contain similar
temporal patterns that are predictive of their associated
label.
Finally, we provide a formal definition of phenotype as
a predictive temporal pattern associated with a distinct
clinical status as follows:
Definition 1. (Phenotype) Let v be the centroid of a δ-
separable mode in g(x). Then, there exists a unique phe-
notype, denoted as a tuple (v, Φ) with Φ as a set of trajec-
3
(Similar clinical status)
max
x∈Φ
(Similar predictive pattern)
dy(g(x), v) ≤
δ
2
dΓ(x1, x2) ≤ δ,
,
max
x1,x2∈Φ
Γ⊆Φ
and any trajectory x ∈ X \ Φ is either not connected to Φ
or has a different mode.
Intuitively, the homogeneity of each phenotype (v, Φ)
guarantees that the continuous-time trajectories exhibit-
ing a similar temporal pattern will lead to a similar clinical
status, which in turn provides a prognostic value on the
underlying disease progression.
2.2 Predictive Temporal Clustering
In practice, the continuous-time trajectories of a patient are
systematically collected in EHRs as discrete observations
with irregular intervals during his/her regular follow-ups
or stay at hospital. Hence, we focus this subsection on for-
mulating the task of discovering phenotypes given discrete
observations of trajectories as a novel clustering problem.
Suppose we have a dataset D = {(ti, X i, yi)}N
i=1
comprising discrete observations on the underlying
continuous-time trajectories and target labels. Here,
we denote discrete observations as time-series X =
[x(t1), x(t2), . . . , x(tT )] which contains sequential ob-
servations of a trajectory x at observation time stamps
t = [t1, t2, . . . , tT ](cid:62) with 0 ≤ t1 ≤ . . . ≤ tT ≤ 1.
The label vector y ∈ Y describes the clinical status sam-
pled from the conditional distribution p(y|x). From this
point forward, we will slightly abuse the notation and in-
terchangeably write X to denote the discrete time-series
and the associated time stamps.
Path-Based Connectivity. Note that the property of a
phenotype in Definition 1 requires all trajectories in that
phenotype share a similar predictive pattern. Consider two
time-series X 1, X 2 with underlying continuous-time tra-
jectories x1, x2 from the same phenotype (v, Φ). There
must exist a translation Γ from trajectory x1 to x2 such
that the condition in dΓ(x1, x2) ≤ δ holds. Violating such
a condition implies a significant difference between the
two trajectories suggesting they are from different pheno-
types. Therefore, we utilize the path-based connectivity
test, i.e., ∃ Γ(x1 → x2), dΓ(x1, x2) ≤ δ, to assesses the
phenotype similarity between two given trajectories X 1
and X 2. This enables discovery of predictive temporal
patterns without access to the ground-truth phenotypes.
Evaluation of the path-based connectivity on all possible
pairs of time-series in dataset D generates a distance matrix
S. Element-wise comparison of S and threshold δ yields
a similarity graph Gδ with edges between similar samples.
We will discuss how we can approximately achieve the
path-based connectivity test based on the discrete observa-
tions in the next section.
Temporal Phenotyping. To discover phenotypes from
dataset D, we assume that we have a proper approxima-
T-Phenotype
Figure 2: Overview of T-Phenotype.
tor f (X) of the conditional label distribution g(x) from
discrete observations in X. Thus, similarity graph Gδ can
be constructed based on the path-based connectivity test
with approximator f (X). Now, we formulate the task of
temporal phenotyping as a predictive clustering problem
(Lee and van der Schaar, 2020) to group time-series into
different clusters on top of Gδ. More specifically, the clus-
ters (with distinct phenotypes) are discovered by solving
the following constrained optimization problem:
min
C
(cid:88)
(cid:88)
Ck∈C
X∈Ck
dy(f (X), vk),
s.t. ∀X 1, X 2 ∈ Ck, X 1 Gδ←→ X 2,
(2)
where C = {C1, C2, . . . , CK} is a feasible set of K ∈
N clusters each of which has a centroid vk as the av-
erage density f (X), Since threshold δ is usually un-
known in advance, we set its value according to δ =
2 maxCk∈C,X∈Ck dy(f (X), vk) for consistency with Def-
inition 1. Here, X 1 Gδ←→ X 2 implies that there exists
a path over graph Gδ such that X 1 and X 2 are intercon-
nected. In (2), the objective function encourages the cluster
centroids to be clearly distinguished in approximated la-
bel distribution f (X) while the constraint on similarity
graph Gδ ensures that samples in the same cluster are of
similar phenotypes. Each discovered cluster Ck represents
a unique phenotype with centroid vk describing the associ-
ated clinical status and allows us to explain the predictive
temporal pattern in terms of the collection of time-series
in Ck.
Unfortunately, the optimization problem in (2) is highly
non-trivial due to the following two challenges: First, it
requires to learn a proper approximation of the conditional
label distribution from irregularly-sampled discrete time-
series. Second, an efficient evaluation of the path-based
connectivity test is required to construct similarity graph
Gδ given discrete time-series in D.
3 METHOD: T-PHENOTYPE
In this section, we propose a novel temporal clustering
framework, T-Phenotype, that effectively discovers phe-
notypes from discrete time-series data. To estimate the
conditional label distribution from discrete time-series,
we introduce two networks, an encoder and a predictor.
The encoder, fE, comprises dimx feature-wise Laplace
encoders, each of which transforms a single feature dimen-
sion of discrete time-series X into a fixed-length latent
embedding. The predictor, fP , takes embeddings from
dimx Laplace encoders as the input z in the latent space
and estimates the conditional label distribution. The pro-
posed Laplace encoders, fL, allow us to establish (approx-
imately) equivalence translation in the latent space and
thereby to efficiently evaluate the path-based connectivity
test between discrete time-series in dataset D. Then, given
an approximate similarity graph Gδ constructed from the
result of pair-wise connectivity test, we propose a graph-
constrained K-means algorithm to discover distinct pheno-
types. The overview of steps involved in T-Phenotype is
illustrated in Figure 2.
3.1 Time-Series Embedding via Laplace Encoder
Now, we introduce a novel time-series encoder which en-
codes each dimension of a given discrete time-series into a
unified parametric function in the frequency domain as an
approximation of the Laplace transform.
Let x(t) = [x(t1), . . . , x(tT )](cid:62) ∈
Laplace Encoder.
RT be a time-series of discrete observations on a univariate
trajectory x(t) at time stamps t = [t1, . . . , tT ](cid:62) in the
unit interval. The Laplace encoder (parameterized by θL),
fL : RT → Cn(d+1), encodes discrete time-series x(t)
into a rational function on the complex plane with n ∈ N
poles of maximum degree of d ∈ N as follows:
Fw(s) =
n
(cid:88)
d
(cid:88)
m=1
l=1
cm,l
(s − pm)l ,
cm,l, pm ∈ C.
(3)
4
x1x2t1t2tT⋯xdimx⋮fLxi(t)i-thLaplace encoder wiwdimxw1zEncoder network fEfPPredictor network fPp(y|X)Label distributionTime-series X=x(t)Patient trajectory xLatent space ZTrajectory space XEquivalencevia fEPath-based testin latent spacedΓx,x′≈dγ(z,z′)xx′Γ(x→x′)zz′γ(z→z′)Phenotype (v,Φ)ΦΦzK-means on similarity graph GδXX′T-Phenotype
Here, w (cid:44) fL(x(t)) = [p1, . . . , pn, c1,1, . . . , cn,d](cid:62) is
the Laplace embedding comprising the poles and the cor-
responding coefficients. Note that the poles in (3) are
distinct and are in a lexical order, i.e., pm ≤ pm+1 for
m = 1, . . . , n−1 where pm ≤ pn if and only if Re(pm) <
Re(pn) or Re(pm) = Re(pn) ∧ Im(pm) ≤ Im(pn) holds.
Then, the time-domain function can be efficiently recon-
structed via the inverse Laplace transform:
ˆx(t) =
1
2πj
lim
T →∞
(cid:90) σ+jT
σ−jT
estFw(s)ds,
(4)
where j2 = −1 and σ is some suitable complex number
such that Re(σ) > maxpm∈w Re(pm). With a sufficient
number of poles, the Laplace embedding w becomes an
equivalent description of the underlying trajectory x(t).
That is, the orthonormal basis {e2πjmt, m ∈ Z} of L2
is covered by the reconstruction ˆx(t) when n → ∞.
[0,1]
Given a dataset of N discrete univariate time-series, i.e.,
{xi(t)}N
i=1, we train the Laplace encoder utilizing the fol-
lowing loss function that consists of the time-series re-
construction error and the regularization term specifically
designed to encourage unique Laplace embeddings:
Llaplace(θL) = Lmse(θL) + αLunique(θL)
(5)
(cid:80)
i(cid:54)=j (cid:96)unique(ˆxi(t), ˆxj(t)),
where α is a balancing coefficient.
i.e., Lmse(θL) = 1
term,
N
is the reconstruction error
beddings, and the latter term,
The former
(cid:80)N
i=1 (cid:107)xi(t) − ˆxi(t)(cid:107)2
2,
from our Laplace em-
i.e., Lunique(θL) =
1
the
encourages
N (N −1)
uniqueness of the Laplace embedding. More specifically,
(cid:96)unique focuses on three aspects – (i) the obtained poles are
distinct, (ii) the reconstructed trajectories are real-valued,
and (iii) no two distinct Laplace embeddings generate
the same trajectory. We further elaborate the uniqueness
regularization in the Appendix.
From Trajectory Space to Latent Space.
Utiliz-
ing dimx feature-wise Laplace encoders as our en-
coder, fE, any discrete observations of a continuous-
time trajectory x ∈ X can be transformed into a fixed-
length embedding z ∈ Z in the latent space as a
composition of dimx Laplace embeddings, i.e., z (cid:44)
[fL(x1(t)), . . . , fL(xdimx (t))](cid:62). The following propo-
sition builds a strong connection between the trajectory
space X and the latent space Z:
Proposition 1. Without loss of generality, consider uni-
variate continuous-time trajectories ˆx1, ˆx2 ∈ X and their
corresponding latent embeddings z1, z2 ∈ Z, respec-
tively. Then, the distance between two trajectories can
be bounded by (cid:107)ˆx1 − ˆx2(cid:107)2
2, where
L2
≤ ψ(cid:107)z1 − z2(cid:107)2
[0,1]
ψ > 0 is a constant and (cid:107)x(t)(cid:107)2
L2
[0,1]
= (cid:82) 1
0 x(t)x(t)dt.
The detailed proof can be found in the Appendix. Con-
sider a subset of latent variables Φz and the corresponding
trajectory set Φ of their time-domain representations. The
upper bound in Proposition 1 implies that continuity of
5
Φz in the latent space leads to the continuity of Φ in the
trajectory space. This property allows efficient evaluation
of the path-based connectivity test in the latent space as
illustrated in the following subsection.
3.2 Efficient Evaluation of Path-based Similarity
Construction of similarity graph Gδ involves iterative eval-
uation of the path-based similarity score dΓ in (1) for all
possible pairs of time-series samples in D. This requires
a substantial number of computations in both construct-
ing translation Γ and calculating conditional g(x) on all
available continuous-time trajectories x ∈ Γ. Instead, we
efficiently approximate the similarity graph Gδ via path-
based connectivity test in the latent space and estimate the
conditional g(x) via neural networks.
Translation in Latent Space.
Consider two trajecto-
ries ˆx1, ˆx2 ∈ X with the corresponding latent embedding
z1, z2 ∈ Z. For any translation Γ( ˆx1 → ˆx2) ⊆ X in
trajectory space, we can always find a continuous path
in the latent space, i.e., γ(z1 → z2) ⊆ Z, such that the
distance between its time-domain reconstruction and Γ is
minimized. We consider γ to be an (approximately) equiv-
alent translation of Γ.3 This enables us to capitalize on the
translation in the latent space without constructing interme-
diate trajectories along path Γ, which significantly reduces
computations in obtaining the path-based similarity in (1).
Predictor. To estimate the function g(x), we utilize the
time-series encoder fE, which consists of dimx Laplace
encoders, and a predictor fP (an MLP parameterized
by θP ) to construct the approximator as f (X) (cid:44) fP ◦
fE(X) ≈ g(x) where X is the discrete observation of
trajectory x. The predictor fP is trained based on the
cross-entropy loss:
Lpredictor(θP ) = −
1
N
N
(cid:88)
dimy
(cid:88)
i=1
c=1
c log fP (zi)c,
yi
(6)
where z = fE(X) and subscript c indicates the c-th el-
ement in the output space. To maintain the property of
the Laplace encoders, we only update the predictor via the
signal from the label during training.
Consider a trajectory translation Γ( ˆx1 → ˆx2) and its
equivalent translation γ(z1 → z2) in latent space, the
path-based similarity can be approximately calculated as
dy(fP (z), fP (zi)).
dΓ( ˆx1, ˆx2) ≈ dγ(z1, z2) = max
(7)
Hence, given two discrete time-series X 1 and X 2, the
path-based connectivity test can be efficiently performed
along translation γ in the latent space without assessing
the corresponding translation in the trajectory space X .
z∈γ,i=1,2
Approximate Similarity Graph. Consider a phenotype
(v, Φ) where centroid v represents a specific clinical status
3The equivalence is strict when all trajectories along transla-
tion Γ have rational Laplace transform as described in (3).
T-Phenotype
and Φ is the associated predictive temporal pattern. The
encoder fE is trained to map time-series X sampled from
trajectories in Φ into a connected area Φz in latent space
Z via Laplace encoders. Given time-series X that is ob-
served from trajectory x ∈ Φ, Definition 1 implies that we
have dy(f (X), v) ≤ δ
2 where f (X) = fP (z) and z =
fE(X) ∈ Φz. Hence, for two embeddings z1, z2 ∈ Φz,
there always exist a translation γ(z1 → z2) ⊆ Φz such
that dγ(z1, z2) ≤ δ due to the connectivity of Φz in the
latent space. If two latent embeddings z1, z2 are located in
the same convex subset of Φz, linear path ̄γ(z1 → z2) =
{z|(1 − a)z1 + az2, a ∈ [0, 1]} suffices the connectivity
test. When z1 and z2 are in different convex subsets, the
connectivity of Φz guarantees that there exists a series of in-
termediate points zm1 , zm2, . . . , zml such that composite
path γ(z1 → z2) = ̄γ(z1 → zm1 )∪. . .∪ ̄γ(zml → z2) is
inside Φz and can be used for connectivity test. Therefore,
in this work, we simplify the path-based connectivity test
to the linear paths between latent variables as the similarity
between two time-series can be inferred based on these lin-
ear paths. Overall, given two time-series X i and X j, we
calculate the approximate distance d ̄γ(fE(X i), fE(X j))
via discrete points along path ̄γ, which is stored in element
Sij of path-based distance matrix S. The approximate
similarity graph Gδ is then constructed with edges between
samples X i and X j if and only if Si,j ≤ δ.
3.3 Predictive Clustering on Similarity Graph
Unfortunately, solving the clustering objective in (2) is
a NP-hard combinatorial problem. Thus, we introduce a
greedy approach to discover the temporal clusters from
the path-based distance matrix S defined in the previous
subsection.
The objective function in (2) has the following upper
bound:
dy(f (X), vk),
(cid:88)
dy(f (X i), f (X j)),
J (cid:44) (cid:88)
(cid:88)
X∈Ck
1
|Ck|
Ck∈C
(cid:88)
Ck∈C
(cid:88)
≤
≤
=
X i,X j ∈Ck
(cid:88)
d ̄γ(zi, zj),
Ck∈C
(cid:88)
X i,X j ∈Ck
(cid:88)
Ck∈C
X i,X j ∈Ck
Sij (cid:44) ̄J(S),
(8)
where zi = fE(X i), latent translation ̄γ is a linear path
connecting two embeddings zi and zj. The first inequality
comes from the convexity of the JS divergence, and the
second inequality establishes from equation (7) and the fact
that |Ck| ≥ 1. Local minimum of the upper bound ̄J(S)
can be achieved via a greedy K-partitioning algorithm
based on pair-wise sample distances in matrix S.
Utilizing the approximate solution in (8) as warm-start, we
propose a graph-constrained K-means clustering approach
to solve problem (2) via a greedy breadth-first search algo-
rithm GK-means (details in Appendix). The overview of
6
our predictive clustering method, T-Phenotype, is given in
Algorithm 1. More details about the algorithm are provided
in the Appendix.
Algorithm 1 T-Phenotype
Input: dataset D, number of clusters K
Output: C = {C1, C2, . . . , CK }
calculate distance matrix S based on (7)
C ← arg minC
δ ← log(2)
while not converged do
̄J(S)
(cid:46) warm-start
(cid:46) upper bound of dJS
for k = 1, 2, . . . , K do
update cluster seed ek via (9)
end for
δ(cid:48) ← 2 maxCk∈C,X∈Ck dy(f (X), vk)
δ ← min(δ, δ(cid:48))
create similarity graph Gδ from Si,j ≤ δ
C ← GK-means(J|e1, e2, . . . , eK , Gδ)
(cid:46) upper bound J ≤ N δ
end while
The cluster seeds in Algorithm 1 are used to perform
greedy cluster expansion over similarity graph Gδ. For
the k-th cluster, the cluster seed ek = (vk, X (k)) can be
given as
vk =
1
|Ck|
(cid:88)
X∈Ck
f (X), X (k) = arg min
X∈Ck
dy(f (X), vk),
(9)
where vk is the cluster centroid and X (k) is the represen-
tative time-series in cluster Ck with closest conditional to
that of the centroid.
4 RELATED WORK
Different strands of clustering methods have been increas-
ingly investigated for knowledge discovery from time-
series data with various similarity notions accustomed to
specific application scenarios. One strand is unsupervised
clustering methods that adopt the traditional notion of sim-
ilarity into the time-series setting. To flexibly incorporate
with variable-length irregularly-sampled time-series obser-
vations, the traditional methods applied K-means cluster-
ing by either finding fixed-length and low-dimensional
representations using deep learning-based sequence-to-
sequence model (Ma et al., 2019; Zhang et al., 2019) or
on modifying the similarity measure such as dynamic time
warping (DTW) (Giannoula et al., 2018) and the associated
graph Laplacian (Lei et al., 2019; Hayashi et al., 2005).
Alternatively, Bahadori et al. (2015) focused on sample
affinities to conduct spectral clustering, and Chen et al.
(2022) proposed a deep generative model whose paramet-
ric space is then used for clustering. Further, advanced
hidden Markov models (Ceritli et al., 2022) and Gaussian
processes (Schulam et al., 2015) have also been utilized
together with hierarchical graph models in disease sub-
type discovery. In general, these methods are limited by
some model specifications such as the linear subspace as-
sumptions and graphical models for the underlying data
generation process.
T-Phenotype
Table 1: Comparison of Temporal Clustering Methods. The difference in the notion of phenotypes and similarity measure
are highlighted together with two desiderata: (i) clusters are outcomes associated; and (ii) with interpretable insights on cluster
assignment.
METHOD
PHENOTYPE
Deep temporal K-means
Bahadori et al. (2015)
Chen et al. (2022)
Aguiar et al. (2022)
Lee and van der Schaar (2020) Outcome-oriented
T-Phenotype (Ours)
Euclidean distance
Distance-based
Self-expression
Affinity-based
Pattern-oriented
Latent distance
Attention&outcome-oriented KL-divergence
KL-divergence
Path-based connectivity
SIMILARITY MEASURE (I)
(cid:51)
(cid:55)
(cid:55)
(cid:51)
(cid:51)
(cid:51)
Predictive pattern-oriented
(II)
(cid:55)
(cid:55)
(cid:51)
(cid:51)
(cid:55)
(cid:51)
Clusters identified through these methods are purely unsu-
pervised – they do not account for patients' clinical out-
comes that are often available in EHRs – which may lead
to heterogeneous outcomes even for patients in the same
cluster. To overcome this issue, another strand of cluster-
ing methods combine predictions on the future outcomes
with clustering. Lee and van der Schaar (2020) proposed
an actor-critic approach to divide time-series of patient tra-
jectories into subgroups based on their associated clinical
status. The discovered patient subgroups allow clinicians
to investigate the temporal patterns related to the transition
of disease stages. Aguiar et al. (2022) extended it to cap-
ture phenotype-related feature contributions by employing
an attention mechanism. Given predicted clusters, visu-
alizing the associated attention map provides additional
interpretability about the underlying disease progression.
Unfortunately, actionable information that can be inferred
from the aforementioned temporal predictive clusters is
still limited. These methods primarily focus on finding the
discrete representations that can best describe the outcome
labels rather without properly associating with temporal
patterns that can be found among time-series samples. In
this paper, we propose a novel temporal clustering method
to correctly uncover predictive temporal patterns descrip-
tive of the underlying disease progression from the labeled
time-series data. Therefore, our method not only can pro-
vide clusters that have a prognostic value but also can offer
interpretable information about the disease progression
patterns.
5 EXPERIMENTS
In this section, we evaluate the clustering performance and
the prognostic value of T-Phenotype with one synthetic
dataset and two real-world datasets (detailed statistics are
provided in the Appendix).
Synthetic Dataset. We construct a synthetic dataset
of N = 1200 samples with ground truth cluster la-
bels. Each sample comprises discrete observations of a
2-dimensional trajectory x(t) and the target binary out-
come. We design the two elements x1(t) and x2(t) to
model trend and periodicity of a trajectory, respectively:
we set x1(t) = ι * sigmoid(a * (t − b − φ)) with sign
ι ∈ {−1, 1}, a = 10, b = 0.5, and φ ∼ exp( 3
10 ) and set
x2(t) = sin(c * (t − φ)) with c ∈ {4, 6, 8} and φ identical
to that of x1. The trajectory x = [x1, x2](cid:62) is irregularly
observed over 20 time stamps in t ∈ [0, 2] with a white
noise N (0, 0.12) for each variable. We set c as the ground
truth phenotype label representing different periodicity and
set the target outcome label y as y = 0 when c = 6 and
y = 1 otherwise.
ADNI Dataset. The Alzheimer's Disease Neuroimaging
Initiative4 (ADNI) dataset includes records on the progres-
sion of Alzheimer's disease (AD) of N = 1346 patients
with regular follow-ups every six months. Each patient
is associated with various biomarkers, evaluation of MRI
and PET images, and cognitive tests results. We set the
target outcome at each time stamp as the three diagnostic
groups – i.e., normal brain functioning (NL), mild cogni-
tive impairment (MCI), and AD – which is used to indicate
different stages of AD progression. We focus on three
important temporal variables – i.e., the genetic biomarker
of apolipoprotein (APOE) ε4 gene, the hippocampus eval-
uation from MRI, and the cognitive test result of CDRSB –
to predict the AD progression.
ICU Dataset. The PhysioNet ICU5 (Goldberger et al.,
2000) dataset contains temporal observations on 42 covari-
ates of adult patients over the first 48 hours of ICU stay.
We extract N = 1554 records of adult patients admitted
to the medical or surgical ICU. Temporal covariates used
in the experiments are age, gender, Glasgow Coma Scale
(GCS), and partial pressure of arterial CO2 (PaCO2) with
a time resolution of 1 hour, and we set patient mortality as
the target binary outcome of interest.
Baselines. We compare the performance of T-Phenotype
with the following benchmarks ranging from traditional
method to recently developed deep learning-based meth-
ods, where each clustering method reflects a different no-
tion of temporal phenotypes: 1) K-means with warping-
based distance (KM-DTW); 2) deep temporal K-means
with the encoder-predictor (E2P) structure introduced in
(Lee and van der Schaar, 2020), i.e., KM-E2P(z) and KM-
E2P(y); 3) K-means on top of our proposed Laplace en-
coder (KM-L); 4) sequence-to-sequence with K-means
friendly representation space (SEQ2SEQ); and 5) the state-
of-the-art temporal clustering approach AC-TPC (Lee and
van der Schaar, 2020). Detailed description can be found
4
5
https://adni.loni.usc.edu
https://physionet.org/content/challenge-2012/
7
T-Phenotype
in Appendix. In addition, we consider the ablation study
of T-Phenotype with joint optimization for the Laplace
encoders and predictor fP and denote such model with
T-Phenotype (J).
Throughout the experiments, time stamps of discrete
time-series are scaled into t ∈ [0, 1]. For the synthetic
and ADNI datasets, we use 64/16/20 train/validation/test
splits in experiments. To get reliable clustering perfor-
mance measurement on the ICU dataset, we use 48/12/40
train/validation/test splits for experiments. Hyperparame-
ters of T-Phenotype and baselines are optimized through
3-fold cross-validation. For comparison of clustering per-
formance, the number of clusters K for each dataset is
shared by all methods. We select K as a hyperparameter
of T-Phenotype, and the optimal cluster numbers are deter-
mined to be K = 3 (ground truth), K = 4 and K = 3 for
the synthetic, ADNI and ICU dataset, respectively. Details
can be found in the Appendix.
Table 2: Clustering Performance on the Synthetic Dataset.
METHOD
PURITY
RAND
NMI
KM-E2P(y)
KM-E2P(z)
KM-DTW
KM-L
SEQ2SEQ
AC-TPC
0.663±0.019
0.677±0.029
0.469±0.017
0.687±0.033
0.378±0.008
0.659±0.020
0.477±0.033
0.418±0.024
0.068±0.021
0.395±0.058
-0.003±0.003
0.487±0.035
0.569±0.045
0.485±0.047
0.077±0.022
0.447±0.059
0.005±0.003
0.596±0.043
T-Phenotype (J)
T-Phenotype
0.655±0.021
0.965±0.018‡
0.440±0.051
0.902±0.048‡
0.543±0.064
0.875±0.050‡
Purity score, Rand index and normalized mutual information (NMI) are used to evaluate the
clustering performance with ground truth phenotype labels. Best performance is highlighted in
bold, and ‡ indicates p-value < 0.01.
Table 3: Benchmark Result on Two Real-world Datasets.
METHOD
AUROC
AUPRC
HROC
HPRC
KM-E2P(y)
KM-E2P(z)
KM-DTW
KM-L
SEQ2SEQ
AC-TPC
0.893±0.005
0.884±0.012
0.743±0.013
0.697±0.029
0.775±0.023
0.861±0.012
0.728±0.017
0.711±0.020
0.522±0.020
0.465±0.019
0.550±0.030
0.665±0.020
0.770±0.013
0.763±0.018
0.752±0.027
0.753±0.019
0.773±0.012
0.788±0.014
0.701±0.012
0.690±0.013
0.618±0.021
0.593±0.018
0.642±0.022
0.694±0.013
T-Phenotype (J)
T-Phenotype
0.867±0.020
0.891±0.005
0.679±0.040
0.716±0.015
0.768±0.011
0.791±0.013
0.684±0.021
0.713±0.009‡
KM-E2P(y)
KM-E2P(z)
KM-DTW
KM-L
SEQ2SEQ
AC-TPC
0.697±0.014
0.677±0.030
0.539±0.030
0.577±0.019
0.592±0.024
0.660±0.008
0.593±0.012
0.579±0.018
0.515±0.011
0.532±0.009
0.539±0.012
0.573±0.003
0.682±0.029
0.686±0.031
0.636±0.023
0.682±0.009
0.690±0.011
0.695±0.014
0.628±0.025
0.633±0.024
0.621±0.021
0.649±0.004
0.653±0.004
0.644±0.011
T-Phenotype (J)
T-Phenotype
0.697±0.025
0.681±0.017
0.595±0.017
0.585±0.015
0.691±0.056
0.703±0.007
0.636±0.048
0.648±0.008
I
N
D
A
U
C
I
The area under the curve of receiving-operator characteristic (AUROC) and area under the curve
of precision-recall (AUPRC) are used to assess the prognostic value of the discovered clusters
on predicting target outcomes. Two composite metrics HROC and HPRC, calculated as
harmonic means between predictive accuracy (AUROC or AUPRC) and a cluster consistency
metric AUSIL, are used to measure the phenotype discovery performance. Please refer to the
Appendix for details. Best performance is highlighted in bold, and ‡ indicates p-value < 0.01.
clustering
Benchmark. The
of T-
Phenotype is compared with six baselines, with all results
reported using 5 random train/validation/test splits of the
corresponding dataset. Benchmark results on synthetic
dataset and two real-world datasets are provided in
performance
Table 2 and Table 3, respectively. Complete benchmark
tables are available in the Appendix. On the synthetic
dataset, T-Phenotype outperforms all baselines with
significant gaps in considered clustering accuracy metrics.
Similarly, T-Phenotype has the best (or very close to
best) outcome prediction performance on both ADNI and
ICU datasets and outperforms AC-TPC and most other
baselines in phenotype discovery on the two datasets. The
baseline of KM-E2P(y) directly discovers clusters over
predicted outcome distributions and achieves the best
prediction performance on the ADNI dataset, which is
within expectation. However, its clustering performance,
particularly HROC, is inferior to that of T-Phenotype due
to the negligence of similarity in temporal patterns. On
the ICU dataset, while T-Phenotype has close phenotype
discovery performance HPRC to baseline SEQ2SEQ,
the clusters discovered by our method provide greater
prognostic values as reflected in the outcome prediction
accuracy.
Phenotypes of AD Progression. The CDRSB score
measures the impairment on both cognitive abilities and
brain function (Coley et al., 2011) and is widely used in
AD progression assessment and staging (Kim et al., 2020;
O'Bryant et al., 2008). The temporal patterns in CDRSB
trajectory vary in different disease stages and show stable
prognostic power on patient outcomes (Delor et al., 2013).
On the ADNI dataset, four phenotypes are discovered by
T-Phenotype. We examine these phenotypes by plotting
the CDRSB scores of Ntest = 270 test samples separately
in corresponding clusters. As shown in Figure 3b, nor-
mal and high-risk patients with divergent cognitive test
trajectories are correctly identified in phenotype 1 and 4 by
T-Phenotype. In the meantime, for the predicted outcome
of MCI, two subtypes of patients are clearly separated into
two phenotypes (2 and 3) with different growth rates in
CDRSB score. In comparison, AC-TPC fails to distinguish
between these two subtypes as illustrated in Figure 3a,
which impedes the prognostic value of clusters discovered
by AC-TPC.
Prognostic Value of T-Phenotype. We further demon-
strate the prognostic value of T-Phenotype with the tem-
poral phenotyping results obtained on a typical patient
from the ADNI dataset. The studied patient had a positive
biomarker of APOE ε4 gene which contributes to an in-
creased risk of AD (Yamazaki et al., 2019). Consecutive
observations of patient covariates at three time stamps are
plotted in Figure 3c. Hippocampus volume (green triangle)
and CDRSB score (blue dot) are displayed together with
diagnosis obtained at the next follow-up (yellow bar). The
temporal phenotype assignment via T-Phenotype is shown
at the bottom. As a predictive factor of early-stage AD
(Rao et al., 2022), fast decrease in hippocampus volume
leads to the initial diagnosis of phenotype 2 (MCI) in Fig-
ure 3b by T-Phenotype despite a low CDRSB score from
cognitive test. Then, with a clear trend of increase appear-
ing in CDRSB trajectory, the studied patient is classified
into phenotypes (2 → 3 → 4) that reflect the growing
risk in developing AD. In contrast, as shown on the top of
8
T-Phenotype
(a) Three phenotypes from AC-TPC.
(b) Four phenotypes from T-Phenotype.
(c) Prognostic values of T-Phenotype and AC-TPC.
Figure 3: Comparison of Phenotypes Discovered by T-Phenotype and AC-TPC on the ADNI Dataset.
Figure 3c, AC-TPC simply assigns the same phenotype to
the patient throughout the considered time period and is
unable to provide comparable insights on AD progression
from the patient trajectory.
6 CONCLUSION
In this paper, we propose a novel phenotype discovery ap-
proach T-Phenotype to uncover predictive patterns from
labeled time-series data. A representation learning method
in frequency-domain is developed to efficiently embed
the variable-length, irregularly sampled time-series into
a unified latent space that provides insights on their tem-
poral patterns. With our new notion of path-based pheno-
type similarity, a graph-constrained K-means approach is
utilized to discover clusters representing distinct pheno-
types. Throughout experiments on synthetic and real-world
datasets, we show that T-Phenotype outperforms all base-
lines in phenotype discovery. The utility of T-Phenotype
to discover clinically meaningful phenotypes is further
demonstrated via comparison with the the state-of-the-
art temporal phenotyping method AC-TPC on real-world
healthcare datasets.
the predictor network would be another important future
direction.
8 SOCIETAL IMPACT
Discovery of phenotypes from disease trajectories is a long
pursuit in healthcare. In line with the target of precision
medicine, the phenotype connects temporal patterns in
patient trajectory and clinical outcomes is of great prog-
nostic value since it allows clinicians to make more ac-
curate diagnosis and issue the most appropriate treatment
to their patients. By combining notions of similarity in
both patient trajectories and clinical outcomes, our method,
T-Phenotype, can effectively identify phenotypes of de-
sired property. The discovered patient subgroups can be
used to improve current clinical guidelines and help clini-
cians to better understand the disease progression of their
patients. Nevertheless, the association between temporal
patterns and clinical outcome in a phenotype cannot be
interpreted as causal relationship without careful tests and
examinations. Application of T-Phenotype without audits
from human experts may lead to undesirable outcome of
patients in certain edge cases.
7 LIMITATIONS
Acknowledgements
Our proposed method, T-Phenotype, leverages Laplace
encoders as a general approach to capture temporal pat-
terns from time-series data as distinct Laplace embeddings.
However, there may exist some complex temporal pat-
terns, e.g., interactions between patient covariates at two
specific time points, that cannot be encoded in this man-
ner. To address this issue, additional representations (e.g.,
representation via attention mechanism) from the input
time-series can be introduced to augment the Laplace em-
bedding, which we leave as a future work. In the meantime,
the phenotype discovery performance of T-Phenotype is
highly dependent on the quality of predictor fP . Unstable
predictions from fP will directly lead to inaccuracies in
phenotype assignment. Thus, effective regularization of
Yuchao Qin was supported by the Cystic Fibrosis Trust.
Changhee Lee was supported through the IITP grant
funded by the Korea government (MSIT) (No. 2021-0-
01341, AI Graduate School Program, CAU). We thank all
reviewers at AISTATS 2023 for their time in helping us to
evaluate our work. Their insightful comments are greatly
appreciated.
References
H. Aguiar, M. Santos, P. Watkinson, and T. Zhu. Learn-
ing of cluster-based feature importance for electronic
health record time-series. In International Conference
on Machine Learning, pages 161–179. PMLR, 2022.
9
T-Phenotype
M. T. Bahadori, D. Kale, Y. Fan, and Y. Liu. Functional
subspace clustering with application to time series. In
International Conference on Machine Learning, pages
228–237. PMLR, 2015.
P. G. Bastos, X. Sun, D. P. Wagner, A. W. Wu, and W. A.
Knaus. Glasgow coma scale score in the evaluation of
outcome in the intensive care unit: findings from the
acute physiology and chronic health evaluation iii study.
Critical Care Medicine, 21(10):1459–1465, 1993.
I. M. Baytas, C. Xiao, X. Zhang, F. Wang, A. K. Jain, and
J. Zhou. Patient subtyping via time-aware lstm networks.
In Proceedings of the 23rd ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining,
pages 65–74, 2017.
S. Blot, M. Cankurtaran, M. Petrovic, D. Vandijck, C. Lizy,
J. Decruyenaere, C. Danneels, K. Vandewoude, A. Piette,
G. Vershraegen, et al. Epidemiology and outcome of
nosocomial bloodstream infection in elderly critically
ill patients: a comparison between middle-aged, old,
and very old patients. Critical Care Medicine, 37(5):
1634–1641, 2009.
T. Ceritli, A. P. Creagh, and D. A. Clifton. Mixture of input-
output hidden markov models for heterogeneous disease
progression modeling. In Workshop on Healthcare AI
and COVID-19, pages 41–53. PMLR, 2022.
I. Y. Chen, R. G. Krishnan, and D. Sontag. Clustering
interval-censored time-series for disease phenotyping.
In Proceedings of the AAAI Conference on Artificial
Intelligence, volume 36, pages 6211–6221, 2022.
K. Cho, B. Van Merriënboer, D. Bahdanau, and Y. Ben-
gio. On the properties of neural machine transla-
arXiv preprint
tion: Encoder-decoder approaches.
arXiv:1409.1259, 2014.
N. Coley, S. Andrieu, M. Jaros, M. Weiner, J. Cedar-
baum, and B. Vellas. Suitability of the clinical dementia
rating-sum of boxes as a single primary endpoint for
alzheimer's disease trials. Alzheimer's & Dementia, 7
(6):602–610, 2011.
I. Delor, J.-E. Charoin, R. Gieschke, S. Retout, P. Jacqmin,
and A. D. N. Initiative. Modeling alzheimer's disease
progression using disease onset time and disease tra-
jectory concepts applied to cdr-sob scores from adni.
CPT: Pharmacometrics & Systems Pharmacology, 2
(10):1–10, 2013.
J. C. Denny, L. Bastarache, M. D. Ritchie, R. J. Carroll,
R. Zink, J. D. Mosley, J. R. Field, J. M. Pulley, A. H.
Ramirez, E. Bowton, et al. Systematic comparison of
phenome-wide association study of electronic medical
record data and genome-wide association study data.
Nature Biotechnology, 31(12):1102–1111, 2013.
A. Giannoula, A. Gutierrez-Sacristían, A. Bravo, F. Sanz,
and L. I. Furlong. Identifying temporal patterns in pa-
tient disease trajectories using dynamic time warping:
A population-based study. Scientific Reports, 8(4216),
2018.
A. L. Goldberger, L. A. Amaral, L. Glass, J. M. Hausdorff,
P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-
K. Peng, and H. E. Stanley. Physiobank, physiotoolkit,
and physionet: components of a new research resource
for complex physiologic signals. Circulation, 101(23):
e215–e220, 2000.
L. E. Haas, L. Van Dillen, D. de Lange, D. Van Dijk, and
M. Hamaker. Outcome of very old patients admitted
to the icu for sepsis: a systematic review. European
Geriatric Medicine, 8(5-6):446–453, 2017.
A. Hayashi, Y. Mizuhara, and N. Suematsu. Embedding
time series data for classification. In Machine Learning
and Data Mining in Pattern Recognition: 4th Interna-
tional Conference, MLDM 2005, Leipzig, Germany, July
9-11, 2005. Proceedings 4, pages 356–365. Springer,
2005.
J. C. Ho, J. Ghosh, and J. Sun. Marble: High-throughput
phenotyping from electronic health records via sparse
nonnegative tensor factorization. In Proceedings of the
ACM SIGKDD Conference on Knowledge Discovery
and Data Mining, 2014.
G. Hripcsak and D. J. Albers. Next-generation phenotyping
of electronic health records. Journal of the American
Medical Informatics Association, 20(1):117–121, 2013.
K. W. Kim, S. Y. Woo, S. Kim, H. Jang, Y. Kim, S. H.
Cho, S. E. Kim, S. J. Kim, B.-S. Shin, H. J. Kim, et al.
Disease progression modeling of alzheimer's disease
according to education level. Scientific Reports, 10(1):
1–9, 2020.
C. Lee and M. van der Schaar. Temporal phenotyping using
deep predictive clustering of disease progression. In
International Conference on Machine Learning, pages
5767–5777. PMLR, 2020.
C. Lee, J. Rashbass, and M. Van der Schaar. Outcome-
oriented deep temporal phenotyping of disease progres-
sion. IEEE Transactions on Biomedical Engineering,
68(8):2423–2434, 2020.
C. Lee, A. Light, E. S. Saveliev, M. van der Schaar, and
V. J. Gnanapragasam. Developing machine learning
algorithms for dynamic estimation of progression dur-
ing active surveillance for prostate cancer. npj Digital
Medicine, 5(1):110, 2022.
Q. Lei, J. Yi, R. Vaculin, L. Wu, and I. S. Dhillon. Simi-
larity preserving representation learning for time series
clustering. In Proceedings of the International Joint
Conference on Artificial Intelligence, 2019.
J. Leitgeb, W. Mauritz, A. Brazinova, M. Majdan, I. Jan-
ciak, I. Wilbacher, and M. Rusnak. Glasgow coma scale
score at intensive care unit discharge predicts the 1-year
outcome of patients with severe traumatic brain injury.
European Journal of Trauma and Emergency Surgery,
39(3):285–292, 2013.
Q. Ma, J. Zheng, S. Li, and G. W. Cottrell. Learning
representations for time series clustering. Advances in
Neural Information Processing Systems, 32, 2019.
10
T-Phenotype
S. E. O'Bryant, S. C. Waring, C. M. Cullum, J. Hall,
L. Lacritz, P. J. Massman, P. J. Lupo, J. S. Reisch,
R. Doody, T. A. R. Consortium, et al. Staging dementia
using clinical dementia rating scale sum of boxes scores:
a texas alzheimer's research consortium study. Archives
of Neurology, 65(8):1091–1095, 2008.
K. J. Ramos, P. J. Smith, E. F. McKone, J. M. Pilewski,
A. Lucy, S. E. Hempstead, E. Tallarico, A. Faro, D. B.
Rosenbluth, A. L. Gray, et al. Lung transplant referral
for individuals with cystic fibrosis: Cystic fibrosis foun-
dation consensus guidelines. Journal of Cystic Fibrosis,
18(3):321–333, 2019.
Y. L. Rao, B. Ganaraja, B. Murlimanju, T. Joy, A. Kr-
ishnamurthy, and A. Agrawal. Hippocampus and its
involvement in alzheimer's disease: a review. 3 Biotech,
12(2):55, 2022.
R. L. Richesson, J. Sun, J. Pathak, A. N. Kho, and J. C.
Denny. Clinical phenotyping in selected national net-
works: demonstrating the need for high-throughput,
portable, and computational methods. Artificial Intelli-
gence in Medicine, 71:57–61, 2016.
P. J. Rousseeuw. Silhouettes: a graphical aid to the in-
terpretation and validation of cluster analysis. Journal
of Computational and Applied Mathematics, 20:53–65,
1987.
P. Schulam, F. Wigley, and S. Saria. Clustering longitudinal
clinical marker trajectories from electronic health data:
Applications to phenotyping and endotype discovery.
In Proceedings of the AAAI Conference on Artificial
Intelligence, volume 29, 2015.
D. Steinley. Properties of the hubert-arable adjusted rand
index. Psychological Methods, 9(3):386, 2004.
N. X. Vinh, J. Epps, and J. Bailey. Information theoretic
measures for clusterings comparison: is a correction for
chance necessary? In Proceedings of the 26th Annual
International Conference on Machine Learning, pages
1073–1080, 2009.
J. Xie, R. Girshick, and A. Farhadi. Unsupervised deep
embedding for clustering analysis. In International Con-
ference on Machine Learning, pages 478–487. PMLR,
2016.
Y. Yamazaki, N. Zhao, T. R. Caulfield, C.-C. Liu, and
G. Bu. Apolipoprotein e and alzheimer disease: patho-
biology and targeting strategies. Nature Reviews Neu-
rology, 15(9):501–518, 2019.
B. Yang, X. Fu, N. D. Sidiropoulos, and M. Hong. Towards
k-means-friendly spaces: Simultaneous deep learning
and clustering. In International Conference on Machine
Learning, pages 3861–3870. PMLR, 2017.
X. Zhang, J. Chou, J. Liang, C. Xiao, Y. Zhao, H. Sarv,
C. Henchcliffe, and F. Wang. Data-driven subtyping of
parkinson's disease using longitudinal clinical records:
A cohort study. Scientific Reports, 9(797), 2019.
11
T-Phenotype
Appendix
The appendix is organized in the following structure.
A Detailed discussion of the Laplace encoder.
B Proof of Proposition 1 and relevant discussions.
C The graph-constrained K-means algorithm
D Experiment setup.
E Hyperparameter Selection.
F Complete benchmark results.
G Additional analyses of results obtained on the two real-world datasets.
A summary of major notations used in this paper is provided below.
NOMENCLATURE
Continuous-time disease trajectory of a patient
Label vector indicating clinical status of a patient
A vector of time stamps
A vector of latent variables
A vector of Laplace embedding
Discrete-time observation to disease trajectory x(t)
A connected set of patient trajectories which represents a temporal pattern
Vector-valued function that describes the conditional distribution p(y|x)
Distance metric of two label distributions
x
y
t
z
w
X
Φ
g(x)
dy(*, *)
Γ(x1 → x2) A translation from trajectory x1 to x2
γ(z1 → z2) A translation from latent representation z1 to z2
dΓ(x1, x2)
dγ(z1, z2)
S
Gδ
K
C
fL
fE
fP
Path-based similarity score between trajectories x1 and x2
Proxy of path-based similarity score dΓ(x1, x2) in latent space
A distance matrix of path-based similarity score between samples in a dataset
A graph generated from matrix S with threshold δ
Number of clusters
A set of K clusters
A Laplace encoder
A composite encoder with feature-wise Laplace encoders
A predictor for label distribution
Code Availability. The source code of T-Phenotype can be found in the two GitHub repositories listed below:
• The van der Schaar lab repo: https://github.com/vanderschaarlab/tphenotype
• The author's personal repo: https://github.com/yvchao/tphenotype
A ANALYSIS OF THE LAPLACE ENCODER
A.1
Implementation Details
The proposed Laplace encoder is implemented with a RNN-based neural network fL parameterized by θL. As shown
in Figure A.1, given discrete time-series of a one-dimension trajectory x(t), the Laplace encoder first generates a
summary of time-series x(t) via the RNN. With the summary as input, the MLP outputs a representation w ∈ Cn(d+1).
12
T-Phenotype
Elements in w can be divided into two groups: poles and coefficients, which are further used to construct a function in
the frequency domain, Fw(s), as defined in (3). Changing the order of poles (and associated coefficients) in w has
no effect on Fw(s) since it is permutation-invariant to the poles in w. As discussed in the main manuscript and in
the next paragraph, we impose a lexical order on poles in the MLP output w to make it a unique representation of
Fw(s). The trajectory x(t) can be reconstructed as ˆx(t) through the inverse Laplace transform (4) on Fw(s). Here, the
reconstruction ˆx(t) is a function and its value can be evaluated everywhere in t ∈ [0, 1]. This allows us to compare
input time-series with variable-length and irregularly-sampled observations in a unified latent space. For the sake
of convenience, we denote with L−1(w) = ˆx(t) = L−1[Fw(s)](t) the transform that maps embedding w to its
time-domain reconstruction ˆx(t).
Figure A.1: Laplace Encoder.
Robust Lexical Order of Poles. Due to the summation in (3), Fw(s) is permutation-equivariant with respect to
the poles in w. Thus, we impose a lexical order (pm ≤ pm+1 for m = 1, . . . , n − 1) on the poles to obtain a
unique Laplace embedding w as discussed in the manuscript. To guarantee this property, we transform the unordered
representation (output of the MLP in Laplace encoder) into the final unique Laplace embedding w by sorting the poles
(together with their associated coefficients) in a lexical order. To achieve a stable ordering that is robust to inevitable
noise in w, we encourage any pair of two poles to be sufficiently different to avoid abrupt changes in their order.
Hence, given two poles pm, pl, we say pm ≤ pl if and only if (Re(pm) < Re(pl)) ∧ (|Re(pm) − Re(pl)| > δpole)
or (|Re(pm) − Re(pl)| ≤ δpole) ∧ (Im(pm) ≤ Im(pl)), and pm > pl otherwise, where δpole ≥ 0 is a threshold that
controls the robustness of the lexical order. The best threshold δpole is search as a hyperparameter in our experiment.
Ranges of Poles and Coefficients. Each pole pm in embedding w is located on the complex plane C. The real
part Re(pm) indicates the increase or decay speed of the corresponding component (eRe(pm)t) in the time-domain
reconstruction ˆx(t) = L−1(w). Too large or small value of Re(pm) leads to unrealistic signals. In the meantime,
The imaginary part Im(pm) represents the frequency of oscillations in the related component (cos(Im(pm)t) +
j sin(Im(pm)t), j2 = −1) in reconstruction ˆx(t). Very high-frequency oscillation in the input time-series x(t)
are usually caused by random noise and should be discarded in reconstruction ˆx(t). In our experiment, we limit the
range of poles to the area of {p (cid:12)
(cid:12) |Re(p)| ≤ rmax, |Im(p)| ≤ f reqmax}, where rmax limits that maximum increase or
decrease speed of signals in reconstruction ˆx, f reqmax is the maximum allowed frequency such that high-frequency
signals above f reqmax are considered as a noise component in time-series x(t) and, thus, discarded when constructing
Fw(s). In our experiments, we set rmax = 10 and f reqmax = 20Hz. Similarly, the coefficient cm,l in embedding w is
limited to a square area of {c (cid:12)
(cid:12) |Re(c)| ≤ cmax, |Im(c)| ≤ cmax}. We set cmax = 5 which is sufficient for normalized
time-series (via min-max or normal scaling). The range of poles and coefficients in w can be adjusted accordingly
based on needs in practical application scenarios. When fed into the predictor network fP , the poles and coefficients in
embedding w are normalized by the corresponding maximum allowed values to facilitate the learning process.
In order to improve computation efficiency, when the d-th feature dimension xd of
Embedding of Static Features.
trajectory x is known to be constant over time, i.e., xd(t) ≡ xd(0), instead of training a Laplace encoder, the static
value xd(0) is directly used to represent xd(t), and the d-th component wd in latent variable z is replaced by xd(0).
Regularization Terms. Apart from the lexical order imposed on the embedding w, we further introduce three
regularization terms that encourage the Laplace encoder to provide a unique and consistent Laplace representation
given an input time-series. These regularization terms are combined into the second term of Lunique in (5); we will
describe each in turn.
The first regularizer, lsep, penalizes the case where two poles in embedding w are nearly identical – that is, pm and pl
are considered as an identical pole when |pm − pl| ≤ δpole – based on the following hinge loss:
lsep(ˆx(t)) =
(cid:88)
m(cid:54)=l
max(0, δpole − |pm − pl|).
(10)
13
T-Phenotype
Here, pm and pl are two poles in the associated embedding w given the input time-series x(t), i.e., w = fL(x(t)), and
the threshold δpole > 0 for robust pole sorting is reused here as a pole separation threshold.
The second regularizer, lreal, ensures that the reconstructed trajectory ˆx(t) is real-valued on [0, 1] by suppressing the
imaginary part of the reconstructed trajectory ˆx(t) via the following loss:
1
T
where t = [t1, . . . , tT ](cid:62) includes time stamps randomly sampled over tj ∈ [0, 1] for j = 1, . . . , T . Specifically,
tj = clamp( j
The last regularizer, ldistinct, encourages that no two distinct Laplace embeddings generate the same trajectory based on
the following loss:
2T ε, min = 0, max = 1), ε ∼ Normal(0, 1).
(cid:107)Im(ˆx(t))(cid:107)2
2,
lreal(ˆx(t)) =
T + 1
(11)
ldistinct(ˆxi(t), ˆxj(t)) = (cid:107)wi − wj(cid:107)2
2e−(cid:107)ˆxi(t)−ˆxj (t)(cid:107)2
2,
(12)
where the radial basis similarity function e−(cid:107)ˆxi(t)−ˆxj (t)(cid:107)2
2 is used to discover similar trajectories, wi and wj are
embeddings of input time-series while ˆxi(t) and ˆxj(t) are their time-domain reconstructions. Since the input time-
series may be of different lengths and sampling intervals, we use the reconstructed trajectories for pair-wise comparison
between time-series here.
Overall, we construct Lunique(θL) as a combination of the three regularization terms introduced above:
Lunique(θL) =
1
N
dimx(cid:88)
d=1
(cid:88)
i
lsep(ˆxi
d(t)) +
α1
α
lreal(ˆxi
d(t)) +
α2
α
1
N (N − 1)
(cid:88)
i(cid:54)=j
ldistinct(ˆxi
d(t), ˆxj
d(t))
,
(13)
where α is the coefficient for Lunique(θL) in (5), α1 and α2 are balancing coefficients that trade-off different uniqueness
properties in the Laplace encoder. In the experiment, due to the high computational complexity, the last term ldistinct is
only evaluated on a subset of 10 randomly selected time-series in each training batch. In addition, since ldistinct relies
on the reconstructed time-series ˆx(t) which may be inaccurate in the beginning of training, we fix α2 to 0.01 such that
it majorly takes effect after the reconstruction error is small enough.
A.2 Quantitative Analysis
Comparison with Regular Auto-encoder. We provide a toy example to demonstrate the advantage of our proposed
Laplace encoder over regular auto-encoders in time-series reconstruction. A Laplace encoder composed of a 1-layer
GRU (Cho et al., 2014) and a 1-layer MLP with 10 hidden units in each layer is considered in the following discussion.
Other parameters of the Laplace encoder are set as n = 4, d = 1, α = 1.0, α1 = 0.1, α2 = 0.01, δpole = 1.0. A regular
time-series auto-encoder is used for comparison. The auto-encoder has a 1-layer GRU network as the encoder. The
decoder contains a 1-layer MLP on top of another 1-layer GRU. Each layer in the auto-encoder includes 10 hidden
units. The auto-encoder maps the input time-series to a latent variable. Then, the latent variable is provided to the
decoder network for reconstruction of the entire time-series.
Consider a toy dataset with N = 1000 irregularly sampled time-series in t ∈ [0, 1]. Each sample contains T = 15
observations from one of the following four types of trajectories:
• Type 1: x(t) = cos(2π(t − φ)).
• Type 2: x(t) = cos(π(t − φ)).
• Type 3: x(t) = sin(π(t − φ)).
• Type 4: x(t) = sin(2π(t − φ)).
Delay term φ ∼ Exp( 1
2 ). Gaussian noise sampled from Normal(0, 0.032) is independently introduced to the observa-
tions at different time points. The mean squared error (MSE) in time-series reconstruction of the considered Laplace
encoder and auto-encoder network is evaluated over 5 random splits of the toy dataset with the train/validation/test ratio
of 64/16/20. Our proposed Laplace encoder achieves the best performance of MSE = 0.039 ± 0.008. The auto-encoder
has a much higher reconstruction error of MSE = 0.108 ± 0.019. Comparison of typical reconstruction outcomes of
the Laplace encoder and the auto-encoder is illustrated in Figure A.2.
Sensitivity Analysis. We further conduct a sensitivity analysis of the Laplace encoder fL under different hyperparame-
ters on the toy dataset. The default hyperparameters are set as n = 4, d = 1, α = 1.0, α1 = 0.1, α2 = 0.01, δpole = 1.0.
To evaluate the impact of individual hyperparameter on the Laplace encoder, in each test, we only alter the value of one
14
T-Phenotype
(a) Trajectory reconstruction via Laplace encoder.
(b) Trajectory reconstruction via Auto-encoder.
Figure A.2: Comparison of Time-series Reconstruction Outcomes of Laplace Encoder and Auto-encoder.
(a) Impact of α.
(b) Impact of α1.
(c) Impact of α2.
(d) Impact of δpole.
(e) Impact of pole number n.
(f) Impact of maximum pole degree d.
Figure A.3: Sensitivity of Laplace Encoder with Respect to Different Hyperparameters. Error bars are calculated via
evaluation on 3 random splits of the toy dataset.
hyperparameter and keep other hyperparameters the same as default setting. The parameter sensitivity is measured via
the reconstruction error (MSE), and the sensitivity test result is given in Figure A.3.
It can be found that our proposed Laplace encoder fL has relatively stable time-series reconstruction performance under
different hyperparameters. As mentioned earlier, the regularizer lditinct may generate wrong gradients in the beginning
of training due to the large reconstruction error. The increased MSE for larger α2 in Figure A.3c is within expectation,
and we choose to set α2 to 0.01 such that it only takes effect when the reconstruction error is small enough.
In addition, the effect of pole separation threshold δpole on the Laplace embedding is illustrated in Figure A.4. When
δpole = 0.0, the order of poles in Laplace embedding w can easily be affected by random noise in input time-series,
which makes it difficult to ensure the uniqueness of w. In contrast, setting δpole = 1.0 effectively improves the
representations learned by the Laplace encoder, and different components in the Laplace transform Fw(s) are clearly
represented by distinct poles (marked with different colors).
Impact of Sampling Rate in Input Data. The Nyquist Sampling Theorem states that a band-limited signal (maxi-
mum frequency of B) can be perfectly reconstructed from sequential observations with (average) sampling rate above
2B. It provides a lower bound on the number of time-series observations required for our proposed Laplace encoder to
work. Thus, we assume that the sampling rate in real-world datasets is sufficiently large so that important temporal
patterns can be correctly identified. To validate the above statement, we conduct a synthetic experiment on time-series
15
T-Phenotype
(a) δpole = 0.0.
(b) δpole = 1.0.
Figure A.4: Distribution of Laplace Embedding w under Different Thresholds of δpole. The Laplace embeddings of
trajectory x(t) = cos(2π(t − φ)), φ ∼ Exp( 1
2 ) are plotted as poles and coefficients on the complex plane with different values of
δpole.
data generated by x(t) = sin(2πt + φ) where φ ∼ Exp( 1
the reconstruction error of the Laplace encoder converges to zero when the sampling rate is sufficiently large.
2 ) with different sampling rates. Figure A.5 demonstrates that
Figure A.5: Impact of Sampling Rate on Time-series Reconstruction via Laplace Encoder.
B PROOF OF PROPOSITION 1
Proposition 1 states that, given two Laplace embeddings z1 and z2 in latent space Z, the distance between their
corresponding time-domain trajectories ˆx1 and ˆx2 is upper-bounded by ψ(cid:107)z1 − z2(cid:107)2
2 with some scalar ψ > 0. The
proof of Proposition 1 can be derived as the following:
Proof. Let us first consider the uni-variate case. Given two arbitrary Laplace embeddings w1, w2 ∈ Cn(d+1), their time-
domain reconstructions can be obtained via inverse Laplace transform, i.e., ˆxi(t) = L−1(wi) (cid:44) L−1[Fwi(s)](t), i =
1, 2. According to (3) and (4), we have
ˆxi(t) =
n
(cid:88)
d
(cid:88)
m=1
l=1
m,ltl−1
ci
Γ(l)
epi
mt, t ≥ 0,
(14)
where Γ(l) = (l − 1)! is the Gamma function, wi = [pi
1, pi
Difference in One Coefficient. Suppose w1 and w2 only differ at one coefficient cm,l, which leads to the result
(cid:107)w1 − w2(cid:107)2
n,d](cid:62), i = 1, 2.
1,1, . . . , ci
2, . . . , ci
2 = |c1
m,l − c2
m,l|2. Then,
(cid:107)ˆx1 − ˆx2(cid:107)2
L2
[0,1]
(cid:90) 1
0
(cid:90) 1
=
=
|ˆx1(t) − ˆx2(t)|2dt,
|c1
m,l − c2
m,l|2
0
m,l − c2
≤ |c1
m,l|2ψc
(cid:12)
tl−1
(cid:12)
(cid:12)
Γ(l)
(cid:12)
m,l = ψc
epmt
2
(cid:12)
(cid:12)
(cid:12)
(cid:12)
dt,
(15)
m,l(cid:107)w1 − w2(cid:107)2
2,
16
T-Phenotype
where ψc
m,l is some suitable constant.
Difference in One Pole. Now, let us consider the case where w1 and w2 only differ at one pole pm which gives
(cid:107)w1 − w2(cid:107)2
m = r + jθ, where r ≤ 0, j2 = −1. The
following inequality can be established when t ∈ [0, 1]:
m|2. Without loss of generality, we assume p2
2 = |p1
m − p2
m − p1
|1 − e(p2
m−p1
m)t|2 = |1 − ert(cos(θt) − j sin(θt))|2,
= (1 − ert)2 + 2ert(1 − cos(θt)),
≤ (1 − ert)2 + ertθ2t2,
(via ert > 0 and 1 − cos(x) ≤
x2
2
)
(16)
Hence, we have
≤ r2t2 + ertθ2t2,
≤ (r2 + θ2)t2,
m − p2
= |p1
m|2t2.
(cid:107)ˆx1 − ˆx2(cid:107)2
L2
[0,1]
=
(via r ≤ 0 and 0 ≤ 1 − ert ≤ (−r)t)
(cid:90) 1
|ˆx1(t) − ˆx2(t)|2dt,
0
(cid:90) 1
2
=
|ep1
0
(cid:90) 1
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:12)
0
m − p2
≤ |p1
(cid:12)
ci,ltl−1
(cid:12)
(cid:12)
Γ(l)
(cid:12)
(cid:12)
ci,ltl−1
(cid:12)
(cid:12)
Γ(l)
(cid:12)
m = ψp
m|2ψp
|ep1
≤
2
mt|2|1 − e(p2
i −p1
i )t|2dt,
mt|2|p1
m − p2
m|2t2dt,
m(cid:107)w1 − w2(cid:107)2
2,
(17)
m is some suitable constant.
where ψp
General Cases. Now, we define an operator Si(w1, w2) that generates a new composite vector ̄wi from w1 and
w2. The first i elements of the composite vector ̄wi are taken from w2 while the latter n(d + 1) − i elements of
̄wi are obtained from w1. For instance, we have S0(w1, w2) = w1, S1(w1, w2) = [p2
n,d](cid:62),
n,d](cid:62), . . ., and Sn(d+1)(w1, w2) = w2. It is easy to see that Si(w1, w2)
S2(w1, w2) = [p2
and Si+1(w1, w2) only differ at one pole or one coefficient, and (cid:107)Si(w1, w2) − Si+1(w1, w2)(cid:107)2
i+1|2
i+1 − p2
when 0 ≤ i ≤ n − 1 and (cid:107)Si(w1, w2) − Si+1(w1, w2)(cid:107)2
d + 1(cid:99), l =
i − n − (m − 1)d + 1. Each composite vector ̄wi = Si(w1, w2) yields a time-domain trajectory L−1( ̄wi) via inverse
Laplace transform of F ̄wi(s).
Note that L−1( ̄w0) = L−1(w1) = ˆx1 and L−1( ̄wn(d+1)) = L−1(w2) = ˆx2. Based on the triangular inequality,
2 = |p1
m,l|2 otherwise, where m = (cid:98) i−n
1,1, . . . , c1
1,1, . . . , c1
3, . . . , c1
m,l − c2
4 . . . , c1
2 = |c1
3, p1
1, p2
1, p1
2, p1
2, p1
(cid:107)ˆx1 − ˆx2(cid:107)2
L2
[0,1]
= (cid:107)
n(d+1)−1
(cid:88)
i=0
L−1(Si(w1, w2)) − L−1(Si+1(w1, w2))(cid:107)2
L2
[0,1]
≤
≤
=
n(d+1)−1
(cid:88)
i=0
n(d+1)−1
(cid:88)
i=0
(cid:107)L−1(Si(w1, w2)) − L−1(Si+1(w1, w2))(cid:107)2
L2
[0,1]
,
ψ(cid:107)Si(w1, w2) − Si+1(w1, w2)(cid:107)2
2,
(18)
n
(cid:88)
m=1
ψ|p1
m − p2
m|2 +
n
(cid:88)
d
(cid:88)
m=1
l=1
ψ|c1
m,l − c2
m,l|2,
where we take ψ = maxm,l(ψp
m, ψc
= ψ(cid:107)w1 − w2(cid:107)2
2,
m,l).
Finally, for the multivariate case, let us consider two latent embeddings z1 and z2 as well as their associated time-domain
reconstructions ˆx1 and ˆx2. We define the distance between trajectories ˆx1 and ˆx2 as
(cid:107) ˆx1 − ˆx2(cid:107)2
L2
[0,1]
(cid:44)
dimx(cid:88)
(cid:90) 1
d=1
0
17
|ˆx1
d(t) − ˆx2
d(t)|2dt,
(19)
T-Phenotype
where ˆxm
component of zm. According to (18), we have the following bound for each dimension d.
d is the d-th dimension of trajectory, ˆxm = L−1(wm
d ) = L−1[Fwm
d
(s)] for m = 1, 2, wm
d is the d-th
(cid:90) 1
0
|ˆx1
d(t) − ˆx2
d(t)|2dt = (cid:107) ˆx1
d − ˆx2
d(cid:107)2
L2
[0,1]
≤ ψd(cid:107)w1
d − w2
d(cid:107)2
2,
(20)
where ψd > 0 is some suitable scalar. Since (cid:107)z1 − z2
reconstructed trajectories ˆx1 and ˆx2 can be upper-bounded as follows with some suitable ψ > 0.
d=1 (cid:107)w1
d − w2
d(cid:107)2
2(cid:107)2
2 = (cid:80)dimx
2, the distance between the two
(cid:107) ˆx1 − ˆx2(cid:107)2
L2
[0,1]
≤
dimx(cid:88)
d=1
ψd(cid:107)w1
d − w2
d(cid:107)2
2 ≤ ψ(cid:107)z1 − z2(cid:107)2
2.
(21)
Corollary 1. Given a continuous set Φz in latent space, the set Φ, which consists of reconstructed trajectories of
z ∈ Φz, is also a continuous set in trajectory space X .
Proof. Consider a trajectory ˆx ∈ Φ and its corresponding latent embedding z ∈ Φz. For any ε > 0, due to the
continuity of Φz, there must exist another embedding z(cid:48) ∈ Φz such that (cid:107)z − z(cid:48)(cid:107)2
2 < δε, where δ > 0 is a scalar. Let
≤ ψ(cid:107)z − z(cid:48)(cid:107)2
us denote the time-domain reconstruction of z(cid:48) as ˆx(cid:48) ∈ Φ. According to Proposition 1, (cid:107) ˆx − ˆx(cid:48)(cid:107)2
2
L2
holds for some ψ > 0. Setting δ = 1
≤ ε which indicates the continuity of set
Φ.
ψ leads to the inequality (cid:107) ˆx − ˆx(cid:48)(cid:107)2
L2
[0,1]
[0,1]
Equivalent Translation in the Latent Space. Consider two trajectories x1, x2 ∈ X with the corresponding latent
embeddings z1 and z2 in the latent space. We construct a set Pz = { ̃γ(z1 → z2)} of all possible continuous path ̃γ
in the latent space that connects z1 and z2. Let gE : Z → X be a function that maps latent embedding z back to its
time-domain reconstruction ˆx in the trajectory space. Then, given a translation Γ(x1 → x2) in the trajectory space, we
can define the (approximately) equivalent translation in the latent space as
γ(z1 → z2) (cid:44) arg min
̃γ∈Pz
min
z∈ ̃γ
max
x∈Γ
(cid:107)x − gE(z)(cid:107)2
L2
[0,1]
,
(22)
[0,1]
where minz∈ ̃γ maxx∈Γ (cid:107)x − gE(z)(cid:107)2
measures the minimum distance between translation, i.e., Γ, and the time-
L2
domain reconstruction of latent path ̃γ, i.e., ̃Γ = {gE(z) | z ∈ ̃γ}. In general, γ is the closet projection of Γ within the
latent space Z, and the equivalence of trajectory translation is approximate. If every trajectory x ∈ Γ has a rational
Laplace transform with no more than n poles and maximum degree of d as described in (3), the equivalence becomes
strict. Without loss of generality, let us consider the uni-variate case. Given a translation Γ, we assume each x ∈ Γ
can be exactly described by the Laplace transform Fw(s) in (3), where w = fL(x(t)), t is a vector of some suitable
sampling time stamps. For any two trajectories x, x(cid:48) ∈ Γ that satisfy |x(t) − x(cid:48)(t)| ≤ δ almost everywhere in t ∈ [0, 1],
we have
|Fw(s) − Fw(cid:48)(s)|2 =
≤
(cid:90) ∞
(cid:12)
(cid:12)
(cid:12)
(cid:12)
0
(cid:90) ∞
(cid:12)
(cid:12)
(x(t) − x(cid:48)(t))e−stdt
(cid:12)
(cid:12)
2
,
|x(t) − x(cid:48)(t)|2|e−st|2dt,
0
≤ δ2
(cid:90) ∞
|e−st|2dt,
(23)
0
δ2
2Re(s)
holds for Re(s) > 0. When δ → 0, we have x(cid:48) → x and Fw(cid:48) → Fw. Note that Fw − Fw(cid:48) is rational and can be
determined with a sufficient number of observations in its region of convergence, e.g., Re(s) > 0. The equivalence in
Laplace transform, i.e., |Fw(s) − Fw(s)|2 ≡ 0, implies that w(cid:48) = w.6 Thus, x(cid:48) → x also leads to w(cid:48) → w, which
means that the collection of Laplace embeddings {w|w = fL(x(t)), x ∈ Γ} is in fact a continuous path γ in the latent
space. Thereby, path γ is a latent translation that exactly yields the trajectory translation Γ. Similar results can be easily
extended to the multi-variate trajectory setting.
=
,
6When Fw(s) and Fw(cid:48) (s) have less than n poles, w and w(cid:48) may take value from multiple alternative embeddings. However, we
can always select the combination such that w(cid:48) = w.
18
T-Phenotype
Justification for Latent Path-based Test. The path-based connectivity test dΓ(x1, x2) is defined based on the
oracle model g(x) of conditional distribution p(y|x). In our proposed method T-Phenotype, a predictor is built upon
the Laplace embedding, i.e., f (X) = fP ◦ fE(X), to approximate the oracle conditional distribution such that
f (X) ≈ g(x) given time-series X sampled from x. Thus, we have dΓ(x1, x2) ≈ maxx∈Γ,i=1,2 dy(f (x(t)), f (X i)),
where t is a vector of some suitable observation time stamps. Further, note that translation Γ in trajectory space can
be approximated by ˆΓ as time-domain reconstruction of latent translation γ(z1 → z2) in Z, where zi = fE(X i) for
i = 1, 2. Then, we have
max
x∈Γ,i=1,2
dy(f (x(t)), f (X i)) ≈ max
ˆx∈ˆΓ,i=1,2
dy(f ( ˆx(t)), f (X i)) ≈ max
z∈γ,i=1,2
dy(fP (z), fP (zi)),
(24)
which leads to the latent path-based test in (7).
C GRAPH-CONSTRAINED K-MEANS ALGORITHM IN T-PHENOTYPE
The graph-constrained K-means iteration in Algorithm 1 is provided in Algorithm C.1. After each run via GK-
means, the objective function J in (2) is re-evaluated. The main algorithm of T-Phenotype stops after 5 iterations
with no improvement in objective J under maximum of 1,000 iterations. Alternatively, T-Phenotype stops when the
improvement is below certain tolerance tol = 10−7, i.e., |∆J| ≤ tol.
Algorithm C.1 GK-means (Single K-means iteration over similarity graph Gδ)
Input: J, e1, e2, . . . , eK, Gδ
Output: C = {C1, C2, . . . , CK}
1: for k = 1, 2, . . . , K do
vk, X (k) ← ek
2:
Ck ← {X (k)}
3:
4: end for
5: Dfree ← {X|X (cid:54)∈ Ck, ∀Ck ∈ C}
6: while |Dfree| > 0 do
for X ∈ Dfree do
7:
C ∗ ← arg min
8:
dy(f (X), vk)
Ck∈C,X
Gδ←→Ck
(cid:46) J objective, ek cluster seed, Gδ: similarity graph
(cid:46) Initialize cluster Ck with seed ek
(cid:46) Get the set of unclustered samples
(cid:46) Find the best cluster assignment
f (X)
(cid:46) Update cluster centroid
C ∗ ← C ∗ ∪ {X}
Dfree ← Dfree \ {X}
end for
for k = 1, 2, . . . , K do
vk ← 1
|Ck|
(cid:80)
X∈Ck
9:
10:
11:
12:
13:
end for
14:
15: end while
D EXPERIMENT SETUP
D.1 Datasets and Statistics
For the two real-world medical datasets, we want to capture recent temporal patterns and associated target outcomes.
Thus, we utilize a sliding window of size 6 years and 24 hours to extract sub-sequences containing temporal predictive
patterns among most recent observations for ADNI and ICU datasets, respectively. Statistics of major feature variables
in the ADNI dataset and ICU dataset can be found in Table D.1 and Table D.2, respectively.
D.2 Baselines
We compare the performance of T-Phenotype with the following five benchmarks ranging from traditional method
to state-of-the-art deep learning-based methods, where each clustering method reflects a different notion of temporal
phenotypes:
K-means with Warping-based Distance. The technique of dynamic time warping (DTW) provides one way to
measure time-series similarity regardless of the observation interval. Time-series with similar temporal patterns usually
19
T-Phenotype
Table D.1: Statistics of ADNI Dataset.
STATIC COVARIATES
TYPE
MEAN
MIN/MAX (MODE)
TYPE
MEAN
MIN/MAX (MODE)
Demographic
Genetic
Race
Education
APOE ε4
Cat.
Cat.
Cat.
0.93
16.13
0.44
White
16
0
Ethnicity
Marital Status
Cat.
Cat.
0.97
0.75
Not Hisp/Latino
Married
TIME-VARYING COVARIATES
TYPE
MEAN
MIN/MAX (MODE)
TYPE
MEAN
MIN/MAX (MODE)
Demographic
Age
Biomarker
Cognitive
Entorhinal
Fusiform
Hippocampus
Intracranial
CDRSB
ADAS-11
RAVLT Immediate
RAVLT Forgetting
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
73.62
55/91.4
3.6E+3
1.7E+4
6.9E+4
1.5E+6
1.21
8.58
38.26
4.19
1.0E+3/6.7E+3
9.0E+3/2.9E+4
2.8E+3/1.1E+4
2.9E+2/2.1E+6
0.0/17.0
0.0/70.0
0.0/75.0
-12.0/15.0
Mid Temp
Ventricles
Whole Brain
Cont.
Cont.
1.0E+6
2.0E+4
4.1E+4
6.5E+5/1.5E+6
8.9E+3/3.2E+4
5.7E+3/1.6E+5
Mini Mental State
ADAS-13
RAVLT Learning
RAVLT Percent
Cont.
Cont.
Cont.
Cont.
27.84
13.60
4.65
51.68
2.0/30.0
0.0/85.0
-5.0/14.0
-500.0/100.0
Table D.2: Statistics of ICU Dataset.
Static Covariates
TYPE
MEAN
MIN/MAX (MODE)
TYPE
MEAN
MIN/MAX (MODE)
Demographic
Admission
Age
ICU Type
Cont.
Cat.
67.25
2.76
15.0/90.0
Medical ICU
Gender
Cat.
0.56
Male
TIME-VARYING COVARIATES
TYPE
MEAN
MIN/MAX (MODE)
TYPE
MEAN
MIN/MAX (MODE)
Albumin
ALT
Bilirubin
Cholesterol
Glucose
HCO3
K
Na
TroponinI
Platelets
Heart Rate
SysABP
DiasABP
MAP
GCS
Urine
FiO2
PaO2
Blood Test
Monitoring
Oxygen
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
2.92
3.9E+3
2.91
156.52
1.4E+3
23.12
4.14
139.07
7.15
1.9E+2
86.80
119.57
59.54
80.23
11.41
12E+2
0.54
147.82
1.0/5.3
1.0/1.2E+4
0.1/47.7
28.0/330.0
1.0E+1/1.1E+3
5.0/50.0
1.8/22.9
98.0/177.0
0.3/49.2
6.0/1.0E+3
0.0/199.5
0.0/273.0
0.0/268.0
0.0/295.0
3.0/15.0
0.0/1.1E+5
0.21/1.0
0.0/500.0
ALP
AST
BUN
Creatinine
Lactate
pH
Mg
HCT
TroponinT
White Blood Cell
Respiratory Rate
NISysABP
NIDiasABO
NIMAP
Temperature
PaCO2
SaO2
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
Cont.
1.2E+2
5.1E+2
27.41
1.50
2.88
7.49
2.03
30.69
1.20
12.67
19.64
119.20
58.18
77.13
37.07
1.2E+1/2.2E+3
4.0/1.8E+4
0.0/197.0
0.1/22.1
0.3/29.3
1.0/735.0
0.6/9.9
9.0/61.8
0.01/24.91
0.1/187.5
0.0/98.0
0.0/247.0
0.0/180
0.0/194.0
-17.8/42.1
40.41
96.65
11.0/100.0
26.0/100.0
leads to smaller DTW distances. We apply conventional K-means with the DTW-based similarity measure to discover
clusters representing different temporal patterns. We denote this approach as KM-DTW.
Deep Temporal K-means. Embedding (i.e., hidden representations) from RNNs can provide meaningful information
to measure the similarity between time-series. With the encoder-predictor (E2P) structure introduced in (Lee and van der
Schaar, 2020), we include the baseline of KM-E2P that performs clustering in a representation space via K-means. We
denote the baseline as KM-E2P(z) when The representation space is formed by the latent embeddings from an encoder
network. The discovered cluster will capture both similarities in input time-series and the output label prediction due to
the E2P structure. When the representation space is selected to be the output (label prediction) of the predictor network,
we refer to the method as KM-E2P(y). In this case, the discovered clusters are aligned to major modes in the label
distribution and are not necessarily associated with certain temporal patterns in trajectory space.
K-means with Laplace Encoder. Similar to the baseline of KM-DTW, the time-series embedding from Laplace
encoder provides a unified representation of (potentially) irregularly sampled time-series. The Euclidean distance
between Laplace embeddings can thus be used as a similarity measure for different patient trajectories. In practice,
the longitudinal observations of patients are first converted to a latent space via the Laplace encoder. Then, K-means
algorithm is performed over the latent representations to identify patient subgroups based on their similarity in temporal
patterns.
Toward K-means Friendly Spaces using Sequence-to-sequence. Sequence-to-sequence (SEQ2SEQ) learning
paradigm allows the learning of a representation space that is easier to perform clustering compared to the orig-
inal time-series data. Such baseline reflects the recent trend of combining conventional clustering methods, e.g.,
20
T-Phenotype
K-means, with dimension reduction using deep learning technique (Xie et al., 2016; Baytas et al., 2017). With different
temporal patterns encoded in a low-dimension representation space, K-means clustering is applied to discover clusters
that represent various temporal feature interactions in input time-series data. In the experiment, we use a modified
version of DCN (Yang et al., 2017) as the SEQ2SEQ baseline.
AC-TPC. AC-TPC (Lee and van der Schaar, 2020) is one of the state-of-the-art temporal clustering approach that
discovers outcome-oriented clusters. AC-TPC learns a cluster assignment policy in the latent space based on an encoder
network. The cluster assignment policy is trained with the actor-critic loss from reinforcement learning to find the
optimal clusters that represent typical label distributions learned by a predictor network. Similar to KM-E2P(y), there is
no guarantee on the association between temporal patterns and clusters discovered by AC-TPC.
D.3 Training Procedure of T-Phenotype
To fit the model of T-Phenotype on a dataset, the Laplace encoder for each trajectory dimension is firstly pre-trained
based on (5) calculated at each time step. Then, we fit the predictor fL with observed patient outcomes y. Finally, the
temporal clusters are discovered via graph-constrained K-means algorithm C.1 based on the output from the predictor.
Latent embeddings from the Laplace encoder has a clear mathematical meaning. Thus, we freeze the pre-trained
Laplace encoder to be isolated from gradients due to outcome predictions. Joint optimization of the encoder and
predictor may lead to slower convergence and lower performance as shown in Table 2 and Table 3 with "T-Phenotype
(J)" as the ablation study.
D.4 Performance Metrics
Prediction Performance. Area under the curve of receiving-operator characteristic (AUROC) and area under the
curve of precision-recall (AUPRC) are used to assess the prognostic value of the discovered clusters on predicting the
target label y. For non-binary (category larger than 2) labels, these scores are calculated individually for each category
and averaged over the entire categories.
Clustering Performance. For synthetic data, we evaluate the clustering performance in terms of the purity score (Lee
and van der Schaar, 2020), adjusted Rand index (RAND) (Steinley, 2004), and normalized mutual information (NMI)
(Vinh et al., 2009) as the ground-truth cluster label is available. For the real-world dataset, there is no ground-truth
of cluster label. In such a case, the Silhouette coefficient (Rousseeuw, 1987) is commonly used as a measure of
cluster consistency by assessing the homogeneity within each cluster and heterogeneity across different clusters. More
specifically, the traditional Silhouette index assumes convex clusters and uses the average intra-cluster distance (a) and
inter-cluster distance (b) to evaluate the consistency between cluster assignment and pattern distribution as s = |b−a|
max(a,b) .
Averaging s over all samples gives the Silhouette index S.
In this paper, the clusters are identified via predictive temporal patterns and are not necessarily in convex shapes. To
better reflect our new notion of clusters, we instead use an m-nearest neighbor version of Silhouette index, i.e., Sm.
Specifically, suppose there are K clusters C = {C1, C2, . . . , CK}. Given a time-series X in cluster Ck, we only
consider its m nearest samples in the corresponding cluster when calculating intra- and inter-cluster distances am and
bm as given below:
am =
1
|Nm(X, Ck)|
(cid:88)
(cid:107)X − X (cid:48)(cid:107)2
2,
X (cid:48)∈Nm(X,Ck)
bm = min
i(cid:54)=k
1
|Nm(X, Ci)|
(cid:88)
(cid:107)X − X (cid:48)(cid:107)2
2,
(25)
X (cid:48)∈Nm(X,Ci)
where Nm(X, Ck) indicates the set of m nearest neighbors of X in cluster Ck. Then, the clustering consistency in our
variant Silhouette index is calculated as sm = |bm−am|
max(am,bm) . The average score Sm of all samples is used to measure the
overall clustering consistency. Note that when m ≥ maxCk∈C |Ck|, the variant Sm is identical to the original Silhouette
index, i.e., Sm = S.
Focusing on m closest samples allows us to effectively evaluate pattern consistency in non-convex and irregularly
shaped clusters. Nonetheless, when multiple temporal patterns are put into the same cluster, Sm may still generate a
high score due to the focus on local similarity. To address this issue, we use another connectivity-based metric P m to
evaluate the purity of a cluster in terms of temporal patterns. Consider a cluster Ck, a connectivity graph over time-series
in Ck can be derived via m-nearest neighbor discovery. We use the count pk of connected subgraphs to estimate the
number of temporal pattern included in cluster Ck and calculate the temporal pattern purity via P m = 1
1
.
pk
K
It is clear that P m = 1 when m is sufficiently large and each cluster only contains a single temporal pattern, and
P m = 1
K
1
|Ck| when m = 0.
Ck∈C
Ck∈C
(cid:80)
(cid:80)
21
T-Phenotype
To get an overall assessment of cluster consistency, we normalize Sm into [0, 1] and calculate the summary metric
AUSIL as the area under the curve of Sm verses P m for m = 1, 2, . . . , M, M ∈ N. For the evaluation of phenotype
discovery, we combine the prediction accuracy (AUROC and AUPRC) and cluster consistency (AUSIL) into two
composite metrics HROC and HPRC. Similar to the F1-score in classification, these composite metrics are defined
respectively as
HROC (cid:44) 2
AUROC * AUSIL
AUROC + AUSIL
, HPRC (cid:44) 2
AUPRC * AUSIL
AUPRC + AUSIL
.
(26)
E HYPERPARAMETER SELECTION
In the experiment, T-Phenotype, KM-E2P(y), KM-E2P(z) are implemented with PyTorch and are trained with learning
rate of 0.1 in 50 epochs. AdamW optimizer is used to tune the network parameters. The K-means clustering in
KM-E2P(y), KM-E2P(z) and KM-DTW is performed with K-means++ initialization based on implementation in
PyClustering.7 The baselines of AC-TPC and SEQ2SEQ are implemented in TensorFlow. They are trained with Adam
optimizer with training epochs set to 200 due to different learning rates in their implementation.
We perform hyperparameter selection on each dataset via 3-fold cross-validation. For T-Phenotype, the best hyperparam-
eters of the Laplace encoders are searched to minimize the average reconstruction error over all temporal dimensions.
For each real-world dataset, the best number of clusters K is searched via maximizing the composite metric HPRC
of T-Phenotype. The selected best cluster number K is used for all baselines on the same dataset. For baselines of
KM-E2P(y) and KM-E2P(z), the hyperparameters for each dataset are search to maximize HPRC (or purity score on
the synthetic dataset) given the selected cluster number K. The hyperparameters of AC-TPC and SEQ2SEQ are set to
be the same with the original implementation in (Lee and van der Schaar, 2020) (dropout layers are disabled to ensure
reproducibility). The hyperparameter space considered in our experiment is discussed as follows.
E.1 Hyperparameter Selection of T-Phenotype
In the experiment, each Laplace encoder fL in T-Phenotype contains a 1-layer GRU and a 1-layer
Laplace Encoder.
MLP with 10 hidden units in each layer. Given a time-series input, each Laplace encoder generates an embedding with
n = 4 poles and maximum degree of d = 1. As mentioned earlier, coefficient α2 for regularization term ldistinct is set
to 0.01 throughout the experiment. The rest hyperparameters are searched in the parameter space as follows.
• Coefficient for pole separation loss lsep: α ∈ {1.0, 10.0}.
• Coefficient loss lreal: α1 ∈ {0.1, 1.0}.
• Threshold for pole sorting and the separation loss: δpole ∈ {1.0, 2.0}.
To address the complex temporal patterns in the ICU dataset, the maximum degree of poles d is also added to the search
space, and the range of d ∈ {1, 2} is considered. The best hyperparameter for Laplace encoder on the three datasets are
given as follows.
• Synthetic dataset: α = 1.0, α1 = 0.1, δpole = 1.0.
• ADNI dataset: α = 1.0, α1 = 0.1, δpole = 2.0.
• ICU dataset: α = 1.0, α1 = 0.1, δpole = 2.0, d = 2.
Predictor. The predictor fP is composed of a 3-layer MLP with 10 hidden units in each layer.
Cluster Number K. The best number of K for each dataset is selected based on the optimal Laplace encoder and
predictor structures selected above. We use the ground truth cluster number K = 3 for the synthetic dataset. For the
two real-world datasets, the cluster number is searched among K ∈ {2, 3, 4, 5} to maximize the composite clustering
performance HPRC. The optimal cluster number selection result is given below.
• Synthetic dataset: K = 3 (we directly use the ground truth).
• ADNI dataset: K = 4.
• ICU dataset: K = 3.
7https://pyclustering.github.io/
22
T-Phenotype
E.2 Hyperparameter Selection of Baselines
KM-E2P(y). The KM-E2P(y) model includes a 1-layer GRU network to extract temporal features from input time-
series. A 2-layer MLP is stacked on top of the GRU network to form an encoder. Given the encoder output, another
2-layer MLP is used to predict the categorical label y. All layers in the GRU and MLP share the same number h
of hidden units. Hyperparameters of h ∈ ×{5, 10, 20} is searched in each dataset basedd on the corresponding K
determined above. By maximizing the composite metric HPRC or purity score, the hyperparameter selection result is
obtained as follows.
• Synthetic dataset: h = 20.
• ADNI dataset: h = 20.
• ICU dataset: h = 20.
KM-E2P(z). Similar to KM-E2P(y), the KM-E2P(z) model is composed of a encoder with 2-layer MLP on top of a
1-layer GRU network to extract temporal features from input time-series. The encoder outputs a r-dimension latent
vector, which is then used by a 2-layer MLP-based predictor for label prediction. All layers in the GRU and MLP share
the same number h of hidden units. Given the best cluster numbers of K found by T-Phenotype, on each dataset, the
optimal combination of h and r are search in the space of (h, r) ∈ {10, 20} × {5, 10, 20} to maximize the composite
metric HPRC or purity score when ground truth cluster label is available. The hyperparameter selection result is given
as follows.
• Synthetic dataset: h = 10, r = 10.
• ADNI dataset: h = 10, r = 20.
• ICU dataset: h = 20, r = 10.
KM-L. The baseline KM-L simply shares hyperparameters with T-Phenotype for its Laplace encoders on each
dataset.
F COMPLETE BENCHMARK RESULT
The complete benchmark result on synthetic dataset is shown in Table F.1. T-Phenotype has significantly better
clustering performance (purity score, adjusted Rand index, normalized mutual information) over all baselines on the
synthetic data. In the meantime, the advantage of T-Phenotype over other baselines (except for AC-TPC) is clearly
demonstrated via the proposed phenotype discovery performance metrics of HROC and HPRC. An extra baseline
of KM-Laplacian (K-means on graph Laplacian calculated via dynamic time warping) is included in Table F.1 for
reference. We note that this method has two major drawbacks: 1) there is not a stable and consistent representation
space for cluster assignment for new samples; and 2) the distance matrix computation complexity in dynamic time
warping could be extremely high, which makes this baseline infeasible for the two real-world datasets.
Table F.1: Complete Benchmark Result on the Synthetic Dataset.
METHOD
AUROC
AUPRC
PURITY
RAND
NMI
HROC
HPRC
KM-E2P(y)
KM-E2P(z)
KM-DTW
KM-Laplacian
KM-L
SEQ2SEQ
AC-TPC
0.973±0.014
0.963±0.012
0.722±0.033
0.736±0.024
0.646±0.030
0.507±0.028
0.966±0.012
0.962±0.019
0.948±0.011
0.649±0.028
0.663±0.017
0.593±0.027
0.505±0.014
0.952±0.017
0.663±0.019
0.677±0.029
0.469±0.017
0.490±0.021
0.687±0.033
0.378±0.008
0.659±0.020
0.477±0.033
0.418±0.024
0.068±0.021
0.086±0.011
0.395±0.058
-0.003±0.003
0.487±0.035
0.569±0.045
0.485±0.047
0.077±0.022
0.094±0.010
0.447±0.059
0.005±0.003
0.596±0.043
0.846±0.012
0.879±0.011
0.787±0.020
0.797±0.016
0.735±0.020
0.630±0.022
0.931±0.011
0.842±0.010
0.873±0.009
0.742±0.019
0.752±0.013
0.700±0.017
0.628±0.011
0.925±0.014
T-Phenotype (J)
T-Phenotype
0.967±0.020
0.975±0.013
0.954±0.025
0.960±0.024
0.655±0.021
0.965±0.018‡
0.440±0.051
0.902±0.048 ‡
0.543±0.064
0.875±0.050‡
0.845±0.064
0.927±0.010
0.840±0.064
0.920±0.014
Best performance is highlighted in bold. Symbol ‡ indicates p-value < 0.01
The complete benchmark result on two real-world datasets is provided in Table F.2. T-Phenotype in general has
the best (or second best) phenotype discovery performance (HROC and HPRC) while achieving high accuracy in
outcome prediction (AUROC and AUPRC), which demonstrates the prognostic value of the phenotypes discovered by
T-Phenotype.
23
T-Phenotype
Table F.2: Complete Benchmark Result on Two Real-world Datasets.
METHOD
KM-E2P(y)
KM-E2P(z)
KM-DTW
KM-L
SEQ2SEQ
AC-TPC
AUROC
AUPRC
AUSIL
HROC
HPRC
0.893±0.005
0.884±0.012
0.743±0.013
0.697±0.029
0.775±0.023
0.861±0.012
0.728±0.017
0.711±0.020
0.522±0.020
0.465±0.019
0.550±0.030
0.665±0.020
0.677±0.019
0.672±0.028
0.762±0.049
0.820±0.022‡
0.772±0.014
0.726±0.020
0.770±0.013
0.763±0.018
0.752±0.027
0.753±0.019
0.773±0.012
0.788±0.014
0.701±0.012
0.690±0.013
0.618±0.021
0.593±0.018
0.642±0.022
0.694±0.013
T-Phenotype (J)
T-Phenotype
0.867±0.020
0.891±0.005
0.679±0.040
0.716±0.015
0.690±0.007
0.711±0.023
0.768±0.011
0.791±0.013
0.684±0.021
0.713±0.009‡
KM-E2P(y)
KM-E2P(z)
KM-DTW
KM-L
SEQ2SEQ
AC-TPC
0.697±0.014
0.677±0.030
0.539±0.030
0.577±0.019
0.592±0.024
0.660±0.008
0.593±0.012
0.579±0.018
0.515±0.011
0.532±0.009
0.539±0.012
0.573±0.003
0.668±0.046
0.698±0.042
0.786±0.072
0.834±0.024
0.830±0.016
0.735±0.024
0.682±0.029
0.686±0.031
0.636±0.023
0.682±0.009
0.690±0.011
0.695±0.014
0.628±0.025
0.633±0.024
0.621±0.021
0.649±0.004
0.653±0.004
0.644±0.011
T-Phenotype (J)
T-Phenotype
0.697±0.025
0.681±0.017
0.595±0.017
0.585±0.015
0.691±0.091
0.726±0.015
0.691±0.056
0.703±0.007
0.636±0.048
0.648±0.008
I
N
D
A
U
C
I
Best performance is highlighted in bold. Symbol ‡ indicates p-value < 0.01
G FURTHER ANALYSIS ON PHENOTYPE DISCOVERY
Comparison of Cluster Assignments on ADNI Dataset.
On the ADNI dataset, typical phenotypes from KM-
E2P(y), SEQ2SEQ, AC-TPC and T-Phenotype are compared in Figure G.1. Due to the model design, KM-E2P(y) only
focuses on the predicted outcome distribution when discovering phenotypes (as shown in Figure G.1a). Compared to
T-Phenotype, KM-E2P(y) wrongly splits normal patients with the same temporal pattern (stable CDRSB trajectory)
into two clusters under K = 4. Additionally, KM-E2P(y) fails to discover the two subtypes of patients with high-risk
of MCI as illustrated in phenotype 2 and 3 in Figure G.1d. While the SEQ2SEQ method is able to capture temporal
patterns exhibit in patient trajectories, it is incapable to properly associate these temporal patterns with patient outcomes.
For instance, SEQ2SEQ wrongly splits high-risk patients with increasing CDRSB scores over time into two different
subgroups with similar outcome distributions.
As discussed in the main manuscript, AC-TPC aims at discovering the minimum number of clusters that can sufficiently
represent the outcome distribution. Thus, it only identifies three phenotypes under K = 4 and combines the two
subtypes (Phenotype 2 and 3 in Figure G.1d) of MCI patients into the same cluster. In comparison, T-Phenotype
discovers phenotypes based on both predicted outcome and the associated predictive temporal patterns. The two
subgroups of patients with expected diagnosis of MCI are correctly identified by T-Phenotype, which demonstrates the
prognostic value of our method over the considered baselines.
Phenotypes on ICU Mortality. On the ICU dataset, T-Phenotype is applied to identify phenotypes based on the
patient's age, gender, GCS score and the fraction of PaCO2. Three major phenotypes are discovered by T-Phenotype,
and the GCS trajectories of test samples in each subgroup are illustrated in Figure G.2. Based on the stability of their
GCS trajectory, patients in each phenotype are plotted separately in two subfigures. The GCS score is predictive of
patient mortality after ICU discharge (Leitgeb et al., 2013) and shows good discrimination accuracy on high- and
low-risk patients admitted to ICU (Bastos et al., 1993). The predicted mortality rates in phenotypes 1, 2 and 3 are
15.3%, 3.2% and 32.4%, respectively. The GCS levels of patients in the three subgroups manifest a clear association
to their corresponding mortality risks. For instance, many patients of phenotype 3 had lower GCS score (below 10)
than the two other subgroups. In contrast, while having higher GCS levels, many patients in Phenotype 1 and 2 had an
increase pattern (as shown in Figure G.2b) in their recent GCS measurements, which potentially contributes to their
decreased risks of death. In the meantime, age is reported to be another risk factor for ICU mortality (Blot et al., 2009;
Haas et al., 2017). With the average patient age of 63.0 (IQR: 53.0 – 76.0), 43.0 (IQR: 29.8 – 55.3) and 70.6 (IQR: 62.0
– 82.0) in the three identified subgroups, phenotype 1 and 2 are clearly separated.8
8Interquartile range (IQR) is the range defined by 25% and 75% quantiles of a variable.
24
T-Phenotype
(a) Four phenotypes from KM-E2P(y).
(b) Four phenotypes from SEQ2SEQ.
(c) Three phenotypes from AC-TPC.
(d) Four phenotypes from T-Phenotype.
Figure G.1: Comparison of Phenotypes Discovered on the ADNI Dataset.
25
T-Phenotype
(a) Patients with stable (std < 1) GCS trajectories.
(b) Patients with less stable (std ≥ 1) GCS trajectories.
Figure G.2: Three Phenotypes Discovered by T-Phenotype on ICU Dataset. The GCS trajectory of patients with different
phenotypes are illustrated in the considered time period. All trajectories start at t = 0 and are smoothed with a rolling window of
size 5.
26
|
|
http://arxiv.org/abs/2302.12617v1 | 2023-02-24T13:26:03 | 2023-02-24T13:26:03 | Leveraging Jumpy Models for Planning and Fast Learning in Robotic
Domains | In this paper we study the problem of learning multi-step dynamics prediction
models (jumpy models) from unlabeled experience and their utility for fast
inference of (high-level) plans in downstream tasks. In particular we propose
to learn a jumpy model alongside a skill embedding space offline, from
previously collected experience for which no labels or reward annotations are
required. We then investigate several options of harnessing those learned
components in combination with model-based planning or model-free reinforcement
learning (RL) to speed up learning on downstream tasks. We conduct a set of
experiments in the RGB-stacking environment, showing that planning with the
learned skills and the associated model can enable zero-shot generalization to
new tasks, and can further speed up training of policies via reinforcement
learning. These experiments demonstrate that jumpy models which incorporate
temporal abstraction can facilitate planning in long-horizon tasks in which
standard dynamics models fail. | [
"Jingwei Zhang",
"Jost Tobias Springenberg",
"Arunkumar Byravan",
"Leonard Hasenclever",
"Abbas Abdolmaleki",
"Dushyant Rao",
"Nicolas Heess",
"Martin Riedmiller"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12617v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12617v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.RO",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.RO",
"cs.AI",
"cs.LG"
] | 2023-2-27
Leveraging Jumpy Models for Planning and
Fast Learning in Robotic Domains
Jingwei Zhang1, Jost Tobias Springenberg1, Arunkumar Byravan1, Leonard Hasenclever1, Abbas
Abdolmaleki1, Dushyant Rao1, Nicolas Heess1 and Martin Riedmiller1
1DeepMind
3
2
0
2
b
e
F
4
2
]
O
R
.
s
c
[
1
v
7
1
6
2
1
.
2
0
3
2
:
v
i
X
r
a
In this paper we study the problem of learning multi-step dynamics prediction models ( jumpy models)
from unlabeled experience and their utility for fast inference of (high-level) plans in downstream tasks.
In particular we propose to learn a jumpy model alongside a skill embedding space offline, from previ-
ously collected experience for which no labels or reward annotations are required. We then investigate
several options of harnessing those learned components in combination with model-based planning or
model-free reinforcement learning (RL) to speed up learning on downstream tasks. We conduct a set of
experiments in the RGB-stacking environment Lee et al. (2022), showing that planning with the learned
skills and the associated model can enable zero-shot generalization to new tasks, and can further speed
up training of policies via reinforcement learning. These experiments demonstrate that jumpy models
which incorporate temporal abstraction can facilitate planning in long-horizon tasks in which standard
dynamics models fail.
Keywords: jumpy models, skill embedding, model-based planning
Introduction
From daily interactions with the world, humans gradually develop an internal understanding of which
series of events would be triggered when a certain sequence of actions is taken (Hogendoorn and
Burkitt, 2018; Maus et al., 2013; Nortmann et al., 2015). This mental model of the world can serve as
a compact proxy of our previous experiences and help us plan out routes to desired goals before taking
action (Ha and Schmidhuber, 2018). Studies have further implied that these mental predictive models
might not be restricted to the level of primitive actions (Botvinick, 2008; Consul et al., 2022), but
rather consider predictions over larger timescales that abstract away detailed behavior consequences,
which can enable efficient long-horizon planning to guide our daily decision making.
When developing intelligent artificial agents it is therefore natural to imagine a similar process
being useful for learning and transferring abstract models of the world across streams of experiences
and tasks. We expect such a temporally abstract model of actions and dynamics to be significantly more
useful than a simple one-step prediction model (together with primitive policies) when transferring
them to a target task. This is because they should allow us to rapidly plan over long trajectories (to
find some states with high rewards) while alleviating the common problem of error accumulation
that occurs when chaining one-step prediction models which limits the effective planning horizon in
most existing methods, e.g. (Byravan et al., 2020; Finn and Levine, 2017; Hafner et al., 2019a).
When learning a temporally abstract model to predict the consequences of action sequences,
ideally, we might expect to train multi-step models that predict the (distribution of) ending states
of arbitrary open-loop action sequences. However, the number of possible action sequences grows
exponentially in the planning horizon, while most such sequences lead to uninteresting behavior. At
the same time the number of representative distinct action sequences that can be extracted from an
offline dataset of interesting behaviour (i.e. a dataset stemming from executing explorative policies)
Corresponding author(s): [email protected]
© 2023 DeepMind. All rights reserved
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
is potentially much smaller. As a result a sensible approach then is to focus on learning jumpy models
only for those action sequences (or skills) which occur frequently in observed trajectories and are
therefore more likely to be generally useful and transferable across tasks Hasenclever et al. (2020);
Liu et al. (2022); Lynch et al. (2020); Merel et al. (2018, 2020).
In this paper we are interested in studying one approach that can be seen as a first step in this
direction: learning multi-step (jumpy) dynamics prediction models together with temporally abstract
skills. We will investigate this proposal by following a two-stage approach: Phase-1: offline learning
of a jumpy model and multi-step skills based on (unlabeled) experience collected via some exploratory
policies; followed by Phase-2: online reinforcement learning, or planning, utilizing the learned jumpy
model and skills to speed up learning on a target task. We note that this setting is different from
offline policy learning (Gulcehre et al., 2020; Levine et al., 2020; Wang et al., 2020) which requires
offline data to contain transitions and rewards from agents attempting to solve the task at hand.
We here assume no existence of rewards for the offline data, but only assume that the behaviour
contained in the data set covers the parts of the state-space relevant for the downstream / target task.
In this paper, we thus propose to learn both a continuous skill embedding space (representing
different action sequences) and a jumpy prediction model that predicts the consequences of choosing
actions according to a skill. With these components learned, we study several ways of utilizing them
to solve designated tasks downstream, ranging from zero-shot transfer with model-based planning to
learning from scratch with model-free reinforcement learning (RL). We validate our approach in a set
of experiments and show that the proposed method can enable zero-shot generalization to new tasks
with jumpy planning and the learned skill embedding as well as that jumpy planning outperforms
planning over primitive actions for the tasks we consider.
Related work
Previous works have looked into training action-conditioned one-step transition models in various
contexts. In the setting of model-based reinforcement learning, there is literature that use the learned
models as differentiable environment simulators through which the gradients of the expected return
can directly pass Byravan et al. (2020); Hafner et al. (2019a, 2020); Heess et al. (2015); Sanchez-
Gonzalez et al. (2018). This leads to low-variance gradients for updating the parameterized policy.
Another model-based direction leverages conducting planning with learned models, during which the
predictive models are iteratively rolled out to generate imaginary trajectories. This literature ranges
from the early work of Dyna (Sutton, 1991) where planning is used to facilitate policy/value function
learning to methods that use learned models for decision-time planning Ebert et al. (2018); Finn
and Levine (2017); Hafner et al. (2019b); Nagabandi et al. (2020); Sanchez-Gonzalez et al. (2018).
There also exist algorithms like MuZero (Schrittwieser et al., 2020) that integrate planning in both
training and inference time. In Byravan et al. (2021), besides conducting model-predictive control
(MPC) with a learned model, they additionally study the influence of a learned action proposal policy
for planning, trained off the data generated with planning in the loop. Their experiments on transfer
and generalization show reasonable gains in data efficiency brought about by the learned model,
which might be further improved with a bigger search budget.
Existing work in model-based approaches typically learn one-step transition models and plan with
a relatively short horizon (e.g. less than 10 timesteps). This is to reduce computational cost as well
as to avoid large compounding errors in planning. This limits the use of learned one-step models
for long-horizon tasks. Therefore, instead of learning predictive models for single step transitions
conditioned on primitive actions, learning multi-step models could possibly ameliorate this issue Liu
et al. (2020). Our work can be understood as taking a step in this direction where predictive models
2
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
are trained to work on larger timescales, thus could potentially avoid modelling high frequency noises
and oscillations, while focusing on longer lasing trends that model higher-level behavior patterns.
As discussed in the introduction, in order to make it feasible to learn jumpy predictions, we would
need to target modelling multi-step transitions of only the most common action sequences in a dataset.
I.e. we would have to condition our model on the types of action sequences/policies we are interested
in, possibly by using a 'latent' conditioning vector that summarizes the behavior in a given trajectory
snippet. A number of approaches for extracting temporally abstract skills exist in the literature.
Neural probabilistic motor primitives (NPMP) (Merel et al., 2018) compresses an expert dataset of
humanoid control by encoding trajectory snippets into a continuous latent space of motor intentions
and learn a skill conditioned policy by decoding actions from pairs of skills and states. To encourage
temporally correlated latent skills to be nearby in the latent embedding space, an auto-correlated
prior is enforced. Since NPMP does not train a model of the learned latent skills, an RL agent is trained
over the skill space in order to perform new tasks. Play-supervised latent motor plans (Play-LMP)
(Lynch et al., 2020) also learns a continuous skill embedding space from human teleoperated play
data. They follow a slightly different setup from NPMP in that their skill policy is goal-conditioned.
Additionally, they learn a plan recognition module that encodes trajectories into latent skills and a
plan proposal module that encodes pairs of starting and goal states into skills and at the same time
minimizes the KL-divergence between the plan recognition and the plan proposal. Similarly, there
exists work on extracting discrete options from offline data (representing multi-task data with a
'mixture of skills' approach) (Wulfmeier et al., 2021) as well as approaches that combine discrete and
continuous abstractions (Rao et al., 2021); since skill models are not learned during skill extraction,
they do not directly support zero-shot generalization/transfer with hierarchical planning. For skill
extraction approaches that also consider skill model learning, Salter et al. (2022) builds on Wulfmeier
et al. (2021) and additionally learns option models to encourage the extraction of predicable options.
While the extracted options could be beneficial for planning, they do not investigate in this regard.
The follow-up work to Lynch et al. (2020), broadly-exploring local-policy trees (BELT) (Sermanet
et al., 2021) is most relevant to our work. They build on the skill embedding from Play-LMP and
additionally learn skill-conditioned prediction models to be used in a rapid-exploring random tree
(RRT) style planning procedure. In contrast to this, our approach learns the skill embedding and its
corresponding model in parallel (rather than separating out model and skill learning), additionally
we do not follow a goal-conditioned formulation and rely on less involved planning procedures.
The aforementioned methods focus on learning reusable skills form offline data. In the online
(reinforcement) learning setting, the agent has to to learn skills via active interactions with the
environment, which brings with it the exploration problem of discovering skills in the first place. Under
multi-task/goal scenarios Teh et al. (2017), Galashov et al. (2019); Goyal et al. (2019); Tirumala et al.
(2020) impose a form of information asymmetry between agent policy and an additionally learned
default policy, such that the latter is enforced to represent reusable behaviors across related tasks,
without access to goal/task-specific information. These methods generally encourage exploration
by injecting entropy regularization to the optimization objective or when latent variables are used
to represent the behavioral context Goyal et al. (2019), adding exploration bonus using the KL-
divergence between the encoder that encodes the latent from state and goal versus one that encodes
from the state only. There are also methods like Heess et al. (2016); Peng et al. (2017) that learn
two level control hierarchies that besides information asymmetry, also impose control rate asymmetry
to the different levels of controllers. In the case of unsupervised skill discovery in the absence of
rewards/tasks, there is a line of research basing on empowerment maximization Salge et al. (2014).
These methods train agents by maximizing the intrinsic reward of empowerment, which is the mutual
information (MI) between a sequence of actions and the final state reached, conditioned on a starting
state. Discovering skills via maximizing empowerment means finding the set of skills with which the
3
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
Figure 1 | Schematic plot of the proposed architecture, with the top row showing the encoder and the bottom
the action decoder (low-level policy) and the jumpy state decoder (jumpy model).
number of reliably reachable distinct final states is maximized. Variational information maximisation
(Mohamed and Jimenez Rezende, 2015) proposes a scalable approach to approximate empowerment
with variational inference and function approximation, but their approach operates with open-loop
action sequences which can be very restrictive and can lead to underestimation of empowerment
(Gregor et al., 2016). Variational intrinsic control (VIC) (Gregor et al., 2016) instead learns closed-
loop option/skill-conditioned policies and show improved performance. Dynamics-aware discovery of
skills (DADS) (Sharma et al., 2020) differs from previous methods as it uses the model-based version
of MI in which it learns the skill dynamics, predicting the distribution of next state given the current
state and a skill. This skill conditioned one-step transition model enables planning to be conducted
for new tasks. Contrastive intrinsic control (CIC) (Laskin et al., 2021) proposes a new estimator for
MI that improves on generating diverse behaviors as well as discriminating different skills. In order
to separate out the concern of exploration, in this work we aim to extract skills from offline datasets
before using them for a target task.
Methods
We consider learning from offline data. In particular, the offline dataset D contains M trajectory
snippets of the form τm = {st, at, * * * , st+K−1, at+K−1, st+K } with states s ∈ S and actions a ∈ A, where K
controls the context length. All trajectories are collected within the same environment with initial
state distribution p(s0) and transition dynamics p(st+1 | st, at), with each trajectory being collected by
executing a random sequence of pre-specified basic exploration policies1.
Our method then operates in two phases: 1) a learning phase in which we learn a jumpy model and
skill embedding from the offline dataset; and 2) a harnessing phase where the extracted components
act as compact representations of the offline dataset to solve designated tasks.
Phase-1 - Learning: Extracting Low-level Policy and Jumpy Model
This phase aims to learn a skill embedding space along with a jumpy model from the offline dataset,
for which we propose a VAE-style architecture (Kingma and Welling, 2013) composed of an encoder
and two decoders (Figure 1).
As shown in the top row of Figure 1, the proposed approach takes as input the states contained in
trajectory snippets of length K + 1: st:t+K = {st, st+1, * * * , st+K }. These states are first mapped through
the same set of parameters φ of a fully connected network into state features φt:t+K (shorthanded for
1Two exploration policies are randomly selected per episode, each running for 200 steps, more details in experiments.
4
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
{φ(st), * * * , φ(st+K)}); applying the same transformation to all states within a snippet means that the
extracted features are expected to only capture information that are indicative of inferring the high
level trend within the snippet, but not necessarily those that are specific to each corresponding timestep.
These K + 1 state features are then encoded together into a continuous latent code zt ∼ q(zt | φt:t+K; θz)
by an encoder parameterized by θz.
The decoder network consists of an action decoder (parameterized by θa) and a jumpy state
decoder (parameterized by θs). Concatenating each state feature with the latent code zt, the ac-
tion decoder learns to predict each corresponding immediate action by maximizing the likelihood
(cid:206)K−1
p(at+k | φt+k, zt; θa). The jumpy state decoder takes in zt and the feature of the first state within
k=0
the snippet φt and from those predicts the state that is K steps ahead: p(st+K | φt, zt; θs). Jointly
learning to decode the jumpy state and the low-level actions from the latent code zt ensures that the
latent encodes relevant information for predicting both; if only the skill-conditioned action decoder is
learned during training while its corresponding model is learned afterwards, or vice versa, it is likely
that the information contained in the learned latent encoding would not be sufficient, as inferring the
immediate action and inferring the jumpy state should likely require different sets of cues.
The latent z space can be interpreted from two perspectives, on the one hand it encodes skills
while on the other it encodes effects. Firstly, the resulting action decoder could be deployed as
a latent-conditioned low-level (LL) policy, therefore the latent z's can be interpreted as skills or
high-level (HL) actions (Lynch et al., 2020; Merel et al., 2018) that encode different behavior modes;
in turn, the jumpy state decoder could be viewed as predicting the state that would be reached in K
steps when following a certain latent skill. Alternatively, if we first consider the jumpy model that
uses z to decode jumpy states, then the latent z space could be understood as the embedding space
that encodes the effect (Whitney et al., 2019) or change that could be brought about to the state
with a K-step horizon; in this case the action decoder could be seen as the policy that would lead
to the desired effect or change indicated by z. These two interpretations are complementary in the
sense that the former one is looking at the cause while the latter one focuses on the effect.
The overall loss for learning the encoder and the two decoders is
L (φ, θz,θa, θs) =
E
{st,at,*** ,st+K }∼D
(cid:104)
DKL
(cid:0)q(zt | φt:t+K; φ, θz) (cid:107) N (0, I)(cid:1)
− βa
K−1
∑︁
k=0
log p(at+k | φt+k, zt; φ, θa) − βs p(st+K | φt, zt; φ, θs)
(cid:105)
,
(1)
(2)
which amounts to minimizing the KL-divergence between the variational posterior and a standard
normal prior while maximizing the log-likelihood of the action and jumpy state predictions (I denotes
the identity matrix, βa, βs are loss coefficients). We note that in all experiments we assume isotropic
normal distributions for both decoders so minimizing the negative-log-likelihood terms in Eq.(2)
reduces to minimizing L2 losses.
One important detail to note is that since the ranges of raw state values vary much in scale, we
find it helpful to interpret the state decoder predictions as state deltas ˆst+K − st and normalized within
[−1, 1], which are then scaled back to the original range and added onto st to recover the predicted
jumpy states.
Phase-2 - Harnessing: Utilizing Learned Components
Once the initial learning phase is completed, the resulting components, namely the encoder that
learns a continuous embedding space of high-level (HL) skills, as well as the skill-conditioned low-level
(LL) policy and its jumpy model, can be harnessed to fulfill a given task. There exist multiple options
5
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
to accomplish a designated task ranging from zero shot transfer (by planning with the learned model
and executing the low-level skills for a new reward) to model-free or model-based RL to derive a new
policy for the target task. We can differentiate the possible options by varying: 1) how we obtain
the latent embedding z used by the dynamics and skill modules, 2) whether we use the learned
low-level (LL) action module or learn a new policy from scratch, 3) whether we use the learned
dynamics model to plan for a better z for a given state s at action selection time. We consider multiple
variations along these axes which are summarized in Table 1. We name each variation according to
their interpretation:
The first option, "Random-HL", is not a practical option but listed for ease of discussion. This
is a method that only makes use of the learned LL policy but not the learned jumpy model. Here a
HL skill zt is simply sampled from the standard normal prior. Then, conditioning on the sampled
zt, a LL action can be selected using the learned skill-conditioned LL policy to be executed in the
environment. Since task information is not incorporated in any of the procedures of "Random-HL", it
is not expected to be able to accomplish given tasks. Instead we expect it to reproduce snippets of
behaviour present in the dataset we used for training in phase-1.
For "Zero-shot via Planning", the proposals for zt are also sampled from the standard normal
prior. But before feeding the sampled z's as conditioning to the LL policy, the proposals are first
refined for the given task at hand (as specified by a reward function R(st) ∈ R) via model-based
planning using the pretraind jumpy model. We use model-predictive control (MPC) with cross-entropy
methods (CEM) and outline the planning procedure in Algorithm 1. Within each CEM iteration during
planning, N samples of imaginary trajectories will be rolled out from the current state st. Each of
the sampled trajectories involves H iterative predictions of the next jumpy state from the previously
predicted one using the jumpy model and conditioning on the proposed latent skill, with the final
predicted state H * K timesteps ahead of st. Each of those N rollouts will be evaluated according to a
scoring function based on the task reward:
Score({st, st+K, * * * , st+H *K }) =
H
∑︁
h=0
γh
K R(st+h*K),
(3)
where γK is the discount factor that operates on K-step intervals and R(*) is the reward function that
defines the designated task. The top ranked samples will be used to update the skill proposal policy,
and the best sample resulting from the last CEM-iteration will be returned. Then the first latent skill z
contained in this best plan will be used in the learned LL policy to obtain an action at ∼ p(* | st, zt). 2
2The appendix (Table 4) contains additional results where we vary the planning horizon H and the number of steps the
selected z is kept fixed for executing LL actions.
Propose HL Refine HL with Planning
Random-HL
Zero-shot via Planning
RL-HL
RL-HL + Planning
RL-HL + Planning + Finetune
RL-from-scratch
N (0, I)
N (0, I)
π(zt | st)
π(zt | st)
π(zt | st)
π(zt | st)
π(zt | st)
π(zt | st)
π(zt | st)
π(zt | st)
π(zt | st)
p(st+K | st, zt)
p(st+K | st, zt)
p(st+K | st, zt)
(cid:101)
LL
p(at | st, zt)
p(at | st, zt)
p(at | st, zt)
p(at | st, zt)
p(at | st, zt)
π(at | st)
π(at | st)
π(at | st)
Table 1 | Different ways of harnessing learned components from phase-1 in phase-2. Methods are categorized
by how the high-level (HL) skills are proposed, whether the proposed HL skill is refined with model-based
planning facilitated by the learned jumpy model, and how the low-level (LL) action is selected. Methods
ranging from zero-shot to learning from scratch are listed from top to bottom. Components that need to be
learned from scratch in phase-2 are marked in bold, those that need to be finetuned are marked with tilde, all
other components are either learned in phase-1 and can be directly deployed or do not require any learning.
6
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
Algorithm 1: CEM-MPC with Jumpy Model
Input: st: current state; p0 (z | s): initial skill proposal policy; p(st+K | st, zt): the learned jumpy model;
Score(*): trajectory scoring function.
Output: zt: the next latent skill to follow.
Parameter : I: number of CEM iterations; N: number of samples; H: planning horizon; η: elite
fraction.
1 for i ← 0 to I − 1 do
plans = [ ]
2
scores = [ ]
for n ← 0 to N − 1 do
4
3
ˆst = st
plann = [ ]
tra jector yn = [ˆst]
for h ← 0 to H − 1 do
ˆzt+h*K ∼ pi (* | ˆst+h*K)
ˆst+(h+1) *K ∼ p(* | ˆst+h*K, ˆzt+h*K)
plann.append(ˆzt+h*K)
tra jector yn.append(ˆst+(h+1) *K)
end for
plans.append( plann)
scores.append(Score(tra jector yn))
// Sample latent skill from proposal.
// Rollout jumpy model.
end for
Rank plans by their scores and retain the top η * N.
Update skill proposal policy to pi+1 (z | s) using the statistics of the top η * N plans.
18
19 end for
20 return First latent skill of the highest scored plan in plans
5
6
7
8
9
10
11
12
13
14
15
16
17
We note that this "Zero-shot via Planning" procedure is a zero-shot method for accomplishing a given
task assuming knowledge of the reward function. Here the HL skill is proposed from the standard
normal prior, and the planning only utilizes the jumpy model and the LL policy which are both learned
in phase-1 from offline data. We also note that throughout our experiments, the planning procedure
contains only 1 CEM-iteration which essentially reduces to random shooting.
"RL-HL" is similar to "Random-HL" in that it also does not involve planning. However, instead of
directly using the prior as the HL proposal, it learns a skill proposal policy using model-free RL (here
we use DMPO Abdolmaleki et al. (2018)) with the skill embedding z-space as its action space. This
gives a RL-learned high level policy π(zt | st), which together with the low-level policy p(at | st, zt)
learned during phase-1, can output primitive actions. This is a common setup for reusing pretrained
low-level skills in a model-free setting Liu et al. (2020); Merel et al. (2018).
"RL-HL + Planning" is similar to "Zero-shot via Planning" as it also uses the planning procedure
outlined in Algorithm 1 to refine proposed HL skills before feeding them to the LL policy. But instead
of getting the proposals from the prior, it learns a proposal π(zt | st) the same way as in "RL-HL". We
note that in this case the data filling the replay buffer used for RL training in phase-2 is generated by
the planning procedure, which means that the HL policy is trained off-policy using the data collected
from executing the planning procedure (this use of a planner as a policy is similar to (Byravan et al.,
2021; Springenberg et al., 2020)).
Another variation from this setup, "RL-HL + Planning + Finetune" additionally finetunes the
jumpy model parameters (θs) alongside learning a HL proposal policy, again using the data collected
by executing MPC plans derived with the full planning procedure. The motivation for this is that
when the jumpy model is trained in phase-1, it has only seen data distribution from the offline dataset,
7
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
which might greatly differ from the state distribution induced by the planner on the target task.
Therefore further finetuning the jumpy model on the planned data could potentially make the model
and the deployed policy more consistent.
Lastly, "RL-from-scratch" makes use of neither the learned jumpy model nor the LL policy but
learns a policy π(at | st) from scratch with model-free RL (DMPO) on the primitive action space.
Experiments
We conducted a set of experiments with data collected from the RGB-stacking environment Lee et al.
(2022) with a Sawyer robot arm simulator and a triplet of objects of color red, green and blue. To
collect the offline dataset D, we first select several 'base' policies for data collection that were trained
with simple hand coded rewards (moving the arm along x, y or z axis in 3D-space, opening/closing the
fingers), or have been previously trained to perform a certain more complex movement (i.e. reaching
one of the objects, lifting them, or hovering one object over another object). The complete set of base
policies we use for data collection is given in Table 2. We collect data by selecting 2 base policies at
random per episode, each of them being executed for 200 timesteps, one after the other. All episodes
collected this way make up our offline dataset D3 for phase-1.
The states and actions in the environment are continuous, with the state being 86-dimensional
and the action 5-dimensional. The context length K is set to 10. The state feature embedder
(parameterized by φ) contains three linear layers of size (256, 256, 128), with a LayerNorm (Ba
et al., 2016) applied after the first linear layer and an ELU activation after each layer. This gives
state features of size 128. The encoder (parameterized by θz) first aggregates all the state features
φt:t+K within one trajectory snippet with a 1 × 1 convolution over the time dimension followed by
ELU. Then three linear layers of size (256, 256, 64) with ELU activation are applied. This outputs
the mean and standard deviation (each of size 32) of the diagonal gaussian of the latent skill, from
which 32-dimensional z's can be sampled. The inputs to the action decoder are K 160-dimensional
vectors, concatenating each state feature φt:t+K−1 with z, while the jumpy state decoder takes in the
concatenation of φt and z. Both decoders contain four linear layers of size 256 followed by ELU) with
final linear outputs of size 86 and 5 respectively.
After the learning phase is completed, the harnessing phase is carried out in which all variations
listed in Table 1 are tested. We first conduct the evaluation for "Random-HL" and "Zero-shot via
3We note that for practical reasons, instead of storing a large dataset, we generate data on the fly into a small buffer for
training in phase-1.
Base Policy
open_fingers
close_fingers
reach_red
lift_red
red_hover_blue
Behavior
Open the gripper
Close the gripper
Move the gripper to the red object
Lift the red object off the ground
Lift the red object and hover over the blue object
move_pinch_x_inc Move the gripper in the positive x-axis direction
move_pinch_y_inc Move the gripper in the positive y-axis direction
move_pinch_z_inc Move the gripper in the positive z-axis direction
move_pinch_x_dec Move the gripper in the negative x-axis direction
move_pinch_y_dec Move the gripper in the negative y-axis direction
move_pinch_z_dec Move the gripper in the negative z-axis direction
Table 2 | The set of base policies used to generate training data for phase-1. All policies are trained via RL (DMPO
(Abdolmaleki et al., 2018; Hoffman et al., 2020)) with shaped rewards encouraging the desired behaviour.
8
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
(a) Planned score VS. obtained reward during an evaluation episode for the
task of red_hover_green.
(b) Planning procedure visualizations of step 3, 44, 100, 151.
(c) Corresponding
images.
Figure 2 | Visualizations of the "Zero-shot via Planning" procedure for a red_hover_green episode. Fig. 2a plots the planned
score (Eq. 3, γK = 1) against the actual reward obtained per step, with a planning horizon H = 3 (corresponds to 30 steps
in terms of primitive actions with K = 10). Fig. 2b shows the planning procedure for several exemplar steps (left to right,
top to bottom) (corresponding images shown in Fig. 2c). The red and green cube shows the positions for the red and green
object respectively. The sampled plans (N = 1000) are shown as orange (best plan), yellow (worst plan) and grey (other
plans) lines (plotted in terms of the pinch pose). The blue cubes show the actual poses of the pinch.
Planning" as these two methods do not involve any further learning. To further clarify the planning
procedure, we visualize an exemplar evaluation episode of "Zero-shot via Planning" for the task
red_hover_green in Fig. 2.
The red_hover_green task expects the gripper to grasp the red object and hover it over the top
of the green object (note that no such behaviour was present in the training data for phase-1). For
the episode shown in Fig. 2, the planning is configured with the following parameters: planning
horizon H = 3, context length K = 10, number of samples N = 1000 and discount factor γK = 1 for
the scoring function (Eq. 3). This means that each of the 1000 sampled plans involves a sequence of
3 applications of the jumpy model, which corresponds to 30 steps in terms of primitive actions since
each jumpy step predicts the jumpy state that is 10 steps ahead. Those sampled plans are shown in
Fig. 2b as orange (highest scored plans), yellow (lowest scored plans) and grey (all other plans) lines.
The best plan (orange) will be selected, then a primitive action can be obtained using the first latent
skill of that best plan. The actual reward obtained by executing the primitive action is plotted against
9
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
the planned score in Fig. 2a. Since the planned score is calculated on 3 iteratively predicted jumpy
states, it roughly has a scale 3 times of the immediate reward obtained. From the visualised episode,
the best plans points towards the red object at the beginning (first two figures in 2b) since the gripper
needs to first hold the red object in hand; it then directs the gripper towards the green object once
the red object has been grasped and lifted; finally it plans to hover above the green object.
The evaluation results for zero-shot methods over a set of tasks are presented in Table 3. Besides
the zero-shot approaches listed in Table 1: "Random-HL" (presented as an indicator of the difficulty of
each task) and "Zero-shot via Planning" (procedure visualized in Fig. 2 with context length K = 10),
we additionally include the results of "Zero-shot via Planning (not jumpy K = 1)" as an additional
baseline (in which the model is learned on the primitive action scale and thus planning occurs in the
original problem space). For the tasks whose desired behaviors are contained in the training dataset
of phase-1, the scores obtained by the corresponding base policies are also listed. Each configuration
is evaluated with 50 episodes with random seeds, with a maximum number of 400 steps for each
evaluated episode.
For the in-distribution tasks (reach_red, lift_red, red_hover_blue), the jumpy planning ("Zero-shot
via Planning") agent performs very well. We emphasize that although the agent has been trained
on trajectory snippets of these three tasks during phase-1, it was not trained explicitly to solve these
control tasks but was just trained to model the trajectory data derived from executing policies for
these tasks, thus this model seems to exhibit generalization capabilities. It can also be observed that
the non-jumpy planner (K = 1) performs on par with the jumpy (K = 10) version in the simplest
in-distribution task reach_red and on the simpler reach_green and lift_green out of distribution tasks,
we hypothesize that this is due to the fact that long horizon planning is not critical for completing
this simple task (and relatively greedy reward maximization can be competitive). However, it can be
observed that the non-jumpy K = 1 configuration performs poorly on most of the out-of-distribution
tasks. In contrast, the jumpy planning agent ("Zero-shot via Planning") is able to solve all out-of-
distribution tasks except the lift_green task (which could be due to the fact that none of the episodes
in the training data in phase-1 contains trajectories where the gripper has the green object in hand,
therefore the imaginary rollouts planned by the jumpy model could hardly lead to states where this
task could be accomplished). This clearly demonstrates the utility of jumpy-planning. Overall our
results validate that the learned components from phase-1, namely the latent skill embedding space,
the latent conditioned LL policy and its jumpy model, could facilitate the "Zero-shot via Planning"
agent to solve these tasks zero-shot without the need for additional finetuning/learning. The appendix
contains further evaluation results (Table 4,5).
reach_red
lift_red
red_hover_blue
red_stack_blue
red_hover_green
red_stack_green
bring_red
reach_green
lift_green
Random-HL
70.91 ± 124.06
15.63 ± 27.28
13.90 ± 20.53
8.25 ± 12.20
13.08 ± 20.00
7.80 ± 12.98
15.26 ± 27.09
36.01 ± 51.38
12.95 ± 15.30
Zero-shot via Planning
(jumpy)
373.78 ± 27.99
307.52 ± 65.97
278.66 ± 60.88
169.98 ± 61.86
266.28 ± 79.53
162.75 ± 73.69
225.97 ± 83.76
241.41 ± 104.34
59.75 ± 26.74
Zero-shot via Planning
(not jumpy, K=1)
375.96 ± 17.86
130.16 ± 52.55
73.41 ± 20.02
57.28 ± 33.95
84.78 ± 40.51
46.09 ± 13.43
132.52 ± 100.68
375.54 ± 16.06
114.77 ± 46.45
Pretrained Base Policy
378.43 ± 11.64
293.91 ± 31.76
321.85 ± 48.75
Table 3 | Evaluation results for zero-shot harnessing methods. The table shows for each method the mean and
standard deviation of the undiscounted cumulative reward obtained within an episode (the maximum number
of steps for each episode is 400) over 50 random seeds. The highest return obtained in each task is marked in
bold (excluding those obtained via the pretrained base policies). Further evaluation results are presented in
the appendix (Table 4,5).
10
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
(a) Accumulated reward on the reach_red task.
(b) Accumulated reward on the lift_red task.
(c) Accumulated reward on the red_hover_blue task.
Figure 3 | Comparison of harnessing options on in-distribution tasks. Each plot shows the mean and standard
deviation of 5 random seeds ("Random-HL" and "Zero-shot via Planning" plot the results from Table 3, each
conducted with 50 random seeds), with left-pointing triangles indicating returns converged at step 4e3
(Fig.3a), 3e4 (Fig.3b), 1e4 (Fig.3c)).
Next, we set out to evaluate other harnessing options which involve learning to potentially improve
the transfer performance. For each of the methods listed in Table 3 that requires additional learning,
we run experiments with five random seeds and plot their mean and standard deviation. For ease of
comparison, the results of "Random-HL" and "Zero-shot via Planning" from Table 3 are also plotted.
The results for in distribution tasks are shown in Figure 3 and the out of distribution tasks are shown
in Figure 4. In general, "Zero-shot via Planning" gives strong performance for in-distribution tasks, and
its performance for out-of-distribution tasks are also descent. This is promising as ideally we would
prefer to be able to transfer previously extracted knowledge to new tasks zero-shot. The learning
for "RL-HL" takes off faster than "RL-from-scratch", which shows that the learned skill embedding
space provides a behavior abstraction that enables more efficient exploration than directly learning
on the primitive action space. "RL-HL + Planning" also learns efficiently as "RL-HL", while having the
extra boost in performance brought by planning at the beginning of training. Additionally finetuning
the jumpy model however does not seem to improve "RL-HL + Planning + Finetune" over "RL-HL +
Planning", possibly because the finetune data which are generated from planning still lie well in the
distribution as the original training data, since the planning procedure is carried out off the jumpy
model itself.
11
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
(a) Accumulated reward on the red_stack_blue task.
(b) Accumulated reward on the red_hover_green task.
(c) Accumulated reward on the red_stack_green task.
(d) Accumulated reward on the bring_red task.
(e) Accumulated reward on the reach_green task.
(f) Accumulated reward on the lift_green task.
Figure 4 | Comparison of harnessing options on out-of-distribution tasks. Each plot shows the mean and standard deviation
of 5 random seeds ("Random-HL" and "Zero-shot via Planning" plot the results from Table 3, each conducted with 50
random seeds) with left-pointing triangles indicating returns converged at step 1e4.
12
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
Task wise, we can see that the agent perform quite similarly on red_hover_blue (Fig.3c) and
red_hover_green (Fig.4b), although it has only been shown episodes for the former. This could
possibly be due to the fact that during training the blue object has appeared in various locations and
therefore the jumpy model or the latent space could well cover the state space such that the planning
procedure or the HL policy being learned could easily pick up. This also shows that the learned
components could enable reasonable zero-shot generalization and boost few-shot transfer. This is
also shown in the bring_red (Fig.4d) task where it takes "RL-from-scratch" a long time to catch up
with the performance of the other options. However no effective transfer is shown on the lift_green
task (Fig.4f). As discussed for the "Zero-shot via Planning" experiment, the agent has never seen any
data with the gripper having the green object in hand. In this case, the abstraction handicaps the
agent from learning useful policies since it is well out of distribution.
Overall, through these conducted experiments, it can be observed that the components learned
in phase-1 of the proposed approach can act effectively as a compact representation of the training
data via temporal abstraction. This leads to reasonable zero-shot generalization (via planning) to
tasks whose desired behaviors are at least partially contained in the training data, with the planning
process itself also being largely sped up due to the jumpy predictions. The learned jumpy model and
skill embedding also enable various more efficient few-shot adaptation options in phase-2 to further
improve performance.
Conclusions and Future Work
To conclude, we propose an algorithm to learn a skill embedding space as well as a jumpy model
of the skills from offline datasets of interactions. These learned components could be harnessed in
various ways to solve newly encountered tasks. We have conducted experiments in the RGB-stacking
environment with a range of different transfer setups and validated the efficacy of our proposed
method, showing the benefits of jumpy-planning in learned latent skill spaces.
There are many potential future directions to study. For example, we could look into higher
performance architectures such as transformers Brown et al. (2020); Vaswani et al. (2017) for the
jumpy model. We could also investigate how the distributions of the pretrained base policies for
generating the training data could affect the generalization of the extracted skill embedding and skill
models. Also, how to learn a skill space that is the most effective is generally an open research topic,
any improvements in this regard should potentially translate to better performance for our proposed
method. Additionally, this paper has only looked at learning jumpy models of fixed look-ahead
intervals (e.g., 10 time-steps ahead), while it could potentially be more efficient to learn jumpy models
with varying horizons, adjusting its resolution according to the varying predictability/controllability
Jayaraman et al. (2018) across different parts of the state space. Another aspect would be to investigate
other training or finetuning options to bring cycle consistency of the model and the policy. Furthermore,
we could iteratively build up a hierarchy of jumpy models that progressively abstracts the world model,
with which zero-shot generalization with planning for solving complicated real-world problems might
be possible.
Acknowledgements
The authors would like to thank Tim Hertweck, Giulia Vezzani, Markus Wulfmeier, Thomas Lampe,
Will Whitney, Jackie Kay, Sarah Bechtle, Francesco Nori, Andrea Huber, the Control Team, and many
others at DeepMind for their helpful feedback, discussions, and support for this paper.
13
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
References
A. Abdolmaleki, J. T. Springenberg, Y. Tassa, R. Munos, N. Heess, and M. Riedmiller. Maximum a
posteriori policy optimisation. In International Conference on Learning Representations, 2018.
J. L. Ba, J. R. Kiros, and G. E. Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
M. M. Botvinick. Hierarchical models of behavior and prefrontal function. Trends in cognitive sciences,
12(5):201–208, 2008.
T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam,
G. Sastry, A. Askell, et al. Language models are few-shot learners. Advances in neural information
processing systems, 33:1877–1901, 2020.
A. Byravan, J. T. Springenberg, A. Abdolmaleki, R. Hafner, M. Neunert, T. Lampe, N. Siegel, N. Heess,
and M. Riedmiller. Imagined value gradients: Model-based policy optimization with tranferable
latent dynamics models. In Conference on Robot Learning, pages 566–589. PMLR, 2020.
A. Byravan, L. Hasenclever, P. Trochim, M. Mirza, A. D. Ialongo, Y. Tassa, J. T. Springenberg, A. Ab-
dolmaleki, N. Heess, J. Merel, et al. Evaluating model-based planning and planner amortization for
continuous control. arXiv preprint arXiv:2110.03363, 2021.
S. Consul, L. Heindrich, J. Stojcheski, and F. Lieder. Improving human decision-making by discovering
efficient strategies for hierarchical planning. Computational Brain & Behavior, 5(2):185–216, 2022.
F. Ebert, C. Finn, S. Dasari, A. Xie, A. Lee, and S. Levine. Visual foresight: Model-based deep
reinforcement learning for vision-based robotic control. arXiv preprint arXiv:1812.00568, 2018.
C. Finn and S. Levine. Deep visual foresight for planning robot motion. In 2017 IEEE International
Conference on Robotics and Automation (ICRA), pages 2786–2793. IEEE, 2017.
A. Galashov, S. M. Jayakumar, L. Hasenclever, D. Tirumala, J. Schwarz, G. Desjardins, W. M. Czarnecki,
Y. W. Teh, R. Pascanu, and N. Heess. Information asymmetry in kl-regularized rl. arXiv preprint
arXiv:1905.01240, 2019.
A. Goyal, R. Islam, D. Strouse, Z. Ahmed, H. Larochelle, M. Botvinick, S. Levine, and Y. Bengio.
Transfer and exploration via the information bottleneck. In International Conference on Learning
Representations, 2019.
K. Gregor, D. J. Rezende, and D. Wierstra. Variational intrinsic control. arXiv preprint arXiv:1611.07507,
2016.
C. Gulcehre, Z. Wang, A. Novikov, T. Paine, S. Gómez, K. Zolna, R. Agarwal, J. S. Merel, D. J. Mankowitz,
C. Paduraru, et al. Rl unplugged: A suite of benchmarks for offline reinforcement learning. Advances
in Neural Information Processing Systems, 33:7248–7259, 2020.
D. Ha and J. Schmidhuber. World models. arXiv preprint arXiv:1803.10122, 2018.
D. Hafner, T. Lillicrap, J. Ba, and M. Norouzi. Dream to control: Learning behaviors by latent
imagination. In International Conference on Learning Representations, 2019a.
D. Hafner, T. Lillicrap, I. Fischer, R. Villegas, D. Ha, H. Lee, and J. Davidson. Learning latent dynamics
for planning from pixels. In International conference on machine learning, pages 2555–2565. PMLR,
2019b.
14
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
D. Hafner, T. P. Lillicrap, M. Norouzi, and J. Ba. Mastering atari with discrete world models. In
International Conference on Learning Representations, 2020.
L. Hasenclever, F. Pardo, R. Hadsell, N. Heess, and J. Merel. CoMic: Complementary task learning
and mimicry for reusable skills. In H. D. III and A. Singh, editors, Proceedings of the 37th Interna-
tional Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research,
pages 4105–4115. PMLR, 13–18 Jul 2020. URL https://proceedings.mlr.press/v119/
hasenclever20a.html.
N. Heess, G. Wayne, D. Silver, T. Lillicrap, T. Erez, and Y. Tassa. Learning continuous control policies
by stochastic value gradients. Advances in neural information processing systems, 28, 2015.
N. Heess, G. Wayne, Y. Tassa, T. Lillicrap, M. Riedmiller, and D. Silver. Learning and transfer of
modulated locomotor controllers. arXiv preprint arXiv:1610.05182, 2016.
M. Hoffman, B. Shahriari, J. Aslanides, G. Barth-Maron, F. Behbahani, T. Norman, A. Abdolmaleki,
A. Cassirer, F. Yang, K. Baumli, et al. Acme: A research framework for distributed reinforcement
learning. arXiv preprint arXiv:2006.00979, 2020.
H. Hogendoorn and A. N. Burkitt. Predictive coding of visual object position ahead of moving objects
revealed by time-resolved eeg decoding. Neuroimage, 171:55–61, 2018.
D. Jayaraman, F. Ebert, A. Efros, and S. Levine. Time-agnostic prediction: Predicting predictable
video frames. In International Conference on Learning Representations, 2018.
D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
M. Laskin, H. Liu, X. B. Peng, D. Yarats, A. Rajeswaran, and P. Abbeel. CIC: Contrastive intrinsic
control for unsupervised skill discovery. In Deep RL Workshop NeurIPS 2021, 2021. URL https:
//openreview.net/forum?id=Z12zA99EFEi.
A. X. Lee, C. M. Devin, Y. Zhou, T. Lampe, K. Bousmalis, J. T. Springenberg, A. Byravan, A. Abdolmaleki,
N. Gileadi, D. Khosid, et al. Beyond pick-and-place: Tackling robotic stacking of diverse shapes. In
Conference on Robot Learning, pages 1089–1131. PMLR, 2022.
S. Levine, A. Kumar, G. Tucker, and J. Fu. Offline reinforcement learning: Tutorial, review, and
perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
S. Liu, G. Lever, Z. Wang, J. Merel, S. A. Eslami, D. Hennes, W. M. Czarnecki, Y. Tassa, S. Omidshafiei,
A. Abdolmaleki, et al. From motor control to team play in simulated humanoid football. Science
Robotics, 7(69):eabo0235, 2022.
Y. Liu, J. N. Kutz, and S. L. Brunton. Hierarchical deep learning of multiscale differential equation
time-steppers. arXiv preprint arXiv:2008.09768, 2020.
C. Lynch, M. Khansari, T. Xiao, V. Kumar, J. Tompson, S. Levine, and P. Sermanet. Learning latent
plans from play. In Conference on robot learning, pages 1113–1132. PMLR, 2020.
G. W. Maus, J. Fischer, and D. Whitney. Motion-dependent representation of space in area mt+.
Neuron, 78(3):554–562, 2013.
J. Merel, L. Hasenclever, A. Galashov, A. Ahuja, V. Pham, G. Wayne, Y. W. Teh, and N. Heess. Neural
In International Conference on Learning
probabilistic motor primitives for humanoid control.
Representations, 2018.
15
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
J. Merel, S. Tunyasuvunakool, A. Ahuja, Y. Tassa, L. Hasenclever, V. Pham, T. Erez, G. Wayne, and
N. Heess. Catch & carry: reusable neural controllers for vision-guided whole-body tasks. ACM
Transactions on Graphics (TOG), 39(4):39–1, 2020.
S. Mohamed and D. Jimenez Rezende. Variational information maximisation for intrinsically motivated
reinforcement learning. Advances in neural information processing systems, 28, 2015.
A. Nagabandi, K. Konolige, S. Levine, and V. Kumar. Deep dynamics models for learning dexterous
manipulation. In Conference on Robot Learning, pages 1101–1112. PMLR, 2020.
N. Nortmann, S. Rekauzke, S. Onat, P. König, and D. Jancke. Primary visual cortex represents the
difference between past and present. Cerebral Cortex, 25:1427–1440, 2015.
X. B. Peng, G. Berseth, K. Yin, and M. Van De Panne. Deeploco: Dynamic locomotion skills using
hierarchical deep reinforcement learning. ACM Transactions on Graphics (TOG), 36(4):1–13, 2017.
D. Rao, F. Sadeghi, L. Hasenclever, M. Wulfmeier, M. Zambelli, G. Vezzani, D. Tirumala, Y. Aytar,
J. Merel, N. Heess, et al. Learning transferable motor skills with hierarchical latent mixture policies.
arXiv preprint arXiv:2112.05062, 2021.
C. Salge, C. Glackin, and D. Polani. Empowerment–an introduction. In Guided Self-Organization:
Inception, pages 67–114. Springer, 2014.
S. Salter, M. Wulfmeier, D. Tirumala, N. Heess, M. Riedmiller, R. Hadsell, and D. Rao. Mo2: Model
based offline options. arXiv preprint arXiv:2209.01947, 2022.
A. Sanchez-Gonzalez, N. Heess, J. T. Springenberg, J. Merel, M. Riedmiller, R. Hadsell, and P. Battaglia.
Graph networks as learnable physics engines for inference and control. In International Conference
on Machine Learning, pages 4470–4479. PMLR, 2018.
J. Schrittwieser, I. Antonoglou, T. Hubert, K. Simonyan, L. Sifre, S. Schmitt, A. Guez, E. Lockhart,
D. Hassabis, T. Graepel, et al. Mastering atari, go, chess and shogi by planning with a learned
model. Nature, 588(7839):604–609, 2020.
P. Sermanet, C. Lynch, et al. Broadly-exploring, local-policy trees for long-horizon task planning. In
5th Annual Conference on Robot Learning, 2021.
A. Sharma, S. Gu, S. Levine, V. Kumar, and K. Hausman. Dynamics-aware unsupervised discovery of
skills. In ICLR, 2020.
J. T. Springenberg, N. Heess, D. Mankowitz, J. Merel, A. Byravan, A. Abdolmaleki, J. Kay, J. Degrave,
J. Schrittwieser, Y. Tassa, et al. Local search for policy iteration in continuous control. arXiv preprint
arXiv:2010.05545, 2020.
R. S. Sutton. Dyna, an integrated architecture for learning, planning, and reacting. ACM Sigart
Bulletin, 2(4):160–163, 1991.
Y. Teh, V. Bapst, W. M. Czarnecki, J. Quan, J. Kirkpatrick, R. Hadsell, N. Heess, and R. Pascanu. Distral:
Robust multitask reinforcement learning. Advances in neural information processing systems, 30,
2017.
D. Tirumala, A. Galashov, H. Noh, L. Hasenclever, R. Pascanu, J. Schwarz, G. Desjardins, W. M.
Czarnecki, A. Ahuja, Y. W. Teh, et al. Behavior priors for efficient reinforcement learning. arXiv
preprint arXiv:2010.14274, 2020.
16
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin.
Attention is all you need. Advances in neural information processing systems, 30, 2017.
Z. Wang, A. Novikov, K. Zolna, J. S. Merel, J. T. Springenberg, S. E. Reed, B. Shahriari, N. Siegel,
C. Gulcehre, N. Heess, et al. Critic regularized regression. Advances in Neural Information Processing
Systems, 33:7768–7778, 2020.
W. Whitney, R. Agarwal, K. Cho, and A. Gupta. Dynamics-aware embeddings.
In International
Conference on Learning Representations, 2019.
M. Wulfmeier, D. Rao, R. Hafner, T. Lampe, A. Abdolmaleki, T. Hertweck, M. Neunert, D. Tirumala,
N. Siegel, N. Heess, et al. Data-efficient hindsight off-policy option learning. In International
Conference on Machine Learning, pages 11340–11350. PMLR, 2021.
17
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
Appendix
In Table 4, we present further evaluation results for jumpy planning ("Zero-shot via Planning"). Each
task is evaluated by varying: 1. the planning horizon H (H = 1, 2, 3, 5 corresponds to looking ahead
10, 20, 30, 50 steps respectively in terms of primitive actions since the latent horizon K = 10); 2. the
number of primitive actions executed in each planning iteration, in other words, once the planning
procedure gives out a planned z, how many steps it is kept fixed in the LL policy to give out primitive
actions. Each configuration is evaluated with 50 episodes with random seeds, with a maximum
number of 400 steps for each episode. The performance of the agent on these tasks are descent,
while it generally drops slightly with longer planning horizon, which could be due to accumulated
prediction errors in the unrolling of the jumpy model. With more number of primitive actions executed
per planned latent, the obtained returns are generally quite consistent for 1, 2, 10 actions (note that
the context length K is set to 10 during phase-1), which shows that the proposed method not only
enables jumpy planning but could also support task accomplishment at lower control rate. When one
latent is held fixed for as long as 100 or 200 steps, the performance drops greatly, as the latent skill
was not trained to be able to provide meaningful context for that many steps (also note that each
episode is at most 400 steps long).
In Table 5, we present more detailed zero-shot evaluation results for non-jumpy planning ("Zero-
shot via Planning (K = 1)"). Each task is evaluated with planning horizon H = 1, 2, 3, 5, 10, 30, 50
looking ahead steps in terms of primitive actions. Each configuration is evaluated with 50 episodes
with random seeds, with a maximum number of steps of 400 for each episode. The performance of
the agent on simpler tasks like reach is quite decent, even on out-of-distribution task like reach_green,
probably due to the fact that one step transition dynamics is universal across different task in the
same environment and is sufficient for guiding short horizon tasks. While its performance on all other
more complicated tasks drop substantially compared to the one trained with K = 10, this should be
due to that for tackling long horizon tasks, shorter planning horizon does not suffice while bigger
look ahead steps lead to higher accumulation error with one-step models.
In Figure 5, we show exemplar trajectories of "RL-HL + Planning" for all evaluated tasks to clarity
the tasks considered.
18
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
2
5
7
7
6
0
9
0
.
.
.
.
9
1
1
±
7
8
5
0
1
±
2
6
8
5
1
±
9
0
0
6
1
±
4
1
6
2
8
9
9
4
7
4
6
9
2
3
4
2
0
6
6
4
9
6
7
5
8
2
6
6
3
5
0
2
6
4
9
2
1
6
8
9
3
4
1
0
1
1
8
4
3
4
8
6
5
4
1
7
1
0
3
6
4
6
0
4
9
0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
5
±
0
8
3
5
±
7
0
8
4
±
5
2
1
5
±
7
9
8
4
±
5
2
4
6
±
2
1
0
6
±
8
3
9
4
±
6
8
0
3
±
4
0
5
3
±
0
7
4
3
±
5
6
6
3
±
4
8
5
6
±
0
4
4
6
±
1
1
0
6
±
5
7
0
6
±
9
1
6
3
±
0
2
2
3
±
7
4
8
3
±
7
5
6
3
±
5
1
4
4
±
3
2
4
5
±
1
8
2
5
±
3
1
2
5
±
2
1
9
7
±
3
8
9
5
±
4
1
3
6
±
1
4
1
7
±
1
7
1
2
±
6
0
4
1
±
2
6
9
1
±
5
2
8
1
±
7
6
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
9
2
0
2
3
7
2
2
0
4
2
1
9
2
8
0
8
4
6
3
7
4
7
6
7
2
6
4
4
7
4
7
4
4
3
2
8
4
7
0
8
3
6
3
5
4
3
5
4
7
3
5
7
7
8
5
8
2
6
2
9
6
7
6
7
3
8
4
2
7
1
3
2
0
2
3
7
3
0
4
3
2
5
.
.
.
.
2
7
1
±
8
2
4
1
1
±
0
5
0
4
1
±
5
3
9
4
1
±
9
7
.
.
.
.
2
9
2
0
0
3
1
7
2
9
4
2
9
6
3
0
3
0
.
.
.
7
7
±
7
6
1
8
±
6
4
8
6
±
3
3
.
.
.
4
0
1
7
1
1
6
0
1
0
7
.
9
7
±
2
7
.
8
9
9
4
3
0
.
.
1
8
±
2
9
7
8
±
6
2
.
.
1
1
1
7
1
1
2
5
3
5
3
5
7
8
0
6
7
8
8
0
.
.
.
.
.
.
.
5
7
±
7
0
5
7
±
0
6
6
4
±
4
6
4
5
±
6
1
8
4
±
5
0
8
4
±
7
5
0
8
±
1
8
.
.
.
.
.
.
.
5
8
1
7
2
6
9
6
3
5
8
4
2
9
5
1
4
7
7
0
.
.
.
2
9
±
9
4
3
8
±
4
0
2
9
±
6
4
.
.
.
1
1
1
2
0
1
1
0
1
8
5
2
3
2
6
3
5
2
7
9
9
9
4
4
4
.
.
.
.
.
.
.
.
5
4
±
5
6
8
5
±
0
2
5
4
±
9
8
6
4
±
6
8
8
5
±
4
3
0
7
±
1
2
5
6
±
2
6
6
6
±
8
5
.
.
.
.
.
.
.
.
5
5
4
6
9
4
0
5
6
8
7
8
2
8
0
8
7
7
.
0
8
±
2
0
.
9
0
1
6
8
7
3
.
.
4
7
±
2
9
0
8
±
4
3
.
.
2
9
0
9
1
7
.
9
8
±
0
7
.
7
0
1
8
8
1
2
5
4
9
5
.
.
.
.
3
1
±
1
7
5
1
±
6
1
5
1
±
8
4
0
2
±
9
7
.
.
.
.
4
2
1
2
0
2
0
2
6
1
.
0
5
±
8
8
.
7
6
3
1
5
6
8
7
4
1
2
8
1
9
2
6
2
.
.
.
.
.
.
.
8
2
1
±
7
2
0
0
1
±
6
5
9
2
1
±
3
3
4
0
1
±
2
8
4
1
1
±
1
8
4
2
1
±
9
2
2
2
1
±
5
6
.
.
.
.
.
.
.
1
2
3
1
4
3
6
1
3
4
4
2
4
3
2
0
3
2
8
8
1
0
5
.
9
7
±
7
8
.
5
3
2
8
7
6
3
2
9
.
.
.
0
1
1
±
7
8
6
2
1
±
2
8
4
2
1
±
4
4
.
.
.
9
0
2
2
8
1
9
4
1
3
0
5
2
3
7
5
9
.
.
.
.
4
5
±
1
7
7
7
±
8
0
5
7
±
7
4
3
8
±
5
1
.
.
.
.
7
3
1
4
2
1
9
2
1
4
0
1
8
3
3
4
3
1
8
8
.
.
.
.
2
0
1
±
6
3
3
2
1
±
9
8
2
1
1
±
4
7
1
2
1
±
1
2
.
.
.
.
1
0
2
3
9
1
8
9
1
2
6
1
8
6
0
7
3
5
9
2
6
8
1
9
8
8
6
3
8
6
3
8
2
0
.
.
.
.
.
.
.
.
.
.
.
0
7
±
8
3
9
6
±
4
1
4
7
±
3
2
5
7
±
8
2
0
9
±
5
1
2
9
±
4
8
1
9
±
5
2
2
9
±
7
3
5
8
±
4
1
8
8
±
9
7
6
9
±
2
6
.
.
.
.
.
.
.
.
.
.
.
6
1
1
8
1
1
0
3
1
1
1
1
6
8
1
2
7
1
4
7
1
0
6
1
2
0
2
6
4
1
0
2
1
8
0
3
1
5
4
2
4
4
7
.
.
.
.
.
6
8
±
0
4
3
2
±
3
6
5
2
±
9
4
7
2
±
7
8
4
2
±
8
0
.
.
.
.
.
4
9
6
4
3
4
5
3
4
2
5
1
.
6
4
±
3
1
.
8
6
3
5
7
.
7
2
1
±
2
7
.
6
2
3
7
8
.
4
9
±
3
7
.
3
4
3
2
2
.
2
2
1
±
6
0
.
1
2
3
1
2
3
1
.
.
7
8
±
6
9
4
9
±
5
8
.
.
5
9
2
3
8
2
4
2
0
9
.
.
9
1
1
±
1
6
8
1
1
±
6
1
.
.
6
5
2
7
4
2
.
8
8
0
6
±
6
6
8
7
2
.
9
1
.
6
2
1
±
7
1
.
0
1
2
8
4
.
1
9
±
7
3
.
0
5
2
7
9
.
7
2
1
±
5
9
.
8
9
1
9
0
5
6
9
3
1
3
3
4
.
.
.
.
.
9
5
±
1
7
2
7
±
6
3
7
8
±
5
9
8
7
±
7
1
2
9
±
2
9
.
.
.
.
.
5
6
1
0
3
1
6
1
1
7
2
1
2
4
2
9
2
1
2
7
8
.
.
.
8
2
1
±
6
3
5
2
1
±
5
9
8
1
1
±
9
7
.
.
.
6
0
2
6
0
2
1
5
1
5
9
9
7
5
2
0
7
.
.
.
.
3
6
±
6
1
3
6
±
1
2
7
7
±
8
6
9
7
±
2
1
.
.
.
.
7
4
1
3
4
1
7
3
1
1
3
1
.
6
7
3
8
±
7
9
5
2
2
.
2
0
.
6
0
1
±
4
0
.
9
0
2
8
3
3
1
.
.
2
8
±
9
8
5
8
±
6
4
.
.
1
1
2
9
8
1
2
3
0
6
2
4
.
.
.
1
0
1
±
9
5
9
1
1
±
2
5
9
0
1
±
8
3
.
.
.
4
1
2
1
8
1
5
5
1
0
3
.
0
9
±
2
5
.
0
0
1
9
9
2
4
6
5
0
6
.
.
.
.
2
2
±
6
5
8
2
±
4
1
6
2
±
4
0
5
2
±
7
7
.
.
.
.
7
5
8
4
3
3
2
3
.
9
9
7
2
±
8
7
3
7
3
.
9
4
.
7
5
±
1
0
.
7
6
3
2
0
6
2
.
.
8
0
1
±
7
6
6
1
1
±
6
5
.
.
1
4
3
6
3
3
.
7
9
5
6
±
2
5
7
0
3
.
5
0
.
9
8
±
6
6
.
9
8
2
1
4
1
2
.
.
3
0
1
±
6
7
8
0
1
±
8
9
.
.
1
9
2
1
6
2
6
3
.
3
6
±
6
5
.
6
7
2
1
1
1
8
6
6
.
.
.
1
2
1
±
1
8
6
0
1
±
8
3
4
2
1
±
4
6
.
.
.
6
0
2
2
4
2
3
1
2
.
6
8
1
6
±
8
9
9
6
1
.
1
3
2
5
0
7
.
.
.
0
8
±
0
3
6
7
±
0
6
9
8
±
7
4
.
.
.
2
4
1
6
4
1
6
4
1
.
3
5
9
7
±
8
2
6
6
2
.
2
1
.
3
1
1
±
1
6
.
1
5
2
1
1
.
4
9
±
0
2
.
7
5
2
0
6
.
1
2
1
±
3
0
.
0
3
2
9
0
8
2
1
9
0
5
3
6
2
4
.
.
.
.
.
.
0
5
±
3
8
5
7
±
6
2
1
7
±
4
5
1
7
±
9
4
9
7
±
3
2
5
9
±
7
1
.
.
.
.
.
.
7
4
1
4
3
1
8
4
1
1
4
1
2
1
2
9
9
1
1
5
7
8
.
.
9
0
1
±
7
9
2
0
1
±
8
8
.
.
4
9
1
1
9
1
.
4
3
4
0
1
±
1
4
1
4
2
.
1
2
9
1
9
9
.
.
.
8
1
1
±
1
6
0
3
1
±
1
9
3
1
1
±
0
4
9
3
2
4
0
8
0
1
.
.
.
.
6
2
±
4
0
0
3
±
5
0
3
2
±
6
6
6
2
±
7
9
.
.
.
.
.
.
.
5
9
1
0
9
1
8
1
1
9
5
2
4
2
3
9
2
0
9
9
1
.
.
2
5
±
8
1
7
8
±
1
0
.
.
8
6
3
7
5
3
1
6
3
2
.
.
4
0
1
±
7
4
8
3
1
±
5
9
.
.
2
4
3
2
0
3
1
8
.
4
8
±
2
1
.
0
8
2
2
1
0
9
5
3
.
.
.
1
2
1
±
4
1
5
2
1
±
5
6
4
3
1
±
9
5
.
.
.
7
6
2
3
5
2
8
1
2
5
0
.
1
9
±
9
7
.
7
2
2
3
9
1
3
1
7
.
.
.
4
1
1
±
4
3
2
2
1
±
4
7
5
1
1
±
9
5
.
.
.
8
2
2
8
0
2
9
0
2
0
3
6
9
7
2
7
4
9
7
.
.
.
.
.
4
6
±
0
2
2
7
±
1
6
6
8
±
9
0
7
7
±
0
9
3
8
±
2
9
.
.
.
.
.
3
6
1
3
5
1
9
3
1
4
3
1
2
5
2
4
2
.
4
0
1
±
6
9
.
3
5
2
0
2
.
8
9
±
3
0
.
5
4
2
4
2
.
2
3
1
±
9
9
.
9
0
2
2
0
.
9
4
±
3
2
.
9
4
1
.
9
6
3
7
±
5
7
2
6
1
.
4
3
2
5
6
1
0
9
7
6
.
.
.
.
.
0
7
±
0
3
7
7
±
0
5
3
7
±
5
7
7
9
±
8
9
5
8
±
8
1
.
.
.
.
.
8
4
1
0
4
1
0
0
2
3
0
2
5
0
2
2
5
3
0
8
0
3
0
2
8
.
.
.
.
.
6
0
1
±
7
3
2
1
1
±
9
8
8
3
1
±
2
1
4
2
1
±
6
5
4
1
1
±
1
0
.
.
.
.
.
1
7
1
7
2
2
3
9
1
0
7
1
1
2
1
.
4
7
6
2
±
5
7
9
5
.
3
0
6
2
3
5
.
.
.
2
3
±
5
2
8
2
±
7
7
1
2
±
4
4
.
.
.
8
4
1
3
1
2
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
)
s
p
e
t
s
v
n
e
0
1
(
)
s
p
e
t
s
v
n
e
0
2
(
)
s
p
e
t
s
v
n
e
0
3
(
)
s
p
e
t
s
v
n
e
0
5
(
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
1
2
3
5
d
e
r
_
h
c
a
e
r
d
e
r
_
t
f
i
l
e
u
l
b
_
r
e
v
o
h
_
d
e
r
e
u
l
b
_
k
c
a
t
s
_
d
e
r
n
e
e
r
g
_
r
e
v
o
h
_
d
e
r
n
e
e
r
g
_
k
c
a
t
s
_
d
e
r
d
e
r
_
g
n
i
r
b
n
e
e
r
g
_
h
c
a
e
r
n
e
e
r
g
_
t
f
i
l
0
0
2
0
0
1
0
2
0
1
2
1
b
s
n
o
i
t
c
a
.
o
N
a
H
n
o
z
i
r
o
H
H
(
H
n
o
z
i
r
o
h
g
n
n
n
a
l
p
i
r
i
e
h
t
y
b
d
e
t
s
i
l
e
r
a
k
s
a
t
n
o
i
t
a
u
l
a
v
e
h
c
a
e
r
o
f
s
t
l
u
s
e
r
e
h
T
.
0
1
=
K
h
t
g
n
e
l
t
x
e
t
n
o
c
h
t
i
w
i
"
g
n
n
n
a
l
P
a
i
v
t
o
h
s
-
o
r
e
Z
"
r
o
f
s
t
l
u
s
e
r
n
o
i
t
a
u
l
a
v
e
l
a
n
o
i
t
i
d
d
A
|
4
e
l
b
a
T
,
e
d
o
s
i
p
e
n
o
i
t
a
u
l
a
v
e
n
a
g
n
i
r
u
d
d
e
v
e
i
h
c
a
)
]
1
,
0
[
(
d
r
a
w
e
r
p
e
t
s
e
l
g
n
i
s
m
u
m
i
x
a
m
e
h
t
r
o
f
s
d
n
a
t
s
"
d
r
a
w
e
r
x
a
m
"
e
h
T
.
)
s
p
e
t
s
n
o
i
t
c
a
e
v
i
t
i
m
i
r
p
K
o
t
s
d
n
o
p
s
e
r
r
o
c
z
h
c
a
e
d
n
a
z
n
i
s
e
t
a
r
e
p
o
s
i
n
o
i
t
a
r
u
g
fi
n
o
c
n
o
i
t
a
u
l
a
v
e
h
c
a
E
.
)
0
0
4
s
i
e
d
o
s
i
p
e
h
c
a
e
r
o
f
s
p
e
t
s
f
o
r
e
b
m
u
n
m
u
m
i
x
a
m
e
h
t
(
e
d
o
s
i
p
e
n
a
i
n
h
t
i
w
d
e
n
i
a
t
b
o
d
r
a
w
e
r
e
v
i
t
a
l
u
m
u
c
d
e
t
n
u
o
c
s
i
d
n
u
e
h
t
s
i
"
n
r
u
t
e
r
"
e
h
t
e
l
i
h
w
.
d
e
x
fi
t
p
e
k
t
n
e
t
a
l
d
e
n
n
a
l
p
e
h
t
h
t
i
w
,
n
o
i
t
a
r
e
t
i
i
g
n
n
n
a
l
p
r
e
p
d
e
t
u
c
e
x
e
s
n
o
i
t
c
a
L
L
f
o
r
e
b
m
u
N
b
19
.
z
n
i
n
o
z
i
r
o
h
g
n
n
n
a
l
p
i
t
n
e
t
a
L
a
.
s
d
e
e
s
m
o
d
n
a
r
0
5
h
t
i
w
d
e
t
c
u
d
n
o
c
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
0
5
0
3
0
1
5
3
2
8
1
.
0
±
4
9
.
0
1
2
.
0
±
4
9
.
0
7
1
.
0
±
5
9
.
0
3
1
.
0
±
6
9
.
0
6
1
.
0
±
7
9
.
0
0
0
.
0
±
0
0
.
1
2
0
.
6
9
±
5
0
.
6
1
3
7
9
.
2
9
±
8
3
.
8
2
3
3
1
.
9
7
±
0
4
.
0
5
3
4
1
.
7
7
±
0
5
.
2
5
3
0
1
.
7
6
±
1
9
.
5
6
3
.
6
8
7
1
±
6
9
5
7
3
.
8
1
.
0
±
0
3
.
0
7
2
.
0
±
6
5
.
0
4
2
.
0
±
9
5
.
0
8
3
.
5
3
±
5
6
.
4
0
1
8
2
.
2
6
±
0
8
.
0
2
1
6
9
.
1
5
±
6
6
.
7
2
1
1
0
0
.
0
±
0
0
.
1
6
7
.
9
1
±
1
0
.
8
6
3
0
3
.
0
±
5
6
.
0
.
5
5
2
5
±
6
1
0
3
1
.
4
7
.
7
1
±
7
0
4
1
.
0
±
5
3
6
6
.
8
1
±
5
5
5
2
.
0
±
1
3
9
5
.
0
1
±
1
1
7
1
.
0
±
1
2
4
3
.
9
1
±
5
6
4
2
.
0
±
0
3
1
2
.
2
1
±
4
2
8
8
.
1
3
±
6
8
5
1
.
0
±
6
1
7
1
.
0
±
2
2
7
1
.
0
±
6
9
.
.
.
.
.
.
.
.
.
.
.
.
.
0
0
8
0
7
4
0
9
2
0
4
4
0
9
2
0
1
3
0
2
3
.
4
1
±
7
3
3
1
.
0
±
6
3
4
3
.
1
2
±
4
8
8
2
.
0
±
7
3
5
1
.
0
±
2
2
.
.
.
.
.
0
6
8
0
6
5
0
0
3
.
7
±
5
0
.
5
3
7
4
.
6
1
±
4
7
7
2
.
0
±
7
3
3
1
.
0
±
0
2
.
.
.
0
5
5
0
8
0
.
8
±
4
8
.
4
3
1
5
.
8
2
±
4
1
5
1
.
0
±
5
1
3
1
.
0
±
8
9
.
.
.
0
6
2
0
8
7
.
0
2
±
6
8
5
1
.
0
±
0
4
1
4
.
3
2
±
0
2
3
2
.
0
±
6
3
3
9
.
8
2
±
9
1
0
2
.
0
±
7
2
2
7
.
3
1
±
9
4
1
1
.
0
1
±
7
0
9
6
.
1
3
±
7
3
9
1
.
0
±
8
2
6
1
.
0
±
1
2
4
2
.
0
±
8
3
0
2
.
0
±
5
9
.
.
.
.
.
.
.
.
.
.
.
.
.
0
9
8
0
4
6
0
2
4
0
1
6
0
7
3
0
5
5
0
0
2
.
9
1
±
2
6
3
0
.
5
1
±
0
3
8
1
.
0
±
9
2
9
2
.
0
±
7
4
7
3
.
5
1
±
1
9
8
2
.
0
±
9
4
6
5
.
1
2
±
0
2
8
1
.
0
±
9
2
2
3
.
0
±
3
5
.
.
.
.
.
.
.
.
.
0
6
6
0
0
4
0
8
6
0
2
4
0
5
6
.
6
8
±
6
1
.
6
0
1
2
2
.
0
±
4
9
.
0
9
2
.
0
±
0
6
.
0
.
2
0
0
2
±
1
4
3
7
.
5
2
.
0
±
3
4
.
0
.
5
9
3
3
±
8
2
7
5
.
6
3
.
9
2
±
4
3
1
6
.
5
1
±
5
1
9
1
.
0
±
3
3
1
3
.
0
±
3
6
4
3
.
0
±
4
6
.
.
.
.
.
0
9
7
0
1
4
0
0
9
.
7
3
±
6
2
4
3
.
0
±
6
5
2
6
.
2
2
±
0
2
3
2
.
0
±
1
4
0
3
.
0
±
7
6
.
.
.
.
.
0
3
7
0
0
5
0
.
1
5
0
4
±
8
7
4
8
.
8
1
.
0
±
9
3
.
0
.
3
4
3
1
±
9
0
6
4
.
2
3
.
0
±
9
5
.
0
2
7
.
8
1
±
4
5
0
3
.
0
±
1
5
3
2
.
5
2
±
8
9
1
2
.
0
±
7
3
2
8
.
1
1
±
0
3
6
0
.
3
1
±
3
0
7
1
.
0
±
5
3
9
2
.
0
±
1
5
3
3
.
0
±
4
6
.
.
.
.
.
.
.
.
.
0
1
7
0
7
4
0
9
6
0
4
4
0
9
6
.
6
7
±
6
1
.
2
3
3
3
3
.
7
5
±
9
3
.
6
4
3
4
9
.
8
7
±
0
9
.
0
5
3
6
2
.
9
8
±
2
6
.
4
5
3
2
3
.
2
4
±
4
8
.
1
7
3
8
7
.
0
9
±
2
8
.
6
5
3
.
6
0
6
1
±
4
5
5
7
3
.
2
7
.
0
2
±
8
3
2
1
.
0
±
0
3
.
.
0
7
7
2
3
.
0
1
±
0
0
5
1
.
0
±
6
3
.
.
0
6
8
1
7
.
3
2
±
4
1
5
1
.
0
±
7
3
.
.
0
7
8
1
2
.
9
1
±
4
8
6
1
.
0
±
3
4
.
.
0
1
9
2
2
.
0
±
4
5
.
0
3
0
.
2
4
±
6
7
.
5
0
1
3
2
.
0
±
4
5
.
0
.
5
4
6
4
±
7
7
4
1
1
.
7
2
.
0
±
0
5
.
0
7
1
.
6
3
±
3
5
.
8
0
1
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
.
8
6
0
0
1
±
2
5
2
3
1
.
4
7
.
0
7
±
0
1
.
3
1
1
0
1
.
2
6
±
6
0
.
1
2
1
n
r
u
t
e
R
0
0
.
0
±
0
0
.
1
3
2
.
0
±
4
9
.
0
0
0
.
0
±
0
0
.
1
d
r
a
w
e
r
x
a
M
n
o
z
i
r
o
h
g
n
n
n
a
l
P
i
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
n
r
u
t
e
R
d
r
a
w
e
r
x
a
M
d
e
r
_
h
c
a
e
r
d
e
r
_
t
f
i
l
e
u
l
b
_
r
e
v
o
h
_
d
e
r
e
u
l
b
_
k
c
a
t
s
_
d
e
r
n
e
e
r
g
_
r
e
v
o
h
_
d
e
r
n
e
e
r
g
_
k
c
a
t
s
_
d
e
r
d
e
r
_
g
n
i
r
b
n
e
e
r
g
_
h
c
a
e
r
n
e
e
r
g
_
t
f
i
l
n
o
i
t
c
a
e
v
i
t
i
m
i
r
p
f
o
s
m
r
e
t
n
i
(
n
o
z
i
r
o
h
g
n
n
n
a
l
p
i
r
i
e
h
t
y
b
d
e
t
s
i
l
e
r
a
k
s
a
t
n
o
i
t
a
u
l
a
v
e
h
c
a
e
r
o
f
s
t
l
u
s
e
r
e
h
T
.
"
)
1
=
K
(
i
g
n
n
n
a
l
P
a
i
v
t
o
h
s
-
o
r
e
Z
"
r
o
f
s
t
l
u
s
e
r
n
o
i
t
a
u
l
a
v
e
l
a
n
o
i
t
i
d
d
A
|
5
e
l
b
a
T
d
r
a
w
e
r
e
v
i
t
a
l
u
m
u
c
d
e
t
n
u
o
c
s
i
d
n
u
e
h
t
s
i
"
n
r
u
t
e
r
"
e
h
t
e
l
i
h
w
,
e
d
o
s
i
p
e
n
o
i
t
a
u
l
a
v
e
n
a
g
n
i
r
u
d
d
e
v
e
i
h
c
a
)
]
1
,
0
[
(
d
r
a
w
e
r
p
e
t
s
e
l
g
n
i
s
m
u
m
i
x
a
m
e
h
t
r
o
f
s
d
n
a
t
s
"
d
r
a
w
e
r
x
a
m
"
e
h
T
.
)
s
p
e
t
s
.
s
d
e
e
s
m
o
d
n
a
r
0
5
h
t
i
w
d
e
t
c
u
d
n
o
c
s
i
n
o
i
t
a
r
u
g
fi
n
o
c
n
o
i
t
a
u
l
a
v
e
h
c
a
E
.
)
0
0
4
s
i
e
d
o
s
i
p
e
h
c
a
e
r
o
f
s
p
e
t
s
f
o
r
e
b
m
u
n
m
u
m
i
x
a
m
e
h
t
(
e
d
o
s
i
p
e
n
a
n
h
t
i
i
w
d
e
n
i
a
t
b
o
20
Leveraging Jumpy Models for Planning and Fast Learning in Robotic Domains
Figure 5 | Example trajectories of "RL-HL + Planning" on tasks (top to bottom): reach_red, lift_red,
red_hover_blue, red_stack_blue, red_hover_green, red_stack_green, reach_green and lift_green.
21
|
|
http://arxiv.org/abs/2302.12606v1 | 2023-02-24T12:47:58 | 2023-02-24T12:47:58 | Retrospective Uncertainties for Deep Models using Vine Copulas | Despite the major progress of deep models as learning machines, uncertainty
estimation remains a major challenge. Existing solutions rely on modified loss
functions or architectural changes. We propose to compensate for the lack of
built-in uncertainty estimates by supplementing any network, retrospectively,
with a subsequent vine copula model, in an overall compound we call Vine-Copula
Neural Network (VCNN). Through synthetic and real-data experiments, we show
that VCNNs could be task (regression/classification) and architecture
(recurrent, fully connected) agnostic while providing reliable and
better-calibrated uncertainty estimates, comparable to state-of-the-art
built-in uncertainty solutions. | [
"Nataša Tagasovska",
"Firat Ozdemir",
"Axel Brando"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12606v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12606v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.LG",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.LG"
] | Retrospective Uncertainties for Deep Models using Vine Copulas
Nataˇsa Tagasovska
Prescient Design, Genentech
Firat Ozdemir
Swiss Data Science Center,
EPFL & ETHZ
Axel Brando
Barcelona Supercomputing Center
3
2
0
2
b
e
F
4
2
]
G
L
.
s
c
[
1
v
6
0
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract
Despite the major progress of deep models as
learning machines, uncertainty estimation re-
mains a major challenge. Existing solutions
rely on modified loss functions or architectural
changes. We propose to compensate for the
lack of built-in uncertainty estimates by sup-
plementing any network, retrospectively, with
a subsequent vine copula model, in an overall
compound we call Vine-Copula Neural Network
(VCNN). Through synthetic and real-data exper-
iments, we show that VCNNs could be task (re-
gression/classification) and architecture (recur-
rent, fully connected) agnostic while providing re-
liable and better-calibrated uncertainty estimates,
comparable to state-of-the-art built-in uncertainty
solutions.
1
INTRODUCTION
Despite the high performance of deep models in recent
years, industries still struggle to include neural networks
(NNs) in production, at fully operational levels. Such
issues originate in the lack of confidence estimates of
deterministic neural networks,
inherited by all archi-
tectures, convolutional,
recurrent, and residual ones
to name a few. Accordingly, a significant amount of
effort has been put into making NNs more trustworthy
and reliable [Lakshminarayanan et al., 2017, Gal, 2016,
Guo et al., 2017,
Tagasovska and Lopez-Paz, 2019,
Brando et al., 2019, Havasi et al., 2020]. Given their high
predictive performance, one would expect that a deep
model could also provide reasonably good confidence
estimates. however, the challenge persists in how to yield
these estimates without excessively disrupting the model,
i.e. impacting its accuracy and train/inference time.
Proceedings of the 26th International Conference on Artificial Intel-
ligence and Statistics (AISTATS) 2023, Valencia, Spain. PMLR:
Volume 206. Copyright 2023 by the author(s).
Figure 1: VCNN: We propose a plug-in vine-copula module
that can complement any neural network with uncertainty
estimates, any time after a model has been trained, without
requiring any modifications to it. Additionally, our intervals
capture both - aleatoric and epistemic uncertainty.
Typically, a NN does not quantify uncertainty, but merely
provides point estimates as predictions. The predictive un-
certainty, associated with the errors of a model, originates
from two probabilistic sources:
• an epistemic one - the data provided in the training
is not complete, i.e. certain input regions have not
been covered in the training data, or the model lacks
the capacity to approximate the true function (lack of
knowledge, hence, reducible);
• an aleatoric one, resulting from the inherent noise in
the data, hence, an irreducible quantity, but, can be
accounted for.
To use NNs for applications in any domain, it is essential
to provide uncertainty statements related to both of these
sources. Nowadays, the most popular approaches for overall
uncertainty estimation used by practitioners are MC-dropout
[Gal and Ghahramani, 2016, Kendall and Gal, 2017], en-
sembles [Lakshminarayanan et al., 2017] and Bayesian
NNs [Hern ́andez-Lobato and Adams, 2015]. Each of these
approaches comes at a price, whether in terms of accuracy
or computation time, as summarised in Table 1.
Retrospective Uncertainties for Deep Models using Vine Copulas
Table 1: Overview of popular solutions that provide model and epistemic uncertainty for deep models within a unified
framework.
No custom
loss
(cid:88)
(cid:88)
(cid:55)
(cid:88)
No custom
architecture
(cid:55)
(cid:88)
(cid:55)
(cid:88)
Single
model
(cid:88)
(cid:55)
(cid:88)
(cid:88)
Task
agnostic
(cid:88)
(cid:55)
(cid:88)
(cid:88)
Scalable
(cid:88)
(cid:55)
(cid:55)
(cid:88)1
Retrospective
uncertainties
(cid:55)
(cid:55)
(cid:55)
(cid:88)
MC-dropout
Ensembles
Bayesian NNs
Vine-Copula NNs
to alleviate those costs, re-
This work is an attempt
claiming uncertainties for any deterministic model, ret-
rospectively, by complementing it with a vine copula
[Joe and Kurowicka, 2011]. We favor vine copulas for the
flexible estimation (parametric and non-parametric) as well
as the (theoretically justified) scalability.
We use Table 1 to position the unique properties of having
vine copula uncertainty estimates. The vine copula provides
an elegant way to extend any trained network retrospectively
by quantifying both epistemic and aleatoric uncertainties,
with performance on par or better than popular baselines.
Given the undesired training costs of deeper and wider NNs,
VCNN strikes as a viable solution. which is particularly
attractive given the increasing training costs (both financial
and environmental) of NNs.
It is also important to note that although there are many
recent developments regarding the uncertainty of deep mod-
els, only a few consider the two sources (aleatoric and epis-
temic), and even fewer have a unifying framework for both
of them. This is why, in sciences and industry which re-
quire both, Bayesian NNs prevail regardless of their heavy
implementation. Motivated by this practical problem, our
contributions are as follows:
• A new methodology for recovering uncertainties in
deep models based on vine copulas (section 3),
• An implementation of plug-in uncertainty estimates
(algorithm 1),
• Empirical evaluation on real-world datasets (section 4).
2 BACKGROUND
Problem setup We consider a supervised learning setup
where X ∈ Rp is a random variable for the features,
and Y ∈ R is the target variable. We assume a process
y = f (x, (cid:15)) to be responsible for generating a dataset
D = {xi, yi}N
i=1 from which we observe realizations. We
are interested in learning a prediction model for f : X → Y.
In particular, to approximate f , we chose a (deep) neural
network, with its weights considered as model parameters
Θ. The DNN can learn a model that approximates the condi-
tional mean well, i.e ˆfΘ ∈ arg minf (cid:96)( ˆfΘ(x), y) by setting
the loss (cid:96) to mean-squared error.
Within standard statistical models, one could relate the epis-
temic uncertainty to confidence intervals (CIs) which evalu-
ate the P r(f (x)| ˆf (x)), whereas the aleatoric, noise uncer-
tainty is captured by prediction intervals (PIs) P r(y| ˆf (x)).
Both of these uncertainties contribute to the variability in
the predictions which can be expressed through entropy
or variance [Depeweg et al., 2018]. In this work, we will
use the variance σ2, as a quantity of interest unifying the
two sources of uncertainty, and represent the overall pre-
dictive uncertainty per data point by its lower bound L :=
ai),
ai) and its upper bound U := max
min
i∈N
i∈N
where a stands for aleatoric (data related uncertainty) and e
for epistemic ( model uncertainly). Our goal is to propose a
tool that recovers estimates for both the confidence and the
prediction intervals of a DNN. This natural decomposition
wrt variance will further allow for them to be combined
and used in applications as deemed most suitable2. We
summarize our method VCNN in Figure 1.
ei, σ2
ei, σ2
(σ2
(σ2
We propose Figure 2 to exemplify the sources and respective
uncertainty estimates in more detail. The observations are
following a wiggly sequential data where the true genera-
tive process is a function f (X1, X2, X3, (cid:15)) which we try to
predict with a DNN of 2 hidden layers with 50 neurons each.
Moving from left to right, the plots in Figure 2 show the
network predictions given: A) only observations from X1
as input, i.e. ˆy = ˆfΘ(x1), then ˆy = ˆfΘ(x1, x2) in B, and
ˆy = ˆfΘ(x1, x2, x3) in C. By including relevant variables
(more knowledge; more data), the fitted model improves
in each consecutive plot, visible also through its CI and
PI. This toy example shows the sensitivity of our estimates
to both sources: As the DNN gets more information, the
prediction of the model improves, its CIs improve as well
(narrower in train region, wider outside), while the PIs cap-
ture the noisiness of the data (when variables are omitted,
such as in A and B, this translates into more stochasticity,
i.e as aleatoric noise). Moreover, from Figure 2, we also see
why considering both sources is important: in the out-of-
2Different domains have different ways of adding up
or considering the two uncertainties in final applications
[Der Kiureghian and Ditlevsen, 2009]
Nataˇsa Tagasovska, Firat Ozdemir, Axel Brando
Figure 2: Confidence and Prediction intervals by VCNN in a toy regression problem. Data generated as: Ytrain =
X1 + X2 + X3 + (cid:15), with X1 = U[−2π, 2π], X2 = sin(2X1), X3 ∼ sin(X 2
1 ), with (cid:15) ∼ N (0, 0.2). For the test data
Ytrain = X1 + X2 + X3 + x1(cid:15), with X1 ∼ U[−4π, 5π], X2 = sin(X1), X3 ∼ sin(X 2
1 ), with (cid:15) ∼ N (0, 0.5). Train data
consists of 280 samples, and the test of 100. The network was trained for 100 epochs for the three presented cases.
distribution region, the confidence intervals prevail, while in
the nosier regions, the prediction intervals envelop the CI.
tribution of variables. For further details, please refer to
[Aas et al., 2009, Joe et al., 2010].
Next, we present how we envision using the natural proper-
ties of vine-copulas to account for the uncertainties of a deep
model. We assume that a DNN, ˆfΘ, has already been trained
until convergence for a specific task. Our goal is to supple-
ment the output of the already-trained network, with trust-
worthy uncertainty estimates. For efficiency and simplicity
of the method, we use the embeddings from the last hidden
layer of the network - ξ, (where ξ = h(x) ∈ Rd, d << p)
as a proxy for the overall network parameters.
2.1 Copulas and Vines
According to Sklar's theorem [Sklar, 1959], the joint density
of any bivariate random vector (X1, X2), can be expressed
as
f (x1, x2) = f1(x1)f2(x2)c(F1(x1), F2(x2))
(1)
3 are the marginal densities, Fi the marginal dis-
where fi
tributions, and c the copula density. That is, any bivariate
density is uniquely described by the product of its marginal
densities and a copula density, which is interpreted as the
dependence structure. Figure 3 illustrates all of the compo-
nents representing the joint density. As a benefit of such fac-
torization, by taking the logarithm on both sides, one could
straightforwardly estimate the joint density in two steps, first
for the marginal distributions, and then for the copula. Cop-
ulas are widely used in finance and operation research, and,
in the machine learning community have recently been inte-
grated with deep models for generative and density estima-
tion purposes [Tagasovska et al., 2019, Janke et al., 2021,
Drouin et al., 2022, Ng et al., 2022]. Hence, copulas pro-
vide means to flexibly specify the marginal and joint dis-
3In this section, we use the standard notation for densities (f )
and distributions (F ) as in the copula literature
There exist many parametric representations through dif-
ferent copula families, however, to leverage even more
flexibility, in this paper, we focus on kernel-based non-
parametric copulas of [Geenens et al., 2017]. Equation 1
can be generalized and holds for any number of variables.
To be able to fit densities of more than two variables,
we make use of the pair copula constructions, namely
vines; hierarchical models, constructed from cascades of
bivariate copula blocks [Nagler et al., 2017]. According to
[Joe, 1997, Bedford and Cooke, 2002], any d dimensional
copula density can be decomposed into a product of d(d−1)
bivariate (conditional) copula densities. Although such fac-
torization may not be unique, it can be organized in a graph-
ical model, as a sequence of d − 1 nested trees, called vines.
We denote a tree as Tm = (Vm, Em) with Vm and Em the
sets of nodes and edges of tree m for m = 1, . . . , d − 1.
Each edge e is associated with a bivariate copula. An exam-
ple of a vine copula decomposition is given Figure 4.
2
In practice, in order to construct a vine, one has to choose
two components:
1. the structure, the set of trees Tm = (Vm, Em) for
m = 1, . . . , d − 1
2. the pair-copulas, the models for cje,ke|De for e ∈ Em
and m = 1, . . . , d − 1.
Corresponding algorithms exist for both of those steps and
in the rest of the paper, we assume consistency of the vine
copula estimators for which we use the implementation by
[Nagler and Vatter, 2018a].
Retrospective Uncertainties for Deep Models using Vine Copulas
3 VINE-COPULA UNCERTAINTY
ESTIMATES
3.1 Simulation-based Confidence Intervals
Besides being a flexible density estimation method,
(vine) copulas additionally have generative properties
[Dissmann et al., 2013]. That means that once a copula
is fit on a data distribution, it can be used to produce ran-
dom observations from it. Although mainly used for stress
testing in the finance domain, this property of copulas has
recently been recognized as a useful high dimensional gen-
erative model for images [Tagasovska et al., 2019]. Hence,
this served as an inspiration to use vine copulas to bootstrap
the network parameters, yielding confidence intervals for its
predictions via simulations. Simulation-based approaches
for confidence intervals have previously been used in the
literature for smoothing splines [Ruppert et al., 2003].
Following a similar approach to [Ruppert et al., 2003], we
consider the true function f over L locations in x, l =
{l1, l2, . . . lL}, fl denoting the vector of evaluations of f at
each of those locations, and the corresponding estimate of
the true function by the trained DNN as ˆfΘl . The difference
between the true function and our unbiased4 estimator is
given by:
ˆfΘl − fl = Hl
(cid:2) ˆΘ − Θ (cid:3)
where Hl is the evaluation of the DNN at the locations
l, and the expression in brackets represents the variation
in the estimated network parameters. The distribution of
the variation is unknown, and we aim to approximate it
by simulation.: A 100(1 − α)% simultaneous confidence
interval is:
ˆfl ± q1−α ˆσ[( ˆf (lj) − f (lj)]L
j=1
(2)
where σ denotes a standard deviation and q1−α is the 1 − α
quantile of the random variable:
(cid:12)
(cid:12)
(cid:12)
sup
x∈X
ˆf (x)−f (x)
ˆσ( ˆf (x))−f (x)
(cid:12)
(cid:12)
(cid:12) ≈ max
1≤j≤L
(cid:12)
(cid:12)
(cid:12)
(cid:12)
(cid:105)
(cid:104) ˆΘ − Θ
Hl
j
ˆσ ˆf (lj )−f (lj ))
(cid:12)
(cid:12)
(cid:12)
(cid:12)
.
(3)
The sup refers to the supremum or the least upper bound;
which is the least value of x from the set of all values which
we observed, which is greater than all other values in the
subset. Commonly, this is the maximum value of the subset,
as indicated by the right-hand side of the equation. Hence
we want the maximum (absolute) value of the ratio over-
all values in l. The fractions in both sides of the equation
correspond to the standardized deviation between the true
4We consider a network of sufficient capacity such that it can
approximate any function (considering NNs as universal approx-
imators [Hornik, 1991]), hence, we exclude the model to true
function bias and consider only the variability of the models' pa-
rameters with respect to the data.
Figure 3: Expressing joint densities with copulas.
Figure 4: Multivariate joint density factorized with a vine
copula.
function and the model estimate, and we consider the max-
imum absolute standardized deviation. While we do not
have access to the distribution of the deviations, we only
need its quantiles that we can approximate via simulations.
Herein, we exploit the generative nature of copulas whereby
we "bootstrap" the trained DNN with the vine copula fitted
over the embeddings ξ = h(x) (the embeddings of a data
point x in the last hidden layer) and target y. For each
simulation, we find the maximum deviation of the (re)-fitted
functions from the true function over the grid of l values we
are considering.
As the last step, we find the critical value to scale the stan-
dard errors SE such that they yield the simulation interval;
we calculate the critical value r for a 95% simulation con-
fidence interval using the empirical quantile of the ranked
standard errors. Finally, we recover the upper and lower
epistemic bounds obtained as:
yU e/yLe = ˆfΘ(x) ± r ∗ SE(Hl
(cid:2) ˆΘ − Θ (cid:3))
.
(4)
4Vine Copulas are theoretically designed to deal with high-
dimensional spaces [Nagler et al., 2019].
marginalscopula+joint distributionX1X2X3X1|X2X2|X3X4X4|X3X1, X3|X2X2, X4|X3Tree 1unconditional copulasmarginalsTree 2conditionalcopulasTree 3conditional copulasc12c23c34c24|3c13|2c1,4|2,3f1f2f3f4Nataˇsa Tagasovska, Firat Ozdemir, Axel Brando
3.2 Conditional-quantile Prediction Intervals
In the case of predictive aleatoric uncertainty, we
are interested in estimating the conditional distribu-
tion of the target variable given the inputs F (Y |X),
which is captured by conditional quantiles of interest
[Tagasovska and Lopez-Paz, 2019]. Since we are aiming
for a unified framework for uncertainties, we wish to also
derive the necessary quantile predictions from vine-copula
representations. To do so, we use the recent development by
[Nagler and Vatter, 2018b] which shows that conditional ex-
pectations can be replaced by unconditional ones, and such
property can be used to leverage copulas for solving regres-
sion problems. This approach allows for new estimators of
various nature, such as mean, quantile, expectile, exponen-
tial family, and instrumental variable regression, all based
on vine-copulas. Regression problems can be represented
as solving equations:
E{gφ(Y )|X} = 0
where φ is a parameter of interest and the set G = {gφ : φ ∈
Φ} is a family of identifying functions. Conditional expec-
tations can be replaced by the less challenging to estimate,
unconditional ones as follows:
E{gφ(Y )|X} = E{gφ(Y )w∗(Y )}
with
w∗(y) =
dFY |X (y|x)
dFY (y)
=
dFY,X (Y, X)
dFX (x)dFY (y)
.
(5)
Given the background on copulas, we see that the weights
in Equation 5 can be expressed with:
w∗(y) =
dCY,X (FY (y), FX (x))
dFCX (FX (x))dFCY (FY (y))
.
This expression can be further simplified by drop-
ping CX as it does not depend on y or φ, and be-
cause copulas have uniform margins; we are left with
w∗(y) = dCY,X (FY (y), FX (x)). As exemplified in
[Nagler and Vatter, 2018b], with different identifying func-
tions gφ, we get estimators ˆφ = ˆφ(Y1, X1, . . . , Yn, Xn)
to various conditional distributions as solutions to
1
i=1 gφ(Yi)w(Yi) = 0 . Here, we rely on solving esti-
n
mating equations when the identifying function gφ is suit-
able for quantile regression. We thus let:
(cid:80)N
φτ = F −1
Y |X (τ |X = x)
be the conditional τ −quantile for τ ∈ (0, 1), all levels con-
sidered jointly. Using this knowledge, and the embeddings
ξ as conditioning variables, we are now able to compute
the upper and lower bound of a required (1 − α) prediction
interval, by obtaining:
yU a = F −1
Y |ξ((1 − α
2 )|ξ)
yLa = F −1
Y |ξ(( α
2 )|ξ)
(6)
solving this conditional expectation using vine copulas. In
practice, we use the recent implementation from the eecop
package [Nagler and Vatter, 2020].
With the expressions capturing both uncertainty estimates,
we finally summarize our method VCNN, computing both
epistemic and aleatoric uncertainties per data point in Algo-
rithm 1.
;
j=1
j}L
i=1, test
Algorithm 1: Vine-copula DNN uncertainty estimates.
Inputs: DNN ˆfΘ, train samples {xi, yi}N
samples {x(cid:48)
Step 1. Obtain embeddings from the last dense layer,
before the activations, ξ = {h(xi)}N
Step 2. Fit a vine copula with the embeddings and
target variable, V := C(ξ1, ξ2, . . . ξd, y). ;
Epistemic uncertainty ;
Step 3. For S repetitions:
i=1 ∈ Rd;
1. Sample random observations from the vine V ,
{ξ∗, y∗}.
2. Re-train the last hidden and the output layer of ˆfΘ
with {ξ∗, y∗} .
3. Save the bootstraped S heads5of the network.
Step 4. Compute the confidence interval (CI) bounds:
yLe(x(cid:48)) and yU e(x(cid:48)) with Equation 4. ;
Aleatoric uncertainty ;
Step 5. Compute the prediction interval (PI) bounds:
yLa(x(cid:48)
j) and yU a(x(cid:48)
quantiles F −1
1− α
2
vine V with Equation 6.
Outputs S-heads, vine copula V , confidence and
prediction intervals for x(cid:48).
j) by solving for the required
(Y |ξ(x(cid:48))) and F −1
(Y |ξ(x(cid:48))) using
α
2
4 EXPERIMENTS
To empirically evaluate our method we propose three se-
tups: synthetic toy examples for regression and classi-
fication, and, two real-world datasets: Datalakes - esti-
mating the surface temperature of Lake Geneva based
on sensor measurements, hydrological simulations and
satellite imagery, and an AirBnB apartment price fore-
In all cases we wish to estimate the
casting dataset.
predictive uncertainty, hence, we account for both epis-
temic and aleatoric uncertainty sources. As baselines,
5We use the term "heads" here as our bootstrapped layers are
similar in architecture to the concept of multi-head networks.
Retrospective Uncertainties for Deep Models using Vine Copulas
Figure 5: VCNN for toy regression and classification scenarios.
we use Deep Ensembles [Lakshminarayanan et al., 2017],
MC-dropout [Kendall and Gal, 2017] and Bayesian NN
[Hern ́andez-Lobato and Adams, 2015], all adjusted to cap-
ture the two types of uncertainties,
simultaneously.
Our code and demo for VCNN are available on
https://github.com/tagas/vcnn.
Metrics To compare baselines we use the number of
points captured by the prediction intervals (PI), which
should capture some desired proportion of the observations,
(1 − α).
P r(ˆyLi ≤ yi ≤ ˆyU i) = (1 − α)
In all experiments except if stated otherwise, we target the
common choice α = 0.05. To evaluate the quality of the
PIs, similarly to [Pearce et al., 2018], we denote a vector, k,
of length n which represents whether each data point has
been captured by the estimated PIs, with NO ki ∈ [0, 1]
given by,
ki =
(cid:40)
1,
0,
yLi ≤ yi ≤ yU i
if
otherwise.
We denote the total number of points captured as c =
(cid:80)n
i=1 ki. With this, we can now define the two main metrics
we will use:
• The Prediction Interval Coverage Probability -
P ICP := c
n , - which indicates how many of the ob-
servations are captured inside the estimated interval. A
coverage closer to the desired proportion (set by α) is
preferred;
• The Mean Prediction Interval Width -
M P IW :=
1
n
n
(cid:88)
i=1
ˆyU i − ˆyLi,
- which indicates how tight are the predicted intervals,
where lower values are better.
Baselines
In general, the proposed baselines (Ensembles
and MC Dropout) capture the epistemic and aleatoric un-
certainty jointly. Regarding the aleatoric uncertainty, these
baselines consider DNN with outputs being the conditional
parameters of a normal distribution, N (μΘ, σΘ). On the
other hand, each baseline models the epistemic uncertainty
in a different way (due to random initialisation).
For the sake of a fair comparison, we let both baseline
functions, N (μΘ, σΘ) have as input the embedding of the
last dense layer, ξ, 6 similar to Algorithm 1.
6This decision was made after verifying empirically that the
results were similar considering x or ξ as input of the baseline
functions.
2101220246Deterministic NNdataDNN prediction210124202468VCNN EpistemicSimultaneous CI2101220246VCNN Aleatoric95% PI105051010.07.55.02.50.02.55.07.510.0105051010.07.55.02.50.02.55.07.510.0105051010.07.55.02.50.02.55.07.510.0150100500501001500.51.01.52.02.53.03.50246810Nataˇsa Tagasovska, Firat Ozdemir, Axel Brando
(Ensemble+N) consists
Heteroscedastic Deep Ensemble
of a set of S functions pairs, {(μΘ,i, σΘ,i)}S
i=1, such that
each pair is trained (1) on a different split from the training
data set and (2) with different parameters initialization, in
order to maximize the diversity between the individual pairs
(which also includes the bootstrap[Ganaie et al., 2021]).
(MCDrop+N)
Heteroscedastic Monte-Carlo Dropout
outputs the pair, {(μΘ,i, σΘ,i)}S
i=1, where each i corre-
sponds to a different, randomly selected connection, imple-
mented as dropout layers. Differently than the Ensemble+N,
here we considered the whole training set as proposed in
[Gal and Ghahramani, 2016].
Bayesian Neural Network (Bayesian NN+N) outputs the
pair, {(μΘ,i, σΘ,i)}S
i=1, where each i corresponds to a dif-
ferent, randomly selected sample from the random variables
associated to all neuron weights. In particular, this ran-
dom variable has a prior and posterior normal distribution
optimized via variational inference [Graves, 2011].
4.1 Toy example
In Figure 5 we include the evaluation of VCNN on toy ex-
amples. The first row is a one-dimensional input bi-modal
regression task, while the second row is a classification
task for a two-dimensional input, namely the moons dataset.
We show the results from a deterministic DNN (predic-
tions and class probabilities respectively) in the first column,
the epistemic uncertainty estimate in the second, and the
aleatoric uncertainty estimate in the third obtained with vine
copulas. For the classification task, since the input is two-
dimensional, we present the uncertainty scores through a
color range, depicting the distance between the upper and
lower bounds of the corresponding CI or PI. We consider
these classification results encouraging, since both the epis-
temic uncertainty grows further away from the train data,
and the aleatoric uncertainty is high only in the region where
there is an overlap between the two classes, as expected.
4.2 Datalakes
Datalakes7 tackles certain data-driven problems such as
estimating lake surface temperature given a range of
sensory, satellite imagery, and simulation-based datasets.
One such dataset is of Lake Geneva where a sparse
hourly dataset is collected between years 2018 to 2020.
Given the temporal nature of the observations, the model
that provided the best prediction was a bidirectional
(Bi)[Schuster and Paliwal, 1997]
long short-term mem-
ory (LSTM)[Hochreiter and Schmidhuber, 1997] network.
Originally, this method uses MC-dropout in addition to a
negative log-likelihood loss as in [Kendall and Gal, 2017].
We replace those uncertainties with the vine based ones
7https://www.datalakes-eawag.ch
and we present our results in Table 4.2. Comparisons with
ensemble methods were omitted due to both computational
restrictions and the MC-dropouts method being a compara-
ble proxy. From Table 4.2 we see that the VCNN achieves
on-par estimates for PICP with (significantly) narrower in-
terval widths as suggested by the MPIW. The measuring
unit is Celsius degrees.
Table 2: PICP and MPIW values for VCNN and baselines
for the real-world datalakes dataset. Note that the very
long training of the biLSTM network did not allow for
multiple executions for obtaining std variations or results
from ensembles.
BiLSTM
Train
Test
PICP MPIW PICP MPIW
VCNN
.97
MC-Dropout+N .94
5.71
6.97
.85
.86
5.84
6.88
4.3 Room price forecasting
Based on publicly available data from the Inside Airbnb
platform [Cox, 2019], for Barcelona, we followed a regres-
sion problem proposed in [Brando et al., 2019]. The aim
is to predict the price per night for 36, 367 flats using data
from April 2018 to March 2019. The architecture used is a
DenseNet, detailed in the Supplementary Material section.
From Table 3 we notice that the plug-in estimates of VCNN
outperform the Bayesian NNs, ensembles and MC-dropout -
VCNN intervals are properly calibrated (targeting the 95%)
and they are tighter by at least a half. The measurement unit
here is euros.
Table 3: PICP and MPIW (mean and std. dev) for VCNN
and baselines for the real-world Airbnb dataset.
DenseNet
Train
Test
PICP
MPIW
PICP
MPIW
Bayesian NN+N .99 ± .00
MC-Dropout+N .99 ± .00
.99 ± .00
Ensemble+N
.97 ± .01
VCNN
698.45 ± 93.
468.03 ± 49.
433.25 ± 27.
226.8 ± 4.4
.99 ± .00
.99 ± .00
.98 ± .00
.95 ± .00
645.55 ± 73.
514.15 ± 72.
468.95 ± 31.
191.33 ± 3.0
4.4 Evaluating the quality of uncertainty intervals
Additionally, we can evaluate the quality of the reported
uncertainty by leveraging this information as a confidence
score. To accomplish this, we analyze an error-retention
curve [Brando, 2022]. This curve involves computing the
normalized cumulative absolute errors in ascending order
of their corresponding uncertainty scores, such that the indi-
vidual error with the highest uncertainty score with respect
Retrospective Uncertainties for Deep Models using Vine Copulas
Figure 6: Error-retention curves - considering the mean cumulative error for the most confident points and sorting using the
uncertainty scores -, which are produced by the baselines and the VCNN (see [Brando et al., 2018, Brando, 2022])
.
ensure proper behavior of the predicted quantiles, by plot-
ting the model's predictions against the empirical quantile
values. The results in Figure 7 show that VCNN forecasts
are closer to the perfect calibration line while Ensembles,
MC dropout, and Bayesian NNs underestimate quantiles
lower than the median and are overconfident for quantiles
above 0.5.
4.5 Practical considerations for the vine copulas
Complexity The complexity for fitting the vine copulas
as currently implemented is approximate O(n × dim ×
vinedepth) for estimation/sampling algorithms, both in-
volving a double loop over-dimension/truncation level with
an internal step scaling linearly with the sample size. Due to
this linear scaling in the number of samples and dimensions,
we found it useful to randomly subsample the train data and
use truncated vines. The runtimes of VCNN could greatly
benefit of implementation optimizations, however, this is
outside of the scope of the current work.
Figure 7: Calibration curves of the baselines and the VCNN
using their forecasted quantiles (see [Brando et al., 2022]).
to the selected ordering method appears at the end of the list.
Moreover, we observe in Figure 6, that the VCNN exhibits
an error-retention curve that consistently approximates the
perfect curve, to a greater extent than other baselines. This
plot reads as follows: with a perfect confidence score, we
can retain 80% of the data points and expect an MAE of 14
euros. For the same amount of data, with VCNN we expect
MAE of 18 euros, and with all other baselines MAE > 25.
Finally, since for the AirBnB dataset all baselines can be
trained in a reasonable time (including ensembles), we show
a calibration plot in Figure 7. Calibration lines are crucial to
Hyperparameters Although the vine structure and the
copula family could be considered as hyperparameters, em-
pirically we observed that the best results are obtained when
we use nonparametric family with a low multiplier for the
kernel width, i.e. 0.1, for both the confidence and prediction
intervals. For computational purposes, we also chose to
truncate the vine, that is to fit only the first 2 - 5 trees in the
vine and consider all the subsequent ones as independent
copulas. These factors can indeed appear as more important
for other datasets and we are conducting multiple ablation
studies to explore this further.
Nataˇsa Tagasovska, Firat Ozdemir, Axel Brando
5 CONCLUSION
In this work, we present new, plug-in uncertainty estimates
for neural networks using vine copulas which can be applied
to any network retrospectively. Importantly, our estimates
do not impact the performance of the original model in any
way, while they manage to enhance it with faithful predictive
confidence measures. This is particularly attractive given
the increasing training costs (financial and environmental)
with deeper and wider NNs.
We hope our method can help in increasing the trustworthi-
ness of deep models, specifically for real-world scenarios
which render critical decision-making. There are multiple
directions for extensions: out-of-distribution detection meth-
ods in classification tasks underlying different architectures
(image, graph), and, we expect VCNN to improve results in
other tasks relying on uncertainties, such as segmentation
or active learning.
Acknowledgments
The research leading to these results has received fund-
ing from the Horizon Europe Programme under the SAF-
EXPLAIN Project (www.safexplain.eu), grant agreement
num. 101069595 and the European Research Council (ERC)
under the European Union's Horizon 2020 research and
innovation programme (grant agreement No. 772773).
Additionally, this work has been partially supported by
Grant PID2019-107255GB-C21 funded by MCIN/AEI/
10.13039/501100011033.
References
[Aas et al., 2009] Aas, K., Czado, C., Frigessi, A., and
Bakken, H. (2009). Pair-copula constructions of multiple
dependence. Insurance: Mathematics and economics,
44(2):182–198.
[Bedford and Cooke, 2002] Bedford, T. and Cooke, R. M.
(2002). Vines – A New Graphical Model for Dependent
Random Variables. The Annals of Statistics, 30(4):1031–
1068.
[Brando, 2022] Brando, A. (2022). Aleatoric Uncertainty
Modelling in Regression Problems using Deep Learning.
Barcelona university press.
[Brando et al., 2022] Brando, A., Gimeno, J., Rodriguez-
Serrano, J., Vitri`a, J., et al. (2022). Deep non-crossing
quantiles through the partial derivative. In International
Conference on Artificial Intelligence and Statistics, pages
7902–7914. PMLR.
noisy series. In Joint European Conference on Machine
Learning and Knowledge Discovery in Databases, pages
325–340. Springer.
[Brando et al., 2019] Brando, A., Rodr ́ıguez-Serrano, J. A.,
Vitria, J., and Rubio, A. (2019). Modelling heteroge-
neous distributions with an uncountable mixture of asym-
metric laplacians. NeurIPS.
[Cox, 2019] Cox, M. (2019). Inside airbnb: adding data to
the debate. Inside Airbnb [Internet].[cited 16 May 2019].
Available: http://insideairbnb.com.
[Depeweg et al., 2018] Depeweg, S., Hernandez-Lobato,
J.-M., Doshi-Velez, F., and Udluft, S. (2018). Decom-
position of uncertainty in Bayesian deep learning for
efficient and risk-sensitive learning. In ICML.
[Der Kiureghian and Ditlevsen, 2009] Der Kiureghian, A.
and Ditlevsen, O. (2009). Aleatory or epistemic? does it
matter? Structural Safety.
[Dissmann et al., 2013] Dissmann, J., Brechmann, E. C.,
Czado, C., Kurowicka, D., Dissmann, J., Brechmann,
E. C., Czado, C., and Kurowicka, D. (2013). Select-
ing and estimating regular vine copulae and application
to financial returns. Computational Statistics & Data
Analysis, 59:52–69.
[Drouin et al., 2022] Drouin, A., Marcotte, ́E., and Chapa-
dos, N. (2022). Tactis: Transformer-attentional copulas
for time series. In International Conference on Machine
Learning, pages 5447–5493. PMLR.
[Gal, 2016] Gal, Y. (2016). Uncertainty in Deep Learning.
PhD thesis, University of Cambridge.
[Gal and Ghahramani, 2016] Gal, Y. and Ghahramani, Z.
(2016). Dropout as a bayesian approximation: Repre-
senting model uncertainty in deep learning. In ICML.
[Ganaie et al., 2021] Ganaie, M. A., Hu, M., et al. (2021).
Ensemble deep learning: A review. arXiv preprint
arXiv:2104.02395.
[Geenens et al., 2017] Geenens, G., Charpentier, A., and
Paindaveine, D. (2017).
Probit transformation for
nonparametric kernel estimation of the copula density.
Bernoulli, 23(3):1848–1873.
[Graves, 2011] Graves, A. (2011). Practical variational
inference for neural networks. Advances in neural infor-
mation processing systems, 24.
[Brando et al., 2018] Brando, A., Rodr ́ıguez-Serrano, J. A.,
Ciprian, M., Maestre, R., and Vitri`a, J. (2018). Uncer-
tainty modelling in deep networks: Forecasting short and
[Guo et al., 2017] Guo, C., Pleiss, G., Sun, Y., and Wein-
berger, K. Q. (2017). On calibration of modern neural
networks. ICML.
Retrospective Uncertainties for Deep Models using Vine Copulas
[Havasi et al., 2020] Havasi, M., Jenatton, R., Fort, S., Liu,
J. Z., Snoek, J., Lakshminarayanan, B., Dai, A. M., and
Tran, D. (2020). Training independent subnetworks for
robust prediction. arXiv preprint arXiv:2010.06610.
[Nagler and Vatter, 2020] Nagler, T. and Vatter, T. (2020).
eecop: an R Package to Solve Estimating Equations with
Copulas. https://github.com/tnagler/eecop R package
version 0.0.1.
[Hern ́andez-Lobato and Adams, 2015] Hern ́andez-
[Ng et al., 2022] Ng, Y., Hasan, A., and Tarokh, V. (2022).
Inference and sampling for archimax copulas.
[Pearce et al., 2018] Pearce, T., Zaki, M., Brintrup, A., and
Neely, A. (2018). High-Quality Prediction Intervals for
Deep Learning: A Distribution-Free, Ensembled Ap-
proach. In ICML.
[Ruppert et al., 2003] Ruppert, D., Wand, M. P., and Car-
roll, R. J. (2003). Semiparametric regression. Number 12.
Cambridge university press.
[Schuster and Paliwal, 1997] Schuster, M. and Paliwal,
K. K. (1997). Bidirectional recurrent neural networks.
IEEE transactions on Signal Processing, 45(11):2673–
2681.
[Sklar, 1959] Sklar, A. (1959). Fonctions de R ́epartition `a
n Dimensions et Leurs Marges. Publications de L'Institut
de Statistique de L'Universit ́e de Paris, 8:229–231.
[Tagasovska et al., 2019] Tagasovska, N., Ackerer, D., and
Vatter, T. (2019). Copulas as high-dimensional generative
models: Vine copula autoencoders. NeurIPS 2019.
[Tagasovska and Lopez-Paz, 2019] Tagasovska, N. and
Lopez-Paz, D. (2019). Single-model uncertainties for
deep learning. NeurIPS.
Lobato, J. M. and Adams, R. (2015). Probabilistic
backpropagation for scalable learning of bayesian neural
networks. In ICML.
[Hochreiter and Schmidhuber, 1997] Hochreiter, S. and
Schmidhuber, J. (1997). Long short-term memory. Neu-
ral computation, 9 8:1735–80.
[Hornik, 1991] Hornik, K. (1991). Approximation capabil-
ities of multilayer feedforward networks. Neural Net-
works, 4(2):251–257.
[Janke et al., 2021] Janke, T., Ghanmi, M., and Steinke, F.
(2021). Implicit generative copulas. Advances in Neural
Information Processing Systems, 34:26028–26039.
[Joe, 1997] Joe, H. (1997). Multivariate Models and De-
pendence Concepts. Chapman & Hall/CRC.
[Joe and Kurowicka, 2011] Joe, H. and Kurowicka, D.
(2011). Dependence modeling: vine copula handbook.
World Scientific.
[Joe et al., 2010] Joe, H., Li, H., and Nikoloulopoulos,
A. K. (2010). Tail dependence functions and vine copulas.
Journal of Multivariate Analysis, 101(1):252–270.
[Kendall and Gal, 2017] Kendall, A. and Gal, Y. (2017).
What uncertainties do we need in bayesian deep learning
for computer vision? In NeurIPS.
[Lakshminarayanan et al., 2017] Lakshminarayanan, B.,
Pritzel, A., and Blundell, C. (2017). Simple and scalable
predictive uncertainty estimation using deep ensembles.
In NeurIPS.
[Nagler et al., 2019] Nagler, T., Bumann, C., and Czado,
C. (2019). Model selection in sparse high-dimensional
vine copula models with an application to portfolio risk.
Journal of Multivariate Analysis, 172:180–192.
[Nagler et al., 2017] Nagler, T., Schellhase, C., and Czado,
C. (2017). Nonparametric estimation of simplified vine
copula models: comparison of methods. Dependence
Modeling, 5(1):99–120.
[Nagler and Vatter, 2018a] Nagler, T. and Vatter, T.
(2018a). kde1d: Univariate Kernel Density Estimation.
R package version 0.2.1.
[Nagler and Vatter, 2018b] Nagler, T. and Vatter, T.
(2018b). Solving estimating equations with copulas.
arXiv preprint arXiv:1801.10576.
Nataˇsa Tagasovska, Firat Ozdemir, Axel Brando
6 SUPPLEMENTARY MATERIAL
6.1 Example of a Vine Copula
A sequence is a vine if it satisfies the set of conditions which guarantee that the decomposition represents a valid joint
density: i) T1 is a tree with nodes V1 = {1, . . . , d} and edges E1 ii) For m ≥ 2, Tm is a tree with nodes Vm = Em−1
and edges Em iii) Whenever two nodes in Tm + 1 are joined by an edge, the corresponding edges in Tm must share a
common node. The corresponding tree sequence is the structure of the vine. Each edge e is associated to a bivariate
copula cje,ke|De , with the set De ∈ {1, * * * , d} and the indices je, ke ∈ {1, * * * , d} forming respectively its conditioning
set and the conditioned set. Finally, the joint copula density can be written as the product of all pair-copula densities
c(u1, * * * , ud) = (cid:81)d−1
cje,ke|De(uje|De , uke|De ) where uje|De = P [Uje ≤ uje | UDe = uDe ] and similarly for
uje|De, with UDe = uDe understood as component-wise equality for all components of (U1, . . . , Ud) and (u1, . . . , ud)
included in the conditioning set De.
e∈Em
m=1
(cid:81)
For self-contained manuscript, we borrow from [Tagasovska et al., 2019], a full example of an R-vine for a 5-dimensional
density.
Example:
The density of a PCC corresponding to the tree sequence in Figure 8 is
c = c1,2 c1,3 c3,4 c3,5 c2,3|1 c1,4|3 c1,5|3c2,4|1,3 c4,5|1,3 c2,5|1,3,4,
(7)
where the colors correspond to the edges E1, E2, E3, E4.
Figure 8: A vine tree sequence: the numbers represent the variables, x, y the bivariate distribution of x and y, and x, y|z the
bivariate distribution of x and y conditional on z. Each edge corresponds to a bivariate pair-copula in the PCC.
6.2 Details of the toy experiment in Figure 2
The toy example in Figure 2 is generated as: Ytrain = X1 + X2 + X3 + (cid:15), with X1 = U[−2π, 2π], X2 = sin(2X1),
X3 ∼ sin(X 2
1 ), with (cid:15) ∼ N (0, 0.2). For the test data Ytrain = X1 + X2 + X3 + x1(cid:15), with X1 ∼ U[−4π, 5π],
X2 = sin(X1), X3 ∼ sin(X 2
1 ), with (cid:15) ∼ N (0, 0.5). Furthermore, the train data consists of 280 samples, and the test data
Retrospective Uncertainties for Deep Models using Vine Copulas
of 100. The network was trained for 100 epochs for the three presented cases, using Adam optimizer with default PyTorch
parameters. We use S=30 to get the confidence intervals and τlow = 0.025 and τhigh = 0.975 for the prediciton intervals.
6.3 Details BiLSTM implementation - Datalakes
Pre-RNN fully connected layers: 1 layer × 32 units, LeakyReLU (α = 0.2)
RNN layers: 3 LSTM layers × 32 units each and bidirectional (× 2 )
Dimensionality of last hidden layer: 64
Train and test data dimensions: 214,689 and 186,129 samples of 18 dimensions
Dropout level: 0.3
Rough estimate of train time: 6 days
VC fit time: 2634.29 sec;
VC inference time per data point: 2.1 sec
number of VC bootstraps: 15
Framework: Tensorflow 2.4.1
Due to the longer training times of the BiLSTM model and limited time and resources, we were not able to obtain standard
variations of the results. Same reasoning goes for not recommending and including ensembles.
6.4 Details DenseNet implementation - AirBnB
The architecture used for the main DenseNet is the same that the proposed in [Brando et al., 2019]. Additionally, the
different models proposed in this article satisfies the following parameters and results:
Number of layers: 6 dense layers
Number of neurons per layer: 120, 120, 60, 60, 10 and 1
Training time: 30.4 secs
Activation types: ReLU activation for hidden layers
Dimensionality of last hidden layer used by the VC: 10
Training , validation and test data dimensions: 29078, 3634 and 3633 respectively.
VC estimates train time: 1861.09 ± 115.91 secs.
Time of the VC predicting each point: 1.53 ± 3 * 10−3 secs
Number of VC bootstraps: 10
Framework: Tensorflow 2.3
|
|
http://arxiv.org/abs/2302.12604v2 | 2023-04-11T01:28:57 | 2023-02-24T12:40:28 | Neural Laplace Control for Continuous-time Delayed Systems | Many real-world offline reinforcement learning (RL) problems involve
continuous-time environments with delays. Such environments are characterized
by two distinctive features: firstly, the state x(t) is observed at irregular
time intervals, and secondly, the current action a(t) only affects the future
state x(t + g) with an unknown delay g > 0. A prime example of such an
environment is satellite control where the communication link between earth and
a satellite causes irregular observations and delays. Existing offline RL
algorithms have achieved success in environments with irregularly observed
states in time or known delays. However, environments involving both irregular
observations in time and unknown delays remains an open and challenging
problem. To this end, we propose Neural Laplace Control, a continuous-time
model-based offline RL method that combines a Neural Laplace dynamics model
with a model predictive control (MPC) planner--and is able to learn from an
offline dataset sampled with irregular time intervals from an environment that
has a inherent unknown constant delay. We show experimentally on
continuous-time delayed environments it is able to achieve near expert policy
performance. | [
"Samuel Holt",
"Alihan Hüyük",
"Zhaozhi Qian",
"Hao Sun",
"Mihaela van der Schaar"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12604v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12604v2",
"@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",
"cs.RO",
"stat.ML",
"I.2.6; I.2.5; E.1"
] | Neural Laplace Control for Continuous-time Delayed Systems
3
2
0
2
r
p
A
1
1
]
G
L
.
s
c
[
2
v
4
0
6
2
1
.
2
0
3
2
:
v
i
X
r
a
Samuel Holt
University of Cambridge
[email protected]
Alihan H ̈uy ̈uk
University of Cambridge
[email protected]
Zhaozhi Qian
University of Cambridge
[email protected]
Hao Sun
University of Cambridge
[email protected]
Mihaela van der Schaar
University of Cambridge & The Alan Turing Institute
[email protected]
Abstract
Many real-world offline reinforcement learning
(RL) problems involve continuous-time environ-
ments with delays. Such environments are char-
acterized by two distinctive features: firstly, the
state x(t) is observed at irregular time intervals,
and secondly, the current action a(t) only affects
the future state x(t + τ ) with an unknown delay
τ > 0. A prime example of such an environ-
ment is satellite control where the communica-
tion link between earth and a satellite causes ir-
regular observations and delays. Existing offline
RL algorithms have achieved success in environ-
ments with irregularly observed states in time or
known delays. However, environments involving
both irregular observations in time and unknown
delays remains an open and challenging prob-
lem. To this end, we propose Neural Laplace
Control, a continuous-time model-based offline
RL method that combines a Neural Laplace dy-
namics model with a model predictive control
(MPC) planner-and is able to learn from an of-
fline dataset sampled with irregular time inter-
vals from an environment that has a inherent un-
known constant delay. We show experimentally
on continuous-time delayed environments it is
able to achieve near expert policy performance.
1
INTRODUCTION
Online Reinforcement learning methods struggle to be
applied to many real-world environments, for example
in healthcare, business, and autonomous driving environ-
Proceedings of the 26th International Conference on Artificial
Intelligence and Statistics (AISTATS) 2023, Valencia, Spain.
PMLR: Volume 206. Copyright 2023 by the author(s).
ments. RL methods rely on costly trial-and-error ap-
proaches performed either online or in a realistic simulator
of the environment-which are not often readily available.
In contrast, "offline" model-based reinforcement learning
learns the environment dynamics, from a previously col-
lected dataset of state-action trajectories, which is often
readily available. It then controls the system to a desired
goal using any suitable planning method, such as training
a policy (Fujimoto et al., 2018) or using a model predictive
controller (MPC) (Williams et al., 2016).
In practice, real-world environments are continuous in time
by nature and possess constant delays τ whereby either ac-
tions are not executed instantaneously a(t + τ ), or states
are not observed instantaneously x(t + τ ) (we formally de-
fine these later, in Section 3). For instance, in healthcare,
observing a treatment effect a(t) from giving a patient a
medication is not observable instantaneously and is instead
delayed x(t+τ ), whilst measurements may be measured at
irregular time intervals, x(t + ∆i), ∆i (cid:54)
= ∆j-as is com-
mon where the frequency of observations is indicative of
the patient's medical status (Goldberger et al., 2000). Sim-
ilarly in autonomous driving it can take more than τ = 0.4s
for a hydraulic automotive braking system to generate a de-
sired deceleration, therefore accounting for the delayed en-
vironment dynamics is crucial for correct safe control of
the vehicle (Bayan et al., 2010). All together these envi-
ronment dynamics, can often be described through sets of
delay differential equations (DDEs) (Lynch & Park, 2017),
however are often unknown.
Prior work has shown the success of model-based RL to
learn from offline datasets consisting separately of either
(1) irregularly-sampled data with no environment delays
= ∆j, τ = 0 (Yildiz et al., 2021) with continuous-time
∆i (cid:54)
methods, or (2) regularly-sampled data with environment
delays ∆i = ∆j, τ > 0 (Chen et al., 2021) with discrete-
time delay methods. However, performing offline model-
based RL with both delays τ > 0 and irregularly-sampled
= ∆j for continuous-time control tasks is a largely
data ∆i (cid:54)
understudied problem, yet an important problem setting.
Neural Laplace Control for Continuous-time Delayed Systems
The existing two individual approaches are inherently in-
compatible with each other. On one hand, continuous-
time methods use a continuous-time model, such as neu-
ral ordinary differential equation (ODE), to learn from
= ∆j, τ = 0 (Yildiz
irregularly-sampled observations ∆i (cid:54)
et al., 2021; Du et al., 2020). However, ODEs cannot model
environments with unknown delays τ > 0 (Holt et al.,
2022). Furthermore, neural-ODE based models suffer from
poor computational efficiency, when scaling to longer time
horizons in a given trajectory (as shown in Section 5.2).
On the other hand, the existing methods for handling de-
lays only considers a discrete-time ∆i = ∆j, τ > 0 en-
vironment. Where these methods assume the delay τ is
either known a priori (Firoiu et al., 2018) or is implic-
itly learned from a discrete buffer of previously executed
actions ̄ai
(or states) (Chen et al.,
−
2021). A simple approach for handling environments with
delays τ > 0 is to greatly increase the time interval be-
tween actions performed, so as to synchronize the agent's
actions with its delayed observations. However, such an ap-
proach would lead to a "waiting agent" that is clearly sub
optimal in most environments.
a1, . . . , ai
{
1 =
1}
−
Hence, the following two properties are highly desirable
for offline model-based RL to perform in more real-world
environments.
(P1) Learn from irregular samples: able to learn from
= ∆j in time offline datasets re-
irregularly-sampled ∆i (cid:54)
sulting from a continuous-time environment.
(P2) Learn delayed dynamics: can learn the delayed dy-
namics of the environment, implicitly modeling any un-
known delays τ > 0.
To fulfill P1 and P2, we propose Neural Laplace Con-
trol (NLC), a continuous-time model-based RL method.
Rather than describing the environment dynamics with a
(neural) ODE, it uses Neural Laplace to learn implicit de-
lay differential equation dynamics, which simultaneously
accounts for unknown delays τ > 0 and continuous-time
= ∆j. This brings two immediate advan-
dynamics ∆i (cid:54)
tages. First, many continuous-time control problems in-
volving delay DEs can easily be represented and solved
in the Laplace domain (Schiff, 1999; ̊Astr ̈om & Murray,
2021; Yi et al., 2008). Secondly, Neural Laplace Con-
trol bypasses the standard numerical ODE solvers and uses
an inverse Laplace transform algorithm (Holt et al., 2022)
to reconstruct any future state x(t + ∆i) of the dynamics
model with the same amount of compute. This makes em-
ploying more principled planning strategies such as MPC
feasible for continuous-time domains over expensive nu-
merical step wise ODE based models.
Specifically, Neural Laplace Control is able to tackle the
novel continuous-control problem formulated of having
both states observed at irregular time intervals ∆i (cid:54)
= ∆j
and an unknown fixed delay τ > 0 in the environment. We
motivate Neural Laplace Control as a principled approach
for this problem and demonstrate the empirical effective-
ness in experiments.
1(cid:13) In
Contributions Our contributions are two-fold:
Section 4, we formulate and motivate the novel Neu-
ral Laplace Control method, that can learn a dynamics
model that can encode an environments unknown delay
differential equation dynamics from irregularly-sampled
2(cid:13) In sec-
in time state-action trajectories (P1,P2).
tion 5.1, we benchmark Neural Laplace Control against
the existing continuous-time model-based approaches on
standard continuous-time delayed environments. Specifi-
cally, we demonstrate that Neural Laplace Control is able
to achieve near expert policy performance, significantly
achieving a higher episode reward than the other competing
continuous-time model-based baseline methods. We also
gain insight and understanding of how Neural Laplace Con-
trol works in Section 5.2, of how it can correctly extrapo-
late to longer time horizons for the dynamics model and is
computationally more efficient for predicting the next state
at a longer time horizon, thereby making model predictive
control feasible for longer time horizons for a fixed com-
pute budget. All together, we learn such a model from
irregularly-sampled states and actions in time ∆i
= ∆j
(P1) and environments that possess a delay that is unknown
τ > 0 (P2).
A PyTorch (Paszke et al., 2019) implementation of the code
at https://github.com/samholt/NeuralLaplaceControl,
is
at
and have
https://github.com/vanderschaarlab/NeuralLaplaceControl.
research group codebase
a broader
2 RELATED WORK
In offline reinforcement learning, an agent learns from a
fixed replay buffer and is not permitted to interact with the
environment (Wu et al., 2019). While both model-free (Ku-
mar et al., 2019; 2020; Fujimoto & Gu, 2021) and model-
based (Kidambi et al., 2020; Wang et al., 2021) approaches
have been proposed for offline RL, in general, model-based
methods have been shown to be more sample efficient than
model-free methods (Moerland et al., 2020). The main
challenge in model-based RL is known as "extrapolation
error" (Fujimoto et al., 2019), whereby the learnt dynam-
ics model inaccuracies compound for a larger number of
future predicted time steps. Hence, it is crucial in model-
based RL to learn an appropriate dynamics model that is
capable of accurately capturing the unique characteristics
of an environment. However, despite the fact that many en-
vironments operate in continuous-time by nature and con-
tain action or observation delays, almost all of the existing
approaches to model-based RL consider dynamics models
only suited to the conventional discrete-time ∆i = ∆j set-
ting with no delays τ = 0. We review here some of the
few approaches that go beyond the conventional setting,
(cid:54)
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Table 1: Comparison with related model-based approaches to RL. (P1) Learn from irregular samples-can it learn from an offline
dataset sampled at irregular times, ∆i (cid:54)= ∆j? (P2) Learn delayed dynamics-can it learn environments that contain a delay τ > 0?
Neural Laplace Control is the only method that can both learn from irregular samples (P1) as well as learn environments that contain a
delay (P2).
Approach
True Dynamics
Conventional model-based RL
Discrete-time delay methods
xt+1 ∼ f (xt, at)
xt+1 ∼ f (xt, at−τ )
Continuous-time methods
̇x(t) = f (x(t), a(t))
Neural Laplace Control
̇x(t) = f (x(t), a(t − τ ))
i=0
Data Available
D = {(xi, ai)}n
D = {(xi, ai)}n
i=0
D = {(x(ti), a(ti))}n
s.t.
= tj+1
−
−
D = {(x(ti), a(ti))}n
s.t.
= tj+1
−
−
i,j : ti+1
i,j : ti+1
ti
ti
∃
∃
i=0
tj
i=0
tj
namely (i) discrete-time delay methods and (ii) continuous-
time methods.
−
1}
1 =
a1, . . . , ai
{
Discrete-time Delay Methods Modeling environments
with either delayed observations x(t + τ ) or delayed ac-
tions a(t + τ ) are equivalent in form (Katsikopoulos &
Engelbrecht, 2003). Prior work models regular sampled
∆i = ∆j (discrete time) environments with constant time
delays τ > 0, and provides the agent with the current state
x(t), and a history of past actions performed in the envi-
ronment ̄ai
, whereby the history ac-
−
tion window is larger than or equal to the observation or
action delay in the environment (Walsh et al., 2009; Firoiu
et al., 2018; Bouteiller et al., 2020; Liotet et al., 2021; Agar-
wal & Aggarwal, 2021). Recently, Chen et al. (2021) pro-
posed delay-aware Markov decision processes (MDPs) that
are capable of modeling delayed dynamics in discrete-time
based on regularly sampled data, with an RNN encoding
the history of past actions and the current state. Moreover,
Derman et al. (2020) proposes a discrete-time known de-
lay method-whereby, Derman et al. (2020)'s App. D.2
benchmarks against a model-free A2C baseline that only
uses the current state-action fed into a RNN, that is unable
to learn the delay.
Continuous-time Methods Real world data is often
= ∆j, as such (Yildiz et al.,
sampled irregularly ∆i
2021) propose to use Neural ODEs (Chen et al., 2018b)
as their continuous-time dynamics model that can model
irregularly-sampled environments with no delays τ = 0.
Similarly, the work of Du et al. (2020) uses a Latent ODE
model when planning policies. Moreover, the work of
Seedat et al. (2022) uses a controlled differential equa-
tion (Kidger et al., 2020b) to model counterfactual out-
comes. However, these existing approaches are limiting,
as an ODE-based model by definition cannot handle a de-
lay differential equation, necessitating the need for a model
that can learn and model more diverse classes of differen-
tial equations. Recent models, of modeling diverse classes
of differential equations is made possible with the work of
Neural Laplace (Holt et al., 2022) by representing them in
the Laplace domain. These Laplace-based models have
been shown to be able to model such systems, be more
accurate and scale better with increasing time horizons in
Reference
Model
Williams et al. (2017) MDP / Neural Network
Chen et al. (2021)
Yildiz et al. (2021)
Du et al. (2020)
DA-MDP / RNN
Neural ODE
Latent ODE
(P1) ∆i (cid:54)= ∆j
(cid:55)
(cid:55)
(cid:51)
(cid:51)
(P2) τ > 0
(cid:55)
(cid:51)
(cid:55)
(cid:55)
(Ours)
Neural Laplace Control
(cid:51)
(cid:51)
time complexity. Our approach, namely Neural Laplace
Control, essentially extends Neural Laplace to the setting
of controlled systems-that is systems that evolve based
on an action signal a(t)-so that it can be used in plan-
ning policies in a RL setting. Furthermore, Bruder & Pham
(2007) provides theory for the continuous time specific set-
ting where action is an impulse, rather than a multivariate
continuous input and the environment dynamics are a dif-
fusion process.
We summarize the key related work in Table 1 and provide
an extended discussion of additional related works, includ-
ing a review of the benefits of using model-based RL and
using model predictive control, which happens to be our
preferred strategy for planning policies, in Appendix A.
3 PROBLEM FORMULATION
A
∈ A
→ X
time t
= RdA ,
States & Actions For a system with state space
RdX and action space
the state at
t
=
X
time
R is denoted as x(t) = [x1(t), . . . , xdX (t)]
∈
and action trajectory a : R
∈
R is denoted as
. We elaborate that state
are
∈
and the action at
X
a(t) = [a1(t), . . . , adA(t)]
trajectory x : R
both functions of time, where an individual state x(t)
∈ X
are points on these tra-
or an individual action a(t)
I and
jectories. Given a time interval
I we denote the partial state and action trajectories
a
on that interval such that x
(t) = a(t)
I
for t
. Finally, we also note that action values are usu-
ally bounded by an actuator's limits hence we also restrict
= [amin, amax], i.e., a box in Eu-
the action space to
clidean space.
(t) = x(t) and a
I
I ∈ X
I ∈ A
R, x
→ A
I ⊆
∈ A
∈ I
A
Environment Dynamics Dynamics of the system are de-
scribed by a non-autonomous non-linear controlled delay
R+:
differential equation with a constant action delay τ
∈
̇x(t) =
dx(t)
dt
= f (x(t), a(t
τ ))
−
(1)
RdX maps the current state
where function f :
and delayed action pair x(t), a(t
τ ) to a state deriva-
tive ̇x(t). We note that this setting of Continuous-time
Control (Kwakernaak & Sivan, 1972; ̊Astr ̈om & Murray,
X × A →
−
(cid:54)
(cid:54)
(cid:54)
Neural Laplace Control for Continuous-time Delayed Systems
Figure 1: Block diagram of Neural Laplace Control. The query points s are given by the inverse Laplace transform (ILT) algorithm
based on the time points of the future state trajectory to predict. The gradients can be back-propagated through the ILT algorithm and
stereographic projection to train networks hζ, h(cid:48)
ξ, gψ.
2021), assumes deterministic environments with no obser-
vation noise-however, also consider observation noise in
Appendix J, and find NLC still performant. Furthermore,
we note that an environment that has either a constant ac-
tion delay or a constant observation state delay are both
equivalent and refer to a constant action delay throughout
(Katsikopoulos & Engelbrecht, 2003). This is evident as
an agent that interacts in an environment that only has an
action delay of τ will only observe the effect of its se-
lected action a(t) τ seconds later in the state observation-
therefore the agent has to decide an action based on a state
observation that is delayed by τ . Therefore, given an ini-
tial state x(0) as well as an action trajectory a(
τ ), the
state at time t
) can be written as
(0,
τ,t
−
−
∈
∞
x(t) = x(0) +
f (x(t(cid:48)), a(t(cid:48)
t
0
(cid:90)
τ ))dt(cid:48)
(2)
−
(
,t]
R
∈
X
−∞
∪t
that con-
Consider some policy π :
,t] to
trols the system by mapping state trajectories x(
,t]). Then similarly, given an initial
actions a(t) = π(x(
state trajectory x(
) for
when the system is controlled by policy π can be written as
x(π)(t) = x(0) +
,0], the state at time t
→ A
(0,
∞
−∞
−∞
−∞
τ ]))dt(cid:48).
∈
,t(cid:48)
t
0 f (x(t(cid:48)), π(x(
(cid:82)
−∞
−
i
D
=
), a(k)(t(k)
Offline Dataset We consider the case where the environ-
ment dynamics f including the action delay τ are unknown.
Instead, we observe irregularly-sampled in time state-
n(j)
(x(k)(t(k)
action trajectories:
i=0
{
where x(k), a(k) denotes the k-th state-action trajectory
0 , t(k)
t(k)
sampled at irregular times
; we drop
{
the trajectory index k unless explicitly needed. Letting
1 denote the time interval between two
∆i = ti −
consecutive samples, having irregular samples entails that
. We also denote
∆i
∈ {
with xi = x(ti) as the i-th state observation and with
ai = a(ti) as the i-th action observation.
= ∆j for some i, j
1 , . . . , t(k)
1, . . . , n
n(k)}
))
}
ti
}
−
i
∈ X
X →
Control Objective Our overall objective is to control
the environment to a given goal state x∗
. This
is achieved by defining an instantaneous reward function
R of the current state. A common reward function
r :
in continuous-time control is the exponential of the nega-
tive distance from the current state to the goal state, that is
2-so that the instantaneous reward
r(x(t)) = e−||
is maximized when x(t) = x∗. Consequently, to achieve
our objective, we seek to find the optimal policy π∗ within
a feasible set of policies Π that maximizes the reward inte-
gral for a given final time T
x(t)
x∗
R+:
−
||
∈
R(π) .
=
π∗ = argmax π
Π
∈
(cid:18)
given the offline dataset
ronment dynamics f or the action delay τ .
D
0
(cid:90)
T
r(x(π)(t(cid:48)))dt(cid:48)
(3)
(cid:19)
but without access to the envi-
In practice, policies cannot observe continuous state tra-
jectories in their entirety and hence have to work with
point-wise samples instead. As such, we restrict our search
space Π to practical policies that only update their actions
whenever a state observation is made. Given sampling
times
, these are policies of the form
t0, t1, . . .
}
{
π(x(
,t)) =
−∞
0
ai
(cid:40)
if t
if t
∈
∈
(
, t0)
−∞
[ti, ti+1)
(4)
j
−
1 =
→ A
a1, . . . , ai
{
where actions ai are generated recursively given x(
,ti]
−∞
such that
by an auxiliary policy π(cid:48) :
Z+A
X × ∪j
∈
). Note that it is suffi-
ai = π(cid:48)(xi, ̄ai
1}
−
cient for the auxiliary policy to keep track of only the most
recent state observation xi due to the Markovianity of en-
vironment dynamics f , but it needs to keep track of all the
past actions due to the (unknown) action delay τ -keeping
consistent with our convention of modeling action delays,
however, note that this is equivalent for state delays. How-
ever, in the case of a having a fixed previous time window
ILT AlgorithmTimeObservedUnobservedObservedUnobservedLaplace Representation Network<latexit sha1_base64="yszh+uKpfsLFJemInt4qGrJXKJA=">AAACJ3icbVBNSwMxEM36WetX1aOXYBEqSNmVop6k4MWjglWhu5Rsmu0Gs8mSzApl2X/jxb/iRVARPfpPTOsqWn0QeLw3M5l5YSq4Add9c6amZ2bn5isL1cWl5ZXV2tr6hVGZpqxDlVD6KiSGCS5ZBzgIdpVqRpJQsMvw+njkX94wbbiS5zBMWZCQgeQRpwSs1Ksd+QmBOIxyU2Bf80FsJ0QQE50qJQ1ufNk+xAxIsYu/hTTmxU6vVneb7hj4L/FKUkclTnu1R7+vaJYwCVQQY7qem0KQEw2cClZU/cywlNBrMmBdSyVJmAny8Z0F3rZKH0dK2ycBj9WfHTlJjBkmoa0cbWkmvZH4n9fNIDoMci7TDJiknx9FmcCg8Cg03OeaURBDSwjV3O6Kqc2IULDRVm0I3uTJf8nFXtPbb7bOWvV2q4yjgjbRFmogDx2gNjpBp6iDKLpF9+gJPTt3zoPz4rx+lk45Zc8G+gXn/QM2C6dS</latexit>s⌦(✓, )Stereographic ProjectionReturnTimeQuery<latexit sha1_base64="7T1b5URNr7oS2flhKYx2x1Cd+vg=">AAACM3icbVDLSgMxFM3Ud31VXboJFkFByowUdVlwI64UbBU6pWTSTCc0kwzJHaEM809u/BEXgrhQxK3/YPrw1XogcDjn3pt7T5AIbsB1n5zCzOzc/MLiUnF5ZXVtvbSx2TAq1ZTVqRJK3wTEMMElqwMHwW4SzUgcCHYd9E4H/vUt04YreQX9hLVi0pU85JSAldqlcz8mEAVhZvLi7g/HvubdyE4LISI6UUoavPdl+xAxIPkB/haSiOf77VLZrbhD4GnijUkZjXHRLj34HUXTmEmgghjT9NwEWhnRwKlgedFPDUsI7ZEua1oqScxMKxvenONdq3RwqLR9EvBQ/d2RkdiYfhzYysGWZtIbiP95zRTCk1bGZZICk3T0UZgKDAoPAsQdrhkF0beEUM3trpjajAgFG3PRhuBNnjxNGocV76hSvayWa9VxHItoG+2gPeShY1RDZ+gC1RFFd+gRvaBX5955dt6c91FpwRn3bKE/cD4+AdJsrDI=</latexit>s<latexit sha1_base64="7QeDWu55RHpo43JYHonMszGKKZw=">AAACEHicbVDLSsNAFJ3UV62vqBvBzWAR6qYkUtRlxY3LCvYBTQyT6aQdOpOEmYlQQvwIv8Gtrt2JW//ApX/ipM3Cth64cDjnXu69x48Zlcqyvo3Syura+kZ5s7K1vbO7Z+4fdGSUCEzaOGKR6PlIEkZD0lZUMdKLBUHcZ6Trj29yv/tIhKRReK8mMXE5GoY0oBgpLXnmkePzNM48+pDWHI7UCCOWXmdnmWdWrbo1BVwmdkGqoEDLM3+cQYQTTkKFGZKyb1uxclMkFMWMZBUnkSRGeIyGpK9piDiRbjr9IIOnWhnAIBK6QgWn6t+JFHEpJ9zXnfmRctHLxf+8fqKCKzelYZwoEuLZoiBhUEUwjwMOqCBYsYkmCAuqb4V4hATCSoc2t8XneSb2YgLLpHNety/qjbtGtdko0imDY3ACasAGl6AJbkELtAEGT+AFvII349l4Nz6Mz1lryShmDsEcjK9f5/adnQ==</latexit>p(A)i<latexit sha1_base64="x2gZombgXvTWzY2XZQzK08km4Zc=">AAACEHicbVDLSsNAFJ34rPUVdSO4GSxC3ZREirosuHFZwT6gjWEynbRDZyZhZiKUED/Cb3Cra3fi1j9w6Z84abOwrQcuHM65l3vvCWJGlXacb2tldW19Y7O0Vd7e2d3btw8O2ypKJCYtHLFIdgOkCKOCtDTVjHRjSRAPGOkE45vc7zwSqWgk7vUkJh5HQ0FDipE2km8f9wOexplPH9JqnyM9woil3ew88+2KU3OmgMvELUgFFGj69k9/EOGEE6ExQ0r1XCfWXoqkppiRrNxPFIkRHqMh6RkqECfKS6cfZPDMKAMYRtKU0HCq/p1IEVdqwgPTmR+pFr1c/M/rJTq89lIq4kQTgWeLwoRBHcE8DjigkmDNJoYgLKm5FeIRkghrE9rcloDnmbiLCSyT9kXNvazV7+qVRr1IpwROwCmoAhdcgQa4BU3QAhg8gRfwCt6sZ+vd+rA+Z60rVjFzBOZgff0CDH+dtA==</latexit>p(X)i<latexit sha1_base64="PqOLcWVU4uJGY5aJfFLAeAC8M1c=">AAACK3icbVDLSsNAFJ34rPUVdelmsAgtSEm0qMuKG5cV7AOaGCbTaTt0JgkzE6GEfIgf4Te41bUrxY0L/8NJm4V9HLhwOOde7r3HjxiVyrI+jZXVtfWNzcJWcXtnd2/fPDhsyTAWmDRxyELR8ZEkjAakqahipBMJgrjPSNsf3WZ++4kIScPgQY0j4nI0CGifYqS05JkXZcfnSZR69DEpOxypIUYsuUkr6dkyo6ONimeWrKo1AVwkdk5KIEfDM3+cXohjTgKFGZKya1uRchMkFMWMpEUnliRCeIQGpKtpgDiRbjJ5LoWnWunBfih0BQpO1P8TCeJSjrmvO7Mr5byXicu8bqz6125CgyhWJMDTRf2YQRXCLCnYo4JgxcaaICyovhXiIRIIK53nzBafpzoTez6BRdI6r9qX1dp9rVSv5ekUwDE4AWVggytQB3egAZoAg2fwCt7Au/FifBhfxve0dcXIZ47ADIzfPxmAqLA=</latexit>(p(A)i,p(X)i)<latexit sha1_base64="eJKaBSRN0tEEnxfRVPP0w7luekw=">AAAB/XicbVA9SwNBEJ3zM8avqKXNYhCswp0EtQzYWEYwH5AcYW8zlyzZvTt294R4BH+DrdZ2YutvsfSfuEmuMIkPBh7vzTAzL0gE18Z1v5219Y3Nre3CTnF3b//gsHR03NRxqhg2WCxi1Q6oRsEjbBhuBLYThVQGAlvB6Hbqtx5RaR5HD2acoC/pIOIhZ9RYqTXsdZ/Q0F6p7FbcGcgq8XJShhz1Xumn249ZKjEyTFCtO56bGD+jynAmcFLsphoTykZ0gB1LIypR+9ns3Ak5t0qfhLGyFRkyU/9OZFRqPZaB7ZTUDPWyNxX/8zqpCW/8jEdJajBi80VhKoiJyfR30ucKmRFjSyhT3N5K2JAqyoxNaGFLICc2E285gVXSvKx4V5XqfbVcq+bpFOAUzuACPLiGGtxBHRrAYAQv8ApvzrPz7nw4n/PWNSefOYEFOF+/LBCWKA==</latexit>h⇣<latexit sha1_base64="G8OMCBd8mdsJj+bmn0myP4BSbe0=">AAAB/HicbVA9TwJBEJ3DL8Qv1NJmIzFakTtD0JLExhIT+UjgQvaWPVjZ3bvs7hnJBX+DrdZ2xtb/Yuk/cYErBHzJJC/vzWRmXhBzpo3rfju5tfWNza38dmFnd2//oHh41NRRoghtkIhHqh1gTTmTtGGY4bQdK4pFwGkrGN1M/dYjVZpF8t6MY+oLPJAsZAQbKzWH573uE+sVS27ZnQGtEi8jJchQ7xV/uv2IJIJKQzjWuuO5sfFTrAwjnE4K3UTTGJMRHtCOpRILqv10du0EnVmlj8JI2ZIGzdS/EykWWo9FYDsFNkO97E3F/7xOYsJrP2UyTgyVZL4oTDgyEZq+jvpMUWL42BJMFLO3IjLEChNjA1rYEoiJzcRbTmCVNC/LXrVcuauUapUsnTycwClcgAdXUINbqEMDCDzAC7zCm/PsvDsfzue8NedkM8ewAOfrF/S7lXI=</latexit>h0⇠<latexit sha1_base64="jbvy+bF6TUi9Ujiv0eU5eY0GJY0=">AAAB/HicbVA9SwNBEJ2LXzF+RS1tFoNgFe4kqGXAxjKC+YDkCHubvWTN7t6xuyeGI/4GW63txNb/Yuk/cS+5wiQ+GHi8N8PMvCDmTBvX/XYKa+sbm1vF7dLO7t7+QfnwqKWjRBHaJBGPVCfAmnImadMww2knVhSLgNN2ML7J/PYjVZpF8t5MYuoLPJQsZAQbK7V6gUifpv1yxa26M6BV4uWkAjka/fJPbxCRRFBpCMdadz03Nn6KlWGE02mpl2gaYzLGQ9q1VGJBtZ/Orp2iM6sMUBgpW9Kgmfp3IsVC64kIbKfAZqSXvUz8z+smJrz2UybjxFBJ5ovChCMToex1NGCKEsMnlmCimL0VkRFWmBgb0MKWQGSZeMsJrJLWRdW7rNbuapV6LU+nCCdwCufgwRXU4RYa0AQCD/ACr/DmPDvvzofzOW8tOPnMMSzA+foFpjKV4g==</latexit>x<latexit sha1_base64="jbvy+bF6TUi9Ujiv0eU5eY0GJY0=">AAAB/HicbVA9SwNBEJ2LXzF+RS1tFoNgFe4kqGXAxjKC+YDkCHubvWTN7t6xuyeGI/4GW63txNb/Yuk/cS+5wiQ+GHi8N8PMvCDmTBvX/XYKa+sbm1vF7dLO7t7+QfnwqKWjRBHaJBGPVCfAmnImadMww2knVhSLgNN2ML7J/PYjVZpF8t5MYuoLPJQsZAQbK7V6gUifpv1yxa26M6BV4uWkAjka/fJPbxCRRFBpCMdadz03Nn6KlWGE02mpl2gaYzLGQ9q1VGJBtZ/Orp2iM6sMUBgpW9Kgmfp3IsVC64kIbKfAZqSXvUz8z+smJrz2UybjxFBJ5ovChCMToex1NGCKEsMnlmCimL0VkRFWmBgb0MKWQGSZeMsJrJLWRdW7rNbuapV6LU+nCCdwCufgwRXU4RYa0AQCD/ACr/DmPDvvzofzOW8tOPnMMSzA+foFpjKV4g==</latexit>x<latexit sha1_base64="6+ZOUOsLLivvSO3lTASYABlr+Po=">AAAB/HicbVA9SwNBEJ2LXzF+RS1tFoNgFe4kRMuAjWUE8wHJEfY2e8ma3b1jd08IR/wNtlrbia3/xdJ/4l5yhUl8MPB4b4aZeUHMmTau++0UNja3tneKu6W9/YPDo/LxSVtHiSK0RSIeqW6ANeVM0pZhhtNurCgWAaedYHKb+Z0nqjSL5IOZxtQXeCRZyAg2Vmr3A5Hi2aBccavuHGideDmpQI7moPzTH0YkEVQawrHWPc+NjZ9iZRjhdFbqJ5rGmEzwiPYslVhQ7afza2fowipDFEbKljRorv6dSLHQeioC2ymwGetVLxP/83qJCW/8lMk4MVSSxaIw4chEKHsdDZmixPCpJZgoZm9FZIwVJsYGtLQlEFkm3moC66R9VfXq1dp9rdKo5ekU4QzO4RI8uIYG3EETWkDgEV7gFd6cZ+fd+XA+F60FJ585hSU4X7+B5pXL</latexit>a<latexit sha1_base64="ixUN2BakiRVWR7ghHY03He9XIjk=">AAACMXicbVDLSsNAFJ3UV62vqEs3g0VoQUsixceu6MZlBfuAJobJdNoOnUnCzEQoId/iR/gNbnXdnbr1J5ymWdjqgYFzz7mXe+f4EaNSWdbUKKysrq1vFDdLW9s7u3vm/kFbhrHApIVDFoqujyRhNCAtRRUj3UgQxH1GOv74duZ3noiQNAwe1CQiLkfDgA4oRkpLnnkN48fkzE6hc0OHlaGXOJGkuvJ15fg8iVKPnsI44zKtzvRq1lv1zLJVszLAv8TOSRnkaHrmp9MPccxJoDBDUvZsK1JugoSimJG05MSSRAiP0ZD0NA0QJ9JNsi+m8EQrfTgIhX6Bgpn6eyJBXMoJ93UnR2okl72Z+J/Xi9Xgyk1oEMWKBHi+aBAzqEI4ywv2qSBYsYkmCAuqb4V4hATCSqe6sMXnqc7EXk7gL2mf1+yLWv2+Xm7U83SK4AgcgwqwwSVogDvQBC2AwTN4BW/g3XgxpsaH8TVvLRj5zCFYgPH9A5BsqSI=</latexit>u 1⇣g pi,u(s) ⌘<latexit sha1_base64="9o/TVax0jStwT4YZDh7YZDZhIMY=">AAAB+XicbVA9SwNBEJ2LXzF+RS1tFoNgFe4kqGXAxjKi+YDkCHubvWTJ3t6xOyeEIz/BVms7sfXXWPpP3CRXmMQHA4/3ZpiZFyRSGHTdb6ewsbm1vVPcLe3tHxwelY9PWiZONeNNFstYdwJquBSKN1Gg5J1EcxoFkreD8d3Mbz9zbUSsnnCScD+iQyVCwSha6RH7ol+uuFV3DrJOvJxUIEejX/7pDWKWRlwhk9SYrucm6GdUo2CST0u91PCEsjEd8q6likbc+Nn81Cm5sMqAhLG2pZDM1b8TGY2MmUSB7YwojsyqNxP/87ophrd+JlSSIldssShMJcGYzP4mA6E5QzmxhDIt7K2EjaimDG06S1uCaGoz8VYTWCetq6p3Xa091Cr1Wp5OEc7gHC7Bgxuowz00oAkMhvACr/DmZM678+F8LloLTj5zCktwvn4BCdqUZQ==</latexit>ti<latexit sha1_base64="9o/TVax0jStwT4YZDh7YZDZhIMY=">AAAB+XicbVA9SwNBEJ2LXzF+RS1tFoNgFe4kqGXAxjKi+YDkCHubvWTJ3t6xOyeEIz/BVms7sfXXWPpP3CRXmMQHA4/3ZpiZFyRSGHTdb6ewsbm1vVPcLe3tHxwelY9PWiZONeNNFstYdwJquBSKN1Gg5J1EcxoFkreD8d3Mbz9zbUSsnnCScD+iQyVCwSha6RH7ol+uuFV3DrJOvJxUIEejX/7pDWKWRlwhk9SYrucm6GdUo2CST0u91PCEsjEd8q6likbc+Nn81Cm5sMqAhLG2pZDM1b8TGY2MmUSB7YwojsyqNxP/87ophrd+JlSSIldssShMJcGYzP4mA6E5QzmxhDIt7K2EjaimDG06S1uCaGoz8VYTWCetq6p3Xa091Cr1Wp5OEc7gHC7Bgxuowz00oAkMhvACr/DmZM678+F8LloLTj5zCktwvn4BCdqUZQ==</latexit>ti<latexit sha1_base64="Yi1bmVJO7sHFXsrphheceSrwZes=">AAACAnicbVC7SgNBFL3rM8ZX1NJmMAg2hl0JahmwsYxgHpBdwuxkNhkyj2VmVgghnd9gq7Wd2Pojlv6Jk2QLk3jgwuGcezmXE6ecGev7397a+sbm1nZhp7i7t39wWDo6bhqVaUIbRHGl2zE2lDNJG5ZZTtuppljEnLbi4d3Ubz1RbZiSj3aU0kjgvmQJI9g6KbRdhi5RqATt426p7Ff8GdAqCXJShhz1bukn7CmSCSot4diYTuCnNhpjbRnhdFIMM0NTTIa4TzuOSiyoicaznyfo3Ck9lCjtRlo0U/9ejLEwZiRitymwHZhlbyr+53Uym9xGYybTzFJJ5kFJxpFVaFoA6jFNieUjRzDRzP2KyABrTKyraSElFhPXSbDcwCppXlWC60r1oVquVfN2CnAKZ3ABAdxADe6hDg0gkMILvMKb9+y9ex/e53x1zctvTmAB3tcv28mXkQ==</latexit>ti !<latexit sha1_base64="Yi1bmVJO7sHFXsrphheceSrwZes=">AAACAnicbVC7SgNBFL3rM8ZX1NJmMAg2hl0JahmwsYxgHpBdwuxkNhkyj2VmVgghnd9gq7Wd2Pojlv6Jk2QLk3jgwuGcezmXE6ecGev7397a+sbm1nZhp7i7t39wWDo6bhqVaUIbRHGl2zE2lDNJG5ZZTtuppljEnLbi4d3Ubz1RbZiSj3aU0kjgvmQJI9g6KbRdhi5RqATt426p7Ff8GdAqCXJShhz1bukn7CmSCSot4diYTuCnNhpjbRnhdFIMM0NTTIa4TzuOSiyoicaznyfo3Ck9lCjtRlo0U/9ejLEwZiRitymwHZhlbyr+53Uym9xGYybTzFJJ5kFJxpFVaFoA6jFNieUjRzDRzP2KyABrTKyraSElFhPXSbDcwCppXlWC60r1oVquVfN2CnAKZ3ABAdxADe6hDg0gkMILvMKb9+y9ex/e53x1zctvTmAB3tcv28mXkQ==</latexit>ti !<latexit sha1_base64="Z+vw0kjBTJUd8KnaIlGiVJT4xhQ=">AAACBHicbVA9SwNBEJ3zM8avqKXNYhBiE+4kqGXAxjKC+YDkDHubvWTJ7t6xuyeE41p/g63WdmLr/7D0n7hJrjCJD4Z5vDfDDC+IOdPGdb+dtfWNza3twk5xd2//4LB0dNzSUaIIbZKIR6oTYE05k7RpmOG0EyuKRcBpOxjfTv32E1WaRfLBTGLqCzyULGQEGys99gKRdrLKtOnsol8qu1V3BrRKvJyUIUejX/rpDSKSCCoN4VjrrufGxk+xMoxwmhV7iaYxJmM8pF1LJRZU++ns6wydW2WAwkjZkgbN1L8bKRZaT0RgJwU2I73sTcX/vG5iwhs/ZTJODJVkfihMODIRmkaABkxRYvjEEkwUs78iMsIKE2ODWrgSiMxm4i0nsEpal1Xvqlq7r5XrtTydApzCGVTAg2uowx00oAkEFLzAK7w5z8678+F8zkfXnHznBBbgfP0CS1uY+Q==</latexit>X(s)(cid:54)
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
R+, the implicit learnable delay τ is bounded by ω,
ω
i.e., τ < ω.
∈
4 NEURAL LAPLACE CONTROL
We follow the standard model-based framework setup (Lut-
ter et al., 2021). First, we learn a dynamics model as out-
lined in Section 4.1. Then in Section 4.2, we use this learnt
model to plan a policy via model predictive control.
4.1 Learning the Dynamics Model
In the following we propose a way to incorporate actions
into the Neural Laplace (Holt et al., 2022) model for mod-
eling diverse DE systems, also detailed in Appendix B. We
build on the Neural Laplace framework, which was orig-
inally designed to only model the state differential equa-
tion evolution. Specifically, Neural Laplace Control in-
volves three main components: (1) an encoder that learns
to infer and represent the initial representation of the cur-
rent state-action trajectory up to time t, (2) a Laplace
representation network that learns to represent the solu-
tions of the state trajectory in the Laplace domain condi-
tioned on the input state-action trajectories, and (3) an in-
verse Laplace transform (ILT) algorithm that converts the
Laplace representation back to the time domain. We also
note that Neural Laplace Control is preferable for non-
linear dynamics as nonlinear delay DE's can be solved in
the Laplace domain, through the Laplace Adomian decom-
position method (Yousef & Ismail, 2018). We provide a
block diagram in Figure 1 and now discuss each compo-
nent in detail.
(1) Learning to Represent Initial Conditions at Time t
The future state trajectory solution depends on the initial
condition of the state-action trajectories. To model the de-
lay differential equation environment dynamics fully, we
seek to encode this initial condition, whereby the dynamics
implicitly depend on the past state-action histories. There-
fore, Neural Laplace Control uses an encoder network to
learn a representation of the current initial condition at time
t by encoding the recent state-action history of the trajec-
R+. Note that
tory up to a fixed previous time window ω
ideally, we want ω > τ since previous actions at least up to
a time window of τ affect how states evolve in the future.
∈
For a sample observed at time ti, instead of encoding both
state and action histories, we note that we only need to en-
code one history and follow the convention of Walsh et al.
(2009) to only encode the current state xi = x(ti), and
the action history
ω, ti]
(aj, tj −
}
up to the previous time window ω. We highlight that the
actions encoded can be at irregular times. As the action
history varies in time, we encode it with a recurrent neural
network, that of a reverse time gated recurrent unit (Chen
et al., 2018a; Holt et al., 2022)-denoted as hζ with pa-
ti) : tj ∈
Hi =
[ti −
{
rameters ζ-and encode the current state with a linear neu-
ral network layer-denoted as h(cid:48)ξ with parameters ξ-and
concatenate both into a latent dimension representing the
initial condition of the state-action trajectory:
)
pi = (p(
A
i
.
= hζ(
Hi), p(
i
)
X
.
= h(cid:48)ξ(xi))
(5)
= RdP is the learned initial condition
The vector pi ∈ P
is a hyper-parameter. The
representation, where d
d
encoders hζ, h(cid:48)ξ have trainable weights ζ, ξ respectively.
Neural Laplace Control is agnostic to the exact choice of
encoder architecture.
P ≥
X
:
→
S ∈
CdS
∈ P
(2) Learning DE Solutions in the Laplace Domain
Given an initial condition representation p
, we need
CdX that mod-
to learn a function l
P ×
els the Laplace representation of the delay DE solution,
i.e., when we take the inverse Laplace transform (ILT) of
X(s) = l(p, s), it approximates x(t) well for future t.
N+ denotes the number of reconstruction terms
Here, d
per time point and is specific to the ILT algorithm (Ap-
pendix B). However, the Laplace representation X(s) of-
ten involves singularities (Schiff, 1999), which are difficult
for neural networks to approximate or represent (Baker &
Patil, 1998). Therefore, we use the proposed stereographic
projection onto a Riemann sphere to mitigate this (Holt
et al., 2022). With the stereographic projection, we intro-
duce a feed-forward neural network g to learn the Laplace
representation of the dynamics model solution:
X(s) = u−
1
gψ
p, u(s)
,
(6)
(cid:16)
(cid:0)
(cid:1)(cid:17)
1 is the in-
where u is the stereographic projection and u−
verse stereographic projection (Appendix B), the vector
p is the output of the encoders (Equation 5), and ψ is
the trainable weights. Here the neural network's inputs
and outputs are the coordinates on the Riemann Sphere
2 , π
π
2 ), which are bounded and
π, π)
(θ, φ)
free from singularities (Holt et al., 2022).
(
−
∈ D
= (
×
−
1
−
−
}
{
L
L
X
(3) Inverse Laplace transform After obtaining the
Laplace representation X(s), we compute the predicted
or reconstructed state values ˆx(t) =
(t) for fu-
1 is the inverse Laplace transform, using a
ture t, where
numerical inverse Laplace transform algorithm. We high-
R+
light that we can evaluate ˆx(t) at any future time t
as the Laplace representation is independent of time once
learnt. In practice, we use the well-known ILT Fourier se-
ries inverse algorithm (ILT-FSI), which can obtain the most
general time solutions whilst remaining numerically stable
(Dubner & Abate, 1968; De Hoog et al., 1982; Kuhlman,
2013; Holt et al., 2022).
∈
Loss Function Neural Laplace Control trains its dynam-
ics model end-to-end using the mean squared error loss of
Neural Laplace Control for Continuous-time Delayed Systems
the next step ahead prediction error,
(ζ, ξ, ψ) =
ˆx(t)
(7)
∈{
J
ti+1,...,tn
where ˆx(t) =
} (cid:107)
) = u−
t
(cid:88)
1
(t) (8)
−
}
L
We minimize the above loss function
to learn the en-
coders hζ, hξ and the Laplace representation network gψ.
This training is summarized in Appendices B and G.
−
1(gψ(pi, u(
X(
*
{
J
2
x(t)
2
(cid:107)
))
*
4.2 Planning with the Learnt Dynamics Model
Once we have learnt the dynamics model, any arbitrary
learning framework can be
model-based reinforcement
used for planning. The straightforward choice would be
to perform deep Q-learning using the dynamics model as
a simulator. Ideally, we want to pursue a more principled
approach that can accommodate the Laplace-domain rep-
resentation of the dynamics more readily. Specifically, this
Laplace-domain representation provides us with the impor-
tant benefit of being able to simulate state trajectories for
arbitrarily long control signals without requiring any addi-
tional compute. This is not the case for neural ODEs (Holt
et al., 2022), as shown in Section 5.2.
∈
Laplace-model with MPC We opt to use the model
predictive controller of Model Predictive Path Integral
(MPPI) (Williams et al., 2017). This uses a zeroth or-
der particle-based trajectory optimizer method with our
learned Laplace dynamics model. Specifically, this com-
putes a discrete action sequence up to a fixed time hori-
R+, and then executes the first element in the
zon of H
planned action sequence. We note that our continuous-time
Laplace-based dynamics model can be used to reconstruct
a trajectory at any future time horizon up to H seconds,
however it requires that the corresponding control input
up to that future time horizon is input into the dynamics
model, i.e., a[t,t+H). To simplify the planning problem,
we assume a state, and action history tuple is given to the
Laplace-based dynamics model, along with the time inter-
val to predict the dynamics model next future state at, i.e.,
ω:t], δ), to predict xt+δ. Where we
an input of (xt, a[t
R+ as the observation time interval, that is the
denote δ
time between two consecutive state observations 1. It is nat-
ural for online control problems to be controlled at discrete-
time steps of δ, where δ can be varied. Therefore, the MPPI
plans actions at discrete-time steps δ, up to a fixed horizon
Z+ steps into the future, thus
H by planning ahead N
the planning horizon is determined by H = δ
N . This
Z+, a hyper
leverages a number of parallel roll-outs M
parameter, which can be tuned. As MPPI is a Monte Carlo
based sampler, increasing the number of roll-outs improves
the input trajectory optimization, however scales the run-
(N M ). Although planning benefits
time complexity as
∈
∈
∈
−
*
O
1We note that the observation state time interval δ is the same
as the time interval between the executed actions.
from having a longer time horizon to use when optimiz-
ing the next action trajectory, it becomes computationally
infeasible to do so for a large N . Naturally with the Neu-
ral Laplace Control dynamics model representation we can
change the observation interval δ time step, to increase it to
enable planning at a longer time horizon. Clearly, however,
planning at a longer horizon can compound model inaccu-
racies (Williams et al., 2017)-which can become signifi-
cant, rendering the model uncontrollable within that plan-
ning regime, and is further explored in Section 5.2. Ad-
ditionally, we also detail the MPC MPPI pseudocode and
planner implementation in Appendix C.
5 EXPERIMENTS AND EVALUATION
Benchmark Environments We use the continuous-time
control environments from the ODE-RL suite (Yildiz et al.,
2021), as they provide true irregular samples in time of
state observations and are fully continuous in time, un-
like discrete environments (Brockman et al., 2016). We
adapt these to incorporate an arbitrary fixed delayed action
time, turning the ODE environments into delay DE envi-
ronments. This ODE-RL suite consists of three environ-
ments of the Pendulum, Cartpole and Acrobot. The starting
state for all tasks is hanging down and the goal is to swing
up and stabilize the pole(s) upright (Yildiz et al., 2021).
Here, each environment uses the reward function of the ex-
ponential of the negative distance from the current state to
the goal state x∗, whilst also penalizing the magnitude of
action, and we assume we are given this reward function
when planning. We detail all environments in Appendix D.
Benchmark Dynamic Models We select benchmark dy-
namics models for our specific setting of having both states
= ∆j and an un-
observed at irregular time intervals ∆i (cid:54)
known fixed delay τ > 0 in the environment. We bench-
mark against a discrete-delay method of a RNN over the
action buffer and current state (Chen et al., 2021), and adapt
it to model continuous-time with a new input of the time in-
RNN) 2. We also
crement to predict the next state for (∆t
compare with the true environment dynamics (Oracle),
an augmented Neural-ODE (NODE) (Chen et al., 2018b),
Latent-ODE (Latent-ODE) (Rubanova et al., 2019b) and
our Neural Laplace Control (NLC) model. We plan all
dynamics models with the MPC MPPI method (Williams
et al., 2017), and further compare against a random pol-
icy (Random). We provide further details of model selec-
tion, hyperparameter selection and implementation details
in Appendix E.
−
2We note to adapt discrete-time models to continuous-time we
add an additional input parameter, that of the time difference be-
tween the current time and the next state observation to predict,
i.e., δ, e.g., xi+1 = xi + f (xi, ai, δ). (Yildiz et al., 2021)
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Table 2: Normalized scores R of the offline model-based agents, where the irregularly-sampled (P1) offline dataset consists of an action
delay (P2) of {1, 2, 3} multiples of the environments observation interval time step ̄∆ = 0.05 seconds. Averaged over 20 random seeds,
with ± standard deviations. Scores are un-discounted cumulative rewards normalized to be between 0 and 100, where 0 corresponds
to the Random agent and 100 corresponds to the expert with the known world model (Oracle+MPC). Negative normalized scores, i.e.,
worse than random are set to zero. Full results are included in the Appendix H.
Dynamics Model
Cartpole
Action Delay τ = ̄∆
Pendulum
Acrobot
Cartpole
Action Delay τ = 2 ̄∆
Pendulum
Acrobot
Action Delay τ = 3 ̄∆
Pendulum
Cartpole
Acrobot
Random
Oracle
∆t
Latent-ODE
NODE
RNN
−
NLC (Ours)
0.0
100.0
95.28
0.0
85.09
0.0
0.15
0.4
±
±
±
0.0
±
7.95
±
99.83
0.19
±
0.0
100.0
1.14
0.0
0.63
0.0
3.14
6.31
0.0
5.16
±
±
±
±
±
98.31
3.51
±
0.0
100.0
18.95
0.0
23.07
0.0
2.19
7.6
±
±
±
0.0
±
6.94
±
99.12
1.7
±
0.0
100.0
97.01
0.0
90.75
0.0
0.04
0.31
0.0
1.34
±
±
±
±
±
99.88
0.1
±
0.0
100.0
9.94
1.24
0.0
0.0
2.57
2.48
20.67
0.0
±
±
±
±
±
93.28
4.96
±
0.0
100.0
28.39
8.91
10.92
0.0
±
1.79
±
9.73
±
13.62
10.09
±
±
100.44
2.13
±
0.0
100.0
97.8
41.56
94.55
0.0
0.08
0.25
47.07
1.08
±
±
±
±
±
99.92
0.12
±
0.0
100.0
11.81
3.26
1.97
0.0
2.57
11.93
12.24
4.01
±
±
±
±
±
98.98
1.32
±
0.0
100.0
3.89
9.19
11.78
0.0
1.26
6.72
9.08
8.33
±
±
±
±
±
99.46
1.88
±
∼ N
Offline Dataset Generation For each environment we
generate an offline state-action trajectory dataset by using
an agent that uses an oracle dynamics model combined with
MPC and has additional noise added to the agents selected
action, ̄π(t) = π(t) + (cid:15), (cid:15)
(0, amax). This "noisy
expert" agent interacts with the environment and observes
observations at irregular unknown times, where we sam-
ple the time interval to the next observation from an ex-
Exp( ̄∆), with a mean of
ponential distribution, i.e., ∆
̄∆ = 0.05 seconds 3 (Yildiz et al., 2021). We assume a
fixed action delay τ , and evaluate discrete multiples of this
delay of the mean sampling time ̄∆, i.e., τ = ̄∆ for one
step delay, τ = 2 ̄∆ for two step delay etc. We enforce
the observed action history buffer that includes past actions
back to ω = 4 ̄∆ seconds. We provide further details on the
dataset generation and model training in Appendix G.
∼
Evaluation For each environment, with a different delay
setting (described above) we collect an offline dataset of
irregularly-sampled trajectories, consisting of 1e6 samples
from the "noisy expert" agent interacting within that en-
vironment. For each benchmark dynamics model, we fol-
low the same two step evaluation process of, firstly, training
the dynamics model on that environment's collected offline
dataset using a MSE error loss for the next step ahead state
prediction ˆx(ti+1). Then, secondly, taking the same pre-
trained model and freezing the weights, and only using it
for planning with the MPPI (MPC) planner at run-time in
an environment episode, that lasts for 10 seconds. In total,
we evaluate our model-based control algorithms online in
the same environment, running each one for a fixed obser-
vation interval of δ = ̄∆ = 0.05 seconds (as is the nominal
value for these environments (Yildiz et al., 2021; Brock-
man et al., 2016)), and take the cumulative reward value
after running one episode of the planner (policy) and repeat
this for 20 random seed runs for each result. We quote the
(Yu et al., 2020) of the policy in the en-
normalized score
vironment, averaged over the 20 random seed run episodes,
with standard deviations throughout. The scores are un-
R
3We note other irregular sampling types are possible, however
Yildiz et al. (2021) has shown they are approximately equivalent.
discounted cumulative rewards normalized to lie roughly
between 0 and 100, where a score of 0 corresponds to a ran-
dom policy, and 100 corresponds to an expert (oracle with
a MPC planner). We further detail our evaluation metrics
and experimental setup in Appendix F.
5.1 Main results
R
We compared all the benchmark methods against each en-
vironment, which consists of a continuous-time environ-
ment with a specific delay-with normalized scores
are
tabulated in Table 2. Neural Laplace Control achieves high
normalized scores (high episode rewards) on all the envi-
ronments. Specifically, NLC is able to model naturally
a variety of different delay environment dynamics (P2),
whereas existing delay methods adapted to continuous-time
RNN) struggle to learn appropriate dynamics mod-
(∆t
els for a range of different challenging environments. Im-
portantly, NLC performs well by learning a good dynam-
ics model from the irregularly-sampled offline datasets,
whereas the standard continuous-time methods (NODE,
Latent-ODE) struggle to learn such a model from environ-
ments that have an inherent delay. We also observe similar
patterns from additional experiments in Appendix J.
−
5.2
Insight and Understanding of How Neural
Laplace Control Works
In this section we seek to gain further insight into how Neu-
ral Laplace Control outperforms the benchmarks.
In the
following we seek to understand if NLC is able to learn
from irregularly-sampled state-action offline datasets (P1),
whilst learning the delayed dynamics of the environment
(P2). Furthermore, we also explore the benefits of the NLC
approach for planning at longer time horizons with a fixed
amount of compute and being sample efficient.
Can NLC Learn a Good Dynamics Model? To explore
if NLC is able to learn a suitable dynamics model, we plot
the trained models next step ahead prediction error with
that of the ground truth for a varying observation interval δ
for the Cartpole environment with a delay of ̄∆, as shown
Neural Laplace Control for Continuous-time Delayed Systems
Figure 2: Next step ahead validation error (MSE) at a variable
time step of an observation interval δ of the learnt baseline dynam-
ics models, for the irregularly-sampled Cartpole environment with
a fixed action delay of τ = ̄∆. The black dotted line indicates the
environments run-time observation interval δ = ̄∆ = 0.05 s.
Here, we observe Neural Laplace Control learns a good dynam-
ics model over a wide range of observation intervals δ, correctly
learning from the irregularly-sampled offline dataset (P1).
Figure 3: Next step ahead validation error (MSE) at a variable
time step of an observation interval δ of the learnt Neural Laplace
Control dynamics models, for each delayed environment versions
τ = {0, ̄∆, 2 ̄∆, 3 ̄∆} of the specific Cartpole environment. The
black dotted line indicates the environments run-time observation
interval δ = ̄∆ = 0.05 s. Here, Neural Laplace Control is able
to correctly learn and capture the delayed dynamics (P2), as the
forward MSE errors are low and similar-whereas neural-ODE
methods have a greater increasing forward MSE, Appendix I.
in Figure 2. Empirically we observe that NLC using its
Laplace-based dynamics model is able to better approxi-
mate a wider range of observation intervals δ and achieve a
good global approximation compared to the recurrent neu-
ral network and ODE based models. We note that due to
the offline dataset being sampled with trajectories that have
irregular sampling times (P1), where the sampling times
are defined by an exponential distribution with a mean of
̄∆ = 0.05 seconds; the other competing methods seem to
over-fit purely to the median sample time of the exponen-
tial distribution, i.e., 0.05
ln(2) = 0.034 s. Other works
have shown a more accurate next step prediction model cor-
relates to a higher environment episode reward (Williams
et al., 2017).
*
Can NLC Learn Delay Environment Dynamics? To
investigate this, we similarly plot the trained NLC dynam-
ics models next step ahead prediction error with that of
the ground truth for a varying observation interval δ, for
each of the delayed environment versions of the specific
Cartpole environment, as show in Figure 3. Empirically
Figure 4: Normalized score R of the baseline methods on the
Cartpole environment with an action delay of τ = ̄∆ = 0.05 sec-
onds, plotted against an increasing time horizon H, by increas-
ing the observation interval δ. NLC, maintains a high performing
policy at a longer time horizon-whilst using the same amount of
constant planning time per action O as a ∆t−RNN.
we observe that the NLC dynamics models correctly learnt
the delay dynamics (P2) of each individual environment,
as they each have a similar low forward MSE error for the
varying levels of inherent delay. In contrast, neural-ODE
models are unable to model the delay dynamics correctly,
and we observe that they have a higher rate of increasing
forward MSE error, that can also increase for an increasing
environment delay and is shown further in Appendix I.
−
O
Can NLC Plan with a Longer Time Horizon Using
a Fixed Amount of Compute? We investigate this by
planning with a MPC planner, increasing the observation
interval δ and keeping N fixed, therefore the time hori-
zon H increases-as shown in Figure 4. Here we mea-
sure the total planning time taken to plan the next action
seconds 4 and observe that planning with the NLC
as
dynamics model takes the same amount of planning time,
and hence a fixed amount compute for planning at a greater
time horizon H-which is the same as a ∆t
RNN. This
is achieved by the Laplace-based dynamics model that can
predict a future state at any future time interval using the
same number of forward model evaluations, and hence the
In contrast, this is not read-
same amount of compute.
ily achievable with neural-ODE continuous-time methods
that use a larger number of numerical forward steps with
a numerical ODE step-wise solver for a increasing time
horizon-leading to an increasing planning time for an in-
creasing time horizon, i.e.,
H. Furthermore, we high-
O ∝
light, that there exists a trade-off of the time horizon H
to plan at-as we wish to use a large "enough" horizon
that captures sufficient future dynamics, whilst minimizing
compounded model inaccuracies at a larger planning time
horizon. Therefore these two opposing factors, give rise to
at a time horizon
the maxima of the normalized score
H = 2 seconds, as seen in Figure 4.
R
We further investigate an alternative setup in Figure 5, and
4We perform all results using a Intel Core i9-12900K CPU @
3.20GHz, 64GB RAM with a Nvidia RTX3090 GPU 24GB.
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Figure 5: Normalized score R of the baseline methods on the
Cartpole environment with an action delay of τ = ̄∆ = 0.05s,
plotted against an increasing observation interval δ. Here, the
time horizon is fixed at H = 2s, thus increasing the observation
interval δ decreases the number of MPC forward planning steps
needed (i.e., N = H
δ ). The black dotted line indicates the envi-
ronments run-time observation interval δ = ̄∆ = 0.05 s. NLC
demonstrates that it can still outperform the baselines, achieving
a near optimal policy-whilst reducing the planning time taken O
needed to generate the next action.
keep the time horizon fixed at H = 2 seconds and increase
the observation interval δ-allowing us to reduce N the
number of MPC forward planning steps (i.e., N = H
δ ).
Importantly, this reduces the planning time
needed to
generate the next action, enabling a method to use a higher
frequency of executing actions to control the dynamics-
whilst still planning at the same fixed time horizon H. NLC
is able to still outperform the baselines, achieving a high
performing policy-even when using a lesser amount of
planning compute per action. The numeric values, along
with those for other environments are provided in Ap-
pendix I.
O
Is NLC Sample Efficient? We observe in Figure 6 that
NLC can still learn a suitable dynamics model, and per-
form well on the Cartpole environment with a delay of
τ = ̄∆ = 0.05 seconds, when trained with an offline
irregularly-sampled in time dataset that contains only 200
random samples-which corresponds 10 seconds of inter-
action time of a noisy expert (expert with random action
noise) agent from the delayed environment. We further de-
tail full results, including other environment results in Ap-
pendix I.
Can NLC Incorporate Adaptive State-based Con-
straints Using an MPC planner, NLC can naturally han-
dle unseen state-based constraints, and we show this in Ap-
pendix I.
6 DISCUSSION AND FUTURE WORK
Discussion In this work, we have proposed and validated
a novel model-based offline RL method, which combines
a Neural Laplace dynamics model with a MPC planner.
This novel method performs RL in continuous-time, train-
Figure 6: Normalized score R of the baseline methods on the
Cartpole environment with an action delay of τ = ̄∆ = 0.05s,
plotted against the number of samples in the irregularly-sampled
offline dataset used to train the dynamics model of each method.
The two closest highest performing baselines are plotted here, and
refer to Appendix I for others. NLC can maintain a high perform-
ing policy-even from the challenging case of only learning a dy-
namics model from 200 samples from an irregularly-sampled in
time offline dataset D.
ing only on offline irregularly-sampled data that has an
inherent delay. We have shown experimentally that these
Laplace-domain models outperform their neural-ODE and
recurrent neural-network based counterparts on irregularly-
sampled datasets, and make model predictive control feasi-
ble for longer time horizons, with a fixed compute budget.
Future Works Our current focus is on continuous-time
environments with unknown fixed delays. We consider
learning in environments with unknown and variable de-
lays an important area for future work. Furthermore, in the
current work, we solely explored using only one instance
of the dynamics model. However, we note that we can ex-
tend NLC trivially to create an ensemble of Neural Laplace
Control models, thereby providing uncertainty estimation
(epistemic uncertainty) of the future state prediction.
Societal Impact We envisage Neural Laplace Control as
a tool to perform offline RL in realistic continuous-control
settings, although emphasize that the dynamics action con-
trol trajectory proposed would need to be further verified
by a human expert or via experimentation.
Acknowledgements
SH would like to acknowledge and thank AstraZeneca for
funding. This work was additionally supported by the Of-
fice of Naval Research (ONR) and the NSF (Grant number:
1722516). Moreover, we would like to warmly thank all
the anonymous reviewers, alongside research group mem-
bers of the van der Scaar lab, for their valuable input, com-
ments and suggestions as the paper was developed-where
all these inputs ultimately improved the paper.
References
Mridul Agarwal and Vaneet Aggarwal. Blind decision
making: Reinforcement learning with delayed observa-
tions. Pattern Recognition Letters, 150:176–182, 2021.
Neural Laplace Control for Continuous-time Delayed Systems
Arthur Argenson and Gabriel Dulac-Arnold. Model-based
offline planning. In International Conference on Learn-
ing Representations, 2020.
Karl Johan ̊Astr ̈om and Richard M Murray. Feedback sys-
tems. Princeton university press, 2010.
Karl Johan ̊Astr ̈om and Richard M Murray. Feedback
systems: an introduction for scientists and engineers.
Princeton university press, 2021.
Mark R Baker and Rajendra B Patil. Universal approxi-
mation theorem for interval neural networks. Reliable
Computing, 4(3):235–239, 1998.
Andrew G Barto, Richard S Sutton, and Charles W Ander-
son. Neuronlike adaptive elements that can solve dif-
ficult learning control problems. IEEE transactions on
systems, man, and cybernetics, (5):834–846, 1983.
Fawzi P Bayan, Anthony D Cornetto, Ashley Dunn, and
Eric Sauer. Brake timing measurements for a tractor-
semitrailer under emergency braking. SAE International
Journal of Commercial Vehicles, 2(2):245–255, 2010.
Yann Bouteiller, Simon Ramstedt, Giovanni Beltrame,
Christopher Pal, and Jonathan Binas. Reinforcement
In International confer-
learning with random delays.
ence on learning representations, 2020.
Greg Brockman, Vicki Cheung, Ludwig Pettersson,
Jonas Schneider, John Schulman, Jie Tang, and Wo-
arXiv preprint
jciech Zaremba.
Openai gym.
arXiv:1606.01540, 2016.
Benjamin Bruder and Huyˆen Pham. Impulse control prob-
lem on finite horizon with intervention lag and execution
delay. 2007.
Baiming Chen, Mengdi Xu, Liang Li, and Ding Zhao.
learning for
Neurocomputing, 450:119–128,
Delay-aware model-based reinforcement
continuous control.
2021.
Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and
David Duvenaud. Neural ordinary differential equations.
arXiv preprint arXiv:1806.07366, 2018a.
Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and
David K Duvenaud. Neural ordinary differential equa-
tions. Advances in neural information processing sys-
tems, 31, 2018b.
Kyunghyun Cho, Bart Van Merri ̈enboer, Dzmitry Bah-
danau, and Yoshua Bengio. On the properties of neu-
ral machine translation: Encoder-decoder approaches.
arXiv preprint arXiv:1409.1259, 2014.
Frank R De Hoog, JH Knight, and AN Stokes. An im-
proved method for numerical inversion of laplace trans-
forms. SIAM Journal on Scientific and Statistical Com-
puting, 3(3):357–366, 1982.
cies. In International Conference on Learning Represen-
tations, 2020.
J Du, J Futoma, and F Doshi-Velez. Model-based rein-
forcement learning for semi-Markov decision processes
with neural ODEs. In Proceedings of the 34th Confer-
ence on Neural Information Processing Systems, 2020.
Harvey Dubner and Joseph Abate. Numerical inversion of
laplace transforms by relating them to the finite fourier
cosine transform. Journal of the ACM (JACM), 15(1):
115–123, 1968.
Vlad Firoiu, Tina Ju, and Josh Tenenbaum. At human
speed: Deep reinforcement learning with action delay.
arXiv preprint arXiv:1810.07286, 2018.
Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and
Sergey Levine. D4rl: Datasets for deep data-driven re-
inforcement learning. arXiv preprint arXiv:2004.07219,
2020.
Scott Fujimoto and Shixiang Shane Gu. A minimalist
approach to offline reinforcement learning. Advances
in neural information processing systems, 34:20132–
20145, 2021.
Scott Fujimoto, Herke Hoof, and David Meger. Address-
ing function approximation error in actor-critic meth-
ods. In International conference on machine learning,
pp. 1587–1596. PMLR, 2018.
Scott Fujimoto, David Meger, and Doina Precup. Off-
policy deep reinforcement learning without exploration.
In International conference on machine learning, pp.
2052–2062. PMLR, 2019.
Ary L Goldberger, Luis AN Amaral, Leon Glass, Jef-
frey M Hausdorff, Plamen Ch Ivanov, Roger G Mark,
Joseph E Mietus, George B Moody, Chung-Kang Peng,
and H Eugene Stanley. Physiobank, physiotoolkit, and
physionet: components of a new research resource for
complex physiologic signals. circulation, 101(23):e215–
e220, 2000.
David Ha and J ̈urgen Schmidhuber. World models. arXiv
preprint arXiv:1803.10122, 2018.
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey
Soft actor-critic: Off-policy maximum en-
Levine.
tropy deep reinforcement learning with a stochastic ac-
tor. In International conference on machine learning, pp.
1861–1870. PMLR, 2018.
Danijar Hafner, Timothy Lillicrap, Jimmy Ba, and Moham-
mad Norouzi. Dream to control: Learning behaviors
by latent imagination. arXiv preprint arXiv:1912.01603,
2019.
Nicklas Hansen, Xiaolong Wang, and Hao Su. Temporal
difference learning for model predictive control. arXiv
preprint arXiv:2203.04955, 2022.
Esther Derman, Gal Dalal, and Shie Mannor. Acting in
delayed environments with non-stationary markov poli-
Samuel I Holt, Zhaozhi Qian, and Mihaela van der Schaar.
Neural laplace: Learning diverse classes of differential
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
equations in the laplace domain. In International Con-
ference on Machine Learning, pp. 8811–8832. PMLR,
2022.
Michael Janner, Justin Fu, Marvin Zhang, and Sergey
Levine. When to trust your model: Model-based policy
optimization. Advances in Neural Information Process-
ing Systems, 32, 2019.
Konstantinos V Katsikopoulos and Sascha E Engelbrecht.
Markov decision processes with delays and asyn-
IEEE transactions on auto-
chronous cost collection.
matic control, 48(4):568–574, 2003.
Li Kexue and Peng Jigen. Laplace transform and fractional
differential equations. Applied Mathematics Letters, 24
(12):2019–2023, 2011.
Rahul Kidambi, Aravind Rajeswaran, Praneeth Netrapalli,
and Thorsten Joachims. Morel: Model-based offline re-
inforcement learning. Advances in neural information
processing systems, 33:21810–21823, 2020.
Patrick Kidger, Ricky TQ Chen, and Terry Lyons. " hey,
that's not an ode": Faster ode adjoints with 12 lines of
code. arXiv preprint arXiv:2009.09457, 2020a.
Patrick Kidger, James Morrill, James Foster, and Terry
Lyons. Neural controlled differential equations for ir-
regular time series. In Conference on Neural Informa-
tion Processing Systems. Neural Information Processing
Systems Foundation, 2020b.
Diederik P. Kingma and Jimmy Ba. Adam: A method for
stochastic optimization, 2017.
Marin Kobilarov. Cross-entropy motion planning. The
International Journal of Robotics Research, 31(7):855–
871, 2012.
Kristopher L Kuhlman. Review of inverse laplace trans-
form algorithms for laplace-space numerical approaches.
Numerical Algorithms, 63(2):339–355, 2013.
Aviral Kumar, Justin Fu, Matthew Soh, George Tucker,
and Sergey Levine. Stabilizing off-policy q-learning via
bootstrapping error reduction. Advances in Neural Infor-
mation Processing Systems, 32, 2019.
Aviral Kumar, Aurick Zhou, George Tucker, and Sergey
Levine. Conservative q-learning for offline reinforce-
ment learning. Advances in Neural Information Process-
ing Systems, 33:1179–1191, 2020.
H Kwakernaak and R Sivan. Linear Optimal Control Sys-
tems. Wiley InterScience, New York, 1972.
Wook Hyun Kwon, Jin Won Kang, Young Sam Lee, and
Young Soo Moon. A simple receding horizon control for
state delayed systems and its stability criterion. Journal
of Process Control, 13(6):539–551, 2003.
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel,
Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and
Daan Wierstra. Continuous control with deep reinforce-
ment learning. arXiv preprint arXiv:1509.02971, 2015.
Pierre Liotet, Erick Venneri, and Marcello Restelli. Learn-
ing a belief representation for delayed reinforcement
In 2021 International Joint Conference on
learning.
Neural Networks (IJCNN), pp. 1–8. IEEE, 2021.
Pierre Liotet, Davide Maran, Lorenzo Bisi, and Marcello
Restelli. Delayed reinforcement learning by imitation.
In International Conference on Machine Learning, pp.
13528–13556. PMLR, 2022.
Michael Lutter, Leonard Hasenclever, Arunkumar Byra-
van, Gabriel Dulac-Arnold, Piotr Trochim, Nicolas
Heess, Josh Merel, and Yuval Tassa. Learning dynam-
ics models for model predictive agents. arXiv preprint
arXiv:2109.14311, 2021.
Kevin M Lynch and Frank C Park. Modern robotics. Cam-
bridge University Press, 2017.
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, An-
drei A Rusu, Joel Veness, Marc G Bellemare, Alex
Graves, Martin Riedmiller, Andreas K Fidjeland, Georg
Ostrovski, et al. Human-level control through deep rein-
forcement learning. nature, 518(7540):529–533, 2015.
Thomas M Moerland, Joost Broekens, and Catholijn M
Jonker. Model-based reinforcement learning: A survey.
arXiv preprint arXiv:2006.16712, 2020.
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer,
James Bradbury, Gregory Chanan, Trevor Killeen, Zem-
ing Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch:
An imperative style, high-performance deep learning li-
brary. Advances in neural information processing sys-
tems, 32, 2019.
Igor Podlubny. The laplace transform method for linear dif-
ferential equations of the fractional order. arXiv preprint
funct-an/9710005, 1997.
Alexander D Poularikas.
Transforms and applications
handbook. CRC press, 2018.
Tobias Raff, Carsten Angrick, Rolf Findeisen, Jung-Su
Kim, and Frank Allgower. Model predictive control for
IFAC Proceedings Vol-
nonlinear time-delay systems.
umes, 40(12):60–65, 2007.
Jacques Richalet, Andr ́e Rault, JL Testud, and J Papon.
Model predictive heuristic control: Applications to in-
dustrial processes. Automatica, 14(5):413–428, 1978.
Yulia Rubanova, Ricky T. Q. Chen, and David Duvenaud.
Latent odes for irregularly-sampled time series. CoRR,
abs/1907.03907, 2019a.
Michael Laskey, Jonathan Lee, Roy Fox, Anca Dragan, and
Ken Goldberg. Dart: Noise injection for robust imitation
learning. In Conference on robot learning, pp. 143–156.
PMLR, 2017.
Yulia Rubanova, Ricky TQ Chen, and David K Duvenaud.
Latent ordinary differential equations for irregularly-
sampled time series. Advances in neural information
processing systems, 32, 2019b.
Neural Laplace Control for Continuous-time Delayed Systems
transformation. In Proceedings of the 45th IEEE Con-
ference on Decision and Control, pp. 2535–2540. IEEE,
2006.
Sun Yi, Patrick W Nelson, and A Galip Ulsoy. Controlla-
bility and observability of systems of linear delay dif-
ferential equations via the matrix lambert w function.
IEEE Transactions on Automatic Control, 53(3):854–
860, 2008.
Cagatay Yildiz, Markus Heinonen, and Harri L ̈ahdesm ̈aki.
Continuous-time model-based reinforcement learning.
In International Conference on Machine Learning, pp.
12009–12018. PMLR, 2021.
Hamood M Yousef and AIB MD Ismail. Application of
the laplace adomian decomposition method for solution
system of delay differential equations with initial value
problem. In AIP Conference Proceedings, volume 1974,
pp. 020038. AIP Publishing LLC, 2018.
Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon,
James Y Zou, Sergey Levine, Chelsea Finn, and Tengyu
Ma. Mopo: Model-based offline policy optimization.
Advances in Neural Information Processing Systems, 33:
14129–14142, 2020.
Yaofeng Desmond Zhong, Biswadip Dey, and Amit
Symplectic ode-net: Learning hamil-
arXiv preprint
Chakraborty.
tonian dynamics with control.
arXiv:1909.12077, 2019.
Walter Rudin.
Real and Complex Analysis, 3rd Ed.
McGraw-Hill, Inc., USA, 1987. ISBN 0070542341.
Tim Salzmann, Elia Kaufmann, Marco Pavone, Davide
Scaramuzza, and Markus Ryll. Neural-mpc: Deep learn-
ing model predictive control for quadrotors and agile
arXiv preprint arXiv:2203.07747,
robotic platforms.
2022.
Joel L Schiff. The Laplace transform: theory and applica-
tions. Springer Science & Business Media, 1999.
Nabeel Seedat, Fergus Imrie, Alexis Bellot, Zhaozhi Qian,
and Mihaela van der Schaar. Continuous-time model-
ing of counterfactual outcomes using neural controlled
differential equations. arXiv preprint arXiv:2206.08311,
2022.
Archit Sharma, Shixiang Gu, Sergey Levine, Vikash Ku-
mar, and Karol Hausman. Dynamics-aware unsuper-
In International Conference
vised discovery of skills.
on Learning Representations, 2019.
Steven W. Smith. The Scientist and Engineer's Guide to
Digital Signal Processing. California Technical Publish-
ing, USA, 1997. ISBN 0966017633.
Thomas J Walsh, Ali Nouri, Lihong Li, and Michael L
Littman. Learning and planning in environments with
delayed feedback. Autonomous Agents and Multi-Agent
Systems, 18(1):83–105, 2009.
Jianhao Wang, Wenzhe Li, Haozhe Jiang, Guangxiang Zhu,
Siyuan Li, and Chongjie Zhang. Offline reinforcement
learning with reverse model-based imagination. Ad-
vances in Neural Information Processing Systems, 34:
29420–29432, 2021.
Tingwu Wang, Xuchan Bao, Ignasi Clavera, Jerrick Hoang,
Yeming Wen, Eric Langlois, Shunshi Zhang, Guodong
Zhang, Pieter Abbeel, and Jimmy Ba. Benchmark-
ing model-based reinforcement learning. arXiv preprint
arXiv:1907.02057, 2019.
Grady Williams, Paul Drews, Brian Goldfain, James M
Rehg, and Evangelos A Theodorou. Aggressive driv-
ing with model predictive path integral control. In 2016
IEEE International Conference on Robotics and Au-
tomation (ICRA), pp. 1433–1440. IEEE, 2016.
Grady Williams, Nolan Wagener, Brian Goldfain, Paul
Drews, James M Rehg, Byron Boots, and Evangelos A
Theodorou. Information theoretic mpc for model-based
In 2017 IEEE International
reinforcement learning.
Conference on Robotics and Automation (ICRA), pp.
1714–1721. IEEE, 2017.
Yifan Wu, George Tucker, and Ofir Nachum. Behavior reg-
ularized offline reinforcement learning. arXiv preprint
arXiv:1911.11361, 2019.
Sun Yi, A Galip Ulsoy, and Patrick W Nelson. Solution of
systems of linear delay differential equations via laplace
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Contents of supplementary materials:
1. Appendix A: Extended Related Work
2. Appendix B: Problem and Background
3. Appendix C: MPC MPPI Pseudocode and Planner Implementation Details
4. Appendix D: Environment Selection and Details
5. Appendix E: Benchmark Method Implementation Details
6. Appendix F: Evaluation Metrics
7. Appendix G: Dataset Generation and Model Training
8. Appendix H: Raw Results
9. Appendix I: Insight Experiments
10. Appendix J: Additional Experiments
have
Code We
at
https://github.com/samholt/NeuralLaplaceControl. Additionally, we have a research group codebase, available at
https://github.com/vanderschaarlab/NeuralLaplaceControl.
implementation
PyTorch
released
(Paszke
2019)
al.,
et
a
AISTATS 2022 Checklist For all models and algorithms presented, check if you include:
1. A clear description of the mathematical setting, assumptions, algorithm, and/or model. (Yes, see Section 3.)
2. An analysis of the properties and complexity (time, space, sample size) of any algorithm. (Yes, see Section 5.2 and
Appendix I.)
3. (Optional) Anonymized source code, with specification of all dependencies,
including external
libraries.
(https://github.com/samholt/NeuralLaplaceControl.)
For any theoretical claim, check if you include:
1. A statement of the result. (Not applicable.)
2. A clear explanation of any assumptions. (Not applicable.)
3. A complete proof of the claim. (Not applicable.)
For all figures and tables that present empirical results, check if you include:
1. A complete description of the data collection process, including sample size. (Yes, see Section 5 and Appendix G.)
2. A link to a downloadable version of the dataset or simulation environment. (Yes, see Appendix D.)
3. An explanation of any data that were excluded, description of any pre-processing step. (Yes, see Appendix G.)
4. An explanation of how samples were allocated for training / validation / testing. (Yes, see Appendix G.)
5. The range of hyper-parameters considered, method to select the best hyper-parameter configuration, and specification
of all hyper-parameters used to generate results. (Yes, see Appendix E.)
6. The exact number of evaluation runs. (Yes, see Section 5.)
7. A description of how experiments were run. (Yes, see Section 5 and Appendix F.)
8. A clear definition of the specific measure or statistics used to report results. (Yes, see Section 5 and Appendix F.)
9. Clearly defined error bars. (Yes, see Section 5 and Appendix F.)
10. A description of results with central tendency (e.g., mean) & variation (e.g., stddev). (Yes, see Section 5, and results
throughout.)
11. A description of the computing infrastructure used. (Yes, see Section 5.2. and Appendix F.)
Neural Laplace Control for Continuous-time Delayed Systems
A EXTENDED RELATED WORK
Table 3: Comparison with related model-based approaches to RL. (P1) Learn from irregular samples-can it learn from an offline
dataset sampled at irregular times, ∆i (cid:54)= ∆j? (P2) Learn delayed dynamics-can it learn environments that contain a delay τ > 0?
Neural Laplace Control is the only method that can both learn from irregular samples (P1) as well as learn environments that contain a
delay (P2).
Approach
True Dynamics
Conventional model-based RL
Discrete-time delay methods
xt+1 ∼ f (xt, at)
xt+1 ∼ f (xt, at−τ )
Continuous-time methods
̇x(t) = f (x(t), a(t))
Neural Laplace Control
̇x(t) = f (x(t), a(t − τ ))
i=0
Data Available
D = {(xi, ai)}n
D = {(xi, ai)}n
i=0
D = {(x(ti), a(ti))}n
s.t.
= tj+1
−
−
D = {(x(ti), a(ti))}n
s.t.
= tj+1
−
−
i,j : ti+1
i,j : ti+1
ti
ti
∃
∃
i=0
tj
i=0
tj
Reference
Model
Williams et al. (2017) MDP / Neural Network
Chen et al. (2021)
Yildiz et al. (2021)
Du et al. (2020)
DA-MDP / RNN
Neural ODE
Latent ODE
(P1) ∆i (cid:54)= ∆j
(cid:55)
(cid:55)
(cid:51)
(cid:51)
(P2) τ > 0
(cid:55)
(cid:51)
(cid:55)
(cid:55)
(Ours)
Neural Laplace Control
(cid:51)
(cid:51)
In the following we summarize the key related work in Table 3 and provide an extended discussion of additional related
works including a review of the benefits of using model-based RL and using model predictive control, which happens to
be our preferred strategy for planning policies.
Why model-based reinforcement learning? Model-based RL holds the promise to enable creating policies for real
world tasks in the offline setting where the true environment dynamics are unknown, and instead we require to learn a
dynamics model from a dataset of demonstrations from agents acting within the environment. Although existing model-
free RL approaches have shown effective performance (Fujimoto et al., 2018), they have the inherent disadvantages of
being less sample efficient (Lutter et al., 2021) where they require interacting either online or with the known environment
dynamics, and often require millions or billions of interactions with the environment to learn a good policy. Furthermore,
learning a dynamics model of the environment, allows planning over that dynamics model to optimize actions (MPC) rather
than learning a specific policy-by planning, a model can easily adapt to different goals or tasks at run-time. Whereas a
policy trained for a specific task or goal would often have to be re-trained for a new task or goal, making it difficult
for a policy to adapt to multi-task settings (Lutter et al., 2021). Naturally in continuous-control settings the dynamics
model (e.g., the physics of the environment) is independent of the reward function (e.g., the goal state to reach), therefore
changing tasks are straightforward by changing the reward function arbitrarily. An important property of model-based
reinforcement learning is that in general it is more sample-efficient than model-free methods in conventional control tasks
(Wang et al., 2019; Moerland et al., 2020). While model-free methods learn to master challenging tasks (Mnih et al., 2015;
Lillicrap et al., 2015) and improves learning efficiency in high-dimensional continuous control tasks (Fujimoto et al., 2018;
Haarnoja et al., 2018), it was later shown in Ha & Schmidhuber (2018); Janner et al. (2019) that model-based methods have
much higher sample efficiency once properly tuned. Furthermore, Hafner et al. (2019); Sharma et al. (2019) propose to
learn dynamics in a latent space, and similar insights have been applied to further improve the model-based reinforcement
learning performance (Hansen et al., 2022).
In offline reinforcement learning, an agent learns from a fixed replay buffer and is not permitted to interact with the
environment (Wu et al., 2019). While both model-free (Kumar et al., 2019; 2020; Fujimoto & Gu, 2021) and model-based
(Kidambi et al., 2020; Wang et al., 2021) approaches have been proposed for offline RL, in general, model-based methods
have been shown to be more sample efficient than model-free methods (Moerland et al., 2020). The main challenge in
model-based RL is known as "extrapolation error" (Fujimoto et al., 2019), whereby the learnt dynamics model inaccuracies
compound for a larger number of future predicted time steps. Hence, it is crucial in model-based RL to learn an appropriate
dynamics model that is capable of accurately capturing the unique characteristics of an environment. However, even though
many environments operate in continuous-time by nature and contain action or observation delays, almost all the existing
approaches to model-based RL consider dynamics models only suited to the conventional discrete-time ∆i = ∆j setting
with no delays τ = 0. We review here some of the few approaches that go beyond the conventional setting, namely (i)
discrete-time delay methods and (ii) continuous-time methods.
Discrete-time delay methods One approach for handling environment observation delays is to increase the time step till
the next action is performed, that is to synchronize an agent's actions with its delayed observations. However, such an
approach is infeasible in most environments (for example dynamics involving momentum), and even when it is feasible,
such a "wait agent" is often sub optimal, as it is possible to perform better by acting before receiving the most recent
observation (Walsh et al., 2009). We note that modeling environments with either delayed observations x(t + τ ) or delayed
actions a(t+τ ) are equivalent in form (Katsikopoulos & Engelbrecht, 2003). Prior work models regular sampled ∆i = ∆j
(discrete time) environments with constant time delays τ > 0, and provides the agent with the current state x(t), and a
(cid:54)
(cid:54)
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
, whereby the history action window is larger
history of past actions performed in the environment ̄ai
{
than or equal to the observation or action delay in the environment (Walsh et al., 2009; Firoiu et al., 2018; Bouteiller et al.,
2020). Recently, Chen et al. (2021) proposed delay-aware Markov decision processes (MDPs) that are capable of modeling
delayed dynamics in discrete-time based on regularly sampled data, with an RNN encoding the history of past actions and
the current state.
a1, . . . , ai
1 =
1}
−
−
Continuous-time methods A standard approach for applying model-based RL to irregular sampled time series is to di-
vide the timeline into equally sized intervals and impute or aggregate state and action tuples using averages (Rubanova
et al., 2019b). Thus, turning a continuous-time environment into a discrete-time environment approximation; however,
such pre-processing destroys information, particularly about the timing of measurements and the specific underlying en-
= ∆j, as such (Yildiz et al., 2021) propose to use
vironment dynamics. Real world data is often sampled irregularly ∆i (cid:54)
Neural-ODEs (Chen et al., 2018b) as their continuous-time dynamics model can model irregularly-sampled environments
with no delays τ = 0. Similarly, the work of Du et al. (2020) uses an a Latent-ODE model when planning policies.
However, these existing approaches are limiting, as an ODE-based model by definition cannot handle a delay differential
equation, necessitating the need for a model that can learn and model more diverse classes of differential equations. Recent
models, of modeling diverse classes of differential equations is made possible with the work of Neural Laplace (Holt et al.,
2022) by representing them in the Laplace domain. These Laplace-based models have been shown to be able to model such
systems, be more accurate and scale better with increasing time horizons in time complexity. Our approach, namely Neural
Laplace Control, essentially extends Neural Laplace to the setting of controlled systems-that is systems that evolve based
on an action signal a(t)-so that it can be used in planning policies in a RL setting.
Model predictive control (MPC) Principally relies on a good dynamics model, historically using simple first principle
known dynamic models (Richalet et al., 1978; Salzmann et al., 2022). Recently, MPC Model Predictive Path Integral
(MPPI) (Williams et al., 2017) is a zeroth order particle-based trajectory optimizer method that is capable of handling
complex cost criteria and general nonlinear dynamics. Specifically, Williams et al. (2017) showed it could be used with
a neural network learned dynamics model and used to drive a toy vehicle on a dirt track. MPC, and hence MPPI is
often computationally infeasible for long time horizons, therefore often only being run for a fixed receding time horizon
optimization into the future with a dynamics model. Using an MPC planner benefits from being able to handle arbitrary
state constraints, and changing goals. Here MPPI is the state-of-the-art for MPC with a learned dynamics model, improving
upon the previous cross-entropy method (CEM) (Kobilarov, 2012) MPC method. These naturally can incorporate new
state-based constraints at run time.
Hybrid MPC Various ways of combining a powerful MPC planner with an accurate dynamics model is another fruitful
thread (Argenson & Dulac-Arnold, 2020). All existing hybrid works, work only on discrete domains where demonstration
data is collected on regular time intervals. These include MBOP (Argenson & Dulac-Arnold, 2020), TD-MPC (Hansen
et al., 2022) and DADS (Sharma et al., 2019). We highlight that hybrid methods that plan in the latent space, i.e., TD-MPC
and DADS are unable to incorporate state-based constraints. However, these methods still struggle with scaling MPC
computational complexity forwards for longer time horizons.
Control literature We perform full system identification, i.e., learning the nonlinear dynamics model that has an un-
known inherent delay. Whereas the existing control literature provides control algorithms for known forms (often linear)
dynamics models for a known delay (Kwon et al., 2003; Raff et al., 2007)-therefore are not comparable. Moreover, there
exists a wealth of orthogonal related work on stability analysis in Control ( ̊Astr ̈om & Murray, 2010).
Learning from noisy demonstrations
It is preferable to learn a dynamics model on state-action trajectories that come
from a "noisy" expert. As a noisy expert can provide better trajectories than an expert as it shows how to recover from
"bad" states (Laskey et al., 2017)-specifically we assume the true expert is unknown. Moreover, as we only have access
to trajectories from a noisy expert, performing imitation learning (Liotet et al., 2022) would propagate the noisy behavior,
achieving a poor performance.
B NEURAL LAPLACE BACKGROUND
In the following we provide a brief Laplace background, specifically from that of the Neural Laplace (Holt et al., 2022)
model for modeling diverse differential equation (DE) systems-in the context of Neural Laplace Control. We defer the
reader to the work of Holt et al. (2022) for a full comprehensive explanation of the original Neural Laplace model.
Neural Laplace Control for Continuous-time Delayed Systems
States & actions For a system with state space
as x(t) = [x1(t), . . . , xdX (t)]
elaborate that state trajectory x : R
state x(t)
and a
for t
or an individual action a(t)
→ X
∈ X
∈ A
∈ X
I ∈ A
.
∈ I
X
and the action at time t
and action trajectory a : R
∈
= RdX and action space
R is denoted as a(t) = [a1(t), . . . , adA (t)]
= RdA , the state at time t
R is denoted
. We
are both functions of time, where an individual
∈ A
A
∈
are points on these trajectories. Given a time interval
→ A
(t) = x(t) and a
I
I
I ⊆
R, x
I
I ∈ X
(t) = a(t)
I we denote the partial state and action trajectories on that interval such that x
Laplace Transform The Laplace transform of a trajectory x is defined as (Schiff, 1999)
X(s) =
x
(s) =
}
L{
∞
e−
stx(t)dt,
(9)
∈
CdX is a vector of complex numbers and X(s)
0
(cid:90)
CdX is called the Laplace representation. The X(s) may
where s
∞ for one component (Schiff, 1999). Importantly, the Laplace transform is
have singularities, i.e., points where X(s)
well-defined for trajectories that are piecewise continuous, i.e., having a finite number of isolated and finite discontinuities
(Poularikas, 2018). This property allows a learned Laplace representation to model a dynamics model that can have delay
differential equation solutions (Holt et al., 2022).
→
∈
Inverse Laplace Transform The inverse Laplace transform (ILT) is defined as
ˆx(t) =
1
−
L
X(s)
}
{
(t) =
1
2πi
σ+i
∞
σ
(cid:90)
i
−
∞
X(s)estds,
(10)
where the integral refers to the Bromwich contour integral in CdX with the contour σ > 0 chosen such that all the
singularities of X(s) are to the left of it (Schiff, 1999). Many algorithms have been developed to numerically evaluate
Equation 10. On a high level, they involve two steps: (Dubner & Abate, 1968; De Hoog et al., 1982; Kuhlman, 2013).
(t) = ILT-Query(t)
Q
ˆx(t) = ILT-Compute
X(s)
s
|
{
(t)
∈ Q
(cid:0)
}
(cid:1)
(11)
(12)
∈ T ⊂
R+, the algorithms first construct a set of query points s
C. They
To evaluate x(t) on time points t
then compute ˆx(t) using the X(s) evaluated on these points. The number of query points scales linearly with the number
of time points, i.e.,
> 1, denotes the number of reconstruction terms per time
S
point and is specific to the algorithm. Importantly, the computation complexity of ILT only depends on the number of time
points, but not their values (e.g., ILT for t = 0 and t = 100 requires the same amount of computation). The vast majority
of ILT algorithms are differentiable with respect to X(s), which allows the gradients to be back propagated through the
ILT transform (Holt et al., 2022).
, where the constant d
(
T
|Q
S |T |
∈ Q
= d
(
T
)
|
⊂
)
Intuitively, the inverse Laplace transform (ILT) (Equation 10) reconstructs the dynamics model time solution with the basis
functions of complex exponentials est, which exhibit a mixture of sinusoidal and exponential components (Schiff, 1999;
Smith, 1997; Kuhlman, 2013).
Solving control of differential equations in the Laplace domain A key application of the Laplace transform is to solve
broad classes of DEs (Podlubny, 1997; Yousef & Ismail, 2018; Yi et al., 2006; Kexue & Jigen, 2011). Due to the Laplace
derivative theorem (Schiff, 1999), the Laplace transform can convert a DE into an algebraic equation even when the DE
τ ) (as in a delayed DE). It also applies to coupled DEs and can allow decoupled solutions
contains historical states x(t
to coupled DEs for dynamical systems ( ̊Astr ̈om & Murray, 2010). The resulting algebraic equation can either be solved
analytically or numerically to obtain the solution of the DE, X(s), in the Laplace domain. Finally, one can obtain the time
solution x(t) by applying the ILT on X(s). For instance, we could use the concise Laplace transform method to solve the
(delay) differential equations to get solutions for the state trajectories conditioned on a control input trajectory (Yi et al.,
2008).
−
Stereographic projection However, the Laplace representation X(s) often involves singularities (Schiff, 1999), which
are difficult for neural networks to approximate or represent (Baker & Patil, 1998). We instead propose to use a stere-
C into a coordinate on the Riemann Sphere
ographic projection u(s) = (θ, φ) to translate any complex number s
∈
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
(θ, φ)
= (
−
π, π)
(
−
×
∈ D
π
2 , π
2 ) (Rudin, 1987), i.e.,
u(s) =
arctan
Where the associated inverse transform, u−
(cid:18)
1 :
D →
(cid:19)
(cid:18)
C, is given as
Im(s)
Re(s)
, arcsin
2
s
1
|
−
2 + 1
s
|
|
|
(cid:18)
(cid:19)(cid:19)
s = u−
1(θ, φ) = tan
φ
2
+
π
4
eiθ
(cid:19)
(cid:18)
(13)
(14)
A nice example of this map is the function of 1/s, which corresponds to a rotation of the Riemann-sphere 180◦ about the
real axis. Therefore, a representation of 1/s under this transformation becomes the map θ, φ
φ (Rudin, 1987).
θ,
(cid:55)→ −
−
Figure 7: Geometry of the Riemann sphere map for a complex number C into a spherical co-ordinate representation of θ, φ.
Inverse Laplace transform After obtaining the Laplace representation X(s) from Equation 6 (see main paper), we
compute the predicted or reconstructed state values ˆx(t) using the ILT. We highlight that we can evaluate ˆx(t) at any
R+ as the Laplace representation is independent of time once learnt. In practice, we use the well-known ILT
future time t
Fourier series inverse algorithm (ILT-FSI), which can obtain the most general time solutions whilst remaining numerically
stable (Dubner & Abate, 1968; De Hoog et al., 1982; Kuhlman, 2013). We use the specific ILT Fourier series algorithm
from Holt et al. (2022) and use their code implementation of the ILT algorithm.
∈
C MPC MPPI PSEUDOCODE AND PLANNER IMPLEMENTATION DETAILS
We opt to use the model predictive controller of Model Predictive Path Integral (MPPI) (Williams et al., 2017). This uses
a zeroth order particle-based trajectory optimizer method with our learned Laplace dynamics model. Specifically, this
R+ seconds, and then executes the first element
computes a discrete action sequence up to a fixed time horizon of H
R+ as the observation time interval, that is the time between two
in the planned action sequence. Where we denote δ
consecutive state observations. It is natural for online control problems to be controlled at discrete-time steps of δ, where δ
can be varied. Therefore, the MPPI plans actions at discrete-time steps δ, up to a fixed time horizon H by planning ahead
N . This leverages a number of
N
Z+, a hyper parameter, which can be tuned. As MPPI is a Monte Carlo based sampler, increasing
parallel roll-outs M
(N M ).
the number of roll-outs improves the input trajectory optimization, however, scales the run-time complexity as
Z+ steps into the future, thus the planning time horizon is determined by H = δ
∈
∈
∈
∈
*
O
We use the standard MMPI algorithm (Williams et al., 2017) with our dynamics model F , with the slight modification
where we provide the dynamics model the current state, action and a buffer of previous actions back to ω seconds, i.e.,
ω:t], δ). For simplification of notation, as MPPI plans at discrete time steps of δ seconds, we relax
xt+δ = F (xt, a[t
the δ notation to discrete time steps of δ, where δ = ̄∆ = 0.05 seconds at run-time. Specifically, for ω = 4 ̄∆ = 4δ
we denote the discrete multiple of δ as ̄ω = 4, the next state estimate is given by xt+1 = F (xt, a[t
̄ω:t]). Furthermore,
−
dA buffer of the previously planned action
MPPI requires us to keep in memory the global action trajectory T
R(N + ̄ω)
−
×
∈
<latexit sha1_base64="NYiXKnXvNifPUCVCj+SpH6YTqPg=">AAAB7nicbVBNS8NAEN3Ur1q/qh69LBbBU0lE1JMUvHisYD+gDWWznbRLN5uwOxFK6I/w4kERr/4eb/4bN20O2vpg4PHeDDPzgkQKg6777ZTW1jc2t8rblZ3dvf2D6uFR28Sp5tDisYx1N2AGpFDQQoESuokGFgUSOsHkLvc7T6CNiNUjThPwIzZSIhScoZU6fRwDssqgWnPr7hx0lXgFqZECzUH1qz+MeRqBQi6ZMT3PTdDPmEbBJcwq/dRAwviEjaBnqWIRGD+bnzujZ1YZ0jDWthTSufp7ImORMdMosJ0Rw7FZ9nLxP6+XYnjjZ0IlKYLii0VhKinGNP+dDoUGjnJqCeNa2FspHzPNONqE8hC85ZdXSfui7l3VLx8ua43bIo4yOSGn5Jx45Jo0yD1pkhbhZEKeySt5cxLnxXl3PhatJaeYOSZ/4Hz+ANw5j0E=</latexit>✓<latexit sha1_base64="d+Nc0EeM9pIJfusqHoL0j8m47W8=">AAAB7HicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE1JMUvHisYNpCG8pmO2mXbjZhdyOU0t/gxYMiXv1B3vw3btoctPXBwOO9GWbmhang2rjut1NaW9/Y3CpvV3Z29/YPqodHLZ1kiqHPEpGoTkg1Ci7RN9wI7KQKaRwKbIfju9xvP6HSPJGPZpJiENOh5BFn1FjJ76UjXulXa27dnYOsEq8gNSjQ7Fe/eoOEZTFKwwTVuuu5qQmmVBnOBM4qvUxjStmYDrFrqaQx6mA6P3ZGzqwyIFGibElD5urviSmNtZ7Eoe2MqRnpZS8X//O6mYlugimXaWZQssWiKBPEJCT/nAy4QmbExBLKFLe3EjaiijJj88lD8JZfXiWti7p3Vb98uKw1bos4ynACp3AOHlxDA+6hCT4w4PAMr/DmSOfFeXc+Fq0lp5g5hj9wPn8ASvGOWA==</latexit> <latexit sha1_base64="hZSwcsuFFk4NujusUg6JoHWjNgw=">AAAB+nicbVBNSwMxEM3Wr1q/tnr0EiyCp7Irop6k4MVjFfsB7VKy6bQNzSZLklXK2p/ixYMiXv0l3vw3Zts9aOuDgcd7M8zMC2POtPG8b6ewsrq2vlHcLG1t7+zuueX9ppaJotCgkkvVDokGzgQ0DDMc2rECEoUcWuH4OvNbD6A0k+LeTGIIIjIUbMAoMVbqueWujEERI5UgEaR3MO25Fa/qzYCXiZ+TCspR77lf3b6kSQTCUE607vhebIKUKMMoh2mpm2iICR2TIXQszfboIJ2dPsXHVunjgVS2hMEz9fdESiKtJ1FoOyNiRnrRy8T/vE5iBpdBykScGBB0vmiQcGwkznLAfaaAGj6xhFDF7K2Yjogi1Ni0SjYEf/HlZdI8rfrn1bPbs0rtKo+jiA7RETpBPrpANXSD6qiBKHpEz+gVvTlPzovz7nzMWwtOPnOA/sD5/AHy1JRy</latexit>Re<latexit sha1_base64="fY4AI85UGaDOWdmiLAMUaKrxD0A=">AAAB+nicbVBNSwMxEJ2tX7V+bfXoJVgET2VXRD1JwYveKtgPaJeSTdM2NNksSVYpa3+KFw+KePWXePPfmG33oK0PBh7vzTAzL4w508bzvp3Cyura+kZxs7S1vbO755b3m1omitAGkVyqdog15SyiDcMMp+1YUSxCTlvh+DrzWw9UaSajezOJaSDwMGIDRrCxUs8td2VMFTZSRVjQ9FZMe27Fq3ozoGXi56QCOeo996vblyQRNDKEY607vhebIMXKMMLptNRNNI0xGeMh7Via7dFBOjt9io6t0kcDqWxFBs3U3xMpFlpPRGg7BTYjvehl4n9eJzGDyyBlUZwYGpH5okHCkZEoywH1maLE8IklmChmb0VkhBUmxqZVsiH4iy8vk+Zp1T+vnt2dVWpXeRxFOIQjOAEfLqAGN1CHBhB4hGd4hTfnyXlx3p2PeWvByWcO4A+czx/xRpRx</latexit>ImNeural Laplace Control for Continuous-time Delayed Systems
trajectory. With slight abuse of notation, we define the global action trajectory that is used to plan ahead N discrete time
steps to also contain the past ̄ω action histories, i.e., T[0
̄ω:N ]. We detail the MPPI pseudocode with the high-level policy
in Algorithm 1 and the MPPI action trajectory optimizer in Algorithm 2.
−
Algorithm 1 High-Level MPPI Policy
−
1]
[00
̄ω, . . . , 0N
do
Input: Pre-trained dynamics model F .
T 0
←
−
for t = 1 . . .
xt ←
T t
←
at ←
end for
Observe xt
MPPI-Trajectory-Optimization(F, xt, T t
T t
0
∞
1)
−
Algorithm 2 MPPI-Trajectory-Optimization
(cid:46) Initialize planned action trajectory.
(cid:46) Update planned trajectory T t starting with T[0
̄ω:0].
(cid:46) Use first action T0 as π(xt).
−
−
−
̄ω:N
0M,N+ ̄ω
0M,N+ ̄ω
̄ω:N]/amax
T[1
−
1 do
1] ←
−
0M,N+ ̄ω
(cid:46) This holds our M trajectory returns.
(cid:46) This holds our M action trajectories of length N .
(cid:46) This holds M action trajectories of length N that are perturbed by noise.
(cid:46) This holds the generated scaled action noise.
Input: Pre-trained dynamics model F , starting state x, previous global action trajectory T , steps to plan ahead for N ,
number of parallel roll-outs M , noise covariance Σ, hyper parameters λ, action max amax, action min amin.
RM ←
0M
AM,N + ̄ω ←
A(cid:48)M,[0
εM,N + ̄ω ←
AM,[0
1] ←
̄ω:N
−
for m = 0 . . . M
−
x
x0 ←
for n = 0 . . . N
εm,n ← N
A(cid:48)m,n ←
A(cid:48)m,n ←
εm,n ←
end for
for n = 0 . . . N
xn+1 ←
Rm ←
(cid:46) Sample action noise.
(cid:46) Perturb action by noise.
(cid:46) Clip normalized perturbed noise (to bound actions to their limits).
(cid:46) Update noise after bounding, so we do not penalize clipped noise.
(cid:46) Broadcast previous scaled down action trajectory T to M roll-outs.
(cid:46) Sample M trajectories over the horizon N .
(cid:46) Sample next state from pre-trained dynamics model F .
(cid:46) Accumulate the current state reward.
1 do
−
F (xn, A(cid:48)[n
̄ω:n] *
Rm + r(xn, Am,n)
Am,n + (cid:15)m,n
min(max(A(cid:48)m,n,
A(cid:48)m,n −
−
(0, Σ)
m,nΣ−
1), +1)
1εm,n
amax)
Am,n
λAT
1 do
−
−
−
end for
minm[Rm]
←
end for
κ
T (cid:48)n = Tn +
Return: T (cid:48)
(cid:80)M −1
m=0 exp( 1
(cid:80)M −1
m=0 ( 1
λ (Rm
λ (Rm
κ))εm,n
κ))
−
−
amax,
n
∀
∈
*
[0, N
1]
−
(cid:46) Generate the return-weighted trajectory update.
D ENVIRONMENT SELECTION AND DETAILS
In the following we discuss our reasoning for why we selected the delay τ > 0 adapted continuous-time control envi-
ronments from the ODE-RL suite (Yildiz et al., 2021) 5 and the reasoning behind our choice of sampling irregularly in
= ∆j of state-action trajectories (x(t + ∆i), a(t + ∆i)) from these environments. We first outline why existing
time ∆i (cid:54)
environment offline datasets are not suitable.
Why we cannot use an offline dataset of agent trajectories in an un-delayed discrete-time environment
It is straight-
forward, and there exists standard datasets (Fu et al., 2020) of state-action trajectories of (expert) agents interacting with
environments that have no delays τ = 0 and are sampled at regular times ∆i = ∆j. In the following we outline why these
datasets cannot be used:
5The ODE-RL suite of
cagatayyildiz/oderl.
the environments used can be downloaded freely available from https://github.com/
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
• Presence of a constant delay τ > 0 in the environment. Intuitively one might suggest taking a standard dataset and
shift the actions by a fixed delay. However, we note this dataset is then unrealistic, as it violates causal information-
as a hypothetical action would know how its current action affected future states before it had even observed them.
Due to this fact, this prevents us from using existing standard offline datasets (Fu et al., 2020). Thus, this motivates
the need to sample agents that interact within an environment that has an inherent delay of a constant delayed action
(or constant delayed state observation).
= ∆j state-action trajectories. Let us hypothetically imagine that
• Presence of irregularly sampled in time ∆i (cid:54)
there exists a regularly-sampled ∆i = ∆j in time state-action trajectory offline dataset from an environment that has
an inherent constant action delay τ > 0. Can we then sample them irregularly? One could suppose that we use some
form of interpolation (e.g., splines or similar) to interpolate to irregular time steps between states and actions, however
doing so would lead to errors in the sampled state-action trajectories in comparison to the true irregularly-sampled
state-action trajectories at those non-uniform time points. These errors could compound over a dynamics model being
trained on these; therefore, we highlight that this approach is unsuitable. Another approach would be to start with a
regularly sampled state-action trajectory t
then sub-sample state-action times from that
regular grid of collected times t
. Again we indicate this approach unsuitable, as often environments are captured
at run-time with a particular observation interval ̄∆ seconds, and only observing multiples of this would mean gaps
between observations, where the mean of the observation intervals is larger than that of the environments nominal
run-time observation interval ̄∆Sub-sample > ̄∆Original Trajectory. We note that this becomes a different problem, and as
there is less information in the state-action trajectories with large observation interval gaps. Instead to mitigate both of
these issues we prefer to collect an offline dataset ourselves of an agent interacting with the delay environments with
true irregular observation intervals, where we sample the time interval to the next observation from an exponential
distribution, i.e., ∆
Exp( ̄∆), with a mean of ̄∆ = 0.05 seconds.
0, ̄∆, 2 ̄∆, . . . , N ̄∆
∈ T ∈ {
⊂ T
}
∼
Given the above reasoning, we take the approach to collect offline datasets of a noisy agent interacting with the delay
Exp( ̄∆), with a mean of ̄∆ = 0.05
environments, where the observations occur at irregular time intervals given by ∆
seconds. We note this approach is similar to Fu et al. (2020) and provides a more realistic offline dataset to train our
dynamics models on.
∼
We use the continuous-time control environments from the ODE-RL suite (Yildiz et al., 2021), as they provide true irregular
samples in time of state observations and are fully continuous in time, unlike discrete environments (Brockman et al.,
2016). We adapt these to incorporate an arbitrary fixed delayed action time, turning the ODE environments into delay DE
environments. We do this by keeping a buffer of the previous actions that have been produced by the policy, which captures
the previous actions generated in the past ω = 4 ̄∆ seconds. In practice this buffer is 4 action elements long and is fed
into the dynamics model in its entirety. The true environment then executes the action at the previous time of the constant
and is unknown to the dynamics model. Thus, the dynamics model sees
action delay, which is one of τ =
the entire action buffer and must instead learn implicitly the delay of the environment by modeling the dynamics of the
environment accurately.
0, ̄∆, 2 ̄∆, 3 ̄∆
{
}
The starting state for all tasks is hanging down and the goal is to swing up and stabilize the pole(s) upright (Yildiz et al.,
2021) in each environment. In all environments the actions are continuous and bounded to a defined range [amin, amax.
Here we assume a given state x(t) is composed of the position state q and their respective velocities ̇q, i.e., x(t) =
. Here, each environment uses the reward function of the exponential of the negative distance from the current
q(t), ̇q(t)
{
}
state to the goal state q∗, whilst also penalizing the magnitude of action, and we assume that we are given this reward
function when planning-as we often know the desired goal state q∗ and our current state q. Therefore, the reward
function for the environments has the following form:
r(
q(t), ̇q(t)
{
, a(t)) = exp(
}
q(t)
−||
q∗
2
2 −
||
b
−
||
̇q(t)
2
2)
||
c
−
a(t)
||
2
2
||
(15)
Where b and c are specific environment constants (Yildiz et al., 2021). Specifically, when we use our MPC planner we
observe that it plans better without the exponential operator, therefore remove it, and use the following reward function
2
throughout, r(
2. Yildiz et al. (2021) set the environments
̇q(t)
q(t), ̇q(t)
{
||
parameters of b, c to penalize large values and enforce exploration from trivial states, and we use their same values which
are also tabulated in Table 4.
, a(t)) =
}
2
2 −
||
2
2 −
||
a(t)
q(t)
c
||
−||
q∗
−
||
b
The goal states for all environments is when the poles, each of length L are fully upright, such that their x, y co-ordinates
of the tip of the pole reach the goal state. Where q∗ is: [0, L] for the Pendulum environment, [0, 0, L] for the Cartpole
environment-where the additional 0 is zero for the cart's x location and in Acrobot is [0, 2L] as there are two poles
Neural Laplace Control for Continuous-time Delayed Systems
Table 4: Environment specification parameters of the ODE-RL suite (Yildiz et al., 2021).
Base Environment
Pendulum
Cartpole
Acrobot
b
−
−
−
2
2
4
1e
1e
1e
c
−
−
−
2
2
2
1e
1e
1e
amax
[2]
[3]
[4, 4]
xInit
q∗
[0.1, 0.1]
[0.05, 0.05, 0.05, 0.05]
[0.1, 0.1, 0.1, 0.1]
[0, L]
[0, 0, L]
[0, 2L]
connected to each other. Furthermore, upon restarting the environment the initial state x is sampled from the uniform
xInit, xInit] (Yildiz et al., 2021), then the θ states are added with set angle such that the pole(s) are
distribution of x0 ∼ U
−
pointing downwards (i.e., Cartpole θ(cid:48) = θInit + π).
[
We note that existing offline RL methods have only been developed for discrete-time ∆i = ∆j settings and environments
that do not possess a delay dynamics τ = 0 (Argenson & Dulac-Arnold, 2020), therefore they are not applicable-instead
we opt to train an environment dynamics model and use a planner to select the next action to take.
In the following we describe each of our environments introducing the vanilla environment with a screenshot figure.
D.1 Cartpole (swing up) Environment
Figure 8: Screen shots of the Cartpole environment. The task is to swing up a pole attached to a cart that can move horizontally along a
rail. In the following we see: (a) the starting downward state with an additional small amount of perturbation, (b) the optimal trajectory
solution found by a policy that scores R = 100% including our NLC model and an expert + MPC and (c) the final goal state that has
been reached, that is, to swing up the pole and stabilize it upwards-which is a challenging control task. We note that the control actuator
is bounded and limited, and the force is such that the Cartpole cannot be directly swung up-rather it must gain momentum through a
swing and then stabilize this swing to not overshoot when stabilizing the pole upwards in the goal position, as indicated when the tip of
the pole reaches the centre of the red target square. Furthermore, we note this environment is an underactuated system.
We can see in Figure 8, an illustration of the starting state Figure 8 (a) with a small perturbed random initial start. Here a
pole is attached to an un-actuated joint to a cart that moves along a frictionless track (Barto et al., 1983). The pendulum
starts in the downward position Figure 8 (a) and the goal is to swing the pendulum upwards and then balance the pole
upright by applying forces to the left or right horizontal direction of the cart. This environment has the state of [x, ̇x, θ, ̇θ]
and a corresponding observation of [x, ̇x, cos(θ), sin(θ), ̇θ], where θ
π, π) is measured from the upward vertical of
the pole. We note that this environment is an underactuated system, as it has two degrees of freedom [x, θ], however only
the carts position is actuated, leaving θ indirectly controlled.
(
−
∈
D.2 Pendulum Environment
We can see in Figure 9, an illustration of the starting state Figure 9 (a) with a small perturbed random initial start. Here
a pole (pendulum) is attached to a fixed point at one end with the other end being free (Barto et al., 1983; Yildiz et al.,
2021). The pendulum starts in the downward position Figure 9 (a) and the goal is to swing the pendulum upwards and
then balance the pole upright by applying torques about the fixed point, as indicated in the Figure 9 with a visualisation
showing the torque direction and magnitude based on the size of the arrow. This environment has the state of [θ, ̇θ] and a
corresponding observation of [sin(θ), cos(θ), ̇θ].
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Figure 9: Screen shots of the Pendulum environment. The task is to swing up the pole (pendulum). In the following we see: (a)
starting downward state with an additional small amount of perturbation, (b) the optimal trajectory solution found by a policy that scores
R = 100% including our NLC model and an expert + MPC and (c) the final goal state that has been reached, that is, to swing up the
pole and stabilize it upwards. We note that the control actuator is bounded and limited, and the force is such that the Pendulum cannot
be directly swung up-rather it must gain momentum through a swing and then stabilize this swing to not overshoot when stabilizing
the pole upwards in the goal position.
In the following we see: (a)
Figure 10: Screen shots of the Acrobot environment. The task is to swing up the 2-link pendulum.
starting downward state with an additional small amount of perturbation, (b) the optimal trajectory solution found by a policy that scores
R = 100% including our NLC model and an expert + MPC and (c) the final goal state that has been reached, that is, to swing up
the 2-link pendulum and stabilize it upwards. We note that the control actuator is bounded and limited, and the force is such that the
2-link pendulum cannot be directly swung up-rather it must gain momentum through a 2-link swing and then stabilize this swing to
not overshoot when stabilizing the 2-link pendulum upwards in the goal position.
D.3 Acrobot Environment
We can see in Figure 10, an illustration of the starting state Figure 10 (a) with a small perturbed random initial start. It
is a 2-link pendulum with the individual joints actuated (Brockman et al., 2016). The 2-link pole starts in the downward
position Figure 10 (a) and the goal is to swing the 2-link pendulum upwards and then balance the pole(s) upright by
applying torques about their fixed points. This environment has the state of [θ1, ̇θ1, θ2, ̇θ2] and a corresponding observation
of [sin(θ1), cos(θ1), ̇θ1, sin(θ2), cos(θ2), ̇θ2]. Here the Acrobot environment is fully actuated, as no method has been able
to solve the underactuated balancing problem (Yildiz et al., 2021; Zhong et al., 2019).
E BENCHMARK METHOD IMPLEMENTATION DETAILS
We tuned all the baseline dynamics models to have the same approximate number of parameters, as can be seen in Table
5-to ensure fair comparison for any gains in modeling complexity. We train and evaluate all the dynamics models and all
data used with double point floating precision, as is recommended when using an inverse Laplace transform (ILT) to aid the
ILT stability (Holt et al., 2022; Kuhlman, 2013). Further all dynamics models are implemented in PyTorch (Paszke et al.,
Neural Laplace Control for Continuous-time Delayed Systems
Table 5: Benchmark dynamic models implemented and their number of parameters for each model.
Dynamics model
# Parameters
RNN
∆t
−
NODE
Latent-ODE
Neural Laplace Control
79,075
76,956
76,453
81,772
2019), and trained with an Adam optimizer (Kingma & Ba, 2017) with a learning rate of 1e-4. Each baseline dynamics
model are:
−
Discrete-delay method We implemented the discrete-delay method similar to Chen et al. (2021), a RNN over the action
buffer and current state, and adapt it to model continuous-time with a new input of the time increment to predict the next
RNN). We note to adapt discrete-time models to continuous-time we add an additional input parameter,
state for (∆t
that of the time difference between the current time and the next state observation to predict, i.e., δ, e.g., xi+1 = xi +
Hi into a gated recurrent neural (GRU) network
f (xi, ai, δ). (Yildiz et al., 2021). Specifically, we feed the action buffer
with a hidden size of 160 features in the hidden state and feed the final hidden state and concatenate it with the current
observed state and time increment to predict the next state which is all input into a linear layer to produce the output state
prediction.
Continuous-time methods We implemented an augmented Neural-ODE (NODE) (Chen et al., 2018b), using their code
and corresponding implementation provided, and set their ODE function f (t, x(t), a(t)) to be a 3-layer multilayer per-
ceptron (MLP), of 270 units, with tanh activation functions-with an additional augmented dimension of zeros. As
neural-ODE does not have an encoder, we feed the most recent action taken at time t, i.e., a(t) into the MLP f function
instead. Further, to allow for fair comparison we use the semi-norm trick for faster back propagation Kidger et al. (2020a),
and use the 'euler' solver throughout. We also use the reconstruction MSE for training.
We also compare with Latent-ODE (Rubanova et al., 2019a), which uses an ODE-RNN encoder and an ODE model
decoder. We feed this the action history buffer
ti) :
for the same sample times. We use their code provided, setting the units to be 128 for the GRU and ODE
tj ∈
function f (t, x(t), a(t)) net, with tanh activation functions and use the 'dopri5' solver. We also use their reconstruction
variational loss function for training.
Hi concatenated with an equivalent state history buffer
(xj, tj −
{
ω, ti]
}
[ti −
(cid:48)i =
H
)
)
A
, p(
X
i
Neural Laplace Control This paper uses a GRU encoder hζ (Cho et al., 2014), to encode the action buffer
Hi with 2
layers and a hidden size of 64 features in the hidden state, with a final linear layer on the final hidden to output p(
)
.
A
i
We do not encode the state and instead feed it directly as p(
i = xi. Therefore, we encode both into a latent dimension
X
pi = (p(
). For the Laplace representation model, gψ we use a 3-layer MLP with 128 units, with tanh activations.
i
As recommended by Holt et al. (2022) we further use a tanh on the output to constrain the output domain to be (θ, φ)
∈
2 ) for each output state prediction. For a given state prediction, we encode the action buffer and
D
p, u(s)), where s is given by the ILT algorithm for a
state into pi and concatenate this with u(s) as the input to gψ, i.e., gψ
future time point to predict the state for. Specifically, we use the Fourier-series inverse algorithm (ILT-FSI), with d
= 17
S
reconstruction terms. Where we use the specific ILT-FSI from Holt et al. (2022) and use their code implementation of the
ILT algorithm.
2 , π
π, π)
(
−
= (
−
×
(cid:0)
π
)
MPPI Implementation We use the MPPI algorithm, with pseudocode and is further described in Appendix C. Specifi-
cally, as is recommended by Lutter et al. (2021) we optimized the MPPI hyperparameters through a grid search with the true
(Oracle) dynamics model for a single environment setting, that of the Cartpole environment with a delay of τ = ̄∆ = 0.05
seconds, and fix these for planning with all the learned dynamics models throughout. Specifically, our final optimized
hyperparameter combination is N = 40, M = 1, 000, λ = 1.0, σ = 1.0. Where Σ the MPPI action noise is defined as:
[σ2]
σ2
0.5σ2
Σ =
(cid:20)
if d
A
if d
A
= 1
= 2
0.5σ2
σ2
(cid:21)
(16)
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Where the Cartpole and Pendulum environments have d
eters were found by searching over a grid of possible values, which is detailed in Table 6.
= 1 and Acrobot environment has d
A
A
= 2. These hyperparam-
Table 6: MPPI hyperparameter grid search sweep values.
Hyperparameter
Grid values searched over
N
M
λ
σ
1, 2, 4, 8, 16, 20, 40, 50, 60, 70, 80, 90, 100, 128, 256, 512, 1024, 2048
{
1, 2, 4, 8, 16, 20, 40, 50, 60, 70, 80, 90, 100, 128, 256, 500, 1000, 2000, 4000, 8000
}
{
0.00001, 0.0001, 0.001, 0.01, 0.1, 0.5, 0.8, 1.0, 1.5, 2.0, 10.0, 100.0, 1000.0
}
{
0.00001, 0.0001, 0.001, 0.01, 0.1, 0.5, 0.8, 1.0, 1.5, 2.0, 10.0, 100.0, 1000.0
}
{
}
F EVALUATION METRICS
For each environment, with a different delay setting we collect an offline dataset of irregularly-sampled in time trajectories,
consisting of 1e6 samples from the "noisy expert" agent interacting within that environment (Section 5 & Appendix G). For
each benchmark dynamics model, we follow the same two step evaluation process of, firstly, training the dynamics model
on that environment's collected offline dataset using a MSE error loss for the next step ahead state prediction ˆx(ti+1). Then,
secondly, taking the same pre-trained model and freezing the weights, and only using it for planning with the MPPI (MPC)
planner at run-time in an environment episode, that lasts for 10 seconds. In total, we evaluate our model-based control
algorithms online in the same environment, running each one for a fixed observation interval of δ = ̄∆ = 0.05 seconds
(as is the nominal value for these environments (Yildiz et al., 2021; Brockman et al., 2016), unless specified otherwise),
and take the cumulative reward value after running one episode of the planner (policy) and repeat this for 20 random seed
runs for each result. We quote the normalized score
(Yu et al., 2020) of the policy in the environment, averaged over
the 20 random seed run episodes, with standard deviations throughout. The scores are un-discounted cumulative rewards
normalized to lie roughly between 0 and 100, where a score of 0 corresponds to a random policy, and 100 corresponds to
an expert (oracle with a MPC planner). Specifically, when we evaluate the insights experiments in Section 5.2, where we
change the planning observation interval δ, this changes the number of steps taken in an episode, therefore we quote the
un-discounted average rewards normalized to lie roughly between 0 and 100, where a score of 0 corresponds to a random
policy, and 100 corresponds to an expert (oracle with a MPC planner). We note that a normalized cumulative reward for an
episode and an average reward for an episode for the same number of steps in an episode are equivalent. Furthermore, we
also track the metric of total planning time taken to plan the next action as
seconds and perform all experiments using a
single Intel Core i9-12900K CPU @ 3.20GHz, 64GB RAM with a Nvidia RTX3090 GPU 24GB.
R
O
G DATASET GENERATION AND MODEL TRAINING
For each environment we generate an offline state-action trajectory dataset by using an agent that uses an oracle dynamics
model combined with MPC and has additional noise added to the agents selected action, ̄π(t) = π(t) + (cid:15), (cid:15)
(0, amax).
∼ N
This "noisy expert" agent interacts with the environment and observes observations at irregular unknown times, where
Exp( ̄∆), with a mean of
we sample the time interval to the next observation from an exponential distribution, i.e., ∆
̄∆ = 0.05 seconds. We note other irregular sampling types are possible, however Yildiz et al. (2021) has shown they are
approximately equivalent. We assume a fixed action delay τ , and evaluate discrete multiples of this delay of the mean
sampling time ̄∆, i.e., τ = ̄∆ for one step delay, τ = 2 ̄∆ for two step delay etc. We enforce the observed action history
buffer that includes past actions back to ω = 4 ̄∆ seconds. For each specific delay version of each base environment
class (Cartpole, Pendulum and Acrobot) we collect a total of 1e6 irregular state-action samples in time (unless otherwise
specified). Using the whole collected dataset we pre-process this by a standardization step, to make each dimension of the
samples have zero mean and unit variance (by taking away the mean for each dimension and then dividing by the standard
deviation for each dimension)-we also use this step during run-time for each dynamics model. Furthermore, we train all
the baseline models on all the samples collected in the offline dataset (all samples are training data), training the models
parameters with the Adam optimizer (Kingma & Ba, 2017) with a learning rate of 1e-4 throughout. Specifically, we train
all the baseline dynamics models on a given offline dataset by training each model for 2 hours and 15 minutes. We also ran
a further experiment where we trained all the models for a fixed number of epochs instead, detailed further in Appendix
J.1. For the insights experiments in Section 5.2 that quote a validation dataset error, we achieve this by generating a new
offline dataset using the same setup described above with a different random seed to use as a validation dataset.
∼
Neural Laplace Control for Continuous-time Delayed Systems
H RAW RESULTS
The full results from Table 2, are in Table 7 along with their un-normalized versions in Table 8.
High variance in Latent-ODE and NODE We detail their poor performance to: (1) both these models do not support
batches of trajectories evaluated at different non-uniform time points-therefore, they are trained with a batch size of 1,
(2) we only train a single dynamics model, unlike other works (Yildiz et al., 2021) that train an ensemble of models, and
(3) Latent-ODE is trained using the recommended variational loss of the next step ahead prediction.
Table 7: Normalized scores R of the offline model-based agents, where the irregularly-sampled (P1) offline dataset consists of an
action delay (P2) of {0, 1, 2, 3} multiples of the environments observation interval time step ̄∆ = 0.05 seconds. Averaged over 20
random seeds, with ± standard deviations. Scores are un-discounted cumulative rewards normalized to be between 0 and 100, where 0
corresponds to the Random agent and 100 corresponds to the expert with the known world model (oracle+MPC). Negative normalized
scores, i.e., worse than random are set to zero.
Dynamics Model
Cartpole
Action Delay τ = 0
Pendulum
Acrobot
Cartpole
Action Delay τ = ̄∆
Pendulum
Acrobot
Cartpole
Action Delay τ = 2 ̄∆
Pendulum
Acrobot
Action Delay τ = 3 ̄∆
Pendulum
Cartpole
Acrobot
Random
Oracle
∆t
Latent-ODE
NODE
RNN
−
NLC (Ours)
0.0
100.0
96.76
0.0
70.08
0.0
0.04
0.34
0.0
2.94
±
±
±
±
±
99.87
0.1
±
0.0
3.34
7.09
8.45
4.19
0.0
100.0
32.73
8.08
12.89
±
±
±
±
±
101.52
3.3
±
0.0
100.0
12.61
4.45
0.0
0.0
1.84
4.65
8.81
0.0
±
±
±
±
±
99.16
1.91
±
0.0
100.0
95.28
0.0
85.09
0.0
0.15
0.4
±
±
±
0.0
7.95
99.83
0.19
±
±
±
0.0
100.0
1.14
0.0
0.63
0.0
3.14
6.31
0.0
5.16
±
±
±
±
±
98.31
3.51
±
0.0
100.0
18.95
0.0
23.07
0.0
2.19
7.6
±
±
±
0.0
6.94
±
±
99.12
1.7
±
0.0
100.0
97.01
0.0
90.75
0.0
0.04
0.31
0.0
1.34
±
±
±
±
±
99.88
0.1
±
0.0
100.0
9.94
1.24
0.0
0.0
2.57
2.48
20.67
0.0
±
±
±
±
±
93.28
4.96
±
0.0
100.0
28.39
8.91
10.92
0.0
±
1.79
±
9.73
±
13.62
10.09
±
±
100.44
2.13
±
0.0
100.0
97.8
41.56
94.55
0.0
0.08
0.25
47.07
1.08
±
±
±
±
±
99.92
0.12
±
0.0
100.0
11.81
3.26
1.97
0.0
2.57
11.93
12.24
4.01
±
±
±
±
±
98.98
1.32
±
0.0
100.0
3.89
9.19
11.78
0.0
1.26
6.72
9.08
8.33
±
±
±
±
±
99.46
1.88
±
Table 8: Un-normalized scores R of the offline model-based agents, where the irregularly-sampled (P1) offline dataset consists of an
action delay (P2) of {0, 1, 2, 3} multiples of the environments observation interval time step ̄∆ = 0.05 seconds. Averaged over 20
random seeds, with ± standard deviations. Scores are un-discounted cumulative rewards.
Dynamics Model
Cartpole
Pendulum
Acrobot
Cartpole
Pendulum
Acrobot
Cartpole
Pendulum
Acrobot
Cartpole
Action Delay τ = 0
Action Delay τ = ̄∆
Action Delay τ = 2 ̄∆
Action Delay τ = 3 ̄∆
Pendulum
Acrobot
Random
Oracle
∆t
Latent-ODE
NODE
RNN
−
-14246.3
-139.69
-597.21
-152488.09
-4359.77
0.0
±
5.27
±
47.95
±
89951.95
±
415.24
±
NLC (Ours)
-158.31
14.66
±
-616.77
-121.05
-454.51
-576.69
-552.86
-113.52
0.0
±
16.54
±
35.13
±
41.91
±
20.78
±
16.35
±
-2948.64
-571.11
±
-2648.73
±
-2842.9
±
-3048.13
±
0.0
±
43.7
110.56
209.42
79.08
-591.16
45.46
±
-9713.19
-146.26
-598.27
-814206.21
-1572.47
0.0
±
13.95
37.96
292756.78
760.41
-162.47
18.31
±
±
±
±
±
-575.98
-123.44
-570.82
-696.61
-573.12
0.0
14.2
28.57
71.72
23.33
±
±
±
±
±
-131.07
15.9
±
-2910.5
-558.76
-2464.87
-2911.94
-2368.03
-579.39
0.0
±
51.41
±
178.77
±
263.25
±
163.25
±
39.92
±
-15097.54
-145.56
-592.66
-1539109.96
-1528.85
0.0
±
5.26
46.17
288324.7
200.28
±
±
±
±
-163.0
14.67
±
-584.8
-125.08
-539.12
-579.11
-613.56
0.0
11.79
11.39
95.01
16.01
±
±
±
±
±
-155.96
22.82
±
-2938.69
-582.01
-2269.64
-2728.8
-2681.39
0.0
±
42.1
±
229.3
±
320.88
237.74
-20798.89
-153.19
-607.96
-12217.77
-1277.55
0.0
±
16.72
51.11
9717.18
222.61
±
±
±
±
±
±
±
±
-596.38
-133.51
-541.71
-581.29
-587.27
0.0
±
11.88
±
55.22
±
56.67
±
18.57
±
±
-2885.99
-588.61
-2796.69
-2674.88
-2615.45
±
±
±
±
0.0
±
28.84
154.29
208.65
191.46
-601.04
43.17
±
-571.64
50.1
-170.17
25.59
-138.23
6.13
I
INSIGHT EXPERIMENTS
In this section we seek to gain further insight into how Neural Laplace Control outperforms the benchmarks.
In the
following we seek to understand if NLC is able to learn from irregularly-sampled state-action offline datasets (P1), whilst
learning the delayed dynamics of the environment (P2). Furthermore, we also explore the benefits of the NLC approach
for planning at longer time horizons with a fixed amount of compute and being sample efficient.
I.1 Can the baseline dynamics models learn a good model?
To explore if NLC is able to learn a suitable dynamics model, we plot the trained dynamics models next step ahead
prediction error with that of the ground truth for a varying observation interval δ for the Cartpole environment with a
delay of ̄∆, as shown in Figure 11. Empirically we observe that NLC using its Laplace-based dynamics model is able
to better approximate a wider range of observation intervals δ and achieve a good global approximation compared to the
recurrent neural network and ODE based models. We note that due to the offline dataset being sampled with trajectories
that have irregular sampling times (P1), where the sampling times are defined by an exponential distribution with a mean
of ̄∆ = 0.05 seconds; the other competing methods seem to over-fit purely to the median sample time of the exponential
distribution, i.e., 0.05
ln(2) = 0.034 s. Other works have shown a more accurate next step prediction model correlates to
a higher environment episode reward (Williams et al., 2017).
*
I.2 Can the baseline dynamics models learn delay environment dynamics?
To investigate this, we similarly plot the trained NLC dynamics models next step ahead prediction error with that of the
ground truth for a varying observation interval δ, for each of the delayed environment versions of the specific Cartpole
environment, as show in Figure 12 (d). Empirically we observe that the NLC dynamics models correctly learnt the delay
dynamics (P2) of each individual environment, as they each have a similar low forward MSE error for the varying levels of
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Figure 11: Next step ahead validation error (MSE) at a variable time step of an observation interval δ of the learnt baseline dynamics
models, for the irregularly-sampled Cartpole environment with a fixed action delay of τ = ̄∆. Where in each sub-figure we have the
same results plotted at: (a) a zoomed-in y-limit, (b) a zoomed-out y-limit and (c) a log scale plot. The black dotted line indicates the
environments run-time observation interval δ = ̄∆ = 0.05 s. Here, we observe Neural Laplace Control learns a good dynamics model
over a wide range of observation intervals δ, correctly learning from the irregularly-sampled offline dataset (P1).
inherent delay. In contrast, neural-ODE models are unable to model the delay dynamics correctly, and we observe that they
have a higher rate of increasing forward MSE error Figure 12 (a) & (b), that can also increase for an increasing environment
delay and is shown further in Figure 12 for the Latent-ODE model-intuitively this may occur as increasing the delay in a
delay differential equation driven environment dynamics becomes less like that of an ordinary differential equation driven
environment dynamics, which neural-ODE methods implicitly assume.
Figure 12: Next step ahead validation error (MSE) at a variable time step of an observation interval δ of the learnt baseline dynamics
models, for each delayed environment versions τ = {0, ̄∆, 2 ̄∆, 3 ̄∆} of the specific Cartpole environment. Where in each sub-figure we
have: (a) NODE, (b) Latent-ODE, (c) ∆t−RNN and (d) NLC. The black dotted line indicates the environments run-time observation
interval δ = ̄∆ = 0.05 s. Here, Neural Laplace Control is able to correctly learn and capture the delayed dynamics (P2), as the forward
MSE errors are low and similar-whereas neural-ODE methods (a) & (b) have a greater increasing forward MSE.
(a)(b)(c)(a)(b)(c)(d)Neural Laplace Control for Continuous-time Delayed Systems
I.3 Can NLC plan with a longer time horizon using a fixed amount of compute?
O
We investigate this by planning with a MPC planner, increasing the observation interval δ and keeping N fixed, therefore
the time horizon H increases-as shown in Figure 4. Here we measure the total planning time taken to plan the next
seconds 6 and observe that planning with the NLC dynamics model takes the same amount of planning time,
action as
and hence a fixed amount compute for planning at a greater time horizon H-which is the same as a ∆t
RNN. This is
achieved by the Laplace-based dynamics model that can predict a future state at any future time interval using the same
number of forward model evaluations, and hence the same amount of compute. In contrast, this is not readily achievable
with neural-ODE continuous-time methods that use a larger number of numerical forward steps with a numerical ODE
step-wise solver for an increasing time horizon-leading to an increasing planning time for an increasing time horizon,
i.e.,
H. Furthermore, we highlight, that there exists a trade-off of the time horizon H to plan at-as we wish to use
a large "enough" horizon that captures sufficient future dynamics, whilst minimizing compounded model inaccuracies at a
larger planning time horizon. Therefore, these two opposing factors, give rise to the maxima of the normalized score
at
a time horizon H = 2 seconds, as seen in Figure 13. The numeric values for each environment are tabulated in Tables 9,
10 & 11.
O ∝
R
−
Figure 13: Normalized score R of the baseline methods on the three environments with an action delay of τ = ̄∆ = 0.05 seconds,
plotted against an increasing time horizon H, by increasing the observation interval δ. Specifically in: (a) the Cartpole environment, (b)
the Pendulum environment and (c) the Acrobot environment. NLC, maintains a high performing policy at a longer time horizon-whilst
using the same amount of constant planning time per action O as a ∆t−RNN.
Table 9: Numerical results of the Cartpole environment, of the planning time taken O to generate the next action, and normalized scores
R of the baseline methods with an environment action delay of τ = ̄∆ = 0.05s, varying against an increasing time horizon H-by
increasing the observation interval δ. NLC, maintains a high performing policy at a longer time horizon-whilst using the same amount
of constant planning time per action O as a ∆t−RNN.
Dynamics Model
RNN
∆t
−
NODE
NLC (Ours)
O
R
O
R
O
R
H=0.8 s
H=6.0 s
N =40, δ=0.02 s N =40, δ=0.05 s N =40, δ=0.1 s N =40, δ=0.15 s N =40, δ=0.2 s N =40, δ=0.25 s N =40, δ=0.3 s
H=10.0 s
H=12.0 s
H=8.0 s
H=4.0 s
H=2.0 s
0.08
(95.85
0.069
(92.56
0.0
0.34)
0.0
0.16)
0.094
(98.13
0.0
0.16)
±
±
±
±
±
±
0.08
(96.88
0.117
(78.24
0.0
0.34)
0.0
1.96)
0.094
(99.83
0.0
0.14)
±
±
±
±
±
±
0.08
(97.18
0.165
(0.0
0.0
±
0.35)
±
0.0
±
0.0)
±
0.094
(99.08
0.0
0.29)
±
±
0.08
(97.37
0.236
(0.0
0.0
±
0.26)
±
0.0
±
0.0)
±
0.094
(98.34
0.0
0.43)
±
±
0.08
(97.32
0.284
(0.0
0.0
±
0.84)
±
0.0
±
0.0)
±
0.094
(97.38
0.0
0.53)
±
±
0.0
3.09)
0.02
0.0)
0.08
(92.75
0.361
(0.0
±
±
±
±
0.094
(96.2
0.0
±
1.19)
±
0.08
(76.16
0.403
(0.0
0.0
±
8.36)
±
0.0
±
0.0)
±
0.094
(92.65
0.0
3.45)
±
±
6We perform all results using a Intel Core i9-12900K CPU @ 3.20GHz, 64GB RAM with a Nvidia RTX3090 GPU 24GB.
(a)(b)(c)Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Table 10: Numerical results of the Pendulum environment, of the planning time taken O to generate the next action, and normalized
scores R of the baseline methods with an environment action delay of τ = ̄∆ = 0.05s, varying against an increasing time horizon
H-by increasing the observation interval δ. NLC, maintains a high performing policy at a longer time horizon-whilst using the same
amount of constant planning time per action O as a ∆t−RNN.
Dynamics Model
RNN
∆t
−
NODE
NLC (Ours)
O
R
O
R
O
R
H=0.8 s
H=6.0 s
N =40, δ=0.02 s N =40, δ=0.05 s N =40, δ=0.1 s N =40, δ=0.15 s N =40, δ=0.2 s N =40, δ=0.25 s N =40, δ=0.3 s
H=12.0 s
H=10.0 s
H=4.0 s
H=8.0 s
H=2.0 s
0.355
(0.0
0.84
(0.0
0.04
0.0)
0.1
0.0)
±
±
±
±
0.493
(60.31
0.08
6.39)
±
±
0.362
(37.11
1.014
(0.0
0.03
3.79)
0.07
0.0)
±
±
±
±
0.469
(97.98
0.06
3.21)
±
±
0.369
(32.67
1.164
(0.0
0.03
5.23)
0.13
0.0)
±
±
±
±
0.466
(89.04
0.05
7.04)
±
±
0.372
(20.28
1.364
(0.0
0.04
5.13)
0.19
0.0)
±
±
±
±
0.466
(76.73
0.04
9.15)
±
±
0.359
(15.46
1.494
(0.0
0.04
±
3.15)
±
0.2
±
0.0)
±
0.468
(79.7
0.04
±
11.59)
±
0.364
(15.07
1.76
(0.0
0.04
±
4.4)
±
0.21
±
0.0)
±
0.471
(71.8
0.04
±
27.86)
±
0.361
(9.12
2.007
(0.0
0.03
2.22)
0.14
0.0)
0.462
(83.44
0.04
32.02)
±
±
±
±
±
±
Table 11: Numerical results of the Acrobot environment, of the planning time taken O to generate the next action, and normalized scores
R of the baseline methods with an environment action delay of τ = ̄∆ = 0.05s, varying against an increasing time horizon H-by
increasing the observation interval δ. NLC, maintains a high performing policy at a longer time horizon-whilst using the same amount
of constant planning time per action O as a ∆t−RNN.
Dynamics Model
RNN
∆t
−
NODE
NLC (Ours)
O
R
O
R
O
R
H=0.8 s
H=6.0 s
N =40, δ=0.02 s N =40, δ=0.05 s N =40, δ=0.1 s N =40, δ=0.15 s N =40, δ=0.2 s N =40, δ=0.25 s N =40, δ=0.3 s
H=12.0 s
H=10.0 s
H=8.0 s
H=4.0 s
H=2.0 s
0.387
(0.0
0.94
(25.1
0.04
0.0)
0.17
5.12)
±
±
±
±
0.588
(85.62
0.05
1.85)
±
±
0.394
(19.78
1.058
(26.13
0.574
(99.49
±
±
±
±
±
±
0.02
7.95)
0.09
9.13)
0.02
1.87)
0.4
±
(26.49
1.194
(11.59
0.03
6.0)
0.14
22.12)
±
±
±
0.571
(89.93
0.01
2.8)
±
±
0.393
(28.62
1.401
(0.0
0.02
±
9.1)
±
0.2
±
0.0)
±
0.571
(78.4
0.01
4.96)
±
±
0.03
9.02)
0.21
0.401
(23.51
1.529
±
±
±
NA
0.406
(24.34
1.795
0.03
12.93)
0.22
±
±
±
NA
0.407
(17.28
2.084
0.02
16.53)
0.19
±
±
±
NA
0.569
(57.32
0.01
10.5)
±
±
0.566
(37.56
0.01
18.32)
±
±
0.571
(20.16
0.01
19.83)
±
±
I.4 Can NLC use less compute to plan with the same time horizon?
We further investigate an alternative setup in Figure 14, and keep the time horizon fixed at H = 2 seconds and increase the
observation interval δ-allowing us to reduce N the number of MPC forward planning steps (i.e., N = H
δ ). Importantly,
this reduces the planning time
needed to generate the next action, enabling a method to use a higher frequency of
executing actions to control the dynamics-whilst still planning at the same fixed time horizon H. NLC is able to still
outperform the baselines, achieving a high performing policy-even when using a lesser amount of planning compute per
action. The numeric values for each environment are tabulated in Tables 12, 13 & 14.
O
Table 12: Numerical results of the Cartpole environment, of the planning time taken O to generate the next action, and normalized scores
R of the baseline methods with an environment action delay of τ = ̄∆ = 0.05s, varying against an increasing observation interval δ.
Here, the time horizon is fixed at H = 2s, thus increasing the observation interval δ decreases the number of MPC forward planning
steps needed (i.e., N = H
δ ). NLC demonstrates that it can still outperform the baselines, achieving a near optimal policy-whilst
reducing the planning time taken O needed to generate the next action.
Dynamics Model
N =100, δ=0.02 s N =40, δ=0.05 s N =20, δ=0.1 s N =13, δ=0.15 s N =10, δ=0.2 s N =8, δ=0.25 s N =6, δ=0.33 s N =5, δ=0.4 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
RNN
∆t
−
NODE
NLC (Ours)
O
R
O
R
O
R
0.197
(95.95
0.168
(92.57
0.0
0.4)
0.0
0.13)
0.25
(99.23
0.0
0.3)
±
±
±
±
±
±
0.08
(96.79
0.117
(77.49
0.0
0.25)
0.0
1.77)
0.101
(99.85
0.0
0.13)
±
±
±
±
±
±
0.04
(96.95
0.083
(66.49
0.0
0.27)
0.0
2.8)
0.051
(99.95
0.0
0.12)
±
±
±
±
±
±
0.027
(94.79
0.077
(37.18
0.0
0.49)
0.0
6.9)
0.033
(99.82
0.0
0.15)
±
±
±
±
±
±
0.021
(88.59
0.072
(17.23
0.0
±
2.68)
±
0.0
±
15.49)
±
0.026
(99.51
0.0
0.18)
±
±
0.017
(81.81
0.072
(18.08
0.0
±
7.97)
±
0.0
±
21.49)
±
0.021
(99.32
0.0
0.27)
±
±
0.013
(80.47
0.0
±
17.05)
±
0.068
0.0
±
24.34)
(34.32
±
0.016
(99.06
0.0
0.44)
±
±
0.011
0.0
±
23.23)
(70.48
±
0.066
0.0
±
38.05)
(16.81
±
0.013
(98.13
0.0
0.16)
±
±
I.5 Can NLC learn from few samples?
We observe in Figure 15 that NLC can still learn a suitable dynamics model and perform well across the environments
with a delay of τ = ̄∆ = 0.05 seconds, when trained with an offline irregularly-sampled in time dataset that contains a
limited number of samples. Specifically, it is able to learn with only 200 random samples on the Cartpole and Pendulum
environments-which corresponds 10 seconds of interaction time of a noisy expert (expert with random action noise) agent
from the delayed environment. Also, on the Acrobot environment, a more challenging environment it is able to learn a
sufficient dynamics model from only 1,000 random samples.
Neural Laplace Control for Continuous-time Delayed Systems
Figure 14: Normalized score R of the baseline methods on the three environments in each sub-figure with an action delay of τ = ̄∆ =
0.05s, plotted against an increasing observation interval δ. Specifically in: (a) the Cartpole environment, (b) the Pendulum environment
and (c) the Acrobot environment. Here, the time horizon is fixed at H = 2s, thus increasing the observation interval δ decreases the
number of MPC forward planning steps needed (i.e., N = H
δ ). NLC demonstrates that it can still outperform the baselines, achieving a
near optimal policy-whilst reducing the planning time taken O needed to generate the next action.
Table 13: Numerical results of the Pendulum environment, of the planning time taken O to generate the next action, and normalized
scores R of the baseline methods with an environment action delay of τ = ̄∆ = 0.05s, varying against an increasing observation interval
δ. Here, the time horizon is fixed at H = 2s, thus increasing the observation interval δ decreases the number of MPC forward planning
steps needed (i.e., N = H
δ ). NLC demonstrates that it can still outperform the baselines, achieving a near optimal policy-whilst
reducing the planning time taken O needed to generate the next action.
Dynamics Model
N =100, δ=0.02 s N =40, δ=0.05 s N =20, δ=0.1 s N =13, δ=0.15 s N =10, δ=0.2 s N =8, δ=0.25 s N =6, δ=0.33 s N =5, δ=0.4 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
RNN
∆t
−
NODE
NLC (Ours)
O
R
O
R
O
R
1.49
(0.0
2.788
(0.0
0.2
0.0)
0.86
0.0)
±
±
±
±
2.329
(83.55
0.57
3.02)
±
±
0.699
(37.11
1.749
(0.0
0.1
3.79)
0.52
0.0)
±
±
±
±
0.813
(97.98
0.18
3.21)
±
±
0.414
(42.7
1.196
(12.78
0.06
4.37)
0.78
7.86)
±
±
±
±
0.434
(103.55
0.1
2.84)
±
±
0.299
(20.51
1.005
(0.0
0.04
0.6)
0.79
0.0)
±
±
±
±
0.301
(106.13
0.06
0.41)
±
±
0.251
(12.32
0.889
(0.0
0.04
1.09)
0.69
0.0)
±
±
±
±
0.241
(107.22
0.05
1.03)
±
±
0.223
(10.81
0.836
(0.0
0.03
2.27)
0.63
0.0)
±
±
±
±
0.04
0.2
±
(107.28
0.93)
±
0.186
(7.07
0.728
(0.0
0.03
4.99)
0.51
0.0)
±
±
±
±
0.163
(105.27
0.03
0.98)
±
±
0.169
(12.12
0.638
(3.22
0.02
±
6.86)
±
0.4
±
5.19)
±
0.145
(50.73
0.03
30.43)
±
±
Table 14: Numerical results of the Acrobot environment, of the planning time taken O to generate the next action, and normalized scores
R of the baseline methods with an environment action delay of τ = ̄∆ = 0.05s, varying against an increasing observation interval δ.
Here, the time horizon is fixed at H = 2s, thus increasing the observation interval δ decreases the number of MPC forward planning
steps needed (i.e., N = H
δ ). NLC demonstrates that it can still outperform the baselines, achieving a near optimal policy-whilst
reducing the planning time taken O needed to generate the next action.
Dynamics Model
N =100, δ=0.02 s N =40, δ=0.05 s N =20, δ=0.1 s N =13, δ=0.15 s N =10, δ=0.2 s N =8, δ=0.25 s N =6, δ=0.33 s N =5, δ=0.4 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
H=2.0 s
RNN
∆t
−
NODE
NLC (Ours)
O
R
O
R
O
R
2.037
(0.0
5.631
(28.09
0.29
0.0)
2.99
6.18)
3.902
(85.6
0.52
4.98)
±
±
±
±
±
±
0.96
(21.04
2.095
(22.63
0.08
7.06)
0.73
7.97)
±
±
±
±
1.452
(99.05
0.09
2.06)
±
±
0.558
(30.4
1.455
(10.96
0.06
9.03)
1.12
22.24)
±
±
±
±
0.755
(105.71
0.06
0.92)
±
±
0.405
(32.44
1.256
(11.48
0.04
9.69)
1.12
24.95)
±
±
±
±
0.521
(105.39
0.05
1.24)
±
±
0.348
(14.59
1.108
(12.67
0.03
5.5)
1.01
17.63)
±
±
±
±
0.419
±
(104.15
±
0.04
0.9)
0.292
(18.49
1.045
(8.41
0.03
±
7.6)
±
0.93
±
16.82)
±
0.349
(104.18
0.04
2.61)
±
±
0.243
(0.0
0.915
(0.0
0.02
0.0)
0.78
0.0)
0.243
(0.0
0.815
(0.0
0.02
0.0)
0.67
0.0)
0.283
(91.49
0.03
20.89)
0.251
(0.0
0.03
0.0)
±
±
±
±
±
±
±
±
±
±
±
±
I.6 Can NLC incorporate state-based constraints?
We show that using a MPC planner, we can easily incorporate a new state-based constraint at test time (run-time) in
Figure 16. Here, using the Cartpole environment we add an additional constraint on the horizontal x position of the cart.
(a)(b)(c)Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Figure 15: Normalized score R of the baseline methods on the three environments in each sub-figure with an action delay of τ = ̄∆ =
0.05s, plotted against the number of samples in the irregularly-sampled offline dataset used to train the dynamics model of each method.
Specifically, in: (a) the Cartpole environment, (b) the Pendulum environment and (c) the Acrobot environment. NLC can maintain a
high performing policy on the Cartpole and Pendulum environments-even from the challenging case of only learning a dynamics model
from 200 samples from an irregularly-sampled in time offline dataset D.
Specifically, we illustrate that a "left constrained" (x < 0) version at run-time can still be solved by our NLC method and
similarly for a "right constrained" (x > 0) version can be solved-this is made possible as the planner only generates
feasible trajectories where these additional state-based constraints are satisfied, which is further illustrated in Figure 16.
Therefore, using a MPC planner we can easily incorporate new additional unseen state constraints at run-time, whereas
using a learnt policy (q-learner) would be unable to do this and would have to re-train a new policy for each new state
constraint. We note that this benefit of using a MPC planner to incorporate additional state-based constraints has been
shown by others (Lutter et al., 2021).
J ADDITIONAL EXPERIMENTS
In this section we seek to gain further insight into how the baseline dynamics models compare when trained using the same
number of fixed training epochs on each dataset, and an ablation by training the dynamics models on regularly-sampled
offline datasets.
J.1 Training dynamics models for a fixed number of epochs
Here we changed the training setup to train each of the dynamics models for the same number of 10 epochs, with the same
batch size, that of 1 (As NODE and Latent-ODE are only able to support a batch size of 1 using our offline dataset) on the
irregularly sampled offline dataset consisting of only 10,000 random state-action samples. The benchmark methods against
each environment, which consists of a continuous-time environment with a specific delay-with normalized scores
are
tabulated in Table 15. We observe that the results are consistent and similar to the original results reported in Table 2 in
the paper-where each dynamics model received the same number of training iterations, and this is less training than our
original results tabulated in Table 2 in the paper. Given less training iterations, NLC is still able to outperform the baseline
dynamics models.
R
J.2 Ablation by training dynamics models on regularly-sampled offline datasets
We further investigate how the baseline models perform by training on regularly-sampled offline datasets, i.e., datasets
that are collected with a noisy agent that observes the next observation x(t + ∆i) with the same discrete time observation
interval ∆i = ∆j. These results are tabulated in Table 16. We observe a similar pattern, where NLC is still able to learn a
good dynamics model and outperform the baselines.
(a)(b)(c)Neural Laplace Control for Continuous-time Delayed Systems
Figure 16: Screen shots of the Cartpole environment, with an action delay of τ = ̄∆ = 0.05s using the NLC dynamics model. We see
additional new state-based constraints given at run-time, and the MPC planner is able to incorporate these such that the action trajectories
generated and executed satisfy the state constraint, here on the horizontal x position of the cart. Specifically, in sub-figures we observe:
(a) a "left constrained" (x < 0) version, (b) a "right constrained" (x > 0) version and in (c) a standard version with no state constraints.
Specifically in each sub-figure, we have further sub-figures where: (i) shows the starting screenshot, (ii) a visualization of the trajectory
followed (with past screenshots superimposed, where the more faded image is oldest), (iii) the final state reached and in (iv) the state
x trajectory plotted over the entire episode's length of 10 seconds. Therefore, using a MPC planner we can easily incorporate new
additional unseen state constraints at run-time, whereas using a learnt policy (q-learner) would be unable to do this and would have to
re-train a new policy for each new state constraint.
J.3 Environments with observational noise
We performed an additional experiment of adding observation noise, specifically, perturbing the state with Gaussian noise
(0, 0.012). We observe in Table 17 that NLC is still performant under this observation noise. Here, the noisy expert
N
datasets are collected with this observation noise, and the same observation noise is used at run-time evaluation for each
method. We also see this same effect for increasing noise, in Figure 17.
Samuel Holt, Alihan H ̈uy ̈uk, Zhaozhi Qian, Hao Sun, Mihaela van der Schaar
Table 15: Normalized scores R of the offline model-based agents, where the irregularly-sampled (P1) offline dataset consists of an
action delay (P2) of {0, 1, 2, 3} multiples of the environment's observation interval time step ̄∆ = 0.05 seconds. Averaged over 20
random seeds, with ± standard deviations. Scores are un-discounted cumulative rewards normalized to be between 0 and 100, where 0
corresponds to the Random agent and 100 corresponds to the expert with the known world model (oracle+MPC). Negative normalized
scores, i.e., worse than random are set to zero. Specifically, we trained each dynamics model for the same number of 10 epochs, with
a batch size of 1 from an offline dataset consisting of only 10,000 random state-action samples-we note that each dynamics model
received the same number of training iterations, and this is less training than our original results tabulated in Table 2 in the paper. Given
less training iterations, NLC is still able to outperform the baseline dynamics models.
Dynamics Model
Cartpole
Action Delay τ = 0
Pendulum
Acrobot
Cartpole
Action Delay τ = ̄∆
Pendulum
Acrobot
Cartpole
Action Delay τ = 2 ̄∆
Pendulum
Acrobot
Action Delay τ = 3 ̄∆
Pendulum
Acrobot
Cartpole
Random
Oracle
∆t
Latent-ODE
NODE
RNN
−
NLC (Ours)
0.0
100.0
97.13
0.0
95.63
0.0
0.04
0.27
0.0
0.19
±
±
±
±
±
99.54
0.12
±
0.0
100.0
19.86
0.0
0.0
0.0
±
3.59
±
5.2
±
0.0
±
0.0
±
92.65
4.43
±
0.0
100.0
30.9
5.99
16.04
0.0
2.61
8.19
9.64
10.68
±
±
±
±
±
57.1
22.72
±
0.0
±
100.0
±
98.59
±
0.0
±
93.43
±
0.0
0.02
0.13
0.0
4.1
99.39
0.02
±
0.0
100.0
13.02
5.26
0.0
0.0
±
3.15
±
11.0
±
11.63
±
0.0
±
95.78
2.35
±
0.0
0.0
±
1.8
100.0
±
25.16
9.86
±
13.78
6.45
±
6.73
1.7
±
66.55
6.59
±
0.0
100.0
98.02
0.0
0.0
0.0
0.03
0.17
0.0
0.0
±
±
±
±
±
99.71
0.07
±
0.0
100.0
19.64
2.86
6.19
0.0
±
2.42
±
6.21
±
14.97
±
3.16
±
99.01
4.13
±
0.0
100.0
33.67
7.97
5.5
0.0
±
1.64
±
7.71
±
9.31
±
10.52
±
57.73
20.73
±
0.0
100.0
96.89
35.81
95.49
0.0
0.04
0.29
55.95
0.12
±
±
±
±
±
97.16
0.24
±
0.0
0.0
±
2.6
100.0
±
13.18
4.4
±
12.05
5.29
5.13
4.4
±
±
91.56
±
0.0
100.0
26.27
12.22
23.98
0.0
1.42
6.03
6.08
8.18
±
±
±
±
±
4.73
80.48
14.03
±
Table 16: Normalized scores R of the offline model-based agents, where we use a regularly-sampled offline dataset-that consists of
an action delay (P2) of {0, 1, 2, 3} multiples of the environments observation interval time step ̄∆ = 0.05 seconds. Averaged over 20
random seeds, with ± standard deviations. Scores are un-discounted cumulative rewards normalized to be between 0 and 100, where 0
corresponds to the Random agent and 100 corresponds to the expert with the known world model (oracle+MPC). Negative normalized
scores, i.e., worse than random are set to zero.
Dynamics Model
Cartpole
Action Delay τ = 0
Pendulum
Acrobot
Cartpole
Action Delay τ = ̄∆
Pendulum
Acrobot
Cartpole
Action Delay τ = 2 ̄∆
Pendulum
Acrobot
Cartpole
Action Delay τ = 3 ̄∆
Pendulum
Acrobot
Random
Oracle
∆t
Latent-ODE
NODE
RNN
−
NLC (Ours)
0.0
0.06
0.42
0.0
0.0
0.0
100.0
97.17
0.0
0.0
±
±
±
±
±
100.01
0.04
±
0.0
100.0
0.0
0.0
49.8
0.0
3.59
0.0
0.0
7.27
±
±
±
±
±
99.95
3.74
±
0.0
100.0
3.07
12.26
27.18
0.0
1.98
6.09
9.47
10.36
±
±
±
±
±
99.39
2.31
±
0.0
0.03
0.32
0.0
0.0
0.0
100.0
97.18
0.0
0.0
±
±
±
±
±
99.97
0.1
±
0.0
3.05
0.0
0.0
5.54
0.0
100.0
0.0
0.0
39.12
±
±
±
±
±
101.14
3.7
±
0.0
1.18
7.53
25.49
10.84
0.0
100.0
7.03
3.34
32.06
±
±
±
±
±
101.38
2.14
±
0.0
0.1
0.35
0.0
51.77
0.0
±
100.0
±
96.54
±
0.0
±
54.19
±
100.03
0.05
±
0.0
100.0
0.0
0.0
0.0
0.0
2.57
0.0
0.0
0.0
±
±
±
±
±
99.45
2.98
±
0.0
100.0
5.39
12.81
24.31
0.0
2.27
6.0
14.84
10.38
±
±
±
±
±
99.74
1.79
±
0.0
100.0
98.01
0.0
0.0
0.0
0.03
0.31
0.0
0.0
±
±
±
±
±
99.93
0.08
±
2.7
0.0
0.0
±
100.0
±
0.0
0.0
0.0
0.0
0.0
0.0
±
±
±
99.81
3.17
±
0.0
1.7
7.09
10.4
11.89
0.0
±
100.0
±
10.47
±
19.47
±
25.49
±
100.11
1.92
±
Table 17: Normalized scores R of the offline model-based agents, where the irregularly-sampled (P1) offline dataset consists of an action
delay (P2) of {0, 1, 2, 3} multiples of the environments observation interval time step ̄∆ = 0.05 seconds. Averaged over 20 random
seeds, with ± standard deviations. Here we add observation noise-whereby the state is perturbed with Gaussian noise N (0, 0.012).
Scores are un-discounted cumulative rewards normalized to be between 0 and 100, where 0 corresponds to the Random agent and 100
corresponds to the expert with the known world model (Oracle+MPC). Negative normalized scores, i.e., worse than random are set to
zero.
Dynamics Model
Cartpole
Cartpole
Cartpole
Cartpole
Action Delay τ = 0 Action Delay τ = ̄∆ Action Delay τ = 2 ̄∆ Action Delay τ = 3 ̄∆
Random
Oracle
∆t
Latent-ODE
NODE
RNN
−
NLC (Ours)
0.0
100.0
98.33
0.0
0.0
0.0
0.04
0.26
0.0
0.0
±
±
±
±
±
99.99
0.03
±
0.0
100.0
97.96
0.0
0.0
0.0
0.02
0.24
0.0
0.0
±
±
±
±
±
99.97
0.04
±
0.0
100.0
97.8
0.0
0.0
0.0
0.02
0.25
0.0
0.0
±
±
±
±
±
99.91
0.08
±
0.0
100.0
97.99
0.0
9.86
0.0
0.02
0.27
0.0
56.04
±
±
±
±
±
99.9
0.03
±
J.4 Environment with friction
We also performed an additional experiment of adding friction to the environment. We observe in Figure 18 that NLC is
still performant under this friction for the Cartpole environment. Here, the expert datasets are collected with this friction,
and the same friction is used at run-time evaluation for each method. Specifically, we used a fiction coefficient of 5e-4 for
the cart and a friction coefficient of 2e-6 for the pole.
Neural Laplace Control for Continuous-time Delayed Systems
Figure 17: Normalized score R of the baseline methods on the Cartpole environment with an action delay of τ = ̄∆ = 0.05s. Here
adding observation noise, specifically, perturbing the state with Gaussian noise N (0, σ2), plotted against noise σ. NLC can maintain a
high performing policy on the Cartpole with noise-however degrades like the other closest performing policy with increasing noise, as
there becomes less signal to noise in the enviroment observations.
Figure 18: Normalized score R of the baseline methods on the Cartpole environment against an action delay of {0, 1, 2, 3} multiples of
the environments observation interval time step ̄∆ = 0.05 seconds. Here the Cartpole environment has friction added to it. NLC can
maintain a high performing policy on the Cartpole with friction.
|
|
http://arxiv.org/abs/2302.12599v1 | 2023-02-24T12:33:55 | 2023-02-24T12:33:55 | A Machine Learning Approach for Hierarchical Classification of Software
Requirements | Context: Classification of software requirements into different categories is
a critically important task in requirements engineering (RE). Developing
machine learning (ML) approaches for requirements classification has attracted
great interest in the RE community since the 2000s. Objective: This paper aims
to address two related problems that have been challenging real-world
applications of ML approaches: the problems of class imbalance and high
dimensionality with low sample size data (HDLSS). These problems can greatly
degrade the classification performance of ML methods. Method: The paper
proposes HC4RC, a novel ML approach for multiclass classification of
requirements. HC4RC solves the aforementioned problems through
semantic-role-based feature selection, dataset decomposition and hierarchical
classification. We experimentally compare the effectiveness of HC4RC with three
closely related approaches - two of which are based on a traditional
statistical classification model whereas one uses an advanced deep learning
model. Results: Our experiment shows: 1) The class imbalance and HDLSS problems
present a challenge to both traditional and advanced ML approaches. 2) The
HC4RC approach is simple to use and can effectively address the class imbalance
and HDLSS problems compared to similar approaches. Conclusion: This paper makes
an important practical contribution to addressing the class imbalance and HDLSS
problems in multiclass classification of software requirements. | [
"Manal Binkhonain",
"Liping Zhao"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12599v1",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12599v1",
"@rel": "related",
"@type": "application/pdf"
}
] | null | {
"@xmlns:arxiv": "http://arxiv.org/schemas/atom",
"@term": "cs.SE",
"@scheme": "http://arxiv.org/schemas/atom"
} | [
"cs.SE",
"cs.LG",
"D.2.1; H.4; H.5"
] | A Machine Learning Approach for Hierarchical
Classification of Software Requirements
Manal Binkhonaina, Liping Zhao*b
aCollege of Computer and Information Sciences, King Saud University, Riyadh, Saudi
Arabia
bDepartment of Computer Science, University of Manchester, Manchester, UK
Abstract
Context: Classification of software requirements into different categories
is a critically important task in requirements engineering (RE). Develop-
ing machine learning (ML) approaches for requirements classification has
attracted great interest in the RE community since the 2000s. Objective:
This paper aims to address two related problems that have been challenging
real-world applications of ML approaches: the problems of class imbalance
and high dimensionality with low sample size data (HDLSS). These problems
can greatly degrade the classification performance of ML methods. Method:
The paper proposes HC4RC, a novel ML approach for multiclass classifica-
tion of requirements. HC4RC solves the aforementioned problems through
semantic-role based feature selection, dataset decomposition and hierarchical
classification. We experimentally compare the effectiveness of HC4RC with
three closely related approaches - two of which are based on a traditional
statistical classification model whereas one using an advanced deep learning
model. Results: Our experiment shows: 1) The class imbalance and HDLSS
problems present a challenge to both traditional and advanced ML approaches.
2) The HC4RC approach is simple to use and can effectively address the class
imbalance and HDLSS problems compared to similar approaches. Conclu-
sion: This paper makes an important practical contribution to addressing the
class imbalance and HDLSS problems in multiclass classification of software
∗Correspondence to Department of Computer Science, University of Manchester, Manch-
ester, M13 9PL, UK.
Email address: [email protected](M. Binkhonin),
[email protected].(L. Zhao).
Preprint submitted to Machine Learning with Applications
February 24, 2023
requirements.
Keywords:
Requirements Engineering, Requirements Classification, Machine Learning,
Hierarchical Classification, Imbalanced Classes, High Dimensional Data with
Low Sample Size (HDLSS)
1. Introduction
In recent years, machine learning (ML) approaches have achieved visible
successes in a wide range of real-world applications, from fake news detection
(Agarwal et al., 2020), to opinion mining (Jin et al., 2009), sentiment analysis
(Ravi and Ravi, 2015), spam email filtering (Jin et al., 2009), traffic predica-
tion (Sarker, 2021), and medical diagnosis (Sidey-Gibbons and Sidey-Gibbons,
2019), to name just a few. Away from these general applications, ML ap-
proaches have also attracted great interest in the requirements engineering
(RE) community, with more and more RE researchers actively seeking to
develop practical ML applications for requirements analysis tasks. Such tasks
include requirements classification (Cleland-Huang et al., 2006), requirements
prioritization (Perini et al., 2012), requirements detection (Abualhaija et al.,
2019), and requirements traceability (Cleland-Huang et al., 2007a). In this
paper, we focus on requirements classification, a task central and crit-
ical to successful software development projects (Glinz, 2007; Chung and
do Prado Leite, 2009; Broy, 2015).
A requirement for a software system development project is a statement of
what the system should do or how well the system should perform. Examples
of requirements are: "The system must provide an online help function" and
"It must be possible to completely restore a running configuration when the
system crashes". An average software project normally has a few hundreds
of requirements (Eckhardt et al., 2016). The complete set of requirements
for a specific system is called a "requirements document" or a "requirements
specification". Requirements classification is the task of the assignment of
a given set of requirements in a document to different categories or classes
according to a specific classification scheme. This typically involves classifying
each requirement as either a functional requirement (FR) or a non-functional
requirement (NFR) (Chung and do Prado Leite, 2009). A NFR can be further
classified as a security, reliability, performance, or usability requirement.
In the aforementioned examples, "The system must provide an online help
2
function" should be classified as a FR, whereas "It must be possible to
completely restore a running configuration when the system crashes" should
be classified as a reliability requirement, a specific NFR.
As shown above, requirements are stated in natural language (Zhao et al.,
2021), which means that requirements documents are text documents. Con-
sequently, ML approaches to text classification (Sebastiani, 2002; Kowsari
et al., 2019) can be adapted to requirements classification, whereby we train a
requirements classifier with a set of labelled requirements examples (i.e., the
training set) (Binkhonain and Zhao, 2019). In other words, ML approaches
to requirements classification are based on supervised text classification. Fur-
thermore, requirements classification is typically a multiclass classification
task as it deals with more than two classes (usually more than 10 different
classes).
Since the publication of the landmark work by Cleland-Huang et al.
(2006) on ML-based requirements classification more than a decade ago,
RE researchers have proposed a large number of ML approaches. While
most of these approaches are based on traditional ML algorithms (Cleland-
Huang et al., 2007c; Ko et al., 2007; Casamayor et al., 2010; Kurtanović
and Maalej, 2017; Dalpiaz et al., 2019; Abualhaija et al., 2020; Dias Canedo
and Cordeiro Mendes, 2020), more recent proposals are exploring the use of
deep learning (DL) models for requirements classification (Hey et al., 2020a;
Mekala et al., 2021).
However, regardless of what ML approach is used, a common problem
with requirements classification is class imbalance in the training data (He
and Garcia, 2009), as requirements categories are naturally uneven, usually
with a small percentage of categories containing a large percentage of the
requirements (Kurtanović and Maalej, 2017; Eckhardt et al., 2016). Class
imbalance in requirements classification is known as relative class imbalance,
as the minority classes are not necessarily rare in their own right but rather
relative to the majority classes (He and Garcia, 2009). Relative class imbalance
occurs frequently in real-world applications, such as the detection of oil spills in
satellite radar images, the detection of fraudulent telephone calls, information
retrieval and filtering, and diagnoses of rare medical conditions (Japkowicz
and Stephen, 2002).
Imbalanced classes in the training set can cause imbalanced learning (He
and Garcia, 2009), as ML classifiers will have more examples to learn in the
majority classes than in the minority classes (He and Garcia, 2009; Seiffert
et al., 2014; Li et al., 2020; Jiang et al., 2013). Consequently, imbalanced
3
classes can lead to misclassification.
There exist different techniques for dealing with imbalanced classes (Li
et al., 2020). These techniques generally attempt to reduce the severity of
imbalance within the training data by providing a more equivalent statistical
representation of the majority and minority classes (Mills et al., 2018). Among
them are data sampling (or resampling) techniques (He and Garcia, 2009),
used to either remove excessive samples from the majority classes (known
as under-sampling) or to add more samples to the minority classes (known
as oversampling). Both over and under sampling techniques have also been
used in ML approaches for requirement classification (Kurtanović and Maalej,
2017; Hey et al., 2020a).
However, sampling techniques have their own drawbacks. In particular,
oversampling can cause a classifier to over-ft to the minority classes, whereas
under-sampling can affect the performance of the classifier on the majority
classes, due to the risk of removing good representative samples from these
classes (Wang and Yao, 2012; Li et al., 2020). Additionally, oversampling
can be an issue for requirements classification, due to the lack of labelled
requirements (Alhoshan et al., 2022).
The class imbalance problem can become even worse when combined with
the problem of high dimensionality and low sample size (HDLSS) datasets
(He and Garcia, 2009; Shen et al., 2022). The HDLSS problem is concerned
with the scenario where the sample size n in a training dataset is dramatically
smaller than the feature dimension d, where (n << d) (Shen et al., 2022).
HDLSS data can seriously degrade the classification performance of classical
statistical methods (Shen et al., 2022).
HDLSS data are common in many real-world applications such as data
mining, image processing and computer vision, bioinformatics, and gene
expression (Shen et al., 2022). The problem is also present in the training
data of requirements classification. The combination of class imbalance and
HDLSS data presents a critical challenge to many ML approaches, as HDLSS
can amplify the imbalanced data and makes the classifier even more closely
or exactly fitted to a specific training set (He and Garcia, 2009; Liu et al.,
2017).
To address the HDLSS problem, researchers have turned to feature selec-
tion techniques for answers (Wasikowski and Chen, 2009; Sima and Dougherty,
2006; Liu et al., 2017; Huang et al., 2017), as these techniques can not only
successfully reduce the dimensions in texts, but also reduce the over-fitting
problem (Wasikowski and Chen, 2009; Zheng et al., 2004; Chen et al., 2009;
4
Yin et al., 2013; Liu et al., 2017; Huang et al., 2017; Fu et al., 2020).
In this paper, we propose a novel ML approach for requirements classifi-
cation. The proposed approach, called HC4RC (Hierarchical Classification
for Requirements Classification), aims to address the class imbalance and
HDLSS problems by means of three novel techniques, namely Semantic Role-
Based Feature Selection (SR4FS), Dataset Decomposition and Hierarchical
Classification. Specifically, SR4FS addresses the HDLSS problem in the re-
quirements training data using a small set of semantic roles, such as agent,
action and goal (Gildea and Jurafsky, 2002), so as to reduce the number
of word features on each requirement statement. Dataset Decomposition
and Hierarchical Classification work together to handle the class imbalance
problem in requirements classes, with the former for rebalancing the training
set by decomposing it into two approximately balanced sets and the latter
for performing hierarchical classification on the decomposed datasets.
We continue this paper as follows: Section 2 justifies the novelty of
the above three techniques by reviewing related techniques used in general
text classification applications as well as in requirements classification. Sec-
tion 3 explains the principles of each of these techniques in detail, how we
combine them into a coherent approach, HC4RC. Section 4 describes the
procedures and methods by which we experimentally compare HC4RC with
three closely related ML approaches, whereas Section 5 presents and analyzes
the experiment results. Our implementation code for all the compared ap-
proaches used in our experiments is provided at the Code Ocean platform
(https://codeocean.com, with doi:10.24433/CO.6887783.v1). Then Sec-
tion 6 discusses the validity and limitations of the proposed approach and our
evaluation methods. Finally, Section 7 concludes our paper and summarises
our contributions.
2. Related Work and Our Contributions
In this section, we review some prominent techniques that have been used
to solve the class imbalance and HDLSS problems. In Section 2.1, we review
common feature selection techniques used in text classification as solutions to
the HDLSS problem; in Section 2.2, we present feature selection techniques
used in requirements classification and justify our novel contribution. In
Section 2.3, we present common data re-balancing techniques used in clas-
sification tasks as solutions to the class imbalance problem; finally, Section
5
2.4 reviews re-balancing techniques used in requirements classification and
justify our novel contribution.
2.1. Feature Selection for Text Classification
A major challenge of text classification is high dimensionality of the
feature space (Deng et al., 2019). A text document usually contains hundreds
or thousands of distinct words that are regarded as features for classifiers,
however, many of them may be noisy, less informative, or redundant with
respect to class labels. This may mislead the classifiers and degrade their
performance in general (Sebastiani, 2002; Deng et al., 2019). Therefore,
feature selection must be applied to eliminate irrelevant features, so as to
reduce the feature space to a manageable level, thus improving the efficiency
and accuracy of the classifiers used (Kowsari et al., 2019; Deng et al., 2019).
In this paper, feature selection plays a specific role at addressing the HDLSS
problem (Wasikowski and Chen, 2009; Sima and Dougherty, 2006; Liu et al.,
2017; Huang et al., 2017).
Feature selection techniques for text classification broadly fall into three
categories: syntactic word representation, weighted words and semantic word
representation (Kowsari et al., 2019). The most basic form of syntactic
word representation feature selection is n-gram (e.g., 1-gram, 2-gram, 3-gram,
etc.), which is a set of n-words occurring consecutively in a text. Other
syntactic word representations include syntactic features on the text, such as
part-of-speech (POS) tags (Deng et al., 2019).
The most common weighted word feature selection techniques are TF
(Term Frequency), TF-IDF (Term Frequency-Inverse Document Frequency)
and BOW (Bag-of-Words). These techniques use word frequency to calculate
the weight (importance) of each word in a text (Kowsari et al., 2019).
The current approach for semantic word representation for feature selection
is word embeddings, where each word or phrase from the vocabulary is mapped
to a N dimension vector of real numbers (Kowsari et al., 2019). Examples of
common word embedding techniques are Word2Vec (Mikolov et al., 2013a,b),
GloVe (Pennington et al., 2014) and FastText (Bojanowski et al., 2017).
However, each of these three types of feature selection technique has its
own limitations. For example, n-gram relies on an extensive dictionary of
words to identify features, whereas word frequency techniques such as BOW
will fail if none of the words in the training set are included in the testing set.
Word embeddings require a large corpus to train an embedding model.
6
2.2. Feature Selection in Requirements Classification and Our Contribution
Due to the domain-specificity nature of the requirements texts and lack
of labelled data (Ferrari et al., 2017), requirements classification normally
employs ad hoc techniques for feature selection. These include keyword-
based (Cleland-Huang et al., 2007c), which uses a dictionary of requirements
keywords for feature selection; syntactic feature-based, which derives word
features from various syntactic features, such as POS tags, n-grams, verbs, and
syntactic dependency rules (Kurtanović and Maalej, 2017; Abualhaija et al.,
2020; Dalpiaz et al., 2019). However, as these feature selection techniques
also involve the frequency analysis of features, they suffer similar drawbacks
as the aforementioned techniques.
In this paper, we propose a simple semantic word representation technique
for feature selection. The technique, SR4FS, uses a small set of semantic roles
to identify meaningful and representative word features from requirements
statements. Semantic roles, also known as thematic roles, are the various
roles or positions that words in a sentence may play with respect to the
action or state described by a governing verb, commonly the sentence's main
verb (Gildea and Jurafsky, 2002). The set of semantic roles formulated
by us is based on our knowledge of the semantic concepts of requirements
(Letsholo et al., 2013), rather than the frequencies of the words in the dataset.
Consequently, SR4FS is independent of the frequency of words in the training
set and the size of the training set. This novel feature selection technique is
presented in Section 3.
2.3. Class Rebalancing and Hierarchical Classification
Most existing techniques to the imbalanced learning problem are designed
to address binary-class problems, in which imbalances exist between two
classes (He and Garcia, 2009), but these solutions are found to be less
effective or even cause negative effects on multiclass classification tasks Wang
and Yao (2012). Existing solutions for multiclass imbalance problems are very
limited, among which are the aforementioned data sampling (oversampling,
under-sampling and a combination of both) and data decomposition techniques
(Feng et al., 2018; Li et al., 2020).
Data sampling techniques either increase (oversampling) or decrease
(under-sampling) the number of instances in the sampled classes. Data
sampling can be carried out randomly - random sampling - or with targeted
majority or minority classes. However, while oversampling increases the risk of
over-fitting to the minority classes, under-sampling is sensitive to the number
7
of minority classes and can cause performance loss on majority classes Wang
and Yao (2012), as it may remove good representative instances from majority
classes, which ultimately misleads the classification (Li et al., 2020).
Data decomposition techniques generally entail decomposing a multiclass
classification problem into a series of smaller two-class sub-problems (He
and Garcia, 2009) and then applying binary-class classification to these
sub-problems. These techniques include One-Versus-All (OVA) (also known
as One-Versus-Rest), One-Versus-One (OVO) (Li et al., 2020) and a class
decomposition technique proposed by Yin et al. (2013). However, data
decomposition techniques can aggravate imbalanced class distributions (Żak
and Woźniak, 2020; Li et al., 2020) and the combined results from the
binary classifiers learned from the different sub-datasets can cause potential
classification errors, as each individual classifier is trained without the full
knowledge of the entire dataset (Feng et al., 2018).
In recent years, ensemble-based imbalance learning techniques have been
adapted to multiclass imbalance problems, with positive results. For example,
Wang and Yao (2012) show that a boosting-based ensemble that combines
AdaBoost with random oversampling can improve the prediction accuracy on
the minority class without losing the overall performance compared to other
existing class imbalance learning methods. Feng et al. (2018) show that a
bagging-based ensemble that combines margin ordering with under-sampling
can improve a classifier's recognition of minority class instances without
decreasing the accuracy of majority class. However, all these techniques use
class decomposition to convert a multiclass imbalance problem into a series of
binary-class sub-problems and then apply a set of binary classifiers to classify
these sub-problems (Galar et al., 2011).
However, although ensemble-based techniques can improve classification
performance on imbalanced classes, their success depends on the creation of
diverse classifiers while maintaining their consistency with the training set
(Galar et al., 2011) and this is not easy (Brown et al., 2005), as the concept
of diversity is still ill-defined in ML (Galar et al., 2011).
Originally designed for classification with hierarchical class structures,
hierarchical classification (Kiritchenko et al., 2006) has also shown promise
for class imbalance problems in text classification (Ghazi et al., 2010; Zheng
and Zhao, 2020). In hierarchical classification, classes are organized into a
tree structure with levels and nodes (Kiritchenko et al., 2006). Accordingly,
the classification task is also divided into a set of sub-tasks corresponding
to the number of nodes. The construction of a classification hierarchy can
8
be informed by domain knowledge (e.g., relationships between the classes
(Ghazi et al., 2010)) or constraints (e.g., cost-sensitive factor (Zheng and
Zhao, 2020)), with an aim to address the class imbalance problem.
2.4. Class Rebalancing in Requirements Classification and Our Contribution
In requirements classification, we only found two approaches that have
explicitly addressed the class imbalance problem, one by Kurtanović and
Maalej (2017) and another by Hey et al. (2020a). These approaches all
adopt data sampling techniques, using oversampling for the minority class
and under-sampling for the majority class. The sampling techniques used in
these approaches are for binary classification, whereby the requirements are
classified into functional and non-functional requirements. These approaches
have not addressed the class imbalance problem in multiclass classification
tasks, which are inherent to requirements classification.
In this paper, we propose HC4RC, a novel approach for multiclass
imbalanced learning that combines dataset decomposition with hierarchical
classification (Ghazi et al., 2010). Under this approach, we first decompose the
training dataset into two balanced subsets, one with the majority classes and
another with the minority classes. In doing so, we divide a "flat", imbalanced
classification problem into a hierarchy of two smaller, balanced problems.
We then train a hierarchy of three classifiers, one binary and two multiclass
classifiers and use them to perform three sub-classification tasks. While the
binary classifier classifies each requirement into either the majority class set or
the minority class set, the two multiclass classifiers each perform classification
in its corresponding subset. The basic idea of this technique is to partition
the training dataset into two subsets so as to reduce between-class imbalances
within each subset, as the classes in each subset are relatively balanced.
The decomposition step is similar to solving a two-class (binary) imbalanced
problem. This novel approach is presented in Section 3.
3. The HC4RC Approach
As stated early, the HC4RC approach uses three novel techniques to
solve the class imbalance and HDLSS problems in requirements classification.
These techniques are summarised below:
• Semantic Role-based Feature Selection. This technique uses a
small number of semantic roles to identify most relevant semantic
9
Figure 1: The training process of HC4RC and its key techniqiues.
features from the requirements, to address the high dimensionality and
low sample size problems.
• Dataset Decomposition. This technique aims to rebalance a given
training dataset, by annotating it into two approximately balanced
datasets, with one containing the majority classes and another the
minority classes.
• Hierarchical Classification. This technique works with Data De-
composition, to perform hierarchical classification on the decomposed
datasets.
These techniques are organized as a series of steps and integrated into a
coherent training process, as shown in Figure 1. These steps and the principles
and rationale behind these techniques are described in the sections below.
3.1. Text Pre-Processing
This is a necessary first step in text classification, as text data contain
many noises and unwanted words. The purpose of this step is to clean and
standardize the text so that the text can be processed in the subsequent steps
(Sarkar, 2016; Dias Canedo and Cordeiro Mendes, 2020). Various natural
language processing (NLP) techniques are available for text pre-processing.
Some commonly used NLP techniques for requirements classification are
described in a survey by Binkhonain and Zhao (2019).
In HC4RC, we apply the following NLP techniques to the requirements
text, in the order of, tokenization, lowercase conversion, lemmatization, and
stop words and short words removal (short words are the words containing
fewer than three characters).
3.2. Semantic Role-Based Feature Selection
This step aims to select a small number of most relevant features for each
requirement statement. To do so, we apply our semantic-role based feature
selection technique, SR4FS. Below we introduce the set of semantic roles
10
used in our approach and the principles behind these roles. We then explain
how we can identify them from requirements statements.
A semantic role is a word or phrase in a sentence that plays a certain role
in relation to the sentence's main verb. There are many kinds of semantic role
(Gildea and Jurafsky, 2002), but we only adopt six of them for our SR4FS,
as they are similar to the concepts used in requirements modelling (Rolland
and Proix, 1992). These six semantic roles are introduced here:
1. Agent - the volitional causer of an event or action (Jurafsky and Martin,
2020). This role is played by the main subject in a sentence For example,
in the requirement statement: "The system shall send a verification
email to the user when they log on to their account from an unfamiliar
computer", the word "system" is an agent. An agent is also called an
actor (Rolland and Proix, 1992).
2. Action - the cause of an action, event or state. This role is fulfilled
by the verb of a sentence. For example, in the requirement statement:
"The system shall send a verification email to the users when they log
on to their account from an unfamiliar computer", the words "send"
and "log on" play the action role.
3. Theme - the participant most directly affected by an event or action
(Jurafsky and Martin, 2020). This role is played by the direct object in
a sentence. For example, in the requirement "The system shall send a
verification message to the users when they log on to their account from
an unfamiliar computer", the word "message" takes the theme role. In
requirements modelling, the theme role is also referred to as the key
object (Sutcliffe and Maiden, 1998).
4. Goal - the destination of an object of a transfer event or an action
(Jurafsky and Martin, 2020). This role is fulfilled by the indirect object
in a sentence. For example, in the requirement: "The system shall send
a verification email to the users when they log on to their account from
an unfamiliar computer", the word "user" is the goal. In requirements
modelling, the goal describes a future, required state which the system
should satisfy, maintain or sometimes avoid (Sutcliffe and Maiden, 1998).
5. Manner - the manner in which an action is taking place (Xue, 2008).
This role is fulfilled by an adjective, adverb, determiner, or preposition
phrase. For example, in the requirement "The system should be easy to
use", the adjective phrase "easy to use" plays the manner role.
11
Table 1: Six Semantic Roles of SR4FS and their Mapping to Corresponding Grammatical
Features.
Semantic
Roles
Grammatical
Features
Agent
1. Subject
Action
2. Action Verb
Theme
3. Direct Object
Goal
4. Indirect Object
Manner
5. Adverb;
6. Adjective;
7. Determiner;
8. Proposition Phrase
Measure
9. Adverb;
10. Number or
Quantity
Mapping Rules
If a term is the subject of the head verb, it corresponds to
an agent.
If a term is the verb and its head is verb, it corresponds
to an action.
If a term is the direct object of the main verb, it
corresponds to a theme.
If a term is an indirect object of a dative preposition, it
corresponds to a goal.
If a term is an adjective, adverb, or determiner, this term
and its headwords represent a manner; else, if a term is a
preposition (e.g., from, with, without, after), then the
preposition and all its dependents correspond to a
manner.
If a term is a named entity (e.g., data, time, percent,
money, and cardinal), then the term and all its dependents
represent a measure; else, if the term is an adverb, this
term and its headwords are mapped onto a measure.
6. Measure - the degree of control by the action or the quantification of
an event (Jurafsky and Martin, 2020). This role is typically fulfilled
by an adverb (e.g., rather), a number or a quantity (e.g., 99%). For
example, in the requirement, "The system must be available to the users
98% of the time every month during business hours", the percentage
"98%" plays the role of measure.
The above semantic roles are sufficient to answer a range of questions
in requirements analysis, as they cover the concerns of: "Who (agent) did
(action) what (theme) to whom (goal), how (manner) and how much
(measure)". The underlying words of these roles can thus serve as relevant
features to requirements classification. In particular, subjects, verbs and
objects are highly relevant to the identification of FRs, whereas adjectives,
adverbs and quantities are relevant to NFRs.
As can be seen, semantic roles can be mapped onto different parts of
speech and grammatical features in sentences. Consequently, they can be
automatically identified using NLP tools such as POS tagging, dependency
parsing and named entity recognition (NER). The mapping rules between
the aforementioned six semantic roles and their corresponding POS tags and
grammatical features are presented in Table 1.
12
SR4FS automatically performs feature selection in two steps:
1. Processes each requirement statement in the training set using a POS
tagger, dependency parser and NER tagger.
2. Extracts the POS tags and grammatical features from the above process,
and maps them onto semantic roles using the mapping rules.
The features selected from SR4FS will then be manually checked to correct
any errors or inaccuracies from the automatic process. The manual checking is
needed due to: 1) NLP tools have yet to achieve 100% accuracy1; 2) NER tools
perform worse on recognising domain-specific entities; and 3) the relationship
between a semantic role and its underlying syntactic realisation is not a strict
one-to-one mapping.
3.3. Dataset Decomposition
The process of Dataset Decomposition aims to decompose a flat, imbal-
anced training set into two subsets with balanced numbers of requirements.
However, instead of physically splitting the training set, the process assigns a
label to each requirement in the training set to indicate if the requirement
belongs to the majority or minority subset. This process consists of these
steps:
1. Sort the classes in the training set in descending order, based on the
number of requirements in each class.
2. Starting from the top of the list, for each class, assign each requirement
in the class a "maj" label, to denote that the requirement belongs to
the majority class subset. This labelling process ends when the number
of requirements in the majority class subset is at least half of the total
number of requirements in the training dataset.
3. Finally, assign each remaining requirement a "min" label, to denote
that the requirement belongs to the minority class subset.
This decomposition process thus divides the original flat classification
task with an imbalanced dataset into two balanced subtasks, which can then
be solved by a hierarchical classification approach, described below.
1The current state-of-art POS tagger (e.g., spaCy) can only achieve a 95.1% accurate whereas the current
state-of-art NER (spaCy and RoBERTa) can achieve an 89.8% accurate (https://spacy.io/usage/facts-
figures).
13
Figure 2: Dataset Decomposition and Hierarchical Classification.
3.4. Hierarchical Classification
With the training set labelled into two subsets, the process of Hierarchi-
cal Classification entails training a classification model that classifies each
requirement in a hierarchical fashion, as Figure 2 shows. The main steps in
hierarchical classification are:
1. At the top level, we train a binary classifier, Fsuper, to classify each
requirement in the training set into either the majority class subset
or the minority class subset, based on the "maj" and "min" labels,
resulting in two balanced subsets.
2. At the second level, for the majority set, we train a multiclass classifier,
Fmaj, to classify each requirement into one of several categories. For
the minority set, we also train a multiclass classifier, Fmin, that respec-
tively perform classification in its corresponding subset, to classify each
requirement into one of several categories.
These three classifiers form a hierarchical classification model collectively
performing multiclass classification of requirements in the training set.
We have implemented the HC4RC approach in Python programming
language and made the source code of this implementation publicly available
in Zenodo (Binkhonain and Zhao, 2022).
14
4. Evaluation of HC4RC
To evaluate HC4RC, we experimentally compare it with three closely
related ML approaches. This involves implementing HC4RC and the three
related approaches, and then comparing their performance results to assess
the strengths and weaknesses of HCRC against its three peer approaches. In
this section, we detail our experimental procedures and methods. We present
and analyse the results obtained in Section 5.
4.1. Three Related ML Approaches for Evaluating HC4RC
The approaches we are looking for comparison must meet the following
criteria: 1) They must be closely related; 2) They should explicitly deal with
imbalanced classes or feature selection; and 3) Their description should be
clear and detailed enough so that we can reimplement them or their source
code is available so that we can adapt their code.
Most existing ML approaches for requirements classification, such as those
included in a recent survey (Binkhonain and Zhao, 2019), do not meet our
comparison criteria. Here we introduce the three selected approaches that
meet our criteria.
4.1.1. The K&M Approach
Proposed by Kurtanović and Maalej (2017), the K&M approach performs
both binary and multiclass classification tasks. A binary classifier was trained
using the PROMISE NFR dataset to classify a requirement as a FR or NFR.
For multiclass classification, the K&M approach only considered the four
most frequent NFRs in the PROMISE NFR dataset, i.e., Usability, Security,
Operational, and Performance. Two types of classifiers were developed to
perform multiclass classification: a set of binary classifiers, one for each
requirements category, and one single multiclass classifier for classifying all
requirements categories. Both binary and multiclass classifiers were SVM-
based. However, the K&M approach only addressed the two class imbalance
problem between Usability and the rest of NFRs (treating non-usability
requirements as one class). Data sampling techniques were employed by
adding supplementary samples derived from Amazon software reviews to the
minority class (Usability) and randomly removing some samples from the
majority class (non-Usability).
For feature selection, the K&M approach used different types of features,
including word n-grams, POS tag based n-grams and syntactic features.
15
The authors of the K&M approach reported that the best performance was
achieved when all the word n-gram features, with n ∈ {1, 2, 3}, were used
for binary classification (FRs or NFRs) and the next best performance was
achieved using the top 500 selected word features (out of 1,000).
4.1.2. The NoRBERT Approach
Proposed by Hey et al. (2020a), this transfer learning approach uses the
fine-tuning technique to adopt two pre-trained BERT models (BERTbase
and BERTlarge) (Devlin et al., 2018) for requirements classification. The
PROMISE NFR dataset was also used for fine-tuning the BERT models.
Apart from using a different kind of classification model, NoRBERT had
many similarities to the K&M approach: Both approaches performed both
binary and multiclass classification tasks; both used the PROMISE NFR
dataset as the training set; both applied under-sampling and oversampling
to imbalanced classes for binary classification. However, NoRBERT outper-
formed the K&M approach, due to its use of a state-of-the-art deep learning
model.
One issue that we found from the source code of NoRBERT (Hey et al.,
2020b) was that NoRBERT used a weighted average F1 for calculating the
overall performance values for both binary and multiclass classification, which
is biased towards the majority classes. We will discuss this issue in Section
4.4 and propose a different way to calculate the average performance results
for multiclass classifiers.
4.1.3. The Yin Approach
Proposed by Yin et al. (2013), the Yin approach was originally devel-
oped for binary classification of medical image data, not for requirements
classification. However, we selected it to compare with our HC4RC as we
were interested in its unique class decomposition technique. This decompo-
sition technique decomposes the majority class in the dataset for a binary
classification task into several relatively balanced pseudo-subclasses for the
purpose of feature selection, with balanced instances in each one. After-
wards, the Yin approach applied a Hellinger distance-based feature selection
technique (Cieslak et al., 2012) on the decomposed classes. This feature
selection technique is said to be independent of the class distributions and can
handle the high-dimensional class-imbalanced data (Fu et al., 2020). In our
comparison, we reimplemented the Yin approach for multiclass classification
of requirements so that it can be compared with our HC4RC.
16
4.2. The Requirements Dataset
The training set for our evaluation was the PROMISE-exp dataset (Lima
et al., 2019), which is an expansion of the PROMISE NFR dataset (Cleland-
Huang et al., 2007b). The original PROMISE NFR dataset contains a total
of 625 labelled requirements, distributed across 12 classes, made up of one
FR class and 11 NFR classes. The FR class has 255 requirements in total
and the NFR classes have 370 requirements in total. These requirements are
collected from 15 requirements documents (i.e., 15 software projects). This
dataset has become the de facto dataset for training new ML approaches
for requirements classification (Hussain et al., 2008; Kurtanović and Maalej,
2017; Abad et al., 2017; Dalpiaz et al., 2019).
In contrast, the PROMISE-exp dataset contains 969 requirements from 47
requirements documents. The number of classes in this dataset is the same
as the original PROMISE NFR dataset. Figure 3 depicts these classes and
their requirements distribution in PROMISE-exp. The FR class is denoted as
Functional (F); the NFR classes are Security (SE), Usability (US), Operability
(O), etc. As Figure 3 shows, the PROMISE-exp dataset is imbalanced, with the
largest class, Functional (F), containing 444 requirements whereas the smallest
class, Portability (PO), containing only 12 requirements. Furthermore, the
dataset also exhibits the HDLSS problem as it has a sample size of 969
requirements and a feature dimension of 2133 features. Clearly, 969 << 2133.
4.3. Implementations
We implemented our HC4RC approach based on the description given in
the previous section. We reimplemented the K&M approach based on the
source code provided by Dalpiaz et al. (2019) and applied imbalanced-learn2,
a python package, for random over and under-sampling of the training set.
For the NoRBERT approach, we adopted the source code provided by its
authors (Hey et al., 2020b). We implemented the Yin approach from scratch
based on its description, as its source code is not available.
We implemented the classifiers for the HC4RC, K&M and Yin approaches
using the linear SVM based on the implementation provided by scikit-learn's
LinearSVC (Pedregosa et al., 2011). We fine-tuned the parameters of these
classifiers using scikit-learn's GridSearchCV. For NoRBERT, we only fine-
tuned the BERTbase model due to a lack of computational resources. We
2https://pypi.org/project/imblearn/
17
Figure 3: Requirements classes and their instances in the PROMISE-exp dataset.
trained all these approaches on the PROMISE-exp dataset. The source code
of our implementations of all four approaches is available at the Code Ocean
platform (https://codeocean.com, with doi:10.24433/CO.6887783.v1).
We employed both 10-fold and p-fold (project-specific fold) cross-validation
(CV) methods to test each approach. The 10-fold CV was used to reduce the
bias and variance of the approach on different parts of the data, whereas the
p-fold CV was to reduce the bias and variance of the approach on different
requirements projects in the dataset. In other words, the purpose of using the
10-fold CV is to improve the generalizability of each classification approach on
the unseen requirements, whereas the purpose of the p-fold CV is to improve
the generalizability of each classification approach on the unseen requirements
documents. The two CV methods thus complement one another.
For 10-fold CV, we divided the PROMISE-exp dataset into 10 equal parts
based on the number of requirements and executed the approach 10 times,
each time using a different fold of the data for testing whereas the remaining
nine parts for training. For the p-fold CV, we divided the PROMISE-exp
dataset into 10 parts based on the number of projects (i.e., the number
of documents in the dataset) (Cleland-Huang et al., 2007c; Dalpiaz et al.,
18
Table 2: Computation efficiency of HC4RC, K&M, Yin, and NoRBERT
Execution Time
Memory load
HC4RC
10.73 seconds
1.7 GB
K&M
23.70 minutes
3.9 GB
Yin
10.52 seconds
0.75 GB
NoRBERT
1.09 hours
5.7 GB
2019). As PROMISE-exp contains 47 projects, we assigned 4−5 documents
to each fold. The p-fold CV process is the same as the 10-fold CV. We used
scikit-learn's StratifiedKFold to divide the dataset into 10-fold and p-fold.
We carried out the training and testing of all four approaches on a standard
laptop with an Intel Core i5 1.6 GHz and 8 GB RAM. The computation
efficiency of each approach was measured by the time taken and the memory
used to train and test the approach. The Python time and psutil libraries
were respectively used for measuring the execution time and memory usage.
The measurements for these four approaches are given in Table 2. The table
shows that for the execution time, the Yin approach is the fasted one, followed
by HC4RC and then K&M; NoRBERT takes the longest time. For memory
load, Yin consumes the least memory space whereas NoRBERT consumes
the most.
We measured the classification performance (effectiveness) of each ap-
proach using the metrics described in the section below.
4.4. Evaluation Metrics
We measure the classification performance of each approach on individual
classes using the unweighted precision (P), recall (R) and F-1 score (F1 ).
These metrics calculate the performance of an approach on each individual
class by statistically comparing the predicted class for each requirement with
its true label.
We then measure the overall performance of each approach on all the
classes using the recommended multiclass classification metrics of macro and
micro average P, R and F1 (Grandini et al., 2020). Macro Average P and
R are simply computed as the arithmetic mean of the metrics for individual
classes:
Macro-Average-P =
Macro-Average-R =
,
PK
k=1 Pk
K
PK
k=1 Rk
K
(1)
(2)
Macro F1 is the harmonic mean of Macro-Precision and Macro-Recall:
19
Macro-F1 = 2 ∗ (
MacroAverage-P ∗ Macro-Average-R
Macro-Average-P −1 + Macro-Average-R−1 )
Micro-Average P, R and F1 are equal to Accuracy as follows:
Micro-Average-P = Micro-Average-R = Micro-Average-F1 =
PK
k=1 T Pk
Grand Total
(3)
(4)
In the above formulae, K is the number of classes in the dataset, whereas
k denotes an individual class. These formulae are explained as follows:
Macro average P, R and F1 evaluate the performance of a multiclass
approach at the class level, without consideration of the size of classes. Under
these metrics, a higher macro-F1 score indicates that the approach performs
well on all the classes, regardless of large or small, whereas a lower macro-F1
score indicates the poorer performance of the approach (Grandini et al., 2020).
On the other hand, micro average P, R, and F1 are all measured using the
same Accuracy metric and thus have the same score (Grandini et al., 2020).
Furthermore, these metrics evaluate a multiclass approach by considering the
size of each class and thus they give more importance to majority classes.
In other words, for micro averages, poor performance on small classes is
not so important, as the number of instances belonging to those classes is
small compared to the overall number of instances in the dataset (Grandini
et al., 2020). Under these metrics, a higher micro-F1 score indicates that the
approach is more accurate overall, whereas a lower macro-F1 score indicates
the approach is less accurate overall. Thus macro average F1 and micro
average F1 complement one another in that the former measures each class
equally, whereas the latter measures each instance equally (Sokolova and
Lapalme, 2009).
Based on the aforementioned evaluation metrics, we measure the classifi-
cation performance of the HC4RC, K&M, Yin, and NoRBERT approaches.
The measurements are presented in Table 3 while Figure 4 depicts the macro
and micro averages of these approaches. We discuss these results in the next
section.
5. Results Analysis and Discussion
The classification performance results obtained by the four approaches are
presented in Table 3. In this section, we compare, analyze and interpret these
20
(a) Macro and Micro Averages in 10-fold
(b) Macro and Micro Averages in p-fold
Figure 4: Macro and micro averages of the four approaches on classification of 12 require-
ments classes.
results. Where appropriate, we explain why our approach performs better or
worse than its peer approaches.
5.1. Comparing HC4RC with K&M
Table 3 shows that HC4RC outperformed K&M on all but one class in
both 10-fold and p-fold CV. In both cases the class under-performed is a
minority class, i.e., Portability (PO) in 10-fold whereas Legal (L) in p-fold. As
both HC4RC and K&M are based on the SVM model, the better performance
achieved by our approach suggests that our hierarchical classification approach
incorporating semantic role-based feature selection and dataset decomposition
can handle imbalanced classes better than the K&M approach.
Figure 4 shows that HC4RC has higher macro and micro averages than
K&M. In particular, macro averages show that HC4RC outperformed K&M
considerably on individual classes (0.51 vs 0.44 in 10-fold and 0.50 vs 0.39
in p-fold), whereas micro averages show that HC4RC achieved an overall
better performance than K&M on all 12 classes (0.63 vs 0.58 in 10-fold and
0.64 vs 0.61 in p-fold). These results also show that HC4RC has a better
generalizability on both unseen requirements (10-fold) as well as unseen
requirements projects (p-fold) than K&M.
21
Table 3: Classification performance of HC4RC, K&M, Yin, and NoRBERT on 12 require-
ments classes in the PROMISE-exp dataset. The highest F1 score for each class is in bold.
HC4RC
R
K&M
R
P
F 1
P
Yin
R
NoRBERT
R
F 1
F 1
P
0.69
0.74
0.62
0.64
0.51
0.50
0.36
0.47
0.52
0.47
0.47
0.36
0.75 0.53
0.41 0.23
0.53
0.43
0.42
0.29
0.54 0.60
0.25
0.14
0.45
0.51
0.58
0.63
P
0.73
0.60
0.58
0.66
0.66
0.53
0.68
0.29
0.41
0.28
0.47
0.08
0.48
0.63
Class
F 1
10-fold cross validation
0.76
F (444)
0.69
SE (125)
0.44
US (85)
0.37
O (77)
0.37
PE (67)
0.42
LF (49)
0.84
A (51)
0.70
MN (24)
0.45
SC (22)
0.83
FT (18)
0.64
L (15)
0.50
PO (12)
0.61
Macro
Micro
0.63
p-fold cross validation
0.79
F (444)
0.64
SE (125)
0.40
US (85)
0.32
O (77)
0.64
PE (67)
0.46
LF (49)
0.76
A (51)
0.55
MN (24)
0.56
SC (22)
0.75
FT (18)
1.00
L (15)
0.67
PO (12)
0.61
Macro
0.64
Micro
0.73
0.65
0.62
0.61
0.55
0.53
0.58
0.23
0.38
0.19
0.07
0.17
0.48
0.64
0.76
0.65
0.49
0.42
0.59
0.50
0.66
0.32
0.45
0.30
0.13
0.27
0.50
0.64
0.68
0.64
0.49
0.38
0.70
0.36
0.59
0.21
0.55
0.29
0.25
0.27
0.45
0.61
0.69
0.61
0.56
0.42
0.69
0.33
0.45
0.67
0.79
0.83
0.50
0.33
0.56
0.62
0.55
0.43
0.44
0.22
0.34
0.33
0.27
0.21
0.14
0.43
0.00
0.33
0.31
0.50
0.82
0.57
0.35
0.42
0.55
0.31
0.61
0.25
0.68
0.28
0.08
0.17
0.43
0.62
0.86
0.26
0.19
0.14
0.14
0.31
0.09
0.12
0.04
0.19
0.00
0.06
0.19
0.50
0.88
0.75
0.78
0.59
0.61
0.43
0.53
0.42
0.73
0.61
0.53
0.32
0.68
0.52
0.36
0.29
0.73 0.80
0.80
0.42
0.75
0.14
0.75
0.22
0.66
0.47
0.76
0.62
0.67
0.32
0.26
0.17
0.19
0.32
0.14
0.15
0.06
0.26
0.00
0.11
0.22
0.50
0.90
0.82
0.68
0.66
0.81
0.53
0.65
0.59
0.60
0.92
0.60
0.55
0.70
0.81
0.90
0.87
0.66
0.58
0.79
0.53
0.55
0.25
0.36
0.53
0.40
0.17
0.55
0.76
0.92
0.88
0.74
0.76
0.85
0.53
0.61
0.38
0.38
0.73
0.25
0.33
0.61
0.81
0.89
0.83
0.63
0.56
0.76
0.53
0.61
0.27
0.50
0.64
0.52
0.27
0.57
0.76
0.91
0.85
0.71
0.71
0.83
0.53
0.63
0.47
0.46
0.81
0.35
0.41
0.64
0.81
0.76
0.55
0.35
0.32
0.58
0.33
0.58
0.25
0.45
0.28
0.40
0.25
0.43
0.58
0.86
0.60
0.33
0.33
0.45
0.33
0.53
0.20
0.35
0.17
0.06
0.21
0.35
0.61
0.73
0.58
0.42
0.34
0.55
0.34
0.55
0.24
0.49
0.29
0.48
0.25
0.44
0.58
0.76
0.62
0.39
0.35
0.55
0.34
0.56
0.20
0.42
0.22
0.10
0.23
0.39
0.61
22
5.2. Comparing HC4RC with Yin
Table 3 shows that HC4RC also outperformed the Yin approach on all but
one class in 10-fold and it outperforms the Yin approach on all classes in p-fold
CV. Both approaches applied decomposition to address the class imbalance
problem. However, the better performance of our approach indicates that its
data decomposition technique works better in handling imbalance problems
in multi-classification problems than the Yin approach's class decomposition.
Figure 4 shows that HC4RC has higher macro and micro averages than
Yin. In particular, macro averages show that HC4RC outperformed Yin
considerably on individual classes (0.51 vs 0.47 in 10-fold and 0.50 vs 0.22 in
p-fold), whereas micro averages show that HC4RC achieved an overall better
performance than Yin on all 12 classes (0.63 vs 0.62 in 10-fold and 0.64 vs
0.50 in p-fold).
These results also show that HC4RC has a better generalizability on both
unseen requirements (10-fold) as well as unseen requirements projects (p-fold)
than Yin.
5.3. Comparing HC4RC with NoRBERT
Table 3 shows that NoRBERT outperformed HC4RC on almost all classes
under both 10-fold and p-fold CV. However, we notice that NoRBERT's
performance fluctuates in small classes. In particular, NoRBERT performed
worse than HC4RC on the Maintainability (MN) class under 10-fold and on
the Availability (A) under p-fold. The poorer performance of NoRBERT on
some minority classes indicates that even the state-of-the-art deep learning
model is still limited when it comes to classifying small classes in multiclass
classification.
Figure 4 shows that HC4RC performed worse than NoRBERT on indi-
vidual classes as well as on all 12 classes as a whole. These results clearly
show that the combination of class imbalance and HDLSS data has seriously
degraded the classification performance of classical statistical methods such
as the SVM model used in HC4RC.
These results also show that NoRBERT has a much better generalizability
on both unseen requirements (10-fold) as well as unseen requirements projects
(p-fold) than HC4RC.
5.4. Further Analysis and Discussion
We first compare the overall classification performance of these four
approaches from the viewpoint of their macro and micro average scores (see
23
Figure 4). The findings are discussed as follows.
Of the four compared approaches, NoRBERT is the best overall approach
for requirements classification. Its macro averages show that NoRBERT has
achieved the best performance on individual classes and its micro averages
show that it has achieved the best performance on all 12 classes. Furthermore,
its performance results in 10-fold and p-fold show that NoRBERT has the
best generalizability on both unseen requirements and unseen requirements
projects. These results also suggest that NoRBERT is the best approach for
dealing with class imbalance and HDLSS data in requirements documents.
As NoRBERT applied the same data sampling techniques to imbalanced data
as K&M, we assume that the strong performance of NoRBERT is due to its
underlying deep learning model BERT.
Of the three approaches that used the SVM model as their classification
model (HC4RC, K&M and Yin), HC4RC is the best overall approach for
requirements classification. Its macro averages show that HC4RC has achieved
the best performance on individual classes and its micro averages show that
it has achieved the best performance on all 12 classes. Furthermore, its
performance results in 10-fold and p-fold show that HC4RC has the best
generalizability on both unseen requirements and unseen requirements projects.
These results also suggest that HC4RC is the best SVM-based approach for
dealing with class imbalance and HDLSS data in requirements documents. As
the three SVM-based approaches applied different techniques for handling class
imbalance and HDLSS data, we assume that our semantic role-based feature
selection combined with dataset decomposition and hierarchical classification is
more effective than the data sampling and hybrid feature selection techniques
used in K&M, and class decomposition and Hellinger distance-based feature
selection in the Yin approach.
We now look into the performance of these four approaches on individual
classes from the viewpoint of their unweighted P, R and F1 scores (see Table
3). The findings are discussed as follows.
First, on the largest class F (functional requirements), all four approaches
performed relatively well. NoRBERT in particular achieved a F1 score of
0.89 in 10-fold and 0.91 in 10-fold. Both HC4RC and K&M achieved a F1
score of 0.74 and 0.73 respectively in 10-fold and 0.76 in p-fold. Yin achieved
0.73 in 10-fold and 0.67 in p-fold. These scores also show that NoRBERT,
HC4RC and K&M have a better generalizability on the unseen requirements
projects than the unseen requirements. We believe this ability is critically
important for requirements classification, as a ML approach should be able
24
to differentiate requirements in different projects.
Second, on the remaining classes (SE, US, etc.), NoRBERT performed
better in p-fold than 10-fold; HC4RC and K&M performed similarly in 10-fold
and p-fold; Yin performed better in 10-fold than p-fold. These results suggest
that NoRBERT has better generalizability on the unseen requirements projects
than the unseen requirements; HC4RC and K&M have similar generalizability
on the unseen requirements and the unseen requirements documents; Yin
has a better generalizability on the unseen requirements than the unseen
requirements documents.
Under 10-fold CV, we notice that HC4RC outperformed the rest three
approaches on three small classes A, MN and L; Yin outperformed the rest
three approaches on one small class SC; NoRBERT outperformed the rest
three approaches on two small classes FT and PO. These results show that
HC4RC achieved a better performance than NoRBERT on the small classes
for the unseen requirements.
Under p-fold CV, we notice that HC4RC outperformed the rest three
approaches on every class, but it suffered the performance loss on the small
classes MN, SC, L, and PO. These results show that the classification perfor-
mance of the deep learning model BERT has also been degraded on HDLSS
requirements, a key finding from our evaluation.
Finally, we attribute the better performance of HC4RC than K&M and
Yin to the aggregate effect of the three key techniques employed by HC4RC.
6. Threats to Validity
In this section, we discuss potential threats to the validity of our evaluation
of HC4RC and explain why we believe such threats are minimal.
Reimplementation of related approaches. One potential validity threat is
our reimplementations of the K&M, Yin and NoRBERT approaches, as we
modified these approaches so that they can be used to perform multiclass
classification on the same dataset. While we cannot avoid this threat entirely,
we are making the source code for our reimplementations of these approaches
publicly available (Binkhonain and Zhao, 2022), so that other researchers can
assess its validity.
The quality of the training set. The PROMISE NFR dataset on which
the PROMISE-exp dataset was built was known for its mislabelling issues,
as the dataset was labelled by students (Hey et al., 2020a). However, while
we believe that the poor quality of the dataset can affect the performance of
25
the approaches in our evaluation, it should not affect the generalizability of
these approaches, as we applied this dataset consistently to all the approaches.
Furthermore, since both the original PROMISE NFR and PROMISE-exp
datasets have been widely used in the RE community, using them for research
evaluation should be a strength, not a weakness, as they allow us to compare
our results directly to other approaches (Kurtanović and Maalej, 2017; Hey
et al., 2020a). We make our code and data publically available so that further
replication or reproduction of our approach can be carried out. We recognize
that the lack of the gold standard labelled requirements datasets has been an
open challenge to using ML approaches for RE tasks (Binkhonain and Zhao,
2019).
Performance measure. Another concern is how well metrics can really
measure what they are intended to measure (Ralph and Tempero, 2018). In
RE, we noticed that researchers normally use unweighted F1 (Kurtanović
and Maalej, 2018; Dalpiaz et al., 2019) or weighted F1 (Hey et al., 2020a)
to measure the performance of both binary and multiclass classifiers. For
example, Hey et al. (2020a) used the weighted average F1 -score over all
classes weighted by the frequency of appearance - that is, to weigh larger
classes more than smaller classes. We believe such a weighting can inflate
the performance of the larger classes and skew the overall results. In our
evaluation, we rationally chose macro and micro average metrics to evaluate
and compare different multiclass approaches, to avoid the bias towards large
classes (Grandini et al., 2020), as discussed in Section 4. However, we agree
that in RE, achieving higher recall is more important than higher precision
and in this context, a weighted F1 -score that gives more importance to R
than P is desirable (Berry, 2021). While we have not used such a weighted
metric in our experiments, we believe our metrics have minimized the classifier
bias.
Generalizibility. As our comparison has been limited to a single dataset,
a potential threat is the validity of our evaluation conclusion. To mitigate
this threat, we used both 10-fold and p-fold CV to test all the approaches, as
these cross-validation methods were designed for evaluating ML models on
limited data samples (Bengio et al., 2003).
7. Conclusion
This paper proposes HC4RC, a novel machine learning approach for
multiclass classification of requirements. HC4RC is designed to address two
26
specific problems in requirements classification: class imbalance and HDLSS.
These problems, common to requirements classification tasks, can greatly
degrade the performance of ML methods. HC4RC solves the first problem
through dataset decomposition and hierarchical classification; it deals with
the second problem through a novel semantic role-based feature selection
method. The novelty of HC4RC thus lies in its combination of these three
techniques into a simple and practical approach that can effectively solve the
problems of class imbalance and HDLSS. The key findings of this paper are
summarized as follows:
• Overall, HC4RC performs better than the two SVM-based approaches,
K&M and Yin, and performs only slightly worse than the BERT-
based approach, NoRBERT. This finding shows that our semantic
role-based feature selection combined with dataset decomposition and
hierarchical classification provides a more effective solution to class
imbalance and HDLSS data than the data sampling and hybrid feature
selection techniques used in K&M, and class decomposition and Hellinger
distance-based feature selection in the Yin approach. As NoRBERT
applied the same data sampling techniques to imbalanced data as K&M,
we assume that the strong performance of NoRBERT is due to its
underlying deep learning model BERT.
• On individual classes, HC4RC performs better than all other compared
approaches on small classes for the unseen requirements. This shows
that the classification performance of the deep learning based NoRBERT
can also be degraded on imbalanced classes.
• HC4RC has a better generalizability on both unseen requirements
(shown in 10-fold CV) as well as unseen requirements projects (shown
in p-fold CV) than its closest peers, K&M and Yin, but it is worse
than NoRBERT. This means that the DL based approach has a better
generalizability than the traditional ML approach.
In conclusion, our results, while still preliminary as they are based only
on one dataset, suggest that multiclass classification of requirements with the
class imbalance and HDLSS problems presents a challenge to ML approaches
in general, even for the advanced deep learning models. This paper has made
a practical contribution to addressing these problems. We suggest future work
on requirements classification to focus on the following areas:
27
• For ML approaches based on the traditional statistical classification
models, more work is needed to develop better feature selection tech-
niques such as semantic representations and roles of requirements. We
believe our work presented in this paper has made a start in this area.
• For ML approaches based on the advanced deep learning models, more
work is needed to train these models on requirements specific data.
Some pioneering work has already started in this area (Ajagbe and
Zhao, 2022).
• For both traditional and advanced learning approaches, more work is
needed to investigate different data re-balancing techniques, such as
those presented in this paper.
Acknowledgments
We wish to thank the three reviewers for their expert comments to our
paper. We thank the University of Manchester for providing an Open Access
fund for this paper.
References
Abad, Z. S. H., Karras, O., Ghazi, P., Glinz, M., Ruhe, G., and Schneider,
K. (2017). What works better? a study of classifying requirements. In
2017 IEEE 25th International Requirements Engineering Conference (RE),
pages 496–501. IEEE.
Abualhaija, S., Arora, C., Sabetzadeh, M., Briand, L. C., and Traynor,
M. (2020). Automated demarcation of requirements in textual specifica-
tions: a machine learning-based approach. Empirical Software Engineering,
25(6):5454–5497.
Abualhaija, S., Arora, C., Sabetzadeh, M., Briand, L. C., and Vaz, E. (2019).
A machine learning-based approach for demarcating requirements in textual
specifications. In 2019 IEEE 27th International Requirements Engineering
Conference (RE), pages 51–62. IEEE.
Agarwal, A., Mittal, M., Pathak, A., and Goyal, L. M. (2020). Fake news
detection using a blend of neural networks: An application of deep learning.
SN Computer Science, 1:1–9.
28
Ajagbe, M. and Zhao, L. (2022). Retraining a bert model for transfer learning
in requirements engineering: A preliminary study. In 2022 IEEE 30th
International Requirements Engineering Conference (RE), pages 309–315.
IEEE.
Alhoshan, W., Zhao, L., Ferrari, A., and Letsholo, K. J. (2022). A zero-shot
learning approach to classifying requirements: A preliminary study. In In-
ternational Working Conference on Requirements Engineering: Foundation
for Software Quality, pages 52–59. Springer.
Bengio, Y., Ducharme, R., Vincent, P., and Jauvin, C. (2003). A neu-
ral probabilistic language model. Journal of machine learning research,
3(Feb):1137–1155.
Berry, D. M. (2021). Empirical evaluation of tools for hairy requirements
engineering tasks. Empirical Software Engineering, 26(6):1–77.
Binkhonain, M. and Zhao, L. (2019). A review of machine learning algorithms
for identification and classification of non-functional requirements. Expert
Systems with Applications.
Binkhonain, M. and Zhao, L. (2022). Supplementary material of "multiclass
classification of software requirements with imbalanced, high dimensional
and low sample size data".
Bojanowski, P., Grave, E., Joulin, A., and Mikolov, T. (2017). Enriching
word vectors with subword information. Transactions of the Association
for Computational Linguistics, 5:135–146.
Brown, G., Wyatt, J., Harris, R., and Yao, X. (2005). Diversity creation
methods: a survey and categorisation. Information Fusion, 6(1):5–20.
Broy, M. (2015). Rethinking nonfunctional software requirements. Computer,
48(05):96–99.
Casamayor, A., Godoy, D., and Campo, M. (2010). Identification of non-
functional requirements in textual specifications: A semi-supervised learning
approach. Information and Software Technology, 52(4):436–445.
Chen, J., Huang, H., Tian, S., and Qu, Y. (2009). Feature selection for
text classification with naïve bayes. Expert Systems with Applications,
36(3):5432–5435.
29
Chung, L. and do Prado Leite, J. C. S. (2009). On non-functional require-
ments in software engineering. In Conceptual modeling: Foundations and
applications, pages 363–379. Springer.
Cieslak, D. A., Hoens, T. R., Chawla, N. V., and Kegelmeyer, W. P. (2012).
Hellinger distance decision trees are robust and skew-insensitive. Data
Mining and Knowledge Discovery, 24(1):136–158.
Cleland-Huang, J., Berenbach, B., Clark, S., Settimi, R., and Romanova, E.
(2007a). Best practices for automated traceability. Computer, 40(6):27–35.
Cleland-Huang, J., Mazrouee, S., Liguo, H., and Port, D. (2007b). NFR.
Cleland-Huang, J., Settimi, R., Zou, X., and Solc, P. (2006). The detection
and classification of non-functional requirements with application to early
aspects. In 14th IEEE International Requirements Engineering Conference
(RE'06), pages 39–48. IEEE.
Cleland-Huang, J., Settimi, R., Zou, X., and Solc, P. (2007c). Automated
classification of non-functional requirements. Requirements engineering,
12(2):103–120.
Dalpiaz, F., Dell'Anna, D., Aydemir, F. B., and Çevikol, S. (2019). Require-
ments classification with interpretable machine learning and dependency
parsing. In 2019 IEEE 27th International Requirements Engineering Con-
ference (RE), pages 142–152. IEEE.
Deng, X., Li, Y., Weng, J., and Zhang, J. (2019). Feature selection for text
classification: A review. Multimedia Tools and Applications, 78(3):3797–
3816.
Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). Bert: Pre-
training of deep bidirectional transformers for language understanding.
arXiv preprint arXiv:1810.04805.
Dias Canedo, E. and Cordeiro Mendes, B. (2020). Software requirements
classification using machine learning algorithms. Entropy, 22(9):1057.
Eckhardt, J., Vogelsang, A., and Fernández, D. M. (2016). Are non-functional
requirements really non-functional? an investigation of non-functional
requirements in practice. In 2016 IEEE/ACM 38th International Conference
on Software Engineering (ICSE), pages 832–842. IEEE.
30
Feng, W., Huang, W., and Ren, J. (2018). Class imbalance ensemble learning
based on the margin theory. Applied Sciences, 8(5):815.
Ferrari, A., Spagnolo, G. O., and Gnesi, S. (2017). Pure: A dataset of public
requirements documents. In 2017 IEEE 25th International Requirements
Engineering Conference (RE), pages 502–505. IEEE.
Fu, G.-H., Wu, Y.-J., Zong, M.-J., and Pan, J. (2020). Hellinger distance-
based stable sparse feature selection for high-dimensional class-imbalanced
data. BMC bioinformatics, 21(1):1–14.
Galar, M., Fernandez, A., Barrenechea, E., Bustince, H., and Herrera, F.
(2011). A review on ensembles for the class imbalance problem: bagging-,
boosting-, and hybrid-based approaches. IEEE Transactions on Systems,
Man, and Cybernetics, Part C (Applications and Reviews), 42(4):463–484.
Ghazi, D., Inkpen, D., and Szpakowicz, S. (2010). Hierarchical versus flat
classification of emotions in text.
In Proceedings of the NAACL HLT
2010 workshop on computational approaches to analysis and generation of
emotion in text, pages 140–146. Association for Computational Linguistics.
Gildea, D. and Jurafsky, D. (2002). Automatic labeling of semantic roles.
Computational linguistics, 28(3):245–288.
Glinz, M. (2007). On non-functional requirements. In 15th IEEE International
Requirements Engineering Conference (RE 2007), pages 21–26. IEEE.
Grandini, M., Bagli, E., and Visani, G. (2020). Metrics for multi-class
classification: an overview. arXiv preprint arXiv:2008.05756.
He, H. and Garcia, E. A. (2009). Learning from imbalanced data. IEEE
Transactions on knowledge and data engineering, 21(9):1263–1284.
Hey, T., Keim, J., Koziolek, A., and Tichy, W. F. (2020a). NoRBERT: transfer
learning for requirements classification. In 2020 IEEE 28th International
Requirements Engineering Conference (RE), pages 169–179. IEEE.
Hey, T., Keim, J., Koziolek, A., and Tichy, W. F. (2020b). Supplementary
Material of "NoRBERT: Transfer Learning for Requirements Classification".
Online; accessed 3 August 2020.
31
Huang, Y., Zhao, C., Yang, H., Song, X., Chen, J., and Li, Z. (2017).
Feature selection solution with high dimensionality and low-sample size for
land cover classification in object-based image analysis. Remote Sensing,
9(9):939.
Hussain, I., Kosseim, L., and Ormandjieva, O. (2008). Using linguistic
knowledge to classify non-functional requirements in srs documents. In
International Conference on Application of Natural Language to Information
Systems, pages 287–298. Springer.
Japkowicz, N. and Stephen, S. (2002). The class imbalance problem: A
systematic study. Intelligent data analysis, 6(5):429–449.
Jiang, L., Li, C., Cai, Z., and Zhang, H. (2013). Sampled bayesian network
classifiers for class-imbalance and cost-sensitive learning. In 2013 IEEE
25th International Conference on Tools with Artificial Intelligence, pages
512–517. IEEE.
Jin, W., Ho, H. H., and Srihari, R. K. (2009). Opinionminer: a novel machine
learning system for web opinion mining and extraction. In Proceedings of
the 15th ACM SIGKDD international conference on Knowledge discovery
and data mining, pages 1195–1204.
Jurafsky, D. and Martin, H. J. (2020). Speech and language processing. Pearson
Education India, third edition.
Kiritchenko, S., Matwin, S., Nock, R., and Famili, A. F. (2006). Learning
and evaluation in the presence of class hierarchies: Application to text
categorization. In Conference of the Canadian Society for Computational
Studies of Intelligence, pages 395–406. Springer.
Ko, Y., Park, S., Seo, J., and Choi, S. (2007). Using classification techniques
for informal requirements in the requirements analysis-supporting system.
Information and Software Technology, 49(11-12):1128–1140.
Kowsari, K., Jafari Meimandi, K., Heidarysafa, M., Mendu, S., Barnes, L., and
Brown, D. (2019). Text classification algorithms: A survey. Information,
10(4):150.
Kurtanović, Z. and Maalej, W. (2017). Automatically classifying functional
and non-functional requirements using supervised machine learning. In
32
2017 IEEE 25th International Requirements Engineering Conference (RE),
pages 490–495. IEEE.
Kurtanović, Z. and Maalej, W. (2018). On user rationale in software engi-
neering. Requirements Engineering, 23(3):357–379.
Letsholo, K. J., Zhao, L., and Chioasca, E.-V. (2013). Tram: A tool for
In 2013 28th
transforming textual requirements into analysis models.
IEEE/ACM International Conference on Automated Software Engineering
(ASE), pages 738–741. IEEE.
Li, Q., Song, Y., Zhang, J., and Sheng, V. S. (2020). Multiclass imbalanced
learning with one-versus-one decomposition and spectral clustering. Expert
Systems with Applications, 147:113152.
Lima, M., Valle, V., Costa, E., Lira, F., and Gadelha, B. (2019). Software
engineering repositories: Expanding the promise database. In Proceedings of
the XXXIII Brazilian Symposium on Software Engineering, pages 427–436.
ACM.
Liu, B., Wei, Y., Zhang, Y., and Yang, Q. (2017). Deep neural networks for
high dimension, low sample size data. In IJCAI, pages 2287–2293.
Mekala, R. R., Irfan, A., Groen, E. C., Porter, A., and Lindvall, M. (2021).
Classifying user requirements from online feedback in small dataset environ-
ments using deep learning. In 2021 IEEE 29th International Requirements
Engineering Conference (RE), pages 139–149. IEEE.
Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. (2013a).
Distributed representations of words and phrases and their compositionality.
Advances in neural information processing systems, 26:3111–3119.
Mikolov, T., Yih, W.-t., and Zweig, G. (2013b). Linguistic regularities in
continuous space word representations. In Proceedings of the 2013 confer-
ence of the north american chapter of the association for computational
linguistics: Human language technologies, pages 746–751.
Mills, C., Escobar-Avila, J., and Haiduc, S. (2018). Automatic traceability
maintenance via machine learning classification. In 2018 IEEE International
Conference on Software Maintenance and Evolution (ICSME), pages 369–
380. IEEE.
33
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel,
O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas,
J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay,
E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine
Learning Research, 12:2825–2830.
Pennington, J., Socher, R., and Manning, C. D. (2014). Glove: Global vectors
for word representation. In Proceedings of the 2014 conference on empirical
methods in natural language processing (EMNLP), pages 1532–1543.
Perini, A., Susi, A., and Avesani, P. (2012). A machine learning approach
to software requirements prioritization. IEEE Transactions on Software
Engineering, 39(4):445–461.
Ralph, P. and Tempero, E. (2018). Construct validity in software engineering
research and software metrics. In Proceedings of the 22nd International
Conference on Evaluation and Assessment in Software Engineering 2018,
pages 13–23.
Ravi, K. and Ravi, V. (2015). A survey on opinion mining and sentiment
analysis: tasks, approaches and applications. Knowledge-based systems,
89:14–46.
Rolland, C. and Proix, C. (1992). A natural language approach for require-
ments engineering. In International Conference on Advanced Information
Systems Engineering, pages 257–277. Springer.
Sarkar, D. (2016). Text Analytics with python. Springer.
Sarker, I. H. (2021). Machine learning: Algorithms, real-world applications
and research directions. SN Computer Science, 2(3):1–21.
Sebastiani, F. (2002). Machine learning in automated text categorization.
ACM computing surveys (CSUR), 34(1):1–47.
Seiffert, C., Khoshgoftaar, T. M., Van Hulse, J., and Folleco, A. (2014). An
empirical study of the classification performance of learners on imbalanced
and noisy software quality data. Information Sciences, 259:571–595.
Shen, L., Er, M. J., and Yin, Q. (2022). Classification for high-dimension
low-sample size data. Pattern Recognition, page 108828.
34
Sidey-Gibbons, J. A. and Sidey-Gibbons, C. J. (2019). Machine learning in
medicine: a practical introduction. BMC medical research methodology,
19(1):64.
Sima, C. and Dougherty, E. R. (2006). What should be expected from feature
selection in small-sample settings. Bioinformatics, 22(19):2430–2436.
Sokolova, M. and Lapalme, G. (2009). A systematic analysis of performance
measures for classification tasks. Information processing & management,
45(4):427–437.
Sutcliffe, A. and Maiden, N. (1998). The domain theory for requirements
engineering. IEEE Transactions on Software Engineering, 24(3):174–196.
Wang, S. and Yao, X. (2012). Multiclass imbalance problems: Analysis and
potential solutions. IEEE Transactions on Systems, Man, and Cybernetics,
Part B (Cybernetics), 42(4):1119–1130.
Wasikowski, M. and Chen, X.-w. (2009). Combating the small sample class
imbalance problem using feature selection. IEEE Transactions on knowledge
and data engineering, 22(10):1388–1400.
Xue, N. (2008). Labeling chinese predicates with semantic roles. Computa-
tional linguistics, 34(2):225–255.
Yin, L., Ge, Y., Xiao, K., Wang, X., and Quan, X. (2013). Feature selection
for high-dimensional imbalanced data. Neurocomputing, 105:3–11.
Żak, M. and Woźniak, M. (2020). Performance analysis of binarization
strategies for multi-class imbalanced data classification. In International
Conference on Computational Science, pages 141–155. Springer.
Zhao, L., Alhoshan, W., Ferrari, A., Letsholo, K. J., Ajagbe, M. A., Chioasca,
E.-V., and Batista-Navarro, R. T. (2021). Natural language processing for
requirements engineering: A systematic mapping study. ACM Computing
Surveys (CSUR), 54(3):1–41.
Zheng, W. and Zhao, H. (2020). Cost-sensitive hierarchical classification for
imbalance classes. Applied Intelligence, pages 1–11.
35
Zheng, Z., Wu, X., and Srihari, R. (2004). Feature selection for text cat-
egorization on imbalanced data. ACM Sigkdd Explorations Newsletter,
6(1):80–89.
36
|
|
http://arxiv.org/abs/2302.12598v2 | 2023-09-06T09:06:33 | 2023-02-24T12:21:30 | Dynamic Graph Convolutional Network with Attention Fusion for Traffic
Flow Prediction | Accurate and real-time traffic state prediction is of great practical
importance for urban traffic control and web mapping services. With the support
of massive data, deep learning methods have shown their powerful capability in
capturing the complex spatialtemporal patterns of traffic networks. However,
existing approaches use pre-defined graphs and a simple set of spatial-temporal
components, making it difficult to model multi-scale spatial-temporal
dependencies. In this paper, we propose a novel dynamic graph convolution
network with attention fusion to tackle this gap. The method first enhances the
interaction of temporal feature dimensions, and then it combines a dynamic
graph learner with GRU to jointly model synchronous spatial-temporal
correlations. We also incorporate spatial-temporal attention modules to
effectively capture longrange, multifaceted domain spatial-temporal patterns.
We conduct extensive experiments in four real-world traffic datasets to
demonstrate that our method surpasses state-of-the-art performance compared to
18 baseline methods. | [
"Xunlian Luo",
"Chunjiang Zhu",
"Detian Zhang",
"Qing Li"
] | [
{
"@title": null,
"@href": "http://arxiv.org/abs/2302.12598v2",
"@rel": "alternate",
"@type": "text/html"
},
{
"@title": "pdf",
"@href": "http://arxiv.org/pdf/2302.12598v2",
"@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 Convolutional Network with Attention
Fusion for Traffic Flow Prediction
Xunlian Luoa, Chunjiang Zhub, Detian Zhanga;* and Qing Lic
aInstitute of Artificial Intelligence, School of Computer Science and Technology, Soochow University, China.
bDepartment of Computer Science, University of North Carolina at Greensboro, USA.
cDepartment of Computing, The Hong Kong Polytechnic University, Hong Kong, China.
[email protected], [email protected], [email protected], [email protected]
3
2
0
2
p
e
S
6
]
G
L
.
s
c
[
2
v
8
9
5
2
1
.
2
0
3
2
:
v
i
X
r
a
Abstract. Accurate and real-time traffic state prediction is of great
practical importance for urban traffic control and web mapping ser-
vices. With the support of massive data, deep learning methods have
shown their powerful capability in capturing the complex spatial-
temporal patterns of traffic networks. However, existing approaches
use pre-defined graphs and a simple set of spatial-temporal com-
ponents, making it difficult to model multi-scale spatial-temporal
dependencies. In this paper, we propose a novel dynamic graph
convolution network with attention fusion to tackle this gap. The
method first enhances the interaction of temporal feature dimensions,
and then it combines a dynamic graph learner with GRU to jointly
model synchronous spatial-temporal correlations. We also incorpo-
rate spatial-temporal attention modules to effectively capture long-
range, multifaceted domain spatial-temporal patterns. We conduct
extensive experiments in four real-world traffic datasets to demon-
strate that our method surpasses state-of-the-art performance com-
pared to 18 baseline methods.
1
Introduction
In urban computing, popular web mappings services such as Google
Maps, and Bing Maps heavily rely on accurate traffic flow predic-
tion as a backend for their frontend applications such as person-
alized route planning and closest restaurant/gas station recommen-
dation. Similarly, departments of transportation in next-generation
smart cities often need to allocate traffic resources and optimize traf-
fic control plans, e.g., for an exposition, by blocking a minimum
number of streets while avoiding serious traffic congestion. The plan
needs to be generated in advance and thus requires precise traffic
flow estimation. Recently, we have witnessed the bloom of online
ride-hailing/sharing services, e.g., Uber, Lyft, and Didi. They often
provide functions to request a ride on the Web directly with no need
to download apps. These Web-based services, again, need a powerful
traffic prediction engine. The traffic flow prediction model analyzes
large amounts of historical traffic data to estimate future traffic condi-
tions based on statistical or data-driven methods [23], providing a ba-
sis for decision-making for these applications. However, traffic flow
is affected by complex spatial and temporal dependencies, which
make accurate real-time traffic forecasting extremely challenging.
As shown in Fig. 1, traffic prediction differs from traditional time
series in that it has significant spatial and temporal correlation and is
∗ Corresponding Author. Email: [email protected].
Figure 1: Complex spatial-temporal correlations.
also susceptible to other external factors [11]. The variation of traffic
in time has proximity and trend. It is also influenced by the travel
routine of urban residents, which shows a certain periodicity over a
long period of time. Being connected by a non-Euclidean spatial road
network, the traffic volume at the observation point is subject to the
propagation of vehicles from neighboring roads upstream and down-
stream, exhibiting mobility and transience. Besides, the intervention
of some external factors (weather, graduation ceremony, traffic ac-
cidents, etc.) also can cause drastic fluctuations in traffic flow. Ad-
ditionally, the spatial and temporal correlations are typically multi-
scale, which can be roughly divided into global and local in space
and long-term and short-term in time.
Extensive research has been carried out to address these chal-
lenges. Statistical models (e.g., VAR [20], ARIMA [14]) and ma-
chine learning methods including SVR [29] and ANN [24], treat
traffic sequences as independent data streams, considering only the
temporal variability of the data and ignoring spatial correlation. The
rapid development of deep learning techniques brings traffic predic-
tion research to a new stage. In particular, CNN [2], RNNs (its vari-
ants LSTM, GRU) [5], and Transformer with self-attention [25] have
been successful in modeling sequence tasks. A novel attempt is to
use convolution neural networks to model the implicit spatial rela-
tionships of urban regions as they do for images or videos [38]. Later
studies identify the advantages of graph neural networks over CNNs
in extracting structure information of irregular topologies [30]. In-
spired by the spatial-temporal characteristics of traffic data, an intu-
ition naturally develops to combine graph convolution networks with
sequence models to jointly model spatial-temporal dependencies.
TimeSpacet+1tt-1P1P2P3P4P5Temporal CorrelationSpatial CorrelationTraffic Conditions
Spatial-temporal graph neural networks provide a feasible solu-
tion for traffic prediction. Some models such as DCRNN [17] com-
bines diffusion convolution with GRU-based encoder-decoder archi-
tecture to capture the directionality of traffic propagation. STSGCN
[21] proposes a local spatial-temporal graph to represent the trans-
fer of information in the temporal and spatial directions, and adopts
residual-connected GCN modules to model spatial-temporal hetero-
geneity. However, they ignore the fact that pre-defined graphs cannot
fully reflect the reality of traffic connections. Although GWNET [32]
and MTGNN [31] improve their practices with adaptive graph learn-
ing, the separated spatial-temporal components are unable to capture
synchronized correlations. GMAN [39] based on spatial-temporal at-
tention fusion shows promising results for long-term forecasting but
performs poorly in the short term. STG-NCDE [4] and DSTAGNN
[15] achieve good prediction performance, but bring large compu-
tational consumption and system overhead. These works have con-
tributed to a tremendous improvement in performance from multiple
perspectives. However, we observe that they are not combined in a
cohesive way to address comprehensive features and their correla-
tions, and rarely balance method performance and complexity.
To address the shortcomings of existing methods, in this paper,
we propose a Spatial-Temporal Attention Fusion Dynamic Graph
Convolution Network (AFDGCN) for traffic flow prediction. Specif-
ically, We employ feature augmentation, dynamic graph convolution
recurrent networks, and multiple attention fusion to capture complex
traffic patterns from multi-scale spatial-temporal aspects. In sum-
mary, the main contributions of this paper are as follow:
• A novel and efficient spatial-temporal framework is proposed for
traffic prediction. The traffic features are first augmented to im-
prove the information interaction of the data on the feature chan-
nel and the temporal axis, rather than performing a basic channel
ascending dimension.
• We propose a dynamic graph learner for capturing hidden spatial
dependencies and combine adaptive graph convolution with gated
recurrent units to build a dynamic graph convolution recurrent net-
work for capturing local spatial-temporal correlations.
• We consolidate temporal attention and spatial attention to improve
the model's ability that identifies changes in the spatial field of
view and long-range time dependence. This indeed reduces the
error of overall prediction in complex scenes and enhances the
robustness of the model.
• We conduct extensive experiments in four benchmark datasets,
and evaluate the performance compared with 18 baseline meth-
ods. The results show that our proposed method outperforms all
other methods in three standard evaluation metrics with low com-
putation costs.
2 Related Work
2.1 Graph Convolution Networks
Graph convolution networks process data as a set of graph struc-
tures consisting of nodes and edges [9], and have a wide range of
applications in social network analysis, recommender systems and
molecular biology. Its core idea is to aggregate the features of a node
with those of its neighboring nodes to generate a new feature rep-
resentation of the node [30]. Generally, there are two mainstream
graph convolution networks, namely, the spectral-based methods and
the spatial-based methods. Chebyshev graph convolution network
(ChebNet) is a representative spectral method that transforms the
graph signal into the frequency domain for filtering to achieve noise
reduction and feature extraction [6]. Specifically, by computing the
Chebyshev polynomial Tk(x) to approximate the filter, a Laplacian
matrix (cid:101)L can be obtained as follows:
(cid:101)L =
2
λmax
L − IN =
K−1
(cid:88)
k=0
θkTk((cid:101)L)
(1)
where L = IN − D− 1
Laplacian matrix, U is the eigenvalue matrix of L.
The ChebNet is expressed as follows:
2 AD− 1
2 = U ΛU T is the normalized graph
Θ ⋆G X = Θ(L)X = σ
(cid:33)
θkTk((cid:101)L)xi
(2)
(cid:32)K−1
(cid:88)
k=0
where X ∈ RN ×d is the feature matrix of all nodes in the graph,
A ∈ RN ×N is the adjacency matrix of the graph and k is the order
of the ChebNet.
In traffic prediction, graph convolutional networks (GCNs) are
generalized to high-dimensional GCNs by approximation of first-
order Chebyshev polynomials [13] as follows:
X (l) = (IN + D− 1
2 AD− 1
2 )X (l−1)W + b.
(3)
where D is the degree matrix of A, W and b are learnable weights
and biases, and X (l) denotes the hidden representation of the l-layer.
2.2 Deep Learning for Traffic Prediction
A basic assumption behind spatial-temporal graphs for traffic fore-
casting is that the future state of a node depends on its historical
knowledge and the information of its neighbors [32]. It is natural to
combine graph convolution networks with sequence models to con-
struct spatial-temporal framework for modeling the spatial-temporal
dependence of traffic data. The models can be classified as CNN-
Based, RNN-Based and Attention-Based according to their temporal
components [10]. The CNN-based approaches use dilation convolu-
tion to expand the receptive field of the model with high computa-
tional efficiency, but the fixed implicit time step sacrifices some flex-
ibility. RNNs provide a universal architecture of encoder-decoder.
Many works [17, 16] replace the fully connected layer of GRU with
GCN to achieve synchronous spatial-temporal modeling. Compared
to the previous two, the attention-based methods [39, 7] are relatively
flexible and can learn to go further back in time patterns. The ongo-
ing advancement of these efforts has made deep learning the primary
method for spatial-temporal data mining. Meanwhile, the study of
graph quality becomes a more general task. This has a direct im-
pact on whether the model can effectively capture spatial dependen-
cies. Adaptive graphs [1] and discrete sampling graphs [37] in many
works have been shown to model information propagation in space
better than pre-defined graphs. Compared to analyzing temporal cor-
relations, it is much more challenging to model spatial relations in
traffic with insufficient prior knowledge.
3 Problem Statement
Traffic forecasting refers to the use of historically observed traffic
data to predict the traffic state in a future period based on road net-
work knowledge. The traffic sensor distribution is represented as a
graph G = (V, E, A). V is the set of N = |V | nodes in the spa-
tial topology and E is the set of edges connected by node pairs.
A ∈ RN ×N is the adjacency matrix of the graph G, indicating the
Figure 2: The model overview of dynamic graph convolution network with spatial-temporal attention fusion.
proximity of connections or distances based on the Gaussian kernel
function. Denote the traffic flow observed on G at time step t as a
graph signal matrix Xt ∈ RN ×C , where C is the feature channel
(e.g. flow, speed, demand) of each node.
Similarly, Xt−T :t−1 ∈ RT ×N ×C denotes the traffic statistics of
the full road network at time intervals of T . The aim of traffic fore-
casting is to learn a function f that is able to forecast Q future signal
tensor given P historical signal tensor and the graph G:
[Xt−P −1, * * * , Xt; G]
f
−→
Θ
[ (cid:98)Xt+1, * * * , (cid:98)Xt+Q]
(4)
where Θ denotes the model parameters to be optimized.
4 Proposed Model
We propose a novel spatial-temporal graph neural network called
AFDGCN. It consists of four main modules, namely feature augmen-
tation layer, dynamic graph convolutional recurrent network, multi-
head temporal attention module, and graph attention module. The
structure of the model is illustrated in Fig. 2.
4.1 Feature Augmentation Layer
To gain a comprehensive understanding of the intrinsic character-
istics of time series data, we develop a feature augmentation layer
that is inspired by channel-wise attention [28]. The layer is based
on a "squeeze-excitation" structure [18] that enhances the informa-
tion interaction between the channels and the temporal dimension.
It improves the expressiveness of the feature map by automatically
calibrating the importance of the feature space.
Specifically, the feature augmentation layer consists of two sub-
structures in series, namely the channel calibration block and the
temporal calibration block. The channel block is a fully connected
network with two layers, which first performs a squeezing operation
on the feature map X ∈ RT ×N ×D. This helps the model recalibrate
the features with a low-dimensional distribution. It then analyzes the
influence of each channel through a single activation process and a
self-threshold mechanism. The channel-wise computation is formal-
ized as follows:
s(c) = σ(W2δ(W1X (c) + b1) + b2),
(5)
X (c)
1 = X (c) ◦ s(c).
where W1, W2 and b1, b2 are the weight parameters and bias of the
fully connected layer. ◦ is the Hamada product. σ and δ are the Sig-
moid and ReLU activation functions, respectively.
(6)
Similarly, to focus on the structural information (significant time
points in P ) of the time series, the temporal calibration block utilizes
a temporal convolution layer for feature extraction. After channel cal-
culation and dimensional exchange, the feature map X1 served as the
input to the temporal-wise block. That is:
s(t) = σ(Θ1,k ⋆ δ(Θ1,k ⋆ X (t)
1 ),
X (t)
2 = X (t)
1 ◦ s(t).
(7)
(8)
where Θ1,k is the 1 × k convolution kernel. After preprocessing by
feature augmentation layer, the reweighted feature maps are used as
the output to feed in the training of the subsequent structures.
4.2 Dynamic Graph Convolutional Recurrent Network
The performance of traditional GCNs relies on a pre-defined graph
structure. However, the connections built during the study based on
distance proximity are often incomplete and biased [32, 31]. And the
nodes' own factors (e.g., POI, road structure, and road type) are dif-
ficult to represent [8]. These make general GCNs unable to capture
spatial dependencies effectively. In view of these problems, we pro-
pose a dynamic graph learner for mining the potential spatial prop-
erties of traffic data. It generates the similarity matrix by initializing
the node embeddings and the GCN takes into account the unique
Feature AugmentationDGC-GRUDGC-GRUDGC-GRUDGC-GRU. . .. . .Output SequenceOutput LayerMulti-Head Temporal AttentionMulti-Head Temporal AttentionMulti-Head Temporal AttentionGAT. . .. . .Attention FusionGCNGCN-1Inter-node SimilaritiesNode EmbeddingGraphGraph LearnerPositional EmbeddingKeyQueryValueSoftmaxTemporal ContextAdd & NormFeed Forward NetworkAdd & NormTemporal Attention Layerpatterns of each node during feature aggregation. The parameters are
dynamically updated during the training stage to adapt to the traffic
data in an end-to-end manner.
All nodes are predefined with the embedding vector EG ∈ RN ×d,
where d denotes the node embedding matrix, d ≪ N . Then, we infer
G ∈ RN ×N .
the implicit correlation between node pairs by EG * ET
The normalized adjacency matrix is defined as:
(cid:101)A = D− 1
2 AD− 1
2 = sof tmax(ReLU (EG * ET
G)),
(9)
where E(i)
G ∈ Rd is the node embedding vector of vi. The ReLU
activation function is used for matrix sparsification and to eliminate
the effect of negative values.
We observe that the weight and bias used by the traditional GCN
for feature linear transformation are shared by all nodes. This ig-
nores the differences in the traffic patterns of the nodes themselves.
Inspired by the matrix decomposition, we perform matrix multipli-
cation of WG ∈ Rd×C×F (bG ∈ Rd×F ) with the node embed-
ding EG ∈ RN ×d to generate new model parameters W = EGWG
(b = EGbG, respectively). In this way, the dynamic generation of
graph convolution Θx ⋆ G is expressed as:
Z = (IN +sof tmax(ReLU (EG *ET
G)))XEGWG +EGbG. (10)
To capture synchronous temporal and spatial dependencies, we ex-
tend the fully connected operation in GRU with GCN to obtain the
Dynamic Graph Convolutional Recurrent Network (DGCGRU). Due
to the superior performance of GRU in handling sequential tasks, we
embed graph convolution operations in the original GRU structure to
capture sequential information while merging spatial relationships.
Structurally, in addition to the present data input, each time step
receives a hidden representation from the previous time step [17],
which is used to control the memorization and forgetting of informa-
tion. Here, the GRU operation is applied to each node in the graph
and the parameters are shared with each other.
Specifically, given the previously hidden representation Ht−1 and
the input data X:,t at time step t, we represent the computation of a
single-step gated recurrent unit as:
zt = σ (Θz ⋆ G[X:,t, Ht−1] + bz)
rt = σ (Θr ⋆ G[X:,t, Ht−1] + br)
ˆHt = tanh (Θh ⋆ G[X:,t, (r ⊙ Ht−1)] + bh)
Ht = z ⊙ Ht−1 + (1 − z) ⊙ ˆHt,
(11)
where bz, br and bh are learnable parameters of the recurrent neural
network and Ht is the hidden output at time t.
The combination of dynamic graph convolution and GRU en-
hances the model's ability to handle fine-grained spatial-temporal
patterns. This dynamically generated graph can be freed from the
constraints of pre-defined graphs because it adaptively builds con-
nection relationships of node pairs using training data. However,
GRU does not rigidly memorize all fixed-length sequences, but se-
lectively stores information of historical time steps through hidden
states due to the forgetting characteristic of gating. Although it can
effectively capture local temporal information from traffic sequence
data, it is insensitive to long-distance temporal relationships.
4.3 Multi-head Temporal Attention Module
A multi-head temporal attention module is used to extract the global
context information of the sequence [27, 34]. This module consists
of a positional embedding, a multi-head temporal attention layer, and
a residual network. The temporal attention enables the model to ob-
serve longer-term temporal trends and focus on highly correlated in-
formation to compensate for the deficiencies of GRU in modeling
long-range temporal dependence.
The hidden layer sequence {H1[i, :], H2[i, :], * * * , HT [i, :]} from
DGCGRU is fed to the temporal attention module. Given that the
computation of the multi-head attention mechanism [25] ignores the
relative positions of the sequences, we add a position encoding to the
feature data at each time step. That is:
ˆHt[i, :] = Ht[i, :] + et, where Ht ∈ RN ×D
(12)
where the position token et is defined as:
et =
(cid:40)
sin(t/100002i/dmodel ),
cos(t/100002i/dmodel ), otherwise
if t = 0, 2, 4, . . .
(13)
The embedded features ˆH ∈ RT ×N ×D are first projected into
a high-dimensional latent subspace to generate the Query, Key, and
Value matrix as shown in Eq. (14). The mappings are realized with
the feed-forward neural networks. Then, Q and K T are matrix prod-
ucts and normalized to obtain the attention distribution of each time
step. Finally, the attention matrix is superimposed on V to generate
an implicit representation with temporal context as Eq. (15).
Q = ˆHW T
q , K = ˆHW T
Attention(Q, K, V ) = sof tmax(
k , V = ˆHW T
v
QK T
√
dk
(14)
(15)
)V,
where W T
√
v are the projection matrix to be learned,
dk is the weight scaled factor, and the softmax function is used to
k , and W T
q , W T
normalize the weight scores.
To improve the perception level of temporal semantics in different
subspaces, we adopt a multi-head temporal attention module to en-
rich the representation of information. Multiple sets of self-attentions
act independently on the sequence. Their results are concatenated
and then linearly transformed to obtain the outputs HAttn. The math-
ematical formula is as follows:
M ultiHead(Q, K, V ) = Concat(head1, head2, * * * , headh)W O,
headi = Attention( ˆHW Q
, ˆHW V
i , ˆHW K
i ).
i
(16)
where W Q
i ∈ Rdmodel×dk are all the projection
matrices for the linear transformation. D = h × dmodel, h is the
number of heads.
, and W V
i , W K
i
Finally, HAttn is passed into the residual network, with each sub-
layer followed by a Feed-Forward Network and a Layer Normaliza-
tion. We define the representation of the temporal attention module
output as HS ∈ RT ×N ×D.
4.4 Graph Attention Module
Adaptive graph learner and recurrent graph convolution layer can
capture spatial heterogeneity and synchronous spatial-temporal cor-
relations. However, the spatial information of the traffic context is
often dynamically evolving [19]. For example, a major event (e.g.,
concerts, traffic accidents) at a location provokes a sudden increase
or decrease in vehicles within the neighboring area. To respond to
complex and variable spatial patterns, our model applies a graph at-
tention module [26]. It dynamically assigns different weights based
on the feature similarity of the target node and adjacent nodes.
The input to the graph attention module is the set of all node hid-
den vectors, denoted as Hlast = {h1, h2, * * * , hN }, where hi ∈
RD. Suppose the feature vectors of vi and vj be hi and hj, and Ni
be the set of neighbors to vi. The equation to calculate the attention
scores between node pairs is as follows:
eij = a(W hi, W hj), j ∈ Ni,
(17)
where (*, *) is the concatenation operation, W ∈ RF ×D is a learnable
linear matrix, a : RF × RF → R as same as W maps the combined
parameter matrix into a scalar.
We use the nonlinear activation function LeakyReLU to eliminate
minor dependencies. Then the attention scores of vi's all the adja-
cent nodes are normalized by the softmax. Formally, the formula is
calculated as below:
αij = sof tmax(eij) =
(cid:80)
exp(LeakyReLU (eij))
exp(LeakyReLU (eik))
k∈Ni
,
(18)
Message aggregation of attention is applied to each node to obtain
its output representation. That is:
h′
i = σ(
(cid:88)
j∈Ni
αijW hj).
(19)
where αij is the normalized attention score. Generally, we also
dropout a certain percentage of it. Here we represent the above steps
uniformly in matrix calculations as the following:
HS = ELU ((M ⊙ A)HlastW ) .
(20)
where A is the adjacency matrix based on the distance relationship.
The ELU is also an activation function. The elements in M ∈ RN ×N
are the dynamic attention factors. HS ∈ RN ×D is the graph embed-
ding of the output in the graph attention module.
The prediction layer is a typical convolution layer that uses the
hidden features of spatial-temporal attention fusion for multi-step
prediction. Its input is a graph embedding HS and temporal tensor
HT , which is mapped to the output space after broadcast summation.
Formally, it is as follows:
(cid:98)Xt+1:t+Q = Conv(HT + HS).
(21)
where ˆX ∈ RQ×N ×D is the final prediction result of the model.
5 Experiment
In this section, we first introduce the experimental settings, includ-
ing the datasets used, baseline models, and evaluation metrics. We
then provide a detailed analysis of the experimental results and visu-
alizations. Finally, we present a series of studies, including module
ablation and hyperparameter tuning, to illustrate the effects of model
components and parameters on the overall results.
5.1 Experimental Settings
Dataset. We use four traffic flow datasets (i.e., PeMSD3, PeMSD4,
PeMSD7, and PeMSD8) collected by the California Department of
Transportation sensors on highways [3]. They record traffic statuses
such as flow, speed, and occupancy at 5-minute time intervals. The
statistical details of the datasets are provided in Table 1.
The raw data are standardized using Z-Score [21] and then divided
into the training set, validation set, and test set with a ratio of 6:
2: 2. The training set is disrupted before training and the validation
Table 1: The statistics of the tested real-world datasets.
Dataset
Sensors
Edges
Samples
Time Range
PeMSD3
PeMSD4
PeMSD7
PeMSD8
358
307
883
170
547
340
866
296
26,208
16,992
28,224
17,856
Sept - Nov, 2018
Jan - Feb, 2018
May - Aug, 2017
Jul - Aug, 2016
set is used to control the early stopping of the training process. In
the multi-step prediction, we set both the input sequence P and the
output sequence Q to 12.
Baseline Methods. To evaluate the proposed model, we compare it
with 18 baseline models, including traditional statistical, deep learn-
ing, and graph neural network models. These baselines serve as a
benchmark to demonstrate the effectiveness of our approach. Below
is a brief overview of the critical baseline:
• VAR [29]: Vector Auto-Regression assumes that the historical
time series is stationary and forecasts by estimating the relation-
ship between the time series and its lagged values.
• ARIMA [14]: Auto-regressive Integrated Moving Average with
Kalman filter is a widely used statistical model for time series.
• FC-LSTM [22]: A recurrent neural network with fully connected
LSTM hidden units.
• STGCN [36]: Spatial-Temporal Graph Convolutional Network,
which com- bines graph convolution with 1D gated convolution.
• DCRNN [17]: Diffusion convolution recurrent neural network,
which combines graph convolution networks with recurrent neural
networks in an encoder- decoder architecture.
• GWNET [33]: Graph WaveNet introduces an adaptive adjacency
matrix and combines diffuse graph convolution with TCN instead
of 1D convolution.
• AGCRN [1]: Adaptive Graph Convolutional Recurrent Network,
which augments traditional graph convolution with adaptive graph
generation and node adaptive parameter learning, and is integrated
into a recurrent neural network to capture more complex spatial-
temporal correlations.
• STG-NCDE [4]: Spatial-Temporal Graph Neural Controlled Dif-
ferential Equation, which designs two NCDEs for temporal pro-
cessing and spatial processing and integrates them into a single
framework.
• DSTAGNN [15]: Dynamic Spatial-Temporal Aware Graph Neural
Network, which captures dynamic spatial and temporal dependen-
cies between nodes and receptive field features through improved
multi-headed attention and multi-scale gated convolution.
Evaluation Metrics. Throughout the experiments, we employ Mean
Absolute Error (MAE), Root Mean Squared Error (RMSE), and
Mean Absolute Percentage Error (MAPE) [27] as evaluation met-
rics to compare the overall performance of the different models on
the test dataset. A lower MAE, RMSE, and MAPE value indicates a
better prediction performance.
Parameters Setup. Our task is to predict the traffic state in the
next hour based on the historical traffic data of the previous hour.
In our experiments, we set all the hidden dimensions to 64, the
head of attention to 4, and the order of graph convolution to 2.
We use the Adam [12] optimizer for training the model. We select
SmoothL1Loss as the loss function. The batch size of the data is 64,
the number of epochs is 300, and the initialized learning rate is 0.003.
An early stopping strategy is used with a patience of 15 iterations on
the validation dataset to prevent overfitting.
Table 2: Performance comparison of AFDGCN and other baseline models. AFDGCN achieves the best performance for all datasets.
Model
HA
ARIMA
VAR
FC-LSTM
TCN
STGCN
DCRNN
GWNET
STG2Seq
LSGCN
ASTGCN
STSGCN
STFGNN
STGODE
AGCRN
Z-GCNETs
STG-NCDE
DSTAGNN
AFDGCN
MAE
31.58
35.41
23.65
21.33
19.32
17.55
17.99
19.12
19.03
17.94
17.34
17.48
16.77
16.50
15.98
16.64
15.57
15.57
14.97
PEMSD3
RMSE MAPE
MAE
PEMSD4
RMSE MAPE
MAE
PEMSD7
RMSE MAPE MAE
PEMSD8
RMSE MAPE
52.39
47.59
38.26
35.11
33.55
30.42
30.31
32.77
29.83
29.85
29.56
29.21
28.34
27.84
28.25
28.15
27.09
27.21
25.81
33.78% 38.03
33.78% 33.73
24.51% 24.54
23.33% 26.77
19.93% 23.22
17.34% 21.16
18.34% 21.22
18.89% 24.89
21.55% 25.20
16.98% 21.53
17.21% 22.93
16.78% 21.19
16.30% 20.48
16.69% 20.84
15.23% 19.83
16.39% 19.50
15.06% 19.21
14.68% 19.30
14.18% 19.09
59.24
48.80
38.61
40.65
37.26
34.89
33.44
39.66
38.86
33.86
35.22
33.65
32.51
32.82
32.26
31.61
31.09
31.46
31.01
27.88% 45.12
24.18% 38.17
17.24% 50.22
18.23% 29.98
15.59% 32.72
13.83% 25.33
14.17% 25.22
17.29% 26.39
13.18% 32.77
13.18% 27.31
16.56% 24.01
13.90% 24.26
16.77% 23.46
13.77% 22.59
12.97% 22.37
12.78% 21.77
12.76% 20.53
12.70% 21.67
12.62% 20.22
65.64
59.27
75.63
45.94
42.23
39.34
38.61
41.50
47.16
41.46
37.87
39.03
36.60
37.54
36.55
35.17
33.84
34.51
33.80
24.51% 34.86
19.46% 31.09
32.22% 19.19
13.20% 23.09
14.26% 22.72
11.21% 17.50
11.82% 16.82
11.97% 18.28
20.16% 20.17
11.98% 17.73
10.73% 18.25
10.21% 17.13
9.21%
16.94
10.14% 16.81
15.95
9.12%
15.67
9.25%
15.45
8.80%
15.67
9.01%
8.52% 15.02
59.24
44.32
29.81
35.17
35.79
27.09
26.36
30.05
30.71
26.76
28.06
26.80
26.25
25.97
25.22
25.11
24.81
24.77
24.37
27.88%
22.73%
13.10%
14.99%
14.03%
11.29%
10.92%
12.15%
17.32%
11.20%
11.64%
10.96%
10.60%
10.62%
10.09%
10.01%
9.92%
9.94%
9.68%
spatial-temporal components, so they generally have better perfor-
mance compared with temporal-only-based methods. AGCRN and
DSTAGNN are free from the limitation of fixed graph structure and
use self-adaptive or dynamic properties of spatial association be-
tween nodes in historical data to construct the graph structure. They
further improve the prediction performance compared with the pre-
vious methods. In contrast, our method not only considers the effects
of synchronous spatial-temporal correlation but also mines the multi-
scale and long-distance traffic fluctuation relationships from the per-
spective of spatial-temporal attention.
Furthermore, we quantify the difference between our model and
the best baseline model using the relative error rate. Across the
four datasets, the average MAE, RMSE, and MAPE values for
AFDGCN are 17.33, 28.75, and 11.25%, respectively; the corre-
sponding average values of DSTAGNN [15] are 18.05 (104.2%),
29.48 (102.5%), and 11.58% (103.0%), and the average error perfor-
mance of STG-NCDE [4] are 17.69 (102.1%), 29.21 (101.6%) and
11.64% (103.5%). Taken together, the improved gain of our model
compared to these two models ranges from 1.6% to 4.2%.
To clearly examine the difference in prediction performance be-
tween our method and the baseline methods, we plot in Fig. 3 the
predicted and ground truth of our method (AFDGCN) versus STG-
NCDE for several stations/nodes within a given day. AFDGCN and
STG-NCDE well fit the real conditions of traffic variations in many
time periods, but our model shows more accurate prediction perfor-
mance in challenging traffic scenarios, e.g., during traffic peak hours
or when the magnitude of fluctuations is drastic. In particular, our
method adapts well to changes in traffic trends, e.g., 5:00-8:00 in (a),
4:00-7:00 in (b), 10:00-12:00 in (c), and 6:00-9:00 in (d). In contrast,
the prediction curves of STG-NCDE significantly deviate from the
ground truth because of its limited predictive power.
5.3 Additional Experimental Studies
Efficiency study. We first compare the computational cost of our
model AFDGCN with several competitive baseline models in the
PEMSD4 using the same Graphic Card NVIDIA Tesla V100. As
shown in Table 3, AFDGCN has a comparable training and infer-
Figure 3: Traffic forecasting within one day in different datasets.
5.2 Experimental Results
Table 2 presents the evaluation results of AFDGCN and major base-
line methods on the four tested datasets. The bold values and the un-
derlined values are the best and second-best prediction performances,
respectively. Our method (AFDGCN) always achieves the best per-
formance and is in bold. Compared with the best baseline (under-
lined), the performance of AFDGCN in four datasets (PeMSD3,
PeMSD4, PeMSD7, and PeMSD8) is improved by 3.85%, 0.62%,
1.51%, and 2.78% on MAE and 3.41%, 0.63%, 3.50%, and 2.42%
on MAPE respectively. In particular, the improvements are more sig-
nificant for the PeMSD3 and PeMSD8 datasets.
We observe that statistical methods such as HA, ARIMA, and
VAR have difficulty in handling nonlinear, non-stationary time se-
ries data and the model prediction errors are high. Although deep
learning methods such as FC-LSTM and TCN have advantages over
statistical models, they only consider temporal correlations and can-
not exploit spatial dependencies, thus having a limited ability to
model spatial-temporal data. Spatial-temporal graph networks such
as STGCN [35], DCRNN [17], and GWNET [33] are designed with
D 1 R G H L Q 3 ( 0 6 ' 7 U D I I L F ) O R Z * U R X Q G 7 U X W K 6 7 * 1 & |