Add Batch 864e3c22-1a64-4b09-90d3-7b12b0aa94e6
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- 12leadecgreconstructionviakoopmanoperators/761215aa-8bbf-45b9-a70a-e4170fc85d79_content_list.json +3 -0
- 12leadecgreconstructionviakoopmanoperators/761215aa-8bbf-45b9-a70a-e4170fc85d79_model.json +3 -0
- 12leadecgreconstructionviakoopmanoperators/761215aa-8bbf-45b9-a70a-e4170fc85d79_origin.pdf +3 -0
- 12leadecgreconstructionviakoopmanoperators/full.md +368 -0
- 12leadecgreconstructionviakoopmanoperators/images.zip +3 -0
- 12leadecgreconstructionviakoopmanoperators/layout.json +3 -0
- 1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/c5313d4b-2a3b-434e-8a6a-a07cba185dcd_content_list.json +3 -0
- 1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/c5313d4b-2a3b-434e-8a6a-a07cba185dcd_model.json +3 -0
- 1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/c5313d4b-2a3b-434e-8a6a-a07cba185dcd_origin.pdf +3 -0
- 1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/full.md +397 -0
- 1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/images.zip +3 -0
- 1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/layout.json +3 -0
- abitmorebayesiandomaininvariantlearningwithuncertainty/b5f69d13-2c24-4139-8208-7cdd93ba1eaa_content_list.json +3 -0
- abitmorebayesiandomaininvariantlearningwithuncertainty/b5f69d13-2c24-4139-8208-7cdd93ba1eaa_model.json +3 -0
- abitmorebayesiandomaininvariantlearningwithuncertainty/b5f69d13-2c24-4139-8208-7cdd93ba1eaa_origin.pdf +3 -0
- abitmorebayesiandomaininvariantlearningwithuncertainty/full.md +333 -0
- abitmorebayesiandomaininvariantlearningwithuncertainty/images.zip +3 -0
- abitmorebayesiandomaininvariantlearningwithuncertainty/layout.json +3 -0
- acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/1759542a-2ec1-468a-bc92-fb02d0d16f4a_content_list.json +3 -0
- acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/1759542a-2ec1-468a-bc92-fb02d0d16f4a_model.json +3 -0
- acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/1759542a-2ec1-468a-bc92-fb02d0d16f4a_origin.pdf +3 -0
- acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/full.md +383 -0
- acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/images.zip +3 -0
- acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/layout.json +3 -0
- adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/4365bc2a-f514-4154-a9bb-2a54342aa305_content_list.json +3 -0
- adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/4365bc2a-f514-4154-a9bb-2a54342aa305_model.json +3 -0
- adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/4365bc2a-f514-4154-a9bb-2a54342aa305_origin.pdf +3 -0
- adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/full.md +415 -0
- adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/images.zip +3 -0
- adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/layout.json +3 -0
- adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/eccf1f7b-3a5f-49a7-88f5-4ac04b578025_content_list.json +3 -0
- adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/eccf1f7b-3a5f-49a7-88f5-4ac04b578025_model.json +3 -0
- adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/eccf1f7b-3a5f-49a7-88f5-4ac04b578025_origin.pdf +3 -0
- adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/full.md +419 -0
- adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/images.zip +3 -0
- adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/layout.json +3 -0
- adiscriminativetechniqueformultiplesourceadaptation/ef18857d-2f2d-49bf-b209-4485163d10e4_content_list.json +3 -0
- adiscriminativetechniqueformultiplesourceadaptation/ef18857d-2f2d-49bf-b209-4485163d10e4_model.json +3 -0
- adiscriminativetechniqueformultiplesourceadaptation/ef18857d-2f2d-49bf-b209-4485163d10e4_origin.pdf +3 -0
- adiscriminativetechniqueformultiplesourceadaptation/full.md +428 -0
- adiscriminativetechniqueformultiplesourceadaptation/images.zip +3 -0
- adiscriminativetechniqueformultiplesourceadaptation/layout.json +3 -0
- adistributiondependentanalysisofmetalearning/6db6afa5-a197-40ad-a97b-84bf3b3a92f4_content_list.json +3 -0
- adistributiondependentanalysisofmetalearning/6db6afa5-a197-40ad-a97b-84bf3b3a92f4_model.json +3 -0
- adistributiondependentanalysisofmetalearning/6db6afa5-a197-40ad-a97b-84bf3b3a92f4_origin.pdf +3 -0
- adistributiondependentanalysisofmetalearning/full.md +378 -0
- adistributiondependentanalysisofmetalearning/images.zip +3 -0
- adistributiondependentanalysisofmetalearning/layout.json +3 -0
- aframeworkforprivatematrixanalysisinslidingwindowmodel/549f9551-ce0a-437b-a081-f1b54147a939_content_list.json +3 -0
- aframeworkforprivatematrixanalysisinslidingwindowmodel/549f9551-ce0a-437b-a081-f1b54147a939_model.json +3 -0
12leadecgreconstructionviakoopmanoperators/761215aa-8bbf-45b9-a70a-e4170fc85d79_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:973557ac0ad8dff1c84e930cfc12681dc205054a40e37d3164082420f733f527
|
| 3 |
+
size 79001
|
12leadecgreconstructionviakoopmanoperators/761215aa-8bbf-45b9-a70a-e4170fc85d79_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3656f22d192b1cb5a4cd4dfdc6d70721b3c1c27fe53ef873944d924a4efbedf5
|
| 3 |
+
size 94748
|
12leadecgreconstructionviakoopmanoperators/761215aa-8bbf-45b9-a70a-e4170fc85d79_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38fe58a802c1ee581a80ba2020afde43173583fc90eb3b1542d8afc21d66b2af
|
| 3 |
+
size 1480597
|
12leadecgreconstructionviakoopmanoperators/full.md
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 12-lead ECG Reconstruction via Koopman Operators
|
| 2 |
+
|
| 3 |
+
Tomer Golany $^{1}$ Daniel Freedman $^{2}$ Saar Minha $^{3}$ Kira Radinsky $^{1}$
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
$32\%$ of all global deaths in the world are caused by cardiovascular diseases. Early detection, especially for patients with ischemia or cardiac arrhythmia, is crucial. To reduce the time between symptoms onset and treatment, wearable ECG sensors were developed to allow for the recording of the full 12-lead ECG signal at home. However, if even a single lead is not correctly positioned on the body that lead becomes corrupted, making automatic diagnosis on the basis of the full signal impossible. In this work, we present a methodology to reconstruct missing or noisy leads using the theory of Koopman Operators. Given a dataset consisting of full 12-lead ECGs, we learn a dynamical system describing the evolution of the 12 individual signals together in time. The Koopman theory indicates that there exists a high-dimensional embedding space in which the operator which propagates from one time instant to the next is linear. We therefore learn both the mapping to this embedding space, as well as the corresponding linear operator. Armed with this representation, we are able to impute missing leads by solving a least squares system in the embedding space, which can be achieved efficiently due to the sparse structure of the system. We perform an empirical evaluation using 12-lead ECG signals from thousands of patients, and show that we are able to reconstruct the signals in such way that enables accurate clinical diagnosis.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
Cardiovascular diseases are responsible for about a third of all deaths globally (Roth et al., 2018). The electrocardiogram (ECG) is a noninvasive tool for detecting diseases of the heart, and as such is one of the most common tests performed by cardiologists. The short-duration standard 12-lead ECG is the most commonly used ECG exam in medical facilities (Maron et al., 2014). In this test, ten electrodes are placed on a patient and the overall electrical potential amplitude of the heart is then measured from twelve different angles referred to as "leads", and is recorded over a period of time (10 seconds in the standard 12-lead ECG exam). This evaluation provides a full diagnosis of heart activity, including arrhythmia, acute coronary syndrome, ventricular dysfunction and cardiac chamber hypertrophy.
|
| 12 |
+
|
| 13 |
+
However, it is still a challenge to conveniently and robustly track 12-lead ECG in people's daily lives. To reduce the time between the onset of symptoms and their treatment, wearable ECG sensors such as (Laguna et al., 1990) been developed to allow the recording of a 12-lead ECG at home. Accurate ECG monitoring from those devices is of high importance. For example, Atrial Fibrillation, the most common serious cardiac arrhythmia, affects an estimated 2.7-6.1 million people and increases a person's risk of a life-changing stroke, heart failure and death. It can occur without symptoms, thus its timely detection could help physicians and their patients get an earlier confirmed diagnosis.
|
| 14 |
+
|
| 15 |
+
In order to properly rely on these sensors for clinical interpretation, each lead measurement must be well grounded. If even a single lead is not correctly positioned on the body that lead becomes corrupted, making diagnosis on the basis of the full 12-lead ECG signal impossible. To overcome this challenge, the problem of ECG reconstruction has gained considerable attention and several solutions based on machine learning have been proposed (Scherer et al., 1989; Nelwan, 2005; Atoui et al., 2004; Zhou et al., 2019). However, all of these methods assume a fixed set of pre-specified leads to have clean signals. This is a challenge with wearable devices where arbitrary leads can be corrupted. In this work, we introduce a framework which is able to reconstruct 12-lead ECG from any subset of available leads, without training a new model for each subset.
|
| 16 |
+
|
| 17 |
+
ECGs using the theory of Koopman Operators (Koopman, 1931; Koopman & Neumann, 1932), a decades old theory which has recently re-emerged as a leading candidate for the systematic linear representation of nonlinear systems (Mezić & Banaszuk, 2004) (Mezić, 2005). The key aspect of Koopman theory which we leverage is its linear structure: the signal of interest can be embedded in a high-dimensional space in which the operator which propagates from one time instant to the next is linear. Learning the dynamical system is therefore equivalent to learning both the mapping to this embedding space, as well as the corresponding linear operator. Due to the linear structure, missing lead reconstruction can be posed as a least squares problem in the embedding space. Minimization leads to an explicit solution in the form of a sparse linear system, which can be solved efficiently. We emphasize again that this method of reconstruction may be applied no matter which subset of leads have been corrupted, giving it a crucial advantage over existing techniques (Zhou et al., 2019). Figure 1 presents an example of two Koopman-reconstructed leads.
|
| 18 |
+
|
| 19 |
+
We empirically evaluate our reconstruction technique in 3 separate ways: (1) We compute the reconstruction error of our algorithm, and show that it is lower than competitor techniques. (2) We learn classifiers for common classes of abnormalities, and analyze the change in performance of these classifiers as clean signals in the test are replaced with signals in which some of the leads have been reconstructed. We show that classification accuracy remains high when using signals with reconstructed leads; and this remains the case even when a large number of leads have been corrupted. (3) We perform a small clinical experiment, in which clinicians are given examples of ECG signals with missing vs. reconstructed corrupted leads. We demonstrate that our reconstruction improves clinicians' diagnosis capabilities.
|
| 20 |
+
|
| 21 |
+
Our contributions in this work are threefold. (1) We present a methodology to learn 12-lead ECG dynamics using Koopman operators, which are represented by deep neural nets. We learn a separable representation of the Koopman embedding functions that can be applied on each ECG lead separately. (2) We introduce a least squares system which is able to impute missing leads efficiently from any partial sub-leads ECG. We share the code for the reproducibility of our results (3) We empirically show that our method is able to reconstruct any partial-lead ECG signal to a 12-lead ECG without hurting clinical diagnosis. This is demonstrated by empirical experiments showing increased performance of both clinicians and state-of-the-art deep-learning models to identify ECG abnormalities using the reconstructed data.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1. Examples of reconstructed leads. Blue: real signal. Red: reconstructed signal by Koopman framework.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+
# 2. Related Work
|
| 29 |
+
|
| 30 |
+
12-Lead ECG Reconstruction The first attempt to reconstruct 12-lead ECG from a subset of leads was introduced by (Frank, 1956). Later, classical machine learning methods were proposed using simple linear regression techniques (Scherer et al., 1989; Nelwan, 2005). An early method which used neural networks for the purposes of lead reconstruction is presented in (Atoui et al., 2004). More recent methods based on CNNs (Zhou et al., 2019) and LSTMs (Zhang & Frick, 2019) have successfully reconstructed 9-lead ECG from the 3-lead ECG. All prior works assume that specific indices of leads are recorded cleanly, and attempt to reconstruct the remaining leads. For example, it might be assumed that leads V1 and V2 are clean, and the remaining 10 leads require reconstruction. However, each 12-lead ECG recording coming from a wearable device might have a different set of leads that are cleanly recorded. Therefore, a model which expects a specific subset of leads might fail to reconstruct the full 12-lead ECG from such devices. By contrast, our framework is able to reconstruct 12-lead ECG from any subset of available leads, without training a new model for each subset.
|
| 31 |
+
|
| 32 |
+
Learning ECG Dynamics of a Single Lead Formulating the dynamics as a system of differential equations often admits compact and efficient representations for many natural systems (Brunton et al., 2016). This holds true in the case of single-lead ECG signals, one-dimensional signals of voltage values representing the electrical activity of the heart through time. The ECG signal is a periodic signal of cardiac muscle depolarization followed by repolarization, with each period corresponding to a single heartbeat. An ECG heartbeat follows a prototypical pattern of a P wave, followed by a QRS complex, and finally a T wave. To capture this pattern, (McSharry et al., 2003) proposed a physics-based model of ECG dynamics consisting of a system of three coupled ordinary differential equations (ODE), parameterized by specific heart rate statistics, such as the frequency-domain characteristics of the heart rate variability (Malik & Camm, 1990). While this model is able to generate synthetic ECG signals with somewhat realistic PQRST morphology as well as prescribed heart rate dynamics, it has
|
| 33 |
+
|
| 34 |
+
limited expressiveness. A more recent work (Golany et al., 2020) introduced a GAN-based setup enriched with additional knowledge from this physics-based ECG model, and showed that using the synthetically generated ECG heartbeats from the GAN significantly improved ECG heartbeat classification. Others (Golany et al., 2021) attempted to learn a new set of ODEs from data rather than relying on predefined set of ODEs to represent the dynamics of a single ECG heartbeat. This prior work that learns data-driven ECG Dynamics attempts to capture the dynamics of a single ECG heartbeat within a single lead. By contrast, we focus on the dynamics of an entire ECG signal, consisting of multiple heartbeats, with all 12 leads. The data and the corresponding modelling problem are concomitantly more complex.
|
| 35 |
+
|
| 36 |
+
Koopman Theory The original Koopman theory was introduced nearly one hundred years ago (Koopman, 1931; Koopman & Neumann, 1932). Renewed interest in Koopman analysis has been driven by a combination of theoretical advances (Mezić & Banaszuk, 2004) (Mezić, 2005) (Budišić et al., 2012) (Mezić, 2013), improved numerical methods such as dynamic mode decomposition (Schmid, 2010) (Rowley et al., 2009), and an increasing abundance of data. Recently, (Lusch et al., 2018) utilized the power of deep learning for flexible and general representations of the Koopman framework, while enforcing a network structure that promotes parsimony and interpretability of the resulting models. Although it was applied on small scale toy problems, such as pendulum motion prediction (Erichson et al., 2019; Pan & Duraisamy, 2020), to the best of our knowledge, it was yet to be applied in a large-scale machine learning application.
|
| 37 |
+
|
| 38 |
+
# 3. Koopman-Based ECG Reconstruction
|
| 39 |
+
|
| 40 |
+
# 3.1. Koopman Theory of Dynamical Systems
|
| 41 |
+
|
| 42 |
+
Throughout this paper, we will consider discrete-time dynamical systems of the form
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
x _ {t + 1} = F \left(x _ {t}\right) \tag {1}
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
where $x_{t} \in \mathcal{X} \equiv \mathbb{R}^{L}$ is the state of the dynamical system and $F$ represents the nonlinear transformation (the dynamics) which maps the state of the system to its future state. Note that this formulation subsumes discretizations of ordinary differential equations (ODEs). That is, suppose that the underlying continuous signal is given by $\mathbf{x}(\tau)$ for $\tau \in [0,\bar{\tau}]$ ; and the dynamics is described by the ODE $d\mathbf{x} / d\tau = f(\mathbf{x})$ . Then the signal may be discretized as $x_{t} = \mathbf{x}(t\Delta)$ for $t = 0,\dots,T$ with $\Delta = \bar{\tau} /T$ , and the dynamics approximated as $x_{t + 1} \approx x_{t} + f(x_{t})\Delta \equiv F(x_{t})$ . The approximation becomes increasingly exact as $\Delta$ gets smaller.
|
| 49 |
+
|
| 50 |
+
(Koopman, 1931) offers a different and useful viewpoint for examining dynamical systems. In particular, rather than consider the state space $x$ , Koopman considers the space of possible measurements on $x$ . A measurement on $x$ is defined as a scalar-valued function on the state space $\mathcal{X}$ , that is
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
y: \mathcal {X} \rightarrow \mathbb {R} \tag {2}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
The space of all measurements is denoted as $\mathcal{V}$ , which is an infinite-dimensional space. For a dynamical system of the form in Equation (1) given by dynamics $F$ , we define the corresponding Koopman operator which maps from measurements to measurements, $\mathcal{K}:\mathcal{V}\to \mathcal{V}$ by
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathcal {K} y \equiv y \circ F \tag {3}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\circ$ indicates function composition. (Note that $y \circ F$ is indeed a measurement, as it maps $\mathcal{X}$ to $\mathbb{R}$ .) In this case, the dynamical system of Equation (1) can be rewritten as
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
y \left(x _ {t + 1}\right) = y \left(F \left(x _ {t}\right)\right) = y \circ F \left(x _ {t}\right)
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
= (\mathcal {K} y) (x _ {t}) \tag {4}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
Thus, if a measurement $y$ evolves forward with the operator $\mathcal{K}$ , then it satisfies the "pullback" property given in Equation (4). However, what makes the formulation most interesting is the fact that the Koopman operator $\mathcal{K}$ is linear. This fact is easily shown:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array}{l} \mathcal {K} \left(\alpha_ {1} y _ {1} + \alpha_ {2} y _ {2}\right) = \left(\alpha_ {1} y _ {1} + \alpha_ {2} y _ {2}\right) \circ F \\ = \alpha_ {1} y _ {1} \circ F + \alpha_ {2} y _ {2} \circ F \\ = \alpha_ {1} \mathcal {K} y _ {1} + \alpha_ {2} \mathcal {K} y _ {2} \\ \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
The linearity of the Koopman operator is crucial to the development of our method, as we shall see in Section 3.3.
|
| 79 |
+
|
| 80 |
+
# 3.2. Learning a Koopman Representation for ECG Dynamics
|
| 81 |
+
|
| 82 |
+
In this section, we adapt the Koopman framework to learn the dynamics of 12-lead ECG signals. We begin by describing two necessary modifications to the Koopman theory, after which we show how to learn the dynamical system.
|
| 83 |
+
|
| 84 |
+
We begin with some notation. The number of ECG leads is denoted as $L = 12$ . The standard 12-lead electrocardiogram is a representation of the heart's electrical activity recorded from electrodes on the body surface, sampled at a fixed frequency. The $\ell^{th}$ lead sampled at time $t$ is denoted by $x_{t}^{\ell}$ ; all $L$ leads taken together at time $t$ are denoted $x_{t} = [x_{t}^{1},\ldots ,x_{t}^{L}] \in \mathbb{R}^{L}$ , taken to be a column vector.
|
| 85 |
+
|
| 86 |
+
Finite-Dimensional Approximation The first modification we must make to the standard Koopman theory concerns dimensionality. The space $\mathcal{V}$ of measurements is infinite-dimensional and the Koopman operator $\kappa$ is likewise an infinite-dimensional operator. For computational
|
| 87 |
+
|
| 88 |
+
purposes, we approximate the entire Koopman framework by mapping in into a finite-dimensional setting. In particular, suppose that
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\Gamma : \mathbb {R} ^ {D} \rightarrow \mathcal {Y} \tag {5}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
maps a finite-dimensional space to the space of measurements. (For concreteness, the reader may imagine mapping the coefficients of a basis expansion to the function $y$ itself, though we will not use this representation.) In this case, we will approximate the Koopman operator $\mathcal{K}$ by
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathcal {K} = \Gamma K \Gamma^ {- 1} \tag {6}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $K$ is a $D\times D$ matrix.
|
| 101 |
+
|
| 102 |
+
In this case, we can rewrite the dynamical system in Equation (4) as
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\begin{array}{l} y \left(x _ {t + 1}\right) = \Gamma K \Gamma^ {- 1} y \left(x _ {t}\right) \\ \Rightarrow \Gamma^ {- 1} y \left(x _ {t + 1}\right) = K \Gamma^ {- 1} y \left(x _ {t}\right) \tag {7} \\ \end{array}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Now, letting $\Phi = \Gamma^{-1}y$ so that $\Phi :\mathbb{R}^L\to \mathbb{R}^D$ , we have that
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
x _ {t + 1} = \Phi^ {- 1} (K \Phi (x _ {t})) \tag {8}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
This modification is standard, and follows the practice of prior works, e.g. (Lusch et al., 2018). We refer to $\Phi$ as the Koopman embedding.
|
| 115 |
+
|
| 116 |
+
Note that we use $K$ rather than $\kappa$ to emphasize this move to a finite-dimensional framework, but we abuse notation slightly by continuing to use the symbol $y$ to represent its finite-dimensional version, i.e.
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
y = \Phi (x) \tag {9}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
In this case Equation (8) may be rewritten as
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
y _ {t} = \Phi (x _ {t})
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
y _ {t + 1} = K y _ {t} \tag {10}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
x _ {t + 1} = \Phi^ {- 1} \left(y _ {t + 1}\right)
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
which illustrates the fact that in the embedding space, the dynamics are linear.
|
| 137 |
+
|
| 138 |
+
Separable Koopman Embedding We make a second modification to the standard Koopman theory, which is necessary for our reconstruction algorithm. We assume that the Koopman embedding is separable: that is, each lead has its own separate embedding. More specifically, we map the $\ell^{th}$ lead $x_{t}^{\ell}$ to its corresponding embedding $y_{t}^{\ell}$ as follows:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
y _ {t} ^ {\ell} = \phi_ {\ell} \left(x _ {t} ^ {\ell}\right) \tag {11}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
where $\phi_{\ell}:\mathbb{R}\to \mathbb{R}^{D / L}$ . The overall Koopman embedding $\Phi$ is then derived by concatenating the per-lead embeddings:
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
y _ {t} = \left[ y _ {t} ^ {1}, \dots , y _ {t} ^ {L} \right] \in \mathbb {R} ^ {D} \tag {12}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
so that
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\Phi \left(x _ {t}\right) = \left[ \phi_ {1} \left(x _ {t} ^ {1}\right), \dots , \phi_ {L} \left(x _ {t} ^ {L}\right) \right] \tag {13}
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
The importance of separability to the reconstruction algorithm will become clear in Section 3.3. We note that separability is not guaranteed by the Koopman theory; nevertheless, there is nothing which prevents us from imposing it as a constraint during our learning procedure. In spite of this lack of theoretical guarantees, we show empirically in Section 5 that separability does not impair the learning of an accurate dynamical system. In this context, we also note that due to the separable structure, all of the coupling between the leads is encapsulated by the matrix $K$ .
|
| 157 |
+
|
| 158 |
+
Learning the Dynamical System Given the above Koopman framework, learning the dynamical system entails learning two things: the Koopman embedding $\Phi$ , and the Koopman operator $K$ . A variety of methods have been proposed for learning the Koopman framework based on neural networks (Wehmeyer & Noé, 2018; Mardt et al., 2018; Takeishi et al., 2017; Yeung et al., 2019). We choose to follow the technique of (Lusch et al., 2018) and outline this method briefly.
|
| 159 |
+
|
| 160 |
+
A multilayer perceptron (MLP) specifies the Koopman embedding $\Phi$ ; in our case, we impose the separable structure on the embedding, so that the network's structure is tantamount to $L$ separate MLPs $\{\phi_{\ell}\}_{\ell=1}^{L}$ . An additional MLP is learned to represent the inverse transformation $\Phi^{-1}$ , which is again tantamount to learning $L$ separate MLPs $\{\phi_{\ell}^{-1}\}_{\ell=1}^{L}$ . The Koopman operator is simply a $D \times D$ matrix $K$ . To learn the networks $\Phi$ and $\Phi^{-1}$ and matrix $K$ , three separate losses are used:
|
| 161 |
+
|
| 162 |
+
(1) Reconstruction: $\| x_{t} - \Phi^{-1}(\Phi (x_{t}))\|$
|
| 163 |
+
(2) Linear Dynamics: $\| \Phi (x_{t + m}) - K^m\Phi (x_t)\|$ , $m\geq 1$
|
| 164 |
+
(3) State Prediction: $\| x_{t + m} - \Phi^{-1}(K^m\Phi (x_t))\|$ , $m\geq 1$ . Further details, including values of $m$ to use, are described in (Lusch et al., 2018).
|
| 165 |
+
|
| 166 |
+
We note that in practice, we have found that learning a single per-lead embedding $\phi$ which is the same for all leads is sufficient, i.e. $\phi_{\ell} = \phi$ for all $\ell$ . However, this is not necessary for the reconstruction algorithm described next, so we leave the derivation there in the general setting.
|
| 167 |
+
|
| 168 |
+
# 3.3. Reconstruction of Missing Leads
|
| 169 |
+
|
| 170 |
+
We now turn to our main goal: the reconstruction of corrupted 12-lead ECG signals. As we have already outlined, the corruption may be due to either missing leads or noisy values, a frequent scenario when measuring ECG from wearable sensors such as Holter monitoring (DiMarco & Philbrick, 1990) and ECG patches (Steinhubl et al., 2018). The reconstruction will rely on the Koopman-based dynamical system we have learned.
|
| 171 |
+
|
| 172 |
+
Setup The set of missing leads is denoted $\mathcal{M} \subset \{1, \ldots, L\}$ ; our goal is therefore to reconstruct $\{x_t^\ell\}_{t=0}^T$ for each missing lead $\ell \in \mathcal{M}$ . The set of available leads is just the complement of the set of missing leads $\mathcal{A} = \{1, \ldots, L\} - \mathcal{M}$ , which has corresponding indicator vector
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
a _ {\ell} = \left\{ \begin{array}{l l} 1 & \ell \in \mathcal {A} \\ 0 & \ell \notin \mathcal {A} \end{array} \right. \tag {14}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
Step 1: Mapping Available Leads to their Koopman Embeddings We begin by mapping the available leads to their corresponding Koopman embeddings. The available leads are given by $\{\bar{x}_t^\ell\}_{t=0}^T$ for each $\ell \in \mathcal{A}$ ; we therefore let
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\bar {y} _ {t} ^ {\ell} = \left\{ \begin{array}{l l} \phi_ {\ell} \left(\bar {x} _ {t} ^ {\ell}\right) & \ell \in \mathcal {A} \\ 0 & \ell \notin \mathcal {A} \end{array} \right. \tag {15}
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
Missing values have been filled in with zeros for convenience, so that the overall Koopman embeddings have the correct size, i.e. $\bar{y}_t\in \mathbb{R}^D$ ; however, the missing entries can take on any values, as they will not be used.
|
| 185 |
+
|
| 186 |
+
Step 2: Reconstructing the Missing Leads in Embedding Space Given the available leads' Koopman embeddings, we can now solve for the missing leads by leveraging the fact that the Koopman operator is linear. For convenience, we let
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
A = \operatorname {d i a g} \left(a \otimes \mathbf {1} _ {D / L}\right) \tag {16}
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
where $\otimes$ is the Kronecker product. In this case, we can formulate our leads reconstruction problem as one of solving the following optimization problem:
|
| 193 |
+
|
| 194 |
+
$$
|
| 195 |
+
\begin{array}{l} \min _ {y _ {0}, \dots , y _ {T}} L (y _ {0}, \dots , y _ {T}) = \\ \frac {1}{2} \sum_ {t = 0} ^ {T - 1} \| y _ {t + 1} - K y _ {t} \| ^ {2} + \frac {\lambda}{2} \sum_ {t = 0} ^ {T} \left(y _ {t} - \bar {y} _ {t}\right) ^ {T} A \left(y _ {t} - \bar {y} _ {t}\right) \tag {17} \\ \end{array}
|
| 196 |
+
$$
|
| 197 |
+
|
| 198 |
+
The first term ensures that the dynamical system holds at each time instant; crucially, due to the linearity of the Koopman formulation of the dynamics, this can be formulated nicely as a convex quadratic term. The second term is a data fidelity term for the available leads only: the matrix $A$ picks out only the available leads. $\lambda > 0$ is the weighting factor between the two terms, where a larger $\lambda$ ensures greater consistency to the given leads. In the limit as $\lambda \to \infty$ , we have a hard constraint.
|
| 199 |
+
|
| 200 |
+
Due to the fact that $L$ is convex, we can solve for the globally optimal values of $y$ . Furthermore, $L$ is quadratic, giving us an explicit solution. Specifically, let
|
| 201 |
+
|
| 202 |
+
$$
|
| 203 |
+
C = K ^ {T} K + I + \lambda A; \tag {18}
|
| 204 |
+
$$
|
| 205 |
+
|
| 206 |
+
then the solution is given by
|
| 207 |
+
|
| 208 |
+
$$
|
| 209 |
+
\begin{array}{l} - K ^ {T} y _ {t + 1} + (C - I) y _ {t} = \lambda A \bar {y} _ {t} \quad t = 1 \\ - K ^ {T} y _ {t + 1} + C y _ {t} - K y _ {t - 1} = \lambda A \bar {y} _ {t} \quad t \in [ 2, T - 1 ] \\ \end{array}
|
| 210 |
+
$$
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
\left(C - K ^ {T} K\right) y _ {t} - K y _ {t - 1} = \lambda A \bar {y} _ {t} \quad t = T \tag {19}
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
The above is a system of linear equations, and furthermore is quite sparse. As a result, the solution can be achieved efficiently using standard methods. In this work we leverage least squares method (Levenberg, 1944) to solve these equations.
|
| 217 |
+
|
| 218 |
+
Step 3: Mapping the Missing Leads Back to Signal Space Finally, given the optimal values $y_{t}^{\ell}$ from the solution to Equation (19), we can map back to signal space. This is achieved by applying the inverse of the separable Koopman embedding function:
|
| 219 |
+
|
| 220 |
+
$$
|
| 221 |
+
x _ {t} ^ {\ell} = \phi_ {\ell} ^ {- 1} \left(y _ {t} ^ {\ell}\right) \quad \text {f o r} \ell \in \mathcal {M} \tag {20}
|
| 222 |
+
$$
|
| 223 |
+
|
| 224 |
+
This yields the final reconstruction of the missing ECG leads. We note in passing that it is also possible to compute a reconstruction of the ECG signals for the available leads $\ell \in \mathcal{A}$ ; if the data fidelity weight $\lambda \rightarrow \infty$ , it is straightforward to show that these will precisely replicate the data, i.e. $x_{t}^{\ell} = \bar{x}_{t}^{\ell}$ for all $t$ and $\ell \in \mathcal{A}$ .
|
| 225 |
+
|
| 226 |
+
Comparison with Seq2Seq We draw the reader's attention to a key distinction between our method and the commonly used seq2seq-style techniques for signal reconstruction applied for ECG reconstruction (Zhou et al., 2019). The seq2seq techniques require learning a separate model from each different subset of available leads; by contrast, the methodology presented learns a single model, which can be easily applied with equal ease to any subset. More specifically, in the seq2seq setting, learning to map from lead 1 to lead 2 is different from lead 1 to lead 3, or leads 1 and 7 to the rest. In our formulation, they may all be reconstructed directly from the ECG signal's master dynamical system.
|
| 227 |
+
|
| 228 |
+
# 4. Experimental Framework
|
| 229 |
+
|
| 230 |
+
# 4.1. ECG Dataset
|
| 231 |
+
|
| 232 |
+
The Georgia 12-lead ECG dataset, referred to as G12EC, was introduced in the 12-lead ECG Physionet Challenge 2020 (Alday et al., 2020) and is considered one of the largest public 12-lead ECG datasets. It represents a large population from the southeastern United States and contains 10,344 12-lead ECGs (male: 5,551, female: 4,793). Each ECG signal is 10 seconds in length with a sampling frequency of $500\mathrm{Hz}$ , yielding a total of 5,000 time samples per signal.
|
| 233 |
+
|
| 234 |
+
Each 12-lead ECG exam is annotated with 27 diagnoses. These 27 classes represent relatively common diagnoses which are of clinical interest, with the potential to be recognizable from ECG recordings. Note that the classes are
|
| 235 |
+
|
| 236 |
+
not mutually exclusive: each 12-lead ECG exam may hold multiple diagnoses. In our experiments we focus on the following six common types of diagnosis: AF - Atrial fibrillation; TAb - T wave abnormal; QAb - Q wave abnormal; VPB - Ventricular premature beats; LAD - Left axis deviation, and SA - Sinus arrhythmia. Our dataset is divided as follows: the train set contains 8,233 ECG signals, while the test set contains the remaining 2,059 signals.
|
| 237 |
+
|
| 238 |
+
# 4.2. Baselines
|
| 239 |
+
|
| 240 |
+
We compared our reconstruction model with the state-of-the-art (SOTA) model for 12-lead reconstruction. (Zhou et al., 2019) proposed a seq2seq approach using a CNN-based model for reconstruction of short 12-lead ECG segments from a 3-lead ECGs. We extend this approach and build a model for each $n$ available leads. That is, given $n$ leads the model reconstructs the 12-lead ECG. Note that the model receives any $n$ leads and reconstructs the missing $k$ leads.
|
| 241 |
+
|
| 242 |
+
# 4.3. Experimental Setup
|
| 243 |
+
|
| 244 |
+
We train the baselines and our model (Section 3) on the training set of G12EC. To mimic a partial 12-lead ECG reading (as often occurs in a home setting when using a wearable), we remove $k \in \{1,4,8,11\}$ random leads from each 12-lead ECG recording in the test-set. Each test instance represents a random subsample of $12 - k$ leads. For example, for $k = 4$ we might remove leads 1,2,3, and 4 from one recording, leads 4,7,9 and 11 from another. The resulting test-set contains ECG signals of shape $\mathbb{R}^{T \times n}$ , where $n = 12 - k$ is the number of leads left in each signal. On the resulting test-set we apply the baselines and solve the system of linear equations described in Section 3 to reconstruct the missing leads.
|
| 245 |
+
|
| 246 |
+
We perform experiments showing the performance of reconstruction via two types of experiments:
|
| 247 |
+
|
| 248 |
+
1. Reconstruction Error: Measuring the distance between the reconstructed lead and the corresponding ground truth lead (Section 5.1).
|
| 249 |
+
|
| 250 |
+
2. Classification Accuracy: Measuring clinical diagnosis based on the reconstructed leads.
|
| 251 |
+
|
| 252 |
+
- We perform a small clinical experiment with clinicians (Section 5.3). They received 52 12-lead ECG reading from the test (where $k$ leads are reconstructed) and are asked to make a diagnosis. This diagnosis is compared to the ground truth diagnosis.
|
| 253 |
+
To perform a larger experiment, we leverage the state-of-the-art machine-learning model for 12-lead ECG classification (Attia et al., 2019; Ribeiro et al., 2020) and measure its performance on reconstructed leads (Section 5.2). The model is trained on G12EC training
|
| 254 |
+
|
| 255 |
+
set, and we report its performance over the test set, where each test set contains reconstructed leads. We compare the classifier diagnosis with the ground-truth diagnosis. We next describe the architecture of the machine-learning model (Section 4.4).
|
| 256 |
+
|
| 257 |
+
# 4.4. Classification Network Details
|
| 258 |
+
|
| 259 |
+
Recently (Ribeiro et al., 2020) and (Attia et al., 2019) showed superior results for classification of ECG abnormalities from 12-lead ECG signals. They trained a Residual Neural Network (He et al., 2016) based architecture. We follow this practice and use in our experiments a Residual Neural Network model. The input to the model is a 10 seconds 12-lead ECG signal sampled at $500\mathrm{Hz}$ . That is, input of shape $\mathbb{R}^{5000\times 12}$ , where the first dimension represents the temporal dimension and the second dimension represents the spatial dimension. The network consists of a convolution layer, followed by a max pooling layer, followed by six residual blocks. Each residual block consists of 3 convolution layers, and between each convolution layer, Batch-normalization and Relu activation are performed. A skip connection is applied between the input of the block to the output of the third convolution layer. The output of the last residual block is fed into a global average pooling layer, followed by a dense layer. Since multiple abnormalities may occur in the same 12-lead ECG signal (classes are not mutually exclusive), the last activation function we use is a Sigmoid function which gives a separate probability score for each predicted abnormal class. The first convolution layer has 16 filters of size $7\times 7$ . The residual blocks start with 16 filters and are increased to 32 filters in the last block. The size of the kernel in the residual blocks starts in $5\times 5$ , and decreases to $3\times 3$ . In all the residual blocks, except the first one, the first convolution layer down-samples the input temporal dimension by a stride of 2. The neural network weights were initialized as in (He et al., 2016), and the bias was initialized with zeros. The network was trained by feeding 12-lead ECG batches of size 128 from the training data. The binary cross-entropy loss was minimized using Adam Optimizer with initial learning rate 0.0001. The training ran for 100 epochs, with the final model being the one with the best accuracy on the validation set.
|
| 260 |
+
|
| 261 |
+
# 5. Experimental Results
|
| 262 |
+
|
| 263 |
+
# 5.1. Leads Reconstruction Performance
|
| 264 |
+
|
| 265 |
+
We first present the results of Koopman-based ECG reconstruction. We measure the distance of the reconstructed 12-lead ECG signal $\hat{x}_t^\ell$ to the ground truth signal $x_{t}^{\ell}$ . We report our results by the Mean Absolute Deviation (MAD) error function:
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\mathrm {M A D} = \frac {1}{| \mathcal {M} | T} \sum_ {\ell \in \mathcal {M}} \sum_ {t} \left| x _ {t} ^ {\ell} - x _ {t} ^ {\ell} \right| \tag {21}
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
Table 1. Evaluation of the SOTA ECG Classifier (Section 4) on reconstructed 12-lead ECG testset. Results are shown for different number of reconstructed leads both for Koopman-reconstruction and baseline-reconstruction.
|
| 272 |
+
|
| 273 |
+
<table><tr><td rowspan="2"></td><td colspan="8">KOOPMAN BASED RECONSTRUCTION</td><td colspan="7">BASELINE (ZHOU ET AL., 2019)</td></tr><tr><td colspan="4">RECALL (SENSITIVITY)</td><td colspan="4">SPECIFICITY</td><td colspan="3">RECALL (SENSITIVITY)</td><td colspan="3">SPECIFICITY</td><td></td></tr><tr><td>ABNORMAL CLASS</td><td>12-LEAD</td><td>11-LEAD</td><td>8-LEAD</td><td>4-LEAD</td><td>12-LEAD</td><td>11-LEAD</td><td>8-LEAD</td><td>4-LEAD</td><td>11-LEAD</td><td>8-LEAD</td><td>4-LEAD</td><td>11-LEAD</td><td>8-LEAD</td><td>4-LEAD</td><td></td></tr><tr><td>AF</td><td>0.91</td><td>0.91</td><td>0.90</td><td>0.90</td><td>0.85</td><td>0.85</td><td>0.72</td><td>0.80</td><td>0.75</td><td>0.76</td><td>0.79</td><td>0.65</td><td>0.65</td><td>0.62</td><td></td></tr><tr><td>TAB</td><td>0.85</td><td>0.85</td><td>0.83</td><td>0.81</td><td>0.77</td><td>0.77</td><td>0.70</td><td>0.70</td><td>0.60</td><td>0.61</td><td>0.56</td><td>0.60</td><td>0.55</td><td>0.52</td><td></td></tr><tr><td>QAB</td><td>0.85</td><td>0.87</td><td>0.82</td><td>0.78</td><td>0.70</td><td>0.70</td><td>0.66</td><td>0.62</td><td>0.83</td><td>0.73</td><td>0.57</td><td>0.40</td><td>0.52</td><td>0.47</td><td></td></tr><tr><td>VPB</td><td>0.77</td><td>0.76</td><td>0.79</td><td>0.77</td><td>0.56</td><td>0.59</td><td>0.58</td><td>0.67</td><td>0.89</td><td>0.85</td><td>0.81</td><td>0.20</td><td>0.30</td><td>0.37</td><td></td></tr><tr><td>SA</td><td>0.66</td><td>0.68</td><td>0.68</td><td>0.62</td><td>0.56</td><td>0.50</td><td>0.55</td><td>0.56</td><td>0.50</td><td>0.64</td><td>0.46</td><td>0.47</td><td>0.57</td><td>0.40</td><td></td></tr><tr><td>LAD</td><td>0.94</td><td>0.95</td><td>0.88</td><td>0.81</td><td>0.87</td><td>0.90</td><td>0.80</td><td>0.70</td><td>0.62</td><td>0.61</td><td>0.55</td><td>0.50</td><td>0.55</td><td>0.47</td><td></td></tr></table>
|
| 274 |
+
|
| 275 |
+
where $\mathcal{M}$ is the set of missing leads.
|
| 276 |
+
|
| 277 |
+
Table 2 shows the reconstruction results as a function of the number of missing leads. We note, that as expected as the number of missing leads in the corrupted signal increases, the reconstruction error increases for both the baseline the Koopman-based reconstruction. While our Koopman-based method is better in all cases than the baseline, it is considerably better when there are 10 missing leads, i.e. when most of the information is absent.
|
| 278 |
+
|
| 279 |
+
<table><tr><td>MISSED LEADS</td><td>MAD KOOPMAN</td><td>MAD BASELINE</td></tr><tr><td>1</td><td>0.130</td><td>0.134</td></tr><tr><td>4</td><td>0.135</td><td>0.137</td></tr><tr><td>8</td><td>0.138</td><td>0.139</td></tr><tr><td>10</td><td>0.142</td><td>0.196</td></tr></table>
|
| 280 |
+
|
| 281 |
+
# 5.2. ECG Classification using Reconstructed Leads
|
| 282 |
+
|
| 283 |
+
In this section, we compare the performance of the SOTA ECG classifier when applied on 12-lead ECGs where some of the leads are reconstructed. We experiment on several number of reconstructed leads $(k)$ .
|
| 284 |
+
|
| 285 |
+
Comparison to SOTA ECG Reconstruction Figures 2(a)-(f) show the ROC curves of each of the six classified diagnoses (Sec. 4.1). For each diagnosis we compared the results of the 12-lead ECG classifier evaluated on a different reconstructed test-set. The purple curve, the blue curve and the red curve, corresponds to a corrupted test reconstructed via our methods using Koopman operators (Sec. 3.3), with valid 11-leads, 8-leads, and 4-leads respectively. The green, pink, and brown curves in each subfigure correspond to a corrupted test reconstructed by the CNN-based methods of (Zhou et al., 2019), with a valid 11-leads, 8-leads, and 4-leads respectively. Sensitivity and Specificity metrics are also reported in Table 1. Our reconstruction method outperforms the state-of-the-art method with respect to the ROC evaluation metric for each number of corrupted leads and precision-recall points in a statistically significant manner (t-test with p-value $< 0.05$ ). We observe that for all type of diagnosis, our method is better than the CNN-based recon
|
| 286 |
+
|
| 287 |
+
struction. This emphasizes the ability of our method to learn to reconstruct any subset of ECG leads to 12-lead ECG.
|
| 288 |
+
|
| 289 |
+
Comparison to Complete 12-Lead ECG We notice that when comparing to the gold standard - classification using 12-Lead ECG with no missing leads - we see a very small loss in performance. This indicates that ECG classifiers can be considered for automated classification of ECGs from devices with smaller amount of leads than 12 leads, reconstructed using our method and yet reaching similar performance of full 12-lead devices.
|
| 290 |
+
|
| 291 |
+
# 5.3. Clinician's Diagnosis Performance using Reconstructed Leads
|
| 292 |
+
|
| 293 |
+
We perform a small clinical experiment. We choose to focus on the T wave abnormality (TAb), as abnormalities of this form are associated with several life-threatening diseases. The electrocardiographic T wave represents ventricular repolarization and are usually hard to identify without the V1 and L leads. We randomly selected 52 ECGs from the test set where $38\%$ had an abnormal T wave. We mimic a situation where the V1 and L leads are corrupted. For each example, we showed the cardiologist the 10 non-corrupted leads and asked to make a diagnosis of whether the patient exhibits TAb. We then showed the additional 2 leads (the V1 and L leads) which were reconstructed using our Koopman framework and asked the cardiologist to make the diagnosis again. Table 3 summarizes the results. Our methodology enabled the cardiologist to identify all of the patients with TAb abnormalities. Notice that without the reconstructed leads, only by observing the non-corrupted leads, the cardiologist identified only $60\%$ of the patients with TAb. We observe a loss in precision (though marginal compared to the recall improvement) and points to the fact that additional
|
| 294 |
+
|
| 295 |
+
Table 2. Mean Absolute Deviation (MAD) error between the reconstructed ECG leads and the ground truth. In Bold are statistically significant results. Lower numbers indicate better reconstruction.
|
| 296 |
+
|
| 297 |
+
<table><tr><td></td><td>Recall</td><td>Precision</td><td>F1</td></tr><tr><td>Cardiologist using 10 leads</td><td>0.6</td><td>0.75</td><td>0.67</td></tr><tr><td>Cardiologist using 10 leads + Koopman-reconstructed 2 leads</td><td>1.0</td><td>0.63</td><td>0.77</td></tr></table>
|
| 298 |
+
|
| 299 |
+
Table 3. Clinical experiment results for the TAb abnormality. Each line presents the diagnosis accuracy of the clinician. The first represents the performance results given no reconstructed leads whereas the second with reconstructed leads.
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
(a) Atrial fibrillation (AF)
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
(b) T wave abnormal (TAb)
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
(c) Q wave abnormal (QAb)
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
(d) Left axis deviation (LAD)
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
(e) Sinus arrhythmia (SA)
|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
(f) Ventricular premature beats (VPB)
|
| 318 |
+
Figure 2. ROC curves of the 6 diagnosis classes evaluated on the test-set. The orange curve at each subfigure corresponds to the results on the complete 12-lead test-set. The other curves correspond to a corrupted 12-lead test which was reconstructed either by our approach via Koopman operators (Section 3.3) or by the baseline (Zhou et al., 2019).
|
| 319 |
+
|
| 320 |
+
training on using computer-generated ECGs is needed and should be further explored. Overall, the $F_{1}$ score with the reconstruction is considerably higher than without.
|
| 321 |
+
|
| 322 |
+
# 6. Conclusions
|
| 323 |
+
|
| 324 |
+
To reduce the time between cardiac symptoms onset and treatment, wearable ECG sensors were developed to allow for the recording of the full 12-lead ECG signal at home. To rely on such sensors for clinical interpretation, each lead measurement must be well grounded. However, it is enough for one lead not to be well-positioned on the body for the entire lead signal to be corrupt. This has prevented the wider usage of those sensors from home. In this work, we presented a methodology to reconstruct missing or noisy leads using the theory of Koopman Operators. To the best of our knowledge, this is one of the first applications of this theory for a large-scale machine-learning real-life application. We learn the dynamical system describing the evolution of the 12 individual signals together in time. Koopman theory
|
| 325 |
+
|
| 326 |
+
allows us a linear structure: the signal of interest can be embedded in a high-dimensional space in which the operator which propagates from one time instant to the next is linear. Learning the dynamical system is therefore equivalent to learning both the mapping to this embedding space, as well as the corresponding linear operator and then solving a least squares system in the embedding space. An additional key benefit of this system is its ability to reconstruct any number of corrupted leads without the need to retrain a machine learning model. We empirically show that our reconstruction error is rather small and that classifiers trained on 12-leads ECGs perform well in the presence of reconstructed leads. A small-scale clinical experiment shows the value of presenting the reconstructed leads to a clinician during diagnosis. The results are staggering – the recall of a severe abnormality rises from $60\%$ to $100\%$ with a tolerable number of false positives. For future work, we plan to expand the clinical trial and to better understand how to best present the reconstructed leads to humans for better benefit of diagnosis.
|
| 327 |
+
|
| 328 |
+
# References
|
| 329 |
+
|
| 330 |
+
Alday, E. A. P., Gu, A., Shah, A. J., Robichaux, C., Wong, A.-K. I., Liu, C., Liu, F., Rad, A. B., Elola, A., Seyedi, S., et al. Classification of 12-lead ecg: the physionet/computing in cardiology challenge 2020. Physiological measurement, 41(12):124003, 2020.
|
| 331 |
+
Atoui, H., Fayn, J., and Rubel, P. A neural network approach for patient-specific 12-lead ecg synthesis in patient monitoring environments. In Computers in Cardiology, 2004, pp. 161-164. IEEE, 2004.
|
| 332 |
+
Attia, Z. I., Kapa, S., Lopez-Jimenez, F., McKie, P. M., Ladewig, D. J., Satam, G., Pellikka, P. A., Enriquez-Sarano, M., Noseworthy, P. A., Munger, T. M., et al. Screening for cardiac contractile dysfunction using an artificial intelligence-enabled electrocardiogram. Nature medicine, 25(1):70-74, 2019.
|
| 333 |
+
Brunton, S. L., Proctor, J. L., and Kutz, J. N. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the national academy of sciences, 113(15):3932-3937, 2016.
|
| 334 |
+
Budisic, M., Mohr, R., and Mezić, I. Applied koopmanism. Chaos: An Interdisciplinary Journal of Nonlinear Science, 22(4):047510, 2012.
|
| 335 |
+
DiMarco, J. P. and Philbrick, J. T. Use of ambulatory electrocardiographic (holter) monitoring. Annals of internal medicine, 113(1):53-68, 1990.
|
| 336 |
+
Erichson, N. B., Muehlebach, M., and Mahoney, M. W. Physics-informed autoencoders for lyapunov-stable fluid flow prediction. arXiv preprint arXiv:1905.10866, 2019.
|
| 337 |
+
Frank, E. An accurate, clinically practical system for spatial vectorcardiography. circulation, 13(5):737-749, 1956.
|
| 338 |
+
Golany, T., Freedman, D., and Radinsky, K. SimGANs: Simulator-based generative adversarial networks for ECG synthesis to improve deep ECG classification. In Proceedings of the International Conference on Machine Learning (ICML), 2020.
|
| 339 |
+
Golany, T., Freedman, D., and Radinsky, K. ECG ODEGAN: Learning ordinary differential equations of ECG dynamics via generative adversarial learning. In Proceedings of the AAAI Conference on Artificial Intelligence, 2021.
|
| 340 |
+
He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
|
| 341 |
+
|
| 342 |
+
Koopman, B. and Neumann, J. v. Dynamical systems of continuous spectra. Proceedings of the National Academy of Sciences of the United States of America, 18(3):255, 1932.
|
| 343 |
+
Koopman, B. O. Hamiltonian systems and transformation in hilbert space. Proceedings of the national academy of sciences of the united states of America, 17(5):315, 1931.
|
| 344 |
+
Laguna, P., Thakor, N. V., Caminal, P., Jane, R., Yoon, H.-R., De Luna, A. B., Marti, V., and Guindo, J. New algorithm for qt interval analysis in 24-hour holter ecg: performance and applications. Medical and Biological Engineering and Computing, 28(1):67-73, 1990.
|
| 345 |
+
Levenberg, K. A method for the solution of certain nonlinear problems in least squares. Quarterly of applied mathematics, 2(2):164-168, 1944.
|
| 346 |
+
Lusch, B., Kutz, J. N., and Brunton, S. L. Deep learning for universal linear embeddings of nonlinear dynamics. Nature communications, 9(1):1-10, 2018.
|
| 347 |
+
Malik, M. and Camm, A. J. Heart rate variability. Clinical cardiology, 13(8):570-576, 1990.
|
| 348 |
+
Mardt, A., Pasquali, L., Wu, H., and Noé, F. Vampnets for deep learning of molecular kinetics. Nature communications, 9(1):1-11, 2018.
|
| 349 |
+
Maron, B. J., Friedman, R. A., Kligfield, P., Levine, B. D., Viskin, S., Chaitman, B. R., Okin, P. M., Saul, J. P., Salberg, L., Van Hare, G. F., et al. Assessment of the 12-lead ecg as a screening test for detection of cardiovascular disease in healthy general populations of young people (12–25 years of age) a scientific statement from the american heart association and the american college of cardiology. Circulation, 130(15):1303–1334, 2014.
|
| 350 |
+
McSharry, P. E., Clifford, G. D., Tarassenko, L., and Smith, L. A. A dynamical model for generating synthetic electrocardiogram signals. IEEE transactions on biomedical engineering, 50(3):289-294, 2003.
|
| 351 |
+
Mezić, I. Spectral properties of dynamical systems, model reduction and decompositions. Nonlinear Dynamics, 41 (1):309-325, 2005.
|
| 352 |
+
Mezić, I. Analysis of fluid flows via spectral properties of the koopman operator. Annual Review of Fluid Mechanics, 45:357-378, 2013.
|
| 353 |
+
Mezić, I. and Banaszuk, A. Comparison of systems with complex behavior. Physica D: Nonlinear Phenomena, 197(1-2):101-133, 2004.
|
| 354 |
+
Nelwan, S. Evaluation of 12-Lead Electrocardiogram Reconstruction Methods for Patient Monitoring. PhD thesis, Erasmus University Rotterdam, 2005.
|
| 355 |
+
|
| 356 |
+
Pan, S. and Duraisamy, K. Physics-informed probabilistic learning of linear embeddings of nonlinear dynamics with guaranteed stability. SIAM Journal on Applied Dynamical Systems, 19(1):480-509, 2020.
|
| 357 |
+
Ribeiro, A. H., Ribeiro, M. H., Paixão, G. M., Oliveira, D. M., Gomes, P. R., Canazart, J. A., Ferreira, M. P., Andersson, C. R., Macfarlane, P. W., Meira Jr, W., et al. Automatic diagnosis of the 12-lead ecg using a deep neural network. Nature communications, 11(1):1-9, 2020.
|
| 358 |
+
Roth, G. A., Abate, D., Abate, K. H., Abay, S. M., Abbafati, C., Abbasi, N., Abbastabar, H., Abd-Allah, F., Abdela, J., Abdelalim, A., et al. Global, regional, and national age-sex-specific mortality for 282 causes of death in 195 countries and territories, 1980–2017: a systematic analysis for the global burden of disease study 2017. The Lancet, 392(10159):1736–1788, 2018.
|
| 359 |
+
Rowley, C. W., MEZI?, I., Bagheri, S., Schlatter, P., Henningson, D., et al. Spectral analysis of nonlinear flows. Journal of fluid mechanics, 641(1):115-127, 2009.
|
| 360 |
+
Scherer, J. A., Jenkins, J. M., and Nicklas, J. M. Synthesis of the 12-lead electrocardiogram from a 3-lead subset using patient-specific transformation vectors: an algorithmic approach to computerized signal synthesis. Journal of electrocardiology, 22, 1989.
|
| 361 |
+
Schmid, P. J. Dynamic mode decomposition of numerical and experimental data. Journal of fluid mechanics, 656: 5-28, 2010.
|
| 362 |
+
Steinhubl, S. R., Waalen, J., Edwards, A. M., Ariniello, L. M., Mehta, R. R., Ebner, G. S., Carter, C., Baca-Motes, K., Felicione, E., Sarich, T., et al. Effect of a home-based wearable continuous ecg monitoring patch on detection of undiagnosed atrial fibrillation: the mstops randomized clinical trial. Jama, 320(2):146-155, 2018.
|
| 363 |
+
Takeishi, N., Kawahara, Y., and Yairi, T. Learning koopman invariant subspaces for dynamic mode decomposition. arXiv preprint arXiv:1710.04340, 2017.
|
| 364 |
+
Wehmeyer, C. and Noé, F. Time-lagged autoencoders: Deep learning of slow collective variables for molecular kinetics. The Journal of chemical physics, 148(24):241703, 2018.
|
| 365 |
+
Yeung, E., Kundu, S., and Hodas, N. Learning deep neural network representations for koopman operators of nonlinear dynamical systems. In 2019 American Control Conference (ACC), pp. 4832-4839. IEEE, 2019.
|
| 366 |
+
Zhang, Q. and Frick, K. All-ecg: A least-number of leads ecg monitor for standard 12-lead ecg tracking during motion. In 2019 IEEE Healthcare Innovations and Point of Care Technologies,(HI-POCT), pp. 103-106. IEEE, 2019.
|
| 367 |
+
|
| 368 |
+
Zhou, W., Xing, Y., Liu, N., Movahedipour, M., Zhou, X.-g., et al. A novel method based on convolutional neural networks for deriving standard 12-lead ceg from serial 3-lead ceg. Frontiers of Information Technology & Electronic Engineering, 20(3):405-413, 2019.
|
12leadecgreconstructionviakoopmanoperators/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:28e4093b6bb6ebfcddc5504aae6b43f32bc5ced7d34fb71f5ea6bf4f5b9b57f6
|
| 3 |
+
size 363903
|
12leadecgreconstructionviakoopmanoperators/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e9f20c15e55fb07dc3c21a69fb6c1d01734eaae0bd7aad116055f8250af0d7e
|
| 3 |
+
size 403815
|
1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/c5313d4b-2a3b-434e-8a6a-a07cba185dcd_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d27fd183acdf96301958b78519331544fb0ef05cdb119cfa76d7d2d1b9a1ad4f
|
| 3 |
+
size 89367
|
1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/c5313d4b-2a3b-434e-8a6a-a07cba185dcd_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d89ce40fca562033198b89f6fa8082bc9d980ddfc35715158f1d9d551ac88ba0
|
| 3 |
+
size 115151
|
1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/c5313d4b-2a3b-434e-8a6a-a07cba185dcd_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61fb7e928793645b082058cea74d55448eb5046a90768131d8894e8de1ae2aa6
|
| 3 |
+
size 3028748
|
1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/full.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 1-bit Adam: Communication Efficient Large-Scale Training with Adam's Convergence Speed
|
| 2 |
+
|
| 3 |
+
Hanlin Tang $^{12}$ Shaoduo Gan $^{3}$ Ammar Ahmad Awan $^{1}$ Samyam Rajbhandari $^{1}$ Conglong Li $^{1}$ Xiangru Lian $^{2}$ Ji Liu $^{2}$ Ce Zhang $^{3}$ Yuxiong He $^{1}$
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Scalable training of large models (like BERT and GPT-3) requires careful optimization rooted in model design, architecture, and system capabilities. From a system standpoint, communication has become a major bottleneck, especially on commodity systems with standard TCP interconnects that offer limited network bandwidth. Communication compression is an important technique to reduce training time on such systems. One of the most effective methods is error-compensated compression, which offers robust convergence speed even under 1-bit compression. However, state-of-the-art error compensation techniques only work with basic optimizers like SGD and Momentum SGD, which are linearly dependent on the gradients. They do not work with non-linear gradient-based optimizers like Adam, which offer state-of-the-art convergence efficiency and accuracy for models like BERT. In this paper, we propose 1-bit Adam that reduces the communication volume by up to $5 \times$ , offers much better scalability, and provides the same convergence speed as uncompressed Adam. Our key finding is that Adam's variance (non-linear term) becomes stable during training, hence we can run Adam in the beginning (warmup phase) and use it as a precondition for Momentum SGD during the rest of the training (compression phase). Experiments on up to 256 GPUs show that 1-bit Adam enables up to $3.3 \times$ higher throughput for BERT-Large pre-training and up to $2.9 \times$ higher throughput for SQuAD fine-tuning. In addition, we provide theoretical analysis for our proposed work.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
Modern advancement of machine learning is heavily driven by the advancement of computational power and techniques. Nowadays, it is not unusual to train a single model using hundreds of computational devices such as GPUs. As a result, scaling up training algorithms in the distributed setting has attracted intensive interests over the years. One important direction is communication efficient distributed training, which enhances the scalability of the training system by reducing the communication cost. Example techniques include quantization (Zhang et al., 2017; Wangni et al., 2018), decentralization (Lian et al., 2017; Koloskova* et al., 2020; Li et al., 2018), and asynchronous communication (Zheng et al., 2016; Chaturapruek et al., 2015).
|
| 12 |
+
|
| 13 |
+
One widely used strategy for alleviating the communication overhead is gradient compression. Before communication, the original gradient $\pmb{g}$ will be compressed into $\mathcal{C}_{\omega}[g]$ , where $\mathcal{C}_{\omega}[\cdot]$ is the compress operator<sup>1</sup>. As a result the communication volume could be greatly reduced. However, this gradient compression could slow down the convergence speed because important information might get lost during the compression. To recover this information lost, error-compensated compression strategy was proposed: Instead of compressing the gradient at $t$ -th iteration directly, we would first add back the compression error from the last step and then do the compression. Recent studies (Stich et al., 2018) observed that by using error-compensated compression, the asymptotic convergence speed remains unchanged for SGD even using 1-bit compression.
|
| 14 |
+
|
| 15 |
+
On the other hand, many state-of-the-art models have to be trained using a more complicated variant, Adam (Kingma and Ba, 2014). For example, to train models such as BERT, one has to resort to the Adam optimizer, since training it with vanilla/momentum SGD has been shown to be less effective. Unfortunately, we find that error-compensated compression does not work for Adam, because Adam is non-linearly dependent on the gradient which affects the error compensation mechanism (see Section 3.2 and 4.2 for more details).
|
| 16 |
+
|
| 17 |
+
In this paper, we first analyze the limitation of directly applying existing compression technique to Adam. One of our key findings is that Adam's variance (the non-linear term) becomes stable at early stage of training (Section 3.3). This motivates us to design a new 2-stage algorithm, 1-bit Adam, which uses Adam (warmup stage) to "pre-condition" a communication compressed momentum SGD algorithm (compression stage). We provide theoretical analysis on communication compressed momentum SGD, which is the core component of 1-bit Adam. We design a custom collective primitive using MPI to transfer the $5 \times$ communication volume reduction (achieved by our algorithm) into actual runtime speedup, which is hard to accomplish using existing DL framework libraries. Experiments with BERT-Base, BERT-Large, SQuAD 1.1 and ResNet-18 training tasks on up to 256 GPUs show that 1-bit Adam converges as fast as uncompressed Adam, and runs up to $3.3 \times$ faster than uncompressed algorithms.
|
| 18 |
+
|
| 19 |
+
(Contributions) We make the following contributions:
|
| 20 |
+
|
| 21 |
+
- We propose a new algorithm, 1-bit Adam, a communication efficient momentum SGD algorithm preconditioned with Adam optimizer, which to the best of our knowledge is the first work that apply a preconditioned strategy for compressed momentum SGD. We present theoretical analysis on the convergence of 1-bit Adam, and show that it admits the same asymptotic convergence rate as the uncompressed one.
|
| 22 |
+
- We conduct experiments on large scale ML tasks that are currently challenging for SGD to train. We show that on both BERT pre-training, SQuAD fine-tuning and ResNet-18, 1-bit Adam is able to achieve the same convergence behaviour and final accuracy as Adam, together with up to $5 \times$ less communication volume and $3.3 \times$ faster end-to-end throughput (including the full-precision warmup stage). To our best knowledge, this is the first distributed learning algorithm with communication compression that can train a model as demanding as BERT.
|
| 23 |
+
- We implement a custom collective communication primitive using Message Passing Interface (MPI) to provide a scalable and efficient communication system for 1-bit Adam.
|
| 24 |
+
- The 1-bit Adam optimizer and the communication primitive backend have been open sourced in a deep learning optimization library called DeepSpeed $^2$ .
|
| 25 |
+
|
| 26 |
+
# 2. Related Work
|
| 27 |
+
|
| 28 |
+
Communication-efficient distributed learning: To further reduce the communication overhead, one promising
|
| 29 |
+
|
| 30 |
+
direction is to compress the variables that are sent between different workers (Yu et al., 2019; Ivkin et al., 2019). Previous work has applied a range of techniques such as quantization, sparsification, and sketching (Alistarh et al., 2017; Agarwal et al., 2018; Spring et al., 2019; Ye and Abbe, 2018; Shi et al., 2021). The compression is mostly assumed to be unbiased (Wangni et al., 2018; Shen et al., 2018; Zhang et al., 2017; Wen et al., 2017; Jiang and Agrawal, 2018). A general theoretical analysis of centralized compressed parallel SGD can be found in Alistarh et al. (2017). Beyond this, some biased compressing methods are also proposed and proven to be quite efficient in reducing the communication cost. One example is the 1-bit SGD (Seide et al., 2014), which compresses the entries in gradient vector into $\pm 1$ depends on its sign. The theoretical guarantee of this method is given in Bernstein et al. (2018).
|
| 31 |
+
|
| 32 |
+
Error-compensated compression: The idea of using error compensation for compression is proposed in Seide et al. (2014), where they find that by using error compensation the training could still achieve a very good speed even using 1-bit compression. Recent study indicates that this strategy admits the same asymptotic convergence rate as the uncompressed one (Stich et al., 2018), which means that the influence of compression is trivial. More importantly, by using error compensation, it has been proved that we can use almost any compression methods (Stich et al., 2018), whereas naive compression could only converge when the compression is unbiased (the expectation of the compressed tensor is the same as the original). This method can be combined with decentralized training (Vogels et al., 2020), local SGD (Xie et al., 2020), accelerated algorithms (Gorbunov et al., 2020). Due to the promising efficiency of this method, error compensation has been applied into many related area (Zheng et al., 2019; Phuong and Phong, 2020; Yu et al., 2019; Shi et al., 2019; Ivkin et al., 2019; Sun et al., 2019; Basu et al., 2019; Vogels et al., 2019) in order to reduce the communication cost.
|
| 33 |
+
|
| 34 |
+
Adam: Adam (Kingma and Ba, 2015) has shown promising speed for many deep learning tasks, and also admits a very good robustness to the choice of the hyper-parameters, such as learning rate. It can be viewed as an adaptive method that scales the learning rate with the magnitude of the gradients on each coordinate when running SGD. Beyond Adam, many other strategies that share the same idea of changing learning rate dynamically was studied. For example, Duchi et al. (2011) (Adagrad) and (Tieleman and Hinton, 2011) (RMSprop), use the gradient, instead of momentum, for updating the parameters; Adadelta (Zeiler, 2012) changes the variance term of Adam into a non-decreasing updating rule; Luo et al. (2019) proposed AdaBound that gives both upper bound and lower bound for the variance term. In Alacaoglu et al. (2020); Liu et al. (2020) authors
|
| 35 |
+
|
| 36 |
+
develop a novel analysis for the convergence rate of Adam.
|
| 37 |
+
|
| 38 |
+
# 3. Motivation and Insights
|
| 39 |
+
|
| 40 |
+
# 3.1. Communication overhead affects the efficiency of distributed training
|
| 41 |
+
|
| 42 |
+
To demonstrate the opportunity for communication compression, we conduct performance profiling experiments that measures the impact of communication time with respect to the total training time per step. Here we use BERT-Large pre-training task as an example (sequence length 128, detailed training parameters can be found at Section 7.1), since BERT and transformer models in general are the state-of-the-art approaches in natural language processing and many other areas. We evaluate two different kinds of clusters: the first cluster has 4 NVIDIA Tesla V100 GPUs per node, and different nodes are connected by 40 Gigabit Ethernet (effective bandwidth is 4.1 Gbps based oniperf benchmark); the second cluster has 8 V100 GPUs per node, and different nodes are connected by 100 Gigabit InfiniBand EDR (effective bandwidth is close to theoretical peak based on microbenchmark). We perform BERT-Large pre-training using the two clusters with different number of nodes and GPUs, batch sizes, and gradient accumulation steps. And we measure the average latency of forward, backward (allreduce and everything else), and step function calls. Table 1 presents the profiling results.
|
| 43 |
+
|
| 44 |
+
Results show that allreduce communication contributes to a great portion of the training time per step, up to $94\%$ and $75\%$ for our experiments on two different kinds of internode networks. As expected, communication overhead is proportionally larger when the number of nodes is larger, when the batch size/gradient accumulation step is smaller, and when the network bandwidth is lower. These are the situations where communication compression could provide the most benefit.
|
| 45 |
+
|
| 46 |
+
# 3.2. Basic compression affects Adam's convergence
|
| 47 |
+
|
| 48 |
+
Given the great opportunity for communication compression, we investigate whether existing error-compensated gradient compression strategy can be applied to Adam, an important optimization algorithm for large model distributed training. We implement a basic compression strategy for Adam based on the compression-based SGD approach (Stich et al., 2018), where we perform error-compensated 1-bit compression over the gradient, and update both the momentum and variance based on the compressed gradient. We compare the BERT-Large pre-training (sequence length 128) training loss when using vanilla Adam and Adam with our basic compression strategy in Figure 1.
|
| 49 |
+
|
| 50 |
+
Results show that basic compression based on existing work
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
Figure 1. Training loss for BERT-Large pre-training using vanilla Adam and Adam with error compensated gradient compression.
|
| 54 |
+
|
| 55 |
+
greatly affects the convergence speed for Adam. The main reason is that Adam is non-linearly dependent to the gradients (see Section 4.2 for more details). This motivates us to look for novel compression strategy that overcomes the non-linear gradient dependency challenge, and at the same time achieves the same convergence speed as Adam.
|
| 56 |
+
|
| 57 |
+
# 3.3. Adam's variance becomes stable during training
|
| 58 |
+
|
| 59 |
+
Unlike SGD, which directly uses the gradient $\pmb{g}$ to update the model $\pmb{x}$ , Adam uses two auxiliary variables $m$ and $v$ for the update. The mathematical updating rule of original Adam can be summarized as:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\boldsymbol {m} _ {t + 1} = \beta_ {1} \boldsymbol {m} _ {t} + (1 - \beta_ {1}) \boldsymbol {g} _ {t}
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\boldsymbol {v} _ {t + 1} = \beta_ {2} \boldsymbol {v} _ {t} + (1 - \beta_ {2}) (\boldsymbol {g} _ {t}) ^ {2}, \tag {1}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\boldsymbol {x} _ {t + 1} = \boldsymbol {x} _ {t} - \gamma \frac {\boldsymbol {m} _ {t + 1}}{\sqrt {\boldsymbol {v} _ {t + 1}} + \eta}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
Here $\pmb{x}_t$ is the model at $t$ -iteration, $\pmb{g}_t = \nabla F(\pmb{x}_t; \pmb{\zeta}_t)$ is the stochastic gradient, $\gamma$ is the learning rate, $\eta$ usually is a very small constant, $\beta_1$ and $\beta_2$ are decaying factor that controls the speed of forgetting history information. Notice here we disable the bias correction term in the original Adam, which is consistent with exact optimizer for training BERT (Devlin et al., 2019).
|
| 74 |
+
|
| 75 |
+
Here we refer $\pmb{m}_t$ as the momentum term and $\pmb{v}_t$ as the variance term. Notice that when $\pmb{v}_t$ is changed into a constant $\pmb{v}$ , then Adam becomes equivalent to Momentum SGD under a coordinate-dependent learning rate $\frac{\gamma}{\sqrt{\pmb{v} + \eta}}$ .
|
| 76 |
+
|
| 77 |
+
To investigate the non-linear gradient dependency challenge, we analyze Adam's variance during BERT-Large pre-training (seqlen 128). At each step, we fuse the variance of all parameters, and calculate the norm of the fused variance. Figure 2 presents this fused variance norm at each step. Results show that the variance norm becomes stable after around $23K$ steps. This motivates our approach 1-bit Adam to "freeze" the Adam variance after it becomes stable, and then use it as a precondition during 1-bit compression stage.
|
| 78 |
+
|
| 79 |
+
Table 1. BERT-Large pre-training sequence 128 profiling results.
|
| 80 |
+
|
| 81 |
+
<table><tr><td>Cluster Network Type</td><td>Num. node</td><td>Num. GPU</td><td>Batch size per GPU</td><td>Batch size</td><td>Grad accum. step</td><td>Forward (ms)</td><td>Backward allreduce (ms)</td><td>Backward everything else (ms)</td><td>Step (ms)</td><td>allreduce%</td></tr><tr><td>Ethernet</td><td>16</td><td>64</td><td>1</td><td>64</td><td>1</td><td>36.65</td><td>2205.86</td><td>33.63</td><td>74.96</td><td>94%</td></tr><tr><td>Ethernet</td><td>16</td><td>64</td><td>16</td><td>1024</td><td>1</td><td>35.71</td><td>2275.43</td><td>60.81</td><td>75.59</td><td>93%</td></tr><tr><td>Ethernet</td><td>16</td><td>64</td><td>16</td><td>4096</td><td>4</td><td>137.80</td><td>2259.36</td><td>243.72</td><td>74.92</td><td>83%</td></tr><tr><td>Ethernet</td><td>8</td><td>32</td><td>16</td><td>512</td><td>1</td><td>37.91</td><td>2173.35</td><td>60.71</td><td>75.63</td><td>93%</td></tr><tr><td>Ethernet</td><td>4</td><td>16</td><td>16</td><td>256</td><td>1</td><td>36.94</td><td>2133.24</td><td>62.82</td><td>76.85</td><td>92%</td></tr><tr><td>Ethernet</td><td>2</td><td>8</td><td>16</td><td>128</td><td>1</td><td>34.95</td><td>1897.21</td><td>61.23</td><td>75.26</td><td>92%</td></tr><tr><td>Ethernet</td><td>1</td><td>4</td><td>16</td><td>64</td><td>1</td><td>35.99</td><td>239.76</td><td>59.95</td><td>74.21</td><td>58%</td></tr><tr><td>InfiniBand</td><td>8</td><td>64</td><td>1</td><td>64</td><td>1</td><td>25.36</td><td>316.18</td><td>23.25</td><td>58.49</td><td>75%</td></tr><tr><td>InfiniBand</td><td>8</td><td>64</td><td>16</td><td>1024</td><td>1</td><td>32.81</td><td>336.40</td><td>59.99</td><td>57.79</td><td>69%</td></tr><tr><td>InfiniBand</td><td>8</td><td>64</td><td>16</td><td>4096</td><td>4</td><td>131.04</td><td>339.52</td><td>237.92</td><td>56.91</td><td>44%</td></tr><tr><td>InfiniBand</td><td>4</td><td>32</td><td>16</td><td>512</td><td>1</td><td>33.45</td><td>297.28</td><td>56.81</td><td>57.98</td><td>67%</td></tr><tr><td>InfiniBand</td><td>2</td><td>16</td><td>16</td><td>256</td><td>1</td><td>32.86</td><td>183.74</td><td>56.49</td><td>58.60</td><td>55%</td></tr><tr><td>InfiniBand</td><td>1</td><td>8</td><td>16</td><td>128</td><td>1</td><td>32.74</td><td>28.18</td><td>59.73</td><td>57.29</td><td>16%</td></tr></table>
|
| 82 |
+
|
| 83 |
+

|
| 84 |
+
Figure 2. Norm of fused variance for BERT-Large pre-training using vanilla Adam. The y-axis is in log scale.
|
| 85 |
+
|
| 86 |
+
# 4. 1-bit Adam Algorithm
|
| 87 |
+
|
| 88 |
+
In this section, we start with some background introduction for error compensated compression and why it is incompatible with Adam. Then we give full description of 1-bit Adam.
|
| 89 |
+
|
| 90 |
+
Problem setting In this paper, we focus on the following optimization task and rely on the following notions and definitions:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\min _ {\boldsymbol {x} \in \mathcal {R} ^ {d}} \quad f (\boldsymbol {x}) = \frac {1}{n} \sum_ {i = 1} ^ {n} \underbrace {\mathbb {E} _ {\zeta^ {(i)} \sim \mathcal {D} _ {i}} F (\boldsymbol {x} ; \zeta^ {(i)})} _ {:= f _ {i} (\boldsymbol {x})}, \tag {2}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $d$ is the dimension of the input model $\pmb{x}$ , $n$ is the number of workers included, $\mathcal{D}_i$ is the data distribution of individual data sample $\zeta^{(i)}$ on the $i$ -th worker, $F(\pmb{x};\zeta)$ is the loss function.
|
| 97 |
+
|
| 98 |
+
Notations and definitions Throughout this paper, we use the following notations:
|
| 99 |
+
|
| 100 |
+
- $\nabla f(\cdot)$ denotes the gradient of a function $f$ .
|
| 101 |
+
- $f^{*}$ denotes the optimal value of the minimization problem (2).
|
| 102 |
+
$f_{i}(\pmb {x}):= \mathbb{E}_{\pmb{\zeta}^{(i)}\sim \mathcal{D}_{i}}F(\pmb {x};\pmb{\zeta}^{(i)})$
|
| 103 |
+
|
| 104 |
+
- $\|\cdot\|$ denotes the $\ell_2$ norm for vectors and the spectral norm for matrices.
|
| 105 |
+
$\| X\| _A\coloneqq \operatorname {Tr}(X^\top AX).$
|
| 106 |
+
- $C_{\omega}(\cdot)$ denotes the randomized compressing operator.
|
| 107 |
+
- $\sqrt{}$ denotes the square root of the argument. In this paper if the argument is a vector, then it returns a vector taking the element-wise square root.
|
| 108 |
+
- $(\pmb{x})^2$ denotes the element-wise square operation if $\pmb{x}$ is a vector.
|
| 109 |
+
- $\frac{a}{b}$ or $a / b$ denotes the element-wise division operation if both $a$ and $b$ are vectors and their dimension matches.
|
| 110 |
+
|
| 111 |
+
# 4.1. Why error compensation works for SGD
|
| 112 |
+
|
| 113 |
+
For SGD, since the update is linearly dependent to the gradient, using error compensation could potentially remove the side-effect of the history compression error. The updating rule of vanilla SGD follows
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\boldsymbol {x} _ {t + 1} = \boldsymbol {x} _ {t} - \gamma \boldsymbol {g} _ {t} = \boldsymbol {x} _ {0} - \gamma \sum_ {s = 0} ^ {t} \boldsymbol {g} _ {s}. \tag {3}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
When directly compressing the gradient without error compensation, the updating rule becomes
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array}{l} \boldsymbol {x} _ {t + 1} = \boldsymbol {x} _ {t} - \gamma C _ {\omega} [ \boldsymbol {g} _ {t} ] = \boldsymbol {x} _ {t} - \gamma (\boldsymbol {g} _ {t} - \boldsymbol {\delta} _ {t}) \\ = \boldsymbol {x} _ {0} - \gamma \sum_ {s = 0} ^ {t} \boldsymbol {g} _ {s} + \underbrace {\gamma \sum_ {s = 0} ^ {t} \boldsymbol {\delta} _ {s}} _ {\text {h i s t o r y c o m p r e s s i o n e r r o r}}. \tag {4} \\ \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
As we can see in (4), the history compression error would get accumulated and therefore slow down the convergence rate. Moreover, previous work (Alistarh et al., 2017) indicates that when using biased compression operator, the training convergence cannot be guaranteed.
|
| 126 |
+
|
| 127 |
+
Now if we apply error compensation at each compression step, the updating rule becomes
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\begin{array}{l} \boldsymbol {x} _ {t + 1} = \boldsymbol {x} _ {t} - \gamma C _ {\omega} [ \boldsymbol {g} _ {t} + \boldsymbol {\delta} _ {t - 1} ] = \boldsymbol {x} _ {t} - \gamma (\boldsymbol {g} _ {t} - \underbrace {\boldsymbol {\delta} _ {t} + \boldsymbol {\delta} _ {t - 1}} _ {\text {e r r o r c a n c e l l a t i o n}}) \\ = \boldsymbol {x} _ {0} - \gamma \sum_ {s = 0} ^ {t} \boldsymbol {g} _ {s} + \gamma \sum_ {s = 0} ^ {t} \left(\boldsymbol {\delta} _ {s} - \boldsymbol {\delta} _ {s - 1}\right) \\ = \boldsymbol {x} _ {0} - \gamma \sum_ {s = 0} ^ {t} \boldsymbol {g} _ {s} + \gamma \delta_ {t}. \tag {5} \\ \end{array}
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
This demonstrates that by using error compensation, each step's compression error would get cancelled in the next step instead of getting accumulated over steps. To make the error compensation work correctly, it is necessary that we ensure an error cancellation term $\delta_{t} + \delta_{t - 1}$ in the updating rule. Below we are going to see that this cannot be achieved for Adam.
|
| 134 |
+
|
| 135 |
+
# 4.2. Why Adam cannot be combined with error compensation
|
| 136 |
+
|
| 137 |
+
As we can see, Adam is non-linearly dependent to the gradient, and this non-linearity is widely believed to be essential for the superiority of Adam. Below we are going to first intuitively explain why error compensation works well for SGD, and then discuss two major reasons why this non-linearity makes Adam incompatible with error compensation.
|
| 138 |
+
|
| 139 |
+
Difficulty for estimating the variance term $v$ . Notice that for Adam, it is necessary to communicate the gradient $g_{t}$ or momentum $m_{t}$ , and the variance term can be updated using $g_{t}$ . However, when using error-compensated gradient to update $v_{t}$ , the updating rule follows:
|
| 140 |
+
|
| 141 |
+
non-linear error correction
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\begin{array}{l} \boldsymbol {v} _ {t + 1} = \beta_ {2} \boldsymbol {v} _ {t} + (1 - \beta_ {2}) \left(C _ {\omega} [ \boldsymbol {g} _ {t} + \boldsymbol {\delta} _ {t - 1} ]\right) ^ {2} \\ = \beta_ {2} \boldsymbol {v} _ {t} + (1 - \beta_ {2}) \left(\boldsymbol {g} _ {t} + \boldsymbol {\delta} _ {t - 1} - \boldsymbol {\delta} _ {t}\right) ^ {2} \\ = \beta_ {2} \boldsymbol {v} _ {t} + (1 - \beta_ {2}) (\boldsymbol {g} _ {t}) ^ {2} + \underbrace {\left(\boldsymbol {\delta} _ {t - 1} - \boldsymbol {\delta} _ {t}\right) ^ {2}} \\ + 2 \langle \boldsymbol {g} _ {t}, \boldsymbol {\delta} _ {t - 1} - \boldsymbol {\delta} _ {t} \rangle . \\ \end{array}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
Here the quadratic term $(\delta_{t-1} - \delta_t)^2$ cannot be cancelled by itself, therefore it will be hard to get an accurate estimation of $\pmb{v}_t$ with history error being cancelled.
|
| 148 |
+
|
| 149 |
+
Difficulty for setting the correction factor. Another problem is that for SGD, when applying error compensation under a time varying learning rate $\gamma_{t}$ , we need to compensate the history error using
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
C \left[ \pmb {g} _ {t} + \frac {\gamma_ {t}}{\gamma_ {t - 1}} \pmb {\delta} _ {t - 1} \right],
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
instead of adding back $\delta_{t - 1}$ directly. In this case, if we view $\frac{\gamma}{\sqrt{\pmb{v}_t + \eta}}$ as a coordinate-dependent learning rate, which makes Adam equivalent to Momentum SGD with time-varying learning rate, we need to apply the scale factor according to
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
\boldsymbol {m} _ {t + 1} = C _ {\omega} \left[ \beta_ {1} \boldsymbol {m} _ {t} + (1 - \beta_ {1}) \boldsymbol {g} _ {t} + \frac {\sqrt {\boldsymbol {v} _ {t - 1}} + \eta}{\sqrt {\boldsymbol {v} _ {t}} + \eta} \boldsymbol {\delta} _ {t - 1} \right].
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
The problem is that we cannot get the value of $v_{t}$ after the compression, which makes it impossible to set the scale factor for error compensation.
|
| 162 |
+
|
| 163 |
+
# 4.3. 1-bit Adam
|
| 164 |
+
|
| 165 |
+
Based on our findings (Section 3.3) that Adam's variance term becomes stable at an early stage, we propose 1-bit Adam summarized in Algorithm 1. First we use vanilla Adam for a few epochs as a warm-up. After the warm-up stage, the compression stage starts and we stop updating the variance term $v$ and use it as a fixed precondition. At the compression stage, we communicate based on the momentum applied with error-compensated 1-bit compression. The momentum are quantized into 1-bit representation (the sign of each element). Accompanying the vector, a scaling factor is computed as $\frac{\text{magnitude of compensated gradient}}{\text{magnitude of quantized gradient}}$ . This scaling factor ensures that the compressed momentum has the same magnitude as the uncompressed momentum. This 1-bit compression could reduce the $97\%$ communication cost of the original for float32 type training and $94\%$ for float16 type training.
|
| 166 |
+
|
| 167 |
+
# 5. Theoretical Analysis
|
| 168 |
+
|
| 169 |
+
Notice that for 1-bit Adam, we only use original Adam at warm-up, and then we essentially run error-compensated momentum SGD with coordinate-dependent learning rate $\frac{\gamma}{\sqrt{v_{T_w}}}$ . Therefore here we consider the Adam-based warm-up phase as a way to find a good precondition variance term $v_{T_w}$ to be used in the compression phase. Below we are going to introduce the convergence rate for the compression phase after warm-up. We first introduce some necessary assumptions, then we present the theoretical guarantee of the convergence rate for 1-bit Adam.
|
| 170 |
+
|
| 171 |
+
Assumption 1. We make the following assumptions:
|
| 172 |
+
|
| 173 |
+
1. Lipschitzian gradient: $f(\cdot)$ is assumed to be with $L$ -Lipschitzian gradients, which means
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
\| \nabla f (\boldsymbol {x}) - \nabla f (\boldsymbol {y}) \| \leq L \| \boldsymbol {x} - \boldsymbol {y} \|, \quad \forall \boldsymbol {x}, \forall \boldsymbol {y},
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+
2. Bounded variance: The variance of the stochastic gradient is bounded
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\mathbb {E} _ {\boldsymbol {\zeta} ^ {(i)} \sim \mathcal {D} _ {i}} \| \nabla F (\boldsymbol {x}; \boldsymbol {\zeta} ^ {(i)}) - \nabla f (\boldsymbol {x}) \| ^ {2} \leq \sigma^ {2}, \quad \forall \boldsymbol {x}, \forall i.
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
(a) Gather step: Each worker sends its $i$ -th chunk to worker $i$ .
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
(b) Average step: Each worker averages all chunks it receives.
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
(c) Scatter step: Each worker receives the $i$ -th chunk from worker $i$ .
|
| 193 |
+
Figure 3. Efficient system design for communication (compressed_allreduce)
|
| 194 |
+
|
| 195 |
+
# Algorithm 1 1-bit Adam
|
| 196 |
+
|
| 197 |
+
1: Initialize: $\pmb{x}_0$ , learning rate $\gamma$ , initial error $\delta = 0$ , $m_0 = 0$ , $\pmb{v}_0 = \mathbf{0}$ , number of total iterations $T$ , warm-up steps $T_w$ , two decaying factor $\beta_1, \beta_2$ and $\eta$ for Adam.
|
| 198 |
+
2: Running the original Adam for $T_{w}$ steps, then store the variance term (defined as $\mathbf{v}_t$ in (1)) $\mathbf{v}_{T_w}$ .
|
| 199 |
+
3: for $t = T_w, \dots, T$ do
|
| 200 |
+
4: (On $i$ -th node)
|
| 201 |
+
5: Randomly sample $\boldsymbol{\zeta}_t^{(i)}$ and compute local stochastic gradient $\pmb{g}_t^{(i)}\coloneqq \nabla F_i(\pmb{x}_t^{(i)},\pmb{\zeta}_t^{(i)})$
|
| 202 |
+
6: Update the local momentum variable $\pmb{m}_{t-1}$ according to $\pmb{m}_t^{(i)} = \beta_1 \pmb{m}_{t-1} + (1 - \beta_1) \pmb{g}_t^{(i)}$ .
|
| 203 |
+
7: Compress $\pmb{m}_t^{(i)}$ into $\hat{\pmb{m}}_t^{(i)} = C_\omega \left[\pmb{m}_t^{(i)} + \pmb{\delta}_{t - 1}^{(i)}\right]$ , and update the compression error by $\delta_t^{(i)} = \pmb{m}_t^{(i)} + \pmb{\delta}_{t - 1}^{(i)} - \hat{\pmb{m}}_t^{(i)}$ .
|
| 204 |
+
8: Send the $\hat{m}_t^{(i)}$ to the server.
|
| 205 |
+
9: (On server)
|
| 206 |
+
10: Take the average over all $\hat{\pmb{m}}_t^{(i)}$ it receives and compress it into $\overline{\pmb{m}}_t = C_\omega \left[\frac{1}{n}\sum_{i=1}^n\hat{\pmb{m}}_t^{(i)} + \overline{\delta}_{t-1}\right]$ , and update the compression error accordingly by $\overline{\delta}_t = \frac{1}{n}\sum_{i=1}^n\hat{\pmb{m}}_t^{(i)} + \overline{\delta}_{t-1} - \overline{\pmb{m}}_t$ .
|
| 207 |
+
11: Send $\overline{m}_t$ to all the workers.
|
| 208 |
+
12: (On $i$ -th node)
|
| 209 |
+
13: Set $\pmb{m}_t = \overline{\pmb{m}}_t$ , and update local model $\pmb{x}_{t+1} = \pmb{x}_t - \gamma \pmb{m}_t / \sqrt{\pmb{v}_{Tw}}$ .
|
| 210 |
+
14: end for
|
| 211 |
+
15: Output: $x$ .
|
| 212 |
+
|
| 213 |
+
3. Bounded magnitude of error for $\mathcal{C}_{\omega}[\cdot]$ : The magnitude of worker's local errors $\delta_t^{(i)}$ and the server's global error $\overline{\delta}_t$ , are assumed to be bounded by a constant $\epsilon$
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
\sum_ {k = 1} ^ {n} \mathbb {E} _ {\omega} \left\| \boldsymbol {\delta} _ {t} ^ {(i)} \right\| \leq \frac {\epsilon}{2}, \quad \sum_ {i = 1} ^ {n} \mathbb {E} _ {\omega} \left\| \overline {{\boldsymbol {\delta}}} _ {t} \right\| \leq \frac {\epsilon}{2}, \quad \forall t, \forall i.
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
Next we present the main theorem for 1-bit Adam.
|
| 220 |
+
|
| 221 |
+
Theorem 1. Under Assumption 1, for 1-bit Adam, we have
|
| 222 |
+
|
| 223 |
+
the following convergence rate
|
| 224 |
+
|
| 225 |
+
$$
|
| 226 |
+
\begin{array}{l} \left(1 - \frac {\gamma L}{v _ {\operatorname* {m i n}}} - \frac {2 \gamma^ {2} L ^ {2}}{(1 - \beta) ^ {2} v _ {\operatorname* {m i n}} ^ {2}}\right) \sum_ {t = 0} ^ {T} \mathbb {E} \| \nabla f (\boldsymbol {x} _ {t}) \| _ {V} ^ {2} \\ \leq \frac {2 \mathbb {E} f (\boldsymbol {x} _ {0}) - 2 f (\boldsymbol {x} ^ {*})}{\gamma} + \frac {6 \gamma^ {2} L ^ {2} \epsilon^ {2} T}{(1 - \beta) ^ {2} v _ {\min } ^ {3}} + \\ \frac {L \gamma \sigma^ {2} T}{n v _ {\min }} + \frac {2 \gamma^ {2} L ^ {2} \sigma^ {2} T}{n (1 - \beta) ^ {2} v _ {\min } ^ {2}}, \tag {6} \\ \end{array}
|
| 227 |
+
$$
|
| 228 |
+
|
| 229 |
+
where $V = \text{diag}\left(1 / \pmb{v}_{T_w}^{(1)}, 1 / \pmb{v}_{T_w}^{(2)}, \dots, 1 / \pmb{v}_{T_w}^{(d)}\right)$ is a diagonal matrix spanned by $\pmb{v}_{T_w}$ and $v_{\min} = \min \{\pmb{v}_{T_w}^{(1)}, \pmb{v}_{T_w}^{(2)}, \dots, \pmb{v}_{T_w}^{(d)}\}$ is the minimum value in $\pmb{v}_{T_w}$
|
| 230 |
+
|
| 231 |
+
Given the generic result in Theorem 1, we obtain the convergence rate for 1-bit Adam with appropriately chosen learning rate $\gamma$ .
|
| 232 |
+
|
| 233 |
+
Corollary 1. Under Assumption 1, for 1-bit Adam, choosing $\gamma = \frac{1}{4L(v_{\mathrm{min}})^{-1} + \sigma\sqrt{\frac{T}{n}} + \epsilon^{\frac{2}{3}}T^{\frac{1}{3}}(v_{\mathrm{min}})^{-1}}$ , we have the following convergence rate
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
\frac {1}{T v _ {\min }} \sum_ {t = 0} ^ {T - 1} \mathbb {E} \| \nabla f (\boldsymbol {x} _ {t}) \| _ {V} ^ {2} \lesssim \frac {\sigma}{\sqrt {n T}} + \frac {\epsilon^ {\frac {2}{3}}}{T ^ {\frac {2}{3}}} + \frac {1}{T},
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
where we treat $f(\pmb{x}_1) - f^*, \beta$ and $L$ as constants.
|
| 240 |
+
|
| 241 |
+
This result suggests that: 1-bit Adam essentially admits the same convergence rate as distributed SGD in the sense that both of them admit the asymptotical convergence rate $O(1 / \sqrt{nT})$ , which means we can still achieve linear speedup w.r.t. the number of workers $n$ .
|
| 242 |
+
|
| 243 |
+
# 6. Efficient system design for compressed communication
|
| 244 |
+
|
| 245 |
+
NVIDIA NCCL is an efficient and widely used communication library that has been tightly integrated in DL frameworks like PyTorch and TensorFlow. However, NCCL library cannot be used directly for performing communication based on 1-bit compression. This is because the collective communication primitives like Allreduce and Allgather are at a higher level of abstraction and can only perform data movement and/or simple operations like sum, min, max etc.
|
| 246 |
+
|
| 247 |
+
In addition, NCCL library (before v2.7) did not expose either an Alltoall primitive or any point-to-point (send/recv) communication primitives that can be used to implement an Alltoall. Thus for 1-bit Adam, we designed a custom collective primitive using Message Passing Interface (MPI). We call it "compressed allreduce" and it has three phases as shown in Figure 3: 1) The gather step, which we have implemented using the MPI_Alltoall (personalized exchange) primitive, 2) The average step, where 1-bit Adam computes the average of compressed local momentums, and 3) The scatter step, which we implement using MPI_Allgather. We develop two versions of compressed allreduce: 1) CUDA-Aware version that exploits GPUDirect features and requires CUDA-Aware libraries like MVAPICH2-GDR and 2) Basic version that can be used with any MPI library but copies data between GPU and CPU buffers. The CUDA-Aware version works only on systems with InfiniBand whereas the basic version can run on any system with Ethernet interconnect.
|
| 248 |
+
|
| 249 |
+
# 7. Experiments
|
| 250 |
+
|
| 251 |
+
We evaluate 1-bit Adam and existing approaches using BERT-Base, BERT-Large, SQuAD 1.1 and ResNet training tasks on up to 256 GPUs. We show that 1-bit Adam converges as fast as uncompressed Adam, and runs up to 3.3 times faster than uncompressed algorithms under limited bandwidth.
|
| 252 |
+
|
| 253 |
+
# 7.1. BERT pre-training and fine-tuning
|
| 254 |
+
|
| 255 |
+
Dataset and models We evaluate the convergence and performance of 1-bit Adam and uncompressed Adam for BERT-Base ( $L = 12$ , $H = 768$ , $A = 12$ , $110M$ params) and BERT-Large ( $L = 24$ , $H = 1024$ , $A = 16$ , $340M$ params) pre-training tasks. We use the same dataset as Devlin et al. (2019), which is a concatenation of Wikipedia and BooksCorpus with $2.5B$ and $800M$ words respectively. We use the GLUE fine-tuning benchmark(Wang et al., 2018) to evaluate the convergence of the BERT models trained by Adam and 1-bit Adam.
|
| 256 |
+
|
| 257 |
+
In addition, we also evaluate the convergence and performance of 1-bit Adam for SQuAD 1.1 fine-tuning task using a pre-trained BERT model checkpoint from HuggingFace<sup>4</sup>.
|
| 258 |
+
|
| 259 |
+
Hardware For all experiments in this Section 7.1 we use the two clusters described in Section 3.1. We use up to 256 GPUs for pre-training tasks and up to 32 GPUs for fine-tuning tasks.
|
| 260 |
+
|
| 261 |
+
Training parameters For BERT pre-training, the learning rate linearly increases to $4 \times 10^{-4}$ as a warmup in the
|
| 262 |
+
|
| 263 |
+
Table 2. Number of steps for BERT pre-training tasks.
|
| 264 |
+
|
| 265 |
+
<table><tr><td></td><td>Seqlen 128 (warmup)</td><td>Seqlen 512 (warmup)</td></tr><tr><td>BERT-Base Adam</td><td>118K (N/A)</td><td>22K (N/A)</td></tr><tr><td>BERT-Base 1-bit Adam</td><td>118K (16K)</td><td>22K (1.5K)</td></tr><tr><td>BERT-Large Adam</td><td>152K (N/A)</td><td>10K (N/A)</td></tr><tr><td>BERT-Large 1-bit Adam</td><td>152K (23K)</td><td>10K (1.5K)</td></tr></table>
|
| 266 |
+
|
| 267 |
+
first $12.5K$ steps, then decays into 0.99 of the original after every 520 steps. We set the two parameters in Algorithm 1 as $\beta_{1} = 0.9$ and $\beta_{2} = 0.999$ for 1-bit Adam and Adam. For convergence test, we set total batch size as $4K$ for BERT-Base and BERT-Large. For performance test, we test different batch sizes. Table 2 summarizes the total number of steps for BERT sequence length 128 and 512 phases, together with the number of warmup steps for 1-bit Adam. We manually tuned the number of warmup steps for 1-bit Adam evaluations. On the other hand, we find that this configuration can be auto-tuned: First, the number of 1-bit Adam warmup steps should be no less than the number of learning rate warmup steps, since Adam's variance term is unstable during LR warmup. Second, we find that the ratio $\frac{\|\pmb{v}_t\|_1}{\|\pmb{v}_{t - \Delta}\|_1}$ (where $\| \cdot \| _1$ is the $l_{1}$ norm of the vector and we set $\Delta = \frac{1}{1 - \beta_2}$ ) is a good indicator of how stable the variance term is. For BERT-Large pre-training seqlen 128, when we set a threshold of $\geq 0.96$ for this ratio, the warmup will stop at step 22173, which is very close to our manually tuned $23K$ warmup steps.
|
| 268 |
+
|
| 269 |
+
For GLUE benchmarks we use original Adam optimizer and perform single-task training on the dev set. We search over the hyperparameter space with batch sizes $\in \{8,16\}$ and learning rates $\in \{1\times 10^{-5},3\times 10^{-5},5\times 10^{-5},8\times 10^{-5}\}$ . Other settings are the same as pre-training task.
|
| 270 |
+
|
| 271 |
+
For SQuAD fine-tuning we use the same parameters as published by HuggingFace (batch size = 24, learning rate = 3e-5, dropout=0.1, 2 epochs), except that we increase the batch size to 96 (using 32 GPUs). The first 400 steps out of total 1848 steps are used as the warmup stage for 1-bit Adam.
|
| 272 |
+
|
| 273 |
+
Convergence results Figure 4(a) presents the samplewise convergence results. We use the BertAdam (Devlin et al., 2019) optimizer as the uncompressed baseline. For both BERT-Base and BERT-Large and for both sequence length phases, we find that 1-bit Adam provides the same convergence speed as baseline, while the communication volume is reduced into $6\%$ of the original during the compression stage.
|
| 274 |
+
|
| 275 |
+
Table 3 presents the GLUE results using the checkpoints from our pre-training experiments. 1-bit Adam achieves similar accuracy compared to the uncompressed baseline and the numbers reported in previous work.
|
| 276 |
+
|
| 277 |
+
For SQuAD 1.1 fine-tuning task using checkpoint from
|
| 278 |
+
|
| 279 |
+
Table 3. GLUE development set results. BERT-Base/Large(original) results are from Devlin et al. (2019). BERT-Base/Large (uncompressed) results use the full-precision BertAdam with the same training parameters as the 1-bit Adam case. BERT-Base/Large (compressed) are the results using 1-bit Adam. The scores are the median scores over 10 runs.
|
| 280 |
+
|
| 281 |
+
<table><tr><td>Model</td><td>RTE</td><td>MRPC</td><td>CoLA</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI-(m/mm)</td></tr><tr><td>BERT-Base (original)</td><td>66.4</td><td>84.8</td><td>52.1</td><td>93.5</td><td>90.5</td><td>89.2</td><td>84.6/83.4</td></tr><tr><td>BERT-Base (uncompressed)</td><td>68.2</td><td>84.8</td><td>56.8</td><td>91.8</td><td>90.9</td><td>90.9</td><td>83.6/83.5</td></tr><tr><td>BERT-Base (compressed)</td><td>69.0</td><td>84.8</td><td>55.6</td><td>91.6</td><td>90.8</td><td>90.9</td><td>83.6/83.9</td></tr><tr><td>BERT-Large (original)</td><td>70.1</td><td>85.4</td><td>60.5</td><td>94.9</td><td>92.7</td><td>89.3</td><td>86.7/85.9</td></tr><tr><td>BERT-Large (uncompressed)</td><td>70.3</td><td>86.0</td><td>60.3</td><td>93.1</td><td>92.2</td><td>91.4</td><td>86.1/86.2</td></tr><tr><td>BERT-Large (compressed)</td><td>70.4</td><td>86.1</td><td>62.0</td><td>93.8</td><td>91.9</td><td>91.5</td><td>85.7/85.4</td></tr></table>
|
| 282 |
+
|
| 283 |
+

|
| 284 |
+
(a) Sample-wise
|
| 285 |
+
|
| 286 |
+

|
| 287 |
+
(b) Time-wise
|
| 288 |
+
Figure 4. Sample-wise and time-wise convergence speed for BERT-Large pre-training sequence length 128 using 64 GPUs on the Ethernet cluster. 1-bit Adam and Adam also achieve the same sample-convergence speed for BERT-Base pre-training.
|
| 289 |
+
|
| 290 |
+
HuggingFace, 1-bit Adam achieves similar F1 score (93.32) compared to the score reported by HuggingFace (93.33) using same number of samples and training parameters.
|
| 291 |
+
|
| 292 |
+
Performance results Computed as $1 / (\text{warmup ratio} + (1 - \text{warmup ratio}) / 16)$ for FP16 training, 1-bit Adam offers up to $5\mathrm{x}$ less end-to-end communication volume for BERT-Base and BERT-Large. This leads to 3.3x higher throughput for BERT-Large sequence length 128 pre-training and up to $2.9\mathrm{x}$ higher throughput for SQuAD fine-tuning. This end-to-end throughput improvement is enabled by the 5.48x (Figure 5(a)) and 6.17x (Figure 5(c)) speedup observed during the compression stage. Figure 5(b) shows that 1-bit Adam also provides better scalability: Adam's throughput reaches peak at 32 GPUs on Ethernet, while 1-bit Adam's throughput keeps increasing until 128 GPUs. It is also worth mentioning that 1-bit Adam on Ethernet (4.1 Gbps effective bandwidth, 4 GPUs per node) is able to achieve comparable throughput as Adam on InfiniBand (near 100 Gbps effective bandwidth, 8 GPUs per node), which demonstrates 1-bit Adam's efficiency considering the hardware differences.
|
| 293 |
+
|
| 294 |
+
In Figure 4(b) we also measured the total training time of BERT-Large pre-training seqlen 128 when using batch size $4K$ on 64 GPUs on the Ethernet cluster. It takes 174.3 hours for baseline Adam to complete the training, while 1-bit Adam only needs 51.5 hours. This $3.4\mathrm{x}$ speedup is consistent with the speedup computed based on the throughput analysis above.
|
| 295 |
+
|
| 296 |
+
# 7.2. ResNet on CIFAR10 and ImageNet
|
| 297 |
+
|
| 298 |
+
To further evaluate the convergence speed of 1-bit Adam and related works, we train CIFAR10 using ResNet-18(He et al., 2016). The dataset has a training set of 50000 images and a test set of 10000 images, where each image is given one of the 10 labels. We run the experiments on 8 1080Ti GPUs where each GPU is used as one worker. The batch size on each worker is 128 and the total batch size is 1024.
|
| 299 |
+
|
| 300 |
+
We evaluate five implementations for comparison: 1) Original SGD. 2) Original Adam (Kingma and Ba, 2014). 3) 1-bit Adam where we use 13 out of 200 epochs as warmup. 4) 1-bit Adam (32-bits) where we do not compress the momentum while still freezing the variance. 5) Adam(1-bit Naive) where we compress the gradient instead of momentum, and don't freeze the variance. We set the learning rate as $1 \times 10^{-1}$ for SGD and $1 \times 10^{-4}$ for the other 4 cases. For all five cases, the learning rate is decayed into $10\%$ of the original after every 100 epochs.
|
| 301 |
+
|
| 302 |
+
As illustrated in Figure 6, 1-bit Adam achieves similar convergence speed as Adam and 1-bit Adam (32-bits). SGD has a slightly slower convergence speed while Adam(1-bit Naive) is much worse. This and Section 3.2 demonstrate that existing compression method doesn't work for Adam. In the supplementary materials we further compare 1-bit Adam with other related works using ResNet-18.
|
| 303 |
+
|
| 304 |
+
Moreover, to see how 1-bit Adam could speedup the training in this case, we report speedup results of training ResNet-152 on ImageNet (Russakovsky et al., 2015) using different numbers of GPUs, in Figure 7. As we can see that 1-bit Adam could potentially speedup the training especially when the bandwidth is limited.
|
| 305 |
+
|
| 306 |
+

|
| 307 |
+
(a) Bert-Large pre-training, batch size $=$ number of GPUs $\times 16$
|
| 308 |
+
|
| 309 |
+

|
| 310 |
+
(b) Bert-Large pre-training, batch size $= 4\mathrm{K}$
|
| 311 |
+
|
| 312 |
+

|
| 313 |
+
(c) SQuAD fine-tuning, batch size $=$ number of GPUs $\times 3$
|
| 314 |
+
|
| 315 |
+

|
| 316 |
+
Figure 5. Scalability of 1-bit Adam for BERT-Large pre-training sequence length 128 and SQuAD 1.1 fine-tuning on V100 GPUs. Adam lines represent the throughput at 1-bit Adam's warmup stage (i.e., baseline Adam's throughput). 1-bit Adam lines represent the throughput at compression stage. Annotations represent the highest speedup achieved in each figure. Note that this is the speedup between warmup and compression stage. The end-to-end speedup also depends on the percentage of warmup.
|
| 317 |
+
(a) Training loss
|
| 318 |
+
|
| 319 |
+

|
| 320 |
+
(b) Testing accuracy
|
| 321 |
+
Figure 8. Comparison of Adam and 1-bit Adam (20% warmup steps) for training Deep Convolutional Generative Adversarial Networks (DCGAN).
|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
Figure 6. Sample-wise convergence speed for ResNet-18.
|
| 325 |
+
Figure 7. Speedup of ResNet-152 on ImageNet. Each server has 8 V100 GPUs interconnected by NVLink, servers are connected by 10Gbits or 1Gbits TCP/IP network.
|
| 326 |
+
|
| 327 |
+
# 7.3. Deep Convolutional Generative Adversarial Networks
|
| 328 |
+
|
| 329 |
+
To further understand the correctness of 1-bit Adam on more tasks, we apply it to the training of Generative Adversarial Networks (GAN). We choose Deep Convolutional GAN (Radford et al., 2015) as the model, which adopts convolutional and convolutional-transpose layers for the discriminator and generator. We use CelebFaces Attributes Dataset (CelebA) (Liu et al., 2015) as the training data, which contains more than 200K celebrity images. The task is to train the discriminator and generator in an adversarial way, such that the generator can create fake but vivid face images. Figure 8 shows the training loss and generated
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
(a) Training loss
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
(b) Generated ages (Adam)
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
(c) Generated images (1-bit Adam)
|
| 339 |
+
|
| 340 |
+
images by using original Adam optimizer and 1-bit Adam. The results show that 1-bit Adam can achieve almost the same training accuracy as the Adam optimizer.
|
| 341 |
+
|
| 342 |
+
# 8. Conclusions
|
| 343 |
+
|
| 344 |
+
In this paper, we propose an error-compensated Adam preconditioned momentum SGD algorithm, 1-bit Adam, which provides both communication efficiency and Adam's convergence speed. Our theoretical analysis demonstrates that 1-bit Adam admits a linear speed w.r.t the number of workers in the network, and is robust to any compression method. We validate the performance of 1-bit Adam empirically on BERT, SQuAD and ResNet training tasks on up to 256 GPUs. Results show that 1-bit Adam converges as fast as uncompressed Adam, reduces communication volume by up to $5\mathrm{x}$ , and runs up to 3.3 times faster than uncompressed algorithms. Beyond those results, it's interesting to see the performance of 1-bit Adam on wider variety of tasks, e.g., reinforcement learning, which we leave for the future work.
|
| 345 |
+
|
| 346 |
+
# References
|
| 347 |
+
|
| 348 |
+
N. Agarwal, A. T. Suresh, F. X. X. Yu, S. Kumar, and B. McMahan. cpSGD: Communication-efficient and differentially-private distributed SGD. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 7564-7575. Curran Associates, Inc., 2018.
|
| 349 |
+
A. Alacaoglu, Y. Malitsky, P. Mertikopoulos, and V. Cevher. A new regret analysis for adam-type algorithms, 2020.
|
| 350 |
+
D. Alistarh, D. Grubic, J. Li, R. Tomioka, and M. Vojnovic. QSGD: Communication-Efficient SGD via gradient quantization and encoding. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 1709-1720. Curran Associates, Inc., 2017.
|
| 351 |
+
D. Basu, D. Data, C. Karakus, and S. Diggavi. Qsparse-local-sgd: Distributed sgd with quantization, sparsification and local computations. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 14695-14706. Curran Associates, Inc., 2019.
|
| 352 |
+
J. Bernstein, J. Zhao, K. Azizzadenesheli, and A. Anandkumar. signsgd with majority vote is communication efficient and byzantine fault tolerant. 10 2018.
|
| 353 |
+
S. Chaturapruek, J. C. Duchi, and C. Ré. Asynchronous stochastic convex optimization: the noise is in the noise and sgd don't care. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 1531-1539. Curran Associates, Inc., 2015.
|
| 354 |
+
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In *NAACL-HLT*, 2019.
|
| 355 |
+
J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(61):2121-2159, 2011.
|
| 356 |
+
E. Gorbunov, D. Kovalev, D. Makarenko, and P. Richtárik. Linearly converging error compensated sgd, 2020.
|
| 357 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016.
|
| 358 |
+
|
| 359 |
+
N. Ivkin, D. Rothchild, E. Ullah, V. braverman, I. Stoica, and R. Arora. Communication-efficient distributed sgd with sketching. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 13144-13154. Curran Associates, Inc., 2019.
|
| 360 |
+
P. Jiang and G. Agrawal. A linear speedup analysis of distributed deep learning with sparse and quantized communication. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 2530-2541. Curran Associates, Inc., 2018.
|
| 361 |
+
D. Kingma and J. Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014.
|
| 362 |
+
D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2015.
|
| 363 |
+
A. Koloskova*, T. Lin*, S. U. Stich, and M. Jaggi. Decentralized deep learning with arbitrary communication compression. In International Conference on Learning Representations, 2020.
|
| 364 |
+
Y. Li, M. Yu, S. Li, S. Avestimehr, N. S. Kim, and A. Schwing. Pipe-sgd: A decentralized pipelined sgd framework for distributed deep net training. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 8056-8067. Curran Associates, Inc., 2018.
|
| 365 |
+
X. Lian, C. Zhang, H. Zhang, C.-J. Hsieh, W. Zhang, and J. Liu. Can decentralized algorithms outperform centralized algorithms? a case study for decentralized parallel stochastic gradient descent. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 5330-5340. Curran Associates, Inc., 2017.
|
| 366 |
+
R. Liu, T. Wu, and B. Mozafari. Adam with bandit sampling for deep learning, 2020.
|
| 367 |
+
Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015.
|
| 368 |
+
L. Luo, Y. Xiong, and Y. Liu. Adaptive gradient methods with dynamic bound of learning rate. In International Conference on Learning Representations, 2019.
|
| 369 |
+
T. T. Phuong and L. T. Phong. Distributed sgd with flexible gradient compression. IEEE Access, 8:64707-64717, 2020.
|
| 370 |
+
|
| 371 |
+
A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 372 |
+
O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211-252, 2015. doi: 10.1007/s11263-015-0816-y.
|
| 373 |
+
F. Seide, H. Fu, J. Droppo, G. Li, and D. Yu. 1-bit stochastic gradient descent and application to data-parallel distributed training of speech dnns. In Interspeech 2014, September 2014.
|
| 374 |
+
Z. Shen, A. Mokhtari, T. Zhou, P. Zhao, and H. Qian. Towards more efficient stochastic decentralized learning: Faster convergence and sparse communication. In J. Dy and A. Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 4624-4633, Stockholm, Sweden, 10-15 Jul 2018. PMLR.
|
| 375 |
+
S. Shi, Q. Wang, K. Zhao, Z. Tang, Y. Wang, X. Huang, and X. Chu. A distributed synchronous sgd algorithm with global top-k sparsification for low bandwidth networks. In 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS), pages 2238-2247, 2019.
|
| 376 |
+
S. Shi, X. Zhou, S. Song, X. Wang, Z. Zhu, X. Huang, X. Jiang, F. Zhou, Z. Guo, L. Xie, R. Lan, X. Ouyang, Y. Zhang, J. Wei, J. Gong, W. Lin, P. Gao, P. Meng, X. Xu, C. Guo, B. Yang, Z. Chen, Y. Wu, and X. Chu. Towards scalable distributed training of deep learning on public cloud clusters. In Proceedings of Machine Learning and Systems, 2021.
|
| 377 |
+
R. Spring, A. Kyrillidis, V. Mohan, and A. Shrivastava. Compressing gradient optimizers via Count-Sketches. Proceedings of the 36th International Conference on Machine Learning, 97:5946-5955, 2019.
|
| 378 |
+
S. U. Stich. Local sgd converges fast and communicates little, 2019.
|
| 379 |
+
S. U. Stich, J.-B. Cordonnier, and M. Jaggi. Sparsified sgd with memory. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 4447-4458. Curran Associates, Inc., 2018.
|
| 380 |
+
J. Sun, T. Chen, G. Giannakis, and Z. Yang. Communication-efficient distributed learning via lazily aggregated quantized gradients. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors,
|
| 381 |
+
|
| 382 |
+
Advances in Neural Information Processing Systems 32, pages 3370-3380. Curran Associates, Inc., 2019.
|
| 383 |
+
H. Tang, C. Yu, X. Lian, T. Zhang, and J. Liu. DoubleSqueeze: Parallel stochastic gradient descent with double-pass error-compensated compression. In K. Chaudhuri and R. Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 6155-6165, Long Beach, California, USA, 09-15 Jun 2019. PMLR.
|
| 384 |
+
T. Tieleman and G. Hinton. Rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 2011.
|
| 385 |
+
T. Vogels, S. P. Karimireddy, and M. Jaggi. Powersgd: Practical low-rank gradient compression for distributed optimization. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 14259-14268. Curran Associates, Inc., 2019.
|
| 386 |
+
T. Vogels, S. P. Karimireddy, and M. Jaggi. Powergossip: Practical low-rank communication compression in decentralized deep learning, 2020.
|
| 387 |
+
A. Wang, A. Singh, J. Michael, F. Hill, O. Levy, and S. Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium, Nov. 2018. Association for Computational Linguistics. doi: 10.18653/v1/W18-5446.
|
| 388 |
+
J. Wangni, J. Wang, J. Liu, and T. Zhang. Gradient sparsification for Communication-Efficient distributed optimization. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 1299-1309. Curran Associates, Inc., 2018.
|
| 389 |
+
W. Wen, C. Xu, F. Yan, C. Wu, Y. Wang, Y. Chen, and H. Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 1509-1519. Curran Associates, Inc., 2017.
|
| 390 |
+
C. Xie, S. Zheng, O. Koyejo, I. Gupta, M. Li, and H. Lin. Cser: Communication-efficient sgd with error reset, 2020.
|
| 391 |
+
M. Ye and E. Abbe. Communication-Computation efficient gradient coding. Proceedings of the 35th International Conference on Machine Learning, 80:5610-5619, 2018.
|
| 392 |
+
|
| 393 |
+
Y. Yu, J. Wu, and L. Huang. Double quantization for communication-efficient distributed optimization. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 4438-4449. Curran Associates, Inc., 2019.
|
| 394 |
+
M. D. Zeiler. ADADELTA: an adaptive learning rate method. CoRR, abs/1212.5701, 2012.
|
| 395 |
+
H. Zhang, J. Li, K. Kara, D. Alistarh, J. Liu, and C. Zhang. ZipML: Training linear models with end-to-end low precision, and a little bit of deep learning. In D. Precup and Y. W. Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 4035-4043, International Convention Centre, Sydney, Australia, 06-11 Aug 2017. PMLR.
|
| 396 |
+
S. Zheng, Q. Meng, T. Wang, W. Chen, N. Yu, Z. Ma, and T. Liu. Asynchronous stochastic gradient descent with delay compensation for distributed deep learning. CoRR, abs/1609.08326, 2016.
|
| 397 |
+
S. Zheng, Z. Huang, and J. Kwok. Communication-efficient distributed blockwise momentum sgd with error-feedback. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 11450-11460. Curran Associates, Inc., 2019.
|
1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe369cdf065535a85d0dd22f870f6b1e5a37b8338de36e284ffd041d0ecb074d
|
| 3 |
+
size 529749
|
1bitadamcommunicationefficientlargescaletrainingwithadamsconvergencespeed/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:875e486ae061fabb1114602608dedf4d65a1e370c07e6d7bb456b38442fc40bb
|
| 3 |
+
size 534761
|
abitmorebayesiandomaininvariantlearningwithuncertainty/b5f69d13-2c24-4139-8208-7cdd93ba1eaa_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a02b37fbd15dd006402ff842acee34470cf53d197d827defcf973184432d28c
|
| 3 |
+
size 87633
|
abitmorebayesiandomaininvariantlearningwithuncertainty/b5f69d13-2c24-4139-8208-7cdd93ba1eaa_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65f4405fe20dc5cab07b7b76ee16c5cfcfdff43c5a5d34efcb5c558117346522
|
| 3 |
+
size 105337
|
abitmorebayesiandomaininvariantlearningwithuncertainty/b5f69d13-2c24-4139-8208-7cdd93ba1eaa_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af898ef6f15610609226032645b94dee3dfdca1444c2bf0e17d2eda13e60756f
|
| 3 |
+
size 938932
|
abitmorebayesiandomaininvariantlearningwithuncertainty/full.md
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Bit More Bayesian: Domain-Invariant Learning with Uncertainty
|
| 2 |
+
|
| 3 |
+
Zehao Xiao $^{1*}$ Jiayi Shen $^{1*}$ Xiantong Zhen $^{12}$ Ling Shao $^{2}$ Cees G. M. Snoek
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Domain generalization is challenging due to the domain shift and the uncertainty caused by the inaccessibility of target domain data. In this paper, we address both challenges with a probabilistic framework based on variational Bayesian inference, by incorporating uncertainty into neural network weights. We couple domain invariance in a probabilistic formula with the variational Bayesian inference. This enables us to explore domain-invariant learning in a principled way. Specifically, we derive domain-invariant representations and classifiers, which are jointly established in a two-layer Bayesian neural network. We empirically demonstrate the effectiveness of our proposal on four widely used cross-domain visual recognition benchmarks. Ablation studies validate the synergistic benefits of our Bayesian treatment when jointly learning domain-invariant representations and classifiers for domain generalization. Further, our method consistently delivers state-of-the-art mean accuracy on all benchmarks.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
Learning to improve the generalization of deep neural networks to data out of their training distribution remains a fundamental yet challenging problem for machine learning (Wang et al., 2018; Bengio et al., 2019; Krueger et al., 2020). Domain generalization (Muandet et al., 2013) aims to train a model on several source domains and have it generalize well to unseen target domains. The main challenge stems from the large shift of distributions between the source and target domains, which is further complicated by the prediction uncertainty (Malinin & Gales, 2018) introduced by the inaccessibility to data from the target domains during training. Established approaches learn domain-invariant features by dedicated loss functions (Muandet et al., 2013;
|
| 12 |
+
|
| 13 |
+
*Equal contribution $^{1}$ AIM Lab, University of Amsterdam, The Netherlands $^{2}$ Inception Institute of Artificial Intelligence, UAE. Correspondence to: Z. Xiao <z.xiao@uva.nl>, X. Zhen <x.zhen@uva.l>, C. Snoek <C.G.M.Snoek@uva.nl>.
|
| 14 |
+
|
| 15 |
+
Proceedings of the $38^{th}$ International Conference on Machine Learning, PMLR 139, 2021. Copyright 2021 by the author(s).
|
| 16 |
+
|
| 17 |
+
Li et al., 2018a) or specific architectures (Li et al., 2017; D'Innocente & Caputo, 2018). The state-of-the-art relies on advanced deep neural network backbones, known to degenerate when the test samples are out of the training data distribution (Nguyen et al., 2015; Ilse et al., 2019), due to their poorly calibrated behavior (Guo et al., 2017; Kristiadi et al., 2020).
|
| 18 |
+
|
| 19 |
+
Domain generalization is susceptible to uncertainty as the domain shift from the source to the target domain is unknown a priori. Hence, uncertainty should be taken into account during domain-invariant learning. As deep neural networks are commonly trained by maximum likelihood estimation, they fail to effectively capture model uncertainty. This tends to make the models overconfident in their predictions, especially on out-of-distribution data (Daxberger & Hernández-Lobato, 2019). As a possible solution, approximate Bayesian inference offers a natural framework to represent prediction uncertainty (Kristiadi et al., 2020; MacKay, 1992). It possesses better generalizability to out-of-distribution examples (Louizos & Welling, 2017) and provides an elegant formulation to transfer knowledge across different datasets (Nguyen et al., 2018). Moreover, the prediction uncertainty can be improved, even when Bayesian approximation is only applied to the last network layer (Kristiadi et al., 2020; Atanov et al., 2019). These properties make it appealing to introduce Bayesian learning into the challenging and, as of yet, unexplored scenario of domain generalization.
|
| 20 |
+
|
| 21 |
+
In this paper, we address domain generalization under a probabilistic framework<sup>1</sup>. To better explore domain-invariant learning, we introduce weight uncertainty to the model by leveraging variational Bayesian inference. To this end, we introduce the principle of domain invariance in a probabilistic formulation and incorporate it into the variational Bayesian inference framework. This enables us to explore domain invariance in a principled way to achieve domain-invariant feature representations and classifiers jointly. To better handle the domain shifts between seen and unseen domains, we explore our method under the meta-learning framework (Du et al., 2020; Balaji et al., 2018; Li & Malik, 2017). The meta-learning setting is utilized to
|
| 22 |
+
|
| 23 |
+
expose the model to domain shift and mimic the generalization process by randomly splitting source domains into several meta-source domains and a meta-target domain in each iteration. We evaluate our method on four widely-used benchmarks for cross-domain object classification. Our ablation studies demonstrate the benefit of domain-invariant learning in a probabilistic framework through its synergy with variational Bayesian inference, as well as the advantage of jointly learning domain-invariant feature extractors and classifiers for domain generalization. Our method achieves state-of-the-art mean accuracy on all four benchmarks.
|
| 24 |
+
|
| 25 |
+
# 2. Methodology
|
| 26 |
+
|
| 27 |
+
# 2.1. Preliminaries
|
| 28 |
+
|
| 29 |
+
In domain generalization, we have $\mathcal{D} = \{D_i\}_{i=1}^{|\mathcal{D}|} = \mathcal{S} \cup \mathcal{T}$ as a set of domains, where $\mathcal{S}$ and $\mathcal{T}$ denote the source and target domains, respectively. $\mathcal{S}$ and $\mathcal{T}$ do not have any overlap besides sharing the same label space. Data from the target domains $\mathcal{T}$ is never seen during training. For each domain $D_i \in \mathcal{D}$ , we define a joint distribution $p(\mathbf{x}, \mathbf{y})$ on $\mathcal{X} \times \mathcal{Y}$ , where $\mathcal{X}$ and $\mathcal{Y}$ denote the input space and output space, respectively. We aim to learn a model $f: \mathcal{X} \rightarrow \mathcal{Y}$ in the source domains $\mathcal{S}$ that generalizes well to the target domains $\mathcal{T}$ .
|
| 30 |
+
|
| 31 |
+
We address domain generalization in a probabilistic framework of Bayesian inference by introducing weight uncertainty into neural networks. To be specific, we adopt variational Bayesian inference to learn a neural network that is assumed to be parameterized by weights $\pmb{\theta}$ with a prior distribution $p(\pmb{\theta})$ and the posterior distribution $p(\pmb{\theta}|\mathbf{x},\mathbf{y})$ , where $(\mathbf{x},\mathbf{y})$ are samples from the source domain $\mathcal{S}$ . To learn the model, we seek for a variational distribution $q(\pmb{\theta})$ to approximate $p(\pmb{\theta}|\mathbf{x},\mathbf{y})$ by minimizing the Kullback-Leibler divergence $\mathbb{D}_{\mathrm{KL}}[q(\pmb{\theta})||p(\pmb{\theta}|\mathbf{x},\mathbf{y})]$ between them. This amounts to minimizing the following objective:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\mathcal {L} _ {\mathrm {B a y e s}} = - \mathbb {E} _ {q (\boldsymbol {\theta})} [ \log p (\mathbf {y} | \mathbf {x}, \boldsymbol {\theta}) ] + \mathbb {D} _ {\mathrm {K L}} [ q (\boldsymbol {\theta}) | | p (\boldsymbol {\theta}) ], (1)
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
which is also known as the negative value of the evidence lower bound (ELBO) (Blei et al., 2017). We learn the model on the source domain $S$ in the hope that it will generalize well to the target domain $\mathcal{T}$ .
|
| 38 |
+
|
| 39 |
+
Kristiadi et al. (2020) show that applying Bayesian approximation to the last layer of a neural network effectively captures model uncertainty. This is also appealing when dealing with uncertainty in domain generalization since applying Monte Carlo sampling to the full Bayesian neural network can be computationally infeasible. In this paper, to obtain a model that generalizes well across domains in an efficient way, we incorporate variational Bayesian approximation into the last two network layers to jointly establish domain-invariant feature representations and classifiers. More anal
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 1. Illustrative contrast between deterministic invariance (top) and probabilistic invariance (bottom), where colors indicate domains. The deterministic invariance tends to minimize the distance between two deterministic samples $(a\rightarrow b)$ . The samples come from their respective distributions, but with limited distributional awareness. This means that the samples cannot represent the complete distributions. Thus, the deterministic invariance can lead to small distances between samples, but large gaps between distributions, as shown in figure (b). In contrast, the probabilistic invariance directly minimizes the distance between different distributions $(c\to d)$ , which yields a better domain invariance as most of the samples in the distributions are taken into account.
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
|
| 50 |
+
yses are provided in the experiments and supplementary. To achieve better domain invariance, we introduce a domain-invariant principle in a probabilistic form under the Bayesian framework. We use $\phi$ and $\psi$ to denote the parameters of the feature extractor and classifier. We incorporate the domain-invariant principle into the inference of posteriors over $\psi$ and $\phi$ , which results in our two-layer Bayesian network. Next we detail the Bayesian domain-invariant learning of the network and the objective for optimization.
|
| 51 |
+
|
| 52 |
+
# 2.2. Bayesian Domain-Invariant Learning
|
| 53 |
+
|
| 54 |
+
Existing domain generalizations try to achieve domain invariance by minimizing the distance between intra-class samples from different domains in the hope of reducing the domain gaps (Motiian et al., 2017). However, individual samples cannot be assumed to be representative of the distributions of samples from a certain domain. Therefore, it is preferable to minimize the distributional distance of intra-class samples from different domains, which can directly narrow the domain gap. A contrastive illustration is provided in Figure 1. Motivated by this, we propose to address domain generalization under the probabilistic modeling by
|
| 55 |
+
|
| 56 |
+
incorporating weight uncertainty into invariant learning in the variational Bayesian inference framework.
|
| 57 |
+
|
| 58 |
+
We first introduce the definition of domain invariance in a probabilistic form, which we adopt to learn domain-invariant feature representations and classifiers in a unified way. We define a continuous domain space $\mathfrak{D}$ containing a set of domains $\{D_i\}_{i=1}^{|\mathcal{D}|}$ in $\mathcal{D}$ and a domain-transform function $g_{\zeta}(\cdot)$ with parameters $\zeta$ in the domain space. $\{D_i\}_{i=1}^{|\mathcal{D}|}$ are discrete samples in $\mathfrak{D}$ . Function $g_{\zeta}(\cdot)$ transforms samples $\mathbf{x}$ from a reference domain to a different domain $D_{\zeta}$ with respect to $\zeta$ , where $\zeta \sim q(\zeta)$ , and different samples $\zeta$ lead to different sample domains $D_{\zeta} \sim \mathfrak{D}$ .
|
| 59 |
+
|
| 60 |
+
As a concrete example, consider the rotation domains in Rotated MNIST (Ghifary et al., 2015). $\mathfrak{D}$ is the rotation domain space, containing images rotated by continuous angles from 0 to $2\pi$ . A sample $\mathbf{x}$ from any domain in $\mathfrak{D}$ can be transferred into a different domain $D_{\zeta}$ by:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
g _ {\zeta} (\mathbf {x}) = \left[ \begin{array}{l l} \cos (\zeta) & - \sin (\zeta) \\ \sin (\zeta) & - \cos (\zeta) \end{array} \right] \left[ \begin{array}{l} x _ {1} \\ x _ {2} \end{array} \right], \tag {2}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\zeta \sim \mathrm{Uniform}(0,2\pi)$ . $\zeta$ is the parameter of $g_{\zeta}(\cdot)$ and different $\zeta$ lead to different rotation angles of the original sample $\mathbf{x}$ , which form another domain $D_{\zeta}$ in $\mathfrak{D}$ . In practice, transformations between domains are more complicated and the exact forms of $g_{\zeta}(\cdot)$ and $q(\zeta)$ are not explicitly known.
|
| 67 |
+
|
| 68 |
+
Based on the above assumptions about $\mathfrak{D}$ , $g_{\zeta}(\cdot)$ and $q(\zeta)$ , we introduce our definition of the probabilistic form of domain invariance as follows.
|
| 69 |
+
|
| 70 |
+
Definition 2.1 (Domain Invariance) Let $\mathbf{x}_i$ be a given sample from domain $D_i$ in the domain space $\mathfrak{D}$ , and $\mathbf{x}_{\zeta} = g_{\zeta}(\mathbf{x}_i)$ be a transformation of $\mathbf{x}_i$ in another domain $D_{\zeta}$ from the same domain space, where $\zeta \sim q(\zeta)$ . $p_{\theta}(\mathbf{y}|\mathbf{x})$ denotes the output distribution of input $\mathbf{x}$ with model $\theta$ . Model $\theta$ is domain-invariant in $\mathfrak{D}$ if
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {i} \mid \mathbf {x} _ {i}\right) = p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {\zeta} \mid \mathbf {x} _ {\zeta}\right), \quad \forall \zeta \sim q (\zeta). \tag {3}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
Here, we use $\mathbf{y}$ to represent the output from a neural layer with input $\mathbf{x}$ , which can either be the prediction vector from the last layer or the feature vector from the last convolutional layer of a deep neural network.
|
| 77 |
+
|
| 78 |
+
To adopt the domain-invariant principle in the variational Bayesian inference framework, we reformulate (3) to an expectation form with respect to $q_{\zeta}$ , following Nalisnick & Smyth (2018):
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {i} \mid \mathbf {x} _ {i}\right) = \mathbb {E} _ {q _ {\zeta}} \left[ p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {\zeta} \mid \mathbf {x} _ {\zeta}\right) \right]. \tag {4}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
According to Definition 2.1, we use the Kullback-Leibler divergence between the two terms in (4),
|
| 85 |
+
|
| 86 |
+
$\mathbb{D}_{\mathrm{KL}}\left[p_{\boldsymbol{\theta}}(\mathbf{y}_i|\mathbf{x}_i)||\mathbb{E}_{q_\zeta}\left[p_{\boldsymbol{\theta}}(\mathbf{y}_\zeta |\mathbf{x}_\zeta)\right]\right],$ to quantify the domain invariance of the model, which will be zero when the model is domain invariant in the domain space $\mathfrak{D}$ . To further facilitate the computation, we derive the upper bound of the KL divergence:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\begin{array}{l} \mathbb {D} _ {\mathrm {K L}} \left[ p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {i} \mid \mathbf {x} _ {i}\right) | | \mathbb {E} _ {q _ {\zeta}} \left[ p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {\zeta} \mid \mathbf {x} _ {\zeta}\right) \right] \right] \\ \leq \mathbb {E} _ {q _ {\zeta}} \left[ \mathbb {D} _ {\mathrm {K L}} \left[ p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {i} \mid \mathbf {x} _ {i}\right) \right| | p _ {\boldsymbol {\theta}} \left(\mathbf {y} _ {\zeta} \mid \mathbf {x} _ {\zeta}\right) \right], \tag {5} \\ \end{array}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
which can be approximated by Monte Carlo sampling as we usually have access to samples from different domains. The complete derivation of (5) is provided in the supplementary material.
|
| 93 |
+
|
| 94 |
+
We now adopt the probabilistic domain invariance principle in the variational Bayesian approximation of the last two layers with parameters of $\phi$ and $\psi$ , respectively. The introduced weight uncertainty results in distributional representations $p_{\phi}(\mathbf{z}|\mathbf{x})$ and predictions $p_{\psi}(\mathbf{y}|\mathbf{z})$ , based on which we derive domain-invariant learning.
|
| 95 |
+
|
| 96 |
+
Invariant Classifier. For the classifier with parameters $\psi$ and input features $\mathbf{z}$ , the probabilistic domain-invariant property in (5) is represented as $\mathbb{E}_{q_{\zeta}}\left[\mathbb{D}_{\mathrm{KL}}[p_{\psi}(\mathbf{y}_i|\mathbf{z}_i)||p_{\psi}(\mathbf{y}_{\zeta}|\mathbf{z}_{\zeta})]\right]$ . Under the Bayesian framework, the predictive distribution $p_{\psi}(\mathbf{y}|\mathbf{z})$ is obtained by taking the expectation over the distribution of parameter $\theta$ , i.e., $p_{\psi}(\mathbf{y}|\mathbf{z}) = \mathbb{E}_{q(\psi)}[p(\mathbf{y}|\mathbf{z},\psi)]$ . As the KL divergence is a convex function (Nalisnick & Smyth, 2018), we further extend it to the upper bound:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathbb {E} _ {q _ {\zeta}} \left[ \mathbb {D} _ {\mathrm {K L}} \left[ p _ {\boldsymbol {\psi}} (\mathbf {y} _ {i} | \mathbf {z} _ {i}) | | p _ {\boldsymbol {\psi}} (\mathbf {y} _ {\zeta} | \mathbf {z} _ {\zeta}) \right] \right]
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
= \mathbb {E} _ {q _ {\zeta}} \left[ \mathbb {D} _ {\mathrm {K L}} \left[ \mathbb {E} _ {q (\psi)} [ p (\mathbf {y} _ {i} | \mathbf {z} _ {i}, \boldsymbol {\psi}) ] | | \mathbb {E} _ {q (\psi)} [ p (\mathbf {y} _ {\zeta} | \mathbf {z} _ {\zeta}, \boldsymbol {\psi}) ] \right] \right]
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\leq \mathbb {E} _ {q _ {\zeta}} \left[ \mathbb {E} _ {q (\boldsymbol {\psi})} \mathbb {D} _ {\mathrm {K L}} \left[ p \left(\mathbf {y} _ {i} \mid \mathbf {z} _ {i}, \boldsymbol {\psi}\right) | | p \left(\mathbf {y} _ {\zeta} \mid \mathbf {z} _ {\zeta}, \boldsymbol {\psi}\right) \right] \right], \tag {6}
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
which is tractable with unbiased approximation by using Monte Carlo sampling.
|
| 111 |
+
|
| 112 |
+
In practice, we estimate the expectation over $q(\zeta)$ in an empirical way. Specifically, in each iteration, we choose one domain from the source domains $\mathcal{S}$ as the meta-target domain $D_{t}$ and the rest are used as the meta-source domains $\{D_s\}_{s = 1}^S$ , where $S = |\mathcal{S}| - 1$ . Then we use a batch of samples $\mathbf{x}_s$ from each meta-source domain in the same category as $\mathbf{x}_t$ to approximate $\mathbf{x}_{\zeta} = g_{\zeta}(\mathbf{x}_t)$
|
| 113 |
+
|
| 114 |
+
Thereby, the domain-invariant classifier is established by minimizing:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\frac {1}{S N} \sum_ {s = 1} ^ {S} \sum_ {i = 1} ^ {N} \mathbb {E} _ {q (\boldsymbol {\psi})} \left[ \mathbb {D} _ {\mathrm {K L}} \left[ p \left(\mathbf {y} _ {t} \mid \mathbf {z} _ {t}, \boldsymbol {\psi}\right) | | p \left(\mathbf {y} _ {s} ^ {i} \mid \mathbf {z} _ {s} ^ {i}, \boldsymbol {\psi}\right) \right] \right], \tag {7}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\left\{\mathbf{z}_s^i\right\}_{i = 1}^N$ are representations of samples $\mathbf{x}_s$ from $D_{s}$ which are in the same category as $\mathbf{x}_t$
|
| 121 |
+
|
| 122 |
+
The variational Bayesian inference enables us to flexibly incorporate our domain invariant principle into different layers of the neural network. To enhance the domain invariance, we obtain domain-invariant representations by adopting the principle in the penultimate layer.
|
| 123 |
+
|
| 124 |
+
Invariant Representations. To obtain domain-invariant representations $p(\mathbf{z}|\mathbf{x})$ with feature extractor $\phi$ , we extend the quantification of our probabilistic domain invariance in (5) to $\mathbb{E}_{q_{\zeta}}\left[\mathbb{D}_{\mathrm{KL}}[p_{\phi}(\mathbf{z}_i|\mathbf{x}_i)||p_{\phi}(\mathbf{z}_{\zeta}|\mathbf{x}_{\zeta})]\right]$ . Based on the Bayesian layer, the probabilistic distribution of features $p_{\phi}(\mathbf{z}|\mathbf{x})$ will be a factorized Gaussian distribution if the posterior of $\phi$ is as well. We illustrate this as follows. Let $\phi$ be the last Bayesian layer in the feature extractor with a factorized Gaussian posterior and $\mathbf{x}$ be the input feature of $\phi$ . The posterior of the activation $\mathbf{z}$ is also a factorized Gaussian (Kingma et al., 2015):
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\begin{array}{l} q \left(\phi_ {i, j}\right) \sim \mathcal {N} \left(\mu_ {i, j}, \sigma_ {i, j} ^ {2}\right) \quad \forall \phi_ {i, j} \in \boldsymbol {\phi} \\ \Rightarrow p \left(z _ {j} \mid \mathbf {x}, \phi\right) \sim \mathcal {N} \left(\gamma_ {j}, \delta_ {j} ^ {2}\right), \tag {8} \\ \end{array}
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\gamma_ {j} = \sum_ {i = 1} ^ {N} x _ {i} \mu_ {i, j}, \quad \text {a n d} \quad \delta_ {j} ^ {2} = \sum_ {i = 1} ^ {N} x _ {i} ^ {2} \sigma_ {i, j} ^ {2},
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where $z_{j}$ denotes the $j$ -th element in $\mathbf{z}$ , likewise for $x_{i}$ , and $\phi_{i,j}$ denotes the element at position $(i,j)$ in $\phi$ . Thus, we assume the posterior of the last Bayesian layer in the feature extractor has a factorized Gaussian distribution. Then, it is easy to obtain the Bayesian domain invariance of the feature extractor.
|
| 135 |
+
|
| 136 |
+
In a similar way to (7), we estimate the expectation over $q(\zeta)$ empirically. Therefore, the domain-invariant representations are established by minimizing:
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\frac {1}{S N} \sum_ {s = 1} ^ {S} \sum_ {i = 1} ^ {N} \left[ \mathbb {D} _ {\mathrm {K L}} \left[ p \left(\mathbf {z} _ {t} \mid \mathbf {x} _ {t}, \phi\right) \right| | p \left(\mathbf {z} _ {s} ^ {i} \mid \mathbf {x} _ {s} ^ {i}, \phi\right) \right], \tag {9}
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
where $\{\mathbf{x}_s^i\}_{i = 1}^N$ are from $D_{s}$ , and denote the samples in the same category as $\mathbf{x}_t$ . More details and an illustration of the Bayesian domain-invariant learning are provided in the supplementary material.
|
| 143 |
+
|
| 144 |
+
# 2.3. Objective Function
|
| 145 |
+
|
| 146 |
+
Having the Bayesian treatment for the last two layers with respect to parameters $\phi$ and $\psi$ , the $\mathcal{L}_{\mathrm{Bayes}}$ in (1) is instantiated as the objective with respect to $\psi$ and $\phi$ as follows:
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\begin{array}{l} \mathcal {L} _ {\text {B a y e s}} = - \mathbb {E} _ {q (\psi)} \left[ \mathbb {E} _ {q (\phi)} [ \log p (\mathbf {y} | \mathbf {x}, \psi , \phi) ] \right] \tag {10} \\ + \mathbb {D} _ {\mathrm {K L}} [ q (\psi) | | p (\psi) ] + \mathbb {D} _ {\mathrm {K L}} [ q (\phi) | | p (\phi) ]. \\ \end{array}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
The detailed derivation of (10) is provided in the supplementary material.
|
| 153 |
+
|
| 154 |
+
By integrating (7) and (9) into (10), we obtain the Bayesian domain-invariant learning objective as follows:
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\begin{array}{l} \mathcal {L} _ {\mathrm {B I L}} = \frac {1}{L} \sum_ {\ell = 1} ^ {L} \left[ \frac {1}{M} \sum_ {m} ^ {M} [ - \log p (\mathbf {y} _ {t} | \mathbf {x} _ {t}, \boldsymbol {\psi} ^ {(\ell)}, \boldsymbol {\phi} ^ {(m)}) ] \right. \\ + \frac {1}{S N} \sum_ {s = 1} ^ {S} \sum_ {i = 1} ^ {N} \left[ \lambda_ {\boldsymbol {\psi}} \mathbb {D} _ {\mathrm {K L}} \left[ p (\mathbf {y} _ {t} | \mathbf {z} _ {t}, \boldsymbol {\psi} ^ {(\ell)}) \right| \right. | p (\mathbf {y} _ {s} ^ {i} | \mathbf {z} _ {s} ^ {i}, \boldsymbol {\psi} ^ {(\ell)}) ] \\ + \lambda_ {\phi} \mathbb {D} _ {\mathrm {K L}} [ p (\mathbf {z} _ {t} | \mathbf {x} _ {t}, \phi) | | p (\mathbf {z} _ {s} ^ {i} | \mathbf {x} _ {s} ^ {i}, \phi) ] ] \\ \left. + \mathbb {D} _ {\mathrm {K L}} [ q (\psi) | | p (\psi) ] + \mathbb {D} _ {\mathrm {K L}} [ q (\phi) | | p (\phi) ] \right], \tag {11} \\ \end{array}
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
where $\lambda_{\psi}$ and $\lambda_{\phi}$ are hyperparameters that control the domain-invariant terms. $\mathbf{x}_t$ and $\mathbf{z}_t$ denote the input and its feature from $D_{t}$ , and $\mathbf{x}_s^i$ and $\mathbf{z}_s^i$ are from $D_{s}$ . The posteriors are set to factorized Gaussian distributions, i.e., $q(\psi) = \mathcal{N}(\pmb{\mu}_{\psi},\pmb{\sigma}_{\psi}^{2})$ and $q(\phi) = \mathcal{N}(\pmb{\mu}_{\phi},\pmb{\sigma}_{\phi}^{2})$ . We adopt the reparameterization trick to draw Monte Carlo samples (Kingma & Welling, 2014) as $\psi^{(\ell)} = \pmb{\mu}_{\psi} + \epsilon^{(\ell)}*\pmb{\sigma}_{\psi}$ where $\epsilon^{(\ell)}\sim \mathcal{N}(0,I)$ . Likewise, we draw the Monte Carlo samples $\phi^{(m)}$ for $q(\phi)$ .
|
| 161 |
+
|
| 162 |
+
When implementing our Bayesian invariant learning, to increase the flexibility of the prior distribution in our Bayesian layers, we place a scale mixture of two Gaussian distributions as the priors $p(\psi)$ and $p(\phi)$ (Blundell et al., 2015):
|
| 163 |
+
|
| 164 |
+
$$
|
| 165 |
+
\pi \mathcal {N} \left(0, \sigma_ {1} ^ {2}\right) + (1 - \pi) \mathcal {N} \left(0, \sigma_ {2} ^ {2}\right), \tag {12}
|
| 166 |
+
$$
|
| 167 |
+
|
| 168 |
+
where $\sigma_{1},\sigma_{2}$ are set according to (Blundell et al., 2015) and $\pi$ is chosen by cross-validation. More experiments and analyses on the hyperparameters $\lambda_{\psi},\lambda_{\phi}$ and $\pi$ are provided in the supplementary material.
|
| 169 |
+
|
| 170 |
+
# 3. Related Work
|
| 171 |
+
|
| 172 |
+
To address the domain shifts, domain adaptation (Saenko et al., 2010; Long et al., 2015; Wang et al., 2020) and domain generalization (Muandet et al., 2013; Li et al., 2017) are the two main settings. Domain adaptation has a key assumption that the data from the target domain is accessible during training, which is often invalid in realistic applications. By contrast, no target domain data is available during training in domain generalization, which introduces more prediction uncertainty into the problem and makes it more challenging. Our method is developed specifically for domain generalization.
|
| 173 |
+
|
| 174 |
+
One solution for domain generalization is to generate more source domain data to increase the probability of covering the data in the target domains (Shankar et al., 2018; Volpi et al., 2018). Shankar et al. (2018) augment the data by perturbing the input images with adversarial gradients generated by an auxiliary classifier. Qiao et al. (2020) propose an even more challenging scenario of domain generaliza
|
| 175 |
+
|
| 176 |
+
tion named single domain generalization, which only has one source domain, and introduce an adversarial domain augmentation method that creates "fictitious" yet "challenging" data. Recently, Zhou et al. (2020) employ a generator to synthesize data from pseudo-novel domains to augment the source domains, maximizing the distance between the source and pseudo-novel domains as measured by optimal transport (Peyre & Cuturi, 2019).
|
| 177 |
+
|
| 178 |
+
Another solution for domain generalization involves learning domain-invariant features (D'Innocente & Caputo, 2018; Li et al., 2018b; 2017). Muandet et al. (2013) propose domain-invariant component analysis to learn invariant transformations by minimizing the dissimilarity across domains. Louizos et al. (2015) learn invariant representations by a variational auto-encoder (Kingma & Welling, 2014), introducing Bayesian inference into invariant feature learning. Both Dou et al. (2019) and Seo et al. (2019) achieve a similar goal by introducing two complementary losses and employing multiple normalizations. Li et al. (2019) propose an episodic training algorithm to obtain both a domain-invariant feature extractor and classifier. Zhao et al. (2020) propose entropy-regularization to learn domain-invariant features. Seo et al. (2019) and Zhou et al. (2021) design normalizations to combine different feature statistics and embed the samples into a domain-invariant feature space.
|
| 179 |
+
|
| 180 |
+
Meta-learning has also been considered for domain generalization. Li et al. (2018a) introduce a gradient-based method, i.e., model agnostic meta-learning (Finn et al., 2017), for domain generalization. Balaji et al. (2018) meta-learn a regularization function, making their model robust to domain shifts. Du et al. (2020) propose the meta-variational information bottleneck to learn domain-invariant representations through episodic training.
|
| 181 |
+
|
| 182 |
+
Gulrajani & Lopez-Paz (2020) find that with careful implementation, empirical risk minimization methods outperform many state-of-the-art models in domain generalization. They claim that model selection is non-trivial for domain generalization and algorithms for this task should specify their own model selection criteria, which is important for the completeness and comparability of the method. In this paper, we implement our method based on the pretrained ResNet-18, as done for our baseline and most methods we compare against in Section 4.
|
| 183 |
+
|
| 184 |
+
Motiian et al. (2017) previously considered representation alignment across domains in the same class. They propose a classification and contrastive semantic alignment loss based on the L2 distance between deterministic features. Different from them, we exploit Bayesian neural networks to learn domain-invariant representations by minimizing the distance between probabilistic distributions.
|
| 185 |
+
|
| 186 |
+
Bayesian neural networks have not yet been explored for
|
| 187 |
+
|
| 188 |
+
domain generalization. Our method introduces variational Bayesian approximation to both the feature extractor and classifier of the neural network in conjunction with the newly introduced domain-invariant principle for domain generalization. The resultant Bayesian domain-invariant learning combines the representational power of deep neural networks and variational Bayesian inference.
|
| 189 |
+
|
| 190 |
+
# 4. Experiments
|
| 191 |
+
|
| 192 |
+
# 4.1. Datasets and Settings
|
| 193 |
+
|
| 194 |
+
We conduct our experiments on four widely used benchmarks for domain generalization and report the mean classification accuracy on target domains.
|
| 195 |
+
|
| 196 |
+
$\mathbf{PACS}^2$ (Li et al., 2017) consists of 9,991 images of seven classes from four domains - photo, art-painting, cartoon and sketch. We follow the "leave-one-out" protocol from (Li et al., 2017; 2018b; Carlucci et al., 2019), where the model is trained on any three of the four domains, which we call source domains, and tested on the last (target) domain.
|
| 197 |
+
|
| 198 |
+
Office-Home<sup>3</sup> (Venkateswara et al., 2017) also has four domains: art, clipart, product and real-world. There are about 15,500 images of 65 categories for object recognition in office and home environments. We use the same experimental protocol as for PACS.
|
| 199 |
+
|
| 200 |
+
Rotated MNIST $^4$ and Fashion-MNIST $^5$ are introduced in (Piratla et al., 2020) for evaluating domain generalization. For fair comparison, we follow their recommended settings and randomly select a subset of 2,000 images from MNIST and 10,000 images from Fashion-MNIST, which are considered to have been rotated by $0^\circ$ . The subset of images is then rotated by $15^\circ$ through $75^\circ$ in intervals of $15^\circ$ , creating five source domains. The target domains are created by rotations of $0^\circ$ and $90^\circ$ . These datasets allow us to demonstrate the generalizability of our model by comparing its performance on in-distribution and out-of-distribution data.
|
| 201 |
+
|
| 202 |
+
Settings. For all four benchmarks, we employ a ResNet-18 (He et al., 2016) pretrained on ImageNet (Deng et al., 2009) as the backbone. During training we use Adam optimization (Kingma & Ba, 2014) with a learning rate of 0.0001, and train for 10,000 iterations. In each iteration we choose one source domain as the meta-target domain. The batch size is 128. To fit the memory footprint, we choose a maximum number of samples per category and target domain to implement the domain-invariant learning, i.e., sixteen for
|
| 203 |
+
|
| 204 |
+
Table 1. Ablation study on PACS. The “√” and “×” in the “Bayesian” column indicate whether the classifier $\psi$ and feature extractor $\phi$ are Bayesian layers or deterministic layers. In the “Invariant” column, they indicate whether the domain-invariant learning is introduced into the classifier and the feature extractor. Note that with “√” in the Bayesian column, the invariant column denotes Bayesian domain-invariant learning. Otherwise it denotes the deterministic one. The results show that both Bayesian and domain-invariant learning benefit domain generalization, but our Bayesian domain-invariant learning is better. We obtain the best performance with Bayesian domain-invariant learning in both the classifier and feature extractor. We also provide the visualizations of the features for each of the settings in Figure 2.
|
| 205 |
+
|
| 206 |
+
<table><tr><td rowspan="2">ID</td><td colspan="2">Classifier ψ</td><td colspan="2">Feature extractor φ</td><td colspan="5">PACS</td></tr><tr><td>Bayesian</td><td>Invariant</td><td>Bayesian</td><td>Invariant</td><td>Photo</td><td>Art-painting</td><td>Cartoon</td><td>Sketch</td><td>Mean</td></tr><tr><td>(a)</td><td>×</td><td>×</td><td>×</td><td>×</td><td>92.85 ±0.21</td><td>75.12 ±0.48</td><td>77.44 ±0.26</td><td>75.72 ±0.47</td><td>80.28 ±0.42</td></tr><tr><td>(b)</td><td>✓</td><td>×</td><td>×</td><td>×</td><td>93.89 ±0.29</td><td>77.88 ±0.53</td><td>78.20 ±0.39</td><td>77.75 ±0.75</td><td>81.93 ±0.22</td></tr><tr><td>(c)</td><td>×</td><td>✓</td><td>×</td><td>×</td><td>93.95 ±0.51</td><td>80.03 ±0.72</td><td>78.03 ±0.77</td><td>77.83 ±0.52</td><td>82.46 ±0.67</td></tr><tr><td>(d)</td><td>✓</td><td>✓</td><td>×</td><td>×</td><td>95.21 ±0.26</td><td>81.25 ±0.76</td><td>80.67 ±0.73</td><td>79.31 ±0.94</td><td>84.11 ±0.39</td></tr><tr><td>(e)</td><td>×</td><td>×</td><td>✓</td><td>×</td><td>92.81 ±0.35</td><td>78.66 ±0.56</td><td>77.90 ±0.40</td><td>78.72 ±0.86</td><td>82.02 ±0.26</td></tr><tr><td>(f)</td><td>×</td><td>×</td><td>×</td><td>✓</td><td>94.17 ±0.35</td><td>79.75 ±0.68</td><td>79.51 ±0.98</td><td>78.31 ±1.11</td><td>82.94 ±0.53</td></tr><tr><td>(g)</td><td>×</td><td>×</td><td>✓</td><td>✓</td><td>95.15 ±0.26</td><td>80.96 ±0.69</td><td>79.57 ±0.85</td><td>79.15 ±0.98</td><td>83.71 ±0.65</td></tr><tr><td>(h)</td><td>✓</td><td>×</td><td>✓</td><td>×</td><td>93.83 ±0.19</td><td>82.13 ±0.41</td><td>79.18 ±0.48</td><td>79.03 ±0.78</td><td>83.54 ±0.34</td></tr><tr><td>(i)</td><td>×</td><td>✓</td><td>×</td><td>✓</td><td>94.12 ±0.22</td><td>80.52 ±0.61</td><td>80.39 ±0.81</td><td>78.53 ±0.95</td><td>83.39 ±0.52</td></tr><tr><td>(j)</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>95.97 ±0.24</td><td>83.92 ±0.71</td><td>81.61 ±0.59</td><td>80.31 ±0.91</td><td>85.45 ±0.24</td></tr></table>
|
| 207 |
+
|
| 208 |
+
PACS, Rotated MNIST and Fashion-MNIST, and four for Office-Home. We select $\lambda_{\phi}$ and $\lambda_{\psi}$ based on validation set performance and summarize their influence in the supplementary material. The optimal values of $\lambda_{\phi}$ and $\lambda_{\psi}$ are 0.1 and 100. Parameters $\sigma_{1}$ and $\sigma_{2}$ in (12) are set to 0.1 and 1.5. The model with the highest validation set accuracy is employed for evaluation on the target domain.
|
| 209 |
+
|
| 210 |
+
# 4.2. Results
|
| 211 |
+
|
| 212 |
+
We first conduct an ablation study on PACS to investigate the effectiveness of our Bayesian invariant layer for domain generalization. Since the major contributions of this work are the Bayesian treatment and the probabilistic domain-invariant principle, we evaluate their effect by individually incorporating them into the classifier – the last layer – $\psi$ and the feature extractor – the penultimate layer – $\phi$ . The results are shown in Table 1, with a corresponding t-SNE visualization of the features learned by various settings in Figure 2, following Du et al. (2020). We also provide a comparison with the state-of-the-art methods on four widely used benchmarks. More results and visualizations are provided in the supplementary material.
|
| 213 |
+
|
| 214 |
+
Benefits of Bayesian Invariant Classifier. In Table 1, rows (a) to (d) demonstrate the benefits of the Bayesian invariant classifier. Row (a) serves as our baseline model, which is a vanilla deep convolutional network without any Bayesian treatment or domain-invariant loss. The backbone is also a ResNet-18 pretrained on ImageNet. Rows (b), (c) and (d) show the performance with a Bayesian classifier, a deterministic domain-invariant classifier and our Bayesian-invariant classifier. By comparing (b) and (a), it is clear
|
| 215 |
+
|
| 216 |
+
that the Bayesian treatment for the classifier improves the performance, especially in the "art-painting" and "sketch" domains. The deterministic invariant property, as shown in row (c), also benefits the performance. Nevertheless, our Bayesian invariant learning based on the probabilistic framework performs better. The results demonstrate that the Bayesian invariant learning enhances the robustness of Bayesian neural networks on out-of-distribution data and better leverages domain-invariance than the deterministic invariant model.
|
| 217 |
+
|
| 218 |
+
The three subfigures in the first row of Figure 2 also demonstrate the benefits of the Bayesian invariant classifier. The Bayesian treatment enlarges the inter-class distance in all domains, as shown in Figure 2 (b). The Bayesian layer incorporates weight uncertainty into the predictions and improves their diversity, which enhances the classification performance on the source domains as well as the generalization to the target domain. The deterministic invariant classifier tends to minimize the distance between samples with the same label. However, the effect is mainly on the source domain, without obvious impact on the target domain (pink samples), as shown in Figure 2 (c). By introducing uncertainty into both the classification and domain-invariant procedure, our Bayesian domain-invariant classifier further enlarges the inter-class distance in all domains and better generalizes the domain-invariant property to the target domain (compare Figure 2 (d) to (b) and (c)).
|
| 219 |
+
|
| 220 |
+
Benefits of Bayesian Invariant Feature Extractor. The benefit of our Bayesian domain-invariant principle for the feature extractor is demonstrated in rows (e), (f), and (g) of Table 1. Similar to the classifier, introducing Bayesian infer
|
| 221 |
+
|
| 222 |
+

|
| 223 |
+
Figure 2. Illustration of the benefit of Bayesian domain-invariant learning by visualization of the feature representations. Colors denote domains, where the target domain "art-painting" is in violet, and shapes indicate classes. Our Bayesian domain-invariant learning (shown in the right column), especially when employed in both the classifier and feature extractor $(\mathrm{jj})$ , achieves better results than the other cases shown in the ten subfigures, which correspond to the ten settings in Table 1 (identified by ID).
|
| 224 |
+
|
| 225 |
+
ence into the feature extractor (comparing row (e) with row (a)) brings a good accuracy improvement. By comparing (g) to (e) and (f), we observe that our Bayesian invariant layer achieves consistently better accuracy than the deterministic invariant model and regular Bayesian layer.
|
| 226 |
+
|
| 227 |
+
The subfigures in the second row of Figure 2 further demonstrate the effectiveness of the Bayesian domain-invariant feature extractor. Similar to the classifier, introducing the Bayesian framework into the feature extractor also enlarges the inter-class distance of all domains by introducing model uncertainty, as shown in (e). The deterministic invariant feature extractor can also minimize the intra-class distance between different domains. However, while the effect is more obvious than the deterministic domain-invariant classifier, it is still poor on the target domain (Figure 2 (f)). Compared to (e) and (f), the Bayesian invariant feature extractor in (g) tends to further maximize the inter-class distance while minimizing the intra-class distance between different domains, which obviously enlarges the inter-class distance between samples from the target domain. Since the Bayesian invariant feature extractor achieves domain invariance in a probabilistic way, more uncertainties are taken into account, enabling the model to achieve better generalization on the target domain. Note that although the Bayesian invariant classifier in (d) and feature extractor in (g) achieve
|
| 228 |
+
|
| 229 |
+
domain-invariant learning from different directions of the feature space, they both improve the performance on the target domain and do not conflict with each other.
|
| 230 |
+
|
| 231 |
+
Benefits of Synergistic Bayesian Invariant Learning. The last three rows of Table 1 show the performance when introducing Bayesian and invariant learning into both the classifier and feature extractor. Both the Bayesian learning (row (h)) and deterministic invariant learning (row (i)) in two layers perform better than introducing the corresponding properties into only one layer of the model (compared with (b), (c) and (e), (f)) on most domains, as well as in terms of mean performance. Overall, employing our Bayesian invariant layer in both the classifier and feature extractor achieves the best performance, as shown in row (j).
|
| 232 |
+
|
| 233 |
+
The last row in Figure 2 further demonstrates the benefits of synergistic Bayesian invariant learning. Incorporating the Bayesian classifier and the Bayesian feature extractor further maximizes the inter-class distance of all domains, as comparing (h) to (b) and (e). Introducing deterministic invariance into both the classifier and feature extractor also improves the domain-invariant property of features and the generalization to the target domain to some extent, as shown in subfigure (i). Moreover, by utilizing both the Bayesian domain-invariant classifier and Bayesian domain-invariant feature extractor, our method combines their benefits shown
|
| 234 |
+
|
| 235 |
+
Table 2. Performance of different priors on PACS. "Standard" denotes the standard Gaussian prior while "Mixture" denotes the scale mixture prior.
|
| 236 |
+
|
| 237 |
+
<table><tr><td>Prior</td><td>Photo</td><td>Art-painting</td><td>Cartoon</td><td>Sketch</td><td>Mean</td></tr><tr><td>Standard</td><td>95.17 ±0.25</td><td>81.95 ±0.42</td><td>79.41 ±0.82</td><td>77.88 ±0.57</td><td>83.61 ±0.12</td></tr><tr><td>Mixture</td><td>95.97 ±0.24</td><td>83.92 ±0.71</td><td>81.61 ±0.59</td><td>80.31 ±0.91</td><td>85.45 ±0.24</td></tr></table>
|
| 238 |
+
|
| 239 |
+
Table 3. Effect of more Bayesian layers on PACS. The "Bayesian" and "Invariant" columns indicate whether the penultimate layer $\phi^{\prime}$ in the feature extractor has a Bayesian and/or domain-invariant property. More Bayesian layers benefit the performance while excessive domain-invariant learning is harmful.
|
| 240 |
+
|
| 241 |
+
<table><tr><td colspan="2">φ'</td><td colspan="5">PACS</td></tr><tr><td>Bayesian</td><td>Invariant</td><td>Photo</td><td>Art-painting</td><td>Cartoon</td><td>Sketch</td><td>Mean</td></tr><tr><td>×</td><td>×</td><td>95.97 ±0.24</td><td>83.92 ±0.71</td><td>81.61 ±0.59</td><td>80.31 ±0.91</td><td>85.45 ±0.24</td></tr><tr><td>✓</td><td>×</td><td>95.69 ±0.20</td><td>83.28 ±0.74</td><td>82.06 ±0.25</td><td>81.00 ±0.55</td><td>85.51 ±0.13</td></tr><tr><td>✓</td><td>✓</td><td>95.72 ±0.29</td><td>82.33 ±0.47</td><td>81.10 ±0.73</td><td>80.67 ±1.01</td><td>84.96 ±0.34</td></tr></table>
|
| 242 |
+
|
| 243 |
+
Table 4. Comparison on PACS. Our method achieves the best performance on the "Cartoon" domain, is competitive on the other three domains and obtains the best overall mean accuracy.
|
| 244 |
+
|
| 245 |
+
<table><tr><td></td><td>Photo</td><td>Art-painting</td><td>Cartoon</td><td>Sketch</td><td>Mean</td></tr><tr><td>Baseline</td><td>92.85</td><td>75.12</td><td>77.44</td><td>75.72</td><td>80.28</td></tr><tr><td>Carlucci et al. (2019)</td><td>96.03</td><td>79.42</td><td>75.25</td><td>71.35</td><td>80.51</td></tr><tr><td>Dou et al. (2019)</td><td>94.99</td><td>80.29</td><td>77.17</td><td>71.69</td><td>81.04</td></tr><tr><td>Zhao et al. (2020)</td><td>96.65</td><td>80.70</td><td>76.40</td><td>71.77</td><td>81.38</td></tr><tr><td>Piratla et al. (2020)</td><td>94.10</td><td>78.90</td><td>75.80</td><td>76.70</td><td>81.40</td></tr><tr><td>Chattopadhyay et al. (2020)</td><td>93.35</td><td>76.90</td><td>80.38</td><td>75.21</td><td>81.46</td></tr><tr><td>Li et al. (2019)</td><td>93.90</td><td>82.10</td><td>77.00</td><td>73.00</td><td>81.50</td></tr><tr><td>Balaji et al. (2018)</td><td>95.50</td><td>83.70</td><td>77.20</td><td>70.30</td><td>81.68</td></tr><tr><td>Zhou et al. (2020)</td><td>96.20</td><td>83.30</td><td>78.20</td><td>73.60</td><td>82.83</td></tr><tr><td>Seo et al. (2019)</td><td>95.87</td><td>84.67</td><td>77.65</td><td>82.23</td><td>85.11</td></tr><tr><td>Huang et al. (2020)</td><td>95.99</td><td>83.43</td><td>80.31</td><td>80.85</td><td>85.15</td></tr><tr><td>This paper</td><td>95.97 ±0.24</td><td>83.92 ±0.71</td><td>81.61 ±0.59</td><td>80.31 ±0.91</td><td>85.45 ±0.24</td></tr></table>
|
| 246 |
+
|
| 247 |
+
in (d) and (g) and achieves the best performance, as shown in (j). This indicates the benefits of the synergy between Bayesian inference and probabilistic domain-invariant learning for domain generalization.
|
| 248 |
+
|
| 249 |
+
Effect of Scale Mixture Priors. Instead of using an uninformative diagonal Gaussian prior, we adopt the scale mixture prior (Blundell et al., 2015). To show the effect of the prior, we conduct experiments with both the standard Gaussian prior and scale mixture Gaussian prior as in (12). The results are reported in Table 2. The scale mixture prior achieves better performance on all domains. We have also done an ablation on the scaling mixture prior by changing the value of $\pi$ in (12). The prior with $\pi = 0.5$ achieves the best performance on the "cartoon" domain of PACS (Figure C.2 in supplementary), and thereby we use this value in all other experiments.
|
| 250 |
+
|
| 251 |
+
Effect of More Bayesian Layers. We also experiment with more Bayesian layers in the feature extractor, as shown in
|
| 252 |
+
|
| 253 |
+
Table 3. The settings of the model in the first row are the same as row (j) in Table 1. When introducing another Bayesian layer $\phi'$ without domain invariance into the model, as shown in the second row, the average performance improves slightly. However, if we introduce the Bayesian domain-invariant learning into $\phi'$ (third row), the overall performance deteriorates slightly. This may due to the loss of information in the features caused by the excessive use of domain-invariant learning. In addition, due to the Bayesian inference and Monte Carlo sampling, more Bayesian layers leads to higher memory usage and more computations (more detailed discussion in supplementary material). As such, we prefer to apply the Bayesian invariant learning only in the last feature extraction layer and the classifier.
|
| 254 |
+
|
| 255 |
+
State-of-the-Art Comparisons. We compare our method with the state-of-the-art on four datasets. For comprehensive comparison, we also include a vanilla deep convolutional ResNet-18 network as a baseline, without any Bayesian treatment, as done in row (a) of Table 1. The results for each
|
| 256 |
+
|
| 257 |
+
Table 5. Comparison on Office-Home. Our method achieves the best performance on the "Art" and "Clipart" domains, while being competitive on the "Product" and "Real" domains. Again we report the best overall mean accuracy.
|
| 258 |
+
|
| 259 |
+
<table><tr><td></td><td>Art</td><td>Clipart</td><td>Product</td><td>Real</td><td>Mean</td></tr><tr><td>Baseline</td><td>54.84</td><td>49.85</td><td>72.40</td><td>73.14</td><td>62.55</td></tr><tr><td>Carlucci et al. (2019)</td><td>53.04</td><td>47.51</td><td>71.47</td><td>72.79</td><td>61.20</td></tr><tr><td>Li et al. (2018b)</td><td>56.50</td><td>47.30</td><td>72.10</td><td>74.80</td><td>62.68</td></tr><tr><td>Seo et al. (2019)</td><td>59.37</td><td>45.70</td><td>71.84</td><td>74.68</td><td>62.90</td></tr><tr><td>Huang et al. (2020)</td><td>58.42</td><td>47.90</td><td>71.63</td><td>74.54</td><td>63.12</td></tr><tr><td>Zhou et al. (2020)</td><td>60.60</td><td>50.10</td><td>74.80</td><td>77.00</td><td>65.63</td></tr><tr><td>This paper</td><td>61.81 ±0.36</td><td>53.27 ±0.37</td><td>74.27 ±0.35</td><td>76.31 ±0.24</td><td>66.42 ±0.18</td></tr></table>
|
| 260 |
+
|
| 261 |
+
Table 6. Comparison on Rotated MNIST and Fashion-MNIST. In-distribution accuracy is evaluated on the test sets of MNIST and Fashion-MNIST with rotation angles of $15^{\circ}$ , $30^{\circ}$ , $45^{\circ}$ , $60^{\circ}$ and $75^{\circ}$ , while out-of-distribution accuracy is evaluated on test sets with angles of $0^{\circ}$ and $90^{\circ}$ . Our method achieves best performance on both the in-distribution and out-of-distribution test sets.
|
| 262 |
+
|
| 263 |
+
<table><tr><td></td><td colspan="2">MNIST</td><td colspan="2">Fashion-MNIST</td></tr><tr><td></td><td>In-distribution</td><td>Out-of-distribution</td><td>In-distribution</td><td>Out-of-distribution</td></tr><tr><td>Baseline</td><td>98.4</td><td>93.5</td><td>89.6</td><td>76.9</td></tr><tr><td>Dou et al. (2019)</td><td>98.2</td><td>93.2</td><td>86.9</td><td>72.4</td></tr><tr><td>Piratla et al. (2020)</td><td>98.4</td><td>94.7</td><td>89.7</td><td>78.0</td></tr><tr><td>This paper</td><td>99.0 ±0.02</td><td>96.5 ±0.08</td><td>91.5 ±0.10</td><td>83.5 ±0.63</td></tr></table>
|
| 264 |
+
|
| 265 |
+
dataset are reported in Tables 4, 5 and 6.
|
| 266 |
+
|
| 267 |
+
On PACS, in Table 4, our method achieves the best mean accuracy. For each individual domain, we are competitive with the state-of-the-art and even exceed all other methods on the "cartoon" domain. On Office-Home, in Table 5, we again achieve the best mean accuracy. It is worth mentioning that on the most challenging "art" and "clipart" domains, we also deliver the highest accuracy, with a good improvement over previous methods. However, Zhou et al. (2020) and Seo et al. (2019) outperform the proposed model on some domains of PACS and Office-Home. In (Zhou et al., 2020), the source domains are augmented by a generator that synthesizes data from pseudo-novel domains, which often have similar characteristics with the source data. This pays off when the target data also has similar characteristics to the source domains, as the pseudo domains are more likely to cover the target domain, as can be seen for "product" and "real world" in Office-Home and "photo" in PACS. When the test domain is different from all of the training domains the performance suffers, e.g., "clipart" in Office-Home and "sketch" in PACS. We highlight that our method generates domain-invariant representations and classifiers, resulting in competitive results across all domains and overall. In addition, Seo et al. (2019) combine batch and instance normalization for domain generalization. This tactic is effective on PACS, but less so on Office-Home. We attribute this to the larger number of categories in Office-Home, where instance normalization is known to make features less discriminative with respect to object categories (Seo et al., 2019). In contrast, our Bayesian domain-invariant learning establishes
|
| 268 |
+
|
| 269 |
+
domain-invariant features and predictions in a probabilistic form by introducing uncertainty into the model, resulting in good performance on both PACS and Office-Home.
|
| 270 |
+
|
| 271 |
+
On Rotated MNIST and Fashion-MNIST, following the experimental settings in Piratla et al. (2020), we evaluate our method on the in-distribution and out-of-distribution sets. As shown in Table 6, our method achieves the best performance on both sets of the two datasets. In particular, our method improves the classification performance on the out-of-distribution sets, demonstrating its strong generalizability to unseen domains, which is also consistent with the findings in Figure 2.
|
| 272 |
+
|
| 273 |
+
# 5. Conclusion
|
| 274 |
+
|
| 275 |
+
In this work, we propose a variational Bayesian learning framework for domain generalization. We introduce Bayesian neural networks into the model, which are able to better represent uncertainty and enhance the generalization to out-of-distribution data. To handle the domain shift between source and target domains, we propose a domain-invariant principle under the variational inference framework, which is incorporated by establishing a domain-invariant feature extractor and classifier. Our method combines the representational power of deep neural networks and uncertainty modeling ability of Bayesian learning, demonstrating effectiveness for domain generalization. Ablation studies further validate these benefits. Our Bayesian invariant learning sets a new state-of-the-art on four domain generalization benchmarks.
|
| 276 |
+
|
| 277 |
+
# References
|
| 278 |
+
|
| 279 |
+
Atanov, A., Ashukha, A., Struminsky, K., Vetrov, D., and Welling, M. The deep weight prior. In International Conference on Learning Representations, 2019.
|
| 280 |
+
Balaji, Y., Sankaranarayanan, S., and Chellappa, R. Metareg: Towards domain generalization using meta-regularization. In Advances in Neural Information Processing Systems, pp. 998-1008, 2018.
|
| 281 |
+
Bengio, Y., Deleu, T., Rahaman, N., Ke, N. R., Lachapelle, S., Bilaniuk, O., Goyal, A., and Pal, C. A meta-transfer objective for learning to disentangle causal mechanisms. In International Conference on Learning Representations, 2019.
|
| 282 |
+
Blei, D. M., Kucukelbir, A., and McAuliffe, J. D. Variational inference: A review for statisticians. Journal of the American Statistical Association, 112(518):859-877, 2017.
|
| 283 |
+
Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra, D. Weight uncertainty in neural networks. ArXiv, abs/1505.05424, 2015.
|
| 284 |
+
Carlucci, F. M., D'Innocente, A., Bucci, S., Caputo, B., and Tommasi, T. Domain generalization by solving jigsaw puzzles. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2229-2238, 2019.
|
| 285 |
+
Chattopadhyay, P., Balaji, Y., and Hoffman, J. Learning to balance specificity and invariance for in and out of domain generalization. arXiv preprint arXiv:2008.12839, 2020.
|
| 286 |
+
Daxberger, E. and Hernández-Lobato, J. M. Bayesian variational autoencoders for unsupervised out-of-distribution detection. arXiv preprint arXiv:1912.05651, 2019.
|
| 287 |
+
Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 248-255, 2009.
|
| 288 |
+
Dou, Q., de Castro, D. C., Kamnitsas, K., and Glocker, B. Domain generalization via model-agnostic learning of semantic features. In Advances in Neural Information Processing Systems, pp. 6450-6461, 2019.
|
| 289 |
+
Du, Y., Xu, J., Xiong, H., Qiu, Q., Zhen, X., Snoek, C. G. M., and Shao, L. Learning to learn with variational information bottleneck for domain generalization. In European Conference on Computer Vision, 2020.
|
| 290 |
+
D'Innocente, A. and Caputo, B. Domain generalization with domain-specific aggregation modules. In German Conference on Pattern Recognition, pp. 187-198. Springer, 2018.
|
| 291 |
+
|
| 292 |
+
Finn, C., Abbeel, P., and Levine, S. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pp. 1126-1135, 2017.
|
| 293 |
+
Ghifary, M., Bastiaan Kleijn, W., Zhang, M., and Balduzzi, D. Domain generalization for object recognition with multi-task autoencoders. In IEEE International Conference on Computer Vision, pp. 2551-2559, 2015.
|
| 294 |
+
Gulrajani, I. and Lopez-Paz, D. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020.
|
| 295 |
+
Guo, C., Pleiss, G., Sun, Y., and Weinberger, K. Q. On calibration of modern neural networks. In International Conference on Machine Learning, pp. 1321-1330, 2017.
|
| 296 |
+
He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 770-778, 2016.
|
| 297 |
+
Huang, Z., Wang, H., Xing, E. P., and Huang, D. Self-challenging improves cross-domain generalization. arXiv preprint arXiv:2007.02454, 2020.
|
| 298 |
+
Ilse, M., Tomczak, J. M., Louizos, C., and Welling, M. Diva: Domain invariant variational autoencoders. arXiv preprint arXiv:1905.10427, 2019.
|
| 299 |
+
Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 300 |
+
Kingma, D. P. and Welling, M. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014.
|
| 301 |
+
Kingma, D. P., Salimans, T., and Welling, M. Variational dropout and the local reparameterization trick. In Advances in neural information processing systems, pp. 2575-2583, 2015.
|
| 302 |
+
Kristiadi, A., Hein, M., and Hennig, P. Being Bayesian, even just a bit, fixes overconfidence in relu networks. arXiv preprint arXiv:2002.10118, 2020.
|
| 303 |
+
Krueger, D., Caballero, E., Jacobsen, J.-H., Zhang, A., Binas, J., Priol, R. L., and Courville, A. Out-of-distribution generalization via risk extrapolation (rex). arXiv preprint arXiv:2003.00688, 2020.
|
| 304 |
+
Li, D., Yang, Y., Song, Y.-Z., and Hospedales, T. M. Deeper, broader and artier domain generalization. In IEEE International Conference on Computer Vision, pp. 5542-5550, 2017.
|
| 305 |
+
Li, D., Yang, Y., Song, Y.-Z., and Hospedales, T. M. Learning to generalize: Meta-learning for domain generalization. In AAAI Conference on Artificial Intelligence, 2018a.
|
| 306 |
+
|
| 307 |
+
Li, D., Zhang, J., Yang, Y., Liu, C., Song, Y.-Z., and Hesperales, T. M. Episodic training for domain generalization. In IEEE/CVF International Conference on Computer Vision, pp. 1446-1455, 2019.
|
| 308 |
+
Li, H., Jialin Pan, S., Wang, S., and Kot, A. C. Domain generalization with adversarial feature learning. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 5400-5409, 2018b.
|
| 309 |
+
Li, K. and Malik, J. Learning to optimize. In International Conference on Learning Representations, 2017.
|
| 310 |
+
Long, M., Cao, Y., Wang, J., and Jordan, M. Learning transferable features with deep adaptation networks. In International Conference on Machine Learning, pp. 97-105. PMLR, 2015.
|
| 311 |
+
Louizos, C. and Welling, M. Multiplicative normalizing flows for variational bayesian neural networks. In International Conference on Machine Learning, pp. 2218-2227, 2017.
|
| 312 |
+
Louizos, C., Swersky, K., Li, Y., Welling, M., and Zemel, R. The variational fair autoencoder. arXiv preprint arXiv:1511.00830, 2015.
|
| 313 |
+
MacKay, D. J. The evidence framework applied to classification networks. Neural computation, 4(5):720-736, 1992.
|
| 314 |
+
Malinin, A. and Gales, M. Predictive uncertainty estimation via prior networks. In Advances in Neural Information Processing Systems, pp. 7047-7058, 2018.
|
| 315 |
+
Motiian, S., Piccirilli, M., Adjeroh, D. A., and Doretto, G. Unified deep supervised domain adaptation and generalization. In IEEE International Conference on Computer Vision, pp. 5715-5725, 2017.
|
| 316 |
+
Muandet, K., Balduzzi, D., and Scholkopf, B. Domain generalization via invariant feature representation. In International Conference on Machine Learning, pp. 10-18, 2013.
|
| 317 |
+
Nalisnick, E. and Smyth, P. Learning priors for invariance. In International Conference on Artificial Intelligence and Statistics, pp. 366-375, 2018.
|
| 318 |
+
Nguyen, A., Yosinski, J., and Clune, J. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 427-436, 2015.
|
| 319 |
+
Nguyen, C. V., Li, Y., Bui, T. D., and Turner, R. E. Variational continual learning. In International Conference on Learning Representations, 2018.
|
| 320 |
+
|
| 321 |
+
Peyre, G. and Cuturi, M. Computational optimal transport: With applications to data science. Foundations and Trends® in Machine Learning, 11(5-6):355-607, 2019.
|
| 322 |
+
Piratla, V., Netrapalli, P., and Sarawagi, S. Efficient domain generalization via common-specific low-rank decomposition. arXiv preprint arXiv:2003.12815, 2020.
|
| 323 |
+
Qiao, F., Zhao, L., and Peng, X. Learning to learn single domain generalization. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12556-12565, 2020.
|
| 324 |
+
Saenko, K., Kulis, B., Fritz, M., and Darrell, T. Adapting visual category models to new domains. In European Conference on Computer Vision, pp. 213-226, 2010.
|
| 325 |
+
Seo, S., Suh, Y., Kim, D., Han, J., and Han, B. Learning to optimize domain specific normalization for domain generalization. arXiv preprint arXiv:1907.04275, 2019.
|
| 326 |
+
Shankar, S., Piratla, V., Chakrabarti, S., Chaudhuri, S., Jyothi, P., and Sarawagi, S. Generalizing across domains via cross-gradient training. arXiv preprint arXiv:1804.10745, 2018.
|
| 327 |
+
Venkateswara, H., Eusebio, J., Chakraborty, S., and Panchanathan, S. Deep hashing network for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 5018-5027, 2017.
|
| 328 |
+
Volpi, R., Namkoong, H., Sener, O., Duchi, J. C., Murino, V., and Savarese, S. Generalizing to unseen domains via adversarial data augmentation. In Advances in Neural Information Processing Systems, pp. 5334-5344, 2018.
|
| 329 |
+
Wang, H., He, Z., Lipton, Z. C., and Xing, E. P. Learning robust representations by projecting superficial statistics out. In International Conference on Learning Representations, 2018.
|
| 330 |
+
Wang, Z., Cheng, X., Sapiro, G., and Qiu, Q. A dictionary approach to domain-invariant learning in deep networks. In Advances in Neural Information Processing Systems, 2020.
|
| 331 |
+
Zhao, S., Gong, M., Liu, T., Fu, H., and Tao, D. Domain generalization via entropy regularization. Advances in Neural Information Processing Systems, 33, 2020.
|
| 332 |
+
Zhou, K., Yang, Y., Hospedales, T., and Xiang, T. Learning to generate novel domains for domain generalization. arXiv preprint arXiv:2007.03304, 2020.
|
| 333 |
+
Zhou, K., Yang, Y., Qiao, Y., and Xiang, T. Domain generalization with mixstyle. In International Conference on Learning Representations, 2021.
|
abitmorebayesiandomaininvariantlearningwithuncertainty/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7e42afb031eb5cda0a040905db0603a3585a094647a815c70236a50144f97a6
|
| 3 |
+
size 544947
|
abitmorebayesiandomaininvariantlearningwithuncertainty/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cdfd23999b966fdec049560bd73d97370f9398f0975b4fe355808d725839ffa3
|
| 3 |
+
size 468258
|
acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/1759542a-2ec1-468a-bc92-fb02d0d16f4a_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91199d5063c880736b0dfa49428dad29410c0890cd6a8e8c8472b70765255024
|
| 3 |
+
size 92800
|
acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/1759542a-2ec1-468a-bc92-fb02d0d16f4a_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22d7ed6f8db1e067d89b741b51464e49273d143fc94ec01345ee7c3226f86866
|
| 3 |
+
size 113813
|
acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/1759542a-2ec1-468a-bc92-fb02d0d16f4a_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d54856c5f1fc09c148d955540e9399a3d17d95e51f69a657128ea8434b66a8f
|
| 3 |
+
size 519120
|
acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/full.md
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Collective Learning Framework to Boost GNN Expressiveness for Node Classification
|
| 2 |
+
|
| 3 |
+
Mengyue Hang<sup>1</sup> Jennifer Neville<sup>1</sup> Bruno Ribero<sup>1</sup>
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Collective Inference (CI) is a procedure designed to boost weak relational classifiers, specially for node classification tasks. Graph Neural Networks (GNNs) are strong classifiers that have been used with great success. Unfortunately, most existing practical GNNs are not most-expressive (universal). Thus, it is an open question whether one can improve strong relational node classifiers, such as GNNs, with CI. In this work, we investigate this question and propose collective learning for GNNs—a general collective classification approach for node representation learning that increases their representation power. We show that previous attempts to incorporate CI into GNNs fail to boost their expressiveness because they do not adapt CI's Monte Carlo sampling to representation learning. We evaluate our proposed framework with a variety of state-of-the-art GNNs. Our experiments show a consistent, significant boost in node classification accuracy—regardless of the choice of underlying GNN—for inductive node classification in partially-labeled graphs, across five real-world network datasets.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
A large body of work in relational learning focuses on collective classification frameworks for strengthening poorly-expressive (i.e., local) relational node classifiers (e.g., relational logistic regression, naive Bayes, decision trees (Neville et al., 2003a)), by incorporating dependencies among node labels and propagating inferences during classification to improve performance, particularly in semi-supervised settings (Koller et al., 2007; Pfeiffer III et al., 2015; Xiang & Neville, 2008). However, a long-standing open question is when/if collective inference is needed, par
|
| 12 |
+
|
| 13 |
+
$^{1}$ Department of Computer Science, Purdue University, West Lafayette, Indiana, USA. Correspondence to: Mengyue Hang <hangm@purdue.edu>.
|
| 14 |
+
|
| 15 |
+
Proceedings of the $38^{th}$ International Conference on Machine Learning, PMLR 139, 2021. Copyright 2021 by the author(s).
|
| 16 |
+
|
| 17 |
+
ticularly as more expressive relational graph models become available, e.g., Graph Neural Networks (GNNs).
|
| 18 |
+
|
| 19 |
+
Despite the recent success of GNNs at node and graph classification tasks (Hamilton et al., 2017; Kipf & Welling, 2016; Luan et al., 2019; Xu et al., 2018), these GNNs are no more powerful than the Weisfeiler-Lehman (WL) graph isomorphism test, and thus, inherit its shortcomings. In other words, existing GNNs are not universal (most-expressive) graph representations (Chen et al., 2019; Morris et al., 2019; Murphy et al., 2019; Xu et al., 2018). This implies that these GNNs (which we refer to as WL-GNNs and also includes GCNs (Kipf & Welling, 2016)) are not expressive enough for some node classification tasks, since their representation can provably fail to distinguish non-isomorphic nodes with different labels.
|
| 20 |
+
|
| 21 |
+
While recently there has been increasing interest in developing more expressive WL-GNNs for graph classification tasks that can differentiate non-isomorphic graphs by considering higher-order GNNs (e.g. (Maron et al., 2019a; Bouritsas et al., 2020; Vignac et al., 2020; Azizian & Lelarge, 2021; Beaini et al., 2020), these methods primarily consider graph-level representations and, even when they can be adapted for node-level classification tasks, they would be computationally expensive to apply. Is there a easy-to-implement add-on procedure to existing WL-GNNs that can boost their node classification expressiveness?
|
| 22 |
+
|
| 23 |
+
To address this question, in this work, we theoretically and empirically investigate the potential for collective inference to improve the expressiveness of GNNs. We devise an add-on training and inference procedure, which we denote collective learning, that incorporates label dependencies among neighboring nodes via predicted label sampling—akin to how collective classification improves not-so-expressive classifiers—and show that it can improve the expressiveness of any WL-GNN.
|
| 24 |
+
|
| 25 |
+
# Contributions:
|
| 26 |
+
|
| 27 |
+
- We propose $CL + GNN$ , an add-on collective learning framework to GNNs that provably boosts their expressiveness for node classification tasks, beyond that of an optimal WL-GNN*. $CL + GNN$ uses self-supervised
|
| 28 |
+
|
| 29 |
+
learning and Monte Carlo sampled embeddings to incorporate node labels during inductive learning—and it can be implemented with any component GNN.
|
| 30 |
+
|
| 31 |
+
We provide theoretical analysis of $CL + GNN$
|
| 32 |
+
|
| 33 |
+
- Theorem 1 shows that collective classification is provably unnecessary for GNNs that are most-expressive.
|
| 34 |
+
- Since WL-GNNs are not most-expressive, Theorem 2 and Proposition 1 show that $CL + GNN$ boosts the expressiveness of optimal WL-GNN and practical WL-GNNs.
|
| 35 |
+
- Corollary 1 shows that previous attempts to incorporate collective inference into WL-GNNs (which in contrast to $CL + GNN$ do not Monte Carlo sample embeddings) cannot increase expressivity beyond that of an optimal WL-GNN.
|
| 36 |
+
|
| 37 |
+
- We design and conduct extensive experiments to confirm the above theoretical claims. $CL + GNN$ achieves a consistent improvement of node classification accuracy, across a variety of state-of-the-art WL-GNNs, for tasks involving unlabeled and partially-labeled test graphs. Our ablation study demonstrates the effectiveness of our approach incorporating collective learning in GNNs via self-supervised learning with Monte Carlo sampling of embeddings.
|
| 38 |
+
|
| 39 |
+
# 2. Problem Formulation
|
| 40 |
+
|
| 41 |
+
We consider the problem of inductive node classification across partially-labeled graphs, which takes as input a graph $G^{(\mathrm{tr})} = (V^{(\mathrm{tr})}, E^{(\mathrm{tr})}, \mathbf{X}^{(\mathrm{tr})}, \mathbf{Y}_L^{(\mathrm{tr})})$ for training, where $V^{(\mathrm{tr})}$ is a set of $n^{(\mathrm{tr})}$ vertices, $E^{(\mathrm{tr})} \subset V^{(\mathrm{tr})} \times V^{(\mathrm{tr})}$ is a set of edges with adjacency matrix $\mathbf{A}^{(\mathrm{tr})}$ , $\mathbf{X}^{(\mathrm{tr})}$ is a $n^{(\mathrm{tr})} \times p$ matrix containing node attributes as $p$ -dimensional vectors, and $\mathbf{Y}_L^{(\mathrm{tr})}$ is a set of observed labels (with $C$ classes) of a connected set of nodes $V_L^{(\mathrm{tr})} \subset V^{(\mathrm{tr})}$ , where $V_L^{(\mathrm{tr})}$ is assumed to be a proper subset of $V^{(\mathrm{tr})}$ , noting that $V_L^{(\mathrm{tr})} \neq \emptyset$ . Let $\mathbf{Y}_U^{(\mathrm{tr})}$ be the unknown labels of nodes $V_U^{(\mathrm{tr})} = V^{(\mathrm{tr})} \setminus V_L^{(\mathrm{tr})}$ . The goal is to learn a joint model of $\mathbf{Y}_U^{(\mathrm{tr})} \sim P(\mathbf{Y}_U | G^{(\mathrm{tr})})$ and apply this same model to predict hidden labels $\mathbf{Y}_U^{(\mathrm{te})}$ in another test graph $G^{(\mathrm{te})}$ , i.e., $\hat{\mathbf{Y}}_U^{(\mathrm{te})} = \arg \max_{\mathbf{Y}_U} P(\mathbf{Y}_U | G^{(\mathrm{te})})$ . The test graph $G^{(\mathrm{te})}$ can be partially labeled or unlabeled so $V_L^{(\mathrm{te})} \supseteq \emptyset$ .
|
| 42 |
+
|
| 43 |
+
Graph Neural Networks (GNNs), which aggregate node attribute information to produce node representations, have been successfully used for this task. At the same time, relational machine learning (RML) methods, which use collective inference to boost the performance of local node
|
| 44 |
+
|
| 45 |
+
pressive version of a GNN-one that has the same distinguishing power as a Weisfeiler-Lehman test. Note this is not a universal graph representation.
|
| 46 |
+
|
| 47 |
+
classifiers via (predicted) label dependencies, have also been successfully applied to this task.
|
| 48 |
+
|
| 49 |
+
Since state-of-the-art GNNs are not most-expressive for node classification (Morris et al., 2019; Xu et al., 2018), collective classification ideas may help to improve the expressiveness of GNNs. In particular, collective inference methods often sample predicted labels (conditioned on observed labels) to improve the local representation around nodes and approximate the joint distribution $P(\mathbf{Y}_U|G^{(\mathrm{te})})$ . We also know from recent research that sampling randomized features can boost GNN expressiveness (Murphy et al., 2019). This leads to the key conjecture of this work Hypothesis 1, which we prove theoretically in Section 4 and validate empirically by extensive experimentation in Section 5.
|
| 50 |
+
|
| 51 |
+
Hypothesis 1. Since current Graph Neural Networks (e.g. GCN, GraphSAGE, TK-GCN) cannot produce most expressive graph representations, collective learning (which takes label dependencies into account via Monte Carlo sampling) can improve the accuracy of node classification by producing a more expressive graph representation.
|
| 52 |
+
|
| 53 |
+
Why? Because WL-GNNs can extract more information about local neighborhood dependencies via sampling (Murphy et al., 2019), and sampling predicted labels allows GNNs to pay attention to the relationship between node attributes, the graph topology, and label dependencies in local neighborhoods. With collective learning, GNNs will be able to incorporate more information into the estimated joint label distribution. Next, we describe our collective learning framework.
|
| 54 |
+
|
| 55 |
+
# 3. Proposed Framework: Collective Learning
|
| 56 |
+
|
| 57 |
+
In this section, we outline $CL + GNN$ . It is a general framework to incorporate any GNN, and combines self-supervised learning approach and Monte Carlo embedding sampling in an iterative process to improve inductive learning on partially labeled graphs.
|
| 58 |
+
|
| 59 |
+
Specifically, given a partially labeled training graph $G^{(\mathrm{tr})} = (V^{(\mathrm{tr})}, E^{(\mathrm{tr})}, \mathbf{X}^{(\mathrm{tr})}, \mathbf{Y}_L^{(\mathrm{tr})})$ with adjacency matrix $\mathbf{A}^{(\mathrm{tr})}$ and a partially-labeled test graph $G^{(\mathrm{te})} = (V^{(\mathrm{te})}, E^{(\mathrm{te})}, \mathbf{X}^{(\mathrm{te})}, \mathbf{Y}_L^{(\mathrm{te})})$ with adjacency matrix $\mathbf{A}^{(\mathrm{te})}$ . The goal of inductive node classification task is to train a joint model on $G^{(\mathrm{tr})}$ to learn $P(\mathbf{Y}_U|G^{(\mathrm{tr})})$ and apply it to $G^{(\mathrm{te})}$ by replacing the input graph $G^{(\mathrm{tr})}$ with $G^{(\mathrm{te})}$ . Suppose the graphs $G^{(\mathrm{tr})}$ and $G^{(\mathrm{te})}$ , we can define $\mathbf{Y}_L^{(\mathrm{tr})}$ as a binary (0-1) matrix of dimension $|V^{(\mathrm{tr})}| \times C$ , and $\mathbf{Y}_L^{(\mathrm{te})}$ of dimension $|V^{(\mathrm{te})}| \times C$ , where the rows corresponding to the one-hot encoding of the (available) labels.
|
| 60 |
+
|
| 61 |
+
(Background) GNN and representation learning. Given a partially labeled graphs $G^{(\mathrm{tr})}$ , WL-GNNs generate node representation by propagating feature information through-
|
| 62 |
+
|
| 63 |
+
# At iteration t:
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Step 1: Sample a $|\mathbf{V}|$ -dim binary mask
|
| 67 |
+
Step 2: Obtain label prediction $\hat{Y}^{(t - 1)}$
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
if $t = 1$ , go to step 4
|
| 71 |
+
|
| 72 |
+
Step 3: Average CLGNN representation
|
| 73 |
+
Figure 1: CLGNN model framework. Each iteration consists of four steps: (Step 1) Sample a random mask; (Step 2) Obtain predicted label distribution using the WL-GNN structure; (Step 3) Sample predicted labels for whatever nodes are masked, use again as input to the WL-GNN and average representations over the sampled predicted labels; (Step 4) Perform one optimization step by minimizing a negative log-likelihood upper bound.
|
| 74 |
+

|
| 75 |
+
labels used in GNN input
|
| 76 |
+
|
| 77 |
+

|
| 78 |
+
no label (all-zero)
|
| 79 |
+
true label
|
| 80 |
+
predicted label
|
| 81 |
+
|
| 82 |
+
out the graph. Specifically, $\forall v\in V^{(\mathrm{tr})}$
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
P \left(\mathbf {Y} _ {v} \mid \mathbf {X} ^ {\text {(t r)}}, \mathbf {Y} _ {L} ^ {\text {(t r)}}, \mathbf {A} ^ {\text {(t r)}}\right) = \sigma \left(\mathbf {W} \mathbf {Z} _ {v} + \mathbf {b}\right), \tag {1}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $Z_v = \mathrm{GNN}(X^{(\mathrm{tr})}, A^{(\mathrm{tr})}; \Theta)_v$ is the GNN representation of node $v$ , $\sigma(\cdot)$ is the softmax activation, and $\Theta, W$ and $b$ are model parameters, which are learned by minimizing the cross-entropy loss between true labels $Y_L^{(\mathrm{tr})}$ and the predicted labels.
|
| 89 |
+
|
| 90 |
+
The collective learning framework. Following Hypothesis 1, we propose Collective Learning GNNs $(CL + GNN)$ , which includes label information as input to GNNs to produce a more expressive representation. The overall framework follows four steps: (Step 1) Sample a random binary mask to include true labels (if available) in the input; (Step 2) Obtain predicted label distribution using the WL-GNN structure; (Step 3) Sample predicted labels for whatever nodes are masked, combine with available true labels (if any), and use again as input to the WL-GNN; finally average representations of the WL-GNN over the sampled predicted labels; (Step 4) Perform one optimization step by minimizing a negative log-likelihood upper bound. These steps are shown in Figure 1. Collective learning for WL-GNNs then consists of iterating over Steps 1-4 for $t = 1,\dots,T$ iterations. Finally, once optimized, we perform inference via Monte Carlo estimates.
|
| 91 |
+
|
| 92 |
+
$CL + GNN$ loss and its representation averaging. The input to GNNs is typically the full graph $G^{(\mathrm{tr})}$ . If we included the observed labels $\mathbf{Y}_L^{(\mathrm{tr})}$ directly in the input, then it would be trivial to learn a model that predicts part of the input. Instead, we either (scenario test-unlabeled) mask all label inputs if the test graph $G^{(\mathrm{te})}$ is expected to be unlabeled; or (scenario test-partial) if $G^{(\mathrm{te})}$ is expected to have partial labels, we apply a mask to the labels we wish to predict in training so they do not appear in the input $\mathbf{Y}_L^{(\mathrm{tr})}$ .
|
| 93 |
+
|
| 94 |
+
Specifically, at the $t$ -th step of our optimization--these steps can be coarser than a gradient step -- we either (scenario test-partial) sample a mask $\pmb{M}^{(t)}\sim$ Uniform $(\mathcal{M})$ or (scenario test-unlabeled) set $\pmb{M}^{(t)} = \pmb{0}$ . For now, we assume we can sample $\hat{\mathbf{Y}}^{(t - 1)} = (\hat{\mathbf{Y}}_v^{(t - 1)})_{v\in V^{(\mathrm{tr})}}$ from an estimate of the distribution $P(\pmb{Y}_v^{\mathrm{(tr)}}|\pmb{X}^{\mathrm{(tr)}},\pmb{Y}_L^{\mathrm{(tr)}}\odot \pmb{M}^{(t)},\pmb{A}^{\mathrm{(tr)}})$ --we will come back to this assumption soon. Let $\pmb{X}_{\pmb{Y}_L^{\mathrm{(tr)}},\hat{\pmb{Y}}^{(t - 1)},\pmb{M}^{(t)}}^{\mathrm{(tr)}}$ be the matrix concatenation between $\pmb{Y}_{L}^{\mathrm{(tr)}}\odot \pmb{M}^{(t)} + \hat{\pmb{Y}}^{(t - 1)}\odot \overline{\pmb{M}}^{(t)}$ and $\pmb{X}^{\mathrm{(tr)}}$ , where again $\overline{\boldsymbol{M}} := \mathbf{1} - \boldsymbol{M}$ is the bitwise negated matrix of $\boldsymbol{M}$ . Let
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\boldsymbol {Z} _ {v} ^ {(t)} \left(\boldsymbol {M} ^ {(t)}; \Theta\right) = \mathbb {E} _ {\hat {\boldsymbol {Y}} ^ {(t - 1)}} \left[ \operatorname {G N N} \left(\boldsymbol {X} _ {\boldsymbol {Y} _ {L} ^ {(\mathrm {t r})}, \hat {\boldsymbol {Y}} ^ {(t - 1)}, \boldsymbol {M} ^ {(t)}}, \boldsymbol {A} ^ {(\mathrm {t r})}; \Theta\right) _ {v} \right], \tag {2}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where GNN represents an arbitrary graph neural network model and $Z_v^t$ is the $CL + GNN$ 's representation obtained for node $v \in V^{(\mathrm{tr})}$ at step $t \geq 1$ .
|
| 101 |
+
|
| 102 |
+
Our optimization is defined over the expectation of $Z_v^{(t)}(M^{(t)})$ w.r.t. to the sampled predicted labels $\hat{Y}^{(t - 1)}$ (Equation (2)) and over a loss averaged over all sampled masks (noting that the case where $M^{(t)} = 0$ is trivial):
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\begin{array}{l} \Theta_ {t}, \mathbf {W} _ {t}, \mathbf {b} _ {t} = \underset {\Theta , \mathbf {W}, \mathbf {b}} {\arg \max } \mathbb {E} _ {\boldsymbol {M} ^ {(t)}} \left[ \sum_ {v \in V _ {L} ^ {(\mathrm {t r})}} \overline {{\boldsymbol {M}}} _ {v} ^ {(t)} \right. \tag {3} \\ \left. \times \log \sigma \left(\mathbf {W} Z _ {v} ^ {(t)} \left(M ^ {(t)}; \Theta\right) + \mathbf {b}\right) _ {y _ {v} ^ {(\mathrm {t r})}} \right], \\ \end{array}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where again, $\sigma (\cdot)$ is the softmax activation function, and $V_{L}^{(\mathrm{tr})}$ are the labeled nodes in training graph.
|
| 109 |
+
|
| 110 |
+
Stochastic optimization of Equation (3). Equation (3) is based on a pseudolikelihood, where the joint distribution of the labels $\{\mathbf{Y}_v^{\mathrm{(tr)}}:v\in V_L^{\mathrm{(tr)}}\mathrm{s.t.}\overline{\mathcal{M}}_v^{(t)} = 1\}$ is decomposed as marginal distributions resulting in the sum over $V_{L}^{\mathrm{(tr)}}$
|
| 111 |
+
|
| 112 |
+
(Step 1) Sample a binary mask In (scenario test-partial), where $G^{(\mathrm{te})}$ is expected to have some observed labels, we randomly sample a binary mask $M \sim \mathrm{Uniform}(\mathcal{M})$ from a set of masks, where $M$ is a $|V^{(\mathrm{tr})}| \times C$ binary (0-1) matrix with the same $|V^{(\mathrm{tr})}|$ -dimensional vector in each column. By applying the mask on the observed labels $Y_{L}^{(\mathrm{tr})}$ , the set of true labels is effectively partitioned into two parts, where part of the true labels $Y_{L}^{(\mathrm{tr})} \odot M$ are used as input to $CL + GNN$ , and the other part $Y_{L}^{(\mathrm{tr})} \odot \overline{M}$ are used as optimization target. Here $\overline{M} := 1 - M$ is the bitwise negated matrix of $M$ .
|
| 113 |
+
|
| 114 |
+
(Step 2) Obtaining $\hat{\mathbf{Y}}^{(t - 1)}$ . Note that in Equation (2), we first need to obtain the predicted label distribution $\hat{\mathbf{Y}}^{(t - 1)}$ with mask $M^{(t)}$ to sample labels from. At iteration $t$ , we use the learned $CL + GNN$ model parameter $\Theta_{t - 1}$ to obtain $\mathbf{Z}_v^{(t - 1)}$ according to Equation (2) and use the $CL + GNN$ model parameters $\mathbf{W}_{t - 1},\mathbf{b}_{t - 1}$ to obtain the label prediction recursively, i.e. $\forall v\in V^{\mathrm{(tr)}}$
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\hat {\mathbf {Y}} _ {v} ^ {(t - 1)} \sim \text {C a t e g o r i c a l} (\sigma \left(\mathbf {W} _ {t - 1} \mathbf {Z} _ {v} ^ {(t - 1)} \left(M ^ {(t)}; \Theta_ {t - 1}\right) + \mathbf {b} _ {t - 1}\right)), \tag {4}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
Z _ {v} ^ {(t - 1)} \left(M ^ {(t)}; \Theta_ {t - 1}\right) = \operatorname {G N N} \left(X _ {\mathbf {Y} _ {L} ^ {(\mathrm {t r})}, \mathbf {0}, M ^ {(t)}} ^ {(\mathrm {t r})}, A ^ {(\mathrm {t r})}; \Theta_ {t - 1}\right) _ {v} \tag {5}
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
Note that $Z_{v}^{(t - 1)}(M^{(t)};\Theta)$ does not use any predicted labels in the GNN input, i.e. it uses the true labels for masked nodes or all-zero labels for unmasked nodes.
|
| 127 |
+
|
| 128 |
+
In order to optimize Equation (3), we compute gradient estimates w.r.t. $\Theta$ and $\mathbf{b}$ using the following sampling procedure.
|
| 129 |
+
|
| 130 |
+
(Step 3) We first need to compute an unbiased estimate of $\{Z_v^{(t - 1)}\}_{v\in V_L^{(\mathrm{tr})}}$ in Equation (2) using $K$ i.i.d. samples $\hat{\mathbf{Y}}^{(t - 1)}$ from the model obtained at time step $t - 1$ (as
|
| 131 |
+
|
| 132 |
+
describe above), i.e.
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\tilde {\boldsymbol {Z}} _ {v} ^ {(t)} \left(\boldsymbol {M} ^ {(t)}; \Theta_ {t}\right) = \frac {1}{K} \sum_ {k = 1} ^ {K} \operatorname {G N N} \left(\boldsymbol {X} _ {\boldsymbol {Y} _ {L} ^ {(\mathrm {t r})}, \hat {\boldsymbol {Y}} _ {k} ^ {(t - 1)}, \boldsymbol {M} ^ {(t)}} ^ {(\mathrm {t r})}, \boldsymbol {A} ^ {(\mathrm {t r})}; \Theta_ {t}\right) _ {v}, \tag {6}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
where again $X_{\mathbf{Y}_L^{(\mathrm{tr})},\hat{\mathbf{Y}}^{(t - 1)},\mathbf{M}^{(t)}}$ is the matrix concatenation between $\pmb{X}^{\mathrm{(tr)}}$ and $\pmb {Y}_L^{\mathrm{(tr)}}\odot \pmb {M}^{(t)} + \hat{\pmb{Y}}^{(t - 1)}\odot \overline{\pmb{M}}^{(t)}$
|
| 139 |
+
|
| 140 |
+
Note that the time/space complexity of the $CL + GNN$ is $K$ times the time/space complexity of the corresponding GNN model as we have to compute $K$ representations for each node at each stochastic gradient step.
|
| 141 |
+
|
| 142 |
+
(Step 4) Next, we need an unbiased estimate of the expectation over mask $M^{(t)}$ in Equation (3). In (scenario test-partial) the unbiased estimates are obtained by sampling $M^{(t)} \sim \mathrm{Uniform}(\mathcal{M})$ at each gradient step, in the (scenario test unlabeled) the value obtained is exact since $M^{(t)} = 0$ . The mask $M^{(t)}$ is used, along with the estimate $\tilde{\pmb{Z}}$ from Equation (6), to compute the loss function as in Equation (3) and perform a gradient descent step. Proposition 2 shows that the above procedure is a proper surrogate upperbound of the loss function.
|
| 143 |
+
|
| 144 |
+
# Inference with learned model.
|
| 145 |
+
|
| 146 |
+
Once the $CL + GNN$ parameters $\Theta_T, W_T, b_T$ are learned according to Equation (3) on the training graph $G^{(\mathrm{tr})}$ , given an any-size attributed graph $G^{(te)}$ , we sample $J$ masks $M$ of size $|V^{(\mathrm{te})}|$ , either (scenario test-partial) sampling $M \sim \mathrm{Uniform}(\mathcal{M})$ or (scenario test-unlabeled) set $M = 0$ . For each mask, we apply the same procedure as in (Step 2) and (Step 3) to obtain predicted label distribution $\hat{\mathbf{Y}}^{(\mathrm{tmp})}$ , and then sample $K$ labels $\{\hat{\mathbf{Y}}_1^{(\mathrm{tmp})}, \dots, \hat{\mathbf{Y}}_K^{(\mathrm{tmp})}\}$ from it and pass to the learned model. The node representations for $v \in V^{(\mathrm{te})}$ are obtained using $M$ and $\hat{\mathbf{Y}}_{1,\dots,K}^{(\mathrm{tmp})}$ :
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\tilde {\boldsymbol {Z}} _ {v} (M; \Theta_ {T}) = \frac {1}{K} \sum_ {k = 1} ^ {K} \operatorname {G N N} \left(\boldsymbol {X} _ {\boldsymbol {Y} _ {L} ^ {(\mathrm {t e})}, \hat {\boldsymbol {Y}} _ {k} ^ {(\mathrm {t m p})}, \boldsymbol {M}}, \boldsymbol {A} ^ {(\mathrm {t e})}; \Theta_ {T}\right) _ {v},
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
where
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
(\hat {\boldsymbol {Y}} _ {k} ^ {(\mathrm {t m p})}) _ {v} \sim \operatorname {C a t e g o r i c a l} (\sigma (\mathbf {W} _ {T} \mathbf {Z} _ {v} ^ {(\mathrm {t m p})} (\boldsymbol {M}; \Theta_ {T}) + \mathbf {b} _ {T})),
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
and
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
Z _ {v} ^ {\left(\operatorname {t m p}\right)} (M; \Theta_ {T}) = \operatorname {G N N} \left(X _ {Y _ {L} ^ {\left(\mathrm {t e}\right)}, 0, M ^ {\left(\mathrm {t e}\right)}}, A ^ {\left(\mathrm {t e}\right)}; \Theta_ {T}\right) _ {v}.
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
The final node representation is computed as the average over all sampled masks:
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
\tilde {\boldsymbol {Z}} _ {v} = \frac {1}{J} \sum_ {j = 1} ^ {J} \tilde {\boldsymbol {Z}} _ {v} (M _ {j}; \Theta_ {T}),
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
where $J$ and $K$ are hyperparameters, $J$ is the number of masks for our Monte Carlo average and $K$ is the number
|
| 171 |
+
|
| 172 |
+
of Monte Carlo samples of $\hat{\mathbf{Y}}^{(\mathrm{tmp})}$ . Then the label predictions are obtained using the learned $CL + GNN$ parameters $\boldsymbol{W}_T, \boldsymbol{b}_T$ :
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\hat {\mathbf {Y}} _ {v} ^ {(\mathrm {t e})} \sim \text {C a t e g o r i c a l} \left(\sigma \left(\mathbf {W} _ {T} \tilde {\mathbf {Z}} _ {v} + \mathbf {b} _ {T}\right) _ {v}\right), \forall v \in V ^ {(\mathrm {t e})}. \tag {7}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
# 4. Collective Learning Analysis
|
| 179 |
+
|
| 180 |
+
Is collective classification able to better represent target label distributions than node representation learning? The answer to this question is both yes (for WL-GNNs) and no (for most-expressive representations). Theorem 1 shows that a most-expressive graph representation (Murphy et al., 2019; Maron et al., 2019b; Srinivasan & Ribeiro, 2019) would not benefit from a collective learning boost. All proofs can be found in the Appendix.
|
| 181 |
+
|
| 182 |
+
Theorem 1 (Collective classification can be unnecessary). Consider the task of predicting node labels when no labels are available in test data. Let $\Gamma^{\star}(v, G^{(te)})$ be a most-expressive representation of node $v \in V^{(te)}$ in graph $G^{(te)}$ . Then, for any collective learning procedure predicting the class label of $v \in V^{(te)}$ , there exists a classifier that takes $\Gamma^{\star}(v, G^{(te)})$ as input and predicts the label of $v$ with equal or higher accuracy.
|
| 183 |
+
|
| 184 |
+
While Theorem 1 shows that the most-expressive graph representation does not need collective classification, WL-GNNs are not most-expressive (Morris et al., 2019; Murphy et al., 2019; Xu et al., 2018). Indeed, Theorem 2 and Proposition 1 show that $CL + GNN$ boosts the expressiveness of optimal WL-GNN and practical WL-GNNs, respectively. Then, we show that the stochastic optimization in Step 3 optimizes a loss surrogate upper bound.
|
| 185 |
+
|
| 186 |
+
# 4.1. Expressive power of $CL + GNN$
|
| 187 |
+
|
| 188 |
+
Morris et al. (2019) and Xu et al. (2018) show that WL-GNNs are no more powerful in distinguishing nonisomorphic graphs and nodes as the standard Weisfeiler-Lehman graph isomorphism test (1-WL or just WL test). Two nodes are assumed isomorphic by the WL test if they have the same color assignment in the stable coloring. The node-expressivity of a parameterized graph representation $\Gamma$ (with parameter $\Gamma(\cdot; W)$ ) can then be determined by the set of graphs for which $\Gamma$ can identify non-isomorphic nodes:
|
| 189 |
+
|
| 190 |
+
$$
|
| 191 |
+
\begin{array}{l} \mathcal {G} (\Gamma) = \{G: \exists \boldsymbol {W} _ {G} ^ {\star}, \text {s . t .} \forall u, v \in V _ {G}, \Gamma (G; \boldsymbol {W} _ {G} ^ {\star}) _ {v} \\ = \Gamma (G; \boldsymbol {W} _ {G} ^ {\star}) _ {u} \text {i f f} u, v \text {a r e i s o m o r p h i c}, G \in \mathbb {G} \}, \\ \end{array}
|
| 192 |
+
$$
|
| 193 |
+
|
| 194 |
+
where $\mathbb{G}$ is the set of all any-size attributed graphs, $V_{G}$ is the set of nodes in graph $G$ . We call $\mathcal{G}(\Gamma)$ the identifiable set of graph representation $\Gamma$ .
|
| 195 |
+
|
| 196 |
+
The most expressive graph representation $\Gamma^{\star}$ has an identifiable set of all any-size attributed graphs, i.e. $\mathcal{G}(\Gamma^{\star}) = \mathbb{G}$ .
|
| 197 |
+
|
| 198 |
+
We refer to the WL-GNN that is equally expressive as WL test as the optimal WL-GNN (or WLGNN\*), which is at least as expressive as all other WL-GNNs.
|
| 199 |
+
|
| 200 |
+
In this section we show that collective learning can boost the optimal WLGNN*, i.e., the identifiable set of WLGNN* is a proper subset of collective learning over WLGNN* (denoted $CL + GNN^{\star}$ )
|
| 201 |
+
|
| 202 |
+
$$
|
| 203 |
+
\mathcal {G} \left(\mathrm {W L G N N} ^ {\star}\right) \subsetneq \mathcal {G} \left(C L + G N N ^ {\star}\right).
|
| 204 |
+
$$
|
| 205 |
+
|
| 206 |
+
Theorem 2 ( $CL + GNN^{\star}$ expressive power). Let $WLGNN^{\star}$ be an optimal WL-GNN. Then, the collective learning representation of Equation (2), using $WLGNN^{\star}$ as the GNN component, (denoted $\mathrm{CL} + \mathrm{GNN}^{\star}$ ) is strictly more expressive than this $WLGNN^{\star}$ representation model applied to the same tasks.
|
| 207 |
+
|
| 208 |
+
Theorem 2 answers Hypothesis 1, by showing that by incorporating collective learning and sampling procedures, $CL + GNN$ can boost the expressiveness of WL-GNNs, including the optimal WLGNN\*.
|
| 209 |
+
|
| 210 |
+
Corollary 1. Consider a graph representation learning method that, at iteration $t$ , replaces $\hat{\mathbf{Y}}^{(t - 1)}$ , in Equations (2) and (4) with a deterministic function over $Z^{(t - 1)}$ , e.g., a softmax function that outputs $(P(\hat{\mathbf{Y}}_v^{(t - 1)}|Z^{(t - 1)}))_{v\in V^{(tr)}}$ . Then, such method will be no more expressive than the optimal WLGNN* and, hence, less expressive than CL+GNN*.
|
| 211 |
+
|
| 212 |
+
Corollary 1 proves that existing collective approaches are no different than current GNN methods (hence, no boosting). More specifically, it shows that existing graph representation methods that —on the surface— may even look like $CL + GNN$ , but do not perform the crucial step of sampling $(\hat{Y}_v^{(t - 1)})_{v\in V^{(\mathrm{tr})}}$ , unfortunately, are no more expressive than WL-GNNs. Examples of such methods include (Fan & Huang, 2019; Moore & Neville, 2017; Qu et al., 2019; Vijayan et al., 2018).
|
| 213 |
+
|
| 214 |
+
Next, we show the practical benefits of collective learning are even greater when the WL-GNN has limited expressive power due to limited message-passing layers.
|
| 215 |
+
|
| 216 |
+
# 4.2. How $CL + GNN$ further expands the power of few-layer WL-GNNs
|
| 217 |
+
|
| 218 |
+
A $d$ -layer ( $d > 1$ ) WL-GNN will only aggregate neighborhood information within $d$ hops of any given node (i.e., over a $d$ -hop egonet, defined as the graph representing the connections among all nodes that are at most $d$ hops away from the center node). In practice—mostly for computational reasons—WL-GNNs have many fewer layers than the graph's diameter $D$ , i.e., $d < D$ . For instance, GCN (Kipf & Welling, 2016) and GraphSAGE (Hamilton et al., 2017) both used $d = 2$ in their experiments. Hence, they cannot differentiate two non-isomorphic nodes that are iso-
|
| 219 |
+
|
| 220 |
+
morphic within their $d$ -hop neighborhood. We now show that $CL + GNN$ can gather $2d$ -hop neighborhood information with a $d$ -layer WL-GNN.
|
| 221 |
+
|
| 222 |
+
Proposition 1. Let $G_v^d$ be the $d$ -hop egonet of a node $v$ in graph $G$ with diameter $D > d$ . Let $v_1$ and $v_2$ be two non-isomorphic nodes whose $d$ -hop egonets are isomorphic (i.e., $G_{v_1}^d$ is isomorphic to $G_{v_2}^d$ ) but $2d$ -hop egonets are not isomorphic. Then, a WL-GNN representation with $d$ layers will generate identical representations for $v_1$ and $v_2$ while CL+GNN is capable of giving distinct node representations.
|
| 223 |
+
|
| 224 |
+
Proposition 1 shows that collective learning has yet another benefit: $CL + GNN$ further boosts the power of WL-GNNs with limited message-passing layers by gathering neighborhood information within a larger radius. Specifically, $CL + GNN$ built on a WL-GNN with $d$ layers can enlarge the effective neighborhood radius from $d$ to $2d$ in Equation (2), while WL-GNN would have to stack $2d$ layers to achieve the same neighborhood radius, which in practice may cause optimization challenges (i.e., $d = 2$ is a common hyperparameter value in the literature).
|
| 225 |
+
|
| 226 |
+
# 4.3. Optimization of $CL + GNN$
|
| 227 |
+
|
| 228 |
+
Proposition 2. If $\forall v\in V_L^{(tr)}$ $\nabla_{\Theta}(\mathbf{W}\mathbf{Z}_v^{(t)}(\mathbf{M}^{(t)};\Theta))_{y_v^{(tr)}}$ is bounded (e.g., via gradient clipping), then the optimization in Equation (3), with the unbiased sampling of $\{\pmb {Z}_v^{(t - 1)}\}_{v\in V^{(tr)}}$ and $M^{(t)}$ described above, results in a Robbins-Monro (Robbins & Monro, 1951) stochastic optimization algorithm that optimizes a surrogate upper bound of the loss in Equation (3).
|
| 229 |
+
|
| 230 |
+
Since the optimization objective in Equation (3) is computationally impractical, as it requires computing all possible binary masks and label predictions, Proposition 2 shows that the sampling procedures used in $CL + GNN$ that considers $K$ samples of label predictions and a random mask at each gradient step is a feasible approach of estimating an unbiased upper bound of the objective.
|
| 231 |
+
|
| 232 |
+
# 5. Experiments
|
| 233 |
+
|
| 234 |
+
# 5.1. Experiment Setup
|
| 235 |
+
|
| 236 |
+
Datasets. We use datasets of Cora, Pubmed, Friendster, Facebook, and Protein. The largest dataset (Friendster (Teixeira et al., 2019)) has 43,880 nodes, which is a social network of users where the node attributes include numerical features (e.g. number of photos posted) and categorical features (e.g. gender, college, etc.) encoded as binary one-hot features. The node labels represent one of the five age groups. Please refer to Appendix E for more details.
|
| 237 |
+
|
| 238 |
+
Train/Test split. Since most datasets used to test GNNs consist of a single graph, we apply Louvain community detection algorithm (Blondel et al., 2008) to split each single graph into three clusters for training, validation, and testing respectively, and remove the edges across clusters —shown
|
| 239 |
+
|
| 240 |
+
Connected split
|
| 241 |
+

|
| 242 |
+
O train validation test
|
| 243 |
+
|
| 244 |
+

|
| 245 |
+
Random split
|
| 246 |
+
Figure 2: Different data splits between our inductive connected split (left) and conventional GNN random split (right)
|
| 247 |
+
|
| 248 |
+
in Figure 2 (left). This mimics the inductive within-graph scenario that often occurs in real world settings, where a connected subgraph is used to learn a model to generalize the remainder of the graph —e.g., Facebook would train a model on Iceland or New Zealand and then apply it to the rest of the world, see methodology in (Bakshy et al., 2014).
|
| 249 |
+
|
| 250 |
+
Our train/test data split is different than previous GNN works, which have adopted random node split between train and test —shown in Figure 2 (right)—and can put test nodes close to the training nodes, making it much easier to leverage test node attributes during training. Our use of a hard split between train and test (connected split) is the reason why the model performance reported in our paper is not directly comparable with the reported results in previous GNN papers, even though we used the same implementations and hyper-parameter search procedures. In our experiments, we tested two different label rates in test graph: 0 (unlabeled) and $50\%$ (reveal $50\%$ testing labels and evaluate on the rest). We run five trials for all the experiments, and in each trial we randomly pick a connected subgraph within the training cluster and reveal their labels for training.
|
| 251 |
+
|
| 252 |
+
As our method can be applied to any GNN models, we use four representative GNNs as examples:
|
| 253 |
+
|
| 254 |
+
- GCN (Kipf & Welling, 2016) which includes two graph convolutional layers. Here we implemented an inductive variant of the original GCN model for our tasks.
|
| 255 |
+
- Supervised GraphSage (Hamilton et al., 2017) (denoted by GS) with Mean pooling aggregator. We use sample size of 5 for neighbor sampling.
|
| 256 |
+
- Truncated Krylov GCN (Luan et al., 2019) (denoted by TK), a recent GNN model that leverages multi-scale information in different ways and are scalable in depth. The TK has stronger expressive power and achieved state-of-the-art performance on node classification tasks. We implemented Snowball architecture which achieved comparable performance with the other truncated Krylov architecture according to the original paper.
|
| 257 |
+
|
| 258 |
+
A Collective Learning Framework to Boost GNN Expressiveness for Node Classification
|
| 259 |
+
|
| 260 |
+
<table><tr><td rowspan="2" colspan="2"># train labels:</td><td colspan="2">Coraconnect</td><td colspan="2">Pubmedconnect</td><td colspan="2">Friendster</td><td colspan="2">Facebook</td><td colspan="2">Protein</td></tr><tr><td colspan="2">85 (3.21%)</td><td colspan="2">300 (1.52%)</td><td colspan="2">641 (1.47%)</td><td colspan="2">80 (1.76%)</td><td colspan="2">7607 (30%)</td></tr><tr><td colspan="2">% labels in G(te):</td><td>0%</td><td>50%</td><td>0%</td><td>50%</td><td>0%</td><td>50%</td><td>0%</td><td>50%</td><td>0%</td><td>50%</td></tr><tr><td>Random</td><td></td><td>14.28 (0.00)</td><td>14.28 (0.00)</td><td>33.33 (0.00)</td><td>33.33 (0.00)</td><td>20.00 (0.00)</td><td>20.00 (0.00)</td><td>50.00 (0.00)</td><td>50.00 (0.00)</td><td>50.00 (0.00)</td><td>50.00 (0.00)</td></tr><tr><td rowspan="2">GCN (Kipf & Welling, 2016)</td><td>-</td><td>64.74 (1.51)</td><td>66.34 (1.84)</td><td>54.56 (2.49)</td><td>58.41 (1.27)</td><td>25.97 (0.69)</td><td>24.26 (0.52)</td><td>50.58 (1.38)</td><td>51.04 (1.20)</td><td>75.86 (1.11)</td><td>77.54 (1.09)</td></tr><tr><td>+CL</td><td>+3.72 (0.40)</td><td>+12.41 (1.96)</td><td>+1.95 (0.69)</td><td>+15.37 (2.01)</td><td>+0.70 (0.14)</td><td>+1.99 (0.74)</td><td>+2.24 (0.81)</td><td>+8.51 (1.09)</td><td>+1.22 (0.51)</td><td>+0.75 (0.33)</td></tr><tr><td rowspan="2">GS (Hamilton et al., 2017)</td><td>-</td><td>65.35 (1.19)</td><td>67.71 (1.53)</td><td>55.56 (2.44)</td><td>59.12 (2.02)</td><td>26.45 (0.62)</td><td>24.75 (0.39)</td><td>51.14 (1.24)</td><td>52.06 (1.29)</td><td>73.85 (1.12)</td><td>73.01 (2.28)</td></tr><tr><td>+CL</td><td>+2.81 (1.02)</td><td>+9.94(1.04)</td><td>+1.05 (0.83)</td><td>+14.71 (2.89)</td><td>+0.13 (0.41)</td><td>+1.40 (0.62)</td><td>+1.77 (0.55)</td><td>+7.80 (0.84)</td><td>+0.84 (0.12)</td><td>+1.47 (0.63)</td></tr><tr><td rowspan="2">TK (Luan et al., 2019)</td><td>-</td><td>68.47 (1.31)</td><td>69.50 (0.55)</td><td>59.05 (2.13)</td><td>60.77 (1.53)</td><td>25.93 (0.91)</td><td>24.42 (1.44)</td><td>52.74 (1.62)</td><td>53.48 (1.48)</td><td>73.65 (1.69)</td><td>78.94 (1.50)</td></tr><tr><td>+CL</td><td>+1.50 (0.61)</td><td>+7.92 (0.75)</td><td>+0.23 (0.61)</td><td>+13.62 (1.84)</td><td>+1.20 (0.14)</td><td>+2.34 (0.42)</td><td>+3.26 (0.98)</td><td>+4.60 (1.16)</td><td>+1.31 (0.27)</td><td>+1.36 (0.94)</td></tr><tr><td rowspan="2">GRAND (Feng et al., 2020)</td><td>-</td><td>71.55 (1.07)</td><td>73.19 (0.41)</td><td>61.82 (6.40)</td><td>63.23 (7.22)</td><td>28.03 (1.02)</td><td>27.02 (0.84)</td><td>47.10 (0.27)</td><td>48.14 (0.52)</td><td>75.43 (1.12)</td><td>79.69 (0.29)</td></tr><tr><td>+CL</td><td>+0.80 (0.31)</td><td>+2.30 (0.56)</td><td>+3.79 (1.50)</td><td>+5.17 (1.44)</td><td>+0.37 (0.39)</td><td>+4.21 (0.72)</td><td>+6.38 (2.29)</td><td>+5.72 (2.34)</td><td>+0.51 (0.36)</td><td>+0.75 (0.20)</td></tr><tr><td colspan="2">Best of CL</td><td>72.36 (1.20)*</td><td>78.31 (0.58)*</td><td>65.61 (6.60)*</td><td>74.39 (1.72)*</td><td>28.40 (0.85)*</td><td>31.23 (1.05)*</td><td>56.01 (1.48)</td><td>59.86 (0.83)</td><td>77.08 (1.03)</td><td>80.52 (0.37)</td></tr><tr><td>PL-EM (Pfeiffer III et al., 2015)</td><td>-</td><td>20.66 (0.04)</td><td>54.22 (0.94)</td><td>38.85 (0.03)</td><td>65.65 (4.33)</td><td>18.13 (0.23)</td><td>22.25 (0.87)</td><td>50.58 (0.03)</td><td>61.17 (1.14)</td><td>78.46 (1.45)</td><td>77.95 (1.56)</td></tr><tr><td>ICA (Lu & Getoor, 2003)</td><td>-</td><td>62.29 (2.18)</td><td>65.51 (1.30)</td><td>43.93 (6.84)</td><td>44.61 (6.24)</td><td>26.48 (1.37)</td><td>27.80 (1.56)</td><td>61.56 (1.10)*</td><td>62.04 (1.92)*</td><td>84.88 (3.35)*</td><td>84.39 (4.08)*</td></tr><tr><td>GMNN (Qu et al., 2019)</td><td>-</td><td>66.35 (3.12)</td><td>72.04 (2.45)</td><td>57.13 (3.01)</td><td>67.94 (4.40)</td><td>24.92 (1.20)</td><td>26.88 (1.53)</td><td>49.56 (0.88)</td><td>57.09 (0.78)</td><td>76.75 (0.74)</td><td>75.96 (0.76)</td></tr></table>
|
| 261 |
+
|
| 262 |
+
Table 1: Node classification accuracy with unlabeled and partially-labeled test data. Numbers in bold represent significant improvement in a paired t-test at the $p < 0.05$ level, and numbers with * represent the best performing method in each column. Cora $^{\text{connect}}$ and Pubmed $^{\text{connect}}$ are our processed graphs with the connected split illustrated in Figure 2 (left).
|
| 263 |
+
|
| 264 |
+
- GRAND (Feng et al., 2020), a recent GNN model using random propagation strategy to perform graph data augmentation, in order to mitigate the issues of oversmoothing and non-robustness. GRAND achieved state-of-the-art performance on several semi-supervised node classification tasks.
|
| 265 |
+
|
| 266 |
+
For each of the GNNs, we compare its baseline performance (on its own) to the performance achieved using collective learning in $CL + GNN$ (using that GNN). For a fair comparison, we adopt the same hyper-parameter tuning strategy for the baseline GNNs and $CL + GNN$ , e.g. hidden dimensions, learning rate, early-stopping procedures. Please refer to Appendix E for details.
|
| 267 |
+
|
| 268 |
+
In addition, we also compare to three relational classifiers, ICA (Lu & Getoor, 2003), PL-EM (Pfeiffer III et al., 2015) and GMNN (Qu et al., 2019). The first two models apply collective learning and inference with simple local classifiers — Naive Bayes for PL-EM and Logistic regression for ICA. GMNN is the state-of-the-art collective model with GNNs, which uses two GCN models to model label dependency and node attribute dependency respectively. All the three models take true labels in their input, thus we use $\boldsymbol{Y}_L^{(\mathrm{tr})}$ for training and $\boldsymbol{Y}_L^{(\mathrm{te})}$ for testing.
|
| 269 |
+
|
| 270 |
+
We report the average accuracy score and standard error of five trials for the baseline models, and compute the absolute improvement of accuracy of our method over the corresponding base GNN. The best performance among all $CL + GNN$ is also reported. We compute the balanced accuracy scores on Friendster dataset as the label is highly imbalanced. To evaluate the significance of $CL + GNN$ improvements, we performed a paired t-test with five trials.
|
| 271 |
+
|
| 272 |
+
# 5.2. Results
|
| 273 |
+
|
| 274 |
+
The node classification accuracy of all the models is shown in Table 1. Our proposed collective learning boost is denoted
|
| 275 |
+
|
| 276 |
+
as +CL (for Collective Learning) and our model performance (absolute % of improvement over the corresponding baseline GNN) is shown in shaded area. Numbers in bold represent significant improvement over the baseline GNN based on a paired t-test $(p < 0.05)$ , and numbers with * is the best performing method in each column.
|
| 277 |
+
|
| 278 |
+
Comparison with baseline GNN models. Table 1 shows that our method improves the corresponding non-collective GNN models for all the four model architectures (i.e. GCN, GraphSage, TK and GRAND). Although all the models have large variances over multiple trials —because different parts of the graphs are being trained in different trials—adding CL consistently improves the baseline GNN. The results from a paired t-test comparing the performance of our method and the corresponding non-collective GNN show that the improvement is almost always significant at $p = 0.05$ (marked as bold), with only five exceptions.
|
| 279 |
+
|
| 280 |
+
Comparing the gains on different datasets in Table 1, adding CL to GNNs achieved smaller gains on Friendster especially when no test labels were available. This is because Friendster is more sparse than the other graphs (e.g. edge density of Friendster is 1.5e-4 while Cora is 1.44e-3 (Teixeira et al., 2019)), which makes it hard for any model to propagate label information and capture label dependencies.
|
| 281 |
+
|
| 282 |
+
As expected, comparing the improvement over various GNNs with different expressive power, we observe that in general adding CL boosts the gains of simpler GNN models (i.e. GCN and GS). For example, Table 1 shows that adding CL to a GCN can boost its accuracy by $+12.41\%$ (Cora) while the boost over TK is smaller at $+7.92\%$ in the same task. This is in line with our assumption in Hypothesis 1 that collective learning can help weaker GNNs produce a more expressive representation. As GCN is less expressive than TK, there is a larger room to increase its expressiveness.
|
| 283 |
+
|
| 284 |
+
Note that the gains in Table 1 are generally much larger when we go from $0\%$ to $50\%$ of the labels available in
|
| 285 |
+
|
| 286 |
+
test. For example, when combining with GCN, the improvements of our method are $3.72\%$ and $2.24\%$ for unlabeled Cora and Facebook test sets, but with partially-labeled test data, the improvements are $12.41\%$ and $8.51\%$ respectively. This shows the importance of modeling label dependency especially when the some test data labels are observed.
|
| 287 |
+
|
| 288 |
+
Comparison with other relational classifiers The two baseline non-GNN relational models —i.e. PL-EM and ICA— generally perform worse than the three GNNs, with exceptions on Protein and Facebook datasets. This could be because the two dataset has only a few node attributes (3 for Facebook and 29 for Protein), while the other graphs have hundreds or thousands of node attributes, which makes it easier for the more powerful classifier (i.e. GNNs) to overfit on Facebook and Protein. Moreover, this could also be because the two non-GNN models generally need a larger portion of labeled set to train the weak local classifier, whereas GNNs utilize a neural network architecture as "local classifier", which is better at representation learning by transforming and aggregating node attribute information. However, when the model is trained with a large training set (e.g. with $30\%$ nodes on Protein dataset), modeling the label dependency becomes crucial. At the same time, our method is still able to boost performance on the two datasets.
|
| 289 |
+
|
| 290 |
+
For GMNN (Qu et al., 2019), a collective GNN model, it achieves better performance than its non-collective base model, i.e. GCN on most of the datasets, and we can see that adding CL to GCN achieved comparable or better performance than GMNN. However, combing CL with other more powerful GNNs can easily out-perform GMNN (e.g., on Cora and Friendster, GRAND+CL significantly outperforms GMNN). When the test labels are available, GMNN is able to out-perform several GNNs by leveraging test label information, but the best of $CL + GNN$ still out-performs GMNN consistently.
|
| 291 |
+
|
| 292 |
+
Ablation studies, comparison to ensembles, and hyperparameter sensitivity. We conducted three ablation studies to investigate the usage of predicted labels (detailed in Appendix F), which show that (a) adding predicted labels in model input had extra value comparing to using true labels only, (b) applying the random masking procedure is crucial for the model improvements, and (c) the gain of our framework is from using samples of the predicted labels rather than random one-hot vectors. We also compared with a baseline ensemble method, which considers an ensemble of 10 GNNs with random initialization. The results (detailed in Appendix F) show that an ensemble approach is able to slightly improve the GNN performance, but the gains are much smaller than the gains observed for $CL + GNN$ .
|
| 293 |
+
|
| 294 |
+
We also investigated the impact of training labels rates and sample size $K$ (see Appendix G), and we found that in general $CL + GNN$ framework achieves a larger improvement
|
| 295 |
+
|
| 296 |
+
when fewer labels are available in the training graph, and that with sample size $K > 1$ there was consistent gain.
|
| 297 |
+
|
| 298 |
+
Complexity analysis. $CL + GNN$ computes $K$ embeddings at each stochastic gradient step, therefore, per-gradient step, $CL + GNN$ is $K$ slower than its component WL-GNN. Overall, after $T$ iterations of Steps 1-3, $CL + GNN$ total runtime increases by $T \times K$ over the original runtime of its component WL-GNN. The time and space complexity of $CL + GNN$ is the same as WL-GNNs, i.e. $\mathcal{O}(m)$ where $m = |E|$ .
|
| 299 |
+
|
| 300 |
+
Note that existing methods trying to boost the GNN expressiveness —e.g. PPGN (Maron et al., 2019a), SMP (Vignac et al., 2020))— are much more computationally expensive in time (at least $\Theta(mn)$ ) and space ( $\Theta(n^2)$ ), where $n$ and $m$ are number of nodes and edges in the graph.
|
| 301 |
+
|
| 302 |
+
We note that we spent nearly no time engineering $CL + GNN$ for speed or for improving our results. Our interest in this paper lies entirely on the gains of a direct application of collective learning to GNNs $(CL + GNN)$ . We fully expect that further engineering advances can reduce the computational burden due to Monte Carlo sampling and increase accuracy gains. For instance, parallelism can significantly reduce the time to collect $K$ samples in $CL + GNN$ .
|
| 303 |
+
|
| 304 |
+
# 6. Related Work
|
| 305 |
+
|
| 306 |
+
On collective learning and neural networks. There has been work on applying deep learning to collective classification. For example, Moore & Neville (2017) proposed to use LSTM-based RNNs for classification tasks on graphs. They transform each node and its set of neighbors into an unordered sequence and use an RNN to predict the class label as the output of that sequence. Pham et al. (2017) designed a deep learning model for collective classification in multi-relational domains, which learns local and relational features simultaneously to encode multi-relations.
|
| 307 |
+
|
| 308 |
+
The closest work to ours is Fan & Huang (2019), which proposed a recurrent collective classification (RCC) framework, a variant of ICA (Lu & Getoor, 2003) including dynamic relational features encoding label information. Unlike our framework, this method does not sample labels $\hat{Y}$ , opting for an end-to-end training procedure. Vijayan et al. (2018) opts for a similar no-sample RCC end-to-end training method as (Fan & Huang, 2019), now combining a differentiable graph kernel with an iterative stage. Graph Markov Neural Network (GMNN) (Qu et al., 2019) is another promising approach that applies statistical relational learning to GNNs. GMNNs model the joint label distribution with a conditional random field trained with the variational EM algorithm. GMNNs are trained by alternating between an E-step and an M-step, and two WL-GCNs are trained for the two steps respectively. These studies represent different ideas for bringing the power of collective
|
| 309 |
+
|
| 310 |
+
classification to neural networks. Unfortunately, Corollary 1 shows that, without sampling $\hat{Y}$ , the above methods are still WL-GNNs, and hence, their use of collective classification fails to deliver any increase in expressiveness beyond an optimal WL-GNN (e.g., Xu et al. (2018)). In our experiments, we compared to GMNN as a representative relational GNN method, and showed that while GMNN outperformed its component GCN, the best of $CL + GNN$ still consistently out-performs GMNN.
|
| 311 |
+
|
| 312 |
+
In parallel to our work, Jia & Benson (2020) considers regression tasks by modeling the joint GNN residual of a target set $(y - \hat{y})$ as a multivariate Gaussian, defining the loss function as the marginal likelihood only over labeled nodes $\hat{y}_L$ . In contrast, by using the more general foundation of collective classification, our framework can seamlessly model both classification and regression tasks, and include model predictions over the entire graph $\hat{\mathbf{Y}}$ as $CL + GNN$ 's input, thus affecting both the model prediction and the GNN training in inductive node classification tasks.
|
| 313 |
+
|
| 314 |
+
Higher-order GNNs for more expressive graph representation. Recently, there has been a few works proposed to boost the representation power of WLGNN (Morris et al., 2019; Maron et al., 2019a; 2018; Vignac et al., 2020; Chen et al., 2019; Maron et al., 2019b). Most of these works consider representation for the entire graph or node sets by mimicking higher-order WL tests. However, most of them provide more theoretical implications for GNNs than practical usage due to their dependency on order- $k$ tensors $\mathbb{R}^{n^k}$ ( $n$ : number of nodes, $k > 2$ ) and inability to leverage the sparsity of the graph structures. Among them PPGN (Maron et al., 2019a) is relatively scalable with $\Theta(n^3)$ time complexity and $\Theta(n^2)$ space complexity to achieve the expressive power of the 2-WL test. A more recent method SMP (Vignac et al., 2020) proposed a powerful and more scalable message-passing framework with time complexity of $\Theta(mn)$ ( $m$ : number of edges) and space complexity of $\Theta(n^2)$ . Our work, on the other hand, focuses on node-level representations rather than (sub)graph-level representations, and our overall time/space complexity is $\Theta(m)$ . As these methods cannot be directly evaluated on node classification tasks and due to their computational inefficiency, we leave the assessment of $CL + GNN$ gains if used with these more powerful GNN variants as future work.
|
| 315 |
+
|
| 316 |
+
On self-supervised learning and semi-supervised learning. Self-supervised learning is closely related to semi-supervised learning. In fact, self-supervised learning can be seen as a self-imposed semi-supervised learning task, where part of the input is masked (or transformed) and must be predicted back by the model (Doersch et al., 2015; Noroozi & Favaro, 2016; Lee et al., 2017; Misra et al., 2016). Recently, self-supervised learning has been broadly applied to achieve state-of-the-art accuracy in computer vision (Hénaff
|
| 317 |
+
|
| 318 |
+
et al., 2019; Gidaris et al., 2019) and natural language processing (Devlin et al., 2018) supervised learning tasks. The use of self-supervised learning in graph representation learning is intimately related to the use of pseudolikelihood to approximate true likelihood functions.
|
| 319 |
+
|
| 320 |
+
For further related work on collective classification, see Appendix H.
|
| 321 |
+
|
| 322 |
+
# 7. Conclusion
|
| 323 |
+
|
| 324 |
+
A long-standing question is when/if collective inference (CI) is needed when very expressive graph models are available (e.g., GNNs) for inductive node classification tasks. This work solves a few theoretical and empirical questions towards an answer. We show that, with the most expressive equivariant (node-embedding) GNNs, it is true that there is no need for collective learning. While the development of more expressive GNNs generally focuses on changing the architecture, in this work we ask the question of whether CI could be a practical way to boost the real-world performance of a GNN, without changing its underlying architecture.
|
| 325 |
+
|
| 326 |
+
In this work we propose collective learning (CL), a modified CI approach for GNN-type classifiers that boosts their expressiveness, relying on both Monte Carlo sampling of node embeddings and (self-supervised) random masking in training. We show that collective learning can be combined with existing GNNs to improve their expressiveness (and we prove increased expressiveness with WL-GNNs).
|
| 327 |
+
|
| 328 |
+
We experimentally confirm our theoretical analysis across five real-world graphs and four component GNNs, and show by extensive empirical study that $CL + GNN$ consistently, and significantly, boosts GNNs performance (up to $26\%$ ). One limitation of our proposed collective learning framework is the computational cost of using sampled embeddings during each stochastic gradient step. We leave exploration of mechanisms to reduce the additional computational burden (eg. via parallelization and/or more targeted sampling) to future work.
|
| 329 |
+
|
| 330 |
+
# 8. Acknowledgments
|
| 331 |
+
|
| 332 |
+
This research is supported by NSF under contract number(s) CAREER IIS-1943364, IIS-1618690, CCF-0939370 and CCF-1918483. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright notation hereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements either expressed or implied, of NSF or the U.S. Government.
|
| 333 |
+
|
| 334 |
+
# References
|
| 335 |
+
|
| 336 |
+
Azizian, W. and Lelarge, M. Characterizing the expressive power of invariant and equivariant graph neural networks. 2021.
|
| 337 |
+
Bakshy, E., Eckles, D., and Bernstein, M. S. Designing and deploying online field experiments. In Proceedings of the 23rd international conference on World wide web, pp. 283-292, 2014.
|
| 338 |
+
Beaini, D., Passaro, S., L'etourneau, V., Hamilton, W. L., Corso, G., and Li'o, P. Directional graph networks. arXiv preprint arXiv:2010.02863, 2020.
|
| 339 |
+
Blondel, V. D., Guillaume, J.-L., Lambiotte, R., and Lefebvre, E. Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment, 2008(10):P10008, 2008.
|
| 340 |
+
Borgwardt, K. M., Ong, C. S., Schonauer, S., Vishwanathan, S., Smola, A. J., and Kriegel, H.-P. Protein function prediction via graph kernels. Bioinformatics, 21(suppl_1): i47-i56, 2005.
|
| 341 |
+
Bouritsas, G., Frasca, F., Zafeiriou, S., and Bronstein, M. M. Improving graph neural network expressivity via subgraph isomorphism counting. arXiv preprint arXiv:2006.09252, 2020.
|
| 342 |
+
Chen, Z., Villar, S., Chen, L., and Bruna, J. On the equivalence between graph isomorphism testing and function approximation with gnns. In Advances in Neural Information Processing Systems, pp. 15868-15876, 2019.
|
| 343 |
+
Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 344 |
+
Doersch, C., Gupta, A., and Efros, A. A. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1422-1430, 2015.
|
| 345 |
+
Fan, S. and Huang, B. Recurrent collective classification. Knowledge and Information Systems, 60(2):741-755, 2019.
|
| 346 |
+
Feng, W., Zhang, J., Dong, Y., Han, Y., Luan, H., Xu, Q., Yang, Q., Kharlamov, E., and Tang, J. Graph random neural networks for semi-supervised learning on graphs. Advances in Neural Information Processing Systems, 33, 2020.
|
| 347 |
+
Gidaris, S., Bursuc, A., Komodakis, N., Pérez, P., and Cord, M. Boosting few-shot visual learning with self-supervision. In Proceedings of the IEEE International Conference on Computer Vision, pp. 8059-8068, 2019.
|
| 348 |
+
|
| 349 |
+
Hamilton, W., Ying, Z., and Leskovec, J. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pp. 1024-1034, 2017.
|
| 350 |
+
Hénaff, O. J., Razavi, A., Doersch, C., Eslami, S., and Oord, A. v. d. Data-efficient image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019.
|
| 351 |
+
Jensen, D., Neville, J., and Gallagher, B. Why collective inference improves relational classification. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 593-598, 2004.
|
| 352 |
+
Jia, J. and Benson, A. Outcome correlation in graph neural network regression, 2020.
|
| 353 |
+
Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 354 |
+
Koller, D., Friedman, N., Džeroski, S., Sutton, C., McCallum, A., Pfeffer, A., Abbeel, P., Wong, M.-F., Heckerman, D., Meek, C., et al. Introduction to statistical relational learning. MIT press, 2007.
|
| 355 |
+
Lee, H.-Y., Huang, J.-B., Singh, M., and Yang, M.-H. Unsupervised representation learning by sorting sequences. In Proceedings of the IEEE International Conference on Computer Vision, pp. 667-676, 2017.
|
| 356 |
+
Lu, Q. and Getoor, L. Link-based classification. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pp. 496-503, 2003.
|
| 357 |
+
Luan, S., Zhao, M., Chang, X.-W., and Precup, D. Break the ceiling: Stronger multi-scale deep graph convolutional networks. arXiv preprint arXiv:1906.02174, 2019.
|
| 358 |
+
Maron, H., Ben-Hamu, H., Shamir, N., and Lipman, Y. Invariant and equivariant graph networks. arXiv preprint arXiv:1812.09902, 2018.
|
| 359 |
+
Maron, H., Ben-Hamu, H., Serviansky, H., and Lipman, Y. Provably powerful graph networks. In Advances in neural information processing systems, pp. 2156-2167, 2019a.
|
| 360 |
+
Maron, H., Fetaya, E., Segol, N., and Lipman, Y. On the universality of invariant networks. In International conference on machine learning, pp. 4363-4371. PMLR, 2019b.
|
| 361 |
+
Misra, I., Zitnick, C. L., and Hebert, M. Shuffle and learn: unsupervised learning using temporal order verification. In European Conference on Computer Vision, pp. 527-544. Springer, 2016.
|
| 362 |
+
|
| 363 |
+
Moore, J. and Neville, J. Deep collective inference. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 364 |
+
Morris, C., Ritzert, M., Fey, M., Hamilton, W. L., Lenssen, J. E., Rattan, G., and Grohe, M. Weisfeiler and leman go neural: Higher-order graph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 4602-4609, 2019.
|
| 365 |
+
Murphy, R. L., Srinivasan, B., Rao, V., and Ribeiro, B. Relational pooling for graph representations. arXiv preprint arXiv:1903.02541, 2019.
|
| 366 |
+
Neville, J. and Jensen, D. Iterative classification in relational data. In Proc. AAAI-2000 workshop on learning statistical models from relational data, pp. 13-20, 2000.
|
| 367 |
+
Neville, J., Jensen, D., Friedland, L., and Hay, M. Learning relational probability trees. In Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 625-630, 2003a.
|
| 368 |
+
Neville, J., Jensen, D., and Gallagher, B. Simple estimators for relational bayesian classifiers. In Third IEEE International Conference on Data Mining, pp. 609-612. IEEE, 2003b.
|
| 369 |
+
Noroozi, M. and Favaro, P. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision, pp. 69-84. Springer, 2016.
|
| 370 |
+
Pfeiffer III, J. J., Neville, J., and Bennett, P. N. Overcoming relational learning biases to accurately predict preferences in large scale networks. In Proceedings of the 24th International Conference on World Wide Web, pp. 853-863, 2015.
|
| 371 |
+
Pham, T., Tran, T., Phung, D., and Venkatesh, S. Column networks for collective classification. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 372 |
+
Popescul, A., Ungar, L. H., Lawrence, S., and Pennock, D. M. Towards structural logistic regression: Combining relational and statistical learning. *Departmental Papers (CIS)*, pp. 134, 2002.
|
| 373 |
+
Qu, M., Bengio, Y., and Tang, J. Gmnn: Graph markov neural networks. arXiv preprint arXiv:1905.06214, 2019.
|
| 374 |
+
Robbins, H. and Monro, S. A stochastic approximation method. Ann. Math. Statist., 22(3):400-407, 09 1951. doi: 10.1214/aoms/1177729586. URL https://doi.org/10.1214/aoms/1177729586.
|
| 375 |
+
Sen, P., Namata, G., Bilgic, M., Getoor, L., Galligher, B., and Eliassi-Rad, T. Collective classification in network data. AI magazine, 29(3):93-93, 2008.
|
| 376 |
+
|
| 377 |
+
Srinivasan, B. and Ribeiro, B. On the equivalence between node embeddings and structural graph representations. arXiv preprint arXiv:1910.00452, 2019.
|
| 378 |
+
Teixeira, L., Jalaian, B., and Ribeiro, B. Are graph neural networks miscalibrated? arXiv preprint arXiv:1905.02296, 2019.
|
| 379 |
+
Vignac, C., Loukas, A., and Frossard, P. Building powerful and equivariant graph neural networks with structural message-passing. arXiv e-prints, pp. arXiv-2006, 2020.
|
| 380 |
+
Vijayan, P., Chandak, Y., Khapra, M. M., Parthasarathy, S., and Ravindran, B. Hopf: Higher order propagation framework for deep collective classification. arXiv preprint arXiv:1805.12421, 2018.
|
| 381 |
+
Xiang, R. and Neville, J. Pseudolikelihood em for within-network relational learning. In 2008 Eighth IEEE International Conference on Data Mining, pp. 1103-1108. IEEE, 2008.
|
| 382 |
+
Xu, K., Hu, W., Leskovec, J., and Jegelka, S. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018.
|
| 383 |
+
Yang, J., Ribeiro, B., and Neville, J. Stochastic gradient descent for relational logistic regression via partial network crawls. arXiv preprint arXiv:1707.07716, 2017.
|
acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd61106fd7eb82ff80d12c44d781b000cfd69b09fea72766978250c5cae9eb49
|
| 3 |
+
size 286403
|
acollectivelearningframeworktoboostgnnexpressivenessfornodeclassification/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94e7444ccbc3d3db280131e5bea8427c4967d5a6525eea3ba8281d098480163e
|
| 3 |
+
size 582825
|
adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/4365bc2a-f514-4154-a9bb-2a54342aa305_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6018436b24d99cf3fdb4f080b3795708a58950cf8dbb4d4610adb77dbe43fda6
|
| 3 |
+
size 92757
|
adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/4365bc2a-f514-4154-a9bb-2a54342aa305_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ebb9ceb5cb9cde47d167103092453612c58d4c0532464a5eee16b90c607707c
|
| 3 |
+
size 119790
|
adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/4365bc2a-f514-4154-a9bb-2a54342aa305_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e31996210488aa55f2e224f1d5fef57a1424489f7ea096dd44cb2ebfe1bd8af
|
| 3 |
+
size 5224781
|
adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/full.md
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Deep Reinforcement Learning Approach to Marginalized Importance Sampling with the Successor Representation
|
| 2 |
+
|
| 3 |
+
Scott Fujimoto<sup>1</sup> David Meger<sup>1</sup> Doina Precup<sup>1</sup>
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Marginalized importance sampling (MIS), which measures the density ratio between the state-action occupancy of a target policy and that of a sampling distribution, is a promising approach for off-policy evaluation. However, current state-of-the-art MIS methods rely on complex optimization tricks and succeed mostly on simple toy problems. We bridge the gap between MIS and deep reinforcement learning by observing that the density ratio can be computed from the successor representation of the target policy. The successor representation can be trained through deep reinforcement learning methodology and decouples the reward optimization from the dynamics of the environment, making the resulting algorithm stable and applicable to high-dimensional domains. We evaluate the empirical performance of our approach on a variety of challenging Atari and MuJoCo environments.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
Off-policy evaluation (OPE) is a reinforcement learning (RL) task where the aim is to measure the performance of a target policy from data collected by a separate behavior policy (Sutton & Barto, 1998). As it can often be difficult or costly to obtain new data, OPE offers an avenue for reusing previously gathered data, making OPE an important challenge for applying RL to real-world domains (Zhao et al., 2009; Mandel et al., 2014; Swaminathan et al., 2017; Gauci et al., 2018).
|
| 12 |
+
|
| 13 |
+
Marginalized importance sampling (MIS) (Liu et al., 2018; Xie et al., 2019; Nachum et al., 2019a) is a family of OPE methods which re-weight sampled rewards by directly learning the density ratio between the state-action occupancy of the target policy and the sampling distribution. This
|
| 14 |
+
|
| 15 |
+
<scott.fujimoto@mail.mcgill.ca>.
|
| 16 |
+
|
| 17 |
+
Proceedings of the $38^{th}$ International Conference on Machine Learning, PMLR 139, 2021. Copyright 2021 by the author(s).
|
| 18 |
+
|
| 19 |
+
approach can have significantly lower variance than traditional importance sampling methods (Precup et al., 2001), which consider a product of ratios over trajectories, and is amenable to deterministic policies and behavior agnostic settings where the sampling distribution is unknown. However, the body of MIS work is largely theoretical, and as a result, empirical evaluations of MIS have mostly been carried out on simple low-dimensional tasks, such as mountain car (state dim. of 2) or cartpole (state dim. of 4). In comparison, deep RL algorithms have shown successful behaviors in high-dimensional domains such as Humanoid locomotion (state dim. of 376) and Atari (image-based).
|
| 20 |
+
|
| 21 |
+
In this paper, we present a straightforward approach for MIS that can be computed from the successor representation (SR) (Dayan, 1993) of the target policy by directly optimizing the reward function. Our algorithm, the Successor Representation Distribution Correction Estimation (SR-DICE), is the first method that allows MIS to scale to high-dimensional systems, far outperforming previous approaches. In comparison to previous algorithms which rely on minimax optimization or kernel methods (Liu et al., 2018; Nachum et al., 2019a; Uehara & Jiang, 2019; Mousavi et al., 2020; Yang et al., 2020), SR-DICE requires only a simple convex loss applied to a linear function, after computing the SR. Similar to the deep RL methods which can learn in high-dimensional domains, the SR can be computed easily using behavior-agnostic temporal-difference (TD) methods. This makes our algorithm highly amenable to deep learning architectures and applicable to complex tasks.
|
| 22 |
+
|
| 23 |
+
The SR, which measures the expected future occupancy of states for a given policy, has a clear relationship to MIS methods, which estimate the ratio between the occupancy of state-action pairs and the sampling distribution. However, this relationship is muddled in a deep RL context, where the deep SR measures the expected future sum of feature vectors. Our approach, SR-DICE, provides a straightforward and principled method for extracting density ratios from the SR without any modifications to the standard learning procedure of the SR. Access to these density ratios is valuable as they have a wide range of possible applications such as policy regularization (Nachum et al., 2019b; Touati et al., 2020), imitation learning (Kostrikov et al., 2019), off-policy
|
| 24 |
+
|
| 25 |
+
policy gradients (Imani et al., 2018; Liu et al., 2019b; Zhang et al., 2019), non-uniform sampling procedures (Sinha et al., 2020), or for mitigating distributional shift in offline RL (Fujimoto et al., 2019; Kumar et al., 2019).
|
| 26 |
+
|
| 27 |
+
We highlight the value of the MIS density ratios for one reason in particular—in our theoretical analysis we prove that SR-DICE and the deep SR produce exactly the same value estimate. This is surprising as SR-DICE takes a distinct approach for value estimation by re-weighting every reward in the dataset with an importance sampling ratio while the deep SR estimates the value in a similar fashion to TD learning. This theoretical result extends to the deep RL setting and is consistent in our experimental results. This result is a double-edged sword which (negatively) implies there is no discernible difference of using our MIS approach for policy evaluation, but (positively) implies the estimated density ratios are accurate enough to match the performance of TD methods. This is an important observation as our empirical results demonstrate that previous MIS methods scale very poorly in comparison to TD methods to high dimensions, which is consistent with prior results (Voloshin et al., 2019; Fu et al., 2021). Even if there is no difference for OPE, a MIS method which matches the performance of TD-based methods is desirable if we are concerned with estimating the density ratios of the target policy.
|
| 28 |
+
|
| 29 |
+
We benchmark the performance of SR-DICE on several high-dimensional domains in MuJoCo (Todorov et al., 2012) and Atari (Bellemare et al., 2013), against several recent MIS methods (Nachum et al., 2019a; Zhang et al., 2020a). Our results demonstrate several key findings regarding high-dimensional tasks.
|
| 30 |
+
|
| 31 |
+
Current MIS methods underperform deep RL at high-dimensional tasks. While previous results have shown that MIS methods can produce competitive results to TD methods, our empirical results show that MIS methods scale poorly to challenging tasks. In Atari we find that the baseline MIS method exhibit unstable estimates, often reaching errors with many orders of magnitude. Comparatively, the baseline deep RL methods, which rely on TD learning and have a history of achieving high performances in the control setting (Mnih et al., 2015; Schulman et al., 2017; Fujimoto et al., 2018), outperform the MIS baselines at every task and often by a wide margin.
|
| 32 |
+
|
| 33 |
+
SR-DICE outperforms current MIS methods at policy evaluation and therefore density ratio estimation. Our empirical results confirm our theoretical analysis, which state that SR-DICE and the standard deep SR approach should produce identical value estimates (with differences due only to changes to the optimization process). While this result may initially sound discouraging, given the direct SR approach is comparable to TD learning, and TD learning significantly outperforms current MIS methods, this result
|
| 34 |
+
|
| 35 |
+
also implies that SR-DICE is a much stronger technique for estimating density ratios than previous methods.
|
| 36 |
+
|
| 37 |
+
Ultimately, while SR-DICE produces a similar result to existing deep RL approaches for policy evaluation, it does provide a practical, scalable, and state-of-the-art approach for estimating state-action occupancy density ratios, while highlighting connections between the SR, reward function optimization, and state-action occupancy estimation. For ease of use and reproduction, our code is open-sourced (https://github.com/sfujim/SR-DICE).
|
| 38 |
+
|
| 39 |
+
# 2. Background
|
| 40 |
+
|
| 41 |
+
Reinforcement Learning. RL is a framework for maximizing accumulated reward of an agent interacting with its environment (Sutton & Barto, 1998). This problem is typically framed as a Markov Decision Process (MDP) $(\mathcal{S},\mathcal{A},\mathcal{R},p,d_0,\gamma)$ , with state space $\mathcal{S}$ , action space $\mathcal{A}$ , reward function $\mathcal{R}$ , dynamics model $p$ , initial state distribution $d_0$ and discount factor $\gamma$ . An agent selects actions according to a policy $\pi : \mathcal{S} \times \mathcal{A} \to [0,1]$ . In this paper we address the problem of off-policy evaluation (OPE) problem where the aim is to measure the normalized expected per-step reward of the policy $R(\pi) = (1 - \gamma)\mathbb{E}_{\pi}[\sum_{t=0}^{\infty} \gamma^t r(s_t, a_t)]$ . An important notion in OPE is the value function $Q^{\pi}(s, a) = \mathbb{E}_{\pi}[\sum_{t=0}^{\infty} \gamma^t r(s_t, a_t)|s_0 = s, a_0 = a]$ , which measures the expected sum of discounted rewards when following $\pi$ , starting from the state-action pair $(s, a)$ .
|
| 42 |
+
|
| 43 |
+
We define $d^{\pi}(s,a)$ as the discounted state-action occupancy, the probability of seeing $(s,a)$ under policy $\pi$ with discount $\gamma$ : $d^{\pi}(s,a) = (1 - \gamma)\sum_{t=0}^{\infty}\gamma^{t}\int_{s_{0}}d_{0}(s_{0})p_{\pi}(s_{0}\to s,t)\pi(a|s)ds_{0}$ , where $p_{\pi}(s_0\rightarrow s,t)$ is the probability of arriving at the state $s$ after $t$ time steps when starting from an initial state $s_0$ . This distribution is important as $R(\pi)$ equals the expected reward $r(s,a)$ under $d^{\pi}$ :
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
R (\pi) = \mathbb {E} _ {(s, a) \sim d ^ {\pi}, r (s, a)} [ r (s, a) ]. \tag {1}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
A common approach for estimating $R(\pi)$ is through temporal-difference (TD) learning (Sutton, 1988) where an estimate of the value function $Q(s,a)$ is updated over individual transitions $(s,a,r(s,a),s^{\prime})$ by the following:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
Q (s, a) \leftarrow \alpha \left(r (s, a) + \gamma Q \left(s ^ {\prime}, a ^ {\prime}\right)\right) + (1 - \alpha) Q (s, a), \tag {2}
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
where $a'$ is sampled according to the target policy $\pi$ and $\alpha$ is the learning rate. Provided an infinite set of transitions, TD learning is known to converge to the true value function in the off-policy setting (Jaakkola et al., 1994; Sutton & Barto, 1998). TD learning can also be applied to other learning problems, such as the successor representation, where the reward $r(s, a)$ in Equation (2) is replaced with the quantity of interest.
|
| 56 |
+
|
| 57 |
+
Successor Representation. The successor representation (SR) (Dayan, 1993) of a policy is a measure of occupancy of future states. It can be viewed as a general value function that learns a vector of the expected discounted visitation for each state. The SR $\Psi^{\pi}$ of a given policy $\pi$ is defined as $\Psi^{\pi}(s'|s) = \mathbb{E}_{\pi}[\sum_{t=0}^{\infty} \gamma^{t} \mathbb{1}(s_{t} = s') | s_{0} = s]$ . Importantly, the value function can be recovered from the SR by summing over the expected reward of each state $V^{\pi}(s) = \sum_{s'} \Psi^{\pi}(s'|s) \mathbb{E}_{a' \sim \pi}[r(s', a')]$ . For infinite state and action spaces, the SR can instead be generalized to the expected occupancy over features, known as the deep SR (Kulkarni et al., 2016) or successor features (Barreto et al., 2017). For a given encoding function $\phi: S \times \mathcal{A} \rightarrow \mathbb{R}^{n}$ , the deep SR $\psi^{\pi}: S \times \mathcal{A} \rightarrow \mathbb{R}^{n}$ is defined as the expected discounted sum of features from the encoding function $\phi$ when following the policy from a given state-action pair:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\psi^ {\pi} (s, a) = \mathbb {E} _ {\pi} \left[ \sum_ {t = 0} ^ {\infty} \gamma^ {t} \phi \left(s _ {t}, a _ {t}\right) \Bigg | s _ {0} = s, a _ {0} = a \right]. \quad (3)
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
If the encoding $\phi(s, a)$ is learned such that the original reward function is a linear function of the encoding $r(s, a) = \mathbf{w}^\top \phi(s, a)$ , then similar to the original formulation of SR, the value function can be recovered from a linear function of the SR: $Q^{\pi}(s, a) = \mathbf{w}^\top \psi^{\pi}(s, a)$ . The deep SR network $\psi^{\pi}$ is trained to minimize the MSE between $\psi^{\pi}(s, a)$ and $\phi(s, a) + \gamma \psi'(s', a')$ on transitions $(s, a, s')$ sampled from the dataset. A frozen target network $\psi'$ is used to provide stability (Mnih et al., 2015; Kulkarni et al., 2016), and is updated to the current network $\psi' \gets \psi^{\pi}$ after a fixed number of time steps. The encoding function $\phi$ is typically trained by an encoder-decoder network (Kulkarni et al., 2016; Machado et al., 2017; 2018a). For OPE where the reward function is learned by minimizing $\left(\mathbf{w}^\top \phi(s, a) - r(s, a)\right)^2$ , the SR is comparable to TD learning, as they both estimate the discounted sum of future rewards and use similar updates.
|
| 64 |
+
|
| 65 |
+
Marginalized Importance Sampling. Marginalized importance sampling (MIS) is a family of importance sampling approaches for off-policy evaluation in which the performance $R(\pi)$ is evaluated by re-weighting rewards sampled from a dataset $\mathcal{D} = \{(s, a, r, s')\} \sim p(s'|s, a)d^{\mathcal{D}}(s, a)$ , where $d^{\mathcal{D}}$ is an arbitrary distribution, typically but not necessarily, induced by some behavior policy. It follows that $R(\pi)$ can be computed with importance sampling weights on the rewards $\frac{d^{\pi}(s, a)}{d^{\mathcal{D}}(s, a)}$ :
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
R (\pi) = \mathbb {E} _ {(s, a) \sim d ^ {\mathcal {D}}, r (s, a)} \left[ \frac {d ^ {\pi} (s , a)}{d ^ {\mathcal {D}} (s , a)} r (s, a) \right]. \tag {4}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
The goal of marginalized importance sampling methods is to learn the weights $w(s, a) \approx \frac{d^{\pi}(s, a)}{d^{\mathcal{D}}(s, a)}$ , using data contained in $\mathcal{D}$ . The main benefit of MIS is that unlike traditional importance methods, the ratios are applied to individual
|
| 72 |
+
|
| 73 |
+
transitions rather than complete trajectories, which can reduce the variance of long or infinite horizon problems. In other cases, the ratios themselves can be used for a variety of applications which require estimating the occupancy of state-action pairs.
|
| 74 |
+
|
| 75 |
+
# 3. A Reward Function Perspective on Distribution Corrections
|
| 76 |
+
|
| 77 |
+
In this section, we present our behavior-agnostic approach to estimating MIS ratios, called the Successor Representation Distribution Correction Estimation (SR-DICE). Our main insight is that MIS can be viewed as an optimization over a learned reward function, where the loss is uniquely optimized when the virtual reward is the MIS density ratio.
|
| 78 |
+
|
| 79 |
+
Our derived loss function is a straightforward convex loss over the learned reward and the corresponding value function of the target policy. This naturally suggests the use of the successor representation which allows us to maintain an estimate of the value estimate while directly optimizing the reward function. This disentangles the learning process, where the propagation of reward through the MDP can be learned separately from the optimization of the reward. In other words, rather than learn a reward function and value function simultaneously, we tackle each separately, changing the difficult minimax optimization of previous methods into two phases. Interestingly enough, we show that our MIS estimator produces the identical value estimate as traditional deep SR methods. This means the challenging aspect of learning has been pushed onto the computation of the SR, rather than optimizing the density ratio estimate. Fortunately, we can leverage deep RL approaches (Mnih et al., 2015; Kulkarni et al., 2016) to make learning the SR stable, giving rise to a practical MIS method for high-dimensional tasks.
|
| 80 |
+
|
| 81 |
+
This section begins with the derivation of our core ideas, which shows MIS ratios can be learned through reward function optimization. We then highlight how the SR can be used for reward function optimization in the tabular domain. Finally, we generalize our results to the deep SR setting.
|
| 82 |
+
|
| 83 |
+
# 3.1. Basic Derivation
|
| 84 |
+
|
| 85 |
+
In MIS, our aim is to determine the MIS ratios $\frac{d^{\pi}(s,a)}{d^{\mathcal{D}}(s,a)}$ , using only data sampled from the dataset $\mathcal{D}$ and the target policy $\pi$ . This presents a challenge as we have direct access to neither $d^{\pi}$ nor $d^{\mathcal{D}}$ .
|
| 86 |
+
|
| 87 |
+
As a starting point, we begin by following the derivation of DualDICE (Nachum et al., 2019a). We first consider the convex function $\frac{1}{2} mx^2 - nx$ , which is uniquely minimized by $x^* = \frac{n}{m}$ . Now by replacing $x$ with a virtual reward $\hat{r}(s, a)$ , $m$ with the density of the dataset $d^{\mathcal{D}}(s, a)$ , and
|
| 88 |
+
|
| 89 |
+
$n$ with the density of the target policy $d^{\pi}(s,a)$ , we have reformulated the convex function as the following:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\begin{array}{l} \min _ {\hat {r} (s, a) \forall (s, a)} J (\hat {r}) := \frac {1}{2} \mathbb {E} _ {(s, a) \sim d ^ {\mathcal {D}}} [ \hat {r} (s, a) ^ {2} ] \tag {5} \\ - \left(1 - \gamma\right) \mathbb {E} _ {(s, a) \sim d ^ {\pi}} \left[ \hat {r} (s, a) \right]. \\ \end{array}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
As Equation (5) is still the convex function with renamed variables, following Nachum et al. (2019a), we can observe the following:
|
| 96 |
+
|
| 97 |
+
Observation 1 The objective $J(\hat{r})$ is minimized when $\hat{r}(s, a) = \frac{d^{\pi}(s, a)}{d^{\mathcal{D}}(s, a)}$ for all state-action pairs $(s, a)$ .
|
| 98 |
+
|
| 99 |
+
Equation (5) is an optimization over two expectations over $d^{\mathcal{D}}$ and $d^{\pi}$ . While the first expectation over $d^{\mathcal{D}}$ is tractable by sampling directly from the dataset $\mathcal{D}$ , the second expectation relies on the state-action visitation of the target policy $d^{\pi}(s,a)$ which is not directly accessible without a model of the MDP. At this point, we highlight our choice of notation, $\hat{r} (s,a)$ , in Equation (5). Describing the objective in terms of a fictitious reward $\hat{r}$ will allow us to draw on familiar relationships between rewards and value functions. Consider the equivalence between the value function over initial state-action pairs $(s_0,a_0)$ and the expectation of rewards over the state-action visitation of the policy $(1 - \gamma)\mathbb{E}_{s_0,a_0\sim \pi}[Q^\pi (s_0,a_0)] = \mathbb{E}_{d^\pi}[r(s,a)]$ . It follows that the expectation over $d^{\pi}$ in Equation (5) can be replaced with a value function $\hat{Q}^{\pi}$ over $\hat{r}$ :
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\begin{array}{l} \min _ {\hat {r} (s, a) \forall (s, a)} J (\hat {r}) := \frac {1}{2} \mathbb {E} _ {(s, a) \sim d ^ {\mathcal {D}}} [ \hat {r} (s, a) ^ {2} ] \tag {6} \\ - (1 - \gamma) \mathbb {E} _ {s _ {0}, a _ {0} \sim \pi (\cdot | s _ {0})} \left[ \hat {Q} ^ {\pi} (s _ {0}, a _ {0}) \right]. \\ \end{array}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
In other words, by noting that the value function is simply the (scaled) expected reward when sampled from the state-action visitation of the target policy, we can replace the impractical expectation over $d^{\pi}$ with a tractable value function. This form of the objective, Equation (6), is convenient because we can estimate the expectation over $d^{\mathcal{D}}$ by sampling directly from the dataset and $\hat{Q}^{\pi}$ can be computed using any policy evaluation method.
|
| 106 |
+
|
| 107 |
+
While we can estimate both terms in Equation (6) with relative ease, the optimization problem is not directly differentiable and would require re-learning the value function $\hat{Q}^{\pi}$ with every adjustment to the learned reward $\hat{r}$ . Fortunately, there exists a straightforward paradigm which enables direct reward function optimization known as successor representation (SR).
|
| 108 |
+
|
| 109 |
+
# 3.2. Tabular SR-DICE
|
| 110 |
+
|
| 111 |
+
We will begin by discussing how we can apply the SR to MIS in the tabular setting and then generalize our method to non-linear function approximation afterwards. Consider
|
| 112 |
+
|
| 113 |
+
the relationship between the SR $\Psi^{\pi}$ of the target policy $\pi$ and its value function:
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\begin{array}{l} \mathbb {E} _ {s _ {0}, a _ {0} \sim \pi (\cdot | s _ {0})} [ Q ^ {\pi} (s _ {0}, a _ {0}) ] = \mathbb {E} _ {s _ {0}} [ V ^ {\pi} (s _ {0}) ] \\ = \mathbb {E} _ {s _ {0}} \left[ \sum_ {s} \Psi^ {\pi} (s | s _ {0}) \mathbb {E} _ {a \sim \pi} [ r (s, a) ] \right]. \tag {7} \\ \end{array}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
It follows that we can create an optimization problem directly over the reward function $\hat{r}$ by modifying Equation (6) to use the SR:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array}{l} \min _ {\hat {r} (s, a) \forall (s, a)} J _ {\Psi} (\hat {r}) := \frac {1}{2} \mathbb {E} _ {(s, a) \sim d ^ {\mathcal {D}}} [ \hat {r} (s, a) ^ {2} ] (8) \\ - (1 - \gamma) \mathbb {E} _ {s _ {0}} \left[ \sum_ {s} \Psi^ {\pi} (s | s _ {0}) \mathbb {E} _ {a \sim \pi} [ \hat {r} (s, a) ] \right]. (8) \\ \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
Since this optimization problem is convex, it has a closed form solution. The unique optimizer of Equation (8) is:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array}{l} (1 - \gamma) \frac {\left| \mathcal {D} \right|}{\sum_ {\left(s ^ {\prime} , a ^ {\prime}\right) \in \mathcal {D}} \mathbb {1} \left(s ^ {\prime} = s , a ^ {\prime} = a\right)} \tag {9} \\ \cdot \mathbb {E} _ {s _ {0}} \left[ \pi (a | s) \Psi^ {\pi} (s | s _ {0}) \right]. \\ \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
By noting the relationship between the SR and the state occupancy $d^{\pi}(s,a) = (1 - \gamma)\mathbb{E}_{s_0}\big[\Psi^{\pi}(s|s_0)\pi (s,a)\big]$ and the fact that $d^{\mathcal{D}}(s,a) = \frac{\sum_{(s',a')\in\mathcal{D}}\mathbb{1}(s' = s,a' = a)}{|\mathcal{D}|}$ we can show this solution simplifies to the MIS density ratio $\frac{d^{\pi}(s,a)}{d^{\mathcal{D}}(s,a)}$
|
| 132 |
+
|
| 133 |
+
Theorem 1 Equation (9) is the optimal solution to Equation (8) and is equal to $\frac{d^{\pi}(s,a)}{d^{\mathcal{P}}(s,a)}$ .
|
| 134 |
+
|
| 135 |
+
A direct consequence of this result is that Equation (9) can be used with MIS policy evaluation to return the true value estimate $\frac{1}{|\mathcal{D}|}\sum_{(s,a)\in \mathcal{D}}\frac{d^{\pi}(s,a)}{d^{\mathcal{D}}(s,a)} r(s,a) = R(\pi)$ .
|
| 136 |
+
|
| 137 |
+
Unfortunately, the form of Equation (9) relies on the true SR $\Psi^{\pi}$ , as well as an expectation over $s_0$ , both of which may be unobtainable in the setting where we are sampling from a finite dataset $\mathcal{D}$ . However, we can still show that with an inexact SR $\hat{\Psi}$ and sampled estimate of the expectation, using the set of start states $\mathcal{D}_0$ in the dataset, approximating the optimizer Equation (9) with
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
\begin{array}{l} r ^ {*} (s, a) = (1 - \gamma) \frac {| \mathcal {D} |}{\sum_ {\left(s ^ {\prime} , a ^ {\prime}\right) \in \mathcal {D}} \mathbb {1} \left(s ^ {\prime} = s , a ^ {\prime} = a\right)} \tag {10} \\ \cdot \frac {1}{| \mathcal {D} _ {0} |} \sum_ {s _ {0} \in \mathcal {D} _ {0}} \pi (a | s) \hat {\Psi} (s | s _ {0}), \\ \end{array}
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
gives an MIS estimator $\frac{1}{|\mathcal{D}|}\sum_{(s,a)\in \mathcal{D}}r^{*}(s,a)r(s,a)$ of $R(\pi)$ which is identical to the estimate of $R(\pi)$ computed directly with the SR.
|
| 144 |
+
|
| 145 |
+
Theorem 2 Let $\bar{r}(s,a)$ be the average reward in the dataset $\mathcal{D}$ at the state-action pair $(s,a)$ . Let $\hat{\Psi}$ be any approximate SR. The direct SR estimator $(1 - \gamma)\frac{1}{|\mathcal{D}_0|}\sum_{s_0\in \mathcal{D}_0}\sum_{s\in \mathcal{S}}\hat{\Psi}(s|s_0)\sum_{a\in \mathcal{A}}\pi(a|s)\bar{r}(s,a)$ of $R(\pi)$ is identical to the MIS estimator $\frac{1}{|\mathcal{D}|}\sum_{(s,a)\in \mathcal{D}}r^*(s,a)r(s,a)$ .
|
| 146 |
+
|
| 147 |
+
The take-away is that even when estimating the SR, the approximate density ratio defined by $r^*$ is of sufficiently high quality to match the performance of directly estimating the value with the SR.
|
| 148 |
+
|
| 149 |
+
# 3.3. SR-DICE
|
| 150 |
+
|
| 151 |
+
Now we will consider how this MIS estimator can be generalized to continuous states by considering the deep SR $\psi^{\pi}$ over features $\phi(s, a)$ and optimizing the weights of a linear function $\mathbf{w}$ .
|
| 152 |
+
|
| 153 |
+
SR Refresher. We begin with a reminder of the details of the deep SR algorithm. The deep SR measures the expected sum of features $\psi^{\pi}(s,a) = \mathbb{E}_{\pi}\left[\sum_{t = 0}^{\infty}\gamma^{t}\phi (s_{t},a_{t})\right]$ . If the reward can be defined as a linear function over the features $r(s,a) = \mathbf{w}^{\top}\phi (s,a)$ then the value function can be recovered via a linear function over the deep SR $Q(s,a) = \mathbf{w}^{\top}\psi^{\pi}(s,a)$ . The typical deep SR pipeline follows three steps:
|
| 154 |
+
|
| 155 |
+
1. Learn the encoding $\phi$
|
| 156 |
+
2. Learn the deep SR $\psi^{\pi}$ over the encoding $\phi$ .
|
| 157 |
+
3. Learn $\mathbf{w}_{\mathrm{SR}}$ by minimizing $\left(\mathbf{w}_{\mathrm{SR}}^{\top}\phi (s,a) - r(s,a)\right)^{2}$ .
|
| 158 |
+
|
| 159 |
+
We leave the first two stages vague as there is flexibility in how they are approached. This most commonly involves training the encoding $\phi$ via an encoder-decoder network to reconstruct transitions and training the deep SR $\psi^{\pi}$ using TD learning-style methods (Kulkarni et al., 2016; Machado et al., 2018a). While we follow this standard practice, specific details are unimportant for our analysis and we relegate implementation-level details to the appendix.
|
| 160 |
+
|
| 161 |
+
Given the deep SR $\psi^{\pi}$ , we can use it to learn the MIS ratio. Recall our objective of reward function optimization (Equation (6)). In the deep SR paradigm, both the reward and value function are determined by linear functions with respect to a single weight vector $\mathbf{w}$ . Consequently, we can modify Equation (6) with these linear functions and then optimize the linear weights $\mathbf{w}$ directly:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\begin{array}{l} \min _ {\mathbf {w}} J (\mathbf {w}) := \frac {1}{2} \mathbb {E} _ {d ^ {\mathcal {D}}} \left[ \left(\mathbf {w} ^ {\top} \phi (s, a)\right) ^ {2} \right] \tag {11} \\ - (1 - \gamma) \mathbb {E} _ {s _ {0}, a _ {0} \sim \pi (\cdot | s _ {0})} \left[ \mathbf {w} ^ {\top} \psi^ {\pi} (s _ {0}, a _ {0}) \right], \\ \end{array}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
where in practice we replace the expectations with samples:
|
| 168 |
+
|
| 169 |
+
# Algorithm 1 SR-DICE
|
| 170 |
+
|
| 171 |
+
Input: SR $\psi$ , target network $\psi'$ , encoder $\phi$ , decoder $D$ . At each time step sample mini-batch of $N$ transitions $(s, a, r, s')$ and start states $s_0$ from $\mathcal{D}$ .
|
| 172 |
+
|
| 173 |
+
for $t = 1$ to $T_{1}$ do # Encoding $\phi$ loss
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
\min _ {\phi , D} \frac {1}{2} (D (\phi (s, a)) - (s, a)) ^ {2}.
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+
for $t = 1$ to $T_{2}$ do # Deep SR $\psi^{\pi}$ loss
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\min _ {\psi^ {\pi}} \frac {1}{2} (\phi (s, a) + \gamma \psi^ {\prime} (s ^ {\prime}, a ^ {\prime}) - \psi^ {\pi} (s, a)) ^ {2}.
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+
for $t = 1$ to $T_{3}$ do # Density ratio w loss (Equation (12))
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
a _ {0} \sim \pi (\cdot | s _ {0}).
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
\min _ {\mathbf {w}} \frac {1}{2} (\mathbf {w} ^ {\top} \phi (s, a)) ^ {2} - (1 - \gamma) \mathbf {w} ^ {\top} \psi^ {\pi} (s _ {0}, a _ {0}).
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
Output: $|\mathcal{D}|^{-1} \sum_{(s,a,r) \in \mathcal{D}} \mathbf{w}^\top \phi(s,a)r(s,a) \approx R(\pi)$ .
|
| 196 |
+
|
| 197 |
+
$$
|
| 198 |
+
\begin{array}{l} \min _ {\mathbf {w}} J (\mathbf {w}) := \frac {1}{2 | \mathcal {D} |} \sum_ {(s, a) \in \mathcal {D}} \left[ \left(\mathbf {w} ^ {\top} \phi (s, a)\right) ^ {2} \right] \tag {12} \\ - (1 - \gamma) \frac {1}{| \mathcal {D} _ {0} |} \sum_ {s _ {0} \in \mathcal {D} _ {0}, a _ {0}} \pi (a _ {0} | s _ {0}) \mathbf {w} ^ {\top} \psi^ {\pi} (s _ {0}, a _ {0}). \\ \end{array}
|
| 199 |
+
$$
|
| 200 |
+
|
| 201 |
+
Again, since the optimization problem Equation (12) is still convex, it has a closed form solution. Let $\Phi$ be a $|\mathcal{D}| \times F$ matrix where each row is the feature vector $\phi(s, a)$ with $F$ features. Let $\Psi$ be a $|\mathcal{D}_0||\mathcal{A}| \times F$ matrix where each row is the SR weighted by its probability under the policy $\pi(a_0 | s_0) \psi^\pi(s_0, a_0)$ . Let $\mathbf{1}$ be a $|\mathcal{D}_0||\mathcal{A}|$ dimensional vector of all 1. The unique optimizer $\mathbf{w}^*$ of Equation (12) is a $F$ dimensional vector defined as follows:
|
| 202 |
+
|
| 203 |
+
$$
|
| 204 |
+
\mathbf {w} ^ {*} = (1 - \gamma) \frac {| \mathcal {D} |}{| \mathcal {D} _ {0} |} \left(\Phi^ {\top} \Phi\right) ^ {- 1} \Psi^ {\top} \mathbf {1}. \tag {13}
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
In practice, a matrix-based solution is often undesirable and we may prefer iterative, gradient-based solutions for scalability. In this case, we can directly minimize Equation (12) by taking gradient steps with respect to $\mathbf{w}$ .
|
| 208 |
+
|
| 209 |
+
We now introduce our algorithm Successor Representation stationary DDistribution Correction Estimation (SR-DICE). SR-DICE follows the same first two steps of the standard SR procedure, but replaces the third step with optimizing Equation (12). Given $\mathbf{w}$ , an estimate of $R(\pi)$ can be returned by $\frac{1}{|\mathcal{D}|} \sum_{(s,a,r(s,a)) \in \mathcal{D}} \mathbf{w}^\top \phi(s,a)r(s,a)$ , where $\mathbf{w}^\top \phi(s,a) \approx \frac{d^\pi(s,a)}{d^\mathcal{D}(s,a)}$ . We summarize SR-DICE in Algorithm 1.
|
| 210 |
+
|
| 211 |
+
We now remark upon two important properties of SR-DICE. The first concerns the quality of the quality of the learned MIS ratio. Although it is difficult to make any guarantees on the accuracy of an approximate $\psi^{\pi}$ trained with deep RL techniques, if we assume $\psi^{\pi}$ is exact, then we can show that SR-DICE learns the least squares estimator to the desired density ratio.
|
| 212 |
+
|
| 213 |
+
Theorem 3 If the deep SR is exact, such that $(1 - \gamma)\mathbb{E}_{s_0,a_0}[\psi^\pi (s_0,a_0)] = \mathbb{E}_{(s,a)\sim d^\pi}[\phi (s,a)]$ , and the sup-
|
| 214 |
+
|
| 215 |
+
port of $d^{\pi}$ is contained in the dataset $\mathcal{D}$ , then the optimizer $\mathbf{w}^{*}$ of Equation (12), as defined by Equation (13), is the least squares estimator of $\sum_{(s,a)\in \mathcal{D}}\left(\mathbf{w}^{\top}\phi (s,a) - \frac{d^{\pi}(s,a)}{d^{\mathcal{D}}(s,a)}\right)^{2}$ .
|
| 216 |
+
|
| 217 |
+
The take-away from Theorem 3 is that our optimization problem, at least in the idealized setting, produces the same density ratios as directly learning them. This also means that the main source of error in SR-DICE is in the first two phases: learning the encoding $\phi$ and the deep SR $\psi^{\pi}$ . Notably, both of these steps are independent of the main optimization problem of learning $\mathbf{w}$ , as we have shifted the challenging aspects of density ratio estimation onto learning the deep SR. This leaves deep RL to do the heavy lifting. The remaining optimization problem, Equation (11), only involves directly updating the weights of a linear function, and unlike many other MIS methods, requires no tricky minimax optimization.
|
| 218 |
+
|
| 219 |
+
The second important property of SR-DICE is that Theorem 2 can be extended to the deep SR setting. That is, when derived from the same approximate SR, the optimal solution to both the SR-DICE estimator and the direct SR estimator produce identical estimates of $R(\pi)$ .
|
| 220 |
+
|
| 221 |
+
Theorem 4 Given the least squares estimator $\mathbf{w}_{SR}$ of $\sum_{(s,a)\in \mathcal{D}}\left(\mathbf{w}^{\top}\phi (s,a) - r(s,a)\right)^{2}$ and the optimizer $\mathbf{w}^{*}$ of Equation (12), as defined by Equation (13), then the traditional SR estimator $\frac{1}{|\mathcal{D}_0|}\sum_{s_0\in \mathcal{D}_0}\mathbf{w}_{SR}^{\top}\psi^{\pi}(s_0,a_0)$ of $R(\pi)$ is identical to the SR-DICE estimator $\frac{1}{|\mathcal{D}|}\sum_{(s,a,r(s,a))\in \mathcal{D}}\mathbf{w}^{*\top}\phi (s,a)r(s,a)$ of $R(\pi)$ .
|
| 222 |
+
|
| 223 |
+
This means that SR-DICE produces the same value estimate as the traditional deep SR algorithms, up to errors in the optimization process of $\mathbf{w}$ . In other words, SR-DICE does not suffer from the same instability issues that plague other MIS methods when tackling high-dimensional domains where deep RL methods excel (relative to more traditional methods). Although, we typically think of the objective of MIS methods as policy evaluation, since SR-DICE and traditional deep SR produce the same value estimate, there is not a strong argument for using SR-DICE for policy evaluation. However, this also suggests that the estimated density ratios are of reasonably high quality since SR-DICE achieves the same performance as deep RL approaches. Therefore, we can treat SR-DICE is a tractable method for accessing the state-action occupancy of the target policy.
|
| 224 |
+
|
| 225 |
+
# 4. Related Work
|
| 226 |
+
|
| 227 |
+
Off-Policy Evaluation. Off-policy evaluation (OPE) is a well-studied problem with several families of approaches. One family of approaches is based on importance sampling, which re-weights trajectories by the ratio of likelihoods under the target and behavior policy (Precup et al., 2001).
|
| 228 |
+
|
| 229 |
+
Importance sampling methods are unbiased but suffer from variance which can grow exponentially with the length of trajectories (Li et al., 2015; Jiang & Li, 2016). Consequently, research has focused on variance reduction (Thomas & Brunskill, 2016; Munos et al., 2016; Farajtabar et al., 2018) or contextual bandits (Dudík et al., 2011; Wang et al., 2017). Marginalized importance sampling methods (Liu et al., 2018) aim to avoid this exponential variance by considering the ratio in stationary distributions, giving an estimator with variance which is polynomial with respect to horizon (Xie et al., 2019; Liu et al., 2019a). Follow-up work has introduced a variety of approaches and improvements, allowing them to be behavior-agnostic (Nachum et al., 2019a; Uehara & Jiang, 2019; Mousavi et al., 2020; Yang et al., 2020) and operate in the undiscounted setting (Zhang et al., 2020a,b). In a similar vein, some OPE methods rely on emphasizing, or re-weighting, updates based on their stationary distribution (Sutton et al., 2016; Mahmood et al., 2017; Hallak & Mannor, 2017; Gelada & Bellemare, 2019), or learning the stationary distribution directly (Wang et al., 2007; 2008).
|
| 230 |
+
|
| 231 |
+
For many deep RL algorithms (Mnih et al., 2015; Lillicrap et al., 2015), off-policy evaluation is based on TD learning (Sutton, 1988) and approximate dynamic programming techniques such as Fitted Q-Iteration (Ernst et al., 2005; Riedmiller, 2005; Yang et al., 2019). While empirically successful, these approaches lose any theoretical guarantees with non-linear function approximation (Tsitsiklis & Van Roy, 1997; Chen & Jiang, 2019). Regardless, they have been shown to achieve a high performance at benchmark OPE tasks (Voloshin et al., 2019; Fu et al., 2021).
|
| 232 |
+
|
| 233 |
+
Successor Representation. Introduced originally by Dayan (1993) as an approach for improving generalization in temporal-difference methods, successor representations (SR) were revived by recent work on deep successor RL (Kulkarni et al., 2016) and successor features (Barreto et al., 2017) which demonstrated that the SR could be generalized to a function approximation setting. The SR has found applications for task transfer (Barreto et al., 2018; Grimm et al., 2019), navigation (Zhang et al., 2017; Zhu et al., 2017), and exploration (Machado et al., 2018a; Janz et al., 2019). It has also been used in a neuroscience context to model generalization and human reinforcement learning (Gershman et al., 2012; Momennejad et al., 2017; Gershman, 2018). The SR and our work also relate to state representation learning (Lesort et al., 2018) and general value functions (Sutton & Tanner, 2005; Sutton et al., 2011).
|
| 234 |
+
|
| 235 |
+
# 5. Experiments
|
| 236 |
+
|
| 237 |
+
To evaluate our method, we perform several off-policy evaluation (OPE) experiments on a variety of domains. The aim is to evaluate the normalized average discounted reward $\mathbb{E}_{(s,a)\sim d^{\pi},r}[r(s,a)]$ of a target policy $\pi$ . We benchmark our
|
| 238 |
+
|
| 239 |
+
Figure 1: Off-policy evaluation results on the continuous action MuJoCo domain using the easy experimental setting (500k time steps and $\sigma_{b} = 0.133$ ), matching the setting of previous methods (Zhang et al., 2020a). The shaded area captures one standard deviation across 10 trials. We remark that this setting can be considered easy as the behavior policy achieves a lower error, often outperforming all agents. SR-DICE significantly outperforms the other MIS methods on all environments, except for Humanoid, where GradientDICE achieves a comparable performance.
|
| 240 |
+

|
| 241 |
+
SR-DICE
|
| 242 |
+
|
| 243 |
+

|
| 244 |
+
DualDICE
|
| 245 |
+
|
| 246 |
+

|
| 247 |
+
GradientDICE
|
| 248 |
+
|
| 249 |
+
Ant
|
| 250 |
+

|
| 251 |
+
-Deep SR
|
| 252 |
+
|
| 253 |
+

|
| 254 |
+
Deep TD
|
| 255 |
+
|
| 256 |
+
Humanoid
|
| 257 |
+

|
| 258 |
+
Behavior $R(\pi_b)$
|
| 259 |
+
|
| 260 |
+
Figure 2: Off-policy evaluation results on the continuous action MuJoCo domain using the hard experimental setting (50k time steps, $\sigma_{b} = 0.2$ , random actions with $p = 0.2$ ). The shaded area captures one standard deviation across 10 trials. This setting uses significantly fewer time steps than the easy setting and the behavior policy is a poor estimate of the target policy. Again, we see SR-DICE outperforms the MIS methods, demonstrating the benefits of our proposed decomposition and simpler optimization. This setting also shows the benefits of deep RL methods over MIS methods for OPE in high-dimensional domains, as deep TD performs the strongest in every environment.
|
| 261 |
+

|
| 262 |
+
- SR-DICE
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
DualDICE
|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
GradientDICE
|
| 269 |
+
|
| 270 |
+

|
| 271 |
+
-Deep SR
|
| 272 |
+
Deep TD
|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
Behavior $R(\pi_b)$
|
| 276 |
+
|
| 277 |
+
algorithm against two MIS methods, DualDICE (Nachum et al., 2019a) and GradientDICE (Zhang et al., 2020b), two deep RL approaches and the true return of the behavior policy. The first deep RL method is a DQN-style approach (Mnih et al., 2015) where actions are selected by $\pi$ (denoted Deep TD) and the second is the deep SR where the weight $\mathbf{w}$ is trained to minimize the MSE between $\mathbf{w}^{\top}\phi(s,a)$ and $r(s,a)$ (Kulkarni et al., 2016). Environment-specific experimental details are presented below, and complete algorithmic and hyper-parameter details are included in the appendix.
|
| 278 |
+
|
| 279 |
+
Continuous Action Experiments. We evaluate the methods on a variety of MuJoCo environments (Brockman et al., 2016; Todorov et al., 2012). We examine two experimental settings. In both settings the target policy $\pi$ and behavior policy $\pi_{b}$ are stochastic versions of a deterministic policy $\pi_{d}$ obtained from training the TD3 algorithm (Fujimoto et al., 2018). We evaluate a target policy $\pi = \pi_{d} + \mathcal{N}(0, \sigma^{2})$ , where $\sigma = 0.1$ .
|
| 280 |
+
|
| 281 |
+
- For the easy setting, we gather a dataset of 500k transi
|
| 282 |
+
|
| 283 |
+
tions using a behavior policy $\pi_{b} = \pi_{d} + \mathcal{N}(0,\sigma_{b}^{2})$ , where $\sigma_{b} = 0.133$ . This setting roughly matches the experimental setting used by GradientDICE Zhang et al. (2020a).
|
| 284 |
+
|
| 285 |
+
- For the hard setting, we gather a significantly smaller dataset of 50k transitions using a behavior policy which acts randomly with $p = 0.2$ and uses $\pi_d + \mathcal{N}(0, \sigma_b^2)$ , where $\sigma_b = 0.2$ , with $p = 0.8$ .
|
| 286 |
+
|
| 287 |
+
Unless specified otherwise, we use a discount factor of $\gamma = 0.99$ and all hyper-parameters are kept constant across environments. All experiments are performed over 10 seeds. We display the results of the easy setting in Figure 1 and the hard setting in Figure 2.
|
| 288 |
+
|
| 289 |
+
Atari Experiments. To demonstrate our approach can scale to even more complex domains, we perform experiments with several Atari games (Bellemare et al., 2013), which are challenging due to their high-dimensional image-based state space. Standard pre-processing steps are applied (Castro et al., 2018) and sticky actions are used (Machado et al., 2018b) to increase difficulty and remove determinism. Each method is trained on a dataset of one million time steps. The
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 3: The log MSE for off-policy evaluation in the image-based Atari domain. This high-dimensional domain tests the ability of each method to scale to more complex environments. The shaded area captures one standard deviation across 3 trials. We can see the MIS baselines diverge on this challenging environment, while the remaining methods perform similarly. Perhaps surprisingly, on most games, the naive baseline of using $R(\pi_b)$ from the behavior policy outperforms all methods by a fairly significant margin. Although the estimates from deep RL methods are stable, they are biased, resulting in a higher MSE.
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
(a) Error Visualization
|
| 296 |
+
(b) Log MSE & (Percentage of rewards functions with minimum error)
|
| 297 |
+
Figure 4: To evaluate the quality of the MIS ratios, we evaluate each MIS ratio with 1000 randomly sampled reward functions and compare to the ground truth on-policy value estimates. (Left) Visualization of the distribution of error. Only 100 points are displayed for visual clarity. Error bars are over the standard deviation. To normalize values across rewards functions, we divide both the estimate and ground truth of $R(\pi)$ by the average reward in the dataset. (Right) Average log MSE and the standard deviation. In brackets is the percentage of reward functions where each method achieves the lowest error. We can see that SR-DICE achieves a low log MSE over a wide range of reward functions and outperforms the competing MIS methods on a high percentage of reward functions.
|
| 298 |
+
|
| 299 |
+
target policy is the deterministic greedy policy trained by Double DQN (Van Hasselt et al., 2016). The behavior policy is the $\epsilon$ -greedy policy with $\epsilon = 0.1$ . We use a discount factor of $\gamma = 0.99$ . Experiments are performed over 3 seeds. Results are displayed in Figure 3. Additional experiments with different behavior policies can be found in the appendix.
|
| 300 |
+
|
| 301 |
+
Evaluating the MIS ratios. To evaluate the quality of the MIS ratios themselves, we perform a randomized reward experiment. As the MIS ratio is only the value $w$ that will return the true value of $R(\pi) = \mathbb{E}_{\mathcal{D}}[w \cdot r(s, a)]$ for all possible reward functions (Uehara & Jiang, 2019), we generate a large set of rewards functions with a randomly-initialized neural network, and evaluate the estimate of $R(\pi)$ obtained from each MIS method on each reward function. The ground-truth is estimated by a set of 100 on-policy trajectories generated by $\pi$ . We generate 1000 reward functions, with scalar values in the range [0, 10] and remove any
|
| 302 |
+
|
| 303 |
+
redundant reward functions from the set. The MIS ratios and dataset are taken from the hard setting. Experiments are performed over 5 seeds. We report the results in Figure 4.
|
| 304 |
+
|
| 305 |
+
Discussion. Across the board we find SR-DICE significantly outperforms the MIS methods. Looking at the estimated values of $R(\pi)$ in the continuous action environments, Figure 2, we can see that SR-DICE converges rapidly and maintains a stable estimate, while the MIS methods are particularly unstable, especially in the case of DualDICE. These observations are consistent in the Atari domain (Figure 3). In accordance with our theoretical analysis, Deep SR and SR-DICE perform similarly in every task, further suggesting that the limiting factor in SR-DICE is the quality of the deep successor representation, rather than learning the density ratios. In the randomized reward experiment, we find that SR-DICE vastly outperforms the other MIS methods in average log MSE, and compares favorably against
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
(a) dataset size
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
(b) Discount factor $\gamma$
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
(c) Increased noise
|
| 315 |
+
Figure 5: Ablation study results for the HalfCheetah task. We default to the hard setting wherever possible. Error bars and the shaded area captures one standard deviation over 10 trials. (a) We vary the size of the dataset $\mathcal{D}$ . (b) We vary the discount factor $\gamma$ . (c) We use a new behavior policy with $\mathcal{N}(0, \sigma_b^2)$ noise with $\sigma_b = 0.5$ . (d) We use the same deterministic behavior and target policy.
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
(d) Deterministic policies
|
| 319 |
+
|
| 320 |
+
the other MIS methods in over $80\%$ of reward functions. In the most challenging task, Humanoid, SR-DICE is the best method in over $98\%$ of reward functions. This suggests that SR-DICE provides much higher quality MIS ratio estimates than previous methods.
|
| 321 |
+
|
| 322 |
+
Ablation. To study the robustness of SR-DICE relative to the competing methods, we perform an ablation study and investigate the effects of dataset size, discount factor, and two different behavior policies. Unless specified otherwise, we use experimental settings matching the hard setting. We report the results in Figure 5. In the dataset size experiment (a), SR-DICE performs well with as few as 5k transitions (5 trajectories). In some instances, the performance is unexpectedly improved with less data, although incrementally. For small datasets, the SR methods outperform Deep TD. One hypothesis is that the encoding acts as an auxiliary reward and helps stabilize learning in the low data regime. In (b) we report the performance over changes in discount factor. The relative ordering across methods is unchanged. In (c) we use a behavior policy of $\mathcal{N}(0,\sigma_b^2)$ , with $\sigma_{b} = 0.5$ , a much larger standard deviation than either setting for continuous control. The results are similar to the original setting, with an increased bias on the deep RL methods. In (d) we use the underlying deterministic policy as both the behavior and target policy. Even though this setup should be easier since the task is no longer off-policy, the baseline MIS methods perform surprisingly poorly, once again demonstrating their weakness on high-dimensional domains.
|
| 323 |
+
|
| 324 |
+
# 6. Conclusion
|
| 325 |
+
|
| 326 |
+
In this paper, we introduce a method which can perform marginalized importance sampling (MIS) using the successor representation (SR) of the target policy. This is achieved by deriving an MIS formulation that can be viewed as reward function optimization. By using the SR, we effectively
|
| 327 |
+
|
| 328 |
+
disentangle the dynamics of the environment from learning the reward function. This allows us to (a) use well-known deep RL methods to effectively learn the SR in challenging domains (Mnih et al., 2015; Kulkarni et al., 2016) and (b) provide a straightforward loss function to learn the density ratios without any optimization tricks necessary for previous methods (Liu et al., 2018; Uehara & Jiang, 2019; Nachum et al., 2019a; Zhang et al., 2020b; Yang et al., 2020). Our resulting algorithm, SR-DICE, outperforms prior MIS methods in terms of both performance and stability and is the first MIS method which demonstrably scales to high-dimensional problems.
|
| 329 |
+
|
| 330 |
+
# 7. Acknowledgements
|
| 331 |
+
|
| 332 |
+
Scott Fujimoto is supported by a NSERC scholarship as well as the Borealis AI Global Fellowship Award. This research was enabled in part by support provided by Calcul Quebec and Compute Canada. We would like to thank Wesley Chung, Pierre-Luc Bacon, Edward Smith, and Wei-Di Chang for helpful discussions and feedback.
|
| 333 |
+
|
| 334 |
+
# References
|
| 335 |
+
|
| 336 |
+
Barreto, A., Dabney, W., Munos, R., Hunt, J. J., Schaul, T., van Hasselt, H. P., and Silver, D. Successor features for transfer in reinforcement learning. In Advances in neural information processing systems, pp. 4055-4065, 2017.
|
| 337 |
+
Barreto, A., Borsa, D., Quan, J., Schaul, T., Silver, D., Hessel, M., Mankowitz, D., Zidek, A., and Munos, R. Transfer in deep reinforcement learning using successor features and generalised policy improvement. In International Conference on Machine Learning, pp. 501-510, 2018.
|
| 338 |
+
Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M. The arcade learning environment: An evaluation plat
|
| 339 |
+
|
| 340 |
+
form for general agents. Journal of Artificial Intelligence Research, 47:253-279, 2013.
|
| 341 |
+
Brockman, G., Cheung, V., Pettersson, L., Schneider, J., Schulman, J., Tang, J., and Zaremba, W. Openai gym, 2016.
|
| 342 |
+
Castro, P. S., Moitra, S., Gelada, C., Kumar, S., and Bellemare, M. G. Dopamine: A research framework for deep reinforcement learning. arXiv preprint arXiv:1812.06110, 2018.
|
| 343 |
+
Chen, J. and Jiang, N. Information-theoretic considerations in batch reinforcement learning. arXiv preprint arXiv:1905.00360, 2019.
|
| 344 |
+
Dayan, P. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 5(4):613-624, 1993.
|
| 345 |
+
Dudík, M., Langford, J., and Li, L. Doubly robust policy evaluation and learning. In Proceedings of the 28th International Conference on International Conference on Machine Learning, pp. 1097-1104, 2011.
|
| 346 |
+
Ernst, D., Geurts, P., and Wehenkel, L. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6(Apr):503-556, 2005.
|
| 347 |
+
Farajtabar, M., Chow, Y., and Ghavamzadeh, M. More robust doubly robust off-policy evaluation. In International Conference on Machine Learning, pp. 1447-1456, 2018.
|
| 348 |
+
Fu, J., Norouzi, M., Nachum, O., Tucker, G., Wang, Z., Novikov, A., Yang, M., Zhang, M. R., Chen, Y., Kumar, A., Paduraru, C., Levine, S., and Paine, T. Benchmarks for deep off-policy evaluation. In International Conference on Learning Representations, 2021.
|
| 349 |
+
Fujimoto, S., van Hoof, H., and Meger, D. Addressing function approximation error in actor-critic methods. In International Conference on Machine Learning, volume 80, pp. 1587-1596. PMLR, 2018.
|
| 350 |
+
Fujimoto, S., Meger, D., and Precup, D. Off-policy deep reinforcement learning without exploration. In International Conference on Machine Learning, pp. 2052-2062, 2019.
|
| 351 |
+
Gauci, J., Conti, E., Liang, Y., Virochsiri, K., He, Y., Kaden, Z., Narayanan, V., Ye, X., Chen, Z., and Fujimoto, S. Horizon: Facebook's open source applied reinforcement learning platform. arXiv preprint arXiv:1811.00260, 2018.
|
| 352 |
+
Gelada, C. and Bellemare, M. G. Off-policy deep reinforcement learning by bootstrapping the covariate shift. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 3647-3655, 2019.
|
| 353 |
+
|
| 354 |
+
Gershman, S. J. The successor representation: its computational logic and neural substrates. Journal of Neuroscience, 38(33):7193-7200, 2018.
|
| 355 |
+
Gershman, S. J., Moore, C. D., Todd, M. T., Norman, K. A., and Sederberg, P. B. The successor representation and temporal context. *Neural Computation*, 24(6):1553-1568, 2012.
|
| 356 |
+
Grimm, C., Higgins, I., Barreto, A., Teptyashin, D., Wulfmeier, M., Hertweck, T., Hadsell, R., and Singh, S. Disentangled cumulants help successor representations transfer to new tasks. arXiv preprint arXiv:1911.10866, 2019.
|
| 357 |
+
Hallak, A. and Mannor, S. Consistent on-line off-policy evaluation. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1372-1383. JMLR.org, 2017.
|
| 358 |
+
Imani, E., Graves, E., and White, M. An off-policy policy gradient theorem using emphatic weightings. In Advances in Neural Information Processing Systems, pp. 96-106, 2018.
|
| 359 |
+
Jaakkola, T., Jordan, M. I., and Singh, S. P. On the convergence of stochastic iterative dynamic programming algorithms. Neural computation, 6(6):1185-1201, 1994.
|
| 360 |
+
Janz, D., Hron, J., Mazur, P., Hofmann, K., Hernández-Lobato, J. M., and Tschiatschek, S. Successor uncertainties: exploration and uncertainty in temporal difference learning. In Advances in Neural Information Processing Systems, pp. 4509-4518, 2019.
|
| 361 |
+
Jiang, N. and Li, L. Doubly robust off-policy value evaluation for reinforcement learning. In International Conference on Machine Learning, pp. 652-661, 2016.
|
| 362 |
+
Kostrikov, I., Nachum, O., and Tompson, J. Imitation learning via off-policy distribution matching. arXiv preprint arXiv:1912.05032, 2019.
|
| 363 |
+
Kulkarni, T. D., Saeedi, A., Gautam, S., and Gershman, S. J. Deep successor reinforcement learning. arXiv preprint arXiv:1606.02396, 2016.
|
| 364 |
+
Kumar, A., Fu, J., Soh, M., Tucker, G., and Levine, S. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pp. 11784-11794, 2019.
|
| 365 |
+
Lesort, T., Diaz-Rodriguez, N., Goudou, J.-F., and Filliat, D. State representation learning for control: An overview. Neural Networks, 108:379-392, 2018.
|
| 366 |
+
Li, L., Munos, R., and Szepesvari, C. Toward minimax off-policy value estimation. In Artificial Intelligence and Statistics, pp. 608-616, 2015.
|
| 367 |
+
|
| 368 |
+
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. arXiv preprint arXiv:1509.02971, 2015.
|
| 369 |
+
Liu, Q., Li, L., Tang, Z., and Zhou, D. Breaking the curse of horizon: Infinite-horizon off-policy estimation. In Advances in Neural Information Processing Systems, pp. 5356-5366, 2018.
|
| 370 |
+
Liu, Y., Bacon, P.-L., and Brunskill, E. Understanding the curse of horizon in off-policy evaluation via conditional importance sampling. arXiv preprint arXiv:1910.06508, 2019a.
|
| 371 |
+
Liu, Y., Swaminathan, A., Agarwal, A., and Brunskill, E. Off-policy policy gradient with state distribution correction. arXiv preprint arXiv:1904.08473, 2019b.
|
| 372 |
+
Machado, M. C., Rosenbaum, C., Guo, X., Liu, M., Tesauro, G., and Campbell, M. Eigenoption discovery through the deep successor representation. arXiv preprint arXiv:1710.11089, 2017.
|
| 373 |
+
Machado, M. C., Bellemare, M. G., and Bowling, M. Count-based exploration with the successor representation. arXiv preprint arXiv:1807.11622, 2018a.
|
| 374 |
+
Machado, M. C., Bellemare, M. G., Talvitie, E., Veness, J., Hausknecht, M., and Bowling, M. Revisiting the arcade learning environment: Evaluation protocols and open problems for general agents. Journal of Artificial Intelligence Research, 61:523-562, 2018b.
|
| 375 |
+
Mahmood, A. R., Yu, H., and Sutton, R. S. Multi-step off-policy learning without importance sampling ratios. arXiv preprint arXiv:1702.03006, 2017.
|
| 376 |
+
Mandel, T., Liu, Y.-E., Levine, S., Brunskill, E., and Popovic, Z. Offline policy evaluation across representations with applications to educational games. In International Conference on Autonomous Agents and Multiagent Systems, 2014.
|
| 377 |
+
Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., et al. Human-level control through deep reinforcement learning. Nature, 518(7540): 529-533, 2015.
|
| 378 |
+
Momennejad, I., Russek, E. M., Cheong, J. H., Botvinick, M. M., Daw, N. D., and Gershman, S. J. The successor representation in human reinforcement learning. Nature Human Behaviour, 1(9):680-692, 2017.
|
| 379 |
+
Mousavi, A., Li, L., Liu, Q., and Zhou, D. Black-box off-policy estimation for infinite-horizon reinforcement learning. arXiv preprint arXiv:2003.11126, 2020.
|
| 380 |
+
|
| 381 |
+
Munos, R., Stepleton, T., Harutyunyan, A., and Bellemare, M. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1054-1062, 2016.
|
| 382 |
+
Nachum, O., Chow, Y., Dai, B., and Li, L. Dualdice: Behavior-agnostic estimation of discounted stationary distribution corrections. In Advances in Neural Information Processing Systems, pp. 2315-2325, 2019a.
|
| 383 |
+
Nachum, O., Dai, B., Kostrikov, I., Chow, Y., Li, L., and Schuurmans, D. Algaedice: Policy gradient from arbitrary experience. arXiv preprint arXiv:1912.02074, 2019b.
|
| 384 |
+
Precup, D., Sutton, R. S., and Dasgupta, S. Off-policy temporal-difference learning with function approximation. In International Conference on Machine Learning, pp. 417-424, 2001.
|
| 385 |
+
Riedmiller, M. Neural fitted q iteration-first experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pp. 317-328. Springer, 2005.
|
| 386 |
+
Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 387 |
+
Sinha, S., Song, J., Garg, A., and Ermon, S. Experience replay with likelihood-free importance weights. arXiv preprint arXiv:2006.13169, 2020.
|
| 388 |
+
Sutton, R. S. Learning to predict by the methods of temporal differences. Machine learning, 3(1):9-44, 1988.
|
| 389 |
+
Sutton, R. S. and Barto, A. G. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.
|
| 390 |
+
Sutton, R. S. and Tanner, B. Temporal-difference networks. In Advances in neural information processing systems, pp. 1377-1384, 2005.
|
| 391 |
+
Sutton, R. S., Modayil, J., Delp, M., Degris, T., Pilarski, P. M., White, A., and Precup, D. Horde: a scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761-768, 2011.
|
| 392 |
+
Sutton, R. S., Mahmood, A. R., and White, M. An emphatic approach to the problem of off-policy temporal-difference learning. The Journal of Machine Learning Research, 17 (1):2603-2631, 2016.
|
| 393 |
+
Swaminathan, A., Krishnamurthy, A., Agarwal, A., Dudik, M., Langford, J., Jose, D., and Zitouni, I. Off-policy evaluation for slate recommendation. In Advances in
|
| 394 |
+
|
| 395 |
+
Neural Information Processing Systems, pp. 3632-3642, 2017.
|
| 396 |
+
Thomas, P. and Brunskill, E. Data-efficient off-policy policy evaluation for reinforcement learning. In International Conference on Machine Learning, pp. 2139-2148, 2016.
|
| 397 |
+
Todorov, E., Erez, T., and Tassa, Y. Mujoco: A physics engine for model-based control. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 5026-5033. IEEE, 2012.
|
| 398 |
+
Touati, A., Zhang, A., Pineau, J., and Vincent, P. Stable policy optimization via off-policy divergence regularization. arXiv preprint arXiv:2003.04108, 2020.
|
| 399 |
+
Tsitsiklis, J. N. and Van Roy, B. Analysis of temporal-difference learning with function approximation. In Advances in neural information processing systems, pp. 1075-1081, 1997.
|
| 400 |
+
Uehara, M. and Jiang, N. Minimax weight and q-function learning for off-policy evaluation. arXiv preprint arXiv:1910.12809, 2019.
|
| 401 |
+
Van Hasselt, H., Guez, A., and Silver, D. Deep reinforcement learning with double q-learning. In AAAI, pp. 2094-2100, 2016.
|
| 402 |
+
Voloshin, C., Le, H. M., Jiang, N., and Yue, Y. Empirical study of off-policy policy evaluation for reinforcement learning. arXiv preprint arXiv:1911.06854, 2019.
|
| 403 |
+
Wang, T., Bowling, M., and Schuurmans, D. Dual representations for dynamic programming and reinforcement learning. In 2007 IEEE International Symposium on Approximate Dynamic Programming and Reinforcement Learning, pp. 44-51. IEEE, 2007.
|
| 404 |
+
Wang, T., Bowling, M., Schuurmans, D., and Lizotte, D. J. Stable dual dynamic programming. In Advances in neural information processing systems, pp. 1569-1576, 2008.
|
| 405 |
+
Wang, Y.-X., Agarwal, A., and Dudík, M. Optimal and adaptive off-policy evaluation in contextual bandits. In International Conference on Machine Learning, pp. 3589-3597, 2017.
|
| 406 |
+
Xie, T., Ma, Y., and Wang, Y.-X. Towards optimal off-policy evaluation for reinforcement learning with marginalized importance sampling. In Advances in Neural Information Processing Systems, pp. 9665-9675, 2019.
|
| 407 |
+
Yang, M., Nachum, O., Dai, B., Li, L., and Schuurmans, D. Off-policy evaluation via the regularized lagrangian. Advances in Neural Information Processing Systems, 33, 2020.
|
| 408 |
+
|
| 409 |
+
Yang, Z., Xie, Y., and Wang, Z. A theoretical analysis of deep q-learning. arXiv preprint arXiv:1901.00137, 2019.
|
| 410 |
+
Zhang, J., Springenberg, J. T., Boedecker, J., and Burgard, W. Deep reinforcement learning with successor features for navigation across similar environments. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 2371-2378. IEEE, 2017.
|
| 411 |
+
Zhang, R., Dai, B., Li, L., and Schuurmans, D. Gendice: Generalized offline estimation of stationary values. arXiv preprint arXiv:2002.09072, 2020a.
|
| 412 |
+
Zhang, S., Boehmer, W., and Whiteson, S. Generalized off-policy actor-critic. In Advances in Neural Information Processing Systems, pp. 1999-2009, 2019.
|
| 413 |
+
Zhang, S., Liu, B., and Whiteson, S. Gradientdice: Rethinking generalized offline estimation of stationary values. arXiv preprint arXiv:2001.11113, 2020b.
|
| 414 |
+
Zhao, Y., Kosorok, M. R., and Zeng, D. Reinforcement learning design for cancer clinical trials. Statistics in medicine, 28(26):3294, 2009.
|
| 415 |
+
Zhu, Y., Gordon, D., Kolve, E., Fox, D., Fei-Fei, L., Gupta, A., Mottaghi, R., and Farhadi, A. Visual semantic planning using deep successor representations. In Proceedings of the IEEE International Conference on Computer Vision, pp. 483-492, 2017.
|
adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d950103b2f3dcba38d5eb7b3b3a01f3da37fed507911452608dad602d3843dc0
|
| 3 |
+
size 427422
|
adeepreinforcementlearningapproachtomarginalizedimportancesamplingwiththesuccessorrepresentation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:420312c04d6e6c9db13ae8dbd99502bef0f3cac442ca1f6ddf1471ad093f973c
|
| 3 |
+
size 584036
|
adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/eccf1f7b-3a5f-49a7-88f5-4ac04b578025_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c495dd694ddc7f01bd02ebab9979d3a2ae867ab5fd1d96533f6e6153ac5d9bd6
|
| 3 |
+
size 94755
|
adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/eccf1f7b-3a5f-49a7-88f5-4ac04b578025_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cdce193b302b86980f458fc81812b8529b5656580ada0226c161fefb3ccfc1eb
|
| 3 |
+
size 113591
|
adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/eccf1f7b-3a5f-49a7-88f5-4ac04b578025_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ceac878121f0008190ca34dcc5ab7b1f81e70689aa5f61578ba45567cb36c71
|
| 3 |
+
size 551101
|
adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/full.md
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Differentiable Point Process with Its Application to Spiking Neural Networks
|
| 2 |
+
|
| 3 |
+
# Hiroshi Kajino
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
This paper is concerned about a learning algorithm for a probabilistic model of spiking neural networks (SNNs). Jimenez Rezende & Gerstner (2014) proposed a stochastic variational inference algorithm to train SNNs with hidden neurons. The algorithm updates the variational distribution using the score function gradient estimator, whose high variance often impedes the whole learning algorithm. This paper presents an alternative gradient estimator for SNNs based on the path-wise gradient estimator. The main technical difficulty is a lack of a general method to differentiate a realization of an arbitrary point process, which is necessary to derive the path-wise gradient estimator. We develop a differentiable point process, which is the technical highlight of this paper, and apply it to derive the path-wise gradient estimator for SNNs. We investigate the effectiveness of our gradient estimator through numerical simulation.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
A spiking neural network (SNN) is an artificial neural network (ANN) where neurons communicate with each other using spikes rather than real values as the conventional ANNs do. The conventional ANN is a special case of SNN where information is encoded into the firing rate of neurons (which we call the rate coding) and the rate serves as the communication currency. This specification facilitates developing learning algorithms for ANNs, leading to the recent great success of deep neural networks. On the other hand, in the community of neuroscience, experimental evidence on biological neurons indicates that the rate coding alone cannot explain the whole brain activity (Bothe, 2004) and more precise modeling of neural coding is anticipated. Since there still exist performance gaps between the rate-based ANNs and biological neural networks (i.e., brains) in terms of inference capability and energy efficiency, this
|
| 12 |
+
|
| 13 |
+
raises the following question: how much of the current performance gaps can be attributed to this difference on neural coding? This open problem motivates us to study SNNs.
|
| 14 |
+
|
| 15 |
+
One of the major obstacles towards answering it is a lack of practical learning algorithms for SNNs, which discourages us from empirical investigation. While there exist a number of attempts to develop learning algorithms, most of them have more or less limited applicability. We consider a practical learning algorithm should at least be (i) theoretically grounded, (ii) empirically confirmed to work well, and (iii) easy to simulate (fewer hyperparameters, less computation time, etc.)<sup>1</sup>. For example, theoretical aspects of the algorithms based on spike-timing-dependent plasticity (Chapter 19 (Gerstner et al., 2014)) are not well understood. For another example, simulating learning algorithms for continuous-time deterministic SNNs requires the step-size parameter of time-axis discretization when the dynamics of a neuron is described by differential equations (e.g., (Huh & Sejnowski, 2018)). The step-size parameter brings about the trade-off between the simulation quality and computation time, which makes the simulation more intricate. These examples illustrate that even major approaches do not satisfy all the requirements above, and therefore, there still exists much room for improvement.
|
| 16 |
+
|
| 17 |
+
Among a number of approaches, we employ as a foundation a probabilistic formulation of SNNs (Pfister et al., 2006), which models spike trains (temporal sequence of spikes emitted from neurons) as a realization of a multivariate point process. It is easier for us to start from it than others because it already satisfies requirements (i) and (iii), which are more intrinsic properties than requirement (ii). In fact, learning algorithms are formalized by maximum likelihood estimation, and its exact simulation has no trade-off hyperparameter as will be explained in Section 2.2. Therefore, the remaining concern is its empirical performance.
|
| 18 |
+
|
| 19 |
+
One of the state-of-the-art learning algorithms for probabilistic SNNs is the work by Jimenez Rezende & Gerstner (2014). The authors propose a stochastic variational inference algorithm for SNNs with hidden neurons. Since spike trains of hidden neurons are unobservable and it is intractable to compute the marginal likelihood, an evidence
|
| 20 |
+
|
| 21 |
+
lowerbound (ELBO) is instead used as the objective function (Section 4.2). The key factor for optimizing ELBO is the way we estimate the gradient of ELBO. The authors employed the score function gradient estimator, also known as the REINFORCE estimator, which is widely applicable but is often reported to suffer from its high variance.
|
| 22 |
+
|
| 23 |
+
Our main idea is to substitute a path-wise gradient estimator for the score function gradient estimator. The path-wise gradient estimator tends to have lower variance than the score function gradient estimator (Mohamed et al., 2019), but it is not widely applicable (and is not applicable to SNNs) because it requires a sample from the variational distribution to be differentiable. Our contribution is that we develop a differentiable point process (Section 3) and apply it to derive the path-wise gradient estimator for SNNs (Section 4.2.2).
|
| 24 |
+
|
| 25 |
+
We empirically investigate the effectiveness of the proposed learning algorithm in Section 5. We will confirm that (i) the proposed gradient estimator has lower variance than the existing one and (ii) this lower variance contributes to improve the performance of the learning algorithm. By comparing the performance of the proposed and existing ones, we obtain experimental results supporting these hypotheses. Therefore, we conclude that our path-wise gradient estimator improves empirical performance of SNNs.
|
| 26 |
+
|
| 27 |
+
One of the limitations of our learning algorithm as compared to the existing algorithm (Jimenez Rezende & Gerstner, 2014) is computation time. Since our algorithm generates more hidden spikes than the existing one does, our algorithm requires more computation time. We empirically examine the computational overhead of our algorithm against the existing one, and find that our algorithm requires 2.8 times more computation time than the existing one.
|
| 28 |
+
|
| 29 |
+
Notation. Let $[N] = \{1,2,\dots ,N\}$ . For any vector $\mathbf{x}$ , its $d$ -th element is represented by $x_{d}$ . $\left[x_d\right]_{d\in [D]}$ denotes a $D$ -dimensional vector whose $d$ -th element is $x_{d}$ . For any vector $\mathbf{x} \in \mathbb{R}^{D}$ and scalar $c \in \mathbb{R}$ , $\left[\mathbf{x}^{\top} c\right]^{\top}$ denotes the $(D + 1)$ -dimensional vector concatenating $\mathbf{x}$ and $c$ . Let $\mathbb{R}_{\geq 0} = \{x \geq 0\}$ and $\mathbb{R}_{>0} = \{x > 0\}$ . Let $\mathbb{1}^{D} = \{\mathbf{1}_{d}\}_{d \in [D]}$ be the set of $D$ -dimensional one-hot vectors, where $\mathbf{1}_d \in \{0,1\}^D$ is the one-hot vector whose $d$ -th element is 1 and the others are 0. For any set $A$ , let $\mathrm{conv}(A)$ be its convex hull, let $\mathrm{conv}_0(A) := \mathrm{conv}(A \cup \{0\})$ . Let $\operatorname{Cat}(\mathbf{p})$ be the categorical distribution with parameter $\mathbf{p} \in \mathrm{conv}(\mathbb{1}^D)$ , whose random variable takes $\mathbf{1}_d \in \mathbb{1}^D$ with probability $p_d$ . Let $U[a,b]$ denote the uniform distribution over $[a,b]$ . For any expectation operator $\mathbb{E}_p$ , let $\hat{\mathbb{E}}_p$ be its Monte-Carlo approximation using an i.i.d. sample from $p$ .
|
| 30 |
+
|
| 31 |
+
# 2. Preliminaries
|
| 32 |
+
|
| 33 |
+
This section introduces temporal point processes along with their parameter estimation and sampling methods.
|
| 34 |
+
|
| 35 |
+
# 2.1. Point Processes
|
| 36 |
+
|
| 37 |
+
A point process (Daley & Vere-Jones, 2003) is a probabilistic model of an event collection. It is called a temporal point process when the event collection evolves in time. This paper only deals with a temporal point process, and therefore, we refer to it as a point process. We assume that point processes are simple, i.e., no events coincide.
|
| 38 |
+
|
| 39 |
+
# 2.1.1. UNIVARIATE POINT PROCESS
|
| 40 |
+
|
| 41 |
+
Assume we observe a sequence of $N\in \mathbb{N}$ discrete events during time interval $[0,T]$ , and let $\mathcal{T}$ denote such an observation. $\mathcal{T}$ can be represented by a series of event time stamps $\{t_n\in [0,T]\}_{n\in [N]}$ as well as the information that we observe no event during $[0,t_1)$ , $\{(t_{n},t_{n + 1})\}_{n = 1}^{N - 1}$ , and $(t_N,T]$ . Let $\mathcal{T}^{\leq t_n}$ represents a partial observation of $\mathcal{T}$ up to and including time $t_n$ . One way of modeling $\mathcal{T}$ is to specify the probability density function of the event time stamp $t_{n + 1}$ given the collection of its past events $\mathcal{T}^{\leq t_n}$ , which we describe, $f(t\mid \mathcal{T}^{\leq t_n})$ . Note that the probability density function must satisfy $f(t\mid \mathcal{T}^{\leq t_n}) = 0$ for $t\leq t_n$ and $\int_{t_n}^{\infty}f(t\mid \mathcal{T}^{\leq t_n})\mathrm{d}t = 1$ . The cumulative distribution function can be defined accordingly: $F(t\mid \mathcal{T}^{\leq t_n}) = \int_{t_n}^{t}f(s\mid \mathcal{T}^{\leq t_n})\mathrm{d}s = \operatorname*{Pr}[t_{n + 1}\in (t_n,t)\mid \mathcal{T}^{\leq t_n}]$ .
|
| 42 |
+
|
| 43 |
+
Another way of modeling it is to specify the conditional intensity function, which is related to the distributions as,
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\lambda (t \mid \mathcal {T} ^ {\leq t _ {n}}) = \left\{ \begin{array}{l l} \frac {f (t \mid \mathcal {T} ^ {\leq t _ {n}})}{1 - F (t \mid \mathcal {T} ^ {\leq t _ {n}})} & (t > t _ {n}), \\ 0 & (t \leq t _ {n}). \end{array} \right. \tag {1}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
In the following, let $t_n$ denote an arbitrary event time stamp and we only specify the conditional intensity function for $t > t_n$ , because its value for $t \leq t_n$ is trivially 0. Observing that $\lambda(t \mid \mathcal{T}^{\leq t_n}) \mathrm{d}t = \operatorname*{Pr}[t_{n+1} \in [t, t + \mathrm{d}t] \mid t_{n+1} \notin (t_n, t), \mathcal{T}^{\leq t_n}]$ holds as $\mathrm{d}t \to +0$ (Rasmussen, 2018), the conditional intensity function represents how likely the event occurs at time $t$ given that we have observed $n$ events so far and no event has been observed during $(t_n, t)$ .
|
| 50 |
+
|
| 51 |
+
A point process is more often specified by the conditional intensity function than the time interval distribution. Let $\mathcal{PP}(\lambda)$ be the point process with the conditional intensity function $\lambda$ . Corollary 1, which is an immediate consequence of Proposition 2, states the conditions under which the conditional intensity function uniquely specifies a point process.
|
| 52 |
+
|
| 53 |
+
Corollary 1. A conditional intensity function $\lambda$ uniquely defines a point process if it satisfies the following conditions for any observation of discrete events $\mathcal{T}^{\leq t_n}$ and any $t > t_{n}$ :
|
| 54 |
+
|
| 55 |
+
1. $\lambda (t\mid \mathcal{T}^{\leq t_n})$ is non-negative and integrable on any interval starting at $t_n$
|
| 56 |
+
2. $\int_{t_n}^t\lambda (s\mid \mathcal{T}^{\leq t_n})\mathrm{d}s\to \infty$ as $t\to \infty$ , and
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 1. Realization of a temporal point process (bottom) and its corresponding left-continuous counting process (top).
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
Figure 2. Illustration of a multivariate point process (top) and its equivalent marked point process (bottom).
|
| 63 |
+
|
| 64 |
+
3. $\int_{t_n}^t\lambda (s\mid \mathcal{T}^{\leq t_n})\mathrm{d}s$ is right continuous w.r.t. $t$
|
| 65 |
+
|
| 66 |
+
The log-likelihood of observation $\mathcal{T}$ on $\mathcal{PP}(\lambda)$ is given as,
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\log p (\mathcal {T}) = \sum_ {t \in \mathcal {T}} \log \lambda (t \mid \mathcal {T} ^ {\leq t _ {n (t)}}) - \Lambda^ {[ 0, T ]} (\mathcal {T}), \tag {2}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where let $\Lambda^{[0,T]}(\mathcal{T}) = \int_0^T\lambda (t\mid \mathcal{T}^{\leq t_{n(t)}})\mathrm{d}t$ be the integrated conditional intensity function, also known as the compensator, which accounts for no-event periods, and let $n(t):\mathbb{R}_{\geq 0}\to \mathbb{Z}_{\geq 0}$ be the left-continuous counting process of the observation $\mathcal{T}$ , which counts the number of events up to but not including time $t$ . The latest event time stamp at time $t$ can be denoted by $t_{n(t)}\in [0,t)$ . Figure 1 illustrates a realization of a point process and its counting representation. A typical procedure of modeling $\mathcal{T}$ is to design a parametric model of the conditional intensity function that satisfies the conditions of Corollary 1 and train it by maximizing the log-likelihood function (Equation (2)).
|
| 73 |
+
|
| 74 |
+
# 2.1.2. MULTIVARIATE POINT PROCESS
|
| 75 |
+
|
| 76 |
+
A multivariate point process is a set of mutually dependent point processes and can be defined via a marked point process, in which each event is associated with a mark. We call a marked point process whose mark belongs to set $X$ , an $X$ -marked point process. Let $\mathcal{T}_X$ denote an observation of an $X$ -marked point process, which contains a series of event time stamps and marks, $\{(t_n, \mathbf{p}_n) \in [0, T] \times X\}_{n \in [N]}$ . As illustrated in Figure 2, a $D$ -variate point process can be
|
| 77 |
+
|
| 78 |
+
defined by a $\mathbb{1}^D$ -marked point process, where each mark $\mathbf{p}_n$ indicates which dimension the event belongs to. For example, if $\mathbf{p}_n = \mathbf{1}_1$ , the $n$ -th event occurs at the first dimension. In Figure 2, blue-circle and red-diamond marks correspond to the first and the second dimensions respectively.
|
| 79 |
+
|
| 80 |
+
Letting $f(t, \mathbf{p} \mid \mathcal{T}_{\mathbb{1}^D}^{< t_n})$ be the probability density function of each event $(t_{n+1}, \mathbf{p}_{n+1})$ given its past events $\mathcal{T}_{\mathbb{1}^D}^{< t_n}$ , the conditional intensity function can be defined similarly:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\lambda \left(t, \mathbf {p} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n}}\right) = \frac {f \left(t , \mathbf {p} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n}}\right)}{1 - F \left(t \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n}}\right)}, \tag {3}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where $F(t \mid \mathcal{T}_{\mathbb{1}^D}^{< t_n}) = \int_{t_n}^t \mathrm{d}s \sum_{\mathbf{p} \in \mathbb{1}^D} f(s, \mathbf{p} \mid \mathcal{T}_{\mathbb{1}^D}^{< t_n})$ . The conditional intensity function represents how likely event $(t, \mathbf{1}_d)$ occurs: $\lambda(t, \mathbf{1}_d \mid \mathcal{T}_{\mathbb{1}^D}^{< t_n}) \mathrm{d}t = \operatorname*{Pr}[t_{n+1} \in [t, t + \mathrm{d}t], \mathbf{p}_{n+1} = \mathbf{1}_d \mid t_{n+1} \notin (t_n, t), \mathcal{T}_{\mathbb{1}^D}^{< t_n}]$ . Proposition 2 states conditions under which the conditional intensity function uniquely specifies a marked point process. See Appendix B for its proof. Let $\mathcal{MPP}(\lambda)$ be the multivariate point process with the conditional intensity function $\lambda$ .
|
| 87 |
+
|
| 88 |
+
Proposition 2. Let $X$ be a set. A conditional intensity function $\lambda$ uniquely defines an $X$ -marked point process if it satisfies the following conditions for any $T_X^{< t_n}$ and $t > t_n$ :
|
| 89 |
+
|
| 90 |
+
1. $\lambda (t,\mathbf{p}\mid \mathcal{T}_X^{< t_n})\geq 0$ and integrable w.r.t. $\mathbf{p}$ and w.r.t. $t$ on any interval starting at $t_n$
|
| 91 |
+
2. $\int_{t_n}^t\mathrm{d}s\int_X\mathrm{d}\mathbf{p}\lambda (s,\mathbf{p}\mid \mathcal{T}_X^{\leq t_n})\to \infty$ as $t\to \infty$ , and
|
| 92 |
+
3. $\int_{t_n}^t\mathrm{d}s\int_X\mathrm{d}\mathbf{p}\lambda (s,\mathbf{p}\mid \mathcal{T}_X^{\leq t_n})$ is right continuous in $t$
|
| 93 |
+
|
| 94 |
+
The log-likelihood of observation $\mathcal{T}_{\mathbb{L}^D}$ is written as:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\begin{array}{l} \log p \left(\mathcal {T} _ {\mathbb {1} ^ {D}}\right) \\ = \sum_ {(t, \mathbf {p}) \in \mathcal {T} _ {\mathbb {1} D}} \log \lambda (t, \mathbf {p} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n (t)}}) - \Lambda^ {[ 0, T ]} (\mathcal {T} _ {\mathbb {1} ^ {D}}), \tag {4} \\ \end{array}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where let $\Lambda^{[0,T]}(\mathcal{T}_{\mathbb{1}^D}) = \int_0^T\sum_{\mathbf{p}\in \mathbb{1}^D}\lambda (t,\mathbf{p}\mid \mathcal{T}_{\mathbb{1}^D}^{< t_n(t)})\mathrm{d}t$ be the compensator. Since its analytical form is not available for a general conditional intensity function, we resort to Monte-Carlo approximation to estimate the compensator. In specific, we draw $M$ examples, $\{t_m\}_{m\in [M]}$ , from $U[0,T]$ and approximate it as,
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\Lambda^ {[ 0, T ]} \left(\mathcal {T} _ {\mathbb {1} ^ {D}}\right) \approx \frac {T}{M} \sum_ {m = 1} ^ {M} \sum_ {\mathbf {p} \in \mathbb {1} ^ {D}} \lambda \left(t _ {m}, \mathbf {p} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n (t _ {m})}}\right). \tag {5}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
# 2.2. Sampling Algorithms
|
| 107 |
+
|
| 108 |
+
This section introduces sampling algorithms for a point process given a conditional intensity function. A notable
|
| 109 |
+
|
| 110 |
+
Algorithm 1 Thinning algorithm for $\mathcal{MPP}$
|
| 111 |
+
Input: Conditional intensity function $\lambda$ and upperbound $\bar{\lambda}$
|
| 112 |
+
Output: Realization of $\mathcal{MPP}(\lambda)$
|
| 113 |
+
1: $S\gets \emptyset ,T\gets \emptyset$
|
| 114 |
+
2: while true do
|
| 115 |
+
3: Sample $s\sim \mathcal{PP}(\bar{\lambda}\mid S)$
|
| 116 |
+
4: if $s > T$ then
|
| 117 |
+
5: break
|
| 118 |
+
6: Sample $\begin{bmatrix}{\bf p}\\ {r} \end{bmatrix} \sim \mathrm{Cat}\left(\pmb {\pi}_{\bar{\lambda}}\circ \pmb {\lambda}(s\mid T)\right)\\ \textit{if} r\neq 1$ then
|
| 119 |
+
8: $\mathcal{T}\gets \mathcal{T}\cup \{(s,\mathbf{p})\}$
|
| 120 |
+
9: $S\gets S\cup \{s\}$
|
| 121 |
+
10: return $\mathcal{T}$
|
| 122 |
+
|
| 123 |
+
feature of the algorithms is that they can exactly simulate point processes without any approximation. This indicates that there exists no hyperparameter controlling the trade-off between computational cost and accuracy of the simulation, which greatly facilitates simulating SNNs.
|
| 124 |
+
|
| 125 |
+
# 2.2.1. HOMOGENEOUS POISSON PROCESS
|
| 126 |
+
|
| 127 |
+
The simplest point process is the homogeneous Poisson process whose conditional intensity function is constant; $\lambda (t\mid \mathcal{T}^{\leq t_n}) = \lambda$ for any $\mathcal{T}^{\leq t_n}$ . It is straightforward to sample from it because the interval between two successive events $\tau$ is independently and identically distributed according to the exponential distribution, $f(\tau ;\lambda) = \lambda \mathrm{e}^{-\lambda \tau}$ .
|
| 128 |
+
|
| 129 |
+
# 2.2.2. GENERAL POINT PROCESS
|
| 130 |
+
|
| 131 |
+
It is not straightforward to sample from a general point process when a closed-form expression of the inter-event time distribution is not available. This is true for many point processes including SNNs. Among several sampling methods, the thinning algorithm (Lewis & Shedler, 1979; Ogata, 1981) allows us to sample from such a point process without knowing the closed-form expression. For other sampling algorithms, please refer to Section 6.
|
| 132 |
+
|
| 133 |
+
The main idea is to generate a sequence of time stamps from a homogeneous Poisson process with sufficiently high intensity (which we call the base process) and then to thin some of the events so that the sequence follows the given point process. Algorithm 1 describes it for the multivariate case, where let $\pmb{\lambda}(t|\mathcal{T}) = [\lambda(t,\mathbf{1}_d|\mathcal{T})]_{d\in [D]}$ , and let $\pi_{\bar{\lambda}}$ be an operator that receives a $D$ -dimensional vector $\pmb{\lambda}$ and returns $\frac{1}{\lambda} \begin{bmatrix} \pmb{\lambda} \\ \bar{\lambda} - \| \pmb{\lambda} \|_1 \end{bmatrix}$ .
|
| 134 |
+
|
| 135 |
+
It first generates a new time stamp $s$ from the homogeneous Poisson process with intensity $\bar{\lambda}$ (line 3). Then it decides whether or not to accept the event, and if accepting, decides which dimension the event is assigned
|
| 136 |
+
|
| 137 |
+
to (lines 6-8); $s$ is rejected if $r = 1$ , i.e., with probability $1 - \frac{1}{\lambda}\sum_{\mathbf{p} \in \mathbb{1}^D} \lambda(s, \mathbf{p} \mid \mathcal{T})$ , and $s$ is accepted as the event from the $d$ -th dimension ( $d \in [D]$ ) if $p_d = 1$ , i.e., with probability $\lambda(s, \mathbf{1}_d \mid \mathcal{T}) / \bar{\lambda}$ ,
|
| 138 |
+
|
| 139 |
+
Intuitively, the correctness of Algorithm 1 is understood as follows. Assuming we have sampled $\mathcal{T}_{\mathbb{1}^D}^{< t_n}$ , at any time $t > t_{n}$ , the probability that the algorithm generates the event with mark $\mathbf{1}_d$ in interval $[t,t + \mathrm{d}t]$ is,
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\begin{array}{l} \Pr \left[ t _ {n + 1} \in [ t, t + \mathrm {d} t ], \mathbf {p} _ {n + 1} = \mathbf {1} _ {d} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {< t} \right] \\ = \underbrace {\bar {\lambda} \mathrm {d} t} _ {\text {P r o b . t h a t t h e b a s e p r o c e s s}} \cdot \underbrace {\lambda \left(t , \mathbf {1} _ {d} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n}}\right) / \bar {\lambda}} _ {\text {P r o b . t h a t t i s}} \\ = \lambda \left(t, \mathbf {1} _ {d} \mid \mathcal {T} _ {\mathbb {1} ^ {D}} ^ {\leq t _ {n}}\right) \mathrm {d} t, \\ \end{array}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where let $\mathcal{T}_{\mathbb{1}^D}^{< t}$ denote the event $t_{n + 1}\notin (t_n,t)$ and $\mathcal{T}_{\mathbb{1}^D}^{< t_n}$ . This shows that the output follows $\mathcal{MPP}(\lambda)$ . For its formal proof, please refer to Reference (Ogata, 1981).
|
| 146 |
+
|
| 147 |
+
# 3. Differentiable Point Process
|
| 148 |
+
|
| 149 |
+
We present the key building block of our method called a differentiable point process, whose realization is differentiable with respect to its parameters. Differentiability plays an essential role when designing a learning algorithm for latent variable models as will be discussed in Section 4.2.
|
| 150 |
+
|
| 151 |
+
The key idea is that the output of Algorithm 1 becomes differentiable if we replace the categorical distribution in line 6 with a reparameterizable distribution such as the concrete distribution, also known as the Gumbel-softmax distribution (Maddison et al., 2017; Jang et al., 2017). We first review the concrete distribution (Section 3.1), and then we present the differentiable point process (Section 3.2).
|
| 152 |
+
|
| 153 |
+
# 3.1. Concrete Distribution
|
| 154 |
+
|
| 155 |
+
The concrete distribution has been developed as a reparameterizable substitute for the categorical distribution. The idea comes from the Gumbel-max trick, which enables us to sample from the categorical distribution. Letting $\pi \in \mathbb{R}_{\geq 0}^{D}$ be an unnormalized parameter of the categorical distribution, the Gumbel-max trick first samples $u_{d} \sim U[0,1]$ for each $d \in [D]$ , and then outputs $\mathbf{1}_{d^{\star}}$ where $d^{\star} = \arg \max_{d \in [D]} \log \pi_{d} - \log (-\log u_{d})$ . The output is known to be distributed according to $\mathrm{Cat}(\pi / \| \pi \|_1)$ . While the Gumbel-max trick successfully divides the sampling procedure into random sampling from the fixed distribution and a parameterized transformation of it, which is necessary to be differentiable, the gradient of its realization with respect to $\pi$ is non-informative, because a small variation to $\pi$ does not change the gradient.
|
| 156 |
+
|
| 157 |
+
The concrete distribution is defined by relaxing the range of
|
| 158 |
+
|
| 159 |
+
Algorithm 2 Thinning algorithm for $\partial \mathcal{PP}$
|
| 160 |
+
|
| 161 |
+
Input: Conditional intensity function $\lambda$ , its upperbound $\bar{\lambda}$ , and temperature $\tau > 0$ .
|
| 162 |
+
|
| 163 |
+
Output: Realization of $\partial \mathcal{PP}(\lambda, \bar{\lambda}, \tau)$
|
| 164 |
+
|
| 165 |
+
1: $\mathcal{S}\gets \emptyset ,\mathcal{T}\gets \emptyset$
|
| 166 |
+
2: while true do
|
| 167 |
+
3: Sample $s \sim \mathcal{PP}(\bar{\lambda} \mid S)$
|
| 168 |
+
4: if $s > T$ then
|
| 169 |
+
5: break
|
| 170 |
+
6: Sample $\left[ \begin{array}{l} \mathbf{P} \\ r \end{array} \right] \sim \mathrm{Concrete}_{\tau}(\pmb{\pi}_{\overline{\lambda}} \circ \pmb{\lambda}(s \mid \mathcal{T}))$
|
| 171 |
+
7: $\mathcal{T}\gets \mathcal{T}\cup \{(s,\mathbf{p})\}$
|
| 172 |
+
8: $\mathcal{S}\gets \mathcal{S}\cup \{s\}$
|
| 173 |
+
9: return $\mathcal{T}$
|
| 174 |
+
|
| 175 |
+
the random variable from $\mathbb{1}^D$ to its convex hull $\mathrm{conv}(\mathbb{1}^D)$ so that its gradient is more informative. Accordingly, the argmax operator in the Gumbel-max trick is replaced with the softmax operator with temperature $\tau > 0$ . Since softmax becomes equivalent to argmax as $\tau \to 0$ , the concrete distribution also becomes equivalent to the categorical distribution as $\tau \to 0$ . Let $g_{\tau}(\mathbf{p};\boldsymbol{\pi})$ denote the probability density function of the concrete distribution with temperature $\tau$ and unnormalized parameter $\pi \in \mathbb{R}_{>0}^{D}$ .
|
| 176 |
+
|
| 177 |
+
# 3.2. Multivariate Differentiable Point Process
|
| 178 |
+
|
| 179 |
+
We present a constructive definition of a differentiable point process in Definition 3.
|
| 180 |
+
|
| 181 |
+
Definition 3. Assume the conditional intensity function $\lambda(t, \mathbf{p} \mid \mathcal{T}_{\mathbb{1}^D}^{< t_n})$ can be computed with an observation of a $\mathrm{conv}_0(\mathbb{1}^D)$ -marked point process. Let $\bar{\lambda}$ be a constant satisfying $\bar{\lambda} > \sum_{\mathbf{p} \in \mathbb{1}^D} \lambda(t, \mathbf{p} \mid \mathcal{T}_{\mathrm{conv}_0(\mathbb{1}^D)}^{< t_n})$ for any $\mathcal{T}_{\mathrm{conv}_0(\mathbb{1}^D)}^{\leq t_n}$ and $t > t_n$ , and $\tau > 0$ be temperature. The differentiable point process $\partial \mathcal{PP}(\lambda, \bar{\lambda}, \tau)$ is defined as a $\mathrm{conv}_0(\mathbb{1}^D)$ -marked point process constructed by Algorithm 2.
|
| 182 |
+
|
| 183 |
+
Algorithms 1 and 2 are different in two ways. First, all events from the base process are accepted in Algorithm 2, while some are rejected in Algorithm 1. Second, in Algorithm 1, the mark is defined over $\mathbb{1}^D$ , while in Algorithm 2, it is defined over $\mathrm{conv}_0(\mathbb{1}^D)$ ; each mark is associated with amplitude that is continuous w.r.t. the model parameter.
|
| 184 |
+
|
| 185 |
+
The differentiable point process as defined above can be understood as a marked point process (Proposition 4).
|
| 186 |
+
|
| 187 |
+
Proposition 4. The differentiable point process $\partial \mathcal{PP}(\lambda, \bar{\lambda}, \tau)$ is a $\mathrm{conv}_0(\mathbb{1}^D)$ -marked point process with conditional intensity function,
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
\begin{array}{l} \lambda_ {\partial} \left(t, \mathbf {p} \mid \mathcal {T} _ {\operatorname {c o n v} _ {0} \left(\mathbb {1} ^ {D}\right)} ^ {\leq t _ {n}}; \boldsymbol {\lambda}, \bar {\lambda}, \tau\right) \\ = \bar {\lambda} \cdot g _ {\tau} \left(\left[ \begin{array}{c} \mathbf {p} \\ 1 - \| \mathbf {p} \| _ {1} \end{array} \right]; \boldsymbol {\pi} _ {\bar {\lambda}} \circ \boldsymbol {\lambda} \left(t \mid \mathcal {T} _ {\operatorname {c o n v} _ {0} (\mathbb {1} ^ {D})} ^ {\leq t _ {n}}\right)\right). \\ \end{array}
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
We can confirm the differentiability of a realization of $\partial \mathcal{PP}$ (Proposition 5). We can also confirm that in the limit of $\tau \to 0$ , the differentiable point process becomes equivalent to the original point process (Proposition 6). See Appendix C for their formal statements and proofs.
|
| 194 |
+
|
| 195 |
+
As discussed by Maddison et al. (2017), the concrete distribution often suffers from underflow and we have to implement it in the logarithmic scale. Our implementation also suffers from the same issue, and we provide a numerically stable implementation idea in Appendix E.
|
| 196 |
+
|
| 197 |
+
# 4. Learning Algorithm for SNNs
|
| 198 |
+
|
| 199 |
+
We present a learning algorithm for spiking neural networks (SNNs) based on the differentiable point process. We first define a probabilistic model of SNNs (Section 4.1) and then will present our learning algorithm, highlighting the difference from the existing one (Section 4.2).
|
| 200 |
+
|
| 201 |
+
# 4.1. Probabilistic Model of Spiking Neural Networks
|
| 202 |
+
|
| 203 |
+
We employ the standard probabilistic model in the literature (Pfister et al., 2006). Let $D$ be the number of neurons, let $\mathcal{N} = \mathbb{1}^D$ be the set of neurons, each of which is indexed by a one-hot vector, and let $\mathcal{T}_{\mathcal{N}}$ be spike trains emitted from SNN during time interval $[0,T]$ . We assume that $\mathcal{T}_{\mathcal{N}}$ is a realization of an $\mathcal{N}$ -marked point process.
|
| 204 |
+
|
| 205 |
+
We define the conditional intensity function based on a spike response model (SRM) (Gerstner et al., 2014). SRM assumes that the $d$ -th spiking neuron is driven by its internal state called a membrane potential,
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
u _ {d} \left(t \mid \mathcal {T} _ {\mathcal {N}} ^ {\leq t _ {n}}\right) = \bar {u} _ {d} + \sum_ {\left(t ^ {\prime}, \mathbf {p}\right) \in \mathcal {T} _ {\mathcal {N}} ^ {\leq t _ {n}}} \mathbf {f} _ {d} \left(t - t ^ {\prime}\right) \cdot \mathbf {p}, \tag {6}
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
where $\mathbf{f}_d(s) = [f_{d'}, d(s)]_{d' \in [D]}$ is a vector of filter functions from all of the neurons to the $d$ -th neuron. In specific, $f_{d',d}(s)$ describes the time course of the membrane potential of neuron $d$ in response to a spike emitted by neuron $d'$ at time $s = 0$ . We assume $f_{d,d}(s) \leq 0$ for all $d \in \mathcal{N}$ . This assumption allows us to reproduce the resetting behavior of a biological neuron; the membrane potential is reset to a lower level after the neuron fires. We also assume that $f_{d',d}(s) = 0$ for $s < 0$ . This assumption ensures that future events have no influence on past events.
|
| 212 |
+
|
| 213 |
+
Then, the conditional intensity function is defined by,
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
\lambda^ {\mathrm {S N N}} (t, \mathbf {p} \mid \mathcal {T} _ {\bar {N}} ^ {< t _ {n}}) = \mathbf {p} \cdot \sigma (\mathbf {u} (t \mid \mathcal {T} _ {\bar {N}} ^ {< t _ {n}})), \tag {7}
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
where $\sigma \colon \mathbb{R}^D\to \mathbb{R}_{\geq 0}^D$ is element-wisely non-decreasing and differentiable and let $\mathbf{u}(t\mid \mathcal{T}_{\mathcal{N}}^{\leq t_n}) = [u_d(t\mid \mathcal{T}_{\mathcal{N}}^{\leq t_n})]_{d\in [D]}$ .
|
| 220 |
+
|
| 221 |
+
As the membrane potential of one neuron increases, the neuron is more likely to fire and generate a spike.
|
| 222 |
+
|
| 223 |
+
For numerical simulation, we assume that the filter functions are parameterized by weights $\{w_{d^{\prime},d,l}\in \mathbb{R}\}_{l = 1}^{L}$ as,
|
| 224 |
+
|
| 225 |
+
$$
|
| 226 |
+
f _ {d ^ {\prime}, d} (s) = \left\{ \begin{array}{l l} \sum_ {l = 1} ^ {L} w _ {d ^ {\prime}, d, l} \cdot \kappa (s - s _ {l}) & (s \geq 0), \\ 0 & (s < 0), \end{array} \right. \tag {8}
|
| 227 |
+
$$
|
| 228 |
+
|
| 229 |
+
where $\{s_l\in \mathbb{R}\}_{l = 1}^L$ are fixed and $\kappa (s) = \max \{\frac{3}{4} (1 - s^2),0\}$ is the Epanechnikov kernel. We chose this kernel because the bounded support of the kernel allows us to ignore events that occurred more than a certain period ago for membrane potential computation. Let $\theta = \{\bar{u}_d\in \mathbb{R}\}_{d = 1}^D\cup \{w_{d',d,l}\in \mathbb{R}\mid l\in [L]\}_{d,d' = 1}^D$ denote the set of model parameters.
|
| 230 |
+
|
| 231 |
+
# 4.2. Learning Algorithms
|
| 232 |
+
|
| 233 |
+
Assume some of the neurons are hidden and their spike trains are unobservable. Let $\mathcal{O} \subset \mathcal{N}$ and $\mathcal{H} = \mathcal{N} \backslash \mathcal{O}$ be the sets of observable and hidden neurons, respectively. Accordingly, the spike trains of all of the neurons are divided into observable and hidden ones: $\mathcal{T}_{\mathcal{N}} = \mathcal{T}_{\mathcal{O}} \cup \mathcal{T}_{\mathcal{H}}$ . We consider an estimation procedure for the model parameters of SNN, $\theta$ , given a set of observed spike trains $\{\mathcal{T}_{\mathcal{O},n}\}_{n=1}^{N}$ .
|
| 234 |
+
|
| 235 |
+
Letting $p(\mathcal{T}_{\mathcal{N}}; \theta) = p(\mathcal{T}_{\mathcal{O}}, \mathcal{T}_{\mathcal{H}}; \theta)$ be the joint distribution of the observable and hidden spike trains, the parameter $\theta$ is estimated by maximum likelihood estimation:
|
| 236 |
+
|
| 237 |
+
$$
|
| 238 |
+
\underset {\theta} {\text {m a x i m i z e}} \quad \sum_ {n = 1} ^ {N} \ell (\theta ; \mathcal {T} _ {\mathcal {O}, n})
|
| 239 |
+
$$
|
| 240 |
+
|
| 241 |
+
where $\ell (\theta ;\mathcal{T}_{\mathcal{O}}) = \log \int p(\mathcal{T}_{\mathcal{O}},\mathcal{T}_{\mathcal{H}};\theta)\mathrm{d}\mathcal{T}_{\mathcal{H}}$ is the marginalized log-likelihood function. Since it is intractable to compute it, we substitute its lower bound called an evidence lower bound (ELBO) for the marginalized log-likelihood function as the objective function:
|
| 242 |
+
|
| 243 |
+
$$
|
| 244 |
+
\begin{array}{l} \underline {{\ell}} (\theta , \phi ; \mathcal {T} _ {\mathcal {O}}) = \mathbb {E} _ {q \left(\mathcal {T} _ {\mathcal {H}}; \phi\right)} \left[ \log p \left(\mathcal {T} _ {\mathcal {O}}, \mathcal {T} _ {\mathcal {H}}; \theta\right) - \log q \left(\mathcal {T} _ {\mathcal {H}}; \phi\right) \right], \\ \equiv \mathbb {E} _ {q (\mathcal {T} _ {\mathcal {H}}; \phi)} \underline {{\ell}} (\theta , \phi ; \mathcal {T} _ {\mathcal {O}}, \mathcal {T} _ {\mathcal {H}}), \tag {9} \\ \end{array}
|
| 245 |
+
$$
|
| 246 |
+
|
| 247 |
+
where $q(\mathcal{T}_{\mathcal{H}};\phi)$ is an arbitrary distribution called a variational distribution, parameterized by $\phi$ . We specifically assume that the variational distribution is modeled by SNN driven by both observable and hidden spike trains. In the following, we omit the index of data $n$ for ease of presentation and consider ELBO using a single observation $\mathcal{T}_{\mathcal{O}}$ .
|
| 248 |
+
|
| 249 |
+
Since there exists no closed-form solution to the maximization problem, we resort to stochastic gradient ascent methods, resulting in Algorithm 3. The basic procedure to train SNN is to choose one realization $\mathcal{T}_{\mathcal{O}}$ from the data set randomly, and update $\theta$ and $\phi$ so as to maximize Equation (9). In the following, we present both an existing approach and our novel approach to compute the gradients, $\frac{\partial\ell}{\partial\theta}$ and $\frac{\partial\ell}{\partial\phi}$ .
|
| 250 |
+
|
| 251 |
+
# Algorithm 3 Generic learning algorithm
|
| 252 |
+
|
| 253 |
+
Input: Observation $\mathcal{T}_{\mathcal{O}}$ , learning rate $\{\alpha_{k}\}_{k = 1}^{K}$ Output: Model parameters $\theta$ $\phi$
|
| 254 |
+
|
| 255 |
+
1: Initialize $\theta, \phi$
|
| 256 |
+
2: for $k = 1, \dots, K$ do
|
| 257 |
+
3: Update $\theta \gets \theta +\alpha_{k}\frac{\partial\ell}{\partial\phi} (\theta ,\phi ;\mathcal{T}_{\mathcal{O}})$
|
| 258 |
+
4: Update $\phi \gets \phi +\alpha_{k}\frac{\partial\ell}{\partial\phi} (\theta ,\phi ;\mathcal{T}_{\mathcal{O}})$
|
| 259 |
+
5: return $\theta, \phi$
|
| 260 |
+
|
| 261 |
+
# 4.2.1. GRADIENT WITH RESPECT TO $\theta$
|
| 262 |
+
|
| 263 |
+
The gradient with respect to $\theta$ is straightforwardly computed by applying Monte-Carlo approximation: $\frac{\partial}{\partial\theta}\underline{\ell} (\theta ,\phi ;\mathcal{T}_{\mathcal{O}})\approx \hat{\mathbb{E}}_{q(\mathcal{T}_{\mathcal{H}};\phi)}\left[\frac{\partial}{\partial\theta}\log p(\mathcal{T}_{\mathcal{O}},\mathcal{T}_{\mathcal{H}};\theta)\right]$ . This can be numerically calculated with the help of automatic differentiation tools.
|
| 264 |
+
|
| 265 |
+
# 4.2.2. GRADIENT WITH RESPECT TO $\phi$
|
| 266 |
+
|
| 267 |
+
The gradient with respect to $\phi$ is more involved. In Equation (9), the expectation operator depends on $\phi$ and we cannot exchange $\frac{\partial}{\partial\phi}$ and $\mathbb{E}_{q(\mathcal{T}_{\mathcal{H}};\phi)}$ . There are at least two approaches to computing the gradient in this situation (Mohamed et al., 2019). One approach is to rely on the score function gradient estimator, also known as the REINFORCE estimator (Williams, 1992). While it is widely applicable to a variety of models, it is often reported that the gradient estimator has high variance. Another approach is the path-wise gradient estimator, which makes use of the reparameterization trick (Kingma & Welling, 2014). While its variance is often reported to be lower than that of the score function gradient estimator (Mohamed et al., 2019), its application is limited because the probability distribution $q$ must be reparameterizable.
|
| 268 |
+
|
| 269 |
+
In the literature of SNNs, the score function gradient estimator with respect to $\phi$ has been developed by Jimenez Rezende & Gerstner (2014). Our contribution is to develop a path-wise gradient estimator for SNNs based on a differentiable point process presented in Section 3.
|
| 270 |
+
|
| 271 |
+
Score function gradient estimator. Jimenez Rezende & Gerstner (2014) used the score function gradient estimator for computing the gradient with respect to $\phi$ : $\frac{\partial\underline{\ell}}{\partial\phi} (\theta ,\phi ;\mathcal{T}_{\mathcal{O}})\approx \hat{\mathbb{E}}_{q(\mathcal{T}_{\mathcal{H}};\phi)}[\frac{\partial\log q(\mathcal{T}_{\mathcal{H}};\phi)}{\partial\phi} (\underline{\ell} (\theta ,\phi ;\mathcal{T}_{\mathcal{O}},\mathcal{T}_{\mathcal{H}}) - 1)]$ . While this is an unbiased estimator of the gradient, its high variance is often problematic. We employ the variational distribution with the conditional intensity function,
|
| 272 |
+
|
| 273 |
+
$$
|
| 274 |
+
\lambda_ {q} (t, \mathbf {p} \mid \mathcal {T} _ {\mathcal {N}} ^ {< t _ {n}}; \phi) = \mathbf {p} \cdot \sigma (\mathbf {u} (t \mid \mathcal {T} _ {\mathcal {N}} ^ {< t _ {n}}; \phi)), \tag {10}
|
| 275 |
+
$$
|
| 276 |
+
|
| 277 |
+
for any $\mathbf{p} \in \mathcal{H}$ . In particular, we use shared parameters for the model and the variational distribution, i.e., we set $\phi = \theta$ as we observe it improves the performance.
|
| 278 |
+
|
| 279 |
+
Path-wise gradient estimator. We propose a path-wise gra
|
| 280 |
+
|
| 281 |
+
dient estimator for SNNs. Our main idea is to employ the differentiable point process, $\partial \mathcal{PP}(\lambda_q(t,\mathbf{p}\mid \mathcal{T}_{\mathcal{N}};\phi);\bar{\lambda},\tau)$ as the variational distribution, where $\lambda_{q}$ is defined in Equation (10). This allows us to differentiate a Monte-Carlo approximation of ELBO (Equation (9)) using automatic differentiation tools:
|
| 282 |
+
|
| 283 |
+
$$
|
| 284 |
+
\frac {\partial \underline {{\ell}} (\theta , \phi ; \mathcal {T} _ {\mathcal {O}})}{\partial \phi} \approx \frac {\partial \hat {\mathbb {E}} _ {\partial \mathcal {P P}} \underline {{\ell}} (\theta , \phi ; \mathcal {T} _ {\mathcal {O}} , \mathcal {T} _ {\mathrm {c o n v} _ {0} (\mathcal {H})} (\phi))}{\partial \phi}. \tag {11}
|
| 285 |
+
$$
|
| 286 |
+
|
| 287 |
+
The main technical issue in applying the differentiable point process is that its realization $\mathcal{T}_{\mathrm{conv}_0(\mathcal{H})}(\phi)$ is incompatible with the SNN model defined by Equations (6) and (7). The model assumes that a mark $\mathbf{p}$ is a one-hot vector, while a mark of a differentiable point process belongs to $\mathrm{conv}_0(\mathcal{H})$ . We address this by devising a differentiable spiking neural network ( $\partial \mathrm{SNN}$ ), which can handle a mark in $\mathrm{conv}_0(\mathcal{H})$ while keeping the conditional intensity function proper.
|
| 288 |
+
|
| 289 |
+
Let $\bar{\mathcal{N}} = \mathcal{O} \cup \operatorname{conv}_0(\mathcal{H})$ be the set of marks for $\partial \mathrm{SNN}$ . We define the membrane potential of neuron $d \in \mathcal{N}$ as,
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
u _ {d} \left(t \mid \mathcal {T} _ {\bar {\mathcal {N}}} ^ {\leq t _ {n}}\right) = \bar {u} _ {d} + \sum_ {\left(t ^ {\prime}, \mathbf {p}\right) \in \mathcal {T} _ {\bar {\mathcal {N}}} ^ {\leq t _ {n}}} \mathbf {f} _ {d} \left(t - t ^ {\prime}\right) \cdot \mathbf {p}, \tag {12}
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
and the conditional intensity of $\partial \mathrm{SNN}$ for $\mathbf{p} \in \bar{\mathcal{N}}$ as,
|
| 296 |
+
|
| 297 |
+
$$
|
| 298 |
+
\begin{array}{l} \lambda^ {\partial \mathrm {S N N}} \left(t, \mathbf {p} \mid \mathcal {T} _ {\bar {\mathcal {N}}} ^ {\leq t _ {n}}; \bar {\lambda}, \tau\right) \tag {13} \\ = \sum_ {\mathbf {1} _ {d} \in \mathcal {O}} \delta (\mathbf {p} - \mathbf {1} _ {d}) \lambda^ {\text {S N N}} \left(t, \mathbf {p} \mid \mathcal {T} _ {\bar {\mathcal {N}}} ^ {\leq t _ {n}}\right) \\ + \mathbb {I} [ \mathbf {p} \in \operatorname {c o n v} _ {0} (\mathcal {H}) ] \lambda_ {\partial} \left(t, \mathbf {p} _ {\mathcal {H}} \mid \mathcal {T} _ {\bar {N}} ^ {\leq t _ {n}}; \boldsymbol {\lambda} _ {\mathcal {H}}, \bar {\lambda}, \tau\right) \\ \end{array}
|
| 299 |
+
$$
|
| 300 |
+
|
| 301 |
+
where $\lambda_{\mathcal{H}}\left(t\mid \mathcal{T}_{\bar{\mathcal{N}}}^{\leq t_n}\right) = \sigma \left(\left[u_d(t\mid \mathcal{T}_{\bar{\mathcal{N}}}^{\leq t_n})\right]_{d\in \mathcal{H}}\right),\mathbb{I}[\cdot ]$ is the indicator function, and $\mathbf{p}_{\mathcal{H}} = [p_d]_{d\in \mathcal{H}}$
|
| 302 |
+
|
| 303 |
+
It is necessary to confirm that (i) the conditional intensity function can be calculated using past events whose marks are in $\bar{\mathcal{N}}$ and (ii) the conditional intensity function satisfies all of the conditions listed in Proposition 2 for $\mathcal{X} = \bar{\mathcal{N}}$ . The first requirement immediately follows from Equations (12) and (13). In Appendix D, we provide the formal statement and proof of the second requirement (Proposition 7). We also confirm that ELBO is differentiable (Proposition 8) and that the differentiable SNN becomes equivalent to the vanilla SNN in the limit of $\tau \to 0$ (Proposition 9).
|
| 304 |
+
|
| 305 |
+
# 5. Empirical Studies
|
| 306 |
+
|
| 307 |
+
Let us investigate the effectiveness of our gradient estimator through numerical simulation. Our hypothesis is that (i) the path-wise gradient estimator will have lower variance than the score function estimator and (ii) lower variance will improve the predictive performance. We design two
|
| 308 |
+
|
| 309 |
+
Table 1. Configuration of SNN generating a synthetic data set.
|
| 310 |
+
|
| 311 |
+
<table><tr><td>Network size</td><td>D=6, |O|=2, |H|=4</td></tr><tr><td>Activation/filter functions</td><td>a=5, L=2, s1=0, s2=10</td></tr><tr><td>∂PP</td><td>τ=0.3, λ=20</td></tr><tr><td># of samplings</td><td>100 (Eq. (5)), 1 (Eq. (9))</td></tr></table>
|
| 312 |
+
|
| 313 |
+
experiments (Sections 5.1 and 5.2) to verify these two hypotheses. We additionally compare computation cost of the learning algorithms using each of the gradient estimators in Section 5.3. All the experiments are conducted on IBM Cloud $^4$ , and the code is publicly available (Kajino, 2021).
|
| 314 |
+
|
| 315 |
+
Data set. We use a synthetic data set generated by the vanilla SNN (Equation (7)). Table 1 summarizes its configuration. We set $\bar{\lambda} = a|\mathcal{H}| = 20$ , which is the tightest upperbound because we use the sigmoid activation function with amplitude $a$ . The weights are randomly sampled: biases from $U[-1,1]$ , off-diagonal kernel weights from $U[-5,5]$ , and diagonal kernel weights from $U[-5,-0.1]$ .
|
| 316 |
+
|
| 317 |
+
Methods compared. Since our objective is to highlight the performance gap between our path-wise gradient estimator $(\partial \mathrm{SNN})$ and the score function gradient estimator (SNN), we use the same hyperparameters and initialization for both of them as much as possible. We initialize their parameters randomly using the same random seed so that both of them have random but the same initial parameters. We also set their hyperparameters as Table 1. The temperature is the only hyperparameter that impacts the performance gap. In preliminary experiments, we observe no significant impact for $\tau \in [0.1, 0.5]$ , and we only report the result at $\tau = 0.3$ .
|
| 318 |
+
|
| 319 |
+
# 5.1. Variance of the Gradient Estimators
|
| 320 |
+
|
| 321 |
+
First, let us study the variance of the gradient estimators.
|
| 322 |
+
|
| 323 |
+
Protocol. We generate a single random parameter setting and use it to generate a synthetic data set consisting of 10 examples of length 50. Then, we compute the gradient estimators using the whole data set 1000 times, which yields 1000 gradient estimates for each method. Finally, we compute the standard deviations of each element of the gradients, and report the mean of the standard deviations.
|
| 324 |
+
|
| 325 |
+
Result. The mean standard deviation of $\partial \mathrm{SNN}$ was 66.3, whereas that of SNN was $2.49 \times 10^{3}$ . This clearly demonstrates that the variance of our estimator tends to be lower than that of the existing estimator.
|
| 326 |
+
|
| 327 |
+
# 5.2. Predictive Performance
|
| 328 |
+
|
| 329 |
+
The second experiment studies the predictive performance of the models learned by each of the methods compared.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 3. Predictive performance of SNN and $\partial$ SNN.
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 4. Per-epoch computation time of SNN and $\partial$ SNN.
|
| 336 |
+
|
| 337 |
+
Protocol. We generate 24 random parameter settings, and consistently use them in this experiment. We aim to evaluate the performance gap between SNN and $\partial$ SNN in different sizes of training sets. To this end, we execute the following, varying the size as $N_{\mathrm{train}} = 10, 20, 30, 40, 50, 75, 100, 200,$ and for each parameter setting.
|
| 338 |
+
|
| 339 |
+
We generate training/test sets consisting of $N_{\mathrm{train}} / 100$ examples of length 50 respectively. SNN and $\partial \mathrm{SNN}$ are trained on the training set using AdaGrad (Duchi et al., 2011) with initial learning rate 0.05 for 10 epochs. We evaluate the predictive performance by computing ELBO (Equation (9)) on the test set. For fair comparison, we evaluate the performance of $\partial \mathrm{SNN}$ by transferring its parameters to the vanilla $\mathrm{SNN}^5$ . By repeating this over 24 parameter settings, we obtain 24 ELBO scores. We report their mean as the performance of each method for each $N_{\mathrm{train}}$ .
|
| 340 |
+
|
| 341 |
+
Result. Figure 3 summarizes the experimental results. It clearly shows that $\partial$ SNN consistently outperforms SNN especially in the small-sample regime, which supports the benefit of our low-variance estimator.
|
| 342 |
+
|
| 343 |
+
# 5.3. Computational Overhead
|
| 344 |
+
|
| 345 |
+
The last experiment studies computation overhead of $\partial$ SNN over SNN. The computation time depends on the number of spikes, and the number of (hidden) spikes is proportional to $a$ , the amplitude of the non-linearity $\sigma$ that maps the membrane potential into the conditional intensity function. In general, $\partial$ SNN generates more hidden spikes than SNN because the thinning algorithm for the differentiable point process does not reject any of the candidate spikes. Therefore, we expect that $\partial$ SNN requires more computation time than SNN. The purpose of this experiment is to measure the computational overhead of $\partial$ SNN over SNN.
|
| 346 |
+
|
| 347 |
+
Protocol. We generate a single parameter setting, and gen
|
| 348 |
+
|
| 349 |
+
erate a training set of 10 examples of length 50. We then set up both SNN and $\partial$ SNN with amplitude $a = 1,2,\ldots ,20$ , resulting in 40 models to be trained. For each model, we measure the computation time of running 100 epochs, and obtain per-epoch computation time by averaging them.
|
| 350 |
+
|
| 351 |
+
Result. Figure 4 summarizes the experimental results. As is expected, $\partial$ SNN requires 2.8 times more computation time than SNN on average. This result can be used as a reference for users to decide which gradient estimator to be employed. If a user can afford this overhead, our path-wise gradient estimator is recommended; otherwise, please consider to use the score function gradient estimator.
|
| 352 |
+
|
| 353 |
+
Note that we can improve the computation time of our method by introducing an adaptive upperbound $\bar{\lambda}$ in Algorithm 3, if it is a tighter upperbound than the fixed upperbound. We leave this improvement as future work.
|
| 354 |
+
|
| 355 |
+
# 6. Related Work
|
| 356 |
+
|
| 357 |
+
The present work is related to the communities of SNNs and point processes. Let us discuss our contributions to them.
|
| 358 |
+
|
| 359 |
+
# 6.1. Spiking Neural Networks
|
| 360 |
+
|
| 361 |
+
The most relevant work is the stochastic variational learning algorithm for SNNs (Jimenez Rezende & Gerstner, 2014). As discussed in Section 4.2.2, the difference is the gradient estimator. The authors used the score function gradient estimator, because the path-wise gradient estimator (which became popular by VAE (Kingma & Welling, 2014)) was not popular at that time and the reparameterization trick for point processes was not trivial. Our contribution is to develop a differentiable point process that enables us to derive the path-wise gradient estimator.
|
| 362 |
+
|
| 363 |
+
Less relevant but still worth mentioning are the line of work in learning algorithms for deterministic SNNs, where a neuron fires when the membrane potential exceeds a threshold. Although our technique cannot directly contribute to them,
|
| 364 |
+
|
| 365 |
+
we believe it is worthwhile to compare the pros and cons of these different approaches for further development. Of a number of approaches proposed so far (Neftci et al., 2019), we introduce two inspiring studies.
|
| 366 |
+
|
| 367 |
+
SpikeProp (Bohte et al., 2000) is one of the earliest attempts to develop a learning algorithm for deterministic SNNs. SpikeProp uses backpropagation to minimize the difference between the target firing times $\{t_n^{\star}\}_{n = 1}^{N}$ and the actual firing times $\{t_n\}_{n = 1}^N$ of the network, i.e., $\sum_{n = 1}^{N}|t_n^{\star} - t_n|^2$ . The gradient is approximated by assuming a linear relationship between the firing time and the membrane potential, which is valid only for a small learning rate.
|
| 368 |
+
|
| 369 |
+
Huh & Sejnowski (2018) propose a differentiable alternative to the threshold-based spike generation, which facilitates gradient computation. They employ a soft-threshold mechanism, and therefore, is differentiable without approximation. Another important contribution is that their model can handle not only spike trains but also a real-valued time-series. They use a readout network that maps spike trains from/into a real-valued time-series. This end-to-end formulation is significant towards practical applications of SNNs, and probabilistic SNNs should be equipped with this feature.
|
| 370 |
+
|
| 371 |
+
One interesting feature of probabilistic SNNs including our method is that both inference and learning algorithms can be executed naturally in an event-based manner without any discretization of time axis. This is in contrast to deterministic SNNs, where many learning algorithms require us to discretize the continuous-time dynamics for simulation.
|
| 372 |
+
|
| 373 |
+
# 6.2. Differentiable Point Processes
|
| 374 |
+
|
| 375 |
+
Our differentiable point process is significant in the community of point processes in that it largely expands the applicability of the reparameterization trick for point processes. Let us review the approaches to differentiable point processes, and discuss their pros and cons.
|
| 376 |
+
|
| 377 |
+
There are mainly three approaches to sample from point processes, and each of them can be used as a basis of differentiable point processes. The first approach (Shchur et al., 2020a) is to model the inter-event time conditioned on the past history by a log-normal mixture model, instead of modeling the conditional intensity function. Since it is straightforward to develop a reparameterizable sampling algorithm for the mixture model, the resultant point process is also reparameterizable. The second one is the inverse method (Rasmussen, 2018), which utilizes the fact that the inverse of the compensator $\Lambda^{[0,t]}$ can convert a unit-rate Poisson process into the point process with the corresponding conditional intensity function. Shchur et al. (2020b) propose a reparameterization trick based on the inverse method. The third one is the thinning algorithm, as we presented.
|
| 378 |
+
|
| 379 |
+
Of these three approaches, it is interesting to compare the
|
| 380 |
+
|
| 381 |
+
second and the third approaches. When applying the inverse method (Shchur et al., 2020b) to computing ELBO, it is reported that the objective function contains discontinuous points, making optimization difficult. The discontinuity arises because time stamps of a realization are parameterized, and the algorithm involves a discrete decision whether a time stamp is less than $T$ or not for termination. In contrast, Our differentiable point process does not suffer from it because not time stamps but marks are parameterized. In this sense, these two approaches are complementary.
|
| 382 |
+
|
| 383 |
+
When developing a path-wise gradient estimator for SNNs, only the third approach is feasible. The first approach is difficult to be applied because SNNs are modeled via the conditional intensity function, and the inter-event time distribution is not available in a closed form. The second approach is also difficult due to the lack of a closed-form expression of the inverse of the compensator. Our approach only assumes the existence of an upperbound of the conditional intensity function, and therefore, can be applied to SNNs. The assumption on the existence of a constant upperbound can be relaxed in the same way as Ogata's method (Ogata, 1981), which determines $\bar{\lambda}$ adaptively.
|
| 384 |
+
|
| 385 |
+
# 7. Conclusion and Future Work
|
| 386 |
+
|
| 387 |
+
We develop a path-wise gradient estimator for SNNs based on a differentiable point process. Given the experimental results in Section 5, we conclude that our estimator has lower variance than the existing one, which contributes to improve the learning capability.
|
| 388 |
+
|
| 389 |
+
Throughout this paper, we only focus on the dependency of the gradient estimator on learning capability, and we have not discussed about its practical applications. In the community of SNNs, however, an increasing number of studies have started to apply SNNs to real-world tasks (Shrestha & Orchard, 2018; Wozniak et al., 2020). One of the major concerns towards applying our method to real-world tasks is a method to convert real-valued data into/from spike trains. While there are a number of information encoding methods for spike trains, it is still an open problem which encoding is preferred. One interesting direction is to empirically and theoretically investigate the performance of different encoding methods and to understand their pros and cons.
|
| 390 |
+
|
| 391 |
+
Another limitation is the computational overhead as discussed in Section 5.3. While the probabilistic formulation can be simulated by an event-based manner, the gradient computation involves backpropagation through time (BPTT), whose complexity increases proportionally to the number of spikes. In addition to relying on the adaptive upperbound $\bar{\lambda}$ , applying online BPTT calculation and its approximation techniques (Williams & Zipser, 1989) to SNNs may be an interesting research direction.
|
| 392 |
+
|
| 393 |
+
# References
|
| 394 |
+
|
| 395 |
+
Bohte, S. M., Kok, J. N., and Poutré, H. L. SpikeProp: Backpropagation for Networks of Spiking Neurons. In Proceedings of the 8th European Symposium on Artificial Neural Networks (ESANN 2000), pp. 419-424, 2000.
|
| 396 |
+
Bothe, S. M. The evidence for neural information processing with precise spike-times: A survey. Natural Computing, 2:195-206, 2004.
|
| 397 |
+
Daley, D. J. and Vere-Jones, D. An Introduction to the Theory of Point Processes: Volume I: Elementary Theory and Methods. Springer-Verlag New York, 2003.
|
| 398 |
+
Duchi, J., Hazan, E., and Singer, Y. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121-2159, 2011. ISSN 15324435.
|
| 399 |
+
Gerstner, W., Kistler, W. M., Naud, R., and Paninski, L. Neuronal Dynamics. Cambridge University Press, 2014.
|
| 400 |
+
Huh, D. and Sejnowski, T. J. Gradient Descent for Spiking Neural Networks. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 31, pp. 1433-1443. Curran Associates, Inc., 2018.
|
| 401 |
+
Jang, E., Gu, S., and Poole, B. Categorical Reparameterization with Gumbel-Softmax. In Proceedings of the Fifth International Conference on Learning Representations, 2017.
|
| 402 |
+
Jimenez Rezende, D. and Gerstner, W. Stochastic variational learning in recurrent spiking networks. Frontiers in Computational Neuroscience, 8:38, 2014. ISSN 1662-5188. doi: 10.3389/fncom.2014.00038.
|
| 403 |
+
Kajino, H. diffsnn, 2021. URL https://github.com/ ibm-research-tokyo/diffsnn.
|
| 404 |
+
Kingma, D. P. and Welling, M. Auto-encoding variational Bayes. In Proceedings of the Second International Conference on Learning Representations, 2014.
|
| 405 |
+
Lewis, P. A. W. and Shedler, G. S. Simulation of nonhomogeneous poisson processes by thinning. *Naval Research Logistics Quarterly*, 26(3):403-413, 1979. doi: 10.1002/nav.3800260304.
|
| 406 |
+
Mächler, M. Accurately computing $\log (1 - \exp (-|a|))$ assessed by the Rmpfr package. Technical report, 2012.
|
| 407 |
+
Maddison, C. J., Mnih, A., and Teh, Y. W. The Concrete Distribution: A Continuous Relaxation of Discrete Random Variables. In Proceedings of the Fifth International Conference on Learning Representations, 2017.
|
| 408 |
+
|
| 409 |
+
Mohamed, S., Rosca, M., Figurnov, M., and Mnih, A. Monte Carlo Gradient Estimation in Machine Learning, 2019.
|
| 410 |
+
Neftci, E. O., Mostafa, H., and Zenke, F. 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. doi: 10.1109/MSP.2019.2931595.
|
| 411 |
+
Ogata, Y. On Lewis' simulation method for point processes. IEEE Transactions on Information Theory, 27(1):23-31, jan 1981. ISSN 1557-9654. doi: 10.1109/TIT.1981.1056305.
|
| 412 |
+
Pfister, J.-P., Toyoizumi, T., Barber, D., and Gerstner, W. Optimal Spike-Timing-Dependent Plasticity for Precise Action Potential Firing in Supervised Learning. Neural Computation, 18(6):1318-1348, 2006. doi: 10.1162/neco.2006.18.6.1318.
|
| 413 |
+
Rasmussen, J. G. Lecture notes: Temporal point processes and the conditional intensity function. arXiv preprint arXiv:1806.00221, 2018.
|
| 414 |
+
Shchur, O., Bilosh, M., and Gunnemann, S. Intensity-free learning of temporal point processes. In International Conference on Learning Representations, 2020a.
|
| 415 |
+
Shchur, O., Gao, N., Biloš, M., and Gunnemann, S. Fast and Flexible Temporal Point Processes with Triangular Maps. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M. F., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 73-84. Curran Associates, Inc., 2020b.
|
| 416 |
+
Shrestha, S. B. and Orchard, G. SLAYER: Spike Layer Error Reassignment in Time. In Bengio, S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 417 |
+
Williams, R. J. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3):229-256, 1992. ISSN 1573-0565. doi: 10.1007/BF00992696.
|
| 418 |
+
Williams, R. J. and Zipser, D. A Learning Algorithm for Continually Running Fully Recurrent Neural Networks. Neural Computation, 1(2):270-280, 1989. ISSN 0899-7667. doi: 10.1162/neco.1989.1.2.270.
|
| 419 |
+
Wozniak, S., Pantazi, A., Bohnstingl, T., and Eleftheriou, E. Deep learning incorporating biologically inspired neural dynamics and in-memory computing. Nature Machine Intelligence, 2(6):325-336, 2020. ISSN 2522-5839. doi: 10.1038/s42256-020-0187-0.
|
adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3a5a03f4dad44f4983c89e54c188beceb9d6f1add459639bb12280313846f16
|
| 3 |
+
size 199053
|
adifferentiablepointprocesswithitsapplicationtospikingneuralnetworks/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6641bb37e8bce47d622c716ae0edbe0fcc20cf5d6e98efd4d799324532d57a57
|
| 3 |
+
size 614988
|
adiscriminativetechniqueformultiplesourceadaptation/ef18857d-2f2d-49bf-b209-4485163d10e4_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f6adcc70514a216f28a1d4086b1744422cf24aa5045a2579888298f4f5a8970
|
| 3 |
+
size 99129
|
adiscriminativetechniqueformultiplesourceadaptation/ef18857d-2f2d-49bf-b209-4485163d10e4_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e80838ee45cdb7e1ec4891979f3bf5c6389bf97fc4ed9a14fc4eacca68fa3f91
|
| 3 |
+
size 120682
|
adiscriminativetechniqueformultiplesourceadaptation/ef18857d-2f2d-49bf-b209-4485163d10e4_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cfbd0d9a1a2a45b66212871231e087b473a89e6c5423cab1ed3d9b00575dbb08
|
| 3 |
+
size 3104063
|
adiscriminativetechniqueformultiplesourceadaptation/full.md
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Corinna Cortes<sup>1</sup> Mehryar Mohri<sup>1,2</sup> Ananda Theertha Suresh<sup>1</sup> Ningshan Zhang<sup>3</sup>
|
| 2 |
+
|
| 3 |
+
# Abstract
|
| 4 |
+
|
| 5 |
+
We present a new discriminative technique for the multiple-source adaptation (MSA) problem. Unlike previous work, which relies on density estimation for each source domain, our solution only requires conditional probabilities that can be straightforwardly accurately estimated from unlabeled data from the source domains. We give a detailed analysis of our new technique, including general guarantees based on Rényi divergences, and learning bounds when conditional Maxent is used for estimating conditional probabilities for a point to belong to a source domain. We show that these guarantees compare favorably to those that can be derived for the generative solution, using kernel density estimation. Our experiments with real-world applications further demonstrate that our new discriminative MSA algorithm outperforms the previous generative solution as well as other domain adaptation baselines.
|
| 6 |
+
|
| 7 |
+
# 1. Introduction
|
| 8 |
+
|
| 9 |
+
Learning algorithms are applied to an increasingly broad array of problems. For some tasks, large amounts of labeled data are available to train very accurate predictors. But, for most new problems or domains, no such supervised information is at the learner's disposal. Furthermore, labeling data is costly since it typically requires human inspection and agreements between multiple expert labelers. Can we leverage past predictors learned for various domains and combine them to devise an accurate one for a new task? Can we provide guarantees for such combined predictors? How should we define that combined predictor? These are some of the challenges of multiple-source domain adaptation.
|
| 10 |
+
|
| 11 |
+
The problem of domain adaptation from multiple sources admits distinct instances defined by the type of source in
|
| 12 |
+
|
| 13 |
+
<Google Research, New York, NY; Courant Institute of Mathematical Sciences, New York, NY; Hudson River Trading, New York, NY. Correspondence to: Ananda Theertha Suresh <theertha@google.com>.
|
| 14 |
+
|
| 15 |
+
Proceedings of the $38^{th}$ International Conference on Machine Learning, PMLR 139, 2021. Copyright 2021 by the author(s).
|
| 16 |
+
|
| 17 |
+
formation available to the learner, the number of source domains, and the amount of labeled and unlabeled data available from the target domain (Mansour et al., 2008; 2009a; Hoffman et al., 2018; Pan and Yang, 2010; Muandet et al., 2013; Xu et al., 2014; Hoffman et al., 2012; Gong et al., 2013a;b; Zhang et al., 2015; Ganin et al., 2016; Tzeng et al., 2015; Motiian et al., 2017b;a; Wang et al., 2019b; Konstantinov and Lampert, 2019; Liu et al., 2015; Saito et al., 2019; Wang et al., 2019a). The specific instance we are considering is one where the learner has access to multiple source domains and where, for each domain, they only have at their disposal a predictor trained for that domain and some amount of unlabeled data. No other information about the source domains, in particular no labeled data is available. The target domain or distribution is unknown but it is assumed to be in the convex hull of the source distributions, or relatively close to that. The multiple-source adaptation (MSA) problem consists of combining relatively accurate predictors available for each source domain to derive an accurate predictor for any such new mixture target domain. This problem was first theoretically studied by Mansour et al. (2008; 2009a) and subsequently by Hoffman et al. (2018; 2021), who further provided an efficient algorithm for this problem and reported the results of a series of experiments with that algorithm and favorable comparisons with alternative solutions.
|
| 18 |
+
|
| 19 |
+
As pointed out by these authors, this problem arises in a variety of different contexts. In speech recognition, each domain may correspond to a different group of speakers and an acoustic model learned for each domain may be available. Here, the problem consists of devising a general recognizer for a broader population, a mixture of the source domains (Liao, 2013). Similarly, in object recognition, there may be accurate models trained on different image databases and the goal is to come up with an accurate predictor for a general domain, which is likely to be close to a mixture of these sources (Torralba and Efros, 2011). A similar situation often appears in sentiment analysis and various other natural language processing problems where accurate predictors are available for some source domains such as TVs, laptops and CD players, each previously trained on labeled data, but no labeled data or predictor is at hand for the broader category of electronics, which can be viewed as a mixture of the sub-domains (Blitzer et al., 2007; Dredze et al., 2008).
|
| 20 |
+
|
| 21 |
+
An additional motivation for this setting of multiple-source adaptation is that often the learner does not have access to labeled data from various domains for legitimate reasons such as privacy or storage limitation. This may be for example labeled data from various hospitals, each obeying strict regulations and privacy rules. But, a predictor trained on the labeled data from each hospital may be available. Similarly, a speech recognition system trained on data from some group may be available but the many hours of source labeled data used to train that model may not be accessible anymore, due to the very large amount of disk space it requires. Thus, in many cases, the learner cannot simply merge all source labeled data to learn a predictor.
|
| 22 |
+
|
| 23 |
+
Main contributions. In Section 3, we present a new discriminative technique for the MSA problem, Previous work showed that a distribution-weighted combination of source predictors benefited from favorable theoretical guarantees (Mansour et al., 2008; 2009a; Hoffman et al., 2018; 2021). However, that generative solution requires an accurate density estimation for each source domain, which, in general, is a difficult problem. Instead, our solution only needs conditional probabilities, which is easier to accurately estimate from unlabeled data from the source domains. We also describe an efficient DC-programming optimization algorithm for determining the solution of our discriminative technique, which is somewhat similar to but distinct from that of previous work, since it requires a new DC-decomposition.
|
| 24 |
+
|
| 25 |
+
In Section 4, we give a new and detailed theoretical analysis of our technique, starting with new general guarantees that depend on the Rényi divergences between the target distribution and mixtures of the true source distributions, instead of mixtures of estimates of those distributions (Section 3). We then present finite sample learning bounds for our new discriminative solution when conditional Maxent is used for estimating conditional probabilities. We also give a new and careful analysis of the previous generative solution, when using kernel density estimation, including the first finite sample generalization bound for that technique. We show that the theoretical guarantees for our discriminative solution compare favorably to those derived for the generative solution in several ways. While we benefit from some of the analysis in previous work (Hoffman et al., 2018; 2021), our main proofs and techniques are new and non-trivial.
|
| 26 |
+
|
| 27 |
+
We further report the results of several experiments with our discriminative algorithm both with a synthetic dataset and several real-world applications (Section 5). Our results demonstrate that, in all tasks, our new solution outperforms the previous work's generative solution, which had been shown itself to surpass empirically the accuracy of other domain adaptation baselines (Hoffman et al., 2018). They also indicate that our discriminative technique requires fewer samples to achieve a high accuracy than the previous solu
|
| 28 |
+
|
| 29 |
+
tion, which matches our theoretical analysis.
|
| 30 |
+
|
| 31 |
+
Related work. There is a very broad literature dealing with single-source and multiple-source adaptation with distinct scenarios. Here, we briefly discuss the most related previous work, in addition to (Mansour et al., 2008; 2009a; Hoffman et al., 2018), and defer a more extensive discussion to Appendix A. The idea of using a domain classifier to combine domain-specific predictors has been suggested in the past. Jacobs et al. (1991) and Nowlan and Hinton (1991) considered an adaptive mixture of experts model, where there are multiple expert networks, as well as a gating network to determine which expert to use for each input. The learning method consists of jointly training the individual expert networks and the gating network. In our scenario, no labeled data is available, expert networks are pre-trained separately from the gating network, and our gating network admits a specific structure. Hoffman et al. (2012) learned a domain classifier via SVM on all source data combined, and predicted on new test points with the weighted sum of domain classifier's scores and domain-specific predictors. Such linear combinations were later shown by Hoffman et al. (2018) to perform poorly in some cases and not to benefit from strong guarantees. More recently, Xu et al. (2018) deployed multi-way adversarial training to multiple source domains to obtain a domain discriminator, and also used a weighted sum of discriminator's scores and domain-specific predictors to make predictions. Zhao et al. (2018) considered a scenario where labeled samples are available, unlike our scenario, and learned a domain classifier to approximate the discrepancy term in a MSA generalization bound, and proposed the MDAN model to minimize the bound.
|
| 32 |
+
|
| 33 |
+
We start with a description of the learning scenario we consider and the introduction of notation and definitions relevant to our analysis (Section 2).
|
| 34 |
+
|
| 35 |
+
# 2. Learning Scenario
|
| 36 |
+
|
| 37 |
+
We consider the MSA problem in the general stochastic scenario studied by Hoffman et al. (2018) and adopt the same notation.
|
| 38 |
+
|
| 39 |
+
Let $\mathcal{X}$ denote the input space, $\mathcal{Y}$ the output space. We will identify a domain with a distribution over $\mathcal{X} \times \mathcal{Y}$ . There are $p$ source domains $\mathcal{D}_1, \ldots, \mathcal{D}_p$ . As in previous work, we adopt the assumption that the domains share a common conditional probability $\mathcal{D}(\cdot | x)$ and thus $\mathcal{D}_k(x, y) = \mathcal{D}_k(x) \mathcal{D}(y|x)$ , for all $(x, y) \in \mathcal{X} \times \mathcal{Y}$ and $k \in [p]$ . This is a natural assumption in many common machine learning tasks. For example, in image classification, the label of a picture as a dog may not depend much on whether the picture is from a personal collection or a more general dataset. Nevertheless, as discussed in Hoffman et al. (2018), this condition can be relaxed and, here too, all our results can
|
| 40 |
+
|
| 41 |
+
be similarly extended to a more general case where the conditional probabilities vary across domains. Since not all $k$ conditional probabilities are equally accurate on the single $x$ , better target accuracy can be obtained by combining the $\mathcal{D}_k(x)$ s in an $x$ -dependent way.
|
| 42 |
+
|
| 43 |
+
For each domain $\mathcal{D}_k$ , $k \in [p]$ , the learner has access to some unlabeled data drawn i.i.d. from the marginal distribution $\mathcal{D}_k$ over $\mathcal{X}$ , as well as to a predictor $h_k$ . We consider two types of predictor functions $h_k$ , and their associated loss functions $\ell$ under the regression model $(R)$ and the probability model $(P)$ respectively:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
h _ {k} \colon \mathcal {X} \rightarrow \mathbb {R} \quad \ell \colon \mathbb {R} \times \mathcal {Y} \rightarrow \mathbb {R} _ {+} \quad (R)
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
h _ {k} \colon \mathcal {X} \times \mathcal {Y} \rightarrow [ 0, 1 ] \quad \ell \colon [ 0, 1 ] \rightarrow \mathbb {R} _ {+} \tag {P}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
In the probability model, the predictors are assumed to be normalized: $\sum_{y\in \mathcal{Y}}h(x,y) = 1$ for all $x\in \mathcal{X}$ . We will denote by $\mathcal{L}(\mathcal{D},h)$ the expected loss of a predictor $h$ with respect to the distribution $\mathcal{D}$ :
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\mathcal {L} (\mathcal {D}, h) = \underset {(x, y) \sim \mathcal {D}} {\mathbb {E}} \left[ \ell (h (x), y) \right] \quad (R),
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\mathcal {L} (\mathcal {D}, h) = \underset {(x, y) \sim \mathcal {D}} {\mathbb {E}} \left[ \ell (h (x, y)) \right] \quad (P).
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
Our theoretical results are general and only assume that the loss function $\ell$ is convex, continuous. But, in the regression model, we will be particularly interested in the squared loss $\ell(h(x), y) = (h(x) - y)^2$ and, in the probability model, the cross-entropy loss (or log-loss) $\ell(h(x, y)) = -\log h(x, y)$ . We will also assume that each source predictor $h_k$ is $\epsilon$ -accurate on its domain for some $\epsilon > 0$ , that is, $\forall k \in [p], \mathcal{L}(\mathcal{D}_k, h_k) \leq \epsilon$ . Our assumption that the loss of $h_k$ is bounded, implies that $\ell(h_k(x), y) \leq M$ or $\ell(h_k(x, y)) \leq M$ , for all $(x, y) \in \mathcal{X} \times \mathcal{Y}$ and $k \in [p]$ .
|
| 64 |
+
|
| 65 |
+
Let $\Delta = \{\lambda = (\lambda_1, \dots, \lambda_p) \colon \sum_{k=1}^p \lambda_k = 1, \lambda_k \geq 0\}$ denote the simplex in $\mathbb{R}^p$ , and let $\mathcal{D} = \{\mathcal{D}_\lambda \colon \mathcal{D}_\lambda = \sum_{k=1}^p \lambda_k \mathcal{D}_k, \lambda \in \Delta\}$ be the family of all mixtures of the source domains, that is the convex hull of $\mathcal{D}_k$ s.
|
| 66 |
+
|
| 67 |
+
Since not all $k$ source predictors are necessarily equally accurate on the single input $x$ , better target accuracy can be obtained by combining the $h_k(x)$ s dependent on $x$ . The MSA problem for the learner is exactly how to combine these source predictors $h_k$ to design a predictor $h$ with small expected loss for any unknown target domain $\mathcal{D}_T$ that is an element of $\mathcal{D}$ , or any unknown distribution $\mathcal{D}_T$ close to $\mathcal{D}$ .
|
| 68 |
+
|
| 69 |
+
Our theoretical guarantees are presented in terms of Rényi divergences, a broad family of divergences between distributions generalizing the relative entropy. The Rényi Divergence is parameterized by $\alpha \in [0, +\infty]$ and denoted by $\mathsf{D}_{\alpha}$ . The $\alpha$ -Rényi Divergence between two distributions $\mathcal{P}$ and $\Omega$ is defined by:
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\mathsf {D} _ {\alpha} (\mathcal {P} \parallel \mathcal {Q}) = \frac {1}{\alpha - 1} \log \bigg [ \sum_ {(x, y) \in \mathcal {X} \times \mathcal {Y}} \mathcal {P} (x, y) \left[ \frac {\mathcal {P} (x , y)}{\mathcal {Q} (x , y)} \right] ^ {\alpha - 1} \bigg ],
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
where, for $\alpha \in \{0,1, + \infty \}$ , the expression is defined by taking the limit (Arndt, 2004). For $\alpha = 1$ , the Rényi divergence coincides with the relative entropy. We will denote by $d_{\alpha}(\mathcal{P}\parallel \mathcal{Q})$ the exponential of $D_{\alpha}(\mathcal{P}\parallel \mathcal{Q})$ :
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\mathsf {d} _ {\alpha} (\mathcal {P} \parallel \mathcal {Q}) = \left[ \sum_ {(x, y) \in \mathcal {X} \times \mathcal {Y}} \frac {\mathcal {P} ^ {\alpha} (x , y)}{\mathcal {Q} ^ {\alpha - 1} (x , y)} \right] ^ {\frac {1}{\alpha - 1}}.
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
Appendix B provides more background on the definition and the main properties of Rényi divergences.
|
| 82 |
+
|
| 83 |
+
In the following, to alleviate the notation, we abusively denote the marginal distribution of a distribution $\mathcal{D}_k$ defined over $\mathcal{X} \times \mathcal{Y}$ in the same way and rely on the arguments for disambiguation, e.g. $\mathcal{D}_k(x)$ vs. $\mathcal{D}_k(x,y)$ .
|
| 84 |
+
|
| 85 |
+
# 3. Discriminative MSA solution
|
| 86 |
+
|
| 87 |
+
In this section we present our new solution for the MSA problem and give an efficient algorithm for determining its parameter. But first we describe the previous solution.
|
| 88 |
+
|
| 89 |
+
# 3.1. Previous Generative Technique
|
| 90 |
+
|
| 91 |
+
In previous work, it was shown that, in general, standard convex combinations of source predictors can perform poorly (Mansour et al., 2008; 2009a; Hoffman et al., 2018): in some problems, even when the source predictors have zero loss, no convex combination can achieve a loss below some constant for a uniform mixture of the source distributions. Instead, a distribution-weighted solution was proposed to the MSA problem. That solution relies on density estimates $\widehat{\mathcal{D}}_k$ for the marginal distributions $x\mapsto \mathcal{D}_k(x)$ , which are obtained via techniques such as kernel density estimation, for each source domain $k\in [p]$ independently.
|
| 92 |
+
|
| 93 |
+
Given such estimates, the solution is defined as follows in the regression and probability models, for all $(x,y)\in \mathcal{X}\times \mathcal{Y}$ ..
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\widehat {h} _ {z} (x) = \sum_ {k = 1} ^ {p} \frac {z _ {k} \widehat {\mathcal {D}} _ {k} (x)}{\sum_ {j = 1} ^ {p} z _ {j} \widehat {\mathcal {D}} _ {j} (x)} h _ {k} (x), \tag {1}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\widehat {h} _ {z} (x, y) = \sum_ {k = 1} ^ {p} \frac {z _ {k} \widehat {\mathcal {D}} _ {k} (x)}{\sum_ {j = 1} ^ {p} z _ {j} \widehat {\mathcal {D}} _ {j} (x)} h _ {k} (x, y), \tag {2}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
with $z \in \Delta$ is a parameter determined via an optimization problem such that $h_z$ admits the same loss for all $\mathcal{D}_k$ . We are assuming here that the estimates verify $\widehat{\mathcal{D}}_k(x) > 0$ for all $x \in \mathcal{X}$ and therefore that the denominators are positive. Otherwise, a small positive number $\eta > 0$ can be added to the denominators of the solutions, as in previous work. We are adopting this assumption only to simplify the presentation. For the probability model, the joint estimates $\widehat{\mathcal{D}}_k(x,y)$ used in (Hoffman et al., 2018) can be equivalently replaced by marginal ones $\widehat{\mathcal{D}}_k(x)$ since all domain distributions share the same conditional probabilities.
|
| 104 |
+
|
| 105 |
+
Since this previous work relies on density estimation, we will refer to it as a generative solution to the MSA problem, in short, GMSA. The technique benefits from the following general guarantee (Hoffman et al., 2018), where we extend the Rényi divergences to divergences between a distribution $\mathcal{D}$ and a set of distributions $\mathcal{D}$ and write $\mathrm{D}_{\alpha}(\mathcal{D} \parallel \mathcal{D}) = \min_{\mathcal{D} \in \mathcal{D}} \mathrm{D}_{\alpha}(\mathcal{D} \parallel \mathcal{D})$ .
|
| 106 |
+
|
| 107 |
+
Theorem 1. For any $\delta > 0$ , there exists a $z \in \Delta$ such that the following inequality holds for any $\alpha > 1$ and arbitrary target distribution $\mathcal{D}_T$ :
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\mathcal {L} (\mathcal {D} _ {T}, \widehat {h} _ {z}) \leq \left[ (\widehat {\epsilon} + \delta) \mathsf {d} _ {\alpha} (\mathcal {D} _ {T} \| \widehat {\mathcal {D}}) \right] ^ {\frac {\alpha - 1}{\alpha}} M ^ {\frac {1}{\alpha}},
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
where $\widehat{\epsilon} = \max_{k\in [p]}\left[\epsilon \mathsf{d}_{\alpha}(\widehat{\mathcal{D}}_k\parallel \mathcal{D}_k)\right]^{\frac{\alpha - 1}{\alpha}}M^{\frac{1}{\alpha}}$ and $\widehat{\mathcal{D}} = \left\{\sum_{k = 1}^{p}\lambda_{k}\widehat{\mathcal{D}}_{k}\colon \lambda \in \Delta \right\}$
|
| 114 |
+
|
| 115 |
+
The bound depends on the quality of the density estimates via the Rényi divergence between $\widehat{\mathcal{D}}_k$ and $\mathcal{D}_k$ , for each $k \in [p]$ , and the closeness of the target distribution $\mathcal{D}_T$ to the mixture family $\widehat{\mathcal{D}}$ , a bound we elaborate on further in Appendix C.1 and express in terms of the closeness of the target distribution $\mathcal{D}_T$ to the true family $\mathcal{D}$ . For $\alpha = +\infty$ , for $\mathcal{D}_T$ close to $\widehat{\mathcal{D}}$ and accurate estimates of $\mathcal{D}_k$ , $\mathrm{d}_{\alpha}(\mathcal{D}_T \parallel \widehat{\mathcal{D}})$ and $\mathrm{d}_{\alpha}(\widehat{\mathcal{D}}_k \parallel \mathcal{D}_k)$ are close to one and the upper bound is as a result close to $\epsilon$ . That is, with good density estimates, the error of $h_z$ is no worse than that of the source predictors $h_k s$ . However, obtaining good density estimators is a difficult problem and in general requires large amounts of data. In the following section, we provide a new and less data-demanding solution based on conditional probabilities.
|
| 116 |
+
|
| 117 |
+
# 3.2. New Discriminative Technique
|
| 118 |
+
|
| 119 |
+
Let $\mathcal{D}$ denote the distribution over $\mathcal{X}$ defined by $\mathcal{D}(x) = \frac{1}{p}\sum_{k=1}^{p}\mathcal{D}_k(x)$ . We will assume and can enforce that $\mathcal{D}$ is the distribution according to which we can expect to receive unlabeled samples from the $p$ sources to train our discriminator. We will denote by $\mathcal{Q}$ the distribution over $\mathcal{X} \times [p]$ defined by $\mathcal{Q}(x,k) = \frac{1}{p}\mathcal{D}_k(x)$ , whose $\mathcal{X}$ -marginal coincides with $\mathcal{D}$ : $\mathcal{Q}(x) = \mathcal{D}(x)$ .
|
| 120 |
+
|
| 121 |
+
Our new solution relies on estimates $\widehat{\mathcal{Q}}(k|x)$ of the conditional probabilities $\mathcal{Q}(k|x)$ for each domain $k \in [p]$ , that is the probability that point $x$ belongs to source $k$ . Given such estimates, our new solution to the MSA problem is defined as follows in the regression and probability models, for all $(x,y) \in \mathcal{X} \times \mathcal{Y}$ :
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\widehat {g} _ {z} (x) = \sum_ {k = 1} ^ {p} \frac {z _ {k} \widehat {\mathcal {Q}} (k | x)}{\sum_ {j = 1} ^ {p} z _ {j} \widehat {\mathcal {Q}} (j | x)} h _ {k} (x), \tag {3}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\widehat {g} _ {z} (x, y) = \sum_ {k = 1} ^ {p} \frac {z _ {k} \widehat {\mathbb {Q}} (k | x)}{\sum_ {j = 1} ^ {p} z _ {j} \widehat {\mathbb {Q}} (j | x)} h _ {k} (x, y), \tag {4}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
with $z \in \Delta$ being a parameter determined via an optimization problem. As for the GMSA solution, we are assuming here that the estimates verify $\widehat{\mathcal{Q}}(k|x) > 0$ for all $x \in \mathcal{X}$ and therefore that the denominators are positive. Otherwise, a small positive number $\eta > 0$ can be added to the denominators of the solutions, as in previous work. We are adopting this assumption only to simplify the presentation. Note that in the probability model, $\widehat{g}_z(x,y)$ is normalized since $h_k s$ are normalized: $\sum_{y \in \mathcal{Y}} g_z(x,y) = 1$ for all $x \in \mathcal{X}$ .
|
| 132 |
+
|
| 133 |
+
Since our solution relies on estimates of conditional probabilities of domain membership, we will refer to it as a discriminative solution to the MSA problem, DMSA in short.
|
| 134 |
+
|
| 135 |
+
Observe that, by the Bayes' formula, the conditional probability estimates $\widehat{\mathcal{Q}}(k|x)$ induce density estimates $\widehat{\mathcal{D}}_k(x)$ of the marginal distributions $x \mapsto \mathcal{D}_k(x)$ :
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\widehat {\mathcal {D}} _ {k} (x) = \frac {\widehat {\mathcal {Q}} (k | x) \mathcal {D} (x)}{\widehat {\mathcal {Q}} (k)} \tag {5}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where $\widehat{\mathcal{Q}}(k) = \sum_{x \in \mathcal{X}} \widehat{\mathcal{Q}}(k|x)\mathcal{D}(x)$ . For an exact estimate, that is $\widehat{\mathcal{Q}}(k|x) = \mathcal{Q}(k|x)$ , the formula holds with $\widehat{\mathcal{Q}}(k) = \sum_{x \in \mathcal{X}} \mathcal{Q}(x,k) = \frac{1}{p}$ . In light of this observation, we can establish the following connection between the GMSA and DMSA solutions.
|
| 142 |
+
|
| 143 |
+
Proposition 1. Let $\widehat{h}_z$ be the GMSA solution using the estimates $\widehat{\mathcal{D}}_k$ defined in (5). Then, for any $z\in \Delta$ , we have $\widehat{h}_z = \widehat{g}_{z'}$ with $z_k' = \frac{z_k / \widehat{\Omega}(k)}{\sum_{j = 1}^p z_j / \widehat{\Omega}(j)}$ , for all $k\in [p]$ .
|
| 144 |
+
|
| 145 |
+
Proof. First consider the regression model. By definition of the GMSA solution, we can write:
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
\begin{array}{l} \widehat {h} _ {z} (x) = \sum_ {k = 1} ^ {p} \frac {z _ {k} \frac {\widehat {\mathcal {Q}} (k | x) \mathcal {D} (x)}{\widehat {\mathcal {Q}} (k)}}{\sum_ {j = 1} ^ {p} z _ {j} \frac {\widehat {\mathcal {Q}} (j | x) \mathcal {D} (x)}{\widehat {\mathcal {Q}} (j)}} h _ {k} (x) \\ = \sum_ {k = 1} ^ {p} \frac {\frac {z _ {k}}{\widehat {\mathcal {Q}} (k)} \widehat {\mathcal {Q}} (k | x)}{\sum_ {j = 1} ^ {p} \frac {z _ {j}}{\widehat {\mathcal {Q}} (j)} \widehat {\mathcal {Q}} (j | x)} h _ {k} (x) = g _ {z ^ {\prime}} (x). \\ \end{array}
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
The probability model's proof is syntactically the same.
|
| 152 |
+
|
| 153 |
+
In view of this result, the DMSA technique benefits from a guarantee similar to GMSA (Theorem 1), where for DMSA the density estimates are based on the conditional probability estimates $\widehat{\mathcal{Q}}(k|x)$ .
|
| 154 |
+
|
| 155 |
+
Theorem 2. For any $\delta >0$ , there exists a $z\in \Delta$ such that the following inequality holds for any $\alpha >1$ and arbitrary target distribution $\mathcal{D}_T$ :
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
\mathcal {L} \left(\mathcal {D} _ {T}, \widehat {g} _ {z}\right) \leq \left[ (\widehat {\epsilon} + \delta) \mathrm {d} _ {\alpha} \left(\mathcal {D} _ {T} \| \widehat {\mathcal {D}}\right) \right] ^ {\frac {\alpha - 1}{\alpha}} M ^ {\frac {1}{\alpha}},
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
where $\widehat{\epsilon} = \max_{k\in [p]}\left[\epsilon \mathrm{d}_{\alpha}(\widehat{\mathcal{D}}_k\parallel \mathcal{D}_k)\right]^{\frac{\alpha - 1}{\alpha}}M^{\frac{1}{\alpha}}$ and $\widehat{\mathcal{D}} = \left\{\sum_{k = 1}^{p}\lambda_{k}\widehat{\mathcal{D}}_{k}\colon \lambda \in \Delta \right\}$ with $\widehat{\mathcal{D}}_k(x,y) = \frac{\widehat{\mathcal{Q}}(k|x)\mathcal{D}(x,y)}{\widehat{\mathcal{Q}}(k)}.$
|
| 162 |
+
|
| 163 |
+
# 3.3. Optimization Algorithm
|
| 164 |
+
|
| 165 |
+
By Proposition 1, to determine the parameter $z'$ guaranteeing the bound of Theorem 2 for $\widehat{g}_{z'}$ , it suffices to determine the parameter $z$ that yields the guarantee of Theorem 1 for $\widehat{h}_z$ , when using the estimates $\widehat{\mathcal{D}}_k = \frac{\widehat{\mathcal{Q}}(k|x)\mathcal{D}(x)}{\widehat{\mathcal{Q}}(k)}$ . As shown by (Hoffman et al., 2018), the parameter $z$ is the one for which $\widehat{h}_z$ admits the same loss for all source domains, that is $\mathcal{L}(\widehat{\mathcal{D}}_k,\widehat{h}_z) = \mathcal{L}(\widehat{\mathcal{D}}_{k'},\widehat{h}_z)$ for all $k,k^{\prime}\in [p]$ , where $\widehat{\mathcal{D}}_k$ is the joint distribution derived from $\widehat{\mathcal{D}}_k$ : $\widehat{\mathcal{D}}_k(x,y) = \widehat{\mathcal{D}}_k(x)\mathcal{D}(y|x) = \frac{\widehat{\mathcal{Q}}(k|x)\mathcal{D}(x,y)}{\widehat{\mathcal{Q}}(k)}$ , with $\mathcal{D}(x,y) = \frac{1}{p}\sum_{k = 1}^{p}\mathcal{D}_k(x,y)$ . Note, $\widehat{\mathcal{D}}(x,y)$ is abusively denoted the same way as $\widehat{\mathcal{D}}(x)$ to avoid the introduction of additional notation, but the difference in arguments should suffice to help distinguish the two distributions.
|
| 166 |
+
|
| 167 |
+
Thus, using $\widehat{g}_{z'} = \widehat{h}_z$ , to find $z$ , and subsequently $z'$ , it suffices to solve the following optimization problem in $z$ :
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\min _ {z \in \Delta} \max _ {k \in [ p ]} \quad \mathcal {L} \left(\widehat {\mathcal {D}} _ {k}, \widehat {g} _ {z ^ {\prime}}\right) - \mathcal {L} \left(\widehat {\mathcal {D}} _ {z}, \widehat {g} _ {z ^ {\prime}}\right), \tag {6}
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
where $z_{k}^{\prime} = \frac{z_{k} / \widehat{\mathcal{Q}}(k)}{\sum_{j=1}^{p} z_{j} / \widehat{\mathcal{Q}}(j)}$ and $\widehat{\mathcal{D}}_{z} = \sum_{k=1}^{p} z_{k} \widehat{\mathcal{D}}_{k}$ . As in previous work, this problem can be cast as a DC-programming (difference-of-convex) problem and solved using the DC algorithm (Tao and An, 1997; 1998; Sriperumbudur and Lanckriet, 2012). However, we need to derive a new DC-decomposition here, both for the regression and the probability model, since the objective is distinct from that of previous work. A detailed description of that DC-decomposition and its proofs, as well as other details of the algorithm are given in Appendix D.
|
| 174 |
+
|
| 175 |
+
# 4. Learning Guarantees
|
| 176 |
+
|
| 177 |
+
In this section, we prove favorable learning guarantees for the predictor $\widehat{g}_z$ returned by DMSA, when using conditional maximum entropy to derive domain estimates $\mathcal{Q}(k|x)$ . We first extend Theorem 1 and present a general theoretical guarantee which holds for DMSA and GMSA (Section 4.1). Next, in Section 4.2, we give a generalization bound for conditional Maxent and use that to prove learning guarantees for DMSA. We then analyze GMSA using kernel density estimation (Section 4.3), and show that DMSA benefits from significantly more favorable learning guarantees than GMSA.
|
| 178 |
+
|
| 179 |
+
# 4.1. General Guarantee
|
| 180 |
+
|
| 181 |
+
Theorem 1 gives a guarantee in terms of the Rényi divergence of $\mathcal{D}_T$ and $\widehat{\mathcal{D}}$ , which depends on the empirical estimates. Instead, we derive a bound in terms of the Rényi divergence of $\mathcal{D}_T$ and $\mathcal{D}$ and, as with Theorem 1, the Rényi divergences between the distributions $\mathcal{D}_k$ and their estimates $\widehat{\mathcal{D}}_k$ .
|
| 182 |
+
|
| 183 |
+
To do so, we use an inequality that can be viewed as a triangle inequality result for Rényi divergences (Hoffman et al., 2021).
|
| 184 |
+
|
| 185 |
+
Proposition 2. Let $\mathbb{P},\mathbb{Q},\mathbb{R}$ be three distributions on $\mathcal{X}\times \mathcal{Y}$ . Then, for any $\gamma \in (0,1)$ and any $\alpha >\gamma$ , the following inequality holds:
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\left[ \mathsf {d} _ {\alpha} (\mathcal {P} \parallel \mathcal {Q}) \right] ^ {\alpha - 1} \leq \left[ \mathsf {d} _ {\frac {\alpha}{\gamma}} (\mathcal {P} \parallel \mathcal {R}) \right] ^ {\alpha - \gamma} \left[ \mathsf {d} _ {\frac {\alpha - \gamma}{1 - \gamma}} (\mathcal {R} \parallel \mathcal {Q}) \right] ^ {\alpha - 1}.
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
The proof is given in Appendix B. This result is used in combination with Theorem 1 to establish the following.
|
| 192 |
+
|
| 193 |
+
Theorem 3. For any $\delta >0$ , there exists $z\in \Delta$ such that the following inequality holds for any $\alpha >1$ and arbitrary target distribution $\mathcal{D}_T$ :
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\mathcal {L} (\mathcal {D} _ {T}, \widehat {g} _ {z}) \leq \left[ \left(\widehat {\epsilon} + \delta\right) \widehat {\mathsf {d}} ^ {\prime} \right] ^ {\frac {\alpha - 1}{\alpha}} \left[ \mathsf {d} _ {2 \alpha} (\mathcal {D} _ {T} \| \mathcal {D}) \right] ^ {\frac {2 \alpha - 1}{2 \alpha}} M ^ {\frac {1}{\alpha}},
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
where $\widehat{\epsilon} = (\epsilon \widehat{\mathsf{d}})^{\frac{\alpha - 1}{\alpha}}M^{\frac{1}{\alpha}}$ $\widehat{\mathsf{d}} = \max_{k\in [p]}\mathsf{d}_{\alpha}(\widehat{\mathcal{D}}_k\parallel \mathcal{D}_k)$ , and $\widehat{\mathsf{d}}^{\prime} = \max_{k\in [p]}\mathsf{d}_{2\alpha -1}(\mathcal{D}_k\parallel \widehat{\mathcal{D}}_k)$ with $\widehat{\mathcal{D}}_k = \frac{\widehat{\Omega}(k|x)\mathcal{D}(x)}{\widehat{\Omega}(k)}$
|
| 200 |
+
|
| 201 |
+
The proof is given in Appendix C.1. The theorem holds similarly for GMSA with $\widehat{\mathcal{D}}_k$ a direct estimate of $\mathcal{D}_k$ (Theorem 9, Appendix E.2). This provides a strong performance guarantee for GMSA or DMSA when the target distribution $\mathcal{D}_T$ is close to the family of mixtures of the source distributions $\mathcal{D}_k$ , and when $\widehat{\mathcal{D}}_k$ is a good estimate of $\mathcal{D}_k$ .
|
| 202 |
+
|
| 203 |
+
# 4.2. Conditional Maxent
|
| 204 |
+
|
| 205 |
+
The distribution $\mathcal{D} = \frac{1}{p}\sum_{k=1}^{p}\mathcal{D}_k$ over $\mathcal{X} \times \mathcal{Y}$ naturally induces the distribution $\Omega$ over $\mathcal{X} \times [p]$ defined for all $(x, k)$ by $\Omega(x, k) = \frac{1}{p}D_k(x)$ . Let $S = ((x_1, k_1), \ldots, (x_m, k_m))$ be a sample of $m$ labeled points drawn i.i.d. from $\Omega$ .
|
| 206 |
+
|
| 207 |
+
Let $\Phi \colon \mathcal{X} \times [p] \to \mathbb{R}^N$ be a feature mapping with bounded norm, $\| \Phi \| \leq r$ , for some $r > 0$ . Then, the optimization problem defining the solution of conditional Maxent (or multinomial logistic regression) with the feature mapping $\Phi$ is given by
|
| 208 |
+
|
| 209 |
+
$$
|
| 210 |
+
\min _ {w \in \mathbb {R} ^ {N}} \mu \| w \| ^ {2} - \frac {1}{m} \sum_ {i = 1} ^ {m} \log \mathrm {p} _ {w} [ k _ {i} | x _ {i} ], \tag {7}
|
| 211 |
+
$$
|
| 212 |
+
|
| 213 |
+
where $\mathsf{p}_w$ is defined by $\mathsf{p}_w[k|x] = \frac{1}{Z(x)}\exp (w\cdot \Phi (x,k))$ with $Z(x) = \sum_{k\in [p]}\exp (w\cdot \Phi (x,k))$ , and where $\mu \geq 0$ is a regularization parameter. Then, conditional Maxent benefits from the following theoretical guarantee.
|
| 214 |
+
|
| 215 |
+
Theorem 4. Let $\widehat{w}$ be the solution of problem (7) and $w^{*}$ the population solution of the conditional Maxent optimization problem:
|
| 216 |
+
|
| 217 |
+
$$
|
| 218 |
+
w ^ {*} = \operatorname * {a r g m i n} _ {w \in \mathbb {R} ^ {N}} \mu \| w \| ^ {2} - \underset {(x, k) \sim \Omega} {\mathbb {E}} \left[ \log \mathsf {p} _ {w} [ k | x ] \right].
|
| 219 |
+
$$
|
| 220 |
+
|
| 221 |
+
Then, for any $\delta > 0$ , with probability at least $1 - \delta$ , for any $(x,k) \in \mathcal{X} \times [p]$ , the following inequality holds:
|
| 222 |
+
|
| 223 |
+
$$
|
| 224 |
+
\left| \log \mathsf {p} _ {\widehat {w}} [ k | x ] - \log \mathsf {p} _ {w ^ {*}} [ k | x ] \right| \leq \frac {2 \sqrt {2} r ^ {2}}{\mu \sqrt {m}} \left[ 1 + \sqrt {\log (1 / \delta)} \right].
|
| 225 |
+
$$
|
| 226 |
+
|
| 227 |
+
The theorem shows that the pointwise log-loss of the conditional Maxent solution $\mathsf{p}_{\widehat{w}}$ is close to that of the best-in-class $\mathsf{p}_{w^*}$ modulo a term in $O(1 / \sqrt{m})$ that does not depend on the dimension of the feature space. The proof is given in Appendix C.2.
|
| 228 |
+
|
| 229 |
+
# 4.3. Comparison of the Guarantees for DMSA and GMSA
|
| 230 |
+
|
| 231 |
+
We now use Theorem 3 and the bound of Theorem 4 to give a theoretical guarantee for DMSA used with conditional Maxent. We show that it is more favorable than a guarantee for GMSA using kernel density estimation.
|
| 232 |
+
|
| 233 |
+
Theorem 5 (DMSA). There exists $z \in \Delta$ such that for any $\delta > 0$ , with probability at least $1 - \delta$ the following inequality holds DMSA used with conditional Maxent, for an arbitrary target mixture $\mathcal{D}_T$ :
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
\mathcal {L} (\mathcal {D} _ {T}, \widehat {g} _ {z}) \leq \epsilon p e ^ {\frac {6 \sqrt {2} r ^ {2}}{\mu \sqrt {m}} \left[ 1 + \sqrt {\log (1 / \delta)} \right]} \mathsf {d} ^ {*} \mathsf {d} ^ {\prime *},
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
$$
|
| 240 |
+
w i t h \quad \mathrm {d} ^ {*} = \sup _ {x \in \mathcal {X}} \mathrm {d} _ {\infty} \left(\mathcal {Q} ^ {*} [ \cdot | x ] \| \mathcal {Q} (\cdot | x)\right)
|
| 241 |
+
$$
|
| 242 |
+
|
| 243 |
+
$$
|
| 244 |
+
\mathsf {d} ^ {\prime *} = \sup _ {x \in \mathcal {X}} \mathsf {d} _ {\infty} ^ {2} \left(\mathcal {Q} (\cdot | x) \| \mathcal {Q} ^ {*} [ \cdot | x ]\right),
|
| 245 |
+
$$
|
| 246 |
+
|
| 247 |
+
where $\mathcal{Q}^*(\cdot | x) = \mathfrak{p}_{w^*}[\cdot | x]$ is the population solution of conditional Maxent problem (statement of Theorem 4).
|
| 248 |
+
|
| 249 |
+
The proof is given in Appendix C.3. It is based on a new and careful analysis of the Rényi divergences, leveraging the guarantee of Theorem 4. More refined versions of these results with alternative Rényi divergence parameters and with expectations instead of suprema in the definitions of $\mathrm{d}^*$ and $\mathrm{d}'^*$ are presented in that same appendix. The theorem shows that the expected error of DMSA with conditional Maxent is close to $\epsilon$ modulo a factor that varies as $e^{1/\sqrt{m}}$ , where $m$ is the size of the total unlabeled sample received from all $p$ sources, and factors $\mathcal{Q}^*$ and $\mathcal{Q}'^*$ that measure how closely conditional Maxent can approximate the true conditional probabilities with infinite samples.
|
| 250 |
+
|
| 251 |
+
Next, we prove learning guarantees for GMSA with densities estimated via kernel density estimation (KDE). We assume that the same i.i.d. sample $S = ((x_{1},k_{1}),\ldots ,(x_{m},k_{m}))$ as with conditional Maxent is used. Here, the points labeled with $k$ are used for estimating $\mathcal{D}_k$ via KDE. Since the sample is drawn from $\mathcal{Q}$ with $\mathcal{Q}(x,k) = \frac{1}{p}\mathcal{D}_k$ , the number of samples points $m_{k}$ labeled with $k$ is very close to $\frac{m}{p}$ . $\widehat{\mathcal{D}}_k$ is learned from $m_{k}$ samples, via KDE with a normalized kernel function $K_{\sigma}(\cdot ,\cdot)$ that satisfies $\int_{x\in \mathcal{X}}K_{\sigma}(x,x^{\prime})dx = 1$ for all $x^{\prime}\in \mathcal{X}$ .
|
| 252 |
+
|
| 253 |
+
Theorem 6 (GMSA). There exists $z \in \Delta$ such that, for any $\delta > 0$ , with probability at least $1 - \delta$ the following inequality holds for GMSA used KDE, for an arbitrary target mixture $\mathcal{D}_T$ :
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\mathcal {L} (\mathcal {D} _ {T}, \widehat {h} _ {z}) \leq \epsilon^ {\frac {1}{4}} M ^ {\frac {3}{4}} e ^ {\frac {6 \kappa}{\sqrt {2 (m / p)}} \sqrt {\log p + \log (1 / \delta)}} \mathsf {d} ^ {*} \mathsf {d} ^ {\prime *},
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
with $\kappa = \max_{x,x^{\prime},x^{\prime \prime}\in \mathfrak{X}}\frac{K_{\sigma}(x,x^{\prime})}{K_{\sigma}(x,x^{\prime\prime})}$ , and
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
\mathsf{d}^{*} = \max_{k\in [p]} \mathbb{E}_{x\sim \mathcal{D}_{k}}\left[\mathsf{d}_{+\infty}\big(K_{\sigma}(\cdot ,x)\parallel \mathcal{D}_{k}\big)\right],
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
$$
|
| 266 |
+
\mathsf{d}^{\prime *} = \max_{k\in [p]} \mathbb{E}_{x\sim \mathcal{D}_{k}}\left[\mathsf{d}_{+\infty}\big(\mathcal{D}_{k}\parallel K_{\sigma}(\cdot ,x)\big)\right].
|
| 267 |
+
$$
|
| 268 |
+
|
| 269 |
+
The proof is given in Appendix E.2. More refined versions of these results with alternative Rényi divergences are presented in that same appendix. In comparison with the guarantee for DMSA, the bound for GMSA admits a worse dependency on $\epsilon$ . Furthermore, while the dependency of the learning bound of DMSA on the sample size is of the form $O(e^{1/\sqrt{m}})$ and thus decreases as a function of the full sample size $m$ , that of GMSA is of the form $O(e^{1/\sqrt{m/p}})$ and only decreases as a function of the per-domain sample size. This further reflects the benefit of our discriminative solution since the estimation of the conditional probabilities is based on conditional Maxent trained on the full sample. Finally, the bound of GMSA depends on $\kappa$ , a ratio that can be unbounded for Gaussian kernels commonly used for KDE.
|
| 270 |
+
|
| 271 |
+
The generalization guarantees for DMSA (Theorem 7) depends on two critical terms that measure the divergence between the population solution of conditional Maxent and the true domain classifier $\mathcal{Q}(\cdot |x)$ :
|
| 272 |
+
|
| 273 |
+
$$
|
| 274 |
+
\mathsf {d} _ {+ \infty} \left(\mathcal {Q} ^ {*} (\cdot | x) \| \mathcal {Q} (\cdot | x)\right) \quad \text {a n d} \quad \mathsf {d} _ {+ \infty} \left(\mathcal {Q} (\cdot | x) \| \mathcal {Q} ^ {*} (\cdot | x)\right).
|
| 275 |
+
$$
|
| 276 |
+
|
| 277 |
+
When the feature mapping for conditional Maxent is sufficiently rich, for example when it is the reproducing kernel Hilbert space (RKHS) associated to a Gaussian kernel, one can expect the two divergences to be close to one. The generalization guarantees for GMSA (Theorem 10) also depend on two divergence terms:
|
| 278 |
+
|
| 279 |
+
$$
|
| 280 |
+
\mathsf {d} _ {+ \infty} \big (K _ {\sigma} (\cdot , x) \| \mathcal {D} _ {k} \big) \quad \text {a n d} \quad \mathsf {d} _ {+ \infty} \big (\mathcal {D} _ {k} \| K _ {\sigma} (\cdot , x) \big).
|
| 281 |
+
$$
|
| 282 |
+
|
| 283 |
+
Compared to learning a domain classifier $\widehat{\mathcal{Q}} (\cdot |x)$ , it is more difficult to choose a good density kernel $K_{\sigma}(\cdot ,\cdot)$ to ensure that the divergence between marginal distributions is small, which shows another benefit of DMSA.
|
| 284 |
+
|
| 285 |
+
The next section further illustrates the more advantageous sample complexity of the DMSA algorithm and shows that, in addition to the theoretical advantages discussed in this section, it also benefits from more favorable empirical results.
|
| 286 |
+
|
| 287 |
+
Table 1. MSE on the sentiment analysis dataset. Single source baselines, K, D, B, E, the uniform combination unif, GMSA, and DMSA.
|
| 288 |
+
|
| 289 |
+
<table><tr><td rowspan="2"></td><td colspan="11">Sentiment Analysis Test Data</td></tr><tr><td>K</td><td>D</td><td>B</td><td>E</td><td>KD</td><td>BE</td><td>DBE</td><td>KBE</td><td>KDB</td><td>KDB</td><td>KDBE</td></tr><tr><td>K</td><td>1.42±0.10</td><td>2.20±0.15</td><td>2.35±0.16</td><td>1.67±0.12</td><td>1.81±0.07</td><td>2.01±0.10</td><td>2.07±0.08</td><td>1.81±0.06</td><td>1.76±0.06</td><td>1.99±0.06</td><td>1.91±0.05</td></tr><tr><td>D</td><td>2.09±0.08</td><td>1.77±0.08</td><td>2.13±0.10</td><td>2.10±0.08</td><td>1.93±0.07</td><td>2.11±0.07</td><td>2.00±0.06</td><td>2.11±0.06</td><td>1.99±0.06</td><td>2.00±0.06</td><td>2.02±0.05</td></tr><tr><td>B</td><td>2.16±0.13</td><td>1.98±0.10</td><td>1.71±0.12</td><td>2.21±0.07</td><td>2.07±0.11</td><td>1.96±0.07</td><td>1.97±0.06</td><td>2.03±0.06</td><td>2.12±0.07</td><td>1.95±0.08</td><td>2.02±0.06</td></tr><tr><td>E</td><td>1.65±0.09</td><td>2.35±0.11</td><td>2.45±0.14</td><td>1.50±0.07</td><td>2.00±0.09</td><td>1.97±0.09</td><td>2.10±0.08</td><td>1.86±0.05</td><td>1.83±0.07</td><td>2.15±0.07</td><td>1.99±0.06</td></tr><tr><td>unif</td><td>1.50±0.06</td><td>1.75±0.09</td><td>1.79±0.10</td><td>1.53±0.07</td><td>1.63±0.06</td><td>1.66±0.08</td><td>1.69±0.06</td><td>1.61±0.05</td><td>1.60±0.05</td><td>1.68±0.05</td><td>1.65±0.05</td></tr><tr><td>GMSA</td><td>1.42±0.10</td><td>1.88±0.11</td><td>1.80±0.10</td><td>1.51±0.07</td><td>1.65±0.08</td><td>1.66±0.07</td><td>1.73±0.05</td><td>1.58±0.04</td><td>1.60±0.05</td><td>1.70±0.04</td><td>1.65±0.04</td></tr><tr><td>DMSA (ours)</td><td>1.42±0.08</td><td>1.76±0.07</td><td>1.70±0.11</td><td>1.46±0.07</td><td>1.59±0.06</td><td>1.58±0.07</td><td>1.64±0.05</td><td>1.53±0.04</td><td>1.55±0.04</td><td>1.63±0.04</td><td>1.59±0.04</td></tr></table>
|
| 290 |
+
|
| 291 |
+
# 5. Experiments
|
| 292 |
+
|
| 293 |
+
We experimented with our DMSA technique on the same datasets as those used in (Hoffman et al., 2018), as well as with the UCI adult dataset, and compared its performance with several baselines, including GMSA. Since Hoffman et al. (2018) already showed that GMSA empirically outperforms alternative MSA solutions, in this section, we mainly focus on demonstrating improvements over GMSA under the same experimental setups.
|
| 294 |
+
|
| 295 |
+
Sentiment analysis. To evaluate the DMSA solution under the regression model, we used the sentiment analysis dataset (Blitzer et al., 2007), which consists of product review text and rating labels taken from four domains: books (B),DVD (D), electronics (E), and kitchen (K), with 2,000 samples for each domain. We adopted the same training procedure and hyper-parameters as those used by Hoffman et al. (2018) to obtain base predictors: first define a vocabulary of 2,500 words that occur at least twice in each of the four domains, then use this vocabulary to define word-count feature vectors for every review text, and finally train base predictors for each domain using support vector regression. We used the same word-count features to train the domain classifier via logistic regression. We randomly split the 2,000 samples per domain into 1,600 train and 400 test samples for each domain, and learn the base predictors, domain classifier, density estimations, and parameter $z$ for both MSA solutions on all available training samples. We repeated the process 10 times, and report the mean and standard deviation of the mean squared error on various target test mixtures in Table 1.
|
| 296 |
+
|
| 297 |
+
We compared our technique, DMSA, against each source predictor, $h_k$ , the uniform combination of the source predictors (unif), $\frac{1}{p} \sum_{k=1}^{p} h_k$ , and GMSA with kernel density estimation. Each column in Table 1 corresponds to a different target test mixture, as indicated by the column name: four single domains, and uniform mixtures of two, three, and four domains, respectively. Our distribution-weighted method DMSA outperforms all baseline predictors across almost all test domains. Observe that, even when the target is a single source domain, such as K, B, E, our method can still outperform the predictor which is trained and tested on the same domain, showing the benefits of ensembles.
|
| 298 |
+
|
| 299 |
+
Moreover, DMSA improves upon GMSA by a wide margin on all test mixtures, which demonstrates the advantage of using a domain classifier over estimated densities in the distribution-weighted combination.
|
| 300 |
+
|
| 301 |
+
Digit dataset. To evaluate the DMSA solution under the probability model, we considered a digit recognition task consisting of three datasets: Google Street View House Numbers (SVHN), MNIST, and USPS. For each individual domain, we trained a convolutional neural network (CNN) with the same setup as in (Hoffman et al., 2018), and used the output from the softmax score layer as our base predictors $h_k$ . Furthermore, for every input image, we extracted the last layer before softmax from each of the base networks and concatenated them to obtain the feature vector for training the domain classifier. We used the full training sets per domain to train the source model, and used 6,000 samples per domain to learn the domain classifier. Finally, for our DC-programming algorithm, we used a 1,000 image-label pairs from each domain, thus a total of 3,000 labeled pairs to learn the parameter $z$ .
|
| 302 |
+
|
| 303 |
+
We compared our DMSA algorithm against each source predictor $(h_k)$ , the uniform combination, unif, a network jointly trained on all source data combined, joint, and GMSA with kernel density estimation. Since the training and testing datasets are fixed, we simply report the numbers from the original GMSA paper. We measured the performance of these baselines on each of the three test datasets, on combinations of two test datasets, and on all test datasets combined. The results are reported in Table 2. Once again, DMSA outperforms all baselines on all test mixtures, and when the target is a single test domain, DMSA admits a comparable performance to the predictor that is trained and tested on the same domain. And, as in the sentiment analysis experiments, DMSA outperforms GMSA by a wide margin on most of the test domains. For example, on SVHN test data, the improvement is $0.9\%$ , which is larger than $0.5\%$ , the standard deviation estimate on the test data.
|
| 304 |
+
|
| 305 |
+
We also report empirical results for the adversarial domain adaptation method of Zhao et al. (2018) in Table 2. Let us emphasize that the learning scenario for this algorithm does not match ours: this algorithm makes use of labeled data from source domains, as well as unlabeled data from a fixed
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 1. Left: Illustration of the true densities and kernel density estimates for GMSA for domains $\mathcal{D}_1$ and $\mathcal{D}_2$ with 1000 samples. The labeling function $f(x) = -1$ in the green regions and 1 otherwise. Right: Same estimates zoomed in at $x = 0$ .
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
|
| 312 |
+
Table 2. Digit Dataset Accuracy. DMSA outperforms each single-source domain model, unif, joint, and most importantly GMSA, on various target mixtures.
|
| 313 |
+
|
| 314 |
+
<table><tr><td rowspan="2"></td><td colspan="8">Digits Test Data</td></tr><tr><td>svhn</td><td>mnist</td><td>usps</td><td>mu</td><td>su</td><td>sm</td><td>smu</td><td>mean</td></tr><tr><td>CNN-s</td><td>92.3</td><td>66.9</td><td>65.6</td><td>66.7</td><td>90.4</td><td>85.2</td><td>84.2</td><td>78.8</td></tr><tr><td>CNN-m</td><td>15.7</td><td>99.2</td><td>79.7</td><td>96.0</td><td>20.3</td><td>38.9</td><td>41.0</td><td>55.8</td></tr><tr><td>CNN-u</td><td>16.7</td><td>62.3</td><td>96.6</td><td>68.1</td><td>22.5</td><td>29.4</td><td>32.9</td><td>46.9</td></tr><tr><td>CNN-unif</td><td>75.7</td><td>91.3</td><td>92.2</td><td>91.4</td><td>76.9</td><td>80.0</td><td>80.7</td><td>84.0</td></tr><tr><td>CNN-joint</td><td>90.9</td><td>99.1</td><td>96.0</td><td>98.6</td><td>91.3</td><td>93.2</td><td>93.3</td><td>94.6</td></tr><tr><td>adv-mu</td><td>91.5</td><td>98.5</td><td>95.7</td><td>98.1</td><td>91.8</td><td>93.5</td><td>93.6</td><td>94.7</td></tr><tr><td>adv-su</td><td>91.6</td><td>98.5</td><td>95.7</td><td>98.0</td><td>91.9</td><td>93.5</td><td>93.6</td><td>94.7</td></tr><tr><td>adv-sm</td><td>91.8</td><td>98.3</td><td>95.3</td><td>97.8</td><td>92.1</td><td>93.6</td><td>93.7</td><td>94.7</td></tr><tr><td>GMSA</td><td>91.4</td><td>98.8</td><td>95.6</td><td>98.3</td><td>91.7</td><td>93.5</td><td>93.6</td><td>94.7</td></tr><tr><td>DMSA (ours)</td><td>92.3</td><td>99.2</td><td>96.6</td><td>98.8</td><td>92.6</td><td>94.2</td><td>94.3</td><td>95.4</td></tr></table>
|
| 315 |
+
|
| 316 |
+
target domain. In other words, the algorithm makes use of more information than what is available in our scenario or accessible to DMSA. Nevertheless, we are including these results for reference.
|
| 317 |
+
|
| 318 |
+
For a target domain formed by the union of two out of the three domains svhn, mnist, or usps, that is a target domain defined as sm, su, or mu, we trained adv-target-domain, where we used unlabeled data from the target domain and labeled examples from all the three source domains smu. For these experiments, we used the entire training data from source domains and the entire unlabeled training data from target domains. We used the neural architecture and the discriminator used by Zhao et al. (2018). The results show that, while the adv-target-domain algorithm (Zhao et al., 2018) is making use of more information, its performance is inferior to that of GMSA and DMSA, even for the specific target distribution it is trained for and that it has therefore extra information about.
|
| 319 |
+
|
| 320 |
+
In Tables 5 and 6 in Appendix F, we report additional experimental results with the digits dataset for the scenario where the target domain is close to being a mixture of the source domains but where it may not necessarily be such a mixture, a scenario not covered by Hoffman et al. (2018). These experiments also demonstrate a consistently strong performance of DMSA.
|
| 321 |
+
|
| 322 |
+
To illustrate the efficiency of DMSA we further tested DMSA
|
| 323 |
+
|
| 324 |
+

|
| 325 |
+
Figure 2. Average test accuracy of GMSA (blue) and DMSA (orange) on the digits dataset as a function of the number of samples used in domain adaptation.
|
| 326 |
+
|
| 327 |
+
and GMSA on the digits dataset when only a small amount of data is available for domain adaptation. We plotted the performance of both algorithms as a function of $m$ , the number of samples per domain, see Figure 2. As expected, DMSA consistently outperforms GMSA, especially in the small sample regime, thus matching our theoretical analysis that DMSA can succeed with fewer samples.
|
| 328 |
+
|
| 329 |
+
Adult dataset. We also experimented with the UCI adult dataset (Blake, 1998), which contains 32,561 training samples with numerical and categorical features, each representing a person. The task consists of predicting if the person's income exceeds $50,000. Following (Mohri et al., 2019), we split the dataset into two domains, the doctorate Doc domain and non-doctorate NDoc domain and used categorical features for training linear classification models. We froze these models and experimented with the MSA methods GMSA and DMSA. Here, we repeatedly sampled 400 training samples from each domain for training, keeping the test set fixed.
|
| 330 |
+
|
| 331 |
+
Table 3. Linear models for adult dataset. The experiments are averaged over 100 runs.
|
| 332 |
+
|
| 333 |
+
<table><tr><td>Test data</td><td>Doc</td><td>NDoc</td><td>Doc-NDoc</td></tr><tr><td>GMSA</td><td>70.2 ± 1.2</td><td>76.4 ± 1.6</td><td>73.3 ± 0.8</td></tr><tr><td>DMSA</td><td>70.0 ± 0.8</td><td>80.5 ± 0.5</td><td>75.3 ± 0.4</td></tr></table>
|
| 334 |
+
|
| 335 |
+
The results are reported in Table 3. DMSA achieves a higher accuracy than GMSA on the NDoc domain and also in the
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 3. Comparison of GMSA and DMSA on the synthetic dataset. DMSA performs better than GMSA on both domains and thus on any convex combination. The experiments are averaged over 10 runs; error bars show one standard deviation.
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
|
| 342 |
+
average of two domains. The difference in performance is not statistically significant for the Doc domain as it has very few test samples.
|
| 343 |
+
|
| 344 |
+
Office dataset. We also carried out experiments on the visual adaptation office dataset (Saenko et al., 2010). The Office dataset is composed of 3 domains: amazon, dslr, and webcam. The amazon domain consists of 2817 images, dslr 498, and webcam 795 images. We divided the dataset into two splits following (Saenko et al., 2010). For the training data, we used 20 samples per category for amazon and 8 for both dslr and webcam. We used the rest of the samples as test data. We extracted the penultimate layer output from ResNet50 architecture (He et al., 2015) pre-trained on ImageNet and trained logistic regression models as base classifiers using this pretrained feature. The results are shown in Table 4. DMSA outperforms GMSA in all three domains and thus any convex combination. The differences for amazon and webcam is less than a standard deviation, however, we observe the advantage of DMSA over GMSA consistently. Similarly, DMSA achieves a higher accuracy than ResNet-unif, especially in the amazon domain, for which its performance matches that of a model specifically trained for that domain.
|
| 345 |
+
|
| 346 |
+
Table 4. Office Dataset Accuracy. The experiments are averaged over 10 runs.
|
| 347 |
+
|
| 348 |
+
<table><tr><td>Test data</td><td>amazon</td><td>webcam</td><td>dslr</td></tr><tr><td>ResNet-amazon</td><td>82.2 ± 0.6</td><td>75.8 ± 1.3</td><td>77.6 ± 1.4</td></tr><tr><td>ResNet-webcam</td><td>63.3 ± 1.6</td><td>95.7 ± 1.0</td><td>95.7 ± 1.3</td></tr><tr><td>ResNet-dslr</td><td>64.6 ± 1.0</td><td>94.0 ± 0.7</td><td>95.8 ± 1.0</td></tr><tr><td>ResNet-unif</td><td>79.3 ± 0.6</td><td>96.7 ± 0.7</td><td>97.2 ± 0.6</td></tr><tr><td>GMSA</td><td>82.1 ± 0.4</td><td>96.8 ± 0.8</td><td>96.7 ± 0.6</td></tr><tr><td>DMSA</td><td>82.2 ± 0.4</td><td>97.2 ± 0.9</td><td>97.4 ± 0.4</td></tr></table>
|
| 349 |
+
|
| 350 |
+
Synthetic dataset. We finally conducted simulations on a small synthetic dataset to further illustrate the difference between GMSA and DMSA. We used the sklearnn toolkit for these experiments. Let $\mathcal{D}_1$ and $\mathcal{D}_2$ be Gaussian mixtures in one dimension defined as follows: $\mathcal{D}_1 = 0.9\cdot N(-20,8) + 0.1\cdot N(0,0.1)$ and $\mathcal{D}_2 = 0.75\cdot N(3,0.1) + 0.25\cdot N(5,0.1) + 0.05\cdot N(0,0.1)$ , see Figure 1. The two domains are similar
|
| 351 |
+
|
| 352 |
+
around 0 but are disjoint otherwise. Let the labeling function $f(x) = -1$ if $x \in [-0.5, 0.5] \cup [3.5, +\infty)$ . The example is designed such that if their estimates are good, then both GMSA and DMSA would achieve close to $100\%$ accuracy. We first sampled 1000 examples and trained a linear separator $h_k$ for each domain $k$ . Compared GMSA and DMSA on this dataset. For GMSA, we trained kernel density estimators and chose the bandwidth based on a five-fold cross-validation. For DMSA, we trained a conditional Maxent threshold classifier. We first illustrate the kernel density estimate using 1000 samples in Figure 1. For $x \in [-0.5, 0.5]$ , $\mathcal{D}_1(x) > \mathcal{D}_2(x)$ , but the kernel density estimates satisfy $\widehat{\mathcal{D}}_2(x) \geq \widehat{\mathcal{D}}_1(x)$ , which shows the limitations of kernel density estimation with a single bandwidth. On the other hand, DMSA selected a threshold around 0.3 for distinguishing between $\mathcal{D}_1$ and $\mathcal{D}_2$ and achieves accuracy around $100\%$ . We varied the number of examples available for domain adaptation and compared GMSA and DMSA. For simplicity, we found the best $z$ using exhaustive search for both GMSA and DMSA. The results show that DMSA consistently outperforms GMSA on both the domains and hence on all convex combinations, see Figure 3. The results also indicate that DMSA converges faster, in accordance with our theory.
|
| 353 |
+
|
| 354 |
+
# 6. Conclusion
|
| 355 |
+
|
| 356 |
+
We presented a new algorithm for the important problem of multiple-source adaptation, which commonly arises in applications. Our algorithm was shown to benefit from favorable theoretical guarantees and a superior empirical performance, compared to previous work. Moreover, our algorithm is practical: it is straightforward to train a multiclass classifier in the setting we described and our DC-programming solution is very efficient.
|
| 357 |
+
|
| 358 |
+
Providing a robust solution for the problem is particularly important for under-represented groups, whose data is not necessarily well-represented in the classifiers to be combined and trained on source data. Our solution demonstrates improved performance even in the cases where the target distribution is not included in the source distributions. We hope that continued efforts in this area will result in more equitable treatment of under-represented groups.
|
| 359 |
+
|
| 360 |
+
# References
|
| 361 |
+
|
| 362 |
+
C. Arndt. Information Measures: Information and its Description in Science and Engineering. Signals and Communication Technology. Springer Verlag, 2004.
|
| 363 |
+
S. Ben-David, J. Blitzer, K. Crammer, and F. Pereira. Analysis of representations for domain adaptation. In Proceedings of NIPS. MIT Press, 2007.
|
| 364 |
+
C. Blake. UCI repository of machine learning databases. https://archive.ics.uci.edu/ml/index.php, 1998.
|
| 365 |
+
G. Blanchard, G. Lee, and C. Scott. Generalizing from several related classification tasks to a new unlabeled sample. In NIPS, pages 2178-2186, 2011.
|
| 366 |
+
J. Blitzer, M. Dredze, and F. Pereira. Biographies, bollywood, boom-boxes and blenders: Domain adaptation for sentiment classification. In ACL, pages 440-447, 2007.
|
| 367 |
+
J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. Wortman. Learning bounds for domain adaptation. In Proceedings of NIPS. MIT Press, 2008.
|
| 368 |
+
C. Cortes and M. Mohri. Domain adaptation in regression. In Proceedings of ALT, pages 308-323, 2011.
|
| 369 |
+
C. Cortes and M. Mohri. Domain adaptation and sample bias correction theory and algorithm for regression. Theor. Comput. Sci., 519:103-126, 2014.
|
| 370 |
+
C. Cortes, M. Mohri, and A. M. Medina. Adaptation algorithm and theory based on generalized discrepancy. In Proceedings of KDD, pages 169-178, 2015.
|
| 371 |
+
C. Cortes, M. Mohri, and A. M. Medina. Adaptation based on generalized discrepancy. J. Mach. Learn. Res., 20: 1:1-1:30, 2019.
|
| 372 |
+
K. Crammer, M. J. Kearns, and J. Wortman. Learning from multiple sources. Journal of Machine Learning Research, 9(Aug):1757-1774, 2008.
|
| 373 |
+
M. Dredze, K. Crammer, and F. Pereira. Confidence-weighted linear classification. In ICML, volume 307, pages 264-271, 2008.
|
| 374 |
+
L. Duan, I. W. Tsang, D. Xu, and T. Chua. Domain adaptation from multiple sources via auxiliary classifiers. In ICML, volume 382, pages 289-296, 2009.
|
| 375 |
+
L. Duan, D. Xu, and I. W. Tsang. Domain adaptation from multiple sources: A domain-dependent regularization approach. IEEE Transactions on Neural Networks and Learning Systems, 23(3):504-518, 2012.
|
| 376 |
+
B. Fernando, A. Habrard, M. Sebban, and T. Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In Proceedings of ICCV, pages 2960-2967, 2013.
|
| 377 |
+
|
| 378 |
+
C. Gan, T. Yang, and B. Gong. Learning attributes equals multi-source domain generalization. In Proceedings of CVPR, pages 87-97, 2016.
|
| 379 |
+
Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, M. Marchand, and V. Lempitsky. Domain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096-2030, 2016.
|
| 380 |
+
M. Ghifary, W. Bastiaan Kleijn, M. Zhang, and D. Balduzzi. Domain generalization for object recognition with multitask autoencoders. In Proceedings of ICCV, pages 2551-2559, 2015.
|
| 381 |
+
B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In CVPR, pages 2066-2073, 2012.
|
| 382 |
+
B. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In ICML, volume 28, pages 222-230, 2013a.
|
| 383 |
+
B. Gong, K. Grauman, and F. Sha. Reshaping visual datasets for domain adaptation. In NIPS, pages 1286-1294, 2013b.
|
| 384 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition, 2015.
|
| 385 |
+
J. Hoffman, B. Kulis, T. Darrell, and K. Saenko. Discovering latent domains for multisource domain adaptation. In ECCV, volume 7573, pages 702-715, 2012.
|
| 386 |
+
J. Hoffman, M. Mohri, and N. Zhang. Algorithms and theory for multiple-source adaptation. In Proceedings of NIPS, pages 8246-8256, 2018.
|
| 387 |
+
J. Hoffman, M. Mohri, and N. Zhang. Multiple-source adaptation theory and algorithms. Ann. Math. Artif. Intell., 89(3-4):237-270, 2021.
|
| 388 |
+
R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton. Adaptive mixtures of local experts. Neural computation, 3(1):79-87, 1991.
|
| 389 |
+
I.-H. Jhuo, D. Liu, D. Lee, and S.-F. Chang. Robust visual domain adaptation with low-rank reconstruction. In Proceedings of CVPR, pages 2168-2175. IEEE, 2012.
|
| 390 |
+
A. Khosla, T. Zhou, T. Malisiewicz, A. A. Efros, and A. Torralba. Undoing the damage of dataset bias. In ECCV, volume 7572, pages 158-171, 2012.
|
| 391 |
+
D. Kifer, S. Ben-David, and J. Gehrke. Detecting change in data streams. Proceedings of the 30th International Conference on Very Large Data Bases, 2004.
|
| 392 |
+
|
| 393 |
+
N. Konstantinov and C. Lampert. Robust learning from untrusted sources. In Proceedings of ICML, pages 3488-3498, 2019.
|
| 394 |
+
H. Liao. Speaker adaptation of context dependent deep neural networks. In ICASSP, pages 7947-7951, 2013.
|
| 395 |
+
H. Liu, M. Shao, and Y. Fu. Structure-preserved multiresource domain adaptation. In 2016 IEEE 16th International Conference on Data Mining (ICDM), pages 1059-1064. IEEE, 2016.
|
| 396 |
+
J. Liu, J. Zhou, and X. Luo. Multiple source domain adaptation: A sharper bound using weighted Rademacher complexity. In Technologies and Applications of Artificial Intelligence (TAAI), 2015 Conference on, pages 546-553. IEEE, 2015.
|
| 397 |
+
Y. Mansour, M. Mohri, and A. Rostamizadeh. Domain adaptation with multiple sources. In NIPS, pages 1041-1048, 2008.
|
| 398 |
+
Y. Mansour, M. Mohri, and A. Rostamizadeh. Multiple source adaptation and the rényi divergence. In Proceedings of UAI, pages 367-374, 2009a.
|
| 399 |
+
Y. Mansour, M. Mohri, and A. Rostamizadeh. Domain adaptation: Learning bounds and algorithms. In Proceedings of COLT, Montreal, Canada, 2009b. Omnipress.
|
| 400 |
+
Y. Mansour, M. Mohri, J. Ro, A. T. Suresh, and K. Wu. A theory of multiple-source adaptation with limited target labeled data. In Proceedings of AISTATS, pages 2332-2340, 2021.
|
| 401 |
+
R. McDonald, M. Mohri, N. Silberman, D. Walker, and G. S. Mann. Efficient large-scale distributed training of conditional maximum entropy models. In Proceedings of NIPS, pages 1231-1239, 2009.
|
| 402 |
+
M. Mohri, G. Sivek, and A. T. Suresh. Agnostic federated learning. In Proceedings of ICML, pages 4615-4625. PMLR, 2019.
|
| 403 |
+
S. Motiian, Q. Jones, S. Iranmanesh, and G. Doretto. Few-shot adversarial domain adaptation. In Proceedings of NIPS, pages 6670-6680, 2017a.
|
| 404 |
+
S. Motiian, M. Piccirilli, D. A. Adjeroh, and G. Doretto. Unified deep supervised domain adaptation and generalization. In Proceedings of ICCV, pages 5715-5725, 2017b.
|
| 405 |
+
K. Muandet, D. Balduzzi, and B. Scholkopf. Domain generalization via invariant feature representation. In ICML, volume 28, pages 10-18, 2013.
|
| 406 |
+
|
| 407 |
+
S. J. Nowlan and G. E. Hinton. Evaluation of adaptive mixtures of competing experts. In Proceedings of NIPS, pages 774-780, 1991.
|
| 408 |
+
S. J. Pan and Q. Yang. A survey on transfer learning. IEEE Trans. Knowl. Data Eng., 22(10):1345-1359, 2010.
|
| 409 |
+
Z. Pei, Z. Cao, M. Long, and J. Wang. Multi-adversarial domain adaptation. In AAAI, pages 3934-3941, 2018.
|
| 410 |
+
X. Peng, Q. Bai, X. Xia, Z. Huang, K. Saenko, and B. Wang. Moment matching for multi-source domain adaptation. In Proceedings of ICCV, pages 1406-1415, 2019.
|
| 411 |
+
K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In European conference on computer vision, pages 213-226. Springer, 2010.
|
| 412 |
+
K. Saito, D. Kim, S. Sclaroff, T. Darrell, and K. Saenko. Semi-supervised domain adaptation via minimax entropy. In Proceedings of ICCV, pages 8050-8058, 2019.
|
| 413 |
+
B. K. Sriperumbudur and G. R. G. Lanckriet. A proof of convergence of the concave-convex procedure using Zangwill's theory. Neural Computation, 24(6):1391-1407, 2012.
|
| 414 |
+
Q. Sun, R. Chattopadhyay, S. Panchanathan, and J. Ye. A two-stage weighting framework for multi-source domain adaptation. In Proceedings of NIPS, pages 505-513, 2011.
|
| 415 |
+
P. D. Tao and L. T. H. An. Convex analysis approach to DC programming: theory, algorithms and applications. Acta Mathematica Vietnamica, 22(1):289-355, 1997.
|
| 416 |
+
P. D. Tao and L. T. H. An. A DC optimization algorithm for solving the trust-region subproblem. SIAM Journal on Optimization, 8(2):476-505, 1998.
|
| 417 |
+
A. Torralba and A. A. Efros. Unbiased look at dataset bias. In CVPR, pages 1521-1528, 2011.
|
| 418 |
+
E. Tzeng, J. Hoffman, T. Darrell, and K. Saenko. Simultaneous deep transfer across domains and tasks. In Proceedings of ICCV, pages 4068-4076, 2015.
|
| 419 |
+
T. Van Erven and P. Harremos. Rényi divergence and Kullback-Leibler divergence. IEEE Transactions on Information Theory, 60(7):3797-3820, 2014.
|
| 420 |
+
B. Wang, J. Mendez, M. Cai, and E. Eaton. Transfer learning via minimizing the performance gap between domains. In Proceedings of NIPS, pages 10645-10655, 2019a.
|
| 421 |
+
T. Wang, X. Zhang, L. Yuan, and J. Feng. Few-shot adaptive faster r-cnn. In Proceedings of CVPR, pages 7173-7182, 2019b.
|
| 422 |
+
|
| 423 |
+
J. Wen, R. Greiner, and D. Schuurmans. Domain aggregation networks for multi-source domain adaptation. arXiv preprint arXiv:1909.05352, 2019.
|
| 424 |
+
R. Xu, Z. Chen, W. Zuo, J. Yan, and L. Lin. Deep cocktail network: Multi-source unsupervised domain adaptation with category shift. In Proceedings of CVPR, pages 3964-3973, 2018.
|
| 425 |
+
Z. Xu, W. Li, L. Niu, and D. Xu. Exploiting low-rank structure from latent domains for domain generalization. In ECCV, volume 8691, pages 628-643, 2014.
|
| 426 |
+
J. Yang, R. Yan, and A. G. Hauptmann. Cross-domain video concept detection using adaptive svms. In ACM Multimedia, pages 188-197, 2007.
|
| 427 |
+
K. Zhang, M. Gong, and B. Schölkopf. Multi-source domain adaptation: A causal view. In AAAI, pages 3150-3157, 2015.
|
| 428 |
+
H. Zhao, S. Zhang, G. Wu, J. M. Moura, J. P. Costeira, and G. J. Gordon. Adversarial multiple source domain adaptation. In Proceedings of NIPS, pages 8559-8570, 2018.
|
adiscriminativetechniqueformultiplesourceadaptation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7df8a63349fc9bd41af177607b62fd653d92e550f2f274b16360717de050afc3
|
| 3 |
+
size 387858
|
adiscriminativetechniqueformultiplesourceadaptation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5184226cf81713485ae7f15fa795c6b22c08c70f4942b1737d12e723e21c76e0
|
| 3 |
+
size 610175
|
adistributiondependentanalysisofmetalearning/6db6afa5-a197-40ad-a97b-84bf3b3a92f4_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08d98d9156e0d5099b3679cfe166002deca157be68547c70145bf5e3103754c2
|
| 3 |
+
size 88039
|
adistributiondependentanalysisofmetalearning/6db6afa5-a197-40ad-a97b-84bf3b3a92f4_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9dd8b6eaeb462986364f6d05c0e1d5433bd97c683c3c28723e60117fc42db88
|
| 3 |
+
size 100593
|
adistributiondependentanalysisofmetalearning/6db6afa5-a197-40ad-a97b-84bf3b3a92f4_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:251d5641c79a8c216f65d3eeda2534a31e5098769918589885879023e7a3b5f3
|
| 3 |
+
size 684320
|
adistributiondependentanalysisofmetalearning/full.md
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Distribution-Dependent Analysis of Meta-Learning
|
| 2 |
+
|
| 3 |
+
Mikhail Konobeev<sup>1</sup> Ilja Kuzborskij<sup>2</sup> Csaba Szepesváří<sup>1,2</sup>
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
A key problem in the theory of meta-learning is to understand how the task distributions influence transfer risk, the expected error of a metalearner on a new task drawn from the unknown task distribution. In this paper, focusing on fixed design linear regression with Gaussian noise and a Gaussian task (or parameter) distribution, we give distribution-dependent lower bounds on the transfer risk of any algorithm, while we also show that a novel, weighted version of the so-called biased regularized regression method is able to match these lower bounds up to a fixed constant factor. Notably, the weighting is derived from the covariance of the Gaussian task distribution. Altogether, our results provide a precise characterization of the difficulty of meta-learning in this Gaussian setting. While this problem setting may appear simple, we show that it is rich enough to unify the "parameter sharing" and "representation learning" streams of meta-learning; in particular, representation learning is obtained as the special case when the covariance matrix of the task distribution is unknown. For this case we propose to adopt the EM method, which is shown to enjoy efficient updates in our case. The paper is completed by an empirical study of EM. In particular, our experimental results show that the EM algorithm can attain the lower bound as the number of tasks grows, while the algorithm is also successful in competing with its alternatives when used in a representation learning context.
|
| 8 |
+
|
| 9 |
+
# 1. Introduction
|
| 10 |
+
|
| 11 |
+
In meta-learning, a learner uses data from past tasks in an attempt to speed up learning on future tasks. Whether a speedup is possible depends on whether the new task is
|
| 12 |
+
|
| 13 |
+
"similar" to the previous ones. In the formal framework of statistical meta-learning of Baxter (2000), the learner is given a sequence of training "sets". The data in each set is independently sampled from an unknown distribution specific to the set, or task, while each such task distribution is independently sampled from an unknown meta-distribution, which we shall just call the environment. The learner's transfer risk then is its expected prediction loss on a target task freshly sampled from the environment. Can a learner achieve smaller transfer risk by using data from the possibly unrelated tasks? What are the limits of reducing transfer risk?
|
| 14 |
+
|
| 15 |
+
As an instructive example, consider a popular approach where each of the $n$ tasks is associated with ground truth parameters $\theta_{i} \in \mathbb{R}^{d}$ , each of which is assumed to lie close to an unknown vector $\alpha$ that characterizes the environment. To estimate the unknown parameter vector of the last task, one possibility is to employ biased regularization (Yang et al., 2007; Kuzborskij & Orabona, 2013; Pentina & Lampert, 2014), that is, solve the optimization problem
|
| 16 |
+
|
| 17 |
+
$$
|
| 18 |
+
\min _ {\boldsymbol {\theta}} \left\{\hat {\mathcal {L}} _ {n} (\boldsymbol {\theta}) + \frac {\lambda}{2} \| \boldsymbol {\theta} - \hat {\boldsymbol {\alpha}} \| ^ {2} \right\}
|
| 19 |
+
$$
|
| 20 |
+
|
| 21 |
+
where $\hat{\mathcal{L}}_n(\cdot)$ is the empirical loss on the $n$ th task, $\lambda > 0$ is a regularization parameter that governs the strength of the regularization term that biases the solution towards $\hat{\alpha}$ , an estimate of $\alpha$ . Here, $\hat{\alpha}$ could be obtained, for example, by averaging parameters estimated on previous tasks (Denevi et al., 2018). This procedure implements the maxim "learn on a new task, but stay close to what is already learned", which is the basis of many successful meta-learning algorithms, including the above, and MAML (Finn et al., 2017).
|
| 22 |
+
|
| 23 |
+
Early theoretical work in the area focused on studying the generalization gap, which is the difference between the transfer risk and its empirical counterpart. Maurer (2005) gives an upper bound on this gap for a concrete algorithm which is similar to the biased regularization approach discussed above. While these bounds are reassuring, they need further work to fully quantify the benefit of meta-learning, i.e., the gap between the risk of a standard (non-meta) learner and the transfer risk of a meta-learner. Numerous other works have shown bounds on the generalization gap when using biased regularization, in one-shot learning (Kuzborskij & Orabona, 2016), meta-learning (Pentina
|
| 24 |
+
|
| 25 |
+
& Lampert, 2014), and sequential learning of tasks (Denevi et al., 2018; 2019; Khodak et al., 2019a;b; Finn et al., 2019). While some of these works introduced a dependence on the environment distribution, or on the "regularity" of the sequence of tasks as appropriate, they still leave open the question whether the shown dependence is best possible.
|
| 26 |
+
|
| 27 |
+
In summary, the main weakness of the cited literature is the lack of (problem dependent) lower bounds: To be able to separate "good" meta-learning methods from "poor" ones, one needs to know the best achievable performance in a given problem setting. In learning theory, the most often used lower bounds are distribution-free or problem independent. In the context of meta learning, the distribution refers to the distribution over the tasks, or the environment. The major limitation of a distribution-free approach is that if the class of environments is sufficiently rich, all that the bound will tell us is that the best standard learner will have similar performance to that of the best meta-learner since the worst-case environment will be one where the tasks are completely unrelated. As an example, for a linear regression setting with $d$ -dimensional parameter vectors, Lucas et al. (2021) gives the worst-case lower bound $\Omega(d / ((2r)^{-d}M + m))$ for parameter identification where the error is measured in the squared Euclidean distance. Here, $M$ is the total number of data points in the identically-sized training sets, $m$ is the number of data points in the training set of the target task, and $r \geq 1$ is the radius of the ball that contains the parameter vectors. $^{1}$ It follows that as $r \to \infty$ , the lower bound reduces to that of linear regression and we see that any method that ignores the tasks is competitive with the best meta-learning method. The pioneering works of Maurer (2009); Maurer et al. (2016) avoid this pathology by introducing empirical quantities that capture task relatedness in the context of linear regression with a common low-dimensional representation.
|
| 28 |
+
|
| 29 |
+
The bounds can be refined and the pathological limit can be avoided by restricting the set of environments. This approach is taken by Du et al. (2020) and Tripuraneni et al. (2020) who also consider linear regression where the tasks share a common low-dimensional representation. Their main results show that natural algorithms can take advantage of this extra structure. In addition, Tripuraneni et al. (2020) also shows a lower bound on the transfer risk which is matched by their method up to logarithmic factors and problem dependent "conditioning" constants.
|
| 30 |
+
|
| 31 |
+
This result is stated in Theorem 5 in their paper and the setting is a meta linear regression. For readability, we dropped some constants, such as label noise variance and slightly generalized the cited result by introducing $r$ , which is taken to be $r = 1$ in their paper. Indeed, the analysis in the paper is not hard to modify to get the dependence shown on $r$ .
|
| 32 |
+
|
| 33 |
+
Our contributions. In the present paper we revisit the framework underlying biased regularized regression. In particular, we propose to study the case when the unknown parameter vectors for the tasks are generated from a normal distribution with some mean and covariance matrix. First, we consider the case when the mean is unknown while the covariance matrix is known. For this case, in the context of fixed-design linear regression, we prove distribution-dependent lower and upper bounds, which essentially match each other. The lower bound is a direct lower limit on the transfer risk of any meta-learning method. The upper bound is proven for a version of a weighted biased regularized least-squares regression. Here, the parameters are biased towards the maximum likelihood estimate of the unknown common mean of the task parameter vectors, and the weighting is done with respect to the inverse covariance matrix of the distribution over the task parameter vectors. We show that the maximum likelihood estimator can be efficiently computed, which implies that the entire procedure is efficient. As opposed to the work of Tripuraneni et al. (2020), the gap between the lower and upper bounds is a universal constant, regardless of the other parameters of the meta-learning task. The matching lower and upper bounds together provide a precise and fine-grained characterization of the benefits of meta-learning. Our algorithm shows how one should combine datasets of different cardinalities and suggest specific ways of tuning biased regularized regression based on the noise characteristics of the data and the task structure. Our lower bounds are based on a rigorously proven novel observation, which may be of interest on its own. According to this observation, any predictor can be treated as a plug-in method that first estimates the unknown task distribution parameters. Hence, to prove a lower bound for the transfer risk, it suffices to do so for plug-in estimators.
|
| 34 |
+
|
| 35 |
+
In the last part of the paper we consider the case when the covariance matrix of the task parameter vector distribution is unknown. Importantly, this case can be seen as a way of unifying the representation learning stream of meta-learning with the parameter sharing stream. In particular, if the covariance matrix is such that $d - s$ of its eigenvalues tend to zero, while the other eigenvalues $s$ are allowed to take on arbitrarily large values, the problem becomes essentially the same as the representation learning problem of Du et al. (2020); Tripuraneni et al. (2020).
|
| 36 |
+
|
| 37 |
+
While we provide no theoretical analysis for this case, we give a detailed description of how the Expectation-Maximization (EM) algorithm can be used to tackle this problem. In particular, we show that in this special case the EM algorithm enjoys an efficient implementation: we show how to implement the iterative steps in the loop of the EM algorithm in an efficient way. The steps of this algorithm are given as closed-form expressions, which are both intuitive and straightforward to implement. We demonstrate
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 1. Examples of predictions on the synthetic, 'Fourier' meta-learning problem. Training data is shown in bold, small dots show test data. We also show the predictions for two learners (at every input) and the target function. The column corresponds to outputs obtained training on $n \in \{10, 50, 100\}$ tasks. Our new algorithm, EM learner, performs quite well.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
the effectiveness of the resulting procedure on a number of synthetic and real benchmarks; Fig. 1 shows an example on a synthetic benchmark problem, comparing our EM algorithm with the earlier cited (unweighted) "biased regression" procedure. As can be seen from the figure, the EM based learner is significantly more effective. Further experiments suggest that the EM learner is almost as effective as the optimal biased weighted regularized regression procedure that is given the unknown parameters. We found that the EM learner is also competitive as a representation learning algorithm by comparing it to the algorithm of Tripuraneni et al. (2020) that is based on the "method-of-moments" technique.
|
| 47 |
+
|
| 48 |
+
# 2. Setup
|
| 49 |
+
|
| 50 |
+
In the statistical approach to meta-learning (Baxter, 1998; 2000) the learner observes a sequence of training tuples $\mathcal{D} = (D_i)_{i=1}^n$ , distributed according to a random sequence of task distributions $(P_i)_{i=1}^n$ , i.e. $D_i \sim P_i$ , and furthermore task distributions are sampled independently from each other from a fixed and unknown environment distribution $\mathcal{P}$ . The focus of this paper is linear regression with a fixed design and therefore each training tuple $D_i = ((x_{i,1}, Y_{i,1}), \ldots, (x_{i,m_i}, Y_{i,m_i}))$ consists of $m_i$ fixed training inputs from $\mathbb{R}^d$ and corresponding random, real-valued targets satisfying
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
Y _ {i, j} = \boldsymbol {\theta} _ {i} ^ {\top} \boldsymbol {x} _ {i, j} + \varepsilon_ {i, j}, \tag {1}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
where $\varepsilon_{i,j}\stackrel {\mathrm{iiid}}{\sim}\mathcal{N}(0,\sigma^2),\pmb {\theta}_i\stackrel {\mathrm{iiid}}{\sim}\mathcal{N}(\pmb {\alpha},\pmb {\Sigma})$
|
| 57 |
+
|
| 58 |
+
while $(\varepsilon_{i,j})_{i,j}$ and $(\pmb{\theta}_i)_i$ are also independent from each other. A meta-learning environment in this setting is thus given by $\alpha$ and the noise parameters $(\sigma^2,\Sigma)$ . Initially, we will assume that $(\sigma^2,\Sigma)$ is known, while $\alpha$ (just like $(\pmb{\theta}_i)_i$ ) is unknown. The learner observes $\mathcal{D}$ and needs to produce a prediction of the value
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
Y = \boldsymbol {\theta} _ {n} ^ {\top} \boldsymbol {x} + \varepsilon
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $\varepsilon \sim \mathcal{N}(0,\sigma^2)$ and where $\pmb{x} \in \mathbb{R}^d$ is a fixed (nonrandom) point. Our theoretical results will trivially extend to the case when the learner needs to produce predictions for a sequence of input points or a fixed distribution over these, as often considered in meta-learning literature (Denevi et al., 2018; Du et al., 2020). The (random) transfer risk of the learner is defined as
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathcal {L} (\boldsymbol {x}) = \mathbb {E} \left[ (Y - \hat {Y}) ^ {2} \Big | \mathcal {D} \right].
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
The setting described above coincides with the standard fixed-design linear regression setup for $n = 1$ and $\Sigma \rightarrow 0$ , for which the behavior of risk is well understood. In contrast, the question that meta-learning poses is whether having $n > 1$ , one can design a predictor that achieves lower risk compared to the approach that only uses the target data. Naturally, this is of a particular interest in the small sample regime when for all tasks, $m_{i} \ll n$ , that is when facing scarcity of the training data but having many tasks. Broadly speaking, this reduces to understanding the behavior of the risk in terms of the interaction between the number of tasks $n$ , their sample sizes $(m_{1},\ldots ,m_{n})$ , and the task structure given by the noise parametrization $(\sigma^2,\Sigma)$ .
|
| 71 |
+
|
| 72 |
+
# 3. Sufficiency of Meta-mean Prediction
|
| 73 |
+
|
| 74 |
+
In this section we show that there is no loss of generality in considering "plug-in" predictors that predict first the unknown meta-mean $\alpha$ . We also show that biased regularized least-squares estimator belongs to this family. We start with some general remarks and notation.
|
| 75 |
+
|
| 76 |
+
Throughout the rest of the paper, for real symmetric matrices $A$ and $B$ , we use $A \succeq B$ to indicate that the matrix $A - B$ is Positive Semi-Definite (PSD). For $\boldsymbol{x} \in \mathbb{R}^d$ and PSD matrix $A$ , we let $\| \boldsymbol{x} \|_A = \sqrt{\boldsymbol{x}^\top \boldsymbol{A}\boldsymbol{x}}$ . We use $\| \boldsymbol{x} \|$ to denote the 2-norm of $\boldsymbol{x}$ . In the following we will use matrix notation aggregating inputs, targets, and parameters over multiple tasks. In particular, let the cumulative sample size of all tasks be $M = m_{1} + \dots + m_{n}$ and introduce aggregates
|
| 77 |
+
|
| 78 |
+
for inputs and targets as follows:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\begin{array}{l} \boldsymbol {X} _ {i} = \underbrace {\left[ \begin{array}{c} \boldsymbol {x} _ {i , 1} ^ {\top} \\ \vdots \\ \boldsymbol {x} _ {i , m _ {i}} ^ {\top} \end{array} \right]} _ {m _ {i} \times d}, \boldsymbol {\Psi} = \underbrace {\left[ \begin{array}{c} \boldsymbol {X} _ {1} \\ \vdots \\ \boldsymbol {X} _ {n} \end{array} \right]} _ {M \times d}, \boldsymbol {Y} _ {i} = \underbrace {\left[ \begin{array}{c} Y _ {i , 1} \\ \vdots \\ Y _ {i , m _ {i}} \end{array} \right]} _ {m _ {i} \times 1}, \boldsymbol {Y} = \underbrace {\left[ \begin{array}{c} \boldsymbol {Y} _ {1} \\ \vdots \\ \boldsymbol {Y} _ {n} \end{array} \right]} _ {M \times 1} \\ \boldsymbol {X} = \underbrace {\left[ \begin{array}{l l l} \boldsymbol {X} _ {1} & \ldots & \boldsymbol {0} \\ \vdots & \ddots & \vdots \\ \boldsymbol {0} & \ldots & \boldsymbol {X} _ {n} \end{array} \right]} _ {M \times n d}, \quad \boldsymbol {\Theta} = \underbrace {\left[ \begin{array}{l} \boldsymbol {\theta} _ {1} \\ \vdots \\ \boldsymbol {\theta} _ {n} \end{array} \right]} _ {n d \times 1}. \\ \end{array}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
The matrix representation allows us to compactly state the regression model simultaneously over all tasks. In particular, for the $M$ -dimensional noise vector $\varepsilon \sim \mathcal{N}(\mathbf{0}, \sigma^2\mathbf{I})$ :
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\boldsymbol {Y} = \boldsymbol {X} \boldsymbol {\Theta} + \varepsilon \quad \Leftrightarrow \quad \boldsymbol {Y} \sim \mathcal {N} (\Psi \boldsymbol {\alpha}, \boldsymbol {K}) \tag {2}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $\alpha$ is a meta-mean of model (1) and $K$ is the marginal covariance matrix defined as $\pmb{K} = \pmb{X}(\pmb{I} \otimes \pmb{\Sigma})\pmb{X}^{\top} + \sigma^{2}\pmb{I}$ where $\otimes$ stands for the Kronecker product. Note that the above equivalence comes from a straightforward observation that a linear map $\mathbf{X}_i$ applied to the Gaussian r.v. $\theta_i$ is itself Gaussian with mean $\mathbb{E}[\mathbf{Y}_i] = \mathbf{X}_i\mathbb{E}[\pmb{\theta}_i] = \mathbf{X}_i\pmb{\alpha}$ and covariance $\mathbf{X}_i\pmb{\Sigma}\mathbf{X}_i^T + \sigma^2\mathbf{I}$ which follows from the property that for any random vector $\xi$ with covariance matrix $\pmb{C}$ , and matrix $\mathbf{A}$ of appropriate dimensions, covariance matrix of $\mathbf{A}\xi$ is $\mathbf{ACA}^{\top}$ , ultimately giving Eq. (2).
|
| 91 |
+
|
| 92 |
+
# 3.1. Plug-In Predictors and their Sufficiency
|
| 93 |
+
|
| 94 |
+
Both our lower and upper bounds will be derived from analyzing a family of "plug-in" predictors that aim to estimate $\theta_{n}$ through estimating $\alpha$ . As we shall see, weighted biased regularization is also member of this family.
|
| 95 |
+
|
| 96 |
+
The said family is motivated by applying the well-known bias-variance decomposition to the risk of an arbitrary predictor $A: \operatorname{supp}(P_1) \times \dots \times \operatorname{supp}(P_n) \times \mathbb{R}^d \to \mathbb{R}$ . Namely,
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array}{l} \mathcal {L} (\boldsymbol {x}) = \mathbb {E} \left[ (Y - A (\mathcal {D}, \boldsymbol {x})) ^ {2} \mid \mathcal {D} \right] \\ = \mathbb {E} \left[ \left(\mathbb {E} [ Y \mid \mathcal {D} ] - A (\mathcal {D}, \boldsymbol {x})\right) ^ {2} + \mathbb {V} [ Y \mid \mathcal {D} ] \Bigg | \mathcal {D} \right] \\ \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
where we used the law of total expectation and the fact that for any r.v. $\xi$ , $\mathbb{E}[\xi^2] = \mathbb{E}[\xi]^2 + \mathbb{V}[\xi]$ . Since the variance term does not depend on $A$ , it follows that the prediction problem reduces to predicting the posterior mean $\mathbb{E}[Y|\mathcal{D}]$ , which, in our setting, can be given in closed form:
|
| 103 |
+
|
| 104 |
+
Proposition 3.1. Let $Y = \pmb{\theta}_n^\top \pmb{x} + \varepsilon$ for $\varepsilon \sim \mathcal{N}(0, \sigma^2)$ and some $\pmb{x} \in \mathbb{R}^d$ . Then,
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\begin{array}{l} \mathbb {E} [ Y \mid \mathcal {D} ] = \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \left(\boldsymbol {\Sigma} ^ {- 1} \boldsymbol {\alpha} + \frac {1}{\sigma^ {2}} \boldsymbol {X} _ {n} ^ {\top} \boldsymbol {Y} _ {n}\right) \\ w h e r e \quad \boldsymbol {\mathcal {T}} = \left(\boldsymbol {\Sigma} ^ {- 1} + \frac {1}{\sigma^ {2}} \boldsymbol {X} _ {n} ^ {\top} \boldsymbol {X} _ {n}\right) ^ {- 1}. \\ \end{array}
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
Proof. See Appendix A.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
|
| 114 |
+
Since the only unknown parameter here is the meta-mean $\alpha$ , we expect that good predictors will just estimate the meta-mean and use the above formula. That is, these predictors take the form $(\mathcal{D},\boldsymbol{x})\mapsto \boldsymbol{x}^{\top}\hat{\boldsymbol{\theta}}_n(\boldsymbol {\alpha}(\mathcal{D},\boldsymbol {x}))$ , where
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\hat {\boldsymbol {\theta}} _ {n} (\boldsymbol {a}) = \boldsymbol {\mathcal {T}} \left(\boldsymbol {\Sigma} ^ {- 1} \boldsymbol {a} + \frac {1}{\sigma^ {2}} \boldsymbol {X} _ {n} ^ {\top} \boldsymbol {Y} _ {n}\right) \quad \boldsymbol {a} \in \mathbb {R} ^ {d}, \tag {3}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
giving our family of plug-in predictors. In fact, there is no loss in generality by considering only predictors of the above form. Indeed, given some predictor $A$ and $\pmb{x} \neq \mathbf{0}$ , we can solve $A(\mathcal{D},\pmb{x}) = \pmb{x}^{\top}\hat{\pmb{\theta}}_n(\pmb{\alpha})$ for $\pmb{\alpha}$ . One solution is given by $\pmb{\alpha}(\mathcal{D},\pmb{x}) = \pmb{\Sigma}\pmb{T}^{-1}\pmb{x}c$ where $c = \frac{1}{\|\pmb{x}\|^2}\left(A(\mathcal{D},\pmb{x}) - \sigma^{-2}\pmb{x}^{\top}\pmb{T}\pmb{X}_n^{\top}\pmb{Y}_n\right)$ . Hence, to prove a lower bound for any regressor $A$ , it will be enough to prove it for algorithms that estimate $\pmb{\alpha}$ .
|
| 121 |
+
|
| 122 |
+
One special estimator of $\alpha$ is the Maximum Likelihood Estimator (MLE) estimator, and, thanks to (2), can be obtained via $\hat{\alpha}^{\mathrm{MLE}} = \arg \max_{\boldsymbol{a}\in \mathbb{R}^d}\ln p^{\mathrm{G}}(\boldsymbol {Y};\boldsymbol {\Psi}\boldsymbol {a},\boldsymbol {K})$ , where $p^{\mathrm{G}}(\boldsymbol {x};\boldsymbol {\mu},\boldsymbol {\Sigma})\propto e^{-\frac{1}{2}\| \boldsymbol {x} - \boldsymbol {\mu}\|_{\Sigma^{-1}}^{2}}$ is a Gaussian PDF. Some standard calculations give us
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\hat {\boldsymbol {\alpha}} ^ {\mathrm {M L E}} = \left(\boldsymbol {\Psi} ^ {\top} \boldsymbol {K} ^ {- 1} \boldsymbol {\Psi}\right) ^ {- 1} \boldsymbol {\Psi} ^ {\top} \boldsymbol {K} ^ {- 1} \boldsymbol {Y}. \tag {4}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
# 3.2. Weighted Biased Regularization
|
| 129 |
+
|
| 130 |
+
Biased regularization is a popular transfer learning technique which commonly appears in the regularized formulations of the empirical risk minimization problems, where one aims at minimizing the empirical risk (such as the mean squared error) while forcing the solution to stay close to some bias variable $\pmb{b}$ . Here we consider the Weighted Biased Regularized Least Squares (WBRLS) formulation defined w.r.t. bias $\pmb{b}$ and some PSD matrix $\Gamma$ :
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\hat {\boldsymbol {\theta}} _ {n} ^ {\mathrm {W B R L S}} = \underset {\boldsymbol {\theta} \in \mathbb {R} ^ {d}} {\arg \min } \left\{\hat {\mathcal {L}} _ {n} (\boldsymbol {\theta}) + \frac {\lambda}{2} \| \boldsymbol {\theta} - \boldsymbol {b} \| _ {\Gamma} ^ {2} \right\}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\text {w h e r e} \quad \hat {\mathcal {L}} _ {n} (\boldsymbol {\theta}) = \sum_ {j = 1} ^ {m _ {n}} \left(Y _ {n, j} - \boldsymbol {\theta} ^ {\top} \boldsymbol {x} _ {n, j}\right) ^ {2}.
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
Remarkably, an estimate $\hat{\pmb{\theta}}_n^{\mathrm{WBRLS}}$ produced by WBRLS is equivalent to estimator $\hat{\pmb{\theta}}_n(\hat{\pmb{\alpha}})$ of Eq. (3) for the choice of $\pmb {b} = \hat{\pmb{\alpha}},\pmb {\Gamma} = \pmb{\Sigma}^{-1}$ , and $\lambda = \sigma^2$ . Thus, WBRLS is a special member of the family chosen in the previous section.
|
| 141 |
+
|
| 142 |
+
To see the equivalence, owing to the convenient least-squares formulation, we observe that
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\hat {\boldsymbol {\theta}} _ {n} ^ {\mathrm {W B R L S}} = \left(\boldsymbol {X} _ {n} ^ {\top} \boldsymbol {X} _ {n} + \lambda \boldsymbol {\Gamma}\right) ^ {- 1} \left(\boldsymbol {X} _ {n} ^ {\top} \boldsymbol {Y} _ {n} + \lambda \boldsymbol {\Gamma} \boldsymbol {b}\right)
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
and from here the equivalence follows by substitution. A natural question commonly arising in such formulations is how to set the bias term $\pmb{b}$ . One choice can be $\pmb{b} = \hat{\alpha}^{\mathrm{MLE}}$ and in the following we will see that it is an optimal one.
|
| 149 |
+
|
| 150 |
+
# 4. Problem-Dependent Bounds
|
| 151 |
+
|
| 152 |
+
We now present our main results, which are essentially matching lower and upper bounds. The upper bounds concern the parameter estimator that uses the MLE estimate of $\alpha$ , while the lower bounds apply to any method. We also present a more precise lower bound that applies to estimators that are built on unbiased meta-mean estimators $\hat{\alpha}$ . As we shall see that plug-in predictors based on MLE will exactly match this lower bound. The general lower bounds are also quite precise: They differ from this lower bound only by a (relatively small) universal constant. We also give a high-probability variant of the same general lower bound.
|
| 153 |
+
|
| 154 |
+
Theorem 4.1. Let $\pmb{x} \in \mathbb{R}^d$ and consider the linear regression model (1). Let $\hat{\alpha}$ be any unbiased estimator of $\alpha$ based on $\mathcal{D}$ . Then the transfer risk $\mathcal{L}(\pmb{x})$ of the predictor that predicts $\hat{Y} = \pmb{x}^\top \hat{\theta}_n(\hat{\alpha})$ satisfies
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\mathbb {E} [ \mathcal {L} (\boldsymbol {x}) ] \geq \boldsymbol {x} ^ {\top} M \boldsymbol {x} + \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {x} + \sigma^ {2} \tag {5}
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
where $M = \mathcal{T}\Sigma^{-1}(\Psi^{\top}K^{-1}\Psi)^{-1}\Sigma^{-1}\mathcal{T}$
|
| 161 |
+
|
| 162 |
+
Moreover, for all predictors we have
|
| 163 |
+
|
| 164 |
+
$$
|
| 165 |
+
\mathbb {E} [ \mathcal {L} (\boldsymbol {x}) ] \geq \frac {\boldsymbol {x} ^ {\top} M \boldsymbol {x}}{1 6 \sqrt {e}} + \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {x} + \sigma^ {2}. \tag {6}
|
| 166 |
+
$$
|
| 167 |
+
|
| 168 |
+
Finally, for any $\delta \in (0,1)$ , with probability at least $1 - \delta$ for all predictors we have
|
| 169 |
+
|
| 170 |
+
$$
|
| 171 |
+
\mathcal {L} (\boldsymbol {x}) \geq \frac {1}{2} \log \left(\frac {1}{4 (1 - \delta)}\right) \boldsymbol {x} ^ {\top} M \boldsymbol {x} + \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {x} + \sigma^ {2}.
|
| 172 |
+
$$
|
| 173 |
+
|
| 174 |
+
Proof. The main ideas of the proof are in Section 4.2, while the complete proof is given in Appendix B. $\square$
|
| 175 |
+
|
| 176 |
+
Note that the presented bounds are problem-dependent since they depend on a concrete task structure of the environment characterized by $(\Sigma, \sigma^2)$ . While the strength of the above bound is its generality, this generality makes the interpretation of the result challenging. We return to the interpretation of this result momentarily, after presenting results for the transfer risk for the plug-in method that uses the (unbiased) MLE meta-mean estimator $\hat{\alpha}^{\mathrm{MLE}}$ defined in Eq. (4).
|
| 177 |
+
|
| 178 |
+
Theorem 4.2. For the estimator $\hat{\theta}_n(\hat{\alpha}^{\mathrm{MLE}})$ and for any $\pmb{x}\in \mathbb{R}^{d}$ we have
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\mathbb {E} [ \mathcal {L} (\boldsymbol {x}) ] = \boldsymbol {x} ^ {\top} \boldsymbol {M} \boldsymbol {x} + \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {x} + \sigma^ {2}. \tag {7}
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
Moreover for the same estimator, with probability at least $1 - \delta, \delta \in (0, 1)$ we have
|
| 185 |
+
|
| 186 |
+
$$
|
| 187 |
+
\mathcal {L} (\boldsymbol {x}) \leq 2 \log \left(\frac {2}{\delta}\right) \boldsymbol {x} ^ {\top} \boldsymbol {M} \boldsymbol {x} + \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {x} + \sigma^ {2}.
|
| 188 |
+
$$
|
| 189 |
+
|
| 190 |
+
Proof. See Appendix C.
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
|
| 194 |
+
Note that Eq. (7) is an equality for the transfer risk and it matches the lower bound available for unbiased estimators. This result, together with our lower bound shows that $(i)$ the predictors based on $\hat{\alpha}^{\mathrm{MLE}}$ is optimal, with matching constant within the set of predictors that is based on unbiased estimators of $\alpha$ . It also follows that $(ii)$ apart from a constant factor of $16\sqrt{e}$ of the transfer risk, this predictor is also optimal among all predictors.
|
| 195 |
+
|
| 196 |
+
# 4.1. Interpretation of the Results
|
| 197 |
+
|
| 198 |
+
The following two corollaries specialize the lower bound of Theorem 4.1 in a way that will make the results more transparent. Note that while we give these simplified expressions for the lower bound (specifically, Eq. (6)), these expressions also remain essentially true for the upper bound for the MLE estimator, since these differ only in minor details. The proofs of both corollaries are given in Appendix F.
|
| 199 |
+
|
| 200 |
+
Both specializations are concerned with the case when the inputs are isotropic, meaning that the input covariance matrix of task $i$ is $\frac{m_i}{d} I$ .
|
| 201 |
+
|
| 202 |
+
In the first result, in addition, we assume a spherical task structure: $\pmb{\Sigma} = \tau^{2}\pmb{I}$ . Thus, the coordinates of the parameter vectors $\theta_{i}$ are uncorrelated and share the same variance $\tau^2$ .
|
| 203 |
+
|
| 204 |
+
Corollary 4.3. Assume the same as in case of Eq. (6). In addition, let $\boldsymbol{\Sigma} = \tau^{2}\boldsymbol{I}$ , suppose that $\mathbf{X}_i^\top \mathbf{X}_i = \frac{m_i}{d}\mathbf{I}$ , and let $\| \mathbf{x}\| = 1$ . Then,
|
| 205 |
+
|
| 206 |
+
$$
|
| 207 |
+
\frac {\mathbb {E} [ \mathcal {L} (\boldsymbol {x}) ] - \sigma^ {2}}{\sigma^ {2}} \geq \frac {H _ {\tau^ {2}}}{1 6 \sqrt {e}} \cdot \frac {d ^ {2} \sigma^ {2}}{n \left(\tau^ {2} m _ {n} + d \sigma^ {2}\right) ^ {2}} + \frac {d \tau^ {2}}{\tau^ {2} m _ {n} + d \sigma^ {2}},
|
| 208 |
+
$$
|
| 209 |
+
|
| 210 |
+
where $H_{z}$ is a harmonic mean of a sequence $(z + \frac{d\sigma^2}{m_i})_{i = 1}^n$
|
| 211 |
+
|
| 212 |
+
In the above bound the first term vanishes as more tasks are added ( $n$ growing). On the other hand, to decrease the second term, $m_{n}$ needs to increase. In particular, as $n \to \infty$ , we get
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
\frac {\mathbb {E} [ \mathcal {L} (\boldsymbol {x}) ] - \sigma^ {2}}{\sigma^ {2}} \geq \left(\frac {m _ {n}}{d} + \frac {\sigma^ {2}}{\tau^ {2}}\right) ^ {- 1} \tag {8}
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
where $\frac{m_n}{d} + \frac{\sigma^2}{\tau^2}$ can be interpreted as an effective sample size. Thus, while having infinitely many previous tasks have the potential to reduce the loss, the size of this effect is fixed and is related to the noise variance ratios. If $\tau^2 \to 0$ , having infinitely many tasks will allow perfect prediction, but for any $\tau^2 > 0$ , there is a limit on how much the data of previous tasks can help. Finally, for the case $n = 1$ and $\tau^2 = 0$ we recover the standard lower bound for linear setting $\mathbb{E}[\mathcal{L}(\pmb{x})] - \sigma^2 = \Omega (d\sigma^2 / m_1)$ .
|
| 219 |
+
|
| 220 |
+
Our next result is concerned with "representation learning", which corresponds to the case when $\Sigma$ is a low rank PSD matrix.
|
| 221 |
+
|
| 222 |
+
Corollary 4.4. Let the inputs be isotropic as before and $\| \pmb{x}\| = 1$ . Moreover, let $\pmb{\Sigma}$ be a PSD matrix of rank $s \leq d$ with eigenvalues $\lambda_1 \geq \ldots \geq \lambda_s > 0$ , and suppose that $\| \pmb{x}\|_{P_s^\top P_s}^2 = s / d$ where $\pmb{P}_s = [\pmb{u}_1, \dots, \pmb{u}_s]^\top$ and $(\pmb{u}_j)_{j=1}^s$ are unit length eigenvectors of $\pmb{\Sigma}$ . Then,
|
| 223 |
+
|
| 224 |
+
$$
|
| 225 |
+
\frac {\mathbb {E} [ \mathcal {L} (\pmb {x}) ] - \sigma^ {2}}{\sigma^ {2}} \geq \frac {H _ {\lambda_ {s}}}{1 6 \sqrt {e}} \cdot \frac {s d \sigma^ {2}}{n (\lambda_ {1} m _ {n} + d \sigma^ {2}) ^ {2}} + \frac {s \lambda_ {s}}{\lambda_ {s} m _ {n} + d \sigma^ {2}}.
|
| 226 |
+
$$
|
| 227 |
+
|
| 228 |
+
Note that the first term on the right-hand side of the last display scales with $sd / n$ , where $sd$ is the number of parameter in a matrix that would give the low-dimensional representation and the second term scales with $s / m_{n}$ for $m_{n} \gg d\sigma^{2} / \lambda_{s}$ . Somewhat surprisingly (given that here $\Sigma$ is known), these essentially match the upper bounds due to Du et al. (2020); Tripuraneni et al. (2020), implying that their results are unimprovable.
|
| 229 |
+
|
| 230 |
+
# 4.2. Proof Sketches
|
| 231 |
+
|
| 232 |
+
Our lower and upper bounds on the risk are based on an identity that holds for the transfer risk of plug-in methods. The identity is essentially a bias-variance decomposition.
|
| 233 |
+
|
| 234 |
+
Lemma 4.5. For $\hat{\theta}_n(\hat{\alpha})$ defined in Eq. (3), any task mean estimator $\hat{\alpha}$ , and any $\pmb{x} \in \mathbb{R}^d$ we have $\mathbb{E}[\mathcal{L}(\pmb{x})] = \mathbb{E}\left[(\pmb{x}^\top \pmb{T}\pmb{\Sigma}^{-1}(\pmb{\alpha} - \hat{\alpha}))^2\right] + \pmb{x}^\top \pmb{T}\pmb{x} + \sigma^2$ .
|
| 235 |
+
|
| 236 |
+
For the proof of this lemma we need the following proposition whose proof is given in Appendix A:
|
| 237 |
+
|
| 238 |
+
Proposition 4.6. Let $Y = \theta_{n}^{\top}\pmb{x} + \varepsilon$ for $\varepsilon \sim \mathcal{N}(0,\sigma^{2})$ and some $\pmb{x} \in \mathbb{R}^{d}$ . Then, $\mathbb{E}[Y|\mathcal{D}] = \pmb{x}^{\top}\pmb{\mathcal{T}}\left(\pmb{\Sigma}^{-1}\pmb{\alpha} + \frac{1}{\sigma^{2}}\pmb{X}_{n}^{\top}\pmb{Y}_{n}\right)$ and $\mathbb{V}[Y|\mathcal{D}] = \pmb{x}^{\top}\pmb{\mathcal{T}}\pmb{x} + \sigma^{2}$ .
|
| 239 |
+
|
| 240 |
+
Proof of Lemma 4.5. Using the law of total expectation and that for a r.v. $\xi$ we have $\mathbb{E}[\xi^2] = \mathbb{E}[\xi]^2 + \mathbb{V}[\xi]$ ,
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
\begin{array}{l} \mathcal {L} (\boldsymbol {x}) = \mathbb {E} \left[ (Y - \hat {\boldsymbol {\theta}} _ {n} (\hat {\boldsymbol {\alpha}}) ^ {\top} \boldsymbol {x}) ^ {2} \mid \mathcal {D} \right] \\ = \mathbb {E} \left[ \left(\mathbb {E} [ Y \mid \mathcal {D} ] - \hat {\boldsymbol {\theta}} _ {n} (\hat {\boldsymbol {\alpha}}) ^ {\top} \boldsymbol {x}\right) ^ {2} + \mathbb {V} [ Y \mid \mathcal {D} ] \mid \mathcal {D} \right] \\ = \mathbb {E} \left[ \left(\boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {\Sigma} ^ {- 1} (\boldsymbol {\alpha} - \hat {\boldsymbol {\alpha}})\right) ^ {2} \mid \mathcal {D} \right] + \boldsymbol {x} ^ {\top} \boldsymbol {\mathcal {T}} \boldsymbol {x} + \sigma^ {2}, \\ \end{array}
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
where identities for $\mathbb{E}[Y\mid \mathcal{D}]$ and $\mathbb{V}[Y\mid \mathcal{D}]$ come from Proposition 4.6 and identity for $\hat{\pmb{\theta}}_n(\hat{\pmb{\alpha}})$ is due to (3).
|
| 247 |
+
|
| 248 |
+
Thus, to establish universal lower bounds we need to lower bound $\mathbb{E}\left[\left(\boldsymbol{x}^{\top}\boldsymbol{\mathcal{T}}\boldsymbol{\Sigma}^{-1}(\boldsymbol{\alpha}-\hat{\boldsymbol{\alpha}})\right)^{2}\right]$ for any choice of estimator $\hat{\alpha}$ , which in combination with Lemma 4.5 will prove Theorem 4.1. Here, relying on the Cramér-Rao inequality (Theorem B.1), we only prove a lower bound for unbiased estimators, while the general case, whose proof uses Le Cam's method, is left to Appendix B.2.
|
| 249 |
+
|
| 250 |
+
Lemma 4.7. For any unbiased estimator $\hat{\alpha}$ of $\alpha$ in Eq. (2) we have $\mathbb{E}\left[\left(\boldsymbol{x}^{\top}\boldsymbol{T}\boldsymbol{\Sigma}^{-1}(\boldsymbol{\alpha} - \hat{\boldsymbol{\alpha}})^{2}\right)\right] \geq \boldsymbol{x}^{\top}\boldsymbol{M}\boldsymbol{x}$ .
|
| 251 |
+
|
| 252 |
+
Proof. Recall that according to the equivalence (2), $\mathbf{Y} \sim \mathcal{N}(\Psi \alpha, \mathbf{K})$ and the unknown parameter is $\alpha$ . To compute the Fisher information matrix we first observe that $\nabla_{\alpha} \ln p^{\mathrm{G}}(\mathbf{Y}; \Psi \alpha, \mathbf{K}) = \Psi^{\top} \mathbf{K}^{-1} (\mathbf{Y} - \Psi \alpha)$ and
|
| 253 |
+
|
| 254 |
+
$$
|
| 255 |
+
\begin{array}{l} \boldsymbol {F} = \mathbb {E} \left[ \nabla_ {\boldsymbol {\alpha}} \ln p ^ {\mathrm {G}} (\boldsymbol {Y}; \boldsymbol {\Psi} \boldsymbol {\alpha}, \boldsymbol {K}) \nabla_ {\boldsymbol {\alpha}} \ln p ^ {\mathrm {G}} (\boldsymbol {Y}; \boldsymbol {\Psi} \boldsymbol {\alpha}, \boldsymbol {K}) ^ {\top} \right] \\ = \Psi^ {\top} K ^ {- 1} \mathbb {E} \left[ (Y - \Psi \alpha) (Y - \Psi \alpha) ^ {\top} \right] K ^ {- 1} \Psi \\ = \boldsymbol {\Psi} ^ {\top} \boldsymbol {K} ^ {- 1} \boldsymbol {\Psi}. \\ \end{array}
|
| 256 |
+
$$
|
| 257 |
+
|
| 258 |
+
Thus, by the Cramér-Rao inequality we have $\mathbb{E}\left[(\pmb {\alpha} - \hat{\pmb{\alpha}})(\pmb {\alpha} - \hat{\pmb{\alpha}})^{\top}\right]\succeq (\Psi^{\top}\pmb{K}^{-1}\Psi)^{-1}$ . Finally, left-multiplying by $x^{\top}\pmb {\mathcal{T}}\pmb{\Sigma}^{-1}$ and right-multiplying the above by $\pmb{\Sigma}^{-1}\pmb {\mathcal{T}}\pmb{x}$ gives us the statement.
|
| 259 |
+
|
| 260 |
+
# 5. Learning with Unknown Task Structure
|
| 261 |
+
|
| 262 |
+
So far we have assumed that parameters $(\sigma^2, \Sigma)$ characterizing the structure of environment are known, which limits the applicability of the predictor (though does not limit the lower bound). Staying within our framework, a natural idea is to estimate all the environment parameters $\mathcal{E} = (\alpha, \sigma^2, \Sigma)$ by maximizing the data marginal log-likelihood
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
J (\mathcal {D}, \mathcal {E} ^ {\prime}) = \ln \int_ {\mathbb {R} ^ {n d}} p (\mathcal {D} \mid \boldsymbol {\vartheta}) \mathrm {d} p (\boldsymbol {\vartheta} \mid \mathcal {E} ^ {\prime})
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
over $\mathcal{E}'$ , where $p(\mathcal{D}, \Theta, \mathcal{E})$ stands for the joint distribution in the model (1). The above problem is non-convex. As such, we propose to use EM procedure (Dempster et al., 1977), which is known to be a reasonable algorithm for similar settings.4 EM can be derived as a procedure that maximizes a lower bound on $J(\mathcal{D}, \mathcal{E}')$ : Jensen's inequality gives us that for any probability measure $q$ on $\mathbb{R}^{nd}$ , $J(\mathcal{D}, \mathcal{E}') \geq \int \ln \left(\frac{p(\vartheta, \mathcal{D}|\mathcal{E}')}{q(\vartheta)}\right) \mathrm{d}q(\vartheta)$ . This is then maximized in $\mathcal{E}'$ and $q$ in an alternating fashion: Letting $\hat{\mathcal{E}}_t$ to be a parameter estimate at step $t$ , we maximize the lower bound in $q$ for a fixed $\mathcal{E}' = \hat{\mathcal{E}}_t$ , and then obtain $\hat{\mathcal{E}}_{t+1}$ by maximizing the lower bound in $\mathcal{E}'$ for a fixed previously obtained solution in $q$ . Maximization in $q$ gives us $q(\vartheta) = p(\vartheta|\mathcal{D}, \hat{\mathcal{E}}_t)$ , while maximization in $\mathcal{E}'$ yields
|
| 269 |
+
|
| 270 |
+
$$
|
| 271 |
+
\hat {\mathcal {E}} _ {t + 1} \in \underset {\mathcal {E} ^ {\prime}} {\arg \max } \int \ln (p (\boldsymbol {\vartheta}, \mathcal {D} \mid \mathcal {E} ^ {\prime})) \mathrm {d} p (\boldsymbol {\vartheta} \mid \mathcal {D}, \hat {\mathcal {E}} _ {t}). \tag {9}
|
| 272 |
+
$$
|
| 273 |
+
|
| 274 |
+
After some calculations (cf. Appendix D), this gives Algorithm 1. During the E-step (lines 4-5), the algorithm computes the parameters of the posterior distribution $\mathcal{N}(\pmb{\theta}_i|\hat{\pmb{\mu}}_{t,i},\hat{\pmb{T}}_{t,i})$ relying on $\hat{\varepsilon}_t$ , and during the M-step
|
| 275 |
+
|
| 276 |
+
lines 7-9) it estimates $\hat{\mathcal{E}}_{t + 1}$ based on $(\hat{\mu}_{t,i},\hat{\mathcal{T}}_{t,i})$ .We propose to detect convergence (not shown) by checking the relative difference between successive parameter values.
|
| 277 |
+
|
| 278 |
+
Algorithm 1 EM procedure to estimate $(\alpha, \sigma^2, \Sigma)$
|
| 279 |
+
Input: Initial parameter estimates $\hat{\mathcal{E}}_1 = (\hat{\alpha}_1,\hat{\sigma}_1^2,\hat{\Sigma}_1)$
|
| 280 |
+
Output: Final parameter estimates $\hat{\mathcal{E}}_t = (\hat{\alpha}_t,\hat{\sigma}_t^2,\hat{\Sigma}_t)$
|
| 281 |
+
1: $\hat{\pmb{T}}_{1,i}\gets \mathbf{0},\hat{\pmb{\mu}}_{1,i}\gets \mathbf{0}\quad i\in [n]$
|
| 282 |
+
2: repeat
|
| 283 |
+
3: for $i = 1,\dots ,n$ do E-step
|
| 284 |
+
4: $\hat{\pmb{T}}_{t,i}\gets \left(\hat{\pmb{\Sigma}}_t^{-1} + \hat{\sigma}_t^{-2}\pmb {X}_i^\top \pmb {X}_i\right)^{-1}$
|
| 285 |
+
5: $\hat{\pmb{\mu}}_{t,i}\gets \hat{\pmb{T}}_{t,i}\left(\hat{\pmb{\Sigma}}_t^{-1}\hat{\pmb{\alpha}}_t + \hat{\sigma}_t^{-2}\pmb {X}_i^\top \pmb {Y}_i\right)$
|
| 286 |
+
6: end for
|
| 287 |
+
7: $\hat{\alpha}_{t}\gets \frac{1}{n}\sum_{i = 1}^{n}\hat{\mu}_{t,i}$ M-step
|
| 288 |
+
8: $\hat{\pmb{\Sigma}}_t\gets \frac{1}{n}\sum_{i = 1}^{n}\Bigl (\hat{\pmb{T}}_{t,i} + (\hat{\pmb{\mu}}_{t,i} - \hat{\pmb{\alpha}}_t)(\hat{\pmb{\mu}}_{t,i} - \hat{\pmb{\alpha}}_t)^\top \Bigr)$
|
| 289 |
+
9: $\hat{\sigma}_t^2\gets \frac{1}{n}\sum_{i = 1}^{n}\frac{1}{m_i}\left(\hat{\mathcal{L}}_i(\hat{\pmb{\mu}}_{t,i}) + \mathrm{tr}\left(\pmb {X}_i\hat{\pmb{T}}_{t,i}\pmb {X}_i^\top\right)\right)$
|
| 290 |
+
10: $t\gets t + 1$
|
| 291 |
+
11: until Convergence (see discussion)
|
| 292 |
+
|
| 293 |
+
# 6. Experiments
|
| 294 |
+
|
| 295 |
+
In this section we present experiments $^5$ designed to verify three hypotheses: (i) Under ideal circumstances, the predictor $\pmb{x}^{\top}\hat{\pmb{\theta}}_n(\hat{\pmb{\alpha}}^{\mathrm{MLE}})$ is superior to its alternatives, including biased, but unweighted regression; (ii) The EM-algorithm reliably recovers unknown parameters of the environment and is also suitable for representation learning; (iii) our distribution-dependent lower bound Eq. (5) is numerically sharp. In addition, we briefly report on experiments with a real-world dataset.
|
| 296 |
+
|
| 297 |
+
Baselines. We consider two non-meta-learning baselines, that is Linear Regression (All) — Ordinary Least Squares (OLS) fitted on $\mathcal{D}^{\backslash n} = (D_i)_{i=1}^{n-1}$ , which excludes the newly observed task, and Linear Regression (Task) — OLS fitted on a newly encountered task $D_n$ . Next, we consider meta-learning algorithms. We report performance of the unweighted Biased Regression procedure with bias set to the least squares solution $(\sum_{i \neq n} X_i^\top X_i)^{-1} \sum_{i \neq n} X_i^\top Y_i$ and $\lambda$ found by cross-validation (cf. Appendix E). Note that the bias and the regularization coefficient are found on $\mathcal{D}^{\backslash n}$ , while $D_n$ is used for the final fitting. EM Learner is estimator (3) with all environment parameters found by Algorithm 1 on $\mathcal{D}^{\backslash n}$ . The convergence threshold was set to $10^{-6}$ while the maximum number of iterations was set to $10^3$ . Finally, we report numerical values of Eq. (5) as Known Covariance Lower Bound. For all of the experiments we show aver
|
| 298 |
+
|
| 299 |
+
ages and standard deviations of the mean test errors computed over 30 independent runs of that experiment.
|
| 300 |
+
|
| 301 |
+
Synthetic Experiments. We conduct synthetic experiments on datasets with Fourier generated features and features sampled from a $d$ -dimensional unit sphere. In all of the synthetic experiments we have $\alpha = 0, \sigma^2 = 1$ and $\Sigma$ generated by computing $\boldsymbol{\Sigma} = \mathbf{L}\mathbf{L}^{\top} + \eta \mathbf{I}$ where $L_{ij} = \mathbb{I}\left\{i \geq j\right\} Z_{ij}$ with $Z_{ij}$ and $\eta$ sampled from the standard normal distribution. Test error is computed on 100 test tasks using 10 examples for training and 100 examples for testing.
|
| 302 |
+
|
| 303 |
+
For the Fourier-features, we sample a value $u \sim \mathcal{U}(-5, 5)$ and compute features by evaluating $d = 11$ Fourier basis functions at $u$ : $x_{j} = \mathbb{I}\{1 \leq j \leq 5\} \sin \left(\frac{j}{5} \pi u\right) + \mathbb{I}\{6 \leq j \leq 10\} \cos \left(\frac{j - 5}{5} \pi u\right) + \mathbb{I}\{j = 11\}$ , where $\mathbb{I}\{E\} = 1$ if $E$ is true and $\mathbb{I}\{E\} = 0$ otherwise. Examples of these tasks and results of meta-learning on some of these were shown in Fig. 1. In Fig. 2 we show the test errors for various meta-learners while varying the number of tasks $n$ and task sizes $m$ . For the 'spherical' data, the same is shown in Fig. 3. Here, we generate $\pmb{x}$ from a $d = 42$ dimensional unit sphere. In both experiments for sufficiently large number of training tasks the EM-based learner approaches the optimal estimator even when the number of examples per task is less than the dimensionality of that task.
|
| 304 |
+
|
| 305 |
+
In the context of the 'Fourier' dataset, we also experimented with generating low-rank $\Sigma$ , corresponding to the challenge of learning a low-dimensional representation, shared across the tasks. We found that the EM-based meta learner stays competitive in this setting. To save space, the results are presented in Appendix G.
|
| 306 |
+
|
| 307 |
+
Real Dataset Experiment. We also conducted experiments on a real world dataset containing information about students in 139 schools in years 1985-1987 (Dua & Graff, 2017, School Dataset). We adapt the dataset to a meta-learning problem with the goal to predict the exam score of students based on the student-specific and school-specific features. After one-hot encoding of the categorical values there are $d = 27$ features for each student. We randomly split schools into two subsets: The first, consisting of 100 schools, forms $\mathcal{D}^{\backslash n}$ (used for training the bias, $\lambda$ selection, and EM). The second subset consists of 39 schools, where each school is further split into $80\% / 20\%$ for the final training and testing of the meta-learners. Results are given in Fig. 4. We can see that while both Biased Regression and EM Learner outperform regression, their performance is very similar. This could be attributed to the fact that the features mostly contain weakly relevant information, which is confirmed by inspecting the coefficient vector.
|
| 308 |
+
|
| 309 |
+
Representation learning experiments I. Our next figure (Fig. 5) shows the outcomes of experiments for the Fourier task but when $\Sigma$ is low-rank. As can be seen, the EM based
|
| 310 |
+
|
| 311 |
+

|
| 312 |
+
Figure 2. Test errors on Fourier synthetic experiment with changing number of tasks $n$ and number of samples per task $m$ . When one of the parameters changes, the other one is set to 10.
|
| 313 |
+
|
| 314 |
+

|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
Figure 3. Test error on spherical synthetic experiment with changing number of tasks $n$ and number of samples per task $m$ . When one of the parameters changes, the other one is set to 40.
|
| 318 |
+
|
| 319 |
+

|
| 320 |
+
|
| 321 |
+

|
| 322 |
+
Figure 4. Test error on the School Dataset. Up to 100 schools are used for fitting environment-related parameters (see text for details) and the remaining 39 are used as the target task.
|
| 323 |
+
|
| 324 |
+
learner excels in exploiting the low-rank structure. For this experiment we have the same setup as for the Fourier experiment, but the covariance matrix $\pmb{\Sigma}$ is generated by computing $\pmb{\Sigma} = \mathbf{L}\mathbf{L}^{\top}$ where $\mathbf{L}$ is a $d\times r$ matrix with $r = \lfloor d / 2\rfloor = 5$ and elements $L_{i,j}\sim \mathcal{N}(0,1)$ . Note that in this case we can write $\theta_{i} = \mathbf{B}\boldsymbol{w}_{i}$ for some matrix $\mathbf{B}$ of size $d\times r$ and vector $\mathbf{w}_i$ of size $r$ sampled from multivariate normal
|
| 325 |
+
|
| 326 |
+
distribution. Thus, if the matrix $\mathbf{B}$ is known or estimated during training, one can project the features $\boldsymbol{x}_{i,j}$ onto a lower-dimensional space by computing $\mathbf{B}^{\top}\boldsymbol{x}_{i,j}$ to speed up the adaptation to new tasks by running least-squares regression to estimate $\boldsymbol{w}_i$ instead of $\boldsymbol{\theta}_i$ .
|
| 327 |
+
|
| 328 |
+
In addition to the baselines described in the main text, we compared EM Learner with two additional baselines: one is based on the Method of Moments (MoM) estimator from Tripuraneni et al. (2020) (not shown on the figure), and another which we refer to as Oracle Representation. We omit displaying the error of the method of moments estimator since for the features generated as in this experiment it is not able to perform estimation of the subspace and leads to test errors with values around 60. At the same time, as shown on Fig. 5 (left) we observe that EM Learner can outperform Oracle Representation which assumes the knowledge of the covariance matrix $\Sigma$ from which it computes the subspace matrix $\mathbf{B}$ and uses it to obtain lower-dimensional representation of the features when adapting to a new task via least-squares, as described above. This is possible because the coefficients estimated by EM are biased toward $\alpha$ which does not happen with least squares regression in the lower
|
| 329 |
+
|
| 330 |
+

|
| 331 |
+
Figure 5. Test error when the task covariance matrix is low-rank. As usual, on the left the number of tasks is changed, on the right, the number of training datapoints (per task). When one parameter is varied, the other is set to the value of 10.
|
| 332 |
+
|
| 333 |
+

|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure 6. Max-correlation $d_{\mathrm{max}}(\hat{B}, B)$ between the estimated matrix $\hat{B}$ (by the respective algorithm) and the ground truth matrix $B$ while increasing number of tasks $n$ .
|
| 337 |
+
|
| 338 |
+
dimensional subspace and this is beneficial, especially when the number of test-task training examples is small.
|
| 339 |
+
|
| 340 |
+
Representation learning experiments II. To validate our implementation of the MoM estimator of Tripuraneni et al. (2020) and to investigate more whether EM is preferable to the MoM estimator beyond the setting that is ideal for the EM method we considered the experimental setup of Tripuraneni et al. (2020).
|
| 341 |
+
|
| 342 |
+
To explain the setup, we recall that the MoM estimator computes an estimate $\hat{B}$ of the ground truth matrix $B$ . Tripuraneni et al. (2020) proves results for the max-correlation between $\hat{B}$ and $B$ , and also reports experimentally measured max-correlation values between the ground truth and the MoM computed matrix. The max-correlation between matrices $A$ and $A'$ is based on the definition of principal angles and is equal to $d_{\max}(A, A') = \sqrt{1 - \cos^2(A, A')}$ where $\cos(A, A') = \max_{u \in \operatorname{span}(A): \|u\| = 1} \max_{v \in \operatorname{span}(A'): \|v\| = 1} u^\top v$ . Intuitively, max-correlation captures how well the subspaces spanned by matrices $A$ and $A'$ are aligned.
|
| 343 |
+
|
| 344 |
+
To compare our EM estimator to MoM we run the EM estimator as described in Algorithm 1, and once the final estimate $\hat{\Sigma}$ is obtained, we reduce its rank by clipping eigenvalues $\lambda_{s+1} \geq \ldots \geq \lambda_d$ to 0.
|
| 345 |
+
|
| 346 |
+
We follow the experimental setup of Tripuraneni et al. (2020), that is, inputs are generated as $\boldsymbol{x}_i \sim \mathcal{N}(0, \boldsymbol{I}_d)$ , while the regression model is given by Eq. (1) with $(\sigma^2, \Sigma) = (1, \frac{1}{s} BB^\top)$ . Here, columns of $B \in \mathbb{R}^{d \times s}$ are sampled from a uniform distribution on a unit $d$ -sphere. Finally, the number of examples per previously observed task is set as $m_1 = \ldots = m_{n-1} = 5$ , the representation rank is $s = 5$ , the input dimension is $d = 100$ , and the experiment is repeated 30 times. Since we only estimate the subspace matrix we do not use the data from the test task $(X_n, y_n)$ .
|
| 347 |
+
|
| 348 |
+
We report our results in Fig. 6, plotting the max-correlation between $\hat{B}$ found by the respective algorithm and $B$ , while increasing the number of tasks. We see that EM learner considerably outperforms MoM Representation in terms of the subspace estimation to the degree captured by max-correlation. While we suspect that the improvement is due to the joint optimization over the covariance of environment and the mean of the environment (the bias in biased regularization), the detailed understanding of this effect is left for the future work.
|
| 349 |
+
|
| 350 |
+
# 7. Conclusions
|
| 351 |
+
|
| 352 |
+
While ours is the first work to derive matching, distribution-dependent lower and upper bounds, much works remains to be done: our approach to derive meta-learning algorithms based on a probabilistic model should be applicable more broadly and could lead to further interesting developments in meta-learning. The most interesting narrower question is to theoretically analyze the EM algorithm. Doing this in the low-rank setting looks particularly interesting. We hope that our paper will inspire other researchers to do further work in this area.
|
| 353 |
+
|
| 354 |
+
# References
|
| 355 |
+
|
| 356 |
+
Baxter, J. Theoretical models of learning to learn. In S. Thrun, L. P. (ed.), Learning to learn, pp. 71-94. Springer, 1998.
|
| 357 |
+
Baxter, J. A model of inductive bias learning. Journal of Artificial Intelligence Research, 12:149-198, 2000.
|
| 358 |
+
Bretagnolle, J. and Huber, C. Estimation des densités: risque minimax. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, 47(2):119-137, 1979.
|
| 359 |
+
Dempster, A. P., Laird, N. M., and Rubin, D. B. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society: Series B (Methodological), 39(1):1-22, 1977.
|
| 360 |
+
Denevi, G., Ciliberto, C., Stamos, D., and Pontil, M. Learning to learn around a common mean. In Conference on Neural Information Processing Systems (NeurIPS), pp. 10169-10179, 2018.
|
| 361 |
+
Denevi, G., Ciliberto, C., Grazzi, R., and Pontil, M. Learning-to-learn stochastic gradient descent with biased regularization. In International Conference on Machine Learning (ICML), 2019.
|
| 362 |
+
Du, S. S., Hu, W., Kakade, S. M., Lee, J. D., and Lei, Q. Few-shot learning via learning the representation, provably. arXiv:2002.09434, 2020.
|
| 363 |
+
Dua, D. and Graff, C. UCI machine learning repository, 2017. URL http://archive.ics.uci.edu/ml.
|
| 364 |
+
Finn, C., Abbeel, P., and Levine, S. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning (ICML), 2017.
|
| 365 |
+
Finn, C., Rajeswaran, A., Kakade, S., and Levine, S. Online meta-learning. International Conference on Machine Learning (ICML), 2019.
|
| 366 |
+
Khodak, M., Balcan, M.-F., and Talwalkar, A. Provable guarantees for gradient-based meta-learning. In International Conference on Machine Learning (ICML), pp. 424-433, 2019a.
|
| 367 |
+
Khodak, M., Balcan, M.-F. F., and Talwalkar, A. S. Adaptive gradient-based meta-learning methods. Advances in Neural Information Processing Systems, 32:5917-5928, 2019b.
|
| 368 |
+
Kuzborskij, I. and Orabona, F. Stability and Hypothesis Transfer Learning. In International Conference on Machine Learning (ICML), pp. 942-950, 2013.
|
| 369 |
+
Kuzborskij, I. and Orabona, F. Fast Rates by Transferring from Auxiliary Hypotheses. Machine Learning, pp. 1-25, 2016. ISSN 1573-0565. doi: 10.1007/s10994-016-5594-4.
|
| 370 |
+
|
| 371 |
+
Lattimore, T. and Szepesvári, C. Bandit algorithms. Cambridge University Press, 2018.
|
| 372 |
+
Lucas, J., Ren, M., Kameni, I., Pitassi, T., and Zemel, R. Theoretical bounds on estimation error for meta-learning. In International Conference on Learning Representations, 2021.
|
| 373 |
+
Maurer, A. Algorithmic stability and meta-learning. Journal of Machine Learning Research, 6(Jun):967-994, 2005.
|
| 374 |
+
Maurer, A. Transfer bounds for linear feature learning. Machine Learning, 75(3):327-350, 2009.
|
| 375 |
+
Maurer, A., Pontil, M., and Romera-Paredes, B. The benefit of multitask representation learning. Journal of Machine Learning Research, 2016.
|
| 376 |
+
Pentina, A. and Lampert, C. A pac-bayesian bound for lifelong learning. In International Conference on Machine Learning (ICML), pp. 991-999, 2014.
|
| 377 |
+
Tripuraneni, N., Jin, C., and Jordan, M. I. Provable meta-learning of linear representations. arXiv:2002.11684, 2020.
|
| 378 |
+
Yang, J., Yan, R., and Hauptmann, A. G. Cross-domain video concept detection using adaptive svms. In Proceedings of the 15th ACM international conference on Multimedia, pp. 188-197, 2007.
|
adistributiondependentanalysisofmetalearning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:261b5e5ff19a4e4f57dbf169c1f756c6f33206a3f2e54eec443f7b64a713a499
|
| 3 |
+
size 371786
|
adistributiondependentanalysisofmetalearning/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d13ff0e4c5a8b5ca4f1cfa6f3aac03ee151ecc45abcb91377cdb9f6a64b898ca
|
| 3 |
+
size 562420
|
aframeworkforprivatematrixanalysisinslidingwindowmodel/549f9551-ce0a-437b-a081-f1b54147a939_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06bcc7e08f21f67da4855729fe6ca981b54d8cf1345474ad6796353cac3047fd
|
| 3 |
+
size 86736
|
aframeworkforprivatematrixanalysisinslidingwindowmodel/549f9551-ce0a-437b-a081-f1b54147a939_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5308bd2dbecb9ab68058b6cb7c5b046a7d1accf48177ea21b78db17792719018
|
| 3 |
+
size 105934
|