Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- parse/train/D3PcGLdMx0/D3PcGLdMx0.md +371 -0
- parse/train/D3PcGLdMx0/D3PcGLdMx0_content_list.json +0 -0
- parse/train/D3PcGLdMx0/D3PcGLdMx0_middle.json +0 -0
- parse/train/D3PcGLdMx0/D3PcGLdMx0_model.json +0 -0
- parse/train/H12GRgcxg/H12GRgcxg.md +215 -0
- parse/train/H12GRgcxg/H12GRgcxg_content_list.json +956 -0
- parse/train/H12GRgcxg/H12GRgcxg_middle.json +0 -0
- parse/train/H12GRgcxg/H12GRgcxg_model.json +0 -0
- parse/train/HkcTe-bR-/HkcTe-bR-.md +319 -0
- parse/train/HkcTe-bR-/HkcTe-bR-_content_list.json +1629 -0
- parse/train/HkcTe-bR-/HkcTe-bR-_middle.json +0 -0
- parse/train/HkcTe-bR-/HkcTe-bR-_model.json +0 -0
- parse/train/St1giarCHLP/St1giarCHLP.md +607 -0
- parse/train/St1giarCHLP/St1giarCHLP_content_list.json +0 -0
- parse/train/St1giarCHLP/St1giarCHLP_middle.json +0 -0
- parse/train/St1giarCHLP/St1giarCHLP_model.json +0 -0
- parse/train/cO1IH43yUF/cO1IH43yUF.md +379 -0
- parse/train/cO1IH43yUF/cO1IH43yUF_content_list.json +0 -0
- parse/train/cO1IH43yUF/cO1IH43yUF_middle.json +0 -0
- parse/train/cO1IH43yUF/cO1IH43yUF_model.json +0 -0
- vlm/train/AVx0r_GppCu/0.png +3 -0
- vlm/train/AVx0r_GppCu/1.png +3 -0
- vlm/train/AVx0r_GppCu/10.png +3 -0
- vlm/train/AVx0r_GppCu/2.png +3 -0
- vlm/train/AVx0r_GppCu/3.png +3 -0
- vlm/train/AVx0r_GppCu/4.png +3 -0
- vlm/train/AVx0r_GppCu/5.png +3 -0
- vlm/train/AVx0r_GppCu/6.png +3 -0
- vlm/train/AVx0r_GppCu/7.png +3 -0
- vlm/train/AVx0r_GppCu/8.png +3 -0
- vlm/train/AVx0r_GppCu/9.png +3 -0
- vlm/train/B1l6y0VFPr/21.png +3 -0
- vlm/train/B1l6y0VFPr/38.png +3 -0
- vlm/train/B1l6y0VFPr/6.png +3 -0
- vlm/train/BJxI5gHKDr/0.png +3 -0
- vlm/train/BJxI5gHKDr/1.png +3 -0
- vlm/train/BJxI5gHKDr/10.png +3 -0
- vlm/train/BJxI5gHKDr/11.png +3 -0
- vlm/train/BJxI5gHKDr/12.png +3 -0
- vlm/train/BJxI5gHKDr/13.png +3 -0
- vlm/train/BJxI5gHKDr/14.png +3 -0
- vlm/train/BJxI5gHKDr/15.png +3 -0
- vlm/train/BJxI5gHKDr/16.png +3 -0
- vlm/train/BJxI5gHKDr/17.png +3 -0
- vlm/train/BJxI5gHKDr/18.png +3 -0
- vlm/train/BJxI5gHKDr/19.png +3 -0
- vlm/train/BJxI5gHKDr/2.png +3 -0
- vlm/train/BJxI5gHKDr/20.png +3 -0
- vlm/train/BJxI5gHKDr/21.png +3 -0
- vlm/train/BJxI5gHKDr/22.png +3 -0
parse/train/D3PcGLdMx0/D3PcGLdMx0.md
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MELR: META-LEARNING VIA MODELING EPISODELEVEL RELATIONSHIPS FOR FEW-SHOT LEARNING
|
| 2 |
+
|
| 3 |
+
Nanyi Fei
|
| 4 |
+
School of Information, Renmin University of China, Beijing, China
|
| 5 |
+
feinanyi@ruc.edu.cn Zhiwu Lu ∗
|
| 6 |
+
Gaoling School of Artificial Intelligence, Renmin University of China, Beijing, China Beijing Key Laboratory of Big Data Management and Analysis Methods, Beijing, China luzhiwu@ruc.edu.cn
|
| 7 |
+
|
| 8 |
+
Tao Xiang University of Surrey Guildford, Surrey, UK t.xiang@surrey.ac.uk
|
| 9 |
+
|
| 10 |
+
Songfang Huang
|
| 11 |
+
Alibaba DAMO Academy
|
| 12 |
+
Hangzhou, China
|
| 13 |
+
songfang.hsf@alibaba-inc.com
|
| 14 |
+
|
| 15 |
+
# ABSTRACT
|
| 16 |
+
|
| 17 |
+
Most recent few-shot learning (FSL) approaches are based on episodic training whereby each episode samples few training instances (shots) per class to imitate the test condition. However, this strict adhering to test condition has a negative side effect, that is, the trained model is susceptible to the poor sampling of few shots. In this work, for the first time, this problem is addressed by exploiting interepisode relationships. Specifically, a novel meta-learning via modeling episodelevel relationships (MELR) framework is proposed. By sampling two episodes containing the same set of classes for meta-training, MELR is designed to ensure that the meta-learned model is robust against the presence of poorly-sampled shots in the meta-test stage. This is achieved through two key components: (1) a Cross-Episode Attention Module (CEAM) to improve the ability of alleviating the effects of poorly-sampled shots, and (2) a Cross-Episode Consistency Regularization (CECR) to enforce that the two classifiers learned from the two episodes are consistent even when there are unrepresentative instances. Extensive experiments for non-transductive standard FSL on two benchmarks show that our MELR achieves $1 . 0 \% { - } 5 . 0 \%$ improvements over the baseline (i.e., ProtoNet) used for FSL in our model and outperforms the latest competitors under the same settings.
|
| 18 |
+
|
| 19 |
+
# 1 INTRODUCTION
|
| 20 |
+
|
| 21 |
+
Deep convolutional neural networks (CNNs) have achieved tremendous successes in a wide range of computer vision tasks including object recognition (Krizhevsky et al., 2012; Simonyan & Zisserman, 2015; Russakovsky et al., 2015; He et al., 2016a), semantic segmentation (Long et al., 2015; Chen et al., 2018), and object detection (Ren et al., 2015; Redmon et al., 2016). For most visual recognition tasks, at least hundreds of labeled training images are required from each class for training a CNN model. However, collecting a large number of labeled training samples is costly and may even be impossible in real-life application scenarios (Antonie et al., 2001; Yang et al., 2012). To reduce the reliance of deep neural networks on large amount of annotated training data, few-shot learning (FSL) has been studied (Vinyals et al., 2016; Finn et al., 2017; Snell et al., 2017; Sung et al., 2018), which aims to recognize a set of novel classes with only a few labeled samples by knowledge transfer from a set of base classes with abundant samples.
|
| 22 |
+
|
| 23 |
+
Recently, FSL has been dominated by meta-learning based approaches (Finn et al., 2017; Snell et al., 2017; Sung et al., 2018; Lee et al., 2019; Ye et al., 2020), which exploit the ample samples from base classes via episodic training. During meta-training, to imitate an $N$ -way $K$ -shot novel class recognition task, an $N$ -way $K$ -shot episode/meta-task is sampled in each iteration from the base classes, consisting of a support set and a query set. By setting up the meta-training episodes exactly the same way as the meta-test ones (i.e., $N$ -way $K$ -shot in the support set), the objective is to ensure that the meta-learned model can generalize to novel tasks. However, this also leads to an unwanted side-effect, that is, the model will be susceptible to the poor sampling of the few shots.
|
| 24 |
+
|
| 25 |
+
Outlying training instances are prevalence in vision benchmarks which can be caused by various factors such as occlusions or unusual pose/lighting conditions. When trained with ample samples, modern CNN-based recognition models are typically robust against abnormal instances as long as they are not dominant. However, when as few as one shot per class is used to build a classifier for FSL, the poorly-sampled few shots could be catastrophic, e.g., when the cat class is represented in the support set by a single image of a half-occluded cat viewed from behind, it would be extremely hard to build a classifier to recognize cats in the query set that are mostly full-body visible and frontal. Existing episodic-training based FSL models do not offer any solution to this problem. The main reason is that different episodes are sampled randomly and independently. When the cat class is sampled in two episodes, these models are not aware that they are the same class, and thus cannot enforce the classifiers independently learned to be consistent to each other, regardless whether there exist poorly-sampled shots in one of the two episodes.
|
| 26 |
+
|
| 27 |
+
In this paper, a novel meta-learning via modeling episode-level relationships (MELR) framework is proposed to address the poor sampling problem of the support set instances in FSL. In contrast to the existing episodic training strategy, MELR conducts meta learning over two episodes deliberately sampled to contain the same set of base classes but different instances. In this way, cross-episode model consistency can be enforced so that the meta-learned model is robust against poorly-sampled shots in the meta-test stage. Concretely, MELR consists of two key components: Cross-Episode Attention Module (CEAM) and Cross-Episode Consistency Regularization (CECR). CEAM is composed of a cross-episode transformer which allows the support set instances to be examined through attention so that unrepresentative support samples can be identified and their negative effects alleviated (especially for computing class prototypes/centers). CECR, on the other hand, exploits the fact that since the two episodes contain the same set of classes, the obtained classifiers (class prototypes) should produce consistent predictions regardless whether there are any poorly-sampled instances in the support set and/or which episode a query instance comes from. This consistency is enforced via cross-episode knowledge distillation.
|
| 28 |
+
|
| 29 |
+
Our main contributions are three-fold: (1) For the first time, the poor sampling problem of the few shots is formally tackled by modeling the episode-level relationships in meta-learning based FSL. (2) We propose a novel MELR model with two cross-episode components (i.e., CEAM and CECR) to explicitly enforce that the classifiers of the same classes learned from different episodes need to be consistent regardless whether there exist poorly-sampled shots. (3) Extensive experiments for non-transductive standard FSL on two benchmarks show that our MELR achieves significant improvements over the baseline ProtoNet (Snell et al., 2017) and even outperforms the latest competitors under the same settings. We will release the code and models soon.
|
| 30 |
+
|
| 31 |
+
# 2 RELATED WORK
|
| 32 |
+
|
| 33 |
+
Few-Shot Learning. Few-shot learning (FSL) has become topical recently. Existing methods can be generally divided into four groups: (1) Metric-based methods either learn a suitable embedding space for their chosen/proposed distance metrics (e.g., cosine similarity (Vinyals et al., 2016), Euclidean distance (Snell et al., 2017), and a novel measure SEN (Nguyen et al., 2020)) or directly learn a suitable distance metric (e.g., CNN-based relation module (Sung et al., 2018; Wu et al., 2019), ridge regression (Bertinetto et al., 2019), and graph neural networks (Satorras & Estrach, 2018; Kim et al., 2019; Yang et al., 2020)). Moreover, several approaches (Yoon et al., 2019; Li et al., 2019a; Qiao et al., 2019; Ye et al., 2020; Simon et al., 2020) learn task-specific metrics which are adaptive to each episode instead of learning a shared task-agnostic metric space. (2) Model-based methods (Finn et al., 2017; Nichol et al., 2018; Rusu et al., 2019) learn good model initializations on base classes and then quickly adapt (i.e., finetune) them on novel classes with few shots and a limited number of gradient update steps. (3) Optimization-based methods (Ravi & Larochelle, 2017; Munkhdalai & Yu, 2017; Li et al., 2017) aim to learn to optimize, that is, to meta-learn optimization algorithms suitable for quick finetuning from base to novel classes. (4) Hallucination-based methods (Hariharan & Girshick, 2017; Wang et al., 2018; Schwartz et al., 2018; Li et al., 2020) learn generators on base classes and then hallucinate new novel class data to augment the few shots. Additionally, there are also other methods that learn to predict network parameters given few novel class samples (Qiao et al., 2018; Gidaris & Komodakis, 2019; Guo & Cheung, 2020). Although the metric-based ProtoNet (Snell et al., 2017) is used as our baseline in this paper, our proposed MELR framework can be easily integrated with other episodic-training based methods.
|
| 34 |
+
|
| 35 |
+
Modeling Episode-Level Relationships. In the FSL area, relatively less effort has been made to explicitly model the relationships across episodes. For modeling such episode-level relationships, there are two recent examples: (1) LGM-Net (Li et al., 2019b) proposes an inter-task normalization strategy, which applies batch normalization to all support samples across a batch of episodes in each training iteration. (2) Among a batch of episodes, Meta-Transfer Learning (Sun et al., 2019) records the class with the lowest accuracy in each episode and then re-samples ‘hard’ meta-tasks from the set of recorded classes. In this work, instead of utilizing the relationships implicitly, we propose to model episode-level relationships (MELR) explicitly by focusing on episodes with the same set of classes. Furthermore, our MELR is specifically designed to cope with the poor sampling of the few shots – an objective very different from those in (Li et al., 2019b; Sun et al., 2019).
|
| 36 |
+
|
| 37 |
+
Attention Mechanism. Attention mechanism was first proposed by (Bahdanau et al., 2015) for machine translation and has now achieved great success in natural language processing (Vaswani et al., 2017) and computer vision (Xu et al., 2015). An attention module typically takes a triplet (queries, keys, values) as input and learns interactions between queries and key-value pairs according to certain task objectives. It is referred to as self-attention or cross-attention depending on whether keys and queries are the same. Several recent works (Hou et al., 2019; Guo & Cheung, 2020; Ye et al., 2020) have utilized attention mechanism for meta-learning based FSL. CAN (Hou et al., 2019) employs cross-attention between support and query samples to learn better feature representations. AWGIM (Guo & Cheung, 2020) adopts both self- and cross-attention for generating classification weights. FEAT (Ye et al., 2020) only uses self-attention on the class prototypes of the support set. The biggest difference between these methods and our MELR lies in whether attention is modeled within each episode or across episodes. Only MELR allows modeling cross-episode instance attention explicitly so that the meta-learned model can be insensitive to badly-sampled support set instances. In addition, in our MELR, query set instances are also updated using cross-attention whilst existing models such as FEAT only apply attention to prototypes obtained using support set instances. They thus cannot directly handle instance-level anomalies.
|
| 38 |
+
|
| 39 |
+
# 3 METHODOLOGY
|
| 40 |
+
|
| 41 |
+
# 3.1 PROBLEM DEFINITION
|
| 42 |
+
|
| 43 |
+
Let $\mathcal { D } _ { b } = \{ ( x _ { i } , y _ { i } ) | y _ { i } \in \mathcal { C } _ { b } , i = 1 , 2 , \cdot \cdot \cdot , N _ { b } \}$ denote an abundant meta-training set from base classes $\mathcal { C } _ { b }$ , where $x _ { i }$ is the $i$ -th image, $y _ { i }$ denotes the class label of $x _ { i }$ , and $N _ { b }$ is the number of images in $\mathcal { D } _ { b }$ . Similarly, let $\mathcal { D } _ { n } = \{ ( x _ { i } , y _ { i } ) | y _ { i } \in \mathcal { C } _ { n } , i = 1 , 2 , \cdot \cdot \cdot , N _ { n } \}$ denote a few-shot sample set from a set of novel classes $\mathcal { C } _ { n }$ (e.g., $K$ -shot means that each novel class has $K$ labeled images and $N _ { n } = K | \mathcal { C } _ { n } | )$ , where $\mathcal { C } _ { b } \cap \mathcal { C } _ { n } = \emptyset$ . We are also given a test set $\tau$ from $\mathcal { C } _ { n }$ , where $\mathcal { D } _ { n } \cap \mathcal { T } = \emptyset$ . By exploiting $\mathcal { D } _ { b }$ and $\mathcal { D } _ { n }$ for training, the objective of few-shot learning (FSL) is to predict the class labels of test images in $\tau$ .
|
| 44 |
+
|
| 45 |
+
# 3.2 META-LEARNING BASED FSL
|
| 46 |
+
|
| 47 |
+
Most FSL methods are based on meta-learning (Vinyals et al., 2016; Finn et al., 2017; Snell et al., 2017; Sung et al., 2018; Lee et al., 2019; Ye et al., 2020), which adopt episodic training on the base class sample set $\mathcal { D } _ { b }$ and test their models over few-shot classification tasks sampled from the novel classes ${ \mathcal { C } } _ { n }$ . Concretely, an $N$ -way $K$ -shot $Q$ -query episode $e = ( S _ { e } , \mathcal { Q } _ { e } )$ is generated as follows: (1) We first randomly sample a subset $\mathcal { C } _ { e }$ from base classes $\mathcal { C } _ { b }$ during meta-training (or from novel classes $\mathcal { C } _ { n }$ during meta-test) and re-index it as $\mathcal { C } _ { e } = \{ 1 , 2 , \cdots , N \}$ . (2) For each class in $\mathcal { C } _ { e }$ , $K$ support and $Q$ query images are then randomly sampled to form the support set $\begin{array} { r } { S _ { e } = \{ ( x _ { i } , y _ { i } ) | y _ { i } \in } \end{array}$ $\mathcal { C } _ { e } , i = 1 , 2 , \cdots , N \times K \}$ and the query set ${ \mathcal { Q } } _ { e } \ = \ \{ ( x _ { i } , y _ { i } ) | y _ { i } \in { \mathcal { C } } _ { e } , i \ = \ 1 , 2 , \cdot \cdot \cdot , N \times Q \}$ $( S _ { e } \cap \mathcal { Q } _ { e } = \emptyset )$ ), respectively.
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 1: The schematic illustration of the proposed MELR model. It consists of two main components for modeling episode-level relationships: Cross-Episode Attention Module (CEAM) and Cross-Episode Consistency Regularization (CECR). For clarity, only the 5-way 1-shot setting is presented here. Each red/blue cuboid denotes a single instance.
|
| 51 |
+
|
| 52 |
+
A meta-learning based FSL approach typically designs a few-shot classification loss over the query set $\mathcal { Q } _ { e }$ for each meta-training episode $e$ :
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
L _ { f s c } ( e ) = \mathbb { E } _ { ( x _ { i } , y _ { i } ) \in \mathcal { Q } _ { e } } L ( y _ { i } , f ( \psi ( x _ { i } ) ; \mathcal { S } _ { e } ) ) ,
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where $\psi$ denotes a feature extractor with an output dimension $d$ , $f ( \cdot ; S _ { e } ) : \mathbb { R } ^ { d } \to \mathbb { R } ^ { N }$ can be any scoring function constructed from the support set $S _ { e }$ , and $L ( \cdot , \cdot )$ is the classification loss (e.g., widely used cross-entropy). By minimizing the above loss function via back propagation to update the part of the model to be meta-learned (e.g., $\psi$ in ProtoNet), the model is trained over many meta-training episodes and then evaluated on the meta-test episodes.
|
| 59 |
+
|
| 60 |
+
# 3.3 MODELING EPISODE-LEVEL RELATIONSHIPS (MELR)
|
| 61 |
+
|
| 62 |
+
In the FSL area, relatively less effort has been made to explicitly model the relationships across episodes, and many FSL methods define their loss functions within each episode independently. In contrast, with our Modeling Episode-Level Relationships (MELR), two $N$ -way episodes are sampled in each training iteration from exactly the same set of $N$ base classes. Cross-Episode Attention Module (CEAM) and Cross-Episode Consistency Regularization (CECR) are then devised to exploit this type of episode-level relationship explicitly (see Figure 1).
|
| 63 |
+
|
| 64 |
+
Cross-Episode Attention Module (CEAM). We are given two $N$ -way $K$ -shot $Q$ -query episodes $e ^ { ( 1 ) } = ( \bar { S } _ { e } ^ { ( 1 ) } , \mathcal { Q } _ { e } ^ { ( 1 ) } )$ and $e ^ { ( 2 ) } = ( S _ { e } ^ { ( 2 ) } , \mathcal { Q } _ { e } ^ { ( 2 ) } )$ sampled from the same subset $\mathcal { C } _ { e }$ of $\mathcal { C } _ { b }$ , where $\mathcal { C } _ { e }$ is re-indexed as $\mathcal { C } _ { e } = \{ 1 , 2 , \cdots , N \}$ , and $e ^ { ( 1 ) } \bigcap e ^ { ( 2 ) } = \emptyset$ . For both episodes, to minimize the negative impact of badly-sampled few shots for a given query instance, we propose CEAM for cross-episode attention modeling, which is detailed below.
|
| 65 |
+
|
| 66 |
+
Concretely, let $\mathbf { S } ^ { ( 1 ) } = [ \boldsymbol { \psi } ( x _ { i } ) ^ { T } ; x _ { i } \in \mathcal { S } _ { e } ^ { ( 1 ) } ] \in \mathbb { R } ^ { N K \times d }$ (or $\mathbf { S } ^ { ( 2 ) }$ ) and ${ \bf Q } ^ { ( 1 ) } = [ \psi ( x _ { i } ) ^ { T } ; x _ { i } \in \mathcal { Q } _ { e } ^ { ( 1 ) } ] \in$ $\mathbb { R } ^ { N Q \times d }$ (or $\mathbf { Q } ^ { ( 2 ) } )$ denote the feature matrices of support and query samples in $e ^ { ( 1 ) }$ (or $e ^ { ( 2 ) }$ ), respectively, and let ${ \bf F } ^ { ( 1 ) } = [ { \bf S } ^ { ( 1 ) } ; { \bf Q } ^ { ( 1 ) } ] \in \mathbb { R } ^ { N ( K + Q ) \times d }$ (or $\mathbf { F } ^ { ( 2 ) } = [ \mathbf { S } ^ { ( 2 ) } ; \mathbf { Q } ^ { ( 2 ) } ] )$ be the feature matrix of all samples in $e ^ { ( 1 ) }$ (or $e ^ { ( 2 ) }$ ). For episode $e ^ { ( 1 ) }$ , CEAM takes the triplet $( \mathbf { \dot { F } } ^ { ( 1 ) } , \mathbf { S } ^ { ( 2 ) } , \mathbf { S } ^ { ( 2 ) } )$ as input, which corresponds to the input (queries, keys, values) in a typical attention module:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\hat { \mathbf { F } } ^ { ( 1 ) } = \mathbf { C E A M } ( \mathbf { F } ^ { ( 1 ) } , \mathbf { S } ^ { ( 2 ) } , \mathbf { S } ^ { ( 2 ) } ) = \mathbf { F } ^ { ( 1 ) } + \mathrm { s o f t m a x } ( \frac { \mathbf { F } _ { Q } ^ { ( 1 ) } \mathbf { S } _ { K } ^ { ( 2 ) T } } { \sqrt { d } } ) \mathbf { S } _ { V } ^ { ( 2 ) } ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where the inputs are first linearly mapped into a latent space with the same dimension of the feature space (using projection matrices $\mathbf { W } _ { Q } , \mathbf { W } _ { K } , \mathbf { W } _ { V } \in \mathbb { R } ^ { d \times d } )$ :
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array} { r l } & { \mathbf { F } _ { Q } ^ { ( 1 ) } = \mathbf { F } ^ { ( 1 ) } \mathbf { W } _ { Q } \in \mathbb { R } ^ { N ( K + Q ) \times d } , } \\ & { \mathbf { S } _ { K } ^ { ( 2 ) } = \mathbf { S } ^ { ( 2 ) } \mathbf { W } _ { K } \in \mathbb { R } ^ { N K \times d } , } \\ & { \mathbf { S } _ { V } ^ { ( 2 ) } = \mathbf { S } ^ { ( 2 ) } \mathbf { W } _ { V } \in \mathbb { R } ^ { N K \times d } . } \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
Similarly, for episode $e ^ { ( 2 ) }$ , we have (analogous to Eq. (2)):
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\hat { \mathbf { F } } ^ { ( 2 ) } = \mathbf { C E A M } ( \mathbf { F } ^ { ( 2 ) } , \mathbf { S } ^ { ( 1 ) } , \mathbf { S } ^ { ( 1 ) } ) = \mathbf { F } ^ { ( 2 ) } + \mathrm { s o f t m a x } ( \frac { \mathbf { F } _ { Q } ^ { ( 2 ) } \mathbf { S } _ { K } ^ { ( 1 ) T } } { \sqrt { d } } ) \mathbf { S } _ { V } ^ { ( 1 ) } ,
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where the learnable parameters of fully connected layers (i.e., $\mathbf { W } _ { Q } , \mathbf { W } _ { K }$ and $\mathbf { W } _ { V }$ ) are shared across Eq. (2) and Eq. (6). We can then obtain the transformed support and query embedding matrices in $e ^ { ( 1 ) }$ (or $e ^ { ( 2 ) }$ ) from $\hat { \mathbf { F } } ^ { ( 1 ) } = [ \hat { \mathbf { S } } ^ { ( 1 ) } ; \hat { \mathbf { Q } } ^ { ( 1 ) } ]$ (or $\hat { \mathbf { F } } ^ { ( 2 ) } = [ \hat { \mathbf { S } } ^ { ( 2 ) } ; \hat { \mathbf { Q } } ^ { ( 2 ) } ] )$ .
|
| 85 |
+
|
| 86 |
+
Cross-Episode Consistency Regularization (CECR). In our MELR model, CEAM utilizes instance-level attention to alleviate the negative effects of the poor support set instance sampling so that each query set instance can be assigned to the right class with minimal loss. Our CECR is designed to further reduce the model sensitivity to badly-sampled shots in different episodes by forcing the two classifiers learned over the two episodes to produce consistent predictions. There are various options on how to enforce such consistency. CECR adopts a knowledge distillation based strategy as empirically it is the most effective one (see Section 4.3).
|
| 87 |
+
|
| 88 |
+
Let $f ( \cdot ; \hat { \mathbf { S } } ^ { ( 1 ) } ) : \mathbb { R } ^ { d } \to \mathbb { R } ^ { N }$ and $f ( \cdot ; \hat { \mathbf { S } } ^ { ( 2 ) } ) : \mathbb { R } ^ { d } \to \mathbb { R } ^ { N }$ be the scoring functions of the two classifiers constructed from $\hat { \mathbf { S } } ^ { ( 1 ) }$ and $\hat { \mathbf { S } } ^ { ( 2 ) }$ , respectively. To determine which classifier/scoring function is stronger, we compute the few-shot classification accuracies of the two classifiers on the merged query samples from both episodes. Concretely, let $\hat { \mathcal { Q } } _ { e } ^ { ( 1 ) } = \{ ( \hat { \mathbf { q } } _ { i } ^ { ( 1 ) } , y _ { i } ^ { ( 1 ) } ) | \hat { \mathbf { q } } _ { i } ^ { ( 1 ) } \in \mathbb { R } ^ { d } , i =$ $1 , 2 , \cdots , N Q \}$ (or $\hat { \mathcal { Q } } _ { e } ^ { ( 2 ) }$ ) denote the set of transformed embedding vectors of query samples in $e ^ { ( 1 ) }$ (or $e ^ { ( 2 ) }$ ), where $\hat { \mathbf { q } } _ { i } ^ { ( 1 ) }$ (or $\hat { \mathbf { q } } _ { i } ^ { ( 2 ) }$ ) denotes the $i$ -th row of the transformed embedding matrix $\hat { \mathbf { Q } } ^ { ( 1 ) }$ (or $\hat { \mathbf { Q } } ^ { ( 2 ) } )$ . With he few- $\hat { \mathcal { Q } } _ { e } ^ { ( 1 , 2 ) } = \hat { \mathcal { Q } } _ { e } ^ { ( 1 ) } \cup \hat { \mathcal { Q } } _ { e } ^ { ( 2 ) } = \{ ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) , i = 1 , 2 , \cdots , 2 N Q \} )$ , we are able to com-nd-truth labels and the pute t shot classification accuracies of the two classifiers w.r.t. the grou corresponding predicted ones (i.e., arg maxj $\sigma _ { j } ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 1 ) } ) )$ and arg maxj $\sigma _ { j } ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 2 ) } ) )$ $( j = 1 , 2 , \cdots , N )$ for $( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) \in \hat { \mathcal { Q } } _ { e } ^ { ( 1 , 2 ) }$ , where $\begin{array} { r } { \sigma _ { j } ( { \bf v } ) \triangleq \frac { \exp ( v _ { j } ) } { \sum _ { j ^ { \prime } = 1 } ^ { N } \exp ( v _ { j ^ { \prime } } ) } } \end{array}$ $( \mathbf { v } \in \mathbb { R } ^ { N } )$ is the softmax function).
|
| 89 |
+
|
| 90 |
+
The classifier with higher accuracy is thus considered to be the stronger one and subsequently used as the teacher classifier for the student to behave consistently with it. Without loss of generality, we assume that $f ( \cdot ; \hat { \mathbf { S } } ^ { ( 1 ) } )$ is stronger than $f ( \cdot ; \hat { \mathbf { S } } ^ { ( 2 ) } )$ . We choose the knowledge distillation loss (Hinton et al., 2015) for CECR, which is stated as:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
L _ { c e c r } ( e ^ { ( 1 ) } , e ^ { ( 2 ) } ; T ) = \mathbb { E } _ { ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) \in \hat { \mathcal { Q } } _ { e } ^ { ( 1 , 2 ) } } L ^ { \prime } ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 1 ) } ) , f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 2 ) } ) ; T ) ,
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $T$ is the temperature parameter as used in (Hinton et al., 2015). More specifically, when the softmax function $\begin{array} { r } { \sigma _ { j } ( \mathbf { v } ; T ) \triangleq \frac { \exp ( v _ { j } / T ) } { \sum _ { j ^ { \prime } = 1 } ^ { N } \exp ( v _ { j ^ { \prime } } / T ) } } \end{array}$ $\mathbf { \bar { v } } \in \mathbb { R } ^ { N }$ , $j = 1 , 2 , \cdots , N )$ is used, we define $L ^ { \prime } ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 1 ) } ) , f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 2 ) } ) ; T )$ in Eq. (7) with the cross-entropy loss:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array} { r l } & { \quad L ^ { \prime } ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 1 ) } ) , f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 2 ) } ) ; T ) } \\ & { = - \displaystyle \sum _ { j = 1 } ^ { N } \sigma _ { j } \big ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 1 ) } ) ; T ) \log \left( \sigma _ { j } \big ( f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 2 ) } ) ; T ) \right) . } \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
Note that we cut off the gradients over $f ( \cdot ; \hat { \mathbf { S } } ^ { ( 1 ) } )$ when back-propagating since the output of the teacher scoring function is treated as the soft target for the student.
|
| 103 |
+
|
| 104 |
+
<table><tr><td colspan="2">Algorithm1MELR-basedFSL</td></tr><tr><td colspan="2">Input: Our MELR model with the set of all parameters Θ The base class sample set Db</td></tr><tr><td colspan="2">Hyper-parameters 入,T</td></tr><tr><td colspan="2">Output: The learned model</td></tr><tr><td colspan="2">1:for all iteration=1, 2,·.,MaxIteration do</td></tr><tr><td colspan="2"></td></tr><tr><td>2: 3:</td><td>C(2),e(1) ne(2)=0; Compute F(1) for e(1) using CEAM with Eq. (2),and obtain F(2) with Eq. (6) similarly.</td></tr><tr><td>4:</td><td>Compute Lfsc(e(1)) and Lfsc(e(2)) with Eq. (9), respectively;</td></tr><tr><td>5:</td><td>Construct Q(1,2) =Q(1)</td></tr><tr><td>6:</td><td>Determine the teacher episode e(t) and the student e(s) by computing the few-shot classifica-</td></tr><tr><td colspan="2"></td></tr><tr><td>7:</td><td>tion accuracies of the two classifiers within e(1) and e(2), respectively; Compute the CECR loss Lcecr(e(t),e(s);T) with Eq. (7);</td></tr><tr><td>8:</td><td>Compute the total loss Ltotal with Eq. (10);</td></tr><tr><td>9:</td><td>Compute the gradients V@ Ltotal ;</td></tr><tr><td>10:</td><td>Update O using stochastic gradient descent;</td></tr><tr><td colspan="2">11: end for</td></tr><tr><td colspan="2">12: return The learned model.</td></tr></table>
|
| 105 |
+
|
| 106 |
+
# 3.4 MELR-BASED FSL ALGORITHM
|
| 107 |
+
|
| 108 |
+
As we have mentioned above, in each training iteration, we randomly sample two $N$ -way $K$ -shot $Q$ - query episodes $e ^ { ( 1 ) } = ( S _ { e } ^ { ( 1 ) } , \mathcal { Q } _ { e } ^ { ( 1 ) } )$ and $e ^ { ( 2 ) } = ( S _ { e } ^ { ( 2 ) } , \mathcal { Q } _ { e } ^ { ( 2 ) } )$ , Q(2)e ), which must have exactly the same set of classes but with different instances. We first transform the feature embeddings with Cross-Episode Attention Module (CEAM) and then compute the few-shot classification loss adopting ProtoNet (Snell et al., 2017) for both episodes $( e \in \bar { \{ e ^ { ( 1 ) } , e ^ { ( 2 ) } \} } )$ ):
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\begin{array} { r l } & { L _ { f s c } ( e ) = \mathbb { E } _ { ( \hat { \mathbf { q } } _ { i } , y _ { i } ) \in \hat { \mathcal { Q } } _ { e } } L ( y _ { i } , f _ { \mathrm { P r o t o N e t } } ( \hat { \mathbf { q } } _ { i } ; \hat { \mathbf { S } } ) ) } \\ & { \qquad = \mathbb { E } _ { ( \hat { \mathbf { q } } _ { i } , y _ { i } ) \in \hat { \mathcal { Q } } _ { e } } - \log \sigma _ { y _ { i } } ( f _ { \mathrm { P r o t o N e t } } ( \hat { \mathbf { q } } _ { i } ; \hat { \mathbf { S } } ) ) . } \end{array}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Next we determine the stronger/teacher episode to compute the Cross-Episode Consistency Regularization (CECR) loss between the two episodes. The total loss for MELR is finally given by:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
L _ { t o t a l } = \frac { 1 } { 2 } ( L _ { f s c } ( e ^ { ( 1 ) } ) + L _ { f s c } ( e ^ { ( 2 ) } ) ) + \lambda L _ { c e c r } ( e ^ { ( t ) } , e ^ { ( s ) } ; T ) ,
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $e ^ { ( t ) } \in \{ e ^ { ( 1 ) } , e ^ { ( 2 ) } \}$ denotes the teacher episode, and $e ^ { ( s ) } \in \{ e ^ { ( 1 ) } , e ^ { ( 2 ) } \}$ is the student.
|
| 121 |
+
|
| 122 |
+
By combining CEAM and CECR for episodic training, our MELR-based FSL algorithm is summarized in Algorithm 1. Once learned, with the optimal model found by our algorithm, we randomly sample multiple $N$ -way $K$ -shot meta-test episodes from $\mathcal { C } _ { n }$ for evaluation. In other words, the episode-level relationship is only exploited during meta-training.
|
| 123 |
+
|
| 124 |
+
# 4 EXPERIMENTS
|
| 125 |
+
|
| 126 |
+
# 4.1 DATASETS AND SETTINGS
|
| 127 |
+
|
| 128 |
+
Datasets. Two widely-used benchmarks are selected: (1) miniImageNet (Vinyals et al., 2016): It contains 100 classes from ILSVRC-12 (Russakovsky et al., 2015). Each class has 600 images. We split it into 64 training classes, 16 validation classes and 20 test classes, as in (Ravi & Larochelle, 2017). (2) tieredImageNet (Ren et al., 2018): It is a larger subset of ILSVRC-12, containing 608 classes and 779,165 images in total. We split it into 351 training classes, 97 validation classes and 160 test classes, as in (Ren et al., 2018). All images of the two datasets are resized to $8 4 \times 8 4$ .
|
| 129 |
+
|
| 130 |
+
Evaluation Protocols. The 5-way 5-shot/1-shot settings are used. Each test episode $e ^ { ( t e s t ) } =$ $( S _ { e } ^ { ( t e s t ) } , \mathcal { Q } _ { e } ^ { ( t e s t ) } )$ has 5 classes randomly sampled from the test split, with 5 or 1 shots and 15 queries per class. We thus have $N = 5$ , $K = 5$ or 1, $Q = 1 5$ as in previous works. Although we meta-train our MELR with two episodes in each training iteration, we still evaluate it over test episodes one by one, strictly following the standard setting. Moreover, since no cross-episode relationships can be used when testing, we take $( \mathbf { F } ^ { ( t e s t ) } , \mathbf { S } ^ { ( t e s t ) } , \mathbf { S } ^ { ( t e s t ) } )$ as the input of CEAM. Note that the meta-test process is non-transductive since the embedding of each query sample in $e ^ { ( t e s t ) }$ is independently updated using the keys and values coming from the support set. We report average 5-way classification accuracy $\%$ , top-1) over 2,000 test episodes as well as the $9 5 \%$ confidence interval.
|
| 131 |
+
|
| 132 |
+
Table 1: Comparative results of standard FSL on two benchmark datasets. The average 5-way fewshot classification accuracies $\%$ , top-1) along with the $9 5 \%$ confidence intervals are reported.
|
| 133 |
+
|
| 134 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">miniImageNet</td><td colspan="2">tieredImageNet</td></tr><tr><td>Backbone</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>MatchingNet (Vinyals etal.,2016)</td><td>Conv4-64</td><td>43.56±0.84</td><td>55.31 ± 0.73</td><td></td><td></td></tr><tr><td>ProtoNet† (Snell et al., 2017)</td><td>Conv4-64</td><td>52.78 ± 0.45</td><td>71.26 ± 0.36</td><td>53.82 ±0.48</td><td>71.77 ± 0.41</td></tr><tr><td>MAML (Finn et al.,2017)</td><td>Conv4-64</td><td>48.70 ± 1.84</td><td>63.10 ±0.92</td><td>51.67 ± 1.81</td><td>70.30 ±0.08</td></tr><tr><td>RelationNet (Sung et al.,2018)</td><td>Conv4-64</td><td>50.40±0.80</td><td>65.30 ±0.70</td><td>54.48 ± 0.93</td><td>71.32 ± 0.78</td></tr><tr><td>IMP (Allen et al., 2019)</td><td>Conv4-64</td><td>49.60 ± 0.80</td><td>68.10±0.80</td><td></td><td></td></tr><tr><td>DN4 (Li et al.,2019c)</td><td>Conv4-64</td><td>51.24 ± 0.74</td><td>71.02 ± 0.64</td><td></td><td></td></tr><tr><td>PARN(Wu et al.,2019)</td><td>Conv4-64</td><td>55.22 ± 0.84</td><td>71.55 ± 0.66</td><td></td><td></td></tr><tr><td>PN+rot (Gidaris et al.,2019)</td><td>Conv4-64</td><td>53.63 ± 0.43</td><td>71.70 ± 0.36</td><td></td><td></td></tr><tr><td>CC+rot (Gidaris et al., 2019)</td><td>Conv4-64</td><td>54.83 ± 0.43</td><td>71.86 ± 0.33</td><td></td><td></td></tr><tr><td>Centroid (Afrasiyabi Arman,2020)</td><td>Conv4-64</td><td>53.14 ± 1.06</td><td>71.45 ± 0.72</td><td></td><td></td></tr><tr><td>Neg-Cosine (Liu et al.,2020)</td><td>Conv4-64</td><td>52.84 ± 0.76</td><td>70.41 ± 0.66</td><td></td><td></td></tr><tr><td>FEAT (Ye et al.,2020)</td><td>Conv4-64</td><td>55.15 ± 0.20</td><td>71.61 ± 0.16</td><td></td><td></td></tr><tr><td>MELR(ours)</td><td>Conv4-64</td><td>55.35 ± 0.43</td><td>72.27 ± 0.35</td><td>56.38± 0.48</td><td>73.22± 0.41</td></tr><tr><td>ProtoNet (Snell et al.,2017)</td><td>Conv4-512</td><td>53.52 ± 0.43</td><td>73.34± 0.36</td><td>55.52 ± 0.48</td><td>74.07±0.40</td></tr><tr><td>MAML (Finn et al.,2017)</td><td>Conv4-512</td><td>49.33 ± 0.60</td><td>65.17 ± 0.49</td><td>52.84±0.56</td><td>70.91 ± 0.46</td></tr><tr><td>Relation Net (Sung et al.,2018)</td><td>Conv4-512</td><td>50.86 ± 0.57</td><td>67.32 ± 0.44</td><td>54.69 ± 0.59</td><td>72.71 ± 0.43</td></tr><tr><td>PN+rot (Gidaris et al.,2019)</td><td>Conv4-512</td><td>56.02 ± 0.46</td><td>74.00 ± 0.35</td><td></td><td></td></tr><tr><td>CC+rot (Gidaris et al., 2019)</td><td>Conv4-512</td><td>56.27 ± 0.43</td><td>74.30 ± 0.33</td><td></td><td>一</td></tr><tr><td>MELR(ours)</td><td>Conv4-512</td><td>57.54±0.44</td><td>74.37±0.34</td><td>60.26±0.51</td><td>77.25± 0.40</td></tr><tr><td>ProtoNet† (Snell et al.,2017)</td><td>ResNet-12</td><td>62.41 ± 0.44</td><td>80.49±0.29</td><td>69.63±0.53</td><td>84.82± 0.36</td></tr><tr><td>TADAM (Oreshkin et al.,2018)</td><td>ResNet-12</td><td>58.50± 0.30</td><td>76.70±0.38</td><td></td><td></td></tr><tr><td>MetaOptNet (Lee et al., 2019)</td><td>ResNet-12</td><td>62.64 ± 0.61</td><td>78.63 ± 0.46</td><td>65.99 ±0.72</td><td>81.56 ± 0.63</td></tr><tr><td>MTL (Sun et al., 2019)</td><td>ResNet-12</td><td>61.20 ±1.80</td><td>75.50± 0.80</td><td>65.62 ± 1.80</td><td>80.61 ±0.90</td></tr><tr><td>AM3 (Xing et al.,2019)</td><td>ResNet-12</td><td>65.21 ± 0.49</td><td>75.20 ±0.36</td><td>67.23 ± 0.34</td><td>78.95 ± 0.22</td></tr><tr><td>Shot-Free (Ravichandran et al.,2019)</td><td>ResNet-12</td><td>59.04 ± 0.43</td><td>77.64 ± 0.39</td><td>66.87±0.43</td><td>82.64± 0.43</td></tr><tr><td>Neg-Cosine (Liu et al.,2020)</td><td>ResNet-12</td><td>63.85 ±0.81</td><td>81.57 ± 0.56</td><td></td><td>一</td></tr><tr><td>Distill (Tian et al.,2020)</td><td>ResNet-12</td><td>64.82 ± 0.60</td><td>82.14 ± 0.43</td><td>71.52 ± 0.69</td><td>86.03 ±0.49</td></tr><tr><td>DSN-MR (Simon et al., 2020)</td><td>ResNet-12</td><td>64.60±0.72</td><td>79.51 ± 0.50</td><td>67.39 ± 0.82</td><td>82.85 ±0.56</td></tr><tr><td>DeepEMD (Zhang et al.,2020)</td><td>ResNet-12</td><td>65.91 ± 0.82</td><td>82.41 ± 0.56</td><td>71.16 ± 0.87</td><td>86.03 ±0.58</td></tr><tr><td>FEAT (Ye et al.,2020)</td><td>ResNet-12</td><td>66.78±0.20</td><td>82.05 ±0.14</td><td>70.80 ±0.23</td><td>84.79 ± 0.16</td></tr><tr><td>MELR (ours)</td><td>ResNet-12</td><td>67.40±0.43</td><td>83.40±0.28</td><td>72.14± 0.51</td><td>87.01±0.35</td></tr></table>
|
| 135 |
+
|
| 136 |
+
Implementation Details. Our MELR algorithm adopts Conv4-64 (Vinyals et al., 2016), Conv4- 512 and ResNet-12 (He et al., 2016b) as the feature extractors $\psi$ for fair comparison with published results. The output feature dimensions of Conv4-64, Conv4-512 and ResNet-12 are 64, 512, and 640, respectively. To accelerate the entire training process, we pre-train all three backbones on the training split of each dataset as in many previous works (Zhang et al., 2020; Ye et al., 2020; Simon et al., 2020). We use data augmentation during pre-training (as well as meta-training with ResNet-12 on miniImageNet). For ResNet-12, the stochastic gradient descent (SGD) optimizer is employed with the initial learning rate of 1e-4, the weight decay of 5e-4, and the Nesterov momentum of 0.9. For Conv4-64 and Conv4-512, the Adam optimizer (Kingma & Ba, 2015) is adopted with the initial learning rate of 1e-4. The hyper-parameters $\lambda$ and $T$ are respectively selected from $\{ 0 . 0 2 , 0 . 0 5 , 0 . 1 , 0 . 2 \}$ and $\{ 1 6 , 3 2 , 6 4 , 1 2 8 \}$ according to the validation performances of our MELR algorithm (see Appendix A.5 for more details). The code and models will be released soon.
|
| 137 |
+
|
| 138 |
+
# 4.2 MAIN RESULTS
|
| 139 |
+
|
| 140 |
+
We compare our MELR with the representative/state-of-the-art methods for standard FSL on the two benchmark datasets in Table 1. Note that we re-implement our baseline (i.e., ProtoNet, denoted with †) by sampling two episodes in each training iteration since it is still considered as a strong FSL approach especially when the backbone is deep. We can observe from Table 1 that: (1) Methods trained with ResNet-12 generally perform better than those employing shallower backbones. Also, methods trained with Conv4-512 generally perform better than those employing Conv4-64 even though the two backbones are of the same depth. This is expected because deeper and wider backbones have better representation learning abilities. (2) Our MELR achieves the new state-ofthe-art performance on both benchmarks under all settings. Particularly, the improvements over the baseline (i.e., ProtoNet†) range from $1 . 0 \%$ to $5 . 0 \%$ , which clearly validates the effectiveness and the strong generalization ability of our MELR. (3) On both benchmarks, the improvements obtained by our MELR over ProtoNet† under the 1-shot setting are significantly larger than those under the 5-shot setting. This demonstrates the superior performance of our MELR for FSL with less shots. Again this is expected: FSL with less shots is more likely to suffer from the poor sampling of the few support instances; such a challenging problem is exactly what our MELR is designed for.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 2: (a) Ablative results for our MELR. (b) Comparison among different ProtoNet†+CEAM alternatives. (c) Comparison among different ProtoNet $^ { \dag } + \mathrm { C E C R }$ alternatives. All results are obtained under the 5-way 1-shot and 5-shot settings on miniImageNet with Conv4-64 as the feature extractor.
|
| 144 |
+
|
| 145 |
+
# 4.3 FURTHER EVALUATION
|
| 146 |
+
|
| 147 |
+
Ablation Study. To demonstrate the contributions of each cross-episode learning objective in our MELR, we conduct experiments on miniImageNet by adding these learning objectives to the baseline (one at a time) under the 5-way 1-shot and 5-shot settings. Note that ProtoNet without † is trained with one episode in each training iteration while ProtoNet† is trained with two episodes per iteration. The ablation study results in Figure 2(a) show that: (1) Increasing mini-batch size helps little for ProtoNet, indicating that our MELR benefits from two cross-episode objectives rather than doubling the mini-batch size. (2) CEAM or CECR alone clearly improves the performance of the baseline model and CEAM appears to be more beneficial to FSL than CECR. (3) The combination of the two cross-episode learning objectives in our full model (i.e., MELR) achieves further improvements, suggesting that these two learning objectives are complementary to each other. Moreover, in Appendix A.2, we conduct more ablative experiments when the attention module is applied within each episode, validating the necessity of cross-episode attention.
|
| 148 |
+
|
| 149 |
+
Comparison to CEAM Alternatives. As we have described, our CEAM takes the support samples as ‘keys’ and ‘values’, and all samples in one episode as ‘queries’ for attention module (denoted as Support $ \mathsf { A l l }$ ). We can also input prototypes (mean representations of support samples from the same class) as ‘keys’ and ‘values’ or input only query samples as ‘queries’ for attention. This results in other three alternatives of CEAM: Prototype Query, Support Query, and Prototype $ \mathsf { A l l }$ . Note that under the 5-way 1-shot setting, Prototype Query is equal to Support Query and Prototype $ \mathsf { A l l }$ is the same as Support All. Additionally, we compare to All All: inputting all samples from the other episode as ‘keys’ and ‘values’ for CEAM when training but still testing as Suppor $ \mathsf { A l l }$ (not violating the non-transductive setting). From the comparative results of different choices in Figure 2(b), we can see that Support $ \mathsf { A l l }$ is the best for CEAM. Moreover, Al $\mathrm { l } \mathrm { A l l }$ works worse than both Prototype All and Support All. One possible explanation is that Al $\lvert \mathsf { A l l }$ exploits all query set instances during meta-training but only has access to the support set during meta-test to conform to the inductive learning setting. This mis-match reduces its effectiveness.
|
| 150 |
+
|
| 151 |
+
Comparison to CECR Alternatives. Our consistency regularization loss $L _ { c e c r }$ in Eq. (7) is defined with the knowledge distillation (KD) loss, which can be easily replaced by the negative cosine similarity (NegCos), symmetric Kullback–Leibler divergence (symKL), or the L2 distance (see Appendix A.1 for more details). The results obtained by ProtoNet $^ { \dag } + { \mathrm { C E C R } }$ using different consistency losses are shown in Figure 2(c). It can be seen that ProtoNet $\dagger { + } \mathbf { K D }$ performs slightly better than other implementations. We thus choose KD as our CECR loss.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 3: (a) – (c) Visualizations of data distributions obtained by ProtoNet†, ProtoNet†+CEAM, and ProtoNet $^ { \dag } + \mathrm { C E A M + C E C R }$ (i.e., our MELR) for the same meta-test episode, respectively. $\mathrm { ( d ) - }$ (e) Visualizations of attention maps for query and support sets, respectively. All results are obtained under the 5-way 5-shot setting on miniImageNet with Conv4-64 as the feature extractor.
|
| 155 |
+
|
| 156 |
+
Visualizations of Data Distributions and Attention Maps. MELR is designed to alleviate the negative effects of poorly-sampled few shots. To validate this, we further provide some visualization results in Figure 3. (1) We sample one episode in the test split of miniImageNet under the 5-way 5-shot setting and obtain the embeddings of all images using the trained models of ProtoNet†, ProtoNet† $^ +$ CEAM, and our MELR (i.e., ProtoNet† $^ { + }$ CEAM+CECR), respectively. We then apply tSNE to project these embeddings into a 2-dimensional space in Figure 3(a) – 3(c). Across three subfigures, samples with the same color belong to the same class and diamonds are class prototypes/centers. We can observe that adding CEAM makes the distribution of different classes more separable (see Figure 3(b) vs. 3(a)), validating the effectiveness of our CEAM. Moreover, the embeddings obtained by our MELR are clearly much more evenly distributed with the prototypes right in the center, indicating less outlying instances (see Figure 3(c) vs. 3(b)). This shows that when CECR is combined with CEAM, those badly-sampled shots in Figure 3(a) are now pulled back to the center of the class distributions. (2) We also visualize the attention maps over the meta-test episode using our trained MELR. Since we take all samples in the episode as ‘queries’, and support samples as ‘keys’ and ‘values’ for CEAM when meta-testing, each of 100 samples has a 25-dimensional weight vector under the 5-way 5-shot setting. For each weight vector, we average the weights of the same class and obtain a 5-dimensional vector. For 75 query samples, we average the vectors of samples with the same class, resulting in a $5 \times 5$ instance attention map (see Figure 3(d)). Similarly, we obtain the attention map for 25 support samples (see Figure 3(e)). It can be seen that the two attention maps are very much alike, indicating that support and query sample embeddings are transformed by our CEAM in a similar way, which thus brings performance improvements for FSL.
|
| 157 |
+
|
| 158 |
+
# 5 CONCLUSION
|
| 159 |
+
|
| 160 |
+
We have investigated the challenging problem of how to counter the negative effects of badlysampled few shots for FSL. For the first time, we propose to exploit the underlying relationships between training episodes with identical sets of classes explicitly for meta-learning. This is achieved by two key components: CEAM is designed for neutralizing unrepresentative support set instances, and CECR is to enforce the prediction consistency of few-shot classifiers obtained in the two episodes. Extensive experiments for non-transductive standard FSL on two benchmarks show that our MELR achieves $1 . 0 \% { - } 5 . 0 \%$ improvements over the baseline (i.e., ProtoNet) used for FSL in our model and outperforms the latest competitors under the same settings.
|
| 161 |
+
|
| 162 |
+
# ACKNOWLEDGMENTS
|
| 163 |
+
|
| 164 |
+
This work was supported in part by National Natural Science Foundation of China (61976220 and 61832017), Beijing Outstanding Young Scientist Program (BJJWZYJH012019100020098), Open Project Program Foundation of Key Laboratory of Opto-Electronics Information Processing, Chinese Academy of Sciences (OEIP-O-202006), and Alibaba Innovative Research (AIR) Program.
|
| 165 |
+
|
| 166 |
+
REFERENCES
|
| 167 |
+
Gagne Christian Afrasiyabi Arman, Lalonde Jean-Franc¸ois. Associative alignment for few-shot image classifi- ´ cation. ECCV, 2020.
|
| 168 |
+
Kelsey R. Allen, Evan Shelhamer, Hanul Shin, and Joshua B. Tenenbaum. Infinite mixture prototypes for few-shot learning. In ICML, pp. 232–241, 2019.
|
| 169 |
+
Maria-Luiza Antonie, Osmar R Zaiane, and Alexandru Coman. Application of data mining techniques for medical image classification. In International Conference on Multimedia Data Mining, pp. 94–101, 2001.
|
| 170 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
|
| 171 |
+
Luca Bertinetto, Joao F. Henriques, Philip H. S. Torr, and Andrea Vedaldi. Meta-learning with differentiable ˜ closed-form solvers. In ICLR, 2019.
|
| 172 |
+
Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE TPAMI, 40(4):834–848, 2018.
|
| 173 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pp. 1126–1135, 2017.
|
| 174 |
+
Spyros Gidaris and Nikos Komodakis. Generating classification weights with GNN denoising autoencoders for few-shot learning. In CVPR, pp. 21–30, 2019.
|
| 175 |
+
Spyros Gidaris, Andrei Bursuc, Nikos Komodakis, Patrick Perez, and Matthieu Cord. Boosting few-shot visual learning with self-supervision. In ICCV, pp. 8059–8068, 2019.
|
| 176 |
+
Yiluan Guo and Ngai-Man Cheung. Attentive weights generation for few shot learning via information maximization. In CVPR, pp. 13496–13505, 2020.
|
| 177 |
+
Bharath Hariharan and Ross B. Girshick. Low-shot visual recognition by shrinking and hallucinating features. In ICCV, pp. 3037–3046, 2017.
|
| 178 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016a.
|
| 179 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016b.
|
| 180 |
+
Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. CoRR, abs/1503.02531, 2015.
|
| 181 |
+
Ruibing Hou, Hong Chang, Bingpeng Ma, Shiguang Shan, and Xilin Chen. Cross attention network for fewshot classification. In Advances in Neural Information Processing Systems, pp. 4005–4016, 2019.
|
| 182 |
+
Jongmin Kim, Taesup Kim, Sungwoong Kim, and Chang D. Yoo. Edge-labeling graph neural network for few-shot learning. In CVPR, pp. 11–20, 2019.
|
| 183 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 184 |
+
A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pp. 1097–1105, 2012.
|
| 185 |
+
Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In CVPR, pp. 10657–10665, 2019.
|
| 186 |
+
Hongyang Li, David Eigen, Samuel Dodge, Matthew Zeiler, and Xiaogang Wang. Finding task-relevant features for few-shot learning by category traversal. In CVPR, pp. 1–10, 2019a.
|
| 187 |
+
Huai-Yu Li, Weiming Dong, Xing Mei, Chongyang Ma, Feiyue Huang, and Bao-Gang Hu. Lgm-net: Learning to generate matching networks for few-shot learning. In ICML, pp. 3825–3834, 2019b.
|
| 188 |
+
Kai Li, Yulun Zhang, Kunpeng Li, and Yun Fu. Adversarial feature hallucination networks for few-shot learning. In CVPR, pp. 13467–13476, 2020.
|
| 189 |
+
Wenbin Li, Lei Wang, Jinglin Xu, Jing Huo, Yang Gao, and Jiebo Luo. Revisiting local descriptor based image-to-class measure for few-shot learning. In CVPR, pp. 7260–7268, 2019c.
|
| 190 |
+
|
| 191 |
+
Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few shot learning. CoRR, abs/1707.09835, 2017.
|
| 192 |
+
|
| 193 |
+
Bin Liu, Yue Cao, Yutong Lin, Qi Li, Zheng Zhang, Mingsheng Long, and Han Hu. Negative margin matters: Understanding margin in few-shot classification. ECCV, 2020.
|
| 194 |
+
|
| 195 |
+
Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sung Ju Hwang, and Yi Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. In ICLR, 2019.
|
| 196 |
+
|
| 197 |
+
Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pp. 3431–3440, 2015.
|
| 198 |
+
|
| 199 |
+
Tsendsuren Munkhdalai and Hong Yu. Meta networks. In ICML, pp. 2554–2563, 2017.
|
| 200 |
+
|
| 201 |
+
Van Nhan Nguyen, Sigurd Lokse, Kristoffer Wickstr ´ om, Michael Kampffmeyer, Davide Roverso, and Robert ´ Jenssen. Sen: A novel feature normalization dissimilarity measure for prototypical few-shot learning networks. ECCV, 2020.
|
| 202 |
+
|
| 203 |
+
Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. CoRR, abs/1803.02999, 2018.
|
| 204 |
+
|
| 205 |
+
Boris Oreshkin, Pau Rodr´ıguez Lopez, and Alexandre Lacoste. Tadam: Task dependent adaptive metric for ´ improved few-shot learning. In Advances in Neural Information Processing Systems, pp. 721–731, 2018.
|
| 206 |
+
|
| 207 |
+
Limeng Qiao, Yemin Shi, Jia Li, Yaowei Wang, Tiejun Huang, and Yonghong Tian. Transductive episodic-wise adaptive metric for few-shot learning. In ICCV, pp. 3603–3612, 2019.
|
| 208 |
+
|
| 209 |
+
Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan L. Yuille. Few-shot image recognition by predicting parameters from activations. In CVPR, pp. 7229–7238, 2018.
|
| 210 |
+
|
| 211 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017.
|
| 212 |
+
|
| 213 |
+
Avinash Ravichandran, Rahul Bhotika, and Stefano Soatto. Few-shot learning with embedded class models and shot-free meta training. In ICCV, pp. 331–339, 2019.
|
| 214 |
+
|
| 215 |
+
Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, pp. 779–788, 2016.
|
| 216 |
+
|
| 217 |
+
Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018.
|
| 218 |
+
|
| 219 |
+
Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, pp. 91–99, 2015.
|
| 220 |
+
|
| 221 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet large scale visual recognition challenge. IJCV, 115(3):211–252, 2015.
|
| 222 |
+
|
| 223 |
+
Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In ICLR, 2019.
|
| 224 |
+
|
| 225 |
+
Victor Garcia Satorras and Joan Bruna Estrach. Few-shot learning with graph neural networks. In ICLR, 2018.
|
| 226 |
+
|
| 227 |
+
Eli Schwartz, Leonid Karlinsky, Joseph Shtok, Sivan Harary, Mattias Marder, Abhishek Kumar, Rogerio Schmidt Feris, Raja Giryes, and Alexander M. Bronstein. Delta-encoder: an effective sample´ synthesis method for few-shot object recognition. In Advances in Neural Information Processing Systems, pp. 2850–2860, 2018.
|
| 228 |
+
|
| 229 |
+
Christian Simon, Piotr Koniusz, Richard Nock, and Mehrtash Harandi. Adaptive subspaces for few-shot learning. In CVPR, pp. 4136–4145, 2020.
|
| 230 |
+
|
| 231 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 232 |
+
|
| 233 |
+
Jake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pp. 4080–4090, 2017.
|
| 234 |
+
|
| 235 |
+
Qianru Sun, Yaoyao Liu, Tat-Seng Chua, and Bernt Schiele. Meta-transfer learning for few-shot learning. In CVPR, pp. 403–412, 2019.
|
| 236 |
+
|
| 237 |
+
Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip H. S. Torr, and Timothy M. Hospedales. Learning to compare: Relation network for few-shot learning. In CVPR, pp. 1199–1208, 2018.
|
| 238 |
+
Yonglong Tian, Yue Wang, Dilip Krishnan, Joshua B Tenenbaum, and Phillip Isola. Rethinking few-shot image classification: a good embedding is all you need? ECCV, 2020.
|
| 239 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017.
|
| 240 |
+
Oriol Vinyals, Charles Blundell, Tim Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pp. 3630–3638, 2016.
|
| 241 |
+
C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The caltech-ucsd birds-200-2011 dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011.
|
| 242 |
+
Yu-Xiong Wang, Ross B. Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In CVPR, pp. 7278–7286, 2018.
|
| 243 |
+
Ziyang Wu, Yuwei Li, Lihua Guo, and Kui Jia. Parn: Position-aware relation networks for few-shot learning. In ICCV, pp. 6659–6667, 2019.
|
| 244 |
+
Chen Xing, Negar Rostamzadeh, Boris Oreshkin, and Pedro O O. Pinheiro. Adaptive cross-modal few-shot learning. In NIPS, pp. 4847–4857, 2019.
|
| 245 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, pp. 2048–2057, 2015.
|
| 246 |
+
Ling Yang, Liangliang Li, Zilun Zhang, Xinyu Zhou, Erjin Zhou, and Yu Liu. DPGN: distribution propagation graph network for few-shot learning. In CVPR, pp. 13387–13396, 2020.
|
| 247 |
+
Shulin Yang, Liefeng Bo, Jue Wang, and Linda G Shapiro. Unsupervised template learning for fine-grained object recognition. In Advances in Neural Information Processing Systems, pp. 3122–3130, 2012.
|
| 248 |
+
Han-Jia Ye, Hexiang Hu, De-Chuan Zhan, and Fei Sha. Few-shot learning via embedding adaptation with set-to-set functions. In CVPR, 2020.
|
| 249 |
+
Sung Whan Yoon, Jun Seo, and Jaekyun Moon. Tapnet: Neural network augmented with task-adaptive projection for few-shot learning. In ICML, pp. 7115–7123, 2019.
|
| 250 |
+
Chi Zhang, Yujun Cai, Guosheng Lin, and Chunhua Shen. Deepemd: Few-shot image classification with differentiable earth mover’s distance and structured classifiers. In CVPR, pp. 12203–12213, 2020.
|
| 251 |
+
|
| 252 |
+
# A APPENDIX
|
| 253 |
+
|
| 254 |
+
# A.1 DETAILS ABOUT CECR ALTERNATIVES
|
| 255 |
+
|
| 256 |
+
For the cross-episode consistency regularization (CECR) loss $L _ { c e c r }$ in Eq. (7), we compare the knowledge distillation (KD) loss to the negative cosine similarity (NegCos), the L2 distance, and the symmetric Kullback-Leibler (KL) divergence (SymKL) in the main paper. Here we give the details about three CECR alternatives. Concretely, let $\sigma ^ { ( 1 ) } ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } )$ (or $\sigma ^ { ( 2 ) } ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ) ;$ denote the normalized vector of $f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 1 ) } )$ (or $f ( \hat { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \hat { \mathbf { S } } ^ { ( 2 ) } ) )$ using softmax, we then have
|
| 257 |
+
|
| 258 |
+
$$
|
| 259 |
+
\begin{array} { r l } & { L _ { c c e } ^ { ( N , q , \mathcal { C } ) G 3 } = \varmathbb { E } _ { ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) \in \varDelta _ { c } ^ { ( 1 , 2 ) } } \mathrm { P e g } C \cos ( f ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \tilde { \mathbf { S } } ^ { ( 1 ) } ) , f ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \tilde { \mathbf { S } } ^ { ( 2 ) } ) ) } \\ & { \qquad = \mathbb { E } _ { ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) \in \varDelta _ { c } ^ { ( 1 , 2 ) } } - \frac { \mathcal { C } ^ { ( N , 1 ) } ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ) \mathcal { S } ^ { ( 2 ) } ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ) } { \| \mathcal { C } ^ { ( 1 , 2 ) } \| } , \sigma ^ { ( 2 ) } ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ) > } \\ & { L _ { c c e } ^ { ( L _ { c } ^ { ( 2 ) } ) } = \mathbb { E } _ { ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) \in \varDelta _ { c } ^ { ( 1 , 2 ) } } \mathrm { L } 2 ( f ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \tilde { \mathbf { S } } ^ { ( 1 ) } ) ) , f ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \tilde { \mathbf { S } } ^ { ( 2 ) } ) ) | } \\ & { \qquad = \mathbb { E } _ { ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } , y _ { i } ^ { ( 1 , 2 ) } ) \in \varDelta _ { c } ^ { ( 1 , 2 ) } } \mathrm { L } 2 ( f ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \tilde { \mathbf { S } } ^ { ( 1 ) } ) , f ( \tilde { \mathbf { q } } _ { i } ^ { ( 1 , 2 ) } ; \tilde { \mathbf { S } } ^ { ( 2 ) } ) ) } \\ & L _ { c c e } ^ { ( s y m K L ) } = \mathbb { E } _ \end{array}
|
| 260 |
+
$$
|
| 261 |
+
|
| 262 |
+
$< \cdot , \cdot >$ nner(u, f two vectors, are two unno $T$ is the temperature paraalized scoring vectors, eter, anddenotes ${ \bf K L } ( { \bf u } , { \bf v } ) =$ $\begin{array} { r } { \sum _ { j = 1 } ^ { N } \sigma _ { j } ( \mathbf { u } ) \log \frac { \sigma _ { j } ( \mathbf { u } ) } { \sigma _ { j } ( \mathbf { v } ) } } \end{array}$ $\mathbf { v } \in \mathbb { R } ^ { N }$ $\sigma$ function, and $\sigma _ { j } ( { \mathbf { u } } )$ denotes the $j$ -th element of $\sigma ( \mathbf { u } )$
|
| 263 |
+
|
| 264 |
+
# A.2 MORE ABLATIVE RESULTS
|
| 265 |
+
|
| 266 |
+
In Table 2, we show more ablative results when the attention module is applied within each episode independently (named as Intra-Episode Attention Module (IEAM)). Concretely, IEAM is used for ProtoNet†+IEAM $^ \dagger$ means that ProtoNet is trained with two episodes in each training iteration for fair comparison) as follows $( \mathrm { i } = 1 , 2$ ):
|
| 267 |
+
|
| 268 |
+
$$
|
| 269 |
+
\hat { \mathbf { F } } ^ { ( i ) } = \mathrm { I E A M } ( \mathbf { F } ^ { ( i ) } , \mathbf { S } ^ { ( i ) } , \mathbf { S } ^ { ( i ) } ) = \mathbf { F } ^ { ( i ) } + \mathrm { s o f t m a x } ( \frac { \mathbf { F } _ { Q } ^ { ( i ) } \mathbf { S } _ { K } ^ { ( i ) T } } { \sqrt { d } } ) \mathbf { S } _ { V } ^ { ( i ) } .
|
| 270 |
+
$$
|
| 271 |
+
|
| 272 |
+
We also add our Cross-Episode Consistency Regularization (CECR) for ProtoNet†+IEAM+CECR to see the performance when IEAM instead of our CEAM is adopted.
|
| 273 |
+
|
| 274 |
+
We can see from Table 2 that adding IEAM to the baseline ProtoNet† also improves its performance, but IEAM is not as beneficial as our CEAM (see ProtoNet†+IEAM vs. ProtoNet† $^ +$ CEAM). When our CECR is applied on top of ProtoNet†+IEAM (i.e., ProtoNet†+IEAM+CECR), the improvement is rather minor under the 5-way 1-shot setting and the result even gets worse under the 5-shot setting. However, our MELR can still benefit from CECR (see MELR vs. ProtoNet† $^ +$ CEAM), indicating that CECR is not suitable for IEAM and our CEAM is necessary.
|
| 275 |
+
|
| 276 |
+
Table 2: Comparative results when IEAM is used on miniImageNet. The average 5-way few-shot classification accuracies $\%$ , top-1) along with the $9 5 \%$ confidence intervals are reported.
|
| 277 |
+
|
| 278 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Backbone</td><td colspan="2">miniImageNet</td></tr><tr><td>1-shot</td><td> 5-shot</td></tr><tr><td>ProtoNet† (Snell et al., 2017)</td><td>Conv4-64</td><td>52.61 ± 0.42</td><td>71.33 ± 0.36</td></tr><tr><td>ProtoNet†+IEAM</td><td>Conv4-64</td><td>54.83 ± 0.43</td><td>71.81 ± 0.35</td></tr><tr><td>ProtoNet†+IEAM+CECR</td><td>Conv4-64</td><td>54.97 ± 0.44</td><td>71.72 ± 0.35</td></tr><tr><td>ProtoNet+ +CEAM (ours)</td><td>Conv4-64</td><td>55.01 ± 0.43</td><td>72.01 ± 0.35</td></tr><tr><td>MELR (ours)</td><td>Conv4-64</td><td>55.35 ± 0.43</td><td>72.27 ± 0.35</td></tr></table>
|
| 279 |
+
|
| 280 |
+

|
| 281 |
+
Figure 4: The first three subfigures in each row are the visualizations of data distributions obtained by ProtoNet†, ProtoNet $^ +$ CEAM, and ProtoNet† $\mathbf { \sigma } _ { + \mathbf { C E A M + C E C R } }$ (i.e., our MELR) for the same metatest episode, respectively. The last two subfigures in each row are the visualizations of attention maps for query and support sets, respectively. All results are obtained under the 5-way 5-shot setting on miniImageNet with Conv4-64 as the feature extractor.
|
| 282 |
+
|
| 283 |
+
# A.3 MORE VISUALIZATION RESULTS
|
| 284 |
+
|
| 285 |
+
Similar to Section 4.3, we provide more visualization results in Figure 4. (1) We sample five episodes (corresponding to five rows in Figure 4) in the test split of miniImageNet under the 5-way 5-shot setting and visualize the data distributions in the first three columns using the trained models of ProtoNet†, ProtoNet† $^ { + }$ CEAM, and our MELR (i.e., ProtoNet† $^ +$ CEAM+CECR), respectively. We can observe that adding CEAM makes the distributions of different classes more separable in the first four rows (see the second column vs. the first column), validating the effectiveness of our CEAM. Moreover, the embeddings obtained by our MELR are clearly much more evenly distributed with the prototypes generally right in the center, indicating less poorly-sampled instances (see the third column vs. the second column). Specifically, ProtoNet† $+$ CEAM brings an obvious outlying instance in the last row, but adding CECR stabilizes the training of CEAM. In a word, when CECR is combined with CEAM, the badly-sampled shots can be pulled back to the center of the class distributions. (2) We also visualize the attention maps over each meta-test episode using our trained MELR model. For each of the five episodes, we obtain two $5 \times 5$ attention maps for query and support sets in the last two subfigures of each row, respectively. It can be seen that the two attention maps in each row are very much alike, indicating that support and query sample embeddings are transformed by our CEAM in a similar way, which thus brings performance improvements for FSL.
|
| 286 |
+
|
| 287 |
+
Table 3: Comparative results of fine-grained FSL on CUB. The average 5-way few-shot classification accuracies ( $\%$ , top-1) along with the $9 5 \%$ confidence intervals are reported.
|
| 288 |
+
|
| 289 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Backbone</td><td colspan="2">CUB</td></tr><tr><td>1-shot</td><td> 5-shot</td></tr><tr><td>MatchingNet (Vinyals et al., 2016)</td><td>Conv4-64</td><td>61.16±0.89</td><td>72.86 ± 0.70</td></tr><tr><td>ProtoNet† (Snell et al., 2017)</td><td>Conv4-64</td><td>64.42 ± 0.48</td><td>81.82 ± 0.35</td></tr><tr><td>MAML (Finn et al., 2017)</td><td>Conv4-64</td><td>55.92 ± 0.95</td><td>72.09 ± 0.76</td></tr><tr><td>Relation Net (Sung et al., 2018)</td><td>Conv4-64</td><td>62.45 ± 0.98</td><td>76.11 ± 0.69</td></tr><tr><td>FEAT(Ye et al., 2020)</td><td>Conv4-64</td><td>68.87 ± 0.22</td><td>82.90 ± 0.15</td></tr><tr><td>ProtoNet† +CEAM (ours)</td><td>Conv4-64</td><td>68.92±0.50</td><td>84.54 ±0.32</td></tr><tr><td>MELR (ours)</td><td>Conv4-64</td><td>70.26 ± 0.50</td><td>85.01 士 0.32</td></tr></table>
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 5: Illustration of hyper-parameter analysis on the miniImageNet dataset. Conv4-64 is used as the feature extractor.
|
| 293 |
+
|
| 294 |
+
# A.4 RESULTS FOR FINE-GRAINED FSL
|
| 295 |
+
|
| 296 |
+
To evaluate our MELR under the fine-grained setting where the poorly-sampled shots may have greater negative impact since the classes are much more close, we conduct experiments on CUB200-2011 Birds (CUB) (Wah et al., 2011) with Conv4-64 as the feature extractor. CUB has 200 finegrained classes of birds and 11,788 images in total. We follow (Ye et al., 2020) and split the dataset into 100, 50, and 50 classes for training, validation, and test, respectively. For direct comparison, we also use the pre-trained backbone model released by (Ye et al., 2020), which is pre-trained on the training set. The comparative results in Table 3 show that: (1) Our MELR achieves the best results and improves over the second-best FEAT by $1 . 4 \% - 2 . 1 \%$ , validating the effectiveness of MELR under the fine-grained setting. (2) Our ProtoNe $\cdot ^ { \dagger } { + } \mathrm { C E A M }$ alone outperforms all the competitors, and adding CECR into ProtoNet $^ { \dag } +$ CEAM (i.e., our MELR) further brings noticeable improvements $( 0 . 5 \% - 1 . 3 \% )$ , indicating that both CEAM and CECR are crucial for fine-grained FSL.
|
| 297 |
+
|
| 298 |
+
# A.5 ANALYSIS OF HYPER-PARAMETER SENSITIVITY
|
| 299 |
+
|
| 300 |
+
As we have mentioned in Section 4.1, the hyper-parameters $\lambda$ and $T$ are respectively selected from $\{ 0 . 0 2 , 0 . 0 5 , 0 . 1 , 0 . 2 \}$ and $\{ 1 6 , 3 2 , 6 4 , 1 2 8 \}$ according to the validation performance of our MELR algorithm. Concretely, on miniImageNet (with Conv4-64 as the feature extractor), we choose $\lambda =$ 0.1 and $T = 1 2 8$ under the 5-way 1-shot setting, and choose $\lambda = 0 . 0 5$ and $T = 6 4$ under the 5-way 5-shot setting. In Figure 5, we further present our hyper-parameter analysis on miniImageNet. The results show that our algorithm is quite insensitive to these parameters.
|
| 301 |
+
|
| 302 |
+
Table 4: Results obtained by varying the number of episodes in each training iteration on miniImageNet (with Conv4-64 as the backbone). The average 5-way classification accuracies $( \%$ top-1) along with the $9 5 \%$ confidence intervals are reported.
|
| 303 |
+
|
| 304 |
+
<table><tr><td></td><td></td><td colspan="2">Implement. (1)</td><td colspan="2">Implement. (2)</td></tr><tr><td>Method</td><td>#Episodes</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>MELR</td><td>2</td><td>55.35 ± 0.43</td><td>72.27 ± 0.35</td><td>55.35 ± 0.43</td><td>72.27 ± 0.35</td></tr><tr><td>MELR</td><td>3</td><td>55.26 ± 0.44</td><td>71.88 ± 0.35</td><td>55.19 ± 0.43</td><td>71.90 ± 0.35</td></tr><tr><td>MELR</td><td>4</td><td>55.15 ± 0.43</td><td>71.63 ± 0.35</td><td>55.03 ± 0.44</td><td>71.76 ± 0.35</td></tr></table>
|
| 305 |
+
|
| 306 |
+
Table 5: Comparison regarding the number of parameters (‘K’ denotes $^ { \bullet } \times 1 0 ^ { 3 }$ ’ and ‘M’ denotes $^ { \bullet } \times 1 0 ^ { 6 } ^ { \bullet }$ ) among various FSL methods.
|
| 307 |
+
|
| 308 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Backbone</td><td rowspan="2">#Parameters</td><td colspan="2">miniImageNet</td></tr><tr><td>1-shot</td><td>5-shot</td></tr><tr><td>ProtoNet† (Snell et al., 2017)</td><td>Conv4-64</td><td>113.09K</td><td>52.78 ± 0.45</td><td>71.26 ± 0.36</td></tr><tr><td>PARN (Wu et al., 2019)</td><td>Conv4-64</td><td>405.49K</td><td>55.22 ± 0.84</td><td>71.55 ± 0.66</td></tr><tr><td>FEAT (Ye et al.,2020)</td><td>Conv4-64</td><td>129.66K</td><td>55.15 ± 0.20</td><td>71.61 ± 0.16</td></tr><tr><td>MELR (ours)</td><td>Conv4-64</td><td>129.66K</td><td>55.35 ± 0.43</td><td>72.27 ± 0.35</td></tr><tr><td>ProtoNet† (Snell et al., 2017)</td><td>ResNet-12</td><td>12.42M</td><td>62.41 ± 0.44</td><td>80.49±0.29</td></tr><tr><td>FEAT (Ye et al., 2020)</td><td>ResNet-12</td><td>14.06M</td><td>66.78 ± 0.20</td><td>82.05 ± 0.14</td></tr><tr><td>MELR (ours)</td><td>ResNet-12</td><td>14.06M</td><td>67.40 ± 0.43</td><td>83.40 ± 0.28</td></tr></table>
|
| 309 |
+
|
| 310 |
+
# A.6 RESULTS BY VARYING THE NUMBER OF EPISODES
|
| 311 |
+
|
| 312 |
+
We also conduct experiments by varying the number of episodes $N _ { e }$ in each training iteration. For the implementation of CEAM, we have two slightly different choices. Concretely, for each episode $e ^ { ( i ) }$ $( i = 1 , \cdots , N _ { e } )$ , the output of CEAM can be defined as:
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\hat { \mathbf { F } } ^ { ( i ) } = \frac { 1 } { N _ { e } - 1 } \sum _ { \substack { j = 1 , \cdots , N _ { e } , j \neq i } } \mathbf { C E A M } ( \mathbf { F } ^ { ( i ) } , \mathbf { S } ^ { ( j ) } , \mathbf { S } ^ { ( j ) } ) ;
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
where $[ \mathbf { S } ^ { ( j ) } ] _ { j = 1 , j \neq i } ^ { N _ { e } } \in \mathbb { R } ^ { N K ( N _ { e } - 1 ) \times d }$ is the concatenation of $\mathbf { S } ^ { ( j ) } \in \mathbb { R } ^ { N K \times d } ( j = 1 , \cdots , i - 1 , i +$ $1 , \cdots , N _ { e } )$ . As for CECR, we determine the episode with the best accuracy as the teacher and distill knowledge to the rest $N _ { e } - 1$ student episodes.
|
| 319 |
+
|
| 320 |
+
The results on miniImageNet using Conv4-64 in Table 4 show that the performance drops slightly as the number of episodes in each training iteration increases for both implementations. One possible explanation is that too much training data make the model fit better on the training set but fail to improve its generalization ability on novel classes.
|
| 321 |
+
|
| 322 |
+
# A.7 COMPARISON REGARDING THE NUMBER OF PARAMETERS
|
| 323 |
+
|
| 324 |
+
We select several representative/latest FSL models from Table 1 of the main paper and list their numbers of parameters in Table 5. We can observe that: (1) With an extra CEAM in addition to the backbone (Conv4-64 or ResNet-12), our MELR has about $1 3 \% - 1 5 \%$ relatively more parameters than the baseline ProtoNet. Note that CECR (in our MELR) leads to no extra parameters. Considering the (statistically) significant improvements achieved by our MELR over ProtoNet, we think that our MELR is cost-effective because it requires not much additional parameters. (2) The number of MELR’s parameters is almost the same as that of FEAT’s and is much less than that of PARN’s, but our MELR achieves better results than FEAT and PARN, indicating that our MELR is the most cost-effective among these three methods.
|
| 325 |
+
|
| 326 |
+

|
| 327 |
+
Figure 6: Schematic illustration of our CEAM with a pair of episodes as its input. For easy understanding (but without loss of generality), a toy visual example is considered: only one outlying instance $x$ exists in the support set ${ \mathcal { S } } ^ { ( 1 ) }$ of the first episode, but the support set $S ^ { ( 2 ) }$ of the second episode is properly sampled. Since ${ \tilde { S } } ^ { ( 1 ) } { = } S ^ { ( 1 ) } \setminus \{ x \}$ and $S ^ { ( 2 ) }$ have similar data distributions (from the same classes), the outlying instance $x$ is pulled back to $\tilde { S } ^ { ( 1 ) }$ by attending on it with $S ^ { ( 2 ) }$ (which can not be done by attending on it with ${ \mathcal { S } } ^ { ( 1 ) }$ ), i.e., its negative effect is mitigated by our CEAM.
|
| 328 |
+
|
| 329 |
+
Table 6: Results by inputting only support samples as ‘queries’ into CEAM (denote as ‘Support Support’) on miniImageNet.
|
| 330 |
+
|
| 331 |
+
<table><tr><td>Method</td><td>Backbone</td><td>1-shot</td><td>5-shot</td></tr><tr><td>ProtoNett</td><td>Conv4-64</td><td>52.61 ± 0.42</td><td>71.33 ± 0.36</td></tr><tr><td>ProtoNet†+CEAM (Support →→ Support)</td><td>Conv4-64</td><td>54.79 ± 0.43</td><td>71.40 ± 0.36</td></tr><tr><td>ProtoNet† +CEAM (Support → All, ours)</td><td>Conv4-64</td><td>55.01 ± 0.43</td><td>72.01 ±0.35</td></tr></table>
|
| 332 |
+
|
| 333 |
+
# A.8 SCHEMATIC ILLUSTRATION OF CEAM
|
| 334 |
+
|
| 335 |
+
To demonstrate how our proposed CEAM can alleviate the negative effect of the poorly sampled shots, we present a schematic illustration of CEAM with a pair of episodes as its input in Figure 6. For easy understanding (but without loss of generality), a toy visual example is considered: only one outlying instance $x$ exists in the support set ${ \mathcal { S } } ^ { ( 1 ) }$ of the first episode, but the support set $\bar { S ^ { ( 2 ) } }$ of the second episode is properly sampled. Since the two episodes are sampled from the same set of classes, the data distributions of $\tilde { S } ^ { ( 1 ) } = S ^ { ( 1 ) } \setminus \{ x \}$ and $S ^ { ( 2 ) }$ are similar. On one hand, when ${ \mathcal { S } } ^ { ( 1 ) }$ (including the outlier $x$ ) is used as keys and values to update $S ^ { ( 2 ) }$ , the distribution of $S ^ { ( 2 ) }$ will not be influenced too much by the outlier $x$ since all the shots in $S ^ { ( 2 ) }$ are far away from $x$ and the weights on $x$ will be very small. That is, our CEAM is insensitive to few outliers in the keys and values. On the other hand, when ${ \mathcal { S } } ^ { ( 1 ) }$ is transformed based on $S ^ { ( 2 ) }$ , the distribution of $\tilde { \cal S } ^ { ( \mathrm { 1 } ) }$ will be changed little (the data distributions of $\tilde { S } ^ { ( 1 ) }$ and $S ^ { ( 2 ) }$ are similar). Particularly, for the outlier $x$ , its updated embedding $\hat { \bf x }$ will be pulled back to $\tilde { S } ^ { ( 1 ) }$ (i.e., its negative effect is mitigated) since $\hat { \mathbf { x } } = \mathbf { C E A M } ( \mathbf { x } , \mathbf { S } ^ { ( 2 ) } , \mathbf { S } ^ { ( 2 ) } ) \approx \mathbf { x } + \mathbf { W S } ^ { ( 2 ) } \approx \mathbf { x } + \tilde { \mathbf { W } } \tilde { \mathbf { S } } ^ { ( 1 ) }$ , where $\mathbf { x }$ is the original embedding of $x$ , $\mathbf { S } ^ { ( 2 ) }$ and $\tilde { \mathbf { S } } ^ { ( 1 ) }$ are respectively the feature matrices of $S ^ { ( 2 ) }$ and $\tilde { S } ^ { ( 1 ) }$ , $\mathbf { W }$ and $\tilde { \mathbf { W } }$ are two normalized weight matrices. Note that this cannot be done by attending on $\mathbf { x }$ with $\mathbf { S } ^ { ( 1 ) }$ .
|
| 336 |
+
|
| 337 |
+
Additionally, we provide the results obtained by an extra CEAM alternative in Table 6: only the embeddings of support samples are transformed (denoted as ‘Support Support’) instead of transforming all samples as our choice. We can see from Table 6 and also Figure 2(b) that our choice (i.e., Support $ \mathrm { A l l }$ ) achieves the best results among all CEAM alternatives. One possible explanation for why we resort to updating all samples is that transforming support and query samples into the same embedding space is beneficial to the model learning.
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 7: Visualization results of 10 meta-test episodes on miniImageNet under the 5-way 5-shot setting (Conv4-64 is used as the backbone). For each meta-test episode, we visualize three data distributions (from left to right) obtained by ProtoNet†, ProtoNet $\mathsf { I } _ { + \mathrm { C E A M } }$ , and our MELR, respectively. That is, each meta-test episode is denoted by three subfigures and each row has two episodes. In each subfigure, we compute the test accuracy over query samples and present it as the title.
|
| 341 |
+
|
| 342 |
+
# A.9 SIGNIFICANCE ANALYSIS OF CECR
|
| 343 |
+
|
| 344 |
+
Since CECR (in our MELR) requires no extra learnable parameters and only computes a loss for consistency constraint, it brings very limited computational cost. Empirically, the meta-training time of MELR is almost the same as that of ProtoNet†+CEAM, indicating that the performance improvement over ProtoNet†+CEAM is obtained by CECR at an extremely low cost.
|
| 345 |
+
|
| 346 |
+
To study when CECR has a significant impact on the final FSL performance, we select 10 meta-test episodes from the 2,000 ones used in the evaluation stage and visualize them in Figure 7. Concretely, for each of the 10 selected meta-test episodes, we visualize three data distributions (from left to right) obtained by ProtoNet†, ProtoNet† $^ +$ CEAM, and our MELR, respectively. That is, each meta-test episode is denoted by a group of three subfigures. In each subfigure, we compute the test accuracy over query samples and present it as the title. We can see that: (1) When the few-shot classification task is hard (i.e., ProtoNet† obtains relatively low accuracy), CEAM leads to significant improvements (about $3 \% - 9 \%$ ). (2) In the same hard situation, CECR further achieves significant improvements (about $5 \% - 8 \%$ ) on top of CEAM and shows its great effect on the final FSL performance. This indicates that CECR and CEAM are complementary to each other in hard situations, and thus both are crucial for solving the poor sampling problem in meta-learning based FSL.
|
| 347 |
+
|
| 348 |
+
# A.10 RESULTS OF TRANSDUCTIVE FSL
|
| 349 |
+
|
| 350 |
+
The main difference between standard and transductive FSL is whether query samples are tested one at a time or all simultaneously. As we have mentioned in Section 4.1, we evaluate our MELR model strictly following the non-transductive setting for standard FSL since the embedding of each query sample in the test episode is independently transformed using the keys and values coming from the support set. However, in this section, we further conduct experiments under the transductive FSL setting to study how well our MELR can make use of the unlabeled query samples.
|
| 351 |
+
|
| 352 |
+
Table 7: Comparative results of transductive FSL on miniImageNet. The average 5-way few-shot classification accuracies $\%$ , top-1) along with the $9 5 \%$ confidence intervals are reported. We cite the results of the competitors from (Ye et al., 2020).
|
| 353 |
+
|
| 354 |
+
<table><tr><td></td><td></td><td colspan="2">miniImageNet</td></tr><tr><td>Method</td><td>Backbone</td><td>1-shot</td><td>5-shot</td></tr><tr><td>StandardFSL:</td><td></td><td></td><td></td></tr><tr><td>ProtoNet† (Snell et al., 2017)</td><td>Conv4-64</td><td>52.78 ± 0.45</td><td>71.26 ± 0.36</td></tr><tr><td>MELR (ours)</td><td>Conv4-64</td><td>55.35 ± 0.43</td><td>72.27 ± 0.35</td></tr><tr><td>Transductive FSL:</td><td></td><td></td><td></td></tr><tr><td>Semi-ProtoNet (Ren et al., 2018)</td><td>Conv4-64</td><td>55.50 ± 0.10</td><td>71.76 ± 0.08</td></tr><tr><td>TPN (Liu et al., 2019)</td><td>Conv4-64</td><td>55.51 ± 0.84</td><td>69.86 ± 0.67</td></tr><tr><td>TEAM (Qiao et al., 2019)</td><td>Conv4-64</td><td>56.57</td><td>72.04</td></tr><tr><td>FEAT (Ye et al., 2020)</td><td>Conv4-64</td><td>57.04 ± 0.16</td><td>72.89 ± 0.20</td></tr><tr><td>ProtoNet†+CEAM (ours)</td><td>Conv4-64</td><td>60.30 ± 0.49</td><td>74.28 ± 0.36</td></tr><tr><td>MELR (ours)</td><td>Conv4-64</td><td>61.67 ± 0.51</td><td>74.87 ± 0.35</td></tr></table>
|
| 355 |
+
|
| 356 |
+

|
| 357 |
+
Figure 8: Visualization of the generalization ability of our MELR on the test split of miniImageNet under the 5-way 1-shot setting with Conv4-64 as the backbone. Note that we check the test performance of the model at each training epoch (i.e., every 100 training iterations).
|
| 358 |
+
|
| 359 |
+
Concretely, for each meta-test episode $e ^ { ( t e s t ) }$ , we input all samples (both support and query ones) as keys and values into the trained CEAM:
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\begin{array} { r } { \hat { \mathbf { F } } ^ { ( t e s t ) } = \mathrm { C E A M } ( { \mathbf { F } } ^ { ( t e s t ) } , { \mathbf { F } } ^ { ( t e s t ) } , { \mathbf { F } } ^ { ( t e s t ) } ) , } \end{array}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
such that the relationships of all unlabeled query samples can be taken into consideration. With the transformed embeddings, we make predictions for all query samples based on Semi-ProtoNet (Ren et al., 2018), which utilizes the unlabeled query samples to help construct better class prototypes and then makes predictions similar to ProtoNet. To match the meta-test process, we also make changes to meta-training accordingly. Specifically, for one episode (out of the two) in each training iteration, we use all samples from the other episode as keys and values for CEAM to update all of its own embeddings. This is followed by obtaining the prototypes based on Semi-ProtoNet as well as computing the FSL loss and CECR loss.
|
| 366 |
+
|
| 367 |
+
The results of transductive FSL on miniImageNet are shown in Table 7. It can be seen that: (1) By utilizing the unlabeled query samples under transductive FSL, our MELR achieves further improvements, as compared to MELR under standard FSL. Particularly, the performance improvement under 1-shot (i.e., $6 . 3 \%$ ) is more significant than that under 5-shot (i.e., $2 . 6 \%$ ), indicating that exploiting unlabeled query samples brings more benefits to FSL with less labeled support samples. (2) Our MELR achieves the best results among all the transductive FSL methods. Specifically, MELR outperforms FEAT by a large margin $( 2 . 0 \% - 4 . 6 \% )$ . Since FEAT also makes predictions based on Semi-ProtoNet, this clearly validates the effectiveness of our MELR under the transductive setting. (3) Our ProtoNet†+CEAM alone outperforms all the competitors, and adding CECR into ProtoNet†+CEAM (i.e., our MELR is obtained) further brings noticeable improvements $( 0 . 6 \% \mathrm { ~ - ~ }$ $1 . 4 \% )$ , indicating that both CEAM and CECR play important roles under transductive FSL.
|
| 368 |
+
|
| 369 |
+
A.11 VISUALIZATIONS OF THE GENERALIZATION ABILITY OF MELR
|
| 370 |
+
|
| 371 |
+
We further provide the visualization of the generalization ability of our MELR during meta-test in Figure 8. Concretely, we randomly sample 1,000 episode pairs from the test split of miniImageNet under the 5-way 1-shot setting, where the two episodes in each pair have identical sets of classes. We then compute the average 5-way classification accuracy over all 2,000 episodes (from the 1,000 episode pairs) and the average $L _ { c e c r }$ in Eq. (7) over all 1,000 episode pairs at each training epoch. We present the visualization results w.r.t. accuracy and CECR loss in Figure 8. As expected, the accuracy of our MELR is consistently higher than that of our baseline ProtoNet†. Moreover, as compared with ProtoNet†, the CECR loss of our MELR is also lower across the whole training process, indicating that MELR has better performance consistency between two episodes. This provides direct evidence that our CEAM and CECR can boost the generalization ability of the learned model on novel classes.
|
parse/train/D3PcGLdMx0/D3PcGLdMx0_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/D3PcGLdMx0/D3PcGLdMx0_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/D3PcGLdMx0/D3PcGLdMx0_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H12GRgcxg/H12GRgcxg.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TRAINING DEEP NEURAL-NETWORKS USING A NOISE ADAPTATION LAYER
|
| 2 |
+
|
| 3 |
+
Jacob Goldberger & Ehud Ben-Reuven
|
| 4 |
+
|
| 5 |
+
Engineering Faculty, Bar-Ilan University,
|
| 6 |
+
Ramat-Gan 52900, Israel
|
| 7 |
+
jacob.goldberger@biu.ac.il,udi.benreuven@gmail.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
The availability of large datsets has enabled neural networks to achieve impressive recognition results. However, the presence of inaccurate class labels is known to deteriorate the performance of even the best classifiers in a broad range of classification problems. Noisy labels also tend to be more harmful than noisy attributes. When the observed label is noisy, we can view the correct label as a latent random variable and model the noise processes by a communication channel with unknown parameters. Thus we can apply the EM algorithm to find the parameters of both the network and the noise and estimate the correct label. In this study we present a neural-network approach that optimizes the same likelihood function as optimized by the EM algorithm. The noise is explicitly modeled by an additional softmax layer that connects the correct labels to the noisy ones. This scheme is then extended to the case where the noisy labels are dependent on the features in addition to the correct labels. Experimental results demonstrate that this approach outperforms previous methods.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
The presence of class label noise inherent to training samples has been reported to deteriorate the performance of even the best classifiers in a broad range of classification problems (Nettleton et al. (2010), Pechenizkiy et al. (2006), Zhu & Wu (2004)). Noisy labels also tend to be more harmful than noisy attributes (Zhu & Wu (2004)). Noisy data are usually related to the data collection process. Typically, the labels used to train a classifier are assumed to be unambiguous and accurate. However, this assumption often does not hold since labels that are provided by human judgments are subjective. Many of the largest image datasets have been extracted from social networks. These images are labeled by non-expert users and building a consistent model based on a precisely labeled training set is very tedious. Mislabeling examples have been reported even in critical applications such as biomedical datasets where the available data are restricted (Alon et al. (1999)). A very common approach to noisy datasets is to remove the suspect samples in a preprocessing stage or have them relabeled by a data expert (Brodley & Friedl (1999)). However, these methods are not scalable and may run the risk of removing crucial examples that can impact small datasets considerably.
|
| 16 |
+
|
| 17 |
+
Variants that are noise robust have been proposed for the most common classifiers such as logisticregression and SVM (Frenay & Verleysen (2014), Jakramate & Kab ´ an (2012), Beigman & Klebanov ´ (2009)). However, classifiers based on label-noise robust algorithms are still affected by label noise. From a theoretical point of view, Bartlett et al. (2006) showed that most loss functions are not completely robust to label noise. Natarajan et al. (2013) proposed a generic unbiased estimator for binary classification with noisy labels. They developed a surrogate cost function that can be expressed by a weighted sum of the original cost functions, and provided asymptotic bounds for performance. Grandvalet & Bengio (2005) addressed the problem of missing labels that can be viewed as an extreme case of noisy label data. They suggested a semi-supervised algorithm that encourages the classifier to predict the non-labeled data with high confidence by adding a regularization term to the cost function. The problem of classification with label noise is an active research area. Comprehensive up-to-date reviews of both the theoretical and applied aspects of classification with label noise can be found in Frenay & Kaban (2014) and Fr ´ enay & Verleysen (2014). ´
|
| 18 |
+
|
| 19 |
+
In spite of the huge success of deep learning there are not many studies that have explicitly attempted to address the problem of Neural Net (NN) training using data with unreliable labels. Larsen et al. (1998) introduced a single noise parameter that can be calculated by adding a new regularization term and cross validation. Minh & Hinton (2012) proposed a more realistic noise model that depends on the true label. However, they only considered the binary classification case. Sukhbaatar & Fergus (2014) recently proposed adding a constrained linear layer at the top of the softmax layer, and showed that only under some strong assumptions can the linear layer be interpreted as the transition matrix between the true and noisy (observed) labels and the softmax output layer as the true probabilities of the labels. Reed et al. (2014) suggested handling the unreliability of the training data labels by maximizing the likelihood function with an additional classification entropy regularization term.
|
| 20 |
+
|
| 21 |
+
The correct unknown label can be viewed as a hidden random variable. Hence, it is natural to apply the EM algorithm where in the E-step we estimate the true label and in the M-step we retrain the network. Several variations of this paradigm have been proposed (e.g. Minh & Hinton (2012), Bekker & Goldberger (2016)). However, iterating between EM-steps and neural network training does not scale well. In this study we use latent variable probabilistic modeling but we optimize the likelihood score function within the framework of neural networks. Current noisy label approaches assume either implicitly or explicitly that, given the correct label, the noisy label is independent of the feature vector. This assumption is probably needed to simplify the modeling and derive applicable learning algorithms. However, in many cases this assumption is not realistic since a wrong annotation is more likely to occur in cases where the features are misleading. By contrast, our framework makes it easy to extend the proposed learning algorithm to the case where the noise is dependent on both the correct label and the input features. In the next section we describe a model formulation and review the EM based approach. In Section 3 we described our method which is based on adding another softmax layer to the network and in Section 4 we present our results.
|
| 22 |
+
|
| 23 |
+
# 2 A PROBABILISTIC FRAMEWORK FOR NOISY LABELS
|
| 24 |
+
|
| 25 |
+
Assume we want to train a multi-class neural-network soft-classifier $p ( y = i | x ; w )$ where $x$ is the feature vector, $w$ is the network parameter-set and $i$ is a member of the class-set $\{ 1 , . . . , k \}$ . We further assume that in the training process we cannot directly observe the correct label $y$ . Instead, we only have access to a noisy version of it denoted by $z$ . Here we follow the probabilistic modeling and the EM learning approach described in Bekker $\&$ Goldberger (2016). In this approach noise generation is assumed to be independent of the features and is modeled by a parameter $\theta ( i , j ) =$ ${ \bar { p } } ( z = j | y = i )$ . The noise distribution is unknown and we want to learn it as part of the training phase. The probability of observing a noisy label $z$ given the feature vector $x$ is:
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
p ( z = j | x ; w , \theta ) = \sum _ { i = 1 } ^ { k } p ( z = j | y = i ; \theta ) p ( y = i | x ; w )
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
where $k$ is the number of classes. The model is illustrated in the following diagram:
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
|
| 35 |
+
In the training phase we are given $n$ feature vectors $x _ { 1 } , . . . , x _ { n }$ with the corresponding noisy labels $z _ { 1 } , . . . , z _ { n }$ which are viewed as noisy versions of the correct hidden labels $y _ { 1 } , . . . , y _ { n }$ . The loglikelihood of the model parameters is:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
L ( w , \theta ) = \sum _ { t = 1 } ^ { n } \log ( \sum _ { i = 1 } ^ { k } p ( z _ { t } | y _ { t } = i ; \theta ) p ( y _ { t } = i | x _ { t } ; w ) )
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
Based on the training data, the goal is to find both the noise distribution $\theta$ and the Neural Network parameters $w$ that maximize the likelihood function. Since the random variables $y _ { 1 } , . . . , y _ { n }$ are hidden, we can apply the EM algorithm to find the maximum-likelihood parameter set. In the E-step of
|
| 42 |
+
|
| 43 |
+
each EM iteration we estimate the hidden true data labels based on the noisy labels and the current parameters:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
c _ { t i } = p ( y _ { t } = i | x _ { t } , z _ { t } ; w _ { 0 } , \theta _ { 0 } ) , \qquad i = 1 , . . . , k , \qquad t = 1 , . . . , n
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
where $w _ { 0 }$ and $\theta _ { 0 }$ are the current parameter estimations. In the M-step we update both the NN and the noisy channel parameters. The updated noise distribution has a closed-form solution.
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\theta ( i , j ) = \frac { \sum _ { t } c _ { t i } 1 _ { \{ z _ { t } = j \} } } { \sum _ { t } c _ { t i } } , \qquad i , j \in \{ 1 , . . . , k \}
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
The $k \times k$ matrix $\theta$ can be viewed as a confusion matrix between the soft estimates of the true label $\{ c _ { t i } | i = 1 , . . . , k \}$ and the observed noisy labels $z _ { t }$ . As part of the EM M-step, to find the updated NN parameter $w$ we need to maximize the following function:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
S ( w ) = \sum _ { t = 1 } ^ { n } \sum _ { i = 1 } ^ { k } c _ { t i } \log p ( y _ { t } = i | x _ { t } ; w )
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
which is a soft-version of the likelihood function of the fully observed case, based on the current estimate of the true labels. The back-propagation derivatives of the function (5) that we maximize in the M-step are:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
{ \frac { \partial S } { \partial u _ { i } } } = \sum _ { t = 1 } ^ { n } ( p ( y _ { t } = i | x _ { t } , z _ { t } ; w _ { 0 } , \theta _ { 0 } ) - p ( y _ { t } = i | x _ { t } ; w ) ) h ( x _ { t } )
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
such that $h$ is the final hidden layer and $u _ { 1 } , . . . , u _ { k }$ are the parameters of the soft-max output layer.
|
| 68 |
+
|
| 69 |
+
The method reviewed here is closely related to the work of Minh & Hinton (2012). They addressed the problem of mislabeled data points in a particular type of dataset (aerial images). The main difference is that in their approach they assumed that they do not learn the noise parameter. Instead they assume that the noise model can be separately tuned using a validation set or set by hand. Note that even if the true noise parameters are given, we still need the apply the EM iterative procedure. However, this assumption makes the interaction between the E-step and the NN learning much easier since each time a data-point $x _ { t }$ is visited we can compute the $\mathsf { \tilde { p } } ( y _ { t } = i | x _ { t } , z _ { t } )$ based on the current network parameters and the pre-defined noise parameters. Motivated by the need for model compression, Hinton et al. (2014) introduced an approach to learn a “distilled” model by training a more compact neural network to reproduce the output of a larger network. Using the notation defined above, in the second training stage they actually optimized the cost function: $S ( w ) =$ $\begin{array} { r } { \sum _ { t = 1 } ^ { n } \sum _ { i = 1 } ^ { k } p ( y _ { t } = i | x _ { t } ; w _ { 0 } , \theta _ { 0 } ) \log p ( y _ { t } = i ; x _ { t } ; w ) } \end{array}$ such that $w _ { 0 }$ is the parameter of the larger network that was trained using the labels $z _ { 1 } , . . . , z _ { n }$ , $w$ is the parameter of the smaller network and $\theta _ { 0 } ( i , j )$ in this case is a non-informative distribution (i.e. $\theta _ { 0 } ( \bar { i , } j ) = 1 / k$ ).
|
| 70 |
+
|
| 71 |
+
There are several drawbacks to the EM-based approach described above. The EM algorithm is a greedy optimization procedure that is notoriously known to get stuck in local optima. Another potential issue with combining neural networks and EM direction is scalability. The framework requires training a neural network in each iteration of the EM algorithm. For real-world, large-scale networks, even a single training iteration is a non-trivial challenge. Moreover, in many domains (e.g. object recognition in images) the number of labels is very large, so many EM iterations are likely to be needed for convergence. Another drawback of the probabilistic models is that they are based on the simplistic assumption that the noise error is only based on the true labels but not on the input features. In this study we propose a method for training neural networks with noisy labels that successfully addresses all these problems.
|
| 72 |
+
|
| 73 |
+
# 3 TRAINING DEEP NEURAL NETWORKS USING A NOISE ADAPTATION LAYER
|
| 74 |
+
|
| 75 |
+
In the previous section we utilized the EM algorithm to optimize the noisy-label likelihood function (2). In this section we describe an algorithm that optimizes the same function within the framework of neural networks. Assume the neural network classifier we are using is based on non-linear intermediate layers followed by a soft-max output layer used for soft classification. Denote the non-linear function applied on an input $x$ by $h = h ( x )$ and denote the soft-max layer that predicts the true $y$ label by:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
p ( y = i | x ; w ) = \frac { \exp ( u _ { i } ^ { \top } h + b _ { i } ) } { \sum _ { l = 1 } ^ { k } \exp ( u _ { l } ^ { \top } h + b _ { l } ) } , \qquad i = 1 , . . . , k
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
where $w$ is the network parameter-set (including the softmax layer). We next add another softmax output layer to predict the noisy label $z$ based on both the true label and the input features:
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
p ( z = j | y = i , x ) = \frac { \exp ( u _ { i j } ^ { \top } h + b _ { i j } ) } { \sum _ { l } \exp ( u _ { i l } ^ { \top } h + b _ { i l } ) }
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
p ( z = j | x ) = \sum _ { i } p ( z = j | y = i , x ) p ( y = i | x )
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
We can also define a simplified version where the noisy label only depends on the true label; i.e. we assume that labels flips are independent of $x$ :
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
p ( z = j | y = i ) = \frac { \exp ( b _ { i j } ) } { \sum _ { l } \exp ( b _ { i l } ) }
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
p ( z = j | x ) = \sum _ { i } p ( z = j | y = i ) p ( y = i | x )
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
We denote the two noise modeling variants as the complex model (c-model) (8) and the simple model (s-model) (10). Hereafter we use the notation $w _ { \mathrm { n o i s e } }$ for all the parameters of the second softmax layer which can be viewed as a noise adaptation layer.
|
| 102 |
+
|
| 103 |
+
In the training phase we are given $n$ feature vectors $x _ { 1 } , . . . , x _ { n }$ with corresponding noisy labels $z _ { 1 } , . . . , z _ { n }$ which are viewed as noisy versions of the correct hidden labels $y _ { 1 } , . . . , y _ { n }$ . The loglikelihood of the model parameters is:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
S ( w , w _ { \mathrm { n o i s e } } ) = \sum _ { t } \log p ( z _ { t } | x _ { t } ) = \sum _ { t } \log ( \sum _ { i } p ( z _ { t } | y _ { t } = i , x _ { t } ; w _ { \mathrm { n o i s e } } ) p ( y _ { t } = i | x _ { t } ; w ) )
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
Since the noise is modeled by adding another layer to the network, the score $S ( w , w _ { \mathrm { n o i s e } } )$ can be optimized using standard techniques for neural network training. By setting
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
p ( z = j | y = i ) = \theta ( i , j ) = \frac { \exp ( b _ { i j } ) } { \sum _ { l } \exp ( b _ { i l } ) } ,
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
it can easily verified that, by using either the EM algorithm (2) or the s-model neural network scheme (12), we are actually optimizing exactly the same function. Thus the neural network with the s-model noise adaptation layer provides an alternative optimization strategy to the EM algorithm. Instead of alternating between optimizing the noisy model and the network classifier, we consider them as components of the same network and optimize them simultaneously.
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 1: An illustration of the noisy-label neural network architecture for the training phase (above) and test phase (below).
|
| 119 |
+
|
| 120 |
+
Note that in the c-model, where the noise is also dependent on the input features, we can still apply the EM algorithm to learn the parameters of the additional noise layer. However, there is no closedform solution in the M-step for the optimal parameters and we need to apply neural-network training in the M-step to find the noise-layer parameters.
|
| 121 |
+
|
| 122 |
+
At test time we want to predict the true labels. Hence, we remove the last softmax layer that aims to get rid of the noise in the training set. We compute the true-label softmax estimation $p ( y = i | x ; w )$ (7). The proposed architecture for training the neural network based on training data with noisy labels is illustrated in Figure 1.
|
| 123 |
+
|
| 124 |
+
There are degrees of freedom in the two softmax layer model. Hence, a careful initialization of the parameters of the noise adaptation layer is crucial for successful convergence of the network into a good classifier of the correct labels at test time. We used the parameters of the original network to initialize the parameters of the s-model network that contains the noise adaptation level. We can initialize the softmax parameters of the s-model by assuming a small uniform noise:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
b _ { i j } = \log ( ( 1 - \epsilon ) 1 _ { \{ i = j \} } + \frac { \epsilon } { k - 1 } 1 _ { \{ i \neq j \} } )
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
such that $k$ is the number of different classes. A better procedure is to first train the original NN without the noise-adaptation layer, ignoring the fact that the labels are noisy. We can then treat the labels produced by the NN as the true labels and compute the confusion matrix on the train set and used it as an initial value for the bias parameters:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
b _ { i j } = \log ( \frac { \sum _ { t } 1 _ { \{ z _ { t } = j \} } p ( y _ { t } = i | x _ { t } ) } { \sum _ { t } p ( y _ { t } = i | x _ { t } ) } )
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
such that $x _ { 1 } , . . . , x _ { n }$ are the feature vectors of the training dataset and $z _ { 1 } , . . . , z _ { n }$ are the corresponding noisy labels. So far we have concentrated on parameter initialization for the s-model. The strategy that works best to initialize the c-model parameters is to use the parameters that were optimized for the s-model. In other words we set linear terms $u _ { i j }$ to zero and initialize the bias terms $b _ { i j }$ with the values that were optimized by the s-model.
|
| 137 |
+
|
| 138 |
+
The computational complexity of the proposed method is quadratic in the size of the class-set. Suppose there are $k$ classes to predict, in this case the proposed methods require $k + 1$ sets of softmax operations with a size of $k$ each. Hence there are scalability problems when the class set is large. As we explained in the previous paragraph, we initialized the second soft-max layer using the confusion matrix of the baseline system. The confusion matrix is a good estimation of the label noise. Assume the rows of the matrix correspond to the true labels and the matrix columns correspond to the noisy labels. The $l$ largest elements in the $i$ -th row are the most frequent noisy class values when the true class value is $i$ . We can thus connect the $i \cdot$ -th element in the first softmax layer only to its $l$ most probable noisy class candidates. Note that if we connect the $i$ -th label in the first softmax only to the $i$ -th label in the second softmax layer, the second softmax layer collapses to identity and we obtain the standard baseline model. Taking the $l$ most likely connections to the second softmax layer, we allow an additional $l - 1$ possible noisy labels for each correct label. We thus obtain a data driven sparsifying of the second softmax layer which solves the scalability problem since the complexity becomes linear in the number of classes instead of quadratic. In the experiment section we show that by using this approach there is not much deference in performance.
|
| 139 |
+
|
| 140 |
+
Our architecture, which is based on a concatenation of softmax layers, resembles the hierarchical softmax approach Morin & Bengio (2005) that replaces the flat softmax layer with a hierarchical layer that has the classes as leaves. This allowed them to decompose calculating the probability of the class into a sequence of probability calculations, which saves us from having to calculate the expensive normalization over all classes. The main difference between our approach and theirs (apart from the motivation) is that in our approach the true-label softmax layer is fully connected to the noisy-label layer. Sukhbaatar & Fergus (2014) suggested adding a linear layer to handle noisy labels. Their approach is similar to our s-model. In their approach, however, they proposed a different learning procedure.
|
| 141 |
+
|
| 142 |
+
# 4 EXPERIMENTS
|
| 143 |
+
|
| 144 |
+
In this section, we evaluate the robustness of deep learning to training data with noisy labels with and without explicit noise modeling. We first show results on the MNIST data-set with injected label noise in our experiments. The MNIST is a database of handwritten digits, which consists of $2 8 \times 2 8$ images. The dataset has 60k images for training and 10k images for testing. We used a two hidden layer NN comprised of 500 and 300 neurons. The non-linear activation we used was ReLU and we used dropout with parameter 0.5. We trained the network using the Adam optimizer (Kingma & Ba (2014)) with default parameters, which we found to converge more quickly and effectively than SGD. We used a mini-batch size of 256. These settings were kept fixed for all the experiments described below. In addition to a network that is based on fully connected layers, we also applied a network based on a CNN architecture. The results we obtained in the two architectures were similar. The network we implemented is publicly available 1.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 2: Test classification accuracy results on the MNIST dataset as a function of the noise level. The results are shown for several training data sizes $( 2 0 \% , 5 0 \% , 1 0 0 \% )$ of the training subset.
|
| 148 |
+
|
| 149 |
+
We generated noisy data from clean data by stochastically changing some of the labels. We converted each label with probability $p$ to a different label according to a predefined permutation. We used the same permutation as in Reed et al. (2014). The labels of the test data remained, of course, unperturbed to validate and compare our method to the regular approach.
|
| 150 |
+
|
| 151 |
+
We compared the proposed noise robust models to other model training strategies. The first network was the baseline approach that ignores the fact that the labels of the training data are unreliable. Denote the observed noisy label by $z$ and the softmax decision by $q _ { 1 } , . . . , q _ { k }$ . The baseline loglikelihood score (for a single input) is:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
S = \sum _ { i } 1 _ { \{ z = i \} } \log ( q _ { i } )
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+

|
| 158 |
+
Figure 3: Test classification accuracy results on the CIFAR-100 dataset as a function of the noise level. The results are shown for several training data sizes $( 2 0 \% , 5 0 \% , 1 0 0 \% )$ of the training subset for a CNN network architecture).
|
| 159 |
+
|
| 160 |
+
We also implemented two variants of the noise robust approach proposed by Reed et al. (2014). They suggested a soft version
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\beta S - ( 1 - \beta ) H ( q ) = \beta \sum _ { i } 1 _ { \{ z = i \} } \log ( q _ { i } ) + ( 1 - \beta ) \sum _ { i } q _ { i } \log ( q _ { i } )
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
and a hard version:
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\beta S + ( 1 - \beta ) \operatorname* { m a x } _ { i } \log ( q _ { i } )
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
In their experiments they took $\beta = 0 . 8$ for the hard version and $\beta = 0 . 9 5$ for the soft version, and observed that the hard version provided better results. Finally we implemented the two variants of our approach; namely, the noise modeling based only on the labels (s-model) and the noise modeling that was also based on the features (c-model).
|
| 173 |
+
|
| 174 |
+
Figure 2 depicts the comparative test errors results as a function of the fractions of noise. The results are shown for three different sizes of training data i.e. $( 2 0 \% , 5 0 \% , 1 0 0 \% )$ of the MNIST training subset. Bootstrapping was used to compute confidence intervals around the mean. For 1000 times, $N = 1 0$ samples were randomly drawn with repeats from the $N$ available samples and mean was computed. The confidence interval was taken to be the $2 . 5 \%$ and $9 7 . 5 \%$ percentiles of this process.
|
| 175 |
+
|
| 176 |
+
The results show that all the methods that are explicitly aware of the noise in the labels are better than the baseline which is the standard training approach. We revalidated the results reported in Reed et al. (2014) and showed that the hard version of their method performs better than the soft version. In all cases our models performed better than the alternatives. In most cases the c-model was better than the s-model. In the case where the entire dataset was used for training, we can see from the results that there was a phase transition phenomenon. We obtained almost perfect classification results until the noise level was high and there was a sudden strong performance drop. Analyzing why this effect occurred is left for future research.
|
| 177 |
+
|
| 178 |
+
We next show the results on the CIFAR-100 image dataset Krizhevsky & Hinton (2009) which consists of $3 2 \times 3 2$ color images arranged in 100 classes containing 600 images each. There are 500 training images and 100 testing images per class. We used raw images directly without any preprocessing or augmentation. We generated noisy data from clean data by stochastically changing some of the labels. We converted each one of the 100 labels with probability $p$ to a different label according to a predefined permutation. The labels of the test data remained, of course, unperturbed to validate and compare our method to the regular approach. We used a CNN network with two convolutional layers combined with ReLU activation and max-pooling, followed by two fully connected layers. Figure 3 depicts the comparative test errors results as a function of the fractions of noise for three different sizes of training data i.e. $( 2 0 \% , 5 0 \% , 1 0 0 \% )$ of the CIFAR-100 training subset. Bootstrapping was used to compute confidence intervals around the mean in the same way as for the MNIST experiment. The results showed that the proposed method works better than the alternatives. The simple model consistently provided the best results but when the noise level was very high the complex method tended to perform better.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 4: Test classification accuracy results on the CIFAR-100 dataset as a function of the noise level. The results of regular and sparse second softmax layers are shown for several training data sizes $( 2 0 \% , 5 0 \% , 1 0 0 \% )$ of the training subset .
|
| 182 |
+
|
| 183 |
+
We next report experimental results for the sparse variant of our method that remains efficient even when the class set is large. We demonstrate this on the case of the CIFAR-100 dataset which consists of 100 possible classes. For each class we only took the five most probable classes in the confusion matrix which is used to initialize the model parameter (see Section 3). As can be seen in Figure 4, sparsifying the second softmax layer did not not result in a drop in performance
|
| 184 |
+
|
| 185 |
+
# 5 CONCLUSION
|
| 186 |
+
|
| 187 |
+
In this paper we investigated the problem of training neural networks that are robust to label noise. We proposed an algorithm for training neural networks based solely on noisy data where the noise distribution is unknown. We showed that we can reliably learn the noise distribution from the noisy data without using any clean data which, in many cases, are not available. The algorithm can be easily combined with any existing deep learning implementation by simply adding another softmax output layer. Our results encourage collecting more data at a cheaper price, since mistaken data labels can be less harmful to performance. One possible future research direction would be to generalize our learning scheme to cases where both the features and the labels are noisy. We showed results on datasets with small and medium sized class-sets. Future research direction would be to evaluate the performance and efficiency of the proposed method on tasks with large class-sets.
|
| 188 |
+
|
| 189 |
+
# ACKNOWLEDGMENTS
|
| 190 |
+
|
| 191 |
+
This work is supported by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI).
|
| 192 |
+
|
| 193 |
+
# REFERENCES
|
| 194 |
+
|
| 195 |
+
U. Alon, N. Barkai, D. Notterman, K. Gish, S.and D. Mack, and A. Levine. Broad patterns of gene expression revealed by clustering analysis of tumor and normal colon tissues probed by oligonucleotide arrays. Proceedings of the National Academy of Sciences, 96(12):6745–6750, 1999.
|
| 196 |
+
P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, pp. 138–156, 2006.
|
| 197 |
+
E. Beigman and B. B. Klebanov. Learning with annotation noise. In ACL-IJCNLP, 2009.
|
| 198 |
+
A. Bekker and J. Goldberger. Training deep neural-networks based on unreliable labels. In IEEE Int.l Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2682–2686, 2016.
|
| 199 |
+
C. Brodley and M. Friedl. Identifying mislabeled training data. J. Artif. Intell. Res.(JAIR), 11: 131–167, 1999.
|
| 200 |
+
B. Frenay and A. Kaban. A comprehensive introduction to label noise. In ´ European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN), 2014.
|
| 201 |
+
B. Frenay and M. Verleysen. Classification in the presence of label noise: a survey. ´ IEEE Trans. on Neural Networks and Learning Systems, 25(5):845–869, 2014.
|
| 202 |
+
Y. Grandvalet and Y. Bengio. Semi-supervised learning by entropy minimization. In Advances in Neural Information Processing Systems (NIPS), 2005.
|
| 203 |
+
G.E. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning and Representation Learning Workshop, 2014.
|
| 204 |
+
B. Jakramate and A. Kaban. Label-noise robust logistic regression and its applications. In ´ Machine Learning and Knowledge Discovery in Databases, pp. 143–158. 2012.
|
| 205 |
+
D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 206 |
+
A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, Computer Science Department, University of Toronto, 2009.
|
| 207 |
+
J. Larsen, L. Nonboe, M. Hintz-Madsen, and K. L. Hansen. Design of robust neural network classifiers. In Int. Conf. on Acoustics, Speech and Signal Processing, pp. 1205–1208, 1998.
|
| 208 |
+
V. Minh and G. Hinton. Learning to label aerial images from noisy data. In Int. Conf. on Machine Learning (ICML), 2012.
|
| 209 |
+
F. Morin and Y. Bengio. Hierarchical probabilistic neural network language model. In Aistats, volume 5, pp. 246–252, 2005.
|
| 210 |
+
N. Natarajan, I. Dhillon, P. Ravikumar, and A. Tewari. Learning with noisy labels. In Advances in Neural Information Processing Systems (NIPS), 2013.
|
| 211 |
+
D. Nettleton, A. Orriols-Puig, and A. Fornells. A study of the effect of different types of noise on the precision of supervised learning techniques. Artificial intelligence review, 2010.
|
| 212 |
+
M. Pechenizkiy, A. Tsymbal, S. Puuronen, and O. Pechenizkiy. Class noise and supervised learning in medical domains: The effect of feature extraction. In Computer-Based Medical Systems (CBMS), 2006.
|
| 213 |
+
S. Reed, H. Lee, D. Anguelov, C. Szegedy, D. Erhan, and A. Rabinovich. Training deep neural networks on noisy labels with bootstrapping. In arXiv preprint arXiv:1412.6596, 2014.
|
| 214 |
+
S. Sukhbaatar and R. Fergus. Learning from noisy labels with deep neural networks. In arXiv preprint arXiv:1406.2080, 2014.
|
| 215 |
+
X. Zhu and X. Wu. Class noise vs. attribute noise: A quantitative study. Artificial Intelligence Review, 22(3):177–210, 2004.
|
parse/train/H12GRgcxg/H12GRgcxg_content_list.json
ADDED
|
@@ -0,0 +1,956 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "TRAINING DEEP NEURAL-NETWORKS USING A NOISE ADAPTATION LAYER ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
101,
|
| 9 |
+
821,
|
| 10 |
+
145
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Jacob Goldberger & Ehud Ben-Reuven ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
186,
|
| 19 |
+
170,
|
| 20 |
+
459,
|
| 21 |
+
184
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Engineering Faculty, Bar-Ilan University, \nRamat-Gan 52900, Israel \njacob.goldberger@biu.ac.il,udi.benreuven@gmail.com ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
183,
|
| 30 |
+
185,
|
| 31 |
+
674,
|
| 32 |
+
226
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "ABSTRACT ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
454,
|
| 42 |
+
262,
|
| 43 |
+
544,
|
| 44 |
+
277
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "The availability of large datsets has enabled neural networks to achieve impressive recognition results. However, the presence of inaccurate class labels is known to deteriorate the performance of even the best classifiers in a broad range of classification problems. Noisy labels also tend to be more harmful than noisy attributes. When the observed label is noisy, we can view the correct label as a latent random variable and model the noise processes by a communication channel with unknown parameters. Thus we can apply the EM algorithm to find the parameters of both the network and the noise and estimate the correct label. In this study we present a neural-network approach that optimizes the same likelihood function as optimized by the EM algorithm. The noise is explicitly modeled by an additional softmax layer that connects the correct labels to the noisy ones. This scheme is then extended to the case where the noisy labels are dependent on the features in addition to the correct labels. Experimental results demonstrate that this approach outperforms previous methods. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
296,
|
| 54 |
+
764,
|
| 55 |
+
489
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 INTRODUCTION ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
176,
|
| 65 |
+
522,
|
| 66 |
+
336,
|
| 67 |
+
537
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "The presence of class label noise inherent to training samples has been reported to deteriorate the performance of even the best classifiers in a broad range of classification problems (Nettleton et al. (2010), Pechenizkiy et al. (2006), Zhu & Wu (2004)). Noisy labels also tend to be more harmful than noisy attributes (Zhu & Wu (2004)). Noisy data are usually related to the data collection process. Typically, the labels used to train a classifier are assumed to be unambiguous and accurate. However, this assumption often does not hold since labels that are provided by human judgments are subjective. Many of the largest image datasets have been extracted from social networks. These images are labeled by non-expert users and building a consistent model based on a precisely labeled training set is very tedious. Mislabeling examples have been reported even in critical applications such as biomedical datasets where the available data are restricted (Alon et al. (1999)). A very common approach to noisy datasets is to remove the suspect samples in a preprocessing stage or have them relabeled by a data expert (Brodley & Friedl (1999)). However, these methods are not scalable and may run the risk of removing crucial examples that can impact small datasets considerably. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
556,
|
| 77 |
+
825,
|
| 78 |
+
736
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Variants that are noise robust have been proposed for the most common classifiers such as logisticregression and SVM (Frenay & Verleysen (2014), Jakramate & Kab ´ an (2012), Beigman & Klebanov ´ (2009)). However, classifiers based on label-noise robust algorithms are still affected by label noise. From a theoretical point of view, Bartlett et al. (2006) showed that most loss functions are not completely robust to label noise. Natarajan et al. (2013) proposed a generic unbiased estimator for binary classification with noisy labels. They developed a surrogate cost function that can be expressed by a weighted sum of the original cost functions, and provided asymptotic bounds for performance. Grandvalet & Bengio (2005) addressed the problem of missing labels that can be viewed as an extreme case of noisy label data. They suggested a semi-supervised algorithm that encourages the classifier to predict the non-labeled data with high confidence by adding a regularization term to the cost function. The problem of classification with label noise is an active research area. Comprehensive up-to-date reviews of both the theoretical and applied aspects of classification with label noise can be found in Frenay & Kaban (2014) and Fr ´ enay & Verleysen (2014). ´ ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
173,
|
| 87 |
+
743,
|
| 88 |
+
825,
|
| 89 |
+
922
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "In spite of the huge success of deep learning there are not many studies that have explicitly attempted to address the problem of Neural Net (NN) training using data with unreliable labels. Larsen et al. (1998) introduced a single noise parameter that can be calculated by adding a new regularization term and cross validation. Minh & Hinton (2012) proposed a more realistic noise model that depends on the true label. However, they only considered the binary classification case. Sukhbaatar & Fergus (2014) recently proposed adding a constrained linear layer at the top of the softmax layer, and showed that only under some strong assumptions can the linear layer be interpreted as the transition matrix between the true and noisy (observed) labels and the softmax output layer as the true probabilities of the labels. Reed et al. (2014) suggested handling the unreliability of the training data labels by maximizing the likelihood function with an additional classification entropy regularization term. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
103,
|
| 99 |
+
825,
|
| 100 |
+
256
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "The correct unknown label can be viewed as a hidden random variable. Hence, it is natural to apply the EM algorithm where in the E-step we estimate the true label and in the M-step we retrain the network. Several variations of this paradigm have been proposed (e.g. Minh & Hinton (2012), Bekker & Goldberger (2016)). However, iterating between EM-steps and neural network training does not scale well. In this study we use latent variable probabilistic modeling but we optimize the likelihood score function within the framework of neural networks. Current noisy label approaches assume either implicitly or explicitly that, given the correct label, the noisy label is independent of the feature vector. This assumption is probably needed to simplify the modeling and derive applicable learning algorithms. However, in many cases this assumption is not realistic since a wrong annotation is more likely to occur in cases where the features are misleading. By contrast, our framework makes it easy to extend the proposed learning algorithm to the case where the noise is dependent on both the correct label and the input features. In the next section we describe a model formulation and review the EM based approach. In Section 3 we described our method which is based on adding another softmax layer to the network and in Section 4 we present our results. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
263,
|
| 110 |
+
825,
|
| 111 |
+
457
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "2 A PROBABILISTIC FRAMEWORK FOR NOISY LABELS ",
|
| 118 |
+
"text_level": 1,
|
| 119 |
+
"bbox": [
|
| 120 |
+
174,
|
| 121 |
+
478,
|
| 122 |
+
642,
|
| 123 |
+
494
|
| 124 |
+
],
|
| 125 |
+
"page_idx": 1
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"type": "text",
|
| 129 |
+
"text": "Assume we want to train a multi-class neural-network soft-classifier $p ( y = i | x ; w )$ where $x$ is the feature vector, $w$ is the network parameter-set and $i$ is a member of the class-set $\\{ 1 , . . . , k \\}$ . We further assume that in the training process we cannot directly observe the correct label $y$ . Instead, we only have access to a noisy version of it denoted by $z$ . Here we follow the probabilistic modeling and the EM learning approach described in Bekker $\\&$ Goldberger (2016). In this approach noise generation is assumed to be independent of the features and is modeled by a parameter $\\theta ( i , j ) =$ ${ \\bar { p } } ( z = j | y = i )$ . The noise distribution is unknown and we want to learn it as part of the training phase. The probability of observing a noisy label $z$ given the feature vector $x$ is: ",
|
| 130 |
+
"bbox": [
|
| 131 |
+
173,
|
| 132 |
+
508,
|
| 133 |
+
825,
|
| 134 |
+
621
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "equation",
|
| 140 |
+
"img_path": "images/3174a65303a5d871a7931d756f6f28dd9e6b5cc5e50868add78dc96ed833376b.jpg",
|
| 141 |
+
"text": "$$\np ( z = j | x ; w , \\theta ) = \\sum _ { i = 1 } ^ { k } p ( z = j | y = i ; \\theta ) p ( y = i | x ; w )\n$$",
|
| 142 |
+
"text_format": "latex",
|
| 143 |
+
"bbox": [
|
| 144 |
+
316,
|
| 145 |
+
626,
|
| 146 |
+
681,
|
| 147 |
+
670
|
| 148 |
+
],
|
| 149 |
+
"page_idx": 1
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"type": "text",
|
| 153 |
+
"text": "where $k$ is the number of classes. The model is illustrated in the following diagram: ",
|
| 154 |
+
"bbox": [
|
| 155 |
+
173,
|
| 156 |
+
674,
|
| 157 |
+
722,
|
| 158 |
+
689
|
| 159 |
+
],
|
| 160 |
+
"page_idx": 1
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"type": "image",
|
| 164 |
+
"img_path": "images/1e4a22f34a78167a2db61ba5826f72663e93013dabefc529b4d83b852b8bf7ca.jpg",
|
| 165 |
+
"image_caption": [],
|
| 166 |
+
"image_footnote": [],
|
| 167 |
+
"bbox": [
|
| 168 |
+
315,
|
| 169 |
+
704,
|
| 170 |
+
681,
|
| 171 |
+
767
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 1
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "In the training phase we are given $n$ feature vectors $x _ { 1 } , . . . , x _ { n }$ with the corresponding noisy labels $z _ { 1 } , . . . , z _ { n }$ which are viewed as noisy versions of the correct hidden labels $y _ { 1 } , . . . , y _ { n }$ . The loglikelihood of the model parameters is: ",
|
| 178 |
+
"bbox": [
|
| 179 |
+
176,
|
| 180 |
+
785,
|
| 181 |
+
825,
|
| 182 |
+
828
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 1
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "equation",
|
| 188 |
+
"img_path": "images/6d8c6a9c88a64516018613ff6752c442a835ba062d4ab3270f4e44d9f5237e40.jpg",
|
| 189 |
+
"text": "$$\nL ( w , \\theta ) = \\sum _ { t = 1 } ^ { n } \\log ( \\sum _ { i = 1 } ^ { k } p ( z _ { t } | y _ { t } = i ; \\theta ) p ( y _ { t } = i | x _ { t } ; w ) )\n$$",
|
| 190 |
+
"text_format": "latex",
|
| 191 |
+
"bbox": [
|
| 192 |
+
318,
|
| 193 |
+
833,
|
| 194 |
+
678,
|
| 195 |
+
877
|
| 196 |
+
],
|
| 197 |
+
"page_idx": 1
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"type": "text",
|
| 201 |
+
"text": "Based on the training data, the goal is to find both the noise distribution $\\theta$ and the Neural Network parameters $w$ that maximize the likelihood function. Since the random variables $y _ { 1 } , . . . , y _ { n }$ are hidden, we can apply the EM algorithm to find the maximum-likelihood parameter set. In the E-step of ",
|
| 202 |
+
"bbox": [
|
| 203 |
+
174,
|
| 204 |
+
881,
|
| 205 |
+
825,
|
| 206 |
+
924
|
| 207 |
+
],
|
| 208 |
+
"page_idx": 1
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"type": "text",
|
| 212 |
+
"text": "each EM iteration we estimate the hidden true data labels based on the noisy labels and the current parameters: ",
|
| 213 |
+
"bbox": [
|
| 214 |
+
169,
|
| 215 |
+
103,
|
| 216 |
+
825,
|
| 217 |
+
132
|
| 218 |
+
],
|
| 219 |
+
"page_idx": 2
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"type": "equation",
|
| 223 |
+
"img_path": "images/85e0d18026d511e66ac0c48812e34466e1bac4fb56ae27cc54b50d9c17be02a1.jpg",
|
| 224 |
+
"text": "$$\nc _ { t i } = p ( y _ { t } = i | x _ { t } , z _ { t } ; w _ { 0 } , \\theta _ { 0 } ) , \\qquad i = 1 , . . . , k , \\qquad t = 1 , . . . , n\n$$",
|
| 225 |
+
"text_format": "latex",
|
| 226 |
+
"bbox": [
|
| 227 |
+
276,
|
| 228 |
+
140,
|
| 229 |
+
722,
|
| 230 |
+
159
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 2
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "text",
|
| 236 |
+
"text": "where $w _ { 0 }$ and $\\theta _ { 0 }$ are the current parameter estimations. In the M-step we update both the NN and the noisy channel parameters. The updated noise distribution has a closed-form solution. ",
|
| 237 |
+
"bbox": [
|
| 238 |
+
173,
|
| 239 |
+
166,
|
| 240 |
+
823,
|
| 241 |
+
195
|
| 242 |
+
],
|
| 243 |
+
"page_idx": 2
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "equation",
|
| 247 |
+
"img_path": "images/e7fa0a5c27c006b68395bae63f622ab672b92901f89525bd4ab39b92bea11a7b.jpg",
|
| 248 |
+
"text": "$$\n\\theta ( i , j ) = \\frac { \\sum _ { t } c _ { t i } 1 _ { \\{ z _ { t } = j \\} } } { \\sum _ { t } c _ { t i } } , \\qquad i , j \\in \\{ 1 , . . . , k \\}\n$$",
|
| 249 |
+
"text_format": "latex",
|
| 250 |
+
"bbox": [
|
| 251 |
+
339,
|
| 252 |
+
202,
|
| 253 |
+
658,
|
| 254 |
+
239
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "The $k \\times k$ matrix $\\theta$ can be viewed as a confusion matrix between the soft estimates of the true label $\\{ c _ { t i } | i = 1 , . . . , k \\}$ and the observed noisy labels $z _ { t }$ . As part of the EM M-step, to find the updated NN parameter $w$ we need to maximize the following function: ",
|
| 261 |
+
"bbox": [
|
| 262 |
+
174,
|
| 263 |
+
246,
|
| 264 |
+
825,
|
| 265 |
+
289
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 2
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "equation",
|
| 271 |
+
"img_path": "images/a5b04b4e362ecab82ea45a3d14f14ddc66389e23f6591a0c9167c806ade9ce1a.jpg",
|
| 272 |
+
"text": "$$\nS ( w ) = \\sum _ { t = 1 } ^ { n } \\sum _ { i = 1 } ^ { k } c _ { t i } \\log p ( y _ { t } = i | x _ { t } ; w )\n$$",
|
| 273 |
+
"text_format": "latex",
|
| 274 |
+
"bbox": [
|
| 275 |
+
369,
|
| 276 |
+
296,
|
| 277 |
+
629,
|
| 278 |
+
342
|
| 279 |
+
],
|
| 280 |
+
"page_idx": 2
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"type": "text",
|
| 284 |
+
"text": "which is a soft-version of the likelihood function of the fully observed case, based on the current estimate of the true labels. The back-propagation derivatives of the function (5) that we maximize in the M-step are: ",
|
| 285 |
+
"bbox": [
|
| 286 |
+
174,
|
| 287 |
+
348,
|
| 288 |
+
825,
|
| 289 |
+
390
|
| 290 |
+
],
|
| 291 |
+
"page_idx": 2
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
"type": "equation",
|
| 295 |
+
"img_path": "images/8f190355dd78cf55144a07023310d82965393b90e9cf4a3fe3f436ec6fd7c928.jpg",
|
| 296 |
+
"text": "$$\n{ \\frac { \\partial S } { \\partial u _ { i } } } = \\sum _ { t = 1 } ^ { n } ( p ( y _ { t } = i | x _ { t } , z _ { t } ; w _ { 0 } , \\theta _ { 0 } ) - p ( y _ { t } = i | x _ { t } ; w ) ) h ( x _ { t } )\n$$",
|
| 297 |
+
"text_format": "latex",
|
| 298 |
+
"bbox": [
|
| 299 |
+
299,
|
| 300 |
+
398,
|
| 301 |
+
699,
|
| 302 |
+
440
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 2
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "such that $h$ is the final hidden layer and $u _ { 1 } , . . . , u _ { k }$ are the parameters of the soft-max output layer. ",
|
| 309 |
+
"bbox": [
|
| 310 |
+
171,
|
| 311 |
+
448,
|
| 312 |
+
808,
|
| 313 |
+
463
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 2
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "The method reviewed here is closely related to the work of Minh & Hinton (2012). They addressed the problem of mislabeled data points in a particular type of dataset (aerial images). The main difference is that in their approach they assumed that they do not learn the noise parameter. Instead they assume that the noise model can be separately tuned using a validation set or set by hand. Note that even if the true noise parameters are given, we still need the apply the EM iterative procedure. However, this assumption makes the interaction between the E-step and the NN learning much easier since each time a data-point $x _ { t }$ is visited we can compute the $\\mathsf { \\tilde { p } } ( y _ { t } = i | x _ { t } , z _ { t } )$ based on the current network parameters and the pre-defined noise parameters. Motivated by the need for model compression, Hinton et al. (2014) introduced an approach to learn a “distilled” model by training a more compact neural network to reproduce the output of a larger network. Using the notation defined above, in the second training stage they actually optimized the cost function: $S ( w ) =$ $\\begin{array} { r } { \\sum _ { t = 1 } ^ { n } \\sum _ { i = 1 } ^ { k } p ( y _ { t } = i | x _ { t } ; w _ { 0 } , \\theta _ { 0 } ) \\log p ( y _ { t } = i ; x _ { t } ; w ) } \\end{array}$ such that $w _ { 0 }$ is the parameter of the larger network that was trained using the labels $z _ { 1 } , . . . , z _ { n }$ , $w$ is the parameter of the smaller network and $\\theta _ { 0 } ( i , j )$ in this case is a non-informative distribution (i.e. $\\theta _ { 0 } ( \\bar { i , } j ) = 1 / k$ ). ",
|
| 320 |
+
"bbox": [
|
| 321 |
+
173,
|
| 322 |
+
468,
|
| 323 |
+
825,
|
| 324 |
+
667
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 2
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "There are several drawbacks to the EM-based approach described above. The EM algorithm is a greedy optimization procedure that is notoriously known to get stuck in local optima. Another potential issue with combining neural networks and EM direction is scalability. The framework requires training a neural network in each iteration of the EM algorithm. For real-world, large-scale networks, even a single training iteration is a non-trivial challenge. Moreover, in many domains (e.g. object recognition in images) the number of labels is very large, so many EM iterations are likely to be needed for convergence. Another drawback of the probabilistic models is that they are based on the simplistic assumption that the noise error is only based on the true labels but not on the input features. In this study we propose a method for training neural networks with noisy labels that successfully addresses all these problems. ",
|
| 331 |
+
"bbox": [
|
| 332 |
+
173,
|
| 333 |
+
672,
|
| 334 |
+
825,
|
| 335 |
+
813
|
| 336 |
+
],
|
| 337 |
+
"page_idx": 2
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "text",
|
| 341 |
+
"text": "3 TRAINING DEEP NEURAL NETWORKS USING A NOISE ADAPTATION LAYER",
|
| 342 |
+
"text_level": 1,
|
| 343 |
+
"bbox": [
|
| 344 |
+
173,
|
| 345 |
+
835,
|
| 346 |
+
813,
|
| 347 |
+
852
|
| 348 |
+
],
|
| 349 |
+
"page_idx": 2
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "In the previous section we utilized the EM algorithm to optimize the noisy-label likelihood function (2). In this section we describe an algorithm that optimizes the same function within the framework of neural networks. Assume the neural network classifier we are using is based on non-linear intermediate layers followed by a soft-max output layer used for soft classification. Denote the non-linear function applied on an input $x$ by $h = h ( x )$ and denote the soft-max layer that predicts the true $y$ label by: ",
|
| 354 |
+
"bbox": [
|
| 355 |
+
174,
|
| 356 |
+
867,
|
| 357 |
+
823,
|
| 358 |
+
924
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 2
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "text",
|
| 364 |
+
"text": "",
|
| 365 |
+
"bbox": [
|
| 366 |
+
171,
|
| 367 |
+
103,
|
| 368 |
+
825,
|
| 369 |
+
132
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 3
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "equation",
|
| 375 |
+
"img_path": "images/f7219efdcc7a41615130b394aa6eb7c7b2b42ccd6f8c501f956087ae383bf699.jpg",
|
| 376 |
+
"text": "$$\np ( y = i | x ; w ) = \\frac { \\exp ( u _ { i } ^ { \\top } h + b _ { i } ) } { \\sum _ { l = 1 } ^ { k } \\exp ( u _ { l } ^ { \\top } h + b _ { l } ) } , \\qquad i = 1 , . . . , k\n$$",
|
| 377 |
+
"text_format": "latex",
|
| 378 |
+
"bbox": [
|
| 379 |
+
305,
|
| 380 |
+
131,
|
| 381 |
+
692,
|
| 382 |
+
170
|
| 383 |
+
],
|
| 384 |
+
"page_idx": 3
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "text",
|
| 388 |
+
"text": "where $w$ is the network parameter-set (including the softmax layer). We next add another softmax output layer to predict the noisy label $z$ based on both the true label and the input features: ",
|
| 389 |
+
"bbox": [
|
| 390 |
+
174,
|
| 391 |
+
172,
|
| 392 |
+
826,
|
| 393 |
+
202
|
| 394 |
+
],
|
| 395 |
+
"page_idx": 3
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "equation",
|
| 399 |
+
"img_path": "images/fd38814b5c987adf9118b577263432881017b645bb6a6e7fc0e6d7978028b8d9.jpg",
|
| 400 |
+
"text": "$$\np ( z = j | y = i , x ) = \\frac { \\exp ( u _ { i j } ^ { \\top } h + b _ { i j } ) } { \\sum _ { l } \\exp ( u _ { i l } ^ { \\top } h + b _ { i l } ) }\n$$",
|
| 401 |
+
"text_format": "latex",
|
| 402 |
+
"bbox": [
|
| 403 |
+
362,
|
| 404 |
+
208,
|
| 405 |
+
635,
|
| 406 |
+
246
|
| 407 |
+
],
|
| 408 |
+
"page_idx": 3
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "equation",
|
| 412 |
+
"img_path": "images/aa7c04daca4cffdf19192c1ec53160880becd54abfffbc6d12c42f46f597dc4d.jpg",
|
| 413 |
+
"text": "$$\np ( z = j | x ) = \\sum _ { i } p ( z = j | y = i , x ) p ( y = i | x )\n$$",
|
| 414 |
+
"text_format": "latex",
|
| 415 |
+
"bbox": [
|
| 416 |
+
343,
|
| 417 |
+
255,
|
| 418 |
+
655,
|
| 419 |
+
289
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 3
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "We can also define a simplified version where the noisy label only depends on the true label; i.e. we assume that labels flips are independent of $x$ : ",
|
| 426 |
+
"bbox": [
|
| 427 |
+
174,
|
| 428 |
+
291,
|
| 429 |
+
823,
|
| 430 |
+
320
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 3
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "equation",
|
| 436 |
+
"img_path": "images/72581d875d1890d009012b9270d50059a6a910252d846e0245094ef0552717cf.jpg",
|
| 437 |
+
"text": "$$\np ( z = j | y = i ) = \\frac { \\exp ( b _ { i j } ) } { \\sum _ { l } \\exp ( b _ { i l } ) }\n$$",
|
| 438 |
+
"text_format": "latex",
|
| 439 |
+
"bbox": [
|
| 440 |
+
395,
|
| 441 |
+
328,
|
| 442 |
+
602,
|
| 443 |
+
364
|
| 444 |
+
],
|
| 445 |
+
"page_idx": 3
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "equation",
|
| 449 |
+
"img_path": "images/ccf0e34ec96b90968c8d94e8eac370b9ae66ba675dfff25b1dc445bce075377a.jpg",
|
| 450 |
+
"text": "$$\np ( z = j | x ) = \\sum _ { i } p ( z = j | y = i ) p ( y = i | x )\n$$",
|
| 451 |
+
"text_format": "latex",
|
| 452 |
+
"bbox": [
|
| 453 |
+
351,
|
| 454 |
+
372,
|
| 455 |
+
647,
|
| 456 |
+
406
|
| 457 |
+
],
|
| 458 |
+
"page_idx": 3
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"type": "text",
|
| 462 |
+
"text": "We denote the two noise modeling variants as the complex model (c-model) (8) and the simple model (s-model) (10). Hereafter we use the notation $w _ { \\mathrm { n o i s e } }$ for all the parameters of the second softmax layer which can be viewed as a noise adaptation layer. ",
|
| 463 |
+
"bbox": [
|
| 464 |
+
173,
|
| 465 |
+
410,
|
| 466 |
+
825,
|
| 467 |
+
453
|
| 468 |
+
],
|
| 469 |
+
"page_idx": 3
|
| 470 |
+
},
|
| 471 |
+
{
|
| 472 |
+
"type": "text",
|
| 473 |
+
"text": "In the training phase we are given $n$ feature vectors $x _ { 1 } , . . . , x _ { n }$ with corresponding noisy labels $z _ { 1 } , . . . , z _ { n }$ which are viewed as noisy versions of the correct hidden labels $y _ { 1 } , . . . , y _ { n }$ . The loglikelihood of the model parameters is: ",
|
| 474 |
+
"bbox": [
|
| 475 |
+
173,
|
| 476 |
+
459,
|
| 477 |
+
825,
|
| 478 |
+
502
|
| 479 |
+
],
|
| 480 |
+
"page_idx": 3
|
| 481 |
+
},
|
| 482 |
+
{
|
| 483 |
+
"type": "equation",
|
| 484 |
+
"img_path": "images/700010bdaf1934da14369c885a760fb9da22e70e5923bdced135df861d97d8a8.jpg",
|
| 485 |
+
"text": "$$\nS ( w , w _ { \\mathrm { n o i s e } } ) = \\sum _ { t } \\log p ( z _ { t } | x _ { t } ) = \\sum _ { t } \\log ( \\sum _ { i } p ( z _ { t } | y _ { t } = i , x _ { t } ; w _ { \\mathrm { n o i s e } } ) p ( y _ { t } = i | x _ { t } ; w ) )\n$$",
|
| 486 |
+
"text_format": "latex",
|
| 487 |
+
"bbox": [
|
| 488 |
+
205,
|
| 489 |
+
508,
|
| 490 |
+
764,
|
| 491 |
+
544
|
| 492 |
+
],
|
| 493 |
+
"page_idx": 3
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "Since the noise is modeled by adding another layer to the network, the score $S ( w , w _ { \\mathrm { n o i s e } } )$ can be optimized using standard techniques for neural network training. By setting ",
|
| 498 |
+
"bbox": [
|
| 499 |
+
173,
|
| 500 |
+
551,
|
| 501 |
+
823,
|
| 502 |
+
580
|
| 503 |
+
],
|
| 504 |
+
"page_idx": 3
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"type": "equation",
|
| 508 |
+
"img_path": "images/c19c61efb3edefb0aba558ce3802198f0c4623b94bed4b354ee11b0b673e8a51.jpg",
|
| 509 |
+
"text": "$$\np ( z = j | y = i ) = \\theta ( i , j ) = \\frac { \\exp ( b _ { i j } ) } { \\sum _ { l } \\exp ( b _ { i l } ) } ,\n$$",
|
| 510 |
+
"text_format": "latex",
|
| 511 |
+
"bbox": [
|
| 512 |
+
361,
|
| 513 |
+
587,
|
| 514 |
+
635,
|
| 515 |
+
622
|
| 516 |
+
],
|
| 517 |
+
"page_idx": 3
|
| 518 |
+
},
|
| 519 |
+
{
|
| 520 |
+
"type": "text",
|
| 521 |
+
"text": "it can easily verified that, by using either the EM algorithm (2) or the s-model neural network scheme (12), we are actually optimizing exactly the same function. Thus the neural network with the s-model noise adaptation layer provides an alternative optimization strategy to the EM algorithm. Instead of alternating between optimizing the noisy model and the network classifier, we consider them as components of the same network and optimize them simultaneously. ",
|
| 522 |
+
"bbox": [
|
| 523 |
+
173,
|
| 524 |
+
628,
|
| 525 |
+
825,
|
| 526 |
+
700
|
| 527 |
+
],
|
| 528 |
+
"page_idx": 3
|
| 529 |
+
},
|
| 530 |
+
{
|
| 531 |
+
"type": "image",
|
| 532 |
+
"img_path": "images/534548a443496e5d2e355f491eab4b89bd6f51db466ab1ecb92ab98460c0558b.jpg",
|
| 533 |
+
"image_caption": [
|
| 534 |
+
"Figure 1: An illustration of the noisy-label neural network architecture for the training phase (above) and test phase (below). "
|
| 535 |
+
],
|
| 536 |
+
"image_footnote": [],
|
| 537 |
+
"bbox": [
|
| 538 |
+
222,
|
| 539 |
+
724,
|
| 540 |
+
728,
|
| 541 |
+
881
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 3
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "Note that in the c-model, where the noise is also dependent on the input features, we can still apply the EM algorithm to learn the parameters of the additional noise layer. However, there is no closedform solution in the M-step for the optimal parameters and we need to apply neural-network training in the M-step to find the noise-layer parameters. ",
|
| 548 |
+
"bbox": [
|
| 549 |
+
174,
|
| 550 |
+
103,
|
| 551 |
+
823,
|
| 552 |
+
160
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 4
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "At test time we want to predict the true labels. Hence, we remove the last softmax layer that aims to get rid of the noise in the training set. We compute the true-label softmax estimation $p ( y = i | x ; w )$ (7). The proposed architecture for training the neural network based on training data with noisy labels is illustrated in Figure 1. ",
|
| 559 |
+
"bbox": [
|
| 560 |
+
174,
|
| 561 |
+
166,
|
| 562 |
+
823,
|
| 563 |
+
223
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 4
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "text",
|
| 569 |
+
"text": "There are degrees of freedom in the two softmax layer model. Hence, a careful initialization of the parameters of the noise adaptation layer is crucial for successful convergence of the network into a good classifier of the correct labels at test time. We used the parameters of the original network to initialize the parameters of the s-model network that contains the noise adaptation level. We can initialize the softmax parameters of the s-model by assuming a small uniform noise: ",
|
| 570 |
+
"bbox": [
|
| 571 |
+
173,
|
| 572 |
+
229,
|
| 573 |
+
825,
|
| 574 |
+
299
|
| 575 |
+
],
|
| 576 |
+
"page_idx": 4
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"type": "equation",
|
| 580 |
+
"img_path": "images/5f9aa6c3756c5f2c827f8819e282e8cd40e2882f450cb5a7388818fcd3b24696.jpg",
|
| 581 |
+
"text": "$$\nb _ { i j } = \\log ( ( 1 - \\epsilon ) 1 _ { \\{ i = j \\} } + \\frac { \\epsilon } { k - 1 } 1 _ { \\{ i \\neq j \\} } )\n$$",
|
| 582 |
+
"text_format": "latex",
|
| 583 |
+
"bbox": [
|
| 584 |
+
366,
|
| 585 |
+
301,
|
| 586 |
+
632,
|
| 587 |
+
329
|
| 588 |
+
],
|
| 589 |
+
"page_idx": 4
|
| 590 |
+
},
|
| 591 |
+
{
|
| 592 |
+
"type": "text",
|
| 593 |
+
"text": "such that $k$ is the number of different classes. A better procedure is to first train the original NN without the noise-adaptation layer, ignoring the fact that the labels are noisy. We can then treat the labels produced by the NN as the true labels and compute the confusion matrix on the train set and used it as an initial value for the bias parameters: ",
|
| 594 |
+
"bbox": [
|
| 595 |
+
174,
|
| 596 |
+
332,
|
| 597 |
+
825,
|
| 598 |
+
387
|
| 599 |
+
],
|
| 600 |
+
"page_idx": 4
|
| 601 |
+
},
|
| 602 |
+
{
|
| 603 |
+
"type": "equation",
|
| 604 |
+
"img_path": "images/4154f273ba3b55e0bed7f4eadb58a96502419ba715cf4e5806ce39f6d7f93d15.jpg",
|
| 605 |
+
"text": "$$\nb _ { i j } = \\log ( \\frac { \\sum _ { t } 1 _ { \\{ z _ { t } = j \\} } p ( y _ { t } = i | x _ { t } ) } { \\sum _ { t } p ( y _ { t } = i | x _ { t } ) } )\n$$",
|
| 606 |
+
"text_format": "latex",
|
| 607 |
+
"bbox": [
|
| 608 |
+
379,
|
| 609 |
+
390,
|
| 610 |
+
619,
|
| 611 |
+
426
|
| 612 |
+
],
|
| 613 |
+
"page_idx": 4
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"type": "text",
|
| 617 |
+
"text": "such that $x _ { 1 } , . . . , x _ { n }$ are the feature vectors of the training dataset and $z _ { 1 } , . . . , z _ { n }$ are the corresponding noisy labels. So far we have concentrated on parameter initialization for the s-model. The strategy that works best to initialize the c-model parameters is to use the parameters that were optimized for the s-model. In other words we set linear terms $u _ { i j }$ to zero and initialize the bias terms $b _ { i j }$ with the values that were optimized by the s-model. ",
|
| 618 |
+
"bbox": [
|
| 619 |
+
174,
|
| 620 |
+
428,
|
| 621 |
+
825,
|
| 622 |
+
497
|
| 623 |
+
],
|
| 624 |
+
"page_idx": 4
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"type": "text",
|
| 628 |
+
"text": "The computational complexity of the proposed method is quadratic in the size of the class-set. Suppose there are $k$ classes to predict, in this case the proposed methods require $k + 1$ sets of softmax operations with a size of $k$ each. Hence there are scalability problems when the class set is large. As we explained in the previous paragraph, we initialized the second soft-max layer using the confusion matrix of the baseline system. The confusion matrix is a good estimation of the label noise. Assume the rows of the matrix correspond to the true labels and the matrix columns correspond to the noisy labels. The $l$ largest elements in the $i$ -th row are the most frequent noisy class values when the true class value is $i$ . We can thus connect the $i \\cdot$ -th element in the first softmax layer only to its $l$ most probable noisy class candidates. Note that if we connect the $i$ -th label in the first softmax only to the $i$ -th label in the second softmax layer, the second softmax layer collapses to identity and we obtain the standard baseline model. Taking the $l$ most likely connections to the second softmax layer, we allow an additional $l - 1$ possible noisy labels for each correct label. We thus obtain a data driven sparsifying of the second softmax layer which solves the scalability problem since the complexity becomes linear in the number of classes instead of quadratic. In the experiment section we show that by using this approach there is not much deference in performance. ",
|
| 629 |
+
"bbox": [
|
| 630 |
+
174,
|
| 631 |
+
505,
|
| 632 |
+
825,
|
| 633 |
+
713
|
| 634 |
+
],
|
| 635 |
+
"page_idx": 4
|
| 636 |
+
},
|
| 637 |
+
{
|
| 638 |
+
"type": "text",
|
| 639 |
+
"text": "Our architecture, which is based on a concatenation of softmax layers, resembles the hierarchical softmax approach Morin & Bengio (2005) that replaces the flat softmax layer with a hierarchical layer that has the classes as leaves. This allowed them to decompose calculating the probability of the class into a sequence of probability calculations, which saves us from having to calculate the expensive normalization over all classes. The main difference between our approach and theirs (apart from the motivation) is that in our approach the true-label softmax layer is fully connected to the noisy-label layer. Sukhbaatar & Fergus (2014) suggested adding a linear layer to handle noisy labels. Their approach is similar to our s-model. In their approach, however, they proposed a different learning procedure. ",
|
| 640 |
+
"bbox": [
|
| 641 |
+
174,
|
| 642 |
+
719,
|
| 643 |
+
825,
|
| 644 |
+
844
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 4
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "text",
|
| 650 |
+
"text": "4 EXPERIMENTS ",
|
| 651 |
+
"text_level": 1,
|
| 652 |
+
"bbox": [
|
| 653 |
+
176,
|
| 654 |
+
864,
|
| 655 |
+
326,
|
| 656 |
+
881
|
| 657 |
+
],
|
| 658 |
+
"page_idx": 4
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "text",
|
| 662 |
+
"text": "In this section, we evaluate the robustness of deep learning to training data with noisy labels with and without explicit noise modeling. We first show results on the MNIST data-set with injected label noise in our experiments. The MNIST is a database of handwritten digits, which consists of $2 8 \\times 2 8$ images. The dataset has 60k images for training and 10k images for testing. We used a two hidden layer NN comprised of 500 and 300 neurons. The non-linear activation we used was ReLU and we used dropout with parameter 0.5. We trained the network using the Adam optimizer (Kingma & Ba (2014)) with default parameters, which we found to converge more quickly and effectively than SGD. We used a mini-batch size of 256. These settings were kept fixed for all the experiments described below. In addition to a network that is based on fully connected layers, we also applied a network based on a CNN architecture. The results we obtained in the two architectures were similar. The network we implemented is publicly available 1. ",
|
| 663 |
+
"bbox": [
|
| 664 |
+
173,
|
| 665 |
+
895,
|
| 666 |
+
823,
|
| 667 |
+
924
|
| 668 |
+
],
|
| 669 |
+
"page_idx": 4
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "image",
|
| 673 |
+
"img_path": "images/7a84ff68aaac2dd8f567a28a156deefbfa9c0e717531b18040c9756e967633ad.jpg",
|
| 674 |
+
"image_caption": [
|
| 675 |
+
"Figure 2: Test classification accuracy results on the MNIST dataset as a function of the noise level. The results are shown for several training data sizes $( 2 0 \\% , 5 0 \\% , 1 0 0 \\% )$ of the training subset. "
|
| 676 |
+
],
|
| 677 |
+
"image_footnote": [],
|
| 678 |
+
"bbox": [
|
| 679 |
+
200,
|
| 680 |
+
111,
|
| 681 |
+
805,
|
| 682 |
+
541
|
| 683 |
+
],
|
| 684 |
+
"page_idx": 5
|
| 685 |
+
},
|
| 686 |
+
{
|
| 687 |
+
"type": "text",
|
| 688 |
+
"text": "",
|
| 689 |
+
"bbox": [
|
| 690 |
+
174,
|
| 691 |
+
611,
|
| 692 |
+
825,
|
| 693 |
+
738
|
| 694 |
+
],
|
| 695 |
+
"page_idx": 5
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"type": "text",
|
| 699 |
+
"text": "We generated noisy data from clean data by stochastically changing some of the labels. We converted each label with probability $p$ to a different label according to a predefined permutation. We used the same permutation as in Reed et al. (2014). The labels of the test data remained, of course, unperturbed to validate and compare our method to the regular approach. ",
|
| 700 |
+
"bbox": [
|
| 701 |
+
174,
|
| 702 |
+
744,
|
| 703 |
+
825,
|
| 704 |
+
800
|
| 705 |
+
],
|
| 706 |
+
"page_idx": 5
|
| 707 |
+
},
|
| 708 |
+
{
|
| 709 |
+
"type": "text",
|
| 710 |
+
"text": "We compared the proposed noise robust models to other model training strategies. The first network was the baseline approach that ignores the fact that the labels of the training data are unreliable. Denote the observed noisy label by $z$ and the softmax decision by $q _ { 1 } , . . . , q _ { k }$ . The baseline loglikelihood score (for a single input) is: ",
|
| 711 |
+
"bbox": [
|
| 712 |
+
174,
|
| 713 |
+
806,
|
| 714 |
+
823,
|
| 715 |
+
863
|
| 716 |
+
],
|
| 717 |
+
"page_idx": 5
|
| 718 |
+
},
|
| 719 |
+
{
|
| 720 |
+
"type": "equation",
|
| 721 |
+
"img_path": "images/1177a087de984c82e93bf441dd33ffa0621620a60f988c8f087d481d8838afe3.jpg",
|
| 722 |
+
"text": "$$\nS = \\sum _ { i } 1 _ { \\{ z = i \\} } \\log ( q _ { i } )\n$$",
|
| 723 |
+
"text_format": "latex",
|
| 724 |
+
"bbox": [
|
| 725 |
+
421,
|
| 726 |
+
868,
|
| 727 |
+
576,
|
| 728 |
+
901
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 5
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "image",
|
| 734 |
+
"img_path": "images/b5ef1146fcca8e02886ef3221e5fc0ca403f768335bc3313b5ab404edfd7422b.jpg",
|
| 735 |
+
"image_caption": [
|
| 736 |
+
"Figure 3: Test classification accuracy results on the CIFAR-100 dataset as a function of the noise level. The results are shown for several training data sizes $( 2 0 \\% , 5 0 \\% , 1 0 0 \\% )$ of the training subset for a CNN network architecture). "
|
| 737 |
+
],
|
| 738 |
+
"image_footnote": [],
|
| 739 |
+
"bbox": [
|
| 740 |
+
318,
|
| 741 |
+
104,
|
| 742 |
+
676,
|
| 743 |
+
333
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 6
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "We also implemented two variants of the noise robust approach proposed by Reed et al. (2014). They suggested a soft version ",
|
| 750 |
+
"bbox": [
|
| 751 |
+
171,
|
| 752 |
+
416,
|
| 753 |
+
823,
|
| 754 |
+
445
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 6
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "equation",
|
| 760 |
+
"img_path": "images/be34561ecf8e9711ef39ecb8f2c95d6b152966defcf9f5ca7824ca53e65d4698.jpg",
|
| 761 |
+
"text": "$$\n\\beta S - ( 1 - \\beta ) H ( q ) = \\beta \\sum _ { i } 1 _ { \\{ z = i \\} } \\log ( q _ { i } ) + ( 1 - \\beta ) \\sum _ { i } q _ { i } \\log ( q _ { i } )\n$$",
|
| 762 |
+
"text_format": "latex",
|
| 763 |
+
"bbox": [
|
| 764 |
+
276,
|
| 765 |
+
450,
|
| 766 |
+
722,
|
| 767 |
+
484
|
| 768 |
+
],
|
| 769 |
+
"page_idx": 6
|
| 770 |
+
},
|
| 771 |
+
{
|
| 772 |
+
"type": "text",
|
| 773 |
+
"text": "and a hard version: ",
|
| 774 |
+
"bbox": [
|
| 775 |
+
174,
|
| 776 |
+
489,
|
| 777 |
+
299,
|
| 778 |
+
503
|
| 779 |
+
],
|
| 780 |
+
"page_idx": 6
|
| 781 |
+
},
|
| 782 |
+
{
|
| 783 |
+
"type": "equation",
|
| 784 |
+
"img_path": "images/e596d5e8a3c565426c1f62a7228182b0ef46c2cd33906d59c97e529f2c191636.jpg",
|
| 785 |
+
"text": "$$\n\\beta S + ( 1 - \\beta ) \\operatorname* { m a x } _ { i } \\log ( q _ { i } )\n$$",
|
| 786 |
+
"text_format": "latex",
|
| 787 |
+
"bbox": [
|
| 788 |
+
410,
|
| 789 |
+
502,
|
| 790 |
+
588,
|
| 791 |
+
523
|
| 792 |
+
],
|
| 793 |
+
"page_idx": 6
|
| 794 |
+
},
|
| 795 |
+
{
|
| 796 |
+
"type": "text",
|
| 797 |
+
"text": "In their experiments they took $\\beta = 0 . 8$ for the hard version and $\\beta = 0 . 9 5$ for the soft version, and observed that the hard version provided better results. Finally we implemented the two variants of our approach; namely, the noise modeling based only on the labels (s-model) and the noise modeling that was also based on the features (c-model). ",
|
| 798 |
+
"bbox": [
|
| 799 |
+
173,
|
| 800 |
+
526,
|
| 801 |
+
825,
|
| 802 |
+
583
|
| 803 |
+
],
|
| 804 |
+
"page_idx": 6
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"type": "text",
|
| 808 |
+
"text": "Figure 2 depicts the comparative test errors results as a function of the fractions of noise. The results are shown for three different sizes of training data i.e. $( 2 0 \\% , 5 0 \\% , 1 0 0 \\% )$ of the MNIST training subset. Bootstrapping was used to compute confidence intervals around the mean. For 1000 times, $N = 1 0$ samples were randomly drawn with repeats from the $N$ available samples and mean was computed. The confidence interval was taken to be the $2 . 5 \\%$ and $9 7 . 5 \\%$ percentiles of this process. ",
|
| 809 |
+
"bbox": [
|
| 810 |
+
173,
|
| 811 |
+
589,
|
| 812 |
+
825,
|
| 813 |
+
660
|
| 814 |
+
],
|
| 815 |
+
"page_idx": 6
|
| 816 |
+
},
|
| 817 |
+
{
|
| 818 |
+
"type": "text",
|
| 819 |
+
"text": "The results show that all the methods that are explicitly aware of the noise in the labels are better than the baseline which is the standard training approach. We revalidated the results reported in Reed et al. (2014) and showed that the hard version of their method performs better than the soft version. In all cases our models performed better than the alternatives. In most cases the c-model was better than the s-model. In the case where the entire dataset was used for training, we can see from the results that there was a phase transition phenomenon. We obtained almost perfect classification results until the noise level was high and there was a sudden strong performance drop. Analyzing why this effect occurred is left for future research. ",
|
| 820 |
+
"bbox": [
|
| 821 |
+
174,
|
| 822 |
+
665,
|
| 823 |
+
825,
|
| 824 |
+
777
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 6
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "We next show the results on the CIFAR-100 image dataset Krizhevsky & Hinton (2009) which consists of $3 2 \\times 3 2$ color images arranged in 100 classes containing 600 images each. There are 500 training images and 100 testing images per class. We used raw images directly without any preprocessing or augmentation. We generated noisy data from clean data by stochastically changing some of the labels. We converted each one of the 100 labels with probability $p$ to a different label according to a predefined permutation. The labels of the test data remained, of course, unperturbed to validate and compare our method to the regular approach. We used a CNN network with two convolutional layers combined with ReLU activation and max-pooling, followed by two fully connected layers. Figure 3 depicts the comparative test errors results as a function of the fractions of noise for three different sizes of training data i.e. $( 2 0 \\% , 5 0 \\% , 1 0 0 \\% )$ of the CIFAR-100 training subset. Bootstrapping was used to compute confidence intervals around the mean in the same way as for the MNIST experiment. The results showed that the proposed method works better than the alternatives. The simple model consistently provided the best results but when the noise level was very high the complex method tended to perform better. ",
|
| 831 |
+
"bbox": [
|
| 832 |
+
174,
|
| 833 |
+
784,
|
| 834 |
+
825,
|
| 835 |
+
924
|
| 836 |
+
],
|
| 837 |
+
"page_idx": 6
|
| 838 |
+
},
|
| 839 |
+
{
|
| 840 |
+
"type": "image",
|
| 841 |
+
"img_path": "images/fdd9756231c266188a1e5ac475687a123453148e5548612140b54244bb24f5ad.jpg",
|
| 842 |
+
"image_caption": [
|
| 843 |
+
"Figure 4: Test classification accuracy results on the CIFAR-100 dataset as a function of the noise level. The results of regular and sparse second softmax layers are shown for several training data sizes $( 2 0 \\% , 5 0 \\% , 1 0 0 \\% )$ of the training subset . "
|
| 844 |
+
],
|
| 845 |
+
"image_footnote": [],
|
| 846 |
+
"bbox": [
|
| 847 |
+
205,
|
| 848 |
+
101,
|
| 849 |
+
790,
|
| 850 |
+
287
|
| 851 |
+
],
|
| 852 |
+
"page_idx": 7
|
| 853 |
+
},
|
| 854 |
+
{
|
| 855 |
+
"type": "text",
|
| 856 |
+
"text": "",
|
| 857 |
+
"bbox": [
|
| 858 |
+
174,
|
| 859 |
+
371,
|
| 860 |
+
825,
|
| 861 |
+
426
|
| 862 |
+
],
|
| 863 |
+
"page_idx": 7
|
| 864 |
+
},
|
| 865 |
+
{
|
| 866 |
+
"type": "text",
|
| 867 |
+
"text": "We next report experimental results for the sparse variant of our method that remains efficient even when the class set is large. We demonstrate this on the case of the CIFAR-100 dataset which consists of 100 possible classes. For each class we only took the five most probable classes in the confusion matrix which is used to initialize the model parameter (see Section 3). As can be seen in Figure 4, sparsifying the second softmax layer did not not result in a drop in performance ",
|
| 868 |
+
"bbox": [
|
| 869 |
+
174,
|
| 870 |
+
434,
|
| 871 |
+
825,
|
| 872 |
+
503
|
| 873 |
+
],
|
| 874 |
+
"page_idx": 7
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"type": "text",
|
| 878 |
+
"text": "5 CONCLUSION ",
|
| 879 |
+
"text_level": 1,
|
| 880 |
+
"bbox": [
|
| 881 |
+
176,
|
| 882 |
+
523,
|
| 883 |
+
318,
|
| 884 |
+
540
|
| 885 |
+
],
|
| 886 |
+
"page_idx": 7
|
| 887 |
+
},
|
| 888 |
+
{
|
| 889 |
+
"type": "text",
|
| 890 |
+
"text": "In this paper we investigated the problem of training neural networks that are robust to label noise. We proposed an algorithm for training neural networks based solely on noisy data where the noise distribution is unknown. We showed that we can reliably learn the noise distribution from the noisy data without using any clean data which, in many cases, are not available. The algorithm can be easily combined with any existing deep learning implementation by simply adding another softmax output layer. Our results encourage collecting more data at a cheaper price, since mistaken data labels can be less harmful to performance. One possible future research direction would be to generalize our learning scheme to cases where both the features and the labels are noisy. We showed results on datasets with small and medium sized class-sets. Future research direction would be to evaluate the performance and efficiency of the proposed method on tasks with large class-sets. ",
|
| 891 |
+
"bbox": [
|
| 892 |
+
173,
|
| 893 |
+
556,
|
| 894 |
+
825,
|
| 895 |
+
694
|
| 896 |
+
],
|
| 897 |
+
"page_idx": 7
|
| 898 |
+
},
|
| 899 |
+
{
|
| 900 |
+
"type": "text",
|
| 901 |
+
"text": "ACKNOWLEDGMENTS ",
|
| 902 |
+
"text_level": 1,
|
| 903 |
+
"bbox": [
|
| 904 |
+
176,
|
| 905 |
+
710,
|
| 906 |
+
326,
|
| 907 |
+
724
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 7
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "text",
|
| 913 |
+
"text": "This work is supported by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). ",
|
| 914 |
+
"bbox": [
|
| 915 |
+
176,
|
| 916 |
+
734,
|
| 917 |
+
823,
|
| 918 |
+
762
|
| 919 |
+
],
|
| 920 |
+
"page_idx": 7
|
| 921 |
+
},
|
| 922 |
+
{
|
| 923 |
+
"type": "text",
|
| 924 |
+
"text": "REFERENCES ",
|
| 925 |
+
"text_level": 1,
|
| 926 |
+
"bbox": [
|
| 927 |
+
174,
|
| 928 |
+
784,
|
| 929 |
+
285,
|
| 930 |
+
797
|
| 931 |
+
],
|
| 932 |
+
"page_idx": 7
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"type": "text",
|
| 936 |
+
"text": "U. Alon, N. Barkai, D. Notterman, K. Gish, S.and D. Mack, and A. Levine. Broad patterns of gene expression revealed by clustering analysis of tumor and normal colon tissues probed by oligonucleotide arrays. Proceedings of the National Academy of Sciences, 96(12):6745–6750, 1999. \nP. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, pp. 138–156, 2006. \nE. Beigman and B. B. Klebanov. Learning with annotation noise. In ACL-IJCNLP, 2009. \nA. Bekker and J. Goldberger. Training deep neural-networks based on unreliable labels. In IEEE Int.l Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2682–2686, 2016. \nC. Brodley and M. Friedl. Identifying mislabeled training data. J. Artif. Intell. Res.(JAIR), 11: 131–167, 1999. \nB. Frenay and A. Kaban. A comprehensive introduction to label noise. In ´ European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN), 2014. \nB. Frenay and M. Verleysen. Classification in the presence of label noise: a survey. ´ IEEE Trans. on Neural Networks and Learning Systems, 25(5):845–869, 2014. \nY. Grandvalet and Y. Bengio. Semi-supervised learning by entropy minimization. In Advances in Neural Information Processing Systems (NIPS), 2005. \nG.E. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning and Representation Learning Workshop, 2014. \nB. Jakramate and A. Kaban. Label-noise robust logistic regression and its applications. In ´ Machine Learning and Knowledge Discovery in Databases, pp. 143–158. 2012. \nD. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. \nA. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, Computer Science Department, University of Toronto, 2009. \nJ. Larsen, L. Nonboe, M. Hintz-Madsen, and K. L. Hansen. Design of robust neural network classifiers. In Int. Conf. on Acoustics, Speech and Signal Processing, pp. 1205–1208, 1998. \nV. Minh and G. Hinton. Learning to label aerial images from noisy data. In Int. Conf. on Machine Learning (ICML), 2012. \nF. Morin and Y. Bengio. Hierarchical probabilistic neural network language model. In Aistats, volume 5, pp. 246–252, 2005. \nN. Natarajan, I. Dhillon, P. Ravikumar, and A. Tewari. Learning with noisy labels. In Advances in Neural Information Processing Systems (NIPS), 2013. \nD. Nettleton, A. Orriols-Puig, and A. Fornells. A study of the effect of different types of noise on the precision of supervised learning techniques. Artificial intelligence review, 2010. \nM. Pechenizkiy, A. Tsymbal, S. Puuronen, and O. Pechenizkiy. Class noise and supervised learning in medical domains: The effect of feature extraction. In Computer-Based Medical Systems (CBMS), 2006. \nS. Reed, H. Lee, D. Anguelov, C. Szegedy, D. Erhan, and A. Rabinovich. Training deep neural networks on noisy labels with bootstrapping. In arXiv preprint arXiv:1412.6596, 2014. \nS. Sukhbaatar and R. Fergus. Learning from noisy labels with deep neural networks. In arXiv preprint arXiv:1406.2080, 2014. \nX. Zhu and X. Wu. Class noise vs. attribute noise: A quantitative study. Artificial Intelligence Review, 22(3):177–210, 2004. ",
|
| 937 |
+
"bbox": [
|
| 938 |
+
171,
|
| 939 |
+
806,
|
| 940 |
+
826,
|
| 941 |
+
924
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 7
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "text",
|
| 947 |
+
"text": "",
|
| 948 |
+
"bbox": [
|
| 949 |
+
171,
|
| 950 |
+
102,
|
| 951 |
+
828,
|
| 952 |
+
796
|
| 953 |
+
],
|
| 954 |
+
"page_idx": 8
|
| 955 |
+
}
|
| 956 |
+
]
|
parse/train/H12GRgcxg/H12GRgcxg_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H12GRgcxg/H12GRgcxg_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HkcTe-bR-/HkcTe-bR-.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EXPLORING DEEP RECURRENT MODELS WITH REINFORCEMENT LEARNING FOR MOLECULE DESIGN
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The design of small molecules with bespoke properties is of central importance to drug discovery. However significant challenges yet remain for computational methods, despite recent advances such as deep recurrent networks and reinforcement learning strategies for sequence generation, and it can be difficult to compare results across different works. This work proposes 19 benchmarks selected by subject experts, expands smaller datasets previously used to approximately 1.1 million training molecules, and explores how to apply new reinforcement learning techniques effectively for molecular design. The benchmarks here, built as OpenAI Gym environments, will be open-sourced to encourage innovation in molecular design algorithms and to enable usage by those without a background in chemistry. Finally, this work explores recent development in reinforcement-learning methods with excellent sample complexity (the A2C and PPO algorithms) and investigates their behavior in molecular generation, demonstrating significant performance gains compared to standard reinforcement learning techniques.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Novel drugs are developed using design - make - test cycles: molecules are designed, synthesized in the laboratory, and then tested for their biological effect. The insights gained from these tests then inform the design for the next iteration. The objective of de novo design methodologies is to perform this cycle with computational methods (Brown, 2015; Schneider, 2013). The test phase was the first to be automated, using the broad categorization of machine learning models known as quantitative structure-activity/property relationships (QSAR/QSPR) to predict the activity of a molecule against a certain biological target, or physicochemical properties. To make virtual molecules, symbolic approaches based on graph rewriting have been used, which are domain-specific and rely on extensive hand-engineering by experts. To optimize the properties of a molecule, for example its activity against a biological target (design), global optimization approaches such as evolutionary algorithms or ant colony optimization have been used (Brown, 2015; Schneider, 2013). Symbolic approaches have been highlighted as either generating unrealistic molecules that would be difficult to synthesize, or for being too conservative, and therefore not sufficiently exploring the space of tractable molecules (Schneider, 2013; Brown & Bostrom, 2016). ¨
|
| 12 |
+
|
| 13 |
+
Recently, generative models have been proposed to learn the distribution of real druglike molecules from data, and then to generate chemical structures that are appropriate for the application domain (White & Wilson, 2010). Interestingly, the generation of molecules is related to natural language generation (NLG). Two classic problems of NLG – preserving coherent long-range dependencies, and syntactic and semantic correctness – directly map to molecules. Current investigations draw heavily from tools developed for language tasks, including variational autoencoders (VAE) (Gomez- ´ Bombarelli et al., 2016; Kusner et al., 2017), recurrent neural network (RNN) models (Segler et al., 2017; Jaques et al., 2017; Olivecrona et al., 2017), generative adversarial networks (GAN) (Guimaraes et al., 2017) and Monte Carlo Tree Search (MCTS) (Yang et al., 2017).
|
| 14 |
+
|
| 15 |
+
This work seeks to consolidate the growing body of recurrent models for molecular design that employ reinforcement learning. Here, we suggest a set of 19 benchmarks of relevance to de novo design. Furthermore, an implementation of these benchmarks as an OpenAI Gym is provided to the community to spur further innovation. Finally, we demonstrate state-of-the-art performance using new techniques drawing from recent advances in reinforcement learning.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Molecular graphs can be represented as strings using the SMILES notation. Letters correspond to element symbols, rings opening and closing is indicated with numbers, and branching with round brackets.
|
| 19 |
+
|
| 20 |
+
# 2 REPRESENTING MOLECULES AS SEQUENCES
|
| 21 |
+
|
| 22 |
+
De novo design can be seen as a structured prediction problem, where molecular structures have to be predicted. This paper will use the term “molecule” to denote the chemical structures of interest. Molecular structures are represented well as labeled graphs $M = ( A , B )$ , with atoms $A$ as vertices and bonds $B$ as edges, elemental types as vertex labels, and bond order as edge labels (Brown, 2009). While neural network models which output graphs remain underexplored, sequence generation is well established. To encode molecules as sequences of symbols (strings), the canonicalized Simplified Molecular-Input Line-Entry System (SMILES) notation (Weininger, 1988; Weininger et al., 1989) can be used (see Fig. 1). This establishes the link to sequence-based language-focused neural network models (Segler et al., 2017; Goldberg, 2016), which can be then be used to generate molecules.
|
| 23 |
+
|
| 24 |
+
# 3 DATA AND BENCHMARKS
|
| 25 |
+
|
| 26 |
+
# 3.1 DATA
|
| 27 |
+
|
| 28 |
+
In this paper, we expand the scope of previous work to a standardized, much larger dataset, which furthermore is of real-world interest to drug discovery scientists. Here, we build on the ChEMBL-23 dataset (Gaulton et al., 2011), a collection extracted from the scientific literature of 1,735,442 distinct compounds and their reported biological activities on 11,538 targets. Though partitioned and filtered, this work employs substantially more training examples than previous work to access the breadth of chemistries that have been demonstrated to be of interest. The preprocessing steps can be found in the Appendix.
|
| 29 |
+
|
| 30 |
+
To stimulate further work in this domain, our OpenAI Gym interface to these benchmarks will be open-sourced to allow the community to prototype new RL algorithms for chemistry.1 Here, we offer 19 benchmarks to be used for molecule generation, comprised of basic suitability benchmarks, basic physicochemical property optimizations, drug-likeness approximations, and multi-objective balancing. The benchmark framework is general enough to be used with any possible small molecule generation method, whether rule-based or learned, and is not limited to sequence-based generation relying on SMILES.
|
| 31 |
+
|
| 32 |
+
# 3.2 VALIDITY AND DIVERSITY OF GENERATED MOLECULES
|
| 33 |
+
|
| 34 |
+
A basic but crucial molecular generation benchmark is simply what percentage of the sampled molecules are valid. For a sample set $S$ of cardinality $m$ sampled from a model $M$ , the percentage of valid molecules is:
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
Y _ { i } \sim \pi _ { \theta } ; \quad S = \{ Y _ { 1 } , \dots , Y _ { m } \} ; \quad R _ { v a l i d } = \frac { 1 } { m } \sum _ { i } ^ { m } \mathrm { v a l i d } ( Y _ { i } ) ; \quad R _ { v a l i d } \in [ 0 , 1 ]
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
where valid() is a function returning 1 if the open-source chemoinformatics toolkit RDKit (Landrum et al.) is able to return a valid molecular object given the SMILES representation, and 0 otherwise.
|
| 41 |
+
|
| 42 |
+
Similarly, it is not ideal if the generative model is able to produce a valid molecule, but only repeats the same molecule. Therefore, the ratio unique benchmark samples $m$ molecules from the model,
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
Figure 2: Four of ten target molecules for the Tanimoto benchmark. See Supplementary Material for the full set.
|
| 46 |
+
|
| 47 |
+
and measures the number of unique molecules:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
Y _ { i } \sim \pi _ { \theta } ; \quad R _ { u n i q u e } = \frac { 1 } { m } \left| \bigcup _ { i = 1 } ^ { m } \{ Y _ { i } \} \right| ; \quad R _ { u n i q u e } \in [ 0 , 1 ]
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
# 3.3 SINGLE OBJECTIVE MAXIMIZATION
|
| 54 |
+
|
| 55 |
+
Previous work has explored a variety of optimization objectives of interest to molecular designers. Physicochemical properties, such as the octanol-water partition coefficient (ClogP) and molecular weight (MW), have strong implications for the viability of a molecule progressing as a potential drug and have been explored as optimization objectives in previous work (Firth et al., 2015; Jaques et al., 2017; Gomez-Bombarelli et al., 2016). Similarly, SMARTS (SMILES Arbitrary Target ´ Specification) sequences allow to specify substructures (subgraphs) which should be contained in the target molecules. This allows to define a reward function SMARTS(X, Y) which returns 1 if a generated molecule $Y$ contains subgraph $X$ and $- 1$ otherwise. The RDKit (Landrum et al.) includes automatic code to calculate these functions, providing a straightforward route to include these objectives in RL scenarios. For a target value $x$ or respectively subgraph $X$ , and a generated sequence $Y$ , the reward is:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\begin{array} { c c } { { R _ { L o g P } ( x , Y ) = \displaystyle \frac { 1 } { 2 5 } ( x - \mathrm { L o g P } ( Y ) ) ^ { 2 } + 1 ; } } & { { R _ { L o g P } ( x , Y ) \in [ - \infty , 1 ] } } \\ { { R _ { M W } ( x , Y ) = \displaystyle \frac { 1 } { 1 0 ^ { 5 } } ( x - \mathrm { M W } ( Y ) ) ^ { 2 } + 1 ; } } & { { R _ { M W } ( x , Y ) \in [ - \infty , 1 ] } } \\ { { R _ { S M A R T S } ( X , Y ) = \mathrm { S M A R T S } ( X , Y ) ; } } & { { R _ { S M A R T S } ( x , Y ) \in \{ - 1 , 1 \} } } \end{array}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
This work chooses five ClogP points $x \in \{ - 1 , 0 , 1 , 2 , 3 \}$ as benchmarks.
|
| 62 |
+
|
| 63 |
+
A more challenging optimization objective is to generate a family of molecules similar to a target given only a fingerprint of the target molecule, in an unpopulated area of chemical space. Here, the commonly-used Functional Connectivity Fingerprint Counts (FCFC4; Rogers & Hahn (2010)) is used to encode the molecular graph as a fixed-size integer vector. After encoding both the proposed molecule and the target molecule, their Tanimoto (akin to Jaccard) similarity is calculated. This work uses ten marketed drugs which modulate different biological target types (Figure 2, Table 3) as molecular targets for approximation. To ensure that no leakage occurs between test and train set, the target molecules themselves as well as compounds similar to them were removed from the training data (see Appendix). The reward of the Tanimoto similarity with $x , y$ as the fingerprint vectors of $X , Y$ is:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
R _ { T a n i } ( X , Y ) = 2 \frac { \sum _ { i = 1 } ^ { n } x _ { i } y _ { i } } { \sum _ { i = 1 } ^ { n } ( x _ { i } ^ { 2 } + y _ { i } ^ { 2 } - x _ { i } y _ { i } ) } - 1 ; \quad R _ { T a n i } ( X , Y ) \in [ - 1 , 1 ]
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
# 3.4 MULTI-OBJECTIVE MAXIMIZATION
|
| 70 |
+
|
| 71 |
+
To test balanced optimization, two further tests are proposed: Lipinski’s Rule-of-Five (Ro5) parameters for the estimation of solubility and permeability important for oral bioavailability, and a weighted multi-parameter optimization. The Ro5 is a heuristic for druglikeness, evaluating four parameters that can be calculated readily from a molecular structure: molecular weight (MW), ClogP, hydrogen-bond donors (HBD) and acceptors (HBA) (Ghose et al., 1999; Lipinski, 2004) In this work, the Ro5 formulation used is to penalize (a) via MSE, the MW if outside the interval [180, 500]; (b) via MSE, the ClogP if outside [-0.4, 5.6]; (c) by absolute error, the number of HBDs if greater than 5;
|
| 72 |
+
|
| 73 |
+
(d) by absolute error, the number of HBAs if greater than 10. The final penalties are summed, scaled by 1e-3, and added to 1 to place the reward $R _ { R o 5 } \in [ - \infty , 1 ]$ .
|
| 74 |
+
|
| 75 |
+
Similarly, any arbitrary balanced weighting of objective functions can be used to simulate a multiobjective optimization, similar to those that are recognized in drug discovery scenarios. Here, an equally-weighted target of ClogP ${ = } 4$ , SMARTS fragment-matching to include a benzene ring, and a MW of 180 is defined.
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
R _ { M P O } = \frac { 1 } { 3 } ( R _ { L o g P } ( 4 , Y ) + R _ { S M A R T S } ( ^ { \prime } \mathsf { c 1 c c c c c 1 ^ { \prime } } , Y ) + R _ { M o l W t } ( 1 8 0 , Y ) )
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
# 4 MODELS
|
| 82 |
+
|
| 83 |
+
# 4.1 RECURRENT NEURAL NETWORKS
|
| 84 |
+
|
| 85 |
+
Gated recurrent models such as Long short-term memory (LSTM) (Hochreiter & Schmidhuber, 1997) are important for modern deep RNN models, and are used as the principal deep model used in this work (Graves, 2013). These RNN models are able to process the SMILES format strings with the addition of an embedding layer as is commonly used in natural language tasks (Gal & Ghahramani, 2016; Cho et al., 2014). Fully-connecting the output of the RNN model to a layer of neurons equal in cardinality to the vocabulary size of our SMILES language (42 symbols, see Supplementary Material Table 2) can be trained to produce a probability distribution over the output symbols. A model $\pi _ { \theta }$ parameterized by $\theta$ trained on sequences $z$ of length $T$ in dataset $S$ can be trained with the following standard differentiable loss (the cross-entropy loss):
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
L ^ { M L E } ( \theta ) = - \sum _ { t = 1 } ^ { T } \log \pi _ { \theta } ( z _ { t } | z _ { 1 : t - 1 } ) ; \quad z = ( z _ { 1 } , \dots , z _ { T } ) \in S
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
In this work, this is called the pretrained maximum likelihood estimation (MLE) model and can be trained using standard supervised gradient descent techniques with backpropagation (Goldberg, 2016). This model functions as a composable, initialized block for more advanced architectures due to its effectiveness in generating realistic chemical sequences. Algorithm 1 demonstrates a slightly more unusual formulation in which a pretrained MLE model $\pi _ { \theta }$ is combined with an arbitrary reward function $R$ to maximize reward by alternately sampling and retraining via Eq. 9 on the $k$ -highest reward sequences (Segler et al., 2017), which we call Hillclimb-MLE (HC-MLE) .
|
| 92 |
+
|
| 93 |
+
Algorithm 1 Hillclimb-MLE Training Method for fitness functions
|
| 94 |
+
|
| 95 |
+
<table><tr><td colspan="2">Require: pretrained MLE model πθ; a reward function R; initial set of sequences ∑= @</td></tr><tr><td colspan="2">1: for n-steps do for m-sequences do</td></tr><tr><td>2:</td><td>Generate a sequence Yi,1:T = (yi,...,yr) ~ Tθ</td></tr><tr><td>3:</td><td></td></tr><tr><td>4:</td><td>Calculate ri = R(Yi,1:T) end for</td></tr><tr><td>5:</td><td>m</td></tr><tr><td>6:</td><td>∑←ΣUU{Y} i=1</td></tr><tr><td>7: 8:</td><td>Keep k-top sequences in Σ with highest corresponding ri</td></tr><tr><td>9: end for</td><td>Fine-tune MLE model πβ to minimize cross-entropy according to Eq. 9 on dataset £</td></tr></table>
|
| 96 |
+
|
| 97 |
+
# 4.1.1 REINFORCEMENT LEARNING
|
| 98 |
+
|
| 99 |
+
Recently, advances in reinforcement learning (RL) have prompted explorations into using RL methods within the drug discovery loop (Jaques et al., 2017; Olivecrona et al., 2017; Segler et al., 2017). RL is a natural environment for drug discovery, which requires online learning balanced against expensive sample evaluation and generation. Moreover, most molecule characteristics are not directlyoptimizable since they are non-differentiable quantities. Instead, casting it into a RL framework allows for the exploration of chemical space in the absence of true loss gradients. Formally, a SMILES string is a sequence $y$ :
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
y = ( a _ { 1 } , \ldots , a _ { m } ) \qquad a \in D
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Thus, each string is comprised of a set of $m$ symbols from the symbol dictionary $D$ , including the padding character, establishing the SMILES environment as a large but discrete state space of size $| D | ^ { m }$ and a discrete action space of size $| D |$ . From an RL perspective, each symbol in the SMILES sequence corresponds to an action $a _ { t }$ taken at sequence step $t$ . The goal of an RL agent here is to develop a policy $\pi _ { \theta }$ , parameterized by $\theta$ , to calculate an action $a _ { t }$ from the current state $s _ { t } = ( a _ { 1 } , \ldots , a _ { t - 1 } )$ that maximizes the expected reward. That is, to maximize the following:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\mathbb { E } [ R ( y _ { 1 : t } ) | s _ { 0 } , \theta ] = \sum _ { y \in Y } \sum _ { a _ { t } \in y } \pi _ { \theta } ( a _ { t } | y _ { 1 : t - 1 } ) \cdot Q ( a _ { t } , y _ { 1 : t - 1 } )
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
where our policy predicts the probability of choosing an action $a _ { t }$ in sequence $y$ from the set of all possible sequences $Y$ , and the reward function $Q ( a _ { t } , y _ { 1 : t - 1 } )$ provides the reward for that action given the sequence so far, $y _ { 1 : t - 1 }$ . However, molecule generation is inherently episodic, producing rewards only at the completion of the SMILES string (in our dictionary, $\cdot \bf { \sigma } \cdot \bf { \sigma } )$ ; for example, parentheses may be open which results in an invalid molecule for evaluation until the matching parentheses closes the branch.
|
| 112 |
+
|
| 113 |
+
To acquire a training gradient to use with a neural network as $\pi _ { \theta }$ , the log-derivative trick can be used to arrive at:
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\nabla _ { \theta } \mathbb { E } _ { y _ { 1 : t } \sim \pi ( y | \theta ) } [ R ( y ) ] = \mathbb { E } _ { y _ { 1 : t } \sim \pi ( y | \theta ) } [ R ( y ) \log ( \pi _ { \theta } ( y ) ) ]
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
which yields the differentiable loss used in the REINFORCE algorithm (Williams, 1992), used here as the policy gradient model:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array} { r } { L ^ { P G } ( \theta ) = \hat { \mathbb { E } } _ { t } [ \log \pi _ { \theta } ( a _ { t } | s _ { t } ) r ( a _ { t } ) ] } \\ { r ( a _ { t } ) = R ( Y _ { 1 : T } ) , \quad a _ { t } \in Y } \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
Notably, the final reward $R ( Y _ { 1 : t } )$ is distributed equally without temporal discounting to every action in the sequence, as temporal distance in SMILES strings is less relevant than most action-spaces.
|
| 126 |
+
|
| 127 |
+
Reinforced Generative Adversarial Networks The recently-introduced GANs (Goodfellow et al., 2014) have experienced a surge of popularity, extending in new ways their original formulation:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V ( D , G ) = \mathbb { E } _ { x \sim p _ { \mathrm { d a t a } } ( x ) } [ \log D ( x ) ] + \mathbb { E } _ { z \sim p _ { z } ( z ) } [ \log ( 1 - D ( G ( z ) ) ) ]
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
which describes the minimax zero-sum game that combines a generator $G$ , converting samples $z$ from a standard distribution $p _ { z }$ into data-like samples, and a discriminator $D$ which attempts to determine whether samples $x$ are from the true distribution $p _ { d a t a }$ and which are generated samples $G ( z \sim p _ { z } )$ . GANs have been applied as a novel architecture type to a variety of domains, particularly in image synthesis where they have been found to generate perceptually realistic images (Radford et al., 2015; Zhu et al., 2017).
|
| 134 |
+
|
| 135 |
+
The GAN formulation was extended in $\mathrm { Y u }$ et al. (2017) to allow sequences to be generated with a GAN-like architecture, using RL and a policy gradient technique to train. This forms the basis of the method published in Guimaraes et al. (2017) to use a RL framework with GANs to optimize arbitrary fitness functions. Training is comprised of three phases: a maximum-likelihood pretraining phase during which the RNN generator learns to generate molecules from a chemical structure dataset, while a discriminator is pretrained on produced versus within-dataset sequences; a RL generator phase in which the generator learns to maximize the reward function balanced with the discriminator; and, finally, a discrimination phase which subsequently guides generation. The latter two phases are alternated throughout the optimization phase.
|
| 136 |
+
|
| 137 |
+
The reward used to reinforce the network uses a parameter $\lambda$ which balances the likelihood that the discriminator $D _ { \phi }$ classifies the generated sequence as true data against the arbitrary fitness objective $O$ :
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
R ( Y _ { 1 : T } ) = \lambda D _ { \phi } ( Y _ { 1 : T } ) + ( 1 - \lambda ) O ( Y _ { 1 : T } )
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
However, while calculating the reward during sequence generation, the final reward is not yet available until the end of the sequence. In order to maximize the number of training steps (rather than one step per sequence) and to guide the generation process, the objective-reinforced GAN (Guimaraes et al., 2017) uses Monte-Carlo rollouts from the current state to estimate the reward of the available actions. This strategy, however, can have high variance and significantly undersamples the large branching in molecule generation (with 42 symbols per step and an average sequence length of 44 steps).
|
| 144 |
+
|
| 145 |
+
Advantage Actor-Critic Networks A wealth of new techniques for reinforcement learning have recently appeared which have yet to be adapted to molecule generation. One technique to minimize the variance that hinders policy gradient training and to accelerate convergence is to subtract an estimate of the reward from the true reward. Importantly, this does not introduce estimator bias but can diminish the variance. This can be seen as an actor-critic model that separates the policy training from the value estimation in which the actor is the policy $\pi _ { \theta }$ and the baseline value estimate $V _ { s _ { t } }$ is the critic that gives the approximate value of that state (Degris et al., 2012; Sutton & Barto, 1998; Mnih et al., 2016). This advantage actor-critic (A2C) training is the synchronous version of the asynchronous advantage actor critic (A3C) model (Mnih et al., 2016) and can use generalized advantage estimation (Schulman et al., 2015). In this work, the following differentiable loss function is used to simultaneously reduce the variance of the reward and to minimize the difference between the expected reward $V _ { \phi }$ and the true reward:
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
L ^ { A 2 C } ( \theta , \phi ) = \hat { \mathbb { E } } _ { t } [ \log \pi _ { \theta } ( a _ { t } | s _ { t } ) ( R - V _ { \phi } ( s _ { t } ) ) + ( R ( s _ { t } ) - V _ { \phi } ( s _ { t } ) ) ^ { 2 } ]
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
The value estimation function $V _ { \phi }$ is a neural network itself here, parameterized by $\phi$ ; this work uses a fully-connected network from the hidden state of the LSTM to a single node predicting reward.
|
| 152 |
+
|
| 153 |
+
Proximal Policy Optimization Finally, great success has been found recently in the family of proximal policy optimization algorithms (Schulman et al., 2017). These algorithms exhibit very low sample complexity and are of particular interest as reliable data is always at a premium in chemistry, and both generation and evaluation time of a molecule can be long. Using the advantage $\hat { A } _ { t } = R ( s _ { t } ) - V _ { \phi } ( s _ { t } )$ from above, the following clipped PPO loss is used:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
L ^ { C L I P } ( \theta , \phi ) = \hat { \mathbb { E } } _ { t } \left[ \operatorname* { m i n } \left( \frac { \pi _ { \theta } ( a _ { t } | s _ { t } ) } { \pi _ { \theta ^ { o l d } } ( a _ { t } | s _ { t } ) } \hat { A } _ { t } , \operatorname { c l i p } \left( \frac { \pi _ { \theta } ( a _ { t } | s _ { t } ) } { \pi _ { \theta ^ { o l d } } ( a _ { t } | s _ { t } ) } , 1 + \epsilon , 1 - \epsilon \right) \hat { A } _ { t } \right) + \hat { A } _ { t } ^ { 2 } \right]
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
The motivation for this pessimistic loss given by the min() function, succinctly stated in Schulman et al. (2017), ignores changes in the probability ratio when it would increase the objective and focuses learning in which the objective would worsen. Furthermore, the clipped boundary region provides a tight bound, outside of which the loss has function has no incentive to further change, encouraging smaller changes. The hyperparameter $\epsilon$ controls the width of this region and can be found in Table 4.
|
| 160 |
+
|
| 161 |
+
Regularization for Molecular Generation There are additional costs that can be combined with the above techniques. As the goal of de novo design is not to generate a single molecule, but rather a family of candidate molecules to present to an expert domain scientist; a diverse set of suggested molecules is always beneficial. To encourage robust learning, a regularization factor on the KullbackLeibler (KL) divergence between the current policy and the original policy can be added to encourage the model to not stray far from a good model of chemical distributions:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
C ^ { M L E } = \lambda _ { M L E } \hat { \mathbb { E } } _ { t } \left[ \sum _ { a _ { i } \in D } \pi _ { \theta } ( a _ { i } | s _ { t } ) \log \frac { \pi _ { \theta } ( a _ { i } | s _ { t } ) } { \pi _ { \theta } ^ { M L E } ( a _ { i } | s _ { t } ) } \right]
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
using a weight parameter $\lambda$ and evaluating the static, pretrained policy $\pi _ { \theta } ^ { M L E } ( a _ { i } | s _ { t } )$ . Similarly, for RL scenarios, a way to explicitly encourage exploration is to place a cost on the distribution entropy of the model:
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
C ^ { E N T } = \lambda _ { e n t } \hat { \mathbb { E } } _ { t } \left[ - \sum _ { a _ { i } \in D } \pi _ { \theta } ( a _ { i } | s _ { t } ) \log \pi _ { \theta } ( a _ { i } | s _ { t } ) \right]
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
The values used in this work can be found in the supplementary material. Additionally, we evaluate the policy gradient regularization scheme proposed by Olivecrona et al. (2017), denoted “Aug. MLE” in this paper.
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 3: Sample RL trajectories for the tasks (independently-scaled).
|
| 177 |
+
|
| 178 |
+
# 5 RESULTS
|
| 179 |
+
|
| 180 |
+
These algorithms were built using PyTorch (Paszke et al., 2017), with RDKit (Landrum et al.) providing the chemoinformatics functionality. These benchmarks were built as new environments in the OpenAI Gym (Brockman et al., 2016), and will be released as open-source to the community. The code was run using an NVIDIA Tesla V100 GPU, with optimization times for 1000 action-steps shown in the “Runtime” category of Table 1. The final RNN architecture that underlies the Policy Gradient, Regularized PG, GAN, A2C, PPO, HC MLE, and Augmented MLE models consists of three layers of 512 LSTM neurons, with a 512-dimensional embedding layer and a fully-connected output layer of 42 neurons. It takes approximately eight hours to train for 70 epochs on the filtered ChEMBL dataset, with 50,000 randomly-sampled SMILES strings for development, 200,000 for test, and the remaining 1190203 used for training. For the GAN architecture, the discriminator is a convolutional network with two alternating layers of ten kernels of 3x3 convolutions followed by $2 \mathbf { x } 2$ max-pooling, with global averaging over the final two (real and fake) outputs. Experiments were run for approximately 1.6M action-steps, corresponding roughly to 1000 SMILES in batches of 32 with an average sequence length of 44.
|
| 181 |
+
|
| 182 |
+
Encouragingly, the baseline MLE model after training produces $9 4 . 7 \%$ valid SMILES out of $1 0 \mathrm { k }$ generated molecules without further fine-tuning, establishing an extremely competitive benchmark. For similar evaluation, a GVAE was trained on the same dataset and achieved $3 7 . 1 \%$ valid molecules. Moreover, $9 9 . 8 7 \%$ of these MLE-sampled molecules were unique, establishing very high diversity.
|
| 183 |
+
|
| 184 |
+
The RL model results, which are the remaining 17 benchmark tasks including multi-objective optimization, Ro5 optimization, ClogP targeting, and drug-fingerprint targeting, can be found in Table 1, with example RL curves in Fig. 3. The benchmarks referred to by a drug name are the Tanimoto-approach benchmarks, in which a drug is held out from the training set and the model must design a similar drug given only the FCFC4 semantic hash of the drug. The baseline model samples 10k random molecules from the training set, keeping only the best-performing ones.
|
| 185 |
+
|
| 186 |
+
Hillclimb-MLE Perhaps surprisingly, the alternating sampling and HC-MLE training algorithm was the most successful model. The model effectively avoided nonoptimal local minima and steadily increased reward throughout training. Given a large computation budget, this model appears the most successful for widely sampling while still optimizing towards a target.
|
| 187 |
+
|
| 188 |
+
PPO The PPO with the clipped objective was the most successful standard RL algorithm for this task. It often converges an order-of-magnitude faster than other algorithms, but occasionally chooses a less optimal final configuration or occasional catastrophic loss. For future work where molecule fitness function testing time is significant - if, for example, an assay is required - PPO is a valuable candidate as an optimization strategy. A wide range of learning rates and entropy exploration costs were sampled (not shown) with PPO consistently and reliably training to achieve good performance.
|
| 189 |
+
|
| 190 |
+
Table 1: Model performance, given by mean fitness in the final timestep over three random initializations, while single-best SMILES result from the plotted runs is given in parentheses.
|
| 191 |
+
|
| 192 |
+
<table><tr><td></td><td></td><td>Baseline</td><td>Reg. PG</td><td>A2C</td><td>PPO</td><td>HC-MLE</td></tr><tr><td>Property</td><td>LogP=-1</td><td>1.00</td><td>0.66 (1.00)</td><td>0.98 (1.00)</td><td>1.00 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td></td><td>LogP=0</td><td>1.00</td><td>0.78 (1.00)</td><td>0.98 (1.00)</td><td>1.00 (1.00)</td><td>0.98 (1.00)</td></tr><tr><td></td><td>LogP=1</td><td>1.00</td><td>0.83 (1.00)</td><td>0.98 (1.00)</td><td>1.00 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td></td><td>LogP=2</td><td>1.00</td><td>0.86 (1.00)</td><td>0.97 (1.00)</td><td>1.00 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td>Mult. Obj.</td><td>LogP=3</td><td>1.00</td><td>0.86 (1.00)</td><td>0.97 (1.00)</td><td>0.91 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td></td><td>MPO</td><td>1.00</td><td>0.82 (1.00)</td><td>0.95 (1.00)</td><td>1.00 (1.00)</td><td>0.98 (1.00)</td></tr><tr><td>Tanimoto</td><td>Ro5</td><td>1.00</td><td>0.77 (1.00)</td><td>0.96 (1.00)</td><td>1.00 (1.00)</td><td>0.59 (1.00)</td></tr><tr><td></td><td>Albuterol</td><td>0.02</td><td>-0.55 (0.41)</td><td>0.14 (-0.08)</td><td>0.04 (-0.10)</td><td>0.32 (0.83)</td></tr><tr><td></td><td>Aripiprazole</td><td>-0.15</td><td>-0.34 (0.63)</td><td>0.38 (-0.12)</td><td>0.40 (0.29)</td><td>0.51 (1.00)</td></tr><tr><td></td><td>Celecoxxib</td><td>-0.22</td><td>-0.35 (0.69)</td><td>0.20 (-0.06)</td><td>0.25 (0.14)</td><td>0.43 (1.00)</td></tr><tr><td></td><td>Cobimetinib</td><td>-0.18</td><td>-0.47 (0.17)</td><td>-0.01 (-0.01)</td><td>0.11 (0.06)</td><td>0.32 (0.57)</td></tr><tr><td></td><td>Fexofenadine</td><td>-0.26</td><td>-0.33 (0.50)</td><td>-0.24 (-0.13)</td><td>0.18 (0.19)</td><td>0.47 (0.82)</td></tr><tr><td></td><td>Mestranol</td><td>-0.17</td><td>-0.46 (0.62)</td><td>0.14 (-0.22)</td><td>0.06 (0.30)</td><td>0.34 (0.85)</td></tr><tr><td></td><td>Osimertinib</td><td>-0.44</td><td>-0.43 (0.15)</td><td>-0.36 (-0.26)</td><td>-0.11 (0.11)</td><td>0.13 (0.48)</td></tr><tr><td></td><td>Ranolazine</td><td>-0.20</td><td>-0.32 (0.49)</td><td>0.32 (-0.19)</td><td>0.14 (0.47)</td><td>0.50 (1.00)</td></tr><tr><td></td><td>Thiothixene</td><td>-0.26</td><td>-0.35 (0.28)</td><td>-0.09 (-0.19)</td><td>0.07 (0.29)</td><td>0.33 (0.57)</td></tr><tr><td></td><td>Troglitazone</td><td>-0.28</td><td>-0.39 (0.27)</td><td>-0.19 (-0.27)</td><td>0.06 (0.18)</td><td>0.24 (0.56)</td></tr><tr><td>Summary</td><td>Mean</td><td>0.30</td><td>0.09 (0.66)</td><td>0.42 (0.32)</td><td>0.48 (0.53)</td><td>0.59 (0.81)</td></tr><tr><td></td><td>Runtime</td><td>0.025s</td><td>0.68s</td><td>2.5s</td><td>8.54s</td><td>0.31s</td></tr></table>
|
| 193 |
+
|
| 194 |
+
GAN The GAN is a nascent and intriguing architecture, but was found to not be optimal for this task yet. The complexity of balancing the discriminator against the generator, interleaving epochs, and choosing a correct architecture made it difficult to use, though a significant body of literature is working to address more stable training (Arjovsky et al., 2017; Salimans et al., 2016). Though MC rollouts are costly in action-steps (leading to the slightly unfair showing in Figure 3), the other problem is more fundamental: as Fig. 4a shows in a Principal Component Analysis (PCA) plot of the MQN descriptors (Nguyen et al., 2009) of the generated molecules, stronger discriminator weight $\phi _ { D }$ forces the generated molecules to more closely match the primary modes of the training data. Effectively reproducing the training data, however, contrasts with the purpose of the generator for optimizing towards a given molecule. While this operates effectively as a regularizer, it is far more stable and explicit to regularize against the KL divergence as is done for the Regularized Policy Gradient model than to balance the hyperparameters of a GAN. Perhaps future work can investigate other uses of the GAN to, e.g., coerce the architecture away from reproducing identical sequences rather than memorizing the training data.
|
| 195 |
+
|
| 196 |
+
Benefits of extended sampling Examining the difference in the best single reward on the plotted runs (parentheses) in Table 1 and the final timestep mean (no parentheses), algorithms clearly benefit merely from sampling from a well-trained initial model for an extended period of time. The regularized policy gradient model, in particular, demonstrates high peak performance yet consistently does not learn effectively, suggesting that straightforward sampling for a large, diverse model may be an acceptable strategy in the absence of convergence-time costs.
|
| 197 |
+
|
| 198 |
+
Temperature Sampling A temperature factor is often included in available implementations to allow the generation of more diverse molecules. It has a straightforward formulation for an output distribution $P$ yielding $\begin{array} { r } { P _ { t } = \frac { 1 } { Z } e ^ { P / t } } \end{array}$ , with normalization constant $Z$ , temperature $t$ , and temperaturealtered probability distribution $P _ { t }$ . However, as shown in the t-distributed Stochastic Neighbor Embedding (t-SNE) (Maaten & Hinton, 2008) plot in Fig. 4b, higher temperatures do not necessarily translate to a better coverage of chemical space. As a large proportion of possible SMILES strings are invalid, increasing the temperature is likely to invalidate the SMILES string. The molecules generated in the highest-temperature network favor short, brief SMILES strings that vastly undersample the chemical space. Indeed, this suggests the best strategy to achieve high diversity and a larger sampling of valid space is to not use temperature sampling at all.
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 4: In (a), PCA plot of the GAN generator under various influences of the discriminator. In (b), sampling from a model at higher temperatures counter-intuitively does not increase coverage.
|
| 202 |
+
|
| 203 |
+
# 6 CONCLUSION
|
| 204 |
+
|
| 205 |
+
In this work, we proposed a large, standardized dataset and a set of 19 benchmarks to evaluate models for molecule generation and design. Several RL strategies were investigated on these benchmarks. Here, the results suggest that the Hillclimb-MLE model is a surprisingly robust technique with large datasets and deep models, outperforming PPO given sufficient compute times and sample evaluations. In the space of constrained compute and sample evaluations, PPO was shown to be an effective learning algorithm, converging an order of magnitude before other reinforcement-learning algorithms for molecule generation.
|
| 206 |
+
|
| 207 |
+
Nevertheless, there is still tremendous need for more efficient and effective models for molecular design, which could have a profound impact on molecular design — including drug, materials and agrochemicals discovery — and thus immediately on human well-being. With the present, easily usable benchmark, we hope to inspire the machine learning community to pick up this challenge.
|
| 208 |
+
|
| 209 |
+
# REFERENCES
|
| 210 |
+
|
| 211 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 212 |
+
|
| 213 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016.
|
| 214 |
+
|
| 215 |
+
Dean G Brown and Jonas Bostrom. Analysis of past and present synthetic methodologies on medicinal ¨ chemistry: where have all the new reactions gone? J. Med. Chem, 59(10):4443–4458, 2016.
|
| 216 |
+
|
| 217 |
+
Nathan Brown. Chemoinformatics – an introduction for computer scientists. ACM Computing Surveys (CSUR), 41(2):8, 2009.
|
| 218 |
+
|
| 219 |
+
Nathan Brown. In Silico Medicinal Chemistry: Computational Methods to Support Drug Design. Royal Society of Chemistry, 2015.
|
| 220 |
+
|
| 221 |
+
Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
|
| 222 |
+
|
| 223 |
+
Thomas Degris, Patrick M Pilarski, and Richard S Sutton. Model-free reinforcement learning with continuous action in practice. In American Control Conference (ACC), 2012, pp. 2177–2182. IEEE, 2012.
|
| 224 |
+
|
| 225 |
+
Nicholas C Firth, Butrus Atrash, Nathan Brown, and Julian Blagg. Moarf, an integrated workflow for multiobjective optimization: implementation, synthesis, and biological evaluation. Journal of chemical information and modeling, 55(6):1169–1180, 2015.
|
| 226 |
+
|
| 227 |
+
Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pp. 1019–1027, 2016.
|
| 228 |
+
|
| 229 |
+
Anna Gaulton, Louisa J Bellis, A Patricia Bento, Jon Chambers, Mark Davies, Anne Hersey, Yvonne Light, Shaun McGlinchey, David Michalovich, Bissan Al-Lazikani, et al. Chembl: a large-scale bioactivity database for drug discovery. Nucleic acids research, 40(D1):D1100–D1107, 2011.
|
| 230 |
+
|
| 231 |
+
Arup K Ghose, Vellarkad N Viswanadhan, and John J Wendoloski. A knowledge-based approach in designing combinatorial or medicinal chemistry libraries for drug discovery. 1. a qualitative and quantitative characterization of known drug databases. Journal of combinatorial chemistry, 1(1): 55–68, 1999.
|
| 232 |
+
|
| 233 |
+
Yoav Goldberg. A primer on neural network models for natural language processing. J. Artif. Intell. Res.(JAIR), 57:345–420, 2016.
|
| 234 |
+
|
| 235 |
+
Rafael Gomez-Bombarelli, David Duvenaud, Jos ´ e Miguel Hern ´ andez-Lobato, Jorge Aguilera- ´ Iparraguirre, Timothy D Hirzel, Ryan P Adams, and Alan Aspuru-Guzik. Automatic chemical de- ´ sign using a data-driven continuous representation of molecules. arXiv preprint arXiv:1610.02415, 2016.
|
| 236 |
+
|
| 237 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 238 |
+
|
| 239 |
+
Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013.
|
| 240 |
+
|
| 241 |
+
Gabriel Lima Guimaraes, Benjamin Sanchez-Lengeling, Pedro Luis Cunha Farias, and Alan Aspuru- ´ Guzik. Objective-Reinforced Generative Adversarial Networks (ORGAN) for Sequence Generation Models. arXiv preprint arXiv:1705.10843, 2017.
|
| 242 |
+
|
| 243 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
|
| 244 |
+
|
| 245 |
+
Natasha Jaques, Shixiang Gu, Dzmitry Bahdanau, Jose Miguel Hern ´ andez-Lobato, Richard E Turner, ´ and Douglas Eck. Sequence tutor: Conservative fine-tuning of sequence generation models with kl-control. In International Conference on Machine Learning, pp. 1645–1654, 2017.
|
| 246 |
+
|
| 247 |
+
Matt J. Kusner, Brooks Paige, and Jose Miguel Hern ´ andez-Lobato. Grammar Variational Autoencoder.´ mar 2017. URL http://arxiv.org/abs/1703.01925.
|
| 248 |
+
|
| 249 |
+
Greg Landrum et al. Rdkit: Open-source cheminformatics. URL http://www.rdkit.org.
|
| 250 |
+
|
| 251 |
+
Christopher A Lipinski. Lead-and drug-like compounds: the rule-of-five revolution. Drug Discovery Today: Technologies, 1(4):337–341, 2004.
|
| 252 |
+
|
| 253 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008.
|
| 254 |
+
|
| 255 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016.
|
| 256 |
+
|
| 257 |
+
Kong T Nguyen, Lorenz C Blum, Ruud Van Deursen, and Jean-Louis Reymond. Classification of organic molecules by molecular quantum numbers. ChemMedChem, 4(11):1803–1805, 2009.
|
| 258 |
+
|
| 259 |
+
Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular de-novo design through deep reinforcement learning. Journal of Cheminformatics, 9(1):1–14, 2017.
|
| 260 |
+
|
| 261 |
+
Adam Paszke, Sam Gross, and Soumith Chintala. Pytorch, 2017.
|
| 262 |
+
|
| 263 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 264 |
+
|
| 265 |
+
David Rogers and Mathew Hahn. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50(5):742–754, 2010.
|
| 266 |
+
|
| 267 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pp. 2234–2242, 2016.
|
| 268 |
+
|
| 269 |
+
Gisbert Schneider. De novo molecular design. John Wiley & Sons, 2013.
|
| 270 |
+
|
| 271 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015.
|
| 272 |
+
|
| 273 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 274 |
+
|
| 275 |
+
Marwin H. S. Segler, Thierry Kogej, Christian Tyrchan, and Mark P. Waller. Generating Focussed Molecule Libraries for Drug Discovery with Recurrent Neural Networks. arXiv preprint arXiv:1701.01329, 2017.
|
| 276 |
+
|
| 277 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.
|
| 278 |
+
|
| 279 |
+
David Weininger. Smiles, a chemical language and information system. 1. introduction to methodol ogy and encoding rules. J. Chem. Inf. Comp. Sci., 28(1):31–36, 1988.
|
| 280 |
+
|
| 281 |
+
David Weininger, Arthur Weininger, and Joseph L Weininger. Smiles. 2. algorithm for generation of unique smiles notation. J. Chem. Inf. Comp. Sci., 29(2):97–101, 1989.
|
| 282 |
+
|
| 283 |
+
David White and Richard C Wilson. Generative models for chemical structures. J. Chem. Inf. Mod., 50(7):1257–1274, 2010.
|
| 284 |
+
|
| 285 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 286 |
+
|
| 287 |
+
Xiufeng Yang, Jinzhe Zhang, Kazuki Yoshizoe, Kei Terayama, and Koji Tsuda. Chemts: an efficient python library for de novo molecular generation. Science and Technology of Advanced Materials, 18(1):972–976, 2017.
|
| 288 |
+
|
| 289 |
+
Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. In AAAI, pp. 2852–2858, 2017.
|
| 290 |
+
|
| 291 |
+
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017.
|
| 292 |
+
|
| 293 |
+
# A SUPPLEMENTARY MATERIAL
|
| 294 |
+
|
| 295 |
+
This supplementary material section offers additional information and to aid in reproducibility for the reader. For visibility regarding the extent to which the MLE pretrained-model matches the trained space of chemistry, Figure 5 demonstrates its ability to effectively map and generate the space of ChEMBL molecules. In Table 2, the SMILES dictionary used in this work can be found. The drugs used in the Tanimoto fingerprint approach task can be found in Table 3, with the hyperparameters used in this work in Table 4.
|
| 296 |
+
|
| 297 |
+
# DATASET PROPROCESSING
|
| 298 |
+
|
| 299 |
+
Preprocessing the Chembl-23 dataset is comprised of a few steps. First, all molecules containing the compounds are neutralized and salts are stripped, keeping only the largest connected component. Then, the canonical SMILES representation of the molecules are generated using RDKit (Landrum et al.), and all SMILES sequences longer than 100 characters are filtered out. Most molecules with more than 100 SMILES symbols are either peptides, too heavy or too complex to be considered in de novo-design, and $9 6 . 7 \%$ of ChEMBL is less than 100 symbols in length. Any SMILES containing forbidden symbols (Table 2) are filtered out. Further, the molecules of the Tanimoto benchmark are removed from the set. Finally, all molecules similar to these benchmark molecules in terms a Tanimoto coefficient greater than 0.5 on ECFC4 fingerprints are removed. The remaining molecules are randomly split into train, test and development set.
|
| 300 |
+
|
| 301 |
+
Before one-hot encoding, the four multi-character included atoms (Br, Cl, Si, Se) were replaced with single-character substitutes. Then, the included symbols (including start character $" \bigcirc : $ and end character $" \setminus "$ are converted to integer token equivalents.
|
| 302 |
+
|
| 303 |
+

|
| 304 |
+
Figure 5: t-SNE visualization (Maaten & Hinton, 2008) of MLE sampling of generated space. The MLE model effectively covers the space of ChEMBL and even reproduces the subspaces around the ChEMBL molecules.
|
| 305 |
+
|
| 306 |
+
Table 2: Dictionary of SMILES
|
| 307 |
+
|
| 308 |
+
<table><tr><td>Forbidden Symbols</td><td>'Li','Be','Ne','Na','Mg','Al','Ar','K','Ca','Sc', 'Ti','V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga', 'Ge','As','Kr','Rb','Sr','Y','Zr','Nb','Mo','Tc', 'Ru','Rh','Pd','Ag','Cd','In','Sn','Sb','Xe','Cs', 'Ba','Hf','Ta','W','Re','Os','Ir','Pt','Au','Hg', 'Tl','Pb','Bi','Po','At','Rn','Fr','Ra','Rf','Db', 'Sg','Bh','Hs','Mt','Ds','Rg','Cn','Fl','Lv','La', 'Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho', 'Er','Tm','Yb','Lu','Ac','Th','Pa','U','Np','Pu',</td></tr><tr><td>Multi-character Symbols</td><td>'te','Te','se'</td></tr><tr><td>Included Symbols</td><td>'Br':Y,'Cl':X,'Si':A,'Se':Z 'Q','\n','','#','%','(', 1</td></tr></table>
|
| 309 |
+
|
| 310 |
+
Table 3: Drugs used in the Tanimoto benchmark task
|
| 311 |
+
|
| 312 |
+
<table><tr><td>Drug</td><td>SMILES</td></tr><tr><td>Albuterol</td><td>CC(C)(C)NCC(O)clccc(O)c(CO)c1</td></tr><tr><td>Aripiprazole</td><td>Clc1cccc(N2CCN(CCCCOc3ccc4CCC(=O)Nc4c3)CC2)c1C1</td></tr><tr><td>Celecoxxib</td><td>Cclccc(ccl)-clcc(nnl-clccc(ccl)S(N)(=O)=O)C(F)(F)F</td></tr><tr><td>Cobimetinib</td><td>OC1(CN(C1)C(=O)clccc(F)c(F)c1Nclccc(I) cclF)C1CCCCN1</td></tr><tr><td>Fexofenadine</td><td>CC(C)(C(O)=O)clccc(ccl)C(O)cccNiccC(Cc1)C(O)(clcccccl)clccccc1</td></tr><tr><td>Mestranol</td><td>COc1ccc2C3CCC4(C)C(CCC4(O)C#C)C3CCc2c1</td></tr><tr><td>Osimertinib</td><td>COclcc(N(C)CCN(C)C)c(NC(=O)C=C)cc1Nc2nccc(n2)c3cn(C)c4ccccc34</td></tr><tr><td>Ranolazine</td><td>COc1ccccc1OCC(O) CN2CCN(CC(=O)Nc3c(C)cccc3C)CC2</td></tr><tr><td>Thiothixene</td><td>CN(C)S(=O)(=O)clccc2Sc3ccccc3C(=CCCN4CCN(C)CC4)c2c1</td></tr><tr><td>Troglitazone</td><td>Cclc(C)c2OC(C) (COc3ccc(CC4SC(=O)NC4=O)cc3)CCc2c(C)c1O</td></tr></table>
|
| 313 |
+
|
| 314 |
+

|
| 315 |
+
Figure 6: Target molecules for the Tanimoto benchmark.
|
| 316 |
+
|
| 317 |
+
Table 4: Hyperparameters
|
| 318 |
+
|
| 319 |
+
<table><tr><td>Model</td><td>Param</td><td>Explanation</td></tr><tr><td>Baseline</td><td>batchsize = 10 epochs = 1000</td><td>Number of SMILES per batch Number of batches</td></tr><tr><td>Reg. PG</td><td>max_len=100 batchsize=128 num_epochs=128 c_reg=10</td><td>Max length of a SMILES Number of parallel batches Number of batches of RL optimization Weight of the MLE regularizer Learning rate of Adam optimizer</td></tr><tr><td>A2C</td><td>lr=1e-4 num_actions=1e6 max-grad_norm=0.5 gamma=1.0 ir=4e-4 eps=1e-8 num_steps=40 batch_size=32 entropy-coef=0.013 gae=1 tau=0.95</td><td>Total number of actions of RL optimization Maximum norm of gradient before clipping Time-discount factor Learning rate of Adam optimizer Epsilon parameter for Adam optimizer Number of steps of forward steps Number of parallel environments Multiplicative cost of the entropy Use generalized advantage estimation Generalized advantage estimation tau</td></tr><tr><td>GAN</td><td>val_loss_wt=0.5 pretrain_discrim=5 num_rounds=4 rl_epochs=5 discr_epochs=1 phi_D=0.05 batch_size=8 max_len=100 gamma=0.98 num_rollout s=3 lr=1e-3 lr=1e-3</td><td>Weight of the value loss Number of epochs to pretrain the discriminator Number of rounds of RL-and-discriminator alternating training Number of RL epochs per round Number of discriminator epochs per round Weight of the discriminator in reward Batch size of training Max rollout length Time-discount factor for rollouts Number of rollouts per action-step Learning rate of Adam optimizer for generator Learning rate of Adam optimizer for discriminator</td></tr><tr><td>PPO</td><td>ppo_batch_size=64 ppo_epoch=4 epsilon=0.2 num_actions=1e6 max-grad_norm=0.5 gamma=1.0 lr=4e-4 eps=1e-8 num_steps=40 batch_size=32 entropy-coef=0.013 gae=0 val_loss_wt=0.5</td><td>Batch size of the PPO updates Number of PPO epochs Width of the PPO clip region Total number of actions of RL optimization Maximum norm of gradient before clipping Time-discount factor Learning rate of Adam optimizer Epsilon parameter for Adam optimizer Number of steps of forward steps Number of parallel environments Multiplicative cost of the entropy Do not use generalized advantage estimation Weight of the value loss</td></tr></table>
|
parse/train/HkcTe-bR-/HkcTe-bR-_content_list.json
ADDED
|
@@ -0,0 +1,1629 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "EXPLORING DEEP RECURRENT MODELS WITH REINFORCEMENT LEARNING FOR MOLECULE DESIGN ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
826,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
170,
|
| 20 |
+
398,
|
| 21 |
+
198
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
234,
|
| 32 |
+
544,
|
| 33 |
+
251
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "The design of small molecules with bespoke properties is of central importance to drug discovery. However significant challenges yet remain for computational methods, despite recent advances such as deep recurrent networks and reinforcement learning strategies for sequence generation, and it can be difficult to compare results across different works. This work proposes 19 benchmarks selected by subject experts, expands smaller datasets previously used to approximately 1.1 million training molecules, and explores how to apply new reinforcement learning techniques effectively for molecular design. The benchmarks here, built as OpenAI Gym environments, will be open-sourced to encourage innovation in molecular design algorithms and to enable usage by those without a background in chemistry. Finally, this work explores recent development in reinforcement-learning methods with excellent sample complexity (the A2C and PPO algorithms) and investigates their behavior in molecular generation, demonstrating significant performance gains compared to standard reinforcement learning techniques. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
267,
|
| 43 |
+
766,
|
| 44 |
+
460
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
178,
|
| 54 |
+
489,
|
| 55 |
+
336,
|
| 56 |
+
505
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Novel drugs are developed using design - make - test cycles: molecules are designed, synthesized in the laboratory, and then tested for their biological effect. The insights gained from these tests then inform the design for the next iteration. The objective of de novo design methodologies is to perform this cycle with computational methods (Brown, 2015; Schneider, 2013). The test phase was the first to be automated, using the broad categorization of machine learning models known as quantitative structure-activity/property relationships (QSAR/QSPR) to predict the activity of a molecule against a certain biological target, or physicochemical properties. To make virtual molecules, symbolic approaches based on graph rewriting have been used, which are domain-specific and rely on extensive hand-engineering by experts. To optimize the properties of a molecule, for example its activity against a biological target (design), global optimization approaches such as evolutionary algorithms or ant colony optimization have been used (Brown, 2015; Schneider, 2013). Symbolic approaches have been highlighted as either generating unrealistic molecules that would be difficult to synthesize, or for being too conservative, and therefore not sufficiently exploring the space of tractable molecules (Schneider, 2013; Brown & Bostrom, 2016). ¨ ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
520,
|
| 66 |
+
825,
|
| 67 |
+
714
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Recently, generative models have been proposed to learn the distribution of real druglike molecules from data, and then to generate chemical structures that are appropriate for the application domain (White & Wilson, 2010). Interestingly, the generation of molecules is related to natural language generation (NLG). Two classic problems of NLG – preserving coherent long-range dependencies, and syntactic and semantic correctness – directly map to molecules. Current investigations draw heavily from tools developed for language tasks, including variational autoencoders (VAE) (Gomez- ´ Bombarelli et al., 2016; Kusner et al., 2017), recurrent neural network (RNN) models (Segler et al., 2017; Jaques et al., 2017; Olivecrona et al., 2017), generative adversarial networks (GAN) (Guimaraes et al., 2017) and Monte Carlo Tree Search (MCTS) (Yang et al., 2017). ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
722,
|
| 77 |
+
825,
|
| 78 |
+
847
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "This work seeks to consolidate the growing body of recurrent models for molecular design that employ reinforcement learning. Here, we suggest a set of 19 benchmarks of relevance to de novo design. Furthermore, an implementation of these benchmarks as an OpenAI Gym is provided to the community to spur further innovation. Finally, we demonstrate state-of-the-art performance using new techniques drawing from recent advances in reinforcement learning. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
854,
|
| 88 |
+
823,
|
| 89 |
+
924
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "image",
|
| 95 |
+
"img_path": "images/3624ce61c100a6b53b09b91f4d0265606768d6feaeef76ab8cbbf87c6acfafd1.jpg",
|
| 96 |
+
"image_caption": [
|
| 97 |
+
"Figure 1: Molecular graphs can be represented as strings using the SMILES notation. Letters correspond to element symbols, rings opening and closing is indicated with numbers, and branching with round brackets. "
|
| 98 |
+
],
|
| 99 |
+
"image_footnote": [],
|
| 100 |
+
"bbox": [
|
| 101 |
+
437,
|
| 102 |
+
63,
|
| 103 |
+
558,
|
| 104 |
+
188
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "2 REPRESENTING MOLECULES AS SEQUENCES ",
|
| 111 |
+
"text_level": 1,
|
| 112 |
+
"bbox": [
|
| 113 |
+
174,
|
| 114 |
+
265,
|
| 115 |
+
580,
|
| 116 |
+
281
|
| 117 |
+
],
|
| 118 |
+
"page_idx": 1
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"type": "text",
|
| 122 |
+
"text": "De novo design can be seen as a structured prediction problem, where molecular structures have to be predicted. This paper will use the term “molecule” to denote the chemical structures of interest. Molecular structures are represented well as labeled graphs $M = ( A , B )$ , with atoms $A$ as vertices and bonds $B$ as edges, elemental types as vertex labels, and bond order as edge labels (Brown, 2009). While neural network models which output graphs remain underexplored, sequence generation is well established. To encode molecules as sequences of symbols (strings), the canonicalized Simplified Molecular-Input Line-Entry System (SMILES) notation (Weininger, 1988; Weininger et al., 1989) can be used (see Fig. 1). This establishes the link to sequence-based language-focused neural network models (Segler et al., 2017; Goldberg, 2016), which can be then be used to generate molecules. ",
|
| 123 |
+
"bbox": [
|
| 124 |
+
173,
|
| 125 |
+
296,
|
| 126 |
+
826,
|
| 127 |
+
421
|
| 128 |
+
],
|
| 129 |
+
"page_idx": 1
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"type": "text",
|
| 133 |
+
"text": "3 DATA AND BENCHMARKS ",
|
| 134 |
+
"text_level": 1,
|
| 135 |
+
"bbox": [
|
| 136 |
+
176,
|
| 137 |
+
441,
|
| 138 |
+
419,
|
| 139 |
+
457
|
| 140 |
+
],
|
| 141 |
+
"page_idx": 1
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"type": "text",
|
| 145 |
+
"text": "3.1 DATA ",
|
| 146 |
+
"text_level": 1,
|
| 147 |
+
"bbox": [
|
| 148 |
+
174,
|
| 149 |
+
473,
|
| 150 |
+
253,
|
| 151 |
+
487
|
| 152 |
+
],
|
| 153 |
+
"page_idx": 1
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"type": "text",
|
| 157 |
+
"text": "In this paper, we expand the scope of previous work to a standardized, much larger dataset, which furthermore is of real-world interest to drug discovery scientists. Here, we build on the ChEMBL-23 dataset (Gaulton et al., 2011), a collection extracted from the scientific literature of 1,735,442 distinct compounds and their reported biological activities on 11,538 targets. Though partitioned and filtered, this work employs substantially more training examples than previous work to access the breadth of chemistries that have been demonstrated to be of interest. The preprocessing steps can be found in the Appendix. ",
|
| 158 |
+
"bbox": [
|
| 159 |
+
174,
|
| 160 |
+
498,
|
| 161 |
+
825,
|
| 162 |
+
597
|
| 163 |
+
],
|
| 164 |
+
"page_idx": 1
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"type": "text",
|
| 168 |
+
"text": "To stimulate further work in this domain, our OpenAI Gym interface to these benchmarks will be open-sourced to allow the community to prototype new RL algorithms for chemistry.1 Here, we offer 19 benchmarks to be used for molecule generation, comprised of basic suitability benchmarks, basic physicochemical property optimizations, drug-likeness approximations, and multi-objective balancing. The benchmark framework is general enough to be used with any possible small molecule generation method, whether rule-based or learned, and is not limited to sequence-based generation relying on SMILES. ",
|
| 169 |
+
"bbox": [
|
| 170 |
+
173,
|
| 171 |
+
603,
|
| 172 |
+
825,
|
| 173 |
+
700
|
| 174 |
+
],
|
| 175 |
+
"page_idx": 1
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"type": "text",
|
| 179 |
+
"text": "3.2 VALIDITY AND DIVERSITY OF GENERATED MOLECULES ",
|
| 180 |
+
"text_level": 1,
|
| 181 |
+
"bbox": [
|
| 182 |
+
174,
|
| 183 |
+
717,
|
| 184 |
+
606,
|
| 185 |
+
732
|
| 186 |
+
],
|
| 187 |
+
"page_idx": 1
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"type": "text",
|
| 191 |
+
"text": "A basic but crucial molecular generation benchmark is simply what percentage of the sampled molecules are valid. For a sample set $S$ of cardinality $m$ sampled from a model $M$ , the percentage of valid molecules is: ",
|
| 192 |
+
"bbox": [
|
| 193 |
+
174,
|
| 194 |
+
743,
|
| 195 |
+
825,
|
| 196 |
+
785
|
| 197 |
+
],
|
| 198 |
+
"page_idx": 1
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"type": "equation",
|
| 202 |
+
"img_path": "images/0f05371f5fb02e497cbda9115f9852565ee28d2853bf9739c59fef7995e63df2.jpg",
|
| 203 |
+
"text": "$$\nY _ { i } \\sim \\pi _ { \\theta } ; \\quad S = \\{ Y _ { 1 } , \\dots , Y _ { m } \\} ; \\quad R _ { v a l i d } = \\frac { 1 } { m } \\sum _ { i } ^ { m } \\mathrm { v a l i d } ( Y _ { i } ) ; \\quad R _ { v a l i d } \\in [ 0 , 1 ]\n$$",
|
| 204 |
+
"text_format": "latex",
|
| 205 |
+
"bbox": [
|
| 206 |
+
238,
|
| 207 |
+
789,
|
| 208 |
+
759,
|
| 209 |
+
830
|
| 210 |
+
],
|
| 211 |
+
"page_idx": 1
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"type": "text",
|
| 215 |
+
"text": "where valid() is a function returning 1 if the open-source chemoinformatics toolkit RDKit (Landrum et al.) is able to return a valid molecular object given the SMILES representation, and 0 otherwise. ",
|
| 216 |
+
"bbox": [
|
| 217 |
+
174,
|
| 218 |
+
835,
|
| 219 |
+
825,
|
| 220 |
+
866
|
| 221 |
+
],
|
| 222 |
+
"page_idx": 1
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"type": "text",
|
| 226 |
+
"text": "Similarly, it is not ideal if the generative model is able to produce a valid molecule, but only repeats the same molecule. Therefore, the ratio unique benchmark samples $m$ molecules from the model, ",
|
| 227 |
+
"bbox": [
|
| 228 |
+
176,
|
| 229 |
+
871,
|
| 230 |
+
823,
|
| 231 |
+
900
|
| 232 |
+
],
|
| 233 |
+
"page_idx": 1
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "image",
|
| 237 |
+
"img_path": "images/79d1d3131d47b7b6bb2d4406ed0128b1a45a92363a3b5c401c422c23bae9f8f0.jpg",
|
| 238 |
+
"image_caption": [
|
| 239 |
+
"Figure 2: Four of ten target molecules for the Tanimoto benchmark. See Supplementary Material for the full set. "
|
| 240 |
+
],
|
| 241 |
+
"image_footnote": [],
|
| 242 |
+
"bbox": [
|
| 243 |
+
173,
|
| 244 |
+
99,
|
| 245 |
+
825,
|
| 246 |
+
174
|
| 247 |
+
],
|
| 248 |
+
"page_idx": 2
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"type": "text",
|
| 252 |
+
"text": "and measures the number of unique molecules: ",
|
| 253 |
+
"bbox": [
|
| 254 |
+
174,
|
| 255 |
+
238,
|
| 256 |
+
483,
|
| 257 |
+
253
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 2
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "equation",
|
| 263 |
+
"img_path": "images/63559cd2bf5f5b29461a5517714ee154553e2bc8aa0af921ea15cf93619ebe84.jpg",
|
| 264 |
+
"text": "$$\nY _ { i } \\sim \\pi _ { \\theta } ; \\quad R _ { u n i q u e } = \\frac { 1 } { m } \\left| \\bigcup _ { i = 1 } ^ { m } \\{ Y _ { i } \\} \\right| ; \\quad R _ { u n i q u e } \\in [ 0 , 1 ]\n$$",
|
| 265 |
+
"text_format": "latex",
|
| 266 |
+
"bbox": [
|
| 267 |
+
312,
|
| 268 |
+
258,
|
| 269 |
+
686,
|
| 270 |
+
303
|
| 271 |
+
],
|
| 272 |
+
"page_idx": 2
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"type": "text",
|
| 276 |
+
"text": "3.3 SINGLE OBJECTIVE MAXIMIZATION",
|
| 277 |
+
"text_level": 1,
|
| 278 |
+
"bbox": [
|
| 279 |
+
176,
|
| 280 |
+
315,
|
| 281 |
+
465,
|
| 282 |
+
330
|
| 283 |
+
],
|
| 284 |
+
"page_idx": 2
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"type": "text",
|
| 288 |
+
"text": "Previous work has explored a variety of optimization objectives of interest to molecular designers. Physicochemical properties, such as the octanol-water partition coefficient (ClogP) and molecular weight (MW), have strong implications for the viability of a molecule progressing as a potential drug and have been explored as optimization objectives in previous work (Firth et al., 2015; Jaques et al., 2017; Gomez-Bombarelli et al., 2016). Similarly, SMARTS (SMILES Arbitrary Target ´ Specification) sequences allow to specify substructures (subgraphs) which should be contained in the target molecules. This allows to define a reward function SMARTS(X, Y) which returns 1 if a generated molecule $Y$ contains subgraph $X$ and $- 1$ otherwise. The RDKit (Landrum et al.) includes automatic code to calculate these functions, providing a straightforward route to include these objectives in RL scenarios. For a target value $x$ or respectively subgraph $X$ , and a generated sequence $Y$ , the reward is: ",
|
| 289 |
+
"bbox": [
|
| 290 |
+
173,
|
| 291 |
+
340,
|
| 292 |
+
825,
|
| 293 |
+
494
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 2
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "equation",
|
| 299 |
+
"img_path": "images/57d402bdfb29bf99d8c96bfba7458ea7e7c8e392f78376ff6d162006ef519352.jpg",
|
| 300 |
+
"text": "$$\n\\begin{array} { c c } { { R _ { L o g P } ( x , Y ) = \\displaystyle \\frac { 1 } { 2 5 } ( x - \\mathrm { L o g P } ( Y ) ) ^ { 2 } + 1 ; } } & { { R _ { L o g P } ( x , Y ) \\in [ - \\infty , 1 ] } } \\\\ { { R _ { M W } ( x , Y ) = \\displaystyle \\frac { 1 } { 1 0 ^ { 5 } } ( x - \\mathrm { M W } ( Y ) ) ^ { 2 } + 1 ; } } & { { R _ { M W } ( x , Y ) \\in [ - \\infty , 1 ] } } \\\\ { { R _ { S M A R T S } ( X , Y ) = \\mathrm { S M A R T S } ( X , Y ) ; } } & { { R _ { S M A R T S } ( x , Y ) \\in \\{ - 1 , 1 \\} } } \\end{array}\n$$",
|
| 301 |
+
"text_format": "latex",
|
| 302 |
+
"bbox": [
|
| 303 |
+
264,
|
| 304 |
+
501,
|
| 305 |
+
735,
|
| 306 |
+
579
|
| 307 |
+
],
|
| 308 |
+
"page_idx": 2
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"type": "text",
|
| 312 |
+
"text": "This work chooses five ClogP points $x \\in \\{ - 1 , 0 , 1 , 2 , 3 \\}$ as benchmarks. ",
|
| 313 |
+
"bbox": [
|
| 314 |
+
176,
|
| 315 |
+
583,
|
| 316 |
+
650,
|
| 317 |
+
599
|
| 318 |
+
],
|
| 319 |
+
"page_idx": 2
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"type": "text",
|
| 323 |
+
"text": "A more challenging optimization objective is to generate a family of molecules similar to a target given only a fingerprint of the target molecule, in an unpopulated area of chemical space. Here, the commonly-used Functional Connectivity Fingerprint Counts (FCFC4; Rogers & Hahn (2010)) is used to encode the molecular graph as a fixed-size integer vector. After encoding both the proposed molecule and the target molecule, their Tanimoto (akin to Jaccard) similarity is calculated. This work uses ten marketed drugs which modulate different biological target types (Figure 2, Table 3) as molecular targets for approximation. To ensure that no leakage occurs between test and train set, the target molecules themselves as well as compounds similar to them were removed from the training data (see Appendix). The reward of the Tanimoto similarity with $x , y$ as the fingerprint vectors of $X , Y$ is: ",
|
| 324 |
+
"bbox": [
|
| 325 |
+
173,
|
| 326 |
+
604,
|
| 327 |
+
825,
|
| 328 |
+
744
|
| 329 |
+
],
|
| 330 |
+
"page_idx": 2
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"type": "equation",
|
| 334 |
+
"img_path": "images/8cfbb409370ef76df6d3e20480182096e68f646d588dc7fea91d7e0e5548585b.jpg",
|
| 335 |
+
"text": "$$\nR _ { T a n i } ( X , Y ) = 2 \\frac { \\sum _ { i = 1 } ^ { n } x _ { i } y _ { i } } { \\sum _ { i = 1 } ^ { n } ( x _ { i } ^ { 2 } + y _ { i } ^ { 2 } - x _ { i } y _ { i } ) } - 1 ; \\quad R _ { T a n i } ( X , Y ) \\in [ - 1 , 1 ]\n$$",
|
| 336 |
+
"text_format": "latex",
|
| 337 |
+
"bbox": [
|
| 338 |
+
256,
|
| 339 |
+
750,
|
| 340 |
+
741,
|
| 341 |
+
786
|
| 342 |
+
],
|
| 343 |
+
"page_idx": 2
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "text",
|
| 347 |
+
"text": "3.4 MULTI-OBJECTIVE MAXIMIZATION ",
|
| 348 |
+
"text_level": 1,
|
| 349 |
+
"bbox": [
|
| 350 |
+
176,
|
| 351 |
+
800,
|
| 352 |
+
460,
|
| 353 |
+
815
|
| 354 |
+
],
|
| 355 |
+
"page_idx": 2
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "text",
|
| 359 |
+
"text": "To test balanced optimization, two further tests are proposed: Lipinski’s Rule-of-Five (Ro5) parameters for the estimation of solubility and permeability important for oral bioavailability, and a weighted multi-parameter optimization. The Ro5 is a heuristic for druglikeness, evaluating four parameters that can be calculated readily from a molecular structure: molecular weight (MW), ClogP, hydrogen-bond donors (HBD) and acceptors (HBA) (Ghose et al., 1999; Lipinski, 2004) In this work, the Ro5 formulation used is to penalize (a) via MSE, the MW if outside the interval [180, 500]; (b) via MSE, the ClogP if outside [-0.4, 5.6]; (c) by absolute error, the number of HBDs if greater than 5; ",
|
| 360 |
+
"bbox": [
|
| 361 |
+
173,
|
| 362 |
+
825,
|
| 363 |
+
826,
|
| 364 |
+
924
|
| 365 |
+
],
|
| 366 |
+
"page_idx": 2
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"type": "text",
|
| 370 |
+
"text": "(d) by absolute error, the number of HBAs if greater than 10. The final penalties are summed, scaled by 1e-3, and added to 1 to place the reward $R _ { R o 5 } \\in [ - \\infty , 1 ]$ . ",
|
| 371 |
+
"bbox": [
|
| 372 |
+
169,
|
| 373 |
+
103,
|
| 374 |
+
825,
|
| 375 |
+
133
|
| 376 |
+
],
|
| 377 |
+
"page_idx": 3
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"type": "text",
|
| 381 |
+
"text": "Similarly, any arbitrary balanced weighting of objective functions can be used to simulate a multiobjective optimization, similar to those that are recognized in drug discovery scenarios. Here, an equally-weighted target of ClogP ${ = } 4$ , SMARTS fragment-matching to include a benzene ring, and a MW of 180 is defined. ",
|
| 382 |
+
"bbox": [
|
| 383 |
+
173,
|
| 384 |
+
138,
|
| 385 |
+
825,
|
| 386 |
+
194
|
| 387 |
+
],
|
| 388 |
+
"page_idx": 3
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"type": "equation",
|
| 392 |
+
"img_path": "images/cadc98cb08251d1afaef7754187f20983b503a6c107427c8af4f4dccfe060a0b.jpg",
|
| 393 |
+
"text": "$$\nR _ { M P O } = \\frac { 1 } { 3 } ( R _ { L o g P } ( 4 , Y ) + R _ { S M A R T S } ( ^ { \\prime } \\mathsf { c 1 c c c c c 1 ^ { \\prime } } , Y ) + R _ { M o l W t } ( 1 8 0 , Y ) )\n$$",
|
| 394 |
+
"text_format": "latex",
|
| 395 |
+
"bbox": [
|
| 396 |
+
238,
|
| 397 |
+
199,
|
| 398 |
+
759,
|
| 399 |
+
250
|
| 400 |
+
],
|
| 401 |
+
"page_idx": 3
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "4 MODELS ",
|
| 406 |
+
"text_level": 1,
|
| 407 |
+
"bbox": [
|
| 408 |
+
174,
|
| 409 |
+
267,
|
| 410 |
+
279,
|
| 411 |
+
282
|
| 412 |
+
],
|
| 413 |
+
"page_idx": 3
|
| 414 |
+
},
|
| 415 |
+
{
|
| 416 |
+
"type": "text",
|
| 417 |
+
"text": "4.1 RECURRENT NEURAL NETWORKS",
|
| 418 |
+
"text_level": 1,
|
| 419 |
+
"bbox": [
|
| 420 |
+
176,
|
| 421 |
+
299,
|
| 422 |
+
450,
|
| 423 |
+
314
|
| 424 |
+
],
|
| 425 |
+
"page_idx": 3
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"type": "text",
|
| 429 |
+
"text": "Gated recurrent models such as Long short-term memory (LSTM) (Hochreiter & Schmidhuber, 1997) are important for modern deep RNN models, and are used as the principal deep model used in this work (Graves, 2013). These RNN models are able to process the SMILES format strings with the addition of an embedding layer as is commonly used in natural language tasks (Gal & Ghahramani, 2016; Cho et al., 2014). Fully-connecting the output of the RNN model to a layer of neurons equal in cardinality to the vocabulary size of our SMILES language (42 symbols, see Supplementary Material Table 2) can be trained to produce a probability distribution over the output symbols. A model $\\pi _ { \\theta }$ parameterized by $\\theta$ trained on sequences $z$ of length $T$ in dataset $S$ can be trained with the following standard differentiable loss (the cross-entropy loss): ",
|
| 430 |
+
"bbox": [
|
| 431 |
+
173,
|
| 432 |
+
324,
|
| 433 |
+
826,
|
| 434 |
+
450
|
| 435 |
+
],
|
| 436 |
+
"page_idx": 3
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"type": "equation",
|
| 440 |
+
"img_path": "images/0136cbd213ba16f1b1a15621fe5242a116a47183c8abac37beea1238199447fa.jpg",
|
| 441 |
+
"text": "$$\nL ^ { M L E } ( \\theta ) = - \\sum _ { t = 1 } ^ { T } \\log \\pi _ { \\theta } ( z _ { t } | z _ { 1 : t - 1 } ) ; \\quad z = ( z _ { 1 } , \\dots , z _ { T } ) \\in S\n$$",
|
| 442 |
+
"text_format": "latex",
|
| 443 |
+
"bbox": [
|
| 444 |
+
294,
|
| 445 |
+
458,
|
| 446 |
+
704,
|
| 447 |
+
502
|
| 448 |
+
],
|
| 449 |
+
"page_idx": 3
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"type": "text",
|
| 453 |
+
"text": "In this work, this is called the pretrained maximum likelihood estimation (MLE) model and can be trained using standard supervised gradient descent techniques with backpropagation (Goldberg, 2016). This model functions as a composable, initialized block for more advanced architectures due to its effectiveness in generating realistic chemical sequences. Algorithm 1 demonstrates a slightly more unusual formulation in which a pretrained MLE model $\\pi _ { \\theta }$ is combined with an arbitrary reward function $R$ to maximize reward by alternately sampling and retraining via Eq. 9 on the $k$ -highest reward sequences (Segler et al., 2017), which we call Hillclimb-MLE (HC-MLE) . ",
|
| 454 |
+
"bbox": [
|
| 455 |
+
173,
|
| 456 |
+
515,
|
| 457 |
+
826,
|
| 458 |
+
613
|
| 459 |
+
],
|
| 460 |
+
"page_idx": 3
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"type": "table",
|
| 464 |
+
"img_path": "images/0af0cc8151182d02daf29b5ecc2522cfaa174d43213537a4e268a75c7a8a2e3c.jpg",
|
| 465 |
+
"table_caption": [
|
| 466 |
+
"Algorithm 1 Hillclimb-MLE Training Method for fitness functions "
|
| 467 |
+
],
|
| 468 |
+
"table_footnote": [],
|
| 469 |
+
"table_body": "<table><tr><td colspan=\"2\">Require: pretrained MLE model πθ; a reward function R; initial set of sequences ∑= @</td></tr><tr><td colspan=\"2\">1: for n-steps do for m-sequences do</td></tr><tr><td>2:</td><td>Generate a sequence Yi,1:T = (yi,...,yr) ~ Tθ</td></tr><tr><td>3:</td><td></td></tr><tr><td>4:</td><td>Calculate ri = R(Yi,1:T) end for</td></tr><tr><td>5:</td><td>m</td></tr><tr><td>6:</td><td>∑←ΣUU{Y} i=1</td></tr><tr><td>7: 8:</td><td>Keep k-top sequences in Σ with highest corresponding ri</td></tr><tr><td>9: end for</td><td>Fine-tune MLE model πβ to minimize cross-entropy according to Eq. 9 on dataset £</td></tr></table>",
|
| 470 |
+
"bbox": [
|
| 471 |
+
178,
|
| 472 |
+
650,
|
| 473 |
+
782,
|
| 474 |
+
804
|
| 475 |
+
],
|
| 476 |
+
"page_idx": 3
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "text",
|
| 480 |
+
"text": "4.1.1 REINFORCEMENT LEARNING ",
|
| 481 |
+
"text_level": 1,
|
| 482 |
+
"bbox": [
|
| 483 |
+
176,
|
| 484 |
+
829,
|
| 485 |
+
429,
|
| 486 |
+
844
|
| 487 |
+
],
|
| 488 |
+
"page_idx": 3
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "text",
|
| 492 |
+
"text": "Recently, advances in reinforcement learning (RL) have prompted explorations into using RL methods within the drug discovery loop (Jaques et al., 2017; Olivecrona et al., 2017; Segler et al., 2017). RL is a natural environment for drug discovery, which requires online learning balanced against expensive sample evaluation and generation. Moreover, most molecule characteristics are not directlyoptimizable since they are non-differentiable quantities. Instead, casting it into a RL framework allows for the exploration of chemical space in the absence of true loss gradients. Formally, a SMILES string is a sequence $y$ : ",
|
| 493 |
+
"bbox": [
|
| 494 |
+
174,
|
| 495 |
+
853,
|
| 496 |
+
826,
|
| 497 |
+
924
|
| 498 |
+
],
|
| 499 |
+
"page_idx": 3
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"type": "text",
|
| 503 |
+
"text": "",
|
| 504 |
+
"bbox": [
|
| 505 |
+
171,
|
| 506 |
+
103,
|
| 507 |
+
823,
|
| 508 |
+
132
|
| 509 |
+
],
|
| 510 |
+
"page_idx": 4
|
| 511 |
+
},
|
| 512 |
+
{
|
| 513 |
+
"type": "equation",
|
| 514 |
+
"img_path": "images/6c5cc121dbdb864e6d2cd1f1753affe49f958fa2a3102c73aed4806d68d14828.jpg",
|
| 515 |
+
"text": "$$\ny = ( a _ { 1 } , \\ldots , a _ { m } ) \\qquad a \\in D\n$$",
|
| 516 |
+
"text_format": "latex",
|
| 517 |
+
"bbox": [
|
| 518 |
+
400,
|
| 519 |
+
138,
|
| 520 |
+
596,
|
| 521 |
+
155
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 4
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "Thus, each string is comprised of a set of $m$ symbols from the symbol dictionary $D$ , including the padding character, establishing the SMILES environment as a large but discrete state space of size $| D | ^ { m }$ and a discrete action space of size $| D |$ . From an RL perspective, each symbol in the SMILES sequence corresponds to an action $a _ { t }$ taken at sequence step $t$ . The goal of an RL agent here is to develop a policy $\\pi _ { \\theta }$ , parameterized by $\\theta$ , to calculate an action $a _ { t }$ from the current state $s _ { t } = ( a _ { 1 } , \\ldots , a _ { t - 1 } )$ that maximizes the expected reward. That is, to maximize the following: ",
|
| 528 |
+
"bbox": [
|
| 529 |
+
173,
|
| 530 |
+
160,
|
| 531 |
+
825,
|
| 532 |
+
246
|
| 533 |
+
],
|
| 534 |
+
"page_idx": 4
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"type": "equation",
|
| 538 |
+
"img_path": "images/5387fcf6fb68bcd6b4e75a65a905c468c4c888ae4334001a3e038dab6b9056d7.jpg",
|
| 539 |
+
"text": "$$\n\\mathbb { E } [ R ( y _ { 1 : t } ) | s _ { 0 } , \\theta ] = \\sum _ { y \\in Y } \\sum _ { a _ { t } \\in y } \\pi _ { \\theta } ( a _ { t } | y _ { 1 : t - 1 } ) \\cdot Q ( a _ { t } , y _ { 1 : t - 1 } )\n$$",
|
| 540 |
+
"text_format": "latex",
|
| 541 |
+
"bbox": [
|
| 542 |
+
308,
|
| 543 |
+
251,
|
| 544 |
+
687,
|
| 545 |
+
286
|
| 546 |
+
],
|
| 547 |
+
"page_idx": 4
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"type": "text",
|
| 551 |
+
"text": "where our policy predicts the probability of choosing an action $a _ { t }$ in sequence $y$ from the set of all possible sequences $Y$ , and the reward function $Q ( a _ { t } , y _ { 1 : t - 1 } )$ provides the reward for that action given the sequence so far, $y _ { 1 : t - 1 }$ . However, molecule generation is inherently episodic, producing rewards only at the completion of the SMILES string (in our dictionary, $\\cdot \\bf { \\sigma } \\cdot \\bf { \\sigma } )$ ; for example, parentheses may be open which results in an invalid molecule for evaluation until the matching parentheses closes the branch. ",
|
| 552 |
+
"bbox": [
|
| 553 |
+
173,
|
| 554 |
+
292,
|
| 555 |
+
825,
|
| 556 |
+
376
|
| 557 |
+
],
|
| 558 |
+
"page_idx": 4
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "text",
|
| 562 |
+
"text": "To acquire a training gradient to use with a neural network as $\\pi _ { \\theta }$ , the log-derivative trick can be used to arrive at: ",
|
| 563 |
+
"bbox": [
|
| 564 |
+
174,
|
| 565 |
+
382,
|
| 566 |
+
823,
|
| 567 |
+
411
|
| 568 |
+
],
|
| 569 |
+
"page_idx": 4
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"type": "equation",
|
| 573 |
+
"img_path": "images/55d7f79e040e7607d7f8b7fc95fd908020c36944f89a2a1a8bff8fd9b528e9ac.jpg",
|
| 574 |
+
"text": "$$\n\\nabla _ { \\theta } \\mathbb { E } _ { y _ { 1 : t } \\sim \\pi ( y | \\theta ) } [ R ( y ) ] = \\mathbb { E } _ { y _ { 1 : t } \\sim \\pi ( y | \\theta ) } [ R ( y ) \\log ( \\pi _ { \\theta } ( y ) ) ]\n$$",
|
| 575 |
+
"text_format": "latex",
|
| 576 |
+
"bbox": [
|
| 577 |
+
316,
|
| 578 |
+
417,
|
| 579 |
+
681,
|
| 580 |
+
436
|
| 581 |
+
],
|
| 582 |
+
"page_idx": 4
|
| 583 |
+
},
|
| 584 |
+
{
|
| 585 |
+
"type": "text",
|
| 586 |
+
"text": "which yields the differentiable loss used in the REINFORCE algorithm (Williams, 1992), used here as the policy gradient model: ",
|
| 587 |
+
"bbox": [
|
| 588 |
+
176,
|
| 589 |
+
440,
|
| 590 |
+
821,
|
| 591 |
+
469
|
| 592 |
+
],
|
| 593 |
+
"page_idx": 4
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"type": "equation",
|
| 597 |
+
"img_path": "images/40b856f981fc3026e869b087ed0a99752fea959b30b0ca1b74e6f3dfefa089c6.jpg",
|
| 598 |
+
"text": "$$\n\\begin{array} { r } { L ^ { P G } ( \\theta ) = \\hat { \\mathbb { E } } _ { t } [ \\log \\pi _ { \\theta } ( a _ { t } | s _ { t } ) r ( a _ { t } ) ] } \\\\ { r ( a _ { t } ) = R ( Y _ { 1 : T } ) , \\quad a _ { t } \\in Y } \\end{array}\n$$",
|
| 599 |
+
"text_format": "latex",
|
| 600 |
+
"bbox": [
|
| 601 |
+
385,
|
| 602 |
+
474,
|
| 603 |
+
611,
|
| 604 |
+
515
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 4
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "text",
|
| 610 |
+
"text": "Notably, the final reward $R ( Y _ { 1 : t } )$ is distributed equally without temporal discounting to every action in the sequence, as temporal distance in SMILES strings is less relevant than most action-spaces. ",
|
| 611 |
+
"bbox": [
|
| 612 |
+
173,
|
| 613 |
+
525,
|
| 614 |
+
825,
|
| 615 |
+
555
|
| 616 |
+
],
|
| 617 |
+
"page_idx": 4
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"type": "text",
|
| 621 |
+
"text": "Reinforced Generative Adversarial Networks The recently-introduced GANs (Goodfellow et al., 2014) have experienced a surge of popularity, extending in new ways their original formulation: ",
|
| 622 |
+
"bbox": [
|
| 623 |
+
173,
|
| 624 |
+
569,
|
| 625 |
+
826,
|
| 626 |
+
598
|
| 627 |
+
],
|
| 628 |
+
"page_idx": 4
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"type": "equation",
|
| 632 |
+
"img_path": "images/9059cbaca45447e22731934465842735f3feec281ec176e9a24fa9680fe53e1f.jpg",
|
| 633 |
+
"text": "$$\n\\operatorname* { m i n } _ { G } \\operatorname* { m a x } _ { D } V ( D , G ) = \\mathbb { E } _ { x \\sim p _ { \\mathrm { d a t a } } ( x ) } [ \\log D ( x ) ] + \\mathbb { E } _ { z \\sim p _ { z } ( z ) } [ \\log ( 1 - D ( G ( z ) ) ) ]\n$$",
|
| 634 |
+
"text_format": "latex",
|
| 635 |
+
"bbox": [
|
| 636 |
+
246,
|
| 637 |
+
604,
|
| 638 |
+
748,
|
| 639 |
+
627
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 4
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "text",
|
| 645 |
+
"text": "which describes the minimax zero-sum game that combines a generator $G$ , converting samples $z$ from a standard distribution $p _ { z }$ into data-like samples, and a discriminator $D$ which attempts to determine whether samples $x$ are from the true distribution $p _ { d a t a }$ and which are generated samples $G ( z \\sim p _ { z } )$ . GANs have been applied as a novel architecture type to a variety of domains, particularly in image synthesis where they have been found to generate perceptually realistic images (Radford et al., 2015; Zhu et al., 2017). ",
|
| 646 |
+
"bbox": [
|
| 647 |
+
173,
|
| 648 |
+
632,
|
| 649 |
+
825,
|
| 650 |
+
717
|
| 651 |
+
],
|
| 652 |
+
"page_idx": 4
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "text",
|
| 656 |
+
"text": "The GAN formulation was extended in $\\mathrm { Y u }$ et al. (2017) to allow sequences to be generated with a GAN-like architecture, using RL and a policy gradient technique to train. This forms the basis of the method published in Guimaraes et al. (2017) to use a RL framework with GANs to optimize arbitrary fitness functions. Training is comprised of three phases: a maximum-likelihood pretraining phase during which the RNN generator learns to generate molecules from a chemical structure dataset, while a discriminator is pretrained on produced versus within-dataset sequences; a RL generator phase in which the generator learns to maximize the reward function balanced with the discriminator; and, finally, a discrimination phase which subsequently guides generation. The latter two phases are alternated throughout the optimization phase. ",
|
| 657 |
+
"bbox": [
|
| 658 |
+
173,
|
| 659 |
+
722,
|
| 660 |
+
826,
|
| 661 |
+
849
|
| 662 |
+
],
|
| 663 |
+
"page_idx": 4
|
| 664 |
+
},
|
| 665 |
+
{
|
| 666 |
+
"type": "text",
|
| 667 |
+
"text": "The reward used to reinforce the network uses a parameter $\\lambda$ which balances the likelihood that the discriminator $D _ { \\phi }$ classifies the generated sequence as true data against the arbitrary fitness objective $O$ : ",
|
| 668 |
+
"bbox": [
|
| 669 |
+
173,
|
| 670 |
+
854,
|
| 671 |
+
825,
|
| 672 |
+
897
|
| 673 |
+
],
|
| 674 |
+
"page_idx": 4
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"type": "equation",
|
| 678 |
+
"img_path": "images/b28bfc78f29fb65db7159c3b5c12cb7139d63a03f6ad7da37e413fcd27bd776d.jpg",
|
| 679 |
+
"text": "$$\nR ( Y _ { 1 : T } ) = \\lambda D _ { \\phi } ( Y _ { 1 : T } ) + ( 1 - \\lambda ) O ( Y _ { 1 : T } )\n$$",
|
| 680 |
+
"text_format": "latex",
|
| 681 |
+
"bbox": [
|
| 682 |
+
357,
|
| 683 |
+
904,
|
| 684 |
+
640,
|
| 685 |
+
921
|
| 686 |
+
],
|
| 687 |
+
"page_idx": 4
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "text",
|
| 691 |
+
"text": "However, while calculating the reward during sequence generation, the final reward is not yet available until the end of the sequence. In order to maximize the number of training steps (rather than one step per sequence) and to guide the generation process, the objective-reinforced GAN (Guimaraes et al., 2017) uses Monte-Carlo rollouts from the current state to estimate the reward of the available actions. This strategy, however, can have high variance and significantly undersamples the large branching in molecule generation (with 42 symbols per step and an average sequence length of 44 steps). ",
|
| 692 |
+
"bbox": [
|
| 693 |
+
174,
|
| 694 |
+
103,
|
| 695 |
+
825,
|
| 696 |
+
188
|
| 697 |
+
],
|
| 698 |
+
"page_idx": 5
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "text",
|
| 702 |
+
"text": "Advantage Actor-Critic Networks A wealth of new techniques for reinforcement learning have recently appeared which have yet to be adapted to molecule generation. One technique to minimize the variance that hinders policy gradient training and to accelerate convergence is to subtract an estimate of the reward from the true reward. Importantly, this does not introduce estimator bias but can diminish the variance. This can be seen as an actor-critic model that separates the policy training from the value estimation in which the actor is the policy $\\pi _ { \\theta }$ and the baseline value estimate $V _ { s _ { t } }$ is the critic that gives the approximate value of that state (Degris et al., 2012; Sutton & Barto, 1998; Mnih et al., 2016). This advantage actor-critic (A2C) training is the synchronous version of the asynchronous advantage actor critic (A3C) model (Mnih et al., 2016) and can use generalized advantage estimation (Schulman et al., 2015). In this work, the following differentiable loss function is used to simultaneously reduce the variance of the reward and to minimize the difference between the expected reward $V _ { \\phi }$ and the true reward: ",
|
| 703 |
+
"bbox": [
|
| 704 |
+
173,
|
| 705 |
+
202,
|
| 706 |
+
825,
|
| 707 |
+
369
|
| 708 |
+
],
|
| 709 |
+
"page_idx": 5
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "equation",
|
| 713 |
+
"img_path": "images/8bd2aea8ee1736bd2bd141f6c0496ee4e7c3e751e1ef7b24343e91633761135c.jpg",
|
| 714 |
+
"text": "$$\nL ^ { A 2 C } ( \\theta , \\phi ) = \\hat { \\mathbb { E } } _ { t } [ \\log \\pi _ { \\theta } ( a _ { t } | s _ { t } ) ( R - V _ { \\phi } ( s _ { t } ) ) + ( R ( s _ { t } ) - V _ { \\phi } ( s _ { t } ) ) ^ { 2 } ]\n$$",
|
| 715 |
+
"text_format": "latex",
|
| 716 |
+
"bbox": [
|
| 717 |
+
276,
|
| 718 |
+
376,
|
| 719 |
+
722,
|
| 720 |
+
396
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 5
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "The value estimation function $V _ { \\phi }$ is a neural network itself here, parameterized by $\\phi$ ; this work uses a fully-connected network from the hidden state of the LSTM to a single node predicting reward. ",
|
| 727 |
+
"bbox": [
|
| 728 |
+
174,
|
| 729 |
+
401,
|
| 730 |
+
823,
|
| 731 |
+
430
|
| 732 |
+
],
|
| 733 |
+
"page_idx": 5
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"text": "Proximal Policy Optimization Finally, great success has been found recently in the family of proximal policy optimization algorithms (Schulman et al., 2017). These algorithms exhibit very low sample complexity and are of particular interest as reliable data is always at a premium in chemistry, and both generation and evaluation time of a molecule can be long. Using the advantage $\\hat { A } _ { t } = R ( s _ { t } ) - V _ { \\phi } ( s _ { t } )$ from above, the following clipped PPO loss is used: ",
|
| 738 |
+
"bbox": [
|
| 739 |
+
173,
|
| 740 |
+
444,
|
| 741 |
+
825,
|
| 742 |
+
517
|
| 743 |
+
],
|
| 744 |
+
"page_idx": 5
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "equation",
|
| 748 |
+
"img_path": "images/19a52f1927d00432dcb32b63aa6a2b3d209d351b728b4b9bf0f4ab412eb0a49b.jpg",
|
| 749 |
+
"text": "$$\nL ^ { C L I P } ( \\theta , \\phi ) = \\hat { \\mathbb { E } } _ { t } \\left[ \\operatorname* { m i n } \\left( \\frac { \\pi _ { \\theta } ( a _ { t } | s _ { t } ) } { \\pi _ { \\theta ^ { o l d } } ( a _ { t } | s _ { t } ) } \\hat { A } _ { t } , \\operatorname { c l i p } \\left( \\frac { \\pi _ { \\theta } ( a _ { t } | s _ { t } ) } { \\pi _ { \\theta ^ { o l d } } ( a _ { t } | s _ { t } ) } , 1 + \\epsilon , 1 - \\epsilon \\right) \\hat { A } _ { t } \\right) + \\hat { A } _ { t } ^ { 2 } \\right]\n$$",
|
| 750 |
+
"text_format": "latex",
|
| 751 |
+
"bbox": [
|
| 752 |
+
189,
|
| 753 |
+
522,
|
| 754 |
+
781,
|
| 755 |
+
558
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 5
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "text",
|
| 761 |
+
"text": "The motivation for this pessimistic loss given by the min() function, succinctly stated in Schulman et al. (2017), ignores changes in the probability ratio when it would increase the objective and focuses learning in which the objective would worsen. Furthermore, the clipped boundary region provides a tight bound, outside of which the loss has function has no incentive to further change, encouraging smaller changes. The hyperparameter $\\epsilon$ controls the width of this region and can be found in Table 4. ",
|
| 762 |
+
"bbox": [
|
| 763 |
+
173,
|
| 764 |
+
561,
|
| 765 |
+
825,
|
| 766 |
+
633
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 5
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "text",
|
| 772 |
+
"text": "Regularization for Molecular Generation There are additional costs that can be combined with the above techniques. As the goal of de novo design is not to generate a single molecule, but rather a family of candidate molecules to present to an expert domain scientist; a diverse set of suggested molecules is always beneficial. To encourage robust learning, a regularization factor on the KullbackLeibler (KL) divergence between the current policy and the original policy can be added to encourage the model to not stray far from a good model of chemical distributions: ",
|
| 773 |
+
"bbox": [
|
| 774 |
+
173,
|
| 775 |
+
646,
|
| 776 |
+
825,
|
| 777 |
+
732
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 5
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "equation",
|
| 783 |
+
"img_path": "images/37d7407a74e6d575a52621eb735ddfc6447863fcfdcdf0c56908e87ebd87c5da.jpg",
|
| 784 |
+
"text": "$$\nC ^ { M L E } = \\lambda _ { M L E } \\hat { \\mathbb { E } } _ { t } \\left[ \\sum _ { a _ { i } \\in D } \\pi _ { \\theta } ( a _ { i } | s _ { t } ) \\log \\frac { \\pi _ { \\theta } ( a _ { i } | s _ { t } ) } { \\pi _ { \\theta } ^ { M L E } ( a _ { i } | s _ { t } ) } \\right]\n$$",
|
| 785 |
+
"text_format": "latex",
|
| 786 |
+
"bbox": [
|
| 787 |
+
315,
|
| 788 |
+
737,
|
| 789 |
+
681,
|
| 790 |
+
780
|
| 791 |
+
],
|
| 792 |
+
"page_idx": 5
|
| 793 |
+
},
|
| 794 |
+
{
|
| 795 |
+
"type": "text",
|
| 796 |
+
"text": "using a weight parameter $\\lambda$ and evaluating the static, pretrained policy $\\pi _ { \\theta } ^ { M L E } ( a _ { i } | s _ { t } )$ . Similarly, for RL scenarios, a way to explicitly encourage exploration is to place a cost on the distribution entropy of the model: ",
|
| 797 |
+
"bbox": [
|
| 798 |
+
174,
|
| 799 |
+
787,
|
| 800 |
+
825,
|
| 801 |
+
829
|
| 802 |
+
],
|
| 803 |
+
"page_idx": 5
|
| 804 |
+
},
|
| 805 |
+
{
|
| 806 |
+
"type": "equation",
|
| 807 |
+
"img_path": "images/372d447ca59e439414a1bdf4128b1939f9eb67ff4bdfa6bb48156f1aa0cc42c6.jpg",
|
| 808 |
+
"text": "$$\nC ^ { E N T } = \\lambda _ { e n t } \\hat { \\mathbb { E } } _ { t } \\left[ - \\sum _ { a _ { i } \\in D } \\pi _ { \\theta } ( a _ { i } | s _ { t } ) \\log \\pi _ { \\theta } ( a _ { i } | s _ { t } ) \\right]\n$$",
|
| 809 |
+
"text_format": "latex",
|
| 810 |
+
"bbox": [
|
| 811 |
+
330,
|
| 812 |
+
832,
|
| 813 |
+
666,
|
| 814 |
+
876
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 5
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "text",
|
| 820 |
+
"text": "The values used in this work can be found in the supplementary material. Additionally, we evaluate the policy gradient regularization scheme proposed by Olivecrona et al. (2017), denoted “Aug. MLE” in this paper. ",
|
| 821 |
+
"bbox": [
|
| 822 |
+
174,
|
| 823 |
+
881,
|
| 824 |
+
825,
|
| 825 |
+
924
|
| 826 |
+
],
|
| 827 |
+
"page_idx": 5
|
| 828 |
+
},
|
| 829 |
+
{
|
| 830 |
+
"type": "image",
|
| 831 |
+
"img_path": "images/59f61b72e08e30f865acebb80541020b2e0c694b78a6fa93a150da3d398420fd.jpg",
|
| 832 |
+
"image_caption": [
|
| 833 |
+
"Figure 3: Sample RL trajectories for the tasks (independently-scaled). "
|
| 834 |
+
],
|
| 835 |
+
"image_footnote": [],
|
| 836 |
+
"bbox": [
|
| 837 |
+
173,
|
| 838 |
+
98,
|
| 839 |
+
816,
|
| 840 |
+
343
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 6
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "text",
|
| 846 |
+
"text": "5 RESULTS ",
|
| 847 |
+
"text_level": 1,
|
| 848 |
+
"bbox": [
|
| 849 |
+
174,
|
| 850 |
+
397,
|
| 851 |
+
281,
|
| 852 |
+
414
|
| 853 |
+
],
|
| 854 |
+
"page_idx": 6
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"type": "text",
|
| 858 |
+
"text": "These algorithms were built using PyTorch (Paszke et al., 2017), with RDKit (Landrum et al.) providing the chemoinformatics functionality. These benchmarks were built as new environments in the OpenAI Gym (Brockman et al., 2016), and will be released as open-source to the community. The code was run using an NVIDIA Tesla V100 GPU, with optimization times for 1000 action-steps shown in the “Runtime” category of Table 1. The final RNN architecture that underlies the Policy Gradient, Regularized PG, GAN, A2C, PPO, HC MLE, and Augmented MLE models consists of three layers of 512 LSTM neurons, with a 512-dimensional embedding layer and a fully-connected output layer of 42 neurons. It takes approximately eight hours to train for 70 epochs on the filtered ChEMBL dataset, with 50,000 randomly-sampled SMILES strings for development, 200,000 for test, and the remaining 1190203 used for training. For the GAN architecture, the discriminator is a convolutional network with two alternating layers of ten kernels of 3x3 convolutions followed by $2 \\mathbf { x } 2$ max-pooling, with global averaging over the final two (real and fake) outputs. Experiments were run for approximately 1.6M action-steps, corresponding roughly to 1000 SMILES in batches of 32 with an average sequence length of 44. ",
|
| 859 |
+
"bbox": [
|
| 860 |
+
174,
|
| 861 |
+
430,
|
| 862 |
+
825,
|
| 863 |
+
625
|
| 864 |
+
],
|
| 865 |
+
"page_idx": 6
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"type": "text",
|
| 869 |
+
"text": "Encouragingly, the baseline MLE model after training produces $9 4 . 7 \\%$ valid SMILES out of $1 0 \\mathrm { k }$ generated molecules without further fine-tuning, establishing an extremely competitive benchmark. For similar evaluation, a GVAE was trained on the same dataset and achieved $3 7 . 1 \\%$ valid molecules. Moreover, $9 9 . 8 7 \\%$ of these MLE-sampled molecules were unique, establishing very high diversity. ",
|
| 870 |
+
"bbox": [
|
| 871 |
+
174,
|
| 872 |
+
631,
|
| 873 |
+
825,
|
| 874 |
+
688
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 6
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "text",
|
| 880 |
+
"text": "The RL model results, which are the remaining 17 benchmark tasks including multi-objective optimization, Ro5 optimization, ClogP targeting, and drug-fingerprint targeting, can be found in Table 1, with example RL curves in Fig. 3. The benchmarks referred to by a drug name are the Tanimoto-approach benchmarks, in which a drug is held out from the training set and the model must design a similar drug given only the FCFC4 semantic hash of the drug. The baseline model samples 10k random molecules from the training set, keeping only the best-performing ones. ",
|
| 881 |
+
"bbox": [
|
| 882 |
+
174,
|
| 883 |
+
694,
|
| 884 |
+
825,
|
| 885 |
+
777
|
| 886 |
+
],
|
| 887 |
+
"page_idx": 6
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"type": "text",
|
| 891 |
+
"text": "Hillclimb-MLE Perhaps surprisingly, the alternating sampling and HC-MLE training algorithm was the most successful model. The model effectively avoided nonoptimal local minima and steadily increased reward throughout training. Given a large computation budget, this model appears the most successful for widely sampling while still optimizing towards a target. ",
|
| 892 |
+
"bbox": [
|
| 893 |
+
174,
|
| 894 |
+
795,
|
| 895 |
+
823,
|
| 896 |
+
851
|
| 897 |
+
],
|
| 898 |
+
"page_idx": 6
|
| 899 |
+
},
|
| 900 |
+
{
|
| 901 |
+
"type": "text",
|
| 902 |
+
"text": "PPO The PPO with the clipped objective was the most successful standard RL algorithm for this task. It often converges an order-of-magnitude faster than other algorithms, but occasionally chooses a less optimal final configuration or occasional catastrophic loss. For future work where molecule fitness function testing time is significant - if, for example, an assay is required - PPO is a valuable candidate as an optimization strategy. A wide range of learning rates and entropy exploration costs were sampled (not shown) with PPO consistently and reliably training to achieve good performance. ",
|
| 903 |
+
"bbox": [
|
| 904 |
+
174,
|
| 905 |
+
867,
|
| 906 |
+
823,
|
| 907 |
+
924
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 6
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "table",
|
| 913 |
+
"img_path": "images/c4da2987005616e565904b788309958394fda30fa872cfc03b3e57ae64fab9bc.jpg",
|
| 914 |
+
"table_caption": [
|
| 915 |
+
"Table 1: Model performance, given by mean fitness in the final timestep over three random initializations, while single-best SMILES result from the plotted runs is given in parentheses. "
|
| 916 |
+
],
|
| 917 |
+
"table_footnote": [],
|
| 918 |
+
"table_body": "<table><tr><td></td><td></td><td>Baseline</td><td>Reg. PG</td><td>A2C</td><td>PPO</td><td>HC-MLE</td></tr><tr><td>Property</td><td>LogP=-1</td><td>1.00</td><td>0.66 (1.00)</td><td>0.98 (1.00)</td><td>1.00 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td></td><td>LogP=0</td><td>1.00</td><td>0.78 (1.00)</td><td>0.98 (1.00)</td><td>1.00 (1.00)</td><td>0.98 (1.00)</td></tr><tr><td></td><td>LogP=1</td><td>1.00</td><td>0.83 (1.00)</td><td>0.98 (1.00)</td><td>1.00 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td></td><td>LogP=2</td><td>1.00</td><td>0.86 (1.00)</td><td>0.97 (1.00)</td><td>1.00 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td>Mult. Obj.</td><td>LogP=3</td><td>1.00</td><td>0.86 (1.00)</td><td>0.97 (1.00)</td><td>0.91 (1.00)</td><td>0.97 (1.00)</td></tr><tr><td></td><td>MPO</td><td>1.00</td><td>0.82 (1.00)</td><td>0.95 (1.00)</td><td>1.00 (1.00)</td><td>0.98 (1.00)</td></tr><tr><td>Tanimoto</td><td>Ro5</td><td>1.00</td><td>0.77 (1.00)</td><td>0.96 (1.00)</td><td>1.00 (1.00)</td><td>0.59 (1.00)</td></tr><tr><td></td><td>Albuterol</td><td>0.02</td><td>-0.55 (0.41)</td><td>0.14 (-0.08)</td><td>0.04 (-0.10)</td><td>0.32 (0.83)</td></tr><tr><td></td><td>Aripiprazole</td><td>-0.15</td><td>-0.34 (0.63)</td><td>0.38 (-0.12)</td><td>0.40 (0.29)</td><td>0.51 (1.00)</td></tr><tr><td></td><td>Celecoxxib</td><td>-0.22</td><td>-0.35 (0.69)</td><td>0.20 (-0.06)</td><td>0.25 (0.14)</td><td>0.43 (1.00)</td></tr><tr><td></td><td>Cobimetinib</td><td>-0.18</td><td>-0.47 (0.17)</td><td>-0.01 (-0.01)</td><td>0.11 (0.06)</td><td>0.32 (0.57)</td></tr><tr><td></td><td>Fexofenadine</td><td>-0.26</td><td>-0.33 (0.50)</td><td>-0.24 (-0.13)</td><td>0.18 (0.19)</td><td>0.47 (0.82)</td></tr><tr><td></td><td>Mestranol</td><td>-0.17</td><td>-0.46 (0.62)</td><td>0.14 (-0.22)</td><td>0.06 (0.30)</td><td>0.34 (0.85)</td></tr><tr><td></td><td>Osimertinib</td><td>-0.44</td><td>-0.43 (0.15)</td><td>-0.36 (-0.26)</td><td>-0.11 (0.11)</td><td>0.13 (0.48)</td></tr><tr><td></td><td>Ranolazine</td><td>-0.20</td><td>-0.32 (0.49)</td><td>0.32 (-0.19)</td><td>0.14 (0.47)</td><td>0.50 (1.00)</td></tr><tr><td></td><td>Thiothixene</td><td>-0.26</td><td>-0.35 (0.28)</td><td>-0.09 (-0.19)</td><td>0.07 (0.29)</td><td>0.33 (0.57)</td></tr><tr><td></td><td>Troglitazone</td><td>-0.28</td><td>-0.39 (0.27)</td><td>-0.19 (-0.27)</td><td>0.06 (0.18)</td><td>0.24 (0.56)</td></tr><tr><td>Summary</td><td>Mean</td><td>0.30</td><td>0.09 (0.66)</td><td>0.42 (0.32)</td><td>0.48 (0.53)</td><td>0.59 (0.81)</td></tr><tr><td></td><td>Runtime</td><td>0.025s</td><td>0.68s</td><td>2.5s</td><td>8.54s</td><td>0.31s</td></tr></table>",
|
| 919 |
+
"bbox": [
|
| 920 |
+
171,
|
| 921 |
+
140,
|
| 922 |
+
839,
|
| 923 |
+
440
|
| 924 |
+
],
|
| 925 |
+
"page_idx": 7
|
| 926 |
+
},
|
| 927 |
+
{
|
| 928 |
+
"type": "text",
|
| 929 |
+
"text": "",
|
| 930 |
+
"bbox": [
|
| 931 |
+
174,
|
| 932 |
+
468,
|
| 933 |
+
825,
|
| 934 |
+
497
|
| 935 |
+
],
|
| 936 |
+
"page_idx": 7
|
| 937 |
+
},
|
| 938 |
+
{
|
| 939 |
+
"type": "text",
|
| 940 |
+
"text": "GAN The GAN is a nascent and intriguing architecture, but was found to not be optimal for this task yet. The complexity of balancing the discriminator against the generator, interleaving epochs, and choosing a correct architecture made it difficult to use, though a significant body of literature is working to address more stable training (Arjovsky et al., 2017; Salimans et al., 2016). Though MC rollouts are costly in action-steps (leading to the slightly unfair showing in Figure 3), the other problem is more fundamental: as Fig. 4a shows in a Principal Component Analysis (PCA) plot of the MQN descriptors (Nguyen et al., 2009) of the generated molecules, stronger discriminator weight $\\phi _ { D }$ forces the generated molecules to more closely match the primary modes of the training data. Effectively reproducing the training data, however, contrasts with the purpose of the generator for optimizing towards a given molecule. While this operates effectively as a regularizer, it is far more stable and explicit to regularize against the KL divergence as is done for the Regularized Policy Gradient model than to balance the hyperparameters of a GAN. Perhaps future work can investigate other uses of the GAN to, e.g., coerce the architecture away from reproducing identical sequences rather than memorizing the training data. ",
|
| 941 |
+
"bbox": [
|
| 942 |
+
174,
|
| 943 |
+
513,
|
| 944 |
+
826,
|
| 945 |
+
708
|
| 946 |
+
],
|
| 947 |
+
"page_idx": 7
|
| 948 |
+
},
|
| 949 |
+
{
|
| 950 |
+
"type": "text",
|
| 951 |
+
"text": "Benefits of extended sampling Examining the difference in the best single reward on the plotted runs (parentheses) in Table 1 and the final timestep mean (no parentheses), algorithms clearly benefit merely from sampling from a well-trained initial model for an extended period of time. The regularized policy gradient model, in particular, demonstrates high peak performance yet consistently does not learn effectively, suggesting that straightforward sampling for a large, diverse model may be an acceptable strategy in the absence of convergence-time costs. ",
|
| 952 |
+
"bbox": [
|
| 953 |
+
174,
|
| 954 |
+
724,
|
| 955 |
+
825,
|
| 956 |
+
809
|
| 957 |
+
],
|
| 958 |
+
"page_idx": 7
|
| 959 |
+
},
|
| 960 |
+
{
|
| 961 |
+
"type": "text",
|
| 962 |
+
"text": "Temperature Sampling A temperature factor is often included in available implementations to allow the generation of more diverse molecules. It has a straightforward formulation for an output distribution $P$ yielding $\\begin{array} { r } { P _ { t } = \\frac { 1 } { Z } e ^ { P / t } } \\end{array}$ , with normalization constant $Z$ , temperature $t$ , and temperaturealtered probability distribution $P _ { t }$ . However, as shown in the t-distributed Stochastic Neighbor Embedding (t-SNE) (Maaten & Hinton, 2008) plot in Fig. 4b, higher temperatures do not necessarily translate to a better coverage of chemical space. As a large proportion of possible SMILES strings are invalid, increasing the temperature is likely to invalidate the SMILES string. The molecules generated in the highest-temperature network favor short, brief SMILES strings that vastly undersample the chemical space. Indeed, this suggests the best strategy to achieve high diversity and a larger sampling of valid space is to not use temperature sampling at all. ",
|
| 963 |
+
"bbox": [
|
| 964 |
+
174,
|
| 965 |
+
824,
|
| 966 |
+
825,
|
| 967 |
+
924
|
| 968 |
+
],
|
| 969 |
+
"page_idx": 7
|
| 970 |
+
},
|
| 971 |
+
{
|
| 972 |
+
"type": "image",
|
| 973 |
+
"img_path": "images/5e70fba47167f678cfbc2b675b041dbf027e421b55a786a86bed2b21b272e06a.jpg",
|
| 974 |
+
"image_caption": [
|
| 975 |
+
"Figure 4: In (a), PCA plot of the GAN generator under various influences of the discriminator. In (b), sampling from a model at higher temperatures counter-intuitively does not increase coverage. "
|
| 976 |
+
],
|
| 977 |
+
"image_footnote": [],
|
| 978 |
+
"bbox": [
|
| 979 |
+
179,
|
| 980 |
+
104,
|
| 981 |
+
807,
|
| 982 |
+
367
|
| 983 |
+
],
|
| 984 |
+
"page_idx": 8
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"type": "text",
|
| 988 |
+
"text": "",
|
| 989 |
+
"bbox": [
|
| 990 |
+
174,
|
| 991 |
+
435,
|
| 992 |
+
825,
|
| 993 |
+
478
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 8
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "6 CONCLUSION ",
|
| 1000 |
+
"text_level": 1,
|
| 1001 |
+
"bbox": [
|
| 1002 |
+
174,
|
| 1003 |
+
498,
|
| 1004 |
+
318,
|
| 1005 |
+
515
|
| 1006 |
+
],
|
| 1007 |
+
"page_idx": 8
|
| 1008 |
+
},
|
| 1009 |
+
{
|
| 1010 |
+
"type": "text",
|
| 1011 |
+
"text": "In this work, we proposed a large, standardized dataset and a set of 19 benchmarks to evaluate models for molecule generation and design. Several RL strategies were investigated on these benchmarks. Here, the results suggest that the Hillclimb-MLE model is a surprisingly robust technique with large datasets and deep models, outperforming PPO given sufficient compute times and sample evaluations. In the space of constrained compute and sample evaluations, PPO was shown to be an effective learning algorithm, converging an order of magnitude before other reinforcement-learning algorithms for molecule generation. ",
|
| 1012 |
+
"bbox": [
|
| 1013 |
+
174,
|
| 1014 |
+
531,
|
| 1015 |
+
825,
|
| 1016 |
+
628
|
| 1017 |
+
],
|
| 1018 |
+
"page_idx": 8
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"type": "text",
|
| 1022 |
+
"text": "Nevertheless, there is still tremendous need for more efficient and effective models for molecular design, which could have a profound impact on molecular design — including drug, materials and agrochemicals discovery — and thus immediately on human well-being. With the present, easily usable benchmark, we hope to inspire the machine learning community to pick up this challenge. ",
|
| 1023 |
+
"bbox": [
|
| 1024 |
+
176,
|
| 1025 |
+
636,
|
| 1026 |
+
825,
|
| 1027 |
+
691
|
| 1028 |
+
],
|
| 1029 |
+
"page_idx": 8
|
| 1030 |
+
},
|
| 1031 |
+
{
|
| 1032 |
+
"type": "text",
|
| 1033 |
+
"text": "REFERENCES ",
|
| 1034 |
+
"text_level": 1,
|
| 1035 |
+
"bbox": [
|
| 1036 |
+
174,
|
| 1037 |
+
713,
|
| 1038 |
+
285,
|
| 1039 |
+
728
|
| 1040 |
+
],
|
| 1041 |
+
"page_idx": 8
|
| 1042 |
+
},
|
| 1043 |
+
{
|
| 1044 |
+
"type": "text",
|
| 1045 |
+
"text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017. ",
|
| 1046 |
+
"bbox": [
|
| 1047 |
+
173,
|
| 1048 |
+
737,
|
| 1049 |
+
823,
|
| 1050 |
+
766
|
| 1051 |
+
],
|
| 1052 |
+
"page_idx": 8
|
| 1053 |
+
},
|
| 1054 |
+
{
|
| 1055 |
+
"type": "text",
|
| 1056 |
+
"text": "Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016. ",
|
| 1057 |
+
"bbox": [
|
| 1058 |
+
169,
|
| 1059 |
+
776,
|
| 1060 |
+
825,
|
| 1061 |
+
806
|
| 1062 |
+
],
|
| 1063 |
+
"page_idx": 8
|
| 1064 |
+
},
|
| 1065 |
+
{
|
| 1066 |
+
"type": "text",
|
| 1067 |
+
"text": "Dean G Brown and Jonas Bostrom. Analysis of past and present synthetic methodologies on medicinal ¨ chemistry: where have all the new reactions gone? J. Med. Chem, 59(10):4443–4458, 2016. ",
|
| 1068 |
+
"bbox": [
|
| 1069 |
+
169,
|
| 1070 |
+
815,
|
| 1071 |
+
825,
|
| 1072 |
+
845
|
| 1073 |
+
],
|
| 1074 |
+
"page_idx": 8
|
| 1075 |
+
},
|
| 1076 |
+
{
|
| 1077 |
+
"type": "text",
|
| 1078 |
+
"text": "Nathan Brown. Chemoinformatics – an introduction for computer scientists. ACM Computing Surveys (CSUR), 41(2):8, 2009. ",
|
| 1079 |
+
"bbox": [
|
| 1080 |
+
171,
|
| 1081 |
+
856,
|
| 1082 |
+
825,
|
| 1083 |
+
885
|
| 1084 |
+
],
|
| 1085 |
+
"page_idx": 8
|
| 1086 |
+
},
|
| 1087 |
+
{
|
| 1088 |
+
"type": "text",
|
| 1089 |
+
"text": "Nathan Brown. In Silico Medicinal Chemistry: Computational Methods to Support Drug Design. Royal Society of Chemistry, 2015. ",
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
173,
|
| 1092 |
+
895,
|
| 1093 |
+
823,
|
| 1094 |
+
924
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 8
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "text",
|
| 1100 |
+
"text": "Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. ",
|
| 1101 |
+
"bbox": [
|
| 1102 |
+
176,
|
| 1103 |
+
103,
|
| 1104 |
+
823,
|
| 1105 |
+
146
|
| 1106 |
+
],
|
| 1107 |
+
"page_idx": 9
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"type": "text",
|
| 1111 |
+
"text": "Thomas Degris, Patrick M Pilarski, and Richard S Sutton. Model-free reinforcement learning with continuous action in practice. In American Control Conference (ACC), 2012, pp. 2177–2182. IEEE, 2012. ",
|
| 1112 |
+
"bbox": [
|
| 1113 |
+
176,
|
| 1114 |
+
154,
|
| 1115 |
+
825,
|
| 1116 |
+
196
|
| 1117 |
+
],
|
| 1118 |
+
"page_idx": 9
|
| 1119 |
+
},
|
| 1120 |
+
{
|
| 1121 |
+
"type": "text",
|
| 1122 |
+
"text": "Nicholas C Firth, Butrus Atrash, Nathan Brown, and Julian Blagg. Moarf, an integrated workflow for multiobjective optimization: implementation, synthesis, and biological evaluation. Journal of chemical information and modeling, 55(6):1169–1180, 2015. ",
|
| 1123 |
+
"bbox": [
|
| 1124 |
+
174,
|
| 1125 |
+
205,
|
| 1126 |
+
826,
|
| 1127 |
+
248
|
| 1128 |
+
],
|
| 1129 |
+
"page_idx": 9
|
| 1130 |
+
},
|
| 1131 |
+
{
|
| 1132 |
+
"type": "text",
|
| 1133 |
+
"text": "Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pp. 1019–1027, 2016. ",
|
| 1134 |
+
"bbox": [
|
| 1135 |
+
174,
|
| 1136 |
+
257,
|
| 1137 |
+
820,
|
| 1138 |
+
286
|
| 1139 |
+
],
|
| 1140 |
+
"page_idx": 9
|
| 1141 |
+
},
|
| 1142 |
+
{
|
| 1143 |
+
"type": "text",
|
| 1144 |
+
"text": "Anna Gaulton, Louisa J Bellis, A Patricia Bento, Jon Chambers, Mark Davies, Anne Hersey, Yvonne Light, Shaun McGlinchey, David Michalovich, Bissan Al-Lazikani, et al. Chembl: a large-scale bioactivity database for drug discovery. Nucleic acids research, 40(D1):D1100–D1107, 2011. ",
|
| 1145 |
+
"bbox": [
|
| 1146 |
+
174,
|
| 1147 |
+
295,
|
| 1148 |
+
825,
|
| 1149 |
+
338
|
| 1150 |
+
],
|
| 1151 |
+
"page_idx": 9
|
| 1152 |
+
},
|
| 1153 |
+
{
|
| 1154 |
+
"type": "text",
|
| 1155 |
+
"text": "Arup K Ghose, Vellarkad N Viswanadhan, and John J Wendoloski. A knowledge-based approach in designing combinatorial or medicinal chemistry libraries for drug discovery. 1. a qualitative and quantitative characterization of known drug databases. Journal of combinatorial chemistry, 1(1): 55–68, 1999. ",
|
| 1156 |
+
"bbox": [
|
| 1157 |
+
174,
|
| 1158 |
+
347,
|
| 1159 |
+
825,
|
| 1160 |
+
404
|
| 1161 |
+
],
|
| 1162 |
+
"page_idx": 9
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"type": "text",
|
| 1166 |
+
"text": "Yoav Goldberg. A primer on neural network models for natural language processing. J. Artif. Intell. Res.(JAIR), 57:345–420, 2016. ",
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
173,
|
| 1169 |
+
411,
|
| 1170 |
+
823,
|
| 1171 |
+
441
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 9
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "text",
|
| 1177 |
+
"text": "Rafael Gomez-Bombarelli, David Duvenaud, Jos ´ e Miguel Hern ´ andez-Lobato, Jorge Aguilera- ´ Iparraguirre, Timothy D Hirzel, Ryan P Adams, and Alan Aspuru-Guzik. Automatic chemical de- ´ sign using a data-driven continuous representation of molecules. arXiv preprint arXiv:1610.02415, 2016. ",
|
| 1178 |
+
"bbox": [
|
| 1179 |
+
173,
|
| 1180 |
+
449,
|
| 1181 |
+
826,
|
| 1182 |
+
506
|
| 1183 |
+
],
|
| 1184 |
+
"page_idx": 9
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"type": "text",
|
| 1188 |
+
"text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014. ",
|
| 1189 |
+
"bbox": [
|
| 1190 |
+
173,
|
| 1191 |
+
515,
|
| 1192 |
+
826,
|
| 1193 |
+
558
|
| 1194 |
+
],
|
| 1195 |
+
"page_idx": 9
|
| 1196 |
+
},
|
| 1197 |
+
{
|
| 1198 |
+
"type": "text",
|
| 1199 |
+
"text": "Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. ",
|
| 1200 |
+
"bbox": [
|
| 1201 |
+
169,
|
| 1202 |
+
566,
|
| 1203 |
+
825,
|
| 1204 |
+
595
|
| 1205 |
+
],
|
| 1206 |
+
"page_idx": 9
|
| 1207 |
+
},
|
| 1208 |
+
{
|
| 1209 |
+
"type": "text",
|
| 1210 |
+
"text": "Gabriel Lima Guimaraes, Benjamin Sanchez-Lengeling, Pedro Luis Cunha Farias, and Alan Aspuru- ´ Guzik. Objective-Reinforced Generative Adversarial Networks (ORGAN) for Sequence Generation Models. arXiv preprint arXiv:1705.10843, 2017. ",
|
| 1211 |
+
"bbox": [
|
| 1212 |
+
176,
|
| 1213 |
+
604,
|
| 1214 |
+
825,
|
| 1215 |
+
647
|
| 1216 |
+
],
|
| 1217 |
+
"page_idx": 9
|
| 1218 |
+
},
|
| 1219 |
+
{
|
| 1220 |
+
"type": "text",
|
| 1221 |
+
"text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. ",
|
| 1222 |
+
"bbox": [
|
| 1223 |
+
171,
|
| 1224 |
+
655,
|
| 1225 |
+
825,
|
| 1226 |
+
684
|
| 1227 |
+
],
|
| 1228 |
+
"page_idx": 9
|
| 1229 |
+
},
|
| 1230 |
+
{
|
| 1231 |
+
"type": "text",
|
| 1232 |
+
"text": "Natasha Jaques, Shixiang Gu, Dzmitry Bahdanau, Jose Miguel Hern ´ andez-Lobato, Richard E Turner, ´ and Douglas Eck. Sequence tutor: Conservative fine-tuning of sequence generation models with kl-control. In International Conference on Machine Learning, pp. 1645–1654, 2017. ",
|
| 1233 |
+
"bbox": [
|
| 1234 |
+
173,
|
| 1235 |
+
693,
|
| 1236 |
+
826,
|
| 1237 |
+
736
|
| 1238 |
+
],
|
| 1239 |
+
"page_idx": 9
|
| 1240 |
+
},
|
| 1241 |
+
{
|
| 1242 |
+
"type": "text",
|
| 1243 |
+
"text": "Matt J. Kusner, Brooks Paige, and Jose Miguel Hern ´ andez-Lobato. Grammar Variational Autoencoder.´ mar 2017. URL http://arxiv.org/abs/1703.01925. ",
|
| 1244 |
+
"bbox": [
|
| 1245 |
+
176,
|
| 1246 |
+
744,
|
| 1247 |
+
821,
|
| 1248 |
+
773
|
| 1249 |
+
],
|
| 1250 |
+
"page_idx": 9
|
| 1251 |
+
},
|
| 1252 |
+
{
|
| 1253 |
+
"type": "text",
|
| 1254 |
+
"text": "Greg Landrum et al. Rdkit: Open-source cheminformatics. URL http://www.rdkit.org. ",
|
| 1255 |
+
"bbox": [
|
| 1256 |
+
178,
|
| 1257 |
+
782,
|
| 1258 |
+
803,
|
| 1259 |
+
797
|
| 1260 |
+
],
|
| 1261 |
+
"page_idx": 9
|
| 1262 |
+
},
|
| 1263 |
+
{
|
| 1264 |
+
"type": "text",
|
| 1265 |
+
"text": "Christopher A Lipinski. Lead-and drug-like compounds: the rule-of-five revolution. Drug Discovery Today: Technologies, 1(4):337–341, 2004. ",
|
| 1266 |
+
"bbox": [
|
| 1267 |
+
174,
|
| 1268 |
+
806,
|
| 1269 |
+
823,
|
| 1270 |
+
835
|
| 1271 |
+
],
|
| 1272 |
+
"page_idx": 9
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"type": "text",
|
| 1276 |
+
"text": "Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008. ",
|
| 1277 |
+
"bbox": [
|
| 1278 |
+
171,
|
| 1279 |
+
843,
|
| 1280 |
+
823,
|
| 1281 |
+
872
|
| 1282 |
+
],
|
| 1283 |
+
"page_idx": 9
|
| 1284 |
+
},
|
| 1285 |
+
{
|
| 1286 |
+
"type": "text",
|
| 1287 |
+
"text": "Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016. ",
|
| 1288 |
+
"bbox": [
|
| 1289 |
+
176,
|
| 1290 |
+
881,
|
| 1291 |
+
825,
|
| 1292 |
+
924
|
| 1293 |
+
],
|
| 1294 |
+
"page_idx": 9
|
| 1295 |
+
},
|
| 1296 |
+
{
|
| 1297 |
+
"type": "text",
|
| 1298 |
+
"text": "Kong T Nguyen, Lorenz C Blum, Ruud Van Deursen, and Jean-Louis Reymond. Classification of organic molecules by molecular quantum numbers. ChemMedChem, 4(11):1803–1805, 2009. ",
|
| 1299 |
+
"bbox": [
|
| 1300 |
+
171,
|
| 1301 |
+
103,
|
| 1302 |
+
825,
|
| 1303 |
+
132
|
| 1304 |
+
],
|
| 1305 |
+
"page_idx": 10
|
| 1306 |
+
},
|
| 1307 |
+
{
|
| 1308 |
+
"type": "text",
|
| 1309 |
+
"text": "Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular de-novo design through deep reinforcement learning. Journal of Cheminformatics, 9(1):1–14, 2017. ",
|
| 1310 |
+
"bbox": [
|
| 1311 |
+
176,
|
| 1312 |
+
140,
|
| 1313 |
+
823,
|
| 1314 |
+
171
|
| 1315 |
+
],
|
| 1316 |
+
"page_idx": 10
|
| 1317 |
+
},
|
| 1318 |
+
{
|
| 1319 |
+
"type": "text",
|
| 1320 |
+
"text": "Adam Paszke, Sam Gross, and Soumith Chintala. Pytorch, 2017. ",
|
| 1321 |
+
"bbox": [
|
| 1322 |
+
174,
|
| 1323 |
+
178,
|
| 1324 |
+
599,
|
| 1325 |
+
194
|
| 1326 |
+
],
|
| 1327 |
+
"page_idx": 10
|
| 1328 |
+
},
|
| 1329 |
+
{
|
| 1330 |
+
"type": "text",
|
| 1331 |
+
"text": "Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. ",
|
| 1332 |
+
"bbox": [
|
| 1333 |
+
173,
|
| 1334 |
+
203,
|
| 1335 |
+
823,
|
| 1336 |
+
232
|
| 1337 |
+
],
|
| 1338 |
+
"page_idx": 10
|
| 1339 |
+
},
|
| 1340 |
+
{
|
| 1341 |
+
"type": "text",
|
| 1342 |
+
"text": "David Rogers and Mathew Hahn. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50(5):742–754, 2010. ",
|
| 1343 |
+
"bbox": [
|
| 1344 |
+
171,
|
| 1345 |
+
239,
|
| 1346 |
+
823,
|
| 1347 |
+
270
|
| 1348 |
+
],
|
| 1349 |
+
"page_idx": 10
|
| 1350 |
+
},
|
| 1351 |
+
{
|
| 1352 |
+
"type": "text",
|
| 1353 |
+
"text": "Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pp. 2234–2242, 2016. ",
|
| 1354 |
+
"bbox": [
|
| 1355 |
+
176,
|
| 1356 |
+
277,
|
| 1357 |
+
825,
|
| 1358 |
+
320
|
| 1359 |
+
],
|
| 1360 |
+
"page_idx": 10
|
| 1361 |
+
},
|
| 1362 |
+
{
|
| 1363 |
+
"type": "text",
|
| 1364 |
+
"text": "Gisbert Schneider. De novo molecular design. John Wiley & Sons, 2013. ",
|
| 1365 |
+
"bbox": [
|
| 1366 |
+
173,
|
| 1367 |
+
329,
|
| 1368 |
+
655,
|
| 1369 |
+
345
|
| 1370 |
+
],
|
| 1371 |
+
"page_idx": 10
|
| 1372 |
+
},
|
| 1373 |
+
{
|
| 1374 |
+
"type": "text",
|
| 1375 |
+
"text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015. ",
|
| 1376 |
+
"bbox": [
|
| 1377 |
+
176,
|
| 1378 |
+
353,
|
| 1379 |
+
825,
|
| 1380 |
+
396
|
| 1381 |
+
],
|
| 1382 |
+
"page_idx": 10
|
| 1383 |
+
},
|
| 1384 |
+
{
|
| 1385 |
+
"type": "text",
|
| 1386 |
+
"text": "John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. ",
|
| 1387 |
+
"bbox": [
|
| 1388 |
+
171,
|
| 1389 |
+
405,
|
| 1390 |
+
825,
|
| 1391 |
+
435
|
| 1392 |
+
],
|
| 1393 |
+
"page_idx": 10
|
| 1394 |
+
},
|
| 1395 |
+
{
|
| 1396 |
+
"type": "text",
|
| 1397 |
+
"text": "Marwin H. S. Segler, Thierry Kogej, Christian Tyrchan, and Mark P. Waller. Generating Focussed Molecule Libraries for Drug Discovery with Recurrent Neural Networks. arXiv preprint arXiv:1701.01329, 2017. ",
|
| 1398 |
+
"bbox": [
|
| 1399 |
+
173,
|
| 1400 |
+
443,
|
| 1401 |
+
823,
|
| 1402 |
+
486
|
| 1403 |
+
],
|
| 1404 |
+
"page_idx": 10
|
| 1405 |
+
},
|
| 1406 |
+
{
|
| 1407 |
+
"type": "text",
|
| 1408 |
+
"text": "Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. ",
|
| 1409 |
+
"bbox": [
|
| 1410 |
+
171,
|
| 1411 |
+
494,
|
| 1412 |
+
823,
|
| 1413 |
+
523
|
| 1414 |
+
],
|
| 1415 |
+
"page_idx": 10
|
| 1416 |
+
},
|
| 1417 |
+
{
|
| 1418 |
+
"type": "text",
|
| 1419 |
+
"text": "David Weininger. Smiles, a chemical language and information system. 1. introduction to methodol ogy and encoding rules. J. Chem. Inf. Comp. Sci., 28(1):31–36, 1988. ",
|
| 1420 |
+
"bbox": [
|
| 1421 |
+
174,
|
| 1422 |
+
532,
|
| 1423 |
+
823,
|
| 1424 |
+
561
|
| 1425 |
+
],
|
| 1426 |
+
"page_idx": 10
|
| 1427 |
+
},
|
| 1428 |
+
{
|
| 1429 |
+
"type": "text",
|
| 1430 |
+
"text": "David Weininger, Arthur Weininger, and Joseph L Weininger. Smiles. 2. algorithm for generation of unique smiles notation. J. Chem. Inf. Comp. Sci., 29(2):97–101, 1989. ",
|
| 1431 |
+
"bbox": [
|
| 1432 |
+
176,
|
| 1433 |
+
570,
|
| 1434 |
+
823,
|
| 1435 |
+
599
|
| 1436 |
+
],
|
| 1437 |
+
"page_idx": 10
|
| 1438 |
+
},
|
| 1439 |
+
{
|
| 1440 |
+
"type": "text",
|
| 1441 |
+
"text": "David White and Richard C Wilson. Generative models for chemical structures. J. Chem. Inf. Mod., 50(7):1257–1274, 2010. ",
|
| 1442 |
+
"bbox": [
|
| 1443 |
+
176,
|
| 1444 |
+
607,
|
| 1445 |
+
823,
|
| 1446 |
+
637
|
| 1447 |
+
],
|
| 1448 |
+
"page_idx": 10
|
| 1449 |
+
},
|
| 1450 |
+
{
|
| 1451 |
+
"type": "text",
|
| 1452 |
+
"text": "Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. ",
|
| 1453 |
+
"bbox": [
|
| 1454 |
+
173,
|
| 1455 |
+
645,
|
| 1456 |
+
823,
|
| 1457 |
+
674
|
| 1458 |
+
],
|
| 1459 |
+
"page_idx": 10
|
| 1460 |
+
},
|
| 1461 |
+
{
|
| 1462 |
+
"type": "text",
|
| 1463 |
+
"text": "Xiufeng Yang, Jinzhe Zhang, Kazuki Yoshizoe, Kei Terayama, and Koji Tsuda. Chemts: an efficient python library for de novo molecular generation. Science and Technology of Advanced Materials, 18(1):972–976, 2017. ",
|
| 1464 |
+
"bbox": [
|
| 1465 |
+
173,
|
| 1466 |
+
683,
|
| 1467 |
+
826,
|
| 1468 |
+
727
|
| 1469 |
+
],
|
| 1470 |
+
"page_idx": 10
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"type": "text",
|
| 1474 |
+
"text": "Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. In AAAI, pp. 2852–2858, 2017. ",
|
| 1475 |
+
"bbox": [
|
| 1476 |
+
173,
|
| 1477 |
+
734,
|
| 1478 |
+
823,
|
| 1479 |
+
765
|
| 1480 |
+
],
|
| 1481 |
+
"page_idx": 10
|
| 1482 |
+
},
|
| 1483 |
+
{
|
| 1484 |
+
"type": "text",
|
| 1485 |
+
"text": "Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017. ",
|
| 1486 |
+
"bbox": [
|
| 1487 |
+
171,
|
| 1488 |
+
772,
|
| 1489 |
+
825,
|
| 1490 |
+
803
|
| 1491 |
+
],
|
| 1492 |
+
"page_idx": 10
|
| 1493 |
+
},
|
| 1494 |
+
{
|
| 1495 |
+
"type": "text",
|
| 1496 |
+
"text": "A SUPPLEMENTARY MATERIAL ",
|
| 1497 |
+
"text_level": 1,
|
| 1498 |
+
"bbox": [
|
| 1499 |
+
178,
|
| 1500 |
+
102,
|
| 1501 |
+
450,
|
| 1502 |
+
117
|
| 1503 |
+
],
|
| 1504 |
+
"page_idx": 11
|
| 1505 |
+
},
|
| 1506 |
+
{
|
| 1507 |
+
"type": "text",
|
| 1508 |
+
"text": "This supplementary material section offers additional information and to aid in reproducibility for the reader. For visibility regarding the extent to which the MLE pretrained-model matches the trained space of chemistry, Figure 5 demonstrates its ability to effectively map and generate the space of ChEMBL molecules. In Table 2, the SMILES dictionary used in this work can be found. The drugs used in the Tanimoto fingerprint approach task can be found in Table 3, with the hyperparameters used in this work in Table 4. ",
|
| 1509 |
+
"bbox": [
|
| 1510 |
+
174,
|
| 1511 |
+
133,
|
| 1512 |
+
825,
|
| 1513 |
+
217
|
| 1514 |
+
],
|
| 1515 |
+
"page_idx": 11
|
| 1516 |
+
},
|
| 1517 |
+
{
|
| 1518 |
+
"type": "text",
|
| 1519 |
+
"text": "DATASET PROPROCESSING",
|
| 1520 |
+
"text_level": 1,
|
| 1521 |
+
"bbox": [
|
| 1522 |
+
176,
|
| 1523 |
+
234,
|
| 1524 |
+
359,
|
| 1525 |
+
247
|
| 1526 |
+
],
|
| 1527 |
+
"page_idx": 11
|
| 1528 |
+
},
|
| 1529 |
+
{
|
| 1530 |
+
"type": "text",
|
| 1531 |
+
"text": "Preprocessing the Chembl-23 dataset is comprised of a few steps. First, all molecules containing the compounds are neutralized and salts are stripped, keeping only the largest connected component. Then, the canonical SMILES representation of the molecules are generated using RDKit (Landrum et al.), and all SMILES sequences longer than 100 characters are filtered out. Most molecules with more than 100 SMILES symbols are either peptides, too heavy or too complex to be considered in de novo-design, and $9 6 . 7 \\%$ of ChEMBL is less than 100 symbols in length. Any SMILES containing forbidden symbols (Table 2) are filtered out. Further, the molecules of the Tanimoto benchmark are removed from the set. Finally, all molecules similar to these benchmark molecules in terms a Tanimoto coefficient greater than 0.5 on ECFC4 fingerprints are removed. The remaining molecules are randomly split into train, test and development set. ",
|
| 1532 |
+
"bbox": [
|
| 1533 |
+
174,
|
| 1534 |
+
260,
|
| 1535 |
+
825,
|
| 1536 |
+
398
|
| 1537 |
+
],
|
| 1538 |
+
"page_idx": 11
|
| 1539 |
+
},
|
| 1540 |
+
{
|
| 1541 |
+
"type": "text",
|
| 1542 |
+
"text": "Before one-hot encoding, the four multi-character included atoms (Br, Cl, Si, Se) were replaced with single-character substitutes. Then, the included symbols (including start character $\" \\bigcirc : $ and end character $\" \\setminus \"$ are converted to integer token equivalents. ",
|
| 1543 |
+
"bbox": [
|
| 1544 |
+
176,
|
| 1545 |
+
406,
|
| 1546 |
+
825,
|
| 1547 |
+
448
|
| 1548 |
+
],
|
| 1549 |
+
"page_idx": 11
|
| 1550 |
+
},
|
| 1551 |
+
{
|
| 1552 |
+
"type": "image",
|
| 1553 |
+
"img_path": "images/12b554fcb8efc50287e2d3b5764756f8547ab32669e198bd92c881dd10a709cd.jpg",
|
| 1554 |
+
"image_caption": [
|
| 1555 |
+
"Figure 5: t-SNE visualization (Maaten & Hinton, 2008) of MLE sampling of generated space. The MLE model effectively covers the space of ChEMBL and even reproduces the subspaces around the ChEMBL molecules. "
|
| 1556 |
+
],
|
| 1557 |
+
"image_footnote": [],
|
| 1558 |
+
"bbox": [
|
| 1559 |
+
173,
|
| 1560 |
+
117,
|
| 1561 |
+
818,
|
| 1562 |
+
363
|
| 1563 |
+
],
|
| 1564 |
+
"page_idx": 12
|
| 1565 |
+
},
|
| 1566 |
+
{
|
| 1567 |
+
"type": "table",
|
| 1568 |
+
"img_path": "images/fb78ada41b76e702f62fda496f90e07895a3fe5bfd376b1e65953945aabe0310.jpg",
|
| 1569 |
+
"table_caption": [
|
| 1570 |
+
"Table 2: Dictionary of SMILES "
|
| 1571 |
+
],
|
| 1572 |
+
"table_footnote": [],
|
| 1573 |
+
"table_body": "<table><tr><td>Forbidden Symbols</td><td>'Li','Be','Ne','Na','Mg','Al','Ar','K','Ca','Sc', 'Ti','V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga', 'Ge','As','Kr','Rb','Sr','Y','Zr','Nb','Mo','Tc', 'Ru','Rh','Pd','Ag','Cd','In','Sn','Sb','Xe','Cs', 'Ba','Hf','Ta','W','Re','Os','Ir','Pt','Au','Hg', 'Tl','Pb','Bi','Po','At','Rn','Fr','Ra','Rf','Db', 'Sg','Bh','Hs','Mt','Ds','Rg','Cn','Fl','Lv','La', 'Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho', 'Er','Tm','Yb','Lu','Ac','Th','Pa','U','Np','Pu',</td></tr><tr><td>Multi-character Symbols</td><td>'te','Te','se'</td></tr><tr><td>Included Symbols</td><td>'Br':Y,'Cl':X,'Si':A,'Se':Z 'Q','\\n','','#','%','(', 1</td></tr></table>",
|
| 1574 |
+
"bbox": [
|
| 1575 |
+
173,
|
| 1576 |
+
478,
|
| 1577 |
+
862,
|
| 1578 |
+
722
|
| 1579 |
+
],
|
| 1580 |
+
"page_idx": 12
|
| 1581 |
+
},
|
| 1582 |
+
{
|
| 1583 |
+
"type": "table",
|
| 1584 |
+
"img_path": "images/919d2cb52f528f389a4dac44c0dce5ceb8e9653aa674080a7fed5cbc128e9d55.jpg",
|
| 1585 |
+
"table_caption": [
|
| 1586 |
+
"Table 3: Drugs used in the Tanimoto benchmark task "
|
| 1587 |
+
],
|
| 1588 |
+
"table_footnote": [],
|
| 1589 |
+
"table_body": "<table><tr><td>Drug</td><td>SMILES</td></tr><tr><td>Albuterol</td><td>CC(C)(C)NCC(O)clccc(O)c(CO)c1</td></tr><tr><td>Aripiprazole</td><td>Clc1cccc(N2CCN(CCCCOc3ccc4CCC(=O)Nc4c3)CC2)c1C1</td></tr><tr><td>Celecoxxib</td><td>Cclccc(ccl)-clcc(nnl-clccc(ccl)S(N)(=O)=O)C(F)(F)F</td></tr><tr><td>Cobimetinib</td><td>OC1(CN(C1)C(=O)clccc(F)c(F)c1Nclccc(I) cclF)C1CCCCN1</td></tr><tr><td>Fexofenadine</td><td>CC(C)(C(O)=O)clccc(ccl)C(O)cccNiccC(Cc1)C(O)(clcccccl)clccccc1</td></tr><tr><td>Mestranol</td><td>COc1ccc2C3CCC4(C)C(CCC4(O)C#C)C3CCc2c1</td></tr><tr><td>Osimertinib</td><td>COclcc(N(C)CCN(C)C)c(NC(=O)C=C)cc1Nc2nccc(n2)c3cn(C)c4ccccc34</td></tr><tr><td>Ranolazine</td><td>COc1ccccc1OCC(O) CN2CCN(CC(=O)Nc3c(C)cccc3C)CC2</td></tr><tr><td>Thiothixene</td><td>CN(C)S(=O)(=O)clccc2Sc3ccccc3C(=CCCN4CCN(C)CC4)c2c1</td></tr><tr><td>Troglitazone</td><td>Cclc(C)c2OC(C) (COc3ccc(CC4SC(=O)NC4=O)cc3)CCc2c(C)c1O</td></tr></table>",
|
| 1590 |
+
"bbox": [
|
| 1591 |
+
232,
|
| 1592 |
+
781,
|
| 1593 |
+
759,
|
| 1594 |
+
909
|
| 1595 |
+
],
|
| 1596 |
+
"page_idx": 12
|
| 1597 |
+
},
|
| 1598 |
+
{
|
| 1599 |
+
"type": "image",
|
| 1600 |
+
"img_path": "images/b2c5d80b50d6aea19cc7747ce74a1cd82c1dfd97fc3176b47917e2c9d661ea23.jpg",
|
| 1601 |
+
"image_caption": [
|
| 1602 |
+
"Figure 6: Target molecules for the Tanimoto benchmark. "
|
| 1603 |
+
],
|
| 1604 |
+
"image_footnote": [],
|
| 1605 |
+
"bbox": [
|
| 1606 |
+
173,
|
| 1607 |
+
335,
|
| 1608 |
+
825,
|
| 1609 |
+
657
|
| 1610 |
+
],
|
| 1611 |
+
"page_idx": 13
|
| 1612 |
+
},
|
| 1613 |
+
{
|
| 1614 |
+
"type": "table",
|
| 1615 |
+
"img_path": "images/ea40e79e262b3e77c4fe03aba25d90e054317252abec67033f07465ab2ca052a.jpg",
|
| 1616 |
+
"table_caption": [
|
| 1617 |
+
"Table 4: Hyperparameters "
|
| 1618 |
+
],
|
| 1619 |
+
"table_footnote": [],
|
| 1620 |
+
"table_body": "<table><tr><td>Model</td><td>Param</td><td>Explanation</td></tr><tr><td>Baseline</td><td>batchsize = 10 epochs = 1000</td><td>Number of SMILES per batch Number of batches</td></tr><tr><td>Reg. PG</td><td>max_len=100 batchsize=128 num_epochs=128 c_reg=10</td><td>Max length of a SMILES Number of parallel batches Number of batches of RL optimization Weight of the MLE regularizer Learning rate of Adam optimizer</td></tr><tr><td>A2C</td><td>lr=1e-4 num_actions=1e6 max-grad_norm=0.5 gamma=1.0 ir=4e-4 eps=1e-8 num_steps=40 batch_size=32 entropy-coef=0.013 gae=1 tau=0.95</td><td>Total number of actions of RL optimization Maximum norm of gradient before clipping Time-discount factor Learning rate of Adam optimizer Epsilon parameter for Adam optimizer Number of steps of forward steps Number of parallel environments Multiplicative cost of the entropy Use generalized advantage estimation Generalized advantage estimation tau</td></tr><tr><td>GAN</td><td>val_loss_wt=0.5 pretrain_discrim=5 num_rounds=4 rl_epochs=5 discr_epochs=1 phi_D=0.05 batch_size=8 max_len=100 gamma=0.98 num_rollout s=3 lr=1e-3 lr=1e-3</td><td>Weight of the value loss Number of epochs to pretrain the discriminator Number of rounds of RL-and-discriminator alternating training Number of RL epochs per round Number of discriminator epochs per round Weight of the discriminator in reward Batch size of training Max rollout length Time-discount factor for rollouts Number of rollouts per action-step Learning rate of Adam optimizer for generator Learning rate of Adam optimizer for discriminator</td></tr><tr><td>PPO</td><td>ppo_batch_size=64 ppo_epoch=4 epsilon=0.2 num_actions=1e6 max-grad_norm=0.5 gamma=1.0 lr=4e-4 eps=1e-8 num_steps=40 batch_size=32 entropy-coef=0.013 gae=0 val_loss_wt=0.5</td><td>Batch size of the PPO updates Number of PPO epochs Width of the PPO clip region Total number of actions of RL optimization Maximum norm of gradient before clipping Time-discount factor Learning rate of Adam optimizer Epsilon parameter for Adam optimizer Number of steps of forward steps Number of parallel environments Multiplicative cost of the entropy Do not use generalized advantage estimation Weight of the value loss</td></tr></table>",
|
| 1621 |
+
"bbox": [
|
| 1622 |
+
173,
|
| 1623 |
+
199,
|
| 1624 |
+
872,
|
| 1625 |
+
849
|
| 1626 |
+
],
|
| 1627 |
+
"page_idx": 14
|
| 1628 |
+
}
|
| 1629 |
+
]
|
parse/train/HkcTe-bR-/HkcTe-bR-_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HkcTe-bR-/HkcTe-bR-_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/St1giarCHLP/St1giarCHLP.md
ADDED
|
@@ -0,0 +1,607 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DENOISING DIFFUSION IMPLICIT MODELS
|
| 2 |
+
|
| 3 |
+
Jiaming Song, Chenlin Meng & Stefano Ermon Stanford University {tsong,chenlin,ermon}@cs.stanford.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Denoising diffusion probabilistic models (DDPMs) have achieved high quality image generation without adversarial training, yet they require simulating a Markov chain for many steps in order to produce a sample. To accelerate sampling, we present denoising diffusion implicit models (DDIMs), a more efficient class of iterative implicit probabilistic models with the same training procedure as DDPMs. In DDPMs, the generative process is defined as the reverse of a particular Markovian diffusion process. We generalize DDPMs via a class of non-Markovian diffusion processes that lead to the same training objective. These non-Markovian processes can correspond to generative processes that are deterministic, giving rise to implicit models that produce high quality samples much faster. We empirically demonstrate that DDIMs can produce high quality samples $1 0 \times$ to $5 0 \times$ faster in terms of wall-clock time compared to DDPMs, allow us to trade off computation for sample quality, perform semantically meaningful image interpolation directly in the latent space, and reconstruct observations with very low error.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep generative models have demonstrated the ability to produce high quality samples in many domains (Karras et al., 2020; van den Oord et al., 2016a). In terms of image generation, generative adversarial networks (GANs, Goodfellow et al. (2014)) currently exhibits higher sample quality than likelihood-based methods such as variational autoencoders (Kingma & Welling, 2013), autoregressive models (van den Oord et al., 2016b) and normalizing flows (Rezende & Mohamed, 2015; Dinh et al., 2016). However, GANs require very specific choices in optimization and architectures in order to stabilize training (Arjovsky et al., 2017; Gulrajani et al., 2017; Karras et al., 2018; Brock et al., 2018), and could fail to cover modes of the data distribution (Zhao et al., 2018).
|
| 12 |
+
|
| 13 |
+
Recent works on iterative generative models (Bengio et al., 2014), such as denoising diffusion probabilistic models (DDPM, Ho et al. (2020)) and noise conditional score networks (NCSN, Song & Ermon (2019)) have demonstrated the ability to produce samples comparable to that of GANs, without having to perform adversarial training. To achieve this, many denoising autoencoding models are trained to denoise samples corrupted by various levels of Gaussian noise. Samples are then produced by a Markov chain which, starting from white noise, progressively denoises it into an image. This generative Markov Chain process is either based on Langevin dynamics (Song & Ermon, 2019) or obtained by reversing a forward diffusion process that progressively turns an image into noise (Sohl-Dickstein et al., 2015).
|
| 14 |
+
|
| 15 |
+
A critical drawback of these models is that they require many iterations to produce a high quality sample. For DDPMs, this is because that the generative process (from noise to data) approximates the reverse of the forward diffusion process (from data to noise), which could have thousands of steps; iterating over all the steps is required to produce a single sample, which is much slower compared to GANs, which only needs one pass through a network. For example, it takes around 20 hours to sample $5 0 \mathrm { k }$ images of size $3 2 \times 3 2$ from a DDPM, but less than a minute to do so from a GAN on a Nvidia 2080 Ti GPU. This becomes more problematic for larger images as sampling $5 0 \mathrm { k }$ images of size $2 5 6 \times 2 5 6$ could take nearly 1000 hours on the same GPU.
|
| 16 |
+
|
| 17 |
+
To close this efficiency gap between DDPMs and GANs, we present denoising diffusion implicit models (DDIMs). DDIMs are implicit probabilistic models (Mohamed & Lakshminarayanan, 2016) and are closely related to DDPMs, in the sense that they are trained with the same objective function.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Graphical models for diffusion (left) and non-Markovian (right) inference models.
|
| 21 |
+
|
| 22 |
+
In Section 3, we generalize the forward diffusion process used by DDPMs, which is Markovian, to non-Markovian ones, for which we are still able to design suitable reverse generative Markov chains. We show that the resulting variational training objectives have a shared surrogate objective, which is exactly the objective used to train DDPM. Therefore, we can freely choose from a large family of generative models using the same neural network simply by choosing a different, nonMarkovian diffusion process (Section 4.1) and the corresponding reverse generative Markov Chain. In particular, we are able to use non-Markovian diffusion processes which lead to ”short” generative Markov chains (Section 4.2) that can be simulated in a small number of steps. This can massively increase sample efficiency only at a minor cost in sample quality.
|
| 23 |
+
|
| 24 |
+
In Section 5, we demonstrate several empirical benefits of DDIMs over DDPMs. First, DDIMs have superior sample generation quality compared to DDPMs, when we accelerate sampling by $1 0 \times$ to $1 0 0 \times$ using our proposed method. Second, DDIM samples have the following “consistency” property, which does not hold for DDPMs: if we start with the same initial latent variable and generate several samples with Markov chains of various lengths, these samples would have similar high-level features. Third, because of “consistency” in DDIMs, we can perform semantically meaningful image interpolation by manipulating the initial latent variable in DDIMs, unlike DDPMs which interpolates near the image space due to the stochastic generative process.
|
| 25 |
+
|
| 26 |
+
# 2 BACKGROUND
|
| 27 |
+
|
| 28 |
+
Given samples from a data distribution $q ( { \pmb x } _ { 0 } )$ , we are interested in learning a model distribution $p _ { \theta } ( { \pmb x } _ { 0 } )$ that approximates $q ( { \pmb x } _ { 0 } )$ and is easy to sample from. Denoising diffusion probabilistic models (DDPMs, Sohl-Dickstein et al. (2015); Ho et al. (2020)) are latent variable models of the form
|
| 29 |
+
|
| 30 |
+
$$
|
| 31 |
+
p _ { \theta } ( \pmb { x } _ { 0 } ) = \int p _ { \theta } ( \pmb { x } _ { 0 : T } ) \mathrm { d } \pmb { x } _ { 1 : T } , \quad \mathrm { w h e r e } \quad p _ { \theta } ( \pmb { x } _ { 0 : T } ) : = p _ { \theta } ( \pmb { x } _ { T } ) \prod _ { t = 1 } ^ { T } p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )
|
| 32 |
+
$$
|
| 33 |
+
|
| 34 |
+
where $\pmb { x } _ { 1 } , \ldots , \pmb { x } _ { T }$ are latent variables in the same sample space as $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ (denoted as $\mathcal { X }$ ). The parameters $\theta$ are learned to fit the data distribution $q ( { \pmb x } _ { 0 } )$ by maximizing a variational lower bound:
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\operatorname* { m a x } _ { \theta } \mathbb { E } _ { q ( \pmb { x } _ { 0 } ) } [ \log p _ { \theta } ( \pmb { x } _ { 0 } ) ] \leq \operatorname* { m a x } _ { \theta } \mathbb { E } _ { q ( \pmb { x } _ { 0 } , \pmb { x } _ { 1 } , \dots , \pmb { x } _ { T } ) } \left[ \log p _ { \theta } ( \pmb { x } _ { 0 : T } ) - \log q ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } ) \right]
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
where $q ( { \pmb x } _ { 1 : T } | { \pmb x } _ { 0 } )$ is some inference distribution over the latent variables. Unlike typical latent variable models (such as the variational autoencoder (Rezende et al., 2014)), DDPMs are learned with a fixed (rather than trainable) inference procedure $q \big ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } \big )$ , and latent variables are relatively high dimensional. For example, Ho et al. (2020) considered the following Markov chain with Gaussian transitions parameterized by a decreasing sequence $\alpha _ { 1 : T } \in ( 0 , 1 ] ^ { T }$ :
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
q ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } ) : = \prod _ { t = 1 } ^ { T } q ( \pmb { x } _ { t } | \pmb { x } _ { t - 1 } ) , \mathrm { w h e r e ~ } q ( \pmb { x } _ { t } | \pmb { x } _ { t - 1 } ) : = \mathcal { N } \left( \sqrt { \frac { \alpha _ { t } } { \alpha _ { t - 1 } } } \pmb { x } _ { t - 1 } , \left( 1 - \frac { \alpha _ { t } } { \alpha _ { t - 1 } } \right) I \right)
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
where the covariance matrix is ensured to have positive terms on its diagonal. This is called the forward process due to the autoregressive nature of the sampling procedure (from $\scriptstyle { \pmb x } _ { 0 }$ to $\mathbfit { \mathbf { x } } _ { T }$ ). We call the latent variable model $p _ { \theta } ( { \pmb x } _ { 0 : T } )$ , which is a Markov chain that samples from $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ to $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , the generative process, since it approximates the intractable reverse process $q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ . Intuitively, the forward process progressively adds noise to the observation $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , whereas the generative process progressively denoises a noisy observation (Figure 1, left).
|
| 47 |
+
|
| 48 |
+
A special property of the forward process is that
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
q ( \pmb { x } _ { t } | \pmb { x } _ { 0 } ) : = \int q ( \pmb { x } _ { 1 : t } | \pmb { x } _ { 0 } ) \mathrm { d } \pmb { x } _ { 1 : ( t - 1 ) } = \mathcal { N } ( \pmb { x } _ { t } ; \sqrt { \alpha _ { t } } \pmb { x } _ { 0 } , ( 1 - \alpha _ { t } ) \pmb { I } ) ;
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
so we can express $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ as a linear combination of $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ and a noise variable $\epsilon$
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\begin{array} { r } { \mathbf { { x } } _ { t } = \sqrt { \alpha _ { t } } \mathbf { { x } } _ { 0 } + \sqrt { 1 - \alpha _ { t } } \epsilon , \quad \mathrm { w h e r e } \quad \epsilon \sim \mathcal { N } ( \mathbf { 0 } , I ) . } \end{array}
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
When we set $\alpha _ { T }$ sufficiently close to 0, $q ( { \pmb x } _ { T } | { \pmb x } _ { 0 } )$ converges to a standard Gaussian for all $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , so it is natural to set $p _ { \theta } ( { \pmb x } _ { T } ) : = \mathrm { \dot { \mathcal { N } } } ( \mathbf { 0 } , I )$ . If all the conditionals are modeled as Gaussians with trainable mean functions and fixed variances, the objective in Eq. (2) can be simplified to1:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
L _ { \gamma } ( \epsilon _ { \theta } ) : = \sum _ { t = 1 } ^ { T } \gamma _ { t } \mathbb { E } _ { x _ { 0 } \sim q ( x _ { 0 } ) , \epsilon _ { t } \sim \mathcal { N } ( \mathbf { 0 } , I ) } \left[ \lVert \epsilon _ { \theta } ^ { ( t ) } ( \sqrt { \alpha _ { t } } x _ { 0 } + \sqrt { 1 - \alpha _ { t } } \epsilon _ { t } ) - \epsilon _ { t } \rVert _ { 2 } ^ { 2 } \right]
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\epsilon _ { \theta } : = \{ \epsilon _ { \theta } ^ { ( t ) } \} _ { t = 1 } ^ { T }$ is a set of $T$ functions, each $\epsilon _ { \theta } ^ { ( t ) } : \mathcal { X } \mathcal { X }$ (indexed by $t$ ) is a function with trainable parameters $\theta ^ { ( t ) }$ , and $\gamma : = [ \gamma _ { 1 } , \dots , \gamma _ { T } ]$ is a vector of positive coefficients in the objective that depends on $\alpha _ { 1 : T }$ . In Ho et al. (2020), the objective with $\gamma = { \bf 1 }$ is optimized instead to maximize generation performance of the trained model; this is also the same objective used in noise conditional score networks (Song & Ermon, 2019) based on score matching (Hyvarinen¨ , 2005; Vincent, 2011). From a trained model, $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ is sampled by first sampling $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ from the prior $p _ { \theta } ( { \pmb x } _ { T } )$ , and then sampling ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ from the generative processes iteratively.
|
| 67 |
+
|
| 68 |
+
The length $T$ of the forward process is an important hyperparameter in DDPMs. From a variational perspective, a large $T$ allows the reverse process to be close to a Gaussian (Sohl-Dickstein et al., 2015), so that the generative process modeled with Gaussian conditional distributions becomes a good approximation; this motivates the choice of large $T$ values, such as $T = 1 0 0 0$ in Ho et al. (2020). However, as all $T$ iterations have to be performed sequentially, instead of in parallel, to obtain a sample $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , sampling from DDPMs is much slower than sampling from other deep generative models, which makes them impractical for tasks where compute is limited and latency is critical.
|
| 69 |
+
|
| 70 |
+
# 3 VARIATIONAL INFERENCE FOR NON-MARKOVIAN FORWARD PROCESSES
|
| 71 |
+
|
| 72 |
+
Because the generative model approximates the reverse of the inference process, we need to rethink the inference process in order to reduce the number of iterations required by the generative model. Our key observation is that the DDPM objective in the form of $L _ { \gamma }$ only depends on the marginals2 $q ( \pmb { x } _ { t } | \pmb { x } _ { 0 } )$ , but not directly on the joint $q ( { \pmb x } _ { 1 : T } | { \pmb x } _ { 0 } )$ . Since there are many inference distributions (joints) with the same marginals, we explore alternative inference processes that are non-Markovian, which leads to new generative processes (Figure 1, right). These non-Markovian inference process lead to the same surrogate objective function as DDPM, as we will show below. In Appendix A, we show that the non-Markovian perspective also applies beyond the Gaussian case.
|
| 73 |
+
|
| 74 |
+
# 3.1 NON-MARKOVIAN FORWARD PROCESSES
|
| 75 |
+
|
| 76 |
+
Let us consider a family $\mathcal { Q }$ of inference distributions, indexed by a real vector $\sigma \in \mathbb { R } _ { \geq 0 } ^ { T }$
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
q _ { \sigma } ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } ) : = q _ { \sigma } ( \pmb { x } _ { T } | \pmb { x } _ { 0 } ) \prod _ { t = 2 } ^ { T } q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } )
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $q _ { \sigma } ( \pmb { x } _ { T } | \pmb { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { T } } \pmb { x } _ { 0 } , ( 1 - \alpha _ { T } ) \pmb { I } )$ and for all $t > 1$ ,
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) = \mathcal { N } \left( \sqrt { \alpha _ { t - 1 } } \pmb { x } _ { 0 } + \sqrt { 1 - \alpha _ { t - 1 } - \sigma _ { t } ^ { 2 } } \cdot \frac { \pmb { x } _ { t } - \sqrt { \alpha _ { t } } \pmb { x } _ { 0 } } { \sqrt { 1 - \alpha _ { t } } } , \sigma _ { t } ^ { 2 } I \right) .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
The mean function is chosen to order to ensure that $q _ { \sigma } ( \mathbf { x } _ { t } | \mathbf { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t } } \mathbf { x } _ { 0 } , ( 1 - \alpha _ { t } ) \mathbf { I } )$ for all $t$ (see Lemma 1 of Appendix B), so that it defines a joint inference distribution that matches the “marginals” as desired. The forward process3 can be derived from Bayes’ rule:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
q _ { \sigma } ( \pmb { x } _ { t } | \pmb { x } _ { t - 1 } , \pmb { x } _ { 0 } ) = \frac { q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) q _ { \sigma } ( \pmb { x } _ { t } | \pmb { x } _ { 0 } ) } { q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { 0 } ) } ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
which is also Gaussian (although we do not use this fact for the remainder of this paper). Unlike the diffusion process in Eq. (3), the forward process here is no longer Markovian, since each $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ could depend on both ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ and $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ . The magnitude of $\sigma$ controls the how stochastic the forward process is; when $\sigma 0$ , we reach an extreme case where as long as we observe $\scriptstyle { \pmb x } _ { 0 }$ and $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ for some $t$ , then ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ become known and fixed.
|
| 95 |
+
|
| 96 |
+
# 3.2 GENERATIVE PROCESS AND UNIFIED VARIATIONAL INFERENCE OBJECTIVE
|
| 97 |
+
|
| 98 |
+
Next, we define a trainable generative process $p _ { \theta } ( { \pmb x } _ { 0 : T } )$ where each $p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ leverages knowledge of $q _ { \sigma } ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } , { \pmb x } _ { 0 } )$ . Intuitively, given a noisy observation $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ , we first make a prediction4 of the corresponding $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , and then use it to obtain a sample ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ through the reverse conditional distribution $q _ { \sigma } ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } , { \pmb x } _ { 0 } )$ , which we have defined.
|
| 99 |
+
|
| 100 |
+
For some ${ \pmb x } _ { 0 } \sim { \pmb q } ( { \pmb x } _ { 0 } )$ and $\epsilon _ { t } \sim \mathcal { N } ( \mathbf { 0 } , I )$ , $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ can be obtained using Eq. (4). The model $\epsilon _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } )$ then attempts to predict $\epsilon _ { t }$ from $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ , without knowledge of $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ . By rewriting Eq. (4), one can then predict the denoised observation, which is a prediction of $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ given $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ :
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
f _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } ) : = \big ( { \pmb x } _ { t } - \sqrt { 1 - \alpha _ { t } } \cdot \epsilon _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } ) \big ) / \sqrt { \alpha _ { t } } .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
We can then define the generative process with a fixed prior $p _ { \theta } ( { \pmb x } _ { T } ) = \mathcal { N } ( \mathbf { 0 } , I )$ and
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } ) = \left\{ \begin{array} { l l } { \mathcal { N } ( f _ { \theta } ^ { ( 1 ) } ( \pmb { x } _ { 1 } ) , \sigma _ { 1 } ^ { 2 } \pmb { I } ) } & { \mathrm { i f ~ } t = 1 } \\ { q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , f _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } ) ) } & { \mathrm { o t h e r w i s e } , } \end{array} \right.
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , f _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } ) )$ is defined as in Eq. (7) with $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ replaced by $f _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } )$ . We add some Gaussian noise (with covariance $\sigma _ { 1 } ^ { 2 } I )$ ) for the case of $t = 1$ to ensure that the generative process is supported everywhere.
|
| 113 |
+
|
| 114 |
+
We optimize $\theta$ via the following variational inference objective (which is a functional over $\epsilon _ { \theta }$ ):
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\begin{array} { r l } & { \ J _ { \sigma } ( \epsilon _ { \theta } ) : = \mathbb { E } _ { \alpha _ { 0 : T } \sim q _ { \sigma } ( \alpha _ { 0 : T } ) } \bigl [ \log q _ { \sigma } ( x _ { 1 : T } | x _ { 0 } ) - \log p _ { \theta } ( x _ { 0 : T } ) \bigr ] } & { ( 1 1 ) } \\ & { = \mathbb { E } _ { \alpha _ { 0 : T } \sim q _ { \sigma } ( \alpha _ { 0 : T } ) } \left[ q _ { \sigma } ( x _ { T } | x _ { 0 } ) + \displaystyle \sum _ { t = 2 } ^ { T } \log q _ { \sigma } ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) - \displaystyle \sum _ { t = 1 } ^ { T } \log p _ { \theta } ^ { ( t ) } ( x _ { t - 1 } | x _ { t } ) - \log p _ { \theta } ( x _ { T } ) \right] } \end{array}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where we factorize $q _ { \sigma } ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } )$ according to Eq. (6) and $p _ { \theta } ( { \pmb x } _ { 0 : T } )$ according to Eq. (1).
|
| 121 |
+
|
| 122 |
+
From the definition of $J _ { \sigma }$ , it would appear that a different model has to be trained for every choice of $\sigma$ , since it corresponds to a different variational objective (and a different generative process). However, $J _ { \sigma }$ is equivalent to $L _ { \gamma }$ for certain weights $\gamma$ , as we show below.
|
| 123 |
+
|
| 124 |
+
Theorem 1. For all $\sigma > 0$ , there exists $\gamma \in \mathbb { R } _ { > 0 } ^ { T }$ and $C \in \mathbb { R }$ , such that $J _ { \sigma } = L _ { \gamma } + C$ .
|
| 125 |
+
|
| 126 |
+
The variational objective $L _ { \gamma }$ is special in the sense that if parameters $\theta$ of the models $\epsilon _ { \theta } ^ { ( t ) }$ are not shared across different $t$ , then the optimal solution for $\epsilon _ { \theta }$ will not depend on the weights $\gamma$ (as global optimum is achieved by separately maximizing each term in the sum). This property of $L _ { \gamma }$ has two implications. On the one hand, this justified the use of $L _ { 1 }$ as a surrogate objective function for the variational lower bound in DDPMs; on the other hand, since $J _ { \sigma }$ is equivalent to some $L _ { \gamma }$ from Theorem 1, the optimal solution of $J _ { \sigma }$ is also the same as that of $L _ { 1 }$ . Therefore, if parameters are not shared across $t$ in the model $\epsilon _ { \theta }$ , then the $L _ { 1 }$ objective used by Ho et al. (2020) can be used as a surrogate objective for the variational objective $J _ { \sigma }$ as well.
|
| 127 |
+
|
| 128 |
+
# 4 SAMPLING FROM GENERALIZED GENERATIVE PROCESSES
|
| 129 |
+
|
| 130 |
+
With $L _ { 1 }$ as the objective, we are not only learning a generative process for the Markovian inference process considered in Sohl-Dickstein et al. (2015) and Ho et al. (2020), but also generative processes for many non-Markovian forward processes parametrized by $\sigma$ that we have described. Therefore, we can essentially use pretrained DDPM models as the solutions to the new objectives, and focus on finding a generative process that is better at producing samples subject to our needs by changing $\sigma$ .
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 2: Graphical model for accelerated generation, where $\tau = [ 1 , 3 ]$ .
|
| 134 |
+
|
| 135 |
+
# 4.1 DENOISING DIFFUSION IMPLICIT MODELS
|
| 136 |
+
|
| 137 |
+
From $p _ { \theta } ( { \pmb x } _ { 1 : T } )$ in Eq. (10), one can generate a sample ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ from a sample $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ via:
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
\begin{array} { r } { x _ { t - 1 } = \sqrt { \alpha _ { t - 1 } } \underbrace { \Bigg ( \frac { x _ { t } - \sqrt { 1 - \alpha _ { t } } \epsilon _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } ) } { \sqrt { \alpha _ { t } } } \Bigg ) } _ { \substack { \mathrm { ~ \forall ~ n e d i c t e d ~ } x _ { 0 } \mathrm { , ~ } } } + \underbrace { \sqrt { 1 - \alpha _ { t - 1 } - \sigma _ { t } ^ { 2 } } \cdot \epsilon _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } ) } _ { \substack { \mathrm { ~ \forall ~ a f i r c t i o n ~ p o i n i n g ~ t o ~ } x _ { t } \mathrm { , ~ } } } + \underbrace { \sigma _ { t } \epsilon _ { t } } _ { \substack { \mathrm { r a n d o m ~ n o i s e } } } } \end{array}
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
where $\epsilon _ { t } \sim \mathcal { N } ( \mathbf { 0 } , I )$ is standard Gaussian noise independent of $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ , and we define $\alpha _ { 0 } : = 1$ . Different choices of $\sigma$ values results in different generative processes, all while using the same model $\epsilon _ { \theta }$ , so re-training the model is unnecessary. When $\sigma _ { t } = \bar { \sqrt { ( 1 - \alpha _ { t - 1 } ) / ( 1 - \alpha _ { t } ) } } \bar { \sqrt { 1 - \alpha _ { t } / \alpha _ { t - 1 } } }$ for all $t$ , the forward process becomes Markovian, and the generative process becomes a DDPM.
|
| 144 |
+
|
| 145 |
+
We note another special case when $\sigma _ { t } = 0$ for all $t ^ { 5 }$ ; the forward process becomes deterministic given $\mathbf { \delta x } _ { t - 1 }$ and $\scriptstyle { \pmb x } _ { 0 }$ , except for $t = 1$ ; in the generative process, the coefficient before the random noise $\epsilon _ { t }$ becomes zero. The resulting model becomes an implicit probabilistic model (Mohamed & Lakshminarayanan, 2016), where samples are generated from latent variables with a fixed procedure (from $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ to $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ ). We name this the denoising diffusion implicit model (DDIM, pronounced $/ \mathrm { d } { : } \mathrm { m } / )$ , because it is an implicit probabilistic model trained with the DDPM objective (despite the forward process no longer being a diffusion).
|
| 146 |
+
|
| 147 |
+
# 4.2 ACCELERATED GENERATION PROCESSES
|
| 148 |
+
|
| 149 |
+
In the previous sections, the generative process is considered as the approximation to the reverse process; since of the forward process has $T$ steps, the generative process is also forced to sample $T$ steps. However, as the denoising objective $L _ { 1 }$ does not depend on the specific forward procedure as long as $q _ { \sigma } ( \pmb { x } _ { t } | \pmb { x } _ { 0 } )$ is fixed, we may also consider forward processes with lengths smaller than $T$ , which accelerates the corresponding generative processes without having to train a different model.
|
| 150 |
+
|
| 151 |
+
Let us consider the forward process as defined not on all the latent variables $\pmb { x } _ { 1 : T }$ , but on a subset $\{ \pmb { x } _ { \tau _ { 1 } } , \dotsc , \pmb { x } _ { \tau _ { S } } \}$ , where $\tau$ is an increasing sub-sequence of $[ 1 , \ldots , T ]$ of length $S$ . In particular, we define the sequential forward process over √ $\pmb { x } _ { \tau _ { 1 } } , \ldots , \pmb { x } _ { \tau _ { S } }$ such that $q ( { \pmb x } _ { \tau _ { i } } | { \pmb x } _ { 0 } ) =$ $\bar { \mathcal { N } } ( \sqrt { \alpha _ { \tau _ { i } } } \pmb { x } _ { 0 } , ( 1 - \alpha _ { \tau _ { i } } ) \pmb { I } )$ matches the “marginals” (see Figure 2 for an illustration). The generative process now samples latent variables according to reversed $( \tau )$ , which we term (sampling) trajectory. When the length of the sampling trajectory is much smaller than $T$ , we may achieve significant increases in computational efficiency due to the iterative nature of the sampling process.
|
| 152 |
+
|
| 153 |
+
Using a similar argument as in Section 3, we can justify using the model trained with the $L _ { 1 }$ objective, so no changes are needed in training. We show that only slight changes to the updates in Eq. (12) are needed to obtain the new, faster generative processes, which applies to DDPM, DDIM, as well as all generative processes considered in Eq. (10). We include these details in Appendix C.1.
|
| 154 |
+
|
| 155 |
+
In principle, this means that we can train a model with an arbitrary number of forward steps but only sample from some of them in the generative process. Therefore, the trained model could consider many more steps than what is considered in (Ho et al., 2020) or even a continuous time variable $t$ (Chen et al., 2020). We leave empirical investigations of this aspect as future work.
|
| 156 |
+
|
| 157 |
+
Moreover, we can rewrite the DDIM iterate according to Eq. (12), and its similarity to Euler integration for solving ODEs becomes more apparent:
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
\sqrt { \frac { 1 } { \alpha _ { t - 1 } } } { \pmb x } _ { t - 1 } = \sqrt { \frac { 1 } { \alpha _ { t } } } { \pmb x } _ { t } + \left( \sqrt { \frac { 1 - \alpha _ { t - 1 } } { \alpha _ { t - 1 } } } - \sqrt { \frac { 1 - \alpha _ { t } } { \alpha _ { t } } } \right) \epsilon _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } )
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
We can reparameterize $( \sqrt { 1 - \alpha } / \sqrt { \alpha } )$ with $\lambda$ and $( { \pmb x } / { \sqrt { \alpha } } )$ with $H ( \lambda )$ then sampling $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ with Equation (13) can be treated as integration over the following ODE:
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
H ( 0 ) = \int _ { M } ^ { 0 } \epsilon _ { \theta } ^ { \lambda } ( H ( \lambda ) \sqrt { \lambda ^ { 2 } - 1 } ) \mathrm { d } \lambda + H ( M ) , \quad H ( M ) \sim \mathcal { N } ( \mathbf { 0 } , I )
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
for some very large $M$ (which corresponds to the case of $\alpha \approx 0$ ). This suggests that with enough $T$ (discretization steps), the we can also reverse the generation process (going from $t = 0$ to $T$ ), which encodes $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ to $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ and simulates the reverse of the ODE in Eq. (14). This suggests that unlike DDPM, we can use DDIM to obtain encodings of the observations (as the form of $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ ), which might be useful for other downstream applications that requires latent representations of a model.
|
| 170 |
+
|
| 171 |
+
# 5 EXPERIMENTS
|
| 172 |
+
|
| 173 |
+
In this section, we show that DDIMs outperform DDPMs in terms of image generation when fewer iterations are considered, giving speed ups of $1 0 \times$ to $1 0 0 \times$ over the original DDPM generation process. Moreover, unlike DDPMs, once the initial latent variables $\mathbfit { \mathbf { x } } _ { T }$ are fixed, DDIMs retain highlevel image features regardless of the generation trajectory, so they are able to perform interpolation directly from the latent space. DDIMs can also be used to encode samples that reconstruct them from the latent code, which DDPMs cannot do due to the stochastic sampling process.
|
| 174 |
+
|
| 175 |
+
For each dataset, we use the same trained model with $T \ = \ 1 0 0 0$ and the objective being $L _ { \gamma }$ from Eq. (5) with $\gamma = 1$ ; as we argued in Section 3, no changes are needed with regards to the training procedure. The only changes that we make is how we produce samples from the model; we achieve this by controlling $\tau$ (which controls how fast the samples are obtained) and $\sigma$ (which interpolates between the deterministic DDIM and the stochastic DDPM).
|
| 176 |
+
|
| 177 |
+
We consider different sub-sequences $\tau$ of $[ 1 , \ldots , T ]$ and different variance hyperparameters $\sigma$ indexed by elements of $\tau$ . To simplify comparisons, we consider $\sigma$ with the form:
|
| 178 |
+
|
| 179 |
+
$$
|
| 180 |
+
\sigma _ { \tau _ { i } } ( \eta ) = \eta \sqrt { ( 1 - \alpha _ { \tau _ { i - 1 } } ) / ( 1 - \alpha _ { \tau _ { i } } ) } \sqrt { 1 - \alpha _ { \tau _ { i } } / \alpha _ { \tau _ { i - 1 } } } ,
|
| 181 |
+
$$
|
| 182 |
+
|
| 183 |
+
where $\eta \in \mathbb { R } _ { \geq 0 }$ is a hyperparameter that we can directly control. This includes an original DDPM generative process when $\eta = 1$ and DDIM when $\eta = 0$ . We also consider DDPM where the random noise has a larger standard deviation than $\sigma ( 1 )$ , which we denote as $\hat { \sigma }$ : $\hat { \sigma } _ { \tau _ { i } } = \sqrt { 1 - \alpha _ { \tau _ { i } } / \alpha _ { \tau _ { i - 1 } } }$ . This is used by the implementation in Ho et al. (2020) only to obtain the CIFAR10 samples, but not samples of the other datasets. We include more details in Appendix D.
|
| 184 |
+
|
| 185 |
+
# 5.1 SAMPLE QUALITY AND EFFICIENCY
|
| 186 |
+
|
| 187 |
+
In Table 1, we report the quality of the generated samples with models trained on CIFAR10 and CelebA, as measured by Frechet Inception Distance (FID (Heusel et al., 2017)), where we vary the number of timesteps used to generate a sample $( \dim ( \tau ) )$ and the stochasticity of the process $( \eta )$ . As expected, the sample quality becomes higher as we increase $\dim ( \tau )$ , presenting a tradeoff between sample quality and computational costs. We observe that DDIM $( \eta = 0$ ) achieves the best sample quality when $\dim ( \tau )$ is small, and DDPM ${ \mathfrak { \eta } } = 1$ and $\hat { \sigma }$ ) typically has worse sample quality compared to its less stochastic counterparts with the same $\dim ( \tau )$ , except for the case for $\bar { \mathrm { d i m } } \dot { ( \tau ) } = 1 \bar { 0 } 0 0$ and $\hat { \sigma }$ reported by Ho et al. (2020) where DDIM is marginally worse. However, the sample quality of $\hat { \sigma }$ becomes much worse for smaller $\dim ( \tau )$ , which suggests that it is ill-suited for shorter trajectories. DDIM, on the other hand, achieves high sample quality much more consistently.
|
| 188 |
+
|
| 189 |
+
In Figure 3, we show CIFAR10 and CelebA samples with the same number of sampling steps and varying $\sigma$ . For the DDPM, the sample quality deteriorates rapidly when the sampling trajectory has
|
| 190 |
+
|
| 191 |
+
Table 1: CIFAR10 and CelebA image generation measured in FID. $\eta = 1 . 0$ and $\hat { \sigma }$ are cases of DDPM (although Ho et al. (2020) only considered $T = 1 0 0 0$ steps, and $S < T$ can be seen as simulating DDPMs trained with $S$ steps), and $\eta = 0 . 0$ indicates DDIM.
|
| 192 |
+
|
| 193 |
+
<table><tr><td></td><td></td><td colspan="4">CIFAR10 (32× 32)</td><td colspan="5">CelebA (64× 64)</td></tr><tr><td>S</td><td>10</td><td>20</td><td>50</td><td>100</td><td>1000</td><td>10</td><td>20</td><td>50</td><td>100</td><td>1000</td></tr><tr><td>0.0</td><td>13.36</td><td>6.84</td><td> 4.67</td><td> 4.16</td><td>4.04</td><td>17.33</td><td>13.73</td><td>9.17</td><td>6.53</td><td>3.51</td></tr><tr><td>0.2</td><td>14.04</td><td>7.11</td><td>4.77</td><td>4.25</td><td>4.09</td><td>17.66</td><td>14.11</td><td>9.51</td><td>6.79</td><td>3.64</td></tr><tr><td>n 0.5</td><td>16.66</td><td>8.35</td><td>5.25</td><td>4.46</td><td>4.29</td><td>19.86</td><td>16.06</td><td>11.01</td><td>8.09</td><td>4.28</td></tr><tr><td>1.0</td><td>41.07</td><td>18.36</td><td>8.01</td><td>5.78</td><td>4.73</td><td>33.12</td><td>26.03</td><td>18.48</td><td>13.93</td><td>5.98</td></tr><tr><td>6</td><td>367.43</td><td>133.37</td><td>32.72</td><td>9.99</td><td>3.17</td><td>299.71</td><td>183.83</td><td>71.71</td><td>45.20</td><td>3.26</td></tr></table>
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 3: CIFAR10 and CelebA samples with $\dim ( \tau ) = 1 0$ and $\dim ( \tau ) = 1 0 0$ .
|
| 197 |
+
|
| 198 |
+
10 steps. For the case of $\hat { \sigma }$ , the generated images seem to have more noisy perturbations under short trajectories; this explains why the FID scores are much worse than other methods, as FID is very sensitive to such perturbations (as discussed in Jolicoeur-Martineau et al. (2020)).
|
| 199 |
+
|
| 200 |
+
In Figure 4, we show that the amount of time needed to produce a sample scales linearly with the length of the sample trajectory. This suggests that DDIM is useful for producing samples more efficiently, as samples can be generated in much fewer steps. Notably, DDIM is able to produce samples with quality comparable to 1000 step models within 20 to 100 steps, which is a $1 0 \times$ to $5 0 \times$ speed up compared to the original DDPM. Even though DDPM could also achieve reasonable sample quality with $1 0 0 \times$ steps, DDIM requires much fewer steps to achieve this; on CelebA, the FID score of the 100 step DDPM is similar to that of the 20 step DDIM.
|
| 201 |
+
|
| 202 |
+
# 5.2 SAMPLE CONSISTENCY IN DDIMS
|
| 203 |
+
|
| 204 |
+
For DDIM, the generative process is deterministic, and $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ would depend only on the initial state $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ . In Figure 5, we observe the generated images under different generative trajectories (i.e. different $\tau$ ) while starting with the same initial $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ . Interestingly, for the generated images with the same initial $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ , most high-level features are similar, regardless of the generative trajectory. In many cases, samples generated with only 20 steps are already very similar to ones generated with 1000 steps in terms of high-level features, with only minor differences in details. Therefore, it would appear that $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ alone would be an informative latent encoding of the image; and minor details that affects sample quality are encoded in the parameters, as longer sample trajectories gives better quality samples but do not significantly affect the high-level features. We show more samples in Appendix D.4.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 4: Hours to sample $5 0 \mathrm { k }$ images with one Nvidia 2080 Ti GPU and samples at different steps.
|
| 208 |
+
|
| 209 |
+

|
| 210 |
+
Figure 5: Samples from DDIM with the same random $\mathbfit { \mathbf { x } } _ { T }$ and different number of steps.
|
| 211 |
+
|
| 212 |
+
# 5.3 INTERPOLATION IN DETERMINISTIC GENERATIVE PROCESSES
|
| 213 |
+
|
| 214 |
+

|
| 215 |
+
Figure 6: Interpolation of samples from DDIM with $\dim ( \tau ) = 5 0$ .
|
| 216 |
+
|
| 217 |
+
Since the high level features of the DDIM sample is encoded by $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ , we are interested to see whether it would exhibit the semantic interpolation effect similar to that observed in other implicit probabilistic models, such as GANs (Goodfellow et al., 2014). This is different from the interpolation procedure in Ho et al. (2020), since in DDPM the same $\mathbfit { \mathbf { x } } _ { T }$ would lead to highly diverse $\scriptstyle { \pmb x } _ { 0 }$ due to the stochastic generative process6. In Figure 6, we show that simple interpolations in $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ can lead to semantically meaningful interpolations between two samples. We include more details and samples in Appendix D.5. This allows DDIM to control the generated images on a high level directly through the latent variables, which DDPMs cannot.
|
| 218 |
+
|
| 219 |
+
# 5.4 RECONSTRUCTION FROM LATENT SPACE
|
| 220 |
+
|
| 221 |
+
As DDIM is the Euler integration for a particular ODE, it would be interesting to see whether it can encode from $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ to $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ (reverse of Eq. (14)) and reconstruct $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ from the resulting $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } \mathcal { T } }$ (forward of Eq. (14))7. We consider encoding and decoding on the CIFAR-10 test set with the CIFAR-10 model with $S$ steps for both encoding and decoding; we report the per-dimension mean squared error (scaled to $[ 0 , 1 ] )$ in Table 2. Our results show that DDIMs have lower reconstruction error for larger $S$ values and have properties similar to Neural ODEs and normalizing flows. The same cannot be said for DDPMs due to their stochastic nature.
|
| 222 |
+
|
| 223 |
+
Table 2: Reconstruction error with DDIM on CIFAR-10 test set, rounded to $1 0 ^ { - 4 }$ .
|
| 224 |
+
|
| 225 |
+
<table><tr><td>S</td><td>10</td><td>20</td><td>50</td><td>100</td><td>200</td><td>500</td><td>1000</td></tr><tr><td>Error</td><td>0.014</td><td>0.0065</td><td>0.0023</td><td>0.0009</td><td>0.0004</td><td>0.0001</td><td>0.0001</td></tr></table>
|
| 226 |
+
|
| 227 |
+
# 6 RELATED WORK
|
| 228 |
+
|
| 229 |
+
Our work is based on a large family of existing methods on learning generative models as transition operators of Markov chains (Sohl-Dickstein et al., 2015; Bengio et al., 2014; Salimans et al., 2014; Song et al., 2017; Goyal et al., 2017; Levy et al., 2017). Among them, denoising diffusion probabilistic models (DDPMs, Ho et al. (2020)) and noise conditional score networks (NCSN, Song & Ermon (2019; 2020)) have recently achieved high sample quality comparable to GANs (Brock et al., 2018; Karras et al., 2018). DDPMs optimize a variational lower bound to the log-likelihood, whereas NCSNs optimize the score matching objective (Hyvarinen ¨ , 2005) over a nonparametric Parzen density estimator of the data (Vincent, 2011; Raphan & Simoncelli, 2011).
|
| 230 |
+
|
| 231 |
+
Despite their different motivations, DDPMs and NCSNs are closely related. Both use a denoising autoencoder objective for many noise levels, and both use a procedure similar to Langevin dynamics to produce samples (Neal et al., 2011). Since Langevin dynamics is a discretization of a gradient flow (Jordan et al., 1998), both DDPM and NCSN require many steps to achieve good sample quality. This aligns with the observation that DDPM and existing NCSN methods have trouble generating high-quality samples in a few iterations.
|
| 232 |
+
|
| 233 |
+
DDIM, on the other hand, is an implicit generative model (Mohamed & Lakshminarayanan, 2016) where samples are uniquely determined from the latent variables. Hence, DDIM has certain properties that resemble GANs (Goodfellow et al., 2014) and invertible flows (Dinh et al., 2016), such as the ability to produce semantically meaningful interpolations. We derive DDIM from a purely variational perspective, where the restrictions of Langevin dynamics are not relevant; this could partially explain why we are able to observe superior sample quality compared to DDPM under fewer iterations. The sampling procedure of DDIM is also reminiscent of neural networks with continuous depth (Chen et al., 2018; Grathwohl et al., 2018), since the samples it produces from the same latent variable have similar high-level visual features, regardless of the specific sample trajectory.
|
| 234 |
+
|
| 235 |
+
# 7 DISCUSSION
|
| 236 |
+
|
| 237 |
+
We have presented DDIMs – an implicit generative model trained with denoising auto-encoding / score matching objectives – from a purely variational perspective. DDIM is able to generate highquality samples much more efficiently than existing DDPMs and NCSNs, with the ability to perform meaningful interpolations from the latent space. The non-Markovian forward process presented here seems to suggest continuous forward processes other than Gaussian (which cannot be done in the original diffusion framework, since Gaussian is the only stable distribution with finite variance). We also demonstrated a discrete case with a multinomial forward process in Appendix A, and it would be interesting to investigate similar alternatives for other combinatorial structures.
|
| 238 |
+
|
| 239 |
+
Moreover, since the sampling procedure of DDIMs is similar to that of an neural ODE, it would be interesting to see if methods that decrease the discretization error in ODEs, including multistep methods such as Adams-Bashforth (Butcher & Goodwin, 2008), could be helpful for further improving sample quality in fewer steps (Queiruga et al., 2020). It is also relevant to investigate whether DDIMs exhibit other properties of existing implicit models (Bau et al., 2019).
|
| 240 |
+
|
| 241 |
+
# REFERENCES
|
| 242 |
+
|
| 243 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein GAN. ´ arXiv preprint arXiv:1701.07875, January 2017.
|
| 244 |
+
|
| 245 |
+
David Bau, Jun-Yan Zhu, Jonas Wulff, William Peebles, Hendrik Strobelt, Bolei Zhou, and Antonio Torralba. Seeing what a gan cannot generate. In Proceedings of the IEEE International Conference on Computer Vision, pp. 4502–4511, 2019.
|
| 246 |
+
|
| 247 |
+
Yoshua Bengio, Eric Laufer, Guillaume Alain, and Jason Yosinski. Deep generative stochastic networks trainable by backprop. In International Conference on Machine Learning, pp. 226–234, January 2014.
|
| 248 |
+
|
| 249 |
+
Christopher M Bishop. Pattern recognition and machine learning. springer, 2006.
|
| 250 |
+
|
| 251 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, September 2018.
|
| 252 |
+
|
| 253 |
+
John Charles Butcher and Nicolette Goodwin. Numerical methods for ordinary differential equations, volume 2. Wiley Online Library, 2008.
|
| 254 |
+
|
| 255 |
+
Nanxin Chen, Yu Zhang, Heiga Zen, Ron J Weiss, Mohammad Norouzi, and William Chan. WaveGrad: Estimating gradients for waveform generation. arXiv preprint arXiv:2009.00713, September 2020.
|
| 256 |
+
|
| 257 |
+
Ricky T Q Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. arXiv preprint arXiv:1806.07366, June 2018.
|
| 258 |
+
|
| 259 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. arXiv preprint arXiv:1605.08803, May 2016.
|
| 260 |
+
|
| 261 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 262 |
+
|
| 263 |
+
Anirudh Goyal, Nan Rosemary Ke, Surya Ganguli, and Yoshua Bengio. Variational walkback: Learning a transition operator as a stochastic recurrent net. In Advances in Neural Information Processing Systems, pp. 4392–4402, 2017.
|
| 264 |
+
|
| 265 |
+
Will Grathwohl, Ricky T Q Chen, Jesse Bettencourt, Ilya Sutskever, and David Duvenaud. FFJORD: Free-form continuous dynamics for scalable reversible generative models. arXiv preprint arXiv:1810.01367, October 2018.
|
| 266 |
+
|
| 267 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pp. 5769–5779, 2017.
|
| 268 |
+
|
| 269 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs trained by a two Time-Scale update rule converge to a local nash equilibrium. arXiv preprint arXiv:1706.08500, June 2017.
|
| 270 |
+
|
| 271 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. arXiv preprint arXiv:2006.11239, June 2020.
|
| 272 |
+
|
| 273 |
+
Aapo Hyvarinen. Estimation of Non-Normalized statistical models by score matching. ¨ Journal of Machine Learning Researc h, 6:695–709, 2005.
|
| 274 |
+
|
| 275 |
+
Alexia Jolicoeur-Martineau, Remi Pich ´ e-Taillefer, R ´ emi Tachet des Combes, and Ioannis ´ Mitliagkas. Adversarial score matching and improved sampling for image generation. September 2020.
|
| 276 |
+
|
| 277 |
+
Richard Jordan, David Kinderlehrer, and Felix Otto. The variational formulation of the fokker– planck equation. SIAM journal on mathematical analysis, 29(1):1–17, 1998.
|
| 278 |
+
|
| 279 |
+
Tero Karras, Samuli Laine, and Timo Aila. A Style-Based generator architecture for generative adversarial networks. arXiv preprint arXiv:1812.04948, December 2018.
|
| 280 |
+
|
| 281 |
+
Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8110–8119, 2020.
|
| 282 |
+
|
| 283 |
+
Diederik $\mathrm { \bf P }$ Kingma and Max Welling. Auto-Encoding variational bayes. arXiv preprint arXiv:1312.6114v10, December 2013.
|
| 284 |
+
|
| 285 |
+
Daniel Levy, Matthew D Hoffman, and Jascha Sohl-Dickstein. Generalizing hamiltonian monte carlo with neural networks. arXiv preprint arXiv:1711.09268, 2017.
|
| 286 |
+
|
| 287 |
+
Shakir Mohamed and Balaji Lakshminarayanan. Learning in implicit generative models. arXiv preprint arXiv:1610.03483, October 2016.
|
| 288 |
+
|
| 289 |
+
Radford M Neal et al. Mcmc using hamiltonian dynamics. Handbook of markov chain monte carlo, 2(11):2, 2011.
|
| 290 |
+
|
| 291 |
+
Alejandro F Queiruga, N Benjamin Erichson, Dane Taylor, and Michael W Mahoney. Continuousin-depth neural networks. arXiv preprint arXiv:2008.02389, 2020.
|
| 292 |
+
|
| 293 |
+
Martin Raphan and Eero P Simoncelli. Least squares estimation without priors or supervision. Neural computation, 23(2):374–420, February 2011. ISSN 0899-7667, 1530-888X.
|
| 294 |
+
|
| 295 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, May 2015.
|
| 296 |
+
|
| 297 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014.
|
| 298 |
+
|
| 299 |
+
Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computerassisted intervention, pp. 234–241. Springer, 2015.
|
| 300 |
+
|
| 301 |
+
Tim Salimans, Diederik P Kingma, and Max Welling. Markov chain monte carlo and variational inference: Bridging the gap. arXiv preprint arXiv:1410.6460, October 2014.
|
| 302 |
+
|
| 303 |
+
Ken Shoemake. Animating rotation with quaternion curves. In Proceedings of the 12th annual conference on Computer graphics and interactive techniques, pp. 245–254, 1985.
|
| 304 |
+
|
| 305 |
+
Jascha Sohl-Dickstein, Eric A Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. arXiv preprint arXiv:1503.03585, March 2015.
|
| 306 |
+
|
| 307 |
+
Jiaming Song, Shengjia Zhao, and Stefano Ermon. A-nice-mc: Adversarial training for mcmc. arXiv preprint arXiv:1706.07561, June 2017.
|
| 308 |
+
|
| 309 |
+
Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. arXiv preprint arXiv:1907.05600, July 2019.
|
| 310 |
+
|
| 311 |
+
Yang Song and Stefano Ermon. Improved techniques for training Score-Based generative models. arXiv preprint arXiv:2006.09011, June 2020.
|
| 312 |
+
|
| 313 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. WaveNet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, September 2016a.
|
| 314 |
+
|
| 315 |
+
Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, January 2016b.
|
| 316 |
+
|
| 317 |
+
Pascal Vincent. A connection between score matching and denoising autoencoders. Neural computation, 23(7):1661–1674, 2011.
|
| 318 |
+
|
| 319 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, May 2016.
|
| 320 |
+
|
| 321 |
+
Shengjia Zhao, Hongyu Ren, Arianna Yuan, Jiaming Song, Noah Goodman, and Stefano Ermon. Bias and generalization in deep generative models: An empirical study. In Advances in Neural Information Processing Systems, pp. 10792–10801, 2018.
|
| 322 |
+
|
| 323 |
+
# A NON-MARKOVIAN FORWARD PROCESSES FOR A DISCRETE CASE
|
| 324 |
+
|
| 325 |
+
In this section, we describe a non-Markovian forward processes for discrete data and corresponding variational objectives. Since the focus of this paper is to accelerate reverse models corresponding to the Gaussian diffusion, we leave empirical evaluations as future work.
|
| 326 |
+
|
| 327 |
+
For a categorical observation $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ that is a one-hot vector with $K$ possible values, we define the forward process as follows. First, we have $q ( \pmb { x } _ { t } | \pmb { x } _ { 0 } )$ as the following categorical distribution:
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
q ( \pmb { x } _ { t } | \pmb { x } _ { 0 } ) = \mathrm { C a t } ( \alpha _ { t } \pmb { x } _ { 0 } + ( 1 - \alpha _ { t } ) \pmb { 1 } _ { K } )
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
where $\mathbf { 1 } _ { K } \in \mathbb { R } ^ { K }$ is a vector with all entries being $1 / K$ , and $\alpha _ { t }$ decreasing from $\alpha _ { 0 } = 1$ for $t = 0$ to $\alpha _ { T } = 0$ for $t = T$ . Then we define $q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } )$ as the following mixture distribution:
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) = \left\{ \begin{array} { l l } { \mathrm { C a t } ( \pmb { x } _ { t } ) } & { \mathrm { w i t h ~ p r o b a b i l i t y ~ } \sigma _ { t } } \\ { \mathrm { C a t } ( \pmb { x } _ { 0 } ) } & { \mathrm { w i t h ~ p r o b a b i l i t y ~ } ( \alpha _ { t - 1 } - \sigma _ { t } \alpha _ { t } ) } \\ { \mathrm { C a t } ( \mathbf { 1 } _ { K } ) } & { \mathrm { w i t h ~ p r o b a b i l i t y ~ } ( 1 - \alpha _ { t - 1 } ) - ( 1 - \alpha _ { t } ) \sigma _ { t } } \end{array} \right. ,
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
or equivalently:
|
| 340 |
+
|
| 341 |
+
$$
|
| 342 |
+
q ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } , { \pmb x } _ { 0 } ) = \mathrm { C a t } \left( \sigma _ { t } { \pmb x } _ { t } + ( \alpha _ { t - 1 } - \sigma _ { t } \alpha _ { t } ) { \pmb x } _ { 0 } + ( ( 1 - \alpha _ { t - 1 } ) - ( 1 - \alpha _ { t } ) \sigma _ { t } ) { \pmb 1 } _ { K } \right) ,
|
| 343 |
+
$$
|
| 344 |
+
|
| 345 |
+
which is consistent with how we have defined $q ( \pmb { x } _ { t } | \pmb { x } _ { 0 } )$ .
|
| 346 |
+
|
| 347 |
+
Similarly, we can define our reverse process $p _ { \theta } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ as:
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
p _ { \theta } ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } ) = \mathrm { C a t } \left( \sigma _ { t } { \pmb x } _ { t } + ( \alpha _ { t - 1 } - \sigma _ { t } \alpha _ { t } ) f _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } ) + ( ( 1 - \alpha _ { t - 1 } ) - ( 1 - \alpha _ { t } ) \sigma _ { t } ) { \pmb 1 } _ { K } \right) ,
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
where $f _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } )$ maps $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ to a $K$ -dimensional vector. As $( 1 - \alpha _ { t - 1 } ) - ( 1 - \alpha _ { t } ) \sigma _ { t } \to 0$ , the sampling process will become less stochastic, in the sense that it will either choose $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ or the predicted $\scriptstyle { \mathbf { { \vec { x } } } } _ { 0 }$ with high probability. The KL divergence
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
D _ { \mathrm { K L } } ( q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) | | p _ { \theta } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } ) )
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
is well-defined, and is simply the KL divergence between two categoricals. Therefore, the resulting variational objective function should be easy to optimize as well. Moreover, as KL divergence is convex, we have this upper bound (which is tight when the right hand side goes to zero):
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
D _ { \mathrm { K L } } ( q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) \| p _ { \theta } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } ) ) \leq ( \alpha _ { t - 1 } - \sigma _ { t } \alpha _ { t } ) D _ { \mathrm { K L } } ( \mathrm { C a t } ( \pmb { x } _ { 0 } ) \| \mathrm { C a t } ( f _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } ) ) ) .
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
The right hand side is simply a multi-class classification loss (up to constants), so we can arrive at similar arguments regarding how changes in $\sigma _ { t }$ do not affect the objective (up to re-weighting).
|
| 366 |
+
|
| 367 |
+
# B PROOFS
|
| 368 |
+
|
| 369 |
+
Lemma 1. For $q _ { \sigma } ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } )$ defined in Eq. (6) and $q _ { \sigma } ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } , { \pmb x } _ { 0 } )$ defined in Eq. (7), we have:
|
| 370 |
+
|
| 371 |
+
$$
|
| 372 |
+
q _ { \sigma } ( \mathbf { x } _ { t } | \mathbf { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t } } \mathbf { x } _ { 0 } , \sqrt { 1 - \alpha _ { t } } \pmb { I } )
|
| 373 |
+
$$
|
| 374 |
+
|
| 375 |
+
Proof. Assume for any $t \leq T$ , $q _ { \sigma } ( \mathbf { x } _ { t } | \mathbf { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t } } \mathbf { x } _ { 0 } , \sqrt { 1 - \alpha _ { t } } \pmb { I } )$ holds, if:
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t - 1 } } \pmb { x } _ { 0 } , \sqrt { 1 - \alpha _ { t - 1 } } \pmb { I } )
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
then we can prove the statement with an induction argument for $t$ from $T$ to 1, since the base case $t = T ,$ ) already holds.
|
| 382 |
+
|
| 383 |
+
First, we have that
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { 0 } ) : = \int _ { \pmb { x } _ { t } } q _ { \sigma } ( \pmb { x } _ { t } | \pmb { x } _ { 0 } ) q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) \mathrm { d } \pmb { x } _ { t }
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
and
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\begin{array} { c } { q _ { \sigma } ( { \pmb x } _ { t } | { \pmb x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t } } { \pmb x } _ { 0 } , ( 1 - \alpha _ { t } ) { \pmb I } ) } \\ { q _ { \sigma } ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } , { \pmb x } _ { 0 } ) = \mathcal { N } \left( \sqrt { \alpha _ { t - 1 } } { \pmb x } _ { 0 } + \sqrt { 1 - \alpha _ { t - 1 } - \sigma _ { t } ^ { 2 } } \cdot \frac { { \pmb x } _ { t } - \sqrt { \alpha _ { t } } { \pmb x } _ { 0 } } { \sqrt { 1 - \alpha _ { t } } } , \sigma _ { t } ^ { 2 } { \pmb I } \right) . } \end{array}
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
From Bishop (2006) (2.115), we have that $\hat { q } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { 0 } )$ is Gaussian and
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\begin{array} { r l } & { \mathbb { E } [ q _ { \sigma } ( \pmb { x } _ { t - 1 } \vert \pmb { x } _ { 0 } ) ] = \sqrt { \alpha _ { t - 1 } } \pmb { x } _ { 0 } + \sqrt { 1 - \alpha _ { t - 1 } - \sigma _ { t } ^ { 2 } } \cdot \frac { \sqrt { \alpha _ { t } } \pmb { x } _ { 0 } - \sqrt { \alpha _ { t } } \pmb { x } _ { 0 } } { \sqrt { 1 - \alpha _ { t } } } } \\ & { \qquad = \sqrt { \alpha _ { t - 1 } } \pmb { x } _ { 0 } } \end{array}
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
and
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\mathrm { C o v } [ q _ { \sigma } ( x _ { t - 1 } | x _ { 0 } ) ] = \sigma _ { t } ^ { 2 } I + \frac { 1 - \alpha _ { t - 1 } - \sigma _ { t } ^ { 2 } } { 1 - \alpha _ { t } } ( 1 - \alpha _ { t } ) I = ( 1 - \alpha _ { t - 1 } ) I
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Therefore, $q _ { \sigma } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t - 1 } } \pmb { x } _ { 0 } , \sqrt { 1 - \alpha _ { t - 1 } } \pmb { I } )$ , which allows us to apply the induction argument.
|
| 408 |
+
|
| 409 |
+
Theorem 1. For all $\sigma > 0$ , there exists $\gamma \in \mathbb { R } _ { > 0 } ^ { T }$ and $C \in \mathbb { R } ,$ , such that $J _ { \sigma } = L _ { \gamma } + C$ .
|
| 410 |
+
|
| 411 |
+
Proof. From the definition of $J _ { \sigma }$ :
|
| 412 |
+
|
| 413 |
+
$$
|
| 414 |
+
\begin{array} { r } { J _ { \sigma } ( \epsilon _ { \theta } ) : = \mathbb { E } _ { \boldsymbol { x } _ { 0 : T } \sim q ( \boldsymbol { x } _ { 0 : T } ) } \left[ q _ { \sigma } ( \boldsymbol { x } _ { T } | \boldsymbol { x } _ { 0 } ) + \displaystyle \sum _ { t = 2 } ^ { T } \log q _ { \sigma } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } , \boldsymbol { x } _ { 0 } ) - \displaystyle \sum _ { t = 1 } ^ { T } \log p _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } ) \right] } \\ { \equiv \mathbb { E } _ { \boldsymbol { x } _ { 0 : T } \sim q ( \boldsymbol { x } _ { 0 : T } ) } \left[ \displaystyle \sum _ { t = 2 } ^ { T } D _ { \mathrm { K L } } ( q _ { \theta } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } , \boldsymbol { x } _ { 0 } ) ) \| p _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } ) ) - \log p _ { \theta } ^ { ( 1 ) } ( \boldsymbol { x } _ { 0 } | \boldsymbol { x } _ { 1 } ) \right] } \end{array}
|
| 415 |
+
$$
|
| 416 |
+
|
| 417 |
+
where we use $\equiv$ to denote “equal up to a value that does not depend on $\epsilon _ { \theta }$ (but may depend on $q _ { \sigma }$ )”. For $t > 1$ :
|
| 418 |
+
|
| 419 |
+
$$
|
| 420 |
+
\begin{array} { r l } & { \mathbb { E } _ { \mathbf { x } _ { 0 } , \mathbf { x } \sim \mathbf { q } ( \mathbf { x } _ { 0 } , \mathbf { x } _ { t } ) } [ D _ { \mathbf { K L } } ( \boldsymbol { q } _ { \sigma } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } , \mathbf { x } _ { 0 } ) ) | | \boldsymbol { p } _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } ) ] ] } \\ & { = \mathbb { E } _ { \boldsymbol { \omega } _ { 0 } , \boldsymbol { x } \sim \boldsymbol { q } ( \mathbf { x } _ { 0 } , \mathbf { x } _ { t } ) } [ D _ { \mathbf { K L } } ( \boldsymbol { q } _ { \sigma } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } , \boldsymbol { x } _ { 0 } ) ) | | \boldsymbol { q } _ { \sigma } ( \boldsymbol { x } _ { t - 1 } | \boldsymbol { x } _ { t } , \boldsymbol { f } _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { t } ) ) ) ] } \\ & { = \mathbb { E } _ { \boldsymbol { \omega } _ { 0 } , \mathbf { x } \sim \boldsymbol { q } ( \mathbf { x } _ { 0 } , \mathbf { x } _ { t } ) } \left[ \frac { \| \boldsymbol { x } _ { 0 } - \boldsymbol { f } _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { t } ) \| _ { 2 } ^ { 2 } } { 2 \sigma _ { t } ^ { 2 } } \right] } \\ & { = \mathbb { E } _ { \boldsymbol { \omega } _ { 0 } , \boldsymbol { x } \sim \boldsymbol { q } ( \mathbf { x } _ { 0 } ) , \boldsymbol { \epsilon } \sim \mathcal { N } ( \mathbf { 0 } , \boldsymbol { I } ) , \boldsymbol { x } _ { t } = \sqrt { \alpha _ { t } } \sigma _ { t } + \sqrt { 1 - \alpha _ { t } } \epsilon } \left[ \frac { \| ( \boldsymbol { x } _ { t } - \boldsymbol { \epsilon } ) / \sqrt { \alpha _ { t } } - ( \boldsymbol { x } _ { t } - \boldsymbol { \epsilon } _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { t } ) ) / \sqrt { \alpha _ { t } } \| _ { 2 } ^ { 2 } } { 2 \sigma _ { t } ^ { 2 } } \right] } \\ & = \mathbb { E } _ \boldsymbol { \omega } _ { 0 } \sim \boldsymbol { q } ( \mathbf { x } _ { 0 } ) , \boldsymbol { \epsilon } \sim \mathcal { N } ( \mathbf { 0 } , \boldsymbol { I } ) , \boldsymbol { x } \end{array}
|
| 421 |
+
$$
|
| 422 |
+
|
| 423 |
+
where $d$ is the dimension of $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ . For $t = 0$ :
|
| 424 |
+
|
| 425 |
+
$$
|
| 426 |
+
\begin{array} { r l } & { \mathbb { E } _ { \mathbf { x } _ { 0 } , \mathbf { x } _ { 1 } \sim q ( \pmb { x } _ { 0 } , \pmb { x } _ { 1 } ) } \left[ - \log p _ { \theta } ^ { ( 1 ) } ( \pmb { x } _ { 0 } | \pmb { x } _ { 1 } ) \right] \equiv \mathbb { E } _ { \mathbf { x } _ { 0 } , \mathbf { x } _ { 1 } \sim q ( \pmb { x } _ { 0 } , \pmb { x } _ { 1 } ) } \left[ \frac { \left\| \pmb { x } _ { 0 } - f _ { \theta } ^ { ( t ) } ( \pmb { x } _ { 1 } ) \right\| _ { 2 } ^ { 2 } } { 2 \sigma _ { 1 } ^ { 2 } } \right] } \\ & { = \mathbb { E } _ { \mathbf { x } _ { 0 } \sim q ( \pmb { x } _ { 0 } ) , \epsilon \sim \mathcal { N } ( \mathbf { 0 } , I ) , \pmb { x } _ { 1 } = \sqrt { \alpha _ { 1 } } \pmb { x } _ { 0 } + \sqrt { 1 - \alpha _ { t } } \epsilon } \left[ \frac { \left\| \epsilon - \epsilon _ { \theta } ^ { ( 1 ) } ( \pmb { x } _ { 1 } ) \right\| _ { 2 } ^ { 2 } } { 2 d \sigma _ { 1 } ^ { 2 } \alpha _ { 1 } } \right] } \end{array}
|
| 427 |
+
$$
|
| 428 |
+
|
| 429 |
+
Therefore, when $\gamma _ { t } = 1 / ( 2 d \sigma _ { t } ^ { 2 } \alpha _ { t } )$ for all $t \in \{ 1 , \ldots , T \}$ , we have
|
| 430 |
+
|
| 431 |
+
$$
|
| 432 |
+
J _ { \sigma } ( \epsilon _ { \theta } ) \equiv \sum _ { t = 1 } ^ { T } \frac { 1 } { 2 d \sigma _ { t } ^ { 2 } \alpha _ { t } } \mathbb { E } \left[ \big \lVert \epsilon _ { \theta } ^ { ( t ) } ( { \pmb x } _ { t } ) - \epsilon _ { t } \big \rVert _ { 2 } ^ { 2 } \right] = L _ { \gamma } ( \epsilon _ { \theta } )
|
| 433 |
+
$$
|
| 434 |
+
|
| 435 |
+
for all $\epsilon _ { \theta }$ . From the definition of “≡”, we have that $J _ { \sigma } = L _ { \gamma } + C$ .
|
| 436 |
+
|
| 437 |
+
# C ADDITIONAL DERIVATIONS
|
| 438 |
+
|
| 439 |
+
# C.1 ACCELERATED SAMPLING PROCESSES
|
| 440 |
+
|
| 441 |
+
In the accelerated case, we can consider the inference process to be factored as:
|
| 442 |
+
|
| 443 |
+
$$
|
| 444 |
+
q _ { \sigma , \tau } ( \pmb { x } _ { 1 : T } | \pmb { x } _ { 0 } ) = q _ { \sigma , \tau } ( \pmb { x } _ { \tau _ { S } } | \pmb { x } _ { 0 } ) \prod _ { i = 1 } ^ { S } q _ { \sigma , \tau } ( \pmb { x } _ { \tau _ { i - 1 } } | \pmb { x } _ { \tau _ { i } } , \pmb { x } _ { 0 } ) \prod _ { t \in \bar { \tau } } q _ { \sigma , \tau } ( \pmb { x } _ { t } | \pmb { x } _ { 0 } )
|
| 445 |
+
$$
|
| 446 |
+
|
| 447 |
+
where $\tau$ is a sub-sequence of $[ 1 , \ldots , T ]$ of length $S$ with $\tau _ { S } = T$ , and let $\bar { \tau } : = \{ 1 , . . . , T \} \setminus \tau$ be its complement. Intuitively, the graphical model of $\{ \pmb { x } _ { \tau _ { i } } \} _ { i = 1 } ^ { S }$ and $\scriptstyle { \pmb x } _ { 0 }$ form a chain, whereas the graphical model of $\{ \pmb { x } _ { t } \} _ { t \in \bar { \tau } }$ and $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ forms a star graph. We define:
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
\begin{array} { r l } & { q _ { \sigma , \tau } ( { \boldsymbol x } _ { t } | { \boldsymbol x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { t } } { \boldsymbol x } _ { 0 } , ( 1 - \alpha _ { t } ) { \boldsymbol I } ) \quad \forall t \in \bar { \tau } \cup \{ { \boldsymbol T } \} } \\ & { q _ { \sigma , \tau } ( { \boldsymbol x } _ { \tau _ { i - 1 } } | { \boldsymbol x } _ { \tau _ { i } } , { \boldsymbol x } _ { 0 } ) = \mathcal { N } \left( \sqrt { \alpha _ { \tau _ { i - 1 } } } { \boldsymbol x } _ { 0 } + \sqrt { 1 - \alpha _ { \tau _ { i - 1 } } - \sigma _ { \tau _ { i } } ^ { 2 } } \cdot \frac { { \boldsymbol x } _ { \tau _ { i } } - \sqrt { \alpha _ { \tau _ { i } } } { \boldsymbol x } _ { 0 } } { \sqrt { 1 - \alpha _ { \tau _ { i } } } } , \sigma _ { \tau _ { i } } ^ { 2 } { \boldsymbol I } \right) \forall i \in [ S ] } \end{array}
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
where the coefficients are chosen such that:
|
| 454 |
+
|
| 455 |
+
$$
|
| 456 |
+
q _ { \sigma , \tau } ( \pmb { x } _ { \tau _ { i } } | \pmb { x } _ { 0 } ) = \mathcal { N } ( \sqrt { \alpha _ { \tau _ { i } } } \pmb { x } _ { 0 } , ( 1 - \alpha _ { \tau _ { i } } ) \pmb { I } ) \quad \forall i \in [ S ]
|
| 457 |
+
$$
|
| 458 |
+
|
| 459 |
+
i.e., the “marginals” match.
|
| 460 |
+
|
| 461 |
+
The corresponding “generative process” is defined as:
|
| 462 |
+
|
| 463 |
+
$$
|
| 464 |
+
p _ { \theta } ( \pmb { x } _ { 0 : T } ) : = \underbrace { p _ { \theta } ( \pmb { x } _ { T } ) \prod _ { i = 1 } ^ { S } p _ { \theta } ^ { ( \tau _ { i } ) } ( \pmb { x } _ { \tau _ { i - 1 } } | \pmb { x } _ { \tau _ { i } } ) } _ { \mathrm { u s e t o p r o d u c e ~ s a m p l e s } } \times \underbrace { \prod _ { t \in \bar { \tau } } p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { 0 } | \pmb { x } _ { t } ) } _ { \mathrm { i n ~ v a r i a t i o n a l ~ o b j e c t i v e } }
|
| 465 |
+
$$
|
| 466 |
+
|
| 467 |
+
where only part of the models are actually being used to produce samples. The conditionals are:
|
| 468 |
+
|
| 469 |
+
$$
|
| 470 |
+
\begin{array} { r l } & { p _ { \theta } ^ { ( \tau _ { i } ) } ( \pmb { x } _ { \tau _ { i - 1 } } | \pmb { x } _ { \tau _ { i } } ) = q _ { \sigma , \tau } ( \pmb { x } _ { \tau _ { i } } | \pmb { x } _ { \tau _ { i } } , f _ { \theta } ^ { ( \tau _ { i } ) } ( \pmb { x } _ { \tau _ { i - 1 } } ) ) \quad \mathrm { i f ~ } i \in [ S ] , i > 1 } \\ & { \qquad p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { 0 } | \pmb { x } _ { t } ) = \mathcal { N } ( f _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } ) , \sigma _ { t } ^ { 2 } I ) \quad \mathrm { o t h e r w i s e } , } \end{array}
|
| 471 |
+
$$
|
| 472 |
+
|
| 473 |
+
where we leverage $q _ { \sigma , \tau } ( \pmb { x } _ { \tau _ { i - 1 } } | \pmb { x } _ { \tau _ { i } } , \pmb { x } _ { 0 } )$ as part of the inference process (similar to what we have done in Section 3). The resulting variational objective becomes (define $\pmb { x } _ { \tau _ { L + 1 } } = \emptyset$ for conciseness):
|
| 474 |
+
|
| 475 |
+
$$
|
| 476 |
+
\begin{array} { r l } & { J ( \epsilon _ { \theta } ) = \mathbb { E } _ { \boldsymbol { x } _ { 0 : T } \sim q _ { \sigma , \tau } ( \boldsymbol { x } _ { 0 : T } ) } [ \log q _ { \sigma , \tau } ( \boldsymbol { x } _ { 1 : T } | \boldsymbol { x } _ { 0 } ) - \log p _ { \theta } ( \boldsymbol { x } _ { 0 : T } ) ] } \\ & { \quad \quad \quad = \mathbb { E } _ { \boldsymbol { x } _ { 0 : T } \sim q _ { \sigma , \tau } ( \boldsymbol { x } _ { 0 : T } ) } \Bigg [ \underset { t \in \overline { { \tau } } } { \sum } D _ { \mathrm { K L } } ( q _ { \sigma , \tau } ( \boldsymbol { x } _ { t } | \boldsymbol { x } _ { 0 } ) \| p _ { \theta } ^ { ( t ) } ( \boldsymbol { x } _ { 0 } | \boldsymbol { x } _ { t } ) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad + \underset { i = 1 } { \overset { L } { \sum } } D _ { \mathrm { K L } } ( q _ { \sigma , \tau } ( \boldsymbol { x } _ { \tau _ { i - 1 } } | \boldsymbol { x } _ { \tau _ { i } } , \boldsymbol { x } _ { 0 } ) \| p _ { \theta } ^ { ( \tau _ { i } ) } ( \boldsymbol { x } _ { \tau _ { i - 1 } } | \boldsymbol { x } _ { \tau _ { i } } ) ) ) \Bigg ] } \end{array}
|
| 477 |
+
$$
|
| 478 |
+
|
| 479 |
+
where each KL divergence is between two Gaussians with variance independent of $\theta$ . A similar argument to the proof used in Theorem 1 can show that the variational objective $J$ can also be converted to an objective of the form $L _ { \gamma }$ .
|
| 480 |
+
|
| 481 |
+
# C.2 DERIVATION OF DENOISING OBJECTIVES FOR DDPMS
|
| 482 |
+
|
| 483 |
+
We note that in Ho et al. (2020), a diffusion hyperparameter $\beta _ { t } { } ^ { 8 }$ is first introduced, and then relevant variables $\alpha _ { t } : = 1 - \beta _ { t }$ and $\begin{array} { r } { \bar { \alpha } _ { t } = \prod _ { t = 1 } ^ { T } \alpha _ { t } } \end{array}$ are defined. In this paper, we have used the notation $\alpha _ { t }$ to represent the variable $\bar { \alpha } _ { t }$ in Ho et al. (2020) for three reasons. First, it makes it more clear that we only need to choose one set of hyperparameters, reducing possible cross-references of the derived variables. Second, it allows us to introduce the generalization as well as the acceleration case easier, because the inference process is no longer motivated by a diffusion. Third, there exists an isomorphism between $\alpha _ { 1 : T }$ and $1 , \ldots , T$ , which is not the case for $\beta _ { t }$ .
|
| 484 |
+
|
| 485 |
+
In this section, we use $\beta _ { t }$ and $\alpha _ { t }$ to be more consistent with the derivation in Ho et al. (2020), where
|
| 486 |
+
|
| 487 |
+
$$
|
| 488 |
+
\begin{array} { c } { \displaystyle \alpha _ { t } = \frac { \alpha _ { t } } { \alpha _ { t - 1 } } } \\ { \displaystyle \beta _ { t } = 1 - \frac { \alpha _ { t } } { \alpha _ { t - 1 } } } \end{array}
|
| 489 |
+
$$
|
| 490 |
+
|
| 491 |
+
can be uniquely determined from $\alpha _ { t }$ (i.e. $\bar { \alpha } _ { t }$ ).
|
| 492 |
+
|
| 493 |
+
First, from the diffusion forward process:
|
| 494 |
+
|
| 495 |
+
$$
|
| 496 |
+
q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) = \mathcal { N } \bigg ( \underbrace { \frac { \sqrt { \alpha _ { t - 1 } } \beta _ { t } } { 1 - \alpha _ { t } } \pmb { x } _ { 0 } + \frac { \alpha _ { t } ( 1 - \alpha _ { t - 1 } ) } { 1 - \alpha _ { t } } \pmb { x } _ { t } } _ { \widetilde { \mu } ( \pmb { x } _ { t } , \pmb { x } _ { 0 } ) } , \frac { 1 - \alpha _ { t - 1 } } { 1 - \alpha _ { t } } \beta _ { t } I \bigg )
|
| 497 |
+
$$
|
| 498 |
+
|
| 499 |
+
Ho et al. (2020) considered a specific type of $p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ :
|
| 500 |
+
|
| 501 |
+
$$
|
| 502 |
+
p _ { \theta } ^ { ( t ) } ( { \bf x } _ { t - 1 } | { \bf x } _ { t } ) = \mathcal { N } \left( \mu _ { \theta } ( { \bf x } _ { t } , t ) , \sigma _ { t } { \cal I } \right)
|
| 503 |
+
$$
|
| 504 |
+
|
| 505 |
+
which leads to the following variational objective:
|
| 506 |
+
|
| 507 |
+
$$
|
| 508 |
+
\begin{array} { r l } & { L : = \mathbb { E } _ { \mathbf { x } _ { 0 : T } \sim q ( \mathbf { x } _ { 0 : T } ) } \left[ q ( \pmb { x } _ { T } | \mathbf { x } _ { 0 } ) + \displaystyle \sum _ { t = 2 } ^ { T } \log q ( \pmb { x } _ { t - 1 } | \mathbf { x } _ { t } , \pmb { x } _ { 0 } ) - \displaystyle \sum _ { t = 1 } ^ { T } \log p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t - 1 } | \mathbf { x } _ { t } ) \right] } \\ & { \equiv \mathbb { E } _ { \mathbf { x } _ { 0 : T } \sim q ( \pmb { x } _ { 0 : T } ) } \left[ \displaystyle \sum _ { t = 2 } ^ { T } \underbrace { D _ { \mathrm { K L } } \big ( q ( \pmb { x } _ { t - 1 } | \mathbf { x } _ { t } , \mathbf { x } _ { 0 } ) \big ) \big \| p _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t - 1 } | \mathbf { x } _ { t } ) \big ) } _ { L _ { t - 1 } } - \log p _ { \theta } ^ { ( 1 ) } ( \pmb { x } _ { 0 } | \mathbf { x } _ { 1 } ) \right] } \end{array}
|
| 509 |
+
$$
|
| 510 |
+
|
| 511 |
+
One can write:
|
| 512 |
+
|
| 513 |
+
$$
|
| 514 |
+
L _ { t - 1 } = \mathbb { E } _ { q } \left[ \frac { 1 } { 2 \sigma _ { t } ^ { 2 } } \lVert \mu _ { \theta } ( \pmb { x } _ { t } , t ) - \tilde { \mu } ( \pmb { x } _ { t } , \pmb { x } _ { 0 } ) \rVert _ { 2 } ^ { 2 } \right]
|
| 515 |
+
$$
|
| 516 |
+
|
| 517 |
+
Ho et al. (2020) chose the parametrization
|
| 518 |
+
|
| 519 |
+
$$
|
| 520 |
+
\mu _ { \theta } ( { \pmb x } _ { t } , t ) = \frac { 1 } { \sqrt { \alpha _ { t } } } \left( { \pmb x } _ { t } - \frac { \beta _ { t } } { \sqrt { 1 - \alpha _ { t } } } { \epsilon } _ { \theta } ( { \pmb x } _ { t } , t ) \right)
|
| 521 |
+
$$
|
| 522 |
+
|
| 523 |
+
which can be simplified to:
|
| 524 |
+
|
| 525 |
+
$$
|
| 526 |
+
L _ { t - 1 } = \mathbb { E } _ { { \pmb x } _ { 0 } , { \epsilon } } \left[ \frac { \beta _ { t } ^ { \ 2 } } { 2 \sigma _ { t } ^ { 2 } ( 1 - \alpha _ { t } ) \alpha _ { t } } \big \| { \epsilon } - { \epsilon } _ { \theta } \big ( \sqrt { \alpha _ { t } } { \pmb x } _ { 0 } + \sqrt { 1 - \alpha _ { t } } { \epsilon } , t \big ) \big \| _ { 2 } ^ { 2 } \right]
|
| 527 |
+
$$
|
| 528 |
+
|
| 529 |
+
# D EXPERIMENTAL DETAILS
|
| 530 |
+
|
| 531 |
+
# D.1 DATASETS AND ARCHITECTURES
|
| 532 |
+
|
| 533 |
+
We consider 4 image datasets with various resolutions: CIFAR10 $3 2 \times 3 2$ , unconditional), CelebA $( 6 4 \times 6 4 )$ , LSUN Bedroom $( 2 5 6 \times 2 5 6 )$ and LSUN Church $2 5 6 \times 2 5 6 )$ ). For all datasets, we set the hyperparameters $\alpha$ according to the heuristic in (Ho et al., 2020) to make the results directly comparable. We use the same model for each dataset, and only compare the performance of different generative processes. For CIFAR10, Bedroom and Church, we obtain the pretrained checkpoints from the original DDPM implementation; for CelebA, we trained our own model using the denoising objective $L _ { 1 }$ .
|
| 534 |
+
|
| 535 |
+
Our architecture for $\epsilon _ { \theta } ^ { ( t ) } ( \pmb { x } _ { t } )$ follows that in Ho et al. (2020), which is a U-Net (Ronneberger et al., 2015) based on a Wide ResNet (Zagoruyko & Komodakis, 2016). We use the pretrained models from Ho et al. (2020) for CIFAR10, Bedroom and Church, and train our own model for the CelebA $6 4 \times 6 4$ model (since a pretrained model is not provided). Our CelebA model has five feature map resolutions from $6 4 \times 6 4$ to $4 \times 4$ , and we use the original CelebA dataset (not CelebA-HQ) using the pre-processing technique from the StyleGAN (Karras et al., 2018) repository.
|
| 536 |
+
|
| 537 |
+
Table 3: LSUN Bedroom and Church image generation results, measured in FID. For 1000 steps DDPM, the FIDs are 6.36 for Bedroom and 7.89 for Church.
|
| 538 |
+
|
| 539 |
+
<table><tr><td></td><td colspan="4">Bedroom (256 × 256)</td><td colspan="4">Church (256 × 256)</td></tr><tr><td>dim(T)</td><td>10</td><td>20</td><td>50</td><td>100</td><td>10</td><td>20</td><td>50</td><td>100</td></tr><tr><td>DDIM (n = 0.0)</td><td>16.95</td><td>8.89</td><td>6.75</td><td>6.62</td><td>19.45</td><td>12.47</td><td>10.84</td><td>10.58</td></tr><tr><td>DDPM (n = 1.0)</td><td>42.78</td><td>22.77</td><td>10.81</td><td>6.81</td><td>51.56</td><td>23.37</td><td>11.16</td><td>8.27</td></tr></table>
|
| 540 |
+
|
| 541 |
+
# D.2 REVERSE PROCESS SUB-SEQUENCE SELECTION
|
| 542 |
+
|
| 543 |
+
We consider two types of selection procedure for $\tau$ given the desired $\mathrm { d i m } ( \tau ) < T$ :
|
| 544 |
+
|
| 545 |
+
• Linear: we select the timesteps such that $\tau _ { i } = \lfloor c i \rfloor$ for some $c$ ;
|
| 546 |
+
• Quadratic: we select the timesteps such that $\tau _ { i } = \lfloor c i ^ { 2 } \rfloor$ for some $c$ .
|
| 547 |
+
|
| 548 |
+
The constant value $c$ is selected such that $\tau _ { - 1 }$ is close to $T$ . We used quadratic for CIFAR10 and linear for the remaining datasets. These choices achieve slightly better FID than their alternatives in the respective datasets.
|
| 549 |
+
|
| 550 |
+
# D.3 CLOSED FORM EQUATIONS FOR EACH SAMPLING STEP
|
| 551 |
+
|
| 552 |
+
From the general sampling equation in Eq. (12), we have the following update equation:
|
| 553 |
+
|
| 554 |
+
$$
|
| 555 |
+
x _ { \tau _ { i - 1 } } ( \eta ) = \sqrt { \alpha _ { \tau _ { i - 1 } } } \left( \frac { x _ { \tau _ { i } } - \sqrt { 1 - \alpha _ { \tau _ { i } } } \epsilon _ { \theta } ^ { ( \tau _ { i } ) } ( x _ { \tau _ { i } } ) } { \sqrt { \alpha _ { \tau _ { i } } } } \right) + \sqrt { 1 - \alpha _ { \tau _ { i - 1 } } - \sigma _ { \tau _ { i } } ( \eta ) ^ { 2 } } \cdot \epsilon _ { \theta } ^ { ( \tau _ { i } ) } ( \tau _ { i } ) + \sigma _ { \tau _ { i } } ( \eta ) \epsilon _ { \eta }
|
| 556 |
+
$$
|
| 557 |
+
|
| 558 |
+
where
|
| 559 |
+
|
| 560 |
+
$$
|
| 561 |
+
\sigma _ { \tau _ { i } } ( \eta ) = \eta \sqrt { \frac { 1 - \alpha _ { \tau _ { i - 1 } } } { 1 - \alpha _ { \tau _ { i } } } } \sqrt { 1 - \frac { \alpha _ { \tau _ { i } } } { \alpha _ { \tau _ { i - 1 } } } }
|
| 562 |
+
$$
|
| 563 |
+
|
| 564 |
+
For the case of $\hat { \sigma }$ (DDPM with a larger variance), the update equation becomes:
|
| 565 |
+
|
| 566 |
+
$$
|
| 567 |
+
\begin{array} { r } { x _ { \tau _ { i - 1 } } = \sqrt { \alpha _ { \tau _ { i - 1 } } } \left( \frac { x _ { \tau _ { i } } - \sqrt { 1 - \alpha _ { \tau _ { i } } } \epsilon _ { \theta } ^ { ( \tau _ { i } ) } ( x _ { \tau _ { i } } ) } { \sqrt { \alpha _ { \tau _ { i } } } } \right) + \sqrt { 1 - \alpha _ { \tau _ { i - 1 } } - \sigma _ { \tau _ { i } } ( 1 ) ^ { 2 } } \cdot \epsilon _ { \theta } ^ { ( \tau _ { i } ) } ( \tau _ { i } ) + \hat { \sigma } _ { \tau _ { i } } \epsilon _ { \theta } ( \tau _ { i } ) } \end{array}
|
| 568 |
+
$$
|
| 569 |
+
|
| 570 |
+
which uses a different coefficient for $\epsilon$ compared with the update for $\eta = 1$ , but uses the same coefficient for the non-stochastic parts. This update is more stochastic than the update for $\eta = 1$ , which explains why it achieves worse performance when $\dim ( \tau )$ is small.
|
| 571 |
+
|
| 572 |
+
# D.4 SAMPLES AND CONSISTENCY
|
| 573 |
+
|
| 574 |
+
We show more samples in Figure 7 (CIFAR10), Figure 8 (CelebA), Figure 10 (Church) and consistency results of DDIM in Figure 9 (CelebA).
|
| 575 |
+
|
| 576 |
+
# D.5 INTERPOLATION
|
| 577 |
+
|
| 578 |
+
To generate interpolations on a line, we randomly sample two initial $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ values from the standard Gaussian, interpolate them with spherical linear interpolation (Shoemake, 1985), and then use the DDIM to obtain $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ samples.
|
| 579 |
+
|
| 580 |
+
$$
|
| 581 |
+
\mathbf { \Delta } \mathbf { x } _ { T } ^ { ( \alpha ) } = \frac { \sin ( ( 1 - \alpha ) \theta ) } { \sin ( \theta ) } \mathbf { \Delta } \mathbf { x } _ { T } ^ { ( 0 ) } + \frac { \sin ( \alpha \theta ) } { \sin ( \theta ) } \mathbf { x } _ { T } ^ { ( 1 ) }
|
| 582 |
+
$$
|
| 583 |
+
|
| 584 |
+
where $\begin{array} { r } { \theta = \operatorname { a r c c o s } { \left( \frac { ( \mathbf { x } _ { T } ^ { ( 0 ) } ) ^ { \top } \mathbf { x } _ { T } ^ { ( 1 ) } } { \| \mathbf { x } _ { T } ^ { ( 0 ) } \| \| \mathbf { x } _ { T } ^ { ( 1 ) } \| } \right) } } \end{array}$ . These values are used to produce DDIM samples.
|
| 585 |
+
|
| 586 |
+
To generate interpolations on a grid, we sample four latent variables and separate them in to two pairs; then we use slerp with the pairs under the same $\alpha$ , and use slerp over the interpolated samples across the pairs (under an independently chosen interpolation coefficient). We show more grid interpolation results in Figure 11 (CelebA), Figure 12 (Bedroom), and Figure 13 (Church).
|
| 587 |
+
|
| 588 |
+

|
| 589 |
+
Figure 7: CIFAR10 samples from 1000 step DDPM, 1000 step DDIM and 100 step DDIM.
|
| 590 |
+
|
| 591 |
+

|
| 592 |
+
Figure 8: CelebA samples from 1000 step DDPM, 1000 step DDIM and 100 step DDIM.
|
| 593 |
+
|
| 594 |
+

|
| 595 |
+
Figure 9: CelebA samples from DDIM with the same random $\mathbf { \nabla } _ { \mathbf { x } _ { T } }$ and different number of steps.
|
| 596 |
+
|
| 597 |
+

|
| 598 |
+
Figure 10: Church samples from 100 step DDPM and 100 step DDIM.
|
| 599 |
+
|
| 600 |
+

|
| 601 |
+
Figure 11: More interpolations from the CelebA DDIM with $\dim ( \tau ) = 5 0$ .
|
| 602 |
+
|
| 603 |
+

|
| 604 |
+
Figure 12: More interpolations from the Bedroom DDIM with $\dim ( \tau ) = 5 0$ .
|
| 605 |
+
|
| 606 |
+

|
| 607 |
+
Figure 13: More interpolations from the Church DDIM with $\dim ( \tau ) = 5 0$ .
|
parse/train/St1giarCHLP/St1giarCHLP_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/St1giarCHLP/St1giarCHLP_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/St1giarCHLP/St1giarCHLP_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/cO1IH43yUF/cO1IH43yUF.md
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# REVISITING FEW-SAMPLE BERT FINE-TUNING
|
| 2 |
+
|
| 3 |
+
Tianyi Zhang∗4§ Felix $\mathbf { W _ { u } } ^ { * \dagger }$ Arzoo Katiyar4✸ Kilian Q. Weinberger†‡ Yoav Artzi†‡ †ASAPP Inc. §Stanford University ✸Penn State University ‡Cornell University tz58@stanford.edu {fwu, kweinberger, yoav}@asapp.com arzoo@psu.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
This paper is a study of fine-tuning of BERT contextual representations, with focus on commonly observed instabilities in few-sample scenarios. We identify several factors that cause this instability: the common use of a non-standard optimization method with biased gradient estimation; the limited applicability of significant parts of the BERT network for down-stream tasks; and the prevalent practice of using a pre-determined, and small number of training iterations. We empirically test the impact of these factors, and identify alternative practices that resolve the commonly observed instability of the process. In light of these observations, we re-visit recently proposed methods to improve few-sample fine-tuning with BERT and re-evaluate their effectiveness. Generally, we observe the impact of these methods diminishes significantly with our modified process.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Fine-tuning self-supervised pre-trained models has significantly boosted state-of-the-art performance on natural language processing (NLP) tasks (Liu, 2019; Yang et al., 2019a; Wadden et al., 2019; Zhu et al., 2020; Guu et al., 2020). One of the most effective models for this process is BERT (Devlin et al., 2019). However, despite significant success, fine-tuning remains unstable, especially when using the large variant of BERT $\mathrm { ( B E R T _ { L a r g e } ) }$ ) on small datasets, where pre-training stands to provide the most significant benefit. Identical learning processes with different random seeds often result in significantly different and sometimes degenerate models following fine-tuning, even though only a few, seemingly insignificant aspects of the learning process are impacted by the random seed (Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020).1 As a result, practitioners resort to multiple random trials for model selection. This increases model deployment costs and time, and makes scientific comparison challenging (Dodge et al., 2020).
|
| 12 |
+
|
| 13 |
+
This paper is a study of different aspects of the few-sample fine-tuning optimization process. Our goal is to better understand the impact of common choices with regard to the optimization algorithm, model initialization, and the number of fine-tuning training iterations. We identify suboptimalities in common community practices: the use of a non-standard optimizer introduces bias in the gradient estimation; the top layers of the pre-trained BERT model provide a bad initialization point for finetuning; and the use of a pre-determined , but commonly adopted number of training iterations hurts convergence. We study these issues and their remedies through experiments on multiple common benchmarks, focusing on few-sample fine-tuning scenarios.
|
| 14 |
+
|
| 15 |
+
Once these suboptimal practices are addressed, we observe that degenerate runs are eliminated and performance becomes much more stable. This makes it unnecessary to execute numerous random restarts as proposed in Dodge et al. (2020). Our experiments show the remedies we experiment with for each issue have overlapping effect. For example, allocating more training iterations can eventually compensate for using the non-standard biased optimizer, even though the combination of a bias-corrected optimizer and re-initializing some of the pre-trained model parameters can reduce fine-tuning computational costs. This empirically highlights how different aspects of fine-tuning influence the stability of the process, at times in a similar manner. In the light of our observations, we re-evaluate several techniques (Phang et al., 2018; Lee et al., 2020; Howard & Ruder, 2018) that were recently proposed to increase few-sample fine-tuning stability and show a significant decrease in their impact. Our work furthers the empirical understanding of the fine-tuning process, and the optimization practices we outline identify impactful avenues for the development of future methods.
|
| 16 |
+
|
| 17 |
+
# 2 BACKGROUND AND RELATED WORK
|
| 18 |
+
|
| 19 |
+
BERT The Bidirectional Encoder Representations from Transformers (BERT; Devlin et al., 2019) model is a Transformer encoder (Vaswani et al., 2017) trained on raw text using masked language modeling and next-sentence prediction objectives. It generates an embedding vector contextualized through a stack of Transformer blocks for each input token. BERT prepends a special [CLS]token to the input sentence or sentence pairs. The embedding of this token is used as a summary token for the input for classification tasks. This embedding is computed with an additional fully-connected layer with a tanh non-linearity, commonly referred to as the pooler, to aggregate the information for the [CLS]embedding.
|
| 20 |
+
|
| 21 |
+
Fine-tuning The common approach for using the pre-trained BERT model is to replace the original output layer with a new task-specific layer and fine-tune the complete model. This includes learning the new output layer parameters and modifying all the original weights, including the weights of word embeddings, Transformer blocks, and the pooler. For example, for sentence-level classification, an added linear classifier projects the [CLS]embedding to an unnormalized probability vector over the output classes. This process introduces two sources of randomness: the weight initialization of the new output layer and the data order in the stochastic fine-tuning optimization. Existing work (Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020) shows that these seemingly benign factors can influence the results significantly, especially on small datasets (i.e., $< 1 0 \mathrm { K }$ examples). Consequently, practitioners often conduct many random trials of fine-tuning and pick the best model based on validation performance (Devlin et al., 2019).
|
| 22 |
+
|
| 23 |
+
Fine-tuning Instability The instability of the BERT fine-tuning process has been known since its introduction (Devlin et al., 2019), and various methods have been proposed to address it. Phang et al. (2018) show that fine-tuning the pre-trained model on a large intermediate task stabilizes later fine-tuning on small datasets. Lee et al. (2020) introduce a new regularization method to constrain the fine-tuned model to stay close to the pre-trained weights and show that it stabilizes fine-tuning. Dodge et al. (2020) propose an early stopping method to efficiently filter out random seeds likely to lead to bad performance. Concurrently to our work, Mosbach et al. (2020) also show that BERTADAM leads to instability during fine-tuning. Our experiments studying the effect of training longer are related to previous work studying this question in the context of training models from scratch (Popel & Bojar, 2018; Nakkiran et al., 2019).
|
| 24 |
+
|
| 25 |
+
BERT Representation Transferability BERT pre-trained representations have been widely studied using probing methods showing that the pre-trained features from intermediate layers are more transferable (Tenney et al., 2019b;a; Liu et al., $2 0 1 9 \mathrm { a }$ ; Hewitt & Manning, 2019; Hewitt & Liang, 2019) or applicable (Zhang et al., 2020) to new tasks than features from later layers, which change more after fine-tuning (Peters et al., 2019; Merchant et al., 2020). Our work is inspired by these findings, but focuses on studying how the pre-trained weights influence the fine-tuning process. Li et al. (2020) propose to re-initialize the final fully-connected layer of a ConvNet and show performance gain for image classification.2 Concurrent to our work, Tamkin et al. (2020) adopt a similar methodology of weight re-initialization (Section 5) to study the transferability of BERT. In contrast to our study, their work emphasizes pinpointing the layers that contribute the most in transfer learning, and the relation between probing performance and transferability.
|
| 26 |
+
|
| 27 |
+
# 3 EXPERIMENTAL METHODOLOGY
|
| 28 |
+
|
| 29 |
+
Data We follow the data setup of previous studies (Lee et al., 2020; Phang et al., 2018; Dodge et al., 2020) to study few-sample fine-tuning using eight datasets from the GLUE benchmark (Wang et al., 2019b). The datasets cover four tasks: natural language inference (RTE, QNLI, MNLI), paraphrase detection (MRPC, QQP), sentiment classification (SST-2), and linguistic acceptability (CoLA). Appendix A provides dataset statistics and a description of each dataset. We primarily
|
| 30 |
+
|
| 31 |
+
Algorithm 1: the ADAM pseudocode adapted from Kingma & Ba (2014), and provided for reference. $g _ { t } ^ { 2 }$ denotes the elementwise square $g _ { t } \odot g _ { t }$ . $\beta _ { 1 }$ and $\beta _ { 2 }$ to the power $t$ are denoted as $\beta _ { 1 } ^ { t } \ \beta _ { 2 } ^ { t }$ . All operations on vectors are element-wise. The suggested hyperparameter values according to Kingma & Ba (2014) are: $\alpha = 0 . 0 0 1$ , $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } ~ = ~ 0 . 9 9 9$ , and $\epsilon = 1 0 ^ { - 8 }$ . BERTADAM (Devlin et al., 2019) omits the bias correction (lines 9–10), and treats $m _ { t }$ and $v _ { t }$ as $\widehat { m } _ { t }$ and $\widehat { v } _ { t }$ in line 11.
|
| 32 |
+
|
| 33 |
+
Require: $\alpha$ : learning rate; $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ : exponential decay rates for the moment estimates; $f ( \theta )$ : stochastic
|
| 34 |
+
objective function with parameters $\theta$ ; $\theta _ { 0 }$ : initial parameter vector; $\lambda \in [ 0 , 1 )$ : decoupled weight decay.
|
| 35 |
+
1: $m _ { 0 } \gets 0$ (Initialize first moment vector)
|
| 36 |
+
2: $v _ { 0 } 0$ (Initialize second moment vector)
|
| 37 |
+
3: $t \gets 0$ (Initialize timestep)
|
| 38 |
+
4: while $\theta _ { t }$ not converged do
|
| 39 |
+
5: $t \gets t + 1$
|
| 40 |
+
6: $g _ { t } \gets \nabla _ { \theta } f _ { t } ( \theta _ { t - 1 } )$ (Get gradients w.r.t. stochastic objective at timestep $t$ )
|
| 41 |
+
7: $m _ { t } \gets \beta _ { 1 } \cdot \dot { m } _ { t - 1 } \dot { + } \left( 1 - \beta _ { 1 } \right) \cdot g _ { t }$ (Update biased first moment estimate)
|
| 42 |
+
8: $v _ { t } \beta _ { 2 } \cdot v _ { t - 1 } + ( 1 - \beta _ { 2 } ) \cdot g _ { t } ^ { 2 }$ (Update biased second raw moment estimate)
|
| 43 |
+
9: $\widehat { m } _ { t } \gets m _ { t } / ( 1 - \beta _ { 1 } ^ { t } )$ (Compute bias-corrected first moment estimate)
|
| 44 |
+
10: $\_$ (Compute bias-corrected second raw moment estimate)
|
| 45 |
+
11: $\theta _ { t } \theta _ { t - 1 } - \alpha \cdot \widehat { m } _ { t } / ( \sqrt { \widehat { v } _ { t } } + \epsilon )$ (Update parameters)
|
| 46 |
+
12: end while
|
| 47 |
+
13: return $\theta _ { t }$ (Resulting parameters)
|
| 48 |
+
|
| 49 |
+
focus on four datasets (RTE, MRPC, STS-B, CoLA) that have fewer than 10k training samples, because BERT fine-tuning on these datasets is known to be unstable (Devlin et al., 2019). We also complement our study by downsampling all eight datasets to 1k training examples following Phang et al. (2018). While previous studies (Lee et al., 2020; Phang et al., 2018; Dodge et al., 2020) focus on the validation performance, we split held-out test sets for our study.3 For RTE, MRPC, STS-B, and CoLA, we divide the original validation set in half, using one half for validation and the other for test. For the other four larger datasets, we only study the downsampled versions, and split additional 1k samples from the training set as our validation data and test on the original validation set.
|
| 50 |
+
|
| 51 |
+
Experimental Setup Unless noted otherwise, we follow the hyperparameter setup of Lee et al. (2020). We fine-tune the uncased, 24-layer $\mathbf { B E R T _ { L a r g e } }$ model with batch size 32, dropout 0.1, and peak learning rate $2 \times 1 0 ^ { - 5 }$ for three epochs. We clip the gradients to have a maximum norm of 1. We apply linear learning rate warm-up during the first $10 \%$ of the updates followed by a linear decay. We use mixed precision training using Apex4 to speed up experiments. We show that mixed precision training does not affect fine-tuning performance in Appendix C. We evaluate ten times on the validation set during training and perform early stopping. We fine-tune with 20 random seeds to compare different settings.
|
| 52 |
+
|
| 53 |
+
# 4 OPTIMIZATION ALGORITHM: DEBIASING OMISSION IN BERTADAM
|
| 54 |
+
|
| 55 |
+
The most commonly used optimizer for fine-tuning BERT is BERTADAM, a modified version of the ADAM first-order stochastic optimization method. It differs from the original ADAM algorithm (Kingma & Ba, 2014) in omitting a bias correction step. This change was introduced by Devlin et al. (2019), and subsequently made its way into common open source libraries, including the official implementation,5 huggingface’s Transformers (Wolf et al., 2019),6 AllenNLP (Gardner et al., 2018), GluonNLP (Guo et al., 2019), jiant (Wang et al., 2019c), MT-DNN (Liu et al., 2020), and FARM.7 As a result, this non-standard implementation is widely used in both industry and research (Wang et al., 2019a; Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020; Sun et al., 2019; Clark et al., 2020; Lan et al., 2020; Houlsby et al., 2019; Stickland & Murray, 2019; Liu et al., 2019b). We observe that the bias correction omission influences the learning rate, especially early in the fine-tuning process, and is one of the primary reasons for instability in fine-tuning BERT (Devlin et al., 2019; Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020).
|
| 56 |
+
|
| 57 |
+
Algorithm 1 shows the ADAM algorithm, and highlights the omitted line in the non-standard BERTADAM implementation. At each optimization step (lines 4–11), ADAM computes the exponential moving average of the gradients $( m _ { t } )$ and the squared gradients $( v _ { t } )$ , where $\beta _ { 1 } , \beta _ { 2 }$ parameterize the averaging (lines 7–8). Because ADAM initializes $m _ { t }$ and $v _ { t }$ to 0 and sets exponential decay rates $\beta _ { 1 }$ and $\beta _ { 2 }$ close to 1, the estimates of $m _ { t }$ and $v _ { t }$ are heavily biased towards 0 early during learning when $t$ is small. Kingma & Ba (2014) computes the ratio between the biased and the unbiased estimates of $m _ { t }$ and $v _ { t }$ as $( 1 - \beta _ { 1 } ^ { t } )$ and $( 1 - \bar { \beta } _ { 2 } ^ { t } )$ . This ratio is independent of the training data. The model parameters $\theta$ are updated in the direction of the averaged gradient $m _ { t }$ divided by the square root of the second moment $\sqrt { v _ { t } }$ (line 11). BERTADAM omits the debiasing (lines 9–10), and directly uses the biased estimates in the parameters update.
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 1: Bias in the ADAM update as a function of training iterations. Vertical lines indicate the typical number of iterations used to fine-tune BERT on four small datasets and one large dataset (MNLI). Small datasets use fewer iterations and are most affected.
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 2: Performance distribution box plot across 50 random trials and the four datasets with and without ADAM bias correction. Bias correction reduces the variance of fine-tuning results by a large margin.
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 3: Mean (solid lines) and range (shaded region) of training loss during finetuning BERT, across 50 random trials. Bias correction speeds up convergence and shrinks the range of training loss.
|
| 67 |
+
|
| 68 |
+
Figure 1 shows the ratio $\frac { \hat { m } _ { t } } { \sqrt { \hat { v } _ { t } } }$ between the update using the biased and the unbiased estimation as a function of training iterations. The bias is relatively high early during learning, indicating overestimation. It eventually converges to one, suggesting that when training for sufficient iterations, the estimation bias will have negligible effect.8 Therefore, the bias ratio term is most important early during learning to counteract the overestimation of √ $m _ { t }$ and $v _ { t }$ during early iterations. In practice, ADAM adaptively re-scales the learning rate by $\frac { \sqrt { 1 - \beta _ { 2 } ^ { t } } } { 1 - \beta _ { 1 } ^ { t } }$ . This correction is crucial for BERT finetuning on small datasets with fewer than 10k training samples because they are typically fine-tuned with less than 1k iterations (Devlin et al., 2019). The figure shows the number of training iterations for RTE, MRPC, STS-B, CoLA, and MNLI. MNLI is the only one of this set with a large number of supervised training examples. For small datasets, the bias ratio is significantly higher than one for the entire fine-tuning process, implying that these datasets suffer heavily from overestimation in the update magnitude. In comparison, for MNLI, the majority of fine-tuning occurs in the region where the bias ratio has converged to one. This explains why fine-tuning on MNLI is known to be relatively stable (Devlin et al., 2019).
|
| 69 |
+
|
| 70 |
+
We evaluate the importance of the debiasing step empirically by fine-tuning BERT with both BERTADAM and the debiased $\mathrm { \bf A D A M } ^ { 9 }$ for 50 random seeds on RTE, MRPC, STS-B, and CoLA. Figure 2 summarizes the performance distribution. The bias correction significantly reduces the performance variance across different random trials and the four datasets. Without the bias correction we observe many degenerate runs, where fine-tuned models fail to outperform the random baseline. For example, on RTE, $48 \%$ of fine-tuning runs have an accuracy less than $55 \%$ , which is close to random guessing. Figure 3 further illustrates this difference by plotting the mean and the range of training loss during fine-tuning across different random trials on RTE. Figure 11 in Appendix F shows similar plots for MRPC, STS-B, and CoLA. The biased BERTADAM consistently leads to worse averaged training loss, and on all datasets to higher maximum training loss. This indicates models trained with BERTAdam are underfitting and the root of instability lies in optimization.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 4: Expected test performance (solid lines) with standard deviation (shaded region) over the number of random trials allocated for fine-tuning BERT. With bias correction, we reliably achieve good results with few (i.e., 5 or 10) random trials.
|
| 74 |
+
|
| 75 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="2">RTE</td><td colspan="2">MRPC</td><td colspan="2">STS-B</td><td colspan="2">CoLA</td></tr><tr><td>3Epochs Standard 69.5±2.5 Re-init 72.6 ± 1.6</td><td>Longer 72.3 ± 1.9 73.1 ± 1.3</td><td>3 Epochs 90.8± 1.3 91.4 ± 0.8</td><td>Longer 90.5±1.5 91.0±0.4</td><td>3Epochs 89.0±0.6 89.4±0.2</td><td>Longer 89.6 ± 0.3 89.9 ± 0.1</td><td>3 Epochs 63.0 ±1.5 63.9 ± 1.9</td><td>Longer 62.4 ±1.7 61.9 ± 2.3</td></tr><tr><td>Dataset</td><td colspan="2">RTE(1k)</td><td colspan="2">MRPC (1k)</td><td colspan="2">STS-B (1k)</td><td colspan="2">CoLA (1k)</td></tr><tr><td>Standard Re-init</td><td>3Epochs 62.5± 2.8 65.6 ± 2.0</td><td>Longer 65.2 ± 2.1 65.8 ± 1.7</td><td>3 Epochs 80.5±3.3 84.6±1.6</td><td>Longer 83.8±2.1 86.0 ± 1.2</td><td>3Epochs 84.7 ± 1.4 87.2 ±0.4</td><td>Longer 88.0±0.4 88.4 ±0.2</td><td>3 Epochs 45.9± 1.6 47.6±1.8</td><td>Longer 48.8 ± 1.4 48.4 ± 2.1</td></tr><tr><td>Dataset</td><td colspan="2">SST (1k)</td><td colspan="2">QNLI (1k)</td><td colspan="2">QQP (1k)</td><td colspan="2">MNLI (1k)</td></tr><tr><td>Standard Re-init</td><td>3Epochs 89.7 ±1.5 90.8±0.4</td><td>Longer 90.9±0.5 91.2 ± 0.5</td><td>3Epochs 78.6±2.0 81.9 ± 0.5</td><td>Longer 81.4±0.9 82.1 ± 0.3</td><td>3Epochs 74.0±2.7 77.2±0.7 77.6 ± 0.6</td><td>Longer 77.4 ± 0.8</td><td>3Epochs 52.2±4.2</td><td>Longer 67.5 ±1.1</td></tr></table>
|
| 76 |
+
|
| 77 |
+
Table 1: Mean test performance and standard deviation. We compare fine-tuning with the complete BERT model (Standard) and fine-tuning with the partially re-initialized BERT (Re-init). We show results of fine-tuning for 3 epochs and for longer training (Sec 6). We underline and highlight in blue the best and number statistically equivalent to it among each group of 4 numbers. We use a one-tailed Student’s $t$ -test and reject the null hypothesis when $p < 0 . 0 5$ .
|
| 78 |
+
|
| 79 |
+
We simulate a realistic setting of multiple random trials following Dodge et al. (2020). We use bootstrapping for the simulation: given the 50 fine-tuned models we trained, we sample models with replacement, perform model selection on the validation set, and record the test results; we repeat this process 1k times to estimate mean and variance. Figure 4 shows the simulated test results as a function of the number of random trials. Appendix E provides the same plots for validation performance. Using the debiased ADAM we can reliably achieve good results using fewer random trials; the difference in expected performance is especially pronounced when we perform less than 10 trials. Whereas the expected validation performance monotonically improves with more random trials (Dodge et al., 2020), the expected test performance deteriorates when we perform too many random trials because the model selection process potentially overfits the validation set. Based on these observations, we recommend performing a moderate number of random trials (i.e., 5 or 10).
|
| 80 |
+
|
| 81 |
+
# 5 INITIALIZATION: RE-INITIALIZING BERT PRE-TRAINED LAYERS
|
| 82 |
+
|
| 83 |
+
The initial values of network parameters have significant impact on the process of training deep neural networks, and various methods exist for careful initialization (Glorot & Bengio, 2010; He et al., 2015; Zhang et al., 2019; Radford et al., 2019; Dauphin & Schoenholz, 2019). During fine-tuning, the BERT parameters take the role of the initialization point for the fine-tuning optimization process, while also capturing the information transferred from pre-training. The common approach for BERT fine-tuning is to initialize all layers except one specialized output layer with the pre-trained weights. We study the value of transferring all the layers in contrast to simply ignoring the information learned in some layers. This is motivated by object recognition transfer learning results showing that lower pre-trained layers learn more general features while higher layers closer to the output specialize more to the pre-training tasks (Yosinski et al., 2014). Existing methods using BERT show that using the complete network is not always the most effective choice, as we discuss in Section 2. Our empirical results further confirm this: we observe that transferring the top pre-trained layers slows down learning and hurts performance.
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
Figure 5: Validation performance distribution of re-initializing different number of layers of the BERT model.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 6: Mean (solid lines) and Range (shaded region) of training loss during fine-tuning BERT, across 20 random trials. Re-init leads to faster convergence and shrinks the range.
|
| 90 |
+
|
| 91 |
+
We test the transferability of the top layers using a simple ablation study. Instead of using the pretrained weights for all layers, we re-initialize the pooler layers and the top $L \in \mathbb { N }$ BERT Transformer blocks using the original BERT initialization, $\dot { N } ( 0 , 0 . 0 2 ^ { \dot { 2 } } )$ . We compare two settings: (a) standard fine-tuning with BERT, and (b) Re-init fine-tuning of BERT. We evaluate Re-init by selecting $L \in \{ 1 , \ldots , 6 \}$ based on mean validation performance. All experiments use the debiased ADAM (Section 4) with 20 random seeds.
|
| 92 |
+
|
| 93 |
+
Re-init Impact on Performance Table 1 shows our results on all the datasets from Section 3. We show results for the common setting of using 3 epochs, and also for longer training, which we discuss and study in Section 6. Re-init consistently improves mean performance on all the datasets, showing that not all layers are beneficial for transferring. It usually also decreases the variance across all datasets. Appendix F shows similar benefits for pre-trained models other than BERT.
|
| 94 |
+
|
| 95 |
+
Sensitivity to Number of Layers Re-initialized Figure 5 shows the effect of the choice of $L$ , the number of blocks we re-initialize, on RTE and MRPC. Figure 13 in Appendix F shows similar plots for the rest of the datasets. We observe more significant improvement in the worst-case performance than the best performance, suggesting that Re-init is more robust to unfavorable random seed. We already see improvements when only the pooler layer is re-initialized. Re-initializing further layers helps more. For larger $L$ though, the performance plateaus and even decreases as re-initialize pre-trained layers with general important features. The best $L$ varies across datasets.
|
| 96 |
+
|
| 97 |
+
Effect on Convergence and Parameter Change Figure 6 shows the training loss for both the standard fine-tuning and Re-init on RTE and MRPC. Figure 13, Appendix F shows the training loss for all other datasets. Re-init leads to faster convergence. We study the weights of different Transformer blocks. For each block, we concatenate all parameters and record the $L 2$ distance between these parameters and their initialized values during fine-tuning. Figure 7 plots the $L 2$ distance for four different transformer blocks as a function of training steps on RTE, and Figures $1 5 -$ 18 in Appendix F show all transformer blocks on four datasets. In general, Re-init decreases the $L 2$ distance to initialization for top Transformer blocks (i.e., 18–24). Re-initializing more layers leads to a larger reduction, indicating that Re-init decreases the fine-tuning workload. The effect of Re-init is not local; even re-initializing only the topmost Transformer block can affect the whole network. While setting $L = 1$ or $L = 3$ continues to benefit the bottom Transformer blocks, re-initializing too many layers (e.g., $L = 1 0$ ) can increase the $L 2$ distance in the bottom Transformer blocks, suggesting a tradeoff between the bottom and the top Transformer blocks. Collectively, these results suggest that Re-init finds a better initialization for fine-tuning and the top $L$ layers of BERT are potentially overspecialized to the pre-training objective.
|
| 98 |
+
|
| 99 |
+
# 6 TRAINING ITERATIONS: FINE-TUNING BERT FOR LONGER
|
| 100 |
+
|
| 101 |
+
BERT is typically fine-tuned with a slanted triangular learning rate, which applies linear warm-up to the learning rate followed by a linear decay. This learning schedule warrants deciding the number of training iterations upfront. Devlin et al. (2019) recommend fine-tuning GLUE datasets for three epochs. This recommendation has been adopted broadly for fine-tuning (Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020). We study the impact of this choice, and observe that this one-size-fits-all three-epochs practice for BERT fine-tuning is sub-optimal. Fine-tuning BERT longer can improve both training stability and model performance.
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 7: L2 distance to the initial parameters during fine-tuning BERT on RTE. Re-init reduces the amount of change in the weights of top Transformer blocks. However, re-initializing too many layers causes a larger change in the bottom Transformer blocks.
|
| 107 |
+
Figure 8: Mean (solid lines) and range (shaded region) of validation performance trained with different number of iterations, across eight random trials.
|
| 108 |
+
|
| 109 |
+
Experimental setup We study the effect of increasing the number of fine-tuning iterations for the datasets in Section 3. For the 1k downsampled datasets, where three epochs correspond to 96 steps, we tune the number of iterations in $\{ 2 0 0 , 4 0 0 , 8 0 0 , 1 6 0 0 , 3 2 0 0 \}$ . For the four small datasets, we tune the number of iterations in the same range but skip values smaller than the number of iterations used in three epochs. We evaluate our models ten times on the validation set during fine-tuning. This number is identical to the experiments in Sections 4–5, and controls for the set of models to choose from. We tune with eight different random seeds and select the best set of hyperparameters based on the mean validation performance to save experimental costs. After the hyperparameter search, we fine-tune with the best hyperparameters for 20 seeds and report the test performance.
|
| 110 |
+
|
| 111 |
+
Results Table 1 shows the result under the Longer column. Training longer can improve over the three-epochs setup most of the time, in terms of both performance and stability. This is more pronounced on the 1k downsampled datasets. We also find that training longer reduces the gap between standard fine-tuning and Re-init, indicating that training for more iterations can help these models recover from bad initializations. However, on datasets such as MRPC and MNLI, Re-init still improves the final performance even with training longer. We show the validation results on the four downsampled datasets with different number of training iterations in Figure 8. We provide a similar plot in Figure 14, Appendix G for the other downsampled datasets. We observe that different tasks generally require different number of training iterations and it is difficult to identify a one-size-fits-all solution. Therefore, we recommend practitioners to tune the number of training iterations on their datasets when they discover instability in fine-tuning. We also observe that on most of the datasets, Re-init requires fewer iterations to achieve the best performance, corroborating that Re-init provides a better initialization for fine-tuning.
|
| 112 |
+
|
| 113 |
+
# 7 REVISITING EXISTING METHODS FOR FEW-SAMPLE BERT FINE-TUNING
|
| 114 |
+
|
| 115 |
+
Instability in BERT fine-tuning, especially in few-sample settings, is receiving increasing attention recently (Devlin et al., 2019; Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020). We revisit these methods given our analysis of the fine-tuning process, focusing on the impact of using the debiased ADAM instead of BERTADAM (Section 4). Generally, we find that when these methods are re-evaluated with the unbiased ADAM they are less effective with respect to the improvement in fine-tuning stability and performance.
|
| 116 |
+
|
| 117 |
+
<table><tr><td></td><td>Standard</td><td>Int. Task</td><td>LLRD</td><td>Mixout</td><td>Pre-trained WD</td><td>WD</td><td>Re-init</td><td>Longer</td></tr><tr><td>RTE</td><td>69.5 ± 2.5</td><td>81.8 ± 1.7</td><td>69.7 ±3.2</td><td>71.3 ± 1.4</td><td>69.6 ± 2.1</td><td>69.5 ± 2.5</td><td>72.6 ± 1.6</td><td>72.3 ± 1.9</td></tr><tr><td>MRPC</td><td>90.8 ±1.3</td><td>91.8 ± 1.0</td><td>91.3±1.1</td><td>90.4 ± 1.4</td><td>90.8 ± 1.3</td><td>90.8 ± 1.3</td><td>91.4 ± 0.8</td><td>91.0 ± 1.3</td></tr><tr><td>STS-B</td><td>89.0±0.6</td><td>89.2±0.3</td><td>89.2 ± 0.4</td><td>89.2 ± 0.4</td><td>89.0±0.5</td><td>89.0±0.6</td><td>89.4± 0.2</td><td>89.6 ± 0.3</td></tr><tr><td>CoLA</td><td>63.0 ± 1.5</td><td>63.9 ± 1.8</td><td>63.0± 2.5</td><td>61.6 ± 1.7</td><td>63.4 ± 1.5</td><td>63.0 ± 1.5</td><td>64.2 ± 1.6</td><td>62.4±1.7</td></tr></table>
|
| 118 |
+
|
| 119 |
+
Table 2: Mean test performance and standard deviation on four datasets. Numbers that are statistically significantly better than the standard setting (left column) are in blue and underlined. The results of Re-init and Longer are copied from Table 1. All experiments use ADAM with debiasing (Section 4). Except Longer, all methods are trained with three epochs. “Int. Task” stands for transfering via an intermediate task (MNLI).
|
| 120 |
+
|
| 121 |
+
# 7.1 OVERVIEW
|
| 122 |
+
|
| 123 |
+
Pre-trained Weight Decay Weight decay (WD) is a common regularization technique (Krogh & Hertz, 1992). At each optimization iteration, λw is subtracted from the model parameters, where $\lambda$ is a hyperparameter for the regularization strength and w is the model parameters. Pre-trained weight decay adapts this method for fine-tuning pre-trained models (Chelba & Acero, 2004; Daumé III, 2007) by subtracting $\lambda ( \mathbf { w } - \hat { \mathbf { w } } )$ from the objective, where wˆ is the pre-trained parameters. Lee et al. (2020) empirically show that pre-trained weight decay works better than conventional weight decay in BERT fine-tuning and can stabilize fine-tuning.
|
| 124 |
+
|
| 125 |
+
Mixout Mixout (Lee et al., 2020) is a stochastic regularization technique motivated by Dropout (Srivastava et al., 2014) and DropConnect (Wan et al., 2013). At each training iteration, each model parameter is replaced with its pre-trained value with probability $p$ . The goal is to prevent catastrophic forgetting, and (Lee et al., 2020) proves it constrains the fine-tuned model from deviating too much from the pre-trained initialization.
|
| 126 |
+
|
| 127 |
+
Layer-wise Learning Rate Decay (LLRD) LLRD (Howard & Ruder, 2018) is a method that applies higher learning rates for top layers and lower learning rates for bottom layers. This is accomplished by setting the learning rate of the top layer and using a multiplicative decay rate to decrease the learning rate layer-by-layer from top to bottom. The goal is to modify the lower layers that encode more general information less than the top layers that are more specific to the pre-training task. This method is adopted in fine-tuning several recent pre-trained models, including XLNet (Yang et al., 2019b) and ELECTRA (Clark et al., 2020).
|
| 128 |
+
|
| 129 |
+
Transferring via an Intermediate Task Phang et al. (2018) propose to conduct supplementary fine-tuning on a larger, intermediate task before fine-tuning on few-sample datasets. They show that this approach can reduce variance across different random trials and improve model performance. Their results show that transferring models fine-tuned on MNLI (Williams et al., 2018) can lead to significant improvement on several downstream tasks including RTE, MRPC, and STS-B. In contrast to the other methods, this approach requires large amount of additional annotated data.
|
| 130 |
+
|
| 131 |
+
# 7.2 EXPERIMENTS
|
| 132 |
+
|
| 133 |
+
We evaluate all methods on RTE, MRPC, STS-B, and CoLA. We fine-tune a $\mathrm { B E R T _ { L a r g e } }$ model using the ADAM optimizer with debiasing for three epochs, the default number of epochs used with each of the methods. For intermediate task fine-tuning, we fine-tune a $\mathrm { B E R T _ { L a r g e } }$ model on MNLI and then fine-tune for our evaluation. For other methods, we perform hyperparameter search with a similar size search space for each method, as described in Appendix H. We do model selection using the average validation performance across 20 random seeds. We additionally report results for standard fine-tuning with longer training time (Section 6), weight decay, and Re-init (Section 5).
|
| 134 |
+
|
| 135 |
+
Table 2 provides our results. Compared to published results (Phang et al., 2018; Lee et al., 2020), our test performance for Int. Task (transferring via an intermediate task), Mixout, Pre-trained WD, and WD are generally higher when using the ADAM with debiasing.10 However, we observe less pronounced benefits for all surveyed methods compared to results originally reported. At times, these methods do not outperform the standard baselines or simply training longer. Using additional annotated data for intermediate task training continues to be effective, leading to consistent improvement over the average performance across all datasets. LLRD and Mixout show less consistent performance impact. We observe no noticeable improvement using pre-trained weight decay and conventional weight decay in improving or stabilizing BERT fine-tuning in our experiments, contrary to existing work (Lee et al., 2020). This indicates that these methods potentially ease the optimization difficulty brought by the debiasing omission in BERTADAM, and when we add the debiasing, the positive effects are reduced.
|
| 136 |
+
|
| 137 |
+
# 8 CONCLUSION
|
| 138 |
+
|
| 139 |
+
We have demonstrated that optimization plays a vital role in the few-sample BERT fine-tuning. First, we show that the debiasing omission in BERTADAM is the main cause of degenerate models on small datasets commonly observed in previous work (Phang et al., 2018; Lee et al., 2020; Dodge et al., 2020). Second, we observe the top layers of the pre-trained BERT provide a detrimental initialization for fine-tuning and delay learning. Simply re-initializing these layers not only speeds up learning but also leads to better model performance. Third, we demonstrate that the common one-size-fits-all three-epochs practice for BERT fine-tuning is sub-optimal and allocating more training time can stabilize fine-tuning. Finally, we revisit several methods proposed for stabilizing BERT fine-tuning and observe that their positive effects are reduced with the debiased ADAM. In the future, we plan to extend our study to different pre-training objectives and model architectures, and study how model parameters evolve during fine-tuning.
|
| 140 |
+
|
| 141 |
+
# ACKNOWLEDGMENTS
|
| 142 |
+
|
| 143 |
+
We thank Cheolhyoung Lee for his help in reproducing previous work. We thank Lili Yu, Ethan R. Elenberg, Varsha Kishore, and Rishi Bommasani for their insightful comments, and Hugging Face for the Transformers project, which enabled our work.
|
| 144 |
+
|
| 145 |
+
# REFERENCES
|
| 146 |
+
|
| 147 |
+
Luisa Bentivogli, Ido Kalman Dagan, Dang Hoa, Danilo Giampiccolo, and Bernardo Magnini. The fifth pascal recognizing textual entailment challenge. In TAC 2009 Workshop, 2009.
|
| 148 |
+
|
| 149 |
+
Daniel Cer, Mona Diab, Eneko Agirre, Iñigo Lopez-Gazpio, and Lucia Specia. Semeval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In SemEval-2017, 2017.
|
| 150 |
+
|
| 151 |
+
Ciprian Chelba and Alex Acero. Adaptation of maximum entropy capitalizer: Little data can help a lot. In EMNLP, 2004.
|
| 152 |
+
|
| 153 |
+
Kevin Clark, Minh-Thang Luong, Quoc V. Le, and Christopher D. Manning. ELECTRA: Pre-training text encoders as discriminators rather than generators. In ICLR, 2020.
|
| 154 |
+
|
| 155 |
+
Hal Daumé III. Frustratingly easy domain adaptation. In ACL, 2007.
|
| 156 |
+
|
| 157 |
+
Yann N Dauphin and Samuel Schoenholz. Metainit: Initializing learning by learning to initialize. In NeurIPS, 2019.
|
| 158 |
+
|
| 159 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019.
|
| 160 |
+
|
| 161 |
+
Jesse Dodge, Gabriel Ilharco, Roy Schwartz, Ali Farhadi, Hannaneh Hajishirzi, and Noah Smith. Fine-tuning pretrained language models: Weight initializations, data orders, and early stopping. arXiv preprint arXiv:2002.06305, 2020.
|
| 162 |
+
|
| 163 |
+
William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In IWP, 2005.
|
| 164 |
+
|
| 165 |
+
Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson F Liu, Matthew Peters, Michael Schmitz, and Luke Zettlemoyer. Allennlp: A deep semantic natural language processing platform. In NLP-OSS, 2018.
|
| 166 |
+
|
| 167 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010.
|
| 168 |
+
|
| 169 |
+
Jian Guo, He He, Tong He, Leonard Lausen, Mu Li, Haibin Lin, Xingjian Shi, Chenguang Wang, Junyuan Xie, Sheng Zha, Aston Zhang, Hang Zhang, Zhi Zhang, Zhongyue Zhang, and Shuai Zheng. Gluoncv and gluonnlp: Deep learning in computer vision and natural language processing. arXiv preprint arXiv:1907.04433, 2019.
|
| 170 |
+
|
| 171 |
+
Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: Retrievalaugmented language model pre-training. arXiv preprint arXiv:2002.08909, 2020.
|
| 172 |
+
|
| 173 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015.
|
| 174 |
+
|
| 175 |
+
J. Hewitt and P. Liang. Designing and interpreting probes with control tasks. In EMNLP, 2019.
|
| 176 |
+
|
| 177 |
+
John Hewitt and Christopher D. Manning. A structural probe for finding syntax in word representations. In NAACL, 2019.
|
| 178 |
+
|
| 179 |
+
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for NLP. In ICML, 2019.
|
| 180 |
+
|
| 181 |
+
Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In ACL, 2018.
|
| 182 |
+
|
| 183 |
+
Shankar Iyer, Nikhil Dandekar, and Kornel Csernai. First quora dataset release: Question pairs. https://tinyurl.com/y2y8u5ed, 2017.
|
| 184 |
+
|
| 185 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 186 |
+
|
| 187 |
+
Anders Krogh and John A. Hertz. A simple weight decay can improve generalization. In NeurIPS, 1992.
|
| 188 |
+
|
| 189 |
+
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. Albert: A lite bert for self-supervised learning of language representations. In ICLR, 2020.
|
| 190 |
+
|
| 191 |
+
Cheolhyoung Lee, Kyunghyun Cho, and Wanmo Kang. Mixout: Effective regularization to finetune large-scale pretrained language models. In ICLR, 2020.
|
| 192 |
+
|
| 193 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019.
|
| 194 |
+
|
| 195 |
+
Xingjian Li, Haoyi Xiong, Haozhe An, Chengzhong Xu, and Dejing Dou. Rifle: Backpropagation in depth for deep transfer learning through re-initializing the fully-connected layer. In ICML, 2020.
|
| 196 |
+
|
| 197 |
+
Nelson F. Liu, Matt Gardner, Yonatan Belinkov, Matthew E. Peters, and Noah A. Smith. Linguistic knowledge and transferability of contextual representations. arXiv preprint arXiv:1903.08855, 2019a.
|
| 198 |
+
|
| 199 |
+
Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. Multi-task deep neural networks for natural language understanding. In ACL, 2019b.
|
| 200 |
+
|
| 201 |
+
Xiaodong Liu, Yu Wang, Jianshu Ji, Hao Cheng, Xueyun Zhu, Emmanuel Awa, Pengcheng He, Weizhu Chen, Hoifung Poon, Guihong Cao, and Jianfeng Gao. The microsoft toolkit of multi-task deep neural networks for natural language understanding. arXiv preprint arXiv:2002.07972, 2020.
|
| 202 |
+
|
| 203 |
+
Yang Liu. Fine-tune BERT for extractive summarization. arXiv preprint arXiv:1903.10318, 2019.
|
| 204 |
+
|
| 205 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv preprint arXiv:1907.11692, 2019c.
|
| 206 |
+
|
| 207 |
+
Brian W Matthews. Comparison of the predicted and observed secondary structure of t4 phage lysozyme. Biochimica et Biophysica Acta (BBA)-Protein Structure, 1975.
|
| 208 |
+
|
| 209 |
+
Amil Merchant, Elahe Rahimtoroghi, Ellie Pavlick, and Ian Tenney. What happens to bert embeddings during fine-tuning? arXiv preprint arXiv:2004.14448, 2020.
|
| 210 |
+
|
| 211 |
+
Marius Mosbach, Maksym Andriushchenko, and Dietrich Klakow. On the stability of fine-tuning bert: Misconceptions, explanations, and strong baselines. arXiv preprint arXiv:2006.04884, 2020.
|
| 212 |
+
|
| 213 |
+
Preetum Nakkiran, Gal Kaplun, Yamini Bansal, Tristan Yang, Boaz Barak, and Ilya Sutskever. Deep double descent: Where bigger models and more data hurt. In ICLR, 2019.
|
| 214 |
+
|
| 215 |
+
Matthew E. Peters, Sebastian Ruder, and Noah A. Smith. To tune or not to tune? adapting pretrained representations to diverse tasks. arXiv preprint arXiv:1903.05987, 2019.
|
| 216 |
+
|
| 217 |
+
Jason Phang, Thibault Févry, and Samuel R Bowman. Sentence encoders on stilts: Supplementary training on intermediate labeled-data tasks. arXiv preprint arXiv:1811.01088, 2018.
|
| 218 |
+
|
| 219 |
+
Martin Popel and Ondˇrej Bojar. Training tips for the transformer model. The Prague Bulletin of Mathematical Linguistics, 2018.
|
| 220 |
+
|
| 221 |
+
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
|
| 222 |
+
|
| 223 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013.
|
| 224 |
+
|
| 225 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 2014.
|
| 226 |
+
|
| 227 |
+
Asa Cooper Stickland and Iain Murray. Bert and pals: Projected attention layers for efficient adaptation in multi-task learning. In ICML, 2019.
|
| 228 |
+
|
| 229 |
+
Chi Sun, Xipeng Qiu, Yige Xu, and Xuanjing Huang. How to fine-tune bert for text classification? In CCL, 2019.
|
| 230 |
+
|
| 231 |
+
Alex Tamkin, Trisha Singh, Davide Giovanardi, and Noah Goodman. Investigating transferability in pretrained language models. In EMNLP, 2020.
|
| 232 |
+
|
| 233 |
+
Ian Tenney, Dipanjan Das, and Ellie Pavlick. Bert rediscovers the classical nlp pipeline. In ACL, 2019a.
|
| 234 |
+
|
| 235 |
+
Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R Thomas McCoy, Najoung Kim, Benjamin Van Durme, Sam Bowman, Dipanjan Das, and Ellie Pavlick. What do you learn from context? probing for sentence structure in contextualized word representations. In ICLR, 2019b.
|
| 236 |
+
|
| 237 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
|
| 238 |
+
|
| 239 |
+
David Wadden, Ulme Wennberg, Yi Luan, and Hannaneh Hajishirzi. Entity, relation, and event extraction with contextualized span representations. In EMNLP-IJCNLP, 2019.
|
| 240 |
+
|
| 241 |
+
Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In ICML, 2013.
|
| 242 |
+
|
| 243 |
+
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Superglue: A stickier benchmark for general-purpose language understanding systems. In NeurIPS, 2019a.
|
| 244 |
+
|
| 245 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In ICLR, 2019b.
|
| 246 |
+
|
| 247 |
+
Alex Wang, Ian F. Tenney, Yada Pruksachatkun, Phil Yeres, Jason Phang, Haokun Liu, Phu Mon Htut, Katherin Yu, Jan Hula, Patrick Xia, Raghu Pappagari, Shuning Jin, R. Thomas McCoy, Roma Patel, Yinghui Huang, Edouard Grave, Najoung Kim, Thibault Févry, Berlin Chen, Nikita Nangia, Anhad Mohananey, Katharina Kann, Shikha Bordia, Nicolas Patry, David Benton, Ellie Pavlick, and Samuel R. Bowman. jiant 1.3: A software toolkit for research on general-purpose text understanding models. http://jiant.info/, 2019c.
|
| 248 |
+
|
| 249 |
+
Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. Neural network acceptability judgments. TACL, 2019.
|
| 250 |
+
|
| 251 |
+
Adina Williams, Nikita Nangia, and Samuel Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In ACL, 2018.
|
| 252 |
+
|
| 253 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, R’emi Louf, Morgan Funtowicz, and Jamie Brew. Huggingface’s transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771, 2019.
|
| 254 |
+
|
| 255 |
+
Wei Yang, Haotian Zhang, and Jimmy Lin. Simple applications of BERT for ad hoc document retrieval. arXiv preprint arXiv:1903.10972, 2019a.
|
| 256 |
+
|
| 257 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. In NeurIPS, 2019b.
|
| 258 |
+
|
| 259 |
+
Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In NeurIPS, 2014.
|
| 260 |
+
|
| 261 |
+
Hongyi Zhang, Yann N. Dauphin, and Tengyu Ma. Residual learning without normalization via better initialization. In ICLR, 2019.
|
| 262 |
+
|
| 263 |
+
Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. BERTScore: Evaluating Text Generation with BERT. In ICLR, 2020.
|
| 264 |
+
|
| 265 |
+
Jinhua Zhu, Yingce Xia, Lijun Wu, Di He, Tao Qin, Wengang Zhou, Houqiang Li, and Tieyan Liu. Incorporating bert into neural machine translation. In ICLR, 2020.
|
| 266 |
+
|
| 267 |
+
Table 3: The datasets used in this work. We apply non-standard data splits to create test sets. SCC stands for Spearman Correlation Coefficient and MCC stands for Matthews Correlation Coefficient.
|
| 268 |
+
|
| 269 |
+
<table><tr><td>Task</td><td>RTE NLI</td><td>MRPC Paraphrase</td><td>STS-B Similarity</td><td>CoLA Acceptibility</td><td>SST-2 Sentiment</td><td>QNLI NLI</td><td>QQP Paraphrase</td><td>MNLI NLI</td></tr><tr><td># of training samples</td><td>2.5k</td><td>3.7k</td><td>5.8k</td><td>8.6k</td><td>61.3k</td><td>104k</td><td>363k</td><td>392k</td></tr><tr><td># of validation samples</td><td>139</td><td>204</td><td>690</td><td>521</td><td>1k</td><td>1k</td><td>1k</td><td>1k</td></tr><tr><td># of test samples</td><td>139</td><td>205</td><td>690</td><td>521</td><td>1.8k</td><td>5.5k</td><td>40k</td><td>9.8k</td></tr><tr><td>Evaluation metric</td><td>Acc.</td><td>F1</td><td>SCC</td><td>MCC</td><td>Acc.</td><td>Acc.</td><td>Acc.</td><td>Acc.</td></tr><tr><td>Majority baseline (val)</td><td>52.9</td><td>81.3</td><td>0</td><td>0</td><td>50.0</td><td>50.0</td><td>50.0</td><td>33.3</td></tr><tr><td>Majority baseline (test)</td><td>52.5</td><td>81.2</td><td>0</td><td>0</td><td>49.1</td><td>50.5</td><td>63.2</td><td>31.8</td></tr></table>
|
| 270 |
+
|
| 271 |
+
# A DATASETS
|
| 272 |
+
|
| 273 |
+
Table 3 summarizes dataset statistics and describes our validation/test splits. We also provide a brief introduction for each datasets:
|
| 274 |
+
|
| 275 |
+
RTE Recognizing Textual Entailment (Bentivogli et al., 2009) is a binary entailment classification task. We use the GLUE version.
|
| 276 |
+
|
| 277 |
+
MRPC Microsoft Research Paraphrase Corpus (Dolan & Brockett, 2005) is binary classification task. Given a pair of sentences, a model has to predict whether they are paraphrases of each other. We use the GLUE version.
|
| 278 |
+
|
| 279 |
+
STS-B Semantic Textual Similarity Benchmark (Cer et al., 2017) is a regression tasks for estimating sentence similarity between a pair of sentences. We use the GLUE version.
|
| 280 |
+
|
| 281 |
+
CoLA Corpus of Linguistic Acceptability (Warstadt et al., 2019) is a binary classification task for verifying whether a sequence of words is a grammatically correct English sentence. Matthews correlation coefficient (Matthews, 1975) is used to evaluate the performance. We use the GLUE version.
|
| 282 |
+
|
| 283 |
+
MNLI Multi-Genre Natural Language Inference Corpus (Williams et al., 2018) is a textual entailment dataset, where a model is asked to predict whether the premise entails the hypothesis, predicts the hypothesis, or neither. We use the GLUE version.
|
| 284 |
+
|
| 285 |
+
QQP Quora Question Pairs (Iyer et al., 2017) is a binary classification task to determine whether two questions are semantically equivalent (i.e., paraphrase each other). We use the GLUE version.
|
| 286 |
+
|
| 287 |
+
SST-2 The binary version of the Stanford Sentiment Treebank (Socher et al., 2013) is a binary classification task for whether a sentence has positive or negative sentiment. We use the GLUE version.
|
| 288 |
+
|
| 289 |
+
# B ISOLATING THE IMPACT OF DIFFERENT SOURCES OF RANDOMNESS
|
| 290 |
+
|
| 291 |
+
The randomness in BERT fine-tuning comes from three sources: (a) weight initialization, (b) data order, and (c) Dropout regularization (Srivastava et al., 2014). We control the randomness using two separate random number generators: one for weight initialization and the other for both data order and Dropout (both of them affect the stochastic loss at each iteration). We fine-tune BERT on RTE for three epochs using ADAM with 10 seeds for both random number generators. We compare the standard setup with Re-init 5, where $L = 5$ . This experiment is similar to Dodge et al. (2020), but we use ADAM with debiasing instead of BERTADAM and control for the randomness in Dropout as well. When fixing a random seed for weight initialization, Re-init 5 shares the same initialized classifier weights with the standard baseline. Figure 9 shows the validation accuracy of each individual run as well as the minimum, average, and maximum scores when fixing one of the random seeds. Figure 10 summarizes the standard deviations when one of the random seeds is controlled. We observe several trends. Re-init 5 usually improves the performance regardless of the weight initialization or data order and Dropout. Second, Re-init 5 still reduces the instability when one of the sources of randomness is controlled. Third, the standard deviation of fixing the weight initialization roughly matches the one of controlled data order and Dropout, which aligns with the observation of Dodge et al. (2020).
|
| 292 |
+
|
| 293 |
+

|
| 294 |
+
Figure 9: Validation accuracy on RTE with controlled random seeds. The min, mean, and max values of controlling one of the random seeds are also included. Re-init 5 usually improves the validation accuracy.
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
Figure 10: The standard deviation of the validation accuracy on RTE with controlled random seeds. We show the standard deviation of fixing either the initialization or data order and Dropout. Re-init 5 consistently reduces the instability regardless of the sources of the randomness.
|
| 298 |
+
|
| 299 |
+
# C MIXED PRECISION TRAINING
|
| 300 |
+
|
| 301 |
+
Mixed precision training can accelerate model training while preserving performance by replacing some 32-bit floating-point computation with 16-bit floating-point computation. We use mixed precision training in all our experiments using huggingface’s Transformers (Wolf et al., 2019). Transformers uses O1-level optimized mixed precision training implemented with the Apex library.11 We evaluate if this mixed precision implementation influences our results. We fine-tune BERT with 20 random trials on RTE, MRPC, STS-B, and CoLA. We use two-tailed $t$ -test to test if the distributions of the two methods are statistically different. Table 4 shows the mean and standard deviation of the
|
| 302 |
+
|
| 303 |
+
Table 4: Comparing BERT fine-tuning with mixed precision and full precision. The difference between the two numbers on any dataset is not statistically significant.
|
| 304 |
+
|
| 305 |
+
<table><tr><td></td><td>CoLA</td><td>MRPC</td><td>RTE</td><td>STS-B</td></tr><tr><td>Mixed precision</td><td>60.3 ± 1.5</td><td>89.2 ± 1.2</td><td>71.8 ± 2.1</td><td>90.1± 0.7</td></tr><tr><td>Full precision</td><td>59.9 ± 1.5</td><td>88.7 ± 1.4</td><td>71.4± 2.2</td><td>90.1± 0.7</td></tr></table>
|
| 306 |
+
|
| 307 |
+
<table><tr><td></td><td>Dev Acc. (%)</td><td>Test Acc. (%)</td></tr><tr><td>No bias correction</td><td>86.0 ± 0.3</td><td>87.0 ± 0.4</td></tr><tr><td>Bias correction</td><td>85.9 ± 0.3</td><td>86.9 ± 0.3</td></tr></table>
|
| 308 |
+
|
| 309 |
+
Table 5: Comparing BERT fine-tuning with and without bias correction on the MNLI dataset. When we have a large dataset, there is no significant difference in using bias correction or not.
|
| 310 |
+
|
| 311 |
+
test performance. The performance of mixed precision matches the single precision counterpart, and there is no statistically significant difference.
|
| 312 |
+
|
| 313 |
+
# D BIAS-CORRECTION ON MNLI
|
| 314 |
+
|
| 315 |
+
The focus of this paper is few-sample learning. However, we also experiment with the full MNLI dataset. Table 5 shows that average accuracy over three random runs. The results confirm that there is no significant difference in using bias correction or not on such a large dataset. While our recommended practices do not improve training on large datasets, this result shows there is no disadvantage to fine-tune such models with the same procedure as we propose for few-sample training.
|
| 316 |
+
|
| 317 |
+
# E SUPPLEMENTARY MATERIAL FOR SECTION 4
|
| 318 |
+
|
| 319 |
+
Effect of ADAM with Debiasing on Convergence. Figure 11 shows the training loss as a function of the number of training iterations. Using bias correction effectively speeds up convergence and reduces the range of the training loss, which is consistent with our observation in Figure 3.
|
| 320 |
+
|
| 321 |
+
Effect of ADAM with Debiasing on the Expected Validation Performance. Figure 12 shows the expected validation performance as a function of the number of random trials. Comparing to Figure 4, we observe several trends. First, using ADAM with debiasing consistently leads to faster convergence and improved validation performance, which is similar to our observation about the test performance. Second, we observe that the expected validation performance monotonically increases with the number of random trials, contrary to our observation about the test performance. This suggests that using too many random trials may overfit to the validation set and hurt generalization performance.
|
| 322 |
+
|
| 323 |
+
# F SUPPLEMENTARY MATERIAL FOR SECTION 5
|
| 324 |
+
|
| 325 |
+
Effect of $L$ on Re-init Figure 13 shows the effect of Re-init in fine-tuning on the eight downsampled datasets. We observe similar trends in Figure 13 and Figure 5. Re-init’s improvement is more pronounced in the wort-case performance across different random trials. Second, the best value of $L$ is different for each dataset.
|
| 326 |
+
|
| 327 |
+
Effect of Re-init on Model Parameters We use the same setup as in Figure 7 to plot the change in the weights of different Transformer blocks during fine-tuning on RTE, MRPC, STS-B, and CoLA in Figures 15–18.
|
| 328 |
+
|
| 329 |
+
Effect of Re-init on Other Models We study more recent pre-trained contexual embedding models beyond BERTLarge. We investigate whether Re-init provides better fine-tuning initialization in XLNetLarge Yang et al. (2019b), RoBERTaLarge Liu et al. (2019c), BARTLarge Lewis et al. (2019), and ELECTRALarge Clark et al. (2020). XLNet is an autoregressive language model trained by learning all permutations of natural language sentences. RoBERTa is similar to BERT in terms of model architecture but is only pre-trained on the mask language modeling task only, but for longer and on
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 11: Mean (solid lines) and range (shaded region) of training loss during fine-tuning BERT, across 50 random trials. Bias correction speeds up convergence and reduces the range of the training loss.
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 12: Expected validation performance (solid lines) with standard deviation (shaded region) over the number of random trials allocated for fine-tuning BERT. With bias correction, we can reliably achieve good results with few (i.e., 5 or 10) random trials.
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 13: Validation performance distribution of re-initializing different number of layers of BERT on the downsampled datasets.
|
| 339 |
+
|
| 340 |
+
Table 6: Fine-tuning hyper-parameters of BERT and its variants as reported in the official repository of each model.
|
| 341 |
+
|
| 342 |
+
<table><tr><td>Model</td><td>Dataset</td><td>Learning Rate</td><td>Training Epochs /Steps</td><td>Batch Size</td><td>Warmup Ratio /Steps</td><td>LLRD</td></tr><tr><td>BERT</td><td>all</td><td>2×10-5</td><td>3 epochs</td><td>32</td><td>10%</td><td>=</td></tr><tr><td rowspan="4">XLNet</td><td>RTE</td><td>3×10-5</td><td>800 steps</td><td>32</td><td>200 steps</td><td></td></tr><tr><td>MRPC</td><td>5×10-5</td><td>800 steps</td><td>32</td><td>200 steps</td><td></td></tr><tr><td>STS-B</td><td>5×10-5</td><td>3000 steps</td><td>32</td><td>500 steps</td><td></td></tr><tr><td>CoLA</td><td>3×10-5</td><td>1200 steps</td><td>128</td><td>120 steps</td><td></td></tr><tr><td rowspan="4">RoBERTa</td><td>RTE</td><td>2×10-5</td><td>2036 steps</td><td>16</td><td>122 steps</td><td></td></tr><tr><td>MRPC</td><td>1×10-5</td><td>2296 steps</td><td>16</td><td>137 steps</td><td></td></tr><tr><td>STS-B</td><td>2×10-5</td><td>3598 steps</td><td>16</td><td>214 steps</td><td></td></tr><tr><td>CoLA</td><td>1×10-5</td><td>5336 steps</td><td>16</td><td>320 steps</td><td>=</td></tr><tr><td rowspan="4">ELECTRA</td><td>RTE</td><td>5×10-5</td><td>10 epochs</td><td>32</td><td>10%</td><td>0.9</td></tr><tr><td>MRPC</td><td>5×10-5</td><td>3 epochs</td><td>32</td><td>10%</td><td>0.9</td></tr><tr><td>STS-B</td><td>5×10-5</td><td>10 epochs</td><td>32</td><td>10%</td><td>0.9</td></tr><tr><td>CoLA</td><td>5×10-5</td><td>3 epochs</td><td>32</td><td>10%</td><td>0.9</td></tr><tr><td rowspan="4">BART</td><td>RTE</td><td>1×10-5</td><td>1018 steps</td><td>32</td><td>61 steps</td><td>-</td></tr><tr><td>MRPC</td><td>2×10-5</td><td>1148 steps</td><td>64</td><td>68 steps</td><td></td></tr><tr><td>STS-B</td><td>2×10-5</td><td>1799 steps</td><td>32</td><td>107 steps</td><td></td></tr><tr><td>CoLA</td><td>2×10-5</td><td>1334 steps</td><td>64</td><td>80 steps</td><td></td></tr></table>
|
| 343 |
+
|
| 344 |
+
<table><tr><td rowspan="2"></td><td colspan="2">RTE</td><td colspan="2">MRPC</td><td colspan="2">STS-B</td><td colspan="2">CoLA</td></tr><tr><td>Standard</td><td>Re-init</td><td>Standard</td><td>Re-init</td><td>Standard</td><td>Re-init</td><td>Standard</td><td>Re-init</td></tr><tr><td>XLNet</td><td>71.7± 12.6</td><td>80.1 ± 1.6</td><td>92.3± 4.3</td><td>94.5± 0.8</td><td>[86.8 ± 20.4 91.7± 0.3</td><td></td><td>51.8± 22.5</td><td>62.0± 2.1</td></tr><tr><td>RoBERTa</td><td>78.2 ± 12.1</td><td>83.5 ± 1.4</td><td>94.4±0.9</td><td>94.8±0.9</td><td>91.8±0.3</td><td>91.8±0.2</td><td>68.4±2.2</td><td>67.6 ± 1.5</td></tr><tr><td>ELECTRA</td><td>87.1 ± 1.2</td><td>86.1 ± 1.9</td><td>95.7±0.8</td><td>95.3±0.8</td><td>91.8 ± 1.9</td><td>92.1±0.5</td><td>62.1± 20.4</td><td>:61.3± 20.1</td></tr><tr><td>BART</td><td>84.1 ± 2.0</td><td>83.5±1.5</td><td>93.5±0.9</td><td>93.7±1.2</td><td>91.7±0.3</td><td>91.8±0.3</td><td>65.4±1.9</td><td>64.9 ± 2.3</td></tr></table>
|
| 345 |
+
|
| 346 |
+
Table 7: Average Test performance with standard deviation on four small datasets with four different pre-trained models. For each setting, the better numbers are bolded and are in blue if the improvement is statistically significant.
|
| 347 |
+
|
| 348 |
+
more data. BART is a sequence-to-sequence model trained as a denoising autoencoder. ELECTRA is a BERT-like model trained to distinguish tokens generated by masked language model from tokens drawn from the natural distribution. Together, they represent a diverse range of modeling choices in pre-training, including different model architectures, objectives, data, and training strategies. We use ADAM with debiasing to fine-tune these models on RTE, MRPC, STS-B, and COLA, using the hyperparameters that are either described in the paper or in the official repository of each model. Table 6 summarizes the hyper-parameters of each model for each dataset. We use the huggingface’s Transformers library (Wolf et al., 2019). The experimental setup is kept the same as our other experiments. Table 7 displays the average test performance on these datasets. We observe that several models suffer from high instability on these datasets and in most cases, Re-init can reduce the performance variance. We observe that for some models, like XLNetLarge or $\mathrm { R o B E R T a _ { L a r g e } }$ , Re-init can improve the average performance and reduce variance. However, the behavior of Re-init varies significantly across different models and Re-init have less significant improvement for ELECTRALarge and $\mathrm { B A R T _ { L a r g e } }$ . Further study of the entire model family requires significant computational resources, and we leave it as an important direction for future work.
|
| 349 |
+
|
| 350 |
+
# G SUPPLEMENTARY MATERIAL FOR SECTION 6
|
| 351 |
+
|
| 352 |
+
Figure 14 plots the validation performance as a function of the number of training iteration, using the same setting as in Figure 8. Similar to our observations in Figure 8, we find that training longer generally improves fine-tuning performance and reduces the gap between standard fine-tuning and Re-init. On MNLI, Re-init still outperforms standard fine-tuning.
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
Figure 14: Mean (solid lines) and range (shaded region) of validation performance trained with different number of iterations, across eight random trials.
|
| 356 |
+
|
| 357 |
+
# H EXPERIMENTAL DETAILS IN SECTION 7
|
| 358 |
+
|
| 359 |
+
The hyperparameter search space allocated for each method in our experiments is:
|
| 360 |
+
|
| 361 |
+
Layerwise Learning Rate Decay (LLRD) We grid search the initial learning rate in $\{ 2 \times 1 0 ^ { - 5 } , 5 \times$ $1 0 ^ { - 5 } , 1 \times 1 0 ^ { - 4 } \}$ and the layerwise decay rate in $\{ 0 . 9 , 0 . 9 5 \}$ .
|
| 362 |
+
|
| 363 |
+
Mixout We tune the mixout probability $p \in \{ 0 . 1 , 0 . 3 , 0 . 5 , 0 . 7 , 0 . 9 \}$ .
|
| 364 |
+
|
| 365 |
+
Weight decay toward the pre-trained weight We tune the regularization strength $\lambda \in$ $\{ 1 0 ^ { - 3 } , 1 0 ^ { - 2 } , \dot { 1 } 0 ^ { - 1 } , 1 0 ^ { 0 } \}$ .
|
| 366 |
+
|
| 367 |
+
Weight decay We tune the regularization strength $\lambda \in \{ 1 0 ^ { - 4 } , 1 0 ^ { - 3 } , 1 0 ^ { - 2 } , 1 0 ^ { - 1 } \}$ .
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 15: $L 2$ distance to the initialization during fine-tuning BERT on RTE.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 16: $L 2$ distance to the initialization during fine-tuning BERT on MRPC.
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
Figure 17: $L 2$ distance to the initialization during fine-tuning BERT on STS-B.
|
| 377 |
+
|
| 378 |
+

|
| 379 |
+
Figure 18: $L 2$ distance to the initialization during fine-tuning BERT on CoLA.
|
parse/train/cO1IH43yUF/cO1IH43yUF_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/cO1IH43yUF/cO1IH43yUF_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/cO1IH43yUF/cO1IH43yUF_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vlm/train/AVx0r_GppCu/0.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/1.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/10.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/2.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/3.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/4.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/5.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/6.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/7.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/8.png
ADDED
|
Git LFS Details
|
vlm/train/AVx0r_GppCu/9.png
ADDED
|
Git LFS Details
|
vlm/train/B1l6y0VFPr/21.png
ADDED
|
Git LFS Details
|
vlm/train/B1l6y0VFPr/38.png
ADDED
|
Git LFS Details
|
vlm/train/B1l6y0VFPr/6.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/0.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/1.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/10.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/11.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/12.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/13.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/14.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/15.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/16.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/17.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/18.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/19.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/2.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/20.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/21.png
ADDED
|
Git LFS Details
|
vlm/train/BJxI5gHKDr/22.png
ADDED
|
Git LFS Details
|