ZHANGYUXUAN-zR commited on
Commit
08918c0
·
verified ·
1 Parent(s): be098e2

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/1YLJDvSx6J4/1YLJDvSx6J4.md +403 -0
  2. parse/train/1YLJDvSx6J4/1YLJDvSx6J4_content_list.json +0 -0
  3. parse/train/1YLJDvSx6J4/1YLJDvSx6J4_middle.json +0 -0
  4. parse/train/1YLJDvSx6J4/1YLJDvSx6J4_model.json +0 -0
  5. parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI.md +462 -0
  6. parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI_content_list.json +1065 -0
  7. parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI_middle.json +0 -0
  8. parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI_model.json +0 -0
  9. parse/train/6nbpPqUCIi7/6nbpPqUCIi7.md +0 -0
  10. parse/train/6nbpPqUCIi7/6nbpPqUCIi7_content_list.json +1438 -0
  11. parse/train/6nbpPqUCIi7/6nbpPqUCIi7_middle.json +0 -0
  12. parse/train/6nbpPqUCIi7/6nbpPqUCIi7_model.json +0 -0
  13. parse/train/BJuWrGW0Z/BJuWrGW0Z.md +248 -0
  14. parse/train/BJuWrGW0Z/BJuWrGW0Z_content_list.json +1189 -0
  15. parse/train/BJuWrGW0Z/BJuWrGW0Z_middle.json +0 -0
  16. parse/train/BJuWrGW0Z/BJuWrGW0Z_model.json +0 -0
  17. parse/train/BkxnKkrtvS/BkxnKkrtvS.md +499 -0
  18. parse/train/BkxnKkrtvS/BkxnKkrtvS_content_list.json +0 -0
  19. parse/train/BkxnKkrtvS/BkxnKkrtvS_middle.json +0 -0
  20. parse/train/BkxnKkrtvS/BkxnKkrtvS_model.json +0 -0
  21. parse/train/ETBc_MIMgoX/ETBc_MIMgoX.md +357 -0
  22. parse/train/ETBc_MIMgoX/ETBc_MIMgoX_content_list.json +0 -0
  23. parse/train/ETBc_MIMgoX/ETBc_MIMgoX_middle.json +0 -0
  24. parse/train/ETBc_MIMgoX/ETBc_MIMgoX_model.json +0 -0
  25. parse/train/H1lefTEKDS/H1lefTEKDS.md +514 -0
  26. parse/train/H1lefTEKDS/H1lefTEKDS_content_list.json +0 -0
  27. parse/train/H1lefTEKDS/H1lefTEKDS_middle.json +0 -0
  28. parse/train/H1lefTEKDS/H1lefTEKDS_model.json +0 -0
  29. parse/train/Hke0V1rKPS/Hke0V1rKPS.md +329 -0
  30. parse/train/Hke0V1rKPS/Hke0V1rKPS_content_list.json +1675 -0
  31. parse/train/Hke0V1rKPS/Hke0V1rKPS_middle.json +0 -0
  32. parse/train/Hke0V1rKPS/Hke0V1rKPS_model.json +0 -0
  33. parse/train/HktRlUlAZ/HktRlUlAZ.md +357 -0
  34. parse/train/HktRlUlAZ/HktRlUlAZ_content_list.json +1836 -0
  35. parse/train/HktRlUlAZ/HktRlUlAZ_middle.json +0 -0
  36. parse/train/HktRlUlAZ/HktRlUlAZ_model.json +0 -0
  37. parse/train/MRQJmsNPp8E/MRQJmsNPp8E.md +341 -0
  38. parse/train/MRQJmsNPp8E/MRQJmsNPp8E_content_list.json +1801 -0
  39. parse/train/MRQJmsNPp8E/MRQJmsNPp8E_middle.json +0 -0
  40. parse/train/MRQJmsNPp8E/MRQJmsNPp8E_model.json +0 -0
  41. parse/train/NJS8kp15zzH/NJS8kp15zzH.md +180 -0
  42. parse/train/NJS8kp15zzH/NJS8kp15zzH_model.json +0 -0
  43. parse/train/Rd138pWXMvG/Rd138pWXMvG.md +319 -0
  44. parse/train/Rd138pWXMvG/Rd138pWXMvG_content_list.json +1533 -0
  45. parse/train/S1HEBe_Jl/S1HEBe_Jl.md +291 -0
  46. parse/train/S1HEBe_Jl/S1HEBe_Jl_content_list.json +1632 -0
  47. parse/train/S1HEBe_Jl/S1HEBe_Jl_middle.json +0 -0
  48. parse/train/S1HEBe_Jl/S1HEBe_Jl_model.json +0 -0
  49. parse/train/S1XolQbRW/S1XolQbRW.md +624 -0
  50. parse/train/S1XolQbRW/S1XolQbRW_content_list.json +0 -0
parse/train/1YLJDvSx6J4/1YLJDvSx6J4.md ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING FROM PROTEIN STRUCTURE WITH GEOMETRIC VECTOR PERCEPTRONS
2
+
3
+ Bowen Jing∗, Stephan Eismann∗, Patricia Suriana, Raphael J.L. Townshend, Ron O. Dror Stanford University {bjing, seismann, psuriana, raphael, rondror}@cs.stanford.edu
4
+
5
+ # ABSTRACT
6
+
7
+ Learning on 3D structures of large biomolecules is emerging as a distinct area in machine learning, but there has yet to emerge a unifying network architecture that simultaneously leverages the geometric and relational aspects of the problem domain. To address this gap, we introduce geometric vector perceptrons, which extend standard dense layers to operate on collections of Euclidean vectors. Graph neural networks equipped with such layers are able to perform both geometric and relational reasoning on efficient representations of macromolecules. We demonstrate our approach on two important problems in learning from protein structure: model quality assessment and computational protein design. Our approach improves over existing classes of architectures on both problems, including state-ofthe-art convolutional neural networks and graph neural networks. We release our code at https://github.com/drorlab/gvp.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Many efforts in structural biology aim to predict, or derive insights from, the structure of a macromolecule (such as a protein, RNA, or DNA), represented as a set of positions associated with atoms or groups of atoms in 3D Euclidean space. These problems can often be framed as functions mapping the input domain of structures to some property of interest—for example, predicting the quality of a structural model or determining whether two molecules will bind in a particular geometry. Thanks to their importance and difficulty, such problems, which we broadly refer to as learning from structure, have recently developed into an exciting and promising application area for deep learning (Graves et al., 2020; Ingraham et al., 2019; Pereira et al., 2016; Townshend et al., 2019; Won et al., 2019).
12
+
13
+ Successful applications of deep learning are often driven by techniques that leverage the problem structure of the domain—for example, convolutions in computer vision (Cohen & Shashua, 2017) and attention in natural language processing (Vaswani et al., 2017). What are the relevant considerations in the domain of learning from structure? Using proteins as the most common example, we have on the one hand the arrangement and orientation of the amino acid residues in space, which govern the dynamics and function of the molecule (Berg et al., 2002). On the other hand, proteins also possess relational structure in terms of their amino-acid sequence and the residue-residue interactions that mediate the aforementioned protein properties (Hammes-Schiffer & Benkovic, 2006). We refer to these as the geometric and relational aspects of the problem domain, respectively.
14
+
15
+ Recent state-of-the-art methods for learning from structure leverage one of these two aspects. Commonly, such methods employ either graph neural networks (GNNs), which are expressive in terms of relational reasoning (Battaglia et al., 2018), or convolutional neural networks (CNNs), which operate directly on the geometry of the structure. Here, we present a unifying architecture that bridges these two families of methods to leverage both aspects of the problem domain.
16
+
17
+ We do so by introducing geometric vector perceptrons (GVPs), a drop-in replacement for standard multi-layer perceptrons (MLPs) in aggregation and feed-forward layers of GNNs. GVPs operate directly on both scalar and geometric features—features that transform as a vector under a rotation of spatial coordinates. GVPs therefore allow for the embedding of geometric information at nodes and edges without reducing such information to scalars that may not fully capture complex geometry. We postulate that our approach makes it easier for a GNN to learn functions whose significant features are both geometric and relational.
18
+
19
+ Our method (GVP-GNN) can be applied to any problem where the input domain is a structure of a single macromolecule or of molecules bound to one another. In this work, we specifically demonstrate our approach on two problems connected to protein structure: computational protein design and model quality assessment. Computational protein design (CPD) is the conceptual inverse of protein structure prediction, aiming to infer an amino acid sequence that will fold into a given structure. Model quality assessment (MQA) aims to select the best structural model of a protein from a large pool of candidate structures and is an important step in structure prediction (Cheng et al., 2019). Our method outperforms existing methods on both tasks.
20
+
21
+ # 2 RELATED WORK
22
+
23
+ ML methods for learning from protein structure largely fall into one of three types, operating on sequential, voxelized, or graph-structured representations of proteins. We briefly discuss each type and introduce state-of-the-art examples for MQA and CPD to set the stage for our experiments later.
24
+
25
+ Sequential representations In traditional models of learning from protein structure, each amino acid is represented as a feature vector using hand-crafted representations of the 3D structural environment. These representations include residue contacts (Olechnovic & Venclovas, 2017), ori- ˇ entations or positions collectively projected to local coordinates (Karasikov et al., 2019), physicsinspired energy terms (O’Connell et al., 2018; Uziela et al., 2017), or context-free grammars of protein topology (Greener et al., 2018). The structure is then viewed as a sequence or collection of such features which can be fed into a 1D convolutional network, RNN, or dense feedforward network. Although these methods only indirectly represent the full 3D structure of the protein, a number of them, such as ProQ4 (Hurtado et al., 2018), VoroMQA (Olechnovic & Venclovas, 2017), ˇ and SBROD (Karasikov et al., 2019), are competitive in assessments of MQA.
26
+
27
+ Voxelized representations In lieu of hand-crafted representations of structure, 3D convolutional neural networks (CNNs) can operate directly on the positions of atoms in space, encoded as occupancy maps in a voxelized 3D volume. The hierarchical convolutions of such networks are easily compatible with the detection of structural motifs, binding pockets, and the specific shapes of other important structural features, leveraging the geometric aspect of the domain. A number of CPD methods (Anand et al., 2020; Zhang et al., 2019; Shroff et al., 2019) and the MQA methods 3DCNN (Derevyanko et al., 2018) and Ornate (Pages et al., 2019) exemplify the power of this approach. \`
28
+
29
+ Graph-structured representations A protein structure can also be represented as a proximity graph over amino acid nodes, reducing the challenge of representing a collective structural neighborhood in a single feature vector to that of representing individual edges. Graph neural networks (GNNs) can then perform complex relational reasoning over structures (Battaglia et al., 2018)—for example, identifying key relationships among amino acids, or flexible structural motifs described as a connectivity pattern rather than a rigid shape. Recent state-of-the-art GNNs include Structured Transformer (Ingraham et al., 2019) on CPD, ProteinSolver (Strokach et al., 2020) on CPD and mutation stability prediction, and GraphQA (Baldassarre et al., 2020) on MQA. These methods vary in their representation of geometry: while some, such as ProteinSolver and GraphQA, represent edges as a function of their length, others, such as Structured Transformer, indirectly encode the 3D geometry of the proximity graph in terms of relative orientations and other scalar features.
30
+
31
+ # 3 METHODS
32
+
33
+ Our architecture seeks to combine the strengths of CNN and GNN methods in learning from biomolecular structure by improving the latter’s ability to reason geometrically. The GNNs described in the previous section encode the 3D geometry of the protein by encoding vector features (such as node orientations and edge directions) in terms of rotation-invariant scalars, often by defining a local coordinate system at each node. We instead propose that these features be directly represented as geometric vectors—features in $\mathbb { R } ^ { 3 }$ which transform appropriately under a change of spatial coordinates—at all steps of graph propagation.
34
+
35
+ ![](images/2268d3302566107314aa3f5edce89ab79bf0db96378e824cba72d9ce8dda105c.jpg)
36
+ Figure 1: (A) Schematic of the geometric vector perceptron illustrating Algorithm 1. Given a tuple of scalar and vector input features $( \mathbf { s } , \mathbf { V } )$ , the perceptron computes an updated tuple $( { \bf s } ^ { \prime } , { \bf V } ^ { \prime } )$ . $\mathbf { s } ^ { \prime }$ is a function of both s and V. (B) Illustration of the structure-based prediction tasks. In computational protein design (top), the goal is to predict an amino acid sequence that would fold into a given protein backbone structure. Individual atoms are represented as colored spheres. In model quality assessment (bottom), the goal is to predict the quality score of a candidate structure, which measures the similarity of the candidate with respect to the experimentally determined structure (in gray).
37
+
38
+ This conceptual shift has two important ramifications. First, the input representation is more efficient: instead of encoding the orientation of a node by its relative orientation with all of its neighbors, we only have to represent one absolute orientation per node. Second, it standardizes a global coordinate system across the entire structure, which allows geometric features to be directly propagated without transforming between local coordinates. For example, representations of arbitrary positions in space—including points that are not themselves nodes—can be easily propagated across the graph by Euclidean vector addition. We postulate this allows the GNN to more easily access global geometric properties of the structure. The key challenge with this representation, however, is to perform graph propagation in a way that simultaneously preserves the full expressive power of the original GNN while maintaining the rotation invariance provided by the scalar representations. We do so by introducing a new module, the geometric vector perceptron, to replace dense layers in a GNN.
39
+
40
+ # 3.1 GEOMETRIC VECTOR PERCEPTRONS
41
+
42
+ The geometric vector perceptron is a simple module for learning vector-valued and scalar-valued functions over geometric vectors and scalars. That is, given a tuple $( \mathbf { s } , \mathbf { V } )$ of scalar features $\mathbf { s } \in \mathbb { R } ^ { n }$ and vector features $\mathbf { V } \in \mathbb { R } ^ { \nu \times 3 }$ , we compute new features $( \mathbf { s } ^ { \prime } , \mathbf { V } ^ { \prime } ) \in \mathbb { R } ^ { m } \times \mathbb { R } ^ { \mu \times 3 }$ . The computation is illustrated in Figure 1A and formally described in Algorithm 1.
43
+
44
+ At its core, the GVP consists of two separate linear transformations $\mathbf { W } _ { m } , \mathbf { W } _ { h }$ for the scalar and vector features, followed by nonlinearities $\sigma , \sigma ^ { + }$ . However, before the scalar features are transformed, we concatenate the $L _ { 2 }$ norm of the transformed vector features $\mathbf { V } _ { h }$ ; this allows us to extract rotation-invariant information from the input vectors $\mathbf { V }$ . An additional linear transformation $\mathbf { W } _ { \mu }$ is inserted just before the vector nonlinearity to control the output dimensionality independently of the number of norms extracted.
45
+
46
+ The GVP is conceptually simple, yet provably possesses the desired properties of invariance/equivariance and expressiveness. First, the vector and scalar outputs of the GVP are equivariant and invariant, respectively, with respect to an arbitrary composition $R$ of rotations and reflections in 3D Euclidean space — i.e., if $\mathbf { G } \mathbf { V } \mathbf { P } ( \mathbf { s } , \mathbf { V } ) = ( \mathbf { s } ^ { \prime } , \mathbf { V } ^ { \prime } )$ then
47
+
48
+ $$
49
+ \operatorname { G V P } ( \mathbf { s } , R ( \mathbf { V } ) ) = ( \mathbf { s } ^ { \prime } , R ( \mathbf { V } ^ { \prime } ) )
50
+ $$
51
+
52
+ # Algorithm 1 Geometric vector perceptron
53
+
54
+ Input: Scalar and vector features (s, V) ∈ Rn × Rν×3 .
55
+ Output: Scalar and vector features $( \mathbf { s } ^ { \prime } , \mathbf { V } ^ { \prime } ) \in \mathbb { R } ^ { m } \times \mathbb { R } ^ { \mu \times 3 }$ .
56
+ $h \operatorname* { m a x } ( \nu , \mu )$
57
+ GVP: Vh ← WhV ∈ Rh×3 Vµ ← WµVh ∈ Rµ×3 sh ← kVhk (row-wise) $\in \mathbb { R } ^ { h }$ vµ ← kVµk (row-wise) $\in \mathbb { R } ^ { \mu }$ sh+n ← concat (sh, s) ∈ Rh+n sm ← Wmsh+n + b ∈ Rm s0 ← σ (sm) ∈ Rm $\mathbf { V } ^ { \prime } \sigma ^ { + } ( \mathbf { v } _ { \mu } ) \odot \mathbf { V } _ { \mu }$ (row-wise multiplication) ∈ Rµ×3
58
+ return $( \mathbf { s } ^ { \prime } , \mathbf { V } ^ { \prime } )$
59
+
60
+ This is due to the fact that the only operations on vector-valued inputs are scalar multiplication, linear combination, and the $L _ { 2 }$ norm.1 We include a formal proof in Appendix A.
61
+
62
+ In addition, the GVP architecture can approximate any continuous rotation- and reflection-invariant scalar-valued function of $\mathbf { V }$ . More precisely, let $G _ { s }$ be a GVP defined with $n , \mu = 0 \quad$ —that is, one which transforms vector features to scalar features. Then for any function ${ f } : \mathbb { R } ^ { \nu \times 3 } \mathbb { R }$ invariant with respect to rotations and reflections in 3D, there exists a functional form $G _ { s }$ able to $\epsilon$ -approximate $f$ , given mild assumptions.
63
+
64
+ Theorem. Let $R$ describe an arbitrary rotation and/or reflection in $\mathbb { R } ^ { 3 }$ . For $\nu \geq 3$ let $\Omega ^ { \nu } \subset \mathbb { R } ^ { \nu \times 3 }$ be the set of all ${ \bf V } = \left[ { \bf v } _ { 1 } , \quad \ldots , \quad { \bf v } _ { \nu } \right] ^ { T } \in \mathbb { R } ^ { \nu \times 3 }$ such that $\mathbf { v } _ { 1 } , \mathbf { v } _ { 2 } , \mathbf { v } _ { 3 }$ are linearly independent and $0 < | | \mathbf { v } _ { i } | | _ { 2 } \leq b$ for all $i$ and some finite $b > 0$ . Then for any continuous $F : \Omega ^ { \nu } \to \mathbb { R }$ such that $F ( R ( \mathbf { V } ) ) \ : = \ : F ( \mathbf { V } )$ and for any $\epsilon > 0$ , there exists a form $f ( \mathbf { V } ) \ = \ \mathbf { w } ^ { T } G _ { s } ( \mathbf { V } )$ such that $| F ( \mathbf { V } ) - f ( \mathbf { V } ) | < \epsilon$ for all $\mathbf { V } \in \Omega ^ { \nu }$ .
65
+
66
+ We include a formal proof in Appendix A. As a corollary, a GVP with nonzero $n , \mu$ is also able to approximate similarly-defined functions over the full input domain Rn × Rν×3.
67
+
68
+ In addition to the GVP layer itself, we use a version of dropout that drops entire vector channels at random (as opposed to coordinates within vector channels). We also introduce layer normalization for the vector features as
69
+
70
+ $$
71
+ \begin{array} { r l } { \mathbf { V } \mathbf { V } / \sqrt { \frac { 1 } { \nu } \| \mathbf { V } \| _ { 2 } ^ { 2 } } } & { { } \in \mathbb { R } ^ { \nu \times 3 } } \end{array}
72
+ $$
73
+
74
+ That is, we scale the row vectors of $\mathbf { V }$ such that their root-mean-square norm is one. This vector layer norm has no trainable parameters, but we continue to use normal layer normalization on scalar channels with trainable parameters $\gamma , \beta$ .
75
+
76
+ We study our hypothesis that GVPs augment the geometric reasoning ability of GNNs on a synthetic dataset (Appendix B). The synthetic dataset allows us to control the function underlying the groundtruth label in order to explicitly separate geometric and relational aspects in different tasks. The GVP-augmented GNN (or GVP-GNN) matches a CNN on a geometric task and a standard GNN on a relational task. However, when we combine the two tasks in one objective, the GVP-GNN does significantly better than either a GNN or a CNN.
77
+
78
+ # 3.2 REPRESENTATIONS OF PROTEINS
79
+
80
+ The main empirical validation of our architecture is its performance on two real-world tasks: computational protein design (CPD) and model quality assessment (MQA). These tasks, as illustrated in Figure 1B and described in detail in Section 4, are complementary in that one (CPD) predicts a property for each amino acid while the other (MQA) predicts a global property.
81
+
82
+ We represent a protein structure input as a proximity graph with a minimal number of scalar and vector features to specify the 3D structure of the molecule. A protein structure is a sequence of amino acids, where each amino acid consists of four backbone atoms2 and a set of sidechain atoms located in 3D Euclidean space. We represent only the backbone because the sidechains are unknown in CPD, and our MQA benchmark corresponds to the assessment of backbone structure only.
83
+
84
+ Let $\mathrm { X } _ { i }$ be the position of atom $\mathrm { X }$ in the $i$ th amino acid (e.g. $\Nu _ { i }$ is the position of the nitrogen atom in the ith amino acid). We represent backbone structure as a graph $\bar { \boldsymbol { \mathcal { G } } } = ( \mathcal { V } , \mathcal { E } )$ where each node ${ \mathfrak { v } } _ { i } \in \mathcal { V }$ corresponds to an amino acid and has embedding $\mathbf { h } _ { \mathfrak { v } } ^ { ( i ) }$ with the following features:
85
+
86
+ • Scalar features $\{ \sin , \cos \} \circ \{ \phi , \psi , \omega \}$ , where $\phi , \psi , \omega$ are the dihedral angles computed from $\mathrm { C } _ { i - 1 }$ $\mathbf { \epsilon } _ { \cdot 1 } , \mathbf { N } _ { i } , \mathbf { \epsilon }$ $\mathrm { C } \alpha _ { i }$ , $\mathrm { C } _ { i }$ , and $\mathrm { N } _ { i + 1 }$ .
87
+ • The forward and reverse unit vectors in the directions of $\mathbf { C } \alpha _ { i + 1 } - \mathbf { C } \alpha _ { i }$ and $\mathbf { C } \alpha _ { i - 1 } - \mathbf { C } \alpha _ { i }$ , respectively.
88
+ • The unit vector in the imputed direction of $\mathbf { C } \beta _ { i } - \mathbf { C } \alpha _ { i }$ .3 This is computed by assuming tetrahedral geometry and normalizing
89
+
90
+ $$
91
+ \sqrt { \frac { 1 } { 3 } } ( \mathbf { n } \times \mathbf { c } ) / | | \mathbf { n } \times \mathbf { c } | | _ { 2 } - \sqrt { \frac { 2 } { 3 } } ( \mathbf { n } + \mathbf { c } ) / | | \mathbf { n } + \mathbf { c } | | _ { 2 }
92
+ $$
93
+
94
+ where $\mathbf { n } = \mathbf { N } _ { i } - \mathbf { C } \alpha _ { i }$ and $\mathbf { c } = \mathbf { C } _ { i } - \mathbf { C } \alpha _ { i }$ . This vector, along with the forward and reverse unit vectors, unambiguously define the orientation of each amino acid residue.
95
+
96
+ • A one-hot representation of amino acid identity, when available.
97
+
98
+ The set of edges is $\mathcal E = \{ { \bf e } _ { j i } \} _ { i \neq j }$ for all $i , j$ where ${ \mathfrak { v } } _ { j }$ is among the $k = 3 0$ nearest neighbors of ${ \mathfrak { v } } _ { i }$ as measured by the distance between their $\mathbf { \boldsymbol { C } } \alpha$ atoms. Each edge has an embedding $\mathbf { h } _ { e } ^ { ( j i ) }$ with the following features:
99
+
100
+ • The unit vector in the direction of $\mathbf { C } \alpha _ { j } - \mathbf { C } \alpha _ { i }$ .
101
+ • The encoding of the distance $| | \mathbf { C } \boldsymbol { \alpha } _ { j } - \mathbf { C } \boldsymbol { \alpha } _ { i } | | _ { 2 }$ in terms of Gaussian radial basis functions.4
102
+ • A sinusoidal encoding of $j - i$ as described in Vaswani et al. (2017), representing distance along the backbone.
103
+
104
+ In our notation, each feature vector $\mathbf { h }$ is a concatenation of scalar and vector features as described above. Collectively, these features are sufficient for a complete description of the protein backbone.
105
+
106
+ # 3.3 NETWORK ARCHITECTURE
107
+
108
+ Our architecture (GVP-GNN) leverages message passing (Gilmer et al., 2017) in which messages from neighboring nodes and edges are used to update node embeddings at each graph propagation step. More explicitly, the architecture takes as input the protein graph defined above and performs graph propagation steps according to:
109
+
110
+ $$
111
+ \begin{array} { r c l } { \displaystyle \mathbf { h } _ { m } ^ { ( j \to i ) } } & { : = } & { g ( \mathrm { c o n c a t } ( \mathbf { h } _ { \mathfrak { v } } ^ { ( j ) } , \mathbf { h } _ { e } ^ { ( j \to i ) } ) ) } \\ { \displaystyle \mathbf { h } _ { \mathfrak { v } } ^ { ( i ) } } & { } & { \mathrm { L a y e r N o r m } ( \mathbf { h } _ { \mathfrak { v } } ^ { ( i ) } + \frac { 1 } { k ^ { \prime } } \mathrm { D r o p o u t } ( \sum _ { j : \mathbf { e } _ { j \to i } \in \mathcal { E } } \mathbf { h } _ { m } ^ { ( j \to i ) } ) ) } \end{array}
112
+ $$
113
+
114
+ Here, $g$ is a sequence of three GVPs, $\mathbf { h } _ { \mathfrak { v } } ^ { ( i ) }$ and $\mathbf { h } _ { e } ^ { ( j i ) }$ are the embeddings of the node $i$ and edge $( j i )$ as above, and $\mathbf { h } _ { m } ^ { ( j i ) }$ represents the message passed from node $j$ to node $i$ . $k ^ { \prime }$ is the number of incoming messages, which is equal to $k$ unless the protein contains fewer than $k$ amino acid residues. Between graph propagation steps, we also use a feed-forward point-wise layer to update the node embeddings at all nodes $i$ :
115
+
116
+ $$
117
+ \mathbf { h } _ { \mathfrak { v } } ^ { ( i ) } \mathrm { L a y e r N o r m } ( \mathbf { h } _ { \mathfrak { v } } ^ { ( i ) } + \mathrm { D r o p o u t } ( g ( \mathbf { h } _ { \mathfrak { v } } ^ { ( i ) } ) ) )
118
+ $$
119
+
120
+ where $g$ is a sequence of two GVPs. These graph propagation and feed-forward steps update the vector features at each node in addition to its scalar features.
121
+
122
+ In computational protein design, the network learns a generative model over the space of protein sequences conditioned on the given backbone structure. Following Ingraham et al. (2019), we frame this as an autoregressive task and use a masked encoder-decoder architecture to capture the joint distribution over all positions: for each $i$ , the network models the distribution at $i$ based on the complete structure graph, as well as the sequence information at positions $j < i$ . The encoder first performs three graph propagation steps on the structural information only. Then, sequence information is added to the graph, and the decoder performs three further graph propagation steps where incoming messages $\mathbf { h } _ { m } ^ { ( \bar { j } i ) }$ for $j \geq i$ are computed only with the encoder embeddings. Finally, we use one last GVP with 20-way scalar softmax output to predict the probability of the amino acids.
123
+
124
+ In model quality assessment, we use three graph propagation steps and perform regression against the true quality score of a candidate structure, a global scalar property. To obtain a single global representation, we apply a node-wise GVP to reduce all node embeddings to scalars. We then average the representations across all nodes and apply a final dense feed-forward network to output the network’s prediction.
125
+
126
+ Further details regarding training and hyperparameters can be found in Appendix D.
127
+
128
+ # 4 EVALUATION METRICS AND DATASETS
129
+
130
+ Protein design Computational protein design (CPD) is the conceptual inverse of protein structure prediction, aiming to infer an amino acid sequence that will fold into a given structure. CPD is difficult to directly benchmark, as some structures may correspond to a large space of sequences and others may correspond to none at all. Therefore, the proxy metric of native sequence recovery— inferring native sequences given their experimentally determined structures—is often used (Li et al., 2014; O’Connell et al., 2018; Wang et al., 2018). Drawing an analogy between sequence design and language modelling, Ingraham et al. (2019) also evaluate the model perplexity on held-out native sequences. Both metrics rest on the implicit assumption that native sequences are optimized for their structures (Kuhlman & Baker, 2000) and should be assigned high probabilities.
131
+
132
+ To best approximate real-world applications that may require design of novel structures, the held-out evaluation set should bear minimal similarity to the training structures. We use the CATH 4.2 dataset curated by Ingraham et al. (2019) in which all available structures with $40 \%$ nonredudancy are partitioned by their CATH (class, architecture, topology/fold, homologous superfamily) classification. The training, validation, and test splits consist of 18204, 608, and 1120 structures, respectively.
133
+
134
+ We also report results on TS50, an older test set of 50 native structures first introduced by Li et al. (2014). The smaller size of this benchmark also allows a comparison to the computationally expensive physics-based calculations of the fixbb protocol in Rosetta, a software suite well-established in the structural biology community (Das & Baker, 2008). No canonical training and validation sets exist for TS50. To evaluate on TS50, we filter the CATH 4.2 training and validation sets for sequences with less than $30 \%$ similarity (as computed by PSIBLAST) to any sequence in TS50.
135
+
136
+ Model quality assessment Model quality assessment (MQA) aims to select the best structural model of a protein from a large pool of candidate structures.5 The performance of different MQA methods is evaluated every two years in the community-wide Critical Assessment of Structure Prediction (CASP) (Cheng et al., 2019). For a number of recently solved but unreleased structures, called targets, structure generation programs produce a large number of candidate structures. MQA methods are evaluated by how well they predict the GDT-TS score of a candidate structure compared to the experimentally solved structure for that target. GDT-TS is a scalar measure of how similar two protein backbones are after global alignment (Zemla et al., 2001).
137
+
138
+ In addition to accurately predicting the absolute quality of a candidate structure, a good MQA method should also be able to accurately assess the relative model qualities among a pool of candidates for a given target so that the best ones can be selected, perhaps for further refinement. Therefore, MQA methods are commonly evaluated on two metrics: a global correlation between the predicted and ground truth scores, pooled across all targets, and the average per-target correlation among only the candidate structures for a specific target (Cao & Cheng, 2016; Derevyanko et al., 2018; Pages et al., 2019). We follow this convention in our experiments. \`
139
+
140
+ Table 1: GVP-GNN outperforms Structured Transformer and sets a new state-of-the art on the CATH 4.2 protein design test set (and its short and single-chain subsets) in terms of per-residue perplexity (lower is better) and recovery (higher is better). Recovery is reported as the median (over all structures) of the average $\%$ of residues correctly recovered in 100 sampled sequences.
141
+
142
+ <table><tr><td></td><td></td><td colspan="3">Perplexity</td><td colspan="3">Recovery %</td></tr><tr><td>Method</td><td>Type</td><td>Short</td><td>Single-chain</td><td>All</td><td>Short</td><td>Single-chain</td><td>All</td></tr><tr><td>GVP-GNN</td><td>GNN</td><td>7.10</td><td>7.44</td><td>5.29</td><td>32.1</td><td>32.0</td><td>40.2</td></tr><tr><td> Structured GNN</td><td>GNN</td><td>8.31</td><td>8.88</td><td>6.55</td><td>28.4</td><td>28.1</td><td>37.3</td></tr><tr><td>Structured Transformer</td><td>GNN</td><td>8.54</td><td>9.03</td><td>6.85</td><td>28.3</td><td>27.6</td><td>36.4</td></tr></table>
143
+
144
+ We train and validate on 79200 candidate structures for 528 targets submitted to CASP 5-10. We then test GVP-GNN on two MQA datasets. First, we score 20880 stage 1 and stage 2 candidate structures from CASP 11 (84 targets) and 12 (40 targets). This benchmark was first established by Karasikov et al. (2019) and has been used by many recently published methods. Second, to compare with a larger number of methods on more recent structural data, we also score 1472 stage 2 candidate structures from CASP 13 (20 targets). We add the CASP 11-12 structures to our training set to evaluate on CASP 13. Further details on the MQA datasets can be found in Appendix C.
145
+
146
+ # 5 EXPERIMENTS
147
+
148
+ Protein design GVP-GNN achieves state-of-the-art performance on CATH 4.2, representing a substantial improvement both in terms of perplexity and sequence recovery over Structured Transformer (Ingraham et al., 2019), a GNN method which was trained using the same training and validation sets (Table 1). Following Ingraham et al. (2019), we report evaluation on short (100 or fewer amino acid residues) and single-chain subsets of the CATH 4.2 test set, containing 94 and 103 proteins, respectively, in addition to the full test set. Although Structured Transformer leverages an attention mechanism on top of a graph-structured representation of proteins, the authors note in ablation studies that removing attention appeared to increase performance. We therefore retrain and compare against a version of Structured Transformer with the attention layers replaced with standard graph propagation operations (Structured GNN). Our method also improves upon this model.
149
+
150
+ On the smaller test set TS50, we achieve $4 4 . 9 \%$ recovery compared to Rosetta’s $30 \%$ and outperform methods based on each of the three classes of structural representations. Overall, we place 2nd out of 9 methods in terms of recovery (see Appendix E). However, the results for this test set should be taken with a grain of salt, given that the different methods did not use canonical training datasets.
151
+
152
+ Model quality assessment We compare GVP-GNN against other single-structure, structure-only methods on the CASP 11-12 test set in Table 2.6 These include the CNN methods 3DCNN (Derevyanko et al., 2018) and Ornate (Pages et al., 2019), the GNN method GraphQA (Baldas- \` sarre et al., 2020), and three methods that use sequential representations—VoroMQA (Olechnovicˇ & Venclovas, 2017), SBROD (Karasikov et al., 2019), and ProQ3D (Uziela et al., 2017). All of these methods learn solely from protein structure,7 with the exception of ProQ3D, which in addition uses sequence profiles based on alignments. We include ProQ3D because it is an improved version of the best single-model method in CASP 11 and CASP 12 (Uziela et al., 2017). GVP-GNN outperforms all other structural methods in both global and per-target correlation, and even performs better than ProQ3D on all but one benchmark. We also train and evaluate DimeNet, a recent 3D-aware GNN architecture which achieves state-of-the-art on many small-molecule tasks (Klicpera et al., 2019), on CASP 11-12. DimeNet does not outperform any of the models in Table 2 (see Appendix E).
153
+
154
+ Table 2: GVP-GNN improves over other single-structure, structure-only methods on CASP 11 and 12 in terms of global (Glob) and mean per-target (Per) Pearson correlation coefficients (higher is better). Each method is classified as one of the three types discussed in Section 2. ProQ3D is set aside as the only method shown which additionally uses sequence-based profiles. For each metric, the top performing structure-only method is in bold, as is the top method overall (if different).
155
+
156
+ <table><tr><td rowspan="3"></td><td rowspan="3"></td><td colspan="4">CASP 11</td><td colspan="4">CASP 12</td></tr><tr><td colspan="2">Stage 1</td><td colspan="2">Stage 2</td><td colspan="2">Stage 1</td><td colspan="2">Stage 2</td></tr><tr><td>Type Glob</td><td>Per</td><td>Glob</td><td>Per</td><td>Glob</td><td>Per</td><td>Glob</td><td>Per</td></tr><tr><td>GVP-GNN</td><td>GNN</td><td>0.84</td><td>0.66</td><td>0.87</td><td>0.45</td><td>0.79</td><td>0.73</td><td>0.82</td><td>0.62</td></tr><tr><td>3DCNN</td><td>CNN</td><td>0.59</td><td>0.52</td><td>0.64</td><td>0.40</td><td>0.49</td><td>0.44</td><td>0.61</td><td>0.51</td></tr><tr><td>Ornate</td><td>CNN</td><td>0.64</td><td>0.47</td><td>0.63</td><td>0.39</td><td>0.55</td><td>0.57</td><td>0.67</td><td>0.49</td></tr><tr><td>GraphQA</td><td>GNN</td><td>0.83</td><td>0.63</td><td>0.82</td><td>0.38</td><td>0.72</td><td>0.68</td><td>0.81</td><td>0.61</td></tr><tr><td>VoroMQA</td><td>Seq</td><td>0.69</td><td>0.62</td><td>0.65</td><td>0.42</td><td>0.46</td><td>0.61</td><td>0.61</td><td>0.56</td></tr><tr><td>SBROD</td><td>Seq</td><td>0.58</td><td>0.65</td><td>0.55</td><td>0.43</td><td>0.37</td><td>0.64</td><td>0.47</td><td>0.61</td></tr><tr><td>ProQ3D</td><td>Seq</td><td>0.80</td><td>0.69</td><td>0.77</td><td>0.44</td><td>0.67</td><td>0.71</td><td>0.81</td><td>0.60</td></tr></table>
157
+
158
+ Table 3: GVP-GNN improves over single-structure methods participating in CASP 13 on the 20 evaluated targets. The seven top methods highlighted by the CASP organizers are shown. GVPGNN is the top structure-only method and the top method overall in terms of global correlation.
159
+
160
+ <table><tr><td>Method</td><td>Global</td><td>Per-target</td></tr><tr><td>GVP-GNN</td><td>0.888</td><td>0.671</td></tr><tr><td>SASHAN</td><td>0.840</td><td>0.633</td></tr><tr><td>FaeNNz</td><td>0.810</td><td>0.650</td></tr><tr><td>VoroMQA-A</td><td>0.744</td><td>0.595</td></tr><tr><td>VoroMQA-B</td><td>0.726</td><td>0.586</td></tr><tr><td>ProQ3D</td><td>0.847</td><td>0.660</td></tr><tr><td>MULTICOM-NOVEL</td><td>0.652</td><td>0.551</td></tr><tr><td>ProQ4</td><td>0.604</td><td>0.691</td></tr></table>
161
+
162
+ We compare GVP-GNN with all 23 single-structure MQA methods participating in CASP 13 for which complete predictions on the 20 evaluation targets are available. Seven of these methods were highlighted as best-performing by the CASP organizers in Cheng et al. (2019) and are shown along with GVP-GNN in Table 3. These include four methods learning solely from structural features and three also using sequence profiles. SASHAN learns a linear model over secondary structure and contact-based features (Cheng et al., 2019). $\mathrm { F a e N N z } ^ { 8 }$ (Studer et al., 2020), ProQ3D (Uziela et al., 2017), and VoroMQA9 (Olechnovic & Venclovas, 2017) learn a multi-layer perceptron or ˇ statistical potential on top of such structural features. Finally, MULTICOM-NOVEL (Hou et al., 2019) and ProQ4 (Hurtado et al., 2018) employ one-dimensional deep convolutional networks on top of sequential representations. GVP-GNN outperforms all methods in terms of global correlation and outperforms all structure-only methods in per-target correlation. See Appendix E for full results.
163
+
164
+ Finally, because our architecture updates vector features along with scalar features at each node embedding, it is possible to visualize learned vector features in the intermediate layers of the trained MQA network. We show and discuss the interpretability of such features in Appendix F.
165
+
166
+ Ablation studies The methods we have compared against include a number of GNNs (Structured Transformer/GNN, ProteinSolver, GraphQA). We train a number of ablated models for CPD and MQA to identify the aspects of the GVP which most contribute to our performance improvement over these GNNs (Table 4). Replacing the GVP with a vanilla MLP layer or propagating only scalar features both remove direct access to geometric information, forcing the model to learn scalarvalued, indirect representations of geometry. These modifications result in considerable decreases in performance, underscoring the importance of direct access to geometric information. Propagating only the vector features results in an even larger decrease as it both eliminates important scalar input features (such as torsion angles and amino acid identity) and the part of the GVP with approximation guarantees. Therefore, the dual scalar/vector design of the GVP is essential: without either, the best ablated model falls short of Structured GNN on CPD and only matches GraphQA on MQA. Finally, eliminating the second vector transformation $\mathbf { W } _ { \mu }$ results in a slight decrease in performance. Therefore, all architectural elements contributed to our improvement over state-of-the-art.
167
+
168
+ Table 4: Ablations of the GVP architecture decrease performance on CPD and MQA. We include Structured GNN and GraphQA as state-of-the-art GNN references for CPD and MQA, respectively. Metrics are defined the same way as in Tables 1 (CPD) and 2 (MQA).
169
+
170
+ <table><tr><td></td><td colspan="2">CPD</td><td colspan="4">MQA</td></tr><tr><td></td><td colspan="2">CATH 4.2 All</td><td colspan="2">CASP 11 Stage 2</td><td colspan="2">CASP 12 Stage 2</td></tr><tr><td>Modification</td><td>Perplexity</td><td>Recovery</td><td>Global</td><td>Per-target</td><td>Global</td><td>Per-target</td></tr><tr><td>None</td><td>5.29</td><td>40.2</td><td>0.87</td><td>0.45</td><td>0.82</td><td>0.62</td></tr><tr><td>MLP layer</td><td>7.76</td><td>30.6</td><td>0.84</td><td>0.36</td><td>0.79</td><td>0.59</td></tr><tr><td>Only scalars</td><td>7.31</td><td>32.4</td><td>0.84</td><td>0.38</td><td>0.83</td><td>0.59</td></tr><tr><td>Only vectors</td><td>11.05</td><td>23.2</td><td>0.56</td><td>0.16</td><td>0.57</td><td>0.39</td></tr><tr><td>NoWμ</td><td>5.85</td><td>37.1</td><td>0.86</td><td>0.41</td><td>0.81</td><td>0.60</td></tr><tr><td>Structured GNN</td><td>6.55</td><td>37.3</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>GraphQA</td><td>1</td><td>1</td><td>0.82</td><td>0.38</td><td>0.81</td><td>0.61</td></tr></table>
171
+
172
+ # 6 CONCLUSION
173
+
174
+ In this work, we developed the first architecture designed specifically for learning on dual relational and geometric representations of 3D macromolecular structure. At its core, our method, GVP-GNN, augments graph neural networks with computationally simple layers that perform expressive geometric reasoning over Euclidean vector features. Our method possesses desirable theoretical properties and empirically outperforms existing architectures on learning quality scores and sequence designs, respectively, from protein structure.
175
+
176
+ The equivariance of GVP layers with respect to 3D translations and rotations also highlights a similarity to methods that leverage irreducible representations of $S O ( 3 )$ to define equivariant convolutions on point clouds (Thomas et al., 2018; Anderson et al., 2019). These methods allow for equivariant representations of higher-order tensors, but due to their complexity and computational cost, their applications have until recently been limited to small molecules (Eismann et al., 2020). Our architecture presents an alternative, relatively lightweight approach to equivariance that is wellsuited for large biomolecules and biomolecular complexes.
177
+
178
+ In further work, we hope to apply our architecture to other important structural biology problem areas, including protein complexes, RNA structure, and protein-ligand interactions.
179
+
180
+ # ACKNOWLEDGEMENTS
181
+
182
+ We acknowledge support from the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Scientific Discovery through Advanced Computing (SciDAC) program, and Intel Corporation. SE is supported by a Stanford Bio-X Bowes fellowship. RJLT is supported by the U.S. Department of Energy, Office of Science Graduate Student Research (SCGSR) program. We thank Tri Dao, Trenton Chang, and all members of the Dror group for feedback and discussions.
183
+
184
+ # REFERENCES
185
+
186
+ Namrata Anand, Raphael Ryuichi Eguchi, Alexander Derry, Russ B Altman, and Possu Huang. Protein sequence design with a learned potential. bioRxiv, 2020.
187
+
188
+ Brandon Anderson, Truong-Son Hy, and Risi Kondor. Cormorant: Covariant molecular neural networks. arXiv preprint arXiv:1906.04015, 2019.
189
+
190
+ Federico Baldassarre, David Menendez Hurtado, Arne Elofsson, and Hossein Azizpour. Graphqa: ´ Protein model quality assessment using graph convolutional network. 2019.
191
+
192
+ Federico Baldassarre, David Menndez Hurtado, Arne Elofsson, and Hossein Azizpour. GraphQA: protein model quality assessment using graph convolutional networks. Bioinformatics, 2020.
193
+
194
+ Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
195
+
196
+ Jeremy M Berg, John L Tymoczko, and Lubert Stryer. Biochemistry, W.H. Freeman and Company, 2002.
197
+
198
+ Renzhi Cao and Jianlin Cheng. Protein single-model quality assessment by feature-based probability density functions. Scientific reports, 6:23990, 2016.
199
+
200
+ Sheng Chen, Zhe Sun, Lihua Lin, Zifeng Liu, Xun Liu, Yutian Chong, Yutong Lu, Huiying Zhao, and Yuedong Yang. To improve protein sequence profile prediction through image captioning on pairwise residue distance map. Journal of Chemical Information and Modeling, 2019.
201
+
202
+ Jianlin Cheng, Myong-Ho Choe, Arne Elofsson, Kun-Sop Han, Jie Hou, Ali HA Maghrabi, Liam J McGuffin, David Menendez-Hurtado, Kliment Olechnovi ´ c, Torsten Schwede, et al. Estimation of ˇ model accuracy in casp13. Proteins: Structure, Function, and Bioinformatics, 87(12):1361–1377, 2019.
203
+
204
+ Nadav Cohen and Amnon Shashua. Inductive bias of deep convolutional networks through pooling geometry. In International Conference on Learning Representations, 2017.
205
+
206
+ George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303–314, 1989.
207
+
208
+ Rhiju Das and David Baker. Macromolecular modeling with rosetta. Annu. Rev. Biochem., 77: 363–382, 2008.
209
+
210
+ Georgy Derevyanko, Sergei Grudinin, Yoshua Bengio, and Guillaume Lamoureux. Deep convolutional networks for quality assessment of protein folds. Bioinformatics, 34(23):4046–4053, 2018.
211
+
212
+ Stephan Eismann, Raphael JL Townshend, Nathaniel Thomas, Milind Jagota, Bowen Jing, and Ron O Dror. Hierarchical, rotation-equivariant neural networks to select structural models of protein complexes. Proteins: Structure, Function, and Bioinformatics, 2020.
213
+
214
+ Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1263–1272, 2017.
215
+
216
+ Jordan Graves, Jacob Byerly, Eduardo Priego, Naren Makkapati, S Vince Parish, Brenda Medellin, and Monica Berrondo. A review of deep learning methods for antibodies. Antibodies, 9(2):12, 2020.
217
+
218
+ Joe G Greener, Lewis Moffat, and David T Jones. Design of metalloproteins and novel protein folds using variational autoencoders. Scientific reports, 8(1):1–12, 2018.
219
+
220
+ Sharon Hammes-Schiffer and Stephen J Benkovic. Relating protein motion to catalysis. Annu. Rev. Biochem., 75:519–541, 2006.
221
+
222
+ Jie Hou, Renzhi Cao, and Jianlin Cheng. Deep convolutional neural networks for predicting the quality of single protein structural models. bioRxiv, pp. 590620, 2019.
223
+
224
+ David Menendez Hurtado, Karolis Uziela, and Arne Elofsson. Deep transfer learning in the assess- ´ ment of the quality of protein models. arXiv preprint arXiv:1804.06281, 2018.
225
+
226
+ John Ingraham, Vikas Garg, Regina Barzilay, and Tommi Jaakkola. Generative models for graphbased protein design. In Advances in Neural Information Processing Systems, pp. 15794–15805, 2019.
227
+
228
+ Mikhail Karasikov, Guillaume Pages, and Sergei Grudinin. Smooth orientation-dependent scoring \` function for coarse-grained protein quality assessment. Bioinformatics, 35(16):2801–2808, 2019.
229
+
230
+ Johannes Klicpera, Janek Groß, and Stephan Gunnemann. Directional message passing for molec-¨ ular graphs. In International Conference on Learning Representations, 2019.
231
+
232
+ Brian Kuhlman and David Baker. Native protein sequences are close to optimal for their structures. Proceedings of the National Academy of Sciences, 97(19):10383–10388, 2000.
233
+
234
+ Zhixiu Li, Yuedong Yang, Eshel Faraggi, Jian Zhan, and Yaoqi Zhou. Direct prediction of profiles of sequences compatible with a protein structure by neural networks with fragment-based local and energy-based nonlocal profiles. Proteins: Structure, Function, and Bioinformatics, 82(10): 2565–2573, 2014.
235
+
236
+ James O’Connell, Zhixiu Li, Jack Hanson, Rhys Heffernan, James Lyons, Kuldip Paliwal, Abdollah Dehzangi, Yuedong Yang, and Yaoqi Zhou. Spin2: Predicting sequence profiles from protein structures using deep neural networks. Proteins: Structure, Function, and Bioinformatics, 86(6): 629–633, 2018.
237
+
238
+ Kliment Olechnovic and ˇ Ceslovas Venclovas. Voromqa: Assessment of protein structure quality ˇ using interatomic contact areas. Proteins: Structure, Function, and Bioinformatics, 85(6):1131– 1145, 2017.
239
+
240
+ Guillaume Pages, Benoit Charmettant, and Sergei Grudinin. Protein model quality assessment using \` 3d oriented convolutional neural networks. Bioinformatics, 35(18):3313–3319, 2019.
241
+
242
+ Janaina Cruz Pereira, Ernesto Raul Caffarena, and Cicero Nogueira dos Santos. Boosting dockingbased virtual screening with deep learning. Journal of chemical information and modeling, 56 (12):2495–2506, 2016.
243
+
244
+ Yifei Qi and John ZH Zhang. Densecpd: Improving the accuracy of neural-network-based computational protein sequence design with densenet. Journal of Chemical Information and Modeling, 60(3):1245–1252, 2020.
245
+
246
+ Raghav Shroff, Austin W Cole, Barrett R Morrow, Daniel J Diaz, Isaac Donnell, Jimmy Gollihar, Andrew D Ellington, and Ross Thyer. A structure-based deep learning framework for protein engineering. bioRxiv, pp. 833905, 2019.
247
+
248
+ Alexey Strokach, David Becerra, Carles Corbi-Verge, Albert Perez-Riba, and Philip M Kim. Fast and flexible protein design using deep graph neural networks. Cell Systems, 11(4):402–411, 2020.
249
+
250
+ Gabriel Studer, Christine Rempfer, Andrew M Waterhouse, Rafal Gumienny, Juergen Haas, and Torsten Schwede. Qmeandiscodistance constraints applied on model quality estimation. Bioinformatics, 36(6):1765–1771, 2020.
251
+
252
+ Nathaniel Thomas, Tess Smidt, Steven Kearnes, Lusann Yang, Li Li, Kai Kohlhoff, and Patrick Riley. Tensor field networks: Rotation-and translation-equivariant neural networks for 3d point clouds. arXiv preprint arXiv:1802.08219, 2018.
253
+
254
+ Raphael Townshend, Rishi Bedi, Patricia Suriana, and Ron Dror. End-to-end learning on 3d protein structure for interface prediction. In Advances in Neural Information Processing Systems, pp. 15616–15625, 2019.
255
+
256
+ Karolis Uziela, David Menendez Hurtado, Nanjiang Shu, Bj ´ orn Wallner, and Arne Elofsson. ¨ Proq3d: improved model quality assessments using deep learning. Bioinformatics, 33(10):1578– 1580, 2017.
257
+
258
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
259
+
260
+ Jingxue Wang, Huali Cao, John ZH Zhang, and Yifei Qi. Computational protein design with deep learning neural networks. Scientific reports, 8(1):1–9, 2018.
261
+
262
+ Jonghun Won, Minkyung Baek, Bohdan Monastyrskyy, Andriy Kryshtafovych, and Chaok Seok. Assessment of protein model structure accuracy estimation in casp13: Challenges in the era of deep learning. Proteins: Structure, Function, and Bioinformatics, 87(12):1351–1360, 2019.
263
+
264
+ Adam Zemla, Ceslovas Venclovas, John Moult, and Krzysztof Fidelis. Processing and evaluation of ˇ predictions in casp4. Proteins: Structure, Function, and Bioinformatics, 45(S5):13–21, 2001.
265
+
266
+ Yuan Zhang, Yang Chen, Chenran Wang, Chun-Chao Lo, Xiuwen Liu, Wei Wu, and Jinfeng Zhang. Prodconn: Protein design using a convolutional neural network. Proteins: Structure, Function, and Bioinformatics, 2019.
267
+
268
+ # A PROPERTIES OF GEOMETRIC VECTOR PERCEPTRONS
269
+
270
+ # A.1 EQUIVARIANCE AND INVARIANCE
271
+
272
+ The vector and scalar outputs of the GVP are equivariant and invariant, respectively, with respect to an arbitrary composition of rotations and reflections in 3D Euclidean space described by $R$ i.e.,
273
+
274
+ $$
275
+ \operatorname { G V P } ( ( \mathbf { s } , R ( \mathbf { V } ) ) ) = ( \mathbf { s } ^ { \prime } , R ( \mathbf { V } ^ { \prime } ) )
276
+ $$
277
+
278
+ Proof. We can write the transformation described by $R$ as multiplying $\mathbf { V }$ with a unitary matrix $\mathbf { U } \in \mathbb { R } ^ { 3 \times 3 }$ from the right. The $\mathrm { L _ { 2 } }$ -norm, scalar multiplications, and nonlinearities are defined rowwise as in Algorithm 1. We consider scalar and vector outputs separately. The scalar output, as a function of the inputs, is
279
+
280
+ $$
281
+ \mathbf { s } ^ { \prime } = \sigma ( \mathbf { W } _ { m } [ \mathbf { | \mathbf { W } _ { h } \mathbf { V } | } ] { 2 } ] + \mathbf { b } )
282
+ $$
283
+
284
+ Since $\left\| \mathbf { W } _ { h } \mathbf { V U } \right\| _ { 2 } = \left\| \mathbf { W } _ { h } \mathbf { V } \right\| _ { 2 }$ , we conclude $\mathbf { s } ^ { \prime }$ is invariant. Similarly the vector output is
285
+
286
+ $$
287
+ \mathbf { V } ^ { \prime } = \sigma ^ { + } \left( \| \mathbf { W } _ { \mu } \mathbf { W } _ { h } \mathbf { V } \| _ { 2 } \right) \odot \mathbf { W } _ { \mu } \mathbf { W } _ { h } \mathbf { V }
288
+ $$
289
+
290
+ The row-wise scaling can also be viewed as left-multiplication by a diagonal matrix $\mathbf { D }$ . Since $\left\| \mathbf { W } _ { \mu } \mathbf { W } _ { h } \mathbf { V } \right\| _ { 2 } = \left\| \mathbf { W } _ { \mu } \mathbf { W } _ { h } \mathbf { V } \mathbf { U } \right\| _ { 2 }$ , $\mathbf { D }$ is invariant. Since
291
+
292
+ $$
293
+ \mathbf { D W } _ { \mu } \mathbf { W } _ { h } ( \mathbf { V U } ) = \left( \mathbf { D W } _ { \mu } \mathbf { W } _ { h } \mathbf { V } \right) \mathbf { U }
294
+ $$
295
+
296
+ we conclude that $\mathbf { V } ^ { \prime }$ is equivariant.
297
+
298
+ # A.2 APPROXIMATION OF ROTATION-INVARIANT FUNCTIONS
299
+
300
+ The GVP inherits an analogue of the Universal Approximation property Cybenko (1989) of standard dense layers. If $R$ describes an arbitrary rotation or reflection in 3D Euclidean space, we show that the GVP architecture can approximate arbitrary scalar-valued functions invariant under $R$ and defined over $\Omega ^ { \nu } \subset \mathbb { R } ^ { \nu \times 3 }$ , the bounded subset of $\mathbb R ^ { \bar { \nu } \times 3 }$ whose elements can be canonically oriented based on three linearly independent vector entries. Without loss of generality, we assume the first three vector entries can be used.
301
+
302
+ The machinery corresponding to such approximations corresponds to a GVP $G _ { s }$ with only vector inputs, only scalar outputs, and a sigmoidal nonlinearity $\sigma$ ; followed by a dense layer. This can also be viewed as the sequence of matrix multiplication with $\mathbf { W } _ { h }$ , taking the $\mathrm { L _ { 2 } }$ -norm, and a dense network with one hidden layer. Such machinery can be extracted from any two consecutive GVPs (assuming a sigmoidal $\sigma$ ).
303
+
304
+ We restate the theorem from the main text:
305
+
306
+ Theorem. Let $R$ describe an arbitrary rotation and/or reflection in $\mathbb { R } ^ { 3 }$ . For $\nu \geq 3$ let $\Omega ^ { \nu } \subset \mathbb { R } ^ { \nu \times 3 }$ be the set of all ${ \bf V } = [ \pmb { v } _ { 1 } , \quad \dots , \quad \pmb { v } _ { \nu } ] ^ { T } \in \mathbb { R } ^ { \nu \times 3 }$ such that ${ \pmb v } _ { 1 } , { \pmb v } _ { 2 } , { \pmb v } _ { 3 }$ are linearly independent and $0 \leq \| \pmb { v } _ { i } \| _ { 2 } \leq b$ for all i and some finite $b > 0$ . Then for any continuous $F : \Omega ^ { \nu } \to \mathbb { R }$ such that $F ( R ( \mathbf { V } ) ) \ : = \ : F ( \mathbf { V } )$ and for any $\epsilon > 0$ , there exists a form $f ( \mathbf { V } ) \ = \ \mathbf { w } ^ { T } G _ { s } ( \mathbf { V } )$ such that $| F ( \mathbf { V } ) - f ( \mathbf { V } ) | < \epsilon$ for all $\mathbf { V } \in \Omega$ .
307
+
308
+ Proof. The idea is to write $F$ as a composition $F = \tilde { F } \circ \omega$ and $\omega = h \circ y$ . We show that multiplication with $\mathbf { W } _ { h }$ and and taking the $\mathrm { L _ { 2 } }$ -norm can compute $y$ , and that the dense network with one hidden layer can approximate $\tilde { F } \circ h$ .
309
+
310
+ Call an element $\mathbf { V } \in \Omega ^ { \nu }$ oriented if $\pmb { v } _ { 1 } = x _ { 1 } \mathbf { e } _ { x }$ , $v _ { 2 } = x _ { 2 } \mathbf { e } _ { x } + y _ { 2 } \mathbf { e } _ { y }$ , and $v _ { 3 } = x _ { 3 } \mathbf { e } _ { x } + y _ { 3 } \mathbf { e } _ { y } + z _ { 3 } \mathbf { e } _ { z }$ , with $x _ { 1 } , y _ { 2 } , z _ { 3 } > 0$ . Define $\omega : \Omega ^ { \nu } \to \mathbb { R } ^ { 3 \nu - 3 }$ to be the orientation function that orients its input and then extracts the vector of $3 \nu - 3$ coefficients, $[ x _ { 1 } , x _ { 2 } , y _ { 2 } , x _ { 3 } , y _ { 3 } , z _ { 3 } , \ldots , x _ { i } , y _ { i } , z _ { i } , \ldots ] ^ { T }$ . These
311
+
312
+ elements can be written as
313
+
314
+ $$
315
+ \begin{array} { l c l } { x _ { 1 } } & { = } & { \left\| v _ { 1 } \right\| _ { 2 } } \\ { x _ { i } } & { = } & { v _ { i } \cdot v _ { 1 } / x _ { 1 } , \quad i \geq 2 } \\ { y _ { 2 } } & { = } & { \sqrt { \left\| v _ { 2 } \right\| _ { 2 } ^ { 2 } - x _ { 2 } ^ { 2 } } } \\ { y _ { i } } & { = } & { \left( v _ { i } \cdot v _ { 2 } - x _ { i } x _ { 2 } \right) / y _ { 2 } , \quad i \geq 3 } \\ { z _ { 3 } } & { = } & { \sqrt { \left\| v _ { 3 } \right\| _ { 2 } ^ { 2 } - x _ { 3 } ^ { 2 } - y _ { 3 } ^ { 2 } } } \\ { z _ { i } } & { = } & { \left( v _ { i } \cdot v _ { 3 } - x _ { i } x _ { 3 } - y _ { i } y _ { 3 } \right) / z _ { 3 } , \quad i \geq 4 } \end{array}
316
+ $$
317
+
318
+ and are invariant under rotation and reflection, because they are defined using only the norms and inner products of the $\mathbf { v } _ { i }$ . Then $F = \tilde { F } \circ \omega$ , where $\tilde { F } : [ - b , \dot { b } ] ^ { 3 \nu - 3 } \to \mathbb { R }$ .
319
+
320
+ The key insight is that if we construct $\mathbf { W } _ { h }$ such that the rows of $\mathbf { W } _ { h } \mathbf { V }$ are the original vectors $\mathbf { v } _ { i } , \forall i$ and all differences ${ \bf v } _ { i } - { \bf v } _ { j } , \forall i , j \le \operatorname* { m i n } ( i , 3 )$ , then we can compute $\omega ( \mathbf { V } )$ from the row-wise norms of $\mathbf { W } _ { h } \mathbf { V }$ . That is, $\omega = h \circ y$ where $\mathbf { y } = y ( \mathbf { V } ) = \| { \cdot } \| _ { 2 } \odot ( \mathbf { W } _ { h } \mathbf { V } ) \in \mathbb { R } ^ { 4 \nu - 6 }$ and $h$ is an application of the cosine law. The GVP precisely computes $\mathbf { y }$ as an intermediate step: we can write $G _ { s } ( \mathbf { V } ) = \sigma \odot ( \mathbf { W } _ { m } \mathbf { y } + \mathbf { b } )$ . It remains to show that there exists a form $\widetilde { f } ( \mathbf { y } ) = \mathbf { w } ^ { T } [ \sigma \odot ( \mathbf { W } _ { m } \mathbf { y } + \mathbf { b } ) ]$ that $\epsilon$ -approximates $\tilde { F } \circ h : [ - 2 b , 2 b ] ^ { 4 \nu - 6 } \mathbb { R }$ . Up to a translation and uniform scaling of the hypercube, this is the result of the Universal Approximation Theorem (Cybenko, 1989). □
321
+
322
+ # B SYNTHETIC TASKS
323
+
324
+ We perform controlled experiments on a synthetic dataset in order to analyze the benefits of the GVP architecture and determine if it indeed improves the geometric and joint geometric-relational reasoning abilities of GNNs.
325
+
326
+ Dataset The synthetic dataset is designed to mimic the essential qualities of the domain of protein structures. Each “structure” consists of $n = 1 0 0$ random points in $\mathbb { R } ^ { 3 }$ , distributed uniformly in the ball of radius $r = 1 0$ , with the constraint that no two points are less than distance $d = 2$ apart. Each position is also associated with a random unit vector (a “sidechain”) to endow it with an orientation. Three points are randomly chosen and are labelled as “special”; these will be used to define the learning tasks. We generate $2 0 \mathrm { k }$ “structures” and split them $80 \%$ train : $10 \%$ validation : $10 \%$ test.
327
+
328
+ In the voxelized representation of a data point, the volume is voxelized into unit cubes. Each point is partitioned into a neighborhood of eight voxels by trilinear interpolation, such that exact coordinate information is retained. Separate channels are used for the special and non-special points. The “sidechains” are represented with a set of $n = 1 0 0$ points located at the ends of the unit vectors and mapped into a third channel.
329
+
330
+ In the graph-structured representation of a data point, a proximity graph is drawn with $k = 1 0$ nearest neighbors. Each node is labelled with a one-hot encoding of its type (“special” or “nonspecial”) and each edge with its Euclidean length. In the vanilla GNN, orientation information is encoded by additionally including all three dot products in each edge embedding. In the GVP-GNN, each node embedding contains the node’s “sidechain” vector, and each edge embedding contains a unit vector indicating the direction of the edge.
331
+
332
+ Tasks We identify two regression tasks to exemplify geometric and relational reasoning, respectively. In the “Off-center” task, the network predicts the distance from the centroid of the three special points to the centroid of the entire structure. In the “Perimeter” task, the network predicts the perimeter of the triangle defined by the three special points. We characterize the former as primarily geometric, as it requires reasoning about global properties of the 3D shape, in particular points in space that are not themselves nodes, and the latter as primarily relational, as it involves distances between three specific pairs of nodes. Finally, to represent a problem with geometric and relational aspects, in the “Combined” task we attempt to predict the difference of the (normalized) off-center and perimeter objectives.
333
+
334
+ Models We train a 3-layer shallow CNN and a 3-layer GNN with a single-layer feed-forward network. These are compared against a GVP-GNN that is otherwise identical to the standard GNN. To reflect the spirit of the synthetic experiment, all models have the same intermediate dimensionality of 32 (4 vector and 20 scalar channels in the GVP-GNN), we use the same training procedure for all models, and no hyperparameter tuning or architecture search is performed.
335
+
336
+ Results The results of the synthetic experiments are shown in Table 5. The vanilla GNN significantly outperforms the CNN on the perimeter task, while the CNN significantly outperforms the GNN on the off-center task, supporting our conceptual framework of the relative strengths of the two architectures. However, the GVP-GNN matches (and even outperforms) the CNN on the geometric task while maintaining the GNN’s performance on the relational task. It additionally significantly outperforms both models on the combined task. On the basis of these results, the GVP appears successful in combining the strengths of the CNN and GNN into a single architecture.
337
+
338
+ Table 5: Performance of the three compared model architectures on the off-center (geometric), perimeter (relational), and combined objectives. The MSE losses are standardized such that predicting a constant value (i.e. the mean) would result in unit loss. Results are reported as the mean $\pm$ S.D. over $k = 5$ random splits, where the best of three random seeds is taken for each split.
339
+
340
+ <table><tr><td>Model</td><td>Parameters</td><td>Off-center r (geometric)</td><td>Perimeter (relational)</td><td>Combined</td></tr><tr><td>CNN</td><td>59k</td><td>0.319 ±0.014</td><td>0.532 ±0.028</td><td>0.522 ± 0.016</td></tr><tr><td>GNN</td><td>40k</td><td>0.871 ± 0.045</td><td>0.128 ± 0.009</td><td>0.421 ± 0.025</td></tr><tr><td>GVP-GNN</td><td>22k</td><td>0.206 ± 0.024</td><td>0.106 ± 0.006</td><td>0.155 ± ( 0.024</td></tr></table>
341
+
342
+ # C MQA DATASETS: FURTHER DETAILS
343
+
344
+ The MQA training and validation dataset includes 528 targets from CASP 5-10 and 150 candidate structures per target. These targets are partitioned at random into 480 training targets and 48 validation targets. We include native structures for training and validation to make use of the greatest range of GDT-TS scores. We do not include native structures for testing in order to mimic CASP and real-world applications and because other methods were not tested on native structures.
345
+
346
+ In the CASP assessments, stage 1 refers to a set of 20 candidate structures per target and stage 2 to a set of 150 candidate structures per target (5 from each structure prediction server). Both sets are pre-designated by the CASP organizers.
347
+
348
+ There has been slight inconsistency in the literature with regards to the exact composition of the CASP 11 and 12 test sets. We use the list established by Karasikov et al. (2019) because nearly all recent methods have been benchmarked on this set at some point. The CASP 13 test set includes 1472 stage 2 candidate structures from the following 20 targets: T0950, T0951, T0953s1, T0953s2, T0954, T0955, T0957s1, T0957s2, T0958, T0960, T0963, T0966, T0968s1, T0968s2, T1003, T1005, T1008, T1009, T1011, T1016. These were the targets for which candidate structures, submitted predictions, and ground-truth scores were publicly available (obtained as described by Baldassarre et al. (2020)) at the time of writing. The exact numbers of targets and structures in each set can be found in Table 6.
349
+
350
+ Table 6: MQA datasets
351
+
352
+ <table><tr><td>Dataset</td><td># Targets</td><td># Structures</td><td>Includes natives?</td></tr><tr><td>Training</td><td>480</td><td>72000</td><td>Yes</td></tr><tr><td>Validation</td><td>48</td><td>7200</td><td>Yes</td></tr><tr><td>CASP 11 stage 1</td><td>84</td><td>1680</td><td>No</td></tr><tr><td>CASP 11 stage 2</td><td>83</td><td>12450</td><td>No</td></tr><tr><td>CASP 12 stage 1</td><td>40</td><td>800</td><td>No</td></tr><tr><td>CASP 12 stage 2</td><td>40</td><td>5950</td><td>No</td></tr><tr><td>CASP 13 stage 2</td><td>20</td><td>1472</td><td>No</td></tr></table>
353
+
354
+ # D TRAINING AND HYPERPARAMETERS
355
+
356
+ To train the MQA model to perform regression against the model quality score, we use a sum of an absolute loss and a pairwise loss. That is, for each training step we intake pairs $i , j$ where $i , j$ are candidate structures for the same target and compute
357
+
358
+ $$
359
+ \mathcal { L } = H ( y ^ { ( i ) } - \hat { y } ^ { ( i ) } ) + H ( y ^ { ( j ) } - \hat { y } ^ { ( j ) } ) + H \left( ( y ^ { ( i ) } - y ^ { ( j ) } ) - ( \hat { y } ^ { ( i ) } - \hat { y } ^ { ( j ) } ) \right)
360
+ $$
361
+
362
+ where $H$ is the Huber loss. When reshuffling at the beginning of each epoch, we also randomly pair up the candidate structures for each target. Interestingly, adding the pairwise term also improves global correlation, likely because the much larger number of possible pairs makes it more difficult to overfit.
363
+
364
+ To train the CPD model to perform classification / discrete generative modelling, we use the crossentropy / negative log likelihood loss.
365
+
366
+ For both the MQA and CPD model, we use node and hidden embeddings with 16 vector and 100 scalar channels and edge embeddings with 1 vector and 32 scalar channels. The input node and edge features are first transformed by a sequence of GVPs to these dimensionalities before graph propagation. In all training runs, we use the Adam optimizer to perform mini-batch gradient descent. Batches are constructed by grouping structures of similar size to have a maximum of 1800 residues per batch for CPD and 3000 residues per batch for MQA. We also tune the following hyperparameters over a total of 70 training runs:
367
+
368
+ • Learning rate in the range of $1 0 ^ { - 4 }$ to $1 0 ^ { - 3 }$ • Dropout probability in the range of $1 0 ^ { - 4 }$ to $1 0 ^ { - 1 }$ • Number of graph propagation layers in the range of 3 to 6 • Relative weight of the MQA pairwise loss in the range of 0 to 2
369
+
370
+ All models are implemented in TensorFlow 2.1 and trained for a maximum of 100 epochs. This takes around two days for both models on a single Titan X GPU. However, we note that the GPU memory, not compute power, is the bottleneck when training, based on the the average volatile GPU usage. We therefore anticipate that the runtime can be further optimized.
371
+
372
+ # E ADDITIONAL RESULTS
373
+
374
+ # E.1 DIMENET ON MQA
375
+
376
+ DimeNet (Klicpera et al., 2019) is a recent GNN architecture designed to incorporate the 3D geometry of small molecule graphs by encoding relative edge orientations in a local spherical Bessel basis. DimeNet and our architecture are similar in that both seek to leverage geometric aspects of a problem domain on top of graph-structured representations. However, unlike our architecture, Dimenet uses rotation-invariant features to indirectly encode geometry into its message-passing operations. Additionally, it updates edge embeddings by propagating messages between each pair of neighboring edges. While this paradigm appears well-suited for the domain of learning from small molecules, it does not scale well to large protein structure graphs. In evaluating DimeNet on MQA, we could only extend the distance cutoff to 7.5 angstroms, while 30 neighbors corresponds to roughly 13 angstroms. DimeNet does not perform comparably to our model, or to previous GNNs designed for learning from structure such as GraphQA (Table 7).
377
+
378
+ # E.2 MQA: RESULTS ON CASP 13
379
+
380
+ We report results for all 23 single-structure methods assessed in CASP 13 for which scores on all 20 targets are available (Table 8). The following 7 methods were excluded because they do not report results for some targets: LamoureuxLab, SBROD-server, SBROD, 3DCNN, MESHI-server, SBROD-plus, FALCON-QA, and Grudinin. We do include comparisons with LamoureuxLab (previously 3DCNN), 3DCNN (previously Ornate), and SBROD on CASP 11-12. All of the methods highlighted as top-performing by the CASP organizers in Cheng et al. (2019) are in our comparison for CASP 13. All predictions were obtained from the CASP download center as described by Baldassarre et al. (2020).
381
+
382
+ Table 7: Comparison of our GVP architecture, DimeNet, and the GraphQA, another GNN-based MQA method, on CASP 11-12. As in the main text, the global and mean per-target Pearson correlations are shown. DimeNet does not perform comparably to either GVP-GNN or GraphQA.
383
+
384
+ <table><tr><td rowspan="2">Method</td><td colspan="2">CASP 11 Stage 2</td><td colspan="2">CASP 12 Stage 2</td></tr><tr><td>Global</td><td>Per-target</td><td>Global</td><td>Per-target</td></tr><tr><td>GVP-GNN</td><td>0.87</td><td>0.45</td><td>0.82</td><td>0.62</td></tr><tr><td>GraphQA</td><td>0.82</td><td>0.38</td><td>0.81</td><td>0.61</td></tr><tr><td>DimeNet</td><td>0.61</td><td>0.30</td><td>0.62</td><td>0.47</td></tr></table>
385
+
386
+ Table 8: Comparison of GVP-GNN against all 23 available single-structure MQA methods in CASP 13 sorted by global correlation. The total number of predictions is shown, which may be less than 1472 even though they include all 20 targets. GVP-GNN is the best-performing method in terms of global correlation. In terms of per-target correlation, GVP-GNN outperforms all other structure-only methods and also all methods using sequence profiles except for ProQ4 and two ProQ3D variants.
387
+
388
+ <table><tr><td>Method</td><td>Global</td><td>Per-target</td><td>Predictions</td><td>Structure only?</td></tr><tr><td>GVP-GNN</td><td>0.888</td><td>0.671</td><td>1472</td><td>Yes</td></tr><tr><td>ProQ3D</td><td>0.847</td><td>0.660</td><td>1467</td><td>No</td></tr><tr><td>SASHAN</td><td>0.840</td><td>0.633</td><td>1472</td><td>Yes</td></tr><tr><td>MESHI-corr-server</td><td>0.838</td><td>0.651</td><td>1472</td><td>Yes</td></tr><tr><td>ProQ3</td><td>0.822</td><td>0.576</td><td>1468</td><td>No</td></tr><tr><td>MESHI</td><td>0.813</td><td>0.666</td><td>1472</td><td>Yes</td></tr><tr><td>MESHI-enrich-server</td><td>0.813</td><td>0.666</td><td>1472</td><td>Yes</td></tr><tr><td>FaeNNz</td><td>0.810</td><td>0.650</td><td>1472</td><td>Yes</td></tr><tr><td>ProQ3D-CAD</td><td>0.803</td><td>0.673</td><td>1468</td><td>No</td></tr><tr><td>ProQ3D-IDDT</td><td>0.803</td><td>0.687</td><td>1467</td><td>No</td></tr><tr><td>ProQ2</td><td>0.802</td><td>0.577</td><td>1472</td><td>No</td></tr><tr><td>ProQ3D-TM</td><td>0.791</td><td>0.654</td><td>1467</td><td>No</td></tr><tr><td>MASS1</td><td>0.776</td><td>0.582</td><td>1472</td><td>Yes</td></tr><tr><td>VoroMQA-A</td><td>0.744</td><td>0.595</td><td>1472</td><td>Yes</td></tr><tr><td>VoroMQA-B</td><td>0.726</td><td>0.586</td><td>1472</td><td>Yes</td></tr><tr><td>MASS2</td><td>0.689</td><td>0.584</td><td>1472</td><td>Yes</td></tr><tr><td>MULTICOM-NOVEL</td><td>0.652</td><td>0.551</td><td>1472</td><td>No</td></tr><tr><td>ProQ4</td><td>0.604</td><td>0.691</td><td>1472</td><td>No</td></tr><tr><td>PLU-AngularQA</td><td>0.577</td><td>0.460</td><td>1472</td><td>Yes</td></tr><tr><td>Bhattacharya-Server</td><td>0.577</td><td>0.501</td><td>1452</td><td>No</td></tr><tr><td>Bhattacharya-SingQ</td><td>0.498</td><td>0.525</td><td>1452</td><td>No</td></tr><tr><td>Kiharalab</td><td>0.375</td><td>0.565</td><td>1472</td><td>No</td></tr><tr><td>PLU-TopQA</td><td>0.239</td><td>0.049</td><td>1472</td><td>Yes</td></tr><tr><td>Jagodzinski-Cao-QA</td><td>0.180</td><td>0.341</td><td>1472</td><td>Yes</td></tr></table>
389
+
390
+ # E.3 CPD: RESULTS ON TS50
391
+
392
+ We compare against a number of recent CPD methods on the TS50 test set in Table 9.10 These include two CNNs (ProDCoNN and DenseCPD), a distance-map method (SBROF), and sequential representation methods (Wang’s model and SPIN2). We also evaluate the GNN ProteinSolver on TS50 by sampling 100 sequences with temperature 1 (the default setting) for each structure using the public web server. No canonical training and validation sets exist for TS50. Therefore, in order to evaluate on TS50, we remove sequences with more than $30 \%$ similarity from the CATH 4.2 training and validation sets and retrain our model. We outperform all other methods with the exception of DenseCPD, a CNN method with canonical orientations. Interestingly, DenseCPD leverages the same underlying representation as ProDCoNN, yet achieves remarkably better performance. The main difference between the two methods is that ProDCoNN has 4 convolutional layers and DenseCPD has 21 layers organized into dense residual blocks.
393
+
394
+ Table 9: Sequence recovery on TS50. Recovery for GVP-GNN and ProteinSolver is as defined in Table 1; recovery for other methods, which model residues independently, is just classification accuracy. GVP-GNN is the second best-performing method, behind the CNN method DenseCPD. There is no canonical training and validation set for methods evaluated on TS50.
395
+
396
+ <table><tr><td>Method</td><td>Recovery %</td></tr><tr><td>GVP-GNN</td><td>44.9</td></tr><tr><td>DenseCPD (Qi &amp; Zhang,2020)</td><td>50.7</td></tr><tr><td>ProDCoNN (Zhang et al.,2019)</td><td>40.7</td></tr><tr><td>SBROF (Chen et al., 2019)</td><td>39.2</td></tr><tr><td>SPIN2 (O&#x27;Connell et al., 2018)</td><td>33.6</td></tr><tr><td>Wang&#x27;s model (Wang et al., 2018)</td><td>33.0</td></tr><tr><td>ProteinSolver (Strokach et al., 2020)</td><td>30.8</td></tr><tr><td>SPIN (Li et al., 2014)</td><td>30.3</td></tr><tr><td>Rosetta</td><td>30.0</td></tr></table>
397
+
398
+ # F VISUALIZATION AND INTERPRETATION OF LEARNED FEATURES
399
+
400
+ The geometric vector perceptron updates the vector features, in addition to scalar features, at node embeddings during graph propagation. Therefore, while the input vector channels represent the forward and reverse directions at each amino acid, the intermediate layers represent learned vector features. Could some of these features correspond to interpretable properties of the structure? Among a total of 64 intermediate vector channels learned by the MQA model, a few appeared visually interpretable and are shown on selected structures in Figure 2. We caution against generalizing from the necessarily small number of images that could be manually inspected, but find these preliminary visualizations intriguing.
401
+
402
+ ![](images/8cf813a4149474b90137789679a3cb78facdf48c76d745f8bccb1aedc5176d62.jpg)
403
+ Figure 2: Four different learned vector channels of the MQA model are visualized on four separate structures. The backbone is represented as a chain of points, and each vector is rooted at the position of the amino acid node to which it belongs. From left to right: the vectors appear to A) point in the direction of motion that would make the protein more compact; B) point along the central axis of the alpha helix; C) point outwards from the structure; and D) point inwards into the structure.
parse/train/1YLJDvSx6J4/1YLJDvSx6J4_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/1YLJDvSx6J4/1YLJDvSx6J4_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/1YLJDvSx6J4/1YLJDvSx6J4_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI.md ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Stateless actor-critic for instance segmentation with high-level priors
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ Instance segmentation is an important computer vision problem which remains challenging despite impressive recent advances due to deep learning-based methods. Given sufficient training data, fully supervised methods can yield excellent performance, but annotation of ground-truth data remains a major bottleneck, especially for biomedical applications where it has to be performed by domain experts. The amount of labels required can be drastically reduced by using rules derived from prior knowledge to guide the segmentation. However, these rules are in general not differentiable and thus cannot be used with existing methods. Here, we relax this requirement by using stateless actor critic reinforcement learning, which enables non-differentiable rewards. We formulate the instance segmentation problem as graph partitioning and the actor critic predicts the edge weights driven by the rewards, which are based on the conformity of segmented instances to high-level priors on object shape, position or size. The experiments on toy and real datasets demonstrate that we can achieve excellent performance without any direct supervision based only on a rich set of priors.
11
+
12
+ # 16 1 Introduction
13
+
14
+ 17 Instance segmentation is the task of segmenting all objects in an image and assigning each of them
15
+ 18 a different label. It forms the necessary first step to the analysis of individual objects in a scene
16
+ 19 and is thus of paramount importance in many practical applications of computer vision. Over the
17
+ 20 recent years, fully supervised instance segmentation methods have made tremendous progress both
18
+ 21 in natural image applications and in scientific imaging, achieving excellent segmentations for very
19
+ 22 difficult tasks [1, 2].
20
+ 23 A large corpus of training images is hard to avoid when the segmentation method needs to take
21
+ 24 into account the full variability of the natural world. However, in many practical segmentation
22
+ 25 tasks the appearance of the objects can be expected to conform to certain rules which are known a
23
+ 26 priori. Examples include surveillance, industrial quality control and especially medical and biological
24
+ 27 imaging applications where full exploitation of such prior knowledge is particularly important as the
25
+ 28 training data is sparse and difficult to acquire: pixelwise annotation of the necessary instance-level
26
+ 29 groundtruth for a microscopy experiment can take weeks or even months of expert time. The use of
27
+ 30 shape priors has a strong history in this domain [3, 4], but the most powerful learned shape models
28
+ 31 still require groundtruth [5] and generic shapes are hard to combine with the CNN losses and other,
29
+ 32 non-shape, priors. For many high-level priors it has already been demonstrated that integration of
30
+ 33 the prior directly into the CNN loss can lead to superior segmentations while significantly reducing
31
+ 34 the necessary amounts of training data [6]. However, the requirement of formulating the prior as
32
+ 35 a differentiable function poses a severe limitation on the kinds of high-level knowledge that can
33
+ 36 be exploited with such an approach. The aim of our contribution is to address this limitation and
34
+ 37 establish a framework in which a rich set of non-differentiable rules and expectations can be used to
35
+ 38 steer the network training.
36
+ 39 To circumvent the requirement of a differentiable loss function, we turn to the reinforcement learning
37
+ 40 paradigm, where the rewards can be computed from a non-differentiable cost function. We base
38
+ 41 our framework on a stateless actor-critic setup [7], providing one of the first practical applications
39
+ 42 of this important theoretical construct. In more detail, we solve the instance segmentation problem
40
+ 43 as agglomeration of image superpixels, with the agent predicting the weights of the edges in the
41
+ 44 superpixel region adjacency graph. Based on the predicted weights, the segmentation is obtained
42
+ 45 through (non-differentiable) graph partitioning and the segmented objects are then evaluated by the
43
+ 46 critic, which learns to approximate the rewards based on the object- and image-level reasoning (see
44
+ 47 Fig. 1).
45
+ 48 The main contributions of this work can be summarized as follows: (i) we formulate instance segmen
46
+ 49 tation as a RL problem based on a stateless actor-critic setup, encapsulating the non-differentiable step
47
+ 50 of instance extraction into the environment and thus achieving end-to-end learning; (ii) we exploit
48
+ 51 prior knowledge on instance appearance and morphology by tying the rewards to the conformity of
49
+ 52 the predicted objects to pre-defined rules and learning to approximate the (non-differentiable) reward
50
+ 53 function with the critic; (iii) we introduce a strategy for spatial decomposition of rewards based on
51
+ 54 fixed-sized subgraphs to enable localized supervision from combinations of object- and image-level
52
+ 55 rules. (iv) we demonstrate the feasibility of our approach on synthetic and real images and show
53
+ 56 an application to an important segmentation task in developmental biology, where our framework
54
+ 57 delivers an excellent segmentation with no supervision other than high-level rules.
55
+
56
+ # 2 Related work
57
+
58
+ Reinforcement learning has so far not found significant adoption in the segmentation domain. The closest to our work are two methods in which RL has been introduced to learn a sequence of segmentation decision steps as a Markov Decision Process. In the actor critic framework of [8], the actor recurrently predicts one instance mask at a time based on the gradient provided by the critic. The training needs fully segmented images as supervision and the overall system, including an LSTM sub-network between the encoder and the decoder, is fairly complex. In [9], the individual decision steps correspond to merges of clusters while their sequence defines a hierarchical agglomeration process on a superpixel graph. The reward function is based on Rand index and thus not differentiable, but the overall framework requires full (super)pixelwise supervision for training.
59
+
60
+ 68 Reward decomposition was introduced for multi agent RL by [10] where a global reward is decom
61
+ 69 posed into a per agent reward. [11] proves that a stateless RL setup with decomposed rewards requires
62
+ 70 far less training samples than a RL setup with a global reward. In [12] reward decomposition is
63
+ 71 applied both temporally and spatially for zero-shot inference on unseen environments by training on
64
+ 72 locally selected samples to learn the underlying physics of the environment.
65
+ 73 The restriction to differentiable losses is present in all application domains of deep learning. Common
66
+ 74 ways to address it are usually based on a soft relaxation of the loss that can be differentiated. The
67
+ 75 relaxation can be designed specifically for the loss, such as, for example, Area-under-Curve [13] for
68
+ 76 classification or Jaccard Index [14] for semantic segmentation. These approaches are not directly
69
+ 77 applicable to our use case as we aim to enable the use of a variety of object- and image-level priors
70
+ 78 which can easily be combined without handcrafting an approximate loss for each case. More generally,
71
+ 79 but still for a concrete task loss, Direct Loss Minimization has been proposed for CNN training in
72
+ 80 [15]. For semi-supervised learning of a classification or ranking task, Discriminative Adversarial
73
+ 81 Networks have been proposed as a means to learn an approximation to the loss [16]. Most generally,
74
+ 82 Grabocka et al. in [17] propose to train a surrogate neural network which will serve as a smooth
75
+ 83 approximation of the true loss. In our setup, the critic can informally be viewed as a surrogate network
76
+ 84 as it learns to approximate the priors through the rewards by Q-learning.
77
+ 85 Incorporation of rules and priors is particularly important in biomedical imaging applications, where
78
+ 86 such knowledge can be exploited to augment or even substitute scarce groundtruth annotations.
79
+ 87 For example, the shape prior is explicitly encoded in the popular nuclear [18] and cellular [19]
80
+ 88 segmentation algorithms based on spatial embedding learning. Learned non-linear representations
81
+ 89 of the shape are used in [5], while in [20] the loss for object boundary prediction is made topology
82
+ 90 aware. Domain-specific priors can also be exploited in post-processing by graph partitioning [21].
83
+ 91 Interestingly, the energy minimization procedure underlying the graph partitioning can also be
84
+ 92 incorporated into the learning step [22, 23].
85
+
86
+ ![](images/b462ff7155eab119962a555dc5ed84447cb771088463b1c8eedcae8d77fef305.jpg)
87
+ Figure 1: Interaction of the agent with the environment: (a) shows the state which is composed of the raw image and the superpixel over-segmentation; (b) depicts the agent and the superpixel graph, which accumulates the features for nodes of the GNN from pixels which belong to the corresponding superpixels; (c) given the state, the agent performs the actions by predicting edge weights on the superpixel graph; (d) the environment, which includes the graph partitioning built from the weights predicted through agent actions; (e) rewards are obtained by evaluating the segmentation arising from the graph partitioning, based on pre-defined and data dependent rules. The rewards are given back to the agent where they are used for training.
88
+
89
+ # 93 3 Methods
90
+
91
+ The task of instance segmentation can be formalized as transforming an image $x$ into a labeling $y$ where $y$ maps each pixel to a label value. An instance corresponds to the maximal set of pixels with the same label value. Typically, the instance segmentation problem is solved via supervised learning, i.e. using a training set with ground-truth labels $\hat { y }$ . Note that $y$ is invariant under the permutation of label values. In general, it is difficult to formulate instance segmentation in a fully differentiable manner. Most approaches first predict a "soft" representation with a CNN, e.g. affinities [1, 24, 25], boundaries [26, 27] or embeddings [28, 29] and apply non-differentiable post-processing, such as agglomeration [27, 30], clustering [31, 32] or partitioning [33], to obtain the instance segmentation. Alternatively, proposal-based methods predict a bounding-box per instance and then predict the instance mask for each bounding-box [34]. Furthermore, the common evaluation metrics for instance segmentation [35, 36] are also not differentiable.
92
+
93
+ 105 Our main motivation to explore RL for the instance segmentation task is to circumvent the restriction
94
+ 106 to differentiable losses and - regardless of the loss - to make the whole pipeline differentiable end-to
95
+ 107 end even in presence of non-differentiable steps which transform pixelwise CNN predictions into
96
+ 108 individual instances.
97
+ 109 We formulate the instance segmentation problem using a region adjacency graph $G = ( V , E )$ ,
98
+ 110 where the nodes $V$ correspond to superpixels (homogeneous clusters of pixels) and the edges $E$
99
+ 111 connect nodes which belong to spatially adjacent superpixels. Given edge weights $W$ , an instance
100
+ 112 segmentation can be obtained by partitioning the graph, here using an approximate multicut solver
101
+ 113 [37]. Together, the image data, superpixels, graph and the graph partitioning make up the environment
102
+ 114 $\mathcal { E }$ of our RL setup. Based on the state $s$ of $\mathcal { E }$ , the agent $\mathcal { A }$ predicts actions $a$ , which are used to
103
+ 115 compute the partitioning. The reward $r$ is then computed based on this partitioning. Our agent $\mathcal { A }$ is a
104
+ 116 stateless actor-critic [38], represented by two graph neural networks (GNN) [39]. The actor predicts
105
+ 117 the actions $a$ based on the graph and its node features $F$ . The node(superpixel) features are computed
106
+ 118 by pooling together the corrresponding pixel features based on the raw image data.
107
+ 119 Here, we make use of two different setups: Method 1, where the per-pixel features are computed
108
+ 120 based on the image data with the feature extractor being part of the agent $\mathcal { A }$ and Method 2 where the
109
+ 121 feature extractor is part of the environment $\mathcal { E }$ . The feature extractor is trained end-to-end in Method
110
+ 122 1, whereas it is fixed and thus needs to be pre-trained in Method 2. We use a U-Net [40] as feature
111
+ 123 extractor and can use hand-crafted features in addition to the learned features. More details about
112
+ 124 the pre- training can be found in the Appendix. The agent - environment interaction for Method 1 is
113
+ 125 depicted in Figure 1. For Method 2 we refer to the Appendix.
114
+ 126 Importantly, this setup enables us to use both a non-differentiable instance segmentation step and
115
+ 127 reward function, by encapsulation of the “pixels to instances” step in the environment and learning a
116
+ 128 policy based on the rewards with a stateless actor critic.
117
+
118
+ # 29 3.1 Stateless Reinforcement Learning Setup
119
+
120
+ 130 Unlike most RL settings [41], our approach does not require an explicitly time dependent state: the
121
+ 131 actions returned by the agent correspond to the real-valued edge weights in [0, 1], which are used to
122
+ 132 compute the graph partitioning. Any state can be reached by a single step from the initial state and
123
+ 133 there exists no time dependency in the state transition. Unlike [9], we predict all edge values at once
124
+ 134 which allows us to avoid the iterative strategy of [8] and deliver and evaluate a complete segmentation
125
+ 135 in every step. We implement a stateless actor critic formulation with episodes of length 1.
126
+ 136 To the best of our knowledge, stateless RL was introduced in [7] to study the connection between
127
+ 137 generative adversarial networks and actor critics and our method is one of the first practical applica
128
+ 138 tions of this concept. Here, the agent consists of an actor, which predicts the actions $a$ and a critic,
129
+ 139 which predicts the action value $Q$ (expected future discounted reward) given the actions. The stateless
130
+ 140 approach simplifies the action value function: the action value has to estimate the reward for a single
131
+ 141 step instead of estimating the expected sum of discounted future rewards for many steps. We have
132
+ 142 explored a multi-step setup as well, but found that it yields inferior results for our application; details
133
+ 143 can be found in the Appendix. As described in detail in 3.2, we compute localized sub-graph rewards
134
+ 144 instead of relying on a single global reward.
135
+ 145 The actor corresponds to a single GNN, which predicts the mean and variance of a normal distribution
136
+ 146 for each edge. The actions $a$ are determined by sampling from this distribution and applying a
137
+ 147 sigmoid to the result to obtain continuous edge weights in the value range $[ 0 , 1 ]$ . The GNN takes the
138
+ 148 state $s = ( G , F )$ as input arguments and its graph convolution for the $i ^ { t h }$ node is defined as in [39]:
139
+
140
+ $$
141
+ f _ { i } = \gamma _ { \pi } \left( f _ { i } , \frac { 1 } { | N ( i ) | } \sum _ { j \in N ( i ) } \phi _ { \pi } \left( f _ { i } , f _ { j } \right) \right)
142
+ $$
143
+
144
+ 149 where $\gamma _ { \pi }$ as well as $\phi _ { \pi }$ are MLPs, $( \cdot , \cdot )$ is the concatenation of vectors and $N ( i )$ is the set of neighbors
145
+ 150 of node $i$ . The gradient of the loss for the actor is given by:
146
+
147
+ $$
148
+ \nabla _ { \theta } \mathcal { L } _ { a c t o r } = \nabla _ { \theta } \frac { 1 } { | S G | } \sum _ { s g \in G } \left[ \alpha \sum _ { \hat { a } \in s g } l o g ( \pi ^ { \theta } ( \hat { a } | s ) ) - Q _ { s g } ( s , a ) \right]
149
+ $$
150
+
151
+ 151 This loss gradient is derived following [38]. We adapt it to the sub-graph reward structure by
152
+ 152 calculating the joint action probability of the policy $\bar { \pi ^ { \theta } }$ over each sub-graph $s g$ in the set of all
153
+ 153 sub-graphs $_ { S G }$ . Using this loss to optimize the policy parameters $\theta$ minimizes the Kullback-Leibler
154
+ 154 divergence between the Gibbs distribution of action values for each sub-graph $Q _ { s g } ( s , a )$ and the
155
+ 155 policy with respect to the parameters $\theta$ of the policy. $\alpha$ is a trainable temperature parameter which is
156
+ 156 optimized following the method introduced by [38].
157
+ 158 The critic predicts the action value $Q _ { s g }$ for each sub-graph $s g \in S G$ . It consists of a GNN $Q _ { s g } ( s , a )$
158
+ 159 that takes the state $s = ( G , F )$ as well as the actions $a$ predicted by the actor as input and predicts a
159
+ 160 feature vector for each edge. The graph convolution from Equation 2 is slightly modified:
160
+
161
+ $$
162
+ f _ { i } = \gamma _ { Q } \left( f _ { i } , \frac { 1 } { | N ( i ) | } \sum _ { j \in N ( i ) } \phi _ { Q } \left( f _ { i } , f _ { j } , a _ { ( i , j ) } \right) \right)
163
+ $$
164
+
165
+ 161 again $\gamma _ { Q }$ and $\phi _ { Q }$ are MLPs. Based on these edge features $Q _ { s g }$ is predicted for each sub-graph via an
166
+ 162 MLP. Here, we use a set of subgraph sizes (typically, 6, 12, 32, 128) to generate a supervison signal
167
+ 163 for different neighborhood scales. A given MLP is only valid for a fixed graph size, so we employ a
168
+ 164 different MLP for each size. The loss for the critic is given by:
169
+
170
+ ![](images/3f4493ed09180ba81a14d1690c547c95c135b09c821df0c11e547cc937d7ab20.jpg)
171
+ Figure 2: The graph is subdivided into subgraphs, each sub-graph is highlighted by a different color. All sub-graphs have the same number of edges (here 3). Overall, we use a variety of sizes covering different notions of locality.
172
+
173
+ ![](images/31e7a00696e002558ca681b315911998f5079bf312633c750b9833e3606aa907.jpg)
174
+ Figure 3: An example reward landscape Circle Hough Transform (CHT) rewards. High rewards are given if the overall number of predicted objects is not too high and if the respective object has a large CHT value. We found an exponential gradient of the reward landscape to work best.
175
+
176
+ $$
177
+ \mathcal { L } _ { c r i t i c } = \frac { 1 } { | S G | } \sum _ { s g \in G } \frac { 1 } { 2 } ( Q _ { s g } ^ { \delta } ( s , a ) - r ) ^ { 2 }
178
+ $$
179
+
180
+ 165 Minimizing this loss with respect to the action value function’s parameters $\delta$ minimizes the difference
181
+ 166 between the expected reward and action values $Q _ { s g } ^ { \delta } ( s , a )$ .
182
+
183
+ # 3.2 Localized Supervision Signals
184
+
185
+ 168 The RL paradigm is to provide a global reward for a given state transition [41]. However, we find
186
+ 169 that for our application it is possible and desirable to instead provide several more localized rewards
187
+ 170 per state transition: Given a large action space with a policy represented by a complex multivariate
188
+ 171 probability distribution, it is beneficial to learn from rewards for the specific actions rather than from
189
+ 172 a scalar global reward for the union of all actions. Of course then requirement arises that the union of
190
+ 173 local rewards must resemble to the global reward. E.g. the optimal policy is the same for local as for
191
+ 174 the global reward.
192
+ 175 Our actor critic setup (Section 3.1) expects rewards per sub-graph. A good set of sub-graphs should
193
+ 176 fulfill the following requirements: each sub-graph should be connected so that the information
194
+ 177 presented to the MLP computing the action value for this sub-graph is correlated. The size of
195
+ 178 the sub-graphs, given by the number of edges, should be a parameter and all sub-graphs should
196
+ 179 be extracted with exactly that size to serve as valid input for one of the MLPs. The union of all
197
+ 180 sub-graphs should cover the complete graph so that each edge contributes to at least one action
198
+ 181 value $Q _ { s g }$ . The sub-graphs should overlap to provide a smooth sum of action values. We introduce
199
+ 182 Algorithm 1 to extract such a set of sub-graphs (see Appendix). Figure 2 shows the sub-graphs for a
200
+ 183 small example graph.
201
+ 184 While some of the rewards used in our experiments can be directly defined for the sub-graphs, most
202
+ 185 are instead defined per object (see Appendix for details on reward design). We use the following
203
+ 186 general procedure to map object-level rewards to sub-graphs: first assign to each superpixel the
204
+ 187 reward of its corresponding object, then determine the reward per edge as the maximum value of its
205
+ 188 two incident superpixels’ rewards and average the edge rewards to obtain the reward per sub-graph.
206
+ 189 Here, we use the maximum because high object scores indicate that all actions contributing to the
207
+ 190 respective object should get a high reward. However, for low object scores it is not possible to localize
208
+ 191 the specific action responsible for the low score. Hence, by taking the maximum we assign the
209
+ 192 higher score to edges whose incident superpixels belong to different objects, because they probably
210
+ 193 correspond to a correct split. Note that the uncertainty in the assignment of low rewards can lead to
211
+ 194 a noisy reward signal, but the averaging of the edge rewards over the sub-graphs and the overlaps
212
+
213
+ between the sub-graphs smooth and partially denoise the rewards. We have also explored a different actor critic setup that can use object level rewards directly, eliminating the need for the sub-graph extraction and mapping. However, this approach yields inferior results, see the Appendix for details.
214
+
215
+ # 4 Experiments
216
+
217
+ The agent of our setup acts on the superpixel graph and thus depends on the features assigned to the nodes of the graph. We introduced two variants of our algorithm: in the base variant (Method 1) we start from random features and make them part of the agent, allowing them to change through back-propagation (Fig. 1). In contrast, Method 2 acts on predefined features which are provided as part of the environment and are computed before training, e.g. through unsupervised clustering. A very accurate clustering in the features produces an easy problem for the agent to solve where even a global reward for all actions might be sufficient. However, in a real-world setting with no supervision, the noisier the features become the more local the reward has to be. We evaluate Method 2 on synthetic data where self-supervised pretraining can deliver noisy, but meaningful node features. Our full setup with Method 1 is evaluated on a dataset from a light microscopy experiment, where highly regular object shapes are to be expected, but no good feature pre-training is possible.
218
+
219
+ To transform the edge weight predictions of the agent into an instance segmentation we use the Multicut [42] algorithm. Here, other options are also possible such as hierarchical clustering used in [9], but we choose the Multicut for its global optimality property. Hyperparameters of the pipeline were found by cross-validation (see Appendix).
220
+
221
+ # 4.1 Synthetic dataset: circles on structured ground
222
+
223
+ To evaluate the feasibility of our approach, we create a synthetic dataset with prominent structured background. Our aim is to segment irregular disks on such background using only rule-based supervision. We generate the superpixels by the mutex watershed algorithm [25] which we run on the Gaussian gradient image. The node features of the superpixel graph were computed through self-supervised pretraining with contrastive loss as described in Appendix and fixed as part of the environment.
224
+
225
+ 221 As we aim to segment disks, we compute the circularity of the segmented objects for the rewards
226
+ 222 using the Circle Hough Transform [43]. This object-level reward is combined with the global rough
227
+ 223 estimate of the number of objects in the image to create the reward surface depicted in Fig. 3. The
228
+ 224 reward for the number of objects provides useful gradient during early training stages: for example,
229
+ 225 when too few potential objects are found in the prediction, a low reward can be given to what is
230
+ 226 thought to be the background object. On the other hand, if too many potential objects are found, a
231
+ 227 low reward can be given to all the foreground objects with a low CHT value.
232
+ 228 In more detail, the object rewards $r _ { f g }$ are composed as follows. We define a threshold $\gamma$ on the CHT
233
+ 229 value $( \gamma = 0 . 8$ in the reward surface shown in Fig. 3). Let $c \in [ 0 , 1 ]$ be the CHT value corresponding
234
+ 230 to the object and let $k$ be the total number of objects that we expect and $n$ be the number of predicted
235
+ 231 objects. Then
236
+
237
+ $$
238
+ \begin{array}{c} \begin{array} { r l } & { r _ { l o c a l } = \{ \sigma ( ( \frac { c - \gamma } { 1 - \gamma } - 0 . 5 ) 6 ) 0 . 4 , \mathrm { i f } c \geq \gamma } \\ & { \begin{array} { l l } { 0 , } & { \mathrm { o t w } } \\ { r _ { e x p } ( \frac { k } { n } ) , } & { \mathrm { i f } n \geq k } \end{array} } \\ & { r _ { g l o b a l } = \{ \begin{array} { l l } { \sigma ( \frac { c - \gamma } { 1 - \gamma } - 0 . 5 ) 6 ) 0 . 4 , } & { \mathrm { i f } c \geq \gamma } \\ { 0 . } & { \mathrm { o t o } } \end{array} } \\ & { \quad r _ { f g } = r _ { l o c a l } + r _ { g l o b a l } } \end{array} \end{array}
239
+ $$
240
+
241
+ 232 Here $\sigma ( \cdot )$ is the sigmoid function. The input to the sigmoid function is normalized to the interval
242
+ 233 $[ - 3 , 3 ]$ which was empirically found to be a good range. The rewards are always in $[ 0 , 1 ]$ here this is
243
+ 234 split up into $[ 0 , 0 . 5 ]$ for the local reward as well as for the global reward.
244
+ 235 For the largest predicted object we strongly suspect the background object. For this object background
245
+ 236 rewards $\boldsymbol { r } _ { b g }$ are calculated by
246
+
247
+ $$
248
+ r _ { b g } = { \left\{ \begin{array} { l l } { r _ { e x p } \left( { \frac { n } { k } } \right) , } & { { \mathrm { i f } } n \leq k } \\ { 1 , } & { { \mathrm { o t w } } } \end{array} \right. }
249
+ $$
250
+
251
+ 237 Note that this rewards have a large globally calculated part which makes this setup not fit for Method
252
+ 238 1. It needs some feature representation that already gives a good idea for the clustering. The only
253
+ 239 useful local information in the reward is the CHT value. Therefore, if the features have a fairly
254
+ 240 distinct structure for circles, the agent should be able to find and to correctly cluster them.
255
+
256
+ ![](images/4ddef94fe3a6f308d581972337cc7e5968de6c09d759549412cf6f46d648f43f.jpg)
257
+ Figure 4: The “Circles” dataset. Top left to right: ground truth segmentation, raw data, superpixel oversegmentation and a visualizataion for the actions on every edge, where a merge action is displayed in green and a split action in red. Bottom left to right: the pre-trained pixel embeddings projected to their first 3 PCA components shown as RGB, an edge image of the superpixels, the segmentation resulting from the graph agglomeration on the predicted edge weights and a visualization of the rewards based on the CHT, where light green shows high rewards and dark red low rewards.
258
+
259
+ Fig. 4 shows the output of all algorithm components on a sample image. For comparison, we also computed mutex watershed [25] predictions. Texture within objects and structured background are inherently difficult for region-growing algorithms, but our approach can exploit higher-level reasoning along with low-level information and achieve a good segmentation.
260
+
261
+ # 4.2 Real dataset: light microscopy imaging
262
+
263
+ Biomedical applications often require segmentation of objects of known morphology which are positioned in regular patterns, while extensive prior knowledge is available on variability of both under normal experimental conditions [44]. Such data presents the best use case for our algorithm as the reward function can leverage the known characteristics of individual object shape and texture and the overall similarity of the objects.
264
+
265
+ The dataset used for this experiment contains 317 2D images extracted from a video of a developing fruitfly embryo acquired with a light-sheet microscope [45] (Fig. 5). The image shows boundaries (plasma membranes) of the embryo cells. Across the dataset, 10 images were fully segmented by an expert, we use those for validation.
266
+
267
+ 55 Fruitfly embryo is a well-studied system for which we can exploit the prior knowledge on the expected
268
+ 56 cell shape and the radial pattern of cells. Furthermore, as the analysis of cell shape dynamics is
269
+ 57 a paramount part of many biological experiments, multiple pre-trained networks are available for
270
+ 58 the cell segmentation task [18, 19, 46, 47]. Due to the differences in sample preparation and image
271
+ 59 acquisition settings, none of these would work out-of-the-box for our data. However, the CNNs in
272
+ 60 [47] which are trained to predict boundaries in confocal microscope images of plant tissue, can serve
273
+ 61 as a strong edge detector to create superpixels in our images. The superpixels are obtained using the
274
+ 62 seeded watershed algorithm on seeds at the local minima of the predicted edge map.
275
+ 263 The rewards for this experiment are designed as follows: we set a high reward for merging the
276
+ 264 superpixels which are certain to lie in the background (close to the image boundary or the image
277
+ 265 center). For the background edges near the foreground area we modulate the reward by the circularity
278
+ 266 of the overall foreground contour. Finally, for the edges which are likely to be in the foreground
279
+ 267 we compute object-level rewards by fitting a rotated bounding box to each object and comparing its
280
+ 268 side lengths as well as its orientation to predefined template values. We do not perform semantic
281
+ 269 segmentation to define precise foreground/background boundaries, but instead use a soft weighting
282
+ 270 scheme with Gaussian weights to combine object and background rewards based on on the prior
283
+ 271 knowledge of the embryo width. An image of the weights for different locations in the image can be
284
+ 272 found in the appendix.
285
+ 273 More formally the edge rewards $r _ { e d g e }$ are calculated as follows. For each edge, we define the distance
286
+ 274 $h$ between the edge and the center of the image as the average distance of the incident objects’ center
287
+ 275 of mass and the center $c$ of the image. $j$ is the approximate radius of the circle that lies within the
288
+ 276 foreground and $m$ is the maximal distance between $c$ and the image boarder. Let further $\kappa ( \cdot )$ be the
289
+ 277 Gaussian kernel function. Then $r _ { e d g e }$ yields
290
+
291
+ ![](images/e9d1cd28100b429d214e13f4c9e439d9119d936de6460bae5a4b5c89b9ec8c3b.jpg)
292
+ Figure 5: Microscopy dataset experiment. Top left to right: ground truth segmentation; raw data; edge map; superpixel over-segmentation; visualization for the actions on every edge, where a merge action is displayed in green and a split action in red. Bottom left to right: a) handcrafted features; b) learned features accumulated on superpixels; c) learned features projected to their first 3 PCA components shown as RGB; the segmentation resulting from the Multicut on the predicted edge weights; visualization of the rewards, where light green shows high rewards and dark red low rewards.
293
+
294
+ $$
295
+ \begin{array} { l l } { r _ { b g } = \left\{ \begin{array} { l l } { K \left( \frac { | | h - c | | } { \gamma } \right) ( 1 - a ) , } & { \mathrm { ~ i f ~ } h \leq j } \\ { K \left( \frac { | | m - h | | } { \eta } \right) ( 1 - a ) , } & { \mathrm { ~ o t w } } \end{array} \right. } \\ { r _ { f g } = \mathcal { K } \left( \frac { | | h - j | | } { \delta } \right) m a x ( r _ { o 1 } , r _ { o 2 } ) } \\ { r _ { e d g e } = r _ { f g } + r _ { b g } } \end{array}
296
+ $$
297
+
298
+ 278 Here $\gamma , \eta , \delta$ are normalization constants. Equation 9 first determines the background probability for
299
+ 279 an edge by the kernel values. $1 - a$ constitutes a reward that directly favors merges which is scaled
300
+ 280 by the background probability. For each edge, $r _ { o 1 }$ and $r _ { o 2 }$ are the rewards corresponding to the two
301
+ 281 objects connected to that edge. The object rewards are given by fitting a rotated bounding box to the
302
+ 282 object and then compare rotation and dimensions to template values.
303
+ 283 Note that in this experiment no self-supervised pretraining is used for the node features in the
304
+ 284 agent’s GNNs. Unlike the “Circles” dataset, all objects in these images have very similar intensity
305
+ 285 distributions and can only be separated through the detection of boundaries between them. Instead
306
+ 286 of the pretraining, we experiment with using a few hand-crafted features like the polar coordinate
307
+ 287 of the node’s respective superpixel’s center of mass with respect to the coordinate system sitting
308
+ 288 at the center of the image as well as the superpixel’s mass, and with learning other features by
309
+ 289 back-propagation from the agent. The handcrafted features are normalized, concatenated to the
310
+ 290 learned features and used as input to the GNN. The projection of the first 3 PCA components of these
311
+ 291 features into RGB space is shown in Fig. 5 respectively for learned feature maps, their projection
312
+ 292 to node features through the accumulation procedure and finally the concatenation of those and the
313
+ 293 handcrafted features. Note that the learned features converge to a representation which resembles a
314
+ 294 semantic segmentation of boundaries in the image.
315
+
316
+ Table 1: Quantitative evaluation on the microscopy dataset. Note that the projection of superpixels to the ground truth (sp gt) sets an upper (lower for VI) bound for our method. We use Symmetric Best Dice as well as the Variation of Information metric to compare all results on the validation set.
317
+
318
+ <table><tr><td>Method</td><td>SBD</td><td>VI merge</td><td>VI split</td></tr><tr><td>sp gt</td><td>0.656 ± 0.019</td><td>0.672 ± 0.061</td><td>0.594 ± 0.028</td></tr><tr><td rowspan="2">ours + augmentation noise ours</td><td>0.508 ± 0.031</td><td>1.233 ± 0.156</td><td>1.060 ± 0.258</td></tr><tr><td>0.482 ± 0.020</td><td>0.839 ± 0.118</td><td>1.374 ± 0.357</td></tr><tr><td>ours without edges</td><td>0.446 ± 0.041</td><td>0.953 ± 0.212</td><td>0.994 ± 0.200</td></tr><tr><td>ours only handcrafted</td><td>0.408 ± 0.087</td><td>0.987 ± 0.101</td><td>1.536 ± 0.410</td></tr><tr><td>edge + mc [47]</td><td>0.283 ± 0.023</td><td>3.019 ± 0.040</td><td>0.342 ± 0.045</td></tr><tr><td>contrastive [28]</td><td>0.215 ± 0.009</td><td>1.155 ± 0.037</td><td>3.285 ± 0.084</td></tr><tr><td>contrastive + edge [28]</td><td>0.248 ± 0.014</td><td>1.229 ± 0.048</td><td>3.336 ± 0.073</td></tr></table>
319
+
320
+ We train the complete setup for Method 1 end-to-end on a Nvidia GeForce RTX 3090 GPU for 4 days. For comparison we keep the model which achieved the highest reward on the test set. This makes training as well as the validation independent from ground truth annotations. The evolution of the rewards on the validation set for different random seeds is shown in the Appendix. All of the conducted trainings show a stride for high rewards regardless of different random seeding.
321
+
322
+ 300 For the validation scores we use the variation of information (VI) for both input combinations (merge
323
+ 301 and split) and the Symmetric Best Dice score. To show the influence of the imperfect superpixels on
324
+ 302 the final clustering, we project the superpixels to their respective ground truth clustering ("sp gt" in
325
+ 303 Table 1) which sets an upper (lower in case of VI) bound for our method. In this study we use several
326
+ 304 versions of our approach. In Table 1 (ours) refers to method 1 as described in section 4.2, (ours $^ +$
327
+ 305 augmentation noise) is the same method but add some noise to the input data during training, (ours
328
+ 306 without edges) is our method but without the additional edge prediction as an input and (ours only
329
+ 307 handcrafted) is our method where we only use the handcrafted features as described in section 4.2.
330
+ 308 We find that learned features significantly contribute to the performance of our method.
331
+ 309 We compare to the following baseline approaches: $e d g e + m c$ , which solves the Multicut graph
332
+ 310 partitioning based on edge weights derived from boundary predictions used for superpixel creation,
333
+ 311 contrastive, which predicts a pixel-wise embedding space that is clustered into instances using
334
+ 312 $\mathbf { k }$ -means and for which the embeddings are trained using the discriminative loss function of [28] on
335
+ 313 the ovules dataset from [47] and contrastive $^ +$ edge, which is similar to contrastive, but receives the
336
+ 314 [47] boundary predictions as additional input channel.
337
+
338
+ # 315 5 Discussion
339
+
340
+ 316 We introduced an end-to-end instance segmentation algorithm which can exploit non-differentiable
341
+ 317 loss functions and high-level prior information. Our RL approach is based on stateless actor-critic
342
+ 318 and predicts the full segmentation at every step, allowing us to assign rewards to all objects and
343
+ 319 reach stable convergence. The segmentation problem is formulated as graph partitioning; we design
344
+ 320 a reward decomposition algorithm which maps object- and image-level rewards to sub-graphs for
345
+ 321 localized supervision.
346
+ 322 We performed proof-of-concept experiments to demonstrate the feasibility of our approach on
347
+ 323 synthetic and real data and showed in particular that our setup can segment microscopy images
348
+ 324 with no direct supervision other than high-level reasoning. In the future, we plan to explore other
349
+ 325 problems and reward functions as well as a semi-supervised setup (briefly introduced in Appendix)
350
+ 326 where we think our approach can be very beneficial. Furthermore, even in case of full supervision
351
+ 327 with ample groundtruth, our RL-based formulation enables end-to-end instance segmentation with
352
+ 328 direct object-level reasoning, which will allow for post-processing-aware training of the CNN which
353
+ 329 predicts object boundaries or embeddings.
354
+ 330 References
355
+ 331 [1] Kisuk Lee, Jonathan Zung, Peter Li, Viren Jain, and H Sebastian Seung. Superhuman accuracy
356
+ 332 on the snemi3d connectomics challenge. arXiv preprint arXiv:1706.00120, 2017.
357
+ 333 [2] Liang-Chieh Chen, Huiyu Wang, and Siyuan Qiao. Scaling wide residual networks for panoptic
358
+ 334 segmentation, 2021.
359
+ 335 [3] S. Osher and N. Paragios. Geometric Level Set Methods in Imaging, Vision, and Graphics.
360
+ 336 Springer New York, 2007. ISBN 9780387218106. URL https://books.google.de/books?
361
+ 337 id=ZWzrBwAAQBAJ.
362
+ 338 [4] Ricard Delgado-Gonzalo, Virginie Uhlmann, Daniel Schmitter, and Michael Unser. Snakes on
363
+ 339 a plane: A perfect snap for bioimage analysis. IEEE Signal Processing Magazine, 32(1):41–48,
364
+ 340 2014.
365
+ 341 [5] Ozan Oktay, Enzo Ferrante, Konstantinos Kamnitsas, Mattias Heinrich, Wenjia Bai, Jose
366
+ 342 Caballero, Stuart A. Cook, Antonio de Marvao, Timothy Dawes, Declan P. O‘Regan, Bernhard
367
+ 343 Kainz, Ben Glocker, and Daniel Rueckert. Anatomically constrained neural networks (acnns):
368
+ 344 Application to cardiac image enhancement and segmentation. IEEE Transactions on Medical
369
+ 345 Imaging, 37(2):384–395, 2018. doi: 10.1109/TMI.2017.2743464.
370
+ 346 [6] Hoel Kervadec, Jose Dolz, Meng Tang, Eric Granger, Yuri Boykov, and Ismail Ben Ayed.
371
+ 347 Constrained-cnn losses for weakly supervised segmentation. Medical Image Analysis, 54:88–99,
372
+ 348 2019. ISSN 1361-8415. doi: https://doi.org/10.1016/j.media.2019.02.009.
373
+ 349 [7] David Pfau and Oriol Vinyals. Connecting generative adversarial networks and actor-critic
374
+ 350 methods. CoRR, abs/1610.01945, 2016. URL http://arxiv.org/abs/1610.01945.
375
+ 351 [8] Nikita Araslanov, Constantin Rothkopf, and Stefan Roth. Actor-critic instance segmentation.
376
+ 352 In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR),
377
+ 353 2019.
378
+ 354 [9] Viren Jain, Srinivas Turaga, Kevin Briggman, Moritz Helmstaedter, Winfried Denk, and Hyun
379
+ 355 june Seung. Learning to agglomerate superpixel hierarchies. Advances in Neural Information
380
+ 356 Processing Systems, 24, 01 2011.
381
+ 357 [10] Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi,
382
+ 358 Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z. Leibo, Karl Tuyls, and Thore Graepel.
383
+ 359 Value-decomposition networks for cooperative multi-agent learning, 2017.
384
+ 360 [11] Drew Bagnell and Andrew Ng. On local rewards and scaling distributed reinforcement learning.
385
+ 361 In Y. Weiss, B. Schölkopf, and J. Platt, editors, Advances in Neural Information Processing
386
+ 362 Systems, volume 18. MIT Press, 2006. URL https://proceedings.neurips.cc/paper/
387
+ 363 2005/file/02180771a9b609a26dcea07f272e141f-Paper.pdf.
388
+ 364 [12] Huazhe Xu, Boyuan Chen, Yang Gao, and Trevor Darrell. Scoring-aggregating-planning:
389
+ 365 Learning task-agnostic priors from interactions and sparse rewards for zero-shot generalization.
390
+ 366 CoRR, abs/1910.08143, 2019. URL http://arxiv.org/abs/1910.08143.
391
+ 367 [13] Elad Eban, Mariano Schain, Alan Mackey, Ariel Gordon, Ryan Rifkin, and Gal Elidan. Scalable
392
+ 368 learning of non-decomposable objectives. In Artificial intelligence and statistics, pages 832–840.
393
+ 369 PMLR, 2017.
394
+ 370 [14] Maxim Berman, Amal Rannen Triki, and Matthew B Blaschko. The lovász-softmax loss:
395
+ 371 A tractable surrogate for the optimization of the intersection-over-union measure in neural
396
+ 372 networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition,
397
+ 373 pages 4413–4421, 2018.
398
+ 374 [15] Yang Song, Alexander G. Schwing, Richard S. Zemel, and Raquel Urtasun. Training deep
399
+ 375 neural networks via direct loss minimization. International Conference on Machine Learning,
400
+ 376 2016.
401
+
402
+ 77 [16] Cicero Nogueira dos Santos, Kahini Wadhawan, and Bowen Zhou. Learning loss functions for semi-supervised learning via discriminative adversarial networks, 2017.
403
+ 379 [17] Josif Grabocka, Randolf Scholz, and Lars Schmidt-Thieme. Learning surrogate losses. arXiv preprint arXiv:1905.10108, 2019. [18] Uwe Schmidt, Martin Weigert, Coleman Broaddus, and Gene Myers. Cell detection with star-convex polygons. In International Conference on Medical Image Computing and ComputerAssisted Intervention, pages 265–273. Springer, 2018. [19] Carsen Stringer, Tim Wang, Michalis Michaelos, and Marius Pachitariu. Cellpose: a generalist algorithm for cellular segmentation. Nature Methods, 18(1):100–106, 2021.
404
+ 86 [20] Xiaoling Hu, Fuxin Li, Dimitris Samaras, and Chao Chen. Topology-preserving deep image segmentation. In Advances in Neural Information Processing Systems, volume 32, 2019. URL https://proceedings.neurips.cc/paper/2019/file/ 2d95666e2649fcfc6e3af75e09f5adb9-Paper.pdf. [21] Constantin Pape, Alex Matskevych, Adrian Wolny, Julian Hennies, Giulia Mizzon, Marion Louveaux, Jacob Musser, Alexis Maizel, Detlev Arendt, and Anna Kreshuk. Leveraging domain knowledge to improve microscopy image segmentation with lifted multicuts. Frontiers in Computer Science, 1:6, 2019. [22] Jeremy B Maitin-Shepard, Viren Jain, Michal Januszewski, Peter Li, and Pieter Abbeel. Combinatorial energy learning for image segmentation. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper/2016/file/ 31857b449c407203749ae32dd0e7d64a-Paper.pdf.
405
+ 99 [23] Jie Song, Bjoern Andres, Michael J Black, Otmar Hilliges, and Siyu Tang. End-to-end learning for graph decomposition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10093–10102, 2019.
406
+ 02 [24] Naiyu Gao, Yanhu Shan, Yupei Wang, Xin Zhao, Yinan Yu, Ming Yang, and Kaiqi Huang. Ssap: Single-shot instance segmentation with affinity pyramid. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 642–651, 2019. [25] Steffen Wolf, Alberto Bailoni, Constantin Pape, Nasim Rahaman, Anna Kreshuk, Ullrich Köthe, and Fred A Hamprecht. The mutex watershed and its objective: Efficient, parameter-free graph partitioning. IEEE transactions on pattern analysis and machine intelligence, 2020. [26] Thorsten Beier, Constantin Pape, Nasim Rahaman, Timo Prange, Stuart Berg, Davi D Bock, Albert Cardona, Graham W Knott, Stephen M Plaza, Louis K Scheffer, et al. Multicut brings automated neurite segmentation closer to human performance. Nature methods, 14(2):101–102, 2017. [27] Jan Funke, Fabian Tschopp, William Grisaitis, Arlo Sheridan, Chandan Singh, Stephan Saalfeld, and Srinivas C Turaga. Large scale image segmentation with structured loss based deep learning for connectome reconstruction. IEEE transactions on pattern analysis and machine intelligence, 41(7):1669–1680, 2018.
407
+ 16 [28] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function. arXiv preprint arXiv:1708.02551, 2017.
408
+ 18 [29] Davy Neven, Bert De Brabandere, Marc Proesmans, and Luc Van Gool. Instance segmentation by jointly optimizing spatial embeddings and clustering bandwidth. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8837–8845, 2019.
409
+ 21 [30] Alberto Bailoni, Constantin Pape, Steffen Wolf, Thorsten Beier, Anna Kreshuk, and Fred A Hamprecht. A generalized framework for agglomerative clustering of signed graphs applied to instance segmentation. arXiv preprint arXiv:1906.11713, 2019.
410
+ [31] Leland McInnes and John Healy. Accelerated hierarchical density based clustering. In 2017 IEEE International Conference on Data Mining Workshops (ICDMW), pages 33–42. IEEE, 2017.
411
+ [32] Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. IEEE Transactions on pattern analysis and machine intelligence, 24(5):603–619, 2002.
412
+ [33] Bjoern Andres, Thorben Kroeger, Kevin L Briggman, Winfried Denk, Natalya Korogod, Graham Knott, Ullrich Koethe, and Fred A Hamprecht. Globally optimal closed-surface segmentation for connectomics. In European Conference on Computer Vision, pages 778–791. Springer, 2012.
413
+ [34] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961–2969, 2017.
414
+ [35] Marina Meila. Comparing clusterings by the variation of information. In ˘ Learning theory and kernel machines, pages 173–187. Springer, 2003.
415
+ [36] William M Rand. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical association, 66(336):846–850, 1971.
416
+ [37] Brian W Kernighan and Shen Lin. An efficient heuristic procedure for partitioning graphs. The Bell system technical journal, 49(2):291–307, 1970.
417
+ [38] Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, and Sergey Levine. Soft actor-critic algorithms and applications. CoRR, abs/1812.05905, 2018. URL http://arxiv.org/abs/ 1812.05905.
418
+ [39] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. CoRR, abs/1704.01212, 2017. URL http: //arxiv.org/abs/1704.01212.
419
+ [40] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. CoRR, abs/1505.04597, 2015. URL http://arxiv.org/ abs/1505.04597.
420
+ [41] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. The MIT Press, second edition, 2018. URL http://incompleteideas.net/book/the-book-2nd. html.
421
+ [42] Jörg Hendrik Kappes, Markus Speth, Björn Andres, Gerhard Reinelt, and Christoph Schn. Globally optimal image partitioning by multicuts. In Yuri Boykov, Fredrik Kahl, Victor Lempitsky, and Frank R. Schmidt, editors, Energy Minimization Methods in Computer Vision and Pattern Recognition, pages 31–44, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. ISBN 978-3-642-23094-3.
422
+ [43] Allam Shehata Hassanein, Sherien Mohammad, Mohamed Sameer, and Mohammad Ehab Ragab. A survey on hough transform, theory, techniques and applications. CoRR, abs/1502.02160, 2015. URL http://arxiv.org/abs/1502.02160.
423
+ [44] D’Arcy Wentworth Thompson. On Growth and Form. Canto. Cambridge University Press, 1992. doi: 10.1017/CBO9781107325852.
424
+ [45] Sourabh Bhide, Ralf Mikut, Maria Leptin, and Johannes Stegmaier. Semi-automatic generation of tight binary masks and non-convex isosurfaces for quantitative analysis of 3d biological samples, 2020.
425
+ [46] Lucas von Chamier, Romain F Laine, Johanna Jukkala, Christoph Spahn, Daniel Krentzel, Elias Nehme, Martina Lerche, Sara Hernández-Pérez, Pieta K Mattila, Eleni Karinou, Séamus Holden, Ahmet Can Solak, Alexander Krull, Tim-Oliver Buchholz, Martin L Jones, Loïc A Royer, Christophe Leterrier, Yoav Shechtman, Florian Jug, Mike Heilemann, Guillaume Jacquemet, and Ricardo Henriques. Democratising deep learning for microscopy with ZeroCostDL4Mic. Nature Communications, 4 2021.
426
+ [47] Adrian Wolny, Lorenzo Cerrone, Athul Vijayan, Rachele Tofanelli, Amaya Vilches Barro, Marion Louveaux, Christian Wenzl, Sören Strauss, David Wilson-Sánchez, Rena Lymbouridou, et al. Accurate and versatile 3d segmentation of plant tissues at cellular resolution. Elife, 9: e57613, 2020.
427
+ [48] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function, 2017.
428
+ [49] Reuben R. Shamir, Yuval Duchin, Jinyoung Kim, Guillermo Sapiro, and Noam Harel. Continuous dice coefficient: a method for evaluating probabilistic segmentations. CoRR, abs/1906.11031, 2019. URL http://arxiv.org/abs/1906.11031.
429
+
430
+ # Checklist
431
+
432
+ 1. For all authors...
433
+
434
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
435
+ (b) Did you describe the limitations of your work? [Yes]
436
+ (c) Did you discuss any potential negative societal impacts of your work? [No] It does not have any negative societal impacts.
437
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
438
+
439
+ 2. If you are including theoretical results...
440
+
441
+ (a) Did you state the full set of assumptions of all theoretical results? [N/A] We do not claim any theoretical assumptions. (b) Did you include complete proofs of all theoretical results? [N/A] See above.
442
+
443
+ 3. If you ran experiments...
444
+
445
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Yes, see the Supplementary.
446
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See the Supplementary
447
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] The bars are reported w.r.t. to the samples within the best seed, see Supplementary section for further details
448
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes]
449
+
450
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
451
+
452
+ (a) If your work uses existing assets, did you cite the creators? [Yes]
453
+ (b) Did you mention the license of the assets? [Yes]
454
+ (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] The link to the biological dataset is given in the Supplementary
455
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? The dataset was provided from the other laboratory as a part of collaboration.
456
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] No human data is used
457
+
458
+ 5. If you used crowdsourcing or conducted research with human subjects...
459
+
460
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
461
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
462
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI_content_list.json ADDED
@@ -0,0 +1,1065 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Stateless actor-critic for instance segmentation with high-level priors ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 187,
8
+ 122,
9
+ 810,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 226,
20
+ 580,
21
+ 281
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 318,
32
+ 535,
33
+ 334
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Instance segmentation is an important computer vision problem which remains challenging despite impressive recent advances due to deep learning-based methods. Given sufficient training data, fully supervised methods can yield excellent performance, but annotation of ground-truth data remains a major bottleneck, especially for biomedical applications where it has to be performed by domain experts. The amount of labels required can be drastically reduced by using rules derived from prior knowledge to guide the segmentation. However, these rules are in general not differentiable and thus cannot be used with existing methods. Here, we relax this requirement by using stateless actor critic reinforcement learning, which enables non-differentiable rewards. We formulate the instance segmentation problem as graph partitioning and the actor critic predicts the edge weights driven by the rewards, which are based on the conformity of segmented instances to high-level priors on object shape, position or size. The experiments on toy and real datasets demonstrate that we can achieve excellent performance without any direct supervision based only on a rich set of priors. ",
40
+ "bbox": [
41
+ 148,
42
+ 352,
43
+ 767,
44
+ 560
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "16 1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 148,
54
+ 588,
55
+ 312,
56
+ 606
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "17 Instance segmentation is the task of segmenting all objects in an image and assigning each of them \n18 a different label. It forms the necessary first step to the analysis of individual objects in a scene \n19 and is thus of paramount importance in many practical applications of computer vision. Over the \n20 recent years, fully supervised instance segmentation methods have made tremendous progress both \n21 in natural image applications and in scientific imaging, achieving excellent segmentations for very \n22 difficult tasks [1, 2]. \n23 A large corpus of training images is hard to avoid when the segmentation method needs to take \n24 into account the full variability of the natural world. However, in many practical segmentation \n25 tasks the appearance of the objects can be expected to conform to certain rules which are known a \n26 priori. Examples include surveillance, industrial quality control and especially medical and biological \n27 imaging applications where full exploitation of such prior knowledge is particularly important as the \n28 training data is sparse and difficult to acquire: pixelwise annotation of the necessary instance-level \n29 groundtruth for a microscopy experiment can take weeks or even months of expert time. The use of \n30 shape priors has a strong history in this domain [3, 4], but the most powerful learned shape models \n31 still require groundtruth [5] and generic shapes are hard to combine with the CNN losses and other, \n32 non-shape, priors. For many high-level priors it has already been demonstrated that integration of \n33 the prior directly into the CNN loss can lead to superior segmentations while significantly reducing \n34 the necessary amounts of training data [6]. However, the requirement of formulating the prior as \n35 a differentiable function poses a severe limitation on the kinds of high-level knowledge that can \n36 be exploited with such an approach. The aim of our contribution is to address this limitation and \n37 establish a framework in which a rich set of non-differentiable rules and expectations can be used to \n38 steer the network training. \n39 To circumvent the requirement of a differentiable loss function, we turn to the reinforcement learning \n40 paradigm, where the rewards can be computed from a non-differentiable cost function. We base \n41 our framework on a stateless actor-critic setup [7], providing one of the first practical applications \n42 of this important theoretical construct. In more detail, we solve the instance segmentation problem \n43 as agglomeration of image superpixels, with the agent predicting the weights of the edges in the \n44 superpixel region adjacency graph. Based on the predicted weights, the segmentation is obtained \n45 through (non-differentiable) graph partitioning and the segmented objects are then evaluated by the \n46 critic, which learns to approximate the rewards based on the object- and image-level reasoning (see \n47 Fig. 1). \n48 The main contributions of this work can be summarized as follows: (i) we formulate instance segmen \n49 tation as a RL problem based on a stateless actor-critic setup, encapsulating the non-differentiable step \n50 of instance extraction into the environment and thus achieving end-to-end learning; (ii) we exploit \n51 prior knowledge on instance appearance and morphology by tying the rewards to the conformity of \n52 the predicted objects to pre-defined rules and learning to approximate the (non-differentiable) reward \n53 function with the critic; (iii) we introduce a strategy for spatial decomposition of rewards based on \n54 fixed-sized subgraphs to enable localized supervision from combinations of object- and image-level \n55 rules. (iv) we demonstrate the feasibility of our approach on synthetic and real images and show \n56 an application to an important segmentation task in developmental biology, where our framework \n57 delivers an excellent segmentation with no supervision other than high-level rules. ",
63
+ "bbox": [
64
+ 147,
65
+ 613,
66
+ 825,
67
+ 696
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "",
74
+ "bbox": [
75
+ 147,
76
+ 704,
77
+ 825,
78
+ 897
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 155,
87
+ 92,
88
+ 823,
89
+ 119
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 147,
98
+ 126,
99
+ 825,
100
+ 251
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 151,
109
+ 257,
110
+ 825,
111
+ 395
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 Related work ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 166,
121
+ 404,
122
+ 318,
123
+ 419
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Reinforcement learning has so far not found significant adoption in the segmentation domain. The closest to our work are two methods in which RL has been introduced to learn a sequence of segmentation decision steps as a Markov Decision Process. In the actor critic framework of [8], the actor recurrently predicts one instance mask at a time based on the gradient provided by the critic. The training needs fully segmented images as supervision and the overall system, including an LSTM sub-network between the encoder and the decoder, is fairly complex. In [9], the individual decision steps correspond to merges of clusters while their sequence defines a hierarchical agglomeration process on a superpixel graph. The reward function is based on Rand index and thus not differentiable, but the overall framework requires full (super)pixelwise supervision for training. ",
130
+ "bbox": [
131
+ 171,
132
+ 421,
133
+ 825,
134
+ 546
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "68 Reward decomposition was introduced for multi agent RL by [10] where a global reward is decom \n69 posed into a per agent reward. [11] proves that a stateless RL setup with decomposed rewards requires \n70 far less training samples than a RL setup with a global reward. In [12] reward decomposition is \n71 applied both temporally and spatially for zero-shot inference on unseen environments by training on \n72 locally selected samples to learn the underlying physics of the environment. \n73 The restriction to differentiable losses is present in all application domains of deep learning. Common \n74 ways to address it are usually based on a soft relaxation of the loss that can be differentiated. The \n75 relaxation can be designed specifically for the loss, such as, for example, Area-under-Curve [13] for \n76 classification or Jaccard Index [14] for semantic segmentation. These approaches are not directly \n77 applicable to our use case as we aim to enable the use of a variety of object- and image-level priors \n78 which can easily be combined without handcrafting an approximate loss for each case. More generally, \n79 but still for a concrete task loss, Direct Loss Minimization has been proposed for CNN training in \n80 [15]. For semi-supervised learning of a classification or ranking task, Discriminative Adversarial \n81 Networks have been proposed as a means to learn an approximation to the loss [16]. Most generally, \n82 Grabocka et al. in [17] propose to train a surrogate neural network which will serve as a smooth \n83 approximation of the true loss. In our setup, the critic can informally be viewed as a surrogate network \n84 as it learns to approximate the priors through the rewards by Q-learning. \n85 Incorporation of rules and priors is particularly important in biomedical imaging applications, where \n86 such knowledge can be exploited to augment or even substitute scarce groundtruth annotations. \n87 For example, the shape prior is explicitly encoded in the popular nuclear [18] and cellular [19] \n88 segmentation algorithms based on spatial embedding learning. Learned non-linear representations \n89 of the shape are used in [5], while in [20] the loss for object boundary prediction is made topology \n90 aware. Domain-specific priors can also be exploited in post-processing by graph partitioning [21]. \n91 Interestingly, the energy minimization procedure underlying the graph partitioning can also be \n92 incorporated into the learning step [22, 23]. ",
141
+ "bbox": [
142
+ 147,
143
+ 553,
144
+ 825,
145
+ 622
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "",
152
+ "bbox": [
153
+ 147,
154
+ 628,
155
+ 825,
156
+ 794
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "",
163
+ "bbox": [
164
+ 147,
165
+ 800,
166
+ 825,
167
+ 911
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "image",
173
+ "img_path": "images/b462ff7155eab119962a555dc5ed84447cb771088463b1c8eedcae8d77fef305.jpg",
174
+ "image_caption": [
175
+ "Figure 1: Interaction of the agent with the environment: (a) shows the state which is composed of the raw image and the superpixel over-segmentation; (b) depicts the agent and the superpixel graph, which accumulates the features for nodes of the GNN from pixels which belong to the corresponding superpixels; (c) given the state, the agent performs the actions by predicting edge weights on the superpixel graph; (d) the environment, which includes the graph partitioning built from the weights predicted through agent actions; (e) rewards are obtained by evaluating the segmentation arising from the graph partitioning, based on pre-defined and data dependent rules. The rewards are given back to the agent where they are used for training. "
176
+ ],
177
+ "image_footnote": [],
178
+ "bbox": [
179
+ 205,
180
+ 90,
181
+ 818,
182
+ 371
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "93 3 Methods ",
189
+ "text_level": 1,
190
+ "bbox": [
191
+ 155,
192
+ 526,
193
+ 279,
194
+ 542
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "The task of instance segmentation can be formalized as transforming an image $x$ into a labeling $y$ where $y$ maps each pixel to a label value. An instance corresponds to the maximal set of pixels with the same label value. Typically, the instance segmentation problem is solved via supervised learning, i.e. using a training set with ground-truth labels $\\hat { y }$ . Note that $y$ is invariant under the permutation of label values. In general, it is difficult to formulate instance segmentation in a fully differentiable manner. Most approaches first predict a \"soft\" representation with a CNN, e.g. affinities [1, 24, 25], boundaries [26, 27] or embeddings [28, 29] and apply non-differentiable post-processing, such as agglomeration [27, 30], clustering [31, 32] or partitioning [33], to obtain the instance segmentation. Alternatively, proposal-based methods predict a bounding-box per instance and then predict the instance mask for each bounding-box [34]. Furthermore, the common evaluation metrics for instance segmentation [35, 36] are also not differentiable. ",
201
+ "bbox": [
202
+ 165,
203
+ 551,
204
+ 825,
205
+ 704
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "105 Our main motivation to explore RL for the instance segmentation task is to circumvent the restriction \n106 to differentiable losses and - regardless of the loss - to make the whole pipeline differentiable end-to \n107 end even in presence of non-differentiable steps which transform pixelwise CNN predictions into \n108 individual instances. \n109 We formulate the instance segmentation problem using a region adjacency graph $G = ( V , E )$ , \n110 where the nodes $V$ correspond to superpixels (homogeneous clusters of pixels) and the edges $E$ \n111 connect nodes which belong to spatially adjacent superpixels. Given edge weights $W$ , an instance \n112 segmentation can be obtained by partitioning the graph, here using an approximate multicut solver \n113 [37]. Together, the image data, superpixels, graph and the graph partitioning make up the environment \n114 $\\mathcal { E }$ of our RL setup. Based on the state $s$ of $\\mathcal { E }$ , the agent $\\mathcal { A }$ predicts actions $a$ , which are used to \n115 compute the partitioning. The reward $r$ is then computed based on this partitioning. Our agent $\\mathcal { A }$ is a \n116 stateless actor-critic [38], represented by two graph neural networks (GNN) [39]. The actor predicts \n117 the actions $a$ based on the graph and its node features $F$ . The node(superpixel) features are computed \n118 by pooling together the corrresponding pixel features based on the raw image data. \n119 Here, we make use of two different setups: Method 1, where the per-pixel features are computed \n120 based on the image data with the feature extractor being part of the agent $\\mathcal { A }$ and Method 2 where the \n121 feature extractor is part of the environment $\\mathcal { E }$ . The feature extractor is trained end-to-end in Method \n122 1, whereas it is fixed and thus needs to be pre-trained in Method 2. We use a U-Net [40] as feature \n123 extractor and can use hand-crafted features in addition to the learned features. More details about \n124 the pre- training can be found in the Appendix. The agent - environment interaction for Method 1 is \n125 depicted in Figure 1. For Method 2 we refer to the Appendix. \n126 Importantly, this setup enables us to use both a non-differentiable instance segmentation step and \n127 reward function, by encapsulation of the “pixels to instances” step in the environment and learning a \n128 policy based on the rewards with a stateless actor critic. ",
212
+ "bbox": [
213
+ 142,
214
+ 710,
215
+ 825,
216
+ 766
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "",
223
+ "bbox": [
224
+ 140,
225
+ 772,
226
+ 825,
227
+ 911
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "",
234
+ "bbox": [
235
+ 140,
236
+ 90,
237
+ 825,
238
+ 189
239
+ ],
240
+ "page_idx": 3
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "",
245
+ "bbox": [
246
+ 142,
247
+ 194,
248
+ 825,
249
+ 237
250
+ ],
251
+ "page_idx": 3
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "29 3.1 Stateless Reinforcement Learning Setup ",
256
+ "text_level": 1,
257
+ "bbox": [
258
+ 153,
259
+ 243,
260
+ 493,
261
+ 258
262
+ ],
263
+ "page_idx": 3
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "130 Unlike most RL settings [41], our approach does not require an explicitly time dependent state: the \n131 actions returned by the agent correspond to the real-valued edge weights in [0, 1], which are used to \n132 compute the graph partitioning. Any state can be reached by a single step from the initial state and \n133 there exists no time dependency in the state transition. Unlike [9], we predict all edge values at once \n134 which allows us to avoid the iterative strategy of [8] and deliver and evaluate a complete segmentation \n135 in every step. We implement a stateless actor critic formulation with episodes of length 1. \n136 To the best of our knowledge, stateless RL was introduced in [7] to study the connection between \n137 generative adversarial networks and actor critics and our method is one of the first practical applica \n138 tions of this concept. Here, the agent consists of an actor, which predicts the actions $a$ and a critic, \n139 which predicts the action value $Q$ (expected future discounted reward) given the actions. The stateless \n140 approach simplifies the action value function: the action value has to estimate the reward for a single \n141 step instead of estimating the expected sum of discounted future rewards for many steps. We have \n142 explored a multi-step setup as well, but found that it yields inferior results for our application; details \n143 can be found in the Appendix. As described in detail in 3.2, we compute localized sub-graph rewards \n144 instead of relying on a single global reward. \n145 The actor corresponds to a single GNN, which predicts the mean and variance of a normal distribution \n146 for each edge. The actions $a$ are determined by sampling from this distribution and applying a \n147 sigmoid to the result to obtain continuous edge weights in the value range $[ 0 , 1 ]$ . The GNN takes the \n148 state $s = ( G , F )$ as input arguments and its graph convolution for the $i ^ { t h }$ node is defined as in [39]: ",
268
+ "bbox": [
269
+ 140,
270
+ 261,
271
+ 825,
272
+ 343
273
+ ],
274
+ "page_idx": 3
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "",
279
+ "bbox": [
280
+ 140,
281
+ 349,
282
+ 825,
283
+ 474
284
+ ],
285
+ "page_idx": 3
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "",
290
+ "bbox": [
291
+ 142,
292
+ 479,
293
+ 825,
294
+ 537
295
+ ],
296
+ "page_idx": 3
297
+ },
298
+ {
299
+ "type": "equation",
300
+ "img_path": "images/93eae7ed991f3c0e200ae7e0a38b3b4728e4d87ca0fa5ed3f818765f22c979a3.jpg",
301
+ "text": "$$\nf _ { i } = \\gamma _ { \\pi } \\left( f _ { i } , \\frac { 1 } { | N ( i ) | } \\sum _ { j \\in N ( i ) } \\phi _ { \\pi } \\left( f _ { i } , f _ { j } \\right) \\right)\n$$",
302
+ "text_format": "latex",
303
+ "bbox": [
304
+ 362,
305
+ 541,
306
+ 633,
307
+ 592
308
+ ],
309
+ "page_idx": 3
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "149 where $\\gamma _ { \\pi }$ as well as $\\phi _ { \\pi }$ are MLPs, $( \\cdot , \\cdot )$ is the concatenation of vectors and $N ( i )$ is the set of neighbors \n150 of node $i$ . The gradient of the loss for the actor is given by: ",
314
+ "bbox": [
315
+ 140,
316
+ 595,
317
+ 825,
318
+ 625
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "equation",
324
+ "img_path": "images/65b99b34f45bd263d340c73317153e13bb8d25a2e5592b49cc0254fdd99cacd9.jpg",
325
+ "text": "$$\n\\nabla _ { \\theta } \\mathcal { L } _ { a c t o r } = \\nabla _ { \\theta } \\frac { 1 } { | S G | } \\sum _ { s g \\in G } \\left[ \\alpha \\sum _ { \\hat { a } \\in s g } l o g ( \\pi ^ { \\theta } ( \\hat { a } | s ) ) - Q _ { s g } ( s , a ) \\right]\n$$",
326
+ "text_format": "latex",
327
+ "bbox": [
328
+ 289,
329
+ 627,
330
+ 707,
331
+ 678
332
+ ],
333
+ "page_idx": 3
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "151 This loss gradient is derived following [38]. We adapt it to the sub-graph reward structure by \n152 calculating the joint action probability of the policy $\\bar { \\pi ^ { \\theta } }$ over each sub-graph $s g$ in the set of all \n153 sub-graphs $_ { S G }$ . Using this loss to optimize the policy parameters $\\theta$ minimizes the Kullback-Leibler \n154 divergence between the Gibbs distribution of action values for each sub-graph $Q _ { s g } ( s , a )$ and the \n155 policy with respect to the parameters $\\theta$ of the policy. $\\alpha$ is a trainable temperature parameter which is \n156 optimized following the method introduced by [38]. \n158 The critic predicts the action value $Q _ { s g }$ for each sub-graph $s g \\in S G$ . It consists of a GNN $Q _ { s g } ( s , a )$ \n159 that takes the state $s = ( G , F )$ as well as the actions $a$ predicted by the actor as input and predicts a \n160 feature vector for each edge. The graph convolution from Equation 2 is slightly modified: ",
338
+ "bbox": [
339
+ 140,
340
+ 680,
341
+ 825,
342
+ 765
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "",
349
+ "bbox": [
350
+ 142,
351
+ 784,
352
+ 825,
353
+ 827
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "equation",
359
+ "img_path": "images/918809cd9a148a31cfd44bc1682217b00f37aa107bfd18bc9a9c5e0fe7d91150.jpg",
360
+ "text": "$$\nf _ { i } = \\gamma _ { Q } \\left( f _ { i } , \\frac { 1 } { | N ( i ) | } \\sum _ { j \\in N ( i ) } \\phi _ { Q } \\left( f _ { i } , f _ { j } , a _ { ( i , j ) } \\right) \\right)\n$$",
361
+ "text_format": "latex",
362
+ "bbox": [
363
+ 339,
364
+ 830,
365
+ 656,
366
+ 880
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "161 again $\\gamma _ { Q }$ and $\\phi _ { Q }$ are MLPs. Based on these edge features $Q _ { s g }$ is predicted for each sub-graph via an \n162 MLP. Here, we use a set of subgraph sizes (typically, 6, 12, 32, 128) to generate a supervison signal \n163 for different neighborhood scales. A given MLP is only valid for a fixed graph size, so we employ a \n164 different MLP for each size. The loss for the critic is given by: ",
373
+ "bbox": [
374
+ 138,
375
+ 883,
376
+ 825,
377
+ 912
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "image",
383
+ "img_path": "images/3f4493ed09180ba81a14d1690c547c95c135b09c821df0c11e547cc937d7ab20.jpg",
384
+ "image_caption": [
385
+ "Figure 2: The graph is subdivided into subgraphs, each sub-graph is highlighted by a different color. All sub-graphs have the same number of edges (here 3). Overall, we use a variety of sizes covering different notions of locality. "
386
+ ],
387
+ "image_footnote": [],
388
+ "bbox": [
389
+ 196,
390
+ 92,
391
+ 470,
392
+ 267
393
+ ],
394
+ "page_idx": 4
395
+ },
396
+ {
397
+ "type": "image",
398
+ "img_path": "images/31e7a00696e002558ca681b315911998f5079bf312633c750b9833e3606aa907.jpg",
399
+ "image_caption": [
400
+ "Figure 3: An example reward landscape Circle Hough Transform (CHT) rewards. High rewards are given if the overall number of predicted objects is not too high and if the respective object has a large CHT value. We found an exponential gradient of the reward landscape to work best. "
401
+ ],
402
+ "image_footnote": [],
403
+ "bbox": [
404
+ 534,
405
+ 101,
406
+ 795,
407
+ 257
408
+ ],
409
+ "page_idx": 4
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "",
414
+ "bbox": [
415
+ 137,
416
+ 390,
417
+ 823,
418
+ 420
419
+ ],
420
+ "page_idx": 4
421
+ },
422
+ {
423
+ "type": "equation",
424
+ "img_path": "images/81f2a83ef183f0fa5fff2ab9ef67852fc1b4bb87ab17d02e57428db5c00961bf.jpg",
425
+ "text": "$$\n\\mathcal { L } _ { c r i t i c } = \\frac { 1 } { | S G | } \\sum _ { s g \\in G } \\frac { 1 } { 2 } ( Q _ { s g } ^ { \\delta } ( s , a ) - r ) ^ { 2 }\n$$",
426
+ "text_format": "latex",
427
+ "bbox": [
428
+ 364,
429
+ 424,
430
+ 632,
431
+ 464
432
+ ],
433
+ "page_idx": 4
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "165 Minimizing this loss with respect to the action value function’s parameters $\\delta$ minimizes the difference \n166 between the expected reward and action values $Q _ { s g } ^ { \\delta } ( s , a )$ . ",
438
+ "bbox": [
439
+ 148,
440
+ 472,
441
+ 826,
442
+ 502
443
+ ],
444
+ "page_idx": 4
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "3.2 Localized Supervision Signals ",
449
+ "text_level": 1,
450
+ "bbox": [
451
+ 169,
452
+ 508,
453
+ 421,
454
+ 522
455
+ ],
456
+ "page_idx": 4
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "168 The RL paradigm is to provide a global reward for a given state transition [41]. However, we find \n169 that for our application it is possible and desirable to instead provide several more localized rewards \n170 per state transition: Given a large action space with a policy represented by a complex multivariate \n171 probability distribution, it is beneficial to learn from rewards for the specific actions rather than from \n172 a scalar global reward for the union of all actions. Of course then requirement arises that the union of \n173 local rewards must resemble to the global reward. E.g. the optimal policy is the same for local as for \n174 the global reward. \n175 Our actor critic setup (Section 3.1) expects rewards per sub-graph. A good set of sub-graphs should \n176 fulfill the following requirements: each sub-graph should be connected so that the information \n177 presented to the MLP computing the action value for this sub-graph is correlated. The size of \n178 the sub-graphs, given by the number of edges, should be a parameter and all sub-graphs should \n179 be extracted with exactly that size to serve as valid input for one of the MLPs. The union of all \n180 sub-graphs should cover the complete graph so that each edge contributes to at least one action \n181 value $Q _ { s g }$ . The sub-graphs should overlap to provide a smooth sum of action values. We introduce \n182 Algorithm 1 to extract such a set of sub-graphs (see Appendix). Figure 2 shows the sub-graphs for a \n183 small example graph. \n184 While some of the rewards used in our experiments can be directly defined for the sub-graphs, most \n185 are instead defined per object (see Appendix for details on reward design). We use the following \n186 general procedure to map object-level rewards to sub-graphs: first assign to each superpixel the \n187 reward of its corresponding object, then determine the reward per edge as the maximum value of its \n188 two incident superpixels’ rewards and average the edge rewards to obtain the reward per sub-graph. \n189 Here, we use the maximum because high object scores indicate that all actions contributing to the \n190 respective object should get a high reward. However, for low object scores it is not possible to localize \n191 the specific action responsible for the low score. Hence, by taking the maximum we assign the \n192 higher score to edges whose incident superpixels belong to different objects, because they probably \n193 correspond to a correct split. Note that the uncertainty in the assignment of low rewards can lead to \n194 a noisy reward signal, but the averaging of the edge rewards over the sub-graphs and the overlaps ",
461
+ "bbox": [
462
+ 143,
463
+ 525,
464
+ 825,
465
+ 621
466
+ ],
467
+ "page_idx": 4
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "",
472
+ "bbox": [
473
+ 140,
474
+ 627,
475
+ 825,
476
+ 753
477
+ ],
478
+ "page_idx": 4
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "",
483
+ "bbox": [
484
+ 140,
485
+ 758,
486
+ 825,
487
+ 911
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "between the sub-graphs smooth and partially denoise the rewards. We have also explored a different actor critic setup that can use object level rewards directly, eliminating the need for the sub-graph extraction and mapping. However, this approach yields inferior results, see the Appendix for details. ",
494
+ "bbox": [
495
+ 160,
496
+ 90,
497
+ 825,
498
+ 133
499
+ ],
500
+ "page_idx": 5
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "4 Experiments ",
505
+ "text_level": 1,
506
+ "bbox": [
507
+ 166,
508
+ 145,
509
+ 312,
510
+ 161
511
+ ],
512
+ "page_idx": 5
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "The agent of our setup acts on the superpixel graph and thus depends on the features assigned to the nodes of the graph. We introduced two variants of our algorithm: in the base variant (Method 1) we start from random features and make them part of the agent, allowing them to change through back-propagation (Fig. 1). In contrast, Method 2 acts on predefined features which are provided as part of the environment and are computed before training, e.g. through unsupervised clustering. A very accurate clustering in the features produces an easy problem for the agent to solve where even a global reward for all actions might be sufficient. However, in a real-world setting with no supervision, the noisier the features become the more local the reward has to be. We evaluate Method 2 on synthetic data where self-supervised pretraining can deliver noisy, but meaningful node features. Our full setup with Method 1 is evaluated on a dataset from a light microscopy experiment, where highly regular object shapes are to be expected, but no good feature pre-training is possible. ",
517
+ "bbox": [
518
+ 173,
519
+ 162,
520
+ 825,
521
+ 315
522
+ ],
523
+ "page_idx": 5
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "To transform the edge weight predictions of the agent into an instance segmentation we use the Multicut [42] algorithm. Here, other options are also possible such as hierarchical clustering used in [9], but we choose the Multicut for its global optimality property. Hyperparameters of the pipeline were found by cross-validation (see Appendix). ",
528
+ "bbox": [
529
+ 171,
530
+ 321,
531
+ 825,
532
+ 377
533
+ ],
534
+ "page_idx": 5
535
+ },
536
+ {
537
+ "type": "text",
538
+ "text": "4.1 Synthetic dataset: circles on structured ground ",
539
+ "text_level": 1,
540
+ "bbox": [
541
+ 174,
542
+ 386,
543
+ 540,
544
+ 400
545
+ ],
546
+ "page_idx": 5
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "To evaluate the feasibility of our approach, we create a synthetic dataset with prominent structured background. Our aim is to segment irregular disks on such background using only rule-based supervision. We generate the superpixels by the mutex watershed algorithm [25] which we run on the Gaussian gradient image. The node features of the superpixel graph were computed through self-supervised pretraining with contrastive loss as described in Appendix and fixed as part of the environment. ",
551
+ "bbox": [
552
+ 171,
553
+ 402,
554
+ 825,
555
+ 486
556
+ ],
557
+ "page_idx": 5
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "221 As we aim to segment disks, we compute the circularity of the segmented objects for the rewards \n222 using the Circle Hough Transform [43]. This object-level reward is combined with the global rough \n223 estimate of the number of objects in the image to create the reward surface depicted in Fig. 3. The \n224 reward for the number of objects provides useful gradient during early training stages: for example, \n225 when too few potential objects are found in the prediction, a low reward can be given to what is \n226 thought to be the background object. On the other hand, if too many potential objects are found, a \n227 low reward can be given to all the foreground objects with a low CHT value. \n228 In more detail, the object rewards $r _ { f g }$ are composed as follows. We define a threshold $\\gamma$ on the CHT \n229 value $( \\gamma = 0 . 8$ in the reward surface shown in Fig. 3). Let $c \\in [ 0 , 1 ]$ be the CHT value corresponding \n230 to the object and let $k$ be the total number of objects that we expect and $n$ be the number of predicted \n231 objects. Then ",
562
+ "bbox": [
563
+ 140,
564
+ 492,
565
+ 825,
566
+ 589
567
+ ],
568
+ "page_idx": 5
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "",
573
+ "bbox": [
574
+ 140,
575
+ 594,
576
+ 825,
577
+ 651
578
+ ],
579
+ "page_idx": 5
580
+ },
581
+ {
582
+ "type": "equation",
583
+ "img_path": "images/91fead50ba42eaef7e50aa186045a7e93cea6f28a56db5aebf8b91500418fea1.jpg",
584
+ "text": "$$\n\\begin{array}{c} \\begin{array} { r l } & { r _ { l o c a l } = \\{ \\sigma ( ( \\frac { c - \\gamma } { 1 - \\gamma } - 0 . 5 ) 6 ) 0 . 4 , \\mathrm { i f } c \\geq \\gamma } \\\\ & { \\begin{array} { l l } { 0 , } & { \\mathrm { o t w } } \\\\ { r _ { e x p } ( \\frac { k } { n } ) , } & { \\mathrm { i f } n \\geq k } \\end{array} } \\\\ & { r _ { g l o b a l } = \\{ \\begin{array} { l l } { \\sigma ( \\frac { c - \\gamma } { 1 - \\gamma } - 0 . 5 ) 6 ) 0 . 4 , } & { \\mathrm { i f } c \\geq \\gamma } \\\\ { 0 . } & { \\mathrm { o t o } } \\end{array} } \\\\ & { \\quad r _ { f g } = r _ { l o c a l } + r _ { g l o b a l } } \\end{array} \\end{array}\n$$",
585
+ "text_format": "latex",
586
+ "bbox": [
587
+ 348,
588
+ 654,
589
+ 650,
590
+ 756
591
+ ],
592
+ "page_idx": 5
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "232 Here $\\sigma ( \\cdot )$ is the sigmoid function. The input to the sigmoid function is normalized to the interval \n233 $[ - 3 , 3 ]$ which was empirically found to be a good range. The rewards are always in $[ 0 , 1 ]$ here this is \n234 split up into $[ 0 , 0 . 5 ]$ for the local reward as well as for the global reward. \n235 For the largest predicted object we strongly suspect the background object. For this object background \n236 rewards $\\boldsymbol { r } _ { b g }$ are calculated by ",
597
+ "bbox": [
598
+ 138,
599
+ 761,
600
+ 825,
601
+ 803
602
+ ],
603
+ "page_idx": 5
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "",
608
+ "bbox": [
609
+ 148,
610
+ 804,
611
+ 825,
612
+ 832
613
+ ],
614
+ "page_idx": 5
615
+ },
616
+ {
617
+ "type": "equation",
618
+ "img_path": "images/ef73c74b4c8a717eab1ab65a3c8b655f945995f7f4d0d024e6027eb3ff3f3198.jpg",
619
+ "text": "$$\nr _ { b g } = { \\left\\{ \\begin{array} { l l } { r _ { e x p } \\left( { \\frac { n } { k } } \\right) , } & { { \\mathrm { i f } } n \\leq k } \\\\ { 1 , } & { { \\mathrm { o t w } } } \\end{array} \\right. }\n$$",
620
+ "text_format": "latex",
621
+ "bbox": [
622
+ 400,
623
+ 839,
624
+ 596,
625
+ 876
626
+ ],
627
+ "page_idx": 5
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "237 Note that this rewards have a large globally calculated part which makes this setup not fit for Method \n238 1. It needs some feature representation that already gives a good idea for the clustering. The only \n239 useful local information in the reward is the CHT value. Therefore, if the features have a fairly \n240 distinct structure for circles, the agent should be able to find and to correctly cluster them. ",
632
+ "bbox": [
633
+ 140,
634
+ 882,
635
+ 825,
636
+ 912
637
+ ],
638
+ "page_idx": 5
639
+ },
640
+ {
641
+ "type": "image",
642
+ "img_path": "images/4ddef94fe3a6f308d581972337cc7e5968de6c09d759549412cf6f46d648f43f.jpg",
643
+ "image_caption": [
644
+ "Figure 4: The “Circles” dataset. Top left to right: ground truth segmentation, raw data, superpixel oversegmentation and a visualizataion for the actions on every edge, where a merge action is displayed in green and a split action in red. Bottom left to right: the pre-trained pixel embeddings projected to their first 3 PCA components shown as RGB, an edge image of the superpixels, the segmentation resulting from the graph agglomeration on the predicted edge weights and a visualization of the rewards based on the CHT, where light green shows high rewards and dark red low rewards. "
645
+ ],
646
+ "image_footnote": [],
647
+ "bbox": [
648
+ 179,
649
+ 101,
650
+ 813,
651
+ 308
652
+ ],
653
+ "page_idx": 6
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "",
658
+ "bbox": [
659
+ 147,
660
+ 425,
661
+ 825,
662
+ 454
663
+ ],
664
+ "page_idx": 6
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "Fig. 4 shows the output of all algorithm components on a sample image. For comparison, we also computed mutex watershed [25] predictions. Texture within objects and structured background are inherently difficult for region-growing algorithms, but our approach can exploit higher-level reasoning along with low-level information and achieve a good segmentation. ",
669
+ "bbox": [
670
+ 173,
671
+ 455,
672
+ 823,
673
+ 510
674
+ ],
675
+ "page_idx": 6
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "4.2 Real dataset: light microscopy imaging ",
680
+ "text_level": 1,
681
+ "bbox": [
682
+ 174,
683
+ 525,
684
+ 485,
685
+ 540
686
+ ],
687
+ "page_idx": 6
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "Biomedical applications often require segmentation of objects of known morphology which are positioned in regular patterns, while extensive prior knowledge is available on variability of both under normal experimental conditions [44]. Such data presents the best use case for our algorithm as the reward function can leverage the known characteristics of individual object shape and texture and the overall similarity of the objects. ",
692
+ "bbox": [
693
+ 174,
694
+ 546,
695
+ 825,
696
+ 614
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "The dataset used for this experiment contains 317 2D images extracted from a video of a developing fruitfly embryo acquired with a light-sheet microscope [45] (Fig. 5). The image shows boundaries (plasma membranes) of the embryo cells. Across the dataset, 10 images were fully segmented by an expert, we use those for validation. ",
703
+ "bbox": [
704
+ 169,
705
+ 621,
706
+ 823,
707
+ 676
708
+ ],
709
+ "page_idx": 6
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "55 Fruitfly embryo is a well-studied system for which we can exploit the prior knowledge on the expected \n56 cell shape and the radial pattern of cells. Furthermore, as the analysis of cell shape dynamics is \n57 a paramount part of many biological experiments, multiple pre-trained networks are available for \n58 the cell segmentation task [18, 19, 46, 47]. Due to the differences in sample preparation and image \n59 acquisition settings, none of these would work out-of-the-box for our data. However, the CNNs in \n60 [47] which are trained to predict boundaries in confocal microscope images of plant tissue, can serve \n61 as a strong edge detector to create superpixels in our images. The superpixels are obtained using the \n62 seeded watershed algorithm on seeds at the local minima of the predicted edge map. \n263 The rewards for this experiment are designed as follows: we set a high reward for merging the \n264 superpixels which are certain to lie in the background (close to the image boundary or the image \n265 center). For the background edges near the foreground area we modulate the reward by the circularity \n266 of the overall foreground contour. Finally, for the edges which are likely to be in the foreground \n267 we compute object-level rewards by fitting a rotated bounding box to each object and comparing its \n268 side lengths as well as its orientation to predefined template values. We do not perform semantic \n269 segmentation to define precise foreground/background boundaries, but instead use a soft weighting \n270 scheme with Gaussian weights to combine object and background rewards based on on the prior \n271 knowledge of the embryo width. An image of the weights for different locations in the image can be \n272 found in the appendix. \n273 More formally the edge rewards $r _ { e d g e }$ are calculated as follows. For each edge, we define the distance \n274 $h$ between the edge and the center of the image as the average distance of the incident objects’ center \n275 of mass and the center $c$ of the image. $j$ is the approximate radius of the circle that lies within the \n276 foreground and $m$ is the maximal distance between $c$ and the image boarder. Let further $\\kappa ( \\cdot )$ be the \n277 Gaussian kernel function. Then $r _ { e d g e }$ yields ",
714
+ "bbox": [
715
+ 151,
716
+ 683,
717
+ 823,
718
+ 795
719
+ ],
720
+ "page_idx": 6
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "",
725
+ "bbox": [
726
+ 143,
727
+ 800,
728
+ 825,
729
+ 911
730
+ ],
731
+ "page_idx": 6
732
+ },
733
+ {
734
+ "type": "image",
735
+ "img_path": "images/e9d1cd28100b429d214e13f4c9e439d9119d936de6460bae5a4b5c89b9ec8c3b.jpg",
736
+ "image_caption": [
737
+ "Figure 5: Microscopy dataset experiment. Top left to right: ground truth segmentation; raw data; edge map; superpixel over-segmentation; visualization for the actions on every edge, where a merge action is displayed in green and a split action in red. Bottom left to right: a) handcrafted features; b) learned features accumulated on superpixels; c) learned features projected to their first 3 PCA components shown as RGB; the segmentation resulting from the Multicut on the predicted edge weights; visualization of the rewards, where light green shows high rewards and dark red low rewards. "
738
+ ],
739
+ "image_footnote": [],
740
+ "bbox": [
741
+ 222,
742
+ 103,
743
+ 784,
744
+ 345
745
+ ],
746
+ "page_idx": 7
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "",
751
+ "bbox": [
752
+ 143,
753
+ 472,
754
+ 825,
755
+ 502
756
+ ],
757
+ "page_idx": 7
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "",
762
+ "bbox": [
763
+ 140,
764
+ 507,
765
+ 823,
766
+ 578
767
+ ],
768
+ "page_idx": 7
769
+ },
770
+ {
771
+ "type": "equation",
772
+ "img_path": "images/83146543178bf9c280fbffab96ee561735e384b48ef4c1e4682a2e6b8ece5e58.jpg",
773
+ "text": "$$\n\\begin{array} { l l } { r _ { b g } = \\left\\{ \\begin{array} { l l } { K \\left( \\frac { | | h - c | | } { \\gamma } \\right) ( 1 - a ) , } & { \\mathrm { ~ i f ~ } h \\leq j } \\\\ { K \\left( \\frac { | | m - h | | } { \\eta } \\right) ( 1 - a ) , } & { \\mathrm { ~ o t w } } \\end{array} \\right. } \\\\ { r _ { f g } = \\mathcal { K } \\left( \\frac { | | h - j | | } { \\delta } \\right) m a x ( r _ { o 1 } , r _ { o 2 } ) } \\\\ { r _ { e d g e } = r _ { f g } + r _ { b g } } \\end{array}\n$$",
774
+ "text_format": "latex",
775
+ "bbox": [
776
+ 356,
777
+ 585,
778
+ 640,
779
+ 691
780
+ ],
781
+ "page_idx": 7
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "278 Here $\\gamma , \\eta , \\delta$ are normalization constants. Equation 9 first determines the background probability for \n279 an edge by the kernel values. $1 - a$ constitutes a reward that directly favors merges which is scaled \n280 by the background probability. For each edge, $r _ { o 1 }$ and $r _ { o 2 }$ are the rewards corresponding to the two \n281 objects connected to that edge. The object rewards are given by fitting a rotated bounding box to the \n282 object and then compare rotation and dimensions to template values. \n283 Note that in this experiment no self-supervised pretraining is used for the node features in the \n284 agent’s GNNs. Unlike the “Circles” dataset, all objects in these images have very similar intensity \n285 distributions and can only be separated through the detection of boundaries between them. Instead \n286 of the pretraining, we experiment with using a few hand-crafted features like the polar coordinate \n287 of the node’s respective superpixel’s center of mass with respect to the coordinate system sitting \n288 at the center of the image as well as the superpixel’s mass, and with learning other features by \n289 back-propagation from the agent. The handcrafted features are normalized, concatenated to the \n290 learned features and used as input to the GNN. The projection of the first 3 PCA components of these \n291 features into RGB space is shown in Fig. 5 respectively for learned feature maps, their projection \n292 to node features through the accumulation procedure and finally the concatenation of those and the \n293 handcrafted features. Note that the learned features converge to a representation which resembles a \n294 semantic segmentation of boundaries in the image. ",
786
+ "bbox": [
787
+ 140,
788
+ 696,
789
+ 825,
790
+ 767
791
+ ],
792
+ "page_idx": 7
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "",
797
+ "bbox": [
798
+ 140,
799
+ 772,
800
+ 825,
801
+ 912
802
+ ],
803
+ "page_idx": 7
804
+ },
805
+ {
806
+ "type": "table",
807
+ "img_path": "images/6a54bb86754204a3c8b7338019ddb36fba312935f3ee6714d22b0aa28ab9b851.jpg",
808
+ "table_caption": [
809
+ "Table 1: Quantitative evaluation on the microscopy dataset. Note that the projection of superpixels to the ground truth (sp gt) sets an upper (lower for VI) bound for our method. We use Symmetric Best Dice as well as the Variation of Information metric to compare all results on the validation set. "
810
+ ],
811
+ "table_footnote": [],
812
+ "table_body": "<table><tr><td>Method</td><td>SBD</td><td>VI merge</td><td>VI split</td></tr><tr><td>sp gt</td><td>0.656 ± 0.019</td><td>0.672 ± 0.061</td><td>0.594 ± 0.028</td></tr><tr><td rowspan=\"2\">ours + augmentation noise ours</td><td>0.508 ± 0.031</td><td>1.233 ± 0.156</td><td>1.060 ± 0.258</td></tr><tr><td>0.482 ± 0.020</td><td>0.839 ± 0.118</td><td>1.374 ± 0.357</td></tr><tr><td>ours without edges</td><td>0.446 ± 0.041</td><td>0.953 ± 0.212</td><td>0.994 ± 0.200</td></tr><tr><td>ours only handcrafted</td><td>0.408 ± 0.087</td><td>0.987 ± 0.101</td><td>1.536 ± 0.410</td></tr><tr><td>edge + mc [47]</td><td>0.283 ± 0.023</td><td>3.019 ± 0.040</td><td>0.342 ± 0.045</td></tr><tr><td>contrastive [28]</td><td>0.215 ± 0.009</td><td>1.155 ± 0.037</td><td>3.285 ± 0.084</td></tr><tr><td>contrastive + edge [28]</td><td>0.248 ± 0.014</td><td>1.229 ± 0.048</td><td>3.336 ± 0.073</td></tr></table>",
813
+ "bbox": [
814
+ 228,
815
+ 145,
816
+ 764,
817
+ 292
818
+ ],
819
+ "page_idx": 8
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "",
824
+ "bbox": [
825
+ 147,
826
+ 333,
827
+ 825,
828
+ 361
829
+ ],
830
+ "page_idx": 8
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "We train the complete setup for Method 1 end-to-end on a Nvidia GeForce RTX 3090 GPU for 4 days. For comparison we keep the model which achieved the highest reward on the test set. This makes training as well as the validation independent from ground truth annotations. The evolution of the rewards on the validation set for different random seeds is shown in the Appendix. All of the conducted trainings show a stride for high rewards regardless of different random seeding. ",
835
+ "bbox": [
836
+ 156,
837
+ 367,
838
+ 823,
839
+ 436
840
+ ],
841
+ "page_idx": 8
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "300 For the validation scores we use the variation of information (VI) for both input combinations (merge \n301 and split) and the Symmetric Best Dice score. To show the influence of the imperfect superpixels on \n302 the final clustering, we project the superpixels to their respective ground truth clustering (\"sp gt\" in \n303 Table 1) which sets an upper (lower in case of VI) bound for our method. In this study we use several \n304 versions of our approach. In Table 1 (ours) refers to method 1 as described in section 4.2, (ours $^ +$ \n305 augmentation noise) is the same method but add some noise to the input data during training, (ours \n306 without edges) is our method but without the additional edge prediction as an input and (ours only \n307 handcrafted) is our method where we only use the handcrafted features as described in section 4.2. \n308 We find that learned features significantly contribute to the performance of our method. \n309 We compare to the following baseline approaches: $e d g e + m c$ , which solves the Multicut graph \n310 partitioning based on edge weights derived from boundary predictions used for superpixel creation, \n311 contrastive, which predicts a pixel-wise embedding space that is clustered into instances using \n312 $\\mathbf { k }$ -means and for which the embeddings are trained using the discriminative loss function of [28] on \n313 the ovules dataset from [47] and contrastive $^ +$ edge, which is similar to contrastive, but receives the \n314 [47] boundary predictions as additional input channel. ",
846
+ "bbox": [
847
+ 140,
848
+ 443,
849
+ 825,
850
+ 568
851
+ ],
852
+ "page_idx": 8
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "",
857
+ "bbox": [
858
+ 140,
859
+ 568,
860
+ 825,
861
+ 650
862
+ ],
863
+ "page_idx": 8
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "315 5 Discussion ",
868
+ "text_level": 1,
869
+ "bbox": [
870
+ 143,
871
+ 680,
872
+ 294,
873
+ 696
874
+ ],
875
+ "page_idx": 8
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "316 We introduced an end-to-end instance segmentation algorithm which can exploit non-differentiable \n317 loss functions and high-level prior information. Our RL approach is based on stateless actor-critic \n318 and predicts the full segmentation at every step, allowing us to assign rewards to all objects and \n319 reach stable convergence. The segmentation problem is formulated as graph partitioning; we design \n320 a reward decomposition algorithm which maps object- and image-level rewards to sub-graphs for \n321 localized supervision. \n322 We performed proof-of-concept experiments to demonstrate the feasibility of our approach on \n323 synthetic and real data and showed in particular that our setup can segment microscopy images \n324 with no direct supervision other than high-level reasoning. In the future, we plan to explore other \n325 problems and reward functions as well as a semi-supervised setup (briefly introduced in Appendix) \n326 where we think our approach can be very beneficial. Furthermore, even in case of full supervision \n327 with ample groundtruth, our RL-based formulation enables end-to-end instance segmentation with \n328 direct object-level reasoning, which will allow for post-processing-aware training of the CNN which \n329 predicts object boundaries or embeddings. \n330 References \n331 [1] Kisuk Lee, Jonathan Zung, Peter Li, Viren Jain, and H Sebastian Seung. Superhuman accuracy \n332 on the snemi3d connectomics challenge. arXiv preprint arXiv:1706.00120, 2017. \n333 [2] Liang-Chieh Chen, Huiyu Wang, and Siyuan Qiao. Scaling wide residual networks for panoptic \n334 segmentation, 2021. \n335 [3] S. Osher and N. Paragios. Geometric Level Set Methods in Imaging, Vision, and Graphics. \n336 Springer New York, 2007. ISBN 9780387218106. URL https://books.google.de/books? \n337 id=ZWzrBwAAQBAJ. \n338 [4] Ricard Delgado-Gonzalo, Virginie Uhlmann, Daniel Schmitter, and Michael Unser. Snakes on \n339 a plane: A perfect snap for bioimage analysis. IEEE Signal Processing Magazine, 32(1):41–48, \n340 2014. \n341 [5] Ozan Oktay, Enzo Ferrante, Konstantinos Kamnitsas, Mattias Heinrich, Wenjia Bai, Jose \n342 Caballero, Stuart A. Cook, Antonio de Marvao, Timothy Dawes, Declan P. O‘Regan, Bernhard \n343 Kainz, Ben Glocker, and Daniel Rueckert. Anatomically constrained neural networks (acnns): \n344 Application to cardiac image enhancement and segmentation. IEEE Transactions on Medical \n345 Imaging, 37(2):384–395, 2018. doi: 10.1109/TMI.2017.2743464. \n346 [6] Hoel Kervadec, Jose Dolz, Meng Tang, Eric Granger, Yuri Boykov, and Ismail Ben Ayed. \n347 Constrained-cnn losses for weakly supervised segmentation. Medical Image Analysis, 54:88–99, \n348 2019. ISSN 1361-8415. doi: https://doi.org/10.1016/j.media.2019.02.009. \n349 [7] David Pfau and Oriol Vinyals. Connecting generative adversarial networks and actor-critic \n350 methods. CoRR, abs/1610.01945, 2016. URL http://arxiv.org/abs/1610.01945. \n351 [8] Nikita Araslanov, Constantin Rothkopf, and Stefan Roth. Actor-critic instance segmentation. \n352 In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), \n353 2019. \n354 [9] Viren Jain, Srinivas Turaga, Kevin Briggman, Moritz Helmstaedter, Winfried Denk, and Hyun \n355 june Seung. Learning to agglomerate superpixel hierarchies. Advances in Neural Information \n356 Processing Systems, 24, 01 2011. \n357 [10] Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, \n358 Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z. Leibo, Karl Tuyls, and Thore Graepel. \n359 Value-decomposition networks for cooperative multi-agent learning, 2017. \n360 [11] Drew Bagnell and Andrew Ng. On local rewards and scaling distributed reinforcement learning. \n361 In Y. Weiss, B. Schölkopf, and J. Platt, editors, Advances in Neural Information Processing \n362 Systems, volume 18. MIT Press, 2006. URL https://proceedings.neurips.cc/paper/ \n363 2005/file/02180771a9b609a26dcea07f272e141f-Paper.pdf. \n364 [12] Huazhe Xu, Boyuan Chen, Yang Gao, and Trevor Darrell. Scoring-aggregating-planning: \n365 Learning task-agnostic priors from interactions and sparse rewards for zero-shot generalization. \n366 CoRR, abs/1910.08143, 2019. URL http://arxiv.org/abs/1910.08143. \n367 [13] Elad Eban, Mariano Schain, Alan Mackey, Ariel Gordon, Ryan Rifkin, and Gal Elidan. Scalable \n368 learning of non-decomposable objectives. In Artificial intelligence and statistics, pages 832–840. \n369 PMLR, 2017. \n370 [14] Maxim Berman, Amal Rannen Triki, and Matthew B Blaschko. The lovász-softmax loss: \n371 A tractable surrogate for the optimization of the intersection-over-union measure in neural \n372 networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, \n373 pages 4413–4421, 2018. \n374 [15] Yang Song, Alexander G. Schwing, Richard S. Zemel, and Raquel Urtasun. Training deep \n375 neural networks via direct loss minimization. International Conference on Machine Learning, \n376 2016. ",
880
+ "bbox": [
881
+ 140,
882
+ 710,
883
+ 825,
884
+ 794
885
+ ],
886
+ "page_idx": 8
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "",
891
+ "bbox": [
892
+ 140,
893
+ 800,
894
+ 825,
895
+ 911
896
+ ],
897
+ "page_idx": 8
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "",
902
+ "bbox": [
903
+ 145,
904
+ 77,
905
+ 830,
906
+ 919
907
+ ],
908
+ "page_idx": 9
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "77 [16] Cicero Nogueira dos Santos, Kahini Wadhawan, and Bowen Zhou. Learning loss functions for semi-supervised learning via discriminative adversarial networks, 2017. \n379 [17] Josif Grabocka, Randolf Scholz, and Lars Schmidt-Thieme. Learning surrogate losses. arXiv preprint arXiv:1905.10108, 2019. [18] Uwe Schmidt, Martin Weigert, Coleman Broaddus, and Gene Myers. Cell detection with star-convex polygons. In International Conference on Medical Image Computing and ComputerAssisted Intervention, pages 265–273. Springer, 2018. [19] Carsen Stringer, Tim Wang, Michalis Michaelos, and Marius Pachitariu. Cellpose: a generalist algorithm for cellular segmentation. Nature Methods, 18(1):100–106, 2021. \n86 [20] Xiaoling Hu, Fuxin Li, Dimitris Samaras, and Chao Chen. Topology-preserving deep image segmentation. In Advances in Neural Information Processing Systems, volume 32, 2019. URL https://proceedings.neurips.cc/paper/2019/file/ 2d95666e2649fcfc6e3af75e09f5adb9-Paper.pdf. [21] Constantin Pape, Alex Matskevych, Adrian Wolny, Julian Hennies, Giulia Mizzon, Marion Louveaux, Jacob Musser, Alexis Maizel, Detlev Arendt, and Anna Kreshuk. Leveraging domain knowledge to improve microscopy image segmentation with lifted multicuts. Frontiers in Computer Science, 1:6, 2019. [22] Jeremy B Maitin-Shepard, Viren Jain, Michal Januszewski, Peter Li, and Pieter Abbeel. Combinatorial energy learning for image segmentation. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper/2016/file/ 31857b449c407203749ae32dd0e7d64a-Paper.pdf. \n99 [23] Jie Song, Bjoern Andres, Michael J Black, Otmar Hilliges, and Siyu Tang. End-to-end learning for graph decomposition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10093–10102, 2019. \n02 [24] Naiyu Gao, Yanhu Shan, Yupei Wang, Xin Zhao, Yinan Yu, Ming Yang, and Kaiqi Huang. Ssap: Single-shot instance segmentation with affinity pyramid. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 642–651, 2019. [25] Steffen Wolf, Alberto Bailoni, Constantin Pape, Nasim Rahaman, Anna Kreshuk, Ullrich Köthe, and Fred A Hamprecht. The mutex watershed and its objective: Efficient, parameter-free graph partitioning. IEEE transactions on pattern analysis and machine intelligence, 2020. [26] Thorsten Beier, Constantin Pape, Nasim Rahaman, Timo Prange, Stuart Berg, Davi D Bock, Albert Cardona, Graham W Knott, Stephen M Plaza, Louis K Scheffer, et al. Multicut brings automated neurite segmentation closer to human performance. Nature methods, 14(2):101–102, 2017. [27] Jan Funke, Fabian Tschopp, William Grisaitis, Arlo Sheridan, Chandan Singh, Stephan Saalfeld, and Srinivas C Turaga. Large scale image segmentation with structured loss based deep learning for connectome reconstruction. IEEE transactions on pattern analysis and machine intelligence, 41(7):1669–1680, 2018. \n16 [28] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function. arXiv preprint arXiv:1708.02551, 2017. \n18 [29] Davy Neven, Bert De Brabandere, Marc Proesmans, and Luc Van Gool. Instance segmentation by jointly optimizing spatial embeddings and clustering bandwidth. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8837–8845, 2019. \n21 [30] Alberto Bailoni, Constantin Pape, Steffen Wolf, Thorsten Beier, Anna Kreshuk, and Fred A Hamprecht. A generalized framework for agglomerative clustering of signed graphs applied to instance segmentation. arXiv preprint arXiv:1906.11713, 2019. \n[31] Leland McInnes and John Healy. Accelerated hierarchical density based clustering. In 2017 IEEE International Conference on Data Mining Workshops (ICDMW), pages 33–42. IEEE, 2017. \n[32] Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. IEEE Transactions on pattern analysis and machine intelligence, 24(5):603–619, 2002. \n[33] Bjoern Andres, Thorben Kroeger, Kevin L Briggman, Winfried Denk, Natalya Korogod, Graham Knott, Ullrich Koethe, and Fred A Hamprecht. Globally optimal closed-surface segmentation for connectomics. In European Conference on Computer Vision, pages 778–791. Springer, 2012. \n[34] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961–2969, 2017. \n[35] Marina Meila. Comparing clusterings by the variation of information. In ˘ Learning theory and kernel machines, pages 173–187. Springer, 2003. \n[36] William M Rand. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical association, 66(336):846–850, 1971. \n[37] Brian W Kernighan and Shen Lin. An efficient heuristic procedure for partitioning graphs. The Bell system technical journal, 49(2):291–307, 1970. \n[38] Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, and Sergey Levine. Soft actor-critic algorithms and applications. CoRR, abs/1812.05905, 2018. URL http://arxiv.org/abs/ 1812.05905. \n[39] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. CoRR, abs/1704.01212, 2017. URL http: //arxiv.org/abs/1704.01212. \n[40] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. CoRR, abs/1505.04597, 2015. URL http://arxiv.org/ abs/1505.04597. \n[41] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. The MIT Press, second edition, 2018. URL http://incompleteideas.net/book/the-book-2nd. html. \n[42] Jörg Hendrik Kappes, Markus Speth, Björn Andres, Gerhard Reinelt, and Christoph Schn. Globally optimal image partitioning by multicuts. In Yuri Boykov, Fredrik Kahl, Victor Lempitsky, and Frank R. Schmidt, editors, Energy Minimization Methods in Computer Vision and Pattern Recognition, pages 31–44, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. ISBN 978-3-642-23094-3. \n[43] Allam Shehata Hassanein, Sherien Mohammad, Mohamed Sameer, and Mohammad Ehab Ragab. A survey on hough transform, theory, techniques and applications. CoRR, abs/1502.02160, 2015. URL http://arxiv.org/abs/1502.02160. \n[44] D’Arcy Wentworth Thompson. On Growth and Form. Canto. Cambridge University Press, 1992. doi: 10.1017/CBO9781107325852. \n[45] Sourabh Bhide, Ralf Mikut, Maria Leptin, and Johannes Stegmaier. Semi-automatic generation of tight binary masks and non-convex isosurfaces for quantitative analysis of 3d biological samples, 2020. \n[46] Lucas von Chamier, Romain F Laine, Johanna Jukkala, Christoph Spahn, Daniel Krentzel, Elias Nehme, Martina Lerche, Sara Hernández-Pérez, Pieta K Mattila, Eleni Karinou, Séamus Holden, Ahmet Can Solak, Alexander Krull, Tim-Oliver Buchholz, Martin L Jones, Loïc A Royer, Christophe Leterrier, Yoav Shechtman, Florian Jug, Mike Heilemann, Guillaume Jacquemet, and Ricardo Henriques. Democratising deep learning for microscopy with ZeroCostDL4Mic. Nature Communications, 4 2021. \n[47] Adrian Wolny, Lorenzo Cerrone, Athul Vijayan, Rachele Tofanelli, Amaya Vilches Barro, Marion Louveaux, Christian Wenzl, Sören Strauss, David Wilson-Sánchez, Rena Lymbouridou, et al. Accurate and versatile 3d segmentation of plant tissues at cellular resolution. Elife, 9: e57613, 2020. \n[48] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function, 2017. \n[49] Reuben R. Shamir, Yuval Duchin, Jinyoung Kim, Guillermo Sapiro, and Noam Harel. Continuous dice coefficient: a method for evaluating probabilistic segmentations. CoRR, abs/1906.11031, 2019. URL http://arxiv.org/abs/1906.11031. ",
913
+ "bbox": [
914
+ 151,
915
+ 70,
916
+ 828,
917
+ 917
918
+ ],
919
+ "page_idx": 10
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "",
924
+ "bbox": [
925
+ 161,
926
+ 65,
927
+ 828,
928
+ 915
929
+ ],
930
+ "page_idx": 11
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "",
935
+ "bbox": [
936
+ 163,
937
+ 92,
938
+ 826,
939
+ 236
940
+ ],
941
+ "page_idx": 12
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Checklist ",
946
+ "text_level": 1,
947
+ "bbox": [
948
+ 143,
949
+ 260,
950
+ 254,
951
+ 276
952
+ ],
953
+ "page_idx": 12
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "1. For all authors... ",
958
+ "bbox": [
959
+ 214,
960
+ 286,
961
+ 339,
962
+ 301
963
+ ],
964
+ "page_idx": 12
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] \n(c) Did you discuss any potential negative societal impacts of your work? [No] It does not have any negative societal impacts. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
969
+ "bbox": [
970
+ 238,
971
+ 305,
972
+ 825,
973
+ 410
974
+ ],
975
+ "page_idx": 12
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "2. If you are including theoretical results... ",
980
+ "bbox": [
981
+ 214,
982
+ 414,
983
+ 493,
984
+ 428
985
+ ],
986
+ "page_idx": 12
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] We do not claim any theoretical assumptions. (b) Did you include complete proofs of all theoretical results? [N/A] See above. ",
991
+ "bbox": [
992
+ 238,
993
+ 431,
994
+ 825,
995
+ 477
996
+ ],
997
+ "page_idx": 12
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "3. If you ran experiments... ",
1002
+ "bbox": [
1003
+ 214,
1004
+ 481,
1005
+ 393,
1006
+ 494
1007
+ ],
1008
+ "page_idx": 12
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Yes, see the Supplementary. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See the Supplementary \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] The bars are reported w.r.t. to the samples within the best seed, see Supplementary section for further details \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] ",
1013
+ "bbox": [
1014
+ 238,
1015
+ 498,
1016
+ 825,
1017
+ 645
1018
+ ],
1019
+ "page_idx": 12
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1024
+ "bbox": [
1025
+ 214,
1026
+ 648,
1027
+ 823,
1028
+ 662
1029
+ ],
1030
+ "page_idx": 12
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [Yes] \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] The link to the biological dataset is given in the Supplementary \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? The dataset was provided from the other laboratory as a part of collaboration. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] No human data is used ",
1035
+ "bbox": [
1036
+ 238,
1037
+ 667,
1038
+ 825,
1039
+ 801
1040
+ ],
1041
+ "page_idx": 12
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1046
+ "bbox": [
1047
+ 214,
1048
+ 805,
1049
+ 705,
1050
+ 820
1051
+ ],
1052
+ "page_idx": 12
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1057
+ "bbox": [
1058
+ 238,
1059
+ 824,
1060
+ 825,
1061
+ 912
1062
+ ],
1063
+ "page_idx": 12
1064
+ }
1065
+ ]
parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6EWOVxvJ5FI/6EWOVxvJ5FI_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6nbpPqUCIi7/6nbpPqUCIi7.md ADDED
Binary file (52.4 kB). View file
 
parse/train/6nbpPqUCIi7/6nbpPqUCIi7_content_list.json ADDED
@@ -0,0 +1,1438 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 243,
8
+ 122,
9
+ 758,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Emiel Hoogeboom1⇤, Didrik Nielsen2⇤, Priyank Jaini1, Patrick Forré3, Max Welling1 ",
17
+ "bbox": [
18
+ 194,
19
+ 224,
20
+ 799,
21
+ 241
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "UvA-Bosch Delta Lab, University of Amsterdam1, Technical University of Denmark2, University of Amsterdam3 didni@dtu.dk, e.hoogeboom@uva.nl, p.jaini@uva.nl, p.d.forre@uva.nl, m.welling@uva.nl ",
28
+ "bbox": [
29
+ 282,
30
+ 241,
31
+ 705,
32
+ 296
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 332,
43
+ 535,
44
+ 348
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Generative flows and diffusion models have been predominantly trained on ordinal data, for example natural images. This paper introduces two extensions of flows and diffusion for categorical data such as language or image segmentation: Argmax Flows and Multinomial Diffusion. Argmax Flows are defined by a composition of a continuous distribution (such as a normalizing flow), and an argmax function. To optimize this model, we learn a probabilistic inverse for the argmax that lifts the categorical data to a continuous space. Multinomial Diffusion gradually adds categorical noise in a diffusion process, for which the generative denoising process is learned. We demonstrate that our method outperforms existing dequantization approaches on text modelling and modelling on image segmentation maps in log-likelihood. ",
51
+ "bbox": [
52
+ 232,
53
+ 364,
54
+ 766,
55
+ 516
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 541,
66
+ 310,
67
+ 559
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Many sources of high-dimensional data are categorical, for example language and image segmentation. Although natural images have been studied to a large extent with generative flows and diffusion models, categorical data has not had the same extensive treatment. Currently they are primarily modelled by autoregressive models, which are expensive to sample from (Cooijmans et al., 2017; Dai et al., 2019). ",
74
+ "bbox": [
75
+ 174,
76
+ 573,
77
+ 485,
78
+ 699
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Normalizing flows are attractive because they can be designed to be fast both in the evaluation and sampling direction. Typically, normalizing flows model continuous distributions. As a result, directly optimizing a flow on discrete data may lead to arbitrarily high likelihoods. In literature this problem is resolved for ordinal data by adding noise in a unit interval around the dis(a) Argmax Flow: Composition of a flow $p ( v )$ and argmax transformation which gives the model $P ( { \\pmb x } )$ . The flow maps from a base distribution $p ( z )$ using a bijection $g$ . ",
85
+ "bbox": [
86
+ 174,
87
+ 704,
88
+ 485,
89
+ 814
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/9ff77a688970bacc5fa84d7254fb2488e47b0fce15ab1b7074f06709d6608c44.jpg",
96
+ "image_caption": [],
97
+ "image_footnote": [],
98
+ "bbox": [
99
+ 506,
100
+ 573,
101
+ 820,
102
+ 636
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "",
109
+ "bbox": [
110
+ 496,
111
+ 643,
112
+ 825,
113
+ 694
114
+ ],
115
+ "page_idx": 0
116
+ },
117
+ {
118
+ "type": "image",
119
+ "img_path": "images/f5dd6c8b3b4e65cc81ca48d26c9f2a209093dc11de3fbc7a17e1175ec0b9880f.jpg",
120
+ "image_caption": [
121
+ "Figure 1: Overview of generative models. "
122
+ ],
123
+ "image_footnote": [],
124
+ "bbox": [
125
+ 498,
126
+ 698,
127
+ 820,
128
+ 744
129
+ ],
130
+ "page_idx": 0
131
+ },
132
+ {
133
+ "type": "text",
134
+ "text": "(b) Multinomial Diffusion: Each step $p ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } )$ denoises the signal starting from a uniform categorical base distribution which gives the model $p ( \\pmb { x } _ { 0 } )$ . ",
135
+ "bbox": [
136
+ 496,
137
+ 751,
138
+ 825,
139
+ 790
140
+ ],
141
+ "page_idx": 0
142
+ },
143
+ {
144
+ "type": "text",
145
+ "text": "crete value (Uria et al., 2013; Theis et al., 2016; Ho et al., 2019). However, because these methods have been designed for ordinal data, they do not work well on categorical data. ",
146
+ "bbox": [
147
+ 171,
148
+ 814,
149
+ 821,
150
+ 843
151
+ ],
152
+ "page_idx": 0
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "Other attractive generative models are diffusion models (Sohl-Dickstein et al., 2015), which are fast to train due to an objective that decomposes over time steps (Ho et al., 2020). Diffusion models typically have a fixed diffusion process that gradually adds noise. This process is complemented by a learnable generative process that denoises the signal. Song et al. (2020); Nichol and Dhariwal (2021) have shown that diffusion models can also be designed for fast sampling. Thus far, diffusion models have been primarily trained to learn ordinal data distributions, such as natural images. ",
157
+ "bbox": [
158
+ 174,
159
+ 849,
160
+ 825,
161
+ 877
162
+ ],
163
+ "page_idx": 0
164
+ },
165
+ {
166
+ "type": "table",
167
+ "img_path": "images/129b3ade1de78a737e6fa3f5bf93945d407286e54f7ab8e4152488440ad7d5f2.jpg",
168
+ "table_caption": [
169
+ "Table 1: Surjective flow layers for applying continuous flow models to discrete data. The layers are deterministic in the generative direction, but stochastic in the inference direction. Rounding corresponds to the commonly-used dequantization for ordinal data. "
170
+ ],
171
+ "table_footnote": [],
172
+ "table_body": "<table><tr><td>Layer</td><td>Generation</td><td>Inference</td><td>Applications</td></tr><tr><td>Rounding</td><td>x= [u]</td><td>U ~ q(u|x) with support S(x)={ulac =[u]}</td><td>Ordinal Data e.g. images,audio</td></tr><tr><td>Argmax</td><td>x= arg maxv</td><td>v ~q(vlx)with support S(x)= {ulx = arg max v}</td><td>Categorical Data e.g. text, segmentation</td></tr></table>",
173
+ "bbox": [
174
+ 214,
175
+ 138,
176
+ 784,
177
+ 217
178
+ ],
179
+ "page_idx": 1
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "",
184
+ "bbox": [
185
+ 173,
186
+ 241,
187
+ 825,
188
+ 296
189
+ ],
190
+ "page_idx": 1
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "Therefore, in this paper we introduce extensions of flows and diffusion models for categorical variables (depicted in Figure 1): i) Argmax Flows bridge the gap between categorical data and continuous normalizing flows using an argmax transformation and a corresponding family of probabilistic inverses for the argmax. In addition $i i$ ) we introduce Multinomial Diffusion, which is a diffusion model directly defined on categorical variables. Opposed to normalizing flows, defining diffusion for discrete variables directly does not require gradient approximations, because the diffusion trajectory is fixed. As a result of our work, generative normalizing flows and diffusion models can directly learn categorical data. ",
195
+ "bbox": [
196
+ 173,
197
+ 303,
198
+ 825,
199
+ 415
200
+ ],
201
+ "page_idx": 1
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "2 Background ",
206
+ "text_level": 1,
207
+ "bbox": [
208
+ 174,
209
+ 433,
210
+ 308,
211
+ 450
212
+ ],
213
+ "page_idx": 1
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Normalizing Flows Given $\\nu = \\mathbb { R } ^ { d }$ and $\\mathcal { Z } = \\mathbb { R } ^ { d }$ with densities $p _ { V }$ and $p _ { Z }$ respectively, normalizing flows $\\underline { { \\mathbb { R } } }$ ezende and Mohamed, $\\boxed { 2 0 1 5 }$ learn a bijective and differentiable transformation $g : { \\mathcal { Z } } \\mathcal { V }$ such that the change-of-variables formula gives the density at any point $\\pmb { v } \\in \\mathcal { V }$ : ",
218
+ "bbox": [
219
+ 173,
220
+ 463,
221
+ 825,
222
+ 506
223
+ ],
224
+ "page_idx": 1
225
+ },
226
+ {
227
+ "type": "equation",
228
+ "img_path": "images/86f94f0f2cba84dfbb53b81ae1d1ba4fa5be3c860ebee7a777514103812f828e.jpg",
229
+ "text": "$$\np _ { V } ( \\pmb { v } ) = p _ { Z } ( \\pmb { z } ) \\cdot \\left| \\operatorname* { d e t } \\frac { \\mathrm { d } \\pmb { z } } { \\mathrm { d } \\pmb { v } } \\right| , \\qquad \\pmb { v } = g ( \\pmb { z } ) ,\n$$",
230
+ "text_format": "latex",
231
+ "bbox": [
232
+ 364,
233
+ 508,
234
+ 632,
235
+ 540
236
+ ],
237
+ "page_idx": 1
238
+ },
239
+ {
240
+ "type": "text",
241
+ "text": "where $p _ { Z }$ can be any density (usually chosen as a standard Gaussian). Thus, normalizing flows provide a powerful framework to learn exact density functions. However, Equation $( 1 )$ is restricted to continuous densities. ",
242
+ "bbox": [
243
+ 174,
244
+ 544,
245
+ 825,
246
+ 585
247
+ ],
248
+ "page_idx": 1
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "To learn densities on ordinal discrete data (such as natural images), typically dequantization noise is added (Uria et al., 2013; Theis et al., 2016; Ho et al., 2019). Nielsen et al. (2020) reinterpreted dequantization as a surjective flow layer ${ \\boldsymbol { v } } \\mapsto { \\boldsymbol { x } }$ that is deterministic in one direction $\\mathbf { \\bar { \\boldsymbol { x } } } = \\mathsf { r o u n d } ( \\pmb { v } ) )$ ) and stochastic in the other ${ \\pmb v } = { \\pmb x } + { \\pmb u }$ where ${ \\pmb u } \\sim q ( { \\pmb u } | { \\pmb x } ) )$ . Using this interpretation, dequantization can be seen as a probabilistic right-inverse for the rounding operation in the latent variable model given by: ",
253
+ "bbox": [
254
+ 173,
255
+ 592,
256
+ 825,
257
+ 675
258
+ ],
259
+ "page_idx": 1
260
+ },
261
+ {
262
+ "type": "equation",
263
+ "img_path": "images/dfcccfd51b0d8e4dc3d30f9af6d4e020ce6f40e4050577e281cdb354b3a325f1.jpg",
264
+ "text": "$$\nP ( \\pmb { x } ) = \\int P ( \\pmb { x } | \\pmb { v } ) p ( \\pmb { v } ) \\mathrm { d } \\pmb { v } , \\quad P ( \\pmb { x } | \\pmb { v } ) = \\delta \\big ( \\pmb { x } = \\mathsf { r o u n d } ( \\pmb { v } ) \\big ) ,\n$$",
265
+ "text_format": "latex",
266
+ "bbox": [
267
+ 307,
268
+ 672,
269
+ 687,
270
+ 705
271
+ ],
272
+ "page_idx": 1
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "where round is applied elementwise. In this case, the density model $p ( v )$ is modeled using a normalizing flow. Learning proceeds by introducing the variational distribution $q ( { \\pmb v } | { \\pmb x } )$ that models the probabilistic right-inverse for the rounding surjection and optimizing the evidence lower bound (ELBO): ",
277
+ "bbox": [
278
+ 173,
279
+ 707,
280
+ 825,
281
+ 758
282
+ ],
283
+ "page_idx": 1
284
+ },
285
+ {
286
+ "type": "equation",
287
+ "img_path": "images/a06d4146897b92464041b445dd9cd19b7edb48a6b1cc66d823bb825a83ed3941.jpg",
288
+ "text": "$$\n\\begin{array} { r } { \\log P ( \\pmb { x } ) \\geq \\mathbb { E } _ { \\pmb { v } \\sim q ( \\pmb { v } | \\mathbf { x } ) } \\left[ \\log P ( \\pmb { x } | \\pmb { v } ) + \\log p ( \\pmb { v } ) - \\log q ( \\pmb { v } | \\pmb { x } ) \\right] = \\mathbb { E } _ { \\pmb { v } \\sim q ( \\pmb { v } | \\mathbf { x } ) } \\left[ \\log p ( \\pmb { v } ) - \\log q ( \\pmb { v } | \\pmb { x } ) \\right] . } \\end{array}\n$$",
289
+ "text_format": "latex",
290
+ "bbox": [
291
+ 187,
292
+ 763,
293
+ 790,
294
+ 780
295
+ ],
296
+ "page_idx": 1
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "The last equality holds under the constraint that the support of $q ( { \\pmb v } | { \\pmb x } )$ is enforced to be only over the region $S = \\{ v \\in \\mathbb { R } ^ { d } : x = \\mathsf { r o u n d } ( v ) \\}$ which ensures that $P ( \\pmb { x } | \\pmb { v } ) = 1$ . ",
301
+ "bbox": [
302
+ 174,
303
+ 784,
304
+ 823,
305
+ 814
306
+ ],
307
+ "page_idx": 1
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "Diffusion Models Given data $\\scriptstyle { \\pmb x } _ { 0 }$ , a diffusion model (Sohl-Dickstein et al., $\\boxed { 2 0 1 5 }$ consists of predefined variational distributions $q \\big ( \\mathbf { \\boldsymbol { x } } _ { t } | \\mathbf { \\boldsymbol { x } } _ { t - 1 } \\big )$ that gradually add noise over time steps $t \\in \\{ 1 , \\ldots , T \\}$ . \u0000The diffusion trajectory is defined such that $q \\big ( \\mathbf { \\boldsymbol { x } } _ { t } | \\mathbf { \\boldsymbol { x } } _ { t - 1 } \\big )$ adds a small amount of noise around ${ \\mathbf { \\mathcal { x } } } _ { t - 1 }$ . This way, information is gradually destroyed such that at the final time step, $\\mathbfit { \\mathbf { x } } _ { T }$ carries almost no information about $\\scriptstyle { \\mathbf { { \\mathit { x } } } } _ { 0 }$ . Their generative counterparts consists of learnable distributions $p ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } )$ that learn to denoise the data. When the diffusion process adds sufficiently small amounts of noise, it ",
312
+ "bbox": [
313
+ 173,
314
+ 827,
315
+ 826,
316
+ 911
317
+ ],
318
+ "page_idx": 1
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "Input: $p ( v )$ Output: Sample $_ { \\textbf { \\em x } }$ Sample $\\begin{array} { r } { \\pmb { v } \\sim p ( \\pmb { v } ) } \\end{array}$ Compute x = arg max v ",
323
+ "bbox": [
324
+ 184,
325
+ 126,
326
+ 357,
327
+ 184
328
+ ],
329
+ "page_idx": 2
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "Input: x, p(v), q(v|x) \nOutput: ELBO \nSample v ⇠ q(v|x) \nCompute $\\mathcal { L } = \\log p ( \\pmb { v } ) - \\log q ( \\pmb { v } | \\pmb { x } )$ ",
334
+ "bbox": [
335
+ 519,
336
+ 125,
337
+ 779,
338
+ 185
339
+ ],
340
+ "page_idx": 2
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "suffices to define the denoising trajectory using distributions that are factorized (without correlation) over the dimension axis. The distribution $p ( { \\pmb x } _ { T } )$ is chosen to be similar to the distribution that the diffusion trajectory approaches. Diffusion models can be optimized using variational inference: ",
345
+ "bbox": [
346
+ 174,
347
+ 208,
348
+ 826,
349
+ 252
350
+ ],
351
+ "page_idx": 2
352
+ },
353
+ {
354
+ "type": "equation",
355
+ "img_path": "images/23417bccfa22e5d438ec0b8bb22411214bcd7188558a40122aa5a68a3b60f34d.jpg",
356
+ "text": "$$\n\\log P ( \\pmb { x } _ { 0 } ) \\ge \\mathbb { E } _ { x _ { 1 } , \\ldots x _ { T } \\sim q } \\Big [ \\log p ( \\pmb { x } _ { T } ) + \\sum _ { t = 1 } ^ { T } \\log \\frac { p ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } ) } { q ( \\pmb { x } _ { t } | \\pmb { x } _ { t - 1 } ) } \\Big ] .\n$$",
357
+ "text_format": "latex",
358
+ "bbox": [
359
+ 295,
360
+ 252,
361
+ 700,
362
+ 296
363
+ ],
364
+ "page_idx": 2
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "An important insight in diffusion is that by conditioning on $\\scriptstyle { \\mathbf { { \\mathit { x } } } } _ { 0 }$ , the posterior probability $\\begin{array} { r } { q ( { \\pmb x } _ { t - 1 } | { \\pmb x } _ { t } , { \\pmb x } _ { 0 } ) _ { . } = \\breve { q } ( { \\pmb x } _ { t } | { \\pmb x } _ { t - 1 } ) q ( { \\pmb x } _ { t - 1 } | { \\pmb x } _ { 0 } ) / q ( \\breve { { \\pmb x } _ { t } } | { \\pmb x } _ { 0 } ) } \\end{array}$ is tractable and straightforward to compute, permitting a reformulation in terms of KL divergences that has lower variance (Sohl-Dickstein et al., 2015). Note that $\\mathrm { K L } \\big ( q ( \\pmb { x } _ { T } | \\pmb { x } _ { 0 } ) | p ( \\pmb { x } _ { T } ) \\big ) \\approx 0$ if the diffusion trajectory $q$ is defined well: ",
369
+ "bbox": [
370
+ 174,
371
+ 303,
372
+ 825,
373
+ 358
374
+ ],
375
+ "page_idx": 2
376
+ },
377
+ {
378
+ "type": "equation",
379
+ "img_path": "images/c6716c13433c03d2332c676635798233a5a66c976942df834908c56b7181897c.jpg",
380
+ "text": "$$\n\\log P ( x _ { 0 } ) \\geq \\mathbb { E } _ { q } \\left[ \\log p ( x _ { 0 } | x _ { 1 } ) - \\mathrm { K L } \\big ( q ( x _ { T } | x _ { 0 } ) | p ( x _ { T } ) \\big ) - \\sum _ { t = 2 } ^ { T } \\mathrm { K L } \\big ( q ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) | p ( x _ { t - 1 } | x _ { t } ) \\big ) \\right]\n$$",
381
+ "text_format": "latex",
382
+ "bbox": [
383
+ 191,
384
+ 359,
385
+ 789,
386
+ 398
387
+ ],
388
+ "page_idx": 2
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "3 Argmax Flows ",
393
+ "text_level": 1,
394
+ "bbox": [
395
+ 174,
396
+ 412,
397
+ 328,
398
+ 430
399
+ ],
400
+ "page_idx": 2
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "Argmax flows define discrete distributions using 1) a density model $p ( v )$ , such as a normalizing flow, and 2) an argmax layer that maps the continuous $\\pmb { v } \\in \\mathbb { R } ^ { D \\times } \\mathbf { \\check { K } }$ to a discrete $\\pmb { x } \\in \\{ 1 , 2 , . . . , K \\} ^ { D }$ using ",
405
+ "bbox": [
406
+ 174,
407
+ 443,
408
+ 823,
409
+ 472
410
+ ],
411
+ "page_idx": 2
412
+ },
413
+ {
414
+ "type": "equation",
415
+ "img_path": "images/5e34f9cca37c5efa9cf1cfe26416cbf0e96ef691c586034d15bb15d6d6b9138f.jpg",
416
+ "text": "$$\n\\pmb { x } = \\operatorname { a r g m a x } \\pmb { v } \\quad \\mathrm { w h e r e } \\quad x _ { d } = \\arg \\operatorname* { m a x } _ { k } v _ { d k } .\n$$",
417
+ "text_format": "latex",
418
+ "bbox": [
419
+ 356,
420
+ 474,
421
+ 642,
422
+ 494
423
+ ],
424
+ "page_idx": 2
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "This is a natural choice to model categorical variables, because it divides the entire continuous space of $\\pmb { v }$ into symmetric partitions corresponding to categories in $_ { \\textbf { \\em x } }$ . To sample from an argmax flow sample $v \\sim p ( v )$ and compute $\\pmb { x } = \\arg \\operatorname* { m a x } \\pmb { v }$ (Algorithm $\\textcircled{1}$ . To generate reasonable samples, it is up to the density model $p ( v )$ to capture any complicated dependencies between the different dimensions. While sampling from an argmax flow is straightforward, the main difficulty lies in optimizing this generative model. To compute the likelihood of a datapoint $_ { \\textbf { \\em x } }$ , we have to compute ",
429
+ "bbox": [
430
+ 173,
431
+ 496,
432
+ 825,
433
+ 579
434
+ ],
435
+ "page_idx": 2
436
+ },
437
+ {
438
+ "type": "equation",
439
+ "img_path": "images/296dd8cd535f0a69d77e8cfae135297a64ebbb8ae7d3261ce365b8d30e4ed7cd.jpg",
440
+ "text": "$$\nP ( \\pmb { x } ) = \\int P ( \\pmb { x } | \\pmb { v } ) p ( \\pmb { v } ) d \\pmb { v } , P ( \\pmb { x } | \\pmb { v } ) = \\delta \\big ( \\pmb { x } = \\arg \\operatorname* { m a x } ( \\pmb { v } ) \\big ) ,\n$$",
441
+ "text_format": "latex",
442
+ "bbox": [
443
+ 316,
444
+ 580,
445
+ 679,
446
+ 609
447
+ ],
448
+ "page_idx": 2
449
+ },
450
+ {
451
+ "type": "text",
452
+ "text": "which is intractable. Consequently, we resort to variational inference and specify a variational distribution $q ( { \\pmb v } | { \\pmb x } )$ . We note that naïvely choosing any variational distribution may lead to samples ${ \\pmb v } \\sim { \\pmb q } ( { \\pmb v } | { \\pmb x } )$ where $\\delta ( { \\pmb x } = \\arg \\operatorname* { m a x } { \\pmb v } ) = 0$ , which yields an ELBO of negative infinity. To avoid this, we need a variational distribution $q ( { \\pmb v } | { \\pmb x } )$ that satisfies what we term the argmax constraint: ",
453
+ "bbox": [
454
+ 173,
455
+ 609,
456
+ 825,
457
+ 665
458
+ ],
459
+ "page_idx": 2
460
+ },
461
+ {
462
+ "type": "equation",
463
+ "img_path": "images/57d862d84fd81b73429828e8ac7ab7051af3384af534d35a338364de78a8c997.jpg",
464
+ "text": "$$\n\\mathbf { \\Psi } \\mathbf { x } = \\arg \\operatorname* { m a x } \\pmb { v } \\quad \\mathrm { f o r ~ a l l } \\quad \\pmb { v } \\sim q ( \\pmb { v } | \\mathbf { x } ) .\n$$",
465
+ "text_format": "latex",
466
+ "bbox": [
467
+ 372,
468
+ 666,
469
+ 625,
470
+ 681
471
+ ],
472
+ "page_idx": 2
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "That is, the variational distribution $q ( { \\pmb v } | { \\pmb x } )$ should have support limited to ${ \\cal S } ( { \\pmb x } ) = \\{ { \\pmb v } \\in \\partial \\pmb { \\Sigma }$ $\\mathbb { R } ^ { D \\times K } \\mathrm { ~ ~ : ~ } { \\pmb x } = \\arg \\operatorname* { m a x } { \\pmb v } \\}$ . Recall that under this condition, the ELBO simplifies to $\\mathbb { E } _ { { \\pmb v } \\sim { \\ b q } ( { \\pmb v } | { \\pmb x } ) } \\left[ \\log p ( { \\pmb v } ) - \\log q ( { \\pmb v } | { \\pmb x } ) \\right]$ , as shown in Algorithm $\\bigstar$ For an illustration of the method see Figure 1a. ",
477
+ "bbox": [
478
+ 173,
479
+ 683,
480
+ 825,
481
+ 741
482
+ ],
483
+ "page_idx": 2
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "3.1 Probabilistic Inverse ",
488
+ "text_level": 1,
489
+ "bbox": [
490
+ 174,
491
+ 753,
492
+ 356,
493
+ 768
494
+ ],
495
+ "page_idx": 2
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "The argmax layer may be viewed as a surjective flow layer (Nielsen et al., 2020). With this view, the variational distribution $q ( { \\pmb v } | { \\pmb x } )$ specifies a distribution over the possible right-inverses of the argmax function, also known as a stochastic inverse or probabilistic inverse. Recall that the commonly-used dequantization layer for ordinal data corresponds to the probabilistic inverse of a rounding operation. As summarized in Table 1, this layer may thus be viewed as analogous to the argmax layer, where the round is for ordinal data while the argmax is for categorical data. ",
500
+ "bbox": [
501
+ 173,
502
+ 779,
503
+ 825,
504
+ 863
505
+ ],
506
+ "page_idx": 2
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "We are free to specify any variational distribution $q ( { \\pmb v } | { \\pmb x } )$ that satisfies the argmax constraint. In the next paragraphs we outline three possible approaches. Since operations are performed independently across dimensions, we omit the dimension axis and let $\\pmb { v } \\in \\mathbb { R } ^ { \\mathbf { \\hat { K } } }$ and $x \\in \\{ \\bar { 1 } , \\ldots , K \\}$ . ",
511
+ "bbox": [
512
+ 174,
513
+ 868,
514
+ 825,
515
+ 912
516
+ ],
517
+ "page_idx": 2
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "Algorithm 4 Gumbel-based $q ( { \\pmb v } | { \\pmb x } )$ ",
522
+ "text_level": 1,
523
+ "bbox": [
524
+ 508,
525
+ 107,
526
+ 741,
527
+ 122
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "table",
533
+ "img_path": "images/2cb8f03a191485977d6435e20ee0d1f37253a3eb0469430af3c6a417b20ee5f6.jpg",
534
+ "table_caption": [
535
+ "Algorithm 3 Thresholding-based $q ( { \\pmb v } | { \\pmb x } )$ "
536
+ ],
537
+ "table_footnote": [],
538
+ "table_body": "<table><tr><td>Input: x, q(u|x) Output: v, log q(v|x)</td></tr><tr><td>u~ q(ulx)</td></tr><tr><td>Ux=ux</td></tr><tr><td>V-x = threshold(u-x,x) log q(vlx) = logq(ulx) -log|det dv/ dul</td></tr></table>",
539
+ "bbox": [
540
+ 176,
541
+ 126,
542
+ 488,
543
+ 214
544
+ ],
545
+ "page_idx": 3
546
+ },
547
+ {
548
+ "type": "table",
549
+ "img_path": "images/c4281bfd60f8bf15e72e1ef11c5a14d553c07b75b463ce9d4e6e9ae8d9f6d46f.jpg",
550
+ "table_caption": [],
551
+ "table_footnote": [],
552
+ "table_body": "<table><tr><td>Input: x,Φ Output: v,log q(v|x)</td></tr><tr><td>max = log∑i expi</td></tr><tr><td>Ux~ Gumbel(Φmax)</td></tr><tr><td></td></tr><tr><td>U-x ~ TruncGumbel(Φ-x,Ux) log q(vlx) = log Gumbel(vxlΦmax)</td></tr></table>",
553
+ "bbox": [
554
+ 514,
555
+ 126,
556
+ 820,
557
+ 228
558
+ ],
559
+ "page_idx": 3
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "Thresholding $\\left( \\mathbf { A l g . } | \\overline { { 3 } } \\right)$ . A straightforward method to construct a distribution $q ( \\pmb { v } | \\boldsymbol { x } )$ satisfying the argmax constraint is to use thresholding. That is, we first sample an unbounded variable $\\bar { \\mathbf { \\ b { u } } } \\in \\mathbb { R } ^ { K }$ from $q ( { \\pmb u } | { \\boldsymbol x } )$ , which can be for example a conditional Gaussian or normalizing flow. Next, we map $\\textbf { \\em u }$ to $\\pmb { v }$ such that element $x$ is the largest: ",
564
+ "bbox": [
565
+ 174,
566
+ 256,
567
+ 825,
568
+ 314
569
+ ],
570
+ "page_idx": 3
571
+ },
572
+ {
573
+ "type": "equation",
574
+ "img_path": "images/a898e48ce5828c30f9286b51af1b45dc239981e69d9da97bf4ff49f6d743a914.jpg",
575
+ "text": "$$\nv _ { x } = u _ { x } \\mathrm { a n d } v _ { - x } = \\mathrm { t h r e s h o l d } _ { T } ( \\mathbf { u } _ { - x } )\n$$",
576
+ "text_format": "latex",
577
+ "bbox": [
578
+ 356,
579
+ 323,
580
+ 640,
581
+ 340
582
+ ],
583
+ "page_idx": 3
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "where the thresholding is applied elementwise with threshold value $T = v _ { x }$ . This ensures that element $v _ { x }$ is the largest, and consequently that $q ( \\pmb { v } | \\boldsymbol { x } )$ satisfies the argmax constraint. Note that we require the threshold function to be bijective, thre $\\mathrm { s h o l d } _ { T } : \\mathbb { R } \\overline { { ( - \\infty , T ) } }$ , so that we can use the change-of-variables formula to compute $\\log q ( { \\pmb v } | { \\pmb x } )$ . In our implementation, thresholding is implemented using a softplus such that all values are mapped below a limit $T$ : ",
588
+ "bbox": [
589
+ 173,
590
+ 348,
591
+ 825,
592
+ 419
593
+ ],
594
+ "page_idx": 3
595
+ },
596
+ {
597
+ "type": "equation",
598
+ "img_path": "images/59d8c751cfe362200347aa2d972c1468fc53a4408f5d6fe9f185a67139df65dd.jpg",
599
+ "text": "$$\nv = \\mathrm { t h r e s h o l d } _ { T } ( u ) = T - \\mathrm { s o f t p l u s } ( T - u ) ,\n$$",
600
+ "text_format": "latex",
601
+ "bbox": [
602
+ 359,
603
+ 425,
604
+ 635,
605
+ 441
606
+ ],
607
+ "page_idx": 3
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "where soft $\\operatorname { \\mathrm { \\lambda } } \\operatorname { \\mathrm { ) } } \\operatorname { \\mathrm { l u s } } ( z ) = \\log ( 1 + e ^ { z } )$ and for which it is guaranteed that $v \\in ( - \\infty , T )$ . ",
612
+ "bbox": [
613
+ 173,
614
+ 448,
615
+ 717,
616
+ 464
617
+ ],
618
+ "page_idx": 3
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Gumbel (Alg. $^ { 4 ) }$ . An alternative approach is to let $q ( { \\pmb v } | x ) \\ = \\ \\mathrm { G u m b e l } ( { \\pmb v } | \\phi )$ restricted to arg max $v = x$ , where the location parameters $\\phi \\mathrm { N N } ( { \\boldsymbol { x } } )$ are predicted using a neural network NN. The Gumbel distribution has favourable properties: The arg max and max are independent and the max is also distributed as a Gumbel: ",
623
+ "bbox": [
624
+ 173,
625
+ 479,
626
+ 825,
627
+ 536
628
+ ],
629
+ "page_idx": 3
630
+ },
631
+ {
632
+ "type": "equation",
633
+ "img_path": "images/45ccd2b513a67302df6b4386d8b94782e1fbba22066a4e9d4afa4f3169bce591.jpg",
634
+ "text": "$$\n\\operatorname* { m a x } _ { i } v _ { i } \\sim \\mathrm { G u m b e l } ( \\phi _ { \\mathrm { m a x } } ) ,\n$$",
635
+ "text_format": "latex",
636
+ "bbox": [
637
+ 413,
638
+ 542,
639
+ 581,
640
+ 564
641
+ ],
642
+ "page_idx": 3
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "where $\\begin{array} { r } { \\underline { { \\phi _ { \\operatorname* { m a x } } } } = \\log \\sum _ { i } \\exp \\phi _ { i } } \\end{array}$ . For a more extensive introduction see $\\mathrm { ( \\underline { { M a d d i s o n \\ e t { \\ a l . } } } ) } \\big [ \\underline { { 2 0 1 } } \\underline { { 4 } } \\big \\} \\big [ \\mathrm { K o o l } \\big ]$ et al., $\\boxed { 2 0 1 9 }$ . To sample $\\pmb { v } \\sim q ( \\pmb { v } | \\boldsymbol { x } )$ , we thus first sample the maximum $v _ { x }$ according to Eq. 8. Next, given the sample $v _ { x }$ , the remaining values can be sampled using truncated Gumbel distributions: ",
647
+ "bbox": [
648
+ 173,
649
+ 570,
650
+ 826,
651
+ 614
652
+ ],
653
+ "page_idx": 3
654
+ },
655
+ {
656
+ "type": "equation",
657
+ "img_path": "images/d9a2cc6e72cb71111b93b5e62fd79e5f2d51ee7ef0e08c31293dc7e3af3d1d2c.jpg",
658
+ "text": "$$\nv _ { i } \\sim \\mathrm { T r u n c { G u m b e l } } ( \\phi _ { i } ; T ) \\ \\mathrm { w h e r e } \\ i \\not = x\n$$",
659
+ "text_format": "latex",
660
+ "bbox": [
661
+ 375,
662
+ 621,
663
+ 624,
664
+ 637
665
+ ],
666
+ "page_idx": 3
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "where the truncation value $T$ is given by $v _ { x }$ which ensures that the argmax constraint $v _ { x } > v _ { i }$ for $i \\neq x$ is satisfied. Recall that to optimize Eq. 2 $\\ ] \\log q ( { \\pmb v } | { \\pmb x } )$ is also required, which can be computed using the closed-form expressions for the log density functions (see Table $\\textcircled{5}$ . Another property of Gumbel distributions is that ",
671
+ "bbox": [
672
+ 173,
673
+ 643,
674
+ 825,
675
+ 699
676
+ ],
677
+ "page_idx": 3
678
+ },
679
+ {
680
+ "type": "equation",
681
+ "img_path": "images/e368a599b6468b69846131764af20893870bd33cd83b57075e216c5b4013f1ca.jpg",
682
+ "text": "$$\nP ( \\arg \\operatorname* { m a x } { \\pmb v } = i ) = \\exp { \\phi _ { i } / \\sum _ { i } } \\exp { \\phi _ { i } } ,\n$$",
683
+ "text_format": "latex",
684
+ "bbox": [
685
+ 372,
686
+ 704,
687
+ 624,
688
+ 734
689
+ ],
690
+ "page_idx": 3
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "which we use to initialize the location parameters $\\phi$ to match the empirical distribution of the first minibatch of the data. ",
695
+ "bbox": [
696
+ 173,
697
+ 741,
698
+ 825,
699
+ 770
700
+ ],
701
+ "page_idx": 3
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "Gumbel Thresholding. This method unifies the methods from the previous two sections: Gumbel distributions and thresholding. The key insight is that the Gumbel sampling procedures as defined above can be seen as a reparametrization of a uniform noise distribution $\\bar { \\boldsymbol { u } } ( 0 , 1 ) ^ { K }$ which is put through the inverse CDF of the Gumbel distributions (see Table 5). From the perspective of changeof-variables, the log likelihood denotes the log volume change of this transformation. To increase expressitivity the uniform distribution can be replaced by a normalizing flow $q ( { \\pmb u } | { \\boldsymbol x } )$ that has support on the interval $( 0 , 1 ) ^ { K }$ , which can be enforced using a sigmoid transformation. This section shows that a large collection of thresholding functions can be found by studying (truncated) inverse CDFs. In practice we find that performance is reasonably similar as long as the underlying noise $\\textbf { \\em u }$ is learned. ",
706
+ "bbox": [
707
+ 173,
708
+ 785,
709
+ 826,
710
+ 912
711
+ ],
712
+ "page_idx": 3
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "Behavior of the Variational Posterior Although several methods to learn $q$ have been proposed, it is unclear what expressitivity is required. In the following, the interactions between $q ( \\pmb { v } | \\bar { \\pmb { x } } )$ and the density model $p ( v )$ are discussed. Recall that the variational bound that is optimized under expectation of a data distribution $\\mathcal { D }$ can be seen as minimizing the KL distance between the aggregated posterior $q ( \\pmb { v } ) = \\mathbb { E } _ { \\pmb { x } \\sim \\mathcal { D } } q ( \\pmb { v } | \\pmb { x } )$ and the density model $p ( v )$ , so $\\mathrm { K L } ( q ( \\pmb { v } ) | p ( \\pmb { v } ) )$ . There are two distinct reasons which can cause this distance to be large: Firstly, the density model $p ( v )$ may not have the right probability mass in each argmax region. These desired probabilities solely depend on the data distribution $\\mathcal { D }$ . Secondly, the variational posterior $q ( { \\pmb v } | { \\pmb x } )$ may not have the correct shape compared to $p ( v )$ , within an argmax region. At initialization, the thresholding within $q$ can create low density regions at argmax boundaries. ",
717
+ "bbox": [
718
+ 173,
719
+ 90,
720
+ 825,
721
+ 229
722
+ ],
723
+ "page_idx": 4
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "In theory, if $p ( v )$ is a universal density approximator, then the model can be fitted for any wellbehaved $q ( { \\pmb v } | { \\pmb x } )$ . Then $p ( v )$ can even fit the low density regions in the boundaries. This argument is trivial, as one can simply set $p ( v )$ to $q ( \\pmb { v } ) = \\mathbb { E } _ { \\pmb { x } \\sim \\mathcal { D } } q ( \\pmb { v } | \\pmb { x } )$ . In practice, over training steps we find that $q$ does smooth out these boundary artifacts, and counteracts the thresholding so that the aggregated posterior becomes smoother. ",
728
+ "bbox": [
729
+ 174,
730
+ 236,
731
+ 825,
732
+ 305
733
+ ],
734
+ "page_idx": 4
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "3.2 Cartesian Products of Argmax Flows ",
739
+ "text_level": 1,
740
+ "bbox": [
741
+ 174,
742
+ 323,
743
+ 470,
744
+ 338
745
+ ],
746
+ "page_idx": 4
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "In the current description, Argmax Flows require the same number of dimensions in $\\textbf { { v } }$ as there are classes in $_ { \\textbf { \\em x } }$ . To alleviate this constraint we introduce Cartesian products of Argmax Flows. To illustrate our method, consider a 256 class problem. One class can be represented using a single number in $\\{ 1 , \\ldots , 2 5 6 \\}$ , but also using two hexadecimal numbers $\\{ 1 , \\ldots , 1 \\bar { 6 } \\} ^ { 2 }$ or alternatively using eight binary numbers. Specifically, any base $K$ variable $\\pmb { x } ^ { ( K ) } \\in \\{ 1 , \\ldots , K \\} ^ { D }$ can be converted to a base $M$ variable $\\pmb { x } ^ { ( M ) } \\in \\{ 1 , \\dots , M \\} ^ { d _ { m } \\times D }$ where $d _ { m } = \\lceil \\log _ { M } K \\rceil$ . Then the variable ${ \\pmb x } ^ { ( M ) }$ with dimensionality $M \\cdot d _ { m } \\cdot D$ represents the variable $\\mathbf { \\pmb { x } } ^ { ( K ) }$ with dimensionality $K \\cdot D$ , trading off symmetry for dimensionality. Even though this may lead to some unused additional classes, the ELBO objective in Equation $\\bigtriangledown$ can still be optimized using an $M$ -categorical Argmax Flow. Finally, note that Cartesian products of binary spaces are a special case where the variable can be encoded symmetrically into a single dimension to the positive and negative part using binary dequantization (Winkler et al., $\\overline { { 2 0 1 9 } } )$ . In this case, by trading-off symmetry the dimensionality increases only proportional to $\\overline { { \\log _ { 2 } K } }$ . ",
751
+ "bbox": [
752
+ 173,
753
+ 348,
754
+ 826,
755
+ 535
756
+ ],
757
+ "page_idx": 4
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "4 Multinomial Diffusion ",
762
+ "text_level": 1,
763
+ "bbox": [
764
+ 174,
765
+ 554,
766
+ 392,
767
+ 571
768
+ ],
769
+ "page_idx": 4
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "In this section we introduce an alternative likelihood-based model for categorical data: Multinomial Diffusion. In contrast with previous sections, $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { t } }$ will be represented in one-hot encoded format ${ \\pmb x } _ { t } \\in \\{ 0 , 1 \\} ^ { K }$ . Specifically, for category $k$ , $x _ { k } = 1$ and $x _ { j } = 0$ for $j \\neq k$ . Note that again the dimension axis is omitted for clarity as all distributions are independent over the dimension axis. We define the multinomial diffusion process using a categorical distribution that has a $\\beta _ { t }$ chance of resampling a category uniformly: ",
774
+ "bbox": [
775
+ 173,
776
+ 587,
777
+ 825,
778
+ 670
779
+ ],
780
+ "page_idx": 4
781
+ },
782
+ {
783
+ "type": "equation",
784
+ "img_path": "images/9fb4c25e2c0d33453d70ab709cd94f93ca5c84859546fca4c85321a3303dec63.jpg",
785
+ "text": "$$\nq ( \\mathbf { x } _ { t } | \\mathbf { x } _ { t - 1 } ) = \\mathcal { C } ( \\mathbf { x } _ { t } | ( 1 - \\beta _ { t } ) \\mathbf { x } _ { t - 1 } + \\beta _ { t } / K ) ,\n$$",
786
+ "text_format": "latex",
787
+ "bbox": [
788
+ 351,
789
+ 679,
790
+ 645,
791
+ 696
792
+ ],
793
+ "page_idx": 4
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "where $\\mathcal { C }$ denotes a categorical distribution with probability parameters after $\\mid$ . Further addition (and subtraction) between scalars and vectors is done elementwise. This convention kept throughout this section. Since these distributions form a Markov chain, we can express the probability of any $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { t } }$ given $\\scriptstyle { \\mathbf { { \\mathit { x } } } } _ { 0 }$ as: ",
798
+ "bbox": [
799
+ 173,
800
+ 703,
801
+ 825,
802
+ 758
803
+ ],
804
+ "page_idx": 4
805
+ },
806
+ {
807
+ "type": "equation",
808
+ "img_path": "images/76b507abb5636288292405544b9b01f2f75a6eb631e15f4b28ddb388dc72f87c.jpg",
809
+ "text": "$$\nq ( \\pmb { x } _ { t } | \\pmb { x } _ { 0 } ) = \\mathcal { C } ( \\pmb { x } _ { t } | \\bar { \\alpha } _ { t } \\pmb { x } _ { 0 } + ( 1 - \\bar { \\alpha } _ { t } ) / K )\n$$",
810
+ "text_format": "latex",
811
+ "bbox": [
812
+ 367,
813
+ 758,
814
+ 630,
815
+ 776
816
+ ],
817
+ "page_idx": 4
818
+ },
819
+ {
820
+ "type": "text",
821
+ "text": "where $\\alpha _ { t } = 1 - \\beta _ { t }$ and $\\begin{array} { r } { \\bar { \\alpha } _ { t } = \\prod _ { \\tau = 1 } ^ { t } \\alpha _ { \\tau } } \\end{array}$ . Intuïtively, for each next timestep, a little amount of uniform noise $\\beta _ { t }$ over the $K$ classes is introduced, and with a large probability $( 1 - \\beta _ { t } )$ the previous value ${ \\mathbf { \\mathcal { x } } } _ { t - 1 }$ is sampled. Using Equation 11 and $\\boxed { 1 2 }$ the categorical posterior $q ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } , \\pmb { x } _ { 0 } )$ can be computed in closed-form: ",
822
+ "bbox": [
823
+ 176,
824
+ 782,
825
+ 823,
826
+ 839
827
+ ],
828
+ "page_idx": 4
829
+ },
830
+ {
831
+ "type": "equation",
832
+ "img_path": "images/2d224c5d1e04c6eec697fb9199c855ae951eb2f3167a898c35a750edeaa1e9f5.jpg",
833
+ "text": "$$\nq ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } , \\pmb { x } _ { 0 } ) = \\mathcal { C } ( \\pmb { x } _ { t - 1 } | \\pmb { \\theta } _ { \\mathrm { p o s t } } ( \\pmb { x } _ { t } , \\pmb { x } _ { 0 } ) ) , \\mathrm { w h e r e } \\theta _ { \\mathrm { p o s t } } ( \\pmb { x } _ { t } , \\pmb { x } _ { 0 } ) = \\tilde { \\pmb { \\theta } } / \\sum _ { k = 1 } ^ { K } \\tilde { \\pmb { \\theta } } _ { k }\n$$",
834
+ "text_format": "latex",
835
+ "bbox": [
836
+ 241,
837
+ 844,
838
+ 756,
839
+ 888
840
+ ],
841
+ "page_idx": 4
842
+ },
843
+ {
844
+ "type": "image",
845
+ "img_path": "images/0081b6d31e8d4929f26514d687cb93af063dd11c163096d075667386e19fccae.jpg",
846
+ "image_caption": [
847
+ "Figure 2: Overview of multinomial diffusion. A generative model $p ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } )$ learns to gradually denoise a signal from left to right. An inference diffusion process $q \\big ( \\mathbf { \\boldsymbol { x } } _ { t } | \\mathbf { \\boldsymbol { x } } _ { t - 1 } \\big )$ gradually adds noise form right to left. "
848
+ ],
849
+ "image_footnote": [],
850
+ "bbox": [
851
+ 179,
852
+ 88,
853
+ 820,
854
+ 185
855
+ ],
856
+ "page_idx": 5
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "One of the innovations in $\\boxed { \\mathrm { H o ~ e t ~ a l . } } \\textcircled { 1 2 0 2 0 }$ was the insight to not predict the parameters for the generative trajectory directly, but rather to predict the noise using the posterior equation for $q$ . Although predicting the noise is difficult for discrete data, we predict a probability vector for $\\scriptstyle { \\hat { \\mathbf { x } } } _ { 0 }$ from $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { t } }$ and subsequently parametrize $p ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } )$ using the probability vector from $q ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } , \\hat { \\pmb { x } } _ { 0 } )$ , where $\\scriptstyle { \\mathbf { { \\mathit { x } } } } _ { 0 }$ is approximated using a neural network $\\hat { \\pmb { x } } _ { 0 } = \\mu ( \\pmb { x } _ { t } , t )$ . Equation $\\boxed { 1 3 }$ will produce valid probability vectors that are non-negative and sums to one under the condition that the prediction $\\scriptstyle { \\hat { \\mathbf { x } } } _ { 0 }$ is non-negative and sums to one, which is ensured with a softmax function in $\\mu$ . To summarize: ",
861
+ "bbox": [
862
+ 173,
863
+ 263,
864
+ 826,
865
+ 362
866
+ ],
867
+ "page_idx": 5
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "$\\begin{array} { r } { \\begin{array} { r } { \\rho \\big ( { \\pmb x } _ { 0 } | { \\pmb x } _ { 1 } \\big ) = \\mathcal { C } \\big ( { \\pmb x } _ { 0 } | \\hat { \\pmb x } _ { 0 } \\big ) \\mathrm { ~ a n d ~ } p \\big ( { \\pmb x } _ { t - 1 } | { \\pmb x } _ { t } \\big ) = \\mathcal { C } \\big ( { \\pmb x } _ { t - 1 } | \\theta _ { \\mathrm { p o s t } } \\big ( { \\pmb x } _ { t } , \\hat { \\pmb x } _ { 0 } \\big ) \\big ) \\mathrm { ~ w h e r e ~ } \\hat { \\pmb x } _ { 0 } = \\mu ( { \\pmb x } _ { t } , t ) } \\end{array} } \\end{array}$ ",
872
+ "bbox": [
873
+ 196,
874
+ 367,
875
+ 774,
876
+ 386
877
+ ],
878
+ "page_idx": 5
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "The KL terms in Equation $\\textcircled { 3 }$ can be simply computed by enumerating the probabilities in Equation and 14 and computing the KL divergence for discrete distributions in $L _ { t - 1 } ^ { \\star }$ with $t \\geq 2$ : ",
883
+ "bbox": [
884
+ 174,
885
+ 392,
886
+ 803,
887
+ 419
888
+ ],
889
+ "page_idx": 5
890
+ },
891
+ {
892
+ "type": "equation",
893
+ "img_path": "images/2b99f41b4cbad51d1ecb491d5f1f502e110d1dfe433e8ce00d5ae86063d876e5.jpg",
894
+ "text": "$$\n\\mathrm { K L } \\big ( q ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } , \\pmb { x } _ { 0 } ) | p ( \\pmb { x } _ { t - 1 } | \\pmb { x } _ { t } ) \\big ) = \\mathrm { K L } \\big ( \\mathcal { C } ( \\pmb { \\theta } _ { \\mathrm { p o s t } } ( \\pmb { x } _ { t } , \\pmb { x } _ { 0 } ) ) | \\mathcal { C } ( \\pmb { \\theta } _ { \\mathrm { p o s t } } ( \\pmb { x } _ { t } , \\hat { \\pmb { x } } _ { 0 } ) ) \\big ) ,\n$$",
895
+ "text_format": "latex",
896
+ "bbox": [
897
+ 261,
898
+ 424,
899
+ 735,
900
+ 441
901
+ ],
902
+ "page_idx": 5
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "which can be computed using P k ✓post(xt, x0))k · log ✓post(xt,x0))k✓post(xt,xˆ0))k . Furtermore, to compute $\\log p ( { \\pmb x } _ { 0 } | { \\pmb x } _ { 1 } )$ use that $\\scriptstyle { \\mathbf { { \\mathit { x } } } } _ { 0 }$ is onehot: ",
907
+ "bbox": [
908
+ 173,
909
+ 446,
910
+ 826,
911
+ 483
912
+ ],
913
+ "page_idx": 5
914
+ },
915
+ {
916
+ "type": "equation",
917
+ "img_path": "images/82651c20a7bc4ff6f0f2359aee9a759b54cf5673b28d419b98577ee81be54e61.jpg",
918
+ "text": "$$\n\\log p ( \\pmb { x } _ { 0 } | \\pmb { x } _ { 1 } ) = \\sum _ { k } \\pmb { x } _ { 0 , k } \\log \\hat { \\pmb { x } } _ { 0 , k }\n$$",
919
+ "text_format": "latex",
920
+ "bbox": [
921
+ 395,
922
+ 488,
923
+ 601,
924
+ 518
925
+ ],
926
+ "page_idx": 5
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "5 Related Work ",
931
+ "text_level": 1,
932
+ "bbox": [
933
+ 174,
934
+ 549,
935
+ 321,
936
+ 565
937
+ ],
938
+ "page_idx": 5
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "Deep generative models broadly fall into the categories autoregressive models ARMs (Germain et al., 2015), Variational Autoencoders (VAEs) (Kingma and Welling, 2014; Rezende et al., 2014), Adversarial Network (GANs) (Goodfellow et al., 2014), Normalizing Flows (Rezende and Mohamed, 2015), Energy-Based Models (EBMs) and Diffusion Models (Sohl-Dickstein et al., 2015). ",
943
+ "bbox": [
944
+ 173,
945
+ 579,
946
+ 825,
947
+ 636
948
+ ],
949
+ "page_idx": 5
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "Normalizing Flows typically learn a continuous distribution and dequantization is required to train these methods on ordinal data such as images. A large body of work is dedicated to building more expressive continuous normalizing flows (Dinh et al., 2017; Germain et al., 2015; Kingma et al., 2016; Papamakarios et al., 2017; Chen et al., 2018; Song et al., 2019; Perugachi-Diaz et al., 2020). To learn ordinal discrete distributions with normalizing flows, adding uniform noise in-between ordinal classes was proposed in (Uria et al., 2013) and later theoretically justified in (Theis et al., 2016). An extension for more powerful dequantization based on variational inference was proposed in (Ho et al., 2019), and connected to autoregressive models in (Nielsen and Winther, 2020). Dequantization for binary variables was proposed in (Winkler et al., 2019). Tran et al. (2019) propose invertible transformations for categorical variables directly. However, these methods can be difficult to train because of gradient bias and results on images have thus far not been demonstrated. In addition flows for ordinal discrete data (integers) have been explored in (Hoogeboom et al., 2019; van den Berg et al., $\\boxed { 2 0 2 0 }$ . In other works, VAEs have been adapted to learn a normalizing flow for the latent space (Ziegler and Rush, 2019; Lippe and Gavves, 2020). However, these approaches typically still utilize an argmax heuristic to sample, even though this is not the distribution specified during training. ",
954
+ "bbox": [
955
+ 173,
956
+ 641,
957
+ 826,
958
+ 849
959
+ ],
960
+ "page_idx": 5
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "Diffusion models were first introduced in Sohl-Dickstein et al. (2015), who developed diffusion for Gaussian and Bernoulli distributions. Recently, Denoising Diffusion models $\\boxed { \\mathrm { H o ~ e t ~ a l . } } \\textcircled { 2 0 2 0 }$ have been shown capable of generating high-dimensional images by architectural improvements and reparametrization of the predictions. Diffusion models are relatively fast to train, but slow to sample from as they require iterations over the many timesteps in the chain. $\\boxed { \\mathrm { S o n g ~ e t ~ a l . } ( \\mathbb { 2 0 2 0 } ) }$ ; Nichol and Dhariwal (2021) showed that in practice samples can be generated using significantly fewer steps. Nichol and Dhariwal (2021) demonstrated that importance-weighting the objective components greatly improves log-likelihood performance. In Song et al. $\\underline { { ( 2 0 2 0 ) } }$ a continuous-time extension of denoising diffusion models was proposed. After initial release of this paper we discovered that $\\boldsymbol { \\left| \\mathrm { { S o n g } } \\right| }$ et al. $\\bar { ( | 2 0 2 0 ) }$ concurrently also describe a framework for discrete diffusion, but without empirical evaluation. ",
965
+ "bbox": [
966
+ 174,
967
+ 854,
968
+ 825,
969
+ 911
970
+ ],
971
+ "page_idx": 5
972
+ },
973
+ {
974
+ "type": "table",
975
+ "img_path": "images/a71b8292a7aaba8557faf855f4fd7fac053b7ec79c9647a4a94b7a0ad42ecb4d.jpg",
976
+ "table_caption": [
977
+ "Table 2: Comparison of a coupling and autoregressive generative flows with uniform (Uria et al., 2013) and variational (Ho et al., 2019) dequantization and our proposed Argmax flows. "
978
+ ],
979
+ "table_footnote": [],
980
+ "table_body": "<table><tr><td>Dequantization</td><td>Flow type</td><td>text8 (bpc)</td><td>enwik8 (bits per raw byte)</td></tr><tr><td>Uniform dequantization</td><td rowspan=\"3\">Autoregressive</td><td>1.90</td><td>2.14</td></tr><tr><td>Variational dequantization</td><td>1.43</td><td>1.44</td></tr><tr><td>Argmax Flow (ours)</td><td>1.38</td><td>1.42</td></tr><tr><td rowspan=\"3\">Uniform dequantization Variational dequantization Argmax Flow (ours)</td><td rowspan=\"3\">Coupling</td><td>2.01</td><td>2.33</td></tr><tr><td>2.08</td><td>2.28</td></tr><tr><td>1.82</td><td>1.93</td></tr></table>",
981
+ "bbox": [
982
+ 230,
983
+ 126,
984
+ 766,
985
+ 233
986
+ ],
987
+ "page_idx": 6
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "",
992
+ "bbox": [
993
+ 173,
994
+ 248,
995
+ 826,
996
+ 347
997
+ ],
998
+ "page_idx": 6
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "6 Experiments ",
1003
+ "text_level": 1,
1004
+ "bbox": [
1005
+ 174,
1006
+ 364,
1007
+ 312,
1008
+ 382
1009
+ ],
1010
+ "page_idx": 6
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "In our experiments we compare the performance of our methods on language modelling tasks and learning image segmentation maps unconditionally. ",
1015
+ "bbox": [
1016
+ 174,
1017
+ 396,
1018
+ 823,
1019
+ 424
1020
+ ],
1021
+ "page_idx": 6
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "6.1 Language data ",
1026
+ "text_level": 1,
1027
+ "bbox": [
1028
+ 174,
1029
+ 440,
1030
+ 316,
1031
+ 455
1032
+ ],
1033
+ "page_idx": 6
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "In this section we compare our methods on two language datasets, text8 and enwik8. text8 contains 27 categories (‘a’ through $\\cdot _ { z } ,$ and ‘ ’) and for enwik8 the bytes are directly modelled which results in 256 categories. ",
1038
+ "bbox": [
1039
+ 176,
1040
+ 465,
1041
+ 823,
1042
+ 507
1043
+ ],
1044
+ "page_idx": 6
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "Model description Two versions of generative argmax flows are tested: using an autoregressive (AR) flow and a coupling-based flow for $p ( v )$ . In these experiments the probabilistic inverse is based on the thresholding approach. Specifically, a conditional diagonal Gaussian $q ( { \\pmb u } | { \\pmb x } )$ is trained and thresholded which gives the distribution $q ( { \\pmb v } | { \\pmb x } )$ . The argmax flow is defined on binary Cartesian products. This means that for $K = 2 7$ , a 5-dimensional binary space is used and for $K = 2 5 6$ an 8-dimensional binary space. The argmax flow is compared to the current standard of training generative flows directly on discrete data: dequantization. We compare to both uniform and variational dequantization, where noise on a $( 0 , 1 )$ interval is added to the onehot representation of the categorical data. The autoregressive density model is based on the model proposed in $( \\mathbb { L i p p e \\ a n d G a v v e s } ) \\bar { \\lfloor 2 0 2 0 \\rfloor }$ . The coupling density model consists of 8 flow layers where each layer consists of a $\\overline { { 1 \\times 1 } }$ convolution and mixture of logistics transformations $\\boxed { \\mathrm { H o ~ e t ~ a l . } ( \\overline { { 2 0 1 9 } } ) }$ . In the multinomial text diffusion model, the $\\mu$ network is modeled by a 12-layer Transformer. For more extensive details about the experiment setup see Appendix B. ",
1049
+ "bbox": [
1050
+ 173,
1051
+ 522,
1052
+ 826,
1053
+ 703
1054
+ ],
1055
+ "page_idx": 6
1056
+ },
1057
+ {
1058
+ "type": "table",
1059
+ "img_path": "images/8e972ddbcbbde9475a20f9d12c019c642768d8a37c326fd5bde5a5e9efaa6e54.jpg",
1060
+ "table_caption": [
1061
+ "Table 3: Comparison of different methods on text8 and enwik8. Results are reported in negative log-likelihood with units bits per character (bpc) for text8 and bits per raw byte (bpb) for enwik8. "
1062
+ ],
1063
+ "table_footnote": [
1064
+ "$\\star$ Results obtained by running code from the official repository for the text8 and enwik8 datasets. "
1065
+ ],
1066
+ "table_body": "<table><tr><td>Model type</td><td>Model</td><td>text8 (bpc)</td><td>enwik8 (bpb)</td></tr><tr><td rowspan=\"2\">ARM</td><td> 64 Layer Transformer (Al-Rfou et al.2019)</td><td>1.13</td><td>1.06</td></tr><tr><td>TransformerXL (Dai et al.,2019)</td><td>1.08</td><td>0.99</td></tr><tr><td rowspan=\"3\">VAE</td><td> AF/AF* (AR) (Ziegler and Rush,2019)</td><td>1.62</td><td>1.72</td></tr><tr><td>IAF /SCF*( Ziegler and Rush, 2019)</td><td>1.88</td><td>2.03</td></tr><tr><td> CategoricalNF (AR) (Lippe and Gavves,2020)</td><td>1.45</td><td>1</td></tr><tr><td rowspan=\"2\">Generative Flow</td><td>Argmax Flow, AR (ours)</td><td>1.39</td><td>1.42</td></tr><tr><td>Argmax Coupling Flow (ours)</td><td>1.82</td><td>1.93</td></tr><tr><td>Diffusion</td><td>Multinomial Text Diffusion (ours)</td><td>1.72</td><td>1.75</td></tr></table>",
1067
+ "bbox": [
1068
+ 202,
1069
+ 761,
1070
+ 797,
1071
+ 907
1072
+ ],
1073
+ "page_idx": 6
1074
+ },
1075
+ {
1076
+ "type": "image",
1077
+ "img_path": "images/c0b9b817e7b8ebc0040ab503398123cc08771180c54bfc8d36f3b53d6ddfd9c6.jpg",
1078
+ "image_caption": [],
1079
+ "image_footnote": [],
1080
+ "bbox": [
1081
+ 513,
1082
+ 104,
1083
+ 820,
1084
+ 179
1085
+ ],
1086
+ "page_idx": 7
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "(a) Samples from Multinomial Text Diffusion. ",
1091
+ "text_level": 1,
1092
+ "bbox": [
1093
+ 194,
1094
+ 185,
1095
+ 467,
1096
+ 198
1097
+ ],
1098
+ "page_idx": 7
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "heartedness frege thematically infered by the famous existence of a fu nction f from the laplace definition we can analyze a definition of bin ary operations with additional size so their functionality cannot be re viewed here there is no change because its ",
1103
+ "bbox": [
1104
+ 176,
1105
+ 212,
1106
+ 483,
1107
+ 236
1108
+ ],
1109
+ "page_idx": 7
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "otal cost of learning objects from language to platonic linguistics exa mines why animate to indicate wild amphibious substances animal and mar ine life constituents of animals and bird sciences medieval biology bio logy and central medicine full discovery re ",
1114
+ "bbox": [
1115
+ 178,
1116
+ 239,
1117
+ 483,
1118
+ 263
1119
+ ],
1120
+ "page_idx": 7
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "(a) Samples from the Argmax Flow. ",
1125
+ "bbox": [
1126
+ 560,
1127
+ 186,
1128
+ 774,
1129
+ 199
1130
+ ],
1131
+ "page_idx": 7
1132
+ },
1133
+ {
1134
+ "type": "table",
1135
+ "img_path": "images/9904db281bfa6c760a5b879562b9cce3205bd99d88ebf74e95fd91c64d47bc08.jpg",
1136
+ "table_caption": [],
1137
+ "table_footnote": [],
1138
+ "bbox": [
1139
+ 513,
1140
+ 200,
1141
+ 820,
1142
+ 275
1143
+ ],
1144
+ "page_idx": 7
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "(b) Samples from Argmax AR Flow. ",
1149
+ "text_level": 1,
1150
+ "bbox": [
1151
+ 222,
1152
+ 281,
1153
+ 437,
1154
+ 294
1155
+ ],
1156
+ "page_idx": 7
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "ns fergenur d alpha and le heigu man notabhe leglon lm n two six a gg opa movement as sympathetic dutch the term bilirubhah acquired the bava rian cheeh segt thmamouinaire vhvinus lihnos ineoneartis or medical iod ine the rave wesp published harsy varb hhgh ",
1161
+ "bbox": [
1162
+ 178,
1163
+ 308,
1164
+ 483,
1165
+ 330
1166
+ ],
1167
+ "page_idx": 7
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "danibah or manuccha but calpere that of the moisture soods and dristi ng attempt to cause any moderator called lk brown or totpdngs is usuall y able to nus and hockecrits borel qbisupnias section rybancase untecce mentation anymore the motion of plays on qr ",
1172
+ "bbox": [
1173
+ 178,
1174
+ 335,
1175
+ 482,
1176
+ 358
1177
+ ],
1178
+ "page_idx": 7
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "(b) Samples from the Multinomial Diffusion model. ",
1183
+ "bbox": [
1184
+ 514,
1185
+ 282,
1186
+ 820,
1187
+ 294
1188
+ ],
1189
+ "page_idx": 7
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "(c) Samples from Argmax Coupling Flow. ",
1194
+ "bbox": [
1195
+ 205,
1196
+ 377,
1197
+ 454,
1198
+ 388
1199
+ ],
1200
+ "page_idx": 7
1201
+ },
1202
+ {
1203
+ "type": "image",
1204
+ "img_path": "images/2b8d58454c0d703bcf09c5a410477724ff30d427524d943aa009ff09b68c1812.jpg",
1205
+ "image_caption": [
1206
+ "Figure 4: Samples from models, cityscapes. "
1207
+ ],
1208
+ "image_footnote": [],
1209
+ "bbox": [
1210
+ 513,
1211
+ 296,
1212
+ 820,
1213
+ 390
1214
+ ],
1215
+ "page_idx": 7
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "Figure 3: Samples from models, text8. ",
1220
+ "bbox": [
1221
+ 200,
1222
+ 397,
1223
+ 462,
1224
+ 411
1225
+ ],
1226
+ "page_idx": 7
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "Comparison with Generative Flows Firstly we compare the performance of generative flows directly trained on language data (Table $\\textcircled{2}$ . These experiments are using the same underlying normalizing flow: either a coupling-based flow or an autoregressive flow. Note that Argmax Flows consistently outperform both uniform and variational dequantization. This indicates that it is easier for a generative flow to learn the lifted continuous distribution using an argmax flow. An advantage of Argmax flows that may explain this difference is that they lift the variables into the entire Euclidean space, whereas traditional dequantization only introduce probability density on $( 0 , 1 )$ intervals, leaving gaps with no probability density. The performance improvements of Argmax flows are even more pronounced when comparing coupling-based approaches. Also note that coupling flows have worse performance than autoregressive flows, with a difference that is generally smaller for images. This indicates that designing more expressive coupling layers for text is an interesting future research direction. ",
1231
+ "bbox": [
1232
+ 173,
1233
+ 443,
1234
+ 826,
1235
+ 608
1236
+ ],
1237
+ "page_idx": 7
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "Comparison with other generative models The performance compared to models in literature is presented in Table 3 alongside the performance of our Argmax Flows and Multinomial Diffusion. The latent variable approaches containing autoregressive components are marked using (AR). Although autoregressive flows still have the same disadvantages as ARMs, they provide perspective on where performance deficiencies are coming from. We find that our autoregressive Argmax Flows achieve better performance than the VAE approaches, they outperform AF/AF (Ziegler and Rush, 2019) and CategoricalNF (Lippe and Gavves, 2020). ",
1242
+ "bbox": [
1243
+ 173,
1244
+ 627,
1245
+ 825,
1246
+ 726
1247
+ ],
1248
+ "page_idx": 7
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "When comparing non-autoregressive models, Argmax Flows also outperforms the method that lifts the categorical space to a continuous space: IAF / SCF (Ziegler and Rush, 2019). Interestingly, the multinomial text diffusion is a non-autoregressive model that performs even better than the argmax coupling flow, but performs worse than the autoregressive version. For this model it is possible that different diffusion trajectories for $q$ would result in even better performance, because in the current form the denoising model has to be very robust to input noise. These experiments also highlight that there is still a distinct performance gap between standard ARMs and (autoregressive) continuous density model on text, possibly related to the dequantization gap (Nielsen and Winther, 2020). Samples from different models trained on text8 are depicted in Figure 3. Because of difficulties in reproducing results from Discrete Flows, a comparison and analysis of discrete flows are left out of this section. Instead they are extensively discussed in Appendix C. For additional experiments regarding Cartesian products and sampling time see Appendix D. ",
1253
+ "bbox": [
1254
+ 173,
1255
+ 731,
1256
+ 825,
1257
+ 897
1258
+ ],
1259
+ "page_idx": 7
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "Unsupervised spell-checking An interesting by-product of the text diffusion model is that it can be used to spell-check text using a single forward pass. To demonstrate this, a sentence taken from the test data is corrupted by changing a few characters. This corrupted sequence is given as $\\scriptstyle { \\mathbf { { \\vec { x } } } } _ { 1 }$ to the generative denoising model, which is close to the data at step 0. Then the denoising model predicts $p ( \\pmb { x } _ { 0 } | \\bar { \\pmb { x } _ { 1 } } )$ and the mostlikely $\\scriptstyle { \\pmb x } _ { 0 }$ can be suggested. Note that this model only works for character-level corruption, not insertions. An example is depicted in Figure $5 .$ Since the model chooses the most-likely matching word, larger corruptions will at some point lead to word changes. ",
1264
+ "bbox": [
1265
+ 174,
1266
+ 92,
1267
+ 485,
1268
+ 297
1269
+ ],
1270
+ "page_idx": 8
1271
+ },
1272
+ {
1273
+ "type": "image",
1274
+ "img_path": "images/5f94306fa5e73f34f7213ccc41dd375018cdb4c9b07ada283a1216de7a248056.jpg",
1275
+ "image_caption": [
1276
+ "Figure 5: Spell checking with Multinomial Text Diffusion. "
1277
+ ],
1278
+ "image_footnote": [],
1279
+ "bbox": [
1280
+ 498,
1281
+ 101,
1282
+ 813,
1283
+ 242
1284
+ ],
1285
+ "page_idx": 8
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "6.2 Segmentation maps ",
1290
+ "text_level": 1,
1291
+ "bbox": [
1292
+ 174,
1293
+ 327,
1294
+ 349,
1295
+ 342
1296
+ ],
1297
+ "page_idx": 8
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "For image-type data, we introduce a categorical image dataset: the cityscapes dataset is repurposed for unconditional image segmentation learning. In contrast with the standard setting, the distribution over the segmentation targets needs to be learned without conditioning on the photograph. To reduce computational cost, we rescale the segmentation maps from cityscapes to $3 2 \\times 6 4$ images using nearest neighbour interpolation. We utilize the global categories as prediction targets which results in an 8-class problem. ",
1302
+ "bbox": [
1303
+ 173,
1304
+ 357,
1305
+ 825,
1306
+ 440
1307
+ ],
1308
+ "page_idx": 8
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "Model description The Argmax Flows are defined directly on the $K = 8$ categorical space. The density model $p ( v )$ is defined using affine coupling layers parametrized by DenseNets $\\mathrm { ( } \\varlimsup \\mathrm { a n g ~ e t ~ a l . } \\mathrm { ) } \\varliminf \\bar { 2 0 1 7 } \\mathrm { ) }$ . For the probabilistic inverse we learn a conditional flow $q ( { \\pmb u } | { \\pmb x } )$ which is also based on the affine coupling structure. Depending on the method, either softplus or Gumbel thresholding is applied to obtain $\\textbf { { v } }$ . Recall that for our first Gumbel approach it is equivalent to set $q ( { \\pmb u } | { \\pmb x } )$ to the unit uniform distribution, whereas $\\scriptstyle { \\dot { q } } ( { \\pmb { u } } | { \\pmb { x } } )$ is learned for Gumbel ",
1313
+ "bbox": [
1314
+ 174,
1315
+ 462,
1316
+ 485,
1317
+ 627
1318
+ ],
1319
+ "page_idx": 8
1320
+ },
1321
+ {
1322
+ "type": "table",
1323
+ "img_path": "images/f2afa9ebbf5fb117bdb76ec1888d87e96c8efa487eb1933dcfc97439a2e734d1.jpg",
1324
+ "table_caption": [
1325
+ "Table 4: Performance of different dequantization methods on squares and cityscapes dataset, in bits per pixel, lower is better. "
1326
+ ],
1327
+ "table_footnote": [],
1328
+ "table_body": "<table><tr><td>Cityscapes</td><td>ELBO</td><td>IWBO</td></tr><tr><td>Round / Unif. (Uria et al., 2013)</td><td>1.010</td><td>0.930</td></tr><tr><td>Round / Var.( (Ho et al., 2019)</td><td>0.334</td><td>0.315</td></tr><tr><td>Argmax / Softplus thres.(ours)</td><td>0.303</td><td>0.290</td></tr><tr><td>Argmax /Gumbel dist.(ours) Argmax /Gumbel thres.(ours)</td><td>0.365</td><td>0.341</td></tr><tr><td></td><td>0.307</td><td>0.287</td></tr><tr><td>Multinomial Diffusion (ours)</td><td>0.305</td><td></td></tr></table>",
1329
+ "bbox": [
1330
+ 500,
1331
+ 505,
1332
+ 821,
1333
+ 617
1334
+ ],
1335
+ "page_idx": 8
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "thresholding. We compare to existing dequantization strategies in literature: uniform (Uria et al., $\\boxed { 2 0 1 3 }$ and variational dequantization $( \\bar { \\mathrm { H o \\ e t \\ a l . } } , \\bar { 2 0 1 9 } )$ which are applied on the onehot representation. All models utilize the same underlying flow architectures and thus the number of parameters is roughly the same. The exception are uniform dequantization and the Gumbel distribution, since no additional variational flow distribution is needed. For more extensive details see Appendix B. ",
1340
+ "bbox": [
1341
+ 173,
1342
+ 627,
1343
+ 826,
1344
+ 696
1345
+ ],
1346
+ "page_idx": 8
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "text": "Comparison The results of this experiment are shown in Table $^ 4$ in terms of ELBO and if available the IWBO (importance weighted bound) $\\left( \\mathrm { B u r d a \\ e t \\ a l . } \\right) , \\left[ \\mathrm { 2 0 1 6 } \\right)$ with 1000 samples measured in bits per pixel. Consistent with the language experiments, the traditional dequantization approaches (uniform / variational) are outperformed by Argmax Flows. Interestingly, although argmax flows with softplus thresholding achieves the best ELBO, the argmax flow with Gumbel thresholding approach achieves a better IWBO. The Multinomial Diffusion model performs somewhat worse with 0.37 bpp on test whereas it scored 0.33 bpp on train. Interestingly, this the only model where overfitting was an issue and data augmentation was required, which may explain this portion of the performance difference. For all other models training performance was comparable to test and validation performance. Samples from the different models trained on cityscapes are depicted in Figure $\\mathbb { E }$ Another interesting point is that coupling flows had difficulty producing coherent text samples (Figure $\\textcircled { 3 }$ but do not suffer from this problem on the cityscapes data which is more imagelike. As coupling layers where initially designed for images (Dinh et al., 2015), they may require adjustments to increase their expressiveness on text. ",
1351
+ "bbox": [
1352
+ 173,
1353
+ 718,
1354
+ 825,
1355
+ 911
1356
+ ],
1357
+ "page_idx": 8
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "7 Social Impact and Conclusion ",
1362
+ "text_level": 1,
1363
+ "bbox": [
1364
+ 176,
1365
+ 89,
1366
+ 454,
1367
+ 106
1368
+ ],
1369
+ "page_idx": 9
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Social Impact The methods described in this paper can be used to learn categorical distributions. For that reason, they can potentially be used to generate high-dimensional categorical data, such as text or image segmentation maps, faster than iterative approaches. Possibly negative influences are the generation of fake media in the form of text, or very unhelpful automated chat bots for customer service. Our work could positively influence new methods for text generation, or improved segmentation for self-driving cars. In addition, our work may also be used for outlier detection to flag fake content. Also, we believe the method in its current form is still distant from direct applications as the ones mentioned above. ",
1374
+ "bbox": [
1375
+ 173,
1376
+ 119,
1377
+ 825,
1378
+ 231
1379
+ ],
1380
+ "page_idx": 9
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Conclusion In this paper we propose two extensions for Normalizing Flows and Diffusion models to learn categorical data: Argmax Flows and Multinomial Diffusion. Our experiments show that our methods outperform comparable models in terms of negative log-likelihood. In addition, our experiments highlight distinct performance gaps in the field: Between standard ARMs, continuous autoregressive models and non-autoregressive continuous models. This indicates that future work could focus on two sources of decreased performance: 1) when discrete variables are lifted to a continuous space and further 2) when removing autoregressive components. ",
1385
+ "bbox": [
1386
+ 174,
1387
+ 246,
1388
+ 825,
1389
+ 343
1390
+ ],
1391
+ "page_idx": 9
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Funding Disclosure ",
1396
+ "text_level": 1,
1397
+ "bbox": [
1398
+ 174,
1399
+ 349,
1400
+ 312,
1401
+ 363
1402
+ ],
1403
+ "page_idx": 9
1404
+ },
1405
+ {
1406
+ "type": "text",
1407
+ "text": "There are no additional sources of funding to disclose, beyond the affiliations of the authors. ",
1408
+ "bbox": [
1409
+ 171,
1410
+ 363,
1411
+ 774,
1412
+ 378
1413
+ ],
1414
+ "page_idx": 9
1415
+ },
1416
+ {
1417
+ "type": "text",
1418
+ "text": "References \nCooijmans, T.; Ballas, N.; Laurent, C.; Gülçehre, Ç.; Courville, A. C. Recurrent Batch Normalization. 5th International Conference on Learning Representations, ICLR. 2017. \nDai, Z.; Yang, Z.; Yang, Y.; Carbonell, J. G.; Le, Q. V.; Salakhutdinov, R. Transformer-XL: Attentive Language Models beyond a Fixed-Length Context. Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019. 2019. \nUria, B.; Murray, I.; Larochelle, H. RNADE: The Real-valued Neural Autoregressive Densityestimator. Advances in Neural Information Processing Systems. 2013; pp 2175–2183. \nTheis, L.; van den Oord, A.; Bethge, M. A note on the evaluation of generative models. International Conference on Learning Representations. 2016. \nHo, J.; Chen, X.; Srinivas, A.; Duan, Y.; Abbeel, P. Flow $^ { + + }$ : Improving Flow-Based Generative Models with Variational Dequantization and Architecture Design. 36th International Conference on Machine Learning 2019, \nSohl-Dickstein, J.; Weiss, E. A.; Maheswaranathan, N.; Ganguli, S. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. Proceedings of the 32nd International Conference on Machine Learning, ICML. 2015. \nHo, J.; Jain, A.; Abbeel, P. Denoising Diffusion Probabilistic Models. CoRR 2020, abs/2006.11239. \nSong, J.; Meng, C.; Ermon, S. Denoising Diffusion Implicit Models. CoRR 2020, abs/2010.02502. \nNichol, A. Q.; Dhariwal, P. Improved Denoising Diffusion Probabilistic Models. 2021; https: //openreview.net/forum?id=-NEXDKk8gZ. \nRezende, D.; Mohamed, S. Variational Inference with Normalizing Flows. Proceedings of the 32nd International Conference on Machine Learning. 2015; pp 1530–1538. \nNielsen, D.; Jaini, P.; Hoogeboom, E.; Winther, O.; Welling, M. SurVAE Flows: Surjections to Bridge the Gap between VAEs and Flows. CoRR 2020, abs/2007.02731. \nMaddison, C. J.; Tarlow, D.; Minka, T. A\\* Sampling. Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems. 2014. \nKool, W.; Van Hoof, H.; Welling, M. Stochastic Beams and Where To Find Them: The GumbelTop-k Trick for Sampling Sequences Without Replacement. Proceedings of the 36th International Conference on Machine Learning. 2019. \nWinkler, C.; Worrall, D. E.; Hoogeboom, E.; Welling, M. Learning Likelihoods with Conditional Normalizing Flows. CoRR 2019, abs/1912.00042. \nGermain, M.; Gregor, K.; Murray, I.; Larochelle, H. Made: Masked autoencoder for distribution estimation. International Conference on Machine Learning. 2015; pp 881–889. \nKingma, D. P.; Welling, M. Auto-Encoding Variational Bayes. Proceedings of the 2nd International Conference on Learning Representations. 2014. \nRezende, D. J.; Mohamed, S.; Wierstra, D. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. Proceedings of the 31th International Conference on Machine Learning, ICML. 2014. \nGoodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial nets. Advances in neural information processing systems. 2014; pp 2672–2680. \nDinh, L.; Sohl-Dickstein, J.; Bengio, S. Density estimation using Real NVP. 5th International Conference on Learning Representations, ICLR 2017, \nKingma, D. P.; Salimans, T.; Jozefowicz, R.; Chen, X.; Sutskever, I.; Welling, M. Improved variational inference with inverse autoregressive flow. Advances in Neural Information Processing Systems. 2016; pp 4743–4751. \nPapamakarios, G.; Murray, I.; Pavlakou, T. Masked autoregressive flow for density estimation. Advances in Neural Information Processing Systems. 2017; pp 2338–2347. \nChen, T. Q.; Rubanova, Y.; Bettencourt, J.; Duvenaud, D. K. Neural ordinary differential equations. Advances in Neural Information Processing Systems. 2018; pp 6572–6583. \nSong, Y.; Meng, C.; Ermon, S. MintNet: Building Invertible Neural Networks with Masked Convolutions. Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019. 2019. \nPerugachi-Diaz, Y.; Tomczak, J. M.; Bhulai, S. Invertible DenseNets. CoRR 2020, abs/2010.02125. \nNielsen, D.; Winther, O. Closing the Dequantization Gap: PixelCNN as a Single-Layer Flow. Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS. 2020. \nTran, D.; Vafa, K.; Agrawal, K.; Dinh, L.; Poole, B. Discrete Flows: Invertible Generative Models of Discrete Data. ICLR 2019 Workshop DeepGenStruct 2019, \nHoogeboom, E.; Peters, J. W. T.; van den Berg, R.; Welling, M. Integer Discrete Flows and Lossless Compression. Neural Information Processing Systems 2019, NeurIPS 2019. 2019; pp 12134– 12144. \nvan den Berg, R.; Gritsenko, A. A.; Dehghani, M.; Sønderby, C. K.; Salimans, T. $\\mathrm { I D F + + }$ : Analyzing and Improving Integer Discrete Flows for Lossless Compression. CoRR 2020, abs/2006.12459. \nZiegler, Z. M.; Rush, A. M. Latent Normalizing Flows for Discrete Sequences. Proceedings of the 36th International Conference on Machine Learning, ICML. 2019. \nLippe, P.; Gavves, E. Categorical Normalizing Flows via Continuous Transformations. CoRR 2020, abs/2006.09790. \nSong, Y.; Sohl-Dickstein, J.; Kingma, D. P.; Kumar, A.; Ermon, S.; Poole, B. Score-Based Generative Modeling through Stochastic Differential Equations. CoRR 2020, abs/2011.13456. \nAl-Rfou, R.; Choe, D.; Constant, N.; Guo, M.; Jones, L. Character-Level Language Modeling with Deeper Self-Attention. The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019. 2019. \nHuang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K. Q. Densely connected convolutional networks. Proceedings of the IEEE conference on computer vision and pattern recognition. 2017; pp 4700–4708. \nBurda, Y.; Grosse, R. B.; Salakhutdinov, R. Importance Weighted Autoencoders. 4th International Conference on Learning Representations. 2016. \nDinh, L.; Krueger, D.; Bengio, Y. NICE: Non-linear independent components estimation. 3rd International Conference on Learning Representations, ICLR, Workshop Track Proceedings 2015, \nCordts, M.; Omran, M.; Ramos, S.; Rehfeld, T.; Enzweiler, M.; Benenson, R.; Franke, U.; Roth, S.; Schiele, B. The Cityscapes Dataset for Semantic Urban Scene Understanding. 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR. 2016; pp 3213–3223. ",
1419
+ "bbox": [
1420
+ 171,
1421
+ 49,
1422
+ 828,
1423
+ 919
1424
+ ],
1425
+ "page_idx": 10
1426
+ },
1427
+ {
1428
+ "type": "text",
1429
+ "text": "",
1430
+ "bbox": [
1431
+ 169,
1432
+ 90,
1433
+ 828,
1434
+ 753
1435
+ ],
1436
+ "page_idx": 11
1437
+ }
1438
+ ]
parse/train/6nbpPqUCIi7/6nbpPqUCIi7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6nbpPqUCIi7/6nbpPqUCIi7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJuWrGW0Z/BJuWrGW0Z.md ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DYNAMIC NEURAL PROGRAM EMBEDDINGS FOR PRO-GRAM REPAIR
2
+
3
+ Ke Wang∗ University of California Davis, CA 95616, USA kbwang@ucdavis.edu
4
+
5
+ Rishabh Singh Microsoft Research Redmond, WA 98052, USA risin@microsoft.com
6
+
7
+ Zhendong Su University of California Davis, CA 95616, USA su@ucdavis.edu
8
+
9
+ # ABSTRACT
10
+
11
+ Neural program embeddings have shown much promise recently for a variety of program analysis tasks, including program synthesis, program repair, codecompletion, and fault localization. However, most existing program embeddings are based on syntactic features of programs, such as token sequences or abstract syntax trees. Unlike images and text, a program has well-defined semantics that can be difficult to capture by only considering its syntax (i.e. syntactically similar programs can exhibit vastly different run-time behavior), which makes syntaxbased program embeddings fundamentally limited. We propose a novel semantic program embedding that is learned from program execution traces. Our key insight is that program states expressed as sequential tuples of live variable values not only capture program semantics more precisely, but also offer a more natural fit for Recurrent Neural Networks to model. We evaluate different syntactic and semantic program embeddings on the task of classifying the types of errors that students make in their submissions to an introductory programming class and on the CodeHunt education platform. Our evaluation results show that the semantic program embeddings significantly outperform the syntactic program embeddings based on token sequences and abstract syntax trees. In addition, we augment a search-based program repair system with predictions made from our semantic embedding and demonstrate significantly improved search efficiency.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Recent breakthroughs in deep learning techniques for computer vision and natural language processing have led to a growing interest in their applications in programming languages and software engineering. Several well-explored areas include program classification, similarity detection, program repair, and program synthesis. One of the key steps in using neural networks for such tasks is to design suitable program representations for the networks to exploit. Most existing approaches in the neural program analysis literature have used syntax-based program representations. Mou et al. (2016) proposed a convolutional neural network over abstract syntax trees (ASTs) as the program representation to classify programs based on their functionalities and detecting different sorting routines. DeepFix (Gupta et al., 2017), SynFix (Bhatia & Singh, 2016), and sk p (Pu et al., 2016) are recent neural program repair techniques for correcting errors in student programs for MOOC assignments, and they all represent programs as sequences of tokens. Even program synthesis techniques that generate programs as output, such as RobustFill (Devlin et al., 2017), also adopt a token-based program representation for the output decoder. The only exception is Piech et al. (2015), which introduces a novel perspective of representing programs using input-output pairs. However, such representations are too coarse-grained to accurately capture program properties — programs with the same input-output behavior may have very different syntactic characteristics. Consequently, the embeddings learned from input-output pairs are not precise enough for many program analysis tasks.
16
+
17
+ Although these pioneering efforts have made significant contributions to bridge the gap between deep learning techniques and program analysis tasks, syntax-based program representations are fundamentally limited due to the enormous gap between program syntax (i.e. static expression) and semantics (i.e. dynamic execution). This gap can be illustrated as follows. First, when a program is executed at runtime, its statements are almost never interpreted in the order in which the corresponding token sequence is presented to the deep learning models (the only exception being straightline programs, i.e., ones without any control-flow statements). For example, a conditional statement only executes one branch each time, but its token sequence is expressed sequentially as multiple branches. Similarly, when iterating over a looping structure at runtime, it is unclear in which order any two tokens are executed when considering different loop iterations. Second, program dependency (i.e. data and control) is not exploited in token sequences and ASTs despite its essential role in defining program semantics. Figure 2 shows an example using a simple max function. On line 8, the assignment statement means variable max val is data-dependent on item. In addition, the execution of this statement depends on the evaluation of the $i f$ condition on line 7, i.e., max val is also control-dependent on item as well as itself. Third, from a pure program analysis standpoint, the gap between program syntax and semantics is manifested in that similar program syntax may lead to vastly different program semantics. For example, consider the two sorting functions shown in Figure 1. Both functions sort the array via two nested loops, compare the current element to its successor, and swap them if the order is incorrect. However, the two functions implement different algorithms, namely Bubble Sort and Insertion Sort. Therefore minor syntactic discrepancies can lead to significant semantic differences. This intrinsic weakness will be inherited by any deep learning technique that adopts a syntax-based program representation.
18
+
19
+ ![](images/6e7abaef6dc3da7842d01ee4e495ebf657bf8fb652e9212216cf6c8140db100a.jpg)
20
+ Figure 1: Bubble sort and insertion sort (code highlighted in shadow box are the only syntactic differences between the two algorithms). Their execution traces for the input vector $A = [ 8 , 5 , 1 , 4$ , 3]are displayed on the right, where, for brevity, only values for variable A are shown.
21
+
22
+ ![](images/633cb15c19ade14e79fb0804e1c786280d65d55b626b5d13271e48f69e341277.jpg)
23
+ Figure 2: Example for illustrating program dependency.
24
+
25
+ Table 1: Variable and state traces obtained by executing function max, given a $\operatorname { \mathrm { { r } } } = [ 1 , 5 , 3 ]$ .
26
+
27
+ <table><tr><td>VariableTrace</td><td>State Trace</td></tr><tr><td></td><td>{max_val : -oo} {max_val : -o,item :⊥}</td></tr><tr><td>{item : 1}</td><td>{max_val : -o,item : 1}</td></tr><tr><td>{max_val : 1}</td><td>{max_val :1, item : 1}</td></tr><tr><td>{item : 5}</td><td>{max_val :1,item:5}</td></tr><tr><td>{max_val : 5}</td><td>{max_val : 5,item : 5}</td></tr><tr><td>{item : 3}</td><td>{max_val : 5,item : 3}</td></tr></table>
28
+
29
+ To tackle this aforementioned fundamental challenge, this paper proposes a novel semantic program embedding that is learned from the program’s runtime behavior, i.e. dynamic program execution traces. We execute a program on a set of test cases and monitor/record the program states comprising of variable valuations. We introduce three approaches to embed these dynamic executions: (1) variable trace embedding — consider each variable independently, (2) state trace embedding — consider sequences of program states, each of which comprises of a set of variable values, and (3) hybrid embedding — incorporate dependencies into individual variable sequences to avoid redundant variable values in program states.
30
+
31
+ Our novel program embeddings address the aforementioned issues with the syntactic program representations. The dynamic program execution traces precisely illustrate the program behaves at runtime, and the values for each variable at each program point precisely models the program semantics. Regarding program dependencies, the dynamic execution traces, expressed as a sequential list of tuples (each of which represents the value of a variable at a certain program point), provides an opportunity for Recurrent Neural Network (RNN) to establish the data dependency and control dependency in the program. By monitoring particular value patterns between interacting variables, the RNN is able to model their relationship, leading to more precise semantic representations.
32
+
33
+ Reed & De Freitas (2015) recently proposed using program traces (as a sequence of actions/statements) for training a neural network to learn to execute an algorithm such as addition or sorting. Their notion of program traces is different from our dynamic execution traces consisting of program states with variable valuations. Our notion offers the following advantages: (1) a sequence of program states can be viewed as a sequence of input-output pairs of each executed statement, in other words, sequences of program states provide more robust information than that from sequences of executed statements, and (2) although a sequence of executed statements follows dynamic execution, it is still represented syntactically, and therefore may not adequately capture program semantics. For example, consider the two sorting algorithms in Figure 1. According to Reed & De Freitas (2015), they will have an identical representation $w . r . t .$ statements that modify the variable A, i.e. a repetition of $A [ j ] = A [ j + 1 ]$ and $A [ j + 1 ] = t m p$ for eight times. Our representation, on the other hand, can capture their semantic differences in terms of program states by also only considering the valuation of the variable A.
34
+
35
+ We have evaluated our dynamic program embeddings in the context of automated program repair. In particular, we use the program embeddings to classify the type of mistakes students made to their programming assignments based on a set of common error patterns (described in the appendix). The dataset for the experiments consists of the programming submissions made to Module 2 assignment in Microsoft-DEV204.1X and two additional problems from the Microsoft CodeHunt platform. The results show that our dynamic embeddings significantly outperform syntax-based program embeddings, including those trained on token sequences and abstract syntax trees. In addition, we show that our dynamic embeddings can be leveraged to significantly improve the efficiency of a searchbased program corrector SARFGEN1 (Wang et al., 2017) (the algorithm is presented in the appendix). More importantly, we believe that our dynamic program embeddings can be useful for many other program analysis tasks, such as program synthesis, fault localization, and similarity detection.
36
+
37
+ To summarize, the main contributions of this paper are: (1) we show the fundamental limitation of representing programs using syntax-level features; (2) we propose dynamic program embeddings learned from runtime execution traces to overcome key issues with syntactic program representations; (3) we evaluate our dynamic program embeddings for predicting common mistake patterns students make in program assignments, and results show that the dynamic program embeddings outperform state-of-the-art syntactic program embeddings; and (4) we show how the dynamic program embeddings can be utilized to improve an existing production program repair system.
38
+
39
+ # 2 BACKGROUND: DYNAMIC PROGRAM ANALYSIS
40
+
41
+ This section briefly reviews dynamic program analysis (Ball, 1999), an influential program analysis technique that lays the foundation for constructing our new program embeddings.
42
+
43
+ Unlike static analysis (Nielson et al., 1999), i.e., the analysis of program source code, dynamic analysis focuses on program executions. An execution is modeled by a set of atomic actions, or events, organized as a trace (or event history). For simplicity, this paper considers sequential executions only (as opposed to parallel executions) which lead to a single sequence of events, specifically, the executions of statements in the program. Detailed information about executions is often not readily available, and separate mechanisms are needed to capture the tracing information. An often adopted approach is to instrument a program’s source code (i.e., by adding additional monitoring code) to record the execution of statements of interest. In particular, those inserted instrumentation statements act as a monitoring window through which the values of variables are inspected. This instrumentation process can occur in a fully automated manner, e.g., a common approach is to traverse a program’s abstract syntax tree and insert “write” statements right after each program statement that causes a side-effect (i.e., changing the values of some variables).
44
+
45
+ Consider the two sorting algorithms depicted in Figure 1. If we assume $A$ to be the only variable of interest and subject to monitoring, we can instrument the two algorithms with Console.WriteLine(A) after each program location in the code whenever $A$ is modified2 (i.e. the lines marked by comments). Given the input vector $A = [ 8 , 5 , 1 , 4 , 3 ]$ , the execution traces of the two sorting routines are shown on the right in Figure 1.
46
+
47
+ One of the key benefits of dynamic analysis is its ability to easily and precisely identify relevant parts of the program that affect execution behavior. As shown in the example above, despite the very similar program syntax of bubble sort and insertion sort, dynamic analysis is able to discover their distinct program semantics by exposing their execution traces. Since understanding program semantics is a central issue in program analysis, dynamic analysis has seen remarkable success over the past several decades and has resulted in many successful program analysis tools such as debuggers, profilers, monitors, or explanation generators.
48
+
49
+ # 3 OVERVIEW OF THE APPROACH
50
+
51
+ We now present an overview of our approach. Given a program and the execution traces extracted for all its variables, we introduce three neural network models to learn dynamic program embeddings. To demonstrate the utility of these embeddings, we apply them to predict common error patterns (detailed in Section 5) that students make in their submissions to an online introductory programming course.
52
+
53
+ Variable Trace Embedding As shown in Table 1, each row denotes a new program point where a variable gets updated.3 The entire variable trace consists of those variable values at all program points. As a subsequent step, we split the complete trace into a list of sub-traces (one for each variable). We use one single RNN to encode each sub-trace independently and then perform max pooling on the final states of the same RNN to obtain the program embedding. Finally, we add a one layer softmax regression to make the predictions. The entire workflow is show in Figure 3.
54
+
55
+ State Trace Embedding Because each variable trace is handled individually in the previous approach, variable dependencies/interactions are not precisely captured. To address this issue, we propose the state trace embedding. As depicted in Table 1, each program point $l$ introduces a new program state expressed by the latest variable valuations at $l$ . The entire state trace is a sequence of program states. To learn the state trace embedding, we first use one RNN to encode each program state (i.e., a tuple of values) and feed the resulting RNN states as a sequence to another RNN. Note that we do not assume that the order in which variables values are encoded by the RNN for each program state but rather maintain a consistent order throughout all program states for a given trace. Finally, we feed a softmax regression layer with the final state of the second RNN (shown in Figure 4). The benefit of state trace embedding is its ability to capture dependencies among variables in each program state as well as the relationship among program states.
56
+
57
+ Dependency Enforcement for Variable Trace Embedding Although state trace embedding can better capture program dependencies, it also comes with some challenges, the most significant of which is redundancy. Consider a looping structure in a program. During an iteration, whenever one variable gets modified, a new program state will be created containing the values of all variables, even of those unmodified by the loop. This issue becomes more severe for loops with larger numbers of iterations. To tackle this challenge, we propose the third and final approach, dependency enforcement for variable trace embedding (hereinafter referred as dependency enforcement embedding), that combines the advantages of variable trace embedding (i.e., compact representation of execution traces) and state trace embedding (i.e., precise capturing of program dependencies). In dependency enforcement embedding, a program is represented by separate variable traces, with each variable being handled by a different RNN. In order to enforce program dependencies, the hidden states from different RNNs will be interleaved in a way that simulates the needed data and control dependencies. Unlike variable trace embedding, we perform an average pooling on the final states of all RNNs to obtain the program embedding on which we build the final layer of softmax regression. Figure 5 describes the workflow.
58
+
59
+ ![](images/c24b63b3244b25af823ac277ffa05737e9699d51bdba63355ecc7489ec66f479.jpg)
60
+ Figure 3: Variable trace for program embedding.
61
+
62
+ ![](images/0f134261b81b800a7d7782924ac759a6eec19ad3a254f17bba783e9a5665a983.jpg)
63
+ Figure 4: State trace for program embedding.
64
+
65
+ ![](images/87974f3acf7ec4c5a9bfd85bfb2a3305cfd281b29210e57fb2863f498a065b33.jpg)
66
+ Figure 5: Dependency enforcement embedding. Dotted lines denoted dependencies.
67
+
68
+ # 4 DYNAMIC PROGRAM EMBEDDINGS
69
+
70
+ We now formally define the three program embedding models.
71
+
72
+ # 4.1 VARIABLE TRACE MODEL
73
+
74
+ Given a program $P$ , and its variable set $V \left( v _ { 0 } , v _ { 1 } , . . . , v _ { n } \in V \right)$ , a variable trace is a sequence of values a variable has been assigned during the execution of $P$ .4 Let $x _ { t _ { - } v _ { n } }$ denote the value from the variable trace of $v _ { n }$ that is fed to the RNN encoder (Gated Recurrent Unit) at time $t$ as the input, and $h _ { t _ { - } v _ { n } }$ as the resulting RNN’s hidden state. We compute the variable trace embedding for $P$ in Equation (3) as follows $( h _ { T _ { - } v _ { n } }$ denotes the last hidden state of the encoder):
75
+
76
+ $$
77
+ { \begin{array} { r l r l } { h _ { t . v _ { 1 } } = \operatorname { G R U } ( h _ { t - 1 . v _ { 1 } } , x _ { t . v _ { 1 } } ) \qquad } & { ( 1 ) \qquad } & & { } \\ & { \qquad \cdots \qquad } & & { } \\ { h _ { t . v _ { n } } = \operatorname { G R U } ( h _ { t - 1 . v _ { n } } , x _ { t . v _ { n } } ) \qquad } & { ( 2 ) \qquad } & & { \operatorname { E v i d e n c e } = ( \operatorname { W } h _ { P } + b ) } \\ & { h _ { P } = \operatorname { M a x P o o l i n g } ( h _ { T . v _ { 1 } } , \ldots , h _ { T . v _ { n } } ) } & { ( 3 ) \qquad } & & { \operatorname { Y } = \operatorname { s o f t m a x } ( \operatorname { E v i d e n c e } ) } \end{array} }
78
+ $$
79
+
80
+ We compute the representation of the program trace by performing max pooling over the last hidden state representation of each variable trace embedding. The hidden states $h _ { t _ { - } v _ { 1 } }$ , . . . , $h _ { t . v _ { n } } , h _ { P } \in \mathbb { R } ^ { k }$ where $k$ denotes the size of hidden layers of the RNN encoder. Evidence denotes the output of a linear model through the program embedding vector $h _ { P }$ , and we obtain the predicted error pattern class $Y$ by using a softmax operation.
81
+
82
+ # 4.2 STATE TRACE MODEL
83
+
84
+ The key idea in state trace model is to embed each program state as a numerical vector first and then feed all program state embeddings as a sequence to another RNN encoder to obtain the program embedding. Suppose $x _ { t _ { - } v _ { n } }$ is the value of variable $v _ { n }$ at $t$ -th program state, and $h _ { t _ { - } v _ { n } }$ is the resulting hidden state of the program state encoder. Equation (8) computes the $t { \cdot }$ -th program state embedding. Equations (9-11) encode the sequence of all program state embeddings (i.e., $h _ { t _ { - } v _ { n } }$ , $h _ { t + 1 - v _ { n } }$ , . . . , $h _ { t + m _ { - } v _ { n } } )$ with another RNN to compute the program embedding.
85
+
86
+ $$
87
+ \begin{array} { r l } & { h _ { t _ { - } v _ { 1 } } = \mathrm { G R U } ( h _ { t _ { - } v _ { 0 } } , x _ { t _ { - } v _ { 1 } } ) } \\ & { h _ { t _ { - } v _ { 2 } } = \mathrm { G R U } ( h _ { t _ { - } v _ { 1 } } , x _ { t _ { - } v _ { 2 } } ) } \\ & { \qquad \cdots } \\ & { h _ { t _ { - } v _ { n } } = \mathrm { G R U } ( h _ { t _ { - } v _ { n - 1 } } , x _ { t _ { - } v _ { n } } ) } \end{array}
88
+ $$
89
+
90
+ $$
91
+ \begin{array} { r l } & { ~ h _ { t _ { - } v _ { n } } ^ { \prime } = \mathrm { { G R U } } ( h _ { t - 1 . v _ { n } } ^ { \prime } , h _ { t . v _ { n } } ) } \\ & { h _ { t + 1 . v _ { n } } ^ { \prime } = { \mathrm { G R U } } ( h _ { t . v _ { n } } ^ { \prime } , h _ { t + 1 . v _ { n } } ) } \\ & { ~ \cdots } \\ & { ~ h _ { P } = \mathrm { { G R U } } ( h _ { t + m - 1 . v _ { n } } ^ { \prime } , x _ { t + m . v _ { n } } ) } \end{array}
92
+ $$
93
+
94
+ $h _ { t _ { - } v _ { 1 } }$ , . . . , $h _ { t _ { - } v _ { n } } \in \mathbb { R } ^ { k _ { 1 } }$ ; $h _ { t _ { - } v _ { n } } ^ { \prime }$ , . . . , $\boldsymbol { h } _ { P } \in \mathbb { R } ^ { k _ { 2 } }$ where $k _ { 1 }$ and $k _ { 2 }$ denote, respectively, the sizes of hidden layers of the first and second RNN encoders.
95
+
96
+ # 4.3 DEPENDENCY ENFORCEMENT FOR VARIABLE TRACE EMBEDDING
97
+
98
+ The motivation behind this model is to combine the advantages of the previous two approaches, i.e. representing the execution trace compactly while enforcing the dependency relationship among variables as much as possible. In this model, each variable trace is handled with a different RNN. A potential issue to be addressed is variable matching/renaming (i.e., $\alpha$ -renaming). In other words same variables may be named differently in different programs. Processing each variable id with a single RNN among all programs in the dataset will not only cause memory issues, but more importantly the loss of precision. Our solution is to (1) execute all programs to collect traces for all variables, (2) perform dynamic time wrapping (Vintsyuk, 1968) on the variable traces across all programs to find the top- $\mathbf { \nabla } \cdot n$ most used variables that account for the vast majority of variable usage, and (3) rename the top- $^ n$ most used variables consistently across all programs, and rename all other variables to a same special variable.
99
+
100
+ Given the same set of variables among all programs, the mechanism of dependency enforcement on the top ones is to fuse the hidden states of multiple RNNs based on how a new value of a variable is produced. For example, in Figure 2 at line 8, the new value of max val is data-dependent on item, and control-dependent on both item and itself. So at the time step when the new value of max val is produced, the latest hidden states of the RNNs encode variable item as well as itself; they together determine the previous state of the RNN upon which the new value of max val is produced. If a value is produced without any dependencies, this mechanism will not take effect. In other words, the RNN will act normally to handle data sequences on its own. In this work we enforce the data-dependency in assignment statement, declaration statement and method calls; and control-dependency in control statements such as $i f$ , for and while statements. Equations (11 and 12) expose the inner workflow. $h _ { L T _ { - } v _ { m } }$ denotes the latest hidden state of the RNN encoding variable trace of $v _ { m }$ up to the point of time $t$ when $x _ { t _ { - } v _ { n } }$ is the input of the RNN encoding variable trace of $v _ { n }$ . $\odot$ denotes element-wise matrix product.
101
+
102
+ $$
103
+ \begin{array} { r l } { h _ { t - 1 . v _ { n } } = h _ { L T . v _ { 1 } } \odot h _ { L T . v _ { m } } \odot h _ { L T . v _ { n } } \quad } & { \mathrm { G i v e n ~ } v _ { n } \mathrm { ~ d e p e n d s ~ o n ~ } v _ { 1 } \mathrm { ~ a n d ~ } v _ { m } } \\ { h _ { t . v _ { n } } = \mathrm { G R U } ( h _ { t - 1 . v _ { n } } , x _ { t . v _ { n } } ) \qquad ( 1 2 ) \quad } & { h _ { P } = \mathrm { A v e r a g e P o o l i n g } ( h _ { T . v _ { 1 } } , . . . , h _ { T . v _ { n } } ) } \end{array}
104
+ $$
105
+
106
+ # 5 EVALUATION
107
+
108
+ We train our dynamic program embeddings on the programming submissions obtained from Assignment 2 from Microsoft-DEV204.1X: “Introduction to C#” offered on edx and two other problems on Microsoft CodeHunt platform.
109
+
110
+ • Print Chessboard: Print the chessboard pattern using “X” and “O” to represent the squares as shown in Figure 6.
111
+ • Count Parentheses: Count the depth of nesting parentheses in a given string.
112
+ • Generate Binary Digits: Generate the string of binary digits for a given integer.
113
+
114
+ ![](images/e8e5b5be77e765a68edd6ef0523a822ab573b2042ca1c3ac4ad0a0ac08cc9936.jpg)
115
+ Figure 6: The desired output for the chessboard exercise.
116
+
117
+ Regarding the three programming problems, the errors students made in their submissions can be roughly classified into low-level technical issues (e.g., list indexing, branching conditions or looping bounds) and high-level conceptual issues (e.g., mishandling corner case, misunderstanding problem requirement or misconceptions on the underlying data structure of test inputs).5
118
+
119
+ In order to have sufficient data for training our models to predict the error patterns, we (1) convert each incorrect program into multiple programs such that each new program will have only one error, and (2) mutate all the correct programs to generate synthetic incorrect programs such that they exhibit similar errors that students made in real program submissions. These two steps allow us to set up a dataset depicted in Table 2. Based on the same set of training data, we evaluate the dynamic embeddings trained with the three network models and compare them with the syntax-based program embeddings (on the same error prediction task) on the same testing data. The syntax-based models include (1) one trained with a RNN that encodes the run-time syntactic traces of programs (Reed & De Freitas, 2015); (2) another trained with a RNN that encodes token sequences of programs; and (3) the third trained with a RNN on abstract syntax trees of programs (Socher et al., 2013).
120
+
121
+ Table 2: Dataset for experimental evaluation.
122
+
123
+ <table><tr><td rowspan=2 colspan=1>Problem</td><td rowspan=1 colspan=2>Program Submissions</td><td rowspan=1 colspan=3>Synthetic Data</td></tr><tr><td rowspan=1 colspan=1>Correct</td><td rowspan=1 colspan=1>Incorrect</td><td rowspan=1 colspan=1>Training</td><td rowspan=1 colspan=1>Validation</td><td rowspan=1 colspan=1>Testing</td></tr><tr><td rowspan=1 colspan=1>Print Chessboard</td><td rowspan=1 colspan=1>2,281</td><td rowspan=1 colspan=1>742</td><td rowspan=1 colspan=1>120K</td><td rowspan=1 colspan=1>13K</td><td rowspan=1 colspan=1>15K</td></tr><tr><td rowspan=1 colspan=1>Count Parentheses</td><td rowspan=1 colspan=1>505</td><td rowspan=1 colspan=1>315</td><td rowspan=1 colspan=1>20K</td><td rowspan=1 colspan=1>2K</td><td rowspan=1 colspan=1>2K</td></tr><tr><td rowspan=1 colspan=1>GenerateBinary Digits</td><td rowspan=1 colspan=1>518</td><td rowspan=1 colspan=1>371</td><td rowspan=1 colspan=1>22K</td><td rowspan=1 colspan=1>3K</td><td rowspan=1 colspan=1>2K</td></tr></table>
124
+
125
+ All models are implemented in TensorFlow. All encoders in each of the trace model have two stacked GRU layers with 200 hidden units in each layer except that the state encoder in the state trace model has one single layer of 100 hidden units. We adopt random initialization for weight initialization. Our vocabulary has 5,568 unique tokens (i.e., the values of all variables at each time step), each of which is embedded into a 100-dimensional vector. All networks are trained using the Adam optimizer (Kingma & Ba, 2014) with the learning and the decay rates set to their default values (learning rate $= 0 . 0 0 0 1$ , beta1 $= 0 . 9$ , bet $1 2 = 0 . 9 9 9$ ) and a mini-batch size of 500. For the variable trace and dependency enforcement models, each trace is padded to have the same length across each batch; for the state trace model, both the number of variables in each program state as well as the length of the entire state trace are padded.
126
+
127
+ During the training of the dependency enforcement model, we have observed that when dependencies become complex, the network suffers from optimization issues, such as diminishing and exploding gradients. This is likely due to the complex nature of fusing hidden states among RNNs, echoing the errors back and forth through the network. We resolve this issue by truncating each trace into multiple sub-sequences and only back-propagate on the last sub-sequence while only feedforwarding on the rest. Regarding the baseline network trained on syntactic traces/token sequences, we use the same encoder architecture (i.e., two layer GRU of 200 hidden units) processing the same 100-dimension embedding vector for each statement/token. As for the AST model, we learn an embedding (100-dimension) for each type of the syntax node by propagating the leaf (a simple look up) to the root through the learned production rules. Finally, we use the root embeddings to represent programs.
128
+
129
+ <table><tr><td>Programming Problem</td><td>Variable Trace</td><td> State Trace</td><td>Dependency Enforcement</td><td>Run-Time Syntactic Trace</td><td>Token</td><td>AST</td></tr><tr><td>Print Chessboard</td><td>93.9%</td><td>95.3%</td><td>99.3%</td><td>26.3%</td><td>16.8%</td><td>16.2%</td></tr><tr><td>Count Parentheses</td><td>92.7%</td><td>93.8%</td><td>98.8%</td><td>25.5%</td><td>19.3%</td><td>21.7%</td></tr><tr><td>Generate Binary Digits</td><td>92.1%</td><td>94.5%</td><td>99.2%</td><td>23.8%</td><td>21.2%</td><td>20.9%</td></tr></table>
130
+
131
+ Table 3: Comparing dynamic program embeddings with syntax-based program embedding in predicting common error patterns made by students.
132
+
133
+ As shown in Table 3, our embeddings trained on execution traces significantly outperform those trained on program syntax (greater than $9 2 \%$ accuracy compared to less than $2 7 \%$ for syntax-based embeddings). We conjecture this is because of the fact that minor syntactic discrepancies can lead to major semantic differences as shown in Figure 1. In our dataset, there are a large number of programs with distinct labels that differ by only a few number of tokens or AST nodes, which causes difficulty for the syntax models to generalize. Even for the simpler syntax-level errors, they are buried in large number of other syntactic variations and the size of the training dataset is relatively small for the syntax-based models to learn precise patterns. In contrast, dynamic embeddings are able to canonicalize the syntactical variations and pinpoint the underlying semantic differences, which results in the trace-based models learning the correct error patterns more effectively even with relatively smaller size of the training data.
134
+
135
+ In addition, we incorporated our dynamic program embeddings into SARFGEN (Wang et al., 2017) — a program repair system — to demonstrate their benefit in producing fixes to correct students errors in programming assignments. Given a set of potential repair candidates, SARFGEN uses an enumerative search-based technique to find minimal changes to an incorrect program. We use the dynamic embeddings to learn a distribution over the corrections to prioritize the search for the repair algorithm.6 To establish the baseline, we obtain the set of all corrections from SARFGEN for each of the real incorrect program to all three problems and enumerate each subset until we find the minimum fixes. On the contrary, we also run another experiment where we prioritize each correction according to the prediction of errors with the dynamic embeddings. It is worth mentioning that one incorrect program may be caused by multiple errors. Therefore, we only predict the top-1 error each time and repair the program with the corresponding corrections. If the program is still incorrect, we repeat this procedure till the program is fixed. The comparison between the two approaches is based on how long it takes them to repair the programs.
136
+
137
+ <table><tr><td>Number of Fixes</td><td>Enumerative Search</td><td>Variable Trace Embeddings</td><td>State Trace Embeddings</td><td>Dependency Enforcement Embeddings</td></tr><tr><td>1-2</td><td>3.8</td><td>2.5</td><td>2.8</td><td>3.3</td></tr><tr><td>3-5</td><td>44.7</td><td>3.6</td><td>3.1</td><td>4.1</td></tr><tr><td>6-7</td><td>95.9</td><td>4.2</td><td>3.6</td><td>4.5</td></tr><tr><td>≥8</td><td>128.3</td><td>41.6</td><td>49.5</td><td>38.8</td></tr></table>
138
+
139
+ Table 4: Comparing the enumerative search with those guided by dynamic program embeddings in finding the minimum fixes. Time is measured in seconds.
140
+
141
+ As shown in Table 4, the more fixes required, the more speedups dynamic program embeddings yield — more than an order of magnitude speedups when the number of fixes is four or greater. When the number of fixes is greater than seven, the performance gain drops significantly due to poor prediction accuracy for programs with too many errors. In other words, our dynamic embeddings are not viewed by the network as capturing incorrect execution traces, but rather new execution traces. Therefore, the predictions become unreliable. Note that we ignored incorrect programs having greater than 10 errors when most experiments run out of memory for the baseline approach.
142
+
143
+ # 6 RELATED WORK
144
+
145
+ There has been significant recent interest in learning neural program representations for various applications, such as program induction and synthesis, program repair, and program completion. Specifically for neural program repair techniques, none of the existing techniques, such as DeepFix (Gupta et al., 2017), SynFix (Bhatia & Singh, 2016) and sk p $\mathrm { P u }$ et al., 2016), have considered dynamic embeddings proposed in this paper. In fact, dynamic embeddings can be naturally extended to be a new feature dimension for these existing neural program repair techniques.
146
+
147
+ Piech et al. (2015) is a notable recent effort targeting program representation. Piech et al. explore the possibility of using input-output pairs to represent a program. Despite their new perspective, the direct mapping between input and output of programs usually are not precise enough, i.e., the same input-output pair may correspond to two completely different programs, such as the two sorting algorithms in Figure 1. As we often observe in our own dataset, programs with the same error patterns can also result in different input-output pairs. Their approach is clearly ineffective for these scenarios.
148
+
149
+ Reed & De Freitas (2015) introduced the novel approach of using execution traces to induce and execute algorithms, such as addition and sorting, from very few examples. The differences from our work are (1) they use a sequence of instructions to represent dynamic execution trace as opposed to using dynamic program states; (2) their goal is to synthesize a neural controller to execute a program as a sequence of actions rather than learning a semantic program representation; and (3) they deal with programs in a language with low-level primitives such as function stack push/pop actions rather than a high-level programming language.
150
+
151
+ As for learning representations, there are several related efforts in modeling semantics in sentence or symbolic expressions (Socher et al., 2013; Zaremba et al., 2014; Bowman, 2013). These approaches are similar to our work in spirit, but target different domains than programs.
152
+
153
+ # 7 CONCLUSION
154
+
155
+ We have presented a new program embedding that learns program representations from runtime execution traces. We have used the new embeddings to predict error patterns that students make in their online programming submissions. Our evaluation shows that the dynamic program embeddings significantly outperform those learned via program syntax. We also demonstrate, via an additional application, that our dynamic program embeddings yield more than 10x speedups compared to an enumerative baseline for search-based program repair. Beyond neural program repair, we believe that our dynamic program embeddings can be fruitfully utilized for many other neural program analysis tasks such as program induction and synthesis.
156
+
157
+ # REFERENCES
158
+
159
+ Thoms Ball. The concept of dynamic analysis. In Proceedings of the 7th European Software Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 216–234, 1999.
160
+
161
+ Sahil Bhatia and Rishabh Singh. Automated correction for syntax errors in programming assignments using recurrent neural networks. CoRR, abs/1603.06129, 2016.
162
+
163
+ Samuel R Bowman. Can recursive neural tensor networks learn logical reasoning? arXiv preprint arXiv:1312.6192, 2013.
164
+
165
+ Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel rahman Mohamed, and Pushmeet Kohli. RobustFill: Neural program learning under noisy I/O. In Proceedings of the 34th International Conference on Machine Learning, pp. 990–998, 2017.
166
+
167
+ Rahul Gupta, Soham Pal, Aditya Kanade, and Shirish K. Shevade. Deepfix: Fixing common c language errors by deep learning. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, 2017.
168
+
169
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
170
+
171
+ Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. Convolutional neural networks over tree structures for programming language processing. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, 2016.
172
+
173
+ Flemming Nielson, Hanne R. Nielson, and Chris Hankin. Principles of Program Analysis. 1999.
174
+
175
+ Chris Piech, Jonathan Huang, Andy Nguyen, Mike Phulsuksombati, Mehran Sahami, and Leonidas Guibas. Learning program embeddings to propagate feedback on student code. In Proceedings of the 32nd International Conference on Machine Learning, pp. 1093–1102, 2015.
176
+
177
+ Yewen Pu, Karthik Narasimhan, Armando Solar-Lezama, and Regina Barzilay. Sk p: A neural program corrector for moocs. In Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity, SPLASH Companion 2016, pp. 39–40, 2016.
178
+
179
+ Scott Reed and Nando De Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015.
180
+
181
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
182
+
183
+ Taras K Vintsyuk. Speech discrimination by dynamic programming. Cybernetics, 4(1):52–57, 1968.
184
+
185
+ Ke Wang, Rishabh Singh, and Zhendong Su. Data-driven feedback generation for introductory programming exercises. CoRR, abs/1711.07148, 2017. URL http://arxiv.org/abs/ 1711.07148.
186
+
187
+ Wojciech Zaremba, Karol Kurach, and Rob Fergus. Learning to discover efficient mathematical identities. In Advances in Neural Information Processing Systems, pp. 1278–1286, 2014.
188
+
189
+ # APPENDIX
190
+
191
+ # ERROR PATTERNS
192
+
193
+ Print Chessboard:
194
+
195
+ • Misprinting “O” to “0” or printing lower case instead of upper case characters.
196
+ • Switching across rows are supposed to be the other way around ( i.e. printing OXOXOXOX for odd number rows and XOXOXOXO for even number rows).
197
+ • Printing the first row correctly but failed to make a switch across rows.
198
+ • Printing the entire chessboard as “X” or “O” only.
199
+ • Printing the chessboard correctly but with extra unnecessary characters.
200
+ • Printing the incorrect number of rows.
201
+ • Printing the incorrect number of columns.
202
+ • Printing the characters correctly but in wrong format (i.e. not correctly seperated with the spaces to form the rows).
203
+ • Others.
204
+
205
+ Count Parentheses:
206
+
207
+ • Miss the corner case of empty strings.
208
+ • Mistakenly consider the parenthesis to be symbols rather than “(” or “)”.
209
+ • Mishandling the string of unmatched parentheses.
210
+ • Counting the number of matching parentheses rather then depth.
211
+ • Incorrectly assume nested parentheses are always present.
212
+ • Miscounting the characters which should have been ignored.
213
+ • Others.
214
+
215
+ Generate Binary Digits:
216
+
217
+ • Miss the corner case of integer 0.
218
+ • Misunderstand the binary digits to be underlying bytes of a string.
219
+ • Mistakes in arithmetic calculation regrading shift operations.
220
+ • Adding the binary digits rather than concatenating them to a string.
221
+ • Miss the one on the most significant bit.
222
+ • Others.
223
+
224
+ # Algorithm 1: SARFGEN ’s feedback generation procedure.
225
+
226
+ /\* P: an incorrect program; $P _ { s }$ : all correct solutions function FixGeneration $( P , P _ { s }$ )
227
+
228
+ 2 begin // Among $P _ { s }$ identify $P _ { c s }$ to be reference programs to fix $P$
229
+ 3 $P _ { c s } $ CandidatesIdentification $( P , P _ { s } )$ // Initialize the minimum number of fixes $k$ to be inifinity
230
+ 4 $k \infty$ // Initialize the minimum set of fixes ${ \mathcal { F } } ( P )$
231
+ 5 $\mathcal { F } ( P ) \mathrm { n u l l }$
232
+ 6 for $P _ { c } \in P _ { c s }$ do // Generates the syntactic discrepencies w.r.t. each $P _ { c }$
233
+ 7 $\mathcal { C } ( P , P _ { c } ) \gets$ DiscrepenciesGeneration $( P , P _ { s } )$ // Selecting subsets of $\mathcal { C } ( P , P _ { c } )$ from size of one itll $| \mathcal { C } ( P , P _ { c } ) |$
234
+ 8 for $n \in [ 1 , 2 , . . . , | \mathcal { C } ( P , P _ { c } ) | ]$ do
235
+ 9 $\mathcal { C } _ { s u b s } ( P , P _ { c } ) \gets \{ x \ : | \ : x \subseteq \mathcal { C } ( P , P _ { c } ) \land | x | = n \}$ // Attemp each subset of $\mathcal { C } ( P , P _ { c } )$
236
+ 10 for $\mathcal { C } _ { s u b } ( P , P _ { c } ) \in \mathcal { C } _ { s u b s } ( P , P _ { c } ) \mathbf { d }$ o
237
+ 11 $P ^ { \prime } \gets$ PatchApplication( $P$ , $\dot { \mathcal { C } } _ { s u b } ( P , P _ { c } ) )$ ) // Update $k$ if necessary
238
+ 12 if isCorrect $P ^ { \prime }$ ) then
239
+ 13 if $| P ^ { \prime } | < k$ then
240
+ 14 $k | P ^ { \prime } |$
241
+ 15 F (P ) ← P 0
242
+ 16 return F(P )
243
+
244
+ # Algorithm 2: Incorporate pre-trained model to SARFGEN ’s feedback generation procedure.
245
+
246
+ /\* P, $P _ { s }$ : same as above; $\mathcal { M }$ : learned Model
247
+
248
+ cti , ) 2 begin Among $P _ { s }$ identify $P _ { c s }$ to be reference programs to fix $P$ 3 $P _ { c s } $ CandidatesIdentification $( P , P _ { s } )$ // Initialize the minimum number of fixes $k$ to be inifinity 4 $k \infty$ // Initialize the minimum set of fixes ${ \mathcal { F } } ( P )$ 5 $\mathcal { F } ( P ) \mathrm { n u l l }$ 6 for $P _ { c } \in P _ { c s }$ do // Generates the syntactic discrepencies w.r.t. each $P _ { c }$ 7 $\mathcal { C } ( P , P _ { c } ) \gets$ DiscrepenciesGeneration $( P , P _ { s } )$ // Executing $P$ to extract the dynamic execution trace 8 $\mathcal { T } ( P ) $ DynamicTraceExtraction $( P )$ // Prioritizing subsets of $\mathcal { C } ( P , P _ { c } )$ through pre-trained model 9 $\mathcal { C } _ { s u b s } ( P , P _ { c } ) \gets$ Prioritization $( \mathcal { C } ( P , P _ { c } )$ , T (P ), M) 10 for $\mathcal { C } _ { s u b } ( P , P _ { c } ) \in \mathcal { C } _ { s u b s } ( P , P _ { c } )$ do 11 $P ^ { \prime } \gets$ PatchApplication( $P$ , $\dot { C } _ { s u b } ( P , P _ { c } ) ,$ ) 12 if isCorrect $P ^ { \prime } )$ then 13 if $| P ^ { \prime } | < k$ then 14 $k | P ^ { \prime } |$ 15 F (P ) ← P 0 16 return F(P )
parse/train/BJuWrGW0Z/BJuWrGW0Z_content_list.json ADDED
@@ -0,0 +1,1189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DYNAMIC NEURAL PROGRAM EMBEDDINGS FOR PRO-GRAM REPAIR",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 145
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Ke Wang∗ University of California Davis, CA 95616, USA kbwang@ucdavis.edu ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 362,
21
+ 226
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Rishabh Singh Microsoft Research Redmond, WA 98052, USA risin@microsoft.com ",
28
+ "bbox": [
29
+ 401,
30
+ 170,
31
+ 591,
32
+ 226
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Zhendong Su University of California Davis, CA 95616, USA su@ucdavis.edu ",
39
+ "bbox": [
40
+ 632,
41
+ 170,
42
+ 790,
43
+ 226
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 262,
54
+ 544,
55
+ 277
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Neural program embeddings have shown much promise recently for a variety of program analysis tasks, including program synthesis, program repair, codecompletion, and fault localization. However, most existing program embeddings are based on syntactic features of programs, such as token sequences or abstract syntax trees. Unlike images and text, a program has well-defined semantics that can be difficult to capture by only considering its syntax (i.e. syntactically similar programs can exhibit vastly different run-time behavior), which makes syntaxbased program embeddings fundamentally limited. We propose a novel semantic program embedding that is learned from program execution traces. Our key insight is that program states expressed as sequential tuples of live variable values not only capture program semantics more precisely, but also offer a more natural fit for Recurrent Neural Networks to model. We evaluate different syntactic and semantic program embeddings on the task of classifying the types of errors that students make in their submissions to an introductory programming class and on the CodeHunt education platform. Our evaluation results show that the semantic program embeddings significantly outperform the syntactic program embeddings based on token sequences and abstract syntax trees. In addition, we augment a search-based program repair system with predictions made from our semantic embedding and demonstrate significantly improved search efficiency. ",
62
+ "bbox": [
63
+ 233,
64
+ 294,
65
+ 764,
66
+ 558
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 584,
77
+ 336,
78
+ 601
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Recent breakthroughs in deep learning techniques for computer vision and natural language processing have led to a growing interest in their applications in programming languages and software engineering. Several well-explored areas include program classification, similarity detection, program repair, and program synthesis. One of the key steps in using neural networks for such tasks is to design suitable program representations for the networks to exploit. Most existing approaches in the neural program analysis literature have used syntax-based program representations. Mou et al. (2016) proposed a convolutional neural network over abstract syntax trees (ASTs) as the program representation to classify programs based on their functionalities and detecting different sorting routines. DeepFix (Gupta et al., 2017), SynFix (Bhatia & Singh, 2016), and sk p (Pu et al., 2016) are recent neural program repair techniques for correcting errors in student programs for MOOC assignments, and they all represent programs as sequences of tokens. Even program synthesis techniques that generate programs as output, such as RobustFill (Devlin et al., 2017), also adopt a token-based program representation for the output decoder. The only exception is Piech et al. (2015), which introduces a novel perspective of representing programs using input-output pairs. However, such representations are too coarse-grained to accurately capture program properties — programs with the same input-output behavior may have very different syntactic characteristics. Consequently, the embeddings learned from input-output pairs are not precise enough for many program analysis tasks. ",
85
+ "bbox": [
86
+ 174,
87
+ 616,
88
+ 825,
89
+ 852
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Although these pioneering efforts have made significant contributions to bridge the gap between deep learning techniques and program analysis tasks, syntax-based program representations are fundamentally limited due to the enormous gap between program syntax (i.e. static expression) and semantics (i.e. dynamic execution). This gap can be illustrated as follows. First, when a program is executed at runtime, its statements are almost never interpreted in the order in which the corresponding token sequence is presented to the deep learning models (the only exception being straightline programs, i.e., ones without any control-flow statements). For example, a conditional statement only executes one branch each time, but its token sequence is expressed sequentially as multiple branches. Similarly, when iterating over a looping structure at runtime, it is unclear in which order any two tokens are executed when considering different loop iterations. Second, program dependency (i.e. data and control) is not exploited in token sequences and ASTs despite its essential role in defining program semantics. Figure 2 shows an example using a simple max function. On line 8, the assignment statement means variable max val is data-dependent on item. In addition, the execution of this statement depends on the evaluation of the $i f$ condition on line 7, i.e., max val is also control-dependent on item as well as itself. Third, from a pure program analysis standpoint, the gap between program syntax and semantics is manifested in that similar program syntax may lead to vastly different program semantics. For example, consider the two sorting functions shown in Figure 1. Both functions sort the array via two nested loops, compare the current element to its successor, and swap them if the order is incorrect. However, the two functions implement different algorithms, namely Bubble Sort and Insertion Sort. Therefore minor syntactic discrepancies can lead to significant semantic differences. This intrinsic weakness will be inherited by any deep learning technique that adopts a syntax-based program representation. ",
96
+ "bbox": [
97
+ 176,
98
+ 859,
99
+ 823,
100
+ 901
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/6e7abaef6dc3da7842d01ee4e495ebf657bf8fb652e9212216cf6c8140db100a.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Bubble sort and insertion sort (code highlighted in shadow box are the only syntactic differences between the two algorithms). Their execution traces for the input vector $A = [ 8 , 5 , 1 , 4$ , 3]are displayed on the right, where, for brevity, only values for variable A are shown. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 181,
113
+ 107,
114
+ 828,
115
+ 340
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "image",
121
+ "img_path": "images/633cb15c19ade14e79fb0804e1c786280d65d55b626b5d13271e48f69e341277.jpg",
122
+ "image_caption": [
123
+ "Figure 2: Example for illustrating program dependency. "
124
+ ],
125
+ "image_footnote": [],
126
+ "bbox": [
127
+ 179,
128
+ 428,
129
+ 428,
130
+ 578
131
+ ],
132
+ "page_idx": 1
133
+ },
134
+ {
135
+ "type": "table",
136
+ "img_path": "images/d4021434e2c24703f20725f950ae5883a7e3ecb857eef09f006574a5914a8964.jpg",
137
+ "table_caption": [
138
+ "Table 1: Variable and state traces obtained by executing function max, given a $\\operatorname { \\mathrm { { r } } } = [ 1 , 5 , 3 ]$ . "
139
+ ],
140
+ "table_footnote": [],
141
+ "table_body": "<table><tr><td>VariableTrace</td><td>State Trace</td></tr><tr><td></td><td>{max_val : -oo} {max_val : -o,item :⊥}</td></tr><tr><td>{item : 1}</td><td>{max_val : -o,item : 1}</td></tr><tr><td>{max_val : 1}</td><td>{max_val :1, item : 1}</td></tr><tr><td>{item : 5}</td><td>{max_val :1,item:5}</td></tr><tr><td>{max_val : 5}</td><td>{max_val : 5,item : 5}</td></tr><tr><td>{item : 3}</td><td>{max_val : 5,item : 3}</td></tr></table>",
142
+ "bbox": [
143
+ 493,
144
+ 426,
145
+ 820,
146
+ 583
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "",
153
+ "bbox": [
154
+ 173,
155
+ 660,
156
+ 825,
157
+ 924
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "To tackle this aforementioned fundamental challenge, this paper proposes a novel semantic program embedding that is learned from the program’s runtime behavior, i.e. dynamic program execution traces. We execute a program on a set of test cases and monitor/record the program states comprising of variable valuations. We introduce three approaches to embed these dynamic executions: (1) variable trace embedding — consider each variable independently, (2) state trace embedding — consider sequences of program states, each of which comprises of a set of variable values, and (3) hybrid embedding — incorporate dependencies into individual variable sequences to avoid redundant variable values in program states. ",
164
+ "bbox": [
165
+ 173,
166
+ 103,
167
+ 825,
168
+ 215
169
+ ],
170
+ "page_idx": 2
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Our novel program embeddings address the aforementioned issues with the syntactic program representations. The dynamic program execution traces precisely illustrate the program behaves at runtime, and the values for each variable at each program point precisely models the program semantics. Regarding program dependencies, the dynamic execution traces, expressed as a sequential list of tuples (each of which represents the value of a variable at a certain program point), provides an opportunity for Recurrent Neural Network (RNN) to establish the data dependency and control dependency in the program. By monitoring particular value patterns between interacting variables, the RNN is able to model their relationship, leading to more precise semantic representations. ",
175
+ "bbox": [
176
+ 173,
177
+ 222,
178
+ 825,
179
+ 333
180
+ ],
181
+ "page_idx": 2
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Reed & De Freitas (2015) recently proposed using program traces (as a sequence of actions/statements) for training a neural network to learn to execute an algorithm such as addition or sorting. Their notion of program traces is different from our dynamic execution traces consisting of program states with variable valuations. Our notion offers the following advantages: (1) a sequence of program states can be viewed as a sequence of input-output pairs of each executed statement, in other words, sequences of program states provide more robust information than that from sequences of executed statements, and (2) although a sequence of executed statements follows dynamic execution, it is still represented syntactically, and therefore may not adequately capture program semantics. For example, consider the two sorting algorithms in Figure 1. According to Reed & De Freitas (2015), they will have an identical representation $w . r . t .$ statements that modify the variable A, i.e. a repetition of $A [ j ] = A [ j + 1 ]$ and $A [ j + 1 ] = t m p$ for eight times. Our representation, on the other hand, can capture their semantic differences in terms of program states by also only considering the valuation of the variable A. ",
186
+ "bbox": [
187
+ 173,
188
+ 340,
189
+ 825,
190
+ 520
191
+ ],
192
+ "page_idx": 2
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "We have evaluated our dynamic program embeddings in the context of automated program repair. In particular, we use the program embeddings to classify the type of mistakes students made to their programming assignments based on a set of common error patterns (described in the appendix). The dataset for the experiments consists of the programming submissions made to Module 2 assignment in Microsoft-DEV204.1X and two additional problems from the Microsoft CodeHunt platform. The results show that our dynamic embeddings significantly outperform syntax-based program embeddings, including those trained on token sequences and abstract syntax trees. In addition, we show that our dynamic embeddings can be leveraged to significantly improve the efficiency of a searchbased program corrector SARFGEN1 (Wang et al., 2017) (the algorithm is presented in the appendix). More importantly, we believe that our dynamic program embeddings can be useful for many other program analysis tasks, such as program synthesis, fault localization, and similarity detection. ",
197
+ "bbox": [
198
+ 174,
199
+ 527,
200
+ 825,
201
+ 680
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "To summarize, the main contributions of this paper are: (1) we show the fundamental limitation of representing programs using syntax-level features; (2) we propose dynamic program embeddings learned from runtime execution traces to overcome key issues with syntactic program representations; (3) we evaluate our dynamic program embeddings for predicting common mistake patterns students make in program assignments, and results show that the dynamic program embeddings outperform state-of-the-art syntactic program embeddings; and (4) we show how the dynamic program embeddings can be utilized to improve an existing production program repair system. ",
208
+ "bbox": [
209
+ 174,
210
+ 688,
211
+ 825,
212
+ 785
213
+ ],
214
+ "page_idx": 2
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "2 BACKGROUND: DYNAMIC PROGRAM ANALYSIS ",
219
+ "text_level": 1,
220
+ "bbox": [
221
+ 174,
222
+ 805,
223
+ 602,
224
+ 821
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "This section briefly reviews dynamic program analysis (Ball, 1999), an influential program analysis technique that lays the foundation for constructing our new program embeddings. ",
231
+ "bbox": [
232
+ 176,
233
+ 835,
234
+ 821,
235
+ 864
236
+ ],
237
+ "page_idx": 2
238
+ },
239
+ {
240
+ "type": "text",
241
+ "text": "Unlike static analysis (Nielson et al., 1999), i.e., the analysis of program source code, dynamic analysis focuses on program executions. An execution is modeled by a set of atomic actions, or events, organized as a trace (or event history). For simplicity, this paper considers sequential executions only (as opposed to parallel executions) which lead to a single sequence of events, specifically, the executions of statements in the program. Detailed information about executions is often not readily available, and separate mechanisms are needed to capture the tracing information. An often adopted approach is to instrument a program’s source code (i.e., by adding additional monitoring code) to record the execution of statements of interest. In particular, those inserted instrumentation statements act as a monitoring window through which the values of variables are inspected. This instrumentation process can occur in a fully automated manner, e.g., a common approach is to traverse a program’s abstract syntax tree and insert “write” statements right after each program statement that causes a side-effect (i.e., changing the values of some variables). ",
242
+ "bbox": [
243
+ 176,
244
+ 871,
245
+ 821,
246
+ 900
247
+ ],
248
+ "page_idx": 2
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "",
253
+ "bbox": [
254
+ 173,
255
+ 103,
256
+ 825,
257
+ 242
258
+ ],
259
+ "page_idx": 3
260
+ },
261
+ {
262
+ "type": "text",
263
+ "text": "Consider the two sorting algorithms depicted in Figure 1. If we assume $A$ to be the only variable of interest and subject to monitoring, we can instrument the two algorithms with Console.WriteLine(A) after each program location in the code whenever $A$ is modified2 (i.e. the lines marked by comments). Given the input vector $A = [ 8 , 5 , 1 , 4 , 3 ]$ , the execution traces of the two sorting routines are shown on the right in Figure 1. ",
264
+ "bbox": [
265
+ 174,
266
+ 250,
267
+ 825,
268
+ 319
269
+ ],
270
+ "page_idx": 3
271
+ },
272
+ {
273
+ "type": "text",
274
+ "text": "One of the key benefits of dynamic analysis is its ability to easily and precisely identify relevant parts of the program that affect execution behavior. As shown in the example above, despite the very similar program syntax of bubble sort and insertion sort, dynamic analysis is able to discover their distinct program semantics by exposing their execution traces. Since understanding program semantics is a central issue in program analysis, dynamic analysis has seen remarkable success over the past several decades and has resulted in many successful program analysis tools such as debuggers, profilers, monitors, or explanation generators. ",
275
+ "bbox": [
276
+ 174,
277
+ 325,
278
+ 825,
279
+ 424
280
+ ],
281
+ "page_idx": 3
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "3 OVERVIEW OF THE APPROACH",
286
+ "text_level": 1,
287
+ "bbox": [
288
+ 178,
289
+ 446,
290
+ 459,
291
+ 462
292
+ ],
293
+ "page_idx": 3
294
+ },
295
+ {
296
+ "type": "text",
297
+ "text": "We now present an overview of our approach. Given a program and the execution traces extracted for all its variables, we introduce three neural network models to learn dynamic program embeddings. To demonstrate the utility of these embeddings, we apply them to predict common error patterns (detailed in Section 5) that students make in their submissions to an online introductory programming course. ",
298
+ "bbox": [
299
+ 174,
300
+ 479,
301
+ 823,
302
+ 549
303
+ ],
304
+ "page_idx": 3
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "Variable Trace Embedding As shown in Table 1, each row denotes a new program point where a variable gets updated.3 The entire variable trace consists of those variable values at all program points. As a subsequent step, we split the complete trace into a list of sub-traces (one for each variable). We use one single RNN to encode each sub-trace independently and then perform max pooling on the final states of the same RNN to obtain the program embedding. Finally, we add a one layer softmax regression to make the predictions. The entire workflow is show in Figure 3. ",
309
+ "bbox": [
310
+ 174,
311
+ 568,
312
+ 825,
313
+ 650
314
+ ],
315
+ "page_idx": 3
316
+ },
317
+ {
318
+ "type": "text",
319
+ "text": "State Trace Embedding Because each variable trace is handled individually in the previous approach, variable dependencies/interactions are not precisely captured. To address this issue, we propose the state trace embedding. As depicted in Table 1, each program point $l$ introduces a new program state expressed by the latest variable valuations at $l$ . The entire state trace is a sequence of program states. To learn the state trace embedding, we first use one RNN to encode each program state (i.e., a tuple of values) and feed the resulting RNN states as a sequence to another RNN. Note that we do not assume that the order in which variables values are encoded by the RNN for each program state but rather maintain a consistent order throughout all program states for a given trace. Finally, we feed a softmax regression layer with the final state of the second RNN (shown in Figure 4). The benefit of state trace embedding is its ability to capture dependencies among variables in each program state as well as the relationship among program states. ",
320
+ "bbox": [
321
+ 173,
322
+ 667,
323
+ 825,
324
+ 821
325
+ ],
326
+ "page_idx": 3
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "Dependency Enforcement for Variable Trace Embedding Although state trace embedding can better capture program dependencies, it also comes with some challenges, the most significant of which is redundancy. Consider a looping structure in a program. During an iteration, whenever one variable gets modified, a new program state will be created containing the values of all variables, even of those unmodified by the loop. This issue becomes more severe for loops with larger numbers of iterations. To tackle this challenge, we propose the third and final approach, dependency enforcement for variable trace embedding (hereinafter referred as dependency enforcement embedding), that combines the advantages of variable trace embedding (i.e., compact representation of execution traces) and state trace embedding (i.e., precise capturing of program dependencies). In dependency enforcement embedding, a program is represented by separate variable traces, with each variable being handled by a different RNN. In order to enforce program dependencies, the hidden states from different RNNs will be interleaved in a way that simulates the needed data and control dependencies. Unlike variable trace embedding, we perform an average pooling on the final states of all RNNs to obtain the program embedding on which we build the final layer of softmax regression. Figure 5 describes the workflow. ",
331
+ "bbox": [
332
+ 176,
333
+ 839,
334
+ 821,
335
+ 882
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "image",
341
+ "img_path": "images/c24b63b3244b25af823ac277ffa05737e9699d51bdba63355ecc7489ec66f479.jpg",
342
+ "image_caption": [
343
+ "Figure 3: Variable trace for program embedding. "
344
+ ],
345
+ "image_footnote": [],
346
+ "bbox": [
347
+ 207,
348
+ 99,
349
+ 790,
350
+ 265
351
+ ],
352
+ "page_idx": 4
353
+ },
354
+ {
355
+ "type": "image",
356
+ "img_path": "images/0f134261b81b800a7d7782924ac759a6eec19ad3a254f17bba783e9a5665a983.jpg",
357
+ "image_caption": [
358
+ "Figure 4: State trace for program embedding. "
359
+ ],
360
+ "image_footnote": [],
361
+ "bbox": [
362
+ 207,
363
+ 319,
364
+ 794,
365
+ 478
366
+ ],
367
+ "page_idx": 4
368
+ },
369
+ {
370
+ "type": "image",
371
+ "img_path": "images/87974f3acf7ec4c5a9bfd85bfb2a3305cfd281b29210e57fb2863f498a065b33.jpg",
372
+ "image_caption": [
373
+ "Figure 5: Dependency enforcement embedding. Dotted lines denoted dependencies. "
374
+ ],
375
+ "image_footnote": [],
376
+ "bbox": [
377
+ 205,
378
+ 531,
379
+ 792,
380
+ 688
381
+ ],
382
+ "page_idx": 4
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "",
387
+ "bbox": [
388
+ 173,
389
+ 757,
390
+ 825,
391
+ 922
392
+ ],
393
+ "page_idx": 4
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "4 DYNAMIC PROGRAM EMBEDDINGS ",
398
+ "text_level": 1,
399
+ "bbox": [
400
+ 174,
401
+ 102,
402
+ 500,
403
+ 118
404
+ ],
405
+ "page_idx": 5
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "We now formally define the three program embedding models. ",
410
+ "bbox": [
411
+ 174,
412
+ 133,
413
+ 583,
414
+ 148
415
+ ],
416
+ "page_idx": 5
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "4.1 VARIABLE TRACE MODEL ",
421
+ "text_level": 1,
422
+ "bbox": [
423
+ 174,
424
+ 165,
425
+ 397,
426
+ 180
427
+ ],
428
+ "page_idx": 5
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Given a program $P$ , and its variable set $V \\left( v _ { 0 } , v _ { 1 } , . . . , v _ { n } \\in V \\right)$ , a variable trace is a sequence of values a variable has been assigned during the execution of $P$ .4 Let $x _ { t _ { - } v _ { n } }$ denote the value from the variable trace of $v _ { n }$ that is fed to the RNN encoder (Gated Recurrent Unit) at time $t$ as the input, and $h _ { t _ { - } v _ { n } }$ as the resulting RNN’s hidden state. We compute the variable trace embedding for $P$ in Equation (3) as follows $( h _ { T _ { - } v _ { n } }$ denotes the last hidden state of the encoder): ",
433
+ "bbox": [
434
+ 174,
435
+ 191,
436
+ 825,
437
+ 261
438
+ ],
439
+ "page_idx": 5
440
+ },
441
+ {
442
+ "type": "equation",
443
+ "img_path": "images/d0e74f6b53b76ed01c7e98177cfb2d1d80472952216ea800e0aa4363eef4d01b.jpg",
444
+ "text": "$$\n{ \\begin{array} { r l r l } { h _ { t . v _ { 1 } } = \\operatorname { G R U } ( h _ { t - 1 . v _ { 1 } } , x _ { t . v _ { 1 } } ) \\qquad } & { ( 1 ) \\qquad } & & { } \\\\ & { \\qquad \\cdots \\qquad } & & { } \\\\ { h _ { t . v _ { n } } = \\operatorname { G R U } ( h _ { t - 1 . v _ { n } } , x _ { t . v _ { n } } ) \\qquad } & { ( 2 ) \\qquad } & & { \\operatorname { E v i d e n c e } = ( \\operatorname { W } h _ { P } + b ) } \\\\ & { h _ { P } = \\operatorname { M a x P o o l i n g } ( h _ { T . v _ { 1 } } , \\ldots , h _ { T . v _ { n } } ) } & { ( 3 ) \\qquad } & & { \\operatorname { Y } = \\operatorname { s o f t m a x } ( \\operatorname { E v i d e n c e } ) } \\end{array} }\n$$",
445
+ "text_format": "latex",
446
+ "bbox": [
447
+ 210,
448
+ 279,
449
+ 727,
450
+ 354
451
+ ],
452
+ "page_idx": 5
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "We compute the representation of the program trace by performing max pooling over the last hidden state representation of each variable trace embedding. The hidden states $h _ { t _ { - } v _ { 1 } }$ , . . . , $h _ { t . v _ { n } } , h _ { P } \\in \\mathbb { R } ^ { k }$ where $k$ denotes the size of hidden layers of the RNN encoder. Evidence denotes the output of a linear model through the program embedding vector $h _ { P }$ , and we obtain the predicted error pattern class $Y$ by using a softmax operation. ",
457
+ "bbox": [
458
+ 174,
459
+ 358,
460
+ 825,
461
+ 429
462
+ ],
463
+ "page_idx": 5
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "4.2 STATE TRACE MODEL ",
468
+ "text_level": 1,
469
+ "bbox": [
470
+ 176,
471
+ 445,
472
+ 367,
473
+ 460
474
+ ],
475
+ "page_idx": 5
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "The key idea in state trace model is to embed each program state as a numerical vector first and then feed all program state embeddings as a sequence to another RNN encoder to obtain the program embedding. Suppose $x _ { t _ { - } v _ { n } }$ is the value of variable $v _ { n }$ at $t$ -th program state, and $h _ { t _ { - } v _ { n } }$ is the resulting hidden state of the program state encoder. Equation (8) computes the $t { \\cdot }$ -th program state embedding. Equations (9-11) encode the sequence of all program state embeddings (i.e., $h _ { t _ { - } v _ { n } }$ , $h _ { t + 1 - v _ { n } }$ , . . . , $h _ { t + m _ { - } v _ { n } } )$ with another RNN to compute the program embedding. ",
480
+ "bbox": [
481
+ 173,
482
+ 472,
483
+ 825,
484
+ 556
485
+ ],
486
+ "page_idx": 5
487
+ },
488
+ {
489
+ "type": "equation",
490
+ "img_path": "images/66a82ea4e653c54e12fa6cd9931597a29d9e61ef28093f00593ad2a7b79e0139.jpg",
491
+ "text": "$$\n\\begin{array} { r l } & { h _ { t _ { - } v _ { 1 } } = \\mathrm { G R U } ( h _ { t _ { - } v _ { 0 } } , x _ { t _ { - } v _ { 1 } } ) } \\\\ & { h _ { t _ { - } v _ { 2 } } = \\mathrm { G R U } ( h _ { t _ { - } v _ { 1 } } , x _ { t _ { - } v _ { 2 } } ) } \\\\ & { \\qquad \\cdots } \\\\ & { h _ { t _ { - } v _ { n } } = \\mathrm { G R U } ( h _ { t _ { - } v _ { n - 1 } } , x _ { t _ { - } v _ { n } } ) } \\end{array}\n$$",
492
+ "text_format": "latex",
493
+ "bbox": [
494
+ 222,
495
+ 575,
496
+ 421,
497
+ 648
498
+ ],
499
+ "page_idx": 5
500
+ },
501
+ {
502
+ "type": "equation",
503
+ "img_path": "images/bcc37b08d90e8c2b0cc6b5e8fdef93a424b501793b868128341ebb398aca2ef8.jpg",
504
+ "text": "$$\n\\begin{array} { r l } & { ~ h _ { t _ { - } v _ { n } } ^ { \\prime } = \\mathrm { { G R U } } ( h _ { t - 1 . v _ { n } } ^ { \\prime } , h _ { t . v _ { n } } ) } \\\\ & { h _ { t + 1 . v _ { n } } ^ { \\prime } = { \\mathrm { G R U } } ( h _ { t . v _ { n } } ^ { \\prime } , h _ { t + 1 . v _ { n } } ) } \\\\ & { ~ \\cdots } \\\\ & { ~ h _ { P } = \\mathrm { { G R U } } ( h _ { t + m - 1 . v _ { n } } ^ { \\prime } , x _ { t + m . v _ { n } } ) } \\end{array}\n$$",
505
+ "text_format": "latex",
506
+ "bbox": [
507
+ 490,
508
+ 571,
509
+ 746,
510
+ 650
511
+ ],
512
+ "page_idx": 5
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "$h _ { t _ { - } v _ { 1 } }$ , . . . , $h _ { t _ { - } v _ { n } } \\in \\mathbb { R } ^ { k _ { 1 } }$ ; $h _ { t _ { - } v _ { n } } ^ { \\prime }$ , . . . , $\\boldsymbol { h } _ { P } \\in \\mathbb { R } ^ { k _ { 2 } }$ where $k _ { 1 }$ and $k _ { 2 }$ denote, respectively, the sizes of hidden layers of the first and second RNN encoders. ",
517
+ "bbox": [
518
+ 173,
519
+ 674,
520
+ 825,
521
+ 703
522
+ ],
523
+ "page_idx": 5
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "4.3 DEPENDENCY ENFORCEMENT FOR VARIABLE TRACE EMBEDDING ",
528
+ "text_level": 1,
529
+ "bbox": [
530
+ 176,
531
+ 719,
532
+ 676,
533
+ 734
534
+ ],
535
+ "page_idx": 5
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "The motivation behind this model is to combine the advantages of the previous two approaches, i.e. representing the execution trace compactly while enforcing the dependency relationship among variables as much as possible. In this model, each variable trace is handled with a different RNN. A potential issue to be addressed is variable matching/renaming (i.e., $\\alpha$ -renaming). In other words same variables may be named differently in different programs. Processing each variable id with a single RNN among all programs in the dataset will not only cause memory issues, but more importantly the loss of precision. Our solution is to (1) execute all programs to collect traces for all variables, (2) perform dynamic time wrapping (Vintsyuk, 1968) on the variable traces across all programs to find the top- $\\mathbf { \\nabla } \\cdot n$ most used variables that account for the vast majority of variable usage, and (3) rename the top- $^ n$ most used variables consistently across all programs, and rename all other variables to a same special variable. ",
540
+ "bbox": [
541
+ 173,
542
+ 746,
543
+ 826,
544
+ 898
545
+ ],
546
+ "page_idx": 5
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "Given the same set of variables among all programs, the mechanism of dependency enforcement on the top ones is to fuse the hidden states of multiple RNNs based on how a new value of a variable is produced. For example, in Figure 2 at line 8, the new value of max val is data-dependent on item, and control-dependent on both item and itself. So at the time step when the new value of max val is produced, the latest hidden states of the RNNs encode variable item as well as itself; they together determine the previous state of the RNN upon which the new value of max val is produced. If a value is produced without any dependencies, this mechanism will not take effect. In other words, the RNN will act normally to handle data sequences on its own. In this work we enforce the data-dependency in assignment statement, declaration statement and method calls; and control-dependency in control statements such as $i f$ , for and while statements. Equations (11 and 12) expose the inner workflow. $h _ { L T _ { - } v _ { m } }$ denotes the latest hidden state of the RNN encoding variable trace of $v _ { m }$ up to the point of time $t$ when $x _ { t _ { - } v _ { n } }$ is the input of the RNN encoding variable trace of $v _ { n }$ . $\\odot$ denotes element-wise matrix product. ",
551
+ "bbox": [
552
+ 173,
553
+ 103,
554
+ 825,
555
+ 284
556
+ ],
557
+ "page_idx": 6
558
+ },
559
+ {
560
+ "type": "equation",
561
+ "img_path": "images/48ba4270dcf398efd1ba7600f68e5bd3865ce8b70f68269a8e49b09cfc475ed3.jpg",
562
+ "text": "$$\n\\begin{array} { r l } { h _ { t - 1 . v _ { n } } = h _ { L T . v _ { 1 } } \\odot h _ { L T . v _ { m } } \\odot h _ { L T . v _ { n } } \\quad } & { \\mathrm { G i v e n ~ } v _ { n } \\mathrm { ~ d e p e n d s ~ o n ~ } v _ { 1 } \\mathrm { ~ a n d ~ } v _ { m } } \\\\ { h _ { t . v _ { n } } = \\mathrm { G R U } ( h _ { t - 1 . v _ { n } } , x _ { t . v _ { n } } ) \\qquad ( 1 2 ) \\quad } & { h _ { P } = \\mathrm { A v e r a g e P o o l i n g } ( h _ { T . v _ { 1 } } , . . . , h _ { T . v _ { n } } ) } \\end{array}\n$$",
563
+ "text_format": "latex",
564
+ "bbox": [
565
+ 191,
566
+ 303,
567
+ 761,
568
+ 340
569
+ ],
570
+ "page_idx": 6
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "5 EVALUATION ",
575
+ "text_level": 1,
576
+ "bbox": [
577
+ 174,
578
+ 356,
579
+ 315,
580
+ 372
581
+ ],
582
+ "page_idx": 6
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "We train our dynamic program embeddings on the programming submissions obtained from Assignment 2 from Microsoft-DEV204.1X: “Introduction to C#” offered on edx and two other problems on Microsoft CodeHunt platform. ",
587
+ "bbox": [
588
+ 173,
589
+ 390,
590
+ 673,
591
+ 431
592
+ ],
593
+ "page_idx": 6
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "• Print Chessboard: Print the chessboard pattern using “X” and “O” to represent the squares as shown in Figure 6. \n• Count Parentheses: Count the depth of nesting parentheses in a given string. \n• Generate Binary Digits: Generate the string of binary digits for a given integer. ",
598
+ "bbox": [
599
+ 215,
600
+ 445,
601
+ 674,
602
+ 545
603
+ ],
604
+ "page_idx": 6
605
+ },
606
+ {
607
+ "type": "image",
608
+ "img_path": "images/e8e5b5be77e765a68edd6ef0523a822ab573b2042ca1c3ac4ad0a0ac08cc9936.jpg",
609
+ "image_caption": [
610
+ "Figure 6: The desired output for the chessboard exercise. "
611
+ ],
612
+ "image_footnote": [],
613
+ "bbox": [
614
+ 712,
615
+ 393,
616
+ 797,
617
+ 503
618
+ ],
619
+ "page_idx": 6
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "Regarding the three programming problems, the errors students made in their submissions can be roughly classified into low-level technical issues (e.g., list indexing, branching conditions or looping bounds) and high-level conceptual issues (e.g., mishandling corner case, misunderstanding problem requirement or misconceptions on the underlying data structure of test inputs).5 ",
624
+ "bbox": [
625
+ 174,
626
+ 559,
627
+ 673,
628
+ 587
629
+ ],
630
+ "page_idx": 6
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "",
635
+ "bbox": [
636
+ 178,
637
+ 588,
638
+ 820,
639
+ 628
640
+ ],
641
+ "page_idx": 6
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "In order to have sufficient data for training our models to predict the error patterns, we (1) convert each incorrect program into multiple programs such that each new program will have only one error, and (2) mutate all the correct programs to generate synthetic incorrect programs such that they exhibit similar errors that students made in real program submissions. These two steps allow us to set up a dataset depicted in Table 2. Based on the same set of training data, we evaluate the dynamic embeddings trained with the three network models and compare them with the syntax-based program embeddings (on the same error prediction task) on the same testing data. The syntax-based models include (1) one trained with a RNN that encodes the run-time syntactic traces of programs (Reed & De Freitas, 2015); (2) another trained with a RNN that encodes token sequences of programs; and (3) the third trained with a RNN on abstract syntax trees of programs (Socher et al., 2013). ",
646
+ "bbox": [
647
+ 173,
648
+ 635,
649
+ 825,
650
+ 775
651
+ ],
652
+ "page_idx": 6
653
+ },
654
+ {
655
+ "type": "table",
656
+ "img_path": "images/23daa2eaf3c9510444f024aa482f1fa85d5c8d0f22e77d353bc6d6554a2bf3b1.jpg",
657
+ "table_caption": [
658
+ "Table 2: Dataset for experimental evaluation. "
659
+ ],
660
+ "table_footnote": [],
661
+ "table_body": "<table><tr><td rowspan=2 colspan=1>Problem</td><td rowspan=1 colspan=2>Program Submissions</td><td rowspan=1 colspan=3>Synthetic Data</td></tr><tr><td rowspan=1 colspan=1>Correct</td><td rowspan=1 colspan=1>Incorrect</td><td rowspan=1 colspan=1>Training</td><td rowspan=1 colspan=1>Validation</td><td rowspan=1 colspan=1>Testing</td></tr><tr><td rowspan=1 colspan=1>Print Chessboard</td><td rowspan=1 colspan=1>2,281</td><td rowspan=1 colspan=1>742</td><td rowspan=1 colspan=1>120K</td><td rowspan=1 colspan=1>13K</td><td rowspan=1 colspan=1>15K</td></tr><tr><td rowspan=1 colspan=1>Count Parentheses</td><td rowspan=1 colspan=1>505</td><td rowspan=1 colspan=1>315</td><td rowspan=1 colspan=1>20K</td><td rowspan=1 colspan=1>2K</td><td rowspan=1 colspan=1>2K</td></tr><tr><td rowspan=1 colspan=1>GenerateBinary Digits</td><td rowspan=1 colspan=1>518</td><td rowspan=1 colspan=1>371</td><td rowspan=1 colspan=1>22K</td><td rowspan=1 colspan=1>3K</td><td rowspan=1 colspan=1>2K</td></tr></table>",
662
+ "bbox": [
663
+ 210,
664
+ 790,
665
+ 787,
666
+ 863
667
+ ],
668
+ "page_idx": 6
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "All models are implemented in TensorFlow. All encoders in each of the trace model have two stacked GRU layers with 200 hidden units in each layer except that the state encoder in the state trace model has one single layer of 100 hidden units. We adopt random initialization for weight initialization. Our vocabulary has 5,568 unique tokens (i.e., the values of all variables at each time step), each of which is embedded into a 100-dimensional vector. All networks are trained using the Adam optimizer (Kingma & Ba, 2014) with the learning and the decay rates set to their default values (learning rate $= 0 . 0 0 0 1$ , beta1 $= 0 . 9$ , bet $1 2 = 0 . 9 9 9$ ) and a mini-batch size of 500. For the variable trace and dependency enforcement models, each trace is padded to have the same length across each batch; for the state trace model, both the number of variables in each program state as well as the length of the entire state trace are padded. ",
673
+ "bbox": [
674
+ 174,
675
+ 103,
676
+ 825,
677
+ 242
678
+ ],
679
+ "page_idx": 7
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "During the training of the dependency enforcement model, we have observed that when dependencies become complex, the network suffers from optimization issues, such as diminishing and exploding gradients. This is likely due to the complex nature of fusing hidden states among RNNs, echoing the errors back and forth through the network. We resolve this issue by truncating each trace into multiple sub-sequences and only back-propagate on the last sub-sequence while only feedforwarding on the rest. Regarding the baseline network trained on syntactic traces/token sequences, we use the same encoder architecture (i.e., two layer GRU of 200 hidden units) processing the same 100-dimension embedding vector for each statement/token. As for the AST model, we learn an embedding (100-dimension) for each type of the syntax node by propagating the leaf (a simple look up) to the root through the learned production rules. Finally, we use the root embeddings to represent programs. ",
684
+ "bbox": [
685
+ 173,
686
+ 250,
687
+ 825,
688
+ 401
689
+ ],
690
+ "page_idx": 7
691
+ },
692
+ {
693
+ "type": "table",
694
+ "img_path": "images/d8ca738ca1e6840e4c4f62693d89c83329827e5294f10d36e06ab649e6241e36.jpg",
695
+ "table_caption": [],
696
+ "table_footnote": [],
697
+ "table_body": "<table><tr><td>Programming Problem</td><td>Variable Trace</td><td> State Trace</td><td>Dependency Enforcement</td><td>Run-Time Syntactic Trace</td><td>Token</td><td>AST</td></tr><tr><td>Print Chessboard</td><td>93.9%</td><td>95.3%</td><td>99.3%</td><td>26.3%</td><td>16.8%</td><td>16.2%</td></tr><tr><td>Count Parentheses</td><td>92.7%</td><td>93.8%</td><td>98.8%</td><td>25.5%</td><td>19.3%</td><td>21.7%</td></tr><tr><td>Generate Binary Digits</td><td>92.1%</td><td>94.5%</td><td>99.2%</td><td>23.8%</td><td>21.2%</td><td>20.9%</td></tr></table>",
698
+ "bbox": [
699
+ 174,
700
+ 417,
701
+ 823,
702
+ 483
703
+ ],
704
+ "page_idx": 7
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "Table 3: Comparing dynamic program embeddings with syntax-based program embedding in predicting common error patterns made by students. ",
709
+ "bbox": [
710
+ 176,
711
+ 500,
712
+ 821,
713
+ 527
714
+ ],
715
+ "page_idx": 7
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "As shown in Table 3, our embeddings trained on execution traces significantly outperform those trained on program syntax (greater than $9 2 \\%$ accuracy compared to less than $2 7 \\%$ for syntax-based embeddings). We conjecture this is because of the fact that minor syntactic discrepancies can lead to major semantic differences as shown in Figure 1. In our dataset, there are a large number of programs with distinct labels that differ by only a few number of tokens or AST nodes, which causes difficulty for the syntax models to generalize. Even for the simpler syntax-level errors, they are buried in large number of other syntactic variations and the size of the training dataset is relatively small for the syntax-based models to learn precise patterns. In contrast, dynamic embeddings are able to canonicalize the syntactical variations and pinpoint the underlying semantic differences, which results in the trace-based models learning the correct error patterns more effectively even with relatively smaller size of the training data. ",
720
+ "bbox": [
721
+ 174,
722
+ 544,
723
+ 825,
724
+ 696
725
+ ],
726
+ "page_idx": 7
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "In addition, we incorporated our dynamic program embeddings into SARFGEN (Wang et al., 2017) — a program repair system — to demonstrate their benefit in producing fixes to correct students errors in programming assignments. Given a set of potential repair candidates, SARFGEN uses an enumerative search-based technique to find minimal changes to an incorrect program. We use the dynamic embeddings to learn a distribution over the corrections to prioritize the search for the repair algorithm.6 To establish the baseline, we obtain the set of all corrections from SARFGEN for each of the real incorrect program to all three problems and enumerate each subset until we find the minimum fixes. On the contrary, we also run another experiment where we prioritize each correction according to the prediction of errors with the dynamic embeddings. It is worth mentioning that one incorrect program may be caused by multiple errors. Therefore, we only predict the top-1 error each time and repair the program with the corresponding corrections. If the program is still incorrect, we repeat this procedure till the program is fixed. The comparison between the two approaches is based on how long it takes them to repair the programs. ",
731
+ "bbox": [
732
+ 174,
733
+ 704,
734
+ 825,
735
+ 885
736
+ ],
737
+ "page_idx": 7
738
+ },
739
+ {
740
+ "type": "table",
741
+ "img_path": "images/88fdc53dcdf7b074c1316b1608c1e68d6c6acc2c5a86314700aa5fde30c912ff.jpg",
742
+ "table_caption": [],
743
+ "table_footnote": [],
744
+ "table_body": "<table><tr><td>Number of Fixes</td><td>Enumerative Search</td><td>Variable Trace Embeddings</td><td>State Trace Embeddings</td><td>Dependency Enforcement Embeddings</td></tr><tr><td>1-2</td><td>3.8</td><td>2.5</td><td>2.8</td><td>3.3</td></tr><tr><td>3-5</td><td>44.7</td><td>3.6</td><td>3.1</td><td>4.1</td></tr><tr><td>6-7</td><td>95.9</td><td>4.2</td><td>3.6</td><td>4.5</td></tr><tr><td>≥8</td><td>128.3</td><td>41.6</td><td>49.5</td><td>38.8</td></tr></table>",
745
+ "bbox": [
746
+ 181,
747
+ 101,
748
+ 816,
749
+ 190
750
+ ],
751
+ "page_idx": 8
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "Table 4: Comparing the enumerative search with those guided by dynamic program embeddings in finding the minimum fixes. Time is measured in seconds. ",
756
+ "bbox": [
757
+ 173,
758
+ 205,
759
+ 823,
760
+ 233
761
+ ],
762
+ "page_idx": 8
763
+ },
764
+ {
765
+ "type": "text",
766
+ "text": "As shown in Table 4, the more fixes required, the more speedups dynamic program embeddings yield — more than an order of magnitude speedups when the number of fixes is four or greater. When the number of fixes is greater than seven, the performance gain drops significantly due to poor prediction accuracy for programs with too many errors. In other words, our dynamic embeddings are not viewed by the network as capturing incorrect execution traces, but rather new execution traces. Therefore, the predictions become unreliable. Note that we ignored incorrect programs having greater than 10 errors when most experiments run out of memory for the baseline approach. ",
767
+ "bbox": [
768
+ 174,
769
+ 262,
770
+ 825,
771
+ 361
772
+ ],
773
+ "page_idx": 8
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "6 RELATED WORK ",
778
+ "text_level": 1,
779
+ "bbox": [
780
+ 176,
781
+ 382,
782
+ 344,
783
+ 398
784
+ ],
785
+ "page_idx": 8
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "There has been significant recent interest in learning neural program representations for various applications, such as program induction and synthesis, program repair, and program completion. Specifically for neural program repair techniques, none of the existing techniques, such as DeepFix (Gupta et al., 2017), SynFix (Bhatia & Singh, 2016) and sk p $\\mathrm { P u }$ et al., 2016), have considered dynamic embeddings proposed in this paper. In fact, dynamic embeddings can be naturally extended to be a new feature dimension for these existing neural program repair techniques. ",
790
+ "bbox": [
791
+ 174,
792
+ 416,
793
+ 825,
794
+ 500
795
+ ],
796
+ "page_idx": 8
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "Piech et al. (2015) is a notable recent effort targeting program representation. Piech et al. explore the possibility of using input-output pairs to represent a program. Despite their new perspective, the direct mapping between input and output of programs usually are not precise enough, i.e., the same input-output pair may correspond to two completely different programs, such as the two sorting algorithms in Figure 1. As we often observe in our own dataset, programs with the same error patterns can also result in different input-output pairs. Their approach is clearly ineffective for these scenarios. ",
801
+ "bbox": [
802
+ 174,
803
+ 506,
804
+ 825,
805
+ 603
806
+ ],
807
+ "page_idx": 8
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "Reed & De Freitas (2015) introduced the novel approach of using execution traces to induce and execute algorithms, such as addition and sorting, from very few examples. The differences from our work are (1) they use a sequence of instructions to represent dynamic execution trace as opposed to using dynamic program states; (2) their goal is to synthesize a neural controller to execute a program as a sequence of actions rather than learning a semantic program representation; and (3) they deal with programs in a language with low-level primitives such as function stack push/pop actions rather than a high-level programming language. ",
812
+ "bbox": [
813
+ 174,
814
+ 611,
815
+ 825,
816
+ 708
817
+ ],
818
+ "page_idx": 8
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "As for learning representations, there are several related efforts in modeling semantics in sentence or symbolic expressions (Socher et al., 2013; Zaremba et al., 2014; Bowman, 2013). These approaches are similar to our work in spirit, but target different domains than programs. ",
823
+ "bbox": [
824
+ 176,
825
+ 715,
826
+ 823,
827
+ 757
828
+ ],
829
+ "page_idx": 8
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "7 CONCLUSION ",
834
+ "text_level": 1,
835
+ "bbox": [
836
+ 176,
837
+ 780,
838
+ 318,
839
+ 795
840
+ ],
841
+ "page_idx": 8
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "We have presented a new program embedding that learns program representations from runtime execution traces. We have used the new embeddings to predict error patterns that students make in their online programming submissions. Our evaluation shows that the dynamic program embeddings significantly outperform those learned via program syntax. We also demonstrate, via an additional application, that our dynamic program embeddings yield more than 10x speedups compared to an enumerative baseline for search-based program repair. Beyond neural program repair, we believe that our dynamic program embeddings can be fruitfully utilized for many other neural program analysis tasks such as program induction and synthesis. ",
846
+ "bbox": [
847
+ 174,
848
+ 811,
849
+ 825,
850
+ 924
851
+ ],
852
+ "page_idx": 8
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "REFERENCES ",
857
+ "text_level": 1,
858
+ "bbox": [
859
+ 174,
860
+ 102,
861
+ 287,
862
+ 117
863
+ ],
864
+ "page_idx": 9
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "Thoms Ball. The concept of dynamic analysis. In Proceedings of the 7th European Software Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 216–234, 1999. ",
869
+ "bbox": [
870
+ 176,
871
+ 126,
872
+ 820,
873
+ 169
874
+ ],
875
+ "page_idx": 9
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "Sahil Bhatia and Rishabh Singh. Automated correction for syntax errors in programming assignments using recurrent neural networks. CoRR, abs/1603.06129, 2016. ",
880
+ "bbox": [
881
+ 171,
882
+ 178,
883
+ 821,
884
+ 207
885
+ ],
886
+ "page_idx": 9
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "Samuel R Bowman. Can recursive neural tensor networks learn logical reasoning? arXiv preprint arXiv:1312.6192, 2013. ",
891
+ "bbox": [
892
+ 171,
893
+ 215,
894
+ 823,
895
+ 243
896
+ ],
897
+ "page_idx": 9
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel rahman Mohamed, and Pushmeet Kohli. RobustFill: Neural program learning under noisy I/O. In Proceedings of the 34th International Conference on Machine Learning, pp. 990–998, 2017. ",
902
+ "bbox": [
903
+ 174,
904
+ 252,
905
+ 823,
906
+ 296
907
+ ],
908
+ "page_idx": 9
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "Rahul Gupta, Soham Pal, Aditya Kanade, and Shirish K. Shevade. Deepfix: Fixing common c language errors by deep learning. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, 2017. ",
913
+ "bbox": [
914
+ 174,
915
+ 304,
916
+ 823,
917
+ 347
918
+ ],
919
+ "page_idx": 9
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. ",
924
+ "bbox": [
925
+ 171,
926
+ 356,
927
+ 823,
928
+ 385
929
+ ],
930
+ "page_idx": 9
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. Convolutional neural networks over tree structures for programming language processing. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, 2016. ",
935
+ "bbox": [
936
+ 174,
937
+ 393,
938
+ 821,
939
+ 436
940
+ ],
941
+ "page_idx": 9
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Flemming Nielson, Hanne R. Nielson, and Chris Hankin. Principles of Program Analysis. 1999. ",
946
+ "bbox": [
947
+ 171,
948
+ 444,
949
+ 805,
950
+ 460
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Chris Piech, Jonathan Huang, Andy Nguyen, Mike Phulsuksombati, Mehran Sahami, and Leonidas Guibas. Learning program embeddings to propagate feedback on student code. In Proceedings of the 32nd International Conference on Machine Learning, pp. 1093–1102, 2015. ",
957
+ "bbox": [
958
+ 174,
959
+ 468,
960
+ 823,
961
+ 512
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Yewen Pu, Karthik Narasimhan, Armando Solar-Lezama, and Regina Barzilay. Sk p: A neural program corrector for moocs. In Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity, SPLASH Companion 2016, pp. 39–40, 2016. ",
968
+ "bbox": [
969
+ 174,
970
+ 520,
971
+ 825,
972
+ 577
973
+ ],
974
+ "page_idx": 9
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Scott Reed and Nando De Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015. ",
979
+ "bbox": [
980
+ 173,
981
+ 585,
982
+ 823,
983
+ 614
984
+ ],
985
+ "page_idx": 9
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. ",
990
+ "bbox": [
991
+ 173,
992
+ 623,
993
+ 825,
994
+ 680
995
+ ],
996
+ "page_idx": 9
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "Taras K Vintsyuk. Speech discrimination by dynamic programming. Cybernetics, 4(1):52–57, 1968. ",
1001
+ "bbox": [
1002
+ 171,
1003
+ 689,
1004
+ 823,
1005
+ 705
1006
+ ],
1007
+ "page_idx": 9
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "Ke Wang, Rishabh Singh, and Zhendong Su. Data-driven feedback generation for introductory programming exercises. CoRR, abs/1711.07148, 2017. URL http://arxiv.org/abs/ 1711.07148. ",
1012
+ "bbox": [
1013
+ 173,
1014
+ 713,
1015
+ 823,
1016
+ 756
1017
+ ],
1018
+ "page_idx": 9
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Wojciech Zaremba, Karol Kurach, and Rob Fergus. Learning to discover efficient mathematical identities. In Advances in Neural Information Processing Systems, pp. 1278–1286, 2014. ",
1023
+ "bbox": [
1024
+ 171,
1025
+ 765,
1026
+ 823,
1027
+ 795
1028
+ ],
1029
+ "page_idx": 9
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "APPENDIX ",
1034
+ "text_level": 1,
1035
+ "bbox": [
1036
+ 176,
1037
+ 103,
1038
+ 264,
1039
+ 118
1040
+ ],
1041
+ "page_idx": 10
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "ERROR PATTERNS ",
1046
+ "text_level": 1,
1047
+ "bbox": [
1048
+ 174,
1049
+ 133,
1050
+ 300,
1051
+ 148
1052
+ ],
1053
+ "page_idx": 10
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "Print Chessboard: ",
1058
+ "bbox": [
1059
+ 173,
1060
+ 159,
1061
+ 290,
1062
+ 174
1063
+ ],
1064
+ "page_idx": 10
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "• Misprinting “O” to “0” or printing lower case instead of upper case characters. \n• Switching across rows are supposed to be the other way around ( i.e. printing OXOXOXOX for odd number rows and XOXOXOXO for even number rows). \n• Printing the first row correctly but failed to make a switch across rows. \n• Printing the entire chessboard as “X” or “O” only. \n• Printing the chessboard correctly but with extra unnecessary characters. \n• Printing the incorrect number of rows. \n• Printing the incorrect number of columns. \n• Printing the characters correctly but in wrong format (i.e. not correctly seperated with the spaces to form the rows). \n• Others. ",
1069
+ "bbox": [
1070
+ 215,
1071
+ 185,
1072
+ 825,
1073
+ 378
1074
+ ],
1075
+ "page_idx": 10
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Count Parentheses: ",
1080
+ "bbox": [
1081
+ 173,
1082
+ 391,
1083
+ 300,
1084
+ 405
1085
+ ],
1086
+ "page_idx": 10
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "• Miss the corner case of empty strings. \n• Mistakenly consider the parenthesis to be symbols rather than “(” or “)”. \n• Mishandling the string of unmatched parentheses. \n• Counting the number of matching parentheses rather then depth. \n• Incorrectly assume nested parentheses are always present. \n• Miscounting the characters which should have been ignored. \n• Others. ",
1091
+ "bbox": [
1092
+ 215,
1093
+ 417,
1094
+ 707,
1095
+ 546
1096
+ ],
1097
+ "page_idx": 10
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Generate Binary Digits: ",
1102
+ "bbox": [
1103
+ 174,
1104
+ 559,
1105
+ 331,
1106
+ 574
1107
+ ],
1108
+ "page_idx": 10
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "• Miss the corner case of integer 0. \n• Misunderstand the binary digits to be underlying bytes of a string. \n• Mistakes in arithmetic calculation regrading shift operations. \n• Adding the binary digits rather than concatenating them to a string. \n• Miss the one on the most significant bit. \n• Others. ",
1113
+ "bbox": [
1114
+ 215,
1115
+ 587,
1116
+ 673,
1117
+ 695
1118
+ ],
1119
+ "page_idx": 10
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "Algorithm 1: SARFGEN ’s feedback generation procedure. ",
1124
+ "text_level": 1,
1125
+ "bbox": [
1126
+ 173,
1127
+ 140,
1128
+ 560,
1129
+ 155
1130
+ ],
1131
+ "page_idx": 11
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "/\\* P: an incorrect program; $P _ { s }$ : all correct solutions function FixGeneration $( P , P _ { s }$ ) ",
1136
+ "bbox": [
1137
+ 169,
1138
+ 159,
1139
+ 665,
1140
+ 184
1141
+ ],
1142
+ "page_idx": 11
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "2 begin // Among $P _ { s }$ identify $P _ { c s }$ to be reference programs to fix $P$ \n3 $P _ { c s } $ CandidatesIdentification $( P , P _ { s } )$ // Initialize the minimum number of fixes $k$ to be inifinity \n4 $k \\infty$ // Initialize the minimum set of fixes ${ \\mathcal { F } } ( P )$ \n5 $\\mathcal { F } ( P ) \\mathrm { n u l l }$ \n6 for $P _ { c } \\in P _ { c s }$ do // Generates the syntactic discrepencies w.r.t. each $P _ { c }$ \n7 $\\mathcal { C } ( P , P _ { c } ) \\gets$ DiscrepenciesGeneration $( P , P _ { s } )$ // Selecting subsets of $\\mathcal { C } ( P , P _ { c } )$ from size of one itll $| \\mathcal { C } ( P , P _ { c } ) |$ \n8 for $n \\in [ 1 , 2 , . . . , | \\mathcal { C } ( P , P _ { c } ) | ]$ do \n9 $\\mathcal { C } _ { s u b s } ( P , P _ { c } ) \\gets \\{ x \\ : | \\ : x \\subseteq \\mathcal { C } ( P , P _ { c } ) \\land | x | = n \\}$ // Attemp each subset of $\\mathcal { C } ( P , P _ { c } )$ \n10 for $\\mathcal { C } _ { s u b } ( P , P _ { c } ) \\in \\mathcal { C } _ { s u b s } ( P , P _ { c } ) \\mathbf { d }$ o \n11 $P ^ { \\prime } \\gets$ PatchApplication( $P$ , $\\dot { \\mathcal { C } } _ { s u b } ( P , P _ { c } ) )$ ) // Update $k$ if necessary \n12 if isCorrect $P ^ { \\prime }$ ) then \n13 if $| P ^ { \\prime } | < k$ then \n14 $k | P ^ { \\prime } |$ \n15 F (P ) ← P 0 \n16 return F(P ) ",
1147
+ "bbox": [
1148
+ 158,
1149
+ 186,
1150
+ 794,
1151
+ 501
1152
+ ],
1153
+ "page_idx": 11
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Algorithm 2: Incorporate pre-trained model to SARFGEN ’s feedback generation procedure. ",
1158
+ "text_level": 1,
1159
+ "bbox": [
1160
+ 176,
1161
+ 534,
1162
+ 781,
1163
+ 549
1164
+ ],
1165
+ "page_idx": 11
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "/\\* P, $P _ { s }$ : same as above; $\\mathcal { M }$ : learned Model ",
1170
+ "bbox": [
1171
+ 171,
1172
+ 553,
1173
+ 562,
1174
+ 564
1175
+ ],
1176
+ "page_idx": 11
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "cti , ) 2 begin Among $P _ { s }$ identify $P _ { c s }$ to be reference programs to fix $P$ 3 $P _ { c s } $ CandidatesIdentification $( P , P _ { s } )$ // Initialize the minimum number of fixes $k$ to be inifinity 4 $k \\infty$ // Initialize the minimum set of fixes ${ \\mathcal { F } } ( P )$ 5 $\\mathcal { F } ( P ) \\mathrm { n u l l }$ 6 for $P _ { c } \\in P _ { c s }$ do // Generates the syntactic discrepencies w.r.t. each $P _ { c }$ 7 $\\mathcal { C } ( P , P _ { c } ) \\gets$ DiscrepenciesGeneration $( P , P _ { s } )$ // Executing $P$ to extract the dynamic execution trace 8 $\\mathcal { T } ( P ) $ DynamicTraceExtraction $( P )$ // Prioritizing subsets of $\\mathcal { C } ( P , P _ { c } )$ through pre-trained model 9 $\\mathcal { C } _ { s u b s } ( P , P _ { c } ) \\gets$ Prioritization $( \\mathcal { C } ( P , P _ { c } )$ , T (P ), M) 10 for $\\mathcal { C } _ { s u b } ( P , P _ { c } ) \\in \\mathcal { C } _ { s u b s } ( P , P _ { c } )$ do 11 $P ^ { \\prime } \\gets$ PatchApplication( $P$ , $\\dot { C } _ { s u b } ( P , P _ { c } ) ,$ ) 12 if isCorrect $P ^ { \\prime } )$ then 13 if $| P ^ { \\prime } | < k$ then 14 $k | P ^ { \\prime } |$ 15 F (P ) ← P 0 16 return F(P ) ",
1181
+ "bbox": [
1182
+ 160,
1183
+ 573,
1184
+ 779,
1185
+ 878
1186
+ ],
1187
+ "page_idx": 11
1188
+ }
1189
+ ]
parse/train/BJuWrGW0Z/BJuWrGW0Z_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJuWrGW0Z/BJuWrGW0Z_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkxnKkrtvS/BkxnKkrtvS.md ADDED
@@ -0,0 +1,499 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SEMI-SUPERVISED NAMED ENTITY RECOGNITIONWITH CRF-VAES
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We investigate methods for semi-supervised learning (SSL) of a neural linearchain conditional random field (CRF) for Named Entity Recognition (NER) by treating the tagger as the amortized variational posterior in a generative model of text given tags. We first illustrate how to incorporate a CRF in a VAE, enabling end-to-end training on semi-supervised data. We then investigate a series of increasingly complex deep generative models of tokens given tags enabled by end-to-end optimization, comparing the proposed models against supervised and strong CRF SSL baselines on the Ontonotes5 NER dataset. We find that our best proposed model consistently improves performance by $\approx 1 \%$ F1 in low- and moderate-resource regimes and easily addresses degenerate model behavior in a more difficult, partially supervised setting.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Named entity recognition (NER) is a critical subtask of many domain-specific natural language understanding tasks in NLP, such as information extraction, entity linking, semantic parsing, and question answering. State-of-the-art models treat NER as a tagging problem (Lample et al., 2016; Ma & Hovy, 2016; Strubell et al., 2017; Akbik et al., 2018), and while they have become quite accurate on benchmark datasets in recent years (Lample et al., 2016; Ma & Hovy, 2016; Strubell et al., 2017; Akbik et al., 2018; Peters et al., 2018; Devlin et al., 2018), utilizing them for new tasks is still expensive, requiring a large corpus of exhaustively annotated sentences (Snow et al., 2008). This problem has been largely addressed by extensive pretraining of high-capacity sentence encoders on massive-scale language modeling tasks (Peters et al., 2018; Devlin et al., 2018; Howard & Ruder, 2018; Radford et al., 2019; Liu et al., 2019b), but it is natural to ask if we can squeeze more signal from our unlabeled data.
12
+
13
+ Latent-variable generative models of sentences are a natural approach to this problem: by treating the tags for unlabeled data as latent variables, we can appeal to the principle of maximum marginal likelihood (Berger, 1985; Bishop, 2006) and learn a generative model on both labeled and unlabeled data. For models of practical interest, however, this presents multiple challenges: learning and prediction both require an intractable marginalization over the latent variables and the specification of the generative model can imply a posterior family that may not be as performant as the current state-of-the-art discriminative models.
14
+
15
+ We address these challenges using a semi-supervised Variational Autoencoder (VAE) (Kingma et al., 2014), treating a neural tagging CRF as the approximate posterior. We address the issue of optimization through discrete latent tag sequences by utilizing a differentiable relaxation of the Perturb-andMAP algorithm (Papandreou & Yuille, 2011; Mensch & Blondel, 2018; Corro & Titov, 2018), allowing for end-to-end optimization via backpropagation (Rumelhart et al., 1988) and SGD (Robbins & Monro, 1951). Armed with this learning approach, we no longer need to restrict the generative model family (as in Ammar et al. (2014); Zhang et al. (2017)), and explore the use of rich deep generative models of text given tag sequences for improving NER performance. We also demonstrate how to use the VAE framework to learn in a realistic annotation scenario where we only observe a biased subset of the named entity tags.
16
+
17
+ Our contributions can be summarized as follows:
18
+
19
+ 1. We address the problem of semi-supervised learning (SSL) for NER by treating a neural CRF as the amortized approximate posterior in a discrete structured VAE. To the best of our knowledge, we are the first to utilize VAEs for NER.
20
+ 2. We explore several variants of increasingly complex deep generative models of text given tags with the goal of improving tagging performance. We find that a joint tag-encoding Transformer (Vaswani et al., 2017) architecture leads to an $\approx 1 \%$ improvement in F1 score over supervised and strong CRF SSL baselines.
21
+ 3. We demonstrate that the proposed approach elegantly corrects for degenerate model performance in a more difficult partially supervised regime where sentences are not exhaustively annotated and again find improved performance.
22
+ 4. Finally, we show the utility of our method in realistic low- and high-resource scenarios, varying the amount of unlabeled data. The resulting high-resource model is competitive with state-of-the-art results and, to the best of our knowledge, achieves the highest reported F1 score $( 8 8 . 4 \% )$ for models that do not use additional labeled data or gazetteers.
23
+
24
+ # 2 METHODS
25
+
26
+ We first introduce the tagging problem and tagging model. We then detail our proposed modeling framework and architectures.
27
+
28
+ # 2.1 PROBLEM STATEMENT
29
+
30
+ NER is the task of assigning coarsely-typed categories to contiguous spans of text. State-of-the-art approaches (Lample et al., 2016; Ma & Hovy, 2016; Strubell et al., 2017; Akbik et al., 2018; Liu et al., 2019a) do so by treating span extraction as a tagging problem, which we now formally define.
31
+
32
+ We are given a tokenized text sequence $\boldsymbol { x } _ { 1 : N } \in \mathcal { X } ^ { N }$ and would like to predict the corresponding tag sequence $y _ { 1 : N } \in \mathcal { V } ^ { N }$ which correctly encodes the observed token spans. 1 In this work, we use the BILOU (Ratinov & Roth, 2009) tag-span encoding, which assigns four tags for each of the $C$ span categories (e.g., B-PER, I-PER, L-PER, U-PER for the PERSON category.) The tag types B, I, $\mathbb { L }$ , U respectively encode beginning, inside, last, and unary tag positions in the original span. Additionally we have one $\bigcirc$ tag for tokens that are not in any named entity span. Thus our tag space has size $| \mathcal { V } | = 4 C + 1$ .
33
+
34
+ # 2.2 TAGGING CRF
35
+
36
+ We call the NER task of predicting tags for tokens inference, and model it with a discriminative distribution $q _ { \phi } \big ( y _ { 1 : N } \big | x _ { 1 : N } \big )$ having parameters $\phi$ . Following state-of-the-art NER approaches (Lample et al., 2016; Ma & Hovy, 2016; Strubell et al., 2017; Akbik et al., 2018), we use a neural encoding of the input followed by a linear-chain CRF (Lafferty et al., 2001) decoding layer on top.
37
+
38
+ We use the same architecture for $q _ { \phi }$ throughout this work, as follows:
39
+
40
+ 1. Encode the token sequence, represented as byte-pairs, with a fixed pretrained language model. 2 That is, we first calculate:
41
+
42
+ $$
43
+ h _ { 1 : N } ^ { 0 } = \mathrm { { P r e t r a i n e d - L M } } ( x _ { 1 : N } ) , h _ { 1 : N } ^ { 0 } \in \mathbb { R } ^ { N \times d _ { \mathrm { L M } } }
44
+ $$
45
+
46
+ In our first experiments exploring the use of pretrained autoregressive information for generation (§3.1), we use the GPT2-SM model (Radford et al., 2019; Hugging Face, 2019). In the experiments after (§3.2) we use the RoBERTa-LG model (Liu et al., 2019b; Hugging Face, 2019).
47
+
48
+ $$
49
+ h _ { 1 : N } ^ { 1 } = h _ { 1 : N } ^ { 0 } W _ { 1 } + b _ { 1 } , W _ { 1 } \in \mathbb { R } ^ { d _ { \mathrm { L M } } \times d _ { y _ { q } } } , b _ { 1 } \in \mathbb { R } ^ { d _ { y _ { q } } }
50
+ $$
51
+
52
+ 4. Combine local and transition potentials: $\psi _ { y _ { i } , y _ { i + 1 } } = s _ { y _ { i } } + T _ { y _ { i } , y _ { i + 1 } } , \ T _ { y _ { i } , y _ { i + 1 } } \in \mathbb { R }$
53
+
54
+ 5. Using special start and end states $y _ { 0 } ~ = ~ * , y _ { N + 1 } ~ = ~ \diamond$ with binary potentials $\psi _ { * , y } ~ =$ $T _ { * , y } , \psi _ { y , \diamond } = T _ { y , \diamond }$ and the forward algorithm (Lafferty et al., 2001) to compute the the partition function $Z$ , we can compute the joint distribution:
55
+
56
+ $$
57
+ q _ { \phi } \big ( y _ { 1 : N } \big | x _ { 1 : N } \big ) = \exp \{ \sum _ { i = 0 } ^ { N } \psi _ { y _ { i } , y _ { i + 1 } } - \log Z ( \psi ) \}
58
+ $$
59
+
60
+ Our tagging CRF has trainable parameters $\phi = \{ W _ { 1 } , b _ { 1 } , V , b _ { 2 } , T \} $ 3 and we learn them on a dataset of fully annotated sentences $\bar { \mathcal { D } _ { S } } = \{ ( x _ { 1 : N ^ { i } } ^ { i } , y _ { 1 : N ^ { i } } ^ { i } ) \}$ using stochastic gradient descent (SGD) and maximum likelihood estimation.
61
+
62
+ $$
63
+ \mathcal { L } _ { S } ^ { q } ( \phi ; \mathcal { D } _ { S } ) = \sum _ { ( x , y ) \in \mathcal { D } _ { S } } \log q _ { \phi } ( y | x )
64
+ $$
65
+
66
+ # 2.3 SEMI-SUPERVISED CRF-VAE
67
+
68
+ We now present the CRF-VAE, which treats the tagging CRF as the amortized approximate posterior in a Variational Autoencoder. We first describe our loss formulations for semi-supervised and partially supervised data. We then address optimizing these objectives end-to-end using backpropagation and the Relaxed Perturb-and-MAP algorithm. Finally, we propose a series of increasingly complex generative models to explore the potential of our modeling framework for improving tagging performance.
69
+
70
+ # 2.3.1 SEMI-SUPERVISED VAE
71
+
72
+ The purpose of this work is to consider methods for estimation of $q _ { \phi }$ in semi-supervised data regimes, as in Kingma et al. (2014); Miao & Blunsom (2016); Yang et al. (2017), where there is additional unlabeled data $\mathcal { D } _ { U } = \{ ( \boldsymbol { x } _ { 1 : N ^ { i } } ^ { i } ) \}$ . To learn in this setting, we consider generative models of tags and tokens $p _ { \theta } ( x _ { 1 : N } | y _ { 1 : N } ) p ( \vec { y } _ { 1 : N } )$ and, for unobserved tags, aim to optimize the marginal likelihood of the observed tokens under the generative model.
73
+
74
+ $$
75
+ \log p _ { \theta } ( x _ { 1 : N } ) = \log \sum _ { y _ { 1 : N } } p _ { \theta } ( x _ { 1 : N } | y _ { 1 : N } ) p ( y _ { 1 : N } )
76
+ $$
77
+
78
+ This marginalization is intractable for models that are not factored among $y _ { i }$ , so we resort to optimizing the familiar evidence lower bound (ELBO) (Jordan et al., 1999; Blei et al., 2017) with an approximate variational posterior distribution, which we set to our tagging model $q _ { \phi }$ . We maximize the ELBO on unlabeled data in addition to maximum likelihood losses for both the inference and generative models on labeled data, yielding the following objectives:
79
+
80
+ $$
81
+ \mathcal { L } _ { S } = \sum _ { ( x , y ) \in \mathcal { D } _ { S } } \log p _ { \theta } ( x | y ) + \log q _ { \phi } ( y | x )
82
+ $$
83
+
84
+ $$
85
+ \mathcal { L } _ { U } = \sum _ { x \in \mathcal { D } _ { U } } \mathbb { E } _ { q _ { \phi } } [ \log p _ { \theta } ( x | y ) ] - \beta \mathrm { K L } ( q _ { \phi } | | p ( y ) )
86
+ $$
87
+
88
+ $$
89
+ \mathcal { L } ( \boldsymbol { \theta } , \boldsymbol { \phi } ; \mathcal { D } _ { S } \cup \mathcal { D } _ { U } , \boldsymbol { \alpha } , \beta ) = \mathcal { L } _ { S } + \alpha \mathcal { L } _ { U }
90
+ $$
91
+
92
+ where $\alpha$ is scalar hyper-parameter used to balance the supervised loss $\mathcal { L } _ { S }$ and the unsupervised loss $\mathcal { L } _ { U }$ (Kingma et al., 2014). $\beta$ is a scalar hyper-parameter used to balance the reconstruction and KL terms for the unsupervised loss (Bowman et al., 2015; Higgins et al., 2017). We note that, unlike a traditional VAE, this model contains no continuous latent variables.
93
+
94
+ # 2.3.2 PARTIALLY SUPERVISED LEARNING (PSL)
95
+
96
+ Assuming that supervised sentences are completely labeled is a restrictive setup for semi-supervised learning of a named entity tagger. It would be useful to be able to learn the tagger on sentences which are only partially labeled, where we only observe some named entity spans, but are not guaranteed all entity spans in the sentence are annotated and no O tags are manually annotated. 4 This presents a challenge in that we are no longer able to assume the usual implicit presence of $\bigcirc$ tags, since unannotated tokens are ambiguous. While it is possible to optimize the marginal likelihood of the CRF on only the observed tags $y _ { \mathcal { O } }$ , $\mathcal { O } \subset \{ 1 , \ldots , N \}$ in the sentence (Tsuboi et al., 2008), doing so naively will result in a degenerate model that never predicts $\bigcirc$ , by far the most common tag (Jie et al., 2019). Interestingly, this scenario is easily addressed by the variational framework via the KL term. We do this by reformulating the objective in Equation 5 to account for partially observed tag sequences:
97
+
98
+ Let $\mathcal { D } _ { P } ~ = ~ \{ ( x _ { 1 : N _ { i } } ^ { i } , y _ { \mathcal { O } } ^ { i } ) \}$ be the partially observed dataset where, for some sentence $i$ , $\scriptscriptstyle \textit { O C }$ $\{ 1 , \ldots , N _ { i } \}$ is the set of observed positions and $\mathcal { U } = \left\{ { 1 , \dots , N _ { i } } \right\} \backslash \mathcal { O }$ is the set of unobserved positions. Our partially supervised objective is then
99
+
100
+ $$
101
+ \mathcal { L } _ { P } = \sum _ { ( x , y _ { \mathcal { O } } ) \in \mathcal { D } _ { P } } \left[ \log q _ { \phi } ( y _ { \mathcal { O } } | x ) + \alpha \mathbb { E } _ { q _ { \phi } } [ \log p _ { \theta } ( x | y _ { \mathcal { O } } \cup y _ { \mathcal { U } } ) ] - \alpha \beta \mathrm { K L } \big ( q _ { \phi } ( y _ { \mathcal { U } } | x , y _ { \mathcal { O } } ) | | p ( y _ { \mathcal { U } } ) \big ) \right]
102
+ $$
103
+
104
+ which can be optimized as before using the constrained forward-backward and $\mathrm { K L }$ algorithms detailed in Appendix $\mathbf { B }$ .
105
+
106
+ We also explore using this approach simply for regularization of the CRF posterior by omitting the token model $p _ { \theta } ( x | y )$ . Since we do not have trainable parameters for the generative model in this case, the reconstruction likelihood drops out of the objective and we have, for a single datum $( x ^ { i } , y _ { \mathcal { O } } ^ { i } ) \in \mathcal { D } _ { P }$ , the following loss:
107
+
108
+ $$
109
+ \mathcal { L } _ { P } ^ { i } = \log q _ { \phi } ( y _ { \mathcal { O } } ^ { i } | x ^ { i } ) - \alpha \beta \mathbf { K L } ( q _ { \phi } ( y _ { \mathcal { U } } ^ { i } | x ^ { i } , y _ { \mathcal { O } } ^ { i } ) | | p ( y _ { \mathcal { U } } ^ { i } ) )
110
+ $$
111
+
112
+ # 2.3.3 DIFFERENTIABLE PERTURB-AND-MAP
113
+
114
+ Optimizing Equations 5 and 6 with respect to $\theta$ and $\phi$ using backpropagation and SGD is straightforward for every term except for the expectation terms $\mathbb { E } _ { q _ { \phi } ( y | x ) } [ \log p _ { \theta } ( x | y ) ]$ . To optimize these expectations, we first make an Monte Carlo approximation using a single sample drawn from $q _ { \phi }$ . This discrete sample, however, is not differentiable with respect to $\phi$ and blocks gradient computation. While we may appeal to score function estimation (Miller, 1967; Williams, 1992; Paisley et al., 2012; Ranganath et al., 2014; Miao & Blunsom, 2016; Mohamed et al., 2019) to work around this, its high-variance gradients make successful optimization difficult.
115
+
116
+ Following Papandreou & Yuille (2011); Mensch & Blondel (2018); Corro & Titov (2018); Kim et al. (2019), we can compute approximate samples from $q _ { \phi }$ that are differentiable with respect to $\phi$ using the Relaxed Perturb-and-MAP algorithm (Corro & Titov, 2018; Kim et al., 2019). Due to space limitations, we leave the derivation of Relaxed Perturb-and-MAP for linear-chain CRFs to Appendix A and detail the resulting CRF algorithms in Appendix B.
117
+
118
+ # 2.4 PROPOSED GENERATIVE MODELS
119
+
120
+ We model the prior distribution of tag sequences $y _ { 1 : N }$ as the per-tag product of a fixed categorical distribution $\begin{array} { r } { p ( \dot { y } _ { 1 : N } ) = \prod _ { i } p ( y _ { i } ) } \end{array}$ . The KL between $q _ { \phi }$ and this distribution can be computed in polynomial time using a modification of the forward recursion derived in Mann & McCallum (2007), detailed in Appendix B.
121
+
122
+ We experiment with several variations of architectures for $p _ { \theta } \big ( x _ { 1 : N } \big | y _ { 1 : N } \big )$ , presented in order of increasing complexity.
123
+
124
+ Baseline - CRF-Autoencoder (AE): The CRF Autoencoder (Ammar et al., 2014; Zhang et al., 2017) is the previous state-of-the-art semi-supervised linear-chain CRF, which we consider a strong baseline. This model uses a tractable, fully factored generative model of tokens given tags and does not require approximate inference. Due to space limitations, we have detailed our implementation in Appendix C.
125
+
126
+ MF: This is our simplest proposed generative model. We first embed the relaxed tag samples, represented as simplex vectors $\bar { y } _ { i } \in \bar { \Delta ^ { \vert \mathcal { N } \vert } }$ , into $\mathbb { R } ^ { d _ { y _ { p } } }$ as the weighted combination of the input vector representations for each possible tag:
127
+
128
+ $$
129
+ u _ { i } = U y _ { i } , ~ U \in \mathbb { R } ^ { d _ { y _ { p } } \times | \mathcal { V } | }
130
+ $$
131
+
132
+ We then compute factored token probabilities with an inner product
133
+
134
+ $$
135
+ p _ { \theta } ( x _ { i } | y _ { i } ) = \sigma _ { \mathcal { X } } ( w _ { x _ { i } } ^ { \top } u _ { i } )
136
+ $$
137
+
138
+ where $\sigma _ { \mathcal { X } }$ is the softmax function normalized over $\mathcal { X }$ . This model is generalization of the CRF Autoencoder architecture in Appendix $\textrm { C }$ where the tag-token parameters $\theta _ { x , y }$ are computed with a low-rank factorization $W U ^ { \top }$ .
139
+
140
+ MT: The restrictive factorization of MF is undesirable, since we expect that information about nearby tags may be discriminative of individual tokens. To test this, we extend MF to use the full tag context by encoding the embedded tag sequence jointly using a two-layer transformer (Vaswani et al., 2017) with four attention heads per layer before predicting the tokens independently. That is,
141
+
142
+ $$
143
+ p _ { \theta } ( x _ { i } | y _ { 1 : N } ) = \sigma _ { \mathcal { X } } ( w _ { x _ { i } } ^ { \top } v _ { i } ) , v _ { 1 : N } = \mathrm { T r a n s f o r m e r } _ { \theta } ( u _ { 1 : N } )
144
+ $$
145
+
146
+ MF-GPT2: Next, we see if we can leverage information from a pretrained language model to provide additional training signal to $p _ { \theta }$ . We extend MF by adding the fixed pretrained language modeling parameters from GPT2 to the token scores:
147
+
148
+ $$
149
+ p _ { \theta } ( x _ { i } | y _ { i } , x _ { < i } ) = \sigma _ { \mathcal { X } } \left( \frac { w _ { x _ { i } } ^ { \top } u _ { i } } { \sqrt { d _ { y _ { p } } } } + \frac { z _ { x _ { i } } ^ { \top } h _ { i } ^ { 0 } } { \sqrt { d _ { \mathrm { G P T 2 } } } } \right)
150
+ $$
151
+
152
+ where $z _ { x _ { i } }$ and $h _ { i } ^ { 0 }$ are the input token embeddings and hidden states from GPT2, respectively. We additionally normalize the scales of the factors by the square root of the vector dimensionalities to prevent the GPT2 scores from washing out the tag-encoding scores $\boldsymbol { d } _ { y _ { p } } = 3 0 0$ and $d _ { G P T 2 } = 7 6 8 )$ .
153
+
154
+ MT-GPT2: We add the same autoregressive extention to MT, using the tag encodings $v$ instead of embeddings $u$ .
155
+
156
+ $$
157
+ p _ { \theta } ( x _ { i } | y _ { 1 : N } , x _ { < i } ) = \sigma _ { \mathcal { X } } \left( \frac { w _ { x _ { i } } ^ { \top } v _ { i } } { \sqrt { d _ { y _ { p } } } } + \frac { z _ { x _ { i } } ^ { \top } h _ { i } ^ { 0 } } { \sqrt { d _ { \mathrm { G P T 2 } } } } \right)
158
+ $$
159
+
160
+ MT-GPT2-PoE: We also consider an autoregressive extension of MT, similar to MT-GPT2, that uses a product of experts (PoE) (Hinton, 2002) factorization instead
161
+
162
+ $$
163
+ \begin{array} { r l } & { p _ { \theta } ( x _ { i } | y , x _ { < i } ) = \sigma _ { \mathcal { X } } \big ( p _ { \theta } ( x _ { i } | y _ { 1 : N } ) p _ { \mathrm { G P T 2 } } ( x _ { i } | x _ { < i } ) \big ) } \\ & { p _ { \theta } ( x _ { i } | y _ { 1 : N } ) = \sigma _ { \mathcal { X } } ( w _ { x _ { i } } ^ { \top } v _ { i } ) , \ p _ { \mathrm { G P T 2 } } ( x _ { i } | x _ { < i } ) = \sigma _ { \mathcal { X } } ( z _ { x _ { i } } ^ { \top } h _ { i } ^ { 0 } ) } \end{array}
164
+ $$
165
+
166
+ MT-GPT2-Residual: Our last variation directly couples GPT2 with $p _ { \theta }$ by predicting a residual via a two-layer MLP based on the tag encoding and GPT2 state:
167
+
168
+ $$
169
+ p _ { \theta } ( x _ { i } | y _ { 1 : N } , x _ { < i } ) = \sigma _ { \mathcal { X } } ( z _ { x _ { i } } ^ { \top } \bar { h } _ { i } ^ { 0 } ) , ~ \bar { h } _ { i } ^ { 0 } = h _ { i } ^ { 0 } + f _ { \mathrm { M L P } } ( \langle h _ { i } ^ { 0 } , v _ { i } \rangle )
170
+ $$
171
+
172
+ For the MF-GPT2, MT-GPT2, and MT-GPT2-PoE models, we choose these factorizations specifically to prevent the trainable parameters from conditioning on previous word information, removing the possibility of the model learning to ignore the noisy latent tags in favor of the strong signal provided by pretrained encodings of the sentence histories (Bowman et al., 2015; Yang et al., 2017; Kim et al., 2018). We further freeze the GPT2 parameters for all models, forcing the only path for improving the generative likelihood to be through the improved estimation and encoding of the tags $y _ { 1 : N }$ .
173
+
174
+ # 3 EXPERIMENTS AND RESULTS
175
+
176
+ We experiment first with the proposed models generative models for SSL and PSL in a moderately resourced regime (keeping $10 \%$ labeled data) to explore their relative merits. We then evaluate our best generative model from these experiments, (MT), with an improved bidirectional encoder language model in a low- and high-resource settings, varying the amount of unlabeled data.5
177
+
178
+ For data, we use the OntoNotes 5 (Hovy et al., 2006) NER corpus, which consists of 18 entity types annotated in 82,120 train, 12,678 validation, and 8,968 test sentences.
179
+
180
+ # 3.1 EXPLORATION OF GENERATIVE ARCHITECTURES
181
+
182
+ We begin by comparing the proposed generative models, $\mathbf { M } ^ { \ast }$ along with the following baselines:
183
+
184
+ 1. Supervised (S): The supervised tagger trained only on the $10 \%$ labeled data.
185
+ 2. Supervised $100 \%$ $( \mathbf { S } ^ { * } )$ : The supervised tagger trained on the $100 \%$ labeled data, used for quantifying the performance loss from using less data.
186
+ 3. AE-Exact: The CRF Autoencoder using exact inference (detailed in Appendix C.)
187
+ 4. AE-Approx: The same tag-token pair parameterization used by the CRF Autoencoder, but trained with the approximate ELBO objective as in Equation 11 instead of the exact objective in Equation 12. The purpose here is to see if we lose anything by resorting to the approximate ELBO objective.
188
+
189
+ To simulate moderate-resource SSL, we keep annotations for only $10 \%$ of the sentences, yielding 8, 212 labeled sentences with 13, 025 annotated spans and 73, 908 unlabeled sentences. Results are shown in Table 1. All models except $\mathbf { S } ^ { \ast }$ use this $10 \%$ labeled data.
190
+
191
+ We first evaluate the proposed models and baselines without the use of a prior, since the use of a locally normalized factored prior can encourage overly uncertain joint distributions and degrade performance (Jiao et al., 2006; Mann & McCallum, 2007; Corro & Titov, 2018). We then explore the inclusion of the priors for the supervised and MT models with $\beta = 0 . 0 1$ .6
192
+
193
+ We explore two varieties of prior tag distributions: (1) the “gold” empirical tag distribution (Emp) from the full training dataset and (2) a simple, but informative, hand-crafted prior (Sim) that places $50 \%$ mass on the $\bigcirc$ tag and distributes the rest of its mass evenly among the remaining tags. We view (2) as a practical approach, since it does not require knowledge of the gold tag distribution, and use (1) to quantify any relative disadvantage from not using the gold prior. We find that including the prior with a small weight, $\beta = 0 . 0 1$ , marginally improved performance and interestingly, the simple prior outperforms the empirical prior, most likely because it is slightly smoother and does not emphasize the O tag as heavily.7
194
+
195
+ Curiously, we found that the approximate training of the CRF Autoencoder AE-Approx outperformed the exact approach AE-Exact by nearly $2 \%$ F1.
196
+
197
+ We also note that our attempts to leverage signal from the pretrained autoregressive GPT2 states had negligible or negative effects on performance, thus we conclude that it is the addition of the joint encoding transformer architecture MT that provides the most gains $( + 0 . 8 \%$ F1).
198
+
199
+ PSL: We also evaluate the supervised and transformer-based generative models, S and MT, on the more difficult PSL setup, where naively training the supervised model on the marginal likelihood of observed tags produces a degenerate model, due to the observation bias of never having O tags. In this setting we drop $90 \%$ of the annotations from sentences randomly, resulting in 82,120 incompletely annotated sentences with 12,883 annotations total. We compare the gold and simple priors for each model. From the bottom of Table 1, we see that again our proposed transformer model MT outperforms the supervised-only model, this time by $+ 1 . 3 \%$ F1. We also find that in this case, the MT models need to be trained with higher prior weights $\beta = 0 . 1$ , otherwise they diverge towards using the O tag more uniformly with the other tags to achieve better generative likelihoods.
200
+
201
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>α 阝</td><td rowspan=1 colspan=1>P R F1</td></tr><tr><td rowspan=1 colspan=1>Supervised 100% (S*)</td><td rowspan=1 colspan=1>- 0.0</td><td rowspan=1 colspan=1>0.808 0.798 0.803</td></tr><tr><td rowspan=1 colspan=1>Supervised (S)AE-ExactAE-Approx</td><td rowspan=1 colspan=1>- 0.01 0.00.1 0.0</td><td rowspan=1 colspan=1>0.761 0.738 0.7490.736 0.721 0.7280.767 0.728 0.747</td></tr><tr><td rowspan=7 colspan=1>MF (Factored)MT(Transformer)MF-GPT2MT-GPT2MT-GPT2 (no-scale)MT-GPT2-PoEMT-GPT2-Residual</td><td rowspan=1 colspan=1>0.1 0.0</td><td rowspan=1 colspan=1>0.761 0.719 0.739</td></tr><tr><td rowspan=1 colspan=1>0.1 0.0</td><td rowspan=3 colspan=1>0.758 0.756 0.7570.754 0.710 0.7310.762 0.755 0.759</td></tr><tr><td rowspan=1 colspan=1>0.1 0.0</td></tr><tr><td rowspan=1 colspan=1>0.1 0.0</td></tr><tr><td rowspan=1 colspan=1>0.1 0.0</td><td rowspan=1 colspan=1>0.766 0.734 0.751</td></tr><tr><td rowspan=1 colspan=1>0.1 0.0</td><td rowspan=2 colspan=1>0.766 0.742 0.7530.766 0.740 0.753</td></tr><tr><td rowspan=1 colspan=1>0.1 0.0</td></tr><tr><td rowspan=3 colspan=1>S (Emp)S (Sim)MT (Emp)MT (Sim)</td><td rowspan=1 colspan=1>0.1 0.01</td><td rowspan=3 colspan=1>0.754 0.733 0.7430.754 0.734 0.7430.760 0.756 0.7580.762 0.757 0.760</td></tr><tr><td rowspan=1 colspan=1>0.1 0.01</td></tr><tr><td rowspan=1 colspan=1>0.1 0.010.1 0.01</td></tr><tr><td rowspan=4 colspan=1>S (Emp) - PSLS (Sim) - PSLMT (Emp) - PSLMT (Sim) - PSL</td><td rowspan=1 colspan=1>0.1 0.01</td><td rowspan=3 colspan=1>0.741 0.725 0.7330.730 0.740 0.7350.731 0.761 0.746</td></tr><tr><td rowspan=1 colspan=1>0.1 0.01</td></tr><tr><td rowspan=1 colspan=1>0.1 0.1</td></tr><tr><td rowspan=1 colspan=1>0.1 0.1</td><td rowspan=1 colspan=1>0.724 0.774 0.748</td></tr></table>
202
+
203
+ Table 1: Semi-supervised and partially-supervised models on $10 \%$ supervised training data: best in bold, second best underlined. The proposed $\mathbf { M T ^ { * } }$ improves performance in SSL and PSL by $+ 1 . 1 \%$ F1 and $+ 1 . 3 \%$ F1, respectively.
204
+
205
+ # 3.2 VARYING RESOURCES
206
+
207
+ Next we explore our best proposed architecture MT and the supervised baseline in low- and highresource settings ( $1 \%$ and $100 \%$ training data, respectively) and study the effects of training with an additional 100K unlabeled sentences sampled from Wikipedia (detailed in Appendix E).
208
+
209
+ Since we found no advantage from using pretrained GPT2 information in the previous experiment, we evaluate the use of the bidirectional pretrained language model, RoBERTa (Liu et al., 2019b), since we expect bidirectional information to highly benefit performance (Strubell et al. (2017); Akbik et al. (2018), among others). We also experiment with a higher-capacity tagging model, S-LG, by adding more trainable Transformers $L = 4$ , $A = 8$ , $H = 1 0 2 4 ^ { \cdot }$ ) between the RoBERTa encodings and down-projection layers.
210
+
211
+ From Table 2 we see that, like in the $10 \%$ labeled data setting, the CRF-VAE improves upon the supervised model by $0 . 9 \%$ F1 in this $1 \%$ setting, but we find that including additional data from Wikipedia has a negative impact. A likely reason for this is the domain mismatch between Ontonotes5 and Wikipedia (news and encyclopedia, respectively).
212
+
213
+ In the high-resource setting, we find that using RoBERTa significantly improves upon GPT2 $( + 5 . 7 \%$ F1) and the additional capacity of S-LG further improves performance by $+ 2 . 2 \%$ F1. Although we do not see a significant improvement from semi-supervised training with Wikipedia sentences, our model is competitive with previous state-of-the-art NER approaches and outperforms all previous approaches that do not use additional labeled data or gazetteers.
214
+
215
+ # 4 RELATED WORK
216
+
217
+ Utilizing unlabeled data for semi-supervised learning in NER has been studied considerably in the literature. A common approach is a two-stage process where useful features are learned from unsupervised data, then incorporated into models which are then trained only on the supervised data (Fernandes & Brefeld, 2011; Kim et al., 2015). With the rise of neural approaches, large-scale word vector (Mikolov et al., 2013; Pennington et al., 2014) and language model pretraining methods (Peters et al., 2018; Akbik et al., 2018; Devlin et al., 2018) can be regarded in the same vein.
218
+
219
+ Table 2: Low- and high-resource results with RoBERTa, varying available unlabeled data. Best scores not using additional labeled data in bold. $\dagger$ Uses additional labeled data or gazetteers.
220
+
221
+ <table><tr><td>Model</td><td>Ds</td><td>Du</td><td>α</td><td>β</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>S MT (Sim)</td><td>13K 13K</td><td>0 82K</td><td>- 0.01</td><td>1 0.1</td><td>0.744 0.752</td><td>0.712 0.739</td><td>0.728 0.737</td></tr><tr><td>MT (Sim) + Wiki Strubell et al. (2017)</td><td>13K 82K</td><td>182K</td><td>0.01</td><td>0.1</td><td>0.746</td><td>0.721</td><td>0.733</td></tr><tr><td>Clark et al. (2018)†</td><td>82K</td><td>0 &gt;1M</td><td>1</td><td>-</td><td></td><td>-</td><td>0.869</td></tr><tr><td>Chen et al. (2019)</td><td>82K</td><td>0</td><td>-</td><td>1</td><td>=</td><td>1</td><td>0.888</td></tr><tr><td></td><td></td><td></td><td>=</td><td>1</td><td>0.878</td><td>0.876</td><td>0.877</td></tr><tr><td>Akbik et al. (2018)+</td><td>95K</td><td>0</td><td></td><td></td><td></td><td></td><td>0.891</td></tr><tr><td>Liu et al. (2019a)†</td><td>82K</td><td>0</td><td></td><td>1</td><td>1</td><td>1</td><td>0.899</td></tr><tr><td>S (GPT2)</td><td>82K</td><td>0</td><td></td><td></td><td>0.808</td><td>0.798</td><td>0.803</td></tr><tr><td>S</td><td>82K</td><td>0</td><td></td><td></td><td>0.864</td><td>0.855</td><td>0.860</td></tr><tr><td>S-LG</td><td>82K</td><td>0</td><td>=</td><td>=</td><td>0.873</td><td>0.892</td><td>0.882</td></tr><tr><td>MT-LG(Sim) + Wiki</td><td>82K</td><td>182K</td><td>0.1</td><td>0.01</td><td>0.880</td><td>0.890</td><td>0.884</td></tr></table>
222
+
223
+ Another approach is to automatically create silver-labeled data using outside resources, whose low recall induces a partially supervised learning problem. Bellare & McCallum (2007) approach the problem by distantly supervising (Mintz et al., 2009) spans using a database. Carlson et al. (2009) similarly use a gazetteer and adapt the structured perceptron (Collins, 2002) to handle partially labeled sequences, while Yang et al. (2018) optimize the marginal likelihood (Tsuboi et al., 2008) of the distantly annotated tags. Yang et al. (2018)’s method, however, still requires some fully labeled data to handle proper prediction of the O tag. The problem setup from Jie et al. (2019) is the same as our PSL regime, but they use a cross-validated self-training approach. Greenberg et al. (2018) use a marginal likelihood objective to pool overlapping NER tasks and datasets, but must exploit datasetspecific constraints, limiting the allowable latent tags to debias the model from never predicting O tags.
224
+
225
+ Generative latent-variable approaches also provide an attractive approach to learning on unsupervised data. Ammar et al. (2014) present an approach that uses the CRF for autoencoding and Zhang et al. (2017) extend it to neural CRFs, but both require the use of a restricted factored generative model to make learning tractable. Deep generative models of text have shown promise in recent years, with demonstrated applications to document representation learning (Miao et al., 2016), sentence generation (Bowman et al., 2015; Yang et al., 2017; Kim et al., 2018), compression (Miao & Blunsom, 2016), translation (Deng et al., 2018), and parsing (Corro & Titov, 2018). However, to the best of our knowledge, this framework has yet to be utilized for NER and tagging CRFs. A key challenge for learning VAEs with discrete latent variables is optimization with respect to the inference model parameters $\phi$ . While we may appeal to score function estimation (Williams, 1992; Paisley et al., 2012; Ranganath et al., 2014; Miao & Blunsom, 2016), its empirical high-variance gradients make successful optimization difficult. Alternatively, obtaining gradients with respect to $\phi$ can be achieved using the relaxed Gumbel-max trick (Jang et al., 2016; Maddison et al., 2016) and has been recently extended to latent tree-CRFs by (Corro & Titov, 2018), which we make use of here for sequence CRFs.
226
+
227
+ # 5 CONCLUSIONS
228
+
229
+ We proposed a novel generative model for semi-supervised learning in NER. By treating a neural CRF as the amortized variational posterior in the generative model and taking relaxed differentiable samples, we were able to utilize a transformer architecture in the generative model to condition on more context and provide appreciable performance gains over supervised and strong baselines on both semi-supervised and partially-supervised datasets. We also found that inclusion of powerful pretrained autoregressive language modeling states had neglible or negative effects while using a pretrained bidirectional encoder offers significant performance gains. Future work includes the use of larger in-domain unlabeled corpora and the inclusion of latent-variable CRFs in more interesting joint semi-supervised models of annotations, such as relation extraction and entity linking.
230
+
231
+ # REFERENCES
232
+
233
+ Alan Akbik, Duncan Blythe, and Roland Vollgraf. Contextual string embeddings for sequence labeling. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 1638–1649, 2018.
234
+
235
+ Waleed Ammar, Chris Dyer, and Noah A Smith. Conditional random field autoencoders for unsupervised structured prediction. In Advances in Neural Information Processing Systems, pp. 3311–3319, 2014.
236
+
237
+ Kedar Bellare and Andrew McCallum. Learning extractors from unlabeled text using relevant databases. In Sixth international workshop on information integration on the web, 2007.
238
+
239
+ James O Berger. Statistical decision theory and Bayesian analysis; 2nd ed. Springer Series in Statistics. Springer, New York, 1985. doi: 10.1007/978-1-4757-4286-2. URL https://cds. cern.ch/record/1327974.
240
+
241
+ Christopher M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer-Verlag, Berlin, Heidelberg, 2006. ISBN 0387310738.
242
+
243
+ David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 112(518):859–877, 2017.
244
+
245
+ Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
246
+
247
+ Andrew Carlson, Scott Gaffney, and Flavian Vasile. Learning a named entity tagger from gazetteers with the partial perceptron. In AAAI Spring Symposium: Learning by Reading and Learning to Read, pp. 7–13, 2009.
248
+
249
+ Hui Chen, Zijia Lin, Guiguang Ding, Jianguang Lou, Yusen Zhang, and Borje Karlsson. Grn: Gated relation network to enhance convolutional neural network for named entity recognition. In Proceedings of AAAI, 2019.
250
+
251
+ Kevin Clark, Minh-Thang Luong, Christopher D Manning, and Quoc V Le. Semi-supervised sequence modeling with cross-view training. arXiv preprint arXiv:1809.08370, 2018.
252
+
253
+ Michael Collins. Discriminative training methods for hidden markov models: Theory and experiments with perceptron algorithms. In Proceedings of the ACL-02 conference on Empirical methods in natural language processing-Volume 10, pp. 1–8. Association for Computational Linguistics, 2002.
254
+
255
+ Caio Corro and Ivan Titov. Differentiable perturb-and-parse: Semi-supervised parsing with a structured variational autoencoder. arXiv preprint arXiv:1807.09875, 2018.
256
+
257
+ Yuntian Deng, Yoon Kim, Justin Chiu, Demi Guo, and Alexander Rush. Latent alignment and variational attention. In Advances in Neural Information Processing Systems, pp. 9712–9724, 2018.
258
+
259
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
260
+
261
+ Eraldo R Fernandes and Ulf Brefeld. Learning from partially annotated sequences. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 407–422. Springer, 2011.
262
+
263
+ Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson Liu, Matthew Peters, Michael Schmitz, and Luke Zettlemoyer. Allennlp: A deep semantic natural language processing platform. arXiv preprint arXiv:1803.07640, 2018.
264
+
265
+ Nathan Greenberg, Trapit Bansal, Patrick Verga, and Andrew McCallum. Marginal likelihood training of bilstm-crf for biomedical named entity recognition from disjoint label sets. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2824–2829, 2018.
266
+
267
+ Emil Julius Gumbel. Statistical theory of extreme values and some practical applications: a series of lectures, volume 33. US Government Printing Office, 1954.
268
+
269
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations, volume 3, 2017.
270
+
271
+ Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002.
272
+
273
+ Eduard Hovy, Mitchell Marcus, Martha Palmer, Lance Ramshaw, and Ralph Weischedel. Ontonotes: The $90 \%$ solution. In Proceedings of the Human Language Technology Conference of the NAACL, Companion Volume: Short Papers, NAACL-Short ’06, pp. 57–60, Stroudsburg, PA, USA, 2006. Association for Computational Linguistics. URL http://dl.acm.org/citation.cfm? id=1614049.1614064.
274
+
275
+ Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. arXiv preprint arXiv:1801.06146, 2018.
276
+
277
+ Inc. Hugging Face. PyTorch Pretrained BERT: The Big & Extending Repository of pretrained Transformers, May 2019. URL https://github.com/huggingface/ pytorch-pretrained-BERT.
278
+
279
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
280
+
281
+ Feng Jiao, Shaojun Wang, Chi-Hoon Lee, Russell Greiner, and Dale Schuurmans. Semi-supervised conditional random fields for improved sequence segmentation and labeling. In Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the Association for Computational Linguistics, pp. 209–216. Association for Computational Linguistics, 2006.
282
+
283
+ Zhanming Jie, Pengjun Xie, Wei Lu, Ruixue Ding, and Linlin Li. Better modeling of incomplete annotations for named entity recognition. In Proceedings of NAACL, 2019.
284
+
285
+ Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Machine learning, 37(2):183–233, 1999.
286
+
287
+ Yoon Kim, Carl Denton, Luong Hoang, and Alexander M Rush. Structured attention networks. arXiv preprint arXiv:1702.00887, 2017.
288
+
289
+ Yoon Kim, Sam Wiseman, Andrew C Miller, David Sontag, and Alexander M Rush. Semi-amortized variational autoencoders. arXiv preprint arXiv:1802.02550, 2018.
290
+
291
+ Yoon Kim, Alexander M Rush, Lei Yu, Adhiguna Kuncoro, Chris Dyer, and Gabor Melis. Unsuper- ´ vised recurrent neural network grammars. arXiv preprint arXiv:1904.03746, 2019.
292
+
293
+ Young-Bum Kim, Minwoo Jeong, Karl Stratos, and Ruhi Sarikaya. Weakly supervised slot tagging with partially labeled sequences from web search click logs. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 84–92, 2015.
294
+
295
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
296
+
297
+ Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in neural information processing systems, pp. 3581–3589, 2014.
298
+
299
+ John Lafferty, Andrew McCallum, and Fernando CN Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. 2001.
300
+
301
+ Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. Neural architectures for named entity recognition. arXiv preprint arXiv:1603.01360, 2016.
302
+
303
+ Tianyu Liu, Jin-ge Yao, and Chin-Yew Lin. Towards improving neural named entity recognition with gazetteers. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 5301–5307, 2019a.
304
+
305
+ 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, 2019b.
306
+
307
+ Xuezhe Ma and Eduard Hovy. End-to-end sequence labeling via bi-directional lstm-cnns-crf. arXiv preprint arXiv:1603.01354, 2016.
308
+
309
+ Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016.
310
+
311
+ Gideon S Mann and Andrew McCallum. Efficient computation of entropy gradient for semisupervised conditional random fields. In Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Companion Volume, Short Papers, pp. 109–112. Association for Computational Linguistics, 2007.
312
+
313
+ Arthur Mensch and Mathieu Blondel. Differentiable dynamic programming for structured prediction and attention. arXiv preprint arXiv:1802.03676, 2018.
314
+
315
+ Yishu Miao and Phil Blunsom. Language as a latent variable: Discrete generative models for sentence compression. arXiv preprint arXiv:1609.07317, 2016.
316
+
317
+ Yishu Miao, Lei Yu, and Phil Blunsom. Neural variational inference for text processing. In International conference on machine learning, pp. 1727–1736, 2016.
318
+
319
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pp. 3111–3119, 2013.
320
+
321
+ Laurence B Miller. Monte carlo analysis of reactivity coefficients in fast reactors general theory and applications. Technical report, Argonne National Lab.(ANL), Argonne, IL (United States), 1967.
322
+
323
+ Mike Mintz, Steven Bills, Rion Snow, and Dan Jurafsky. Distant supervision for relation extraction without labeled data. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP: Volume 2-Volume 2, pp. 1003–1011. Association for Computational Linguistics, 2009.
324
+
325
+ Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte carlo gradient estimation in machine learning. arXiv preprint arXiv:1906.10652, 2019.
326
+
327
+ John Paisley, David Blei, and Michael Jordan. Variational bayesian inference with stochastic search. arXiv preprint arXiv:1206.6430, 2012.
328
+
329
+ George Papandreou and Alan L Yuille. Perturb-and-map random fields: Using discrete optimization to learn and sample from energy models. In 2011 International Conference on Computer Vision, pp. 193–200. IEEE, 2011.
330
+
331
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017.
332
+
333
+ Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014.
334
+
335
+ Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018.
336
+
337
+ Martin Popel and Ondˇrej Bojar. Training tips for the transformer model. The Prague Bulletin of Mathematical Linguistics, 110(1):43–70, 2018.
338
+
339
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1:8, 2019.
340
+
341
+ Rajesh Ranganath, Sean Gerrish, and David Blei. Black box variational inference. In Artificial Intelligence and Statistics, pp. 814–822, 2014.
342
+
343
+ Lev Ratinov and Dan Roth. Design challenges and misconceptions in named entity recognition. In Proceedings of the thirteenth conference on computational natural language learning, pp. 147– 155. Association for Computational Linguistics, 2009.
344
+
345
+ Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pp. 400–407, 1951.
346
+
347
+ David E Rumelhart, Geoffrey E Hinton, Ronald J Williams, et al. Learning representations by back-propagating errors. Cognitive modeling, 5(3):1, 1988.
348
+
349
+ Rion Snow, Brendan O’Connor, Daniel Jurafsky, and Andrew Y Ng. Cheap and fast—but is it good?: evaluating non-expert annotations for natural language tasks. In Proceedings of the conference on empirical methods in natural language processing, pp. 254–263. Association for Computational Linguistics, 2008.
350
+
351
+ Emma Strubell, Patrick Verga, David Belanger, and Andrew McCallum. Fast and accurate entity recognition with iterated dilated convolutions. arXiv preprint arXiv:1702.02098, 2017.
352
+
353
+ Yuta Tsuboi, Hisashi Kashima, Hiroki Oda, Shinsuke Mori, and Yuji Matsumoto. Training conditional random fields using incomplete annotations. In Proceedings of the 22nd International Conference on Computational Linguistics-Volume 1, pp. 897–904. Association for Computational Linguistics, 2008.
354
+
355
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
356
+
357
+ Martin J Wainwright, Michael I Jordan, et al. Graphical models, exponential families, and variational inference. Foundations and Trends $\textsuperscript { \textregistered }$ in Machine Learning, 1(1–2):1–305, 2008.
358
+
359
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
360
+
361
+ Yaosheng Yang, Wenliang Chen, Zhenghua Li, Zhengqiu He, and Min Zhang. Distantly supervised ner with partial annotation learning and reinforcement learning. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 2159–2169, 2018.
362
+
363
+ Zichao Yang, Zhiting Hu, Ruslan Salakhutdinov, and Taylor Berg-Kirkpatrick. Improved variational autoencoders for text modeling using dilated convolutions. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3881–3890. JMLR. org, 2017.
364
+
365
+ Xiao Zhang, Yong Jiang, Hao Peng, Kewei Tu, and Dan Goldwasser. Semi-supervised structured prediction with neural crf autoencoder. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1701–1711, 2017.
366
+
367
+ # A RELAXED PERTURB-AND-MAP FOR LINEAR CHAIN CRFS
368
+
369
+ Let $\tilde { q } _ { \phi } ( y | x ; \tau )$ be the distribution on $y$ with the potentials $\psi$ for each tag at each position perturbed by Gumbel noise $\gamma \overset { \underset { \mathrm { i i d } } { } } { \sim } \mathcal { G } ( 0 , 1 )$ (Gumbel, 1954) and $\tau \geq 0$ be the temperature:
370
+
371
+ $$
372
+ \tilde { q } _ { \phi } ( y | x ; \tau ) = \frac { \exp \big \{ ( \sum _ { i = 0 } ^ { N } \psi _ { y _ { i } , y _ { i + 1 } } + \gamma _ { y _ { i } } ) / \tau \big \} } { \displaystyle \sum _ { y _ { 1 : N } ^ { \prime } } \exp \big \{ ( \sum _ { i = 0 } ^ { N } \psi _ { y _ { i } ^ { \prime } , y _ { i + 1 } ^ { \prime } } + \gamma _ { y _ { i } ^ { \prime } } ) / \tau ) \big \} }
373
+ $$
374
+
375
+ We know from Papandreou & Yuille (2011) that the MAP sequence from this perturbed distribution is a sample from the unperturbed distribution. Coupled with the property that the zero temperature limit of the Gibbs distribution is the MAP state (Wainwright et al., 2008), it immediately follows that the zero temperature limit of the perturbed $\tilde { q }$ is a sample from $q$ :
376
+
377
+ $$
378
+ \tilde { y } = \arg \operatorname* { m a x } _ { y \in \mathcal { V } } \tilde { q } _ { \phi } ( y | x ; \tau )
379
+ $$
380
+
381
+ $$
382
+ \operatorname * { l i m } _ { \tau \to 0 } q _ { \phi } ( y | x ; \tau ) = \mathrm { o n e - h o t } ( \arg \operatorname* { m a x } _ { y \in \mathcal { V } } q _ { \phi } ( y | x ) )
383
+ $$
384
+
385
+ $$
386
+ \Rightarrow \operatorname * { l i m } _ { \tau 0 } \tilde { q } _ { \phi } ( y | x ; \tau ) = \mathrm { o n e } { - } \mathrm { h o t } ( \tilde { y } )
387
+ $$
388
+
389
+ where $q _ { \phi } ( y | x ; \tau )$ is the tempered but unperturbed $q _ { \phi }$ and “one-hot” is a function that converts elements of $\mathcal { V } ^ { N }$ to a one-hot vector representation.
390
+
391
+ Thus we can use the temperature $\tau$ to anneal the perturbed joint distribution $\tilde { q } _ { \phi } ( y | x ; \tau )$ to a sample from the unperturbed distribution, $\tilde { y } \sim q _ { \phi }$ . When $\tau > 0 , \tilde { q } _ { \phi } ( y | x ; \tau )$ is differentiable and can be used for end-to-end optimization by allowing us to approximate the expectation with a relaxed single-sample Monte Carlo estimate:
392
+
393
+ $$
394
+ \begin{array} { r } { { \mathbb E } _ { q _ { \phi } ( y | x ) } [ \log p _ { \theta } ( x | y ) ] \approx \log p _ { \theta } ( x | \tilde { q } _ { \phi } ( y | x ; \tau ) ) } \end{array}
395
+ $$
396
+
397
+ where we have modified $\log p \theta ( x | y )$ to accept the simplex representations of $y _ { 1 : N }$ from $\tilde { q } _ { \phi }$ instead of discrete elements, which has the effect of $\bar { \log { p \theta } } ( x | y )$ computing a weighted combination of its input vector representations for $y \in \mathcal { V }$ similarly to an attention mechanism or the annotation function in Kim et al. (2017) (see Equation 7.)
398
+
399
+ This can be thought of as a generalization of the Gumbel-softmax trick from Jang et al. (2016);
400
+ Maddison et al. (2016) to structured joint distributions.
401
+
402
+ The statements in (8-10) also imply something of practical interest: we can compute (1) the argmax (Viterbi decoding) and its differentiable relaxation; (2) a sample and its differentiable relaxation; (3) the partition function; and (4) the marginal tag distributions, all using the same sum-product algorithm implementation, controlled by the temperature and the presence of noise. We have detailed the algorithm in Appendix B.
403
+
404
+ # B CRF ALGORITHMS
405
+
406
+ In Algorithm 1 we have detailed the stable, log-space implementation of the generalized forwardbackward algorithm for computing (1) the argmax (Viterbi decoding) and its differentiable relaxation; (2) a sample and its differentiable relaxation; (3) the partition function; and (4) the marginal tag distributions below. While this algorithm does provide practical convenience, we note that real implementations should have separate routines for computing the partition function (running only the forward algorithm), and the discrete $\tau = 0$ Viterbi algorithm, since it is more numerically stable and efficient.
407
+
408
+ We also have included the dynamic program for computing the constrained KL divergence between $q _ { \phi }$ and a factored $p ( y )$ in Algorithm 2.
409
+
410
+ # C CRF AUTOENCODER
411
+
412
+ The idea of using a CRF to reconstruct tokens given tags for SSL has been explored before by Ammar et al. (2014); Zhang et al. (2017), which we consider to be a strong baseline and restate
413
+
414
+ # Algorithm 1 Relaxed, Constrained, Perturbed Forward-Backward
415
+
416
+ Notation: $\begin{array} { r } { \mathrm { L S E } : = \log \sum _ { x } \exp } \end{array}$
417
+
418
+ Input: Local potentials $\Psi _ { y _ { 1 : N } }$ , transition potentials $\Psi _ { y , y ^ { \prime } }$ , perturb boolean, temperature $\tau$ , the special start symbol and end symbols $* , \diamond$ , and the set of allowable tags for each position $\mathcal { V } _ { i } ~ \subseteq \mathcal { V }$ (allows for partially observed/constrained sequences.)
419
+
420
+ # Procedure:
421
+
422
+ 1: $\log \alpha [ 0 , y ] \psi _ { * , y } / \tau , ~ \log \beta [ N + 1 , y ] \psi _ { y , \diamond } / \tau$ . Initialize recursions bases
423
+ 2: if perturb then
424
+ 3: $\psi _ { \underline { { y } } _ { i } } \psi _ { \boldsymbol { y } _ { i } } + \gamma _ { \boldsymbol { y } _ { i } } , \gamma _ { \boldsymbol { y } _ { i } } \overset { \mathrm { i i d } } { \sim } \mathcal { G } ( 0 , 1 )$ . Perturb local potentials
425
+ 4: end if
426
+ 5: for $i = 1 , \ldots , N$ do $\triangleright$ Compute forward lattice
427
+ 6: for $y \in \mathcal { V } _ { i }$ do
428
+ 7: $\log \alpha [ i , y ] \longleftarrow \operatorname { L S E } _ { y ^ { \prime } \in \mathcal { y } _ { i - 1 } } ( \psi _ { y ^ { \prime } , y } + \psi _ { y } ) / \tau + \log \alpha [ i - 1 , y ^ { \prime } ]$
429
+ 8: end for
430
+ 9: end for
431
+ 10: for $i = N , \ldots , 1$ do $\triangleright$ Compute backward lattice
432
+ 11: for $y \in \mathcal { V } _ { i }$ do
433
+ 12: $\log \beta [ i , y ] \operatorname { L S E } _ { y ^ { \prime } \in \mathcal { y } _ { i + 1 } } ( \psi _ { y , y ^ { \prime } } + \psi _ { y } ) / \tau + \log \beta [ i + 1 , y ^ { \prime } ]$
434
+ 13: end for
435
+ 14: end for
436
+ 15: $\mu _ { y _ { i } } \gets \sigma y _ { i } \big ( \underset { y _ { i + 1 } \in \mathcal { Y } _ { i + 1 } } { \mathrm { L S E } } \log \alpha [ i , y _ { i } ] + ( \psi _ { y _ { i } } + \psi _ { y _ { i } , y _ { i + 1 } } ) / \tau + \log \beta [ i + 1 , y _ { i + 1 } ] \big )$ . Tag marginals
437
+
438
+ #
439
+
440
+ . Converges to sample at $\tau = 0$
441
+
442
+ If perturb then Relaxed sample q˜φ(y|x; τ ) ← µy1:N
443
+ Else if $\tau = 1$ then Partition function $Z ( \psi ) \gets \sum _ { \mathbf { \psi } , \mathbf { \psi } ^ { \prime } \in \mathcal { V } _ { - } } \exp \{ \psi _ { y ^ { \prime } , \diamond } + \log \alpha [ N , y ^ { \prime } ] \}$ y0∈YN Tag marginals qφ(y|x) ← µy1:N
444
+ Else Relaxed argmax $q _ { \phi } ( y | x ; \tau ) \gets \mu _ { y _ { 1 : N } }$
445
+
446
+ . Converges to Viterbi at $\tau = 0$
447
+
448
+ # Algorithm 2 Constrained KL
449
+
450
+ Notation: $\begin{array} { r } { \overline { { \mathrm { L S E } : = \log \sum _ { x } \exp } } } \end{array}$
451
+
452
+ Input: Local potentials $\Psi _ { y _ { 1 : N } }$ , transition potentials $\Psi _ { y , y ^ { \prime } }$ , prior distribution $p ( y _ { 1 : N } ) = \prod p ( y _ { i } )$ , the special start symbol and end symbols $* , \diamond$ , and the set of allowable tags for each position $\mathcal { V } _ { i } \subseteq \mathcal { V }$ (allows for partially observed/constrained sequences.)
453
+
454
+ # Procedure:
455
+
456
+ 1: $\begin{array} { r } { \log \alpha [ 0 , y ] \psi _ { * , y } , \quad \mathrm { K L } ^ { \alpha } [ 0 , y ] 0 \forall y \in \mathcal { V } _ { 1 } } \end{array}$ . Initialize recursions bases
457
+ 2: for $i = 1 , \ldots , N$ do
458
+ 3: for $y _ { i } \in \mathcal { V } _ { i }$ do $\triangleright$ Same as forward algorithm
459
+ 4: $\overset { \vartriangle } { \log { \alpha } } [ i , \boldsymbol { y } _ { i } ] \underset { \boldsymbol { y } _ { i - 1 } \in \mathcal { Y } _ { i - 1 } } { \mathrm { L S E } } ( \psi _ { \boldsymbol { y } _ { i - 1 } , \boldsymbol { y } _ { i } } + \psi _ { \boldsymbol { y } _ { i } } ) + \log { \alpha } [ i - 1 , \boldsymbol { y } _ { i - 1 } ]$
460
+ 5: end for
461
+ 6: 7: for $\begin{array} { r l r } & { y _ { i + 1 } \in \mathcal { V } _ { i + 1 } \textbf { d 0 } } & { \triangleright \mathrm { C o m p u t e } \mathrm { K } } \\ & { q ( y _ { i } | y _ { i + 1 } ) \sigma _ { \mathcal { V } _ { i } } ( \log \alpha [ i , y _ { i } ] + \psi _ { y _ { i } , y _ { i + 1 } } + \psi _ { y _ { i + 1 } } ) } & \\ & { \mathrm { K L } ^ { \alpha } [ i , y _ { i + 1 } ] \displaystyle \sum _ { y _ { i } \in \mathcal { V } _ { i } } q ( y _ { i } | y _ { i + 1 } ) \big [ \log q ( y _ { i } | y _ { i + 1 } ) - \log p ( y _ { i } ) + \mathrm { K L } ^ { \alpha } [ i - 1 , y _ { i } ] \big ] } \end{array}$ Compute KL lattice
462
+ 8:
463
+ 9: end for
464
+ 10: end for
465
+ Output: $\mathrm { K L } ( q | | p ) \gets \mathrm { K L } ^ { \alpha } [ N , \diamond ]$
466
+
467
+ here for clarity. Termed the CRF Autoencoder, the model treats the the tags as intermediate latent variables in a conditional model and optimizes the marginal conditional likelihood of reconstructing the input.
468
+
469
+ $$
470
+ \log p ( \hat { x } | x ) = \log \sum _ { y _ { 1 : N } } p _ { \theta } ( \hat { x } | y _ { 1 : N } ) q _ { \phi } ( y _ { 1 : N } | x )
471
+ $$
472
+
473
+ By judiciously choosing $p _ { \theta } ( \hat { x } | y )$ to be factored among positions $i$ , we can compute the marginal reconstruction likelihood exactly:
474
+
475
+ $$
476
+ \begin{array} { l } { \displaystyle \log p ( \hat { x } | x ) = \log \sum _ { y _ { 1 : N } } q _ { \phi } ( y _ { 1 : N } | x ) \prod _ { i = 1 } ^ { N } p _ { \theta } ( \hat { x } _ { i } | y _ { i } ) } \\ { = \displaystyle \log \sum _ { y _ { 1 : N } } \exp \{ \sum _ { i = 0 } ^ { N } \psi _ { y _ { i } , y _ { i + 1 } } + \log p _ { \theta } ( \hat { x } _ { i } | y _ { i } ) \} - \log Z ( \psi ) } \\ { = \displaystyle \log Z ( \psi + \log p _ { \theta } ) - \log Z ( \psi ) } \end{array}
477
+ $$
478
+
479
+ where $\log Z ( \psi + \log p _ { \theta } )$ is a slight abuse of notation intended to illustrate that the first term in Equation 12 is the same computation as the partition function, but with the generative log-likelihoods added to the CRF potentials.
480
+
481
+ We note that instead of using the Mixed-EM procedure from Zhang et al. (2017), we model $p _ { \theta } ( \hat { x } _ { i } | y _ { i } )$ using free logit parameters $\theta _ { x , y }$ for each token-tag pair and normalize using a softmax, which allows for end-to-end optimization via backpropagation and SGD.
482
+
483
+ # D EXPERIMENT HYPERPARAMETER AND OPTIMIZATION SETTINGS
484
+
485
+ We train each model to convergence using early-stopping on the F1 score of the validation data, with a patience of 10 epochs. For all models that do not have trainable transformers, we train using the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.001, and a batch size of 128. For those with transformers $( \mathbf { M T ^ { * } } )$ , we train using Adam, a batch size of 32, and the Noam learning rate schedule from Vaswani et al. (2017) with a model size of $d _ { y _ { p } } = 3 0 0$ and 16, 000 warm-up steps (Popel & Bojar, 2018).
486
+
487
+ Additionally, we use gradient clipping of 5 for all models and a temperature of $\tau = . 6 6$ for all relaxed sampling models. We implemented our models in PyTorch (Paszke et al., 2017) using the AllenNLP framework (Gardner et al., 2018) and the Hugging Face (2019) implementation of the pretrained GPT2 and RoBERTa.
488
+
489
+ We have made all code, data, and experiments available online at github.com/ <anonymizedforsubmission> for reproducibility and reuse. All experimental settings can be reproduced using the configuration files in the repo.
490
+
491
+ # E GATHERING ADDITIONAL UNLABELED DATA
492
+
493
+ For the experiments in $\ S 3 . 2$ , we gather an additional training corpus of out-of-domain encyclopedic sentences from Wikipedia. To try to get a sample that better aligns with the Ontonotes5 data, these sentences were gathered with an informed process, which was performed as follows:
494
+
495
+ 1. Using the repository <anonymized for submission $>$ , we extract English Wikipedia and align it with Wikidata.
496
+ 2. We then look up the entity classes from the Ontonotes5 specification (Hovy et al., 2006) in Wikidata and, for each NER class, find all Wikidata classes that are below this class in ontology (all subclasses).
497
+ 3. We then find all items which are instances of these classes and also have Wikipedia pages. These are the Wikipedia entities which are likely to be instances of the NER classes.
498
+
499
+ 4. Finally, we scan Wikipedia, mapping any available links to these NER classes, and keep the top 100K sentences according to the number of found annotations/token – the most ”densely” annotated sentences.
parse/train/BkxnKkrtvS/BkxnKkrtvS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkxnKkrtvS/BkxnKkrtvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkxnKkrtvS/BkxnKkrtvS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ETBc_MIMgoX/ETBc_MIMgoX.md ADDED
@@ -0,0 +1,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING WITH AMIGO:ADVERSARIALLY MOTIVATED INTRINSIC GOALS
2
+
3
+ Andres Campero∗
4
+ Brain and Cognitive Sciences, MIT
5
+ Cambridge, USA
6
+ campero@mit.edu
7
+
8
+ Roberta Raileanu New York University New York, USA raileanu@cs.nyu.edu
9
+
10
+ Heinrich Kuttler ¨ Facebook AI Research London, UK hnr@fb.com
11
+
12
+ # Tim Rocktaschel ¨
13
+
14
+ # Edward Grefenstette
15
+
16
+ Joshua B. Tenenbaum
17
+ Brain and Cognitive Sciences, MIT
18
+ Cambridge, USA
19
+ jbt@mit.edu
20
+
21
+ University College London & Facebook AI Research London, UK rockt@fb.com
22
+
23
+ University College London & Facebook AI Research London, UK egrefen@fb.com
24
+
25
+ # ABSTRACT
26
+
27
+ A key challenge for reinforcement learning (RL) consists of learning in environments with sparse extrinsic rewards. In contrast to current RL methods, humans are able to learn new skills with little or no reward by using various forms of intrinsic motivation. We propose AMIGO, a novel agent incorporating—as form of meta-learning—a goal-generating teacher that proposes Adversarially Motivated Intrinsic GOals to train a goal-conditioned “student” policy in the absence of (or alongside) environment reward. Specifically, through a simple but effective “constructively adversarial” objective, the teacher learns to propose increasingly challenging—yet achievable—goals that allow the student to learn general skills for acting in a new environment, independent of the task to be solved. We show that our method generates a natural curriculum of self-proposed goals which ultimately allows the agent to solve challenging procedurally-generated tasks where other forms of intrinsic motivation and state-of-the-art RL methods fail.
28
+
29
+ # 1 INTRODUCTION
30
+
31
+ The success of Deep Reinforcement Learning (RL) on a wide range of tasks, while impressive, has so far been mostly confined to scenarios with reasonably dense rewards (e.g. Mnih et al., 2016; Vinyals et al., 2019), or to those where a perfect model of the environment can be used for search, such as the game of Go and others (e.g. Silver et al., 2016; Duan et al., 2016; Moravc´ık et al., 2017). Many real-world environments offer extremely sparse rewards, if any at all. In such environments, random exploration, which underpins many current RL approaches, is likely to not yield sufficient reward signal to train an agent, or be very sample inefficient as it requires the agent to stumble onto novel rewarding states by chance. In contrast, humans are capable of dealing with rewards that are sparse and lie far in the future. For example, to a child, the future adult life involving education, work, or marriage provides no useful reinforcement signal. Instead, children devote much of their time to play, generating objectives and posing challenges to themselves as a form of intrinsic motivation. Solving such self-proposed tasks encourages them to explore, experiment, and invent; sometimes, as in many games and fantasies, without any direct link to reality or to any source of extrinsic reward. This kind of intrinsic motivation might be a crucial feature to enable learning in real-world environments (Schulz, 2012) .
32
+
33
+ To address this discrepancy between na¨ıve deep RL exploration strategies and human capabilities, we present a novel meta-learning method wherein part of the agent learns to self-propose Adversarially Motivated Intrinsic Goals (AMIGO). In AMIGO, the agent is decomposed into a goal-generating teacher and a goal-conditioned student policy. The teacher acts as a constructive adversary to the student: the teacher is incentivized to propose goals that are not too easy for the student to achieve, but not impossible either. This results in a natural curriculum of increasingly harder intrinsic goals that challenge the agent and encourage learning about the dynamics of a given environment.
34
+
35
+ ![](images/487c007aec22d1fe70fdd2d3c029daf51db22f9a2abae6bb3f4155770b902589.jpg)
36
+ Figure 1: Training with AMIGO consists of combining two modules: a goal-generating teacher and a goal-conditioned student policy, whereby the teacher provides intrinsic goals to supplement the extrinsic goals from the environment. In our experimental set-up, the teacher is a dimensionalitypreserving convolutional network which, at the beginning of an episode, outputs a location in absolute $( x , y )$ coordinates. These are provided as a one-hot indicator in an extra channel of the student’s convolutional neural network, which in turn outputs the agent’s actions.
37
+
38
+ AMIGO can be viewed as an augmentation of any agent trained with policy gradient-based methods. Under this view, the original policy network becomes the student policy, which only requires its inputprocessing component to be adapted to accept an additional goal specification modality. The teacher policy can then be seen as a “bolt-on” to the original policy network, entailing that this method is—to the extent that the aforementioned goal-conditioning augmentation is possible—architecture-agnostic, and can be used on a variety of RL training model architectures and training settings.
39
+
40
+ As advocated in recent work (Cobbe et al., 2019; Zhong et al., 2020; Risi & Togelius, 2019; Kuttler ¨ et al., 2020), we evaluate AMIGO for procedurally-generated environments instead of trying to learn to perform a specific task. Procedurally-generated environments are challenging since agents have to deal with a parameterized family of tasks, resulting in large observation spaces where memorizing trajectories is infeasible. Instead, agents have to learn policies that generalize across different environment layouts and transition dynamics (Rajeswaran et al., 2017; Machado et al., 2018; Foley et al., 2018; Zhang et al., 2018). Concretely, we use MiniGrid (Chevalier-Boisvert et al., 2018), a suite of fast-to-run procedurally-generated environments with a symbolic/discrete (expressed in terms of objects like walls, doors, keys, chests and balls) observation space which isolates the problem of exploration from that of visual perception. MiniGrid is a widely recognized challenging benchmark for intrinsic motivation, which was used in many recent publications such as Goyal et al. 2019, Bougie et al. 2019, Raileanu and Rocktaschel 2020, Modhe ¨ et al. 2020 etc. We evaluate our method on six different tasks from the MiniGrid domain with varying degrees of difficulties, in which the agent needs to acquire a diverse range of skills in order to succeed. Furthermore, MiniGrid is complex and competitive baselines such as IMPALA (that achieve SOTA in other domains like Atari) fail. Raileanu & Rocktaschel (2020) found that MiniGrid presents a particular challenge for ¨ existing state-of-the-art intrinsic motivation approaches. Here, AMIGO sets a new state-of-the-art on some of the hardest MiniGrid environments, being the only method capable of successfully obtaining extrinsic reward on some of them.
41
+
42
+ In summary, we make the following contributions: (i) we propose Adversarially Motivated Intrinsic GOals—an approach for learning a teacher that generates increasingly harder goals, (ii) we show, through 114 experiments on 6 challenging exploration tasks in procedurally generated environments, that agents trained with AMIGO gradually learn to interact with the environment and solve tasks which are too difficult for state-of-the-art methods, and (iii) we perform an extensive qualitative analysis and ablation study.
43
+
44
+ # 2 RELATED WORK
45
+
46
+ Our work has connections to many different research areas but due to space constraints, we will focus our discussion on the most closely related topics, namely intrinsic motivation and curriculum learning.
47
+
48
+ Intrinsic motivation (Oudeyer et al., 2007; Oudeyer & Kaplan, 2009; Schmidhuber, 1991; Barto, 2013) methods have proven effective for solving various hard-exploration tasks (Bellemare et al., 2016; Pathak et al., 2017; Burda et al., 2019b). One prominent formulation is the use of novelty, which in its simplest form can be estimated with state visitation counts (Strehl & Littman, 2008) and has been extended to high-dimensional state spaces (Bellemare et al., 2016; Burda et al., 2019b; Ostrovski et al., 2017). Other sophisticated versions of curiosity (Schmidhuber, 1991) guide the agent to learn about environment dynamics by encouraging it to take actions that reduce the agent’s uncertainty (Stadie et al., 2015; Burda et al., 2019b), have unpredictable consequences (Pathak et al., 2017; Burda et al., 2019a), or a large impact on the environment (Raileanu & Rocktaschel, ¨ 2020). Other forms of intrinsic motivation include empowerment (Klyubin et al., 2005) which encourages control of the environment by the agent, and goal diversity (Pong et al., 2019) which encourages maximizing the entropy of the goal distribution. In Lair et al. (2019), intrinsic goals are discovered from language supervision. The optimal rewards framework presents intrinsic motivation as a mechanism that goes beyond exploration, placing its origin in an evolutionary context (Singh et al., 2009), or framing it as a meta-optimization problem of selecting internal agent goals which optimize the designer’s goals Sorg et al. (2010). More recently Zheng et al. (2018) extend this framework to learn parametric additive intrinsic rewards. Our work differs from all of the above by formulating intrinsic motivation as a ”constructively adversarial” teacher that proposes increasingly harder goals for the agent.
49
+
50
+ Curriculum learning (Bengio et al., 2009) is another useful technique for tackling complex tasks but the curricula are typically handcrafted which can be time consuming. In our work, the curriculum is generated automatically in an unsupervised fashion. Another automatic curriculum approach learning was proposed by Schmidhuber (2011), where an agent constantly searches the space of problems for the next solvable one. However, this method is not scalable to more complex tasks. Florensa et al. (2017) generate a curriculum by increasing the distance of the starting-point to a goal. In contrast to AMIGO, this method assumes knowledge of the goal location and the ability to reset the agent in any state. A student can also self-propose a goal by hindsight experience replay (HER, Andrychowicz et al., 2017), which has been demonstrated to be effective in alleviating the sparse reward problem. Recent extensions have improved goal selection by balancing the difficulty and diversity (Fang et al., 2019) of goals. In contrast to our work, in HER, there is no explicit incentive for the agent to explore beyond its current reach. Since HER is rewarded for all the states it visits, it is rewarded for easy-to-reach states, even late in the training process. Other related work has trained a teacher to generate a curriculum of environments that maximize the learning process of the student (Portelas et al., 2020a). The question of the complementarity between these and our work is worth pursuing in the future. More similar to our work, Matiisen et al. (2017) train a teacher to select tasks in which the student is improving the most or in which the student’s performance is decreasing to avoid forgetting. Note that AMIGO uses a different objective for training the teacher, which encourages the agent to solve progressively harder tasks. Similarly, Racaniere et al. (2019) train a goal-conditioned policy and a goal-setter network in a non-adversarial way to propose feasible, valid and diverse goals. Their feasibility criteria is similar to ours, but requires training an additional discriminator to rank the difficulty of the goals, while our teacher is directly trained to generate goals with an appropriate level of difficulty.1 Recent surveys of curriculum generation in the context of RL include Narvekar et al. (2020) and Portelas et al. (2020b).
51
+
52
+ Closer to our work, Sukhbaatar et al. (2017) use an adversarial framework but require two modules that independently act and learn in the environment, where one module is encouraged to propose challenges to the other. This setup can be costly and is restricted to only proposing goals which have already been reached by the policy. Moreover, it requires a resettable or reversible environment. In contrast, our method uses a single agent acting in the environment, and the teacher is less constrained in the space of goals it can propose.
53
+
54
+ Also similar to ours, Florensa et al. (2018) present GoalGAN, a generator that proposes goals with the appropriate level of difficulty as determined by a learned discriminator. While their work is similar in spirit with ours, there are several key differences. First, GoalGAN was created for and tested on locomotion tasks with continuous goals, whereas our method is designed for discrete action and goal spaces. While not impossible, adapting it to our setting is not trivial due to the GAN objective. Second, the authors do not condition the generator on the observation which is necessary in procedurally-generated environments that change with each episode. GoalGAN generates goals from a buffer, but previous goals can be unfeasible or nonsensical for the current episode. Hence, GoalGAN cannot be easily adapted to procedurally-generated environments.
55
+
56
+ A concurrent effort, Zhang et al. (2020) complements ours, but in the context of continuous control, by also generating a curriculum of goals which are neither too hard nor too easy using a measure of epistemic uncertainty based on an ensemble of value functions. This requires training multiple networks, which can become too computationally expensive for certain applications.
57
+
58
+ Finally, our approach is loosely inspired by generative adversarial networks (GANs, Goodfellow et al., 2014), where a generative model is trained to fool a discriminator which is trained to differentiate between the generated and the original examples. In contrast with GANs, AMIGO does not require a discriminator, and is “constructively adversarial”, in that the goal-generating teacher is incentivized by its objective to propose goals which are challenging yet feasible for the student.
59
+
60
+ # 3 ADVERSARIALLY MOTIVATED INTRINSIC GOALS
61
+
62
+ AMIGO is composed of two subsystems: a goal-conditioned student policy which “controls” the agent’s actions in the environment, and a goal-generating teacher (see Figure 1) which guides the student’s training. The teacher proposes goals and is rewarded only when the student reaches the goal after a certain number of steps. The student receives reward for reaching the goal proposed by the teacher (discounted by the number of steps needed to reach the goal). The two components are trained adversarially in that the student maximizes reward by reaching goals as fast as possible, while the teacher maximizes reward by proposing goals which the student can reach, though not too quickly. In addition to this intrinsic reward, both modules are rewarded when the agent solves the full task.
63
+
64
+ # 3.1 TRAINING THE STUDENT
65
+
66
+ We consider the traditional RL framework of a Markov Decision Process with a state space $S$ , a set of actions $A$ and a transition function $p ( s _ { t + 1 } | s _ { t } , a _ { t } )$ which specifies the distribution over next states given a current state and action. At each time-step $t$ , the agent in state $s _ { t } \in S$ takes an action $a _ { t } \in A$ by sampling from a goal-conditioned stochastic student policy $\pi ( a _ { t } | s _ { t } , g ; \theta _ { \pi } )$ where $g$ is a intrinsic goal provided by the teacher.
67
+
68
+ The teacher $G ( s _ { 0 } ; \theta _ { g } )$ is a separate policy, operating on a different “granularity” than the student: it takes as input an initial state and outputs as actions a goal $g$ for the student, which stays the same until a new goal is proposed. The teacher proposes a new goal every time an episode begins or whenever the student reaches the intrinsic goal. We assume that some goal verification function $v ( s , g )$ can be specified as an indicator over whether a goal $g$ is achieved in a state $s$ . We use this to define the undiscounted intrinsic reward $r _ { t } ^ { g }$ as:
69
+
70
+ $$
71
+ r _ { t } ^ { g } = v ( s _ { t } , g ) = { \left\{ \begin{array} { l l } { + 1 } & { { \mathrm { i f ~ t h e ~ s t a t e ~ } } s _ { t } { \mathrm { ~ s a t i s f i e s ~ t h e ~ g o a l ~ } } g } \\ { 0 } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
72
+ $$
73
+
74
+ At each time step $t$ , the student receives a reward $\boldsymbol { r } _ { t } = \boldsymbol { r } _ { t } ^ { g } + \boldsymbol { r } _ { t } ^ { e }$ , which is the sum of the intrinsic
75
+ reward $r _ { t } ^ { g }$ provided by the teacher and the extrinsic reward $\boldsymbol { r } _ { t } ^ { e }$ provided by the environment. The
76
+ student, reprexpected rew with p where $\theta _ { \pi }$ , is trained to maximize the discounted the discount factor. We consider a finite $\begin{array} { r } { R _ { t } = \mathbb { E } \big [ \sum _ { k = 0 } ^ { H } \gamma ^ { k } r _ { t + k } \big ] } \end{array}$ $\gamma \in [ 0 , 1 )$ $H$
77
+
78
+ # 3.2 TRAINING THE TEACHER
79
+
80
+ The teacher $G ( s _ { 0 } ; \theta _ { g } )$ , represented as a neural network with parameters $\theta _ { g }$ , is trained to maximise its expected reward. The teacher’s reward $r ^ { T }$ is a function of the student’s performance on the proposed goal and is computed every time this goal is reached (or at the end of an episode). As a result, the teacher operates at a different temporal frequency, and thus its rewards are not discounted according to the number of steps taken by the agent. To generate an automatic curriculum for the student, we positively reward the teacher if the student achieves the goal with suitable effort, but penalize it if the student either cannot achieve the goal, or can do so too easily. There are different options for measuring the performance of the student here, but for simplicity we will use the number of steps $t ^ { + }$ it takes the student to reach an intrinsic goal since the intrinsic goal was set (with $t ^ { + } = 0$ if the student does not reach the goal before the episode ends). We define a threshold $t ^ { * }$ such that the teacher is positively rewarded by $r ^ { T }$ when the student takes more steps than the threshold to reach the set goal, and negatively if it takes fewer steps or never reaches the goal before the episode ends. We thus define the teacher reward as follows, where $\alpha$ and $\beta$ are hyperparameters (see Section 4.2 for implementation details) specifying the weight of positive and negative teacher reward:
81
+
82
+ $$
83
+ r ^ { T } = { \left\{ \begin{array} { l l } { + \alpha } & { { \mathrm { i f } } \quad t ^ { + } \geq t ^ { * } } \\ { - \beta } & { { \mathrm { i f } } \quad t ^ { + } < t ^ { * } } \end{array} \right. }
84
+ $$
85
+
86
+ One can try to calibrate a fixed target threshold $t ^ { * }$ to force the teacher to propose increasingly more challenging goals as the student improves. Initial experiments with a fixed threshold indicated that the loss function was sufficient to induce harder goals and curriculum learning. However, this threshold is different across environments and has to be carefully fixed (depending on the size and complexity of the environment). A more adaptive—albeit heuristic—approach we adopt is to linearly increase the threshold $t ^ { * }$ after a fixed number of times in which the student successfully reaches the intrinsic goals. Specifically, the threshold $t ^ { * }$ is increased by 1 whenever the student successfully reaches an intrinsic goal in more than $t ^ { * }$ steps for ten times in a row. This increase in the target threshold provides an additional metric to visualize the improvement of the student through the “difficulty” of its goals (see Figure 3).
87
+
88
+ # 3.3 TYPES OF GOALS
89
+
90
+ We can conceive of variants of AMIGO whereby goals are provided in the form of linguistic instructions, images, etc. To prove the concept, in this framework, a goal is formally defined as a change in the observation on a tile, as specified by an $( x , y )$ coordinate. The agent must modify the tile before the end of an episode (e.g. by moving to it, or causing the object in it to move or change state). The verification function $v$ is then trivially the indicator function of whether the cell state is different from its initial state at the beginning of the episode. Proposing $( x , y )$ coordinates as goals can present a diverse set of ways for an agent to achieve the goal, as the coordinates can not only be affected by reaching them but also by modifying what is on them. This includes picking up keys, opening doors, and dropping objects onto empty tiles. In some cases in our setting, moving over a square is not the simplest thing possible (e.g. when an obstacle can be removed or a door can be opened). Similarly, in other tasks and environments it could be easier to affect a cell by throwing something at it, rather than by reaching it. Likewise, simply navigating to a set of coordinates (say, the corner of a locked room) might require solving several non-trivial sub-problems (e.g. identifying the right key, going to it, then going to the door, unlocking it, and finally going to the target location). We give some examples of goals proposed by the teacher, alongside the progression in their difficulty as the student improves, in Figure 3.
91
+
92
+ # 3.4 AUXILIARY TEACHER LOSSES
93
+
94
+ To complement our main form of intrinsic reward, we explore a few other criteria, including goal diversity, extrinsic reward, environment change and novelty. We report, in our experiments of Section 4, the results for AMIGO using these auxiliary losses. We present, in Appendix D, an ablation study of the effect of these losses, alongside some alternatives to the reward structure for the teacher network.
95
+
96
+ Diverse Goals. One desirable property is goal diversity (Pong et al., 2019; Raileanu & Rocktaschel,¨ 2020). In our implementation of AMIGO in the experiments of Section 4, we used entropy regularization to train the teacher and student, which encourages such diversity. This regularization, along with the scheduling of the threshold, helps the teacher avoid getting stuck in local minima. Additionally, we considered rewarding the teacher for proposing novel goals similar to count-based exploration methods (Bellemare et al., 2016; Ostrovski et al., 2017) with the difference that in our case the counts are for goals instead of states, based on the number of times the teacher presents a type of goal to the student. This did not improve performance and is not part of our model for the rest of the paper.
97
+
98
+ Episode Boundary Awareness. When playing in a procedurally-generated environment, humans will notice the factors of variation and exploit them. In episodic training, RL agents and algorithms are informed if a particular state was an episode end. To bias AMIGO towards learning the factors of variation in an environment, while not giving it any domain knowledge or any privileged information which other comparable intrinsic motivation systems and RL agents would not have access to, we positively reward the teacher if the content of the goal location it proposes changes at an episode boundary, regardless of whether this change was due to the agent. Thus, the teacher is rewarded for selecting goals where the object type changes if the episode changes (for example a door becomes a wall, or a key becomes an empty tile due to the new episode configuration). While this heuristic is quite general and could be effective for many tasks as it encourages agents to note environmental factors of variation, we note it might not be useful in all possible domains and as such is not an essential part of AMIGO. A comparison an extension of this loss other intrinsic motivation methods would interesting, but is not straightforward and is left for future research, we just note that this auxiliary loss on its own is not able to solve even the medium difficulty environments.
99
+
100
+ Extrinsic Goals. To help transition into the extrinsic task and avoid local minima, we reward both the teacher and the student with environment reward whenever the student reaches the extrinsic goal, even if this does not coincide with the intrinsic goal set by the teacher. This avoids the degenerate case where the student becomes good at satisfying the extrinsic goal, and the teacher is forced to encourage it “away” from it.
101
+
102
+ # 4 EXPERIMENTS
103
+
104
+ We follow Raileanu & Rocktaschel (2020) and evaluate our models on several challenging ¨ procedurally-generated environments from MiniGrid (Chevalier-Boisvert et al., 2018). This environment provides a good testbed for exploration in RL since the observations are symbolic rather than high-dimensional, which helps to disentangle the problem of exploration from that of visual understanding. We compare AMIGO with state-of-the-art methods that use various forms of exploration bonuses. We use TorchBeast (Kuttler et al., 2019), a PyTorch platform for RL research ¨ based on IMPALA (Espeholt et al., 2018) for fast, asynchronous parallel training. The code for these experiments is included in the supplementary materials, and has also been released under ”https://anonymous” to facilitate reproduction of our method and its use in other projects.
105
+
106
+ ![](images/a03478305a7bebf3b72a5bd37455997337d683b632f894ee74138703199c8599.jpg)
107
+ Figure 2: Examples of MiniGrid environments. KCharder requires finding the key that can unlock a door which blocks the room where the goal is (the blue ball). OMhard requires a sequence of correct steps usually involving opening a door, opening a chest to find a key of the correct color, picking-up the key to open the door, and opening the door to reach the goal. The configuration and colors of the objects change from one episode to another. To our knowledge, AMIGO is the only algorithm that can solve these tasks. For other examples, see the MiniGrid repository.
108
+
109
+ # 4.1 ENVIRONMENTS
110
+
111
+ We evaluate AMIGO on the following MiniGrid environments: KeyCorrS3R3 (KCmedium), ObstrMaze1Dl (OMmedium), ObstrMaze2Dlhb (OMmedhard), KeyCorrS4R3 (KChard), KeyCorrS5R3 (KCharder), and ObstrMaze1Q (OMhard). The agent receives a full observation of the MiniGrid environment. The layout of the environment changes at every episode as it is procedurallygenerated. Examples of these tasks can be found in Figure 2. Each environment is a grid of size $N \times N$ ( $N$ being environment-specific) where each tile contains at most one of the following colored objects: wall, door, key, ball, chest. An object in each episode is selected as an extrinsic goal. If the agent reaches the extrinsic goal, or a maximum number of time-steps is reached, the environment is reset. The agent can take the following actions: turn left, turn right, move forward, pick up an object, drop an object, or toggle (open doors or interact with objects). Each tile is encoded using three integer values: the object, the color, and a type or flag indicating whether doors are open or closed. While policies could be learned from pixel observation alone, we will see below that the exploration problem is sufficiently complex with these semantic layers, owing to the procedurally generated nature of the tasks. The observations are transformed before being fed to agents by embedding each tile of the observed frame into a single representation encoding the object type, color, and type/flag.
112
+
113
+ The extrinsic reward provided by each environment for reaching the extrinsic goal in $t$ steps is $r _ { t } ^ { e } = 1 - ( . 9 \cdot t ) / t ^ { \mathrm { m a x } }$ , where $t ^ { \mathrm { m a x } }$ is the maximum episode length (which is intrinsic to each environment and set by the MiniGrid designers), if the extrinsic goal is reached at $t$ , and 0 otherwise. Episodes end when the goal is reached, and thus the scale of the positive reward encourages agents to reach the goal as quickly as possible.
114
+
115
+ # 4.2 AMIGO IMPLEMENTATION
116
+
117
+ The teacher is a dimensionality-preserving network of four convolutional layers interleaved with exponential linear units. Similarly, the student consists of four convolutional layers interleaved with exponential linear units followed by two linear layers with rectified linear units. Both the student and the teacher are trained using the TorchBeast (Kuttler et al., 2019) implementation of ¨ IMPALA (Espeholt et al., 2018), a distributed actor-critic algorithm. But while the teacher proposes goals only at the beginning of an episode or when the student reaches a goal, the student produces an action and gets a reward at every step. To replicate the structure of reward for reaching extrinsic goals, intrinsic reward for the student is discounted to $r _ { t } ^ { g } = 1 - ( . 9 \underbrace { \cdot t } ) / t ^ { \mathrm { m a x } }$ when $v ( s _ { t } , g ) = 1$ , and 0 otherwise. The hyperparameters for the reward for the teacher $r ^ { T }$ are grid searched, and optimal values are found at $\alpha = . 7$ and $\beta = . 3$ (see Appendix $\mathbf { B }$ for full hyperparameter search details).
118
+
119
+ # 4.3 BASELINES AND EVALUATION
120
+
121
+ We use IMPALA (Espeholt et al., 2018) without intrinsic motivation as a standard deep RL baseline. We then compare AMIGO to a series of methods that use intrinsic motivation to supplement extrinsic reward, as listed here. Count is Count-Based Exploration from Bellemare et al. (2016), which computes state visitation counts and gives higher rewards to less visited states. RND is Random Network Distillation Exploration by Burda et al. (2019b) which uses a random network to compute a prediction error used as a bonus to reward novel states; ICM is Intrinsic Curiosity Module from Pathak et al. (2017), which trains forward and inverse models to learn a latent representation used to compare the predicted and actual next states. The Euclidean distance between the representations of predicted and actual states (as measured in the latent space) is used as intrinsic reward. RIDE, from Raileanu & Rocktaschel (2020), defines the intrinsic reward as the (magnitude of the) change between two ¨ consecutive state representations.
122
+
123
+ We have noted from the literature that some of these baselines were designed for partially observable environments (Raileanu & Rocktaschel, 2020; Pathak et al., 2017) so they might benefit from ¨ observing an agent-centric partial view of the environment rather than a full absolute view (Ye et al., 2020). Despite our environment being fully observable, for the strongest comparison with AMIGO we ran the baselines in each of the following four modes: full observation of the environment for both the intrinsic reward module and the policy network, full observation for the intrinsic reward and partial observation for the policy, partial view for the intrinsic reward and full view for the policy, and partial view for both. We use an LSTM for the student policy network when it is provided with partial observations and a feed-forward network when provided with full observations. In
124
+
125
+ Section 4.4, we report the best result (across all four modes) for each baseline and environment pair, with a full breakdown of the results in Appendix A. This, alongside a comprehensive hyperparameter search, ensures that AMIGO is compared against the baselines trained under their individually best-performing training arrangement. We also compare AMIGO to the authors’ implementation2 of Asymmetric Self-Play (ASP) (Sukhbaatar et al., 2017). In their reversible mode two policies are trained adversarially: Alice starts from a start-point and tries to reach goals, while Bob is tasked to travel in reverse from the goal to the start-point.
126
+
127
+ We ran each experiment with five different seeds, and report in Section 4.4 the means and standard deviations. The full hyperparameter sweep for AMIGO and all baselines is reported in Appendix B, alongside best hyperparameters across experiments.
128
+
129
+ # 4.4 RESULTS AND DISCUSSION
130
+
131
+ We summarize the main results of our experiments in Table 1. As discussed in Section 4.3, the reported result for each baseline and each environment is that of the best performing configuration for the policy and intrinsic motivation system for that environment, as reported in Tables 2–5 of Appendix A. This aggregation of 114 experiments (not counting the number of times experiments were run for different seeds) ensures that each baseline is given the opportunity to perform in its best setting, in order to fairly benchmark the performance of AMIGO.
132
+
133
+ Table 1: Comparison of Mean Extrinsic Reward at the end of training (averaging over a batch of episodes as in IMPALA). Each entry shows the result of the best observation configuration, for each baseline, from Tables 2–5 of Appendix A.
134
+
135
+ <table><tr><td rowspan="2">Model</td><td colspan="3">Medium Difficulty Environments</td><td colspan="3">Hard Environments</td></tr><tr><td>KCmedium</td><td>OMmedium</td><td>OMmedhard</td><td>KChard</td><td>KCharder</td><td>OMhard</td></tr><tr><td>AMIGO</td><td>.93 ± .00</td><td>.92 ± .00</td><td>.83 ± .05</td><td>.54 ± .45</td><td>.44 ± .44</td><td>.17 ± .34</td></tr><tr><td>IMPALA</td><td>.00±.00</td><td>.00 ± .00</td><td>.00± .00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00 ± .00</td></tr><tr><td>RND</td><td>.89±.00</td><td>.94± .00</td><td>.88± .03</td><td>.23 ± .40</td><td>.00 ± .00</td><td>.00± .00</td></tr><tr><td>RIDE</td><td>.90 ± .00</td><td>.94± .00</td><td>.86 ± .06</td><td>.19 ± .37</td><td>.00± .00</td><td>.00± .00</td></tr><tr><td>COUNT</td><td>.90± .00</td><td>.04± .04</td><td>.00±.00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00 ± .00</td></tr><tr><td>ICM</td><td>.42 ± .21</td><td>.19 ± .19</td><td>.16 ± .32</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00 ± .00</td></tr><tr><td>ASP</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00±.00</td><td>.00 ± .00</td></tr></table>
136
+
137
+ IMPALA and Asymmetric Self-Play are unable to pass any of these medium or hard environments. ICM and Count struggle on the “easier” medium environments, and fail to obtain any reward from the hard ones. Only RND and RIDE perform competitively on the medium environments, but struggle to obtain any reward on the harder environments.
138
+
139
+ Our results demonstrate that AMIGO establishes a new state of the art in harder exploration problems in MiniGrid. On environments with medium difficulty such as KCmedium, OMmedium, and OMmedhard, AMIGO performs comparably to other state-of-the-art intrinsic motivation methods. AMIGO is often able to successfully reach the extrinsic goal even on the hardest tasks. To showcase results and sample complexity, we illustrate and discuss how mean extrinsic reward changes during training in Appendix C. To analyze which components of the teacher loss were important, we present, in Appendix D, an ablation study over the components presented in Section 3.4. Qualitatively, the learning trajectories of AMIGO display interesting and partially adversarial dynamics. These often involve periods in which both modules cooperate as the student becomes able to reach the proposed goals, followed by others in which the student becomes too good, forcing a drop in the teacher reward, in turn forcing the teacher to increase the difficulty of the proposed goals and forcing the student to further explore. In Appendix E, we provide a more thorough qualitative analysis of AMIGO, wherein we describe the different phases of evolution in the difficulty of the intrinsic goals proposed by the teacher, as exemplified in Figure 3. Further goal examples are shown in Figure 6 of Appendix F.
140
+
141
+ ![](images/e7d0b4987edb4d948137d51f13cca4b6c8f8525874a7c5eaa2da594ae70b38b5.jpg)
142
+ Figure 3: Examples of a curriculum of goals proposed for different episodes of a particular learning trajectory on OMhard. The red triangle is the agent, the red square is the goal proposed by the teacher, and the blue ball is the extrinsic goal. The top panel shows the threshold target difficulty, $t ^ { * }$ of the goals proposed by the teacher. The teacher first proposes very easy nearby goals, then it learns to propose goals that involve traversing rooms and opening doors, while in the third phase the teacher proposes goals which involve removing obstacles and interacting with objects.
143
+
144
+ # 5 CONCLUSION
145
+
146
+ In this work, we propose AMIGO, a meta-learning framework for generating a natural curriculum of goals that help train an agent as a form of intrinsic reward, to supplement extrinsic reward (or replace it if it is not available). This is achieved by having a goal generator as a teacher that acts as a constructive adversary, and a policy that acts as a student conditioning on those goals to maximize an intrinsic reward. The teacher is rewarded to propose goals that are challenging but not impossible. We demonstrate that AMIGO surpasses state-of-the-art intrinsic motivation methods in challenging procedurally-generated tasks in a comprehensive comparison against multiple competitive baselines, in a series of 114 experiments across 6 tasks. Crucially, it is the only intrinsic motivation method which allows agents to obtain any reward on some of the harder tasks, where non-intrinsic RL also fails.
147
+
148
+ The key contribution of this paper is a model-agnostic framework for improving the sample complexity and efficacy of RL algorithms in solving the exploration problems they face. In our experiments, the choice of goal type imposed certain constraints on the nature of the observation, in that both the teacher and student need to fully observe the environment, due to the goals being provided as absolute coordinates. Technically, this method could also be applied to partially observed environments where part of the full observation is uncertain or occluded (e.g. “fog of war” in StarCraft), as the only requirement is that absolute coordinates can be provided and acted on. However, this is not a fundamental requirement, and in future work we would wish to investigate the cases where the teacher could provide more abstract goals, perhaps in the form of language instructions which could directly specify sequences of subgoals. Other extensions to this work worth investigating are its applicability to continuous control domains, visually rich domains, or more complex procedurally generated environments such as (Cobbe et al., 2019). Until then, we are confident we have proved the concept in a meaningful way, which other researchers will already be able to easily adapt to their model and RL algorithm of choice, in their domain of choice.
149
+
150
+ # ACKNOWLEDGMENTS
151
+
152
+ We thank the anonymous reviewers for their candid and helpful feedback and discussions. Roberta was supported by the DARPA L2M grant.
153
+
154
+ # REFERENCES
155
+
156
+ Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, OpenAI Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. Advances in neural information processing systems, 30:5048–5058, 2017.
157
+
158
+ Andrew G Barto. Intrinsic motivation and reinforcement learning. In Intrinsically motivated learning in natural and artificial systems, pp. 17–47. Springer, 2013.
159
+
160
+ Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In Advances in Neural Information Processing Systems, pp. 1471–1479, 2016.
161
+
162
+ Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ Proceedings of the 26th annual international conference on machine learning, pp. 41–48. ACM, 2009.
163
+
164
+ Yuri Burda, Harri Edwards, Deepak Pathak, Amos Storkey, Trevor Darrell, and Alexei A. Efros. Largescale study of curiosity-driven learning. In International Conference on Learning Representations, 2019a. URL https://openreview.net/forum?id $=$ rJNwDjAqYX.
165
+
166
+ Yuri Burda, Harrison Edwards, Amos Storkey, and Oleg Klimov. Exploration by random network distillation. In International Conference on Learning Representations, 2019b. URL https: //openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ H1lJJnR5Ym.
167
+
168
+ Maxime Chevalier-Boisvert, Lucas Willems, and Suman Pal. Minimalistic gridworld environment for OpenAI gym. https://github.com/maximecb/gym-minigrid, 2018.
169
+
170
+ Karl Cobbe, Christopher Hesse, Jacob Hilton, and John Schulman. Leveraging procedural generation to benchmark reinforcement learning. arXiv preprint arXiv:1912.01588, 2019.
171
+
172
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. ArXiv, abs/1604.06778, 2016.
173
+
174
+ Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Volodymir Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, et al. IMPALA: Scalable distributed deep-rl with importance weighted actor-learner architectures. arXiv preprint arXiv:1802.01561, 2018.
175
+
176
+ Meng Fang, Tianyi Zhou, Yali Du, Lei Han, and Zhengyou Zhang. Curriculum-guided hindsight experience replay. In Advances in Neural Information Processing Systems, pp. 12623–12634, 2019.
177
+
178
+ Carlos Florensa, David Held, Markus Wulfmeier, Michael Zhang, and Pieter Abbeel. Reverse curriculum generation for reinforcement learning. arXiv preprint arXiv:1707.05300, 2017.
179
+
180
+ Carlos Florensa, David Held, Xinyang Geng, and Pieter Abbeel. Automatic goal generation for reinforcement learning agents. In Proceedings of the 35th International Conference on Machine Learning, 2018. URL http://proceedings.mlr.press/v80/florensa18a.html.
181
+
182
+ John Foley, Emma Tosch, Kaleigh Clary, and David Jensen. Toybox: Better atari environments for testing reinforcement learning agents. arXiv preprint arXiv:1812.02850, 2018.
183
+
184
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 2672–2680. Curran Associates, Inc., 2014. URL http://papers.nips. cc/paper/5423-generative-adversarial-nets.pdf.
185
+
186
+ Alexander S Klyubin, Daniel Polani, and Chrystopher L Nehaniv. Empowerment: A universal agent-centric measure of control. In 2005 IEEE Congress on Evolutionary Computation, volume 1, pp. 128–135. IEEE, 2005.
187
+
188
+ Heinrich Kuttler, Nantas Nardelli, Thibaut Lavril, Marco Selvatici, Viswanath Sivakumar, Tim ¨ Rocktaschel, and Edward Grefenstette. TorchBeast: A PyTorch platform for distributed RL. ¨ arXiv preprint arXiv:1910.03552, 2019.
189
+
190
+ Heinrich Kuttler, Nantas Nardelli, Roberta Raileanu, Marco Selvatici, Edward Grefenstette, and Tim ¨ Rocktaschel. The NetHack Learning Environment. In ¨ Workshop on Beyond Tabula Rasa in Reinforcement Learning (BeTR-RL), 2020. URL https://github.com/facebookresearch/ nle.
191
+
192
+ Nicolas Lair, Cedric Colas, R ´ emy Portelas, Jean-Michel Dussoux, Peter Ford Dominey, and Pierre-´ Yves Oudeyer. Language grounding through social interactions and curiosity-driven multi-goal learning. arXiv preprint arXiv:1911.03219, 2019.
193
+
194
+ Marlos C Machado, Marc G Bellemare, Erik Talvitie, Joel Veness, Matthew Hausknecht, and Michael Bowling. Revisiting the arcade learning environment: Evaluation protocols and open problems for general agents. Journal of Artificial Intelligence Research, 61:523–562, 2018.
195
+
196
+ Tambet Matiisen, Avital Oliver, Taco Cohen, and John Schulman. Teacher-student curriculum learning. IEEE transactions on neural networks and learning systems, 2017.
197
+
198
+ 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.
199
+
200
+ Matej Moravc´ık, Martin Schmid, Neil Burch, Viliam Lisy, Dustin Morrill, Nolan Bard, Trevor ´ Davis, Kevin Waugh, Michael Johanson, and Michael Bowling. DeepStack: Expert-level artificial intelligence in no-limit poker. ArXiv, abs/1701.01724, 2017.
201
+
202
+ Sanmit Narvekar, Bei Peng, Matteo Leonetti, Jivko Sinapov, Matthew E Taylor, and Peter Stone. Curriculum learning for reinforcement learning domains: A framework and survey. arXiv preprint arXiv:2003.04960, 2020.
203
+
204
+ Georg Ostrovski, Marc G Bellemare, Aaron van den Oord, and R ¨ emi Munos. Count-based exploration ´ with neural density models. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2721–2730. JMLR. org, 2017.
205
+
206
+ Pierre-Yves Oudeyer and Frederic Kaplan. What is intrinsic motivation? a typology of computational approaches. Frontiers in neurorobotics, 1:6, 2009.
207
+
208
+ Pierre-Yves Oudeyer, Frdric Kaplan, and Verena V Hafner. Intrinsic motivation systems for autonomous mental development. IEEE transactions on evolutionary computation, 11(2):265–286, 2007.
209
+
210
+ Deepak Pathak, Pulkit Agrawal, Alexei Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 16–17, 2017.
211
+
212
+ Vitchyr H Pong, Murtaza Dalal, Steven Lin, Ashvin Nair, Shikhar Bahl, and Sergey Levine. Skew-fit: State-covering self-supervised reinforcement learning. arXiv preprint arXiv:1903.03698, 2019.
213
+
214
+ Remy Portelas, C ´ edric Colas, Katja Hofmann, and Pierre-Yves Oudeyer. Teacher algorithms for ´ curriculum learning of deep rl in continuously parameterized environments. In Conference on Robot Learning, pp. 835–853. PMLR, 2020a.
215
+
216
+ Remy Portelas, C ´ edric Colas, Lilian Weng, Katja Hofmann, and Pierre-Yves Oudeyer. Automatic ´ curriculum learning for deep rl: A short survey. arXiv preprint arXiv:2003.04664, 2020b.
217
+
218
+ Sebastien Racaniere, Andrew K Lampinen, Adam Santoro, David P Reichert, Vlad Firoiu, and Timothy P Lillicrap. Automated curricula through setter-solver interactions. arXiv preprint arXiv:1909.12892, 2019.
219
+
220
+ Roberta Raileanu and Tim Rocktaschel. ¨ $\{ \mathrm { R I D E } \}$ : Rewarding impact-driven exploration for procedurally-generated environments. In International Conference on Learning Representations, 2020.
221
+
222
+ Aravind Rajeswaran, Kendall Lowrey, Emanuel V Todorov, and Sham M Kakade. Towards generalization and simplicity in continuous control. In Advances in Neural Information Processing Systems, pp. 6550–6561, 2017.
223
+
224
+ Sebastian Risi and Julian Togelius. Procedural content generation: From automatically generating game levels to increasing generality in machine learning. arXiv preprint arXiv:1911.13071, 2019.
225
+
226
+ Jurgen Schmidhuber. A possibility for implementing curiosity and boredom in model-building neural ¨ controllers. In Proc. of the international conference on simulation of adaptive behavior: From animals to animats, pp. 222–227, 1991.
227
+
228
+ Jurgen Schmidhuber. Powerplay: Training an increasingly general problem solver by continually¨ searching for the simplest still unsolvable problem. In Front. Psychol., 2011.
229
+
230
+ Laura Schulz. Finding new facts; thinking new thoughts. In Advances in child development and behavior, volume 43, pp. 269–294. Elsevier, 2012.
231
+
232
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484, 2016.
233
+
234
+ Satinder Singh, Richard L Lewis, and Andrew G Barto. Where do rewards come from. In Proceedings of the annual conference of the cognitive science society, pp. 2601–2606. Cognitive Science Society, 2009.
235
+
236
+ Jonathan Sorg, Satinder P Singh, and Richard L Lewis. Internal rewards mitigate agent boundedness. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 1007– 1014, 2010.
237
+
238
+ Bradly C Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing exploration in reinforcement learning with deep predictive models. arXiv preprint arXiv:1507.00814, 2015.
239
+
240
+ Alexander L Strehl and Michael L Littman. An analysis of model-based interval estimation for markov decision processes. Journal of Computer and System Sciences, 74(8):1309–1331, 2008.
241
+
242
+ Sainbayar Sukhbaatar, Zeming Lin, Ilya Kostrikov, Gabriel Synnaeve, Arthur Szlam, and Rob Fergus. Intrinsic motivation and automatic curricula via asymmetric self-play. arXiv preprint arXiv:1703.05407, 2017.
243
+
244
+ Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Michael Mathieu, Andrew Dudzik, Junyoung ¨ Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in StarCraft II using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019.
245
+
246
+ Chang Ye, Ahmed Khalifa, Philip Bontrager, and Julian Togelius. Rotation, translation, and cropping for zero-shot generalization. CoRR, abs/2001.09908, 2020. URL https://arxiv.org/abs/ 2001.09908.
247
+
248
+ Amy Zhang, Nicolas Ballas, and Joelle Pineau. A dissection of overfitting and generalization in continuous reinforcement learning. arXiv preprint arXiv:1806.07937, 2018.
249
+
250
+ Yunzhi Zhang, Pieter Abbeel, and Lerrel Pinto. Automatic curriculum learning through value disagreement, 2020.
251
+
252
+ Zeyu Zheng, Junhyuk Oh, and Satinder Singh. On learning intrinsic rewards for policy gradient methods. In Advances in Neural Information Processing Systems, pp. 4644–4654, 2018.
253
+
254
+ Victor Zhong, Tim Rocktaschel, and Edward Grefenstette. RTFM: generalising to new environment ¨ dynamics via reading. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ SJgob6NKvH.
255
+
256
+ Table 2: Fully observed intrinsic reward, fully observed policy.
257
+
258
+ <table><tr><td rowspan="2">Model</td><td colspan="3">Medium Diffculty Environments</td><td colspan="3">Hard Environments</td></tr><tr><td>KCmedium</td><td>OMmedium</td><td>OMmedhard</td><td>KChard</td><td>KCharder</td><td>OMhard</td></tr><tr><td>AMIGo</td><td>.93± .00</td><td>.92 ± .00</td><td>.83± .05</td><td>.54±.45</td><td>.44± .44</td><td>.17 ± .34</td></tr><tr><td>IMPALA</td><td>.00± .00</td><td>.00± .00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00± .00</td><td>.00 ± .00</td></tr><tr><td>RND</td><td>.00 ± .00</td><td>.00±.00</td><td>.00± .00</td><td>.00±.00</td><td>.00 ± .00</td><td>.00 ± .00</td></tr><tr><td>RIDE</td><td>.00±.00</td><td>.04± .04</td><td>.00±.00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00 ± .00</td></tr><tr><td>COUNT</td><td>.00±.00</td><td>.00± .00</td><td>.00±.00</td><td>.00±.00</td><td>.00± .00</td><td>.00± .00</td></tr><tr><td>ICM</td><td>.00±.00</td><td>.01±.01</td><td>.00±.00</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00± .00</td></tr><tr><td>ASP</td><td>.00± .00</td><td>.00± .00</td><td>.00± .00</td><td>.00±.00</td><td>.00±.00</td><td>.00± .00</td></tr></table>
259
+
260
+ Table 3: Partially observed intrinsic reward, fully observed policy.
261
+
262
+ <table><tr><td rowspan="2">Model</td><td colspan="3">Medium Difficulty Environments</td><td colspan="3">Hard Environments</td></tr><tr><td>KCmedium</td><td>OMmedium</td><td>OMmedhard</td><td>KChard</td><td>KCharder</td><td>OMhard</td></tr><tr><td>RND</td><td>.64± .09</td><td>.01± .01</td><td>.00±.00</td><td>.00±.00</td><td>.00 ± .00</td><td>.00 ± .00</td></tr><tr><td>RIDE</td><td>.84±.02</td><td>.00± .00</td><td>.00±.00</td><td>.00±.00</td><td>.00± .00</td><td>.00± .00</td></tr><tr><td>COUNT</td><td>.45± .26</td><td>.00 ± .00</td><td>.00± .00</td><td>.00± .00</td><td>.00±.00</td><td>.00±.00</td></tr><tr><td>ICM</td><td>.42 ± .21</td><td>.00± .00</td><td>.00± .00</td><td>.00± .00</td><td>.00±.00</td><td>.00± .00</td></tr></table>
263
+
264
+ Table 4: Fully observed intrinsic reward, partially observed policy.
265
+
266
+ <table><tr><td rowspan="2">Model</td><td colspan="3">Medium Difficulty Environments</td><td colspan="3">Hard Environments</td></tr><tr><td>KCmedium</td><td>OMmedium</td><td>OMmedhard</td><td>KChard</td><td>KCharder</td><td>OMhard</td></tr><tr><td>RND</td><td>.00± .00</td><td>.00± .00</td><td>.00 ± .00</td><td>.00±.00</td><td>.00± .00</td><td>.00 ± .00</td></tr><tr><td>RIDE</td><td>.88±.01</td><td>.94±.00</td><td>.18 ± .35</td><td>.19 ± .37</td><td>.00±.00</td><td>.00± .00</td></tr><tr><td>COUNT</td><td>.01 ±.01</td><td>.00 ± .00</td><td>.00 ± .00</td><td>.00±.00</td><td>.00 ± .00</td><td>.00±.00</td></tr><tr><td>ICM</td><td>.06 ± .12</td><td>.05 ± .06</td><td>.16 ± .32</td><td>.00± .00</td><td>.00± .00</td><td>.00± .00</td></tr></table>
267
+
268
+ Table 5: Partially observed intrinsic reward, partially observed policy.
269
+
270
+ <table><tr><td></td><td colspan="3">Medium Difficulty Environments</td><td colspan="3">Hard Environments</td></tr><tr><td>Model</td><td>KCmedium</td><td>OMmedium</td><td>OMmedhard</td><td>KChard</td><td>KCharder</td><td>OMhard</td></tr><tr><td>RND</td><td>.89 ± .00</td><td>.94± .00</td><td>.88± .03</td><td>.23±.40</td><td>.00± .00</td><td>.00 ± .00</td></tr><tr><td>RIDE</td><td>.90± .00</td><td>.85±.28</td><td>.86 ± .06</td><td>.00± .00</td><td>.00±.00</td><td>.00 ± .00</td></tr><tr><td>COUNT</td><td>.90 ± .00</td><td>.04 ± .04</td><td>.00± .00</td><td>.00±.00</td><td>.00± .00</td><td>.00± .00</td></tr><tr><td>ICM</td><td>.00± .00</td><td>.19 ± .19</td><td>.00± .00</td><td>.00± .00</td><td>.00± .00</td><td>.00± .00</td></tr></table>
271
+
272
+ # A FULL RESULTS
273
+
274
+ Tables 2–5 show the final performance of the intrinsic motivation baselines trained using one of four different training regimes enumerated in Section 4.3. For each baseline, we train on KCMedium and OMmedium, and use the best hyperparameters for each task (for that particular baseline and training regime) to train it on the remaining harder versions of those environments (i.e. on KChard and KCharder or OMmedhard and OMhard, respectively).
275
+
276
+ For IMPALA, the numbers reported for KCmedium and OMmedium are from the experiments in Raileanu & Rocktaschel (2020), while the numbers for the harder environments are presumed to ¨ be .00 because IMPALA fails to train on simpler environments.
277
+
278
+ As a sanity check, we also verified that ASP learns successfully in easier environments not considered here, such as MiniGrid-Empty-Random-5x5-v0, and MiniGrid-KeyCorridorS3R1-v0, to validate the official PyTorch implementation.
279
+
280
+ Tables 2–5 indicate that the best training regime for the intrinsic motivation baselines (for all the tasks they can reliably solve) is the one that uses a partially observed intrinsic reward and a partially observed policy (Table 5). When the intrinsic reward is based on a full view of the environment, Count and RND will consider almost all states to be ”novel” since the environment is procedurallygenerated. Thus, the reward they provide will not be very helpful for the agent since it does not transfer knowledge from one episode to another (as is the case in fixed environments (Bellemare et al., 2016; Burda et al., 2019b)). In the case of RIDE and ICM, the change in the full view of the environment produced by one action is typically a single number in the MiniGrid observation. For ICM, this means that the agent can easily learn to predict the next state representation, so the intrinsic reward might vanish early in training leaving the agent without any guidance for exploring (Raileanu & Rocktaschel, 2020). For RIDE, it means that the intrinsic reward will be largely uniform across all ¨ state-action pairs, thus not differentiating between more and less ”interesting” states (which it can do when the intrinsic reward is based on partial observations (Raileanu & Rocktaschel, 2020)). ¨
281
+
282
+ # B HYPERPARAMETER SWEEPS AND BEST VALUES
283
+
284
+ For AMIGO, we grid search over batch size for student and teacher $\in \{ 8 , 3 2 , 1 5 0 \}$ , learning rate for student $\in \{ . 0 0 1 , . 0 0 0 1 \}$ , learning rate for teacher $\in \{ . 0 5 , . 0 1 , . 0 0 0 1 \}$ unroll length $\in \{ 5 0 , 1 0 0 \}$ , entropy cost for student $\in \{ . 0 0 0 5 , . 0 0 1 , . 0 0 0 1 \}$ , entropy cost for teacher $\in \{ . 0 0 1 , . 0 1 , . 0 5 \}$ , embedding dimensions for the observations $\in \{ 5 , 1 0 , 2 0 \}$ , embedding dimensions for the student last linear layer $\in \{ 1 2 8 , 2 5 6 \}$ , and teacher loss function parameters $\alpha$ and $\beta \in \{ 1 . 0 , 0 . 7 , 0 . 5 , 0 . 3 , 0 . 0 \}$ .
285
+
286
+ For RND, RIDE, Count, and ICM, we used learning rate $1 0 ^ { - 4 }$ , batch size 32, unroll length 100, RMSProp optimizer with $\epsilon = 0 . 0 1$ and momentum 0, which were the best values found for these methods on MiniGrid tasks by Raileanu & Rocktaschel (2020). We further searched over the ¨ entropy coefficient $\in \{ 0 . 0 0 0 5 , 0 . 0 0 1 , 0 . 0 0 0 1 \}$ and the intrinsic reward coefficient $\in \{ 0 . 1 , 0 . 0 1 , 0 . 5 \}$ on KCmedium and OMmedium. The results reported in Tables 2, 3 and 4 use the best values found from these experiments, while the results reported in Table 5 use the best parameter values reported by Raileanu & Rocktaschel (2020). For ASP, we ran the authors’ implementation using ¨ its reverse mode. We used the defaults for most hyperparameters, grid searching only over sp steps $\in \{ 5 , 1 0 , 2 0 \}$ , sp test rate $\in \{ . 1 , . 5 \}$ , and sp alice entr $\in \{ . 0 0 3 , . 0 3 \}$ .
287
+
288
+ The best hyperparameters for AMIGO and each baseline are reported below:
289
+
290
+ AMIGO: a student batch size of 8, a teacher batch size of 150, a student learning rate of .001, a teacher learning rate of .001, an unroll length of 100, a student entropy cost of .0005, a teacher entropy cost of .01, and observation embedding dimension of 5, a student last layer embedding dimension of 256, and finally, $\alpha = 0 . 7$ and $\beta = 0 . 3$ .
291
+
292
+ RND: partially observed intrinsic reward, partially observed policy, entropy cost of .0005, intrinsic reward coefficient of .1
293
+
294
+ RIDE: for KCmedium, partially observed intrinsic reward, partially observed policy, entropy cost of .0005, intrinsic reward coefficient of .1; for OMmedium: fully observed intrinsic reward, partially observed policy, entropy cost of .0005, intrinsic reward coefficient of .1
295
+
296
+ COUNT: partially observed intrinsic reward, partially observed policy, entropy cost of .0005, intrinsic reward coefficient of .1
297
+
298
+ ICM: for KCmedium, partially observed intrinsic reward, fully observed policy, entropy cost of .0005, intrinsic reward coefficient of .1; for OMmedium: partially observed intrinsic reward, partially observed policy, entropy cost of .0005, intrinsic reward coefficient of .1
299
+
300
+ ASP: Best performing hyperparameters (in the easier environments) were 10 sp steps, a sp test rate of .5, and Alice entropy of .003. All other hyperparameters used the defaults in the codebase.
301
+
302
+ # C SAMPLE EFFICIENCY
303
+
304
+ We show, in Figure 4, the mean extrinsic reward over time during training for the best configuration of the various methods. The first row consists of intermediately difficult environments in which different forms of intrinsic motivation perform similarly, the first two evironments require less than 30 million steps while OMmedhard and the three more challenging environments of the bottom rows require in the order of hundreds of millions of frames. Any plot where a method’s line is not visible indicates that the method is consistently failing to reach reward states throughout its training.
305
+
306
+ ![](images/a6b40ead26a386109d1cbd550baeca1a3fbc0589a39a1b1fc929c1814ea4ceef.jpg)
307
+ Figure 4: Reward curves over training time comparing AMIGO to competing methods and baselines. The y-axis shows the Mean Extrinsic Reward (performance) obtained in two medium and four harder different environments, shown for 30M and 500M frames respectively.
308
+
309
+ The important point of note here is that on the two easiest environments, KCmedium and OMmedium, agents need about 10 million steps to converge while on the other four more challenging environments, they need an order of 100 million steps to learn the tasks, showcasing AMIGO’s contributions not just to solving the exploration problem, but also to improving the sample complexity of agent training.
310
+
311
+ # D ABLATION STUDY
312
+
313
+ To further explore the effectiveness and robustness of our method, in this subsection we investigate the alternative criteria discussed in Section 3.4. We compare the FULL MODEL with its ablations and alternatives consisting of removing the extrinsic bonus (NOEXTRINSIC), removing the environment change bonus (NOENVCHANGE), adding a novelty bonus( WITHNOVELTY).
314
+
315
+ We also considered two alternative reward forms for the teacher to provide a more continuous and gradual reward than the previously introduced “all or nothing” threshold. We consider a Gaussian $\bar { p } \sim \mathrm { N o r m a l } ( t ^ { * } , \sigma )$ reward around the target threshold $t ^ { * }$ :
316
+
317
+ $$
318
+ r ^ { T } = { \left\{ \begin{array} { l l } { - 1 } & { { \mathrm { i f } } \quad t ^ { + } = 0 } \\ { 1 + \log _ { p } ( t ^ { + } ) - \log _ { p } ( t ^ { * } ) } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
319
+ $$
320
+
321
+ and a Linear-Exponential reward which grows linearly towards the threshold and then decays exponentially as the goal proposed becomes too hard (as measured according to the number of steps):
322
+
323
+ $$
324
+ r ^ { T } = \left\{ \begin{array} { l l } { e ^ { - ( t ^ { + } - t ^ { * } ) / c } } & { \mathrm { i f } \quad t ^ { + } \geq t ^ { * } } \\ { t ^ { + } / t ^ { * } } & { \mathrm { i f } \quad t ^ { + } < t ^ { * } } \end{array} \right.
325
+ $$
326
+
327
+ We report these two alternative forms of reward as (GAUSSIAN and LINEAR-EXPONENTIAL) in the study below.
328
+
329
+ Table 6: Ablations and Alternatives. Number of steps (in millions) for models to learn to reach its final level of reward in the different environments (0 means the model did not learn to get any extrinsic reward). FULL MODEL is the main algorithm described above. NOEXTRINSIC does not provide any extrinsic reward to the teacher. NOENVCHANGE removes the reward for selecting goals that change as a result of episode resets. WITHNOVELTY adds a novelty bonus that decreases depending on the number of times an object has been successfully proposed. GAUSSIAN and LINEAR-EXPONENTIAL explore alternative reward functions for the teacher.
330
+
331
+ <table><tr><td rowspan="2">Model</td><td colspan="3">Medium Difficulty Environments</td><td colspan="3">Hard Environments</td></tr><tr><td>KCmedium</td><td>OMmedium</td><td>OMmedhard</td><td>KChard</td><td>KCharder</td><td>OMhard</td></tr><tr><td>FULL MODEL</td><td>7M</td><td>8M</td><td>320M</td><td>140M</td><td>300M</td><td>370M</td></tr><tr><td>NOEXTRINSIC</td><td>240M</td><td>50M</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>NoENVCHANGE</td><td>400M</td><td>37M</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>WITHNOVELTY</td><td>15M</td><td>20M</td><td>350M</td><td>100M</td><td>370M</td><td>0</td></tr><tr><td>GAUSSIAN</td><td>320M</td><td>60M</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>LINEAR-EXP</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></table>
332
+
333
+ Performance is shown in Table 6 where the number of steps needed to converge (to the final extrinsic reward) is reported. A positive number means the model learned to solve the task, while 0 means the model did not manage to get any extrinsic reward. For all models we encourage goal diversity on the teacher with a high entropy coefficient of .05 (as compared to .0005 of the student).
334
+
335
+ As the table shows, removing the extrinsic reward or the environment change bonus severely hurts the model, making it unable to solve the harder environments. The novelty bonus was minimally beneficial in one of the environments (namely KChard) but slightly ineffective on the others. The more gradual reward forms considered are not robust to the learning dynamics and often result in the system going into rabbit holes where the algorithm learns to propose goals which provide sub-optimal rewards, thus not helping to solve the actual task. Best results across all environments in our Full Model were obtained using the simple threshold reward function along with entropy regularization and in combination with the extrinsic reward and changing bonuses, but without the novelty bonus.
336
+
337
+ # E QUALITATIVE ANALYSIS
338
+
339
+ To better understand the learning dynamics of AMIGO, Figure 5 shows the intrinsic reward throughout training received by the student (top panel) as well as the teacher (middle panel). The bottom panel shows the difficulty of the proposed goals as measured by the target threshold $t ^ { * }$ used by the teacher (described in Section 3). The trajectories reflect interesting and complex learning dynamics.
340
+
341
+ For visualization purposes we divide this learning period into five phases: Phase 1: The student slowly becomes able to reach intrinsic goals with minimal difficulty. The teacher first learns to propose easy nearby goals. Phase 2: Once the student learns how to reach nearby goals, the adversarial dynamics cause a drop in the teacher reward which is then forced to explore and propose harder goals. Phase 3: An equilibrium is found in which the student is forced to learn to reach more challenging goals.
342
+
343
+ ![](images/23234f339c1ff33615e3c985e089af4c155b41771ed259ef35dbb2356302a49b.jpg)
344
+ Figure 5: An example of a learning trajectory on OMhard, one of the most challenging environments. Despite the lack of extrinsic reward, the panels show the dynamics of the intrinsic rewards for the student (top panel), for the teacher (middle panel), and the difficulty of the goals captured as $t ^ { * }$ (bottom panel).
345
+
346
+ Phase 4: The student becomes too capable again and the teacher is forced to increase the difficulty of the proposed goals. Phase 5: The difficulty reaches a state where it induces a new equilibrium in which the student is unable to reach the goals and forced to improve its student.
347
+
348
+ AMIGO generates diverse and complex learning dynamics that lead to constant improvements of the agent’s policy. In some phases, both components benefit from learning in the environment (as is the case during the first phase), while some phases are completely adversarial (fourth phase), and some phases require more exploration from both components (i.e. third and fifth phases).
349
+
350
+ Figure 3, presented in Section 4.4, further exemplifies a typical curriculum in which the teacher learns to propose increasingly harder goals. The examples show some of the typical goals proposed at different learning phases. First, the teacher proposes nearby goals. After some training, it learns to propose goals that involve traversing rooms and opening doors. Eventually, the teacher proposes goals which involve interacting with different objects. Despite the increasing capacity of the agent to interact with the environment, OMhard remains a challenging task and AMIGO learns to solve it in only one of the five runs.
351
+
352
+ # F GOAL EXAMPLES
353
+
354
+ Figure 6 shows examples of goals proposed by the agent during different stages of learning. Typically, in early stages the teacher learns to propose easy nearby goals. As learning progresses it is incentivized to proposed farther away goals that often involve traversing rooms and opening doors. Finally, in later stages the agent often learns to propose goals that involve removing obstacles and interacting with objects. We often observe this before the policy achieves any extrinsic reward.
355
+
356
+ ![](images/ce729c67c01419f8984690f3e1639860adb59c049ea84f2607f7bf317141925a.jpg)
357
+ Figure 6: Some examples of goals during early, mid, and late stages of learning (examples for KCmedium, OMhard and OMmedium are first, second, and third rows respectively). The red triangle is the agent, the red square is the goal proposed by the teacher, and the blue ball is the extrinsic goal.
parse/train/ETBc_MIMgoX/ETBc_MIMgoX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ETBc_MIMgoX/ETBc_MIMgoX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ETBc_MIMgoX/ETBc_MIMgoX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1lefTEKDS/H1lefTEKDS.md ADDED
@@ -0,0 +1,514 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BENCHMARKING MODEL-BASED REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Model-based reinforcement learning (MBRL) is widely seen as having the potential to be significantly more sample efficient than model-free RL. However, research in model-based RL has not been very standardized. It is fairly common for authors to experiment with self-designed environments, and there are several separate lines of research, which are sometimes closed-sourced or not reproducible. Accordingly, it is an open question how these various existing algorithms perform relative to each other. To facilitate research in MBRL, in this paper we gather a wide collection of MBRL algorithms and propose over 18 benchmarking environments specially designed for MBRL. We benchmark these algorithms with unified problem settings, including noisy environments. Beyond cataloguing performance, we explore and unify the underlying algorithmic differences across MBRL algorithms. We characterize three key research challenges for future MBRL research: the dynamics bottleneck, the planning horizon dilemma, and the early-termination dilemma. Finally, to facilitate future research on MBRL, we open-source our benchmark1.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Reinforcement learning (RL) algorithms are most commonly classified in two categories: model-free RL (MFRL), which directly learns a value function or a policy by interacting with the environment, and model-based RL (MBRL), which uses interactions with the environment to learn a model of it. While model-free algorithms have achieved success in areas including robotics (Lillicrap et al., 2015; Schulman et al., 2017; Heess et al., 2017; Andrychowicz et al., 2018), video-games (Mnih et al., 2013; 2016), and character animation (Peng et al., 2018), their high sample complexity limits largely their application to simulated domains. By learning a model of the environment, model-based methods learn with significantly lower sample complexity. However, learning an accurate model of the environment has proven to be a challenging problem in certain domains. Modelling errors cripple the effectiveness of these algorithms, resulting in policies that exploit the deficiencies of the models, which is known as model-bias (Deisenroth & Rasmussen, 2011). Recent approaches have been able to alleviate the model-bias problem by characterizing the uncertainty of the learned models by the means of probabilistic models and ensembles. This has enabled model-based methods to match model-free asymptotic performance in challenging domains while using much fewer samples (Kurutach et al., 2018; Chua et al., 2018; Clavera et al., 2018).
12
+
13
+ These recent advances have led to a great excitement in the field of model-based reinforcement learning. Despite the impressive results achieved, how these methods compare against each other and against standard baselines remains unclear. Reproducibility and lack of open-source code are persistent problems in RL (Henderson et al., 2018; Islam et al., 2017), which makes it difficult to compare novel algorithms against prior lines of research. In MBRL, this problem is exacerbated by the modifications made to the environments: pre-processing of the observations, modification of the reward functions, or using different episode horizons. Such lack of standardized implementations and environments in MBRL makes it difficult to quantify scientific progress.
14
+
15
+ Systematic evaluation and comparison will not only further our understanding of the strengths and weaknesses of existing algorithms, but also reveal their limitations and suggest directions for future research. Benchmarks play a crucial role in other fields of research. For instance, MFRL has benefited greatly from the introduction of benchmarking code bases and environments such as rllab (Duan et al., 2016), OpenAI Gym (Brockman et al., 2016), and DM Control Suite (Tassa et al., 2018); where the latter two have been the de facto benchmarking platforms. Besides RL, benchmarking platforms have also accelerated areas such as computer vision (Deng et al., 2009; Lin et al., 2014), machine translation (Koehn et al., 2007) and speech recognition (Panayotov et al., 2015).
16
+
17
+ In this paper, we benchmark 11 MBRL algorithms and 4 MFRL algorithms across 18 environments based on the standard OpenAI Gym (Brockman et al., 2016). The environments, designed to hold the common assumptions in model-based methods, range from simple 2D tasks, such as Cart-Pole, to complex domains that are usually not evaluated on, such as Humanoid. The benchmark is further extended by characterizing the robustness of the different methods when stochasticity in the observations and actions is introduced. Based on the empirical evaluation, we propose three main causes that stagnate the performance of model-based methods: 1) Dynamics bottleneck: algorithms with learned dynamics are stuck at performance local minima significantly worse than using groundtruth dynamics, i.e. the performance does not increase when more data is collected. 2) Planning horizon dilemma: while increasing the planning horizon provides more accurate reward estimation, it can result in performance drops due to the curse of dimensionality and modelling errors. 3) Early termination dilemma: early termination is commonly used in MFRL for more directed exploration, to achieve faster learning. However, similar performance gain are not yet observed in MBRL algorithms, which limits their effectiveness in complex environments.
18
+
19
+ # 2 PRELIMINARIES
20
+
21
+ We formulate all of our tasks as a discrete-time finite-horizon Markov decision process (MDP), which is defined by the tuple $( \mathcal S , \mathcal A , p , r , \rho _ { 0 } , \gamma , H )$ . Here, $s$ denotes the state space, $\mathcal { A }$ denotes the action space, $p ( s ^ { \prime } | { a } , { s } ) : \mathcal { S } \times \mathcal { A } \times \mathcal { S } [ 0 , 1 ]$ is transition dynamics density function, $r ( s , a , s ^ { \prime } ) :$ $S \times \mathcal { A } \times \mathcal { S } \mathbb { R }$ defines the reward function, $\rho _ { 0 }$ is the initial state distribution, $\gamma$ is the discount factor, and $H$ is the horizon of the problem. Contrary to standard model-free RL, we assume access to an analytic differentiable reward function. The aim of RL is to learn an optimal policy maximizes the expected total reward $\begin{array} { r } { J ( \pi ) = \mathbb { E } _ { a _ { t } \sim \pi } [ \sum _ { t = 1 } ^ { H } \gamma ^ { t } r ( s _ { t } , a _ { t } ) ] } \end{array}$ . $\pi$ that
22
+
23
+ Dynamics Learning: MBRL algorithms are characterized by learning a model of the environment. After repeated interactions with the environment, the experienced transitions are stored in a dataset $\mathcal { D } = \{ ( s _ { t } , a _ { t } , s _ { t + 1 } ) \}$ which is then used to learn a dynamics function $\tilde { f } _ { \phi }$ . In the case where ground-truth dynamics are deterministic, the learned dynamics function $\tilde { f } _ { \phi }$ predicts the next state. In stochastic settings, it is common to represent the dynamics with a Gaussian distribution, i.e., $p ( \boldsymbol { s } _ { t + 1 } | \boldsymbol { a } _ { t } , \boldsymbol { s } _ { t } ) \sim \mathcal { N } ( \mu ( \boldsymbol { s } _ { t } , \boldsymbol { a } _ { t } ) , \Sigma ( \boldsymbol { s } _ { t } , \boldsymbol { a } _ { t } ) )$ and the learned dynamics model corresponds to $\tilde { f } _ { \phi } =$ $( \tilde { \mu } _ { \phi } ( s _ { t } , a _ { t } ) , \tilde { \Sigma } _ { \phi } ( s _ { t } , a _ { t } ) )$ .
24
+
25
+ # 3 ALGORITHMS
26
+
27
+ In this section, we introduce the benchmarked MBRL algorithms, which are divided into: 1) Dynastyle Algorithms, 2) Policy Search with Backpropagation through Time, and 3) Shooting Algorithms.
28
+
29
+ # 3.1 DYNA-STYLE ALGORITHMS
30
+
31
+ In the Dyna algorithm (Sutton, 1990; 1991a;b), training iterates between two steps. First, using the current policy, data is gathered from interaction with the environment and then used to learn the dynamics model. Second, the policy is improved with imagined data generated by the learned model. Dyna algorithms learn policies using model-free algorithms with rich imaginary experience without interaction with the real environment. Dyna can also be applied to tasks with image input as in world models (Ha & Schmidhuber, 2018a;b).
32
+
33
+ Model-Ensemble Trust-Region Policy Optimization (ME-TRPO) (Kurutach et al., 2018): Instead of using a single model, ME-TRPO uses an ensemble of neural networks to model the dynamics, which effectively combats model-bias. The ensemble $\tilde { f } _ { \phi } = \{ \tilde { f } _ { \phi _ { 1 } } , . . . , \tilde { f } _ { \phi _ { K } } \}$ is trained using standard squared L2 loss. In the policy improvement step, the policy is updated using Trust-Region Policy
34
+
35
+ Optimization (TRPO) (Schulman et al., 2015), on experience generated by the learned dynamics models.
36
+
37
+ Stochastic Lower Bound Optimization (SLBO) (Luo et al., 2019): SLBO is a variant of ME-TRPO with theoretical guarantees of monotonic improvement. In practice, instead of using single-step squared L2 loss, SLBO uses a multi-step L2-norm loss to train the dynamics.
38
+
39
+ Model-Based Meta-Policy-Optimzation (MB-MPO) (Clavera et al., 2018): MB-MPO forgoes the reliance on accurate models by meta-learning a policy that is able to adapt to different dynamics. Similar to ME-TRPO, MB-MPO learns an ensemble of neural networks. However, each model in the ensemble is considered as a different task to meta-train (Finn et al., 2017) on. MB-MPO meta-trains a policy that quickly adapts to any of the different dynamics of the ensemble, which is more robust against model-bias.
40
+
41
+ # 3.2 POLICY SEARCH WITH BACKPROPAGATION THROUGH TIME
42
+
43
+ Contrary to Dyna-style algorithms, where the learned dynamics models are used to provide imagined data, policy search with backpropagation through time exploits the model derivatives. Consequently, these algorithms are able to compute the analytic gradient of the RL objective with respect to the policy, and improve the policy accordingly.
44
+
45
+ Probabilistic Inference for Learning Control (PILCO) (Deisenroth & Rasmussen, 2011; Deisenroth et al., 2015; Kamthe & Deisenroth, 2017): In PILCO, Gaussian processes (GPs) are used to model the dynamics of the environment. The dynamics model $f _ { \mathcal { D } } ( s _ { t } , a _ { t } )$ is a probabilistic and nonparametric function of the collected data $\mathcal { D }$ . The policy $\pi _ { \theta }$ is trained to maximize the RL objective by computing the analytic derivatives of the objective with respect to the policy parameters $\theta$ . The training process iterates between collecting data using the current policy and improving the policy. Inference in GPs does not scale in high dimensional environments, limiting its application to simpler domains.
46
+
47
+ Iterative Linear Quadratic-Gaussian (iLQG) (Tassa et al., 2012): In iLQG, the ground-truth dynamics are assumed to be known by the agent. The algorithm uses a quadratic approximation on the RL reward function and a linear approximation on the dynamics, converting the problem solvable by linear-quadratic regulator (LQR) (Bemporad et al., 2002). By using dynamic programming, the optimal controller for the approximated problem is a linear time-varying controller. iLQG is a model predictive control (MPC) algorithm, where re-planning is performed at each time-step.
48
+
49
+ Guided Policy Search (GPS) (Levine & Abbeel, 2014; Levine et al., 2015; Zhang et al., 2016; Finn et al., 2016b; Montgomery & Levine, 2016; Chebotar et al., 2017): Guided policy search essentially distills the iLQG controllers $\pi _ { \mathcal { G } }$ into a neural network policy $\pi _ { \theta }$ by behavioural cloning, which minimizes $\mathbb { E } [ D _ { \mathrm { K L } } ( \pi _ { \mathcal { G } } ( \cdot | s _ { t } ) \| \pi _ { \theta } ) ]$ . The dynamics are modelled to be Gaussian-linear time-varying. To prevent over-confident policy improvement that deviates from the last real-world trajectory, the reward function is augmented as $\tilde { r } ( s _ { t } , a _ { t } ) = r ( s _ { t } , a _ { t } ) - \eta D _ { \mathrm { K L } } ( \pi _ { \mathcal { G } } ( \cdot | s _ { t } ) | | p ( \cdot | s _ { t } ) )$ , where $p ( \cdot | s _ { t } )$ is the passive dynamics distribution from last trajectories. In this paper, we use the MD-GPS variant (Montgomery & Levine, 2016).
50
+
51
+ Stochastic Value Gradients (SVG) (Heess et al., 2015): SVG tackles the problem of compounding model errors by using observations from the real environment, instead of the imagined one. To accommodate mismatch between model predictions and real transitions, the dynamics models in SVG are probabilistic. The policy is improved by computing the analytic gradient of the real trajectories with respect to the policy. Re-parametrization trick is used to permit back-propagation through the stochastic sampling.
52
+
53
+ # 3.3 SHOOTING ALGORITHMS
54
+
55
+ This class of algorithms provide a way to approximately solve the receding horizon problem posed in model predictive control (MPC) when dealing with non-linear dynamics and non-convex reward functions. Their popularity has increased with the use of neural networks for modelling dynamics.
56
+
57
+ Random Shooting (RS) (Richards, 2005; Rao, 2009): RS optimizes the action sequence $\mathbf { } _ { \mathbf { } } \mathbf { } \mathbf { } a _ { t : t + \tau }$ d planning reward under the l. In particular, the agent generates ned dynamics model, i.e.,candidate random sequences $\begin{array} { r } { \operatorname* { m a x } _ { a _ { t : t + \tau } } \mathbb { E } _ { s _ { t } ^ { \prime } \sim \tilde { f } _ { \phi } } [ \sum _ { t ^ { \prime } = t } ^ { t + \tau } r ( s _ { t } ^ { \prime } , a _ { t } ^ { \prime } ) ] } \end{array}$ $K$
58
+
59
+ of actions from a uniform distribution, and evaluates each candidate using the learned dynamics. The optimal action sequence is approximated as the one with the highest return. A RS agent only applies the first action from the optimal sequence and re-plans at every time-step.
60
+
61
+ Mode-Free Model-Based (MB-MF) (Nagabandi et al., 2017): Generally, random shooting has worse asymptotic performance when compared with model-free algorithms. In MB-MF, the authors first train a RS controller $\pi _ { R S }$ , and then distill the controller into a neural network policy $\pi _ { \theta }$ using DAgger (Ross et al., 2011), which minimizes $D _ { \mathrm { K L } } ( \pi _ { \theta } ( s _ { t } ) , \pi _ { R S } )$ . After the policy distillation step, the policy is fine-tuned using standard model-free algorithms. In particular the authors use TRPO (Schulman et al., 2015).
62
+
63
+ Probabilistic Ensembles with Trajectory Sampling (PETS-RS and PETS-CEM) (Chua et al., 2018): In the PETS algorithm, the dynamics are modelled by an ensemble of probabilistic neural networks models, which captures both epistemic uncertainty from limited data and network capacity, and aleatoric uncertainty from the stochasticity of the ground-truth dynamics. PETS-RS is the same as RS except for different modeling of the dynamics. In PETS-CEM, the online optimization problem is solved using cross-entropy method (CEM) (De Boer et al., 2005; Botev et al., 2013) to obtain a better solution. PETS-CEM can also plan in latent space of image observations (Hafner et al., 2018).
64
+
65
+ # 3.4 MODEL-FREE BASELINES
66
+
67
+ In our benchmark, we include MFRL baselines to quantify the sample complexity and asymptotic performance gap between MFRL and MBRL. Specifically, we compare against representative MFRL algorithms including Trust-Region Policy Optimization (TRPO) (Schulman et al., 2015), Proximal-Policy Optimization (PPO) (Schulman et al., 2017; Heess et al., 2017), Twin Delayed Deep Deterministic Policy Gradient (TD3) (Fujimoto et al., 2018), and Soft Actor-Critic (SAC) (Haarnoja et al., 2018). The former two are state-of-the-art on-policy MFRL algorithms, and the latter two are considered the state-of-the-art off-policy MFRL algorithms.
68
+
69
+ # 4 EXPERIMENTS
70
+
71
+ In this section, we present the results of our benchmarking and examine the causes that stagnate the performance of MBRL methods. Specifically, we designed the benchmark to answer the following questions: 1) How do existing MBRL approaches compare against each other and against MFRL methods across environments with different complexity (Section 4.3)? 2) Are MBRL algorithms robust against observation and action noise (Section 4.4)? and 3) What are the main bottlenecks in the MBRL methods?
72
+
73
+ Aiming to answer the last question, we present three phenomena inherent of MBRL methods, which we refer to as dynamics bottleneck (Section 4.5), planning horizon dilemma (Section 4.6), and early termination dilemma (Section 4.7).
74
+
75
+ # 4.1 BENCHMARKING ENVIRONMENTS
76
+
77
+ Our benchmark consists of 18 environments with continuous state and action space based on OpenAI Gym (Brockman et al., 2016). We include a full spectrum of environments with different difficulty and episode length, from CartPole to Humanoid. More specifically, we have the following modifications:
78
+
79
+ To accommodate traditional MBRL algorithms such as iLQG and GPS, we modify the reward function so that the gradient with respect to observation always exists or can be approximated. • We note that early termination has not been applied in MBRL, and we specifically have both the raw environments and the variants with early termination, indicated by the suffix ET. • The original Swimmer-v0 in OpenAI Gym was unsolvable for all algorithms. Therefore, we modified the position of the velocity sensor so that it’s easier to solve. We name this easier version as Swimmer while still keep the original one as a reference, named as Swimmer-v0.
80
+
81
+ For a detailed description of the environments and the reward functions used, we refer readers to Appendix A. We also provide open-sourced version of the tasks based on Roboschool or Pybullet (AMD, 2014; Ellenberger, 2018; Klimov & Schulman, 2017), which we refer to Appendix H.
82
+
83
+ ![](images/a951a6a48489a48e1f3603dfab4693bcc0c9c6a551a874009d4cd4eb548441f1.jpg)
84
+ Figure 1: A subset of all 18 performance curve figures of the bench-marked algorithms. All the algorithms are run for 200k time-steps and with 4 random seeds. The remaining figures are in appendix C.
85
+
86
+ # 4.2 EXPERIMENT SETUP
87
+
88
+ Performance Metric and Hyper-parameter Search: Each algorithm is run with 4 random seeds. In the learning curves, the performance is averaged with a sliding window of 5 algorithm iterations. The error bars were plotted by the default Seaborn (Waskom, 2010) smoothing scheme from the mean and standard deviation of the results. Similarly, in the tables, we show the performance averaged across different random seeds with a window size of 5000 time-steps. We perform a grid search for each algorithm separately, which is summarized in appendix B. For each algorithm, We show the results using the hyper-parameters producing the best average performance.
89
+
90
+ Training Time: In MFRL, 1 million time-step training is common, but for many environments, MBRL algorithms converge much earlier than $2 0 0 \mathrm { k }$ time-steps and it takes an impractically long time to train for 1 million time-steps for some of the MBRL algorithms. We therefore show both the performance of $2 0 0 \mathrm { k }$ time-step training for all algorithms and show the performance of 1M time-step training for algorithms where computation is not a major bottleneck.
91
+
92
+ # 4.3 BENCHMARKING PERFORMANCE
93
+
94
+ In Table 1, we summarize the performance of each algorithm trained with 200,000 time-steps. We also include some representative performance curves in Figure 1. The learning curves for all the environments can be seen in appendix C. The engineering statistics shown in Table 2 include the computational resources, the estimated wall-clock time, and whether the algorithm is fast enough to run at real-time at test time, namely, if the action selection can be done faster than the default time-step of the environment. In Table 5, we summarize the performance ranking.
95
+
96
+ Shooting Algorithms: RS is very effective on simple tasks such as InvertedPendulum, CartPole and Acrobot, but as task difficulty increases RS gradually gets surpassed by PETS-RS and PETS-CEM, which indicates that modelling uncertainty aware dynamics is crucial for the performance. At the same time, PETS-CEM is better than PETS-RS in most of the environments, showing the importance of an effective planning module. However, PETS-CEM search is not as effective as PETS-RS in Ant, Walker2D and SlimHumanoid, indicating that we need more expressive and general planning module for more complex environments. MB-MF does not have obvious gains compared to other shooting algorithms, but like other model-free controllers, MB-MF can jump out of performance local-minima in MountainCar. Shooting algorithms are effective and robust across different environments.
97
+
98
+ Dyna-Style Algorithms: MB-MPO surpasses the performance of ME-TRPO in most of the environments and achieves the best performance in domains like HalfCheetah. Both algorithms seems to perform the best when the horizon is short. SLBO can solve MountainCar and Reacher very efficiently, but more interestingly in complex environment it achieves better performance than ME-TRPO and MB-MPO, except for in SlimHumanoid. This category of algorithms is not efficient to solve long horizon complex domains due to the compounding error effect.
99
+
100
+ SVG: For the majority of the tasks, SVG does not have the best sample efficiency. But for Humanoid environments, SVG is very effective compared with other MBRL algorithms. Complex environments exacerbate compounding errors; SVG which uses real observations and a value function to look into future returns, is able to surpass other MBRL algorithms in these high-dimensional domains.
101
+
102
+ Table 1: Final performance for 18 environments of the bench-marked algorithms. All the algorithms are run for $2 0 0 \mathrm { k }$ time-steps. Blue refers to the best methods using ground truth dynamics, red to the best MBRL algorithms, and green to the best MFRL algorithms. The results show the mean and standard deviation averaged over 4 random seeds and a window size of 5000 times-steps. "GT" indicates the model is using the ground-truth dynamics.
103
+
104
+ <table><tr><td></td><td>Pendulum</td><td>InvertedPendulum</td><td>Acrobot</td><td>CartPole</td><td>Mountain Car</td><td>Reacher</td></tr><tr><td>Random</td><td>-202.6 ± 249.3</td><td>-205.1 ± 13.6</td><td>-374.5 ± 17.1</td><td>38.4±32.5</td><td>-105.1 ± 1.8</td><td>-45.7 ± 4.8</td></tr><tr><td>ILQG</td><td>160.8 ± 29.8</td><td>-0.0±0.0</td><td>-195.5± 28.7</td><td>199.3 ± 0.6</td><td>-55.9 ± 8.3</td><td>-6.0± 2.6</td></tr><tr><td>GT-CEM</td><td>170.5 ± 35.2</td><td>-0.2 ± 0.1</td><td>13.9 ± 40.5</td><td>199.9 ± 0.1</td><td>-58.0 ± 2.9</td><td>-3.6 ± 1.2</td></tr><tr><td>GT-RS</td><td>171.5 ± 31.8</td><td>-0.0 ± 0.0</td><td>2.5 ± 39.4</td><td>200.0 ±0.0</td><td>-68.5 ± 2.2</td><td>-25.7 ± 3.5</td></tr><tr><td>RS</td><td>164.4 ± 9.1</td><td>-0.0± 0.0*</td><td>-4.9 ± 5.4</td><td>200.0 ± 0.0*</td><td>-71.3± 0.5</td><td>-27.1± 0.6</td></tr><tr><td>MB-MF</td><td>157.5 ± 13.2</td><td>-182.3 ± 24.4</td><td>-92.5 ± 15.8</td><td>199.7 ± 1.2</td><td>4.2 ± 18.5</td><td>-15.1 ± 1.7</td></tr><tr><td></td><td>167.4 ± 53.0</td><td>-20.5± 28.9</td><td>12.5 ± 29.0*</td><td>199.5 ± 3.0</td><td>-57.9± 3.6</td><td>-12.3± 5.2</td></tr><tr><td>PETS-CEM</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PETS-RS</td><td>167.9 ± 35.8</td><td>-12.1 ± 25.1</td><td>-71.5 ± 44.6</td><td>195.0 ± 28.0</td><td>-78.5 ± 2.1</td><td>-40.1± 6.9</td></tr><tr><td>ME-TRPO</td><td>177.3 ± 1.9*</td><td>-126.2 ± 86.6</td><td>-68.1 ±6.7</td><td>160.1 ± 69.1</td><td>-42.5 ± 26.6</td><td>-13.4 ±0.2</td></tr><tr><td>GPS</td><td>162.7 ± 7.6</td><td>-74.6 ± 97.8</td><td>-193.3 ± 11.7</td><td>14.4 ±18.6</td><td>-10.6 ± 32.1</td><td>-19.8 ± 0.9</td></tr><tr><td>PILCO</td><td>166.1 ± 23.0</td><td>-1.5 ± 1.6</td><td>-394.4 ± 1.4 -79.7± 6.6</td><td>196.1 ± 13.3</td><td>-59.0 ± 4.6 -27.6± 32.6</td><td>-13.2 ± 5.9</td></tr><tr><td>SVG</td><td>141.4 ± 62.4 171.2 ± 26.9</td><td>-183.1 ± 9.0 -0.0 ± 0.0*</td><td>-87.8 ± 12.9</td><td>82.1± 31.9 199.3 ± 2.3</td><td>-30.6± 34.8</td><td>-11.0 ± 1.0 -5.6 ± 0.8</td></tr><tr><td>MB-MPO SLBO</td><td>173.5 ± 2.5</td><td>-240.4 ± 7.2</td><td>-75.6±8.8</td><td>78.0 ± 166.6</td><td>44.1 ± 6.8</td><td>-4.1 ± 0.1*</td></tr><tr><td></td><td>163.4 ± 8.0</td><td>-40.8±21.0</td><td>-95.3±8.9</td><td>86.5±7.8</td><td>21.7± 13.1</td><td></td></tr><tr><td>PPO TRPO</td><td>166.7 ± 7.3</td><td>-27.6 ± 15.8</td><td>-147.5 ± 12.3</td><td>47.3 ± 15.7</td><td>-37.2 ± 16.4</td><td>-17.2 ± 0.9 -10.1± 0.6</td></tr><tr><td>TD3</td><td>161.4 ± 14.4</td><td>-224.5± 0.4</td><td>-64.3± 6.9</td><td>196.0 ± 3.1</td><td>-60.0 ± 1.2</td><td>-14.0 ±0.9</td></tr><tr><td>SAC</td><td>168.2 ± 9.5</td><td>-0.2 ± 0.1</td><td>-52.9 ± 2.0</td><td>199.4 ± 0.4</td><td>52.6 ± 0.6*</td><td>-6.4 ± 0.5</td></tr><tr><td></td><td>HalfCheetah</td><td>Swimmer-v0</td><td>Swimmer</td><td>Ant</td><td>Ant-ET</td><td>Walker2D</td></tr><tr><td>Random</td><td>-288.3± 65.8</td><td>1.2 ± 11.2</td><td>-9.5± 11.6</td><td>473.8± 40.8</td><td>124.6 ± 145.0</td><td></td></tr><tr><td>iLQG</td><td>2142.6 ± 137.7</td><td>47.8 ± 2.4</td><td>306.7±0.8</td><td>9739.8 ± 745.0</td><td>1506.2 ± 459.4</td><td>-2456.9± 345.3</td></tr><tr><td>GT-CEM</td><td>14777.2 ± 13964.2</td><td>111.0 ± 4.6</td><td>335.9 ± 1.1</td><td>12115.3 ± 209.7</td><td>226.0± 178.6</td><td>-1186.2 ± 126.3 7719.7 ± 486.7</td></tr><tr><td>GT-RS</td><td>815.7 ± 38.5</td><td>35.8±3.0</td><td>42.2 ±5.3</td><td>2709.1 ± 631.1</td><td>2519.0 ± 469.8</td><td>-1641.4 ± 137.6</td></tr><tr><td>RS</td><td>421.0 ± 55.2</td><td>31.1 ± 2.0</td><td>92.8±8.1</td><td>535.5± 37.0</td><td>239.9 ± 81.7</td><td></td></tr><tr><td>MB-MF</td><td>126.9 ± 72.7</td><td>51.8±30.9</td><td>284.9 ± 25.1</td><td>134.2 ± 50.4</td><td>85.7± 27.7</td><td>-2060.3 ± 228.0 -2218.1 ± 437.7</td></tr><tr><td>PETS-CEM</td><td>2795.3 ± 879.9</td><td>22.1 ± 25.2</td><td>306.3 ± 37.3</td><td>1165.5 ± 226.9</td><td>81.6 ± 145.8</td><td>260.2 ± 536.9</td></tr><tr><td>PETS-RS</td><td>966.9 ± 471.6</td><td>42.1 ± 20.2</td><td>170.1 ± 8.1</td><td>1852.1 ± 141.0*</td><td>130.0± 148.1</td><td>312.5 ± 493.4*</td></tr><tr><td>ME-TRPO</td><td>2283.7 ± 900.4</td><td>30.1± 9.7</td><td>336.3 ± 15.8*</td><td>282.2 ± 18.0</td><td>42.6± 21.1</td><td>-1609.3 ± 657.5</td></tr><tr><td>GPS</td><td>52.3 ± 41.7</td><td>14.5 ± 5.6</td><td>-35.3±8.4</td><td>445.5± 212.9</td><td>275.4 ± 309.1</td><td>-1730.8 ± 441.7</td></tr><tr><td>PILCO</td><td>-41.9 ± 267.0</td><td>-13.8 ± 16.1</td><td>-18.7±10.3</td><td>770.7 ± 153.0</td><td>N.A.</td><td>-2693.8 ± 484.4</td></tr><tr><td>SVG</td><td>336.6 ± 387.6</td><td>77.2 ± 99.0</td><td>75.2 ±85.3</td><td>377.9 ± 33.6</td><td>185.0 ± 141.6</td><td>-1430.9 ± 230.1</td></tr><tr><td>MB-MPO</td><td>3639.0 ± 1185.8</td><td>85.0 ± 98.9*</td><td>268.5 ± 125.4</td><td>705.8± 147.2</td><td>30.3± 22.3</td><td>-1545.9 ± 216.5</td></tr><tr><td>SLBO</td><td>1097.7 ± 166.4</td><td>41.6 ± 18.4</td><td>125.2± 93.2</td><td>718.1 ± 123.3</td><td>200.0 ± 40.1</td><td>-1277.7 ± 427.5</td></tr><tr><td>PPO</td><td>17.2 ± 84.4</td><td>38.0 ± 1.5</td><td>306.8±4.2</td><td>321.0 ±51.2</td><td>80.1 ± 17.3</td><td>-1893.6 ± 234.1</td></tr><tr><td>TRPO</td><td>-12.0 ± 85.5</td><td>37.9 ± 2.0</td><td>215.7± 10.4</td><td>323.3 ± 24.9</td><td>116.8 ± 47.3</td><td>-2286.3 ± 373.3</td></tr><tr><td>TD3</td><td>3614.3 ± 82.1</td><td>40.4 ± 8.3</td><td>331.1 ± 0.9</td><td>956.1 ± 66.9</td><td>259.7 ± 1.0</td><td>-73.8 ± 769.0</td></tr><tr><td>SAC</td><td>4000.7 ± 202.1*</td><td>41.2 ± 4.6</td><td>309.8 ± 4.2</td><td>506.7 ± 165.2</td><td>2012.7 ± 571.3*</td><td>-415.9 ± 588.1</td></tr><tr><td></td><td>Walker2D-ET</td><td>Hopper</td><td>Hopper-ET</td><td>SlimHumanoid</td><td>SlimHumanoid-ET</td><td>Humanoid-ET</td></tr><tr><td>Random</td><td>-2.8±4.3</td><td>-2572.7± 631.3</td><td>12.7 ± 7.8</td><td>-1172.9 ± 757.0</td><td>41.8± 47.3</td><td>50.5± 57.1</td></tr><tr><td>iLQG</td><td>229.0 ± 74.7</td><td>1157.6 ± 224.7</td><td>83.4± 21.7</td><td>13225.2 ± 1344.9</td><td>520.0 ± 240.9</td><td>255.0 ± 94.6</td></tr><tr><td>GT-CEM</td><td>254.8 ± 233.4</td><td>3232.3 ± 192.3</td><td>256.8 ± 16.3</td><td>45979.8 ± 1654.9</td><td>1242.7 ± 676.0</td><td>1236.2 ± 668.0</td></tr><tr><td>GT-RS</td><td>207.9 ± 27.2</td><td>-2467.2 ± 55.4</td><td>209.5 ± 46.8</td><td>8074.4 ± 441.1</td><td>361.5 ± 103.8</td><td>312.9 ± 167.8</td></tr><tr><td>RS</td><td>201.1 ± 10.5</td><td>-2491.5 ± 35.1</td><td>247.1 ± 6.1</td><td>-99.2 ± 388.5</td><td>332.8±13.4</td><td>295.5 ± 10.9</td></tr><tr><td>MB-MF</td><td>350.0 ± 107.6</td><td>-1047.4 ± 1098.7</td><td>926.9 ± 154.1</td><td>-1320.2 ± 735.3</td><td>809.7 ± 57.5</td><td>776.8 ± 62.9</td></tr><tr><td>PETS-CEM</td><td>-2.5 ± 6.8</td><td>1125.0 ± 679.6</td><td>129.3 ± 36.0</td><td>1472.4 ± 738.3</td><td>355.1 ± 157.1</td><td>110.8 ± 91.0</td></tr><tr><td>PETS-RS</td><td>-0.8±3.2</td><td>-1469.8 ± 224.1</td><td>205.8 ± 36.5</td><td>2055.1 ± 771.5*</td><td>320.7 ± 182.2</td><td>106.9 ± 102.6</td></tr><tr><td>ME-TRPO</td><td>-9.5± 4.6</td><td>1272.5 ± 500.9</td><td>4.9± 4.0</td><td>-154.9 ± 534.3</td><td>76.1 ±8.8</td><td>72.9 ±8.9</td></tr><tr><td>GPS</td><td>-2400.6 ± 610.8</td><td>-768.5 ± 200.9</td><td>-2303.9 ± 338.1</td><td>-592.6 ± 214.1</td><td>N.A.</td><td>N. A.</td></tr><tr><td>PILCO</td><td>N.A.</td><td>-1729.9 ± 1611.1</td><td>N.A</td><td>N.A</td><td>N.A</td><td>N.A.</td></tr><tr><td>SVG</td><td>252.4 ± 48.4</td><td>-877.9 ± 427.9</td><td>435.2 ± 163.8</td><td>1096.8 ± 791.0</td><td>1084.3 ± 77.0*</td><td>811.8 ± 241.5</td></tr><tr><td>MB-MPO</td><td>-10.3 ± 1.4</td><td>333.2 ± 1189.7</td><td>8.3±3.6</td><td>674.4± 982.2</td><td>115.5 ± 31.9</td><td>73.1 ± 23.1</td></tr><tr><td>SLBO</td><td>207.8 ± 108.7</td><td>-741.7 ± 734.1</td><td>805.7 ± 142.4</td><td>-588.9 ± 332.1</td><td>776.1 ± 252.5</td><td>1377.0 ± 150.4</td></tr><tr><td>PPO</td><td>306.1 ± 17.2</td><td>-103.8 ± 1028.0</td><td>758.0 ± 62.0</td><td>-1466.7 ± 278.5</td><td>454.3 ± 36.7</td><td>451.4 ± 39.1</td></tr><tr><td>TRPO</td><td>229.5 ± 27.1</td><td>-2100.1 ± 640.6</td><td>237.4 ± 33.5</td><td>-1140.9 ± 241.8</td><td>281.3 ± 10.9 1070.0 ± 168.3</td><td>289.8 ±5.2 147.7 ± 0.7</td></tr><tr><td>TD3 SAC</td><td>3299.7 ± 1951.5* 2216.4 ± 678.7</td><td>2245.3 ± 232.4* 726.4 ± 675.5</td><td>1057.1 ± 29.5 1815.5 ± 655.1*</td><td>1319.1 ± 1246.1 1328.4 ± 468.2</td></table>
105
+
106
+ PILCO: PILCO achieves one of the best sample efficiency in low dimentional environments such as Cartpole, Pendulum and InvertedPendulum. But it fails in most other environments with bigger episode length and observation size, being unstable across random seeds and time-consuming to train.
107
+
108
+ GPS: GPS has the best performance in Ant-ET, but cannot match the best algorithms in other environments. In the original GPS, the environment is usually 100 time-step long, while most of our environments are 200 or 1000 time-step. Also GPS assumes several separate constant initial states, while our environments sample the initial state from a distribution. The deviation of trajectories between iterations can be the reason of GPS’s performance drop.
109
+
110
+ <table><tr><td></td><td>RS</td><td>MBMF</td><td>PETS</td><td>PETS-RS</td><td>METRPO</td><td>GPS</td><td>PILCO</td><td>SVG</td><td>MB-MPO</td><td>SLBO</td><td>PPO</td><td>TRPO</td><td>TD3</td><td>SAC</td></tr><tr><td>Reacher2D</td><td>9.23</td><td>4.03</td><td>4.64</td><td>2.68</td><td>4.76</td><td>1.1</td><td>120</td><td>1.61</td><td>30.9</td><td>2.38</td><td>0.02</td><td>0.02</td><td>2.9</td><td>2.38</td></tr><tr><td>Cheetah</td><td>8.83</td><td>4.05</td><td>15.3</td><td>6.76</td><td>5.23</td><td>3.3</td><td>N.A.</td><td>1.41</td><td>57.5</td><td>4.96</td><td>0.04</td><td>0.02</td><td>4.3</td><td>2.21</td></tr><tr><td>Ant</td><td>8.2</td><td>5.25</td><td>6.5</td><td>5.01</td><td>3.46</td><td>5.1</td><td>N.A</td><td>1.49</td><td>55.2</td><td>5.46</td><td>0.07</td><td>0.05</td><td>3.6</td><td>3.15</td></tr><tr><td>Humanoid-ET</td><td>13.9</td><td>5.05</td><td>7.03</td><td>5.1</td><td>5.68</td><td>N.A.</td><td>N.A</td><td>1.92</td><td>41.4</td><td>5.5</td><td>0.05</td><td>0.04</td><td>5.37</td><td>3.35</td></tr><tr><td>Slimhumanoid-ET</td><td>9.5</td><td>3.3</td><td>4.76</td><td>3.35</td><td>2.58</td><td>N.A</td><td>N.A.</td><td>1.06</td><td>41.5</td><td>6.86</td><td>0.03</td><td>0.03</td><td>3.13</td><td>4.05</td></tr><tr><td>Slimhumanoid</td><td>11.73</td><td>4.8</td><td>6.6</td><td>5.06</td><td>2.36</td><td>17.24</td><td>N.A</td><td>1.05</td><td>41.6</td><td>6.8</td><td>0.04</td><td>0.03</td><td>3.95</td><td>3.15</td></tr><tr><td>Real-time testing</td><td>X</td><td>√</td><td>X</td><td>X</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td><td>√</td></tr><tr><td>CPU/GPU used</td><td>20/0</td><td>20/0</td><td>4/1</td><td>4/1</td><td>4/1</td><td>5/0</td><td>4/1</td><td>2/0</td><td>8/0</td><td>12/0</td><td>5/0</td><td>5/0</td><td>12/0</td><td>12/0</td></tr></table>
111
+
112
+ Table 2: Wall-clock time in hours for each algorithm trained for 200k time-steps.
113
+
114
+ MF baselines: SAC and TD3 are two very powerful baselines with very stable performance across different environments. In general model-free and model-based methods are two almost evenly matched rivals when trained for 200,000 time-steps.
115
+
116
+ MB with Ground-truth Dynamics: Algorithms with ground-truth dynamics can solve the majority of the tasks, except for some of the tasks such as MountainCar. With the increasing complexity of the environments, shooting methods gradually have much better performance than the policy search methods such as iLQG, whose linear quadratic assumption is not a good approximation anymore. Early termination cause a lot of troubles for model-based algorithms, both with and without ground-truth dynamics, which is further studied in section 4.7.
117
+
118
+ # 4.4 NOISY ENVIRONMENTS
119
+
120
+ In this section, we study the robustness of each algorithm with respect to the noise added to the observation and actions. Specifically, we added Gaussian white noise to the observations and actions with standard deviation $\sigma _ { o }$ and $\sigma _ { a }$ , respectively. In Table 3 we show the results for the HalfCheetah environment, for the full results we refer the reader to appendix D.
121
+
122
+ <table><tr><td>HalfCheetah</td><td>iLQG</td><td>GT-PETS</td><td>RS</td><td>PETS</td><td>ME-TRPO</td><td>SVG</td><td>MB-MPO</td><td>SLBO</td><td>GT-RS</td><td>PETS-RS</td><td>SAC</td><td>TD3</td></tr><tr><td>Original Performance</td><td>2142.6</td><td>14777.2</td><td>421</td><td>2795.3</td><td>2283.7</td><td>336.6</td><td>3639.0</td><td>1097.7</td><td>815.7</td><td>966.9</td><td>4000.7</td><td>3614.3</td></tr><tr><td>Change/σ=0.1</td><td>-2167.9</td><td>-13138.7</td><td>-274.8</td><td>-915.8</td><td>-1874.3</td><td>-336.5</td><td>-1282.6</td><td>-885.2</td><td>-809.1</td><td>-749.9</td><td>-2854</td><td>-2718.6</td></tr><tr><td>Change/σo=0.01</td><td>-1955.4</td><td>-5550.7</td><td>+2.1</td><td>-385</td><td>-886.8</td><td>-95.8</td><td>-3.5</td><td>+147.1</td><td>-322.4</td><td>-152</td><td>-131.5</td><td>-2797</td></tr><tr><td>Change/σa=0.1</td><td>-1881.4</td><td>-3292.7</td><td>+24.8</td><td>-367.8</td><td>-963.9</td><td>-173.1</td><td>-266.1</td><td>+495.5</td><td>-210.9</td><td>161.7</td><td>-470.2</td><td>642.2</td></tr><tr><td>Change/σa=0.03</td><td>-1832.5</td><td>-1616.6</td><td>+21.3</td><td>-368.1</td><td>-160.8</td><td>-314.7</td><td>+79.7</td><td>-366.6</td><td>-170</td><td>50.6</td><td>-292.6</td><td>327.5</td></tr></table>
123
+
124
+ Table 3: The relative changes of performance of each algorithm in noisy HalfCheetah environments.
125
+ We use bold text to indicates a decrease of performance ${ > } 1 0 \%$ of the performance without noise.
126
+
127
+ As expected, adding noise is in general detrimental to the performance of the MBRL algorithms. ME-TRPO and SLBO are more likely to suffer from a catastrophic performance drop when compared to shooting methods such as PETS and RS, suggesting that re-planning successfully compensates for the uncertainty. On the other hand, the Dyna-style method MB-MPO presents to be very robust against noise. Due to the limited exploration in baseline, the performance is sometimes increased after adding noise that encourages exploration.
128
+
129
+ # 4.5 DYNAMICS BOTTLENECK
130
+
131
+ We further run MBRL algorithms for 1M time-steps on HalfCheetah, Walker2D, Hopper, and Ant environments to capture the asymptotic performance, as are shown in Table 4 and Figure 2. The results show that MBRL algorithms plateau at a performance level well below their model-free counterparts and themselves with ground-truth dynamics. This points out that when learning models, more data does not result in better performance. For instance, PETS’s performance plateaus after 400k time-steps at a value much lower than the performance when using the ground-truth dynamics. We also study the performance with different network capacity, as well as using linear of RBF parameterization, as summarized in Appendix G.
132
+
133
+ The following assumptions can potentially explain the dynamics bottleneck. 1) The prediction error accumulates with time, and MBRL inevitably involves prediction on unseen states. While techniques such as probabilistic ensemble were proposed to capture uncertainty, it can be seen empirically in our paper as well as in Chua et al. (2018), that prediction becomes unstable and inaccurate with time. 2) The policy and the learning of dynamics is coupled, which makes the agents more prone to performance local-minima. While exploration and off-policy learning have been studied in Bellemare et al. (2016); Dearden et al. (1999); Wiering & Schmidhuber (1998); Houthooft et al. (2016); Schaul et al. (2019); Fujimoto et al. (2018), it has been barely addressed on current model-based approaches.
134
+
135
+ ![](images/12c2ecf2ac6682515f3c575bfb26af332f3ac691dc80d1da15a3812cc41fc93d.jpg)
136
+
137
+ Figure 2: Performance curve for each algorithm trained for 1 million time-steps.
138
+
139
+ <table><tr><td></td><td>GT-CEM</td><td>PETS-CEM</td><td>ME-TRPO</td><td>MB-MPO</td><td>SLBO</td><td>TD3</td><td>SAC</td></tr><tr><td>HalfCheetah</td><td>14777.2 ± 13964.2</td><td>2875.9 ± 1132.2</td><td>2672.7 ± 1481.6</td><td>4513.1 ± 1045.4</td><td>2041.4 ± 932.7</td><td>5072.9 ± 815.8</td><td>6095.5 ± 936.1</td></tr><tr><td>Walker2D</td><td>7719.7 ± 486.7</td><td>1931.7 ± 667.3</td><td>-2947.1 ± 640.0</td><td>-1793.7 ± 80.6</td><td>1371.7 ± 2761.7</td><td>3293.6 ± 644.4</td><td>3941.0 ± 985.3</td></tr><tr><td>Hopper</td><td>3232.3± 192.3</td><td>288.4 ± 988.2</td><td>948.0± 854.3</td><td>-495.2 ± 265.0</td><td>2963.1 ± 323.4</td><td>2745.7 ± 546.7</td><td>3020.3 ± 134.6</td></tr><tr><td>Ant</td><td>12115.3 ± 209.7</td><td>1675.0 ± 108.6</td><td>262.7 ± 36.5</td><td>810.8± 240.6</td><td>513.6 ± 182.0</td><td>3073.8 ± 773.8</td><td>2989.9 ± 1182.8</td></tr></table>
140
+
141
+ Table 4: Bench-marking performance for 1 million time-steps.
142
+
143
+ # 4.6 PLANNING HORIZON DILEMMA
144
+
145
+ One of the critical choices in shooting methods is the planning horizon. In Figure 3, we show the performance of iLQG, CEM and RS, using the same number of candidate planning sequences, but with different planning horizon. We notice that increasing the planning horizon does not necessarily increase the performance, and more often instead decreases the performance. This happens both when using ground-truth dynamics and using learned dynamics. We argue that this is result of insufficient planning in a search space which increases exponentially with planning depth, i. e., the curse of dimensionality, as is also observed in Vemula et al. (2019); Hafner et al. (2018).
146
+
147
+ ![](images/5738b0990048d972e2cbdd276005c6b6230a3cd5d3fac8ed16c392c1d65e5646.jpg)
148
+ Figure 3: The relative performance with different planning horizon.
149
+
150
+ However, in more complex environments such as the ones with early terminations, short planning horizon can lead to catastrophic performance drop, which we discuss in appendix I. We further experiment with the imaginary environment length in Dyna algorithms. We have similar results that increasing horizon does not necessarily help the performance, which is summarized in appendix F.
151
+
152
+ # 4.7 EARLY TERMINATION DILEMMA
153
+
154
+ Early termination, when the episode is finalized before the horizon has been reached, is a standard technique used in MFRL algorithms to prevent the agent from visiting unpromising states or damaging states for real robots (Peng et al., 2018; 2016; Merel et al., 2017; Heess et al., 2016; Brockman et al., 2016). When early termination is applied to the real environments, MBRL can correspondingly also apply early termination in the planned trajectories, or generate early terminated imaginary data. However, we find this technique hard to integrate into the existing MB algorithms. The results, shown in Table 1, indicates that early termination does in fact decrease the performance for MBRL algorithms of different types. We further experiment with addition schemes to incorporate early termination, summarized in appendix I. However none of them were successful. We argue that to perform efficient learning in complex environments, such as Humanoid, early termination is almost necessary. We leave it as an important request for research.
155
+
156
+ <table><tr><td></td><td>RS</td><td>MB-MF</td><td>PETS-CEM</td><td>PETS-RS</td><td>ME-TRPO</td><td>GPS</td><td>PILCO</td><td>SVG</td><td>MB-MPO</td><td>SLBO</td></tr><tr><td>Mean rank Median rank</td><td>5.3/10 5.5/10</td><td>5.6/10 7/10</td><td>4.1/10 4/10</td><td>5/10 5/10</td><td>5.8/10 6.5 /10</td><td>7.9/10 8.5/10</td><td>8.5/10 10/10</td><td>5.0/10 4/10</td><td>4.7 /10 4.5/10</td><td>4.1/10 3.5/10</td></tr></table>
157
+
158
+ Table 5: The ranking of the MBRL algorithms in the 18 benchmarking environments
159
+
160
+ # 5 CONCLUSIONS
161
+
162
+ In this paper, we benchmark the performance of a wide collection of existing MBRL algorithms, evaluating their sample efficiency, asymptotic performance and robustness. Through systematic evaluation and comparison, we characterize three key research challenges for future MBRL research. Across this very substantial benchmarking, there is no clear consistent best MBRL algorithm, suggesting lots of opportunities for future work bringing together the strengths of different approaches.
163
+
164
+ # REFERENCES
165
+
166
+ Yunfei Bai Steve Baker Gino van den Bergen Jeff Bingham Nicola Candussi Erin Catto Lawrence Chai Erwin Coumans Disney Animation Benjamin Ellenberger Christer Ericson Google Dirk Gregorius Marcus Hennix Jasmine Hsu MBSim Development Team Takahiro Harada Simon Hobbs John Hsu Ole Kniemeyer Jay Lee Francisco Leon lunkhound Vsevolod Klementjev Phil Knight John McCutchan Steven Peters Roman Ponomarev Nathanael Presson Gabor PUHR Arthur Shek Russel Smith Sony Jakub Stephien Marten Svanfeldt Jie Tan Pierre Terdiman Steven Thompson Tamas Umenhoffer AMD, Apple. Bullet physics sdk. https://github.com/ bulletphysics/bullet3, 2014.
167
+
168
+ Marcin Andrychowicz, Bowen Baker, Maciek Chociej, Rafal Jozefowicz, Bob McGrew, Jakub Pachocki, Arthur Petron, Matthias Plappert, Glenn Powell, Alex Ray, et al. Learning dexterous in-hand manipulation. arXiv preprint arXiv:1808.00177, 2018.
169
+
170
+ Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems 29, pp. 1471–1479. Curran Associates, Inc., 2016. URL http://papers.nips.cc/paper/ 6383-unifying-count-based-exploration-and-intrinsic-motivation. pdf.
171
+
172
+ Alberto Bemporad, Manfred Morari, Vivek Dua, and Efstratios N Pistikopoulos. The explicit linear quadratic regulator for constrained systems. Automatica, 38(1):3–20, 2002.
173
+
174
+ Zdravko I Botev, Dirk P Kroese, Reuven Y Rubinstein, and Pierre L’Ecuyer. The cross-entropy method for optimization. In Handbook of statistics, volume 31, pp. 35–59. Elsevier, 2013.
175
+
176
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
177
+
178
+ Yevgen Chebotar, Mrinal Kalakrishnan, Ali Yahya, Adrian Li, Stefan Schaal, and Sergey Levine. Path integral guided policy search. In 2017 IEEE international conference on robotics and automation (ICRA), pp. 3381–3388. IEEE, 2017.
179
+
180
+ Kurtland Chua, Roberto Calandra, Rowan McAllister, and Sergey Levine. Deep reinforcement learning in a handful of trials using probabilistic dynamics models. arXiv preprint arXiv:1805.12114, 2018.
181
+
182
+ Ignasi Clavera, Jonas Rothfuss, John Schulman, Yasuhiro Fujita, Tamim Asfour, and Pieter Abbeel. Model-based reinforcement learning via meta-policy optimization. CoRR, abs/1809.05214, 2018. URL http://arxiv.org/abs/1809.05214.
183
+
184
+ Pieter-Tjerk De Boer, Dirk P Kroese, Shie Mannor, and Reuven Y Rubinstein. A tutorial on the cross-entropy method. Annals of operations research, 134(1):19–67, 2005.
185
+
186
+ Richard Dearden, Nir Friedman, and David Andre. Model based bayesian exploration. In Proceedings of the Fifteenth Conference on Uncertainty in Artificial Intelligence, UAI’99, pp. 150–159, San Francisco, CA, USA, 1999. Morgan Kaufmann Publishers Inc. ISBN 1-55860-614-9. URL http://dl.acm.org/citation.cfm?id=2073796.2073814.
187
+
188
+ Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pp. 465–472, 2011.
189
+
190
+ Marc Peter Deisenroth, Dieter Fox, and Carl Edward Rasmussen. Gaussian processes for dataefficient learning in robotics and control. IEEE transactions on pattern analysis and machine intelligence, 37(2):408–423, 2015.
191
+
192
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
193
+
194
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In International Conference on Machine Learning, pp. 1329–1338, 2016.
195
+
196
+ Benjamin Ellenberger. Pybullet gymperium. https://github.com/benelot/ pybullet-gym, 2018.
197
+
198
+ C. Finn, M. Zhang, J. Fu, X. Tan, Z. McCarthy, E. Scharff, and S. Levine. Guided policy search code implementation, 2016a. URL http://rll.berkeley.edu/gps. Software available from rll.berkeley.edu/gps.
199
+
200
+ Chelsea Finn, Sergey Levine, and Pieter Abbeel. Guided cost learning: Deep inverse optimal control via policy optimization. In International Conference on Machine Learning, pp. 49–58, 2016b.
201
+
202
+ Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. CoRR, abs/1703.03400, 2017. URL http://arxiv.org/abs/1703. 03400.
203
+
204
+ Scott Fujimoto, Herke van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
205
+
206
+ David Ha and Jürgen Schmidhuber. Recurrent world models facilitate policy evolution. In Advances in Neural Information Processing Systems, pp. 2450–2462, 2018a.
207
+
208
+ David Ha and Jürgen Schmidhuber. World models. arXiv preprint arXiv:1803.10122, 2018b.
209
+
210
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018.
211
+
212
+ Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. Learning latent dynamics for planning from pixels. arXiv preprint arXiv:1811.04551, 2018.
213
+
214
+ Nicolas Heess, Gregory Wayne, David Silver, Timothy Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pp. 2944–2952, 2015.
215
+
216
+ Nicolas Heess, Greg Wayne, Yuval Tassa, Timothy Lillicrap, Martin Riedmiller, and David Silver. Learning and transfer of modulated locomotor controllers. arXiv preprint arXiv:1610.05182, 2016.
217
+
218
+ Nicolas Heess, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, Ali Eslami, Martin Riedmiller, et al. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017.
219
+
220
+ Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
221
+
222
+ Rein Houthooft, Xi Chen, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems 29, pp. 1109–1117. Curran Associates, Inc., 2016. URL http://papers.nips.cc/paper/ 6591-vime-variational-information-maximizing-exploration.pdf.
223
+
224
+ Riashat Islam, Peter Henderson, Maziar Gomrokchi, and Doina Precup. Reproducibility of benchmarked deep reinforcement learning tasks for continuous control. arXiv preprint arXiv:1708.04133, 2017.
225
+
226
+ Sanket Kamthe and Marc Peter Deisenroth. Data-efficient reinforcement learning with probabilistic model predictive control. arXiv preprint arXiv:1706.06491, 2017.
227
+
228
+ Oleg Klimov and J Schulman. Roboschool, 2017.
229
+
230
+ Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, et al. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th annual meeting of the association for computational linguistics companion volume proceedings of the demo and poster sessions, pp. 177–180, 2007.
231
+
232
+ Thanard Kurutach, Ignasi Clavera, Yan Duan, Aviv Tamar, and Pieter Abbeel. Model-ensemble trust-region policy optimization. arXiv preprint arXiv:1802.10592, 2018.
233
+
234
+ Sergey Levine and Pieter Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, pp. 1071–1079, 2014.
235
+
236
+ Sergey Levine, Nolan Wagener, and Pieter Abbeel. Learning contact-rich manipulation skills with guided policy search. In 2015 IEEE international conference on robotics and automation (ICRA), pp. 156–163. IEEE, 2015.
237
+
238
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
239
+ Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pp. 740–755. Springer, 2014.
240
+ Yuping Luo, Huazhe Xu, Yuanzhi Li, Yuandong Tian, Trevor Darrell, and Tengyu Ma. Algorithmic framework for model-based deep reinforcement learning with theoretical guarantees. ICLR, 2019.
241
+ Josh Merel, Yuval Tassa, Sriram Srinivasan, Jay Lemmon, Ziyu Wang, Greg Wayne, and Nicolas Heess. Learning human behaviors from motion capture by adversarial imitation. arXiv preprint arXiv:1707.02201, 2017.
242
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
243
+ 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.
244
+ William H Montgomery and Sergey Levine. Guided policy search via approximate mirror descent. In Advances in Neural Information Processing Systems, pp. 4008–4016, 2016.
245
+ Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. arXiv preprint arXiv:1708.02596, 2017.
246
+ Vassil Panayotov, Guoguo Chen, Daniel Povey, and Sanjeev Khudanpur. Librispeech: an asr corpus based on public domain audio books. In 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5206–5210. IEEE, 2015.
247
+ Xue Bin Peng, Glen Berseth, and Michiel Van de Panne. Terrain-adaptive locomotion skills using deep reinforcement learning. ACM Transactions on Graphics (TOG), 35(4):81, 2016.
248
+ Xue Bin Peng, Pieter Abbeel, Sergey Levine, and Michiel van de Panne. Deepmimic: Example-guided deep reinforcement learning of physics-based character skills. ACM Transactions on Graphics (TOG), 37(4):143, 2018.
249
+ Aravind Rajeswaran, Kendall Lowrey, Emanuel V Todorov, and Sham M Kakade. Towards generalization and simplicity in continuous control. In Advances in Neural Information Processing Systems, pp. 6553–6564, 2017.
250
+ Anil V Rao. A survey of numerical methods for optimal control. Advances in the Astronautical Sciences, 135(1):497–528, 2009.
251
+ Arthur George Richards. Robust constrained model predictive control. PhD thesis, Massachusetts Institute of Technology, 2005.
252
+ Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011.
253
+ Tom Schaul, Diana Borsa, Joseph Modayil, and Razvan Pascanu. Ray interference: a source of plateaus in deep reinforcement learning. arXiv preprint arXiv:1904.11455, 2019.
254
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1889–1897, 2015.
255
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
256
+ Richard S Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Machine Learning Proceedings 1990, pp. 216–224. Elsevier, 1990.
257
+ Richard S Sutton. Dyna, an integrated architecture for learning, planning, and reacting. ACM SIGART Bulletin, 2(4):160–163, 1991a.
258
+ Richard S Sutton. Planning by incremental dynamic programming. In Machine Learning Proceedings 1991, pp. 353–357. Elsevier, 1991b.
259
+ Yuval Tassa, Tom Erez, and Emanuel Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 4906–4913. IEEE, 2012.
260
+ Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.
261
+ Anirudh Vemula, Wen Sun, and J Andrew Bagnell. Contrasting exploration in parameter and action space: A zeroth-order optimization perspective. arXiv preprint arXiv:1901.11503, 2019.
262
+ Michael Waskom. Seaborn: statistical data visualization. http://seaborn.pydata.org/, 2010. Accessed: 2010-09-30.
263
+ Marco Wiering and Jürgen Schmidhuber. Efficient model-based exploration. In PROCEEDINGS OF THE SIXTH INTERNATIONAL CONFERENCE ON SIMULATION OF ADAPTIVE BEHAVIOR: FROM ANIMALS TO ANIMATS 6, pp. 223–228. MIT Press/Bradford Books, 1998.
264
+ Tianhao Zhang, Gregory Kahn, Sergey Levine, and Pieter Abbeel. Learning deep control policies for autonomous aerial vehicles with mpc-guided policy search. In 2016 IEEE international conference on robotics and automation (ICRA), pp. 528–535. IEEE, 2016.
265
+
266
+ # A ENVIRONMENT OVERVIEW
267
+
268
+ We provide an overview of the environments in this section. Table 6 shows the dimensionality and horizon lengths of those environments, and Table 7 specifies their reward functions.
269
+
270
+ <table><tr><td>Environment Name</td><td>Observation Space Dimension</td><td>Action Space Dimension</td><td>Horizon</td></tr><tr><td>Acrobot</td><td>6</td><td>1</td><td>200</td></tr><tr><td>Pendulum</td><td>3</td><td>1</td><td>200</td></tr><tr><td>InvertedPendulum</td><td>4</td><td>1</td><td>100</td></tr><tr><td>CartPole</td><td>4</td><td>1</td><td>200</td></tr><tr><td>MountainCar</td><td>2</td><td>1</td><td>200</td></tr><tr><td>Reacher2D (Reacher)</td><td>11</td><td>2</td><td>50</td></tr><tr><td>HalfCheetah</td><td>17</td><td>6</td><td>1000</td></tr><tr><td>Swimmer-v0</td><td>8</td><td>2</td><td>1000</td></tr><tr><td>Swimmer</td><td>8</td><td>2</td><td>1000</td></tr><tr><td>Hopper</td><td>11</td><td>3</td><td>1000</td></tr><tr><td>Ant</td><td>28</td><td>8</td><td>1000</td></tr><tr><td>Walker 2D</td><td>17</td><td>6</td><td>1000</td></tr><tr><td>Humanoid</td><td>376</td><td>17</td><td>1000</td></tr><tr><td>SlimHumanoid</td><td>45</td><td>17</td><td>1000</td></tr></table>
271
+
272
+ Table 6: Dimensions of observation and action space, and horizon length for most of the environments used in the experiments.
273
+
274
+ <table><tr><td>Environment Name</td><td>Reward Function Rt</td></tr><tr><td>Acrobot</td><td>- cOs01,t -COs (01,t +02,t)</td></tr><tr><td>Pendulum</td><td>-cos0t -0.1sin0t -0.10²-0.001a²</td></tr><tr><td>InvertedPendulum</td><td>-0</td></tr><tr><td>CartPole</td><td>cos 0t-0.01x²</td></tr><tr><td>MountainCar</td><td>positiont</td></tr><tr><td>Reacher2D (Reacher)</td><td>-distancet - |latll2</td></tr><tr><td>HalfCheetah</td><td>xt-0.1/|atll2</td></tr><tr><td>Swimmer-v0</td><td>xt -0.0001||atll2</td></tr><tr><td>Swimmer</td><td>xt-0.0001||atll2</td></tr><tr><td>Hopper</td><td>xt-0.1|/atl²-3.0 × (zt -1.3)²</td></tr><tr><td>Ant</td><td>xt-0.1/|atll2-3.0 × (zt -0.57)2</td></tr><tr><td>Walker2D</td><td>xt-0.1//atll²-3.0 × (zt -1.3)²</td></tr><tr><td>Humanoid</td><td>50/3 × xt-0.1|latll²- 5e-6 ×impact + 5 × bool(1.0 &lt;= zt &lt;= 2.0</td></tr><tr><td>SlimHumanoid</td><td>50/3 × 𝑥t -0.1||atl/²+ 5 × bool(1.0&lt;= zt &lt;= 2.0)</td></tr></table>
275
+
276
+ Table 7: Reward function for most of the environments used in the experiments. The tasks specified by the reward functions are discussed in further detail in Section A.1.
277
+
278
+ # A.1 ENVIRONMENT-SPECIFIC DESCRIPTIONS
279
+
280
+ In this section, we provide details about environment-specific dynamics and goals.
281
+
282
+ Acrobot The dynamical system consists of a pendulum with two links. The joint between the two links is actuated. Initially, both links point downwards. The goal is to swing up the pendulum, such that the tip of the pendulum reaches a given height. Let $\theta _ { 1 , t }$ , $\theta _ { 2 , t }$ be the joint angles of the first (with one end fixed to a hinge) and second link at time $t$ . The 6-dimensional observation at time $t$ is the tuple: $( \cos \theta _ { 1 , t } , \sin \theta _ { 1 , t } , \cos \theta _ { 2 , t } , \sin \theta _ { 2 , t } , \dot { \theta } _ { 1 , t } , \dot { \theta } _ { 2 , t } )$ . The reward is the height of the tip of the pendulum: $R _ { t } = - \cos \theta _ { 1 , t } - \cos \left( \theta _ { 1 , t } + \theta _ { 2 , t } \right)$ .
283
+
284
+ Pendulum A single-linked pendulum is fixed on the one end, with an actuator located on the joint. The goal is to keep the pendulum at the upright position. Let $\theta _ { t }$ be the joint angle at time $t$ The 3-dimensional observation at time $t$ is $( \cos \theta _ { t } , \sin \theta _ { t } , \dot { \theta } _ { t } )$ The reward penalizes the position and velocity deviation from the upright equilibrium, as well as the magnitude of the control input.
285
+
286
+ InvertedPendulum The dynamical system consists of a cart that slides on a rail, and a pole connected through an unactuated joint to the cart. The only actuator applies force on the cart along the rail. The actuator force is a real number. Let $\theta _ { t }$ be the angle of the pole away from the upright vertical position, and $x _ { t }$ be the position of the cart away from the centre of the rail at time $t$ . The 4-dimensional observation at time $t$ is $( x _ { t } , \theta _ { t } , \dot { x } _ { t } , \dot { \theta } _ { t } )$ . The reward $- \theta _ { t } ^ { 2 }$ penalizes the angular deviation from the upright position.
287
+
288
+ CartPole The dynamical system of Cart-Pole is very similar to that of the Inverted Pendulum environment. The differences are: 1) the real-valued actuator input is discretized to $- 1 , 1$ , with a threshold at zero; 2) the reward $\cos \theta _ { t } - 0 . 0 1 x _ { t } ^ { 2 }$ indicates that the goal is to make the pole stay upright, and the cart stay at the centre of the rail.
289
+
290
+ MountainCar A car is initially positioned between two “mountains", and can drive on a onedimensional track. The goal is to reach the top of the “mountain" on the right. However, the engine of the car is not strong enough for it to drive up the valley in one go, so the solution is to drive back and forth to accumulate momentum. The observation at time $t$ is the tuple $( p o s i t i o n _ { t } , v e l o c i t y _ { t } )$ , where both the position and velocity are one-dimensional, with respect to the track. The reward at time $t$ is simply positiont. Note that we use a fixed horizon, so that the agent is encouraged to reach the goal as soon as possible.
291
+
292
+ Reacher2D (or Reacher) An arm with two links is fixed at one end, and is free to move on the horizontal 2D plane. There are two actuators, located at the two joints respectively. At each episode, a target is randomly placed on the 2D plane within reach of the arm. The goal is to make the tip of the arm reach the target as fast as possible, and with the smallest possible control input. Let $\theta _ { t }$ be the two joint positions, $\pmb { x } _ { t a r g e t , t }$ be the position of the target, and ${ \mathbf { \boldsymbol { x } } } _ { t i p , t }$ be the position of the tip of the arm at time $t$ , respectively.The observation is $( \cos \theta _ { t } , \sin \theta _ { t } , { x _ { t a r g e t , t } } , \dot { \theta } _ { t } , { x _ { t i p , t } } - { x _ { t a r g e t , t } } )$ . The reward at time $t$ is $| | { \pmb x } _ { t i p , t } - { \pmb x } _ { t a r g e t , t } | | _ { 2 } ^ { 2 } - | | { \pmb a } _ { t } | | _ { 2 } ^ { 2 }$ , where the first term is the Euclidean distance between the tip and the target.
293
+
294
+ HalfCheetah Half Cheetah is a 2D robot with 7 rigid links, including 2 legs and a torso. There are 6 actuators located at 6 joints respectively. The goal is to run forward as fast as possible, while keeping control inputs small. The observation include the (angular) position and velocity of all the joints (including the root joint, whose position specifies the robot’s position in the world coordinate), except for the $x$ position of the root joint. The reward is the $x$ direction velocity plus penalty for control inputs.
295
+
296
+ Swimmer-v0 Swimmer-v0 is a 2D robot with 3 rigid links, sliding on a 2D plane. There are 2 actuators, located on the 2 joints between the links. The root joint is located at the centre of the middle link. The observation include the (angular) position and velocity of all the joints, except for the position of the two slider joints (indicating the $x$ and $y$ positions). The reward is the $x$ direction velocity plus penalty for control inputs.
297
+
298
+ Swimmer The dynamical system of Swimmer is similar to that of Swimmer-v0, except that the root joint is located at the tip of the first link (i.e. the “head" of the swimmer).
299
+
300
+ Hopper Hopper is a 2D “robot leg" with 4 rigid links, including the torso, thigh, leg and foot. There are 3 actuators, located at the three joints connecting the links. The observation include the (angular) position and velocity of all the joints, except for the $x$ position of the root joint. The reward is the $x$ direction velocity plus penalty for the distance to a target height and control input. The intended goal is to hop forward as fast as possible, while approximately maintaining the standing height, and with the smallest control input possible. We also add an alive bonus of 1 to the agents at every time-step, which is also applied to Ant, Walker2D.
301
+
302
+ Ant Ant is a 3D robot with 13 rigid links, including a torso 4 legs. There are 8 actuators, 2 for each leg, located at the joints. The observation include the (angular) position and velocity of all the joints, except for the $x$ and $y$ positions of the root joint. The reward is the $x$ direction velocity plus penalty for the distance to a target height and control input. The intended goal is to go forward, while approximately maintaining the normal standing height, and with the smallest control input possible.
303
+
304
+ Walker2D Walker 2D is a planar robot, consisting of 7 rigid links, including a torso and 2 legs. There are 6 actuators, 3 for each leg. The observation include the (angular) position and velocity of all the joints, except for the $x$ position of the root joint. The reward is the $x$ direction velocity plus penalty for the distance to a target height and control input. The intended goal is to walk forward as fast as possible, while approximately maintaining the standing height, and with the smallest control input possible.
305
+
306
+ Humanoid Humanoid is a 3D human shaped robot consisting of 13 rigid links. There are 17 actuators, located at the humanoid’s abdomen, hips, knees, shoulders and elbows. The observation space include the joint (angular) positions and velocities, centre of mass based inertia, velocity, external force, and actuator force. The reward is the scaled $x$ direction velocity, plus penalty for control input, impact (external force) and undesired height.
307
+
308
+ SlimHumanoid The dynamical system of Slim Humanoid is similar to that of Humanoid, except that the observation is simply the joint positions and velocities, without the center of mass based quantities, external force and actuator force. Also, the reward no longer penalizes the impact (external force).
309
+
310
+ # B HYPER-PARAMETER SEARCH AND ENGINEERING DETAILS
311
+
312
+ In this section, we provide a more detailed description of the hyper-parameters we search for each algorithm. Note that we select the best hyper-parameter combination for each algorithm, but we still provide a reference hyper-parameter combination that is generally good for all environments.
313
+
314
+ # B.1 ILQG
315
+
316
+ For iLQG algorithm, the hyper-parameters searched are summarized in 8. While the recommended hyper-parameters usually have the best performance, they can result in more computation resources needed. In the following sections, number of planning trajectory is also refereed as search population size.
317
+
318
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>planning horizon</td><td>10,20,30,50,100</td><td>20</td></tr><tr><td>maxlinesearch backtrack</td><td>1,5,10, 15,20</td><td>10</td></tr><tr><td>number iLQG update per time-step</td><td>1,5,10,20</td><td>10</td></tr><tr><td>number of planning trajectory</td><td>1, 2,..., 10, 20</td><td>10</td></tr></table>
319
+
320
+ Table 8: Hyper-parameter grid search options for iLQG.
321
+
322
+ # B.2 GROUND-TRUTH CEM AND GROUND-TRUTH RS
323
+
324
+ For the CEM and RS with ground-truth dynamics, we search only with different planning horizon, search population size. which include 10, 20, 30, 40, 50, 60, 70, 80, 90, 100. As also mentioned in planning horizon dilemma in section 4.6, the best planning horizon is usually 20 to 30.
325
+
326
+ # B.3 RS, PETS AND PETS-RS
327
+
328
+ We mention that in Nagabandi et al. (2017), RS has very different hyper-parameter sets from the RS studied in PETS-RS Chua et al. (2018). The search of hyper-parameters for RS is the same for note that for the dynamics-propagation combination, we choose PE-E not because of having the best performance. PE-E is among the best models, with comparable performance to other combinations such as PE-DS, PE-TS1, PE-TSinf. However PE-E is very computation efficient compared to other variants. For example, PE-DS on PETS-CEM costs 68 hours for one random seed for HalfCheetah with planning horizon of 30 to train for 200,000 time-steps. While PE-E usually only takes about 5 hours, and is suitable for research. The best models for HalfCheetah uses planning horizon of 100, and takes about 15 hours.
329
+
330
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>planning horizon</td><td>10,20.,30,...,90,100</td><td>30</td></tr><tr><td>search population size</td><td>500,1000,2000</td><td>1000</td></tr></table>
331
+
332
+ Table 9: Hyper-parameter grid search options for RS, CEM using ground-truth dynamics.
333
+
334
+ RS using ground-truth dynamics as illustrated in the Table 9. The PETS and PETS is searched with the hyper-parameters in Table 10. For simpler environments, it is usually better to use a planning horizon of 30. For environments such as Walker2D and Hopper, 100 is the best planning horizon. We
335
+
336
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>planning horizon</td><td>10,30,50,60,70,80,90,100</td><td>30/100</td></tr><tr><td rowspan="2">search population size elite size</td><td>50,100,500,1000,2000</td><td>500</td></tr><tr><td>50,100,150</td><td>50</td></tr><tr><td>PETS combination</td><td>D-E,DE-E,PE-E,PE-TSinf,PE-TS1,PE-DS</td><td>PE-E</td></tr></table>
337
+
338
+ Table 10: Hyper-parameter grid search options for RS.
339
+
340
+ We also note that with some trivial pre-processing of the observation function, such as using sin and cos functions to the angle observation, the performance can be much better for PETS. We include the performance on the pre-processed task provided in the original PETS paper Chua et al. (2018), and compare it with the performance on the provided task in the benchmark in Figure 4. We note that for the modified environments in Chua et al. (2018), the performance can reach more than 10000 for 200k time-steps.
341
+
342
+ ![](images/8de04b0b0c391462356995964049a26dbd4ced7f61d40e115cb417810a67e46f.jpg)
343
+ Figure 4: The performance of HalfCheetah from our benchmark, and the HalfCheetah from the PETS paper Chua et al. (2018), which we refer to as "Modified". We also include the performance of PETS-CEM and PETS-RS using different dynamics-propagation combination on the modified HalfCheetah from Chua et al. (2018).
344
+
345
+ In the benchmark results in the main paper, PETS-RS uses the search scheme in Table 10, except for it does not have hyper-parameters of elite size.
346
+
347
+ # B.4 MBMF
348
+
349
+ Originally MBMF was designed to run for 1 million time-steps Nagabandi et al. (2017). Therefore, to accommodate the algorithm with 200,000 time-steps, we perform the search in Table 11.
350
+
351
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td rowspan="3">trust region method search population size planning horizon</td><td>TRPO,PPO</td><td>PPO</td></tr><tr><td>1000,5000,2000</td><td>5000</td></tr><tr><td>10,20,30</td><td>20</td></tr><tr><td rowspan="3">time-steps per iteration model based time-steps</td><td>1000,2000, 5000</td><td>1000</td></tr><tr><td>5000,7000,10000</td><td>7000</td></tr><tr><td>100,300, 500</td><td>300</td></tr></table>
352
+
353
+ Table 11: Hyper-parameter grid search options for MBMF.
354
+
355
+ # B.5 METRPO AND SLBO
356
+
357
+ For METRPO and SLBO, we search for the following hyper-parameters. We note that for environments with episode length of 100 or 200, we always use the same length for imaginary episodes. We also refer to Appendix F for more details.
358
+
359
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>imaginary episode length</td><td>1000,500,200,100</td><td>1000</td></tr><tr><td>TRPO iterations</td><td>1,10, 20,30, 40</td><td>20/40</td></tr><tr><td>network ensembles</td><td>1,5,10, 20</td><td>5</td></tr><tr><td>Terminate imaginary episode</td><td>True,False</td><td>False</td></tr></table>
360
+
361
+ Table 12: Hyper-parameter grid search options for METRPO and SLBO.
362
+
363
+ # B.6 GPS
364
+
365
+ The GPS is based on the code-base Finn et al. (2016a). We note that in the original code-base, the agent samples the initial state from several separate conditions. For each condition, there is not randomness of the initial state. However, in our bench-marking environments, the initial state is sample from a Gaussian distribution, which is essentially making the environments harder to solve.
366
+
367
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>time-step per iteration</td><td>1000,5000,10000</td><td>5000</td></tr><tr><td>kl step</td><td>0.5, 1.0, 2.0, 0.5</td><td>1.0</td></tr><tr><td>dynamics Gaussian mixture model clusters</td><td>5,10,20,30</td><td>20</td></tr><tr><td>policy Gaussian mixture model clusters</td><td>10,20</td><td>20</td></tr></table>
368
+
369
+ Table 13: Hyper-parameter grid search options for GPS.
370
+
371
+ # B.7 PILCO
372
+
373
+ For PILCO, we search for the following hyper-parameter in Table 14. We note that PILCO is very unstable across random seeds. Also, it is quite common for PILCO algorithms to add additional penalty in existing code-bases using human priors. We argue that it is unfair to other algorithms and we remove any additional reward functions. Also, for PILCO to train for 200,000 time-steps, we have to use a data-set to increase training efficiency.
374
+
375
+ # B.8 SVG
376
+
377
+ For SVG, we reproduce the variant of SVG-1 with experience replay, which is claimed in Heess et al.
378
+ (2015).
379
+
380
+ Table 14: Hyper-parameter grid search options for PILCO.
381
+
382
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td rowspan="2">Optimizing Horizon episode per iteration data-set size</td><td>30,100,200,adaptive</td><td>100 or 30</td></tr><tr><td>1,2,4 200,1000,2000,20000,40000,10000</td><td>1 200 or 1000</td></tr></table>
383
+
384
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>SVG learning rate</td><td>0.00003,0.0001, 0.0003,0.001</td><td>0.0001</td></tr><tr><td rowspan="3">data buffer size KL penalty</td><td>25000</td><td>25000</td></tr><tr><td>0.0003, 0.001, 0.003</td><td>0.001</td></tr><tr><td></td><td></td></tr></table>
385
+
386
+ Table 15: Hyper-parameter grid search options for SVG.
387
+
388
+ # B.9 MB-MPO
389
+
390
+ In this algorithm, we use most the hyper-parameters in the original paper Clavera et al. (2018), except in the ones the algorithm is more sensitive to.
391
+
392
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>Recommended Value</td></tr><tr><td>inner learning rate</td><td>0.0005, 0.001, 0.01</td><td>0.0005</td></tr><tr><td>rollouts per task</td><td>10,20,30</td><td>20</td></tr><tr><td>MAML iterations</td><td>30,50,75</td><td>50</td></tr></table>
393
+
394
+ Table 16: Hyper-parameter grid search options for MB-MPO.
395
+
396
+ # B.10 MODEL-FREE BASELINES
397
+
398
+ For PPO and TRPO, we search for different time-steps samples in one iteration. For SAC and TD3, we use the default values from Haarnoja et al. (2018) and Fujimoto et al. (2018) respectively.
399
+
400
+ <table><tr><td>Hyper-parameter</td><td>Value Tried</td><td>|Recommended Value</td></tr><tr><td></td><td>time-steps per iteration丨1000,2000,5000,20000</td><td>2000</td></tr></table>
401
+
402
+ Table 17: Hyper-parameter grid search options for model-free algorithms.
403
+
404
+ ![](images/2064d1dcfc2b83400893c131a12497e5e9a575b698996c438ff8514d38c68782.jpg)
405
+ Figure 5: Performance curve for MBRL algorithms. There are still 3 more figures in a continued Figure 6.
406
+
407
+ In this appendix section, we include all the curves of every algorithms in Figure 5 and Figure 6. Some of the GPS curves and PILCO curves are not shown in the figures. We note that this is because their reward scale is sometimes very different from other algorithms.
408
+
409
+ ![](images/791634f6e0431074a66b55a5746a7225f30afd3868850d7c5cdcd1e895e499ef.jpg)
410
+ Figure 6: (Continued) Performance curve for MBRL algorithms.
411
+
412
+ <table><tr><td></td><td>RS</td><td>MBMF</td><td>PETS</td><td>PETS-RS</td><td>METRPO</td><td>GPS</td><td>PILCO</td><td>SVG</td><td>MB-MPO</td><td>SLBO</td><td></td><td>PPO</td><td>TRPO</td><td>TD3</td><td>SAC</td></tr><tr><td>Average</td><td>10.23</td><td></td><td>4.41</td><td>7.47</td><td>4.66</td><td>4.01</td><td>6.68</td><td>120</td><td>1.42</td><td>44.68</td><td>5.32</td><td>0.04</td><td>0.031</td><td>3.87</td><td>3.04</td></tr><tr><td>Standard deviation</td><td>2.16</td><td>0.74</td><td>3.96</td><td>1.45</td><td></td><td>1.40</td><td>7.22</td><td>N.A.</td><td>0.33</td><td>9.95</td><td>1.63</td><td>0.0172</td><td>0.0116</td><td>0.89</td><td>0.67</td></tr></table>
413
+
414
+ Table 18: Wall-clock time in hours averaged for each algorithm trained for 200k time-steps from the original Table 2.
415
+
416
+ In addition to Table 4, we also have the performance of SVG trained for 1 million time-steps. For the environments of HalfCheetah, Ant, Walker2D and Hopper, the performance is respectively 578.7 239.1, 472.0 48.1, -1168.2 537.2 and $- 7 5 3 . 4 { \pm } 5 8 0 . 8 $ .
417
+
418
+ # D NOISY ENVIRONMENTS
419
+
420
+ In this appendix section, we provide more details of the performance with noise for each algorithm. In Figure 7 and Figure 8, we show the curves of different algorithms, and in Table 19 and Table 20 we show the performance numbers at the end the of training. The pink color indicates a decrease of performance, while the green color indicates a increase of performance, and black color indicates a almost the same performance.
421
+
422
+ <table><tr><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Cheetah</td><td rowspan=1 colspan=1>Cheetah,σ。= 0.1</td><td rowspan=1 colspan=1>Cheetah,σ。= 0.01</td><td rowspan=1 colspan=1>Cheetah,σ= 0.1</td><td rowspan=1 colspan=1>Cheetah,σa= 0.03</td></tr><tr><td></td><td rowspan=2 colspan=1>iLQRGT-PETS</td><td rowspan=1 colspan=1>2142.6 ± 137.7</td><td rowspan=1 colspan=1>-25.3 ± 127.5</td><td rowspan=1 colspan=1>187.2 ± 102.9</td><td rowspan=1 colspan=1>261.2 ± 106.8</td><td rowspan=1 colspan=1>310.1 ± 112.6</td></tr><tr><td></td><td rowspan=1 colspan=1>14777.2 ± 13964.2</td><td rowspan=1 colspan=1>1638.5 ± 188.5</td><td rowspan=1 colspan=1>9226.5 ± 8893.4</td><td rowspan=1 colspan=1>11484.5 ± 12264.7</td><td rowspan=1 colspan=1>13160.6 ± 13642.6</td></tr><tr><td></td><td rowspan=1 colspan=1>GT-RS</td><td rowspan=1 colspan=1>815.7 ± 38.5</td><td rowspan=1 colspan=1>6.6 ± 52.5</td><td rowspan=1 colspan=1>493.3 ± 38.3</td><td rowspan=1 colspan=1>604.8 ± 42.7</td><td rowspan=1 colspan=1>645.7 ± 39.6</td></tr><tr><td></td><td rowspan=1 colspan=1>RS</td><td rowspan=1 colspan=1>421.0 ± 55.2</td><td rowspan=1 colspan=1>146.2 ± 19.9</td><td rowspan=1 colspan=1>423.1 ± 28.7</td><td rowspan=1 colspan=1>445.8 ± 19.2</td><td rowspan=1 colspan=1>442.3 ± 26.0</td></tr><tr><td></td><td rowspan=1 colspan=1>MB-MF</td><td rowspan=1 colspan=1>126.9 ± 72.7</td><td rowspan=1 colspan=1>146.1 ± 87.8</td><td rowspan=1 colspan=1>232.1 ± 122.0</td><td rowspan=1 colspan=1>184.0 ± 148.9</td><td rowspan=1 colspan=1>257.0 ± 96.6</td></tr><tr><td></td><td rowspan=1 colspan=1>PETS</td><td rowspan=1 colspan=1>2795.3 ± 879.9</td><td rowspan=1 colspan=1>1879.5 ± 801.5</td><td rowspan=1 colspan=1>2410.3 ± 844.0</td><td rowspan=1 colspan=1>2427.5 ± 674.1</td><td rowspan=1 colspan=1>2427.2 ± 1118.6</td></tr><tr><td></td><td rowspan=1 colspan=1>PETS-RS</td><td rowspan=1 colspan=1>966.9 ± 471.6</td><td rowspan=1 colspan=1>217.0 ± 193.4</td><td rowspan=1 colspan=1>814.9 ± 678.6</td><td rowspan=1 colspan=1>1128.6 ± 674.2</td><td rowspan=1 colspan=1>1017.5 ± 734.9</td></tr><tr><td></td><td rowspan=1 colspan=1>ME-TRPO</td><td rowspan=1 colspan=1>2283.7 ± 900.4</td><td rowspan=1 colspan=1>409.4 ± 834.2</td><td rowspan=1 colspan=1>1396.9 ± 834.8</td><td rowspan=1 colspan=1>1319.8 ± 698.0</td><td rowspan=1 colspan=1>2122.9 ± 889.1</td></tr><tr><td></td><td rowspan=2 colspan=1>GPSPILCO</td><td rowspan=2 colspan=1>52.3 ± 41.7-41.9 ± 267.0</td><td rowspan=1 colspan=1>-6.8 ± 13.6</td><td rowspan=1 colspan=1>175.2 ± 169.4</td><td rowspan=1 colspan=1>41.6 ± 45.7</td><td rowspan=1 colspan=1>94.0 ± 57.0</td></tr><tr><td></td><td rowspan=1 colspan=1>-282.0 ± 258.4</td><td rowspan=1 colspan=1>-275.4 ± 164.6</td><td rowspan=1 colspan=1>-175.6 ± 284.1</td><td rowspan=1 colspan=1>-260.8 ± 290.3</td></tr><tr><td></td><td rowspan=1 colspan=1>SVG</td><td rowspan=1 colspan=1>336.6 ± 387.6</td><td rowspan=1 colspan=1>0.1 ± 271.3</td><td rowspan=1 colspan=1>240.8 ± 236.6</td><td rowspan=1 colspan=1>163.5 ± 338.6</td><td rowspan=1 colspan=1>21.9 ± 81.0</td></tr><tr><td></td><td rowspan=1 colspan=1>MB-MPO</td><td rowspan=1 colspan=1>3639.0±1185.8</td><td rowspan=1 colspan=1>2356.4 ± 734.4</td><td rowspan=1 colspan=1>3635.5 ± 1486.8</td><td rowspan=1 colspan=1>3372.9 ± 1373</td><td rowspan=1 colspan=1>3718.7 ± 922.3</td></tr><tr><td></td><td rowspan=1 colspan=1>SLBO</td><td rowspan=1 colspan=1>1097.7 ± 166.4</td><td rowspan=1 colspan=1>212.5 ± 279.6</td><td rowspan=1 colspan=1>1244.8 ± 604.0</td><td rowspan=1 colspan=1>1593.2 ± 265.0</td><td rowspan=1 colspan=1>731.1 ± 215.8</td></tr><tr><td></td><td rowspan=1 colspan=1>PPO</td><td rowspan=1 colspan=1>17.2 ± 84.4</td><td rowspan=1 colspan=1>-113.3 ± 92.8</td><td rowspan=1 colspan=1>-83.1 ± 117.7</td><td rowspan=1 colspan=1>-28.0 ± 54.1</td><td rowspan=1 colspan=1>-35.5 ± 87.8</td></tr><tr><td rowspan=3 colspan=2>TRPOTD3SAC</td><td rowspan=1 colspan=1>TRPO</td><td rowspan=1 colspan=1>-12.0 ± 85.5</td><td rowspan=1 colspan=1>-146.0 ± 67.4</td><td rowspan=1 colspan=1>9.4 ± 57.6</td><td rowspan=1 colspan=1>-32.7 ± 110.9</td></tr><tr><td rowspan=1 colspan=1>3614.3 ± 82.1</td><td rowspan=1 colspan=1>895.7 ± 61.6</td><td rowspan=1 colspan=1>817.3 ± 11.0</td><td rowspan=1 colspan=1>4256.5 ± 117.4</td><td rowspan=1 colspan=1>3941.8 ± 61.3</td></tr><tr><td rowspan=1 colspan=1>4000.7 ± 202.1</td><td rowspan=1 colspan=1>1146.7 ± 67.9</td><td rowspan=1 colspan=1>3869.2 ± 88.2</td><td rowspan=1 colspan=1>3530.5 ± 67.8</td><td rowspan=1 colspan=1>3708.1 ± 96.2</td></tr></table>
423
+
424
+ Table 19: The performance of each algorithm in noisy HalfCheetah (referred to in short hand as “Cheetah") environments. The green and red colors indicate increase and decrease in performance, respectively.
425
+
426
+ # E PLANNING HORIZON DILEMMA GRID SEARCH
427
+
428
+ We note that we also perform the dilemma search with different population size with learnt PETSCEM. We experiment both with the HalfCheetah in our benchmarking environments, as well as the environments from Chua et al. (2018), whose observation is further pre-processed. It can be seen from the figure that, planning horizon dilemma exists with different population size. We also show that observation pre-processing can affect the performance by a large margin.
429
+
430
+ ![](images/b24e998a72ffe5a2a2363ff2b34be92adedd27f52b8575466786665f9ef754bc.jpg)
431
+ Figure 7: The performance curve for algorithms with noise. We represent the noise standard deviation with "O" and "A" respectively for the noise added to the observation and action space.
432
+
433
+ # F PLANNING HORIZON DILEMMA IN DYNA ALGORITHMS
434
+
435
+ In this section, we study how the environment length and imaginary environment length (or planning horizon) affect the performance. More specifically, we test with HalfCheetah and Ant, using different environment length form [100, 200, 500, 1000]. For the planning horizon, besides the matching
436
+
437
+ ![](images/045284138089b2fc39b97e37b3bfbf9930465f953dea14e02b72547c7b91c7d8.jpg)
438
+ Figure 8: (Continued) The performance curve for algorithms with noise. We represent the noise standard deviation with "O" and "A" respectively for the noise added to the observation and action space.
439
+
440
+ length, we also test all the length from [100, 200, 500, 800, 1000]. The figures are shown in Figure 10, and the tables are shown in Table 21.
441
+
442
+ Note that we also include planning horizon longer than the actual environment length for reference. For example, for the Ant with 100 environment length, we also include results using 200, 500, 800,
443
+
444
+ <table><tr><td></td><td>Pendulum</td><td>Pendulum,σ= 0.1</td><td>Pendulum,σ。= 0.01</td><td>Cart-Pole</td><td>Cart-Pole,σ= 0.1</td><td>Cart-Pole,σ= 0.01</td></tr><tr><td>iLQR</td><td>160.8 ± 29.8</td><td>-357.9 ± 251.9</td><td>-2.2 ± 166.5</td><td>200.3± 0.6</td><td>197.8 ± 2.9</td><td>200.4 ± 0.7</td></tr><tr><td>GT-PETS</td><td>170.5 ± 35.2</td><td>171.4 ± 26.2</td><td>157.3 ± 66.3</td><td>200.9 ±0.1</td><td>199.5 ± 1.2</td><td>200.9 ± 0.1</td></tr><tr><td>GT-RS</td><td>171.5 ± 31.8</td><td>125.2 ± 40.3</td><td>157.8 ± 39.1</td><td>201.0 ± 0.0</td><td>200.2 ± 0.3</td><td>201.0±0.0</td></tr><tr><td>RS</td><td>164.4 ± 9.1</td><td>154.5 ± 12.9</td><td>160.1 ± 6.7</td><td>201.0 ± 0.0</td><td>197.7 ± 4.5</td><td>200.9 ±0.0</td></tr><tr><td>MB-MF</td><td>157.5 ± 13.2</td><td>162.8 ± 14.7</td><td>165.9 ± 8.5</td><td>199.7 ± 1.2</td><td>152.3 ± 48.3</td><td>137.9 ± 48.5</td></tr><tr><td>PETS</td><td>167.4 ± 53.0</td><td>174.7 ± 27.8</td><td>166.7 ± 52.0</td><td>199.5 ± 3.0</td><td>156.6 ± 50.3</td><td>196.1 ± 5.1</td></tr><tr><td>PETS-RS</td><td>167.9 ± 35.8</td><td>148.0 ± 58.6</td><td>113.6 ± 124.1</td><td>195.0 ± 28.0</td><td>192.3 ± 20.6</td><td>200.8 ± 0.2</td></tr><tr><td>ME-TRPO</td><td>177.3 ± 1.9</td><td>173.3 ± 3.2</td><td>173.7 ± 4.8</td><td>160.1 ± 69.1</td><td>174.9 ± 21.9</td><td>165.9 ± 58.5</td></tr><tr><td>GPS</td><td>162.7 ± 7.6</td><td>162.2 ± 4.5</td><td>168.9 ± 6.8</td><td>14.4 ± 18.6</td><td>-479.8 ± 859.7</td><td>-22.7 ± 53.8</td></tr><tr><td>PILCO</td><td>-132.6 ± 410.1</td><td>-211.6 ± 272.1</td><td>168.9 ± 30.5</td><td>-1.9 ± 155.9</td><td>139.9 ± 54.8</td><td>-2060.1 ± 14.9</td></tr><tr><td>SVG</td><td>141.4 ± 62.4</td><td>86.7 ± 34.6</td><td>78.8 ± 73.2</td><td>82.1± 31.9</td><td>119.2 ± 46.3</td><td>106.6 ± 42.0</td></tr><tr><td>MB-MPO</td><td>171.2 ± 26.9</td><td>178.4 ± 22.2</td><td>183.8 ± 19.9</td><td>199.3 ± 2.3</td><td>-65.1 ± 542.6</td><td>198.2 ± 1.8</td></tr><tr><td>SLBO</td><td>173.5± 2.5</td><td>171.1 ± 1.5</td><td>173.6 ± 2.4</td><td>78.0 ± 166.6</td><td>-691.7 ± 801.0</td><td>-141.8 ± 167.5</td></tr><tr><td>PPO</td><td>163.4 ± 8.0</td><td>165.9 ± 15.4</td><td>157.3 ± 12.6</td><td>86.5± 7.8</td><td>120.5 ± 42.9</td><td>120.3 ± 46.7</td></tr><tr><td>TRPO</td><td>166.7 ± 7.3</td><td>167.5 ± 6.7</td><td>161.1 ± 13.0</td><td>47.3 ± 15.7</td><td>-572.3 ± 368.0</td><td>-818.0 ± 288.1</td></tr><tr><td>TD3</td><td>161.4 ± 14.4</td><td>169.2 ± 13.1</td><td>170.2 ± 7.2</td><td>196.0 ± 3.1</td><td>190.4 ± 4.7</td><td>180.9 ± 8.2</td></tr><tr><td>SAC</td><td>168.2 ± 9.5</td><td>169.3 ± 5.6</td><td>169.1 ± 12.6</td><td>199.4 ± 0.4</td><td>60.9 ± 23.4</td><td>70.7 ± 11.4</td></tr></table>
445
+
446
+ Table 20: The performance of each algorithm in noisy Pendulum and Cart-Pole environments. The green and red colors indicate increase and decrease in performance, respectively. Numbers in black indicate no significant change compared to the default performance.
447
+
448
+ ![](images/4ac1528db2e5506249d9130b88800d0c5fbf36fd6fbd15ed5cd5f8919e11abf5.jpg)
449
+ Figure 9: The performance grid using different planning horizon and depth.
450
+
451
+ <table><tr><td>Environment</td><td>Original Length</td><td>Horizon=100</td><td>Horizon=200</td><td>Horizon=500</td><td>Horizon=800</td><td>Horizon=1000</td></tr><tr><td>HalfCheetah</td><td>Env-100</td><td>250.7 ± 32.1</td><td>290.3 ± 44.5</td><td>222.0 ± 34.1</td><td>253.0 ± 22.3</td><td>243.7 ± 41.7</td></tr><tr><td>HalfCheetah</td><td>Env-200</td><td>422.7 ± 143.7</td><td>675.4 ± 139.6</td><td>529.0 ± 50.0</td><td>451.4 ± 124.5</td><td>528.1 ± 74.7</td></tr><tr><td>HalfCheetah</td><td>Env-500</td><td>816.6 ± 466.0</td><td>583.4 ± 392.7</td><td>399.2 ± 250.5</td><td>986.9 ± 501.9</td><td>1062.7 ± 182.0</td></tr><tr><td>HalfCheetah</td><td>Env-1000</td><td>1312.1 ± 656.1</td><td>1514.2 ± 1001.5</td><td>1522.6 ± 456.3</td><td>1544.2 ± 1349.0</td><td>2027.5 ± 1125.5</td></tr><tr><td>Ant</td><td>Env-100</td><td>1207.8 ± 41.6</td><td>1142.2 ± 25.7</td><td>1111.9 ± 35.3</td><td>1103.7 ± 70.9</td><td>1085.5 ± 22.9</td></tr><tr><td>Ant</td><td>Env-200</td><td>1249.9 ± 127.7</td><td>1172.7 ± 36.4</td><td>1136.9 ± 32.6</td><td>1079.7 ± 37.3</td><td>1096.8 ± 18.6</td></tr><tr><td>Ant</td><td>Env-500</td><td>1397.6 ± 49.9</td><td>1319.1 ± 50.1</td><td>1423.6 ± 46.2</td><td>1287.3 ± 118.7</td><td>1331.5 ± 92.9</td></tr><tr><td>Ant</td><td>Env-1000</td><td>1666.2 ± 201.9</td><td>1646.0 ± 151.8</td><td>1680.7 ± 255.3</td><td>1530.7 ± 48.0</td><td>1647.2 ± 118.5</td></tr></table>
452
+
453
+ Table 21: The performance for different environment length and planning horizon in SLBO summarized in to a table. HalfCheetah and Ant were used in the experiments.
454
+
455
+ 1000 planning horizon. As we can see, for the HalfCheetah environment, increasing planning horizon does not have obvious affects on the performance. In the Ant environments with different environment lengths, a planning horizon of 100 usually produces the best performance, instead of the longer ones.
456
+
457
+ ![](images/e694e9d653788dff463fe48aadb63a9740f394f33981dbbc11c06b4b1ab94fdf.jpg)
458
+ Figure 10: The performance curve for different environment length and planning horizon in SLBO. HalfCheetah and Ant were used in the experiments.
459
+
460
+ # G DYNAMICS NETWORK STRUCTURE AND CAPACITY
461
+
462
+ We also study how the structure or the capacity of the dynamics network affect the performance. In Figure 11, we show the performance of PETS-CEM on HalfCheetah using different networks to learn the dynamics. In Rajeswaran et al. (2017), the authors show that two simple networks, linear network and RBF network, can be used as the policy network, which obtains similar performance compared with using multi-layer perceptron (MLP) in model-free reinforcement learning. Therefore, we use linear network and RBF network to learn the dynamics in model-based reinforcement learning. We also test the performance using wider and deeper networks.
463
+
464
+ As we can see from Figure 11, in model-based RL, linear network and RBF network lead to catastrophic performance drop, indicating multi-layer neural network (MLP) is needed to learn the features to model forward dynamics. On the other hand, increasing the capacity of the MLP by making it much deeper and wider does not seem to increase the performance either.
465
+
466
+ # H NON-MUJOCO ENVIRONMENTS
467
+
468
+ To facilitate research, we also provide simulated agents that uses free physics engines other than MuJoCo. Some of the results can be shown in Figure 12. We note that these environments have different reward and observation functions from the environments benchmarked in the main paper. Therefore the results can not be used to compare with the results of the environments based on MuJoCo.
469
+
470
+ ![](images/2f4e669882ec3d867bac73115f478cf8595c71d816748890b15a5d82f62d9968.jpg)
471
+ Figure 11: The performance of PETS-CEM on HalfCheetah using different network structures.
472
+
473
+ ![](images/99cc5b57122a47a49cc79607658059e7e853babb4d7ba1a149e360e82414f74d.jpg)
474
+ Figure 12: The performance curve for some of the tasks based on Roboschool or Pybullet Klimov & Schulman (2017); AMD (2014); Ellenberger (2018).
475
+
476
+ We use the best hyper-parameters for the corresponding MuJoCo environments, which indicates potential performance gain can be obtained with more careful hyper-parameter search.
477
+
478
+ # I EARLY TERMINATION
479
+
480
+ <table><tr><td></td><td>GT-CEM</td><td>GT-CEM-ET</td><td>GT-CEM-ET,T= 100</td><td>learned-CEM</td><td>learned-CEM-ET</td></tr><tr><td>Ant</td><td>12115.3 ± 209.7</td><td>8074.2 ± 210.2</td><td>4339.8±87.8</td><td>1165.5 ± 226.9</td><td>162.6 ± 142.1</td></tr><tr><td>Hopper</td><td>3232.3 ± 192.3</td><td>260.5 ± 12.2</td><td>817.8 ± 217.6</td><td>1125.0 ± 679.6</td><td>801.9 ± 194.9</td></tr><tr><td>Walker2D</td><td>7719.7 ± 486.7</td><td>105.3 ± 36.6</td><td>6310.3 ± 55.0</td><td>-493.0± 583.7</td><td>290.6 ± 113.4</td></tr></table>
481
+
482
+ Table 22: The performance of PETS algorithm with and without early termination.
483
+
484
+ In this appendix section, we include the results of several schemes we experiment with early termination. The early termination dilemma is universal in all MBRL algorithms we tested, including Dynaalgorithms, shooting algorithms, and algorithm that performs policy search with back-propagation through time. To study the problem, we majorly start with exploring shooting algorithms including RS, PETS-RS and PETS-CEM, which only relates to early termination during planning. In Table 23 and Table 24, we also include the results that the agent does not consider being terminated in planning, even if it will be terminated, which we represent as "Unaware".
485
+
486
+ <table><tr><td></td><td>GT-CEM</td><td>GT-CEM+ET-Unaware</td><td>GT-CEM-ET</td><td>GT-CEM-ET,T= 100</td></tr><tr><td>Ant</td><td>12115.3 ± 209.7</td><td>226.0 ± 178.6</td><td>8074.2 ± 210.2</td><td>4339.8± 87.8</td></tr><tr><td>Hopper</td><td>3232.3 ± 192.3</td><td>256.8 ± 16.3</td><td>260.5 ± 12.2</td><td>817.8 ± 217.6</td></tr><tr><td>Walker2D</td><td>7719.7 ± 486.7</td><td>254.8 ± 233.4</td><td>105.3 ± 36.6</td><td>6310.3 ± 55.0</td></tr></table>
487
+
488
+ Table 23: The performance using ground-truth dynamics for CEM.
489
+
490
+ For the algorithms with unknown dynamics, we specifically study PETS. We design the following schemes.
491
+
492
+ Scheme A: The episode will not be terminated and the agent does not consider being terminated during planning.
493
+
494
+ <table><tr><td></td><td>GT-RS</td><td>GT-RS-ET-Unaware</td><td>GT-RS-ET</td><td>GT-RS-ET, T = 100</td></tr><tr><td>Ant</td><td>2709.1 ± 631.1</td><td>2519.0 ± 469.8</td><td>2083.8 ± 537.2</td><td>2083.8 ± 537.2</td></tr><tr><td>Hopper</td><td>-2467.2 ± 55.4</td><td>209.5 ± 46.8</td><td>220.4 ± 54.9</td><td>289.8 ± 30.5</td></tr><tr><td>Walker2D</td><td>-1641.4 ± 137.6</td><td>207.9 ± 27.2</td><td>231.0 ± 32.4</td><td>258.3 ± 51.5</td></tr></table>
495
+
496
+ Table 24: The performance using ground-truth dynamics for RS.
497
+
498
+ <table><tr><td></td><td>Scheme A</td><td>Scheme B</td><td>Scheme D</td><td>Scheme C</td><td>Scheme E</td></tr><tr><td>Ant</td><td>1165.5 ± 226.9</td><td>81.6 ± 145.8</td><td>171.0 ± 177.3</td><td>110.8 ± 171.8</td><td>162.6 ± 142.1</td></tr><tr><td>Hopper</td><td>1125.0 ± 679.6</td><td>129.3 ± 36.0</td><td>701.7 ± 173.6</td><td>801.9 ± 194.9</td><td>684.1 ± 157.2</td></tr><tr><td>Walker2D</td><td>-493.0 ± 583.7</td><td>-2.5± 6.8</td><td>-79.1 ± 172.4</td><td>290.6 ± 113.4</td><td>142.8 ± 150.6</td></tr></table>
499
+
500
+ Table 25: The performance of PETS-CEM using learned dynamics at 200k time-steps.
501
+
502
+ <table><tr><td></td><td>Ant-ET-Unaware</td><td>Ant-ET</td><td>Ant-ET-2xPenalty</td><td>Ant-ET-5xPenalty</td><td>Ant-ET-10xPenalty</td><td>Ant-ET-20xPenalty</td><td>Ant-ET-30Penalty</td></tr><tr><td>GT-CEM</td><td>226.0± 178.6</td><td>8074.2± 210.2</td><td>1940.9 ± 2051.9</td><td>8092.3 ± 183.1</td><td>7968.8± 179.6</td><td>7969.9 ± 181.5</td><td>7601.5 ± 1140.8</td></tr><tr><td>GT-RS</td><td>2519.0 ± 469.8</td><td>2083.8 ± 537.2</td><td>2474.3 ± 636.4</td><td>2591.1 ± 447.5</td><td>2541.1 ± 827.9</td><td>2715.6± 763.2</td><td>2728.8± 855.5</td></tr><tr><td>Learnt-PETS</td><td>1165.5 ± 226.9</td><td>81.6 ± 145.8</td><td>196.4 ± 176.7</td><td>181.0± 142.8</td><td>205.5 ± 186.0</td><td>204.6 ± 202.6</td><td>188.3 ± 130.7</td></tr></table>
503
+
504
+ Table 26: The performance of agents using different alive bonus or depth penalty during planning.
505
+
506
+ Scheme B: The episode will be terminated early and the agent adds penalty in planning to avoid being terminated.
507
+
508
+ Scheme C: The episode will be terminated, and the agent pads zero rewards after the episode is terminated during planning.
509
+
510
+ Scheme D: The same as Scheme A except for that the episode will be terminated.
511
+
512
+ Scheme E: The same as Scheme C except for that agent is allow to interact with the environment for extra time-steps (100 time-steps for example) to learn dynamics around termination boundary.
513
+
514
+ The results are summarized in Table 25. We also study adding more alive bonus, i. e. more death penalty during planning, whose results are shown in Table 26.
parse/train/H1lefTEKDS/H1lefTEKDS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1lefTEKDS/H1lefTEKDS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1lefTEKDS/H1lefTEKDS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hke0V1rKPS/Hke0V1rKPS.md ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # JACOBIAN ADVERSARIALLY REGULARIZED NETWORKS FOR ROBUSTNESS
2
+
3
+ Alvin Chan1∗, Yi Tay1, Yew-Soon $\mathbf { O n g ^ { 1 } }$ , Jie $\mathbf { F u ^ { 2 } }$ 1Nanyang Technological University, 2Mila, Polytechnique Montreal
4
+
5
+ # ABSTRACT
6
+
7
+ Adversarial examples are crafted with imperceptible perturbations with the intent to fool neural networks. Against such attacks, adversarial training and its variants stand as the strongest defense to date. Previous studies have pointed out that robust models that have undergone adversarial training tend to produce more salient and interpretable Jacobian matrices than their non-robust counterparts. A natural question is whether a model trained with an objective to produce salient Jacobian can result in better robustness. This paper answers this question with affirmative empirical results. We propose Jacobian Adversarially Regularized Networks (JARN) as a method to optimize the saliency of a classifier’s Jacobian by adversarially regularizing the model’s Jacobian to resemble natural training images1. Image classifiers trained with JARN show improved robust accuracy compared to standard models on the MNIST, SVHN and CIFAR-10 datasets, uncovering a new angle to boost robustness without using adversarial training examples.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep learning models have shown impressive performance in a myriad of classification tasks (LeCun et al., 2015). Despite their success, deep neural image classifiers are found to be easily fooled by visually imperceptible adversarial perturbations (Szegedy et al., 2013). These perturbations can be crafted to reduce accuracy during test time or veer predictions towards a target class. This vulnerability not only poses a security risk in using neural networks in critical applications like autonomous driving (Bojarski et al., 2016) but also presents an interesting research problem about how these models work.
12
+
13
+ Many adversarial attacks have come into the scene (Carlini & Wagner, 2017; Papernot et al., 2018; Croce & Hein, 2019), not without defenses proposed to counter them (Gowal et al., 2018; Zhang et al., 2019). Among them, the best defenses are based on adversarial training (AT) where models are trained on adversarial examples to better classify adversarial examples during test time (Madry et al., 2017). While several effective defenses that employ adversarial examples have emerged (Qin et al., 2019; Shafahi et al., 2019), generating strong adversarial training examples adds non-trivial computational burden on the training process (Kannan et al., 2018; Xie et al., 2019).
14
+
15
+ Adversarially trained models gain robustness and are also observed to produce more salient Jacobian matrices (Jacobians) at the input layer as a side effect (Tsipras et al., 2018). These Jacobians visually resemble their corresponding images for robust models but look much noisier for standard non-robust models. It is shown in theory that the saliency in Jacobian is a result of robustness (Etmann et al., 2019). A natural question to ask is this: can an improvement in Jacobian saliency induce robustness in models? In other words, could this side effect be a new avenue to boost model robustness? To the best of our knowledge, this paper is the first to show affirmative findings for this question.
16
+
17
+ To enhance the saliency of Jacobians, we draw inspirations from neural generative networks (Choi et al., 2018; Dai & Wipf, 2019). More specifically, in generative adversarial networks (GANs) (Goodfellow et al., 2014), a generator network learns to generate natural-looking images with a training objective to fool a discriminator network. In our proposed approach, Jacobian Adversarially
18
+
19
+ Regularized Networks (JARN), the classifier learns to produce salient Jacobians with a regularization objective to fool a discriminator network into classifying them as input images. This method offers a new way to look at improving robustness without relying on adversarial examples during training. With JARN, we show that directly training for salient Jacobians can advance model robustness against adversarial examples in the MNIST, SVHN and CIFAR-10 image dataset. When augmented with adversarial training, JARN can provide additive robustness to models thus attaining competitive results. All in all, the prime contributions of this paper are as follows:
20
+
21
+ • We show that directly improving the saliency of classifiers’ input Jacobian matrices can increase its adversarial robustness.
22
+ • To achieve this, we propose Jacobian adversarially regularized networks (JARN) as a method to train classifiers to produce salient Jacobians that resemble input images. Through experiments in MNIST, SVHN and CIFAR-10, we find that JARN boosts adversarial robustness in image classifiers and provides additive robustness to adversarial training.
23
+
24
+ # 2 BACKGROUND AND RELATED WORK
25
+
26
+ Given an input $\mathbf { x }$ , a classifier $f ( \mathbf { x } ; \theta ) : \mathbf { x } \mapsto \mathbb { R } ^ { k }$ maps it to output probabilities for $k$ classes in set $C$ , where $\theta$ is the classifier’s parameters and $\mathbf { y } \in \mathbb { R } ^ { k }$ is the one-hot label for the input. With a training dataset $D$ , the standard method to train a classifier $f$ is empirical risk minimization (ERM), through minθ $\mathbb { E } _ { ( \mathbf { x } , \mathbf { y } ) \sim D } \mathcal { L } ( \mathbf { x } , \mathbf { y } )$ , where $\mathcal { L } ( \mathbf { x } , \mathbf { y } )$ is the standard cross-entropy loss function defined as
27
+
28
+ $$
29
+ \mathcal { L } ( \mathbf { x } , \mathbf { y } ) = \mathbb { E } _ { ( \mathbf { x } , \mathbf { y } ) \sim D } \left[ - \mathbf { y } ^ { \top } \log f ( \mathbf { x } ) \right]
30
+ $$
31
+
32
+ While ERM trains neural networks that perform well on holdout test data, their accuracy drops drastically in the face of adversarial test examples. With an adversarial perturbation of magnitude $\varepsilon$ at input $\mathbf { x }$ , a model is robust against this attack if
33
+
34
+ $$
35
+ \underset { i \in C } { \arg \operatorname* { m a x } } f _ { i } ( \mathbf { x } ; \theta ) = \underset { i \in C } { \arg \operatorname* { m a x } } f _ { i } ( \mathbf { x } + \delta ; \theta ) , \forall \delta \in B _ { p } ( \varepsilon ) = \delta : \| \delta \| _ { p } \leq \varepsilon
36
+ $$
37
+
38
+ We focus on $p = \infty$ in this paper.
39
+
40
+ Adversarial Training To improve models’ robustness, adversarial training (AT) (Goodfellow et al., 2016) seek to match the training data distribution with the adversarial test distribution by training classifiers on adversarial examples. Specifically, AT minimizes the loss function:
41
+
42
+ $$
43
+ \mathcal { L } ( \mathbf { x } , \mathbf { y } ) = \mathbb { E } _ { ( \mathbf { x } , \mathbf { y } ) \sim D } \left[ \operatorname* { m a x } _ { \delta \in B ( \varepsilon ) } \mathcal { L } ( \mathbf { x } + \delta , \mathbf { y } ) \right]
44
+ $$
45
+
46
+ where the inner maximization, $\mathrm { m a x } _ { \delta \in B ( \varepsilon ) } \mathcal { L } ( \mathbf { x } + \delta , \mathbf { y } )$ , is usually performed with an iterative gradient-based optimization. Projected gradient descent (PGD) is one such strong defense which performs the following gradient step iteratively:
47
+
48
+ $$
49
+ \delta \gets \mathrm { P r o j } \left[ \delta - \eta \mathrm { \ s i g n } \left( \nabla _ { \delta } \mathcal { L } ( \mathbf { x } + \delta , \mathbf { y } ) \right) \right]
50
+ $$
51
+
52
+ where $\begin{array} { r } { \operatorname { P r o j } ( \mathbf { x } ) = \arg \operatorname* { m i n } _ { \zeta \in B ( \varepsilon ) } \| \mathbf { x } - \zeta \| } \end{array}$ . The computational cost of solving Equation (3) is dominated by the inner maximization problem of generating adversarial training examples. A naive way to mitigate the computational cost involved is to reduce the number gradient descent iterations but that would result in weaker adversarial training examples. A consequence of this is that the models are unable to resist stronger adversarial examples that are generated with more gradient steps, due to a phenomenon called obfuscated gradients (Carlini & Wagner, 2017; Uesato et al., 2018).
53
+
54
+ Since the introduction of AT, a line of work has emerged that also boosts robustness with adversarial training examples. Capturing the trade-off between natural and adversarial errors, TRADES (Zhang et al., 2019) encourages the decision boundary to be smooth by adding a regularization term to reduce the difference between the prediction of natural and adversarial examples. Qin et al. (2019)
55
+
56
+ seeks to smoothen the loss landscape through local linearization by minimizing the difference between the real and linearly estimated loss value of adversarial examples. To improve adversarial training, Zhang & Wang (2019) generates adversarial examples by feature scattering, i.e., maximizing feature matching distance between the examples and clean samples.
57
+
58
+ Tsipras et al. (2018) observes that adversarially trained models display an interesting phenomenon: they produce salient Jacobian matrices $( \nabla _ { \mathbf x } \mathcal L )$ that loosely resemble input images while less robust standard models have noisier Jacobian. Etmann et al. (2019) explains that linearized robustness (distance from samples to decision boundary) increases as the alignment between the Jacobian and input image grows. They show that this connection is strictly true for linear models but weakens for non-linear neural networks. While these two papers show that robustly trained models result in salient Jacobian matrices, our paper aims to investigate whether directly training to generate salient Jacobian matrices can result in robust models.
59
+
60
+ Non-Adversarial Training Regularization Provable defenses are first proposed to bound minimum adversarial perturbation for certain types of neural networks (Hein & Andriushchenko, 2017; Weng et al., 2018; Raghunathan et al., 2018). One of the most advanced defense from this class of work (Wong et al., 2018) uses a dual network to bound the adversarial perturbation with linear programming. The authors then optimize this bound during training to boost adversarial robustness. Apart from this category, closer to our work, several works have studied a regularization term on top of the standard training objective to reduce the Jacobian’s Frobenius norm. This term aims to reduce the effect input perturbations have on model predictions. Drucker & Le Cun (1991) first proposed this to improve model generalization on natural test samples and called it ‘double backpropagation’. Two subsequent studies found this to also increases robustness against adversarial examples Ross & Doshi-Velez (2018); Jakubovitz & Giryes (2018). Recently, Hoffman et al. (2019) proposed an efficient method to approximate the input-class probability output Jacobians of a classifier to minimize the norms of these Jacobians with a much lower computational cost. Simon-Gabriel et al. (2019) proved that double backpropagation is equivalent to adversarial training with $l _ { 2 }$ examples. Etmann et al. (2019) trained robust models using double backpropagation to study the link between robustness and alignment in non-linear models but did not propose a new defense in their paper. While the double backpropagation term improves robustness by reducing the effect that perturbations in individual pixel have on the classifiers prediction through the Jacobians norm, it does not have the aim to optimize Jacobians to explicitly resemble their corresponding images semantically. Different from these prior work, we train the classifier with an adversarial loss term with the aim to make the Jacobian resemble input images more closely and show in our experiments that this approach confers more robustness.
61
+
62
+ # 3 JACOBIAN ADVERSARIALLY REGULARIZED NETWORKS (JARN)
63
+
64
+ Motivation Robustly trained models are observed to produce salient Jacobian matrices that resemble the input images. This begs a question in the reverse direction: will an objective function that encourages Jacobian to more closely resemble input images, will standard networks become robust? To study this, we look at neural generative networks where models are trained to produce natural-looking images. We draw inspiration from generative adversarial networks (GANs) where a generator network is trained to progressively generate more natural images that fool a discriminator model, in a min-max optimization scenario (Goodfellow et al., 2014). More specifically, we frame a classifier as the generator model in the GAN framework so that its Jacobians can progressively fool a discriminator model to interpret them as input images.
65
+
66
+ Another motivation lies in the high computational cost of the strongest defense to date, adversarial training. The cost on top of standard training is proportional to the number of steps its adversarial examples take to be crafted, requiring an additional backpropagation for each iteration. Especially with larger datasets, there is a need for less resource-intensive defense. In our proposed method (JARN), there is only one additional backpropagation through the classifier and the discriminator model on top of standard training. We share JARN in the following paragraphs and offer some theoretical analysis in $\ S 3 . 1$ .
67
+
68
+ Jacobian Adversarially Regularized Networks Denoting input as $\mathbf { x } \in \mathbb { R } ^ { h w c }$ for $h \times w$ -size images with $c$ channels, one-hot label vector of $k$ classes as $\mathbf { y } \in \mathbb { R } ^ { k }$ , we express $f _ { \mathrm { c l s } } ( \mathbf { x } ) \in \mathbb { R } ^ { k }$ as the prediction of the classifier $( f _ { \mathrm { c l s } } )$ , parameterized by $\theta$ . The standard cross-entropy loss is
69
+
70
+ $$
71
+ \mathcal { L } _ { \mathrm { c l s } } = \mathbb { E } _ { ( \mathbf { x } , \mathbf { y } ) } \left[ - \mathbf { y } ^ { \top } \log f _ { \mathrm { c l s } } ( \mathbf { x } ) \right]
72
+ $$
73
+
74
+ With gradient backpropagation to the input layer, through $f _ { \mathrm { c l s } }$ with respect to ${ \mathcal L } _ { \mathrm { c l s } }$ , we can get the Jacobian matrix $J \in \bar { \mathbb { R } ^ { h w c } }$ as:
75
+
76
+ $$
77
+ J ( \mathbf { x } ) : = \nabla _ { \mathbf { x } } \mathcal { L } _ { \mathrm { c l s } } = \left[ \frac { \partial \mathcal { L } _ { \mathrm { c l s } } } { \partial \mathbf { x } _ { 1 } } \quad \hdots \quad \frac { \partial \mathcal { L } _ { \mathrm { c l s } } } { \partial \mathbf { x } _ { d } } \right]
78
+ $$
79
+
80
+ where $d = h w c$ . The next part of JARN entails adversarial regularization of Jacobian matrices to induce resemblance with input images. Though the Jacobians of robust models are empirically observed to be similar to images, their distributions of pixel values do not visually match (Etmann et al., 2019). The discriminator model may easily distinguish between the Jacobian and natural images through this difference, resulting in the vanishing gradient (Arjovsky et al., 2017) for the classifier train on. To address this, an adaptor network $( f _ { a p t } )$ is introduced to map the Jacobian into the domain of input images. In our experiments, we use a single 1x1 convolutional layer with tanh activation function to model $f _ { a p t }$ , expressing its model parameters as $\psi$ . With the $J$ as the input of fapt, we get the adapted Jacobian matrix J 0 ∈ Rhwc,
81
+
82
+ $$
83
+ J ^ { \prime } = f _ { \mathrm { a p t } } ( J )
84
+ $$
85
+
86
+ We can frame the classifier and adaptor networks as a generator $G ( \mathbf { x } , \mathbf { y } )$
87
+
88
+ $$
89
+ G _ { \theta , \psi } ( \mathbf { x } , \mathbf { y } ) = f _ { \mathrm { a p t } } ( \nabla _ { \mathbf { x } } \mathcal { L } _ { \mathrm { c l s } } ( \mathbf { x } , \mathbf { y } ) )
90
+ $$
91
+
92
+ learning to model distribution of $p { _ { J ^ { \prime } } }$ that resembles $p _ { \mathbf { x } }$
93
+
94
+ We now denote a discriminator network, parameterized by $\phi$ , as $f _ { \mathrm { d i s c } }$ that outputs a single scalar. $f _ { \mathrm { d i s c } } ( \mathbf { x } )$ represents the probability that $\mathbf { x }$ came from training images $p _ { \mathbf { x } }$ rather than $p { _ { J ^ { \prime } } }$ . To train $G _ { \theta , \psi }$ to produce $J ^ { \prime }$ that $f _ { \mathrm { d i s c } }$ perceive as natural images, we employ the following adversarial loss:
95
+
96
+ $$
97
+ \begin{array} { r l } & { \mathcal { L } _ { \mathrm { a d v } } = \mathbb { E } _ { \mathbf { x } } [ \log f _ { \mathrm { d i s c } } ( \mathbf { x } ) ] + \mathbb { E } _ { J ^ { \prime } } [ \log ( 1 - f _ { \mathrm { d i s c } } ( J ^ { \prime } ) ) ] } \\ & { \qquad = \mathbb { E } _ { \mathbf { x } } [ \log f _ { \mathrm { d i s c } } ( \mathbf { x } ) ] + \mathbb { E } _ { ( \mathbf { x } , \mathbf { y } ) } [ \log ( 1 - f _ { \mathrm { d i s c } } ( G _ { \theta , \psi } ( \mathbf { x } ) ) ) ] } \\ & { \qquad = \mathbb { E } _ { \mathbf { x } } [ \log f _ { \mathrm { d i s c } } ( \mathbf { x } ) ] + \mathbb { E } _ { ( \mathbf { x } , \mathbf { y } ) } \left[ \log ( 1 - f _ { \mathrm { d i s c } } ( \ f _ { \mathrm { a p t } } ( \nabla _ { \mathbf { x } } \mathcal { L } _ { \mathrm { c l s } } ( \mathbf { x } , \mathbf { y } ) ) ) ) \right] } \end{array}
98
+ $$
99
+
100
+ Combining this regularization loss with the classification loss function $\mathcal { L } _ { \mathrm { c l s } }$ in Equation (5), we can optimize through stochastic gradient descent to approximate the optimal parameters for the classifier $f _ { \mathrm { c l s } }$ as follows,
101
+
102
+ $$
103
+ \theta ^ { * } = \arg \operatorname* { m i n } _ { \theta } ( \mathcal { L } _ { c l s } + \lambda _ { a d v } \mathcal { L } _ { a d v } )
104
+ $$
105
+
106
+ where $\lambda _ { a d v }$ control how much Jacobian adversarial regularization term dominates the training.
107
+
108
+ Since the adaptor network $( f _ { \mathrm { a p t } } )$ is part of the generator $G$ , its optimal parameters $\psi ^ { * }$ can be found with minimization of the adversarial loss,
109
+
110
+ $$
111
+ \psi ^ { * } = \arg \operatorname* { m i n } _ { \psi } \mathcal { L } _ { a d v }
112
+ $$
113
+
114
+ On the other hand, the discriminator $( f _ { \mathrm { d i s c } } )$ is optimized to maximize the adversarial loss term to distinguish Jacobian from input images correctly,
115
+
116
+ $$
117
+ \phi ^ { * } = \arg \operatorname* { m a x } _ { \phi } \mathcal { L } _ { a d v }
118
+ $$
119
+
120
+ Analogous to how generator from GANs learn to generate images from noise, we add $[ - \varepsilon , - \varepsilon ]$ uniformly distributed noise to input image pixels during JARN training phase. Figure 1 shows a summary of JARN training phase while Algorithm 1 details the corresponding pseudo-codes. In our experiments, we find that using JARN framework only on the last few epoch $( 2 5 \% )$ to train the classifier confers similar adversarial robustness compared to training with JARN for the whole duration. This practice saves compute time and is used for the results reported in this paper.
121
+
122
+ ![](images/8aca4a8c51a2016250db277912a179b240cdbb70040c9175e30be7306a92e91d.jpg)
123
+ Figure 1: Training architecture of JARN.
124
+
125
+ # Algorithm 1: Jacobian Adversarially Regularized Network
126
+
127
+ <table><tr><td colspan="2">1 Input:Training data Dtrain,Learning rates for classifier fels,adaptor fapt and discriminator fdisc: (α,β,~)</td></tr><tr><td>2 for each training iteration do</td><td></td></tr><tr><td>3</td><td>Sample (x,y)~ Dtrain</td></tr><tr><td>4</td><td>X ←x+ε,~unif[-ε,ε]</td></tr><tr><td>5</td><td>Lcls ← -yTlog fels(x) &gt;(1) Compute classification cross-entropy loss</td></tr><tr><td>6</td><td>J ←∀xLcls &gt;(2) Compute Jacobian matrix</td></tr><tr><td>7</td><td>J&#x27;←fapt(J) &gt; (3)Adapt Jacobian to image domain</td></tr><tr><td>8</td><td>Ladv ←log fdisc(x) +log(1-fdisc(J&#x27;)) (4) Compute adversarial loss</td></tr><tr><td>9</td><td>θ←θ-αVθ(Lcls+XaduLadu) &gt;(5a) Update the classifier fels to minimize Lcls and Ladv</td></tr><tr><td>10</td><td>←-βLad D(5b) Update the adaptor fapt to minimize Ladu ←+γLadv</td></tr><tr><td>11</td><td>&gt;(5c) Update the discriminator fdisc to maximize Ladv</td></tr></table>
128
+
129
+ # 3.1 THEORETICAL ANALYSIS
130
+
131
+ Here, we study the link between JARN’s adversarial regularization term with the notion of linearized robustness. Assuming a non-parameteric setting where the models have infinite capacity, we have the following theorem while optimizing $G$ with the adversarial loss $\mathcal { L } _ { a d v }$ .
132
+
133
+ Theorem 3.1. The global minimum of $\mathcal { L } _ { a d \nu }$ is achieved when $G ( \mathbf { x } )$ maps x to itself, i.e., $G ( \mathbf { x } ) = \mathbf { x }$ .
134
+
135
+ Its proof is deferred to $\ S \ A$ . If we assume Jacobian $J$ of our classifier $f _ { \mathrm { c l s } }$ to be the direct output of $G$ , then $J = G ( \mathbf { x } ) = \mathbf { x }$ at the global minimum of the adversarial objective.
136
+
137
+ In Etmann et al. (2019), it is shown that the linearized robustness of a model is loosely upperbounded by the alignment between the Jacobian and the input image. More concretely, denoting $\Psi ^ { i }$ as the logits value of class $i$ in a classifier $F$ , its linearized robustness $\rho$ can be expressed as $\begin{array} { r } { \rho ( \mathbf { x } ) : = \operatorname* { m i n } _ { j \neq i ^ { * } } \frac { \Psi ^ { i ^ { * } } ( \mathbf { x } ) - \Psi ^ { j } ( \mathbf { x } ) } { \| \nabla _ { \mathbf { x } } \Psi ^ { i ^ { * } } ( \mathbf { x } ) - \nabla _ { \mathbf { x } } \Psi ^ { j } ( \mathbf { x } ) \| } } \end{array}$ Here we quote the theorem from Etmann et al. (2019):
138
+
139
+ Theorem 3.2 (Linearized Robustness Bound). (Etmann et al., 2019) Defining $i ^ { * } = \arg \operatorname* { m a x } _ { i } \Psi ^ { i }$ and $j ^ { * } = \arg \operatorname* { m a x } _ { j \neq i ^ { * } } \Psi ^ { j }$ as top two prediction, we let the Jacobian with respect to the difference in top two logits be $\overset { \cdot } { \underset { \cdot } { g } } : = \nabla _ { \mathbf x } ( \Psi ^ { i ^ { * } } - \Psi ^ { j ^ { * } } ) ( \mathbf x )$ . Expressing alignment between the Jacobian with the input as $\begin{array} { r } { \alpha ( \mathbf { x } ) = \frac { | \langle \mathbf { x } , g \rangle | } { \| g \| } } \end{array}$ |hx,gi|kgk , then
140
+
141
+ $$
142
+ \rho ( \mathbf { x } ) \leq \alpha ( \mathbf { x } ) + { \frac { C } { \| g \| } }
143
+ $$
144
+
145
+ where $C$ is a positive constant.
146
+
147
+ Combining with what we have in Theorem 3.1, assuming $J$ to be close to $g$ in a fixed constant term, the alignment term $\alpha ( \mathbf { x } )$ in Equation (13) is maximum when ${ \mathcal { L } } _ { \mathrm { a d v } }$ reaches its global minimum. Though this is not a strict upper bound and, to facilitate the training in JARN in practice, we use an adaptor network to transform the Jacobian, i.e., $J ^ { \prime } = f _ { \mathrm { a p t } } ( J )$ , our experiments show that model robustness can be improved with this adversarial regularization.
148
+
149
+ # 4 EXPERIMENTS
150
+
151
+ We conduct experiments on three image datasets, MNIST, SVHN and CIFAR-10 to evaluate the adversarial robustness of models trained by JARN.
152
+
153
+ # 4.1 MNIST
154
+
155
+ Setup MNIST consists of $6 0 \mathrm { k }$ training and $1 0 \mathrm { k }$ test binary-colored images. We train a CNN, sequentially composed of 3 convolutional layers and 1 final softmax layer. All 3 convolutional layers have a stride of 5 while each layer has an increasing number of output channels (64-128-256). For JARN, we use $\lambda _ { \mathrm { a d v } } = 1$ , a discriminator network of 2 CNN layers (64-128 output channels) and update it for every $1 0 ~ f _ { \mathrm { c l s } }$ training iterations. We evaluate trained models against adversarial examples with $l _ { \infty }$ perturbation $\varepsilon = 0 . 3$ , crafted from FGSM and PGD (5 & 40 iterations). FGSM generates weaker adversarial examples with only one gradient step and is weaker than the iterative PGD method.
156
+
157
+ Results The CNN trained with JARN shows improved adversarial robustness from a standard model across the three types of adversarial examples (Table 1). In the MNIST experiments, we find that data augmentation with uniform noise to pixels alone provides no benefit in robustness from the baseline.
158
+
159
+ Table 1: MNIST accuracy $( \% )$ on adversarial and clean test samples.
160
+
161
+ <table><tr><td>Model</td><td>FGSM</td><td>PGD5</td><td>PGD40</td><td>Clean</td></tr><tr><td>Standard</td><td>76.5</td><td>0</td><td>0</td><td>98.7</td></tr><tr><td>Uniform Noise</td><td>77.5</td><td>0</td><td>0.02</td><td>98.7</td></tr><tr><td>JARN</td><td>98.4</td><td>98.1</td><td>98.1</td><td>98.8</td></tr></table>
162
+
163
+ # 4.2 SVHN
164
+
165
+ Setup SVHN is a 10-class house number image classification dataset with 73257 training and 26032 test images, each of size $3 2 \times 3 2 \times 3$ . We train the Wide-Resnet model following hyperparameters from (Madry et al., 2017)’s setup for their CIFAR-10 experiments. For JARN, we use $\lambda _ { \mathrm { a d v } } = 5$ , a discriminator network of 5 CNN layers (16-32-64-128-256 output channels) and update it for every $2 0 ~ f _ { \mathrm { c l s } }$ training iterations. We evaluate trained models against adversarial examples with $( \varepsilon = 8 / 2 5 5 )$ , crafted from FGSM and 5, 10, 20-iteration PGD attack.
166
+
167
+ Results Similar to the findings in $\ S 4 . 1$ , JARN advances the adversarial robustness of the classifier from the standard baseline against all four types of attacks. Interestingly, uniform noise image augmentation increases adversarial robustness from the baseline in the SVHN experiments, concurring with previous work that shows noise augmentation improves robustness (Ford et al., 2019).
168
+
169
+ Table 2: SVHN accuracy $( \% )$ on adversarial and clean test samples.
170
+
171
+ <table><tr><td>Model</td><td>FGSM</td><td>PGD5</td><td>PGD10</td><td>PGD20</td><td>Clean</td></tr><tr><td>Standard</td><td>64.4</td><td>26.0</td><td>5.47</td><td>1.96</td><td>94.7</td></tr><tr><td>Uniform Noise</td><td>65.0</td><td>42.6</td><td>18.4</td><td>9.21</td><td>95.3</td></tr><tr><td>JARN</td><td>67.2</td><td>57.5</td><td>37.7</td><td>26.79</td><td>94.9</td></tr></table>
172
+
173
+ # 4.3 CIFAR-10
174
+
175
+ Setup CIFAR-10 contains $3 2 \times 3 2 \times 3$ colored images labeled as 10 classes, with 50k training and 10k test images. We train the Wide-Resnet model using similar hyperparameters to (Madry et al., 2017) for our experiments. Following the settings from Madry et al. (2017), we compare with a strong adversarial training baseline (PGD-AT7) that involves training the model with adversarial examples generate with 7-iteration PGD attack. For JARN, we use $\lambda _ { \mathrm { a d v } } = 1$ , a discriminator network of 5 CNN layers (32-64-128-256-512 output channels) and update it for every $2 0 ~ f _ { \mathrm { c l s } }$ training iterations. We evaluate trained models against adversarial examples with $\langle \varepsilon = 8 / 2 5 5 )$ , crafted from FGSM and PGD (5, 10 & 20 iterations). We also add in a fast gradient sign attack baseline (FGSMAT1) that generates adversarial training examples with only 1 gradient step. Though FGSM-trained models are known to rely on obfuscated gradients to counter weak attacks, we augment it with JARN to study if there is additive robustness benefit against strong attacks. We also implemented double backpropagation (Drucker & Le Cun, 1991; Ross & Doshi-Velez, 2018) to compare.
176
+
177
+ Results Similar to results from the previous two datasets, the JARN classifier performs better than the standard baseline for all four types of adversarial examples. Compared to the model trained with uniform-noise augmentation, JARN performs closely in the weaker FGSM attack while being more robust against the two stronger PGD attacks. JARN also outperforms the double backpropagation baseline, showing that regularizing for salient Jacobians confers more robustness than regularizing for smaller Jacobian Frobenius norm values. The strong PGD-AT7 baseline shows higher robustness against PGD attacks than the JARN model. When we train JARN together with 1-step adversarial training (JARN-AT1), we find that the model’s robustness exceeds that of strong PGD-AT7 baseline on all four adversarial attacks, suggesting JARN’s gain in robustness is additive to that of AT.
178
+
179
+ Table 3: CIFAR-10 accuracy $( \% )$ on adversarial and clean test samples.
180
+
181
+ <table><tr><td>Model</td><td>FGSM</td><td>PGD5</td><td>PGD10</td><td>PGD20</td><td>Clean</td></tr><tr><td>Standard</td><td>13.4</td><td>0</td><td>0</td><td>0</td><td>95.0</td></tr><tr><td>Uniform Noise</td><td>67.4</td><td>44.6</td><td>19.7</td><td>7.48</td><td>94.0</td></tr><tr><td>FGSM-AT1</td><td>94.5</td><td>0.25</td><td>0.02</td><td>0.01</td><td>91.7</td></tr><tr><td>Double Backprop</td><td>28.3</td><td>0.05</td><td>0</td><td>0</td><td>95.7</td></tr><tr><td>JARN</td><td>67.2</td><td>50.0</td><td>27.6</td><td>15.5</td><td>93.9</td></tr><tr><td>PGD-AT7</td><td>56.2</td><td>55.5</td><td>47.3</td><td>45.9</td><td>87.3</td></tr><tr><td>JARN-AT1</td><td>65.7</td><td>60.1</td><td>51.8</td><td>46.7</td><td>84.8</td></tr></table>
182
+
183
+ # 4.3.1 GENERALIZATION OF ROBUSTNESS
184
+
185
+ Adversarial training (AT) based defenses generally train the model on examples generated by perturbation of a fixed $\varepsilon$ . Unlike AT, JARN by itself does not have $\varepsilon$ as a training parameter. To study how JARN-AT1 robustness generalizes, we conduct PGD attacks of varying $\varepsilon$ and strength (5, 10 and 20 iterations). We also include another PGD-AT7 baseline that was trained at a higher $\varepsilon = ( 1 2 / 2 5 5 )$ . JARN-AT1 shows higher robustness than the two PGD-AT7 baselines against attacks with higher $\varepsilon$ values $( \leq 8 / 2 5 5 )$ ) across the three PGD attacks, as shown in Figure 2. We also observe that the PGD-AT7 variants outperform each other on attacks with $\varepsilon$ values close to their training $\varepsilon$ , suggesting that their robustness is more adapted to resist adversarial examples that they are trained on. This relates to findings by Tramer & Boneh (2019) which shows that robustness from adversarial training \` is highest against the perturbation type that models are trained on.
186
+
187
+ ![](images/c8a9eb3a463d7eb036d8f8cc439d16d89b239ca3c5767476fd8426f27d3a8706.jpg)
188
+ Figure 2: Generalization of model robustness to PGD attacks of different $\varepsilon$ values.
189
+
190
+ # 4.3.2 LOSS LANDSCAPE
191
+
192
+ We compute the classification loss value along the adversarial perturbation’s direction and a random orthogonal direction to analyze the loss landscape of the models. From Figure 3, we see that the models trained by the standard and FGSM-AT method display loss surfaces that are jagged and nonlinear. This explains why the FGSM-AT display modest accuracy at the weaker FGSM attacks but fail at attacks with more iterations, a phenomenon called obfuscated gradients (Carlini & Wagner, 2017; Uesato et al., 2018) where the initial gradient steps are still trapped within the locality of the input but eventually escape with more iterations. The JARN model displays a loss landscape that is less steep compared to the standard and FGSM-AT models, marked by the much lower (1 order of magnitude) loss value in Figure 3c. When JARN is combined with one iteration of adversarial training, the JARN-AT1 model is observed to have much smoother loss landscapes, similar to that of the PGD-AT7 model, a strong baseline previously observed to be free of obfuscated gradients. This suggests that JARN and AT have additive benefits and JARN-AT1’s adversarial robustness is not attributed to obfuscated gradients.
193
+
194
+ A possible explanation behind the improved robustness through increasing Jacobian saliency is that the space of Jacobian shrinks under this regularization, i.e., Jacobians have to resemble non-noisy images. Intuitively, this means that there would be fewer paths for an adversarial example to reach an optimum in the loss landscape, improving the model’s robustness.
195
+
196
+ ![](images/01dd84c2e8415fe431a2e0be6f7c3a4d5e4f50af96419dc9797d07527a935813.jpg)
197
+ Figure 3: Loss surfaces of models along the adversarial perturbation and a random direction.
198
+
199
+ # 4.3.3 SALIENCY OF JACOBIAN
200
+
201
+ The Jacobian matrices of JARN model and PGD-AT are salient and visually resemble the images more than those from the standard model (Figure 4). Upon closer inspection, the Jacobian matrices of the PGD-AT model concentrate their values at small regions around the object of interest whereas those of the JARN model cover a larger proportion of the images. One explanation is that the JARN model is trained to fool the discriminator network and hence generates Jacobian that contains details of input images to more closely resemble them.
202
+
203
+ # 4.3.4 COMPUTE TIME
204
+
205
+ Training with JARN is computationally more efficient when compared to adversarial training (Table 4). Even when combined with FGSM adversarial training JARN, it takes less than half the time of 7-step PGD adversarial training while outperforming it in robustness.
206
+
207
+ ![](images/b925ccc47058d018619d3236d5039a7609e559d50bc8a220969f56bc9002cd74.jpg)
208
+ Figure 4: Jacobian matrices of CIFAR-10 models.
209
+
210
+ Table 4: Average wall-clock time per training epoch for CIFAR-10 adversarial defenses.
211
+
212
+ <table><tr><td>Model</td><td>PGD-AT7</td><td>JARN-AT1</td><td>FGSM-AT1</td><td>JARN only</td></tr><tr><td>Time (sec)</td><td>704</td><td>294</td><td>267</td><td>217</td></tr></table>
213
+
214
+ # 4.3.5 SENSITIVITY TO HYPERPARAMETERS
215
+
216
+ The performance of GANs in image generation has been well-known to be sensitive to training hyperparameters. We test JARN performance across a range of $\lambda _ { a d v }$ , batch size and discriminator update intervals that are different from $\ S 4 . 3$ and find that its performance is relatively stable across hyperparameter changes, as shown in Appendix Figure 5. In a typical GAN framework, each training step involves a real image sample and an image generated from noise that is decoupled from the real sample. In contrast, a Jacobian is conditioned on its original input image and both are used in the same training step of JARN. This training step resembles that of VAE-GAN (Larsen et al., 2015) where pairs of real images and its reconstructed versions are used for training together, resulting in generally more stable gradients and convergence than GAN. We believe that this similarity favors JARN’s stability over a wider range of hyperparameters.
217
+
218
+ # 4.3.6 BLACK-BOX TRANSFER ATTACKS
219
+
220
+ Transfer attacks are adversarial examples generated from an alternative, substitute model and evaluated on the defense to test for gradient masking (Papernot et al., 2016; Carlini et al., 2019). More specifically, defenses relying on gradient masking will display lower robustness towards transfer attacks than white-box attacks. When evaluated on such black-box attacks using adversarial examples generated from a PGD-AT7 trained model and their differently initialized versions, both JARN and JARN-AT1 display higher accuracy than when under white-box attacks (Table 5). This demonstrates that JARN’s robustness does not rely on gradient masking. Rather unexpectedly, JARN performs better than JARN-AT1 under the PGD-AT7 transfer attacks, which we believe is attributed to its better performance on clean test samples.
221
+
222
+ Table 5: CIFAR-10 accuracy $( \% )$ on transfer attack where adversarial examples are generated from a PGD-AT7 trained model.
223
+
224
+ <table><tr><td>Model</td><td>PGD-AT7 FGSM</td><td>PGD20</td><td>SameModel FGSM PGD20</td><td>FGSM</td><td>White-box PGD20</td><td>Clean</td></tr><tr><td>JARN</td><td>79.6</td><td>76.7</td><td>73.6 17.4</td><td>67.2</td><td>15.5</td><td>93.9</td></tr><tr><td>JARN-AT1</td><td>66.4</td><td>63.0</td><td>70.3 59.3</td><td>65.7</td><td>46.7</td><td>84.8</td></tr></table>
225
+
226
+ # 5 CONCLUSIONS
227
+
228
+ In this paper, we show that training classifiers to give more salient input Jacobian matrices that resemble images can advance their robustness against adversarial examples. We achieve this through an adversarial regularization framework (JARN) that train the model’s Jacobians to fool a discriminator network into classifying them as images. Through our experiments in three image datasets, JARN boosts adversarial robustness of standard models and give competitive performance when added on to weak defenses like FGSM. Our findings open the viability of improving the saliency of Jacobian as a new avenue to boost adversarial robustness.
229
+
230
+ # ACKNOWLEDGMENTS
231
+
232
+ This work is funded by the National Research Foundation, Singapore under its AI Singapore programme [Award No.: AISG-RP-2018-004] and the Data Science and Artificial Intelligence Research Center (DSAIR) at Nanyang Technological University.
233
+
234
+ # REFERENCES
235
+
236
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
237
+
238
+ Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016.
239
+
240
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pp. 39–57. IEEE, 2017.
241
+
242
+ Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, and Aleksander Madry. On evaluating adversarial robustness. arXiv preprint arXiv:1902.06705, 2019.
243
+
244
+ Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
245
+
246
+ Francesco Croce and Matthias Hein. Minimally distorted adversarial examples with a fast adaptive boundary attack. arXiv preprint arXiv:1907.02044, 2019.
247
+
248
+ Bin Dai and David Wipf. Diagnosing and enhancing vae models. arXiv preprint arXiv:1903.05789, 2019.
249
+
250
+ Harris Drucker and Yann Le Cun. Double backpropagation increasing generalization performance. In IJCNN-91-Seattle International Joint Conference on Neural Networks, volume 2, pp. 145–150. IEEE, 1991.
251
+
252
+ Christian Etmann, Sebastian Lunz, Peter Maass, and Carola-Bibiane Schonlieb. On the con- ¨ nection between adversarial robustness and saliency map interpretability. arXiv preprint arXiv:1905.04172, 2019.
253
+
254
+ Nic Ford, Justin Gilmer, Nicolas Carlini, and Dogus Cubuk. Adversarial examples are a natural consequence of test error in noise. arXiv preprint arXiv:1901.10513, 2019.
255
+
256
+ 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.
257
+
258
+ Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT Press, 2016.
259
+
260
+ Sven Gowal, Krishnamurthy Dvijotham, Robert Stanforth, Rudy Bunel, Chongli Qin, Jonathan Uesato, Timothy Mann, and Pushmeet Kohli. On the effectiveness of interval bound propagation for training verifiably robust models. arXiv preprint arXiv:1810.12715, 2018.
261
+
262
+ Matthias Hein and Maksym Andriushchenko. Formal guarantees on the robustness of a classifier against adversarial manipulation. In Advances in Neural Information Processing Systems, pp. 2266–2276, 2017.
263
+
264
+ Judy Hoffman, Daniel A Roberts, and Sho Yaida. Robust learning with jacobian regularization. arXiv preprint arXiv:1908.02729, 2019.
265
+
266
+ Daniel Jakubovitz and Raja Giryes. Improving dnn robustness to adversarial attacks using jacobian regularization. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 514–529, 2018.
267
+
268
+ Harini Kannan, Alexey Kurakin, and Ian Goodfellow. Adversarial logit pairing. arXiv preprint arXiv:1803.06373, 2018.
269
+
270
+ Anders Boesen Lindbo Larsen, Søren Kaae Sønderby, Hugo Larochelle, and Ole Winther. Autoencoding beyond pixels using a learned similarity metric. arXiv preprint arXiv:1512.09300, 2015.
271
+
272
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436, 2015.
273
+
274
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
275
+
276
+ Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016.
277
+
278
+ Nicolas Papernot, Fartash Faghri, Nicholas Carlini, Ian Goodfellow, Reuben Feinman, Alexey Kurakin, Cihang Xie, Yash Sharma, Tom Brown, Aurko Roy, Alexander Matyasko, Vahid Behzadan, Karen Hambardzumyan, Zhishuai Zhang, Yi-Lin Juang, Zhi Li, Ryan Sheatsley, Abhibhav Garg, Jonathan Uesato, Willi Gierke, Yinpeng Dong, David Berthelot, Paul Hendricks, Jonas Rauber, and Rujun Long. Technical report on the cleverhans v2.1.0 adversarial examples library. arXiv preprint arXiv:1610.00768, 2018.
279
+
280
+ Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Alhussein Fawzi, Soham De, Robert Stanforth, Pushmeet Kohli, et al. Adversarial robustness through local linearization. arXiv preprint arXiv:1907.02610, 2019.
281
+
282
+ Aditi Raghunathan, Jacob Steinhardt, and Percy S Liang. Semidefinite relaxations for certifying robustness to adversarial examples. In Advances in Neural Information Processing Systems, pp. 10877–10887, 2018.
283
+
284
+ Andrew Slavin Ross and Finale Doshi-Velez. Improving the adversarial robustness and interpretability of deep neural networks by regularizing their input gradients. In Thirty-second AAAI conference on artificial intelligence, 2018.
285
+
286
+ Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! arXiv preprint arXiv:1904.12843, 2019.
287
+
288
+ Carl-Johann Simon-Gabriel, Yann Ollivier, Leon Bottou, Bernhard Scholkopf, and David Lopez- ¨ Paz. First-order adversarial vulnerability of neural networks and input dimension. In International Conference on Machine Learning, pp. 5809–5817, 2019.
289
+
290
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
291
+
292
+ Florian Tramer and Dan Boneh. Adversarial training and robustness for multiple perturbations. \` arXiv preprint arXiv:1904.13000, 2019.
293
+
294
+ Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018.
295
+
296
+ Jonathan Uesato, Brendan O’Donoghue, Aaron van den Oord, and Pushmeet Kohli. Adversarial risk and the dangers of evaluating against weak attacks. arXiv preprint arXiv:1802.05666, 2018.
297
+
298
+ Tsui-Wei Weng, Pin-Yu Chen, Lam M Nguyen, Mark S Squillante, Ivan Oseledets, and Luca Daniel. Proven: Certifying robustness of neural networks with a probabilistic approach. arXiv preprint arXiv:1812.08329, 2018.
299
+
300
+ Eric Wong, Frank Schmidt, Jan Hendrik Metzen, and J Zico Kolter. Scaling provable adversarial defenses. In Advances in Neural Information Processing Systems, pp. 8400–8409, 2018.
301
+
302
+ Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 501–509, 2019.
303
+
304
+ Haichao Zhang and Jianyu Wang. Defense against adversarial attacks using feature scattering-based adversarial training. arXiv preprint arXiv:1907.10764, 2019.
305
+
306
+ Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P Xing, Laurent El Ghaoui, and Michael I Jordan. Theoretically principled trade-off between robustness and accuracy. arXiv preprint arXiv:1901.08573, 2019.
307
+
308
+ # A PROOF OF THEOREM 3.1
309
+
310
+ Theorem A.1. The global minimum of $\mathcal { L } _ { a d \nu }$ is achieved when $G ( \mathbf { x } )$ maps x to itself, i.e., $G ( \mathbf { x } ) = \mathbf { x }$
311
+
312
+ Proof. From (Goodfellow et al., 2014), for a fixed $G$ , the optimal discriminator is
313
+
314
+ $$
315
+ f _ { \mathrm { d i s c } } ^ { * } ( \mathbf { x } ) = \frac { p _ { \mathrm { d a t a } } ( \mathbf { x } ) } { p _ { \mathrm { d a t a } } ( \mathbf { x } ) + p _ { G } ( \mathbf { x } ) }
316
+ $$
317
+
318
+ We can include the optimal discriminator into Equation (9) to get
319
+
320
+ $$
321
+ \begin{array} { r l } { \mathcal { L } _ { \mathrm { a b v } } ( G ) = \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a s c } } } [ \log f _ { \mathrm { d a s c } } ^ { * } ( \mathbf { x } ) ] + \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a s c } } } [ \log ( 1 - f _ { \mathrm { d i s c } } ^ { * } ( G ( \mathbf { x } ) ) ) ] } & { } \\ { = \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a s c } } } [ \log f _ { \mathrm { d i s c } } ^ { * } ( \mathbf { x } ) ] + \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { E } } } [ \log ( 1 - f _ { \mathrm { d i s c } } ^ { * } ( \mathbf { x } ) ) ] } & { } \\ { = \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a s c } } } [ \log \frac { p _ { \mathrm { d a s t a } } ( \mathbf { x } ) } { p _ { \mathrm { d a s t } } ( \mathbf { x } ) + p _ { G } ( \mathbf { x } ) } ] + \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a s c } } } [ \log \frac { p _ { G } ( \mathbf { x } ) } { p _ { \mathrm { d a s t } } ( \mathbf { x } ) + p _ { G } ( \mathbf { x } ) } ] } & { } \\ { = \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a s c } } } [ \log \frac { p _ { \mathrm { d a s t a } } ( \mathbf { x } ) } { \frac { p _ { \mathrm { d a s t a } } ( \mathbf { x } ) + p _ { G } ( \mathbf { x } ) } { 2 } } ] + \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { G } } } [ \log \frac { p _ { \mathrm { G } } ( \mathbf { x } ) } { \frac { 1 } { 2 } ( p _ { \mathrm { d a s t } } ( \mathbf { x } ) + p _ { G } ( \mathbf { x } ) ) } ] - 2 \log 2 } & { } \\ { = K L ( p _ { \mathrm { d a s t } } \| \frac { p _ { \mathrm { d a s t } } + p _ { G } } { 2 } ) + K L ( p _ { \mathrm { G } } \| \frac { p _ { \mathrm { d a s t } } + p _ { G } } { 2 } ) - \log 4 } & { } \\ { = 2 \cdot J S ( p _ { \mathrm { d a s t } } | | p _ { \mathrm { G } } ) - \log 4 } & { } \end{array}
322
+ $$
323
+
324
+ where $K L$ and $J S$ are the Kullback-Leibler and Jensen-Shannon divergence respectively. Since the Jensen-Shannon divergence is always non-negative, ${ \mathcal { L } } _ { \mathrm { a d v } } ( G )$ reaches its global minimum value of $- \log 4$ when $J S ( p _ { \mathrm { d a t a } } | | p _ { \mathrm { G } } ) ~ = ~ 0$ . When $G ( \mathbf { x } ) \ : = \ : \mathbf { x }$ , we get $p _ { \mathrm { d a t a } } ~ = ~ p _ { \mathrm { G } }$ and consequently $J S ( p _ { \mathrm { d a t a } } | | p _ { \mathrm { G } } ) = 0$ , thus completing the proof.
325
+
326
+ # B SENSITIVITY TO HYPERPARAMETERS
327
+
328
+ ![](images/7ca12f31e99313cbb4efa8e0150a60016877d91e5d1faa255be7c3307c6ee0b3.jpg)
329
+ Figure 5: Accuracy of JARN with different hyperparameters on CIFAR-10 test samples.
parse/train/Hke0V1rKPS/Hke0V1rKPS_content_list.json ADDED
@@ -0,0 +1,1675 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "JACOBIAN ADVERSARIALLY REGULARIZED NETWORKS FOR ROBUSTNESS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 99,
9
+ 696,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Alvin Chan1∗, Yi Tay1, Yew-Soon $\\mathbf { O n g ^ { 1 } }$ , Jie $\\mathbf { F u ^ { 2 } }$ 1Nanyang Technological University, 2Mila, Polytechnique Montreal ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 645,
21
+ 199
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 236,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Adversarial examples are crafted with imperceptible perturbations with the intent to fool neural networks. Against such attacks, adversarial training and its variants stand as the strongest defense to date. Previous studies have pointed out that robust models that have undergone adversarial training tend to produce more salient and interpretable Jacobian matrices than their non-robust counterparts. A natural question is whether a model trained with an objective to produce salient Jacobian can result in better robustness. This paper answers this question with affirmative empirical results. We propose Jacobian Adversarially Regularized Networks (JARN) as a method to optimize the saliency of a classifier’s Jacobian by adversarially regularizing the model’s Jacobian to resemble natural training images1. Image classifiers trained with JARN show improved robust accuracy compared to standard models on the MNIST, SVHN and CIFAR-10 datasets, uncovering a new angle to boost robustness without using adversarial training examples. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 446
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 473,
55
+ 336,
56
+ 489
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep learning models have shown impressive performance in a myriad of classification tasks (LeCun et al., 2015). Despite their success, deep neural image classifiers are found to be easily fooled by visually imperceptible adversarial perturbations (Szegedy et al., 2013). These perturbations can be crafted to reduce accuracy during test time or veer predictions towards a target class. This vulnerability not only poses a security risk in using neural networks in critical applications like autonomous driving (Bojarski et al., 2016) but also presents an interesting research problem about how these models work. ",
63
+ "bbox": [
64
+ 174,
65
+ 505,
66
+ 825,
67
+ 602
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Many adversarial attacks have come into the scene (Carlini & Wagner, 2017; Papernot et al., 2018; Croce & Hein, 2019), not without defenses proposed to counter them (Gowal et al., 2018; Zhang et al., 2019). Among them, the best defenses are based on adversarial training (AT) where models are trained on adversarial examples to better classify adversarial examples during test time (Madry et al., 2017). While several effective defenses that employ adversarial examples have emerged (Qin et al., 2019; Shafahi et al., 2019), generating strong adversarial training examples adds non-trivial computational burden on the training process (Kannan et al., 2018; Xie et al., 2019). ",
74
+ "bbox": [
75
+ 174,
76
+ 609,
77
+ 823,
78
+ 707
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Adversarially trained models gain robustness and are also observed to produce more salient Jacobian matrices (Jacobians) at the input layer as a side effect (Tsipras et al., 2018). These Jacobians visually resemble their corresponding images for robust models but look much noisier for standard non-robust models. It is shown in theory that the saliency in Jacobian is a result of robustness (Etmann et al., 2019). A natural question to ask is this: can an improvement in Jacobian saliency induce robustness in models? In other words, could this side effect be a new avenue to boost model robustness? To the best of our knowledge, this paper is the first to show affirmative findings for this question. ",
85
+ "bbox": [
86
+ 174,
87
+ 713,
88
+ 823,
89
+ 824
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "To enhance the saliency of Jacobians, we draw inspirations from neural generative networks (Choi et al., 2018; Dai & Wipf, 2019). More specifically, in generative adversarial networks (GANs) (Goodfellow et al., 2014), a generator network learns to generate natural-looking images with a training objective to fool a discriminator network. In our proposed approach, Jacobian Adversarially ",
96
+ "bbox": [
97
+ 176,
98
+ 832,
99
+ 823,
100
+ 888
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Regularized Networks (JARN), the classifier learns to produce salient Jacobians with a regularization objective to fool a discriminator network into classifying them as input images. This method offers a new way to look at improving robustness without relying on adversarial examples during training. With JARN, we show that directly training for salient Jacobians can advance model robustness against adversarial examples in the MNIST, SVHN and CIFAR-10 image dataset. When augmented with adversarial training, JARN can provide additive robustness to models thus attaining competitive results. All in all, the prime contributions of this paper are as follows: ",
107
+ "bbox": [
108
+ 173,
109
+ 103,
110
+ 825,
111
+ 202
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "• We show that directly improving the saliency of classifiers’ input Jacobian matrices can increase its adversarial robustness. \n• To achieve this, we propose Jacobian adversarially regularized networks (JARN) as a method to train classifiers to produce salient Jacobians that resemble input images. Through experiments in MNIST, SVHN and CIFAR-10, we find that JARN boosts adversarial robustness in image classifiers and provides additive robustness to adversarial training. ",
118
+ "bbox": [
119
+ 215,
120
+ 213,
121
+ 825,
122
+ 321
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 BACKGROUND AND RELATED WORK ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 342,
133
+ 513,
134
+ 358
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Given an input $\\mathbf { x }$ , a classifier $f ( \\mathbf { x } ; \\theta ) : \\mathbf { x } \\mapsto \\mathbb { R } ^ { k }$ maps it to output probabilities for $k$ classes in set $C$ , where $\\theta$ is the classifier’s parameters and $\\mathbf { y } \\in \\mathbb { R } ^ { k }$ is the one-hot label for the input. With a training dataset $D$ , the standard method to train a classifier $f$ is empirical risk minimization (ERM), through minθ $\\mathbb { E } _ { ( \\mathbf { x } , \\mathbf { y } ) \\sim D } \\mathcal { L } ( \\mathbf { x } , \\mathbf { y } )$ , where $\\mathcal { L } ( \\mathbf { x } , \\mathbf { y } )$ is the standard cross-entropy loss function defined as ",
141
+ "bbox": [
142
+ 173,
143
+ 372,
144
+ 825,
145
+ 431
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "equation",
151
+ "img_path": "images/00fbac08f912e6ede3cd3f312c0cd4a9c7a52ce62f81aedb3cbcdb508ff0a301.jpg",
152
+ "text": "$$\n\\mathcal { L } ( \\mathbf { x } , \\mathbf { y } ) = \\mathbb { E } _ { ( \\mathbf { x } , \\mathbf { y } ) \\sim D } \\left[ - \\mathbf { y } ^ { \\top } \\log f ( \\mathbf { x } ) \\right]\n$$",
153
+ "text_format": "latex",
154
+ "bbox": [
155
+ 374,
156
+ 446,
157
+ 622,
158
+ 468
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "While ERM trains neural networks that perform well on holdout test data, their accuracy drops drastically in the face of adversarial test examples. With an adversarial perturbation of magnitude $\\varepsilon$ at input $\\mathbf { x }$ , a model is robust against this attack if ",
165
+ "bbox": [
166
+ 174,
167
+ 477,
168
+ 826,
169
+ 520
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "equation",
175
+ "img_path": "images/7e3eecea679a8e0eb1812c920de686a07b815c37f9f4dd848b8996d6a91e83ab.jpg",
176
+ "text": "$$\n\\underset { i \\in C } { \\arg \\operatorname* { m a x } } f _ { i } ( \\mathbf { x } ; \\theta ) = \\underset { i \\in C } { \\arg \\operatorname* { m a x } } f _ { i } ( \\mathbf { x } + \\delta ; \\theta ) , \\forall \\delta \\in B _ { p } ( \\varepsilon ) = \\delta : \\| \\delta \\| _ { p } \\leq \\varepsilon\n$$",
177
+ "text_format": "latex",
178
+ "bbox": [
179
+ 259,
180
+ 526,
181
+ 738,
182
+ 553
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "We focus on $p = \\infty$ in this paper. ",
189
+ "bbox": [
190
+ 174,
191
+ 568,
192
+ 395,
193
+ 582
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Adversarial Training To improve models’ robustness, adversarial training (AT) (Goodfellow et al., 2016) seek to match the training data distribution with the adversarial test distribution by training classifiers on adversarial examples. Specifically, AT minimizes the loss function: ",
200
+ "bbox": [
201
+ 174,
202
+ 597,
203
+ 825,
204
+ 640
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "equation",
210
+ "img_path": "images/ed324d17a5e41c8c73bb7da22005eb9635f363f21e557182544ccb791d5e360f.jpg",
211
+ "text": "$$\n\\mathcal { L } ( \\mathbf { x } , \\mathbf { y } ) = \\mathbb { E } _ { ( \\mathbf { x } , \\mathbf { y } ) \\sim D } \\left[ \\operatorname* { m a x } _ { \\delta \\in B ( \\varepsilon ) } \\mathcal { L } ( \\mathbf { x } + \\delta , \\mathbf { y } ) \\right]\n$$",
212
+ "text_format": "latex",
213
+ "bbox": [
214
+ 359,
215
+ 656,
216
+ 637,
217
+ 691
218
+ ],
219
+ "page_idx": 1
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "where the inner maximization, $\\mathrm { m a x } _ { \\delta \\in B ( \\varepsilon ) } \\mathcal { L } ( \\mathbf { x } + \\delta , \\mathbf { y } )$ , is usually performed with an iterative gradient-based optimization. Projected gradient descent (PGD) is one such strong defense which performs the following gradient step iteratively: ",
224
+ "bbox": [
225
+ 174,
226
+ 702,
227
+ 825,
228
+ 744
229
+ ],
230
+ "page_idx": 1
231
+ },
232
+ {
233
+ "type": "equation",
234
+ "img_path": "images/15122880d8f3b10510a4f732325fcb47605093f86b40695148a030bbe5deccf7.jpg",
235
+ "text": "$$\n\\delta \\gets \\mathrm { P r o j } \\left[ \\delta - \\eta \\mathrm { \\ s i g n } \\left( \\nabla _ { \\delta } \\mathcal { L } ( \\mathbf { x } + \\delta , \\mathbf { y } ) \\right) \\right]\n$$",
236
+ "text_format": "latex",
237
+ "bbox": [
238
+ 367,
239
+ 752,
240
+ 630,
241
+ 768
242
+ ],
243
+ "page_idx": 1
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "where $\\begin{array} { r } { \\operatorname { P r o j } ( \\mathbf { x } ) = \\arg \\operatorname* { m i n } _ { \\zeta \\in B ( \\varepsilon ) } \\| \\mathbf { x } - \\zeta \\| } \\end{array}$ . The computational cost of solving Equation (3) is dominated by the inner maximization problem of generating adversarial training examples. A naive way to mitigate the computational cost involved is to reduce the number gradient descent iterations but that would result in weaker adversarial training examples. A consequence of this is that the models are unable to resist stronger adversarial examples that are generated with more gradient steps, due to a phenomenon called obfuscated gradients (Carlini & Wagner, 2017; Uesato et al., 2018). ",
248
+ "bbox": [
249
+ 173,
250
+ 775,
251
+ 825,
252
+ 862
253
+ ],
254
+ "page_idx": 1
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "Since the introduction of AT, a line of work has emerged that also boosts robustness with adversarial training examples. Capturing the trade-off between natural and adversarial errors, TRADES (Zhang et al., 2019) encourages the decision boundary to be smooth by adding a regularization term to reduce the difference between the prediction of natural and adversarial examples. Qin et al. (2019) ",
259
+ "bbox": [
260
+ 174,
261
+ 867,
262
+ 823,
263
+ 924
264
+ ],
265
+ "page_idx": 1
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "seeks to smoothen the loss landscape through local linearization by minimizing the difference between the real and linearly estimated loss value of adversarial examples. To improve adversarial training, Zhang & Wang (2019) generates adversarial examples by feature scattering, i.e., maximizing feature matching distance between the examples and clean samples. ",
270
+ "bbox": [
271
+ 174,
272
+ 103,
273
+ 823,
274
+ 159
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "Tsipras et al. (2018) observes that adversarially trained models display an interesting phenomenon: they produce salient Jacobian matrices $( \\nabla _ { \\mathbf x } \\mathcal L )$ that loosely resemble input images while less robust standard models have noisier Jacobian. Etmann et al. (2019) explains that linearized robustness (distance from samples to decision boundary) increases as the alignment between the Jacobian and input image grows. They show that this connection is strictly true for linear models but weakens for non-linear neural networks. While these two papers show that robustly trained models result in salient Jacobian matrices, our paper aims to investigate whether directly training to generate salient Jacobian matrices can result in robust models. ",
281
+ "bbox": [
282
+ 174,
283
+ 166,
284
+ 825,
285
+ 277
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "Non-Adversarial Training Regularization Provable defenses are first proposed to bound minimum adversarial perturbation for certain types of neural networks (Hein & Andriushchenko, 2017; Weng et al., 2018; Raghunathan et al., 2018). One of the most advanced defense from this class of work (Wong et al., 2018) uses a dual network to bound the adversarial perturbation with linear programming. The authors then optimize this bound during training to boost adversarial robustness. Apart from this category, closer to our work, several works have studied a regularization term on top of the standard training objective to reduce the Jacobian’s Frobenius norm. This term aims to reduce the effect input perturbations have on model predictions. Drucker & Le Cun (1991) first proposed this to improve model generalization on natural test samples and called it ‘double backpropagation’. Two subsequent studies found this to also increases robustness against adversarial examples Ross & Doshi-Velez (2018); Jakubovitz & Giryes (2018). Recently, Hoffman et al. (2019) proposed an efficient method to approximate the input-class probability output Jacobians of a classifier to minimize the norms of these Jacobians with a much lower computational cost. Simon-Gabriel et al. (2019) proved that double backpropagation is equivalent to adversarial training with $l _ { 2 }$ examples. Etmann et al. (2019) trained robust models using double backpropagation to study the link between robustness and alignment in non-linear models but did not propose a new defense in their paper. While the double backpropagation term improves robustness by reducing the effect that perturbations in individual pixel have on the classifiers prediction through the Jacobians norm, it does not have the aim to optimize Jacobians to explicitly resemble their corresponding images semantically. Different from these prior work, we train the classifier with an adversarial loss term with the aim to make the Jacobian resemble input images more closely and show in our experiments that this approach confers more robustness. ",
292
+ "bbox": [
293
+ 174,
294
+ 309,
295
+ 825,
296
+ 614
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "3 JACOBIAN ADVERSARIALLY REGULARIZED NETWORKS (JARN) ",
303
+ "text_level": 1,
304
+ "bbox": [
305
+ 176,
306
+ 652,
307
+ 740,
308
+ 669
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Motivation Robustly trained models are observed to produce salient Jacobian matrices that resemble the input images. This begs a question in the reverse direction: will an objective function that encourages Jacobian to more closely resemble input images, will standard networks become robust? To study this, we look at neural generative networks where models are trained to produce natural-looking images. We draw inspiration from generative adversarial networks (GANs) where a generator network is trained to progressively generate more natural images that fool a discriminator model, in a min-max optimization scenario (Goodfellow et al., 2014). More specifically, we frame a classifier as the generator model in the GAN framework so that its Jacobians can progressively fool a discriminator model to interpret them as input images. ",
315
+ "bbox": [
316
+ 173,
317
+ 694,
318
+ 825,
319
+ 819
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "Another motivation lies in the high computational cost of the strongest defense to date, adversarial training. The cost on top of standard training is proportional to the number of steps its adversarial examples take to be crafted, requiring an additional backpropagation for each iteration. Especially with larger datasets, there is a need for less resource-intensive defense. In our proposed method (JARN), there is only one additional backpropagation through the classifier and the discriminator model on top of standard training. We share JARN in the following paragraphs and offer some theoretical analysis in $\\ S 3 . 1$ . ",
326
+ "bbox": [
327
+ 174,
328
+ 827,
329
+ 823,
330
+ 924
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "Jacobian Adversarially Regularized Networks Denoting input as $\\mathbf { x } \\in \\mathbb { R } ^ { h w c }$ for $h \\times w$ -size images with $c$ channels, one-hot label vector of $k$ classes as $\\mathbf { y } \\in \\mathbb { R } ^ { k }$ , we express $f _ { \\mathrm { c l s } } ( \\mathbf { x } ) \\in \\mathbb { R } ^ { k }$ as the prediction of the classifier $( f _ { \\mathrm { c l s } } )$ , parameterized by $\\theta$ . The standard cross-entropy loss is ",
337
+ "bbox": [
338
+ 173,
339
+ 103,
340
+ 825,
341
+ 147
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "equation",
347
+ "img_path": "images/e60591a36962c7f4982f1e7acc014d9c1780b57abd4d41cfba11a8a002925334.jpg",
348
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { c l s } } = \\mathbb { E } _ { ( \\mathbf { x } , \\mathbf { y } ) } \\left[ - \\mathbf { y } ^ { \\top } \\log f _ { \\mathrm { c l s } } ( \\mathbf { x } ) \\right]\n$$",
349
+ "text_format": "latex",
350
+ "bbox": [
351
+ 392,
352
+ 162,
353
+ 604,
354
+ 184
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "With gradient backpropagation to the input layer, through $f _ { \\mathrm { c l s } }$ with respect to ${ \\mathcal L } _ { \\mathrm { c l s } }$ , we can get the Jacobian matrix $J \\in \\bar { \\mathbb { R } ^ { h w c } }$ as: ",
361
+ "bbox": [
362
+ 174,
363
+ 191,
364
+ 825,
365
+ 220
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "equation",
371
+ "img_path": "images/df80740f09be821966edbe4a6049cd7da8ecdc1cbc49a227e944f2069d975e6b.jpg",
372
+ "text": "$$\nJ ( \\mathbf { x } ) : = \\nabla _ { \\mathbf { x } } \\mathcal { L } _ { \\mathrm { c l s } } = \\left[ \\frac { \\partial \\mathcal { L } _ { \\mathrm { c l s } } } { \\partial \\mathbf { x } _ { 1 } } \\quad \\hdots \\quad \\frac { \\partial \\mathcal { L } _ { \\mathrm { c l s } } } { \\partial \\mathbf { x } _ { d } } \\right]\n$$",
373
+ "text_format": "latex",
374
+ "bbox": [
375
+ 362,
376
+ 236,
377
+ 635,
378
+ 271
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "where $d = h w c$ . The next part of JARN entails adversarial regularization of Jacobian matrices to induce resemblance with input images. Though the Jacobians of robust models are empirically observed to be similar to images, their distributions of pixel values do not visually match (Etmann et al., 2019). The discriminator model may easily distinguish between the Jacobian and natural images through this difference, resulting in the vanishing gradient (Arjovsky et al., 2017) for the classifier train on. To address this, an adaptor network $( f _ { a p t } )$ is introduced to map the Jacobian into the domain of input images. In our experiments, we use a single 1x1 convolutional layer with tanh activation function to model $f _ { a p t }$ , expressing its model parameters as $\\psi$ . With the $J$ as the input of fapt, we get the adapted Jacobian matrix J 0 ∈ Rhwc, ",
385
+ "bbox": [
386
+ 173,
387
+ 272,
388
+ 825,
389
+ 400
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "equation",
395
+ "img_path": "images/1ee92ab83f6fa27a9d9ee83b2ecb2b8bc6cc35e525fecd8823b2864506c46332.jpg",
396
+ "text": "$$\nJ ^ { \\prime } = f _ { \\mathrm { a p t } } ( J )\n$$",
397
+ "text_format": "latex",
398
+ "bbox": [
399
+ 455,
400
+ 417,
401
+ 542,
402
+ 436
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "We can frame the classifier and adaptor networks as a generator $G ( \\mathbf { x } , \\mathbf { y } )$ ",
409
+ "bbox": [
410
+ 174,
411
+ 445,
412
+ 648,
413
+ 460
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "equation",
419
+ "img_path": "images/d490e152e88a3a8ae590b03a70e1934d246462cd94140c3dbcfa9053dfcad25c.jpg",
420
+ "text": "$$\nG _ { \\theta , \\psi } ( \\mathbf { x } , \\mathbf { y } ) = f _ { \\mathrm { a p t } } ( \\nabla _ { \\mathbf { x } } \\mathcal { L } _ { \\mathrm { c l s } } ( \\mathbf { x } , \\mathbf { y } ) )\n$$",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 383,
424
+ 465,
425
+ 612,
426
+ 483
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "learning to model distribution of $p { _ { J ^ { \\prime } } }$ that resembles $p _ { \\mathbf { x } }$ ",
433
+ "bbox": [
434
+ 173,
435
+ 487,
436
+ 535,
437
+ 502
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "We now denote a discriminator network, parameterized by $\\phi$ , as $f _ { \\mathrm { d i s c } }$ that outputs a single scalar. $f _ { \\mathrm { d i s c } } ( \\mathbf { x } )$ represents the probability that $\\mathbf { x }$ came from training images $p _ { \\mathbf { x } }$ rather than $p { _ { J ^ { \\prime } } }$ . To train $G _ { \\theta , \\psi }$ to produce $J ^ { \\prime }$ that $f _ { \\mathrm { d i s c } }$ perceive as natural images, we employ the following adversarial loss: ",
444
+ "bbox": [
445
+ 176,
446
+ 508,
447
+ 823,
448
+ 551
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "equation",
454
+ "img_path": "images/5ffccef4dcab0145e66ae38162aeff155accf4b51fc695df3fc6edfaa622c127.jpg",
455
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { \\mathrm { a d v } } = \\mathbb { E } _ { \\mathbf { x } } [ \\log f _ { \\mathrm { d i s c } } ( \\mathbf { x } ) ] + \\mathbb { E } _ { J ^ { \\prime } } [ \\log ( 1 - f _ { \\mathrm { d i s c } } ( J ^ { \\prime } ) ) ] } \\\\ & { \\qquad = \\mathbb { E } _ { \\mathbf { x } } [ \\log f _ { \\mathrm { d i s c } } ( \\mathbf { x } ) ] + \\mathbb { E } _ { ( \\mathbf { x } , \\mathbf { y } ) } [ \\log ( 1 - f _ { \\mathrm { d i s c } } ( G _ { \\theta , \\psi } ( \\mathbf { x } ) ) ) ] } \\\\ & { \\qquad = \\mathbb { E } _ { \\mathbf { x } } [ \\log f _ { \\mathrm { d i s c } } ( \\mathbf { x } ) ] + \\mathbb { E } _ { ( \\mathbf { x } , \\mathbf { y } ) } \\left[ \\log ( 1 - f _ { \\mathrm { d i s c } } ( \\ f _ { \\mathrm { a p t } } ( \\nabla _ { \\mathbf { x } } \\mathcal { L } _ { \\mathrm { c l s } } ( \\mathbf { x } , \\mathbf { y } ) ) ) ) \\right] } \\end{array}\n$$",
456
+ "text_format": "latex",
457
+ "bbox": [
458
+ 267,
459
+ 565,
460
+ 732,
461
+ 626
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "Combining this regularization loss with the classification loss function $\\mathcal { L } _ { \\mathrm { c l s } }$ in Equation (5), we can optimize through stochastic gradient descent to approximate the optimal parameters for the classifier $f _ { \\mathrm { c l s } }$ as follows, ",
468
+ "bbox": [
469
+ 178,
470
+ 631,
471
+ 821,
472
+ 674
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "equation",
478
+ "img_path": "images/50d621a970ab02252cefb470125bca2fee2f63a81183112facb9de2ae3bc4a6e.jpg",
479
+ "text": "$$\n\\theta ^ { * } = \\arg \\operatorname* { m i n } _ { \\theta } ( \\mathcal { L } _ { c l s } + \\lambda _ { a d v } \\mathcal { L } _ { a d v } )\n$$",
480
+ "text_format": "latex",
481
+ "bbox": [
482
+ 388,
483
+ 693,
484
+ 607,
485
+ 718
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "where $\\lambda _ { a d v }$ control how much Jacobian adversarial regularization term dominates the training. ",
492
+ "bbox": [
493
+ 173,
494
+ 727,
495
+ 792,
496
+ 742
497
+ ],
498
+ "page_idx": 3
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Since the adaptor network $( f _ { \\mathrm { a p t } } )$ is part of the generator $G$ , its optimal parameters $\\psi ^ { * }$ can be found with minimization of the adversarial loss, ",
503
+ "bbox": [
504
+ 173,
505
+ 748,
506
+ 825,
507
+ 777
508
+ ],
509
+ "page_idx": 3
510
+ },
511
+ {
512
+ "type": "equation",
513
+ "img_path": "images/d22514fa0717c9718c216404b40725b9cc401c1fa678fe45000e60776e5b389c.jpg",
514
+ "text": "$$\n\\psi ^ { * } = \\arg \\operatorname* { m i n } _ { \\psi } \\mathcal { L } _ { a d v }\n$$",
515
+ "text_format": "latex",
516
+ "bbox": [
517
+ 431,
518
+ 781,
519
+ 565,
520
+ 809
521
+ ],
522
+ "page_idx": 3
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "On the other hand, the discriminator $( f _ { \\mathrm { d i s c } } )$ is optimized to maximize the adversarial loss term to distinguish Jacobian from input images correctly, ",
527
+ "bbox": [
528
+ 173,
529
+ 821,
530
+ 825,
531
+ 851
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "equation",
537
+ "img_path": "images/92cd23e75c671cb7852c9589e8201e092584a8b57eaf90e98af567ab618b7557.jpg",
538
+ "text": "$$\n\\phi ^ { * } = \\arg \\operatorname* { m a x } _ { \\phi } \\mathcal { L } _ { a d v }\n$$",
539
+ "text_format": "latex",
540
+ "bbox": [
541
+ 431,
542
+ 854,
543
+ 566,
544
+ 882
545
+ ],
546
+ "page_idx": 3
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "Analogous to how generator from GANs learn to generate images from noise, we add $[ - \\varepsilon , - \\varepsilon ]$ uniformly distributed noise to input image pixels during JARN training phase. Figure 1 shows a summary of JARN training phase while Algorithm 1 details the corresponding pseudo-codes. In our experiments, we find that using JARN framework only on the last few epoch $( 2 5 \\% )$ to train the classifier confers similar adversarial robustness compared to training with JARN for the whole duration. This practice saves compute time and is used for the results reported in this paper. ",
551
+ "bbox": [
552
+ 173,
553
+ 895,
554
+ 826,
555
+ 924
556
+ ],
557
+ "page_idx": 3
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "",
562
+ "bbox": [
563
+ 174,
564
+ 103,
565
+ 825,
566
+ 160
567
+ ],
568
+ "page_idx": 4
569
+ },
570
+ {
571
+ "type": "image",
572
+ "img_path": "images/8aca4a8c51a2016250db277912a179b240cdbb70040c9175e30be7306a92e91d.jpg",
573
+ "image_caption": [
574
+ "Figure 1: Training architecture of JARN. "
575
+ ],
576
+ "image_footnote": [],
577
+ "bbox": [
578
+ 307,
579
+ 175,
580
+ 692,
581
+ 352
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Algorithm 1: Jacobian Adversarially Regularized Network ",
588
+ "text_level": 1,
589
+ "bbox": [
590
+ 173,
591
+ 406,
592
+ 565,
593
+ 421
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "table",
599
+ "img_path": "images/571f5d40698fedc1a49028dd77f9ef0e5fab08b8cd2d953d3ccc21a2d89b4062.jpg",
600
+ "table_caption": [],
601
+ "table_footnote": [],
602
+ "table_body": "<table><tr><td colspan=\"2\">1 Input:Training data Dtrain,Learning rates for classifier fels,adaptor fapt and discriminator fdisc: (α,β,~)</td></tr><tr><td>2 for each training iteration do</td><td></td></tr><tr><td>3</td><td>Sample (x,y)~ Dtrain</td></tr><tr><td>4</td><td>X ←x+ε,~unif[-ε,ε]</td></tr><tr><td>5</td><td>Lcls ← -yTlog fels(x) &gt;(1) Compute classification cross-entropy loss</td></tr><tr><td>6</td><td>J ←∀xLcls &gt;(2) Compute Jacobian matrix</td></tr><tr><td>7</td><td>J&#x27;←fapt(J) &gt; (3)Adapt Jacobian to image domain</td></tr><tr><td>8</td><td>Ladv ←log fdisc(x) +log(1-fdisc(J&#x27;)) (4) Compute adversarial loss</td></tr><tr><td>9</td><td>θ←θ-αVθ(Lcls+XaduLadu) &gt;(5a) Update the classifier fels to minimize Lcls and Ladv</td></tr><tr><td>10</td><td>←-βLad D(5b) Update the adaptor fapt to minimize Ladu ←+γLadv</td></tr><tr><td>11</td><td>&gt;(5c) Update the discriminator fdisc to maximize Ladv</td></tr></table>",
603
+ "bbox": [
604
+ 158,
605
+ 425,
606
+ 826,
607
+ 578
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "3.1 THEORETICAL ANALYSIS ",
614
+ "text_level": 1,
615
+ "bbox": [
616
+ 174,
617
+ 606,
618
+ 392,
619
+ 621
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "Here, we study the link between JARN’s adversarial regularization term with the notion of linearized robustness. Assuming a non-parameteric setting where the models have infinite capacity, we have the following theorem while optimizing $G$ with the adversarial loss $\\mathcal { L } _ { a d v }$ . ",
626
+ "bbox": [
627
+ 174,
628
+ 632,
629
+ 825,
630
+ 674
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Theorem 3.1. The global minimum of $\\mathcal { L } _ { a d \\nu }$ is achieved when $G ( \\mathbf { x } )$ maps x to itself, i.e., $G ( \\mathbf { x } ) = \\mathbf { x }$ . ",
637
+ "bbox": [
638
+ 174,
639
+ 678,
640
+ 823,
641
+ 694
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Its proof is deferred to $\\ S \\ A$ . If we assume Jacobian $J$ of our classifier $f _ { \\mathrm { c l s } }$ to be the direct output of $G$ , then $J = G ( \\mathbf { x } ) = \\mathbf { x }$ at the global minimum of the adversarial objective. ",
648
+ "bbox": [
649
+ 171,
650
+ 704,
651
+ 823,
652
+ 733
653
+ ],
654
+ "page_idx": 4
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "In Etmann et al. (2019), it is shown that the linearized robustness of a model is loosely upperbounded by the alignment between the Jacobian and the input image. More concretely, denoting $\\Psi ^ { i }$ as the logits value of class $i$ in a classifier $F$ , its linearized robustness $\\rho$ can be expressed as $\\begin{array} { r } { \\rho ( \\mathbf { x } ) : = \\operatorname* { m i n } _ { j \\neq i ^ { * } } \\frac { \\Psi ^ { i ^ { * } } ( \\mathbf { x } ) - \\Psi ^ { j } ( \\mathbf { x } ) } { \\| \\nabla _ { \\mathbf { x } } \\Psi ^ { i ^ { * } } ( \\mathbf { x } ) - \\nabla _ { \\mathbf { x } } \\Psi ^ { j } ( \\mathbf { x } ) \\| } } \\end{array}$ Here we quote the theorem from Etmann et al. (2019): ",
659
+ "bbox": [
660
+ 173,
661
+ 739,
662
+ 825,
663
+ 806
664
+ ],
665
+ "page_idx": 4
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "Theorem 3.2 (Linearized Robustness Bound). (Etmann et al., 2019) Defining $i ^ { * } = \\arg \\operatorname* { m a x } _ { i } \\Psi ^ { i }$ and $j ^ { * } = \\arg \\operatorname* { m a x } _ { j \\neq i ^ { * } } \\Psi ^ { j }$ as top two prediction, we let the Jacobian with respect to the difference in top two logits be $\\overset { \\cdot } { \\underset { \\cdot } { g } } : = \\nabla _ { \\mathbf x } ( \\Psi ^ { i ^ { * } } - \\Psi ^ { j ^ { * } } ) ( \\mathbf x )$ . Expressing alignment between the Jacobian with the input as $\\begin{array} { r } { \\alpha ( \\mathbf { x } ) = \\frac { | \\langle \\mathbf { x } , g \\rangle | } { \\| g \\| } } \\end{array}$ |hx,gi|kgk , then ",
670
+ "bbox": [
671
+ 173,
672
+ 809,
673
+ 825,
674
+ 877
675
+ ],
676
+ "page_idx": 4
677
+ },
678
+ {
679
+ "type": "equation",
680
+ "img_path": "images/5a7b943facc4565973976ade47c6ae5cd75dd698fc21365991581ddb618998af.jpg",
681
+ "text": "$$\n\\rho ( \\mathbf { x } ) \\leq \\alpha ( \\mathbf { x } ) + { \\frac { C } { \\| g \\| } }\n$$",
682
+ "text_format": "latex",
683
+ "bbox": [
684
+ 431,
685
+ 875,
686
+ 566,
687
+ 907
688
+ ],
689
+ "page_idx": 4
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "where $C$ is a positive constant. ",
694
+ "bbox": [
695
+ 174,
696
+ 910,
697
+ 377,
698
+ 924
699
+ ],
700
+ "page_idx": 4
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "Combining with what we have in Theorem 3.1, assuming $J$ to be close to $g$ in a fixed constant term, the alignment term $\\alpha ( \\mathbf { x } )$ in Equation (13) is maximum when ${ \\mathcal { L } } _ { \\mathrm { a d v } }$ reaches its global minimum. Though this is not a strict upper bound and, to facilitate the training in JARN in practice, we use an adaptor network to transform the Jacobian, i.e., $J ^ { \\prime } = f _ { \\mathrm { a p t } } ( J )$ , our experiments show that model robustness can be improved with this adversarial regularization. ",
705
+ "bbox": [
706
+ 174,
707
+ 103,
708
+ 825,
709
+ 174
710
+ ],
711
+ "page_idx": 5
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "4 EXPERIMENTS ",
716
+ "text_level": 1,
717
+ "bbox": [
718
+ 176,
719
+ 194,
720
+ 326,
721
+ 209
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "We conduct experiments on three image datasets, MNIST, SVHN and CIFAR-10 to evaluate the adversarial robustness of models trained by JARN. ",
728
+ "bbox": [
729
+ 174,
730
+ 224,
731
+ 823,
732
+ 253
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "4.1 MNIST ",
739
+ "text_level": 1,
740
+ "bbox": [
741
+ 174,
742
+ 270,
743
+ 269,
744
+ 285
745
+ ],
746
+ "page_idx": 5
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "Setup MNIST consists of $6 0 \\mathrm { k }$ training and $1 0 \\mathrm { k }$ test binary-colored images. We train a CNN, sequentially composed of 3 convolutional layers and 1 final softmax layer. All 3 convolutional layers have a stride of 5 while each layer has an increasing number of output channels (64-128-256). For JARN, we use $\\lambda _ { \\mathrm { a d v } } = 1$ , a discriminator network of 2 CNN layers (64-128 output channels) and update it for every $1 0 ~ f _ { \\mathrm { c l s } }$ training iterations. We evaluate trained models against adversarial examples with $l _ { \\infty }$ perturbation $\\varepsilon = 0 . 3$ , crafted from FGSM and PGD (5 & 40 iterations). FGSM generates weaker adversarial examples with only one gradient step and is weaker than the iterative PGD method. ",
751
+ "bbox": [
752
+ 174,
753
+ 296,
754
+ 825,
755
+ 409
756
+ ],
757
+ "page_idx": 5
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "Results The CNN trained with JARN shows improved adversarial robustness from a standard model across the three types of adversarial examples (Table 1). In the MNIST experiments, we find that data augmentation with uniform noise to pixels alone provides no benefit in robustness from the baseline. ",
762
+ "bbox": [
763
+ 173,
764
+ 422,
765
+ 825,
766
+ 479
767
+ ],
768
+ "page_idx": 5
769
+ },
770
+ {
771
+ "type": "table",
772
+ "img_path": "images/0a8410a145f01000980c91b521de1c5f838e619cde8b0e32467c4abb35c0fcd5.jpg",
773
+ "table_caption": [
774
+ "Table 1: MNIST accuracy $( \\% )$ on adversarial and clean test samples. "
775
+ ],
776
+ "table_footnote": [],
777
+ "table_body": "<table><tr><td>Model</td><td>FGSM</td><td>PGD5</td><td>PGD40</td><td>Clean</td></tr><tr><td>Standard</td><td>76.5</td><td>0</td><td>0</td><td>98.7</td></tr><tr><td>Uniform Noise</td><td>77.5</td><td>0</td><td>0.02</td><td>98.7</td></tr><tr><td>JARN</td><td>98.4</td><td>98.1</td><td>98.1</td><td>98.8</td></tr></table>",
778
+ "bbox": [
779
+ 323,
780
+ 515,
781
+ 669,
782
+ 570
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "4.2 SVHN ",
789
+ "text_level": 1,
790
+ "bbox": [
791
+ 174,
792
+ 597,
793
+ 263,
794
+ 611
795
+ ],
796
+ "page_idx": 5
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "Setup SVHN is a 10-class house number image classification dataset with 73257 training and 26032 test images, each of size $3 2 \\times 3 2 \\times 3$ . We train the Wide-Resnet model following hyperparameters from (Madry et al., 2017)’s setup for their CIFAR-10 experiments. For JARN, we use $\\lambda _ { \\mathrm { a d v } } = 5$ , a discriminator network of 5 CNN layers (16-32-64-128-256 output channels) and update it for every $2 0 ~ f _ { \\mathrm { c l s } }$ training iterations. We evaluate trained models against adversarial examples with $( \\varepsilon = 8 / 2 5 5 )$ , crafted from FGSM and 5, 10, 20-iteration PGD attack. ",
801
+ "bbox": [
802
+ 173,
803
+ 622,
804
+ 825,
805
+ 707
806
+ ],
807
+ "page_idx": 5
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "Results Similar to the findings in $\\ S 4 . 1$ , JARN advances the adversarial robustness of the classifier from the standard baseline against all four types of attacks. Interestingly, uniform noise image augmentation increases adversarial robustness from the baseline in the SVHN experiments, concurring with previous work that shows noise augmentation improves robustness (Ford et al., 2019). ",
812
+ "bbox": [
813
+ 174,
814
+ 722,
815
+ 825,
816
+ 779
817
+ ],
818
+ "page_idx": 5
819
+ },
820
+ {
821
+ "type": "table",
822
+ "img_path": "images/2de5598c7e739741984449d3ed67359ebf59f30d0f7b6ad6216a764a8a06a317.jpg",
823
+ "table_caption": [
824
+ "Table 2: SVHN accuracy $( \\% )$ on adversarial and clean test samples. "
825
+ ],
826
+ "table_footnote": [],
827
+ "table_body": "<table><tr><td>Model</td><td>FGSM</td><td>PGD5</td><td>PGD10</td><td>PGD20</td><td>Clean</td></tr><tr><td>Standard</td><td>64.4</td><td>26.0</td><td>5.47</td><td>1.96</td><td>94.7</td></tr><tr><td>Uniform Noise</td><td>65.0</td><td>42.6</td><td>18.4</td><td>9.21</td><td>95.3</td></tr><tr><td>JARN</td><td>67.2</td><td>57.5</td><td>37.7</td><td>26.79</td><td>94.9</td></tr></table>",
828
+ "bbox": [
829
+ 290,
830
+ 816,
831
+ 700,
832
+ 872
833
+ ],
834
+ "page_idx": 5
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "4.3 CIFAR-10 ",
839
+ "text_level": 1,
840
+ "bbox": [
841
+ 174,
842
+ 103,
843
+ 290,
844
+ 117
845
+ ],
846
+ "page_idx": 6
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "Setup CIFAR-10 contains $3 2 \\times 3 2 \\times 3$ colored images labeled as 10 classes, with 50k training and 10k test images. We train the Wide-Resnet model using similar hyperparameters to (Madry et al., 2017) for our experiments. Following the settings from Madry et al. (2017), we compare with a strong adversarial training baseline (PGD-AT7) that involves training the model with adversarial examples generate with 7-iteration PGD attack. For JARN, we use $\\lambda _ { \\mathrm { a d v } } = 1$ , a discriminator network of 5 CNN layers (32-64-128-256-512 output channels) and update it for every $2 0 ~ f _ { \\mathrm { c l s } }$ training iterations. We evaluate trained models against adversarial examples with $\\langle \\varepsilon = 8 / 2 5 5 )$ , crafted from FGSM and PGD (5, 10 & 20 iterations). We also add in a fast gradient sign attack baseline (FGSMAT1) that generates adversarial training examples with only 1 gradient step. Though FGSM-trained models are known to rely on obfuscated gradients to counter weak attacks, we augment it with JARN to study if there is additive robustness benefit against strong attacks. We also implemented double backpropagation (Drucker & Le Cun, 1991; Ross & Doshi-Velez, 2018) to compare. ",
851
+ "bbox": [
852
+ 173,
853
+ 130,
854
+ 825,
855
+ 296
856
+ ],
857
+ "page_idx": 6
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "Results Similar to results from the previous two datasets, the JARN classifier performs better than the standard baseline for all four types of adversarial examples. Compared to the model trained with uniform-noise augmentation, JARN performs closely in the weaker FGSM attack while being more robust against the two stronger PGD attacks. JARN also outperforms the double backpropagation baseline, showing that regularizing for salient Jacobians confers more robustness than regularizing for smaller Jacobian Frobenius norm values. The strong PGD-AT7 baseline shows higher robustness against PGD attacks than the JARN model. When we train JARN together with 1-step adversarial training (JARN-AT1), we find that the model’s robustness exceeds that of strong PGD-AT7 baseline on all four adversarial attacks, suggesting JARN’s gain in robustness is additive to that of AT. ",
862
+ "bbox": [
863
+ 173,
864
+ 314,
865
+ 825,
866
+ 439
867
+ ],
868
+ "page_idx": 6
869
+ },
870
+ {
871
+ "type": "table",
872
+ "img_path": "images/844593743d54c378b5b85264319d7f4ab78d50b5db03556a842e6b3a0ce8f9e3.jpg",
873
+ "table_caption": [
874
+ "Table 3: CIFAR-10 accuracy $( \\% )$ on adversarial and clean test samples. "
875
+ ],
876
+ "table_footnote": [],
877
+ "table_body": "<table><tr><td>Model</td><td>FGSM</td><td>PGD5</td><td>PGD10</td><td>PGD20</td><td>Clean</td></tr><tr><td>Standard</td><td>13.4</td><td>0</td><td>0</td><td>0</td><td>95.0</td></tr><tr><td>Uniform Noise</td><td>67.4</td><td>44.6</td><td>19.7</td><td>7.48</td><td>94.0</td></tr><tr><td>FGSM-AT1</td><td>94.5</td><td>0.25</td><td>0.02</td><td>0.01</td><td>91.7</td></tr><tr><td>Double Backprop</td><td>28.3</td><td>0.05</td><td>0</td><td>0</td><td>95.7</td></tr><tr><td>JARN</td><td>67.2</td><td>50.0</td><td>27.6</td><td>15.5</td><td>93.9</td></tr><tr><td>PGD-AT7</td><td>56.2</td><td>55.5</td><td>47.3</td><td>45.9</td><td>87.3</td></tr><tr><td>JARN-AT1</td><td>65.7</td><td>60.1</td><td>51.8</td><td>46.7</td><td>84.8</td></tr></table>",
878
+ "bbox": [
879
+ 284,
880
+ 479,
881
+ 709,
882
+ 585
883
+ ],
884
+ "page_idx": 6
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "4.3.1 GENERALIZATION OF ROBUSTNESS ",
889
+ "text_level": 1,
890
+ "bbox": [
891
+ 176,
892
+ 611,
893
+ 473,
894
+ 625
895
+ ],
896
+ "page_idx": 6
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "Adversarial training (AT) based defenses generally train the model on examples generated by perturbation of a fixed $\\varepsilon$ . Unlike AT, JARN by itself does not have $\\varepsilon$ as a training parameter. To study how JARN-AT1 robustness generalizes, we conduct PGD attacks of varying $\\varepsilon$ and strength (5, 10 and 20 iterations). We also include another PGD-AT7 baseline that was trained at a higher $\\varepsilon = ( 1 2 / 2 5 5 )$ . JARN-AT1 shows higher robustness than the two PGD-AT7 baselines against attacks with higher $\\varepsilon$ values $( \\leq 8 / 2 5 5 )$ ) across the three PGD attacks, as shown in Figure 2. We also observe that the PGD-AT7 variants outperform each other on attacks with $\\varepsilon$ values close to their training $\\varepsilon$ , suggesting that their robustness is more adapted to resist adversarial examples that they are trained on. This relates to findings by Tramer & Boneh (2019) which shows that robustness from adversarial training \\` is highest against the perturbation type that models are trained on. ",
901
+ "bbox": [
902
+ 173,
903
+ 635,
904
+ 825,
905
+ 775
906
+ ],
907
+ "page_idx": 6
908
+ },
909
+ {
910
+ "type": "image",
911
+ "img_path": "images/c8a9eb3a463d7eb036d8f8cc439d16d89b239ca3c5767476fd8426f27d3a8706.jpg",
912
+ "image_caption": [
913
+ "Figure 2: Generalization of model robustness to PGD attacks of different $\\varepsilon$ values. "
914
+ ],
915
+ "image_footnote": [],
916
+ "bbox": [
917
+ 223,
918
+ 787,
919
+ 774,
920
+ 886
921
+ ],
922
+ "page_idx": 6
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "4.3.2 LOSS LANDSCAPE ",
927
+ "text_level": 1,
928
+ "bbox": [
929
+ 176,
930
+ 103,
931
+ 356,
932
+ 117
933
+ ],
934
+ "page_idx": 7
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "We compute the classification loss value along the adversarial perturbation’s direction and a random orthogonal direction to analyze the loss landscape of the models. From Figure 3, we see that the models trained by the standard and FGSM-AT method display loss surfaces that are jagged and nonlinear. This explains why the FGSM-AT display modest accuracy at the weaker FGSM attacks but fail at attacks with more iterations, a phenomenon called obfuscated gradients (Carlini & Wagner, 2017; Uesato et al., 2018) where the initial gradient steps are still trapped within the locality of the input but eventually escape with more iterations. The JARN model displays a loss landscape that is less steep compared to the standard and FGSM-AT models, marked by the much lower (1 order of magnitude) loss value in Figure 3c. When JARN is combined with one iteration of adversarial training, the JARN-AT1 model is observed to have much smoother loss landscapes, similar to that of the PGD-AT7 model, a strong baseline previously observed to be free of obfuscated gradients. This suggests that JARN and AT have additive benefits and JARN-AT1’s adversarial robustness is not attributed to obfuscated gradients. ",
939
+ "bbox": [
940
+ 174,
941
+ 130,
942
+ 825,
943
+ 310
944
+ ],
945
+ "page_idx": 7
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "A possible explanation behind the improved robustness through increasing Jacobian saliency is that the space of Jacobian shrinks under this regularization, i.e., Jacobians have to resemble non-noisy images. Intuitively, this means that there would be fewer paths for an adversarial example to reach an optimum in the loss landscape, improving the model’s robustness. ",
950
+ "bbox": [
951
+ 174,
952
+ 316,
953
+ 825,
954
+ 373
955
+ ],
956
+ "page_idx": 7
957
+ },
958
+ {
959
+ "type": "image",
960
+ "img_path": "images/01dd84c2e8415fe431a2e0be6f7c3a4d5e4f50af96419dc9797d07527a935813.jpg",
961
+ "image_caption": [
962
+ "Figure 3: Loss surfaces of models along the adversarial perturbation and a random direction. "
963
+ ],
964
+ "image_footnote": [],
965
+ "bbox": [
966
+ 184,
967
+ 395,
968
+ 820,
969
+ 667
970
+ ],
971
+ "page_idx": 7
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "4.3.3 SALIENCY OF JACOBIAN ",
976
+ "text_level": 1,
977
+ "bbox": [
978
+ 176,
979
+ 727,
980
+ 398,
981
+ 741
982
+ ],
983
+ "page_idx": 7
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "The Jacobian matrices of JARN model and PGD-AT are salient and visually resemble the images more than those from the standard model (Figure 4). Upon closer inspection, the Jacobian matrices of the PGD-AT model concentrate their values at small regions around the object of interest whereas those of the JARN model cover a larger proportion of the images. One explanation is that the JARN model is trained to fool the discriminator network and hence generates Jacobian that contains details of input images to more closely resemble them. ",
988
+ "bbox": [
989
+ 174,
990
+ 752,
991
+ 825,
992
+ 835
993
+ ],
994
+ "page_idx": 7
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "4.3.4 COMPUTE TIME ",
999
+ "text_level": 1,
1000
+ "bbox": [
1001
+ 176,
1002
+ 856,
1003
+ 339,
1004
+ 869
1005
+ ],
1006
+ "page_idx": 7
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "Training with JARN is computationally more efficient when compared to adversarial training (Table 4). Even when combined with FGSM adversarial training JARN, it takes less than half the time of 7-step PGD adversarial training while outperforming it in robustness. ",
1011
+ "bbox": [
1012
+ 176,
1013
+ 882,
1014
+ 823,
1015
+ 924
1016
+ ],
1017
+ "page_idx": 7
1018
+ },
1019
+ {
1020
+ "type": "image",
1021
+ "img_path": "images/b925ccc47058d018619d3236d5039a7609e559d50bc8a220969f56bc9002cd74.jpg",
1022
+ "image_caption": [
1023
+ "Figure 4: Jacobian matrices of CIFAR-10 models. "
1024
+ ],
1025
+ "image_footnote": [],
1026
+ "bbox": [
1027
+ 245,
1028
+ 99,
1029
+ 756,
1030
+ 301
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "table",
1036
+ "img_path": "images/e5d50a5823cd5ae92a2f1989bbad5950c8e77049bb7ef82d608e9f4cfe0c5a34.jpg",
1037
+ "table_caption": [
1038
+ "Table 4: Average wall-clock time per training epoch for CIFAR-10 adversarial defenses. "
1039
+ ],
1040
+ "table_footnote": [],
1041
+ "table_body": "<table><tr><td>Model</td><td>PGD-AT7</td><td>JARN-AT1</td><td>FGSM-AT1</td><td>JARN only</td></tr><tr><td>Time (sec)</td><td>704</td><td>294</td><td>267</td><td>217</td></tr></table>",
1042
+ "bbox": [
1043
+ 282,
1044
+ 377,
1045
+ 709,
1046
+ 407
1047
+ ],
1048
+ "page_idx": 8
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "4.3.5 SENSITIVITY TO HYPERPARAMETERS ",
1053
+ "text_level": 1,
1054
+ "bbox": [
1055
+ 176,
1056
+ 441,
1057
+ 488,
1058
+ 455
1059
+ ],
1060
+ "page_idx": 8
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "The performance of GANs in image generation has been well-known to be sensitive to training hyperparameters. We test JARN performance across a range of $\\lambda _ { a d v }$ , batch size and discriminator update intervals that are different from $\\ S 4 . 3$ and find that its performance is relatively stable across hyperparameter changes, as shown in Appendix Figure 5. In a typical GAN framework, each training step involves a real image sample and an image generated from noise that is decoupled from the real sample. In contrast, a Jacobian is conditioned on its original input image and both are used in the same training step of JARN. This training step resembles that of VAE-GAN (Larsen et al., 2015) where pairs of real images and its reconstructed versions are used for training together, resulting in generally more stable gradients and convergence than GAN. We believe that this similarity favors JARN’s stability over a wider range of hyperparameters. ",
1065
+ "bbox": [
1066
+ 173,
1067
+ 469,
1068
+ 825,
1069
+ 609
1070
+ ],
1071
+ "page_idx": 8
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "4.3.6 BLACK-BOX TRANSFER ATTACKS ",
1076
+ "text_level": 1,
1077
+ "bbox": [
1078
+ 176,
1079
+ 635,
1080
+ 462,
1081
+ 648
1082
+ ],
1083
+ "page_idx": 8
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Transfer attacks are adversarial examples generated from an alternative, substitute model and evaluated on the defense to test for gradient masking (Papernot et al., 2016; Carlini et al., 2019). More specifically, defenses relying on gradient masking will display lower robustness towards transfer attacks than white-box attacks. When evaluated on such black-box attacks using adversarial examples generated from a PGD-AT7 trained model and their differently initialized versions, both JARN and JARN-AT1 display higher accuracy than when under white-box attacks (Table 5). This demonstrates that JARN’s robustness does not rely on gradient masking. Rather unexpectedly, JARN performs better than JARN-AT1 under the PGD-AT7 transfer attacks, which we believe is attributed to its better performance on clean test samples. ",
1088
+ "bbox": [
1089
+ 174,
1090
+ 662,
1091
+ 825,
1092
+ 789
1093
+ ],
1094
+ "page_idx": 8
1095
+ },
1096
+ {
1097
+ "type": "table",
1098
+ "img_path": "images/7ad31562a3a9dba32defba02a4f0e0d4723a6bb8040c21ae2e02b57ba76634ac.jpg",
1099
+ "table_caption": [
1100
+ "Table 5: CIFAR-10 accuracy $( \\% )$ on transfer attack where adversarial examples are generated from a PGD-AT7 trained model. "
1101
+ ],
1102
+ "table_footnote": [],
1103
+ "table_body": "<table><tr><td>Model</td><td>PGD-AT7 FGSM</td><td>PGD20</td><td>SameModel FGSM PGD20</td><td>FGSM</td><td>White-box PGD20</td><td>Clean</td></tr><tr><td>JARN</td><td>79.6</td><td>76.7</td><td>73.6 17.4</td><td>67.2</td><td>15.5</td><td>93.9</td></tr><tr><td>JARN-AT1</td><td>66.4</td><td>63.0</td><td>70.3 59.3</td><td>65.7</td><td>46.7</td><td>84.8</td></tr></table>",
1104
+ "bbox": [
1105
+ 240,
1106
+ 851,
1107
+ 753,
1108
+ 905
1109
+ ],
1110
+ "page_idx": 8
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "5 CONCLUSIONS ",
1115
+ "text_level": 1,
1116
+ "bbox": [
1117
+ 176,
1118
+ 102,
1119
+ 328,
1120
+ 117
1121
+ ],
1122
+ "page_idx": 9
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "In this paper, we show that training classifiers to give more salient input Jacobian matrices that resemble images can advance their robustness against adversarial examples. We achieve this through an adversarial regularization framework (JARN) that train the model’s Jacobians to fool a discriminator network into classifying them as images. Through our experiments in three image datasets, JARN boosts adversarial robustness of standard models and give competitive performance when added on to weak defenses like FGSM. Our findings open the viability of improving the saliency of Jacobian as a new avenue to boost adversarial robustness. ",
1127
+ "bbox": [
1128
+ 174,
1129
+ 133,
1130
+ 825,
1131
+ 229
1132
+ ],
1133
+ "page_idx": 9
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "ACKNOWLEDGMENTS ",
1138
+ "text_level": 1,
1139
+ "bbox": [
1140
+ 176,
1141
+ 247,
1142
+ 326,
1143
+ 260
1144
+ ],
1145
+ "page_idx": 9
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "This work is funded by the National Research Foundation, Singapore under its AI Singapore programme [Award No.: AISG-RP-2018-004] and the Data Science and Artificial Intelligence Research Center (DSAIR) at Nanyang Technological University. ",
1150
+ "bbox": [
1151
+ 176,
1152
+ 270,
1153
+ 825,
1154
+ 313
1155
+ ],
1156
+ "page_idx": 9
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "REFERENCES ",
1161
+ "text_level": 1,
1162
+ "bbox": [
1163
+ 176,
1164
+ 333,
1165
+ 285,
1166
+ 348
1167
+ ],
1168
+ "page_idx": 9
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017. ",
1173
+ "bbox": [
1174
+ 171,
1175
+ 356,
1176
+ 825,
1177
+ 383
1178
+ ],
1179
+ "page_idx": 9
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016. ",
1184
+ "bbox": [
1185
+ 174,
1186
+ 392,
1187
+ 821,
1188
+ 435
1189
+ ],
1190
+ "page_idx": 9
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pp. 39–57. IEEE, 2017. ",
1195
+ "bbox": [
1196
+ 169,
1197
+ 443,
1198
+ 823,
1199
+ 472
1200
+ ],
1201
+ "page_idx": 9
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, and Aleksander Madry. On evaluating adversarial robustness. arXiv preprint arXiv:1902.06705, 2019. ",
1206
+ "bbox": [
1207
+ 176,
1208
+ 479,
1209
+ 823,
1210
+ 522
1211
+ ],
1212
+ "page_idx": 9
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. ",
1217
+ "bbox": [
1218
+ 176,
1219
+ 530,
1220
+ 821,
1221
+ 574
1222
+ ],
1223
+ "page_idx": 9
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Francesco Croce and Matthias Hein. Minimally distorted adversarial examples with a fast adaptive boundary attack. arXiv preprint arXiv:1907.02044, 2019. ",
1228
+ "bbox": [
1229
+ 169,
1230
+ 582,
1231
+ 823,
1232
+ 609
1233
+ ],
1234
+ "page_idx": 9
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "Bin Dai and David Wipf. Diagnosing and enhancing vae models. arXiv preprint arXiv:1903.05789, 2019. ",
1239
+ "bbox": [
1240
+ 171,
1241
+ 617,
1242
+ 823,
1243
+ 647
1244
+ ],
1245
+ "page_idx": 9
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Harris Drucker and Yann Le Cun. Double backpropagation increasing generalization performance. In IJCNN-91-Seattle International Joint Conference on Neural Networks, volume 2, pp. 145–150. IEEE, 1991. ",
1250
+ "bbox": [
1251
+ 176,
1252
+ 655,
1253
+ 823,
1254
+ 698
1255
+ ],
1256
+ "page_idx": 9
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Christian Etmann, Sebastian Lunz, Peter Maass, and Carola-Bibiane Schonlieb. On the con- ¨ nection between adversarial robustness and saliency map interpretability. arXiv preprint arXiv:1905.04172, 2019. ",
1261
+ "bbox": [
1262
+ 173,
1263
+ 705,
1264
+ 823,
1265
+ 748
1266
+ ],
1267
+ "page_idx": 9
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Nic Ford, Justin Gilmer, Nicolas Carlini, and Dogus Cubuk. Adversarial examples are a natural consequence of test error in noise. arXiv preprint arXiv:1901.10513, 2019. ",
1272
+ "bbox": [
1273
+ 173,
1274
+ 756,
1275
+ 821,
1276
+ 786
1277
+ ],
1278
+ "page_idx": 9
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "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. ",
1283
+ "bbox": [
1284
+ 173,
1285
+ 792,
1286
+ 821,
1287
+ 837
1288
+ ],
1289
+ "page_idx": 9
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT Press, 2016. ",
1294
+ "bbox": [
1295
+ 171,
1296
+ 844,
1297
+ 821,
1298
+ 873
1299
+ ],
1300
+ "page_idx": 9
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Sven Gowal, Krishnamurthy Dvijotham, Robert Stanforth, Rudy Bunel, Chongli Qin, Jonathan Uesato, Timothy Mann, and Pushmeet Kohli. On the effectiveness of interval bound propagation for training verifiably robust models. arXiv preprint arXiv:1810.12715, 2018. ",
1305
+ "bbox": [
1306
+ 176,
1307
+ 882,
1308
+ 825,
1309
+ 924
1310
+ ],
1311
+ "page_idx": 9
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Matthias Hein and Maksym Andriushchenko. Formal guarantees on the robustness of a classifier against adversarial manipulation. In Advances in Neural Information Processing Systems, pp. 2266–2276, 2017. ",
1316
+ "bbox": [
1317
+ 173,
1318
+ 103,
1319
+ 823,
1320
+ 146
1321
+ ],
1322
+ "page_idx": 10
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Judy Hoffman, Daniel A Roberts, and Sho Yaida. Robust learning with jacobian regularization. arXiv preprint arXiv:1908.02729, 2019. ",
1327
+ "bbox": [
1328
+ 171,
1329
+ 156,
1330
+ 821,
1331
+ 185
1332
+ ],
1333
+ "page_idx": 10
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Daniel Jakubovitz and Raja Giryes. Improving dnn robustness to adversarial attacks using jacobian regularization. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 514–529, 2018. ",
1338
+ "bbox": [
1339
+ 173,
1340
+ 195,
1341
+ 825,
1342
+ 238
1343
+ ],
1344
+ "page_idx": 10
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Harini Kannan, Alexey Kurakin, and Ian Goodfellow. Adversarial logit pairing. arXiv preprint arXiv:1803.06373, 2018. ",
1349
+ "bbox": [
1350
+ 174,
1351
+ 248,
1352
+ 823,
1353
+ 277
1354
+ ],
1355
+ "page_idx": 10
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Anders Boesen Lindbo Larsen, Søren Kaae Sønderby, Hugo Larochelle, and Ole Winther. Autoencoding beyond pixels using a learned similarity metric. arXiv preprint arXiv:1512.09300, 2015. ",
1360
+ "bbox": [
1361
+ 174,
1362
+ 286,
1363
+ 823,
1364
+ 316
1365
+ ],
1366
+ "page_idx": 10
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436, 2015. ",
1371
+ "bbox": [
1372
+ 173,
1373
+ 325,
1374
+ 812,
1375
+ 342
1376
+ ],
1377
+ "page_idx": 10
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. ",
1382
+ "bbox": [
1383
+ 176,
1384
+ 352,
1385
+ 821,
1386
+ 393
1387
+ ],
1388
+ "page_idx": 10
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016. ",
1393
+ "bbox": [
1394
+ 176,
1395
+ 405,
1396
+ 823,
1397
+ 446
1398
+ ],
1399
+ "page_idx": 10
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Nicolas Papernot, Fartash Faghri, Nicholas Carlini, Ian Goodfellow, Reuben Feinman, Alexey Kurakin, Cihang Xie, Yash Sharma, Tom Brown, Aurko Roy, Alexander Matyasko, Vahid Behzadan, Karen Hambardzumyan, Zhishuai Zhang, Yi-Lin Juang, Zhi Li, Ryan Sheatsley, Abhibhav Garg, Jonathan Uesato, Willi Gierke, Yinpeng Dong, David Berthelot, Paul Hendricks, Jonas Rauber, and Rujun Long. Technical report on the cleverhans v2.1.0 adversarial examples library. arXiv preprint arXiv:1610.00768, 2018. ",
1404
+ "bbox": [
1405
+ 173,
1406
+ 457,
1407
+ 825,
1408
+ 541
1409
+ ],
1410
+ "page_idx": 10
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Alhussein Fawzi, Soham De, Robert Stanforth, Pushmeet Kohli, et al. Adversarial robustness through local linearization. arXiv preprint arXiv:1907.02610, 2019. ",
1415
+ "bbox": [
1416
+ 174,
1417
+ 551,
1418
+ 823,
1419
+ 594
1420
+ ],
1421
+ "page_idx": 10
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "text": "Aditi Raghunathan, Jacob Steinhardt, and Percy S Liang. Semidefinite relaxations for certifying robustness to adversarial examples. In Advances in Neural Information Processing Systems, pp. 10877–10887, 2018. ",
1426
+ "bbox": [
1427
+ 173,
1428
+ 604,
1429
+ 823,
1430
+ 647
1431
+ ],
1432
+ "page_idx": 10
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Andrew Slavin Ross and Finale Doshi-Velez. Improving the adversarial robustness and interpretability of deep neural networks by regularizing their input gradients. In Thirty-second AAAI conference on artificial intelligence, 2018. ",
1437
+ "bbox": [
1438
+ 174,
1439
+ 657,
1440
+ 825,
1441
+ 700
1442
+ ],
1443
+ "page_idx": 10
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! arXiv preprint arXiv:1904.12843, 2019. ",
1448
+ "bbox": [
1449
+ 174,
1450
+ 710,
1451
+ 825,
1452
+ 753
1453
+ ],
1454
+ "page_idx": 10
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "Carl-Johann Simon-Gabriel, Yann Ollivier, Leon Bottou, Bernhard Scholkopf, and David Lopez- ¨ Paz. First-order adversarial vulnerability of neural networks and input dimension. In International Conference on Machine Learning, pp. 5809–5817, 2019. ",
1459
+ "bbox": [
1460
+ 176,
1461
+ 763,
1462
+ 825,
1463
+ 808
1464
+ ],
1465
+ "page_idx": 10
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. ",
1470
+ "bbox": [
1471
+ 169,
1472
+ 816,
1473
+ 823,
1474
+ 845
1475
+ ],
1476
+ "page_idx": 10
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Florian Tramer and Dan Boneh. Adversarial training and robustness for multiple perturbations. \\` arXiv preprint arXiv:1904.13000, 2019. ",
1481
+ "bbox": [
1482
+ 171,
1483
+ 856,
1484
+ 823,
1485
+ 885
1486
+ ],
1487
+ "page_idx": 10
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018. ",
1492
+ "bbox": [
1493
+ 174,
1494
+ 895,
1495
+ 823,
1496
+ 924
1497
+ ],
1498
+ "page_idx": 10
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "Jonathan Uesato, Brendan O’Donoghue, Aaron van den Oord, and Pushmeet Kohli. Adversarial risk and the dangers of evaluating against weak attacks. arXiv preprint arXiv:1802.05666, 2018. ",
1503
+ "bbox": [
1504
+ 171,
1505
+ 103,
1506
+ 823,
1507
+ 132
1508
+ ],
1509
+ "page_idx": 11
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "Tsui-Wei Weng, Pin-Yu Chen, Lam M Nguyen, Mark S Squillante, Ivan Oseledets, and Luca Daniel. Proven: Certifying robustness of neural networks with a probabilistic approach. arXiv preprint arXiv:1812.08329, 2018. ",
1514
+ "bbox": [
1515
+ 176,
1516
+ 140,
1517
+ 823,
1518
+ 183
1519
+ ],
1520
+ "page_idx": 11
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "Eric Wong, Frank Schmidt, Jan Hendrik Metzen, and J Zico Kolter. Scaling provable adversarial defenses. In Advances in Neural Information Processing Systems, pp. 8400–8409, 2018. ",
1525
+ "bbox": [
1526
+ 171,
1527
+ 193,
1528
+ 823,
1529
+ 222
1530
+ ],
1531
+ "page_idx": 11
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 501–509, 2019. ",
1536
+ "bbox": [
1537
+ 176,
1538
+ 229,
1539
+ 821,
1540
+ 273
1541
+ ],
1542
+ "page_idx": 11
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "Haichao Zhang and Jianyu Wang. Defense against adversarial attacks using feature scattering-based adversarial training. arXiv preprint arXiv:1907.10764, 2019. ",
1547
+ "bbox": [
1548
+ 173,
1549
+ 281,
1550
+ 823,
1551
+ 310
1552
+ ],
1553
+ "page_idx": 11
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P Xing, Laurent El Ghaoui, and Michael I Jordan. Theoretically principled trade-off between robustness and accuracy. arXiv preprint arXiv:1901.08573, 2019. ",
1558
+ "bbox": [
1559
+ 174,
1560
+ 319,
1561
+ 826,
1562
+ 362
1563
+ ],
1564
+ "page_idx": 11
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "A PROOF OF THEOREM 3.1 ",
1569
+ "text_level": 1,
1570
+ "bbox": [
1571
+ 176,
1572
+ 102,
1573
+ 415,
1574
+ 118
1575
+ ],
1576
+ "page_idx": 12
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "Theorem A.1. The global minimum of $\\mathcal { L } _ { a d \\nu }$ is achieved when $G ( \\mathbf { x } )$ maps x to itself, i.e., $G ( \\mathbf { x } ) = \\mathbf { x }$ ",
1581
+ "bbox": [
1582
+ 173,
1583
+ 132,
1584
+ 821,
1585
+ 150
1586
+ ],
1587
+ "page_idx": 12
1588
+ },
1589
+ {
1590
+ "type": "text",
1591
+ "text": "Proof. From (Goodfellow et al., 2014), for a fixed $G$ , the optimal discriminator is ",
1592
+ "bbox": [
1593
+ 181,
1594
+ 162,
1595
+ 715,
1596
+ 179
1597
+ ],
1598
+ "page_idx": 12
1599
+ },
1600
+ {
1601
+ "type": "equation",
1602
+ "img_path": "images/ddf130c48bfc0724e3fba4704ed9f43712bea8fb7e32f4554ed0f63dc4485561.jpg",
1603
+ "text": "$$\nf _ { \\mathrm { d i s c } } ^ { * } ( \\mathbf { x } ) = \\frac { p _ { \\mathrm { d a t a } } ( \\mathbf { x } ) } { p _ { \\mathrm { d a t a } } ( \\mathbf { x } ) + p _ { G } ( \\mathbf { x } ) }\n$$",
1604
+ "text_format": "latex",
1605
+ "bbox": [
1606
+ 403,
1607
+ 184,
1608
+ 596,
1609
+ 219
1610
+ ],
1611
+ "page_idx": 12
1612
+ },
1613
+ {
1614
+ "type": "text",
1615
+ "text": "We can include the optimal discriminator into Equation (9) to get ",
1616
+ "bbox": [
1617
+ 173,
1618
+ 232,
1619
+ 602,
1620
+ 247
1621
+ ],
1622
+ "page_idx": 12
1623
+ },
1624
+ {
1625
+ "type": "equation",
1626
+ "img_path": "images/887f97497844bbd32fa990feff6670a93bcb066be1368693b487433080a11968.jpg",
1627
+ "text": "$$\n\\begin{array} { r l } { \\mathcal { L } _ { \\mathrm { a b v } } ( G ) = \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { d a s c } } } [ \\log f _ { \\mathrm { d a s c } } ^ { * } ( \\mathbf { x } ) ] + \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { d a s c } } } [ \\log ( 1 - f _ { \\mathrm { d i s c } } ^ { * } ( G ( \\mathbf { x } ) ) ) ] } & { } \\\\ { = \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { d a s c } } } [ \\log f _ { \\mathrm { d i s c } } ^ { * } ( \\mathbf { x } ) ] + \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { E } } } [ \\log ( 1 - f _ { \\mathrm { d i s c } } ^ { * } ( \\mathbf { x } ) ) ] } & { } \\\\ { = \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { d a s c } } } [ \\log \\frac { p _ { \\mathrm { d a s t a } } ( \\mathbf { x } ) } { p _ { \\mathrm { d a s t } } ( \\mathbf { x } ) + p _ { G } ( \\mathbf { x } ) } ] + \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { d a s c } } } [ \\log \\frac { p _ { G } ( \\mathbf { x } ) } { p _ { \\mathrm { d a s t } } ( \\mathbf { x } ) + p _ { G } ( \\mathbf { x } ) } ] } & { } \\\\ { = \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { d a s c } } } [ \\log \\frac { p _ { \\mathrm { d a s t a } } ( \\mathbf { x } ) } { \\frac { p _ { \\mathrm { d a s t a } } ( \\mathbf { x } ) + p _ { G } ( \\mathbf { x } ) } { 2 } } ] + \\mathbb { E } _ { \\mathbf { x } \\sim p _ { \\mathrm { G } } } [ \\log \\frac { p _ { \\mathrm { G } } ( \\mathbf { x } ) } { \\frac { 1 } { 2 } ( p _ { \\mathrm { d a s t } } ( \\mathbf { x } ) + p _ { G } ( \\mathbf { x } ) ) } ] - 2 \\log 2 } & { } \\\\ { = K L ( p _ { \\mathrm { d a s t } } \\| \\frac { p _ { \\mathrm { d a s t } } + p _ { G } } { 2 } ) + K L ( p _ { \\mathrm { G } } \\| \\frac { p _ { \\mathrm { d a s t } } + p _ { G } } { 2 } ) - \\log 4 } & { } \\\\ { = 2 \\cdot J S ( p _ { \\mathrm { d a s t } } | | p _ { \\mathrm { G } } ) - \\log 4 } & { } \\end{array}\n$$",
1628
+ "text_format": "latex",
1629
+ "bbox": [
1630
+ 187,
1631
+ 252,
1632
+ 812,
1633
+ 417
1634
+ ],
1635
+ "page_idx": 12
1636
+ },
1637
+ {
1638
+ "type": "text",
1639
+ "text": "where $K L$ and $J S$ are the Kullback-Leibler and Jensen-Shannon divergence respectively. Since the Jensen-Shannon divergence is always non-negative, ${ \\mathcal { L } } _ { \\mathrm { a d v } } ( G )$ reaches its global minimum value of $- \\log 4$ when $J S ( p _ { \\mathrm { d a t a } } | | p _ { \\mathrm { G } } ) ~ = ~ 0$ . When $G ( \\mathbf { x } ) \\ : = \\ : \\mathbf { x }$ , we get $p _ { \\mathrm { d a t a } } ~ = ~ p _ { \\mathrm { G } }$ and consequently $J S ( p _ { \\mathrm { d a t a } } | | p _ { \\mathrm { G } } ) = 0$ , thus completing the proof. ",
1640
+ "bbox": [
1641
+ 174,
1642
+ 433,
1643
+ 825,
1644
+ 491
1645
+ ],
1646
+ "page_idx": 12
1647
+ },
1648
+ {
1649
+ "type": "text",
1650
+ "text": "B SENSITIVITY TO HYPERPARAMETERS ",
1651
+ "text_level": 1,
1652
+ "bbox": [
1653
+ 174,
1654
+ 531,
1655
+ 522,
1656
+ 549
1657
+ ],
1658
+ "page_idx": 12
1659
+ },
1660
+ {
1661
+ "type": "image",
1662
+ "img_path": "images/7ca12f31e99313cbb4efa8e0150a60016877d91e5d1faa255be7c3307c6ee0b3.jpg",
1663
+ "image_caption": [
1664
+ "Figure 5: Accuracy of JARN with different hyperparameters on CIFAR-10 test samples. "
1665
+ ],
1666
+ "image_footnote": [],
1667
+ "bbox": [
1668
+ 184,
1669
+ 568,
1670
+ 812,
1671
+ 703
1672
+ ],
1673
+ "page_idx": 12
1674
+ }
1675
+ ]
parse/train/Hke0V1rKPS/Hke0V1rKPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hke0V1rKPS/Hke0V1rKPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HktRlUlAZ/HktRlUlAZ.md ADDED
@@ -0,0 +1,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # POLAR TRANSFORMER NETWORKS
2
+
3
+ Carlos Esteves, Christine Allen-Blanchette, Xiaowei Zhou, Kostas Daniilidis GRASP Laboratory, University of Pennsylvania {machc, allec, xiaowz, kostas}@seas.upenn.edu
4
+
5
+ # ABSTRACT
6
+
7
+ Convolutional neural networks (CNNs) are inherently equivariant to translation. Efforts to embed other forms of equivariance have concentrated solely on rotation. We expand the notion of equivariance in CNNs through the Polar Transformer Network (PTN). PTN combines ideas from the Spatial Transformer Network (STN) and canonical coordinate representations. The result is a network invariant to translation and equivariant to both rotation and scale. PTN is trained end-to-end and composed of three distinct stages: a polar origin predictor, the newly introduced polar transformer module and a classifier. PTN achieves stateof-the-art on rotated MNIST and the newly introduced SIM2MNIST dataset, an MNIST variation obtained by adding clutter and perturbing digits with translation, rotation and scaling. The ideas of PTN are extensible to 3D which we demonstrate through the Cylindrical Transformer Network.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Whether at the global pattern or local feature level (Granlund, 1978), the quest for (in/equi)variant representations is as old as the field of computer vision and pattern recognition itself. State-of-the-art in “hand-crafted” approaches is typified by SIFT (Lowe, 2004). These detector/descriptors identify the intrinsic scale or rotation of a region (Lindeberg, 1994; Chomat et al., 2000) and produce an equivariant descriptor which is normalized for scale and/or rotation invariance. The burden of these methods is in the computation of the orbit (i.e. a sampling the transformation space) which is necessary to achieve equivariance. This motivated steerable filtering which guarantees transformed filter responses can be interpolated from a finite number of filter responses. Steerability was proved for rotations of Gaussian derivatives (Freeman et al., 1991) and extended to scale and translations in the shiftable pyramid (Simoncelli et al., 1992). Use of the orbit and SVD to create a filter basis was proposed by Perona (1995)and in parallel, Segman et al. (1992) proved for certain classes of transformations there exists canonical coordinates where deformation of the input presents as translation of the output. Following this work, Nordberg & Granlund (1996) and Hel-Or & Teo (1996); Teo & Hel-Or (1998) proposed a methodology for computing the bases of equivariant spaces given the Lie generators of a transformation. and most recently, Sifre & Mallat (2013) proposed the scattering transform which offers representations invariant to translation, scaling, and rotations.
12
+
13
+ The current consensus is representations should be learned not designed. Equivariance to translations by convolution and invariance to local deformations by pooling are now textbook (LeCun et al. (2015), p.335) but approaches to equivariance of more general deformations are still maturing. The main veins are: Spatial Transformer Network (STN) (Jaderberg et al., 2015) which similarly to SIFT learn a canonical pose and produce an invariant representation through warping, work which constrains the structure of convolutional filters (Worrall et al., 2016) and work which uses the filter orbit (Cohen & Welling, 2016b) to enforce an equivariance to a specific transformation group.
14
+
15
+ In this paper, we propose the Polar Transformer Network (PTN), which combines the ideas of STN and canonical coordinate representations to achieve equivariance to translations, rotations, and dilations. The three stage network learns to identify the object center then transforms the input into logpolar coordinates. In this coordinate system, planar convolutions correspond to group-convolutions in rotation and scale. PTN produces a representation equivariant to rotations and dilations without the challenging parameter regression of STN. We enlarge the notion of equivariance in CNNs beyond Harmonic Networks (Worrall et al., 2016) and Group Convolutions (Cohen & Welling, 2016b) by capturing both rotations and dilations of arbitrary precision. Similar to STN; however, PTN accommodates only global deformations.
16
+
17
+ ![](images/565aedc51cc399886806a7cb20f6598d0327fe11f3d80c675ed4b7e67a377b62.jpg)
18
+ Figure 1: In the log-polar representation, rotations around the origin become vertical shifts, and dilations around the origin become horizontal shifts. The distance between the yellow and green lines is proportional to the rotation angle/scale factor. Top rows: sequence of rotations, and the corresponding polar images. Bottom rows: sequence of dilations, and the corresponding polar images.
19
+
20
+ We present state-of-the-art performance on rotated MNIST and SIM2MNIST, which we introduce. To summarize our contributions:
21
+
22
+ • We develop a CNN architecture capable of learning an image representation invariant to translation and equivariant to rotation and dilation. We propose the polar transformer module, which performs a differentiable log-polar transform, amenable to backpropagation training. The transform origin is a latent variable. • We show how the polar transform origin can be learned effectively as the centroid of a single channel heatmap predicted by a fully convolutional network.
23
+
24
+ # 2 RELATED WORK
25
+
26
+ One of the first equivariant feature extraction schemes was proposed by Nordberg & Granlund (1996) who suggested the discrete sampling of 2D-rotations of a complex angle modulated filter. About the same time, the image and optical processing community discovered the Mellin transform as a modification of the Fourier transform (Zwicke & Kiss, 1983; Casasent & Psaltis, 1976). The Fourier-Mellin transform is equivariant to rotation and scale while its modulus is invariant.
27
+
28
+ During the 80’s and 90’s invariances of integral transforms were developed through methods based in the Lie generators of the respective transforms starting from one-parameter transforms (Ferraro & Caelli, 1988) and generalizing to Abelian subgroups of the affine group (Segman et al., 1992).
29
+
30
+ Closely related to the (in/equi)variance work is work in steerability, the interpolation of responses to any group action using the response of a finite filter basis. An exact steerability framework began in Freeman et al. (1991), where rotational steerability for Gaussian derivatives was explicitly computed. It was extended to the shiftable pyramid (Simoncelli et al., 1992), which handle rotation and scale. A method of approximating steerability by learning a lower dimensional representation of the image deformation from the transformation orbit and the SVD was proposed by Perona (1995).
31
+
32
+ A unification of Lie generator and steerability approaches was introduced by Teo & Hel-Or (1998) who used SVD to reduce the number of basis functions for a given transformation group. Teo and Hel-Or developed the most extensive framework for steerability (Teo & Hel-Or, 1998; Hel-Or & Teo, 1996), and proposed the first approach for non-Abelian groups starting with exact steerability for the largest Abelian subgroup and incrementally steering for the remaining subgroups. Cohen & Welling (2016a); Jacobsen et al. (2017) recently combined steerability and learnable filters.
33
+
34
+ The most recent “hand-crafted” approach to equivariant representations is the scattering transform (Sifre & Mallat, 2013) which composes rotated and dilated wavelets. Similar to SIFT (Lowe, 2004) this approach relies on the equivariance of anchor points (e.g. the maxima of filtered responses in (translation) space). Translation invariance is obtained through the modulus operation which is computed after each convolution. The final scattering coefficient is invariant to translations and equivariant to local rotations and scalings.
35
+
36
+ Laptev et al. (2016) achieve transformation invariance by pooling feature maps computed over the input orbit, which scales poorly as it requires forward and backward passes for each orbit element.
37
+
38
+ Within the context of CNNs, methods of enforcing equivariance fall to two main veins. In the first, equivariance is obtained by constraining filter structure similarly to Lie generator based approaches (Segman et al., 1992; Hel-Or & Teo, 1996). Harmonic Networks (Worrall et al., 2016) use filters derived from the complex harmonics achieving both rotational and translational equivariance. The second requires the use of a filter orbit which is itself equivariant to obtain group equivariance. Cohen & Welling (2016b) convolve with the orbit of a learned filter and prove the equivariance of group-convolutions and preservation of rotational equivariance in the presence of rectification and pooling. Dieleman et al. (2015) process elements of the image orbit individually and use the set of outputs for classification. Gens & Domingos (2014) produce maps of finite-multiparameter groups, Zhou et al. (2017) and Marcos et al. (2016) use a rotational filter orbit to produce oriented feature maps and rotationally invariant features, and Lenc & Vedaldi (2015) propose a transformation layer which acts as a group-convolution by first permuting then transforming by a linear filter.
39
+
40
+ Our approach, PTN, is akin to the second vein. We achieve global rotational equivariance and expand the notion of CNN equivariance to include scaling. PTN employs log-polar coordinates (canonical coordinates in Segman et al. (1992)) to achieve rotation-dilation group-convolution through translational convolution subject to the assumption of an image center estimated similarly to the STN. Most related to our method is Henriques & Vedaldi (2016), which achieves equivariance by warping the inputs to a fixed grid, with no learned parameters.
41
+
42
+ When learning features from 3D objects, invariance to transformations is usually achieved through augmenting the training data with transformed versions of the inputs (Wu et al., 2015), or pooling over transformed versions during training and/or test (Maturana & Scherer, 2015; Qi et al., 2016). Sedaghat et al. (2016) show that a multi-task approach, i.e. prediction of both the orientation and class, improves classification performance. In our extension to 3D object classification, we explicitly learn representations equivariant to rotations around a family of parallel axes by transforming the input to cylindrical coordinates about a predicted axis.
43
+
44
+ # 3 THEORETICAL BACKGROUND
45
+
46
+ This section is divided into two parts, the first offers a review of equivariance and groupconvolutions. The second offers an explicit example of the equivariance of group-convolutions through the 2D similarity transformations group, SIM(2), comprised of translations, dilations and rotations. Reparameterization of SIM(2) to canonical coordinates allows for the application of the SIM(2) group-convolution using translational convolution.
47
+
48
+ # 3.1 GROUP EQUIVARIANCE
49
+
50
+ Equivariant representations are highly sought after as they encode both class and deformation information in a predictable way. Let $G$ be a transformation group and $L _ { g } I$ be the group action applied to an image $I$ . A mapping $\Phi : E F$ is said to be equivariant to the group action $L _ { g }$ , $g \in G$ if
51
+
52
+ $$
53
+ \Phi ( L _ { g } I ) = L _ { g } ^ { \prime } ( \Phi ( I ) )
54
+ $$
55
+
56
+ where $L _ { g }$ and $L _ { g } ^ { \prime }$ correspond to application of $g$ to $E$ and $F$ respectively and satisfy ${ \cal L } _ { g h } = { \cal L } _ { g } { \cal L } _ { h }$ . Invariance is the special case of equivariance where $L _ { g } ^ { \prime }$ is the identity. In the context of image classification and CNNs, $g \in G$ can be thought of as an image deformation and $\Phi$ a mapping from the image to a feature map.
57
+
58
+ The inherent translational equivariance of CNNs is independent of the convolutional kernel and evident in the corresponding translation of the output in response to translation of the input. Equivariance to other types of deformations can be achieved through application of the group-convolution, a generalization of translational convolution. Letting $f ( g )$ and $\phi ( g )$ be real valued functions on $G$ with $L _ { h } f ( g ) = f ( h ^ { - 1 } g )$ , the group-convolution is defined Kyatkin & Chirikjian (2000)
59
+
60
+ $$
61
+ ( f \star _ { G } \phi ) ( g ) = \int _ { h \in G } f ( h ) \phi ( h ^ { - 1 } g ) d h .
62
+ $$
63
+
64
+ A slight modification to the definition is necessary in the first CNN layer since the group is acting on the image. The group-convolution reduces to translational convolution when $G$ is translation in $\mathbb { R } ^ { n }$ with addition as the group operator,
65
+
66
+ $$
67
+ \begin{array} { c } { { ( f \star \phi ) ( x ) = \displaystyle \int _ { h } f ( h ) \phi ( h ^ { - 1 } x ) d h } } \\ { { = \displaystyle \int _ { h } f ( h ) \phi ( x - h ) d h . } } \end{array}
68
+ $$
69
+
70
+ Group-convolution requires integrability over a group and identification of the appropriate measure dg. It can be proved that given the measure $d g$ , group-convolution is always group equivariant:
71
+
72
+ $$
73
+ \begin{array} { l } { \displaystyle ( L _ { a } f \star _ { G } \phi ) ( g ) = \int _ { h \in G } f ( a ^ { - 1 } h ) \phi ( h ^ { - 1 } g ) d h } \\ { \displaystyle = \int _ { b \in G } f ( b ) \phi ( ( a b ) ^ { - 1 } g ) d b } \\ { \displaystyle = \int _ { b \in G } f ( b ) \phi ( b ^ { - 1 } a ^ { - 1 } g ) d b } \\ { \displaystyle = ( f \star _ { G } \phi ) ( a ^ { - 1 } g ) } \\ { \displaystyle = L _ { a } ( ( f \star _ { G } \phi ) ) ( g ) . } \end{array}
74
+ $$
75
+
76
+ This is depicted in response of an equivariant representation to input deformation (Figure 2 (left)).
77
+
78
+ # 3.2 EQUIVARIANCE IN SIM(2)
79
+
80
+ A similarity transformation, $\rho \in { \mathrm { S I M } } ( 2 )$ , acts on a point in $\boldsymbol { x } \in \mathbb { R } ^ { 2 }$ by
81
+
82
+ $$
83
+ \rho x \to s R x + t \quad s \in \mathbb { R } ^ { + } , R \in S O ( 2 ) , t \in \mathbb { R } ^ { 2 } ,
84
+ $$
85
+
86
+ where $S O ( 2 )$ is the rotation group. To take advantage of the standard planar convolution in classical CNNs we decompose a $\rho \in { \mathrm { S I M } } ( 2 )$ into a translation, $t$ in $\mathbb { R } ^ { 2 }$ and a dilated-rotation $r$ in $\mathbf { S } \mathbf { O } ( 2 ) \times \mathbb { R } ^ { + }$ .
87
+
88
+ Equivariance to SIM(2) is achieved by learning the center of the dilated rotation, shifting the original image accordingly then transforming the image to canonical coordinates. In this reparameterization the standard translational convolution is equivalent to the dilated-rotation group-convolution.
89
+
90
+ The origin predictor is an application of STN to global translation prediction (Jaderberg et al., 2015), the centroid of the output is taken as the origin of the input.
91
+
92
+ Transformation of the image $L _ { t } I = I ( t - t _ { 0 } )$ (canonization in Soatto (2013)) reduces the SIM(2) deformation to a dilated-rotation if $t _ { o }$ is the true translation. After centering, we perform ${ \mathrm { S O } } ( 2 ) \times$ $\mathbb { R } ^ { + }$ convolutions on the new image $I _ { o } = I ( x - t _ { o } )$ :
93
+
94
+ $$
95
+ f ( r ) = \int _ { x \in \mathbb { R } ^ { 2 } } I _ { o } ( x ) \phi ( r ^ { - 1 } x ) \ d x
96
+ $$
97
+
98
+ and the feature maps $f$ in subsequent layers
99
+
100
+ $$
101
+ h ( r ) = \int _ { s \in S O ( 2 ) \times \mathbb { R } ^ { + } } f ( s ) \phi ( s ^ { - 1 } r ) \ d s
102
+ $$
103
+
104
+ where $r , s \in \mathrm { S O } ( 2 ) \times \mathbb { R } ^ { + }$ . We compute this convolution through use of canonical coordinates for Abelian Lie-groups (Segman et al., 1992). The centered image $I _ { o } ( x , y ) ^ { 1 }$ is transformed to logpolar coordinates, $I ( e ^ { \xi } \cos ( \theta ) , e ^ { \xi } \sin ( \theta ) )$ hereafter written $\lambda ( \xi , \theta )$ with $( \xi , \theta ) \in { \bf S O } ( 2 ) \times \mathbb { R } ^ { + }$ for
105
+
106
+ ![](images/46102bca2d21343c0db1f10976893e3f525cec860420041aee5c2ee22bc4429b.jpg)
107
+ Figure 2: Left: Group-convolutions in $S O ( 2 )$ . The images in the left most column differ by $9 0 °$ rotation, the filters are shown in the top row. Application of the rotational group-convolution with an arbitrary filter results is shown to produce an equivariant representation. The inner-product each of filter orbit (rotated from $0 - 3 6 0 ^ { \circ }$ ) and the image is plotted in blue for the top image and red for the bottom image. Observe how the filter response is shifted by $9 0 °$ . Right: Group-convolutions in $\mathbf { S } \mathbf { O } ( 2 ) \times \mathbb { R } ^ { + }$ . Images in the left most column differ by a rotation of $\pi / 4$ and scaling of 1.2. Careful consideration of the resulting heatmaps (shown in canonical coordinates) reveals a shift corresponding to the deformation of the input image.
108
+
109
+ notational convenience. The shift of the dilated-rotation equivariant representation in response to input deformation is shown in Figure 2 (right) using canonical coordinates.
110
+
111
+ In canonical coordinates $s ^ { - 1 } r = \xi _ { r } - \xi , \theta _ { r } - \theta$ and the $\mathbf { S } \mathbf { O } ( 2 ) \times \mathbb { R } ^ { + }$ group-convolution2 can be expressed and efficiently implemented as a planar convolution
112
+
113
+ $$
114
+ \int _ { s } f ( s ) \phi ( s ^ { - 1 } r ) \ d s = \int _ { s } \lambda ( \xi , \theta ) \phi ( \xi _ { r } - \xi , \theta _ { r } - \theta ) \ d \xi d \theta .
115
+ $$
116
+
117
+ To summarize, we (1) construct a network of translational convolutions, (2) take the centroid of the last layer, (3) shift the original image to accordingly, (4) convert to log-polar coordinates, and (5) apply a second network3 of translational convolutions. The result is a feature map equivariant to dilated-rotations around the origin.
118
+
119
+ # 4 ARCHITECTURE
120
+
121
+ PTN is comprised of two main components connected by the polar transformer module. The first part is the polar origin predictor and the second is the classifier (a conventional fully convolutional network). The building block of the network is a $3 \times 3 \times K$ convolutional layer followed by batch normalization, an ReLU and occasional subsampling through strided convolution. We will refer to this building block simply as block. Figure 3 shows the architecture.
122
+
123
+ # 4.1 POLAR ORIGIN PREDICTOR
124
+
125
+ The polar origin predictor operates on the original image and comprises a sequence of blocks followed by a $1 \times 1$ convolution. The output is a single channel feature map, the centroid of which is taken as the origin of the polar transform.
126
+
127
+ There are some difficulties in training a neural network to predict coordinates in images. Some approaches (Toshev & Szegedy, 2014) attempt to use fully connected layers to directly regress the coordinates with limited success. A better option is to predict heatmaps (Tompson et al., 2014; Newell et al., 2016), and take their argmax. However, this can be problematic since backpropogation gradients are zero in all but one point, which impedes learning.
128
+
129
+ ![](images/7462a826dc0a93344bc8c66f9bb0dfe6b918474c79d77f950c72c7576849fb60.jpg)
130
+ Figure 3: Network architecture. The input image passes through a fully convolutional network, the polar origin predictor, which outputs a heatmap. The centroid of the heatmap (two coordinates), together with the input image, goes into the polar transformer module, which performs a polar transform with origin at the input coordinates. The obtained polar representation is invariant with respect to the original object location; and rotations and dilations are now shifts, which are handled equivariantly by a conventional classifier CNN.
131
+
132
+ The usual approach to heatmap prediction is evaluation of a loss against some ground truth. In this approach the argmax gradient problem is circumvented by supervision. In PTN the the gradient of the output coordinates must be taken with respect to the heatmap since the polar origin is unknown and must be learned. Use of argmax is avoided by using the centroid of the heatmap as the polar origin. The gradient of the centroid with respect to the heatmap is constant and nonzero for all points, making learning possible.
133
+
134
+ # 4.2 POLAR TRANSFORMER MODULE
135
+
136
+ The polar transformer module takes the origin prediction and image as inputs and outputs the logpolar representation of the input. The module uses the same differentiable image sampling technique as STN (Jaderberg et al., 2015), which allows output coordinates $V _ { i }$ to be expressed in terms of the input $U$ and the source sample point coordinates $( x _ { i } ^ { s } , y _ { i } ^ { s } )$ . The log-polar transform in terms of the source sample points and target regular grid $( x _ { i } ^ { t } , y _ { i } ^ { t } )$ is:
137
+
138
+ $$
139
+ \begin{array} { l c r } { { x _ { i } ^ { s } = x _ { 0 } + r ^ { x _ { i } ^ { t } / W } \cos { \frac { 2 \pi y _ { i } ^ { t } } { H } } } } \\ { { y _ { i } ^ { s } = y _ { 0 } + r ^ { x _ { i } ^ { t } / W } \sin { \frac { 2 \pi y _ { i } ^ { t } } { H } } } } \end{array}
140
+ $$
141
+
142
+ where $( x _ { 0 } , y _ { 0 } )$ is the origin, $W , H$ are the output width and height, and $r$ is the maximum distance from the origin, set to $0 . 5 \sqrt { H ^ { 2 } + W ^ { 2 } }$ in our experiments.
143
+
144
+ # 4.3 WRAP-AROUND PADDING
145
+
146
+ To maintain feature map resolution, most CNN implementations use zero-padding. This is not ideal for the polar representation, as it is periodic about the angular axis. A rotation of the input result in a vertical shift of the output, wrapping at the boundary; hence, identification of the top and bottom most rows is most appropriate. This is achieved with wrap-around padding on the vertical dimension.The top most row of the feature map is padded using the bottom rows and vice versa. Zero-padding is used in the horizontal dimension. Table 5 shows a performance evaluation.
147
+
148
+ # 4.4 POLAR ORIGIN AUGMENTATION
149
+
150
+ To improve robustness of our method, we augment the polar origin during training time by adding a random shift to the regressed polar origin coordinates. Note that this comes for little computational cost compared to conventional augmentation methods such as rotating the input image. Table 5 quantifies the performance gains of this kind of augmentation.
151
+
152
+ # 5 EXPERIMENTS
153
+
154
+ # 5.1 ARCHITECTURES
155
+
156
+ We briefly define the architectures in this section, see A for details. CCNN is a conventional fully convolutional network; PCNN is the same, but applied to polar images with central origin. STN is our implementation of the spatial transformer networks (Jaderberg et al., 2015). PTN is our polar transformer networks, and PTN-CNN is a combination of PTN and CCNN. The suffixes S and B indicate small and big networks, according to the number of parameters. The suffixes $^ +$ and $^ { + + }$ indicate training and training+test rotation augmentation.
157
+
158
+ We perform rotation augmentation for polar-based methods. In theory, the effect of input rotation is just a shift in the corresponding polar image, which should not affect the classifier CNN. In practice, interpolation and angle discretization effects result in slightly different polar images for rotated inputs, so even the polar-based methods benefit from this kind of augmentation.
159
+
160
+ # 5.2 ROTATED MNIST (LAROCHELLE ET AL., 2007)
161
+
162
+ Table 1 shows the results. We divide the analysis in two parts; on the left, we show approaches with smaller networks and no rotation augmentation, on the right there are no restrictions.
163
+
164
+ Between the restricted approaches, the Harmonic Network (Worrall et al., 2016) outperforms the PTN by a small margin, but with almost 4x more training time, because the convolutions on complex variables are more costly. Also worth mentioning is the poor performance of the STN with no augmentation, which shows that learning the transformation parameters is much harder than learning the polar origin coordinates.
165
+
166
+ Between the unrestricted approaches, most variants of PTN-B outperform the current state of the art, with significant improvements when combined with CCNN and/or test time augmentation.
167
+
168
+ Finally, we note that the PCNN achieves a relatively high accuracy in this dataset because the digits are mostly centered, so using the polar transform origin as the image center is reasonable. Our method, however, outperforms it by a high margin, showing that even in this case, it is possible to find an origin away from the image center that results in a more distinctive representation.
169
+
170
+ Table 1: Performance on rotated MNIST. Errors are averages of several runs, with standard deviations within parenthesis. Times are average training time per epoch.
171
+
172
+ <table><tr><td>Model</td><td>error[%]</td><td>params</td><td>time [s]</td><td>Model</td><td>error [%]</td><td>params</td><td>time [s]</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PTN-S</td><td>1.83 (0.04)</td><td>27k</td><td>3.64 (0.04)</td><td>PTN-B+</td><td>1.14 (0.08)</td><td>129k</td><td>4.38 (0.02)</td></tr><tr><td>PCNN-S</td><td>2.6 (0.08)</td><td>22k</td><td>2.61 (0.04)</td><td>PTN-B++</td><td>0.95 (0.09)</td><td>129k</td><td>4.386</td></tr><tr><td>CCNN-S</td><td>5.76 (0.35)</td><td>22k</td><td>2.43 (0.02)</td><td>PTN-CNN-B+</td><td>1.01 (0.06)</td><td>254k</td><td>7.36</td></tr><tr><td>STN-S</td><td>7.87 (0.18)</td><td>43k</td><td>3.90 (0.05)</td><td>PTN-CNN-B++</td><td>0.89 (0.06)</td><td>254k</td><td>7.366</td></tr><tr><td>HNet1</td><td>1.69</td><td>33k</td><td>13.29 (0.19)</td><td>PCNN-B+</td><td>1.37 (0.00)</td><td>124k</td><td>3.30 (0.04)</td></tr><tr><td>P4CNN 2</td><td>2.28</td><td>22k</td><td></td><td>CCNN-B+</td><td>1.53 (0.07)</td><td>124k</td><td>2.98 (0.02)</td></tr><tr><td></td><td></td><td></td><td></td><td>STN-B+</td><td>1.31 (0.05)</td><td>146k</td><td>4.57 (0.04)</td></tr><tr><td></td><td></td><td></td><td></td><td>OR-TIPooling</td><td>1.54</td><td>~1M</td><td>-</td></tr><tr><td></td><td></td><td></td><td></td><td>TI-Pooling</td><td>1.2</td><td>~1M</td><td>42.90</td></tr><tr><td></td><td></td><td></td><td></td><td>RotEqNet5</td><td>1.01</td><td>100k</td><td>-</td></tr></table>
173
+
174
+ 1, 2, 3, 4, 5 Worrall et al. (2016); Cohen & Welling (2016b); Zhou et al. (2017); Laptev et al. (2016); Marcos et al. (2016) 6 Test time performance is 8x slower when using test time augmentation
175
+
176
+ # 5.3 OTHER MNIST VARIANTS
177
+
178
+ We also perform experiments in other MNIST variants. MNIST R, RTS are replicated from Jaderberg et al. (2015). We introduce SIM2MNIST, with a more challenging set of transformations from SIM(2). See B for more details about the datasets.
179
+
180
+ Table 2 shows the results. We can see that the PTN performance mostly matches the STN on both MNIST R and RTS. The deformations on these datasets are mild and data is plenty, so the performance may be saturated.
181
+
182
+ On SIM2MNIST, however, the deformations are more challenging and the training set 5x smaller. The PCNN performance is significantly lower, which reiterates the importance of predicting the best
183
+
184
+ ![](images/30183ea128fa23fda806bb3f1469e45fce4322383b7578f98146386ebd979a4e.jpg)
185
+ Figure 4: Left: The rows alternate between samples from SIM2MNIST, where the predicted origin is shown in green, and their learned polar representation. Note how rotations and dilations of the object become shifts. Right: Each row shows a different input and correspondent feature maps on the last convolutional layer. The first and second rows show that the $1 8 0 ^ { \circ }$ rotation results in a half-height vertical shift of the feature maps. The third and fourth rows show that the $2 . 4 \times$ dilation results in a shift right of the feature maps. The first and third rows show invariance to translation.
186
+
187
+ polar origin. The HNet outperforms the other methods (except the PTN), thanks to its translation and rotation equivariance properties. Our method is more efficient both in number of parameters and training time, and is also equivariant to dilations, achieving the best performance by a large margin.
188
+
189
+ Table 2: Performance on MNIST variants.
190
+
191
+ <table><tr><td rowspan="2"></td><td colspan="2">MNISTR</td><td rowspan="2"></td><td colspan="2">MNISTRTS</td><td rowspan="2">time</td><td colspan="2">SIM2MNIST1</td><td rowspan="2">time</td></tr><tr><td>error [%]</td><td>pars</td><td>time error [%]</td><td>pars</td><td>error [%]</td><td>pars</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PTN-S+</td><td>0.88 (0.04)</td><td>29k</td><td>19.72</td><td>0.78 (0.05)</td><td>32k</td><td>24.48</td><td>5.44 (0.03)</td><td>35k</td><td>11.92</td></tr><tr><td>PTN-B+</td><td>0.62 (0.04)</td><td>129k</td><td>20.37</td><td>0.57 (0.03)</td><td>134k</td><td>28.74</td><td>5.03 (0.11)</td><td>134k</td><td>12.02</td></tr><tr><td>PCNN-B+</td><td>0.81 (0.04)</td><td>124k</td><td>13.97</td><td>0.70 (0.01)</td><td>129k</td><td>17.19</td><td>15.46 (0.22)</td><td>129k</td><td>5.33</td></tr><tr><td>CCNN-B+</td><td>0.74 (0.01)</td><td>124k</td><td>12.79</td><td>0.62 (0.07)</td><td>129k</td><td>15.97</td><td>11.73 (0.57)</td><td>129k</td><td>5.28</td></tr><tr><td>STN-B+</td><td>0.61 (0.02)</td><td>146k</td><td>23.12</td><td>0.54 (0.02)</td><td>150k</td><td>27.90</td><td>12.35 (1.61)</td><td>150k</td><td>10.41</td></tr><tr><td>STN (Jaderberg et al., 2015)</td><td>0.7</td><td>400k</td><td>-</td><td>0.5</td><td>400k</td><td></td><td></td><td></td><td>-</td></tr><tr><td>HNet (Worrall et al., 2016)</td><td></td><td>=</td><td>=</td><td></td><td>=</td><td></td><td>9.28 (0.05)</td><td>44k</td><td>31.42</td></tr><tr><td>TI-Pooling (Laptev et al.,2016)</td><td>0.8</td><td>~1M</td><td></td><td></td><td></td><td></td><td></td><td>-</td><td>-</td></tr></table>
192
+
193
+ 1 No augmentation is used with SIM2MNIST, despite the $^ +$ suffixes 2 Our modified version, with two extra layers with subsampling to account for larger input
194
+
195
+ # 5.4 VISUALIZATION
196
+
197
+ We visualize network activations to confirm our claims about invariance to translation and equivariance to rotations and dilations.
198
+
199
+ Figure 4 (left) shows some of the predicted polar origins and the results of the polar transform. We can see that the network learns to reject clutter and to find a suitable origin for the polar transform, and that the representation after the polar transformer module does present the properties claimed.
200
+
201
+ We proceed to visualize if the properties are preserved in deeper layers. Figure 4 (right) shows the activations of selected channels from the last convolutional layer, for different rotations, dilations, and translations of the input. The reader can verify that the equivariance to rotations and dilations, and the invariance to translations are indeed preserved during the sequence of convolutional layers.
202
+
203
+ # 5.5 EXTENSION TO 3D OBJECT CLASSIFICATION
204
+
205
+ We extend our model to perform 3D object classification from voxel occupancy grids. We assume that the inputs are transformed by random rotations around an axis from a family of parallel axes. Then, a rotation around that axis corresponds to a translation in cylindrical coordinates.
206
+
207
+ In order to achieve equivariance to rotations, we predict an axis and use it as the origin to transform to cylindrical coordinates. If the axis is parallel to one of the input grid axes, the cylindrical transform amounts to channel-wise polar transforms, where the origin is the same for all channels and each channel is a 2D slice of the 3D voxel grid. In this setting, we can just apply the polar transformer layer to each slice.
208
+
209
+ ![](images/0ad07b868c1491f3ff67f64c033a45f7f24a8d446e44d8c51afca58da0d540eb.jpg)
210
+ Figure 5: Top: rotated voxel occupancy grids. Bottom: corresponding cylindrical representations. Note how rotations around a vertical axis correspond to translations over a horizontal axis.
211
+
212
+ We use a technique similar to the anisotropic probing of Qi et al. (2016) to predict the axis. Let $z$ denote the input grid axis parallel to the rotation axis. We treat the dimension indexed by $z$ as channels, and run regular 2D convolutional layers, reducing the number of channels on each layer, eventually collapsing to a single 2D heatmap. The heatmap centroid gives one point of the axis, and the direction is parallel to $z$ . In other words, the centroid is the origin of all channel-wise polar transforms. We then proceed with a regular 3D CNN classifier, acting on the cylindrical representation. The 3D convolutions are equivariant to translations; since they act on cylindrical coordinates, the learned representation is equivariant to input rotations around axes parallel to $z$ .
213
+
214
+ We run experiments on ModelNet40 (Wu et al., 2015), which contains objects rotated around the gravity direction $( z )$ . Figure 5 shows examples of input voxel grids and their cylindrical coordinates representation, while table 3 shows the classification performance. To the best of our knowledge, our method outperforms all published voxel-based methods, even with no test time augmentation. However, the multi-view based methods generally outperform the voxel-based. (Qi et al., 2016).
215
+
216
+ Note that we could also achieve equivariance to scale by using log-cylindrical or log-spherical coordinates, but none of these change of coordinates would result in equivariance to arbitrary 3D rotations.
217
+
218
+ Table 3: ModelNet40 classification performance. We compare only with voxel-based methods.
219
+
220
+ <table><tr><td>Model</td><td>Avg. class accuracy [%]</td><td>Avg.instance accuracy [%]</td></tr><tr><td>Cylindrical Transformer (Ours)</td><td>86.5</td><td>89.9</td></tr><tr><td>3D ShapeNets (Wu et al.,2015)</td><td>77.3</td><td></td></tr><tr><td>VoxNet (Maturana&amp; Scherer,2015)</td><td>83</td><td>-</td></tr><tr><td>MO-SubvolumeSup (Qi et al.,2016)</td><td>86.0</td><td>= 89.2</td></tr><tr><td>MO-Aniprobing (Qi et al.,2016)</td><td>85.6</td><td>89.9</td></tr></table>
221
+
222
+ # 6 CONCLUSION
223
+
224
+ We have proposed a novel network whose output is invariant to translations and equivariant to the group of dilations/rotations. We have combined the idea of learning the translation (similar to the spatial transformer) but providing equivariance for the scaling and rotation, avoiding, thus, fully connected layers required for the pose regression in the spatial transformer. Equivariance with respect to dilated rotations is achieved by convolution in this group. Such a convolution would require the production of multiple group copies, however, we avoid this by transforming into canonical coordinates. We improve the state of the art performance on rotated MNIST by a large margin, and outperform all other tested methods on a new dataset we call SIM2MNIST. We expect our approach to be applicable to other problems, where the presence of different orientations and scales hinder the performance of conventional CNNs.
225
+
226
+ # REFERENCES
227
+
228
+ David Casasent and Demetri Psaltis. Scale invariant optical transform. Optical Engineering, 15(3):153258– 153258, 1976.
229
+
230
+ Olivier Chomat, Vincent Colin de Verdiere, Daniela Hall, and James L Crowley. Local scale selection for \` gaussian based description techniques. In European Conference on Computer Vision, pp. 117–134. Springer, 2000.
231
+
232
+ Taco S. Cohen and Max Welling. Steerable cnns. 2016a. URL http://arxiv.org/abs/1612. 08498v1.
233
+
234
+ Taco S Cohen and Max Welling. Group equivariant convolutional networks. arXiv preprint arXiv:1602.07576, 2016b.
235
+
236
+ Sander Dieleman, Kyle W Willett, and Joni Dambre. Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly notices of the royal astronomical society, 450(2):1441–1459, 2015.
237
+
238
+ Mario Ferraro and Terry M Caelli. Relationship between integral transform invariances and lie group theory. JOSA A, 5(5):738–742, 1988.
239
+
240
+ William T Freeman, Edward H Adelson, et al. The design and use of steerable filters. IEEE Transactions on Pattern analysis and machine intelligence, 13(9):891–906, 1991.
241
+
242
+ Robert Gens and Pedro M Domingos. Deep symmetry networks. In Advances in neural information processing systems, pp. 2537–2545, 2014.
243
+
244
+ Goesta H Granlund. In search of a general picture processing operator. Computer Graphics and Image Processing, 8(2):155–173, 1978.
245
+
246
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
247
+
248
+ Yacov Hel-Or and Patrick C Teo. Canonical decomposition of steerable functions. In Computer Vision and Pattern Recognition, 1996. Proceedings CVPR’96, 1996 IEEE Computer Society Conference on, pp. 809– 816. IEEE, 1996.
249
+
250
+ Joao F Henriques and Andrea Vedaldi. Warped convolutions: Efficient invariance to spatial transformations. ˜ arXiv preprint arXiv:1609.04382, 2016.
251
+
252
+ Jorn-Henrik Jacobsen, Bert de Brabandere, and Arnold W. M. Smeulders. Dynamic steerable blocks in deep ¨ residual networks. CoRR, 2017. URL http://arxiv.org/abs/1706.00598v2.
253
+
254
+ Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pp. 2017–2025, 2015.
255
+
256
+ Alexander B Kyatkin and Gregory S Chirikjian. Algorithms for fast convolutions on motion groups. Applied and Computational Harmonic Analysis, 9(2):220–241, 2000.
257
+
258
+ Dmitry Laptev, Nikolay Savinov, Joachim M. Buhmann, and Marc Pollefeys. Ti-pooling: Transformationinvariant pooling for feature learning in convolutional neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.
259
+
260
+ Hugo Larochelle, Dumitru Erhan, Aaron Courville, James Bergstra, and Yoshua Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In Proceedings of the 24th international conference on Machine learning, pp. 473–480. ACM, 2007.
261
+
262
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
263
+
264
+ Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 991– 999, 2015.
265
+
266
+ Tony Lindeberg. Scale-space theory: A basic tool for analyzing structures at different scales. Journal of applied statistics, 21(1-2):225–270, 1994.
267
+
268
+ David G Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2):91–110, 2004.
269
+
270
+ Diego Marcos, Michele Volpi, Nikos Komodakis, and Devis Tuia. Rotation equivariant vector field networks. CoRR, 2016.
271
+
272
+ Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on, pp. 922–928. IEEE, 2015.
273
+
274
+ Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011.
275
+
276
+ Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. 2016.
277
+
278
+ Klas Nordberg and Gosta Granlund. Equivariance and invariance-an approach based on lie groups. In Image Processing, 1996. Proceedings., International Conference on, volume 3, pp. 181–184. IEEE, 1996.
279
+
280
+ Pietro Perona. Deformable kernels for early vision. IEEE Transactions on pattern analysis and machine intelligence, 17(5):488–499, 1995.
281
+
282
+ Charles R. Qi, Hao Su, Matthias Niessner, Angela Dai, Mengyuan Yan, and Leonidas J. Guibas. Volumetric and multi-view cnns for object classification on 3d data. 2016.
283
+
284
+ Nima Sedaghat, Mohammadreza Zolfaghari, and Thomas Brox. Orientation-boosted voxel nets for 3d object recognition. CoRR, 2016.
285
+
286
+ Joseph Segman, Jacob Rubinstein, and Yehoshua Y Zeevi. The canonical coordinates method for pattern deformation: Theoretical and computational considerations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 14(12):1171–1183, 1992.
287
+
288
+ Laurent Sifre and Stephane Mallat. Rotation, scaling and deformation invariant scattering for texture discrimi- ´ nation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1233–1240, 2013.
289
+
290
+ Eero P Simoncelli, William T Freeman, Edward H Adelson, and David J Heeger. Shiftable multiscale transforms. IEEE transactions on Information Theory, 38(2):587–607, 1992.
291
+
292
+ Stefano Soatto. Actionable information in vision. In Machine learning for computer vision, pp. 17–48. Springer, 2013.
293
+
294
+ Patrick C Teo and Yacov Hel-Or. Design of multi-parameter steerable functions using cascade basis reduction. In Computer Vision, 1998. Sixth International Conference on, pp. 187–192. IEEE, 1998.
295
+
296
+ Jonathan J Tompson, Arjun Jain, Yann LeCun, and Christoph Bregler. Joint training of a convolutional network and a graphical model for human pose estimation. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 1799–1807. Curran Associates, Inc., 2014.
297
+
298
+ Alexander Toshev and Christian Szegedy. Deeppose: Human pose estimation via deep neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014.
299
+
300
+ Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. arXiv preprint arXiv:1612.04642, 2016.
301
+
302
+ Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaoou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1912–1920, 2015.
303
+
304
+ Yanzhao Zhou, Qixiang Ye, Qiang Qiu, and Jianbin Jiao. Oriented response networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
305
+
306
+ Philip E Zwicke and Imre Kiss. A new implementation of the mellin transform and its application to radar classification of ships. IEEE Transactions on pattern analysis and machine intelligence, 4(2):191–199, 1983.
307
+
308
+ # APPENDICES
309
+
310
+ # A ARCHITECTURES DETAILS
311
+
312
+ • Conventional CNN (CCNN), a fully convolutional network, composed of a sequence of convolutional layers and some rounds of subsampling .
313
+ Polar CNN (PCNN), same architecture as CCNN, operating on polar images. The logpolar transform is pre-computed at the image center before training, as in Henriques & Vedaldi (2016). The fundamental difference between our method and this is that we learn the polar origin implicitly, instead of fixing it.
314
+ • Spatial Transformer Network (STN), our implementation of Jaderberg et al. (2015), replacing the localization network by four blocks of 20 filters and stride 2, followed by a 20 unit fully connected layer, which we found to perform better. The transformation regressed is in SIM(2), and a CCNN comes after the transform.
315
+ Polar Transformer Network (PTN), our proposed method. The polar origin predictor comprises three blocks of 20 filters each, with stride 2 on the first block (or the first two blocks, when input is $9 6 \times 9 6$ ). The classification network is the CCNN.
316
+ PTN-CNN, we classify based on the sum of the per class scores of instances of PTN and CCNN trained independently.
317
+
318
+ The following suffixes qualify the architectures described above:
319
+
320
+ • S, “small” network, with seven blocks of 20 filters and one round of subsampling (equivalent to the Z2CNN in Cohen & Welling (2016b)).
321
+ • B, “big” network, with 8 blocks with the following number of filters: 16, 16, 32, 32, 32, 64, 64, 64. Subsampling by strided convolution is used whenever the number of filters increase. We add up to two 2 extra blocks of 16 filters with stride 2 at the beginning to handle larger input resolutions (one for $4 2 \times 4 2$ and two for $9 6 \times 9 6$ ).
322
+ • $^ +$ , training time rotation augmentation by continuous angles.
323
+ • $^ { + + }$ , training and test time rotation augmentation. We input 8 rotated versions the the query image and classify using the sum of the per class scores.
324
+
325
+ Cylindrical transformer network: The axis prediction part of the cylindrical transformer network is composed of four 2D blocks, with $5 \times 5$ kernels and 32, 16, 8, and 4 channels, no subsampling. The classifier is composed of eight 3D convolutional blocks, with $3 \times 3 \times 3$ kernels, the following number of filters: 32, 32, 32, 64, 64, 64, 128, 128, and subsampling whenever the number of filters increase. Total number of params is approximately 1M.
326
+
327
+ # B DATASET DETAILS
328
+
329
+ • Rotated MNIST The rotated MNIST dataset (Larochelle et al., 2007) is composed of $2 8 \times$ 28, $3 6 0 ^ { \circ }$ rotated images of handwritten digits. The training, validation and test sets are of sizes 10k, 2k, and $5 0 \mathrm { k }$ , respectively.
330
+ MNIST R, we replicate it from Jaderberg et al. (2015). It has $6 0 \mathrm { k }$ training and 10k testing samples, where the digits of the original MNIST are rotated between $[ - 9 0 ^ { \circ } , 9 0 ^ { \circ } ]$ . It is also know as half-rotated MNIST (Laptev et al., 2016).
331
+ MNIST RTS, we replicate it from Jaderberg et al. (2015). It has 60k training and $1 0 \mathrm { k }$ testing samples, where the digits of the original MNIST are rotated between $[ - 4 5 ^ { \circ } , 4 5 ^ { \circ } ]$ , scaled between 0.7 and 1.2, and shifted within a $4 2 \times 4 2$ black canvas.
332
+ SIM2MNIST, we introduce a more challenging dataset, based on MNIST, perturbed by random transformations from SIM(2). The images are $9 6 \times 9 6$ , with $3 6 0 ^ { \circ }$ rotations; the scale factors range from 1 to 2.4, and the digits can appear anywhere in the image. The training, validation and test set have size 10k, 5k, and $5 0 \mathrm { k }$ , respectively.
333
+
334
+ ![](images/ebd71a4ab0575b5a05dbeac04b61a818f51c65e9c2a2d425ae3ff1b850f25942.jpg)
335
+ Figure 6: ROTSVHN samples. Since the digits are cropped from larger images, no artifacts are introduced when rotating. The 6s and 9s are indistinguishable when rotated. Note that there are usually visible digits on the sides, which pose a challenge for classification and PTN origin prediction.
336
+
337
+ Table 4: SVHN classification performance. The minus suffix indicate removal of 6s and 9s. PTN shows slightly worse performance on the unperturbed dataset, but is clearly superior when rotations are present.
338
+
339
+ <table><tr><td></td><td>SVHN</td><td>ROTSVHN</td><td>SVHN-</td><td>ROTSVHN-</td></tr><tr><td>PTN-ResNet32 (Ours)</td><td>2.82 (0.07)</td><td>7.90 (0.14)</td><td>2.85 (0.07)</td><td>3.96 (0.04)</td></tr><tr><td>ResNet32</td><td>2.25 (0.15)</td><td>9.83 (0.29)</td><td>2.09 (0.06)</td><td>5.39 (0.09)</td></tr></table>
340
+
341
+ # C SVHN EXPERIMENTS
342
+
343
+ In order to demonstrate the efficacy of PTN on real-world RGB images, we run experiments on the Street View House Numbers (SVHN) dataset Netzer et al. (2011), and a rotated version that we introduce (ROTSVHN) . The dataset contains cropped images of single digits, as well as the slightly larger images from where the digits are cropped. Using the latter, we can extract the rotated digits without introducing artifacts. Figure 6 shows some examples from the ROTSVHN.
344
+
345
+ We use a 32 layer Residual Network (He et al., 2016) as a baseline (ResNet32). The PTN-ResNet32 has 8 residual convolutional layers as the origin predictor, followed by a ResNet32.
346
+
347
+ In contrast with handwritten digits, the 6s and 9s in house numbers are usually indistinguishable. To remove this effect from our analysis, we also run experiments removing those classes from the datasets (which is denoted by appending a minus to the dataset name). Table 4 shows the results.
348
+
349
+ The reader will note that rotations cause a significant performance loss on the conventional ResNet; the error increases from $2 . 0 9 \%$ to $5 . 3 9 \%$ , even when removing 6s and 9s from the dataset. With PTN, on the other hand, the error goes from $2 . 8 5 \%$ to $3 . 9 6 \%$ , which shows our method is more robust to the perturbations, although the performance on the unperturbed datasets is slightly worse. We expect the PTN to be even more advantageous when large scale variations are also present.
350
+
351
+ # D ABLATION STUDY
352
+
353
+ We quantify the performance boost obtained with wrap around padding, polar origin augmentation, and training time rotation augmentation. Results are based on the PTN-B variant trained on Rotated MNIST. We remove one operation at a time and verify that the performance consistently drops, which indicates that all operations are indeed helpful. Table 5 shows the results.
354
+
355
+ Table 5: Ablation study. Rotation and polar origin augmentation during training time, and wrap around padding all contribute to reduce the error. Results are from PTN-B on the rotated MNIST.
356
+
357
+ <table><tr><td>Origin aug.</td><td>Rotation aug.</td><td>Wrap padding</td><td>Error [%]</td></tr><tr><td>Yes</td><td>Yes</td><td>Yes</td><td>1.12 (0.03)</td></tr><tr><td>No</td><td>Yes</td><td>Yes</td><td>1.33 (0.12)</td></tr><tr><td>Yes</td><td>No</td><td>Yes</td><td>1.46 (0.11)</td></tr><tr><td>Yes</td><td>Yes</td><td>No</td><td>1.31 (0.06)</td></tr></table>
parse/train/HktRlUlAZ/HktRlUlAZ_content_list.json ADDED
@@ -0,0 +1,1836 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "POLAR TRANSFORMER NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 598,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Carlos Esteves, Christine Allen-Blanchette, Xiaowei Zhou, Kostas Daniilidis GRASP Laboratory, University of Pennsylvania {machc, allec, xiaowz, kostas}@seas.upenn.edu ",
17
+ "bbox": [
18
+ 183,
19
+ 143,
20
+ 712,
21
+ 186
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 244,
32
+ 544,
33
+ 260
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Convolutional neural networks (CNNs) are inherently equivariant to translation. Efforts to embed other forms of equivariance have concentrated solely on rotation. We expand the notion of equivariance in CNNs through the Polar Transformer Network (PTN). PTN combines ideas from the Spatial Transformer Network (STN) and canonical coordinate representations. The result is a network invariant to translation and equivariant to both rotation and scale. PTN is trained end-to-end and composed of three distinct stages: a polar origin predictor, the newly introduced polar transformer module and a classifier. PTN achieves stateof-the-art on rotated MNIST and the newly introduced SIM2MNIST dataset, an MNIST variation obtained by adding clutter and perturbing digits with translation, rotation and scaling. The ideas of PTN are extensible to 3D which we demonstrate through the Cylindrical Transformer Network. ",
40
+ "bbox": [
41
+ 233,
42
+ 275,
43
+ 764,
44
+ 441
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 468,
55
+ 336,
56
+ 483
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Whether at the global pattern or local feature level (Granlund, 1978), the quest for (in/equi)variant representations is as old as the field of computer vision and pattern recognition itself. State-of-the-art in “hand-crafted” approaches is typified by SIFT (Lowe, 2004). These detector/descriptors identify the intrinsic scale or rotation of a region (Lindeberg, 1994; Chomat et al., 2000) and produce an equivariant descriptor which is normalized for scale and/or rotation invariance. The burden of these methods is in the computation of the orbit (i.e. a sampling the transformation space) which is necessary to achieve equivariance. This motivated steerable filtering which guarantees transformed filter responses can be interpolated from a finite number of filter responses. Steerability was proved for rotations of Gaussian derivatives (Freeman et al., 1991) and extended to scale and translations in the shiftable pyramid (Simoncelli et al., 1992). Use of the orbit and SVD to create a filter basis was proposed by Perona (1995)and in parallel, Segman et al. (1992) proved for certain classes of transformations there exists canonical coordinates where deformation of the input presents as translation of the output. Following this work, Nordberg & Granlund (1996) and Hel-Or & Teo (1996); Teo & Hel-Or (1998) proposed a methodology for computing the bases of equivariant spaces given the Lie generators of a transformation. and most recently, Sifre & Mallat (2013) proposed the scattering transform which offers representations invariant to translation, scaling, and rotations. ",
63
+ "bbox": [
64
+ 173,
65
+ 500,
66
+ 825,
67
+ 719
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The current consensus is representations should be learned not designed. Equivariance to translations by convolution and invariance to local deformations by pooling are now textbook (LeCun et al. (2015), p.335) but approaches to equivariance of more general deformations are still maturing. The main veins are: Spatial Transformer Network (STN) (Jaderberg et al., 2015) which similarly to SIFT learn a canonical pose and produce an invariant representation through warping, work which constrains the structure of convolutional filters (Worrall et al., 2016) and work which uses the filter orbit (Cohen & Welling, 2016b) to enforce an equivariance to a specific transformation group. ",
74
+ "bbox": [
75
+ 174,
76
+ 728,
77
+ 823,
78
+ 825
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, we propose the Polar Transformer Network (PTN), which combines the ideas of STN and canonical coordinate representations to achieve equivariance to translations, rotations, and dilations. The three stage network learns to identify the object center then transforms the input into logpolar coordinates. In this coordinate system, planar convolutions correspond to group-convolutions in rotation and scale. PTN produces a representation equivariant to rotations and dilations without the challenging parameter regression of STN. We enlarge the notion of equivariance in CNNs beyond Harmonic Networks (Worrall et al., 2016) and Group Convolutions (Cohen & Welling, 2016b) by capturing both rotations and dilations of arbitrary precision. Similar to STN; however, PTN accommodates only global deformations. ",
85
+ "bbox": [
86
+ 174,
87
+ 832,
88
+ 823,
89
+ 902
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/565aedc51cc399886806a7cb20f6598d0327fe11f3d80c675ed4b7e67a377b62.jpg",
96
+ "image_caption": [
97
+ "Figure 1: In the log-polar representation, rotations around the origin become vertical shifts, and dilations around the origin become horizontal shifts. The distance between the yellow and green lines is proportional to the rotation angle/scale factor. Top rows: sequence of rotations, and the corresponding polar images. Bottom rows: sequence of dilations, and the corresponding polar images. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 367,
102
+ 102,
103
+ 629,
104
+ 303
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 404,
114
+ 825,
115
+ 460
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "We present state-of-the-art performance on rotated MNIST and SIM2MNIST, which we introduce. To summarize our contributions: ",
122
+ "bbox": [
123
+ 171,
124
+ 467,
125
+ 823,
126
+ 496
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "• We develop a CNN architecture capable of learning an image representation invariant to translation and equivariant to rotation and dilation. We propose the polar transformer module, which performs a differentiable log-polar transform, amenable to backpropagation training. The transform origin is a latent variable. • We show how the polar transform origin can be learned effectively as the centroid of a single channel heatmap predicted by a fully convolutional network. ",
133
+ "bbox": [
134
+ 215,
135
+ 506,
136
+ 825,
137
+ 601
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 RELATED WORK ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 176,
147
+ 619,
148
+ 344,
149
+ 636
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "One of the first equivariant feature extraction schemes was proposed by Nordberg & Granlund (1996) who suggested the discrete sampling of 2D-rotations of a complex angle modulated filter. About the same time, the image and optical processing community discovered the Mellin transform as a modification of the Fourier transform (Zwicke & Kiss, 1983; Casasent & Psaltis, 1976). The Fourier-Mellin transform is equivariant to rotation and scale while its modulus is invariant. ",
156
+ "bbox": [
157
+ 174,
158
+ 651,
159
+ 825,
160
+ 722
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "During the 80’s and 90’s invariances of integral transforms were developed through methods based in the Lie generators of the respective transforms starting from one-parameter transforms (Ferraro & Caelli, 1988) and generalizing to Abelian subgroups of the affine group (Segman et al., 1992). ",
167
+ "bbox": [
168
+ 176,
169
+ 728,
170
+ 821,
171
+ 771
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Closely related to the (in/equi)variance work is work in steerability, the interpolation of responses to any group action using the response of a finite filter basis. An exact steerability framework began in Freeman et al. (1991), where rotational steerability for Gaussian derivatives was explicitly computed. It was extended to the shiftable pyramid (Simoncelli et al., 1992), which handle rotation and scale. A method of approximating steerability by learning a lower dimensional representation of the image deformation from the transformation orbit and the SVD was proposed by Perona (1995). ",
178
+ "bbox": [
179
+ 174,
180
+ 776,
181
+ 825,
182
+ 861
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "A unification of Lie generator and steerability approaches was introduced by Teo & Hel-Or (1998) who used SVD to reduce the number of basis functions for a given transformation group. Teo and Hel-Or developed the most extensive framework for steerability (Teo & Hel-Or, 1998; Hel-Or & Teo, 1996), and proposed the first approach for non-Abelian groups starting with exact steerability for the largest Abelian subgroup and incrementally steering for the remaining subgroups. Cohen & Welling (2016a); Jacobsen et al. (2017) recently combined steerability and learnable filters. ",
189
+ "bbox": [
190
+ 176,
191
+ 867,
192
+ 823,
193
+ 924
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "",
200
+ "bbox": [
201
+ 173,
202
+ 103,
203
+ 821,
204
+ 132
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "The most recent “hand-crafted” approach to equivariant representations is the scattering transform (Sifre & Mallat, 2013) which composes rotated and dilated wavelets. Similar to SIFT (Lowe, 2004) this approach relies on the equivariance of anchor points (e.g. the maxima of filtered responses in (translation) space). Translation invariance is obtained through the modulus operation which is computed after each convolution. The final scattering coefficient is invariant to translations and equivariant to local rotations and scalings. ",
211
+ "bbox": [
212
+ 174,
213
+ 138,
214
+ 825,
215
+ 223
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Laptev et al. (2016) achieve transformation invariance by pooling feature maps computed over the input orbit, which scales poorly as it requires forward and backward passes for each orbit element. ",
222
+ "bbox": [
223
+ 173,
224
+ 229,
225
+ 823,
226
+ 257
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Within the context of CNNs, methods of enforcing equivariance fall to two main veins. In the first, equivariance is obtained by constraining filter structure similarly to Lie generator based approaches (Segman et al., 1992; Hel-Or & Teo, 1996). Harmonic Networks (Worrall et al., 2016) use filters derived from the complex harmonics achieving both rotational and translational equivariance. The second requires the use of a filter orbit which is itself equivariant to obtain group equivariance. Cohen & Welling (2016b) convolve with the orbit of a learned filter and prove the equivariance of group-convolutions and preservation of rotational equivariance in the presence of rectification and pooling. Dieleman et al. (2015) process elements of the image orbit individually and use the set of outputs for classification. Gens & Domingos (2014) produce maps of finite-multiparameter groups, Zhou et al. (2017) and Marcos et al. (2016) use a rotational filter orbit to produce oriented feature maps and rotationally invariant features, and Lenc & Vedaldi (2015) propose a transformation layer which acts as a group-convolution by first permuting then transforming by a linear filter. ",
233
+ "bbox": [
234
+ 174,
235
+ 263,
236
+ 825,
237
+ 431
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Our approach, PTN, is akin to the second vein. We achieve global rotational equivariance and expand the notion of CNN equivariance to include scaling. PTN employs log-polar coordinates (canonical coordinates in Segman et al. (1992)) to achieve rotation-dilation group-convolution through translational convolution subject to the assumption of an image center estimated similarly to the STN. Most related to our method is Henriques & Vedaldi (2016), which achieves equivariance by warping the inputs to a fixed grid, with no learned parameters. ",
244
+ "bbox": [
245
+ 174,
246
+ 438,
247
+ 825,
248
+ 522
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "When learning features from 3D objects, invariance to transformations is usually achieved through augmenting the training data with transformed versions of the inputs (Wu et al., 2015), or pooling over transformed versions during training and/or test (Maturana & Scherer, 2015; Qi et al., 2016). Sedaghat et al. (2016) show that a multi-task approach, i.e. prediction of both the orientation and class, improves classification performance. In our extension to 3D object classification, we explicitly learn representations equivariant to rotations around a family of parallel axes by transforming the input to cylindrical coordinates about a predicted axis. ",
255
+ "bbox": [
256
+ 174,
257
+ 529,
258
+ 825,
259
+ 626
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "3 THEORETICAL BACKGROUND ",
266
+ "text_level": 1,
267
+ "bbox": [
268
+ 176,
269
+ 647,
270
+ 450,
271
+ 662
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "This section is divided into two parts, the first offers a review of equivariance and groupconvolutions. The second offers an explicit example of the equivariance of group-convolutions through the 2D similarity transformations group, SIM(2), comprised of translations, dilations and rotations. Reparameterization of SIM(2) to canonical coordinates allows for the application of the SIM(2) group-convolution using translational convolution. ",
278
+ "bbox": [
279
+ 174,
280
+ 678,
281
+ 825,
282
+ 748
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "3.1 GROUP EQUIVARIANCE ",
289
+ "text_level": 1,
290
+ "bbox": [
291
+ 176,
292
+ 765,
293
+ 379,
294
+ 780
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Equivariant representations are highly sought after as they encode both class and deformation information in a predictable way. Let $G$ be a transformation group and $L _ { g } I$ be the group action applied to an image $I$ . A mapping $\\Phi : E F$ is said to be equivariant to the group action $L _ { g }$ , $g \\in G$ if ",
301
+ "bbox": [
302
+ 173,
303
+ 791,
304
+ 825,
305
+ 834
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "equation",
311
+ "img_path": "images/ab7eeba297c5da14a5d421999e215c226e17b1319b66992b8ccb57c211f591af.jpg",
312
+ "text": "$$\n\\Phi ( L _ { g } I ) = L _ { g } ^ { \\prime } ( \\Phi ( I ) )\n$$",
313
+ "text_format": "latex",
314
+ "bbox": [
315
+ 428,
316
+ 840,
317
+ 570,
318
+ 858
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "where $L _ { g }$ and $L _ { g } ^ { \\prime }$ correspond to application of $g$ to $E$ and $F$ respectively and satisfy ${ \\cal L } _ { g h } = { \\cal L } _ { g } { \\cal L } _ { h }$ . Invariance is the special case of equivariance where $L _ { g } ^ { \\prime }$ is the identity. In the context of image classification and CNNs, $g \\in G$ can be thought of as an image deformation and $\\Phi$ a mapping from the image to a feature map. ",
325
+ "bbox": [
326
+ 176,
327
+ 866,
328
+ 823,
329
+ 924
330
+ ],
331
+ "page_idx": 2
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "The inherent translational equivariance of CNNs is independent of the convolutional kernel and evident in the corresponding translation of the output in response to translation of the input. Equivariance to other types of deformations can be achieved through application of the group-convolution, a generalization of translational convolution. Letting $f ( g )$ and $\\phi ( g )$ be real valued functions on $G$ with $L _ { h } f ( g ) = f ( h ^ { - 1 } g )$ , the group-convolution is defined Kyatkin & Chirikjian (2000) ",
336
+ "bbox": [
337
+ 173,
338
+ 102,
339
+ 825,
340
+ 174
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "equation",
346
+ "img_path": "images/58dff27d4b99ad3ce52e6f4829f6983bc1b6f167c43bedd98355ee1fd06055b1.jpg",
347
+ "text": "$$\n( f \\star _ { G } \\phi ) ( g ) = \\int _ { h \\in G } f ( h ) \\phi ( h ^ { - 1 } g ) d h .\n$$",
348
+ "text_format": "latex",
349
+ "bbox": [
350
+ 369,
351
+ 179,
352
+ 629,
353
+ 213
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "A slight modification to the definition is necessary in the first CNN layer since the group is acting on the image. The group-convolution reduces to translational convolution when $G$ is translation in $\\mathbb { R } ^ { n }$ with addition as the group operator, ",
360
+ "bbox": [
361
+ 174,
362
+ 217,
363
+ 825,
364
+ 260
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/d91bffadf4d4857a3dcf3fec0f223cec18c6810d2f0f1b0b4dbd416caf6190a7.jpg",
371
+ "text": "$$\n\\begin{array} { c } { { ( f \\star \\phi ) ( x ) = \\displaystyle \\int _ { h } f ( h ) \\phi ( h ^ { - 1 } x ) d h } } \\\\ { { = \\displaystyle \\int _ { h } f ( h ) \\phi ( x - h ) d h . } } \\end{array}\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 382,
375
+ 265,
376
+ 617,
377
+ 333
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Group-convolution requires integrability over a group and identification of the appropriate measure dg. It can be proved that given the measure $d g$ , group-convolution is always group equivariant: ",
384
+ "bbox": [
385
+ 174,
386
+ 335,
387
+ 825,
388
+ 366
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "equation",
394
+ "img_path": "images/d405055d76739ba88823364594f86b95f98c9eb6e4d485262b20ed7f171e53b7.jpg",
395
+ "text": "$$\n\\begin{array} { l } { \\displaystyle ( L _ { a } f \\star _ { G } \\phi ) ( g ) = \\int _ { h \\in G } f ( a ^ { - 1 } h ) \\phi ( h ^ { - 1 } g ) d h } \\\\ { \\displaystyle = \\int _ { b \\in G } f ( b ) \\phi ( ( a b ) ^ { - 1 } g ) d b } \\\\ { \\displaystyle = \\int _ { b \\in G } f ( b ) \\phi ( b ^ { - 1 } a ^ { - 1 } g ) d b } \\\\ { \\displaystyle = ( f \\star _ { G } \\phi ) ( a ^ { - 1 } g ) } \\\\ { \\displaystyle = L _ { a } ( ( f \\star _ { G } \\phi ) ) ( g ) . } \\end{array}\n$$",
396
+ "text_format": "latex",
397
+ "bbox": [
398
+ 349,
399
+ 371,
400
+ 648,
401
+ 512
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "This is depicted in response of an equivariant representation to input deformation (Figure 2 (left)). ",
408
+ "bbox": [
409
+ 171,
410
+ 513,
411
+ 813,
412
+ 530
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "3.2 EQUIVARIANCE IN SIM(2)",
419
+ "text_level": 1,
420
+ "bbox": [
421
+ 176,
422
+ 545,
423
+ 400,
424
+ 560
425
+ ],
426
+ "page_idx": 3
427
+ },
428
+ {
429
+ "type": "text",
430
+ "text": "A similarity transformation, $\\rho \\in { \\mathrm { S I M } } ( 2 )$ , acts on a point in $\\boldsymbol { x } \\in \\mathbb { R } ^ { 2 }$ by ",
431
+ "bbox": [
432
+ 174,
433
+ 570,
434
+ 632,
435
+ 587
436
+ ],
437
+ "page_idx": 3
438
+ },
439
+ {
440
+ "type": "equation",
441
+ "img_path": "images/17ea84655265de8068a8a4d9b26e15d18ac07fe6feb1789dd7ff6d315b0c5bf6.jpg",
442
+ "text": "$$\n\\rho x \\to s R x + t \\quad s \\in \\mathbb { R } ^ { + } , R \\in S O ( 2 ) , t \\in \\mathbb { R } ^ { 2 } ,\n$$",
443
+ "text_format": "latex",
444
+ "bbox": [
445
+ 338,
446
+ 592,
447
+ 658,
448
+ 609
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "where $S O ( 2 )$ is the rotation group. To take advantage of the standard planar convolution in classical CNNs we decompose a $\\rho \\in { \\mathrm { S I M } } ( 2 )$ into a translation, $t$ in $\\mathbb { R } ^ { 2 }$ and a dilated-rotation $r$ in $\\mathbf { S } \\mathbf { O } ( 2 ) \\times \\mathbb { R } ^ { + }$ . ",
455
+ "bbox": [
456
+ 174,
457
+ 614,
458
+ 823,
459
+ 643
460
+ ],
461
+ "page_idx": 3
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "Equivariance to SIM(2) is achieved by learning the center of the dilated rotation, shifting the original image accordingly then transforming the image to canonical coordinates. In this reparameterization the standard translational convolution is equivalent to the dilated-rotation group-convolution. ",
466
+ "bbox": [
467
+ 174,
468
+ 650,
469
+ 825,
470
+ 693
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "The origin predictor is an application of STN to global translation prediction (Jaderberg et al., 2015), the centroid of the output is taken as the origin of the input. ",
477
+ "bbox": [
478
+ 173,
479
+ 698,
480
+ 821,
481
+ 728
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "Transformation of the image $L _ { t } I = I ( t - t _ { 0 } )$ (canonization in Soatto (2013)) reduces the SIM(2) deformation to a dilated-rotation if $t _ { o }$ is the true translation. After centering, we perform ${ \\mathrm { S O } } ( 2 ) \\times$ $\\mathbb { R } ^ { + }$ convolutions on the new image $I _ { o } = I ( x - t _ { o } )$ : ",
488
+ "bbox": [
489
+ 174,
490
+ 733,
491
+ 825,
492
+ 776
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "equation",
498
+ "img_path": "images/a0ccaa1bff38e9e0d723e749eebfde5d1c1d250a0db14dc7ca5a0463a49aefbd.jpg",
499
+ "text": "$$\nf ( r ) = \\int _ { x \\in \\mathbb { R } ^ { 2 } } I _ { o } ( x ) \\phi ( r ^ { - 1 } x ) \\ d x\n$$",
500
+ "text_format": "latex",
501
+ "bbox": [
502
+ 390,
503
+ 781,
504
+ 607,
505
+ 815
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "and the feature maps $f$ in subsequent layers ",
512
+ "bbox": [
513
+ 174,
514
+ 820,
515
+ 462,
516
+ 835
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "equation",
522
+ "img_path": "images/6cc168499311d52d8a65685b0342974714e0d2ec5b3737a8688ee430ce97c838.jpg",
523
+ "text": "$$\nh ( r ) = \\int _ { s \\in S O ( 2 ) \\times \\mathbb { R } ^ { + } } f ( s ) \\phi ( s ^ { - 1 } r ) \\ d s\n$$",
524
+ "text_format": "latex",
525
+ "bbox": [
526
+ 372,
527
+ 839,
528
+ 625,
529
+ 876
530
+ ],
531
+ "page_idx": 3
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "where $r , s \\in \\mathrm { S O } ( 2 ) \\times \\mathbb { R } ^ { + }$ . We compute this convolution through use of canonical coordinates for Abelian Lie-groups (Segman et al., 1992). The centered image $I _ { o } ( x , y ) ^ { 1 }$ is transformed to logpolar coordinates, $I ( e ^ { \\xi } \\cos ( \\theta ) , e ^ { \\xi } \\sin ( \\theta ) )$ hereafter written $\\lambda ( \\xi , \\theta )$ with $( \\xi , \\theta ) \\in { \\bf S O } ( 2 ) \\times \\mathbb { R } ^ { + }$ for ",
536
+ "bbox": [
537
+ 174,
538
+ 881,
539
+ 825,
540
+ 925
541
+ ],
542
+ "page_idx": 3
543
+ },
544
+ {
545
+ "type": "image",
546
+ "img_path": "images/46102bca2d21343c0db1f10976893e3f525cec860420041aee5c2ee22bc4429b.jpg",
547
+ "image_caption": [
548
+ "Figure 2: Left: Group-convolutions in $S O ( 2 )$ . The images in the left most column differ by $9 0 °$ rotation, the filters are shown in the top row. Application of the rotational group-convolution with an arbitrary filter results is shown to produce an equivariant representation. The inner-product each of filter orbit (rotated from $0 - 3 6 0 ^ { \\circ }$ ) and the image is plotted in blue for the top image and red for the bottom image. Observe how the filter response is shifted by $9 0 °$ . Right: Group-convolutions in $\\mathbf { S } \\mathbf { O } ( 2 ) \\times \\mathbb { R } ^ { + }$ . Images in the left most column differ by a rotation of $\\pi / 4$ and scaling of 1.2. Careful consideration of the resulting heatmaps (shown in canonical coordinates) reveals a shift corresponding to the deformation of the input image. "
549
+ ],
550
+ "image_footnote": [],
551
+ "bbox": [
552
+ 236,
553
+ 98,
554
+ 759,
555
+ 233
556
+ ],
557
+ "page_idx": 4
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "notational convenience. The shift of the dilated-rotation equivariant representation in response to input deformation is shown in Figure 2 (right) using canonical coordinates. ",
562
+ "bbox": [
563
+ 173,
564
+ 391,
565
+ 823,
566
+ 420
567
+ ],
568
+ "page_idx": 4
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "In canonical coordinates $s ^ { - 1 } r = \\xi _ { r } - \\xi , \\theta _ { r } - \\theta$ and the $\\mathbf { S } \\mathbf { O } ( 2 ) \\times \\mathbb { R } ^ { + }$ group-convolution2 can be expressed and efficiently implemented as a planar convolution ",
573
+ "bbox": [
574
+ 169,
575
+ 426,
576
+ 823,
577
+ 455
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "equation",
583
+ "img_path": "images/5b694605fbc2529109bcbbbc1ff91cf5de93653073ef08d17268c1f25e40fef8.jpg",
584
+ "text": "$$\n\\int _ { s } f ( s ) \\phi ( s ^ { - 1 } r ) \\ d s = \\int _ { s } \\lambda ( \\xi , \\theta ) \\phi ( \\xi _ { r } - \\xi , \\theta _ { r } - \\theta ) \\ d \\xi d \\theta .\n$$",
585
+ "text_format": "latex",
586
+ "bbox": [
587
+ 310,
588
+ 463,
589
+ 686,
590
+ 497
591
+ ],
592
+ "page_idx": 4
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "To summarize, we (1) construct a network of translational convolutions, (2) take the centroid of the last layer, (3) shift the original image to accordingly, (4) convert to log-polar coordinates, and (5) apply a second network3 of translational convolutions. The result is a feature map equivariant to dilated-rotations around the origin. ",
597
+ "bbox": [
598
+ 174,
599
+ 512,
600
+ 825,
601
+ 568
602
+ ],
603
+ "page_idx": 4
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "4 ARCHITECTURE ",
608
+ "text_level": 1,
609
+ "bbox": [
610
+ 176,
611
+ 590,
612
+ 339,
613
+ 606
614
+ ],
615
+ "page_idx": 4
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "PTN is comprised of two main components connected by the polar transformer module. The first part is the polar origin predictor and the second is the classifier (a conventional fully convolutional network). The building block of the network is a $3 \\times 3 \\times K$ convolutional layer followed by batch normalization, an ReLU and occasional subsampling through strided convolution. We will refer to this building block simply as block. Figure 3 shows the architecture. ",
620
+ "bbox": [
621
+ 174,
622
+ 622,
623
+ 825,
624
+ 693
625
+ ],
626
+ "page_idx": 4
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "4.1 POLAR ORIGIN PREDICTOR ",
631
+ "text_level": 1,
632
+ "bbox": [
633
+ 176,
634
+ 710,
635
+ 405,
636
+ 726
637
+ ],
638
+ "page_idx": 4
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "The polar origin predictor operates on the original image and comprises a sequence of blocks followed by a $1 \\times 1$ convolution. The output is a single channel feature map, the centroid of which is taken as the origin of the polar transform. ",
643
+ "bbox": [
644
+ 174,
645
+ 738,
646
+ 825,
647
+ 780
648
+ ],
649
+ "page_idx": 4
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "There are some difficulties in training a neural network to predict coordinates in images. Some approaches (Toshev & Szegedy, 2014) attempt to use fully connected layers to directly regress the coordinates with limited success. A better option is to predict heatmaps (Tompson et al., 2014; Newell et al., 2016), and take their argmax. However, this can be problematic since backpropogation gradients are zero in all but one point, which impedes learning. ",
654
+ "bbox": [
655
+ 174,
656
+ 786,
657
+ 825,
658
+ 857
659
+ ],
660
+ "page_idx": 4
661
+ },
662
+ {
663
+ "type": "image",
664
+ "img_path": "images/7462a826dc0a93344bc8c66f9bb0dfe6b918474c79d77f950c72c7576849fb60.jpg",
665
+ "image_caption": [
666
+ "Figure 3: Network architecture. The input image passes through a fully convolutional network, the polar origin predictor, which outputs a heatmap. The centroid of the heatmap (two coordinates), together with the input image, goes into the polar transformer module, which performs a polar transform with origin at the input coordinates. The obtained polar representation is invariant with respect to the original object location; and rotations and dilations are now shifts, which are handled equivariantly by a conventional classifier CNN. "
667
+ ],
668
+ "image_footnote": [],
669
+ "bbox": [
670
+ 187,
671
+ 97,
672
+ 815,
673
+ 212
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "The usual approach to heatmap prediction is evaluation of a loss against some ground truth. In this approach the argmax gradient problem is circumvented by supervision. In PTN the the gradient of the output coordinates must be taken with respect to the heatmap since the polar origin is unknown and must be learned. Use of argmax is avoided by using the centroid of the heatmap as the polar origin. The gradient of the centroid with respect to the heatmap is constant and nonzero for all points, making learning possible. ",
680
+ "bbox": [
681
+ 174,
682
+ 347,
683
+ 825,
684
+ 430
685
+ ],
686
+ "page_idx": 5
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "4.2 POLAR TRANSFORMER MODULE ",
691
+ "text_level": 1,
692
+ "bbox": [
693
+ 176,
694
+ 452,
695
+ 436,
696
+ 467
697
+ ],
698
+ "page_idx": 5
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "The polar transformer module takes the origin prediction and image as inputs and outputs the logpolar representation of the input. The module uses the same differentiable image sampling technique as STN (Jaderberg et al., 2015), which allows output coordinates $V _ { i }$ to be expressed in terms of the input $U$ and the source sample point coordinates $( x _ { i } ^ { s } , y _ { i } ^ { s } )$ . The log-polar transform in terms of the source sample points and target regular grid $( x _ { i } ^ { t } , y _ { i } ^ { t } )$ is: ",
703
+ "bbox": [
704
+ 174,
705
+ 479,
706
+ 825,
707
+ 551
708
+ ],
709
+ "page_idx": 5
710
+ },
711
+ {
712
+ "type": "equation",
713
+ "img_path": "images/8d4f274a47f9899d47f15b795d5ebd4f67cb30c45a111c4dd876c8700b207795.jpg",
714
+ "text": "$$\n\\begin{array} { l c r } { { x _ { i } ^ { s } = x _ { 0 } + r ^ { x _ { i } ^ { t } / W } \\cos { \\frac { 2 \\pi y _ { i } ^ { t } } { H } } } } \\\\ { { y _ { i } ^ { s } = y _ { 0 } + r ^ { x _ { i } ^ { t } / W } \\sin { \\frac { 2 \\pi y _ { i } ^ { t } } { H } } } } \\end{array}\n$$",
715
+ "text_format": "latex",
716
+ "bbox": [
717
+ 406,
718
+ 580,
719
+ 591,
720
+ 646
721
+ ],
722
+ "page_idx": 5
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "where $( x _ { 0 } , y _ { 0 } )$ is the origin, $W , H$ are the output width and height, and $r$ is the maximum distance from the origin, set to $0 . 5 \\sqrt { H ^ { 2 } + W ^ { 2 } }$ in our experiments. ",
727
+ "bbox": [
728
+ 171,
729
+ 654,
730
+ 823,
731
+ 684
732
+ ],
733
+ "page_idx": 5
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "4.3 WRAP-AROUND PADDING",
738
+ "text_level": 1,
739
+ "bbox": [
740
+ 174,
741
+ 705,
742
+ 392,
743
+ 720
744
+ ],
745
+ "page_idx": 5
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "To maintain feature map resolution, most CNN implementations use zero-padding. This is not ideal for the polar representation, as it is periodic about the angular axis. A rotation of the input result in a vertical shift of the output, wrapping at the boundary; hence, identification of the top and bottom most rows is most appropriate. This is achieved with wrap-around padding on the vertical dimension.The top most row of the feature map is padded using the bottom rows and vice versa. Zero-padding is used in the horizontal dimension. Table 5 shows a performance evaluation. ",
750
+ "bbox": [
751
+ 174,
752
+ 734,
753
+ 825,
754
+ 818
755
+ ],
756
+ "page_idx": 5
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "4.4 POLAR ORIGIN AUGMENTATION ",
761
+ "text_level": 1,
762
+ "bbox": [
763
+ 176,
764
+ 840,
765
+ 433,
766
+ 854
767
+ ],
768
+ "page_idx": 5
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "To improve robustness of our method, we augment the polar origin during training time by adding a random shift to the regressed polar origin coordinates. Note that this comes for little computational cost compared to conventional augmentation methods such as rotating the input image. Table 5 quantifies the performance gains of this kind of augmentation. ",
773
+ "bbox": [
774
+ 174,
775
+ 867,
776
+ 825,
777
+ 924
778
+ ],
779
+ "page_idx": 5
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "5 EXPERIMENTS ",
784
+ "text_level": 1,
785
+ "bbox": [
786
+ 174,
787
+ 102,
788
+ 326,
789
+ 118
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "5.1 ARCHITECTURES ",
796
+ "text_level": 1,
797
+ "bbox": [
798
+ 174,
799
+ 132,
800
+ 334,
801
+ 147
802
+ ],
803
+ "page_idx": 6
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "We briefly define the architectures in this section, see A for details. CCNN is a conventional fully convolutional network; PCNN is the same, but applied to polar images with central origin. STN is our implementation of the spatial transformer networks (Jaderberg et al., 2015). PTN is our polar transformer networks, and PTN-CNN is a combination of PTN and CCNN. The suffixes S and B indicate small and big networks, according to the number of parameters. The suffixes $^ +$ and $^ { + + }$ indicate training and training+test rotation augmentation. ",
808
+ "bbox": [
809
+ 174,
810
+ 159,
811
+ 825,
812
+ 242
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "We perform rotation augmentation for polar-based methods. In theory, the effect of input rotation is just a shift in the corresponding polar image, which should not affect the classifier CNN. In practice, interpolation and angle discretization effects result in slightly different polar images for rotated inputs, so even the polar-based methods benefit from this kind of augmentation. ",
819
+ "bbox": [
820
+ 174,
821
+ 250,
822
+ 825,
823
+ 305
824
+ ],
825
+ "page_idx": 6
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "5.2 ROTATED MNIST (LAROCHELLE ET AL., 2007) ",
830
+ "text_level": 1,
831
+ "bbox": [
832
+ 174,
833
+ 320,
834
+ 545,
835
+ 335
836
+ ],
837
+ "page_idx": 6
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "Table 1 shows the results. We divide the analysis in two parts; on the left, we show approaches with smaller networks and no rotation augmentation, on the right there are no restrictions. ",
842
+ "bbox": [
843
+ 176,
844
+ 347,
845
+ 823,
846
+ 376
847
+ ],
848
+ "page_idx": 6
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "Between the restricted approaches, the Harmonic Network (Worrall et al., 2016) outperforms the PTN by a small margin, but with almost 4x more training time, because the convolutions on complex variables are more costly. Also worth mentioning is the poor performance of the STN with no augmentation, which shows that learning the transformation parameters is much harder than learning the polar origin coordinates. ",
853
+ "bbox": [
854
+ 174,
855
+ 382,
856
+ 825,
857
+ 452
858
+ ],
859
+ "page_idx": 6
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "Between the unrestricted approaches, most variants of PTN-B outperform the current state of the art, with significant improvements when combined with CCNN and/or test time augmentation. ",
864
+ "bbox": [
865
+ 174,
866
+ 458,
867
+ 821,
868
+ 487
869
+ ],
870
+ "page_idx": 6
871
+ },
872
+ {
873
+ "type": "text",
874
+ "text": "Finally, we note that the PCNN achieves a relatively high accuracy in this dataset because the digits are mostly centered, so using the polar transform origin as the image center is reasonable. Our method, however, outperforms it by a high margin, showing that even in this case, it is possible to find an origin away from the image center that results in a more distinctive representation. ",
875
+ "bbox": [
876
+ 176,
877
+ 494,
878
+ 823,
879
+ 550
880
+ ],
881
+ "page_idx": 6
882
+ },
883
+ {
884
+ "type": "table",
885
+ "img_path": "images/1afb3ddfa68459f2b5747aa01bb7f8f31ed059d0f2bfe1c1c8c10b184912b8bd.jpg",
886
+ "table_caption": [
887
+ "Table 1: Performance on rotated MNIST. Errors are averages of several runs, with standard deviations within parenthesis. Times are average training time per epoch. "
888
+ ],
889
+ "table_footnote": [
890
+ "1, 2, 3, 4, 5 Worrall et al. (2016); Cohen & Welling (2016b); Zhou et al. (2017); Laptev et al. (2016); Marcos et al. (2016) 6 Test time performance is 8x slower when using test time augmentation "
891
+ ],
892
+ "table_body": "<table><tr><td>Model</td><td>error[%]</td><td>params</td><td>time [s]</td><td>Model</td><td>error [%]</td><td>params</td><td>time [s]</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PTN-S</td><td>1.83 (0.04)</td><td>27k</td><td>3.64 (0.04)</td><td>PTN-B+</td><td>1.14 (0.08)</td><td>129k</td><td>4.38 (0.02)</td></tr><tr><td>PCNN-S</td><td>2.6 (0.08)</td><td>22k</td><td>2.61 (0.04)</td><td>PTN-B++</td><td>0.95 (0.09)</td><td>129k</td><td>4.386</td></tr><tr><td>CCNN-S</td><td>5.76 (0.35)</td><td>22k</td><td>2.43 (0.02)</td><td>PTN-CNN-B+</td><td>1.01 (0.06)</td><td>254k</td><td>7.36</td></tr><tr><td>STN-S</td><td>7.87 (0.18)</td><td>43k</td><td>3.90 (0.05)</td><td>PTN-CNN-B++</td><td>0.89 (0.06)</td><td>254k</td><td>7.366</td></tr><tr><td>HNet1</td><td>1.69</td><td>33k</td><td>13.29 (0.19)</td><td>PCNN-B+</td><td>1.37 (0.00)</td><td>124k</td><td>3.30 (0.04)</td></tr><tr><td>P4CNN 2</td><td>2.28</td><td>22k</td><td></td><td>CCNN-B+</td><td>1.53 (0.07)</td><td>124k</td><td>2.98 (0.02)</td></tr><tr><td></td><td></td><td></td><td></td><td>STN-B+</td><td>1.31 (0.05)</td><td>146k</td><td>4.57 (0.04)</td></tr><tr><td></td><td></td><td></td><td></td><td>OR-TIPooling</td><td>1.54</td><td>~1M</td><td>-</td></tr><tr><td></td><td></td><td></td><td></td><td>TI-Pooling</td><td>1.2</td><td>~1M</td><td>42.90</td></tr><tr><td></td><td></td><td></td><td></td><td>RotEqNet5</td><td>1.01</td><td>100k</td><td>-</td></tr></table>",
893
+ "bbox": [
894
+ 223,
895
+ 601,
896
+ 774,
897
+ 731
898
+ ],
899
+ "page_idx": 6
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "5.3 OTHER MNIST VARIANTS ",
904
+ "text_level": 1,
905
+ "bbox": [
906
+ 174,
907
+ 771,
908
+ 398,
909
+ 785
910
+ ],
911
+ "page_idx": 6
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "We also perform experiments in other MNIST variants. MNIST R, RTS are replicated from Jaderberg et al. (2015). We introduce SIM2MNIST, with a more challenging set of transformations from SIM(2). See B for more details about the datasets. ",
916
+ "bbox": [
917
+ 176,
918
+ 796,
919
+ 823,
920
+ 839
921
+ ],
922
+ "page_idx": 6
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Table 2 shows the results. We can see that the PTN performance mostly matches the STN on both MNIST R and RTS. The deformations on these datasets are mild and data is plenty, so the performance may be saturated. ",
927
+ "bbox": [
928
+ 174,
929
+ 845,
930
+ 823,
931
+ 888
932
+ ],
933
+ "page_idx": 6
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "On SIM2MNIST, however, the deformations are more challenging and the training set 5x smaller. The PCNN performance is significantly lower, which reiterates the importance of predicting the best ",
938
+ "bbox": [
939
+ 174,
940
+ 895,
941
+ 823,
942
+ 924
943
+ ],
944
+ "page_idx": 6
945
+ },
946
+ {
947
+ "type": "image",
948
+ "img_path": "images/30183ea128fa23fda806bb3f1469e45fce4322383b7578f98146386ebd979a4e.jpg",
949
+ "image_caption": [
950
+ "Figure 4: Left: The rows alternate between samples from SIM2MNIST, where the predicted origin is shown in green, and their learned polar representation. Note how rotations and dilations of the object become shifts. Right: Each row shows a different input and correspondent feature maps on the last convolutional layer. The first and second rows show that the $1 8 0 ^ { \\circ }$ rotation results in a half-height vertical shift of the feature maps. The third and fourth rows show that the $2 . 4 \\times$ dilation results in a shift right of the feature maps. The first and third rows show invariance to translation. "
951
+ ],
952
+ "image_footnote": [],
953
+ "bbox": [
954
+ 238,
955
+ 101,
956
+ 759,
957
+ 261
958
+ ],
959
+ "page_idx": 7
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "polar origin. The HNet outperforms the other methods (except the PTN), thanks to its translation and rotation equivariance properties. Our method is more efficient both in number of parameters and training time, and is also equivariant to dilations, achieving the best performance by a large margin. ",
964
+ "bbox": [
965
+ 174,
966
+ 387,
967
+ 825,
968
+ 430
969
+ ],
970
+ "page_idx": 7
971
+ },
972
+ {
973
+ "type": "table",
974
+ "img_path": "images/e27851f7a4042d4903556833691279f018098a5c56f062d67294c9d86bc35f32.jpg",
975
+ "table_caption": [
976
+ "Table 2: Performance on MNIST variants. "
977
+ ],
978
+ "table_footnote": [
979
+ "1 No augmentation is used with SIM2MNIST, despite the $^ +$ suffixes 2 Our modified version, with two extra layers with subsampling to account for larger input "
980
+ ],
981
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">MNISTR</td><td rowspan=\"2\"></td><td colspan=\"2\">MNISTRTS</td><td rowspan=\"2\">time</td><td colspan=\"2\">SIM2MNIST1</td><td rowspan=\"2\">time</td></tr><tr><td>error [%]</td><td>pars</td><td>time error [%]</td><td>pars</td><td>error [%]</td><td>pars</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PTN-S+</td><td>0.88 (0.04)</td><td>29k</td><td>19.72</td><td>0.78 (0.05)</td><td>32k</td><td>24.48</td><td>5.44 (0.03)</td><td>35k</td><td>11.92</td></tr><tr><td>PTN-B+</td><td>0.62 (0.04)</td><td>129k</td><td>20.37</td><td>0.57 (0.03)</td><td>134k</td><td>28.74</td><td>5.03 (0.11)</td><td>134k</td><td>12.02</td></tr><tr><td>PCNN-B+</td><td>0.81 (0.04)</td><td>124k</td><td>13.97</td><td>0.70 (0.01)</td><td>129k</td><td>17.19</td><td>15.46 (0.22)</td><td>129k</td><td>5.33</td></tr><tr><td>CCNN-B+</td><td>0.74 (0.01)</td><td>124k</td><td>12.79</td><td>0.62 (0.07)</td><td>129k</td><td>15.97</td><td>11.73 (0.57)</td><td>129k</td><td>5.28</td></tr><tr><td>STN-B+</td><td>0.61 (0.02)</td><td>146k</td><td>23.12</td><td>0.54 (0.02)</td><td>150k</td><td>27.90</td><td>12.35 (1.61)</td><td>150k</td><td>10.41</td></tr><tr><td>STN (Jaderberg et al., 2015)</td><td>0.7</td><td>400k</td><td>-</td><td>0.5</td><td>400k</td><td></td><td></td><td></td><td>-</td></tr><tr><td>HNet (Worrall et al., 2016)</td><td></td><td>=</td><td>=</td><td></td><td>=</td><td></td><td>9.28 (0.05)</td><td>44k</td><td>31.42</td></tr><tr><td>TI-Pooling (Laptev et al.,2016)</td><td>0.8</td><td>~1M</td><td></td><td></td><td></td><td></td><td></td><td>-</td><td>-</td></tr></table>",
982
+ "bbox": [
983
+ 173,
984
+ 482,
985
+ 825,
986
+ 598
987
+ ],
988
+ "page_idx": 7
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "5.4 VISUALIZATION ",
993
+ "text_level": 1,
994
+ "bbox": [
995
+ 174,
996
+ 637,
997
+ 326,
998
+ 651
999
+ ],
1000
+ "page_idx": 7
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "We visualize network activations to confirm our claims about invariance to translation and equivariance to rotations and dilations. ",
1005
+ "bbox": [
1006
+ 173,
1007
+ 664,
1008
+ 821,
1009
+ 691
1010
+ ],
1011
+ "page_idx": 7
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Figure 4 (left) shows some of the predicted polar origins and the results of the polar transform. We can see that the network learns to reject clutter and to find a suitable origin for the polar transform, and that the representation after the polar transformer module does present the properties claimed. ",
1016
+ "bbox": [
1017
+ 174,
1018
+ 699,
1019
+ 825,
1020
+ 741
1021
+ ],
1022
+ "page_idx": 7
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "We proceed to visualize if the properties are preserved in deeper layers. Figure 4 (right) shows the activations of selected channels from the last convolutional layer, for different rotations, dilations, and translations of the input. The reader can verify that the equivariance to rotations and dilations, and the invariance to translations are indeed preserved during the sequence of convolutional layers. ",
1027
+ "bbox": [
1028
+ 174,
1029
+ 747,
1030
+ 825,
1031
+ 804
1032
+ ],
1033
+ "page_idx": 7
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "5.5 EXTENSION TO 3D OBJECT CLASSIFICATION ",
1038
+ "text_level": 1,
1039
+ "bbox": [
1040
+ 174,
1041
+ 820,
1042
+ 521,
1043
+ 834
1044
+ ],
1045
+ "page_idx": 7
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "We extend our model to perform 3D object classification from voxel occupancy grids. We assume that the inputs are transformed by random rotations around an axis from a family of parallel axes. Then, a rotation around that axis corresponds to a translation in cylindrical coordinates. ",
1050
+ "bbox": [
1051
+ 174,
1052
+ 845,
1053
+ 823,
1054
+ 888
1055
+ ],
1056
+ "page_idx": 7
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "In order to achieve equivariance to rotations, we predict an axis and use it as the origin to transform to cylindrical coordinates. If the axis is parallel to one of the input grid axes, the cylindrical transform amounts to channel-wise polar transforms, where the origin is the same for all channels and each channel is a 2D slice of the 3D voxel grid. In this setting, we can just apply the polar transformer layer to each slice. ",
1061
+ "bbox": [
1062
+ 173,
1063
+ 895,
1064
+ 823,
1065
+ 924
1066
+ ],
1067
+ "page_idx": 7
1068
+ },
1069
+ {
1070
+ "type": "image",
1071
+ "img_path": "images/0ad07b868c1491f3ff67f64c033a45f7f24a8d446e44d8c51afca58da0d540eb.jpg",
1072
+ "image_caption": [
1073
+ "Figure 5: Top: rotated voxel occupancy grids. Bottom: corresponding cylindrical representations. Note how rotations around a vertical axis correspond to translations over a horizontal axis. "
1074
+ ],
1075
+ "image_footnote": [],
1076
+ "bbox": [
1077
+ 173,
1078
+ 98,
1079
+ 826,
1080
+ 231
1081
+ ],
1082
+ "page_idx": 8
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "",
1087
+ "bbox": [
1088
+ 174,
1089
+ 309,
1090
+ 825,
1091
+ 351
1092
+ ],
1093
+ "page_idx": 8
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "We use a technique similar to the anisotropic probing of Qi et al. (2016) to predict the axis. Let $z$ denote the input grid axis parallel to the rotation axis. We treat the dimension indexed by $z$ as channels, and run regular 2D convolutional layers, reducing the number of channels on each layer, eventually collapsing to a single 2D heatmap. The heatmap centroid gives one point of the axis, and the direction is parallel to $z$ . In other words, the centroid is the origin of all channel-wise polar transforms. We then proceed with a regular 3D CNN classifier, acting on the cylindrical representation. The 3D convolutions are equivariant to translations; since they act on cylindrical coordinates, the learned representation is equivariant to input rotations around axes parallel to $z$ . ",
1098
+ "bbox": [
1099
+ 174,
1100
+ 357,
1101
+ 825,
1102
+ 469
1103
+ ],
1104
+ "page_idx": 8
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "We run experiments on ModelNet40 (Wu et al., 2015), which contains objects rotated around the gravity direction $( z )$ . Figure 5 shows examples of input voxel grids and their cylindrical coordinates representation, while table 3 shows the classification performance. To the best of our knowledge, our method outperforms all published voxel-based methods, even with no test time augmentation. However, the multi-view based methods generally outperform the voxel-based. (Qi et al., 2016). ",
1109
+ "bbox": [
1110
+ 174,
1111
+ 476,
1112
+ 825,
1113
+ 546
1114
+ ],
1115
+ "page_idx": 8
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "Note that we could also achieve equivariance to scale by using log-cylindrical or log-spherical coordinates, but none of these change of coordinates would result in equivariance to arbitrary 3D rotations. ",
1120
+ "bbox": [
1121
+ 176,
1122
+ 553,
1123
+ 820,
1124
+ 594
1125
+ ],
1126
+ "page_idx": 8
1127
+ },
1128
+ {
1129
+ "type": "table",
1130
+ "img_path": "images/68dce032800de80369039dcda7a629a21b715b9df316c4cf949f02937675eace.jpg",
1131
+ "table_caption": [
1132
+ "Table 3: ModelNet40 classification performance. We compare only with voxel-based methods. "
1133
+ ],
1134
+ "table_footnote": [],
1135
+ "table_body": "<table><tr><td>Model</td><td>Avg. class accuracy [%]</td><td>Avg.instance accuracy [%]</td></tr><tr><td>Cylindrical Transformer (Ours)</td><td>86.5</td><td>89.9</td></tr><tr><td>3D ShapeNets (Wu et al.,2015)</td><td>77.3</td><td></td></tr><tr><td>VoxNet (Maturana&amp; Scherer,2015)</td><td>83</td><td>-</td></tr><tr><td>MO-SubvolumeSup (Qi et al.,2016)</td><td>86.0</td><td>= 89.2</td></tr><tr><td>MO-Aniprobing (Qi et al.,2016)</td><td>85.6</td><td>89.9</td></tr></table>",
1136
+ "bbox": [
1137
+ 264,
1138
+ 651,
1139
+ 732,
1140
+ 727
1141
+ ],
1142
+ "page_idx": 8
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "6 CONCLUSION ",
1147
+ "text_level": 1,
1148
+ "bbox": [
1149
+ 174,
1150
+ 750,
1151
+ 318,
1152
+ 765
1153
+ ],
1154
+ "page_idx": 8
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "We have proposed a novel network whose output is invariant to translations and equivariant to the group of dilations/rotations. We have combined the idea of learning the translation (similar to the spatial transformer) but providing equivariance for the scaling and rotation, avoiding, thus, fully connected layers required for the pose regression in the spatial transformer. Equivariance with respect to dilated rotations is achieved by convolution in this group. Such a convolution would require the production of multiple group copies, however, we avoid this by transforming into canonical coordinates. We improve the state of the art performance on rotated MNIST by a large margin, and outperform all other tested methods on a new dataset we call SIM2MNIST. We expect our approach to be applicable to other problems, where the presence of different orientations and scales hinder the performance of conventional CNNs. ",
1159
+ "bbox": [
1160
+ 173,
1161
+ 784,
1162
+ 825,
1163
+ 922
1164
+ ],
1165
+ "page_idx": 8
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "REFERENCES ",
1170
+ "text_level": 1,
1171
+ "bbox": [
1172
+ 174,
1173
+ 103,
1174
+ 287,
1175
+ 117
1176
+ ],
1177
+ "page_idx": 9
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "David Casasent and Demetri Psaltis. Scale invariant optical transform. Optical Engineering, 15(3):153258– 153258, 1976. ",
1182
+ "bbox": [
1183
+ 174,
1184
+ 125,
1185
+ 821,
1186
+ 151
1187
+ ],
1188
+ "page_idx": 9
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "Olivier Chomat, Vincent Colin de Verdiere, Daniela Hall, and James L Crowley. Local scale selection for \\` gaussian based description techniques. In European Conference on Computer Vision, pp. 117–134. Springer, 2000. ",
1193
+ "bbox": [
1194
+ 174,
1195
+ 160,
1196
+ 825,
1197
+ 199
1198
+ ],
1199
+ "page_idx": 9
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "Taco S. Cohen and Max Welling. Steerable cnns. 2016a. URL http://arxiv.org/abs/1612. 08498v1. ",
1204
+ "bbox": [
1205
+ 173,
1206
+ 209,
1207
+ 818,
1208
+ 236
1209
+ ],
1210
+ "page_idx": 9
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Taco S Cohen and Max Welling. Group equivariant convolutional networks. arXiv preprint arXiv:1602.07576, 2016b. ",
1215
+ "bbox": [
1216
+ 174,
1217
+ 246,
1218
+ 821,
1219
+ 272
1220
+ ],
1221
+ "page_idx": 9
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "Sander Dieleman, Kyle W Willett, and Joni Dambre. Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly notices of the royal astronomical society, 450(2):1441–1459, 2015. ",
1226
+ "bbox": [
1227
+ 176,
1228
+ 281,
1229
+ 823,
1230
+ 309
1231
+ ],
1232
+ "page_idx": 9
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "Mario Ferraro and Terry M Caelli. Relationship between integral transform invariances and lie group theory. JOSA A, 5(5):738–742, 1988. ",
1237
+ "bbox": [
1238
+ 173,
1239
+ 318,
1240
+ 821,
1241
+ 344
1242
+ ],
1243
+ "page_idx": 9
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "William T Freeman, Edward H Adelson, et al. The design and use of steerable filters. IEEE Transactions on Pattern analysis and machine intelligence, 13(9):891–906, 1991. ",
1248
+ "bbox": [
1249
+ 173,
1250
+ 353,
1251
+ 823,
1252
+ 381
1253
+ ],
1254
+ "page_idx": 9
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Robert Gens and Pedro M Domingos. Deep symmetry networks. In Advances in neural information processing systems, pp. 2537–2545, 2014. ",
1259
+ "bbox": [
1260
+ 173,
1261
+ 390,
1262
+ 823,
1263
+ 416
1264
+ ],
1265
+ "page_idx": 9
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "Goesta H Granlund. In search of a general picture processing operator. Computer Graphics and Image Processing, 8(2):155–173, 1978. ",
1270
+ "bbox": [
1271
+ 174,
1272
+ 426,
1273
+ 823,
1274
+ 453
1275
+ ],
1276
+ "page_idx": 9
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ",
1281
+ "bbox": [
1282
+ 173,
1283
+ 462,
1284
+ 825,
1285
+ 489
1286
+ ],
1287
+ "page_idx": 9
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "Yacov Hel-Or and Patrick C Teo. Canonical decomposition of steerable functions. In Computer Vision and Pattern Recognition, 1996. Proceedings CVPR’96, 1996 IEEE Computer Society Conference on, pp. 809– 816. IEEE, 1996. ",
1292
+ "bbox": [
1293
+ 173,
1294
+ 497,
1295
+ 826,
1296
+ 537
1297
+ ],
1298
+ "page_idx": 9
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "Joao F Henriques and Andrea Vedaldi. Warped convolutions: Efficient invariance to spatial transformations. ˜ arXiv preprint arXiv:1609.04382, 2016. ",
1303
+ "bbox": [
1304
+ 173,
1305
+ 546,
1306
+ 821,
1307
+ 574
1308
+ ],
1309
+ "page_idx": 9
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "Jorn-Henrik Jacobsen, Bert de Brabandere, and Arnold W. M. Smeulders. Dynamic steerable blocks in deep ¨ residual networks. CoRR, 2017. URL http://arxiv.org/abs/1706.00598v2. ",
1314
+ "bbox": [
1315
+ 169,
1316
+ 583,
1317
+ 823,
1318
+ 609
1319
+ ],
1320
+ "page_idx": 9
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pp. 2017–2025, 2015. ",
1325
+ "bbox": [
1326
+ 171,
1327
+ 619,
1328
+ 823,
1329
+ 647
1330
+ ],
1331
+ "page_idx": 9
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Alexander B Kyatkin and Gregory S Chirikjian. Algorithms for fast convolutions on motion groups. Applied and Computational Harmonic Analysis, 9(2):220–241, 2000. ",
1336
+ "bbox": [
1337
+ 171,
1338
+ 655,
1339
+ 823,
1340
+ 683
1341
+ ],
1342
+ "page_idx": 9
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "Dmitry Laptev, Nikolay Savinov, Joachim M. Buhmann, and Marc Pollefeys. Ti-pooling: Transformationinvariant pooling for feature learning in convolutional neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. ",
1347
+ "bbox": [
1348
+ 174,
1349
+ 690,
1350
+ 823,
1351
+ 731
1352
+ ],
1353
+ "page_idx": 9
1354
+ },
1355
+ {
1356
+ "type": "text",
1357
+ "text": "Hugo Larochelle, Dumitru Erhan, Aaron Courville, James Bergstra, and Yoshua Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In Proceedings of the 24th international conference on Machine learning, pp. 473–480. ACM, 2007. ",
1358
+ "bbox": [
1359
+ 176,
1360
+ 739,
1361
+ 825,
1362
+ 780
1363
+ ],
1364
+ "page_idx": 9
1365
+ },
1366
+ {
1367
+ "type": "text",
1368
+ "text": "Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. ",
1369
+ "bbox": [
1370
+ 171,
1371
+ 787,
1372
+ 781,
1373
+ 803
1374
+ ],
1375
+ "page_idx": 9
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 991– 999, 2015. ",
1380
+ "bbox": [
1381
+ 171,
1382
+ 813,
1383
+ 825,
1384
+ 852
1385
+ ],
1386
+ "page_idx": 9
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "Tony Lindeberg. Scale-space theory: A basic tool for analyzing structures at different scales. Journal of applied statistics, 21(1-2):225–270, 1994. ",
1391
+ "bbox": [
1392
+ 173,
1393
+ 861,
1394
+ 823,
1395
+ 887
1396
+ ],
1397
+ "page_idx": 9
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "David G Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2):91–110, 2004. ",
1402
+ "bbox": [
1403
+ 173,
1404
+ 897,
1405
+ 821,
1406
+ 924
1407
+ ],
1408
+ "page_idx": 9
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "Diego Marcos, Michele Volpi, Nikos Komodakis, and Devis Tuia. Rotation equivariant vector field networks. CoRR, 2016. ",
1413
+ "bbox": [
1414
+ 171,
1415
+ 103,
1416
+ 823,
1417
+ 131
1418
+ ],
1419
+ "page_idx": 10
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on, pp. 922–928. IEEE, 2015. ",
1424
+ "bbox": [
1425
+ 173,
1426
+ 142,
1427
+ 823,
1428
+ 181
1429
+ ],
1430
+ "page_idx": 10
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011. ",
1435
+ "bbox": [
1436
+ 173,
1437
+ 194,
1438
+ 823,
1439
+ 234
1440
+ ],
1441
+ "page_idx": 10
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. 2016. ",
1446
+ "bbox": [
1447
+ 171,
1448
+ 244,
1449
+ 816,
1450
+ 261
1451
+ ],
1452
+ "page_idx": 10
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "Klas Nordberg and Gosta Granlund. Equivariance and invariance-an approach based on lie groups. In Image Processing, 1996. Proceedings., International Conference on, volume 3, pp. 181–184. IEEE, 1996. ",
1457
+ "bbox": [
1458
+ 174,
1459
+ 271,
1460
+ 821,
1461
+ 299
1462
+ ],
1463
+ "page_idx": 10
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "Pietro Perona. Deformable kernels for early vision. IEEE Transactions on pattern analysis and machine intelligence, 17(5):488–499, 1995. ",
1468
+ "bbox": [
1469
+ 174,
1470
+ 309,
1471
+ 821,
1472
+ 338
1473
+ ],
1474
+ "page_idx": 10
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "Charles R. Qi, Hao Su, Matthias Niessner, Angela Dai, Mengyuan Yan, and Leonidas J. Guibas. Volumetric and multi-view cnns for object classification on 3d data. 2016. ",
1479
+ "bbox": [
1480
+ 173,
1481
+ 349,
1482
+ 823,
1483
+ 376
1484
+ ],
1485
+ "page_idx": 10
1486
+ },
1487
+ {
1488
+ "type": "text",
1489
+ "text": "Nima Sedaghat, Mohammadreza Zolfaghari, and Thomas Brox. Orientation-boosted voxel nets for 3d object recognition. CoRR, 2016. ",
1490
+ "bbox": [
1491
+ 171,
1492
+ 387,
1493
+ 825,
1494
+ 415
1495
+ ],
1496
+ "page_idx": 10
1497
+ },
1498
+ {
1499
+ "type": "text",
1500
+ "text": "Joseph Segman, Jacob Rubinstein, and Yehoshua Y Zeevi. The canonical coordinates method for pattern deformation: Theoretical and computational considerations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 14(12):1171–1183, 1992. ",
1501
+ "bbox": [
1502
+ 173,
1503
+ 426,
1504
+ 823,
1505
+ 467
1506
+ ],
1507
+ "page_idx": 10
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "Laurent Sifre and Stephane Mallat. Rotation, scaling and deformation invariant scattering for texture discrimi- ´ nation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1233–1240, 2013. ",
1512
+ "bbox": [
1513
+ 173,
1514
+ 478,
1515
+ 821,
1516
+ 517
1517
+ ],
1518
+ "page_idx": 10
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "Eero P Simoncelli, William T Freeman, Edward H Adelson, and David J Heeger. Shiftable multiscale transforms. IEEE transactions on Information Theory, 38(2):587–607, 1992. ",
1523
+ "bbox": [
1524
+ 171,
1525
+ 529,
1526
+ 823,
1527
+ 556
1528
+ ],
1529
+ "page_idx": 10
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "Stefano Soatto. Actionable information in vision. In Machine learning for computer vision, pp. 17–48. Springer, 2013. ",
1534
+ "bbox": [
1535
+ 173,
1536
+ 568,
1537
+ 823,
1538
+ 595
1539
+ ],
1540
+ "page_idx": 10
1541
+ },
1542
+ {
1543
+ "type": "text",
1544
+ "text": "Patrick C Teo and Yacov Hel-Or. Design of multi-parameter steerable functions using cascade basis reduction. In Computer Vision, 1998. Sixth International Conference on, pp. 187–192. IEEE, 1998. ",
1545
+ "bbox": [
1546
+ 171,
1547
+ 607,
1548
+ 823,
1549
+ 633
1550
+ ],
1551
+ "page_idx": 10
1552
+ },
1553
+ {
1554
+ "type": "text",
1555
+ "text": "Jonathan J Tompson, Arjun Jain, Yann LeCun, and Christoph Bregler. Joint training of a convolutional network and a graphical model for human pose estimation. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 1799–1807. Curran Associates, Inc., 2014. ",
1556
+ "bbox": [
1557
+ 173,
1558
+ 645,
1559
+ 825,
1560
+ 696
1561
+ ],
1562
+ "page_idx": 10
1563
+ },
1564
+ {
1565
+ "type": "text",
1566
+ "text": "Alexander Toshev and Christian Szegedy. Deeppose: Human pose estimation via deep neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. ",
1567
+ "bbox": [
1568
+ 173,
1569
+ 709,
1570
+ 823,
1571
+ 736
1572
+ ],
1573
+ "page_idx": 10
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. arXiv preprint arXiv:1612.04642, 2016. ",
1578
+ "bbox": [
1579
+ 173,
1580
+ 747,
1581
+ 823,
1582
+ 775
1583
+ ],
1584
+ "page_idx": 10
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaoou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1912–1920, 2015. ",
1589
+ "bbox": [
1590
+ 173,
1591
+ 786,
1592
+ 825,
1593
+ 827
1594
+ ],
1595
+ "page_idx": 10
1596
+ },
1597
+ {
1598
+ "type": "text",
1599
+ "text": "Yanzhao Zhou, Qixiang Ye, Qiang Qiu, and Jianbin Jiao. Oriented response networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. ",
1600
+ "bbox": [
1601
+ 173,
1602
+ 838,
1603
+ 823,
1604
+ 866
1605
+ ],
1606
+ "page_idx": 10
1607
+ },
1608
+ {
1609
+ "type": "text",
1610
+ "text": "Philip E Zwicke and Imre Kiss. A new implementation of the mellin transform and its application to radar classification of ships. IEEE Transactions on pattern analysis and machine intelligence, 4(2):191–199, 1983. ",
1611
+ "bbox": [
1612
+ 174,
1613
+ 877,
1614
+ 823,
1615
+ 916
1616
+ ],
1617
+ "page_idx": 10
1618
+ },
1619
+ {
1620
+ "type": "text",
1621
+ "text": "APPENDICES ",
1622
+ "text_level": 1,
1623
+ "bbox": [
1624
+ 176,
1625
+ 103,
1626
+ 282,
1627
+ 118
1628
+ ],
1629
+ "page_idx": 11
1630
+ },
1631
+ {
1632
+ "type": "text",
1633
+ "text": "A ARCHITECTURES DETAILS ",
1634
+ "text_level": 1,
1635
+ "bbox": [
1636
+ 178,
1637
+ 136,
1638
+ 428,
1639
+ 151
1640
+ ],
1641
+ "page_idx": 11
1642
+ },
1643
+ {
1644
+ "type": "text",
1645
+ "text": "• Conventional CNN (CCNN), a fully convolutional network, composed of a sequence of convolutional layers and some rounds of subsampling . \nPolar CNN (PCNN), same architecture as CCNN, operating on polar images. The logpolar transform is pre-computed at the image center before training, as in Henriques & Vedaldi (2016). The fundamental difference between our method and this is that we learn the polar origin implicitly, instead of fixing it. \n• Spatial Transformer Network (STN), our implementation of Jaderberg et al. (2015), replacing the localization network by four blocks of 20 filters and stride 2, followed by a 20 unit fully connected layer, which we found to perform better. The transformation regressed is in SIM(2), and a CCNN comes after the transform. \nPolar Transformer Network (PTN), our proposed method. The polar origin predictor comprises three blocks of 20 filters each, with stride 2 on the first block (or the first two blocks, when input is $9 6 \\times 9 6$ ). The classification network is the CCNN. \nPTN-CNN, we classify based on the sum of the per class scores of instances of PTN and CCNN trained independently. ",
1646
+ "bbox": [
1647
+ 214,
1648
+ 191,
1649
+ 825,
1650
+ 420
1651
+ ],
1652
+ "page_idx": 11
1653
+ },
1654
+ {
1655
+ "type": "text",
1656
+ "text": "The following suffixes qualify the architectures described above: ",
1657
+ "bbox": [
1658
+ 174,
1659
+ 431,
1660
+ 598,
1661
+ 445
1662
+ ],
1663
+ "page_idx": 11
1664
+ },
1665
+ {
1666
+ "type": "text",
1667
+ "text": "• S, “small” network, with seven blocks of 20 filters and one round of subsampling (equivalent to the Z2CNN in Cohen & Welling (2016b)). \n• B, “big” network, with 8 blocks with the following number of filters: 16, 16, 32, 32, 32, 64, 64, 64. Subsampling by strided convolution is used whenever the number of filters increase. We add up to two 2 extra blocks of 16 filters with stride 2 at the beginning to handle larger input resolutions (one for $4 2 \\times 4 2$ and two for $9 6 \\times 9 6$ ). \n• $^ +$ , training time rotation augmentation by continuous angles. \n• $^ { + + }$ , training and test time rotation augmentation. We input 8 rotated versions the the query image and classify using the sum of the per class scores. ",
1668
+ "bbox": [
1669
+ 215,
1670
+ 458,
1671
+ 825,
1672
+ 597
1673
+ ],
1674
+ "page_idx": 11
1675
+ },
1676
+ {
1677
+ "type": "text",
1678
+ "text": "Cylindrical transformer network: The axis prediction part of the cylindrical transformer network is composed of four 2D blocks, with $5 \\times 5$ kernels and 32, 16, 8, and 4 channels, no subsampling. The classifier is composed of eight 3D convolutional blocks, with $3 \\times 3 \\times 3$ kernels, the following number of filters: 32, 32, 32, 64, 64, 64, 128, 128, and subsampling whenever the number of filters increase. Total number of params is approximately 1M. ",
1679
+ "bbox": [
1680
+ 174,
1681
+ 608,
1682
+ 825,
1683
+ 679
1684
+ ],
1685
+ "page_idx": 11
1686
+ },
1687
+ {
1688
+ "type": "text",
1689
+ "text": "B DATASET DETAILS ",
1690
+ "text_level": 1,
1691
+ "bbox": [
1692
+ 174,
1693
+ 699,
1694
+ 361,
1695
+ 714
1696
+ ],
1697
+ "page_idx": 11
1698
+ },
1699
+ {
1700
+ "type": "text",
1701
+ "text": "• Rotated MNIST The rotated MNIST dataset (Larochelle et al., 2007) is composed of $2 8 \\times$ 28, $3 6 0 ^ { \\circ }$ rotated images of handwritten digits. The training, validation and test sets are of sizes 10k, 2k, and $5 0 \\mathrm { k }$ , respectively. \nMNIST R, we replicate it from Jaderberg et al. (2015). It has $6 0 \\mathrm { k }$ training and 10k testing samples, where the digits of the original MNIST are rotated between $[ - 9 0 ^ { \\circ } , 9 0 ^ { \\circ } ]$ . It is also know as half-rotated MNIST (Laptev et al., 2016). \nMNIST RTS, we replicate it from Jaderberg et al. (2015). It has 60k training and $1 0 \\mathrm { k }$ testing samples, where the digits of the original MNIST are rotated between $[ - 4 5 ^ { \\circ } , 4 5 ^ { \\circ } ]$ , scaled between 0.7 and 1.2, and shifted within a $4 2 \\times 4 2$ black canvas. \nSIM2MNIST, we introduce a more challenging dataset, based on MNIST, perturbed by random transformations from SIM(2). The images are $9 6 \\times 9 6$ , with $3 6 0 ^ { \\circ }$ rotations; the scale factors range from 1 to 2.4, and the digits can appear anywhere in the image. The training, validation and test set have size 10k, 5k, and $5 0 \\mathrm { k }$ , respectively. ",
1702
+ "bbox": [
1703
+ 215,
1704
+ 729,
1705
+ 825,
1706
+ 924
1707
+ ],
1708
+ "page_idx": 11
1709
+ },
1710
+ {
1711
+ "type": "image",
1712
+ "img_path": "images/ebd71a4ab0575b5a05dbeac04b61a818f51c65e9c2a2d425ae3ff1b850f25942.jpg",
1713
+ "image_caption": [
1714
+ "Figure 6: ROTSVHN samples. Since the digits are cropped from larger images, no artifacts are introduced when rotating. The 6s and 9s are indistinguishable when rotated. Note that there are usually visible digits on the sides, which pose a challenge for classification and PTN origin prediction. "
1715
+ ],
1716
+ "image_footnote": [],
1717
+ "bbox": [
1718
+ 174,
1719
+ 102,
1720
+ 823,
1721
+ 301
1722
+ ],
1723
+ "page_idx": 12
1724
+ },
1725
+ {
1726
+ "type": "table",
1727
+ "img_path": "images/64cc66b2d2157a8b6ee5590415b49f5f8ea8ec4d68f9ace5ccdd117979c5e268.jpg",
1728
+ "table_caption": [
1729
+ "Table 4: SVHN classification performance. The minus suffix indicate removal of 6s and 9s. PTN shows slightly worse performance on the unperturbed dataset, but is clearly superior when rotations are present. "
1730
+ ],
1731
+ "table_footnote": [],
1732
+ "table_body": "<table><tr><td></td><td>SVHN</td><td>ROTSVHN</td><td>SVHN-</td><td>ROTSVHN-</td></tr><tr><td>PTN-ResNet32 (Ours)</td><td>2.82 (0.07)</td><td>7.90 (0.14)</td><td>2.85 (0.07)</td><td>3.96 (0.04)</td></tr><tr><td>ResNet32</td><td>2.25 (0.15)</td><td>9.83 (0.29)</td><td>2.09 (0.06)</td><td>5.39 (0.09)</td></tr></table>",
1733
+ "bbox": [
1734
+ 225,
1735
+ 435,
1736
+ 769,
1737
+ 483
1738
+ ],
1739
+ "page_idx": 12
1740
+ },
1741
+ {
1742
+ "type": "text",
1743
+ "text": "C SVHN EXPERIMENTS ",
1744
+ "text_level": 1,
1745
+ "bbox": [
1746
+ 174,
1747
+ 512,
1748
+ 392,
1749
+ 529
1750
+ ],
1751
+ "page_idx": 12
1752
+ },
1753
+ {
1754
+ "type": "text",
1755
+ "text": "In order to demonstrate the efficacy of PTN on real-world RGB images, we run experiments on the Street View House Numbers (SVHN) dataset Netzer et al. (2011), and a rotated version that we introduce (ROTSVHN) . The dataset contains cropped images of single digits, as well as the slightly larger images from where the digits are cropped. Using the latter, we can extract the rotated digits without introducing artifacts. Figure 6 shows some examples from the ROTSVHN. ",
1756
+ "bbox": [
1757
+ 174,
1758
+ 544,
1759
+ 825,
1760
+ 613
1761
+ ],
1762
+ "page_idx": 12
1763
+ },
1764
+ {
1765
+ "type": "text",
1766
+ "text": "We use a 32 layer Residual Network (He et al., 2016) as a baseline (ResNet32). The PTN-ResNet32 has 8 residual convolutional layers as the origin predictor, followed by a ResNet32. ",
1767
+ "bbox": [
1768
+ 176,
1769
+ 619,
1770
+ 820,
1771
+ 650
1772
+ ],
1773
+ "page_idx": 12
1774
+ },
1775
+ {
1776
+ "type": "text",
1777
+ "text": "In contrast with handwritten digits, the 6s and 9s in house numbers are usually indistinguishable. To remove this effect from our analysis, we also run experiments removing those classes from the datasets (which is denoted by appending a minus to the dataset name). Table 4 shows the results. ",
1778
+ "bbox": [
1779
+ 174,
1780
+ 655,
1781
+ 825,
1782
+ 698
1783
+ ],
1784
+ "page_idx": 12
1785
+ },
1786
+ {
1787
+ "type": "text",
1788
+ "text": "The reader will note that rotations cause a significant performance loss on the conventional ResNet; the error increases from $2 . 0 9 \\%$ to $5 . 3 9 \\%$ , even when removing 6s and 9s from the dataset. With PTN, on the other hand, the error goes from $2 . 8 5 \\%$ to $3 . 9 6 \\%$ , which shows our method is more robust to the perturbations, although the performance on the unperturbed datasets is slightly worse. We expect the PTN to be even more advantageous when large scale variations are also present. ",
1789
+ "bbox": [
1790
+ 174,
1791
+ 704,
1792
+ 825,
1793
+ 775
1794
+ ],
1795
+ "page_idx": 12
1796
+ },
1797
+ {
1798
+ "type": "text",
1799
+ "text": "D ABLATION STUDY ",
1800
+ "text_level": 1,
1801
+ "bbox": [
1802
+ 176,
1803
+ 795,
1804
+ 361,
1805
+ 811
1806
+ ],
1807
+ "page_idx": 12
1808
+ },
1809
+ {
1810
+ "type": "text",
1811
+ "text": "We quantify the performance boost obtained with wrap around padding, polar origin augmentation, and training time rotation augmentation. Results are based on the PTN-B variant trained on Rotated MNIST. We remove one operation at a time and verify that the performance consistently drops, which indicates that all operations are indeed helpful. Table 5 shows the results. ",
1812
+ "bbox": [
1813
+ 174,
1814
+ 827,
1815
+ 825,
1816
+ 882
1817
+ ],
1818
+ "page_idx": 12
1819
+ },
1820
+ {
1821
+ "type": "table",
1822
+ "img_path": "images/9b6961ba149430bb5438d2d802c0df2ccfa2449c5012586c35e6a372475779ec.jpg",
1823
+ "table_caption": [
1824
+ "Table 5: Ablation study. Rotation and polar origin augmentation during training time, and wrap around padding all contribute to reduce the error. Results are from PTN-B on the rotated MNIST. "
1825
+ ],
1826
+ "table_footnote": [],
1827
+ "table_body": "<table><tr><td>Origin aug.</td><td>Rotation aug.</td><td>Wrap padding</td><td>Error [%]</td></tr><tr><td>Yes</td><td>Yes</td><td>Yes</td><td>1.12 (0.03)</td></tr><tr><td>No</td><td>Yes</td><td>Yes</td><td>1.33 (0.12)</td></tr><tr><td>Yes</td><td>No</td><td>Yes</td><td>1.46 (0.11)</td></tr><tr><td>Yes</td><td>Yes</td><td>No</td><td>1.31 (0.06)</td></tr></table>",
1828
+ "bbox": [
1829
+ 294,
1830
+ 487,
1831
+ 702,
1832
+ 574
1833
+ ],
1834
+ "page_idx": 13
1835
+ }
1836
+ ]
parse/train/HktRlUlAZ/HktRlUlAZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HktRlUlAZ/HktRlUlAZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MRQJmsNPp8E/MRQJmsNPp8E.md ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING REPRESENTATIONS BY CONTRASTING CLUSTERS WHILE BOOTSTRAPPING INSTANCES
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Learning visual representations using large-scale unlabelled images is a holy grail for most of computer vision tasks. Recent contrastive learning methods have focused on encouraging the learned visual representations to be linearly separable among the individual items regardless of their semantic similarity; however, it could lead to a sub-optimal solution if a given downstream task is related to non-discriminative ones such as cluster analysis and information retrieval. In this work, we propose an advanced approach to consider the instance semantics in an unsupervised environment by both i) Contrasting batch-wise Cluster assignment features and ii) Bootstrapping an INstance representations without considering negatives simultaneously, referred to as C2BIN. Specifically, instances in a mini-batch are appropriately assigned to distinct clusters, each of which aims to capture apparent similarity among instances. Moreover, we introduce a multi-scale clustering technique, showing positive effects on the representations by capturing multi-scale semantics. Empirically, our method achieves comparable or better performance than both representation learning and clustering baselines on various benchmark datasets: CIFAR-10, CIFAR-100, and STL-10.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Learning to extract generalized representations from a high-dimensional image is essential in solving various down-stream tasks in computer vision. Though a supervised learning framework has shown to be useful in learning discriminative representations for pre-training the model, expensive labeling cost makes it practically infeasible in a large-scale dataset. Moreover, relying on the human-annotated labels tends to cause several issues such as class imbalance (Cui et al., 2019), noisy labels (Lee et al., 2019), and biased datasets (Bahng et al., 2019). To address these issues, self-supervised visual representation learning, which does not require any given labels, has emerged as an alternative training framework, being actively studied to find a proper training objective.
12
+
13
+ Recently, self-supervised approaches with contrastive learning (Wu et al., 2018; Chen et al., 2020a; He et al., 2020) have rapidly narrowed the performance gap with supervised pre-training in various vision tasks. The contrastive method aims to learn invariant mapping (Hadsell et al., 2006) and instance discrimination. Intuitively, two augmented views of the same instance are mapped to the same latent space while different instances are pushed away. However, aforementioned instance discrimination does not consider the semantic similarities of the representations (e.g., same class), even pushing away the relevant instances. This affects the learned representations to exhibit uniformly distributed characteristics, proven by the previous works (Wang & Isola, 2020; Chen & Li, 2020).
14
+
15
+ We point out that this uniformly distributed characteristic over instances can be a fundamental limitation against improving the learned representation quality. For instance, consider the representations illustrated in Fig. 1. It indicates a simple case where linearly separable representations do not always guarantee that they can be properly clustered, which is not appropriate for non-discriminative downstream tasks such as information retrieval, density estimation, and cluster analysis (Wu et al., 2013). In response, we start this work by asking: How can we learn the representations to be properly clustered even without the class labels?
16
+
17
+ ![](images/fdfe0569da563c00af356cdeadb1424e615461c6d374337c98ee5a080c56bfe9.jpg)
18
+ Figure 1: Though illustrated 2D representations are linearly separable, irrelevant instances are clustered together.
19
+
20
+ ![](images/2abfa4c48dde0ba577417e3104fdd33df84bf7258a59bc31ba878fe7163818f9.jpg)
21
+ Figure 2: Visual illustration of how our method leads to both linearly separable and clusterable representations. While semantically unrelated samples are pushed apart with the cluster-wise contrastive loss, the invariant mapping can be maintained by our instance-wise bootstrapping loss.
22
+
23
+ In this work, we propose a self-supervised training framework that makes the learned representations not only linearly separable but also properly clustered, as illustrated in Fig. 2. To mitigate the uniformly distributed constraint while preserving the invariant mapping, we replace the instance discrimination with an instance alignment problem, pulling the augmented views from the same instance without pushing away the views from the different images. However, learning the invariant mapping without discrimination can easily fall into a trivial solution that maps all the individual instances to a single point. To alleviate this shortcoming, we adopt a bootstrapping strategy from Grill et al. (2020), utilizing the Siamese network, and a momentum update strategy (He et al., 2020).
24
+
25
+ In parallel, to properly cluster the semantically related instances, we are motivated to design additional cluster branch. This branch aims to group the relevant representations by softly assigning the instances to each cluster. Since each of cluster assignments needs to be discriminative, we employ the contrastive loss to the assigned probability distribution over the clusters with a simple entropy-based regularization. In the meantime, we constructed the cluster branch in multi-scale clustering starategy where each head deals with a different number of clusters (Lin et al., 2017). Since there exists a various granularity of semantic information in images, it helps the model to effectively capture the diverse level of semantics as analyzed in Section 4.5.
26
+
27
+ In summary, our contributions are threefold, as follows:
28
+
29
+ • We propose a novel self-supervised framework which contrasts the clusters while bootstrapping the instances that can attain both linearly separable and clusterable representations. We present a novel cluster branch with multi-scale strategy which effectively captures the different levels of semantics in images. Our method empirically achieves state-of-the-art results in CIFAR-10, CIFAR-100, and STL-10 on representation learning benchmarks, for both classification and clustering tasks.
30
+
31
+ # 2 RELATED WORK
32
+
33
+ Our work is closely related to unsupervised visual representation learning and unsupervised image clustering literature. Although both have a slightly different viewpoints of the problem, they are essentially similar in terms of its goal to find good representations in unlabelled datasets.
34
+
35
+ Instance-level discrimination utilizes an image index as supervision because it is an unique signal in the unsupervised environment. NPID (Wu et al., 2018) firstly attempts to convert the classwise classification into the extreme of instance-wise discrimination by using external memory banks. MoCo (He et al., 2020) replaces the memory bank by introducing a momentum encoder that memorizes knowledge learned from the previous mini-batch. SimCLR (Chen et al., 2020a) presents that it is crucial for representation quality to combine data augmentations using a pretext head after the encoder. Although recent studies show promising results on benchmark datasets, the instancewise contrastive learning approach has a critical limitation that it pushes away representations from different images even if the images have similar semantics, e.g., belonging to the same class.
36
+
37
+ Cluster-level bootstrapping is an alternative paradigm that enhancing the initial bias of the networks can be useful in obtaining a discriminative power in visual representations, since convolutional neural networks work well on capturing the local patterns (Caron et al., 2018). In the case of using pseudo-labels, K-means (Caron et al., 2018) or optimal transport (Asano et al., 2019; Caron et al., 2020) are commonly adopted for clustering. On the other hand, soft clustering methods have also been actively studied to allow flexible cluster boundaries (Ji et al., 2019; Huang et al., 2020). Recently, a 2-stage training paradigm has been proposed to construct the cluster structure initialized from the representations learned by instance discrimination (Gansbeke et al., 2020).
38
+
39
+ # 3 METHOD
40
+
41
+ Our work is motivated by an observation from SupCLR (Khosla et al., 2020), which additionally pulls the representations together from different instances by using groundtruth labels. However, directly applying this idea in an unsupervised environment with pseudo-labels is challenging, because small false-positive errors at the initial step can be gradually spread out, degrading the quality of final representations.
42
+
43
+ Instead, the main idea of our approach avoid pushing away those instances close enough to each other. To validate this idea, we conducted a toy experiment that a pulling force is only corresponding to two augmented views of the same image while not pushing the images within the same class by using the groundtruth label. We found that its classification accuracy increases over $5 \%$ on STL-10 datasets compared to that of SimCLR (Chen et al., 2020a). Inspired by this experiment, we design our model (i) not to push away relevant instances with our instance-alignment loss (Section 3.2) while (ii) discriminating the representations in a cluster-wise manner. (Section 3.3-3.4).
44
+
45
+ ![](images/b443be7c163c931fecd9af8d647ae1e21bff996d13173b509de15e846a737283.jpg)
46
+ Figure 3: Overall architecture of our proposed C2BIN.
47
+
48
+ # 3.1 PRELIMINARIES
49
+
50
+ As shown in Fig. 3, we adopt stochastic data augmentation algorithms (Chen et al., 2020a; He et al., 2020; Chen et al., 2020b; Caron et al., 2020) to generate two different augmented views $\boldsymbol { x } _ { i } ^ { \prime }$ and $x _ { i } ^ { \prime \prime }$ of the same image $x _ { i } \sim \mathcal { X } = \{ x _ { 1 } , x _ { 2 } , . . . , x _ { N } \}$ where $N$ is the number of unlabelled images. Inspired by Luo et al. (2018); Grill et al. (2020), C2BIN consists of an instance predictor $P ^ { a } ( \cdot )$ , cluster predictors $P ^ { c , k } ( \cdot )$ , and two Siamese networks called the runner $E _ { \theta } ( \cdot )$ and the follower $E _ { \phi } ( \cdot )$ , respectively. The runner $E _ { \theta }$ is rapidly updated to find the optimal parameters $\theta ^ { * }$ over the search spaces, while the follower $E _ { \phi }$ generates the target representations for the $E _ { \theta }$ . The $E _ { \theta }$ is composed of the two neural functions: encoder $F _ { \theta } ( \cdot )$ and instance projector $G _ { \theta } ^ { a } ( \cdot )$ , and vice versa for the follower
51
+
52
+ $E _ { \phi }$ . To bootstrap the instance-level alignment, $E _ { \theta } , E _ { \phi }$ , and $P ^ { a }$ are used. Afterwards, $F _ { \theta }$ and $P ^ { c , k }$ are utilized to contrast the cluster-wise features.
53
+
54
+ # 3.2 BOOTSTRAPPING LOSS OF INSTANCE REPRESENTATIONS
55
+
56
+ Given an image $x \sim \mathcal { X }$ , we can obtain two augmented views $x ^ { \prime } = t ^ { \prime } ( x )$ and $x ^ { \prime \prime } = t ^ { \prime \prime } ( x )$ where $t ^ { \prime }$ and $t ^ { \prime \prime }$ are sampled from a set of stochastic data augmentations $\tau$ as mentioned above. Even though augmented views are distorted, they should contain similar semantics, and the learned representations should be closely aligned in the latent space. For training, we forward $x ^ { \prime \prime }$ through the follower $E _ { \phi }$ to obtain target representations at an instance level; the runner $E _ { \theta }$ aims to make the embedding vector of $x ^ { \prime }$ closer to them. That is, we first extract image representations $r = F _ { \theta } ( x ^ { \prime } ) \in \mathbb { R } ^ { d _ { r } }$ where $d _ { r }$ is the number of dimensions of our representations. Afterwards, we introduce a pretext-specific instance-wise projector $G _ { \theta } ^ { a } ( \cdot )$ and then obtain pretext embedding vectors $z _ { a } = G _ { \theta } ^ { a } ( \dot { \bar { r } } ) \in \mathbb { R } ^ { 1 \times \mathbf { \hat { d } } _ { a } }$ ; the target pretext vectors ${ \hat { z } } ^ { a }$ can be obtained using the same procedure by $E _ { \phi }$ . Motivated from Grill et al. (2020), we calculate our alignment loss as the cosine distance as
57
+
58
+ $$
59
+ \mathcal { L } _ { a l i g n } = 1 - \frac { P ^ { a } ( z _ { a } ) \cdot \hat { z } _ { a } } { | | P ^ { a } ( z _ { a } ) | | _ { 2 } | | \hat { z } _ { a } | | _ { 2 } } ,
60
+ $$
61
+
62
+ where $P ^ { a } ( z _ { a } ) , \hat { z } _ { a } \in \mathbb { R } ^ { 1 \times d _ { a } }$ and we adopt the number of dimensions of projected features $\cdot$ as in Chen et al. (2020a;c).
63
+
64
+ # 3.3 CONTRASTIVE LOSS OF BATCH-WISE CLUSTER ASSIGNMENTS
65
+
66
+ Our high-level motivation of this branch is that an image feature $\pmb { r }$ can be represented as the combination of cluster features capturing local patterns. However, grouping similar images conflict with the instance-level invariant mapping; therefore, we introduce an additional branch which contains cluster predictor $P ^ { c , k } ( \cdot )$ after the encoder $F _ { \theta } ( \cdot )$ . The cluster predictor $P ^ { c , k }$ is a linear function whose takes $r _ { i }$ as an input and transform it to a $K$ -dimensional output vector. Therefore, $z _ { i } ^ { c } = P ^ { c , k } ( r _ { i } )$ represents a degree of confidence for the $i$ -th image representations $\mathbf { \nabla } _ { \mathbf { r } _ { i } }$ to belong to the $k$ -th cluster feature, i.e.,
67
+
68
+ $$
69
+ \pmb { z } _ { i } ^ { c } = [ z _ { i , 1 } ^ { c } , z _ { i , 2 } ^ { c } , . . . , z _ { i , k } ^ { c } ] \in \mathbb { R } ^ { 1 \times K } ,
70
+ $$
71
+
72
+ where $\boldsymbol { z } _ { i } ^ { c }$ indicate a cluster membership distribution of the given image $x _ { i }$ . Since we sample $n$ items for training, $\pmb { Z } ^ { c } \in \mathbb { R } ^ { \times K }$ is the set of memberships distribution of the given mini-batch. Now we define batch-wise cluster assignment vectors (BCAs) $c _ { k }$ as
73
+
74
+ $$
75
+ \begin{array} { r } { \boldsymbol { c } _ { k } = \boldsymbol { Z } _ { : , k } ^ { c } = \displaystyle { \left[ \begin{array} { l } { \boldsymbol { z } _ { 1 , k } ^ { c } } \\ { \vdots } \\ { \boldsymbol { z } _ { n , k } ^ { c } } \end{array} \right] } \in \mathbb { R } ^ { n \times 1 } , } \end{array}
76
+ $$
77
+
78
+ which indicates how much the $k$ -th cluster is mapped by images in the mini-batch. Although $c _ { k }$ will dynamically change as a new mini-batch is given, the same cluster features between differently augmented views from the same image should be similar while pushing away the others to capture diverse patterns. To this end, we simply utilize the contrastive loss between the BCAs as
79
+
80
+ $$
81
+ \mathcal { L } _ { c l u s t } ^ { b c a } = \frac { 1 } { K } \sum _ { i = 1 } ^ { K } - \log \left( \frac { \exp ( c _ { i } ^ { \prime } \cdot c _ { i } ^ { \prime \prime } / \tau ) } { \sum _ { j = 1 } ^ { K } \mathbb { 1 } _ { [ j \neq i ] } \exp ( c _ { i } ^ { \prime } \cdot c _ { j } ^ { \prime \prime } / \tau ) } \right) ,
82
+ $$
83
+
84
+ where $\tau$ indicates a temperature value. The vectors $c ^ { \prime }$ and $c ^ { \prime \prime }$ are outputs of $P ^ { c , k }$ following the encoder $F _ { \theta }$ by taking $x ^ { \prime }$ and $x ^ { \prime \prime }$ respectively.
85
+
86
+ Unfortunately, most of the clustering-based methods suffers from falling into a degenerate solution where the majority of items are allocated in a few clusters, especially in an unsupervised environment. To mitigate this issue, we first compute the mass of assignment to $k$ -th cluster as $\begin{array} { r } { s _ { k } = \sum _ { i } ^ { N } c _ { k } ( i ) } \end{array}$ where $\boldsymbol { c } _ { k } ( i )$ , indicating each element of $\scriptstyle c _ { k }$ . Afterwards, we encourage $r _ { i }$ to be stochastically activated for diverse cluster features as much as possible by maximizing an entropy of $\pmb { s }$ . To this end, we formulate the cluster loss function as
87
+
88
+ $$
89
+ \mathcal { L } _ { c l u s t } = \mathcal { L } _ { c l u s t } ^ { b c a } - \lambda _ { e n t } H ( s ) ,
90
+ $$
91
+
92
+ where $H$ indicates an entropy function as $\begin{array} { r } { H ( s ) = - \sum _ { i } ^ { K } s _ { i } \log { s _ { i } } } \end{array}$ and $\lambda _ { e n t }$ is the weight value for the regularization term.
93
+
94
+ # 3.4 MULTI-SCALE CLUSTERING STRATEGY
95
+
96
+ The multi-scale clustering strategy has often been used in prior research (Vaswani et al., 2017; Asano et al., 2019), leveraging the ensembling effect. Extending this strategy, we propose a multi-scale clustering strategy for our task. Although contrasting between the BCAs encourages our model to capture various aspects of local patterns, the performance may be sensitive to the number of clusters $k$ . To address this issue, we introduce a set of the cluster branches that have a different number of cluster assignments in each scale. To this end, we reformulate $\mathcal { L } _ { c l u s t }$ as
97
+
98
+ $$
99
+ \mathcal { L } _ { c l u s t } = \sum _ { k } \mathcal { L } _ { c l u s t } ^ { k } , k \in K .
100
+ $$
101
+
102
+ In this work, we use various values of $k$ , e.g., $K = \{ 3 2 , 6 4 , 1 2 8 \}$ .
103
+
104
+ # 3.5 TOTAL OBJECTIVE
105
+
106
+ Finally, our total objective function is written as
107
+
108
+ $$
109
+ \begin{array} { r } { \mathcal { L } _ { t o t a l } = \mathcal { L } _ { a l i g n } + \lambda _ { c l u s t } \mathcal { L } _ { c l u s t } . } \end{array}
110
+ $$
111
+
112
+ The parameters of the follower $E _ { \phi }$ gradually reflect those of the runner via
113
+
114
+ $$
115
+ \phi \gamma \phi + ( 1 - \gamma ) \theta ,
116
+ $$
117
+
118
+ where $\gamma$ indicates a momentum factor.
119
+
120
+ # 4 EXPERIMENTS
121
+
122
+ This section presents the experimental evaluation of C2BIN on the standard benchmark datasets including CIFAR-10, CIFAR-100, STL-10, and ImageNet, which are commonly adopted in both self-supervised representation learning and unsupervised image clustering literature.
123
+
124
+ In Sections 4.1-4.3, we compare C2BIN with several representation learning methods and unsupervised clustering methods to verify that our model can yield both linearly separable and clusterable representations. Afterwards, Section 4.4 studies the robustness of C2BIN in an class-imbalanced setting. Lastly, Section 4.5 presents an ablation study for in-depth analysis of our model behaviour.
125
+
126
+ # 4.1 REPRESENTATION LEARNING TASKS ON UNIFIED SETUP
127
+
128
+ Experimental setup. Because previous studies have their own experimental settings in terms of datasets and backbone architectures, we prepared for a unified experimental setup for the fair comparison , as follows. We first employ the ResNet-18 architecture as the backbone architecture, following Wu et al. (2018). We used 3 standard benchmark datasets; CIFAR-10, CIFAR-100, and STL-10 for this experiment. All baselines are trained by using the identical data augmentation techniques, as used in Chen et al. (2020a;c). Further training details can be found in Appendix A.1.
129
+
130
+ Evaluation metrics. We adopt three standard evaluation metrics: linear evaluation protocol (LP) (Zhang et al., 2017), k-nearest-neighbour (kNN) classifier with $k = 5$ and $k = 2 0 0$ . For the LP, we follow the recipe of Grill et al. (2020), where we report the best evaluation score over five differently initialized learning rates. For kNN, we follow the settings used in Wu et al. (2018) and the implementation of Asano et al. (2019).
131
+
132
+ For our baseline methods, we choose SimCLR, MoCo v2, and BYOL, which can work as the stateof-the-art methods for the instance-wise contrastive learning, momentum-based contrastive learning, and instance-wise bootstrapping, respectively. As seen in Tab. 1, C2BIN consistently outperforms all baselines across all benchmark datasets In the case of CIFAR-100, the kNN accuracy of C2BIN significantly improves compared to the baselines while its LP scores consistently increase as well. We conjecture the reason is becuase C2BIN is appropriate to learn a hierarchical structure in a dataset such as CIFAR-100
133
+
134
+ Table 1: Comparison with unsupervised representation methods. Note on $\dagger$ : for the fair comparison, we did not used the average gradient trick that was utilized in BYOL (Grill et al., 2020).
135
+
136
+ <table><tr><td rowspan="2">Ar.</td><td rowspan="2">Method</td><td colspan="3"> gap+LP / gap+kNN(k=5) / gap+kNN(k=200)</td></tr><tr><td>CIFAR-10</td><td>CIFAR-100</td><td>STL-10</td></tr><tr><td rowspan="8">JP-s1g</td><td>DC (Caron et al.,2018)</td><td>-/ -/67.6</td><td></td><td>1</td></tr><tr><td>NPID (Wu et al., 2018)</td><td>-/-/80.8</td><td>- / - /51.6</td><td>1</td></tr><tr><td>SimCLR (Chen et al., 2020a)</td><td>81.3 /82.4/ 81.7</td><td>59.8 / 63.9/66.8</td><td>83.1 / 78.3 / 78.8</td></tr><tr><td>MoCo (He et al., 2020)</td><td>78.1 / 79.7 /77.7</td><td>50.2/56.7/58.2</td><td>79.4 /74.3 /74.2</td></tr><tr><td>MoCo v2 (Chen et al., 2020c)</td><td>81.6 / 81.4 / 83.9</td><td>61.1 / 62.8 / 63.8</td><td>83.5 / 78.2 / 78.1</td></tr><tr><td>BYOL + (Grill et al., 2020)</td><td>80.8 / 81.4 / 79.7</td><td>57.0 / 63.3 / 61.4</td><td>80.4 / 76.5 / 77.5</td></tr><tr><td>C2BIN [Mean] (Ours)</td><td>81.5 / 84.8 / 84.9</td><td>61.5 /72.2 /72.6</td><td>83.6 / 79.1/ 80.1</td></tr><tr><td>C2BIN [Best] (Ours)</td><td>82.3 / 85.9 / 85.3</td><td>62.1 / 73.9 / 73.8</td><td>84.0 / 79.9 / 80.8</td></tr></table>
137
+
138
+ # 4.2 REPRESENTATION LEARNING TASKS ON LARGE SCALE BENCHMARK
139
+
140
+ Experimental setup. To compare our method with concurrent and state-of-the-art works in a large scale dataset, we evaluate our method in ImageNet with ResNet-50 architecture as a backbone model. For fair comparison, most of the results are taken from the experiments that models are trained for 200 epochs with a batch size of 256. All of the baselines are trained with identical data augmentation techniques introduced in (Chen et al., 2020a). Further training details can be found in Appendix A.2.
141
+
142
+ <table><tr><td>Method</td><td>Epochs</td><td>Batch Size</td><td>Top-1 accuracy</td></tr><tr><td>NPID (Wu et al., 2018)</td><td>200</td><td>256</td><td>56.5</td></tr><tr><td>MoCo (He et al., 2020)</td><td>200</td><td>256</td><td>60.6</td></tr><tr><td>SimCLR (Chen et al., 2020a)</td><td>200</td><td>256</td><td>61.9</td></tr><tr><td>MoCo v2 (Chen et al., 2020c)</td><td>200</td><td>256</td><td>67.5</td></tr><tr><td>BYOL † (Grill et al., 2020)</td><td>200</td><td>256</td><td>64.3</td></tr><tr><td>C2BIN (Ours)</td><td>200</td><td>256</td><td>64.4</td></tr><tr><td>SimCLR (Chen et al., 2020a)</td><td>400</td><td>4096</td><td>68.2</td></tr><tr><td>SwAV (Caron et al., 2020)</td><td>400</td><td>4096</td><td>70.1</td></tr><tr><td>MoCo v2 (Chen et al., 2020c)</td><td>800</td><td>256</td><td>71.1</td></tr></table>
143
+
144
+ Table 2: Linear classifier top-1 accuracy comparison with unsupervised representation methods on ImageNet. Methods are arranged in chronological order. Note on †: BYOL (Grill et al., 2020) does not report the result on ImageNet with the identical experimental setup. Therefore, we adopted the results of BYOL from Zhan et al. (2020), the most widely used open-source library for self-supervised learning, experimented without an average gradient technique for a fair comparison.
145
+
146
+ Though C2BIN has shown competitive performance compared to the baselines, MoCo v2 (Chen et al., 2020c) outperforms C2BIN on the large-scale dataset, which contradicts the findings in Section 4.1. Since C2BIN utilizes batch-wise clustering techniques to learn the cluster structure, it brings instability to the training process when a large number of cluster size is required compared to the batch size. Still, our method slightly outperforms the state-of-the-art instance bootstrapping method, BYOL (Grill et al., 2020). This result implies that simultaneously learning the cluster structure is not counter-effective to enhance the discriminative power of the instance-wise representation learning method.
147
+
148
+ # 4.3 IMAGE CLUSTERING TASKS
149
+
150
+ This section compares our approach to the baselines in the unsupervised image clustering task.
151
+
152
+ Experimental setup. For a fair comparison, we keep most of the implementation details identical to Ji et al. (2019); Huang et al. (2020) except for excluding the use of the Sobel filter. We use the architecture similar to ResNet-34, with the 2-layer MLP for both the instance projector $G _ { \theta } ^ { a } ( \cdot )$ and the predictor $P ^ { a } ( \cdot )$ . For the clustering branch, three cluster heads are used as $K = \{ 1 0 , 4 0 , 1 6 0 \}$ for CIFAR-10 and STL-10, and $K = \{ 2 0 , 4 0 , 1 6 0 \}$ for CIFAR-100. Further training details can be found in Appendix B.1.
153
+
154
+ Evaluation metrics. Three standard clustering performance metrics are used for evaluation: (a) Normalized Mutual Information (NMI) measures the normalized mutual dependence between the predicted labels and the ground-truth labels. (b) Accuracy (ACC) is measured by assigning dominant class labels to each cluster and take the average precision. (c) Adjusted Rand Index (ARI) measures how many samples are assigned properly to different clusters. All the evaluation metrics range between 0 and 1, where the higher score indicates better performance.
155
+
156
+ <table><tr><td rowspan="2">Method</td><td colspan="3">NMI /ACC /ARI</td></tr><tr><td>CIFAR-10</td><td>CIFAR-100</td><td>STL-10</td></tr><tr><td>K-means</td><td>0.09/0.23/0.05</td><td>0.08/0.13/0.03</td><td>0.13/0.19/ 0.06</td></tr><tr><td>DEC (Xie et al., 2016)</td><td>0.26 /0.30 /0.16</td><td>0.14 / 0.19 / 0.05</td><td>0.28 / 0.36 / 0.19</td></tr><tr><td>DCCM (Wu et al., 2019)</td><td>0.50 /0.62 / 0.41</td><td>0.29 /0.33/ 0.17</td><td>0.38 / 0.48 / 0.26</td></tr><tr><td>IIC (Ji et al., 2019)</td><td>- /0.62 / -</td><td>-/0.26/-</td><td>- /0.61/ -</td></tr><tr><td>PICA (Huang et al., 2020)</td><td>0.59 / 0.70 / 0.51</td><td>0.31/ 0.34/0.17</td><td>0.61/0.71/ 0.53</td></tr><tr><td>C2BIN [Mean] (Ours)</td><td>0.62 / 0.72 / 0.53</td><td>0.36/0.35/0.20</td><td>0.62 / 0.73 / 0.55</td></tr><tr><td>C2BIN [Best] (Ours)</td><td>0.63 / 0.73 / 0.55</td><td>0.38 / 0.38 / 0.22</td><td>0.64 / 0.75 / 0.57</td></tr></table>
157
+
158
+ Table 3: Comparison with end-to-end unsupervised representation methods in the clustering benchmark. The results of previous methods are taken from Huang et al. (2020). We append full comparison results in Appendix (Table 11).
159
+
160
+ As shown in Table 3, C2BIN outperforms the state-of-the-art clustering performance in all datasets by a significant margin, showing its capability of grouping the semantically related instances to distinct clusters. Moreover, C2BIN is shown to be robust, given that the averaged performance over five random trials even surpasses the best results from the previous literature.
161
+
162
+ # 4.4 CLASS-IMBALANCED EXPERIMENTS
163
+
164
+ Unlike the standard benchmark datasets we used, it is often the case that the real-world image dataset is severely imbalanced in terms of its underlying class distribution. Therefore, we conducted additional experiments in a class-imbalanced environment, following the experimental design proposed in Cui et al. (2019).
165
+
166
+ ![](images/85450b8d19d0c04a02c3d3724ebeabae11c0330f436e556ecbb47c42dd8415d6.jpg)
167
+ Figure 4: Top-1 accuracy degradation when using the ResNet-18 architecture under a linear evaluation protocol in a class-imbalanced setting.
168
+
169
+ Fig. 4 demonstrates the classification accuracy degradation in an imbalanced setting. The balanced rate indicates the relative ratio of the largest to the smallest classes. We find that the performance of PICA, the clustering-based method, significantly decreases compared to other baselines as the class imbalance gets apparent. In the case of imbalanced CIFAR-100, SimCLR, which contrasts all instances within the mini-batch, is shown to get degraded faster than BYOL, which does not consider the relationship between other instances. On the other hand, the accuracy degradation of C2BIN is shown to be minimal for both CIFAR-10 and CIFAR-100, possibly due to our alignment loss (Section 3.2).
170
+
171
+ # 4.5 DISCUSSIONS
172
+
173
+ #
174
+
175
+ ![](images/3fc4885b073d08e4b139035906983734de0bdc88a6149c2bc3a4011b5d35943f.jpg)
176
+ Figure 5: t-SNE 2-D embedding visualization of C2BIN and SimCLR.
177
+
178
+ For the test data items in STL-10 dataset, we embed their high-dimensional representations obtained by our method and SimCLR in a 2-D space using t-SNE(van der Maaten & Hinton (2008)). As shown in Fig. 5, the representations learned from our model show a clearer cluster structure than SimCLR(Chen et al. (2020a)), as training proceeds.
179
+
180
+ ![](images/45958b795c49a732446839e40cd668b741a9ab318287c720437dda82eb5d0b46.jpg)
181
+ Figure 6: Qualitative comparisons of the top-k retrieved images by C2BIN (Columns 2-6), SimCLR (Columns 7-11), and PICA (Columns 12-17) given a query image (Column 1) from the STL-10 test set where the $k$ is set as $\{ 1 , 2 , 1 0 , 5 0 , 1 0 0 \}$ .
182
+
183
+ To understand the characteristics of both instance-wise alignment and cluster-wise discrimination in a straightforward manner, we conduct the image retrieval experiment. As shown in Fig. 6, our method outperforms two proposed baselines from both perspectives. Since SimCLR only focuses on instance-wise discrimination, it fails to retrieve with a larger value of $k$ with a given query image (e.g., airplane). Likewise, PICA lacks the alignment capability in an instance-wise manner, resulting in poor performance with a lower value of $k$ in contrast to C2BIN. This is also corroborated by the quantitative results in Appendix (Fig. 8).
184
+
185
+ Ablation study. To further verify whether our loss terms are complementary to each other, we perform an ablation study on STL-10 dataset. As we can observe in Table 4(b) and 4(c), a simple integration of the clustering method into the instance-wise bootstrapping (Table 4(a)) can degrade the representation quality unless an appropriate level of granularity is provided. Similar to the results from Asano et al. (2019), using a simple multi-scale clustering branch with a specific number of
186
+
187
+ clusters (Table 4(d) and (e)) is a more effective strategy than a single-head method. Furthermore, our proposed multi-scale clustering strategy (Table 4(f)) peaks out the best performance since it allows the model to capture the diverse semantic information at a different level. This result justifies our motivation to utilize a clustering strategy in a multi-scale manner.
188
+ Table 4: Performance improvements due to each of our components. $m _ { 1 }$ , $m _ { 2 }$ , and $m _ { 3 }$ indicate the linear evaluation protocol (LP), $\mathrm { k N N } ( \mathrm { k } { = } 5 )$ , and $\mathrm { k N N } ( \mathrm { k } { = } 2 0 0 )$ , respectively. $K$ denotes a set of cluster sizes: $k _ { 1 } = \{ 3 2 \}$ , $k _ { 2 } = \{ 1 2 8 \}$ , $k _ { 3 } = \{ 3 2 , 3 2 , 3 2 \}$ , $k _ { 4 } = \{ 1 2 8 , 1 2 8 , 1 2 8 \}$ , and $k _ { 5 } = \{ 3 2 , 6 4 , 1 2 8 \}$ .
189
+
190
+ <table><tr><td rowspan="2"></td><td rowspan="2">Lalign Eq.(1)</td><td colspan="4">Lclust</td><td rowspan="2">m1</td><td rowspan="2">m2</td><td rowspan="2">m3</td></tr><tr><td>Eq.(5)</td><td>Eq.(6)</td><td>multi-scale</td><td>K</td></tr><tr><td>(a)</td><td>√</td><td></td><td></td><td></td><td>1</td><td>80.4</td><td>76.5</td><td>77.5</td></tr><tr><td>(b)</td><td></td><td></td><td></td><td></td><td>k1</td><td>78.4 (-1.6)</td><td>73.5 (-3.0)</td><td>73.9 (-3.6)</td></tr><tr><td>(C)</td><td>V</td><td>V</td><td></td><td></td><td>k2</td><td>81.3 (+0.9)</td><td>76.3 (-0.2)</td><td>77.0 (-0.5)</td></tr><tr><td>(d)</td><td>√</td><td></td><td>√</td><td></td><td>k3</td><td>79.3 (-0.9)</td><td>74.4 (-2.1)</td><td>75.5 (-2.0)</td></tr><tr><td>(e)</td><td>√</td><td></td><td>√</td><td></td><td>k4</td><td>82.2 (+1.8)</td><td>76.3 (-0.2)</td><td>76.4 (-1.1)</td></tr><tr><td>(f)</td><td>√</td><td></td><td>√</td><td>√</td><td>K5</td><td>84.0 (+3.6)</td><td>79.9 (+3.4)</td><td>80.8 (+3.3)</td></tr></table>
191
+
192
+ Visual analysis on multi-scale clustering strategy. We also show the visual analysis on the multiscale clustering strategy. Each scale represents the different semantic information as shown in Appendix (Figs. 9, 10, and 11). Combining this semantic difference in each scale prevents our model from binding to a specific number of cluster assignments.
193
+
194
+ # 5 CONCLUSIONS
195
+
196
+ In this paper, we proposed a novel approach to improve the existing representation learning with unsupervised image clustering. By integrating the advantages of both literature, we present an advanced self-supervised framework that simultaneously learns cluster features as well as image representations by contrasting clusters while bootstrapping instances. Moreover, in order to capture diverse semantic information, we suggest a multi-scale clustering strategy. We also conduct ablation studies to validate complementary effects of our proposed loss functions.
197
+
198
+ # REFERENCES
199
+
200
+ YM Asano, C Rupprecht, and A Vedaldi. Self-labelling via simultaneous clustering and representation learning. In International Conference on Learning Representations, 2019.
201
+
202
+ Hyojin Bahng, Sanghyuk Chun, Sangdoo Yun, Jaegul Choo, and Seong Joon Oh. Learning de-biased representations with biased representations. arXiv preprint arXiv:1910.02806, 2019.
203
+
204
+ Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise training of deep networks. In Advances in neural information processing systems, pp. 153–160, 2007.
205
+
206
+ Deng Cai, Xiaofei He, Xuanhui Wang, Hujun Bao, and Jiawei Han. Locality preserving nonnegative matrix factorization. In IJCAI, volume 9, pp. 1010–1015, 2009.
207
+
208
+ Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 132–149, 2018.
209
+
210
+ Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. 2020.
211
+
212
+ Jianlong Chang, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep adaptive image clustering. In Proceedings of the IEEE international conference on computer vision, pp. 5879–5887, 2017.
213
+
214
+ Jianlong Chang, Yiwen Guo, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep discriminative clustering analysis. Proceedings of the IEEE international conference on computer vision, 2019.
215
+
216
+ Ting Chen and Lala Li. Intriguing properties of contrastive losses. arXiv preprint arXiv:2011.02803, 2020.
217
+
218
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a.
219
+
220
+ Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020b.
221
+
222
+ Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020c.
223
+
224
+ Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9268–9277, 2019.
225
+
226
+ Wouter Gansbeke, Simon Vandenhende, Stamatios Georgoulis, Marc Proesmans, and Luc Van Gool. Scan: Learning to classify images without labels. In Proceedings of the European Conference on Computer Vision, 2020.
227
+
228
+ K Chidananda Gowda and G Krishna. Agglomerative clustering using the concept of mutual nearest neighbourhood. Pattern recognition, 10(2):105–112, 1978.
229
+
230
+ Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
231
+
232
+ Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006.
233
+
234
+ Philip Haeusser, Johannes Plapp, Vladimir Golkov, Elie Aljalbout, and Daniel Cremers. Associative deep clustering: Training a classification network with no labels. In German Conference on Pattern Recognition, pp. 18–32. Springer, 2018.
235
+
236
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9729–9738, 2020.
237
+
238
+ Jiabo Huang, Shaogang Gong, and Xiatian Zhu. Deep semantic clustering by partition confidence maximisation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8849–8858, 2020.
239
+
240
+ Xu Ji, João F Henriques, and Andrea Vedaldi. Invariant information clustering for unsupervised image classification and segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 9865–9874, 2019.
241
+
242
+ Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. arXiv preprint arXiv:2004.11362, 2020.
243
+
244
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
245
+
246
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
247
+
248
+ Kimin Lee, Sukmin Yun, Kibok Lee, Honglak Lee, Bo Li, and Jinwoo Shin. Robust inference via generative classifiers for handling noisy labels. In International Conference on Machine Learning, pp. 3763–3772, 2019.
249
+
250
+ Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2117–2125, 2017.
251
+
252
+ Yucen Luo, Jun Zhu, Mengxi Li, Yong Ren, and Bo Zhang. Smooth neighbors on teacher graphs for semi-supervised learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8896–8905, 2018.
253
+
254
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. International Conference on Learning Representations, 2016.
255
+
256
+ Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9:2579–2605, 11 2008.
257
+
258
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
259
+
260
+ Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, Pierre-Antoine Manzagol, and Léon Bottou. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of machine learning research, 11(12), 2010.
261
+
262
+ Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. arXiv preprint arXiv:2005.10242, 2020.
263
+
264
+ Jianlong Wu, Keyu Long, Fei Wang, Chen Qian, Cheng Li, Zhouchen Lin, and Hongbin Zha. Deep comprehensive correlation mining for image clustering. In Proceedings of the IEEE International Conference on Computer Vision, pp. 8150–8159, 2019.
265
+
266
+ Weili Wu, Hui Xiong, and Shashi Shekhar. Clustering and information retrieval, volume 11. Springer Science & Business Media, 2013.
267
+
268
+ Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018.
269
+
270
+ Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In International conference on machine learning, pp. 478–487, 2016.
271
+
272
+ Jianwei Yang, Devi Parikh, and Dhruv Batra. Joint unsupervised learning of deep representations and image clusters. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5147–5156, 2016.
273
+
274
+ Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017.
275
+
276
+ Matthew D Zeiler, Dilip Krishnan, Graham W Taylor, and Rob Fergus. Deconvolutional networks. In 2010 IEEE Computer Society Conference on computer vision and pattern recognition, pp. 2528–2535. IEEE, 2010.
277
+
278
+ Zelnik-Manor, Lihi, and Pietro Perona. Self-tuning spectral clustering. In Advances in neural information processing systems, pp. 1601–1608, 2005.
279
+
280
+ Xiaohang Zhan, Jiahao Xie, Ziwei Liu, Yew-Soon Ong, and Chen Change Loy. Online deep clustering for unsupervised representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6688–6697, 2020.
281
+
282
+ Richard Zhang, Phillip Isola, and Alexei A Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1058–1067, 2017.
283
+
284
+ # A REPRESENTATION LEARNING EXPERIMENTS
285
+
286
+ A.1 IMPLEMENTATION DETAILS FOR UNIFIED SETTING
287
+
288
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>500</td></tr><tr><td>Optimizer</td><td>LARS (You et al., 2017)</td></tr><tr><td>Learning rate</td><td>Constant(0.2)</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Cluster weight (Lclust)</td><td>2.0</td></tr><tr><td>Entropy weight (Lentropy)</td><td>1.0</td></tr><tr><td>Architecture</td><td>ResNet-18</td></tr><tr><td>Representation dim</td><td>512</td></tr><tr><td> Instance projector Gg</td><td>MLP(512, 512) ReLU</td></tr><tr><td> Instance predictor Pg</td><td>MLP(512, 512) ReLU</td></tr><tr><td>Momentum factor ()</td><td>0.990</td></tr><tr><td>Temperature (T)</td><td>0.5</td></tr><tr><td>Cluster head (Ki)</td><td>32 (CIFAR-10, CIFAR-100, STL-10)</td></tr><tr><td>Cluster head (K2)</td><td>64</td></tr><tr><td>Cluster head (K3)</td><td>128</td></tr></table>
289
+
290
+ Table 5: Hyperparameters of backbone models used in the experiment of Section 4.1
291
+ Table 6: Hyperparameters of the linear evaluation protocol used in the experiment of Section 4.1
292
+
293
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>300</td></tr><tr><td>Optimizer</td><td>LARS (You et al., 2017)</td></tr><tr><td>Learning rate</td><td>Constant({0.1, 0.2, 0.3, 0.4, 0.5})</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Architecture</td><td>linear without batch-norm layer</td></tr></table>
294
+
295
+ # A.2 IMPLEMENTATION DETAILS FOR THE LARGE-SCALE SETTING
296
+
297
+ Table 7: Hyperparameters of backbone models used in the experiment of Section 4.2
298
+
299
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>200</td></tr><tr><td>Optimizer</td><td>SGD</td></tr><tr><td>Learning rate</td><td>0.03</td></tr><tr><td>Learning rate schedule</td><td>multiplying 0.1 at 120,160 epoch.</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Cluster weight (Lclust)</td><td>1.0</td></tr><tr><td>Entropy weight (Lentropy)</td><td>0.05</td></tr><tr><td>Architecture</td><td>ResNet-50</td></tr><tr><td>Representation dim</td><td>2048</td></tr><tr><td> Instance projector Gg</td><td>MLP(2048,4096) ReLU</td></tr><tr><td> Instance predictor Pg</td><td>MLP(2048,4096) ReLU</td></tr><tr><td>Momentum factor ()</td><td>0.990</td></tr><tr><td>Temperature (T)</td><td>0.2</td></tr><tr><td>Cluster head (Ki)</td><td>512</td></tr><tr><td>Cluster head (K2)</td><td>1024</td></tr><tr><td>Cluster head (K3)</td><td>2048</td></tr></table>
300
+
301
+ Table 8: Hyperparameters of the linear evaluation protocol used in the experiment of Section 4.2
302
+
303
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>200</td></tr><tr><td>Optimizer</td><td>SGD</td></tr><tr><td>Learning rate</td><td>30.0</td></tr><tr><td>Learning rate schedule</td><td>multiplying O.1 at at 6O and 80 epoch</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Architecture</td><td>linear without batch-norm layer</td></tr></table>
304
+
305
+ # A.3 IMPACT STUDY FOR CHOICE OF $\cdot$
306
+
307
+ Although the effectiveness of the multi-scale clustering technique is briefly described in Section 4.5, this section studies performance changes according to the choice of the set $\cdot$ .
308
+
309
+ Table 9: An impact study about the choice of $K$ on the STL-10 dataset. LP indicates an linear evaluation protocol described in Section 4.1.
310
+
311
+ <table><tr><td rowspan="2">Lalign Eq. (1)</td><td rowspan="2"></td><td colspan="3">Lclust</td><td rowspan="2">LP (%)</td></tr><tr><td>Eq.(5)</td><td>Eq.(6) multi-scale</td><td>K</td></tr><tr><td>(a)</td><td>√</td><td></td><td>√</td><td>{32,64,128}</td><td>84.0</td></tr><tr><td>(b)</td><td>√</td><td>√</td><td></td><td>8</td><td>75.28 (-8.72)</td></tr><tr><td>(c)</td><td>√</td><td>1</td><td></td><td>{16}</td><td>79.06 (-4.94)</td></tr><tr><td>(d)</td><td>√</td><td>√</td><td></td><td>{512}</td><td>80.01 (-3.9)</td></tr><tr><td>(e)</td><td>√</td><td></td><td></td><td>{8,8,8}</td><td>76.08 (-7.92)</td></tr><tr><td>(f)</td><td>√</td><td></td><td></td><td>{16,16,16}</td><td>80.08 (-3.92)</td></tr><tr><td>(g)</td><td>√</td><td></td><td></td><td>{512,512,512}</td><td>80.50 (-3.5)</td></tr><tr><td>(h)</td><td>√</td><td></td><td></td><td>{8,16,32}</td><td>83.50 (-0.5)</td></tr><tr><td>i</td><td>√</td><td></td><td>:</td><td>{16,32,64}</td><td>83.91 (-0.09)</td></tr></table>
312
+
313
+ Table 9 shows how C2BIN’s performance is damaged for the linear evaluation protocol (LP) on the STL-10 dataset when the combination of $K$ is changed. In Table 9, (a) is the best score reported in the main paper and can be used as a pivot for comparison. For the rest of them, similar to Section 4.5, we divide experiments into three groups. First, (b)-(d) are matched with the case of attaching single and arbitrary selected cluster size. Unfortunately, this case does not help to improve performances and even dramatically degenerates the representation quality. We guess that attaching a single cluster head after the backbone network makes its representation quality sensitive according to the head size. The second group, (e)-(g), corresponds with the case of multiple but single-scale cluster heads. Although it seems a slight improvement compared to the above-mentioned case, it is difficult to be sufficiently complementary in our setting. We think the effect of the multi-branch clustering seems small because each cluster head can capture similar patterns with others. Lastly, (h)-(i) is mapped to the case of our multiple and multi-scale clustering strategy, showing robust performance in regard to the combination of $\cdot$ if each element of $K$ is assigned in different scales. We guess that the effect of the multi-task learning is maximized because an identical representation vector should be informative enough to satisfy the following clusters, which are from abstracted to detailed.
314
+
315
+ # B UNSUPERVISED CLUSTERING EXPERIMENTS
316
+
317
+ B.1 IMPLEMENTATION DETAILS
318
+ Table 10: Hyperparameters used in unsupervised clustering experiments of Section 4.3
319
+
320
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>300</td></tr><tr><td>Optimizer</td><td>Adam (Kingma &amp; Ba,2015)</td></tr><tr><td>Learning rate</td><td>Cosine annealing (3e-4, 0)</td></tr><tr><td>Weight decay</td><td>No weight decay</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Cluster weight (Lclust)</td><td>1.0</td></tr><tr><td>Entropy weight (Lentropy)</td><td>1.0</td></tr><tr><td>Architecture</td><td>ResNet-34</td></tr><tr><td>Representation dim</td><td>512</td></tr><tr><td> Instance projector G</td><td>MLP(512, 512) ReLU</td></tr><tr><td> Instance predictor Pg</td><td>MLP(512,512) ReLU</td></tr><tr><td>Momentum factor ()</td><td>0.995</td></tr><tr><td>Temperature (T)</td><td>1.0</td></tr><tr><td>Cluster head (K1)</td><td>10 (CIFAR-10, STL-10),20 (CIFAR-100)</td></tr><tr><td>Cluster head (K2)</td><td>40</td></tr><tr><td>Cluster head (K3)</td><td>160</td></tr></table>
321
+
322
+ # B.2 CLUSTERING QUALITY COMPARISON
323
+
324
+ <table><tr><td rowspan="2">Fwk</td><td rowspan="2">Method</td><td colspan="3">NMI /ACC /ARI</td></tr><tr><td>CIFAR-10</td><td>CIFAR-100</td><td>STL-10</td></tr><tr><td rowspan="20">Ppg-en-pug</td><td>K-means</td><td>0.09/0.23/0.05</td><td>0.08/0.13/0.03</td><td>0.13/0.19/0.06</td></tr><tr><td>SC (Zelnik-Manor et al., 2005)</td><td>0.10 / 0.25 / 0.09</td><td>0.09 / 0.14 / 0.02</td><td>0.10 /0.16 /0.05</td></tr><tr><td>AC (Gowda &amp; Krishna,1978)</td><td>0.11 / 0.23 / 0.07</td><td>0.10 /0.14/0.03</td><td>0.24 / 0.33 /0.14</td></tr><tr><td>NMF (Cai et al., 2009)</td><td>0.08/0.19 /0.03</td><td>0.08/0.12/0.03</td><td>0.10 / 0.18 /0.05</td></tr><tr><td>AE (Bengio et al., 2007)</td><td>0.24 /0.31/0.17</td><td>0.10 / 0.17 / 0.05</td><td>0.25 / 0.30 / 0.16</td></tr><tr><td>DAE (Vincent et al., 2010)</td><td>0.25/0.30 /0.16</td><td>0.11/0.15 /0.05</td><td>0.22/0.30 /0.15</td></tr><tr><td>DCGAN (Radford et al., 2016)</td><td>0.27 / 0.32 / 0.18</td><td>0.12/0.15/0.05</td><td>0.21/0.30 /0.14</td></tr><tr><td>DeCNN (Zeiler et al., 2010)</td><td>0.24 / 0.28 / 0.17</td><td>0.09 /0.13 /0.04</td><td>0.23 / 0.30 / 0.16</td></tr><tr><td>VAE (Kingma &amp; Welling,2013)</td><td>0.25 / 0.29 / 0.17</td><td>0.11 /0.15 / 0.04</td><td>0.20 /0.28 / 0.15</td></tr><tr><td>JULE (Yang et al., 2016)</td><td>0.19 / 0.27 /0.14</td><td>0.10 / 0.14 / 0.03</td><td>0.18 /0.28 /0.16</td></tr><tr><td>DEC (Xie et al.,2016)</td><td>0.26 /0.30 /0.16</td><td>0.14 / 0.19 /0.05</td><td>0.28 / 0.36 / 0.19</td></tr><tr><td>DAC (Chang et al., 2017)</td><td>0.40 /0.52 /0.30</td><td>0.19 /0.24/0.09</td><td>0.37 /0.47 /0.26</td></tr><tr><td>ADC (Haeusser et al., 2018)</td><td>- /0.33 / -</td><td>-/0.16/-</td><td>- /0.53 / -</td></tr><tr><td>DDC(Chang et al., 2019)</td><td>0.42 / 0.52 / 0.33</td><td>-/-/-</td><td>0.37 / 0.49 / 0.27</td></tr><tr><td>DCCM (Wu et al., 2019)</td><td>0.50 / 0.62 / 0.41</td><td>0.29 / 0.33 / 0.17</td><td>0.38 /0.48 / 0.26</td></tr><tr><td>IIC (Ji et al., 2019)</td><td>-/0.62 / -</td><td>-/0.26/ -</td><td>-/0.61/ -</td></tr><tr><td>PICA [Avg] (Huang et al., 2020)</td><td>0.56 /0.65 /0.47</td><td>0.30 / 0.32/ 0.16</td><td>0.59 / 0.69 / 0.50</td></tr><tr><td>PICA [Best] (Huang et al., 2020)</td><td>0.59 / 0.70 / 0.51</td><td>0.31/0.34/0.17</td><td>0.61 / 0.71/ 0.53</td></tr><tr><td>C2BIN [Avg] (Ours)</td><td>0.62/ 0.72/ 0.53</td><td>0.36/0.35 /0.20</td><td></td></tr><tr><td>C2BIN [Best] (Ours)</td><td></td><td>0.63 / 0.73 / 0.55</td><td>0.38 / 0.38 /0.22</td><td>0.62 /0.73 /0.55 0.64 / 0.75 / 0.57</td></tr><tr><td>2-step</td><td>SCAN (Gansbeke et al.,2020)</td><td>0.80 /0.88 /0.77</td><td>0.49/0.51/ 0.33</td><td>0.70 /0.81/0.65</td></tr></table>
325
+
326
+ Table 11: Full comparison with unsupervised representation models for clustering benchmark datasets. The results of previous methods are taken from Ji et al. (2019); Huang et al. (2020); Gansbeke et al. (2020).
327
+
328
+ ![](images/62b391a82242366d1e596384f00cd6d3fc5dd1c11dea8720e918413993bba38b.jpg)
329
+ Figure 7: Top- $\mathbf { \nabla } \cdot \mathbf { k }$ retrieved images by C2BIN (Columns 2-6), SimCLR (Columns 7-11), and PICA (Columns 12-17) given the query image (Column 1) from the STL-10 test set where $k$ is set as $\{ 1 , 2 , 1 0 , 5 0 , 1 0 0 \}$ .
330
+
331
+ ![](images/cbb6469ac391f97ff893f5fd69d87dc16f6a287ccd957cf7a8e7284614133755.jpg)
332
+ Figure 8: Image retrieval performance on STL-10 datasets.
333
+
334
+ ![](images/0e5478cefa9e16083db2462ed3ae509ed41faefe937c8fa0785b40775861737c.jpg)
335
+ Figure 9: This figure shows a random samples of STL-10 test set images associated to the selected clusters from $k = 1 0$ cluster-branch. This visualization uses the experiment settings from unsupervised clustering experiment in Section 4.3. The border color enclosing each image indicates its ground-truth class.
336
+
337
+ ![](images/893e3d28782e33599777fc55caa39373fa14f61423c492c37327b679e96683d0.jpg)
338
+ Figure 10: This figure shows a random samples of STL-10 test set images associated to the selected clusters from $k = 4 0$ cluster-branch. This visualization uses the experiment settings identical to Figure 9.The border color enclosing each image indicates its ground-truth class.
339
+
340
+ ![](images/d3995a1334225703584bca071fa4185b44bcdd3efd25c17b710504a42a17dd9d.jpg)
341
+ Figure 11: This figure shows a random samples of STL-10 test set images associated to the selected clusters from $k = 1 6 0$ cluster-branch. This visualization uses the experiment settings identical to Figure 9. The border color enclosing each image indicates its ground-truth class.
parse/train/MRQJmsNPp8E/MRQJmsNPp8E_content_list.json ADDED
@@ -0,0 +1,1801 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING REPRESENTATIONS BY CONTRASTING CLUSTERS WHILE BOOTSTRAPPING INSTANCES ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
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": "Learning visual representations using large-scale unlabelled images is a holy grail for most of computer vision tasks. Recent contrastive learning methods have focused on encouraging the learned visual representations to be linearly separable among the individual items regardless of their semantic similarity; however, it could lead to a sub-optimal solution if a given downstream task is related to non-discriminative ones such as cluster analysis and information retrieval. In this work, we propose an advanced approach to consider the instance semantics in an unsupervised environment by both i) Contrasting batch-wise Cluster assignment features and ii) Bootstrapping an INstance representations without considering negatives simultaneously, referred to as C2BIN. Specifically, instances in a mini-batch are appropriately assigned to distinct clusters, each of which aims to capture apparent similarity among instances. Moreover, we introduce a multi-scale clustering technique, showing positive effects on the representations by capturing multi-scale semantics. Empirically, our method achieves comparable or better performance than both representation learning and clustering baselines on various benchmark datasets: CIFAR-10, CIFAR-100, and STL-10. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 766,
44
+ 488
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 530,
55
+ 334,
56
+ 546
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Learning to extract generalized representations from a high-dimensional image is essential in solving various down-stream tasks in computer vision. Though a supervised learning framework has shown to be useful in learning discriminative representations for pre-training the model, expensive labeling cost makes it practically infeasible in a large-scale dataset. Moreover, relying on the human-annotated labels tends to cause several issues such as class imbalance (Cui et al., 2019), noisy labels (Lee et al., 2019), and biased datasets (Bahng et al., 2019). To address these issues, self-supervised visual representation learning, which does not require any given labels, has emerged as an alternative training framework, being actively studied to find a proper training objective. ",
63
+ "bbox": [
64
+ 174,
65
+ 561,
66
+ 825,
67
+ 674
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recently, self-supervised approaches with contrastive learning (Wu et al., 2018; Chen et al., 2020a; He et al., 2020) have rapidly narrowed the performance gap with supervised pre-training in various vision tasks. The contrastive method aims to learn invariant mapping (Hadsell et al., 2006) and instance discrimination. Intuitively, two augmented views of the same instance are mapped to the same latent space while different instances are pushed away. However, aforementioned instance discrimination does not consider the semantic similarities of the representations (e.g., same class), even pushing away the relevant instances. This affects the learned representations to exhibit uniformly distributed characteristics, proven by the previous works (Wang & Isola, 2020; Chen & Li, 2020). ",
74
+ "bbox": [
75
+ 174,
76
+ 680,
77
+ 609,
78
+ 847
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We point out that this uniformly distributed characteristic over instances can be a fundamental limitation against improving the learned representation quality. For instance, consider the representations illustrated in Fig. 1. It indicates a simple case where linearly separable representations do not always guarantee that they can be properly clustered, which is not appropriate for non-discriminative downstream tasks such as information retrieval, density estimation, and cluster analysis (Wu et al., 2013). In response, we start this work by asking: How can we learn the representations to be properly clustered even without the class labels? ",
85
+ "bbox": [
86
+ 174,
87
+ 854,
88
+ 607,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/fdfe0569da563c00af356cdeadb1424e615461c6d374337c98ee5a080c56bfe9.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Though illustrated 2D representations are linearly separable, irrelevant instances are clustered together. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 635,
102
+ 695,
103
+ 810,
104
+ 821
105
+ ],
106
+ "page_idx": 0
107
+ },
108
+ {
109
+ "type": "image",
110
+ "img_path": "images/2abfa4c48dde0ba577417e3104fdd33df84bf7258a59bc31ba878fe7163818f9.jpg",
111
+ "image_caption": [
112
+ "Figure 2: Visual illustration of how our method leads to both linearly separable and clusterable representations. While semantically unrelated samples are pushed apart with the cluster-wise contrastive loss, the invariant mapping can be maintained by our instance-wise bootstrapping loss. "
113
+ ],
114
+ "image_footnote": [],
115
+ "bbox": [
116
+ 176,
117
+ 103,
118
+ 823,
119
+ 238
120
+ ],
121
+ "page_idx": 1
122
+ },
123
+ {
124
+ "type": "text",
125
+ "text": "",
126
+ "bbox": [
127
+ 174,
128
+ 329,
129
+ 825,
130
+ 385
131
+ ],
132
+ "page_idx": 1
133
+ },
134
+ {
135
+ "type": "text",
136
+ "text": "In this work, we propose a self-supervised training framework that makes the learned representations not only linearly separable but also properly clustered, as illustrated in Fig. 2. To mitigate the uniformly distributed constraint while preserving the invariant mapping, we replace the instance discrimination with an instance alignment problem, pulling the augmented views from the same instance without pushing away the views from the different images. However, learning the invariant mapping without discrimination can easily fall into a trivial solution that maps all the individual instances to a single point. To alleviate this shortcoming, we adopt a bootstrapping strategy from Grill et al. (2020), utilizing the Siamese network, and a momentum update strategy (He et al., 2020). ",
137
+ "bbox": [
138
+ 174,
139
+ 392,
140
+ 825,
141
+ 503
142
+ ],
143
+ "page_idx": 1
144
+ },
145
+ {
146
+ "type": "text",
147
+ "text": "In parallel, to properly cluster the semantically related instances, we are motivated to design additional cluster branch. This branch aims to group the relevant representations by softly assigning the instances to each cluster. Since each of cluster assignments needs to be discriminative, we employ the contrastive loss to the assigned probability distribution over the clusters with a simple entropy-based regularization. In the meantime, we constructed the cluster branch in multi-scale clustering starategy where each head deals with a different number of clusters (Lin et al., 2017). Since there exists a various granularity of semantic information in images, it helps the model to effectively capture the diverse level of semantics as analyzed in Section 4.5. ",
148
+ "bbox": [
149
+ 174,
150
+ 511,
151
+ 825,
152
+ 622
153
+ ],
154
+ "page_idx": 1
155
+ },
156
+ {
157
+ "type": "text",
158
+ "text": "In summary, our contributions are threefold, as follows: ",
159
+ "bbox": [
160
+ 176,
161
+ 628,
162
+ 535,
163
+ 643
164
+ ],
165
+ "page_idx": 1
166
+ },
167
+ {
168
+ "type": "text",
169
+ "text": "• We propose a novel self-supervised framework which contrasts the clusters while bootstrapping the instances that can attain both linearly separable and clusterable representations. We present a novel cluster branch with multi-scale strategy which effectively captures the different levels of semantics in images. Our method empirically achieves state-of-the-art results in CIFAR-10, CIFAR-100, and STL-10 on representation learning benchmarks, for both classification and clustering tasks. ",
170
+ "bbox": [
171
+ 215,
172
+ 655,
173
+ 825,
174
+ 752
175
+ ],
176
+ "page_idx": 1
177
+ },
178
+ {
179
+ "type": "text",
180
+ "text": "2 RELATED WORK ",
181
+ "text_level": 1,
182
+ "bbox": [
183
+ 176,
184
+ 772,
185
+ 344,
186
+ 789
187
+ ],
188
+ "page_idx": 1
189
+ },
190
+ {
191
+ "type": "text",
192
+ "text": "Our work is closely related to unsupervised visual representation learning and unsupervised image clustering literature. Although both have a slightly different viewpoints of the problem, they are essentially similar in terms of its goal to find good representations in unlabelled datasets. ",
193
+ "bbox": [
194
+ 176,
195
+ 805,
196
+ 823,
197
+ 847
198
+ ],
199
+ "page_idx": 1
200
+ },
201
+ {
202
+ "type": "text",
203
+ "text": "Instance-level discrimination utilizes an image index as supervision because it is an unique signal in the unsupervised environment. NPID (Wu et al., 2018) firstly attempts to convert the classwise classification into the extreme of instance-wise discrimination by using external memory banks. MoCo (He et al., 2020) replaces the memory bank by introducing a momentum encoder that memorizes knowledge learned from the previous mini-batch. SimCLR (Chen et al., 2020a) presents that it is crucial for representation quality to combine data augmentations using a pretext head after the encoder. Although recent studies show promising results on benchmark datasets, the instancewise contrastive learning approach has a critical limitation that it pushes away representations from different images even if the images have similar semantics, e.g., belonging to the same class. ",
204
+ "bbox": [
205
+ 176,
206
+ 854,
207
+ 825,
208
+ 924
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "",
215
+ "bbox": [
216
+ 174,
217
+ 103,
218
+ 825,
219
+ 160
220
+ ],
221
+ "page_idx": 2
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "Cluster-level bootstrapping is an alternative paradigm that enhancing the initial bias of the networks can be useful in obtaining a discriminative power in visual representations, since convolutional neural networks work well on capturing the local patterns (Caron et al., 2018). In the case of using pseudo-labels, K-means (Caron et al., 2018) or optimal transport (Asano et al., 2019; Caron et al., 2020) are commonly adopted for clustering. On the other hand, soft clustering methods have also been actively studied to allow flexible cluster boundaries (Ji et al., 2019; Huang et al., 2020). Recently, a 2-stage training paradigm has been proposed to construct the cluster structure initialized from the representations learned by instance discrimination (Gansbeke et al., 2020). ",
226
+ "bbox": [
227
+ 173,
228
+ 166,
229
+ 825,
230
+ 279
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "3 METHOD ",
237
+ "text_level": 1,
238
+ "bbox": [
239
+ 174,
240
+ 299,
241
+ 282,
242
+ 315
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "Our work is motivated by an observation from SupCLR (Khosla et al., 2020), which additionally pulls the representations together from different instances by using groundtruth labels. However, directly applying this idea in an unsupervised environment with pseudo-labels is challenging, because small false-positive errors at the initial step can be gradually spread out, degrading the quality of final representations. ",
249
+ "bbox": [
250
+ 174,
251
+ 330,
252
+ 825,
253
+ 401
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "Instead, the main idea of our approach avoid pushing away those instances close enough to each other. To validate this idea, we conducted a toy experiment that a pulling force is only corresponding to two augmented views of the same image while not pushing the images within the same class by using the groundtruth label. We found that its classification accuracy increases over $5 \\%$ on STL-10 datasets compared to that of SimCLR (Chen et al., 2020a). Inspired by this experiment, we design our model (i) not to push away relevant instances with our instance-alignment loss (Section 3.2) while (ii) discriminating the representations in a cluster-wise manner. (Section 3.3-3.4). ",
260
+ "bbox": [
261
+ 174,
262
+ 407,
263
+ 825,
264
+ 506
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "image",
270
+ "img_path": "images/b443be7c163c931fecd9af8d647ae1e21bff996d13173b509de15e846a737283.jpg",
271
+ "image_caption": [
272
+ "Figure 3: Overall architecture of our proposed C2BIN. "
273
+ ],
274
+ "image_footnote": [],
275
+ "bbox": [
276
+ 186,
277
+ 527,
278
+ 813,
279
+ 719
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "3.1 PRELIMINARIES ",
286
+ "text_level": 1,
287
+ "bbox": [
288
+ 174,
289
+ 785,
290
+ 326,
291
+ 800
292
+ ],
293
+ "page_idx": 2
294
+ },
295
+ {
296
+ "type": "text",
297
+ "text": "As shown in Fig. 3, we adopt stochastic data augmentation algorithms (Chen et al., 2020a; He et al., 2020; Chen et al., 2020b; Caron et al., 2020) to generate two different augmented views $\\boldsymbol { x } _ { i } ^ { \\prime }$ and $x _ { i } ^ { \\prime \\prime }$ of the same image $x _ { i } \\sim \\mathcal { X } = \\{ x _ { 1 } , x _ { 2 } , . . . , x _ { N } \\}$ where $N$ is the number of unlabelled images. Inspired by Luo et al. (2018); Grill et al. (2020), C2BIN consists of an instance predictor $P ^ { a } ( \\cdot )$ , cluster predictors $P ^ { c , k } ( \\cdot )$ , and two Siamese networks called the runner $E _ { \\theta } ( \\cdot )$ and the follower $E _ { \\phi } ( \\cdot )$ , respectively. The runner $E _ { \\theta }$ is rapidly updated to find the optimal parameters $\\theta ^ { * }$ over the search spaces, while the follower $E _ { \\phi }$ generates the target representations for the $E _ { \\theta }$ . The $E _ { \\theta }$ is composed of the two neural functions: encoder $F _ { \\theta } ( \\cdot )$ and instance projector $G _ { \\theta } ^ { a } ( \\cdot )$ , and vice versa for the follower ",
298
+ "bbox": [
299
+ 174,
300
+ 811,
301
+ 826,
302
+ 924
303
+ ],
304
+ "page_idx": 2
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "$E _ { \\phi }$ . To bootstrap the instance-level alignment, $E _ { \\theta } , E _ { \\phi }$ , and $P ^ { a }$ are used. Afterwards, $F _ { \\theta }$ and $P ^ { c , k }$ are utilized to contrast the cluster-wise features. ",
309
+ "bbox": [
310
+ 174,
311
+ 103,
312
+ 823,
313
+ 132
314
+ ],
315
+ "page_idx": 3
316
+ },
317
+ {
318
+ "type": "text",
319
+ "text": "3.2 BOOTSTRAPPING LOSS OF INSTANCE REPRESENTATIONS ",
320
+ "text_level": 1,
321
+ "bbox": [
322
+ 174,
323
+ 147,
324
+ 607,
325
+ 162
326
+ ],
327
+ "page_idx": 3
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "Given an image $x \\sim \\mathcal { X }$ , we can obtain two augmented views $x ^ { \\prime } = t ^ { \\prime } ( x )$ and $x ^ { \\prime \\prime } = t ^ { \\prime \\prime } ( x )$ where $t ^ { \\prime }$ and $t ^ { \\prime \\prime }$ are sampled from a set of stochastic data augmentations $\\tau$ as mentioned above. Even though augmented views are distorted, they should contain similar semantics, and the learned representations should be closely aligned in the latent space. For training, we forward $x ^ { \\prime \\prime }$ through the follower $E _ { \\phi }$ to obtain target representations at an instance level; the runner $E _ { \\theta }$ aims to make the embedding vector of $x ^ { \\prime }$ closer to them. That is, we first extract image representations $r = F _ { \\theta } ( x ^ { \\prime } ) \\in \\mathbb { R } ^ { d _ { r } }$ where $d _ { r }$ is the number of dimensions of our representations. Afterwards, we introduce a pretext-specific instance-wise projector $G _ { \\theta } ^ { a } ( \\cdot )$ and then obtain pretext embedding vectors $z _ { a } = G _ { \\theta } ^ { a } ( \\dot { \\bar { r } } ) \\in \\mathbb { R } ^ { 1 \\times \\mathbf { \\hat { d } } _ { a } }$ ; the target pretext vectors ${ \\hat { z } } ^ { a }$ can be obtained using the same procedure by $E _ { \\phi }$ . Motivated from Grill et al. (2020), we calculate our alignment loss as the cosine distance as ",
332
+ "bbox": [
333
+ 173,
334
+ 172,
335
+ 825,
336
+ 313
337
+ ],
338
+ "page_idx": 3
339
+ },
340
+ {
341
+ "type": "equation",
342
+ "img_path": "images/1e53293f0c95a26e2a03523a5d691e813ab8fb6f07931938e9c9b9ba195d6763.jpg",
343
+ "text": "$$\n\\mathcal { L } _ { a l i g n } = 1 - \\frac { P ^ { a } ( z _ { a } ) \\cdot \\hat { z } _ { a } } { | | P ^ { a } ( z _ { a } ) | | _ { 2 } | | \\hat { z } _ { a } | | _ { 2 } } ,\n$$",
344
+ "text_format": "latex",
345
+ "bbox": [
346
+ 387,
347
+ 315,
348
+ 607,
349
+ 351
350
+ ],
351
+ "page_idx": 3
352
+ },
353
+ {
354
+ "type": "text",
355
+ "text": "where $P ^ { a } ( z _ { a } ) , \\hat { z } _ { a } \\in \\mathbb { R } ^ { 1 \\times d _ { a } }$ and we adopt the number of dimensions of projected features $\\cdot$ as in Chen et al. (2020a;c). ",
356
+ "bbox": [
357
+ 173,
358
+ 353,
359
+ 825,
360
+ 382
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "3.3 CONTRASTIVE LOSS OF BATCH-WISE CLUSTER ASSIGNMENTS ",
367
+ "text_level": 1,
368
+ "bbox": [
369
+ 174,
370
+ 397,
371
+ 650,
372
+ 412
373
+ ],
374
+ "page_idx": 3
375
+ },
376
+ {
377
+ "type": "text",
378
+ "text": "Our high-level motivation of this branch is that an image feature $\\pmb { r }$ can be represented as the combination of cluster features capturing local patterns. However, grouping similar images conflict with the instance-level invariant mapping; therefore, we introduce an additional branch which contains cluster predictor $P ^ { c , k } ( \\cdot )$ after the encoder $F _ { \\theta } ( \\cdot )$ . The cluster predictor $P ^ { c , k }$ is a linear function whose takes $r _ { i }$ as an input and transform it to a $K$ -dimensional output vector. Therefore, $z _ { i } ^ { c } = P ^ { c , k } ( r _ { i } )$ represents a degree of confidence for the $i$ -th image representations $\\mathbf { \\nabla } _ { \\mathbf { r } _ { i } }$ to belong to the $k$ -th cluster feature, i.e., ",
379
+ "bbox": [
380
+ 173,
381
+ 422,
382
+ 825,
383
+ 521
384
+ ],
385
+ "page_idx": 3
386
+ },
387
+ {
388
+ "type": "equation",
389
+ "img_path": "images/80da7dd7214a16f84b128960e3ff0b56934d2588143e3ba45c84bda5025947ef.jpg",
390
+ "text": "$$\n\\pmb { z } _ { i } ^ { c } = [ z _ { i , 1 } ^ { c } , z _ { i , 2 } ^ { c } , . . . , z _ { i , k } ^ { c } ] \\in \\mathbb { R } ^ { 1 \\times K } ,\n$$",
391
+ "text_format": "latex",
392
+ "bbox": [
393
+ 387,
394
+ 518,
395
+ 607,
396
+ 537
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "where $\\boldsymbol { z } _ { i } ^ { c }$ indicate a cluster membership distribution of the given image $x _ { i }$ . Since we sample $n$ items for training, $\\pmb { Z } ^ { c } \\in \\mathbb { R } ^ { \\times K }$ is the set of memberships distribution of the given mini-batch. Now we define batch-wise cluster assignment vectors (BCAs) $c _ { k }$ as ",
403
+ "bbox": [
404
+ 176,
405
+ 537,
406
+ 825,
407
+ 580
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "equation",
413
+ "img_path": "images/d9d7392de75296a83d9c34e11365c480b25196670aea150f14d3bc16956b2c12.jpg",
414
+ "text": "$$\n\\begin{array} { r } { \\boldsymbol { c } _ { k } = \\boldsymbol { Z } _ { : , k } ^ { c } = \\displaystyle { \\left[ \\begin{array} { l } { \\boldsymbol { z } _ { 1 , k } ^ { c } } \\\\ { \\vdots } \\\\ { \\boldsymbol { z } _ { n , k } ^ { c } } \\end{array} \\right] } \\in \\mathbb { R } ^ { n \\times 1 } , } \\end{array}\n$$",
415
+ "text_format": "latex",
416
+ "bbox": [
417
+ 398,
418
+ 583,
419
+ 599,
420
+ 642
421
+ ],
422
+ "page_idx": 3
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "which indicates how much the $k$ -th cluster is mapped by images in the mini-batch. Although $c _ { k }$ will dynamically change as a new mini-batch is given, the same cluster features between differently augmented views from the same image should be similar while pushing away the others to capture diverse patterns. To this end, we simply utilize the contrastive loss between the BCAs as ",
427
+ "bbox": [
428
+ 173,
429
+ 642,
430
+ 825,
431
+ 699
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "equation",
437
+ "img_path": "images/62f531eafa974f6e0cabf7ff94cc48a01c2d860e809e822a1e5b67dbada1fe50.jpg",
438
+ "text": "$$\n\\mathcal { L } _ { c l u s t } ^ { b c a } = \\frac { 1 } { K } \\sum _ { i = 1 } ^ { K } - \\log \\left( \\frac { \\exp ( c _ { i } ^ { \\prime } \\cdot c _ { i } ^ { \\prime \\prime } / \\tau ) } { \\sum _ { j = 1 } ^ { K } \\mathbb { 1 } _ { [ j \\neq i ] } \\exp ( c _ { i } ^ { \\prime } \\cdot c _ { j } ^ { \\prime \\prime } / \\tau ) } \\right) ,\n$$",
439
+ "text_format": "latex",
440
+ "bbox": [
441
+ 313,
442
+ 700,
443
+ 684,
444
+ 744
445
+ ],
446
+ "page_idx": 3
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "where $\\tau$ indicates a temperature value. The vectors $c ^ { \\prime }$ and $c ^ { \\prime \\prime }$ are outputs of $P ^ { c , k }$ following the encoder $F _ { \\theta }$ by taking $x ^ { \\prime }$ and $x ^ { \\prime \\prime }$ respectively. ",
451
+ "bbox": [
452
+ 173,
453
+ 748,
454
+ 826,
455
+ 777
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "Unfortunately, most of the clustering-based methods suffers from falling into a degenerate solution where the majority of items are allocated in a few clusters, especially in an unsupervised environment. To mitigate this issue, we first compute the mass of assignment to $k$ -th cluster as $\\begin{array} { r } { s _ { k } = \\sum _ { i } ^ { N } c _ { k } ( i ) } \\end{array}$ where $\\boldsymbol { c } _ { k } ( i )$ , indicating each element of $\\scriptstyle c _ { k }$ . Afterwards, we encourage $r _ { i }$ to be stochastically activated for diverse cluster features as much as possible by maximizing an entropy of $\\pmb { s }$ . To this end, we formulate the cluster loss function as ",
462
+ "bbox": [
463
+ 173,
464
+ 784,
465
+ 825,
466
+ 869
467
+ ],
468
+ "page_idx": 3
469
+ },
470
+ {
471
+ "type": "equation",
472
+ "img_path": "images/82d8eb4e832921d552e971fb9e6b9f413be13247b512fcc226b84bcc59f2cd38.jpg",
473
+ "text": "$$\n\\mathcal { L } _ { c l u s t } = \\mathcal { L } _ { c l u s t } ^ { b c a } - \\lambda _ { e n t } H ( s ) ,\n$$",
474
+ "text_format": "latex",
475
+ "bbox": [
476
+ 400,
477
+ 872,
478
+ 596,
479
+ 890
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "where $H$ indicates an entropy function as $\\begin{array} { r } { H ( s ) = - \\sum _ { i } ^ { K } s _ { i } \\log { s _ { i } } } \\end{array}$ and $\\lambda _ { e n t }$ is the weight value for the regularization term. ",
486
+ "bbox": [
487
+ 174,
488
+ 893,
489
+ 826,
490
+ 924
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "3.4 MULTI-SCALE CLUSTERING STRATEGY ",
497
+ "text_level": 1,
498
+ "bbox": [
499
+ 176,
500
+ 103,
501
+ 486,
502
+ 118
503
+ ],
504
+ "page_idx": 4
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "The multi-scale clustering strategy has often been used in prior research (Vaswani et al., 2017; Asano et al., 2019), leveraging the ensembling effect. Extending this strategy, we propose a multi-scale clustering strategy for our task. Although contrasting between the BCAs encourages our model to capture various aspects of local patterns, the performance may be sensitive to the number of clusters $k$ . To address this issue, we introduce a set of the cluster branches that have a different number of cluster assignments in each scale. To this end, we reformulate $\\mathcal { L } _ { c l u s t }$ as ",
509
+ "bbox": [
510
+ 173,
511
+ 130,
512
+ 825,
513
+ 215
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "equation",
519
+ "img_path": "images/fff065c940246ea6bdc3920c0fe04f8ff8958dde05aa225f41fb3cf2daa8567b.jpg",
520
+ "text": "$$\n\\mathcal { L } _ { c l u s t } = \\sum _ { k } \\mathcal { L } _ { c l u s t } ^ { k } , k \\in K .\n$$",
521
+ "text_format": "latex",
522
+ "bbox": [
523
+ 405,
524
+ 224,
525
+ 593,
526
+ 258
527
+ ],
528
+ "page_idx": 4
529
+ },
530
+ {
531
+ "type": "text",
532
+ "text": "In this work, we use various values of $k$ , e.g., $K = \\{ 3 2 , 6 4 , 1 2 8 \\}$ . ",
533
+ "bbox": [
534
+ 173,
535
+ 267,
536
+ 604,
537
+ 284
538
+ ],
539
+ "page_idx": 4
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "3.5 TOTAL OBJECTIVE ",
544
+ "text_level": 1,
545
+ "bbox": [
546
+ 174,
547
+ 303,
548
+ 346,
549
+ 318
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "Finally, our total objective function is written as ",
556
+ "bbox": [
557
+ 174,
558
+ 330,
559
+ 488,
560
+ 345
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "equation",
566
+ "img_path": "images/cabb57e75941458a8d00443fdec5c8a8850f5e28a5c54c0d6061e105cb33e24d.jpg",
567
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { t o t a l } = \\mathcal { L } _ { a l i g n } + \\lambda _ { c l u s t } \\mathcal { L } _ { c l u s t } . } \\end{array}\n$$",
568
+ "text_format": "latex",
569
+ "bbox": [
570
+ 392,
571
+ 356,
572
+ 606,
573
+ 373
574
+ ],
575
+ "page_idx": 4
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "The parameters of the follower $E _ { \\phi }$ gradually reflect those of the runner via ",
580
+ "bbox": [
581
+ 173,
582
+ 382,
583
+ 663,
584
+ 397
585
+ ],
586
+ "page_idx": 4
587
+ },
588
+ {
589
+ "type": "equation",
590
+ "img_path": "images/ff1adb24fe563694a272b5d886c0a696f69e74dd5b8c07675954c3e6ca9f4bf8.jpg",
591
+ "text": "$$\n\\phi \\gamma \\phi + ( 1 - \\gamma ) \\theta ,\n$$",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 428,
595
+ 406,
596
+ 568,
597
+ 424
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "where $\\gamma$ indicates a momentum factor. ",
604
+ "bbox": [
605
+ 176,
606
+ 434,
607
+ 426,
608
+ 449
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "4 EXPERIMENTS ",
615
+ "text_level": 1,
616
+ "bbox": [
617
+ 176,
618
+ 472,
619
+ 326,
620
+ 488
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "This section presents the experimental evaluation of C2BIN on the standard benchmark datasets including CIFAR-10, CIFAR-100, STL-10, and ImageNet, which are commonly adopted in both self-supervised representation learning and unsupervised image clustering literature. ",
627
+ "bbox": [
628
+ 174,
629
+ 506,
630
+ 825,
631
+ 549
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "In Sections 4.1-4.3, we compare C2BIN with several representation learning methods and unsupervised clustering methods to verify that our model can yield both linearly separable and clusterable representations. Afterwards, Section 4.4 studies the robustness of C2BIN in an class-imbalanced setting. Lastly, Section 4.5 presents an ablation study for in-depth analysis of our model behaviour. ",
638
+ "bbox": [
639
+ 174,
640
+ 554,
641
+ 825,
642
+ 611
643
+ ],
644
+ "page_idx": 4
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "4.1 REPRESENTATION LEARNING TASKS ON UNIFIED SETUP ",
649
+ "text_level": 1,
650
+ "bbox": [
651
+ 174,
652
+ 631,
653
+ 606,
654
+ 646
655
+ ],
656
+ "page_idx": 4
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "Experimental setup. Because previous studies have their own experimental settings in terms of datasets and backbone architectures, we prepared for a unified experimental setup for the fair comparison , as follows. We first employ the ResNet-18 architecture as the backbone architecture, following Wu et al. (2018). We used 3 standard benchmark datasets; CIFAR-10, CIFAR-100, and STL-10 for this experiment. All baselines are trained by using the identical data augmentation techniques, as used in Chen et al. (2020a;c). Further training details can be found in Appendix A.1. ",
661
+ "bbox": [
662
+ 174,
663
+ 659,
664
+ 825,
665
+ 743
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "Evaluation metrics. We adopt three standard evaluation metrics: linear evaluation protocol (LP) (Zhang et al., 2017), k-nearest-neighbour (kNN) classifier with $k = 5$ and $k = 2 0 0$ . For the LP, we follow the recipe of Grill et al. (2020), where we report the best evaluation score over five differently initialized learning rates. For kNN, we follow the settings used in Wu et al. (2018) and the implementation of Asano et al. (2019). ",
672
+ "bbox": [
673
+ 173,
674
+ 750,
675
+ 825,
676
+ 819
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "For our baseline methods, we choose SimCLR, MoCo v2, and BYOL, which can work as the stateof-the-art methods for the instance-wise contrastive learning, momentum-based contrastive learning, and instance-wise bootstrapping, respectively. As seen in Tab. 1, C2BIN consistently outperforms all baselines across all benchmark datasets In the case of CIFAR-100, the kNN accuracy of C2BIN significantly improves compared to the baselines while its LP scores consistently increase as well. We conjecture the reason is becuase C2BIN is appropriate to learn a hierarchical structure in a dataset such as CIFAR-100 ",
683
+ "bbox": [
684
+ 173,
685
+ 825,
686
+ 825,
687
+ 922
688
+ ],
689
+ "page_idx": 4
690
+ },
691
+ {
692
+ "type": "table",
693
+ "img_path": "images/e308d1e4ae4b1f23f70c94c5656f5bc1a4ca1166cd2361220478e041035dfe2d.jpg",
694
+ "table_caption": [
695
+ "Table 1: Comparison with unsupervised representation methods. Note on $\\dagger$ : for the fair comparison, we did not used the average gradient trick that was utilized in BYOL (Grill et al., 2020). "
696
+ ],
697
+ "table_footnote": [],
698
+ "table_body": "<table><tr><td rowspan=\"2\">Ar.</td><td rowspan=\"2\">Method</td><td colspan=\"3\"> gap+LP / gap+kNN(k=5) / gap+kNN(k=200)</td></tr><tr><td>CIFAR-10</td><td>CIFAR-100</td><td>STL-10</td></tr><tr><td rowspan=\"8\">JP-s1g</td><td>DC (Caron et al.,2018)</td><td>-/ -/67.6</td><td></td><td>1</td></tr><tr><td>NPID (Wu et al., 2018)</td><td>-/-/80.8</td><td>- / - /51.6</td><td>1</td></tr><tr><td>SimCLR (Chen et al., 2020a)</td><td>81.3 /82.4/ 81.7</td><td>59.8 / 63.9/66.8</td><td>83.1 / 78.3 / 78.8</td></tr><tr><td>MoCo (He et al., 2020)</td><td>78.1 / 79.7 /77.7</td><td>50.2/56.7/58.2</td><td>79.4 /74.3 /74.2</td></tr><tr><td>MoCo v2 (Chen et al., 2020c)</td><td>81.6 / 81.4 / 83.9</td><td>61.1 / 62.8 / 63.8</td><td>83.5 / 78.2 / 78.1</td></tr><tr><td>BYOL + (Grill et al., 2020)</td><td>80.8 / 81.4 / 79.7</td><td>57.0 / 63.3 / 61.4</td><td>80.4 / 76.5 / 77.5</td></tr><tr><td>C2BIN [Mean] (Ours)</td><td>81.5 / 84.8 / 84.9</td><td>61.5 /72.2 /72.6</td><td>83.6 / 79.1/ 80.1</td></tr><tr><td>C2BIN [Best] (Ours)</td><td>82.3 / 85.9 / 85.3</td><td>62.1 / 73.9 / 73.8</td><td>84.0 / 79.9 / 80.8</td></tr></table>",
699
+ "bbox": [
700
+ 176,
701
+ 101,
702
+ 823,
703
+ 262
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "4.2 REPRESENTATION LEARNING TASKS ON LARGE SCALE BENCHMARK ",
710
+ "text_level": 1,
711
+ "bbox": [
712
+ 174,
713
+ 332,
714
+ 694,
715
+ 347
716
+ ],
717
+ "page_idx": 5
718
+ },
719
+ {
720
+ "type": "text",
721
+ "text": "Experimental setup. To compare our method with concurrent and state-of-the-art works in a large scale dataset, we evaluate our method in ImageNet with ResNet-50 architecture as a backbone model. For fair comparison, most of the results are taken from the experiments that models are trained for 200 epochs with a batch size of 256. All of the baselines are trained with identical data augmentation techniques introduced in (Chen et al., 2020a). Further training details can be found in Appendix A.2. ",
722
+ "bbox": [
723
+ 176,
724
+ 358,
725
+ 825,
726
+ 429
727
+ ],
728
+ "page_idx": 5
729
+ },
730
+ {
731
+ "type": "table",
732
+ "img_path": "images/c8b2c70219e6bbc6794b91a447af70736c2ed1837d02779b1785792bd574faae.jpg",
733
+ "table_caption": [],
734
+ "table_footnote": [],
735
+ "table_body": "<table><tr><td>Method</td><td>Epochs</td><td>Batch Size</td><td>Top-1 accuracy</td></tr><tr><td>NPID (Wu et al., 2018)</td><td>200</td><td>256</td><td>56.5</td></tr><tr><td>MoCo (He et al., 2020)</td><td>200</td><td>256</td><td>60.6</td></tr><tr><td>SimCLR (Chen et al., 2020a)</td><td>200</td><td>256</td><td>61.9</td></tr><tr><td>MoCo v2 (Chen et al., 2020c)</td><td>200</td><td>256</td><td>67.5</td></tr><tr><td>BYOL † (Grill et al., 2020)</td><td>200</td><td>256</td><td>64.3</td></tr><tr><td>C2BIN (Ours)</td><td>200</td><td>256</td><td>64.4</td></tr><tr><td>SimCLR (Chen et al., 2020a)</td><td>400</td><td>4096</td><td>68.2</td></tr><tr><td>SwAV (Caron et al., 2020)</td><td>400</td><td>4096</td><td>70.1</td></tr><tr><td>MoCo v2 (Chen et al., 2020c)</td><td>800</td><td>256</td><td>71.1</td></tr></table>",
736
+ "bbox": [
737
+ 248,
738
+ 440,
739
+ 748,
740
+ 606
741
+ ],
742
+ "page_idx": 5
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "Table 2: Linear classifier top-1 accuracy comparison with unsupervised representation methods on ImageNet. Methods are arranged in chronological order. Note on †: BYOL (Grill et al., 2020) does not report the result on ImageNet with the identical experimental setup. Therefore, we adopted the results of BYOL from Zhan et al. (2020), the most widely used open-source library for self-supervised learning, experimented without an average gradient technique for a fair comparison. ",
747
+ "bbox": [
748
+ 173,
749
+ 616,
750
+ 825,
751
+ 685
752
+ ],
753
+ "page_idx": 5
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "Though C2BIN has shown competitive performance compared to the baselines, MoCo v2 (Chen et al., 2020c) outperforms C2BIN on the large-scale dataset, which contradicts the findings in Section 4.1. Since C2BIN utilizes batch-wise clustering techniques to learn the cluster structure, it brings instability to the training process when a large number of cluster size is required compared to the batch size. Still, our method slightly outperforms the state-of-the-art instance bootstrapping method, BYOL (Grill et al., 2020). This result implies that simultaneously learning the cluster structure is not counter-effective to enhance the discriminative power of the instance-wise representation learning method. ",
758
+ "bbox": [
759
+ 173,
760
+ 705,
761
+ 825,
762
+ 818
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "4.3 IMAGE CLUSTERING TASKS ",
769
+ "text_level": 1,
770
+ "bbox": [
771
+ 176,
772
+ 833,
773
+ 408,
774
+ 848
775
+ ],
776
+ "page_idx": 5
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "This section compares our approach to the baselines in the unsupervised image clustering task. ",
781
+ "bbox": [
782
+ 173,
783
+ 859,
784
+ 792,
785
+ 875
786
+ ],
787
+ "page_idx": 5
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "Experimental setup. For a fair comparison, we keep most of the implementation details identical to Ji et al. (2019); Huang et al. (2020) except for excluding the use of the Sobel filter. We use the architecture similar to ResNet-34, with the 2-layer MLP for both the instance projector $G _ { \\theta } ^ { a } ( \\cdot )$ and the predictor $P ^ { a } ( \\cdot )$ . For the clustering branch, three cluster heads are used as $K = \\{ 1 0 , 4 0 , 1 6 0 \\}$ for CIFAR-10 and STL-10, and $K = \\{ 2 0 , 4 0 , 1 6 0 \\}$ for CIFAR-100. Further training details can be found in Appendix B.1. ",
792
+ "bbox": [
793
+ 176,
794
+ 881,
795
+ 823,
796
+ 924
797
+ ],
798
+ "page_idx": 5
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "",
803
+ "bbox": [
804
+ 174,
805
+ 103,
806
+ 823,
807
+ 146
808
+ ],
809
+ "page_idx": 6
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "Evaluation metrics. Three standard clustering performance metrics are used for evaluation: (a) Normalized Mutual Information (NMI) measures the normalized mutual dependence between the predicted labels and the ground-truth labels. (b) Accuracy (ACC) is measured by assigning dominant class labels to each cluster and take the average precision. (c) Adjusted Rand Index (ARI) measures how many samples are assigned properly to different clusters. All the evaluation metrics range between 0 and 1, where the higher score indicates better performance. ",
814
+ "bbox": [
815
+ 174,
816
+ 152,
817
+ 825,
818
+ 237
819
+ ],
820
+ "page_idx": 6
821
+ },
822
+ {
823
+ "type": "table",
824
+ "img_path": "images/c78ac6d1fffdebc57ff1e691c63523a65952a82e45a64b2e63cca175aec2e384.jpg",
825
+ "table_caption": [],
826
+ "table_footnote": [],
827
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">NMI /ACC /ARI</td></tr><tr><td>CIFAR-10</td><td>CIFAR-100</td><td>STL-10</td></tr><tr><td>K-means</td><td>0.09/0.23/0.05</td><td>0.08/0.13/0.03</td><td>0.13/0.19/ 0.06</td></tr><tr><td>DEC (Xie et al., 2016)</td><td>0.26 /0.30 /0.16</td><td>0.14 / 0.19 / 0.05</td><td>0.28 / 0.36 / 0.19</td></tr><tr><td>DCCM (Wu et al., 2019)</td><td>0.50 /0.62 / 0.41</td><td>0.29 /0.33/ 0.17</td><td>0.38 / 0.48 / 0.26</td></tr><tr><td>IIC (Ji et al., 2019)</td><td>- /0.62 / -</td><td>-/0.26/-</td><td>- /0.61/ -</td></tr><tr><td>PICA (Huang et al., 2020)</td><td>0.59 / 0.70 / 0.51</td><td>0.31/ 0.34/0.17</td><td>0.61/0.71/ 0.53</td></tr><tr><td>C2BIN [Mean] (Ours)</td><td>0.62 / 0.72 / 0.53</td><td>0.36/0.35/0.20</td><td>0.62 / 0.73 / 0.55</td></tr><tr><td>C2BIN [Best] (Ours)</td><td>0.63 / 0.73 / 0.55</td><td>0.38 / 0.38 / 0.22</td><td>0.64 / 0.75 / 0.57</td></tr></table>",
828
+ "bbox": [
829
+ 202,
830
+ 248,
831
+ 794,
832
+ 397
833
+ ],
834
+ "page_idx": 6
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "Table 3: Comparison with end-to-end unsupervised representation methods in the clustering benchmark. The results of previous methods are taken from Huang et al. (2020). We append full comparison results in Appendix (Table 11). ",
839
+ "bbox": [
840
+ 173,
841
+ 406,
842
+ 825,
843
+ 449
844
+ ],
845
+ "page_idx": 6
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "As shown in Table 3, C2BIN outperforms the state-of-the-art clustering performance in all datasets by a significant margin, showing its capability of grouping the semantically related instances to distinct clusters. Moreover, C2BIN is shown to be robust, given that the averaged performance over five random trials even surpasses the best results from the previous literature. ",
850
+ "bbox": [
851
+ 173,
852
+ 469,
853
+ 825,
854
+ 525
855
+ ],
856
+ "page_idx": 6
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "4.4 CLASS-IMBALANCED EXPERIMENTS ",
861
+ "text_level": 1,
862
+ "bbox": [
863
+ 176,
864
+ 542,
865
+ 467,
866
+ 556
867
+ ],
868
+ "page_idx": 6
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "Unlike the standard benchmark datasets we used, it is often the case that the real-world image dataset is severely imbalanced in terms of its underlying class distribution. Therefore, we conducted additional experiments in a class-imbalanced environment, following the experimental design proposed in Cui et al. (2019). ",
873
+ "bbox": [
874
+ 174,
875
+ 568,
876
+ 825,
877
+ 625
878
+ ],
879
+ "page_idx": 6
880
+ },
881
+ {
882
+ "type": "image",
883
+ "img_path": "images/85450b8d19d0c04a02c3d3724ebeabae11c0330f436e556ecbb47c42dd8415d6.jpg",
884
+ "image_caption": [
885
+ "Figure 4: Top-1 accuracy degradation when using the ResNet-18 architecture under a linear evaluation protocol in a class-imbalanced setting. "
886
+ ],
887
+ "image_footnote": [],
888
+ "bbox": [
889
+ 200,
890
+ 635,
891
+ 792,
892
+ 804
893
+ ],
894
+ "page_idx": 6
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "Fig. 4 demonstrates the classification accuracy degradation in an imbalanced setting. The balanced rate indicates the relative ratio of the largest to the smallest classes. We find that the performance of PICA, the clustering-based method, significantly decreases compared to other baselines as the class imbalance gets apparent. In the case of imbalanced CIFAR-100, SimCLR, which contrasts all instances within the mini-batch, is shown to get degraded faster than BYOL, which does not consider the relationship between other instances. On the other hand, the accuracy degradation of C2BIN is shown to be minimal for both CIFAR-10 and CIFAR-100, possibly due to our alignment loss (Section 3.2). ",
899
+ "bbox": [
900
+ 173,
901
+ 867,
902
+ 825,
903
+ 924
904
+ ],
905
+ "page_idx": 6
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "",
910
+ "bbox": [
911
+ 174,
912
+ 103,
913
+ 825,
914
+ 160
915
+ ],
916
+ "page_idx": 7
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "4.5 DISCUSSIONS ",
921
+ "text_level": 1,
922
+ "bbox": [
923
+ 174,
924
+ 176,
925
+ 310,
926
+ 190
927
+ ],
928
+ "page_idx": 7
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "",
933
+ "text_level": 1,
934
+ "bbox": [
935
+ 174,
936
+ 202,
937
+ 531,
938
+ 217
939
+ ],
940
+ "page_idx": 7
941
+ },
942
+ {
943
+ "type": "image",
944
+ "img_path": "images/3fc4885b073d08e4b139035906983734de0bdc88a6149c2bc3a4011b5d35943f.jpg",
945
+ "image_caption": [
946
+ "Figure 5: t-SNE 2-D embedding visualization of C2BIN and SimCLR. "
947
+ ],
948
+ "image_footnote": [],
949
+ "bbox": [
950
+ 223,
951
+ 204,
952
+ 753,
953
+ 424
954
+ ],
955
+ "page_idx": 7
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "For the test data items in STL-10 dataset, we embed their high-dimensional representations obtained by our method and SimCLR in a 2-D space using t-SNE(van der Maaten & Hinton (2008)). As shown in Fig. 5, the representations learned from our model show a clearer cluster structure than SimCLR(Chen et al. (2020a)), as training proceeds. ",
960
+ "bbox": [
961
+ 173,
962
+ 478,
963
+ 825,
964
+ 534
965
+ ],
966
+ "page_idx": 7
967
+ },
968
+ {
969
+ "type": "image",
970
+ "img_path": "images/45958b795c49a732446839e40cd668b741a9ab318287c720437dda82eb5d0b46.jpg",
971
+ "image_caption": [
972
+ "Figure 6: Qualitative comparisons of the top-k retrieved images by C2BIN (Columns 2-6), SimCLR (Columns 7-11), and PICA (Columns 12-17) given a query image (Column 1) from the STL-10 test set where the $k$ is set as $\\{ 1 , 2 , 1 0 , 5 0 , 1 0 0 \\}$ . "
973
+ ],
974
+ "image_footnote": [],
975
+ "bbox": [
976
+ 173,
977
+ 549,
978
+ 813,
979
+ 671
980
+ ],
981
+ "page_idx": 7
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "To understand the characteristics of both instance-wise alignment and cluster-wise discrimination in a straightforward manner, we conduct the image retrieval experiment. As shown in Fig. 6, our method outperforms two proposed baselines from both perspectives. Since SimCLR only focuses on instance-wise discrimination, it fails to retrieve with a larger value of $k$ with a given query image (e.g., airplane). Likewise, PICA lacks the alignment capability in an instance-wise manner, resulting in poor performance with a lower value of $k$ in contrast to C2BIN. This is also corroborated by the quantitative results in Appendix (Fig. 8). ",
986
+ "bbox": [
987
+ 173,
988
+ 750,
989
+ 825,
990
+ 848
991
+ ],
992
+ "page_idx": 7
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "Ablation study. To further verify whether our loss terms are complementary to each other, we perform an ablation study on STL-10 dataset. As we can observe in Table 4(b) and 4(c), a simple integration of the clustering method into the instance-wise bootstrapping (Table 4(a)) can degrade the representation quality unless an appropriate level of granularity is provided. Similar to the results from Asano et al. (2019), using a simple multi-scale clustering branch with a specific number of ",
997
+ "bbox": [
998
+ 174,
999
+ 854,
1000
+ 825,
1001
+ 924
1002
+ ],
1003
+ "page_idx": 7
1004
+ },
1005
+ {
1006
+ "type": "table",
1007
+ "img_path": "images/10a0ec829bee32021422ee6d10934bfefd665cab442b9f1f0c4254d4698d6b8a.jpg",
1008
+ "table_caption": [
1009
+ "clusters (Table 4(d) and (e)) is a more effective strategy than a single-head method. Furthermore, our proposed multi-scale clustering strategy (Table 4(f)) peaks out the best performance since it allows the model to capture the diverse semantic information at a different level. This result justifies our motivation to utilize a clustering strategy in a multi-scale manner. ",
1010
+ "Table 4: Performance improvements due to each of our components. $m _ { 1 }$ , $m _ { 2 }$ , and $m _ { 3 }$ indicate the linear evaluation protocol (LP), $\\mathrm { k N N } ( \\mathrm { k } { = } 5 )$ , and $\\mathrm { k N N } ( \\mathrm { k } { = } 2 0 0 )$ , respectively. $K$ denotes a set of cluster sizes: $k _ { 1 } = \\{ 3 2 \\}$ , $k _ { 2 } = \\{ 1 2 8 \\}$ , $k _ { 3 } = \\{ 3 2 , 3 2 , 3 2 \\}$ , $k _ { 4 } = \\{ 1 2 8 , 1 2 8 , 1 2 8 \\}$ , and $k _ { 5 } = \\{ 3 2 , 6 4 , 1 2 8 \\}$ . "
1011
+ ],
1012
+ "table_footnote": [],
1013
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">Lalign Eq.(1)</td><td colspan=\"4\">Lclust</td><td rowspan=\"2\">m1</td><td rowspan=\"2\">m2</td><td rowspan=\"2\">m3</td></tr><tr><td>Eq.(5)</td><td>Eq.(6)</td><td>multi-scale</td><td>K</td></tr><tr><td>(a)</td><td>√</td><td></td><td></td><td></td><td>1</td><td>80.4</td><td>76.5</td><td>77.5</td></tr><tr><td>(b)</td><td></td><td></td><td></td><td></td><td>k1</td><td>78.4 (-1.6)</td><td>73.5 (-3.0)</td><td>73.9 (-3.6)</td></tr><tr><td>(C)</td><td>V</td><td>V</td><td></td><td></td><td>k2</td><td>81.3 (+0.9)</td><td>76.3 (-0.2)</td><td>77.0 (-0.5)</td></tr><tr><td>(d)</td><td>√</td><td></td><td>√</td><td></td><td>k3</td><td>79.3 (-0.9)</td><td>74.4 (-2.1)</td><td>75.5 (-2.0)</td></tr><tr><td>(e)</td><td>√</td><td></td><td>√</td><td></td><td>k4</td><td>82.2 (+1.8)</td><td>76.3 (-0.2)</td><td>76.4 (-1.1)</td></tr><tr><td>(f)</td><td>√</td><td></td><td>√</td><td>√</td><td>K5</td><td>84.0 (+3.6)</td><td>79.9 (+3.4)</td><td>80.8 (+3.3)</td></tr></table>",
1014
+ "bbox": [
1015
+ 176,
1016
+ 172,
1017
+ 821,
1018
+ 301
1019
+ ],
1020
+ "page_idx": 8
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "Visual analysis on multi-scale clustering strategy. We also show the visual analysis on the multiscale clustering strategy. Each scale represents the different semantic information as shown in Appendix (Figs. 9, 10, and 11). Combining this semantic difference in each scale prevents our model from binding to a specific number of cluster assignments. ",
1025
+ "bbox": [
1026
+ 174,
1027
+ 375,
1028
+ 825,
1029
+ 431
1030
+ ],
1031
+ "page_idx": 8
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "5 CONCLUSIONS ",
1036
+ "text_level": 1,
1037
+ "bbox": [
1038
+ 176,
1039
+ 452,
1040
+ 328,
1041
+ 468
1042
+ ],
1043
+ "page_idx": 8
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "In this paper, we proposed a novel approach to improve the existing representation learning with unsupervised image clustering. By integrating the advantages of both literature, we present an advanced self-supervised framework that simultaneously learns cluster features as well as image representations by contrasting clusters while bootstrapping instances. Moreover, in order to capture diverse semantic information, we suggest a multi-scale clustering strategy. We also conduct ablation studies to validate complementary effects of our proposed loss functions. ",
1048
+ "bbox": [
1049
+ 174,
1050
+ 483,
1051
+ 825,
1052
+ 566
1053
+ ],
1054
+ "page_idx": 8
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "REFERENCES ",
1059
+ "text_level": 1,
1060
+ "bbox": [
1061
+ 176,
1062
+ 102,
1063
+ 287,
1064
+ 118
1065
+ ],
1066
+ "page_idx": 9
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "YM Asano, C Rupprecht, and A Vedaldi. Self-labelling via simultaneous clustering and representation learning. In International Conference on Learning Representations, 2019. ",
1071
+ "bbox": [
1072
+ 176,
1073
+ 126,
1074
+ 823,
1075
+ 155
1076
+ ],
1077
+ "page_idx": 9
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "Hyojin Bahng, Sanghyuk Chun, Sangdoo Yun, Jaegul Choo, and Seong Joon Oh. Learning de-biased representations with biased representations. arXiv preprint arXiv:1910.02806, 2019. ",
1082
+ "bbox": [
1083
+ 174,
1084
+ 161,
1085
+ 823,
1086
+ 191
1087
+ ],
1088
+ "page_idx": 9
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise training of deep networks. In Advances in neural information processing systems, pp. 153–160, 2007. ",
1093
+ "bbox": [
1094
+ 174,
1095
+ 199,
1096
+ 823,
1097
+ 229
1098
+ ],
1099
+ "page_idx": 9
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Deng Cai, Xiaofei He, Xuanhui Wang, Hujun Bao, and Jiawei Han. Locality preserving nonnegative matrix factorization. In IJCAI, volume 9, pp. 1010–1015, 2009. ",
1104
+ "bbox": [
1105
+ 173,
1106
+ 236,
1107
+ 823,
1108
+ 266
1109
+ ],
1110
+ "page_idx": 9
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 132–149, 2018. ",
1115
+ "bbox": [
1116
+ 173,
1117
+ 273,
1118
+ 828,
1119
+ 316
1120
+ ],
1121
+ "page_idx": 9
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. 2020. ",
1126
+ "bbox": [
1127
+ 171,
1128
+ 324,
1129
+ 825,
1130
+ 354
1131
+ ],
1132
+ "page_idx": 9
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Jianlong Chang, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep adaptive image clustering. In Proceedings of the IEEE international conference on computer vision, pp. 5879–5887, 2017. ",
1137
+ "bbox": [
1138
+ 173,
1139
+ 361,
1140
+ 826,
1141
+ 405
1142
+ ],
1143
+ "page_idx": 9
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Jianlong Chang, Yiwen Guo, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep discriminative clustering analysis. Proceedings of the IEEE international conference on computer vision, 2019. ",
1148
+ "bbox": [
1149
+ 173,
1150
+ 412,
1151
+ 826,
1152
+ 455
1153
+ ],
1154
+ "page_idx": 9
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Ting Chen and Lala Li. Intriguing properties of contrastive losses. arXiv preprint arXiv:2011.02803, 2020. ",
1159
+ "bbox": [
1160
+ 173,
1161
+ 463,
1162
+ 825,
1163
+ 493
1164
+ ],
1165
+ "page_idx": 9
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a. ",
1170
+ "bbox": [
1171
+ 174,
1172
+ 501,
1173
+ 825,
1174
+ 531
1175
+ ],
1176
+ "page_idx": 9
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020b. ",
1181
+ "bbox": [
1182
+ 174,
1183
+ 537,
1184
+ 825,
1185
+ 580
1186
+ ],
1187
+ "page_idx": 9
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020c. ",
1192
+ "bbox": [
1193
+ 169,
1194
+ 588,
1195
+ 825,
1196
+ 618
1197
+ ],
1198
+ "page_idx": 9
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9268–9277, 2019. ",
1203
+ "bbox": [
1204
+ 176,
1205
+ 626,
1206
+ 823,
1207
+ 670
1208
+ ],
1209
+ "page_idx": 9
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Wouter Gansbeke, Simon Vandenhende, Stamatios Georgoulis, Marc Proesmans, and Luc Van Gool. Scan: Learning to classify images without labels. In Proceedings of the European Conference on Computer Vision, 2020. ",
1214
+ "bbox": [
1215
+ 176,
1216
+ 676,
1217
+ 823,
1218
+ 719
1219
+ ],
1220
+ "page_idx": 9
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "K Chidananda Gowda and G Krishna. Agglomerative clustering using the concept of mutual nearest neighbourhood. Pattern recognition, 10(2):105–112, 1978. ",
1225
+ "bbox": [
1226
+ 171,
1227
+ 728,
1228
+ 823,
1229
+ 758
1230
+ ],
1231
+ "page_idx": 9
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020. ",
1236
+ "bbox": [
1237
+ 173,
1238
+ 765,
1239
+ 825,
1240
+ 821
1241
+ ],
1242
+ "page_idx": 9
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006. ",
1247
+ "bbox": [
1248
+ 173,
1249
+ 830,
1250
+ 823,
1251
+ 873
1252
+ ],
1253
+ "page_idx": 9
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Philip Haeusser, Johannes Plapp, Vladimir Golkov, Elie Aljalbout, and Daniel Cremers. Associative deep clustering: Training a classification network with no labels. In German Conference on Pattern Recognition, pp. 18–32. Springer, 2018. ",
1258
+ "bbox": [
1259
+ 174,
1260
+ 881,
1261
+ 825,
1262
+ 924
1263
+ ],
1264
+ "page_idx": 9
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9729–9738, 2020. ",
1269
+ "bbox": [
1270
+ 176,
1271
+ 103,
1272
+ 823,
1273
+ 146
1274
+ ],
1275
+ "page_idx": 10
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "Jiabo Huang, Shaogang Gong, and Xiatian Zhu. Deep semantic clustering by partition confidence maximisation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8849–8858, 2020. ",
1280
+ "bbox": [
1281
+ 178,
1282
+ 154,
1283
+ 821,
1284
+ 196
1285
+ ],
1286
+ "page_idx": 10
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "Xu Ji, João F Henriques, and Andrea Vedaldi. Invariant information clustering for unsupervised image classification and segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 9865–9874, 2019. ",
1291
+ "bbox": [
1292
+ 176,
1293
+ 205,
1294
+ 823,
1295
+ 248
1296
+ ],
1297
+ "page_idx": 10
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. arXiv preprint arXiv:2004.11362, 2020. ",
1302
+ "bbox": [
1303
+ 173,
1304
+ 257,
1305
+ 825,
1306
+ 301
1307
+ ],
1308
+ "page_idx": 10
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. ",
1313
+ "bbox": [
1314
+ 171,
1315
+ 309,
1316
+ 808,
1317
+ 325
1318
+ ],
1319
+ "page_idx": 10
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. ",
1324
+ "bbox": [
1325
+ 173,
1326
+ 332,
1327
+ 820,
1328
+ 362
1329
+ ],
1330
+ "page_idx": 10
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "Kimin Lee, Sukmin Yun, Kibok Lee, Honglak Lee, Bo Li, and Jinwoo Shin. Robust inference via generative classifiers for handling noisy labels. In International Conference on Machine Learning, pp. 3763–3772, 2019. ",
1335
+ "bbox": [
1336
+ 174,
1337
+ 369,
1338
+ 826,
1339
+ 412
1340
+ ],
1341
+ "page_idx": 10
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2117–2125, 2017. ",
1346
+ "bbox": [
1347
+ 174,
1348
+ 421,
1349
+ 826,
1350
+ 465
1351
+ ],
1352
+ "page_idx": 10
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "Yucen Luo, Jun Zhu, Mengxi Li, Yong Ren, and Bo Zhang. Smooth neighbors on teacher graphs for semi-supervised learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8896–8905, 2018. ",
1357
+ "bbox": [
1358
+ 174,
1359
+ 473,
1360
+ 826,
1361
+ 516
1362
+ ],
1363
+ "page_idx": 10
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. International Conference on Learning Representations, 2016. ",
1368
+ "bbox": [
1369
+ 173,
1370
+ 525,
1371
+ 825,
1372
+ 566
1373
+ ],
1374
+ "page_idx": 10
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9:2579–2605, 11 2008. ",
1379
+ "bbox": [
1380
+ 169,
1381
+ 575,
1382
+ 825,
1383
+ 606
1384
+ ],
1385
+ "page_idx": 10
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. ",
1390
+ "bbox": [
1391
+ 174,
1392
+ 613,
1393
+ 825,
1394
+ 656
1395
+ ],
1396
+ "page_idx": 10
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, Pierre-Antoine Manzagol, and Léon Bottou. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of machine learning research, 11(12), 2010. ",
1401
+ "bbox": [
1402
+ 176,
1403
+ 665,
1404
+ 825,
1405
+ 709
1406
+ ],
1407
+ "page_idx": 10
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. arXiv preprint arXiv:2005.10242, 2020. ",
1412
+ "bbox": [
1413
+ 169,
1414
+ 717,
1415
+ 825,
1416
+ 746
1417
+ ],
1418
+ "page_idx": 10
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "Jianlong Wu, Keyu Long, Fei Wang, Chen Qian, Cheng Li, Zhouchen Lin, and Hongbin Zha. Deep comprehensive correlation mining for image clustering. In Proceedings of the IEEE International Conference on Computer Vision, pp. 8150–8159, 2019. ",
1423
+ "bbox": [
1424
+ 174,
1425
+ 753,
1426
+ 823,
1427
+ 797
1428
+ ],
1429
+ "page_idx": 10
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "Weili Wu, Hui Xiong, and Shashi Shekhar. Clustering and information retrieval, volume 11. Springer Science & Business Media, 2013. ",
1434
+ "bbox": [
1435
+ 171,
1436
+ 805,
1437
+ 823,
1438
+ 835
1439
+ ],
1440
+ "page_idx": 10
1441
+ },
1442
+ {
1443
+ "type": "text",
1444
+ "text": "Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018. ",
1445
+ "bbox": [
1446
+ 173,
1447
+ 843,
1448
+ 823,
1449
+ 887
1450
+ ],
1451
+ "page_idx": 10
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "text": "Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In International conference on machine learning, pp. 478–487, 2016. ",
1456
+ "bbox": [
1457
+ 173,
1458
+ 895,
1459
+ 823,
1460
+ 924
1461
+ ],
1462
+ "page_idx": 10
1463
+ },
1464
+ {
1465
+ "type": "text",
1466
+ "text": "Jianwei Yang, Devi Parikh, and Dhruv Batra. Joint unsupervised learning of deep representations and image clusters. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5147–5156, 2016. ",
1467
+ "bbox": [
1468
+ 176,
1469
+ 103,
1470
+ 823,
1471
+ 146
1472
+ ],
1473
+ "page_idx": 11
1474
+ },
1475
+ {
1476
+ "type": "text",
1477
+ "text": "Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017. ",
1478
+ "bbox": [
1479
+ 171,
1480
+ 155,
1481
+ 823,
1482
+ 183
1483
+ ],
1484
+ "page_idx": 11
1485
+ },
1486
+ {
1487
+ "type": "text",
1488
+ "text": "Matthew D Zeiler, Dilip Krishnan, Graham W Taylor, and Rob Fergus. Deconvolutional networks. In 2010 IEEE Computer Society Conference on computer vision and pattern recognition, pp. 2528–2535. IEEE, 2010. ",
1489
+ "bbox": [
1490
+ 173,
1491
+ 193,
1492
+ 825,
1493
+ 234
1494
+ ],
1495
+ "page_idx": 11
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "Zelnik-Manor, Lihi, and Pietro Perona. Self-tuning spectral clustering. In Advances in neural information processing systems, pp. 1601–1608, 2005. ",
1500
+ "bbox": [
1501
+ 171,
1502
+ 244,
1503
+ 823,
1504
+ 273
1505
+ ],
1506
+ "page_idx": 11
1507
+ },
1508
+ {
1509
+ "type": "text",
1510
+ "text": "Xiaohang Zhan, Jiahao Xie, Ziwei Liu, Yew-Soon Ong, and Chen Change Loy. Online deep clustering for unsupervised representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6688–6697, 2020. ",
1511
+ "bbox": [
1512
+ 173,
1513
+ 281,
1514
+ 823,
1515
+ 325
1516
+ ],
1517
+ "page_idx": 11
1518
+ },
1519
+ {
1520
+ "type": "text",
1521
+ "text": "Richard Zhang, Phillip Isola, and Alexei A Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1058–1067, 2017. ",
1522
+ "bbox": [
1523
+ 174,
1524
+ 333,
1525
+ 825,
1526
+ 376
1527
+ ],
1528
+ "page_idx": 11
1529
+ },
1530
+ {
1531
+ "type": "text",
1532
+ "text": "A REPRESENTATION LEARNING EXPERIMENTS ",
1533
+ "text_level": 1,
1534
+ "bbox": [
1535
+ 174,
1536
+ 102,
1537
+ 581,
1538
+ 118
1539
+ ],
1540
+ "page_idx": 12
1541
+ },
1542
+ {
1543
+ "type": "table",
1544
+ "img_path": "images/41da0e28018ef23a1021ae07d14917c16c5d2eff8e1c05a4f44dfdcdb2a2b349.jpg",
1545
+ "table_caption": [
1546
+ "A.1 IMPLEMENTATION DETAILS FOR UNIFIED SETTING "
1547
+ ],
1548
+ "table_footnote": [],
1549
+ "table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>500</td></tr><tr><td>Optimizer</td><td>LARS (You et al., 2017)</td></tr><tr><td>Learning rate</td><td>Constant(0.2)</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Cluster weight (Lclust)</td><td>2.0</td></tr><tr><td>Entropy weight (Lentropy)</td><td>1.0</td></tr><tr><td>Architecture</td><td>ResNet-18</td></tr><tr><td>Representation dim</td><td>512</td></tr><tr><td> Instance projector Gg</td><td>MLP(512, 512) ReLU</td></tr><tr><td> Instance predictor Pg</td><td>MLP(512, 512) ReLU</td></tr><tr><td>Momentum factor ()</td><td>0.990</td></tr><tr><td>Temperature (T)</td><td>0.5</td></tr><tr><td>Cluster head (Ki)</td><td>32 (CIFAR-10, CIFAR-100, STL-10)</td></tr><tr><td>Cluster head (K2)</td><td>64</td></tr><tr><td>Cluster head (K3)</td><td>128</td></tr></table>",
1550
+ "bbox": [
1551
+ 240,
1552
+ 161,
1553
+ 730,
1554
+ 415
1555
+ ],
1556
+ "page_idx": 12
1557
+ },
1558
+ {
1559
+ "type": "table",
1560
+ "img_path": "images/5a1a53308c3c5ca39a991996e900649cc64ac75364d32df0166e261342f8401c.jpg",
1561
+ "table_caption": [
1562
+ "Table 5: Hyperparameters of backbone models used in the experiment of Section 4.1 ",
1563
+ "Table 6: Hyperparameters of the linear evaluation protocol used in the experiment of Section 4.1 "
1564
+ ],
1565
+ "table_footnote": [],
1566
+ "table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>300</td></tr><tr><td>Optimizer</td><td>LARS (You et al., 2017)</td></tr><tr><td>Learning rate</td><td>Constant({0.1, 0.2, 0.3, 0.4, 0.5})</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Architecture</td><td>linear without batch-norm layer</td></tr></table>",
1567
+ "bbox": [
1568
+ 232,
1569
+ 465,
1570
+ 763,
1571
+ 580
1572
+ ],
1573
+ "page_idx": 12
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "A.2 IMPLEMENTATION DETAILS FOR THE LARGE-SCALE SETTING ",
1578
+ "text_level": 1,
1579
+ "bbox": [
1580
+ 174,
1581
+ 103,
1582
+ 647,
1583
+ 118
1584
+ ],
1585
+ "page_idx": 13
1586
+ },
1587
+ {
1588
+ "type": "table",
1589
+ "img_path": "images/3eb8ca1d03982991ad7c32f6264f2bc0100c881c061aa617aad5b1329a1e19c8.jpg",
1590
+ "table_caption": [
1591
+ "Table 7: Hyperparameters of backbone models used in the experiment of Section 4.2 "
1592
+ ],
1593
+ "table_footnote": [],
1594
+ "table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>200</td></tr><tr><td>Optimizer</td><td>SGD</td></tr><tr><td>Learning rate</td><td>0.03</td></tr><tr><td>Learning rate schedule</td><td>multiplying 0.1 at 120,160 epoch.</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Cluster weight (Lclust)</td><td>1.0</td></tr><tr><td>Entropy weight (Lentropy)</td><td>0.05</td></tr><tr><td>Architecture</td><td>ResNet-50</td></tr><tr><td>Representation dim</td><td>2048</td></tr><tr><td> Instance projector Gg</td><td>MLP(2048,4096) ReLU</td></tr><tr><td> Instance predictor Pg</td><td>MLP(2048,4096) ReLU</td></tr><tr><td>Momentum factor ()</td><td>0.990</td></tr><tr><td>Temperature (T)</td><td>0.2</td></tr><tr><td>Cluster head (Ki)</td><td>512</td></tr><tr><td>Cluster head (K2)</td><td>1024</td></tr><tr><td>Cluster head (K3)</td><td>2048</td></tr></table>",
1595
+ "bbox": [
1596
+ 241,
1597
+ 132,
1598
+ 709,
1599
+ 400
1600
+ ],
1601
+ "page_idx": 13
1602
+ },
1603
+ {
1604
+ "type": "table",
1605
+ "img_path": "images/01be46a4c56d50584b7db0bcafab613dd401584ce740c4ce4066f4bc2125e298.jpg",
1606
+ "table_caption": [
1607
+ "Table 8: Hyperparameters of the linear evaluation protocol used in the experiment of Section 4.2 "
1608
+ ],
1609
+ "table_footnote": [],
1610
+ "table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>200</td></tr><tr><td>Optimizer</td><td>SGD</td></tr><tr><td>Learning rate</td><td>30.0</td></tr><tr><td>Learning rate schedule</td><td>multiplying O.1 at at 6O and 80 epoch</td></tr><tr><td>Weight decay</td><td>1e-6</td></tr><tr><td>Weight momentum</td><td>0.9</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Architecture</td><td>linear without batch-norm layer</td></tr></table>",
1611
+ "bbox": [
1612
+ 232,
1613
+ 449,
1614
+ 763,
1615
+ 579
1616
+ ],
1617
+ "page_idx": 13
1618
+ },
1619
+ {
1620
+ "type": "text",
1621
+ "text": "A.3 IMPACT STUDY FOR CHOICE OF $\\cdot$ ",
1622
+ "text_level": 1,
1623
+ "bbox": [
1624
+ 176,
1625
+ 103,
1626
+ 454,
1627
+ 117
1628
+ ],
1629
+ "page_idx": 14
1630
+ },
1631
+ {
1632
+ "type": "text",
1633
+ "text": "Although the effectiveness of the multi-scale clustering technique is briefly described in Section 4.5, this section studies performance changes according to the choice of the set $\\cdot$ . ",
1634
+ "bbox": [
1635
+ 171,
1636
+ 130,
1637
+ 825,
1638
+ 159
1639
+ ],
1640
+ "page_idx": 14
1641
+ },
1642
+ {
1643
+ "type": "table",
1644
+ "img_path": "images/c614c75b21090d354ee670166ad7974d4a26a556791ab0fba965d85fd7c0c78e.jpg",
1645
+ "table_caption": [
1646
+ "Table 9: An impact study about the choice of $K$ on the STL-10 dataset. LP indicates an linear evaluation protocol described in Section 4.1. "
1647
+ ],
1648
+ "table_footnote": [],
1649
+ "table_body": "<table><tr><td rowspan=\"2\">Lalign Eq. (1)</td><td rowspan=\"2\"></td><td colspan=\"3\">Lclust</td><td rowspan=\"2\">LP (%)</td></tr><tr><td>Eq.(5)</td><td>Eq.(6) multi-scale</td><td>K</td></tr><tr><td>(a)</td><td>√</td><td></td><td>√</td><td>{32,64,128}</td><td>84.0</td></tr><tr><td>(b)</td><td>√</td><td>√</td><td></td><td>8</td><td>75.28 (-8.72)</td></tr><tr><td>(c)</td><td>√</td><td>1</td><td></td><td>{16}</td><td>79.06 (-4.94)</td></tr><tr><td>(d)</td><td>√</td><td>√</td><td></td><td>{512}</td><td>80.01 (-3.9)</td></tr><tr><td>(e)</td><td>√</td><td></td><td></td><td>{8,8,8}</td><td>76.08 (-7.92)</td></tr><tr><td>(f)</td><td>√</td><td></td><td></td><td>{16,16,16}</td><td>80.08 (-3.92)</td></tr><tr><td>(g)</td><td>√</td><td></td><td></td><td>{512,512,512}</td><td>80.50 (-3.5)</td></tr><tr><td>(h)</td><td>√</td><td></td><td></td><td>{8,16,32}</td><td>83.50 (-0.5)</td></tr><tr><td>i</td><td>√</td><td></td><td>:</td><td>{16,32,64}</td><td>83.91 (-0.09)</td></tr></table>",
1650
+ "bbox": [
1651
+ 218,
1652
+ 170,
1653
+ 779,
1654
+ 342
1655
+ ],
1656
+ "page_idx": 14
1657
+ },
1658
+ {
1659
+ "type": "text",
1660
+ "text": "Table 9 shows how C2BIN’s performance is damaged for the linear evaluation protocol (LP) on the STL-10 dataset when the combination of $K$ is changed. In Table 9, (a) is the best score reported in the main paper and can be used as a pivot for comparison. For the rest of them, similar to Section 4.5, we divide experiments into three groups. First, (b)-(d) are matched with the case of attaching single and arbitrary selected cluster size. Unfortunately, this case does not help to improve performances and even dramatically degenerates the representation quality. We guess that attaching a single cluster head after the backbone network makes its representation quality sensitive according to the head size. The second group, (e)-(g), corresponds with the case of multiple but single-scale cluster heads. Although it seems a slight improvement compared to the above-mentioned case, it is difficult to be sufficiently complementary in our setting. We think the effect of the multi-branch clustering seems small because each cluster head can capture similar patterns with others. Lastly, (h)-(i) is mapped to the case of our multiple and multi-scale clustering strategy, showing robust performance in regard to the combination of $\\cdot$ if each element of $K$ is assigned in different scales. We guess that the effect of the multi-task learning is maximized because an identical representation vector should be informative enough to satisfy the following clusters, which are from abstracted to detailed. ",
1661
+ "bbox": [
1662
+ 173,
1663
+ 400,
1664
+ 826,
1665
+ 609
1666
+ ],
1667
+ "page_idx": 14
1668
+ },
1669
+ {
1670
+ "type": "text",
1671
+ "text": "B UNSUPERVISED CLUSTERING EXPERIMENTS ",
1672
+ "text_level": 1,
1673
+ "bbox": [
1674
+ 173,
1675
+ 102,
1676
+ 580,
1677
+ 118
1678
+ ],
1679
+ "page_idx": 15
1680
+ },
1681
+ {
1682
+ "type": "table",
1683
+ "img_path": "images/d58521b246dc405fe212c64bd362e6ad59fe9c29ee8aa1e6949b465cef3cb8a5.jpg",
1684
+ "table_caption": [
1685
+ "B.1 IMPLEMENTATION DETAILS ",
1686
+ "Table 10: Hyperparameters used in unsupervised clustering experiments of Section 4.3 "
1687
+ ],
1688
+ "table_footnote": [],
1689
+ "table_body": "<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Epoch</td><td>300</td></tr><tr><td>Optimizer</td><td>Adam (Kingma &amp; Ba,2015)</td></tr><tr><td>Learning rate</td><td>Cosine annealing (3e-4, 0)</td></tr><tr><td>Weight decay</td><td>No weight decay</td></tr><tr><td>Batch size</td><td>256</td></tr><tr><td>Cluster weight (Lclust)</td><td>1.0</td></tr><tr><td>Entropy weight (Lentropy)</td><td>1.0</td></tr><tr><td>Architecture</td><td>ResNet-34</td></tr><tr><td>Representation dim</td><td>512</td></tr><tr><td> Instance projector G</td><td>MLP(512, 512) ReLU</td></tr><tr><td> Instance predictor Pg</td><td>MLP(512,512) ReLU</td></tr><tr><td>Momentum factor ()</td><td>0.995</td></tr><tr><td>Temperature (T)</td><td>1.0</td></tr><tr><td>Cluster head (K1)</td><td>10 (CIFAR-10, STL-10),20 (CIFAR-100)</td></tr><tr><td>Cluster head (K2)</td><td>40</td></tr><tr><td>Cluster head (K3)</td><td>160</td></tr></table>",
1690
+ "bbox": [
1691
+ 240,
1692
+ 161,
1693
+ 745,
1694
+ 401
1695
+ ],
1696
+ "page_idx": 15
1697
+ },
1698
+ {
1699
+ "type": "text",
1700
+ "text": "B.2 CLUSTERING QUALITY COMPARISON ",
1701
+ "text_level": 1,
1702
+ "bbox": [
1703
+ 176,
1704
+ 481,
1705
+ 472,
1706
+ 493
1707
+ ],
1708
+ "page_idx": 15
1709
+ },
1710
+ {
1711
+ "type": "table",
1712
+ "img_path": "images/f2d1f7f4f279b9f10f2e7a08886c724d36b740607e17831a3b5e89b01936dba0.jpg",
1713
+ "table_caption": [],
1714
+ "table_footnote": [
1715
+ "Table 11: Full comparison with unsupervised representation models for clustering benchmark datasets. The results of previous methods are taken from Ji et al. (2019); Huang et al. (2020); Gansbeke et al. (2020). "
1716
+ ],
1717
+ "table_body": "<table><tr><td rowspan=\"2\">Fwk</td><td rowspan=\"2\">Method</td><td colspan=\"3\">NMI /ACC /ARI</td></tr><tr><td>CIFAR-10</td><td>CIFAR-100</td><td>STL-10</td></tr><tr><td rowspan=\"20\">Ppg-en-pug</td><td>K-means</td><td>0.09/0.23/0.05</td><td>0.08/0.13/0.03</td><td>0.13/0.19/0.06</td></tr><tr><td>SC (Zelnik-Manor et al., 2005)</td><td>0.10 / 0.25 / 0.09</td><td>0.09 / 0.14 / 0.02</td><td>0.10 /0.16 /0.05</td></tr><tr><td>AC (Gowda &amp; Krishna,1978)</td><td>0.11 / 0.23 / 0.07</td><td>0.10 /0.14/0.03</td><td>0.24 / 0.33 /0.14</td></tr><tr><td>NMF (Cai et al., 2009)</td><td>0.08/0.19 /0.03</td><td>0.08/0.12/0.03</td><td>0.10 / 0.18 /0.05</td></tr><tr><td>AE (Bengio et al., 2007)</td><td>0.24 /0.31/0.17</td><td>0.10 / 0.17 / 0.05</td><td>0.25 / 0.30 / 0.16</td></tr><tr><td>DAE (Vincent et al., 2010)</td><td>0.25/0.30 /0.16</td><td>0.11/0.15 /0.05</td><td>0.22/0.30 /0.15</td></tr><tr><td>DCGAN (Radford et al., 2016)</td><td>0.27 / 0.32 / 0.18</td><td>0.12/0.15/0.05</td><td>0.21/0.30 /0.14</td></tr><tr><td>DeCNN (Zeiler et al., 2010)</td><td>0.24 / 0.28 / 0.17</td><td>0.09 /0.13 /0.04</td><td>0.23 / 0.30 / 0.16</td></tr><tr><td>VAE (Kingma &amp; Welling,2013)</td><td>0.25 / 0.29 / 0.17</td><td>0.11 /0.15 / 0.04</td><td>0.20 /0.28 / 0.15</td></tr><tr><td>JULE (Yang et al., 2016)</td><td>0.19 / 0.27 /0.14</td><td>0.10 / 0.14 / 0.03</td><td>0.18 /0.28 /0.16</td></tr><tr><td>DEC (Xie et al.,2016)</td><td>0.26 /0.30 /0.16</td><td>0.14 / 0.19 /0.05</td><td>0.28 / 0.36 / 0.19</td></tr><tr><td>DAC (Chang et al., 2017)</td><td>0.40 /0.52 /0.30</td><td>0.19 /0.24/0.09</td><td>0.37 /0.47 /0.26</td></tr><tr><td>ADC (Haeusser et al., 2018)</td><td>- /0.33 / -</td><td>-/0.16/-</td><td>- /0.53 / -</td></tr><tr><td>DDC(Chang et al., 2019)</td><td>0.42 / 0.52 / 0.33</td><td>-/-/-</td><td>0.37 / 0.49 / 0.27</td></tr><tr><td>DCCM (Wu et al., 2019)</td><td>0.50 / 0.62 / 0.41</td><td>0.29 / 0.33 / 0.17</td><td>0.38 /0.48 / 0.26</td></tr><tr><td>IIC (Ji et al., 2019)</td><td>-/0.62 / -</td><td>-/0.26/ -</td><td>-/0.61/ -</td></tr><tr><td>PICA [Avg] (Huang et al., 2020)</td><td>0.56 /0.65 /0.47</td><td>0.30 / 0.32/ 0.16</td><td>0.59 / 0.69 / 0.50</td></tr><tr><td>PICA [Best] (Huang et al., 2020)</td><td>0.59 / 0.70 / 0.51</td><td>0.31/0.34/0.17</td><td>0.61 / 0.71/ 0.53</td></tr><tr><td>C2BIN [Avg] (Ours)</td><td>0.62/ 0.72/ 0.53</td><td>0.36/0.35 /0.20</td><td></td></tr><tr><td>C2BIN [Best] (Ours)</td><td></td><td>0.63 / 0.73 / 0.55</td><td>0.38 / 0.38 /0.22</td><td>0.62 /0.73 /0.55 0.64 / 0.75 / 0.57</td></tr><tr><td>2-step</td><td>SCAN (Gansbeke et al.,2020)</td><td>0.80 /0.88 /0.77</td><td>0.49/0.51/ 0.33</td><td>0.70 /0.81/0.65</td></tr></table>",
1718
+ "bbox": [
1719
+ 153,
1720
+ 511,
1721
+ 843,
1722
+ 858
1723
+ ],
1724
+ "page_idx": 15
1725
+ },
1726
+ {
1727
+ "type": "image",
1728
+ "img_path": "images/62b391a82242366d1e596384f00cd6d3fc5dd1c11dea8720e918413993bba38b.jpg",
1729
+ "image_caption": [
1730
+ "Figure 7: Top- $\\mathbf { \\nabla } \\cdot \\mathbf { k }$ retrieved images by C2BIN (Columns 2-6), SimCLR (Columns 7-11), and PICA (Columns 12-17) given the query image (Column 1) from the STL-10 test set where $k$ is set as $\\{ 1 , 2 , 1 0 , 5 0 , 1 0 0 \\}$ . "
1731
+ ],
1732
+ "image_footnote": [],
1733
+ "bbox": [
1734
+ 179,
1735
+ 137,
1736
+ 818,
1737
+ 494
1738
+ ],
1739
+ "page_idx": 16
1740
+ },
1741
+ {
1742
+ "type": "image",
1743
+ "img_path": "images/cbb6469ac391f97ff893f5fd69d87dc16f6a287ccd957cf7a8e7284614133755.jpg",
1744
+ "image_caption": [
1745
+ "Figure 8: Image retrieval performance on STL-10 datasets. "
1746
+ ],
1747
+ "image_footnote": [],
1748
+ "bbox": [
1749
+ 313,
1750
+ 612,
1751
+ 678,
1752
+ 776
1753
+ ],
1754
+ "page_idx": 16
1755
+ },
1756
+ {
1757
+ "type": "image",
1758
+ "img_path": "images/0e5478cefa9e16083db2462ed3ae509ed41faefe937c8fa0785b40775861737c.jpg",
1759
+ "image_caption": [
1760
+ "Figure 9: This figure shows a random samples of STL-10 test set images associated to the selected clusters from $k = 1 0$ cluster-branch. This visualization uses the experiment settings from unsupervised clustering experiment in Section 4.3. The border color enclosing each image indicates its ground-truth class. "
1761
+ ],
1762
+ "image_footnote": [],
1763
+ "bbox": [
1764
+ 191,
1765
+ 251,
1766
+ 802,
1767
+ 724
1768
+ ],
1769
+ "page_idx": 17
1770
+ },
1771
+ {
1772
+ "type": "image",
1773
+ "img_path": "images/893e3d28782e33599777fc55caa39373fa14f61423c492c37327b679e96683d0.jpg",
1774
+ "image_caption": [
1775
+ "Figure 10: This figure shows a random samples of STL-10 test set images associated to the selected clusters from $k = 4 0$ cluster-branch. This visualization uses the experiment settings identical to Figure 9.The border color enclosing each image indicates its ground-truth class. "
1776
+ ],
1777
+ "image_footnote": [],
1778
+ "bbox": [
1779
+ 199,
1780
+ 175,
1781
+ 795,
1782
+ 768
1783
+ ],
1784
+ "page_idx": 18
1785
+ },
1786
+ {
1787
+ "type": "image",
1788
+ "img_path": "images/d3995a1334225703584bca071fa4185b44bcdd3efd25c17b710504a42a17dd9d.jpg",
1789
+ "image_caption": [
1790
+ "Figure 11: This figure shows a random samples of STL-10 test set images associated to the selected clusters from $k = 1 6 0$ cluster-branch. This visualization uses the experiment settings identical to Figure 9. The border color enclosing each image indicates its ground-truth class. "
1791
+ ],
1792
+ "image_footnote": [],
1793
+ "bbox": [
1794
+ 212,
1795
+ 200,
1796
+ 794,
1797
+ 776
1798
+ ],
1799
+ "page_idx": 19
1800
+ }
1801
+ ]
parse/train/MRQJmsNPp8E/MRQJmsNPp8E_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MRQJmsNPp8E/MRQJmsNPp8E_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/NJS8kp15zzH/NJS8kp15zzH.md ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Rethinking Calibration of Deep Neural Networks: Do Not Be Afraid of Overconfidence
2
+
3
+ Deng-Bao Wang,1,2 Lei Feng,3 Min-Ling Zhang1,2∗
4
+
5
+ 1School of Computer Science and Engineering, Southeast University, Nanjing 210096, China
6
+ 2Key Laboratory of Computer Network and Information Integration (Southeast University), Ministry of Education, China 3College of Computer Science, Chongqing University, Chongqing, 400044, China wangdb@seu.edu.cn, lfeng@cqu.edu.cn, zhangml@seu.edu.cn
7
+
8
+ # Abstract
9
+
10
+ Capturing accurate uncertainty quantification of the predictions from deep neural networks is important in many real-world decision-making applications. A reliable predictor is expected to be accurate when it is confident about its predictions and indicate high uncertainty when it is likely to be inaccurate. However, modern neural networks have been found to be poorly calibrated, primarily in the direction of overconfidence. In recent years, there is a surge of research on model calibration by leveraging implicit or explicit regularization techniques during training, which achieve well calibration performance by avoiding overconfident outputs. In our study, we empirically found that despite the predictions obtained from these regularized models are better calibrated, they suffer from not being as calibratable, namely, it is harder to further calibrate these predictions with post-hoc calibration methods like temperature scaling and histogram binning. We conduct a series of empirical studies showing that overconfidence may not hurt final calibration performance if post-hoc calibration is allowed, rather, the penalty of confident outputs will compress the room of potential improvement in post-hoc calibration phase. Our experimental findings point out a new direction to improve calibration of DNNs by considering main training and post-hoc calibration as a unified framework.
11
+
12
+ # 1 Introduction
13
+
14
+ Modern over-parameterized deep neural networks (DNNs) have been shown to be very powerful modeling tools for many prediction tasks involving complex input patterns [37]. In addition to obtaining accurate predictions, it is also important to capture accurate quantification of prediction uncertainty from deep neural networks in many real-world decision-making applications. A reliable predictive model should be accurate when it is confident about its predictions and indicate high uncertainty when it is likely to be inaccurate. However, modern DNNs trained with cross-entropy (CE) loss, despite being highly accurate, have been recently found to predict poorly calibrated probabilities, unlike traditional models trained with the same objective [4]. The overconfident predictions of DNNs could cause undesired consequences in safety-critical applications such as medical diagnosis and autonomous driving. Bayesian DNNs, which indirectly infer prediction uncertainty through weight uncertainties, have innate abilities to represent the model uncertainty [2, 16]. But training and inferring those bayesian models are computationally more expensive and conceptually more complicated than non-bayesian models, and their performance depends on the form of approximation made due to computational constraints. Therefore, the study on uncertainty calibration of deterministic DNNs is important for both development practice and the perspective of understanding DNNs.
15
+
16
+ Post-hoc calibration addresses the miscalibration problem by equipping a given neural network with an additional parameterized calibration component, which can be tuned with a hold-out validation dataset. Guo et al. [4] experimented with several classical calibration fixes and found that simple post-hoc methods like Temperature Scaling (TS) [25] and Histogram Binning (HB) [33] are significantly effective for DNNs. The authors of [10] and [27] proposed to learn linear and non-linear transformation functions to rescale the original output logits respectively. Gupta et al. [5] proposed to obtain a calibration function by approximating the empirical cumulative distribution of output probabilities via splines. Kumar et al. [11] proposed to integrate TS with HB to achieve more stable calibration performance. Patel et al. [24] proposed a mutual information maximization-based binning strategy to solve the severe sample-inefficiency issue in HB.
17
+
18
+ Recently, there is another line of research which presents a possibility of improving the calibration quality of deterministic DNNs via regularization during training. Guo et al. [4] found that training DNNs with strong weight decay, which used to be the predominant regularization mechanism for training neural networks, has a positive impact on calibration. Müller et al. [19] showed that training models using the standard CE loss with label smoothing [28], instead of one-hot labels, has a very favourable effect on model calibration. Mukhoti et al. [18] proposed to improve uncertainty calibration by replacing the conventionally used CE loss with the focal loss proposed in [14] when training DNNs. It is important to note that CE loss with label smoothing and focal loss can be considered as standard CE with an additional maximum-entropy regularizer, which means minimizing these losses is equivalent to minimizing CE loss and maximizing the entropy of the predicted distribution simultaneously [18, 17]. Following these studies, a recent work [7] explored several explicit regularization techniques for improving the predictive uncertainty calibration directly.
19
+
20
+ In this paper, we conduct an empirical study showing that despite the predictions obtained from the regularized models are well calibrated, they suffer from worse calibratable, namely, it is harder to further improve the calibrate performance with post-hoc calibration methods like temperature scaling and histogram binning. We found that the regularization works by simply aligning the average confidence of the whole dataset to the accuracy with some specific regularization strengths, and cannot achieve fine-grained calibration. The comparison results show that when post-hoc calibration methods are allowed, the standard CE loss yields better calibration performance than those regularization methods. The extended experiments demonstrate that regularization will make DNNs lose the important information about the hardness of samples, which results in compressing the room of potential improvement by post-hoc calibration. Based on the experimental findings, we raise a natural question: can we design new loss functions in the opposite direction of these regularization methods to further improve the calibration performance? To this end, we propose inverse focal loss, and empirically found that it can learn more calibratable models in some cases compared with the CE loss, though it causes severer overconfidence problem without post-hoc calibration. Most importantly, our findings show that overconfidence of DNNs is not the nightmare in uncertainty qualification and point out a new direction to improve the calibration of DNNs by considering main training and post-hoc calibration as a unified framework.
21
+
22
+ # 2 Preliminaries
23
+
24
+ Let $\mathcal { V } = \{ { 1 , . . . , K } \}$ denote the label space and $\mathcal { X } = \mathbb { R } ^ { d }$ denote the feature space. Given a sample $( { \pmb x } , y ) \in \mathcal { X } \times \mathcal { Y }$ sampled from an unknown distribution, a learned neural network classifier $f ^ { \theta } :$ $\mathcal { X } \to \Delta ^ { K }$ can produce a probability distribution for $_ { \textbf { \em x } }$ on $K$ classes, where $\Delta ^ { K }$ denotes the $K - 1$ dimensional unit simplex. Here we assume $f ^ { \theta }$ as a composition of a non-probabilistic $K$ -way classifier $g ^ { \theta }$ and a softmax function $\sigma$ , i.e. $\dot { \pmb { f } } ^ { \theta } = \pmb { g } ^ { \theta } \circ \pmb { \sigma }$ . For a query instance $_ { \textbf { \em x } }$ , $f ^ { \theta }$ gives its probability of assigning it to label i as exp(g i P (x))Kk=1 exp(gθk(x)) , where $g _ { i } ^ { \theta } ( { \pmb x } )$ denotes the $i$ -th element of the logit vector produced by $g ^ { \theta }$ . Then, ${ \hat { y } } : = \arg \operatorname* { m a x } _ { i } f _ { i } ^ { \theta } ( { \pmb x } )$ can be returned as the predicted label and ${ \hat { p } } : = \operatorname* { m a x } _ { i } f _ { i } ^ { \theta } ( { \pmb x } )$ can be treated as the associated confidence score.
25
+
26
+ Expected Calibration Error (ECE) For a well-calibrated model, $\hat { p }$ is expected to represent the true probability of correctness. Formally, a perfectly calibrated model satisfies $\mathbb { P } ( \boldsymbol { \hat { y } } = \boldsymbol { y } | \boldsymbol { \hat { p } } = \boldsymbol { p } ) = \boldsymbol { p }$ for any $p \in [ 0 , 1 ]$ . In practice, ECE [20] is a commonly used calibration metric from finite samples. It works by firstly grouping all samples (let $n$ denote the number of samples) into $M$ equally interval bins betw $\{ \bar { B _ { m } } \} _ { m = 1 } ^ { M }$ with respect to their confideuracy and average confidence: c e. $\begin{array} { r } { \mathrm { E C E } = \sum _ { m = 1 } ^ { M } \frac { | B _ { m } | } { n } | \mathrm { a c c } ( B _ { m } ) - \mathrm { a v g } \mathrm { C o n f } ( B _ { m } ) | . } \end{array}$
27
+
28
+ Temperature Scaling By scaling the logits produced by $g ^ { \theta }$ with a temperature $T$ , the sharpness of output probabilities can be changed. Formally, after adding TS, the new prediction confidence can be expressed as: $\begin{array} { r } { \hat { p } = \operatorname* { m a x } _ { i } \frac { \exp ( g _ { i } ^ { \theta } ( \pmb { x } ) / T ) } { \sum _ { k = 1 } ^ { K } \exp ( g _ { k } ^ { \theta } ( \pmb { x } ) / T ) } } \end{array}$ . The temperature softens the output probability with and sharpens the probability with $T < 1$ . As , the output probability collapses to one-hot vector. As $T \to \infty$ , the output probability approaches to a uniform distribution. After training of the model, $T$ can be tuned on a hold-out validation set by optimization methods.
29
+
30
+ Histogram Binning is a non-parametric calibration approach. Given an uncalibrated model, all the prediction confidences of validation samples can be divided into mutually exclusive $N$ bins $\{ B _ { n } \} _ { n = 1 } ^ { N }$ according to a set of intervals $\{ I _ { n } \} _ { n = 1 } ^ { N + 1 }$ which partitions [0, 1]. Each bin is assigned a confidence score , which can be simply set to the corresponding accuracy of samples in each bin. If the uncalibrated confidence $\hat { p }$ of a query instance falls into bin $B _ { n }$ , then the calibrated confidence is $\eta _ { n }$ . The bins can be chosen by two simple schemes: equal size binning (uniformly partitioning the probability interval in $[ 0 , 1 ] \cdot$ ) and equal mass binning (uniformly distributing samples over bins). Note that although the HB scheme is simple to implement and was demonstrated to achieve good calibration results in some datasets, it makes the predictor only produce very sparse confidence distribution, and compromises the many legitimately confident predictions.
31
+
32
+ # 3 Regularization in Neural Networks for Calibration
33
+
34
+ In recent years, there is a surge of research on model calibration by leveraging implicit or explicit regularization techniques during training of DNNs, which makes better calibrated predictions by avoiding the overconfident outputs. In this section, we firstly review three representative regularization methods and then empirically show their improvements on ECE compared with the baseline.
35
+
36
+ Label Smoothing is widely used as a means to reduce overfitting of DNNs. The mechanism of LS is simple: when training with CE loss, the one-hot label vector $\textbf { { y } }$ is replaced with soft label vector $\widetilde { \pmb { y } }$ , whose elements can be formally denoted as $\widetilde { y _ { i } } = ( 1 - \epsilon ) y _ { i } + \epsilon / K , \forall i \in \{ 1 , . . . , K \}$ , where $\epsilon > 0$ e eis a strength coefficient. Müller et al. [19] demonstrated that label smoothing implicitly calibrates DNNs by preventing the networks from becoming overconfident. Let $\mathcal { L } _ { c e }$ denote the CE loss, then the following equation holds:
37
+
38
+ $$
39
+ \mathcal { L } _ { c e } ( \widetilde { \pmb { y } } , \pmb { f } ^ { \theta } ) = ( 1 - \epsilon ) \mathcal { L } _ { c e } ( \pmb { y } , \pmb { f } ^ { \theta } ) + \epsilon \mathcal { L } _ { c e } ( \pmb { u } , \pmb { f } ^ { \theta } )
40
+ $$
41
+
42
+ This can be simply proved. Therefore, minimizing CE loss between smoothed labels and the model outputs is equivalent to adding a confidence penalty term, i.e., a weighted CE loss between the uniform distribution $\textbf { \em u }$ and the model outputs, to the original CE loss.
43
+
44
+ $L _ { p }$ Norm in the Function Space is one of the explicit regularization methods for calibration investigated by the recent work [7]. For a real number $p \geq 1$ , the $L _ { p }$ Norm of a vector $_ { z }$ with dimension $n$ can be expressed as: $\begin{array} { r } { \| z \| _ { p } = ( \sum _ { i = 1 } ^ { n } | z _ { i } | ^ { p } ) ^ { 1 / p } } \end{array}$ . By adding $L _ { p }$ Norm of logits $g ^ { \theta }$ with a weighting coefficient $\alpha$ into final objective function, i.e. $\mathcal { L } _ { L _ { p } } ( y , f ^ { \theta } ) = \mathcal { L } _ { c e } ( y , f ^ { \theta } ) + \alpha \left\| g ^ { \theta } \right\| _ { p }$ , the function complexity of neural networks can be directly penalized during training.
45
+
46
+ Focal Loss is originally proposed to address the class imbalance problem in object detection. By reshaping the standard CE loss through weighting loss components of all samples according to how well the model fits them, focal loss focuses on fitting hard samples and prevents the easy samples from overwhelming the training procedure. Formally, for classification tasks where the target distribution is one-hot encoding, it is defined as: $\mathcal { L } _ { f } = - \dot { ( } 1 - f _ { y } ^ { \theta } ) ^ { \gamma } \log f _ { y } ^ { \theta }$ , where $\gamma$ is a predefined coefficient. Mukhoti et al. [18] found that the models learned by focal loss produce output probabilities which are already very well calibrated. Interestingly, they also showed that focal loss is an upper bound of the regularized KL-divergence, which can be expressed formally as follows:
47
+
48
+ $$
49
+ \mathcal { L } _ { f } \geq \mathrm { K L } ( \pmb { y } | | \pmb { f } ^ { \theta } ) - \gamma \mathrm { H } ( \pmb { f } ^ { \theta } )
50
+ $$
51
+
52
+ where $\operatorname { H } ( p )$ denotes the entropy of distribution $\pmb { p }$ . This upper bound property shows that replacing the CE loss with focal loss has the effect of adding a maximum-entropy regularizer.
53
+
54
+ # 3.1 Empirical Comparison
55
+
56
+ We conduct a comparison study of the above regularization methods on four commonly used datasets. We train ResNet-32 [6] models on SVHN [21], CIFAR-10/100 [9] and train a 8-layer 1D-CNN model on 20Newsgroups [13], using the standard CE loss and the above regularized losses respectively, with state-of-the-art learning policy settings (see implementation details in Appendix). For Norm regularization, we use $L _ { 1 }$ Norm, which has been shown effective for calibration despite its simple form [7]. Table 1 shows the comparison of these methods. Note that for each of the above three regularization methods, there is a coefficient, i.e., , $\alpha$ and $\gamma$ , controlling the strength of regularization. We conduct experiments using these methods with the following coefficient settings: $\{ 0 . 0 1 , 0 . 0 3 , 0 . 0 5 , 0 . 0 7 , 0 . 0 \bar { 9 } \}$ for label smoothing, $\{ 0 . 0 0 1 , 0 . 0 0 5 , 0 . 0 1 , 0 . 0 5 , 0 . 1 \}$ for $L _ { 1 }$ Norm and $\{ 1 , 3 , 5 , 7 , 9 \}$ for focal loss. And we choose the best coefficient for each method and dataset, according to their ECE directly on test data.
57
+
58
+ Table 1: Comparison results (mean±std) of ECE $( \% )$ with $M = 1 5$ and predictive accuracy $( \% )$ over 5 random runs. The values with underline in first row represent the chosen coefficients of each regularization method on four datasets according to the ECE on test data.
59
+
60
+ <table><tr><td></td><td></td><td>Cross-Entropy</td><td>Label Smoothing 0.01/0.05/0.09/0.09</td><td>L1Norm 0.01/0.05/0.01/0.01</td><td>Focal Loss 1/3/5/5</td></tr><tr><td rowspan="2">SVHN</td><td>ECE</td><td>3.03±0.16</td><td>1.84±0.19</td><td>1.85±0.04</td><td>1.01±0.21</td></tr><tr><td>Accuracy</td><td>95.00±0.27</td><td>95.21±0.23</td><td>95.29±0.13</td><td>94.77±0.19</td></tr><tr><td rowspan="2">CIFAR-10</td><td>ECE</td><td>6.43±0.22</td><td>2.72±0.32</td><td>2.93±0.39</td><td>3.00±0.26</td></tr><tr><td>Accuracy</td><td>90.46±0.23</td><td>90.09±0.41</td><td>90.06±0.59</td><td>87.84±0.17</td></tr><tr><td rowspan="2">CIFAR-100</td><td>ECE</td><td>19.53±0.36</td><td>2.27±0.48</td><td>8.07±0.44</td><td>2.34±0.35</td></tr><tr><td>Accuracy</td><td>64.64±0.43</td><td>63.73±0.67</td><td>63.07±0.29</td><td>60.36±0.44</td></tr><tr><td rowspan="2">20 Newsgroups</td><td>ECE</td><td>20.82±0.93</td><td>5.85±0.64</td><td>13.31±0.56</td><td>3.82±0.51</td></tr><tr><td>Accuracy</td><td>72.85±0.89</td><td>72.81±0.26</td><td>73.61±0.80</td><td>59.17±1.81</td></tr></table>
61
+
62
+ From the results of Table 1, it is obvious that the regularization methods significantly decrease the ECE on all datasets, compared with the standard CE loss. The prediction accuracy results are also reported. When the strength coefficients of $L _ { 1 }$ Norm and focal loss are large, their predictive performances are harmed. Especially, $L _ { 1 }$ Norm fails on CIFAR-100 and 20Newsgroups when $\alpha \ge 0 . 0 5$ , thus $\alpha$ is chosen from $\{ 0 . 0 0 1 , 0 . 0 0 5 , 0 . 0 1 \}$ on these two datasets.
63
+
64
+ # 4 Does Regularization Really Help Calibration?
65
+
66
+ As shown by the above empirical results, the regularization methods do help the calibration of DNNs during training, especially alleviate the overconfidence issue caused by the standard CE loss. In this section, we empirically investigate their calibration performance when integrating them with post-hoc calibration. After training, we use the post-hoc methods TS and HB to further calibrate the output probabilities. For TS, we simply search the best temperature in the temperature pool {0.01,0.02...,10} on the validation set (see data splits in Appendix). For HB, we use equal size binning scheme on the top-1 prediction of all classes with bin number set as 15. The experimental details used in this section are the same with those in Section 3.
67
+
68
+ Comparison Results Table 2 shows the comparison results of ECE with the help of TS and HB. We can see that: (1) The standard CE loss achieves the best calibration performance on most cases. (2) The searched temperatures of models trained with the CE loss are significantly higher than those of other losses, which indicates that CE loss causes higher predictive confidences. These results demonstrate that despite the regularized models can produce better calibrated predictions, it is harder to further improve them with post-hoc calibration methods after main training. In other words, the penalty of confident predictions will compress the room of potential improvement by post-hoc methods. We also conduct experiments on CIFAR-10 and CIFAR-100 using a deeper model ResNet-110 and similar comparison results are obtained (see Appendix Table A).
69
+
70
+ Coefficient Sensitivity Figure 1(a), 1(b) and 1(c) illustrate the ECEs of these three regularization methods with varied coefficient strengths. As we can see, since the complexity of the used datasets are different, the best coefficients of these methods markedly vary across the datasets, and a small change on these coefficients may cause large ECE increase. This means that we need to carefully choose the coefficient of each method when employing them on new datasets, to achieve good calibration. We can also observe that for SVHN, on which the accuracy is highest among four datasets, the regularization methods obtain lowest ECE with small coefficients. For CIFAR-100 and 20Newsgroups, on which the accuracy is relatively lower, the regularization methods need larger coefficients for better calibration. Based on this observation, we conduct another experiment for investigating the correlation between the regularization coefficients and accuracy. We learn networks on CIFAR-10 by controlling training data size, which leads to varied predictive accuracies, and choose the best coefficient for each case. Here, $\epsilon$ , $\alpha$ and $\gamma$ are chosen from $\{ 0 . 0 1 , 0 . 0 2 , . . . , 0 . 2 5 \}$ , $\{ 0 . 0 1 , 0 . 0 2 , . . . , 0 . 1 \}$ and $\{ 1 , 3 , 5 , 7 , 9 \}$ respectively. Figure 2(d) shows that with the increase of training data size, which results in increase of predictive accuracy, the best coefficients of the regularization methods keep decreasing.
71
+
72
+ Table 2: Comparison results (mean±std) of ECE $( \% )$ with $M = 1 5$ over 5 random runs. The coefficients of the regularization methods on each dataset are same with those in Table 1. N/N and $\diagup$ indicate that the average ECE of regularization methods are higher and lower than standard CE, where $\blacktriangle$ and $\boldsymbol { \vee }$ are based on two-sample t-test at 0.05 significance level.
73
+
74
+ <table><tr><td colspan="2"></td><td>Cross-Entropy</td><td>Label Smoothing 0.01/0.05/0.09/0.09</td><td>L1Norm 0.01/0.05/0.01/0.01</td><td>Focal Loss 1/3/5/5</td></tr><tr><td rowspan="3">SVHN</td><td>with TS Temperature</td><td>0.72±0.26 1.82</td><td>1.35±0.11 1.11</td><td>1.22±0.08 1.12</td><td>0.80±0.22 1.10</td></tr><tr><td>with HB</td><td>0.68±0.22</td><td>0.70±0.21</td><td>0.73±0.20</td><td>0.96±0.14</td></tr><tr><td>with TS Temperature</td><td>0.95±0.19 2.51</td><td>2.54±0.11 0.96</td><td>2.71±0.36</td><td>1.39±0.28</td></tr><tr><td rowspan="2">CIFAR-10</td><td>with HB</td><td>0.74±0.15</td><td>0.94±0.21</td><td>0.95 1.16±0.54</td><td>0.76 1.65±0.31</td></tr><tr><td>with TS Temperature</td><td>1.35±0.19 2.19</td><td>1.37±0.27 1.04</td><td>3.92±0.21</td><td>2.14±0.42</td></tr><tr><td rowspan="2">CIFAR-100</td><td>with HB</td><td>1.27±0.27</td><td>2.01±0.22</td><td>1.24 1.56±0.44</td><td>0.97 1.83±0.30</td></tr><tr><td>with TS</td><td>3.11±0.33</td><td>5.22±0.60</td><td>2.71±0.25</td><td>3.77±0.41</td></tr><tr><td rowspan="2">20 Newsgroups</td><td>Temperature</td><td>4.18</td><td>1.06</td><td>1.48</td><td>0.89</td></tr><tr><td>with HB</td><td>2.52±0.47</td><td>2.67±0.82</td><td>2.61±0.95</td><td>3.16±0.97</td></tr></table>
75
+
76
+ ![](images/dc28ce39124194e523cb322a5691e5dbda67d0d11c34ed73d324ccc32182fcab.jpg)
77
+ Figure 1: (a-c): ECE $( \% )$ with $M = 1 5$ of regularization methods with controlled regularization strength. (d): Best coefficients of regularization methods with respect to ECE with controlled training data size.
78
+
79
+ Reliability Diagram We use reliability diagram to visually represent the gap between predictive confidence and accuracy of each method. Due to the space limitation, here we only present the diagrams of CIFAR-10, and the rest figures are presented in Appendix. We can see that these visual results are similar with the comparison results of ECE reported in Table 2. Although the gap between confidence and accuracy is large when using the standard CE loss, it can be significantly diminished after using TS. However, the improvements of TS for the regularization methods are not obvious. Most importantly, no matter whether TS is used or not, the regularization methods suffer from overconfidence on samples which have high predictive uncertainty, especially on label smoothing and $L _ { 1 }$ Norm, which contradicts the traditional view. Combining with the observation in Figure 2(d), it is indicated that the regularization methods work by simply aligning the average predictive confidence of the whole dataset to the accuracy with some specific regularization strengths, and does not produce fine-grained calibration with respect to the difference of samples.
80
+
81
+ Impact of Validation Size We also wonder how does the validation data size impact the post-hoc calibration. Figure 3 shows the ECE results with controlled validation data size. We can see that quite low ECE can be obtained with only a small size of validation data when using TS, which offers high efficiency for practice development. Relatively, HB needs more validation samples to obtain better calibration performance. Nevertheless, the standard CE loss stably achieves better calibration across varied validation data size with both TS and HB.
82
+
83
+ ![](images/27966219feac50faf7c7caca796c0660612cfdd81581b6a556ebfa0cf0f27b7d.jpg)
84
+ Figure 2: Reliability diagrams of each methods (after TS calibration) on CIFAR-10. The results are chosen from one of the 5 random runs of Table 1. Darker color of bars indicates that more samples are assigned with the corresponding confidence intervals.
85
+
86
+ ![](images/d6d05b4aeef156c24bb978f3ec868ed4e45ea0130abecc85e4cbd7d333e3ab38.jpg)
87
+ Figure 3: ECE $( \% )$ (after post-hoc calibration) with of regularization methods with controlled validation data size.
88
+
89
+ # 5 From Calibrated to Calibratable: A Closer Look
90
+
91
+ The results reported in above section show the degradation of regularization methods when integrating them with post-hoc calibration methods, which indicates that though regularization helps DNNs obtain well-calibrated predictions, it makes these predictions worse calibratable. In this Section, we further investigate this phenomenon by a series of illustrative experiments. We firstly attempt to empirically understand the reason of the calibration degradation from the view of information loss. Then, we propose an inverse form of focal loss to give a closer look at the correlation between the loss functions used in training and the calibration performance. The implementation details used in this section are also the same with those in Section 3.
92
+
93
+ # 5.1 Information Loss of Regularized Models
94
+
95
+ ECE among Epochs We start by investigating the ECEs of temperature-scaled outputs over epochs during model training. To avoid the impact of the bias of validation data, we directly search the best temperature on test data in each training epoch. We denote the corresponding ECE with this searched temperature as optimal ECE, which is the lower bound of ECE with temperatures searched on validation data. Figure 4 shows the curves of optimal ECE during epochs using label smoothing with different smoothing coefficients. We can observe that the optimal ECE rises after some learning epochs: On SVHN and CIFAR-10, it starts to significantly rise around the 10th epoch, and on CIFAR-100 and 20Newsgroups, it tends to rise after 100 and 50 epochs, where the learning rate drops by a factor of 10. Another observation is that larger smoothing strength $\epsilon$ results in worse calibration performance and more remarkable (also earlier) ECE rising. According to the memorization effect [35], DNNs usually learn easy samples at the early stage of training and tend to fit the hard ones later.
96
+
97
+ ![](images/33c00a14094f2b53a1e6919bddc2dd98da1353492d763f7256f12cd39dba3625.jpg)
98
+ Figure 4: Curves of optimal ECE $( \% )$ during learning epochs using label smoothing with different coefficients. Dark colors show the mean results of 5 random runs and light colors show the ranges between minimal and maximum results of 5 runs.
99
+
100
+ ![](images/0ae6e6cf4cbd74214819296e296f6755197c03aceea1c5842458826ed114e888.jpg)
101
+ Figure 5: Histograms of maximum logits produced from models trained with different methods. Different colors of bars represent distributions of samples with different learned epochs. The first row and second row are results of CIFAR-10 and CIFAR-100 respectively.
102
+
103
+ Therefore, a simple conjecture for the ECE rising is that after some learning epochs, DNNs start to fit hard samples, at the same time the regularizer would penalize the confidences of easy samples, which makes the predictive confidences of those easy and hard samples difficult to be distinguished. Similar phenomenon is also observed when using $L _ { 1 }$ Norm (see Appendix Figure A(a-d)) except 20Newsgroups dataset, on which large norm coefficient will hurt the calibration. For focal loss (see Appendix Figure A(e-h)), the optimal ECEs trained with large regularization strengths keep high without the remarkable rising.
104
+
105
+ Histogram of Logits We use histograms to visualize what the patterns of model outputs learned with different methods look like. Before that, we define learned epoch 2 of an individual training sample as the epoch, since which the sample can be correctly classified till the final learning epoch. As we mentioned above, DNNs usually learn hard samples after easy ones, hence the learned epoch of a sample can be used to indicate its corresponding hardness degree to be learned. Based on this, we want to investigate if the samples with different hardness degrees can be distinguished by model itself after training. To this end, we record the learned epochs of all training samples of CIFAR-10 and CIFAR-100 during training and statistic the distributions of their maximum logit outputs (i.e. $\operatorname* { m a x } _ { i } g _ { i } ^ { \theta } ( { \pmb x } ) )$ ). As shown in Figure 5, the logits of models trained with the standard CE loss cover much larger ranges, and the regularization methods compress the distributions too tight without distinction between samples with different learned epochs, especially in label smoothing and $L _ { 1 }$ Norm. This visual observation further confirms that the regularization of DNNs works by only penalizing the confidence of the whole dataset to a low level with a specific regularization strength. This will result in loss of the important information about the hardness of samples as an undesirable side effects, and compress the room of potential improvement by post-hoc calibration. On the contrary, models trained with the standard CE loss manage to preserve this information to a certain extent during training, hence achieve better results after post-hoc calibration.
106
+
107
+ ![](images/2faab9556d8c6d6e4dedd9e2959d0614bc01c6bb24ba522a2a3c58f25b426b59.jpg)
108
+ Figure 6: (a): Visual representation of focal loss, CE loss and inverse focal loss. (b): Predictive accuracies $( \% )$ of different methods. (c): ECEs $( \% )$ with $M = 1 5$ of different methods without post-hoc calibration. (d): Searched temperatures on validation data. (e-f): ECEs $( \% )$ with $M = 1 5$ of different methods with the help of post-hoc calibration.
109
+
110
+ # 5.2 Is Cross-Entropy the Best for Calibration?
111
+
112
+ Based on our experimental findings, one natural question is that can we design some loss functions in the opposite direction of these regularization methods to further improve the calibration? For label smoothing and $L _ { p }$ Norm, we can simply set the regularization coefficients of these methods as negative values. However, we empirically found this will cause extremely low predictive accuracies even failures of training using only very small weighting coefficients. Fortunately, we can design an inverse version of focal loss without prediction degradation by mimicking the original focal loss3. Recall the form of focal loss, we see that it works by assigning larger weights to the samples with smaller confidences. This makes the optimizer pay more attention to those hard samples when updating model parameters. Actually, this weighting scheme also implicitly exists in the standard CE loss, and this can be expressed by the gradients of CE loss function w.r.t. model parameters $\theta$ :
113
+
114
+ $$
115
+ \frac { \partial \mathcal { L } _ { c e } ( y , f ^ { \theta } ( { \pmb x } ) ) } { \partial \theta } = - \frac { 1 } { f _ { y } ^ { \theta } ( { \pmb x } ) } \nabla _ { \theta } f _ { y } ^ { \theta } ( { \pmb x } )
116
+ $$
117
+
118
+ where the factor term $\frac { 1 } { f _ { y } ^ { \theta } ( { \pmb x } ) }$ indicates that samples with smaller confidences are weighted larger in gradient calculation. Opposite to the principle of focal loss, we propose inverse focal loss as follows:
119
+
120
+ $$
121
+ \mathcal { L } _ { \bar { f } } = - ( 1 + f _ { y } ^ { \theta } ) ^ { \bar { \gamma } } \log f _ { y } ^ { \theta }
122
+ $$
123
+
124
+ By a simple modification on the weighting term of original focal loss, the inverse focal loss assigns larger weights to the samples with larger output confidences. Similar with original focal loss, the choice of coefficient $\bar { \gamma }$ has a huge impact on the property of this loss. In Figure 6(a), we plot the curves of inverse focal loss with varied $\bar { \gamma }$ and also plot the standard CE loss and focal loss for comparison. We can see that different from the original focal loss, the curves of inverse focal loss are steeper when confidence is large, and larger $\bar { \gamma }$ gives steeper curves.
125
+
126
+ We conduct another experiment to evaluate the inverse focal loss, and also investigate what will happen when we increase its coefficient $\bar { \gamma }$ . Figure 6(c) shows the ECE results without post-hoc calibration. The ECEs of inverse focal loss are larger than CE and focal loss in most cases. This is consistent to our expectation since inverse focal loss aggravates the overconfidence issue of DNNs by weighting larger on the easy samples. Figure 6(e) and 6(f) show the ECE results with the help of post-hoc calibration. When using HB, the ECEs of inverse focal loss are worse than CE on SVHN and CIFAR-10, while better than CE on CIFAR-100. Generally speaking, there is no clear trend when we increase $\bar { \gamma }$ . More interesting results appear when using TS: (1) On CIFAR-10 and CIFAR-100, the ECE results of inverse focal loss are better than that of the standard CE loss; and (2) there is a descend-then-ascend trend from focal loss with $\gamma = 3$ to inverse focal loss with $\bar { \gamma } = 3$ . From these observations, we may say that the best loss function for calibration is varied across different tasks according to the characteristics of datasets. On SVHN, which is a relatively easy dataset, standard CE loss yields pretty good results; on CIFAR-10 and CIFAR-100, which is more complex and difficult, the best results are obtained using inverse focal loss; on 20Newsgroups, which has fewest training samples among four datasets, the best result is obtained when using focal loss with $\gamma = 1$ . The searched temperatures when using TS are presented in Figure 6(d). The increasing of best temperatures indicates that the overconfidence problem is severer when using inverse focal loss with larger $\bar { \gamma }$ . The predictive accuracies are presented in Figure 6(a). As is shown that inverse focal loss yields highly competitive results compared with the standard CE loss on SVHN, CIFAR-10 and CIFAR-100. On 20Newsgroups, when using large $\bar { \gamma }$ , the predictive performance of inverse focal loss is worse than the CE loss.
127
+
128
+ # 6 Related Work
129
+
130
+ In machine learning, calibration has long been studied [25, 33, 34, 22], and many classical methods, like Platt Scaling [25] and Histogram Binning [33], have been proposed in the literature. In recent years, deep neural networks trained with commonly used CE loss, have been empirically found to predict poorly calibrated probabilities. The early researches for this problem focus on bayesian models [2, 16, 3, 1], which indirectly infer prediction uncertainty through weight uncertainties. But training and inferring the bayesian DNNs are computationally more expensive and conceptually more complicated than deterministic DNNs. Therefore, the uncertainty qualification of the nonbayesian models has always been an important topic, which also attracts a lot of researchers from the perspective of understanding DNNs.
131
+
132
+ Guo et al. [4] systematically investigated the miscalibration problem of the deterministic DNNs and empirically compared several conventional post-hoc calibration fixes. Two key findings are suggested in their paper: (1) Increasing model capacity and regularization strength negatively affect the calibration. (2) Simple post-hoc methods like TS [25] and HB [33] can reduce the calibration error to a quite low level. Following their work, there is a surge of research that proposed new post-hoc calibration methods [10, 27, 5, 11, 24, 36, 26]. Different from post-hoc calibration methods, another line of research aims to learn calibrated networks during training by modifying the training process [29, 12, 8]. Thulasidasan et al. [29] found that DNNs trained with mixup are significantly better calibrated than DNNs trained in the regular fashion. Kumar et al. [12] proposed a RKHS kernel based measure of calibration that is efficiently trainable alongside the standard CE loss, which can minimize an explicit calibration error during training. Krishnan and Tichoo [8] introduced a differentiable accuracy versus uncertainty calibration loss function that allows a model to learn to provide well-calibrated uncertainties, in addition to improved accuracy. Recently, inspired by the findings in [4], several studies were proposed to leverage the regularization of DNNs to improve calibration performance during training [19, 18, 7]. As we described in Section 3, these implicit or explicit regularization techniques can improve calibration by penalizing the predictive confidences of DNNs. It is worth nothing that besides the studies on improving calibration performance, there are also several studies that focus on the measure of calibration performance [23, 31, 32, 5].
133
+
134
+ # 7 Conclusion
135
+
136
+ In this work, we investigate the uncertainty calibration problem of DNNs by a series of experiments. The empirical study shows that despite the predictions obtained from the regularized models are better calibrated, worse results would be obtained if we employ post-hoc calibration methods on these regularized models. Extended experiments demonstrate that the regularized DNNs will lose the important information about the hardness of samples, which results in the harm of post-hoc calibration. Based on the experimental observations, we design a new loss function in the opposite direction of previous regularization methods, and empirically show the superiority of this loss in calibration with the help of post-hoc methods, even though it causes severer overconfidence issue in the main training phase. Our findings suggest that overconfidence of DNNs is not the nightmare in model calibration and point out a new direction to improve the calibration performance of DNNs by considering main training and post-hoc calibration as a unified framework. Moreover, the study of the phenomena of deep learning uncertainty under distribution shift is very interesting as one of the future work, since the behaviour with distribution shifts might be most important in practice.
137
+
138
+ # 8 Acknowledgments
139
+
140
+ The authors wish to thank the anonymous reviewers for their helpful comments and suggestions. This work was supported by the National Science Foundation of China (62176055), the Postgraduate Research & Practice Innovation Program of Jiangsu Province (KYCX21_0151) and the China University S&T Innovation Plan Guided by the Ministry of Education. We thank the Big Data Center of Southeast University for providing the facility support on the numerical calculations in this paper.
141
+
142
+ # References
143
+
144
+ [1] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International Conference on Machine Learning, pages 1613–1622, 2015.
145
+ [2] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In International Conference on Machine Learning, pages 1050–1059, 2016.
146
+ [3] Alex Graves. Practical variational inference for neural networks. In Advances in Neural Information Processing Systems, pages 2348–2356, 2011.
147
+ [4] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, pages 1321–1330, 2017.
148
+ [5] Kartik Gupta, Amir Rahimi, Thalaiyasingam Ajanthan, Thomas Mensink, Cristian Sminchisescu, and Richard Hartley. Calibration of neural networks using splines. In International Conference on Representation Learning, 2021.
149
+ [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016.
150
+ [7] Taejong Joo and Uijung Chung. Revisiting explicit regularization in neural networks for well-calibrated predictive uncertainty. arXiv:2006.06399, 2021.
151
+ [8] Ranganath Krishnan and Omesh Tickoo. Improving model calibration with accuracy versus uncertainty optimization. In Advances in Neural Information Processing Systems, pages 18237– 18248, 2020.
152
+ [9] Alex Krizhevsky. Learning multiple layers of features from tiny images. In Tech Report, 2009.
153
+ [10] Meelis Kull, Miquel Perello Nieto, Markus Kängsepp, Telmo Silva Filho, Hao Song, and Peter Flach. Beyond temperature scaling: Obtaining well-calibrated multi-class probabilities with dirichlet calibration. In Advances in Neural Information Processing Systems, pages 12295–12305, 2019.
154
+ [11] Ananya Kumar, Percy S Liang, and Tengyu Ma. Verified uncertainty calibration. In Advances in Neural Information Processing Systems, pages 3787–3798, 2019.
155
+ [12] Aviral Kumar, Sunita Sarawagi, and Ujjwal Jain. Trainable calibration measures for neural networks from kernel mean embeddings. In International Conference on Machine Learning, pages 2805–2814, 2018.
156
+ [13] Ken Lang. Newsweeder: Learning to filter netnews. In International Conference on Machine Learning, pages 331–339, 1995.
157
+ [14] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In IEEE International Conference on Computer Vision, pages 2980–2988, 2017.
158
+ [15] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In International Conference on Neural Information Processing Systems, pages 1647–1657, 2018.
159
+ [16] Wesley J Maddox, Pavel Izmailov, Timur Garipov, Dmitry P Vetrov, and Andrew Gordon Wilson. A simple baseline for bayesian uncertainty in deep learning. In Advances in Neural Information Processing Systems, pages 13153–13164, 2019.
160
+ [17] Clara Meister, Elizabeth Salesky, and Ryan Cotterell. Generalized entropy regularization or: There’s nothing special about label smoothing. In Annual Meeting of the Association for Computational Linguistics, pages 6870–6886, 2020.
161
+ [18] Jishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz, Philip Torr, and Puneet Dokania. Calibrating deep neural networks using focal loss. In Advances in Neural Information Processing Systems, pages 15288–15299, 2020.
162
+ [19] Rafael Müller, Simon Kornblith, and Geoffrey E Hinton. When does label smoothing help? In Advances in Neural Information Processing Systems, pages 4696–4705, 2019.
163
+ [20] Mahdi Pakdaman Naeini, Gregory Cooper, and Milos Hauskrecht. Obtaining well calibrated probabilities using bayesian binning. In AAAI Conference on Artificial Intelligence, pages 2901–2907, 2015.
164
+ [21] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In Advances in Neural Information Processing Systems Workshops, 2011.
165
+ [22] Alexandru Niculescu-Mizil and Rich Caruana. Predicting good probabilities with supervised learning. In International Conference on Machine learning, pages 625–632, 2005.
166
+ [23] Jeremy Nixon, Michael W. Dusenberry, Linchuan Zhang, Ghassen Jerfel, and Dustin Tran. Measuring calibration in deep learning. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 38–41, 2019.
167
+ [24] Kanil Patel, William Beluch, Bin Yang, Michael Pfeiffer, and Dan Zhang. Multi-class uncertainty calibration via mutual information maximization-based binning. In International Conference on Representation Learning, 2021.
168
+ [25] John Platt et al. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in Large Margin Classifiers, 10(3):61–74, 1999.
169
+ [26] Amir Rahimi, Kartik Gupta, Thalaiyasingam Ajanthan, Thomas Mensink, Cristian Sminchisescu, and Richard Hartley. Post-hoc calibration of neural networks. arXiv:2006.12807, 2020.
170
+ [27] Amir Rahimi, Amirreza Shaban, Ching-An Cheng, Richard Hartley, and Byron Boots. Intra order-preserving functions for calibration of multi-class neural networks. In Advances in Neural Information Processing Systems, 2020.
171
+ [28] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2818–2826, 2016.
172
+ [29] Sunil Thulasidasan, Gopinath Chennupati, Jeff A. Bilmes, Tanmoy Bhattacharya, and Sarah Michalak. On mixup training: Improved calibration and predictive uncertainty for deep neural networks. In Advances in Neural Information Processing Systems, pages 13888–13899, 2019.
173
+ [30] Mariya Toneva, Alessandro Sordoni, Remi Tachet des Combes, Adam Trischler, Yoshua Bengio, and Geoffrey J. Gordon. An empirical study of example forgetting during deep neural network learning. In International Conference on Representation Learning, 2019.
174
+ [31] Juozas Vaicenavicius, David Widmann, Carl R. Andersson, Fredrik Lindsten, Jacob Roll, and Thomas B. Schön. Evaluating model calibration in classification. In International Conference on Artificial Intelligence and Statistics, pages 3459–3467, 2019.
175
+ [32] David Widmann, Fredrik Lindsten, and Dave Zachariah. Calibration tests in multi-class classification: A unifying framework. In Advances in Neural Information Processing Systems, pages 12236–12246, 2019.
176
+ [33] Bianca Zadrozny and Charles Elkan. Obtaining calibrated probability estimates from decision trees and naive bayesian classifiers. In International Conference on Machine Learning, pages 609–616, 2001.
177
+ [34] Bianca Zadrozny and Charles Elkan. Transforming classifier scores into accurate multiclass probability estimates. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 694–699, 2002.
178
+ [35] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Representation Learning, 2017.
179
+ [36] Jize Zhang, Bhavya Kailkhura, and T Yong-Jin Han. Mix-n-match: Ensemble and compositional methods for uncertainty calibration in deep learning. In International Conference on Machine Learning, pages 11117–11128, 2020.
180
+ [37] Zhi-Hua Zhou. Why over-parameterization of deep neural networks does not overfit? Science China Information Sciences, 64(1):1–3, 2021.
parse/train/NJS8kp15zzH/NJS8kp15zzH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Rd138pWXMvG/Rd138pWXMvG.md ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A STATISTICAL THEORY OF COLD POSTERIORS IN DEEP NEURAL NETWORKS
2
+
3
+ Laurence Aitchison
4
+ Department of Computer Science,
5
+ University of Bristol,
6
+ Bristol, UK, F94W 9Q
7
+ laurence.aitchison@bristol.ac.uk
8
+
9
+ # ABSTRACT
10
+
11
+ To get Bayesian neural networks to perform comparably to standard neural networks it is usually necessary to artificially reduce uncertainty using a “tempered” or “cold” posterior. This is extremely concerning: if the generative model is accurate, Bayesian inference/decision theory is optimal, and any artificial changes to the posterior should harm performance. While this suggests that the prior may be at fault, here we argue that in fact, BNNs for image classification use the wrong likelihood. In particular, standard image benchmark datasets such as CIFAR-10 are carefully curated. We develop a generative model describing curation which gives a principled Bayesian account of cold posteriors, because the likelihood under this new generative model closely matches the tempered likelihoods used in past work.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Recent work has highlighted that Bayesian neural networks (BNNs) typically have better predictive performance when we “sharpen” the posterior (Wenzel et al., 2020). In stochastic gradient Langevin dynamics (SGLD) (Welling & Teh, 2011), this can be achieved by multiplying the log-posterior by $1 \dot { / } T$ , where the “temperature”, $T$ is smaller than 1 (Wenzel et al., 2020). Broadly the same effect can be achieved in variational inference by “tempering”, i.e. downweighting the KL term. As noted in Wenzel et al. (2020), this approach has been used in many recent papers to obtain good performance, albeit without always emphasising the importance of this factor (Zhang et al., 2017; Bae et al., 2018; Osawa et al., 2019; Ashukha et al., 2020).
16
+
17
+ These results are puzzling if we take the usual Bayesian viewpoint, which says that the Bayesian posterior, used with the right prior, and in combination with Bayes decision theory should give optimal performance (Jaynes, 2003). Thus, these results may suggest we are using the wrong prior. While new priors have been suggested (e.g. Ober & Aitchison, 2020), they give only minor improvements in performance — certainly nothing like enough to close the gap to carefully trained non-Bayesian networks. In contrast, tempered posteriors directly give performance comparable to a carefully trained finite network.
18
+
19
+ The failure to develop an effective prior suggests that we should consider alternative explanations for the effectiveness of tempering. Here, we consider the possibility that it is predominantly (but not entirely) the likelihood, and not the prior that is at fault. In particular, we note that standard image benchmark datasets such as ImageNet and CIFAR-10 are carefully curated, and that it is important to consider this curation as part of our generative model. We develop a simplified generative model describing dataset curation which assumes that a datapoint is included in the dataset only if there is unanimous agreement on the class amongst multiple labellers. This model naturally multiplies the effect of each datapoint, and hence gives posteriors that closely match tempered or cold posteriors. We show that toy data drawn from our generative model of curation can give rise to optimal temperatures being smaller than 1. Our model predicts that cold posteriors will not be helpful when the original underlying labels from all labellers are available. While these are not available for standard datasets such as CIFAR-10, we found a good proxy: the CIFAR-10H dataset (Peterson et al., 2019), in which $\sim 5 0$ humans annotators labelled the CIFAR-10 test-set (we use these as our training set, and use the standard CIFAR-10 training set for test-data). As expected, we find strong cold-posterior effects when using the original single-label, which are almost entirely eliminated when using the 50 labels from CIFAR-10H. In addition, curation implies that each label is almost certain to be correct, which is one way to understand the statistical patterns exploited by cold posteriors. As such, if we destroy this pattern by adding noise to the labels, the cold posterior effect should disappear. We confirmed that with increasing label noise, the cold posterior effect disappears and eventually reverses (giving better performance at temperatures close to 1).
20
+
21
+ # 2 BACKGROUND: COLD AND TEMPERED POSTERIORS
22
+
23
+ Tempered (e.g. Zhang et al., 2017) and cold (Wenzel et al., 2020) posteriors differ slightly in how they apply the temperature parameter. For cold posteriors, we scale the whole posterior, whereas tempering is a method typically applied in variational inference, and corresponds to scaling the likelihood but not the prior,
24
+
25
+ $$
26
+ { \begin{array} { r } { \log \operatorname { P } _ { \mathrm { c o l d } } \left( \theta | X , Y \right) = { \frac { 1 } { T } } \log \operatorname { P } \left( X , Y | \theta \right) + { \frac { 1 } { T } } \log \operatorname { P } \left( \theta \right) + { \mathrm { c o n s t } } } \\ { \log \operatorname { P } _ { \mathrm { t e m p e r e d } } \left( \theta | X , Y \right) = { \frac { 1 } { \lambda } } \log \operatorname { P } \left( X , Y | \theta \right) + \ \log \operatorname { P } \left( \theta \right) + { \mathrm { c o n s t } } . } \end{array} }
27
+ $$
28
+
29
+ While cold posteriors are typically used in SGLD, tempered posteriors are usually targeted by variational methods. In particular, variational methods apply temperature scaling to the KL-divergence between the approximate posterior, $\mathrm { ~ Q ~ } ( \theta )$ and prior,
30
+
31
+ $$
32
+ \mathcal { L } = \mathbb { E } _ { \mathrm { Q } ( \theta ) } \left[ \log \mathrm { P } \left( X , Y | \theta \right) \right] - \lambda \operatorname { D } _ { \mathrm { K L } } \left( \mathrm { Q } \left( \theta \right) | | \mathrm { P } \left( \theta \right) \right) .
33
+ $$
34
+
35
+ Note that the only difference between cold and tempered posteriors is whether we scale the prior, and if we have Gaussian priors over the parameters (the usual case in Bayesian neural networks), this scaling can be absorbed into the prior variance,
36
+
37
+ $$
38
+ \textstyle \frac { 1 } { T } \log \mathrm { P } _ { \mathrm { c o l d } } \left( \theta \right) = - \frac { 1 } { 2 T \sigma _ { \mathrm { c o l d } } ^ { 2 } } \sum _ { i } \theta _ { i } ^ { 2 } + \mathrm { c o n s t } = - \frac { 1 } { 2 \sigma _ { \mathrm { t e n p r e d } } ^ { 2 } } \sum _ { i } \theta _ { i } ^ { 2 } + \mathrm { c o n s t } = \log \mathrm { P } _ { \mathrm { c o l d } } \left( \theta \right) .
39
+ $$
40
+
41
+ in which case, $\sigma _ { \mathrm { c o l d } } ^ { 2 } = \sigma _ { \mathrm { t e m p e r e d } } ^ { 2 } / T$ , so the tempered posteriors we discuss are equivalent to cold posteriors with rescaled prior variances.
42
+
43
+ # 3 METHODS: A GENERATIVE MODEL FOR CURATED DATASETS
44
+
45
+ Standard image datasets such as CIFAR-10 and ImageNet are carefully curated to include only unambiguous examples of each class. For instance, in CIFAR-10, student labellers were paid per hour (rather than per image), were instructed that “It’s worse to include one that shouldn’t be included than to exclude one”, and then Krizhevsky (2009) “personally verified every label submitted by the labellers”. For ImageNet, Deng et al. (2009) required the consensus of a number of Amazon Mechanical Turk labellers before including an image in the dataset.
46
+
47
+ To understand the statistical patterns that might emerge in these curated datasets, we consider a highly simplified generative model of consensus-formation. In particular, we draw a random image $X$ from some underlying distribution over images, P $( X )$ , and ask $S$ humans to assign a label, $\{ { \check { Y _ { s } } } \} _ { s = 1 } ^ { S }$ (e.g. using Mechanical Turk). We force every labeller to label every image and if the image is ambiguous they are instructed to give a random label. If all the labellers agree, $Y _ { 1 } = Y _ { 2 } = \cdot \cdot \cdot = Y _ { S }$ , consensus is reached and we include the datapoint in the dataset. If any of the labellers disagree consensus is not reached, and we exclude the datapoint (Fig. 1), Formally, the observed random variable, $Y$ , is taken to be the usual label if consensus was reached and None if consensus was not reached (Fig. 2B),
48
+
49
+ $$
50
+ Y | \{ Y _ { s } \} _ { s = 1 } ^ { S } = { \left\{ \begin{array} { l l } { Y _ { 1 } } & { { \mathrm { i f ~ } } Y _ { 1 } = Y _ { 2 } = \cdots = Y _ { S } } \\ { { \mathrm { N o n e } } } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
51
+ $$
52
+
53
+ Taking the human labels, $Y _ { s }$ , to come from the set $\mathcal { V }$ , so $Y _ { s } \in \mathcal { V }$ , the consensus label, $Y$ , could be any of the underlying labels in $\mathcal { V }$ , or None if no consensus is reached, so $Y \in \mathcal { Y } \cup \{ \mathrm { N o n e } \}$ . When consensus was reached, the likelihood is,
54
+
55
+ $$
56
+ \mathrm { ~ P ~ } ( Y = y | X , \theta ) = \mathrm { P ~ } \big ( \{ Y _ { s } = y \} _ { s = 1 } ^ { S } | X , \theta \big ) = \prod _ { s = 1 } ^ { S } \mathrm { ~ P ~ } ( Y _ { s } = y | X , \theta ) = \mathrm { P ~ } ( Y _ { s } = y | X , \theta ) ^ { S }
57
+ $$
58
+
59
+ ![](images/1888db95f5903396d3888a0872a3828b8b9064931e4ade3cdc640bc00dcf7710.jpg)
60
+ Figure 1: A simple example of our generative process describing dataset curation, with $S = 3$ . Labellers have the task of classifying images as cats or dogs. The first image is unambiguously a cat, so the three labellers agree, consensus is reached, and the image is included in the dataset. The second image is unambiguously a dog, the labellers agree, consensus is reached, and the image is included in the dataset. However, the third image is ambiguous: the labellers disagree, consensus is not reached, and the image may be excluded from the dataset.
61
+
62
+ where we have assumed labellers are IID. This would appear to directly give an account of tempering, as we have taken the single-labeller likelihood to the power $S$ , which is equivalent to setting $\lambda = 1 / S$ . However, to see how the full generative model functions we need to go on to consider the case in which consensus was not reached,
63
+
64
+ $$
65
+ \mathrm { P } \left( \boldsymbol { Y } = \mathrm { N o n e } | \boldsymbol { X } , \theta \right) = 1 - \sum _ { y \in \mathcal { Y } } \mathrm { P } \left( \boldsymbol { Y } = y | \boldsymbol { X } , \theta \right) = 1 - \sum _ { y \in \mathcal { Y } } \mathrm { P } \left( Y _ { s } = y | \boldsymbol { X } , \theta \right) ^ { \boldsymbol { S } } .
66
+ $$
67
+
68
+ To understand the impact of our model of consensus formation, note that the probability of a particular class-label can be separated into two terms, a probability of consensus, and the probability of a particular class given that consensus was reached,
69
+
70
+ $$
71
+ \mathrm { P } \left( Y = y | X , \theta \right) = \mathrm { P } \left( Y = y | Y \neq \mathrm { N o n e } , X , \theta \right) \mathrm { P } \left( Y \neq \mathrm { N o n e } | X , \theta \right) .
72
+ $$
73
+
74
+ Remarkably, knowing there was consensus gives us information about the weights, even in the absence of the class label,
75
+
76
+ $$
77
+ \mathrm { P } \left( \boldsymbol { Y } \neq \mathrm { N o n e } | \boldsymbol { X } , \boldsymbol { \theta } \right) = \sum _ { \boldsymbol { y } \in \mathcal { V } } \mathrm { P } \left( Y _ { s } = \boldsymbol { y } | \boldsymbol { X } , \boldsymbol { \theta } \right) ^ { S } ,
78
+ $$
79
+
80
+ in essence, telling us that the output probability was close to 1 for one of the class labels, without telling us which one. Schematically (Fig. 3), we see that the datapoints with a consensus class-label, “cat” or “dog”, lie far from the decision boundary where the class is unambiguous, and consensus is easily reached. In contrast, in regions close to the decision boundary the inputs are ambiguous, which tends to produce disagreement in the labellers, leading to noconsensus. Thus, the existence of one or more consensus points in a region implies that decision boundaries do not go through that region, giving us information about the decision boundary location, even if the label is not known. Concurrent work has shown that this likelihood can be used to explain classical semi-supervised likelihoods (Aitchison, 2020), so this term really does give information about the neural network parameters. Finally, the label probability, conditioned on consensus,
81
+
82
+ $$
83
+ \mathrm { \ P } \left( \boldsymbol { Y } = y | \boldsymbol { Y } \neq \mathrm { \ " { N o n e } } , \boldsymbol { X } , \theta \right) = \frac { \mathrm { \ P } \left( \boldsymbol { Y } = y | \boldsymbol { X } , \theta \right) } { \mathrm { \ P } \left( \boldsymbol { Y } \neq \mathrm { \ " { N o n e } } | \boldsymbol { X } , \theta \right) } = \frac { \mathrm { \ P } \left( Y _ { s } = y | \boldsymbol { X } , \theta \right) ^ { S } } { \sum _ { y \in \mathcal { Y } } \mathrm { \ P } \left( Y _ { s } = y | \boldsymbol { X } , \theta \right) ^ { S } }
84
+ $$
85
+
86
+ simply represents a “reparameterised” softmax.
87
+
88
+ In datasets where the noconsensus inputs are known it is clear we should use the full likelihood, (Eq. 6 and 7). The question is: in real-world datasets, where we only know the consensus inputs and the noconsensus inputs have been thrown away (Fig. 2C), can we use Eq. (10), a reparameterisation of the softmax-categorical probabilities, for the known consensus points? The answer is no because in Bayesian inference, we do not get to just pick a sensible-looking conditional probability distribution, such as Eq. 10, to use as the likelihood. Instead, we need to write down the full generative model,
89
+
90
+ $$
91
+ \begin{array} { r } { \begin{array} { l } { \mathbf { A } \quad ^ { X } \sum _ { \substack { Y } } \qquad \mathbf { B } \quad ^ { X } \sum _ { \substack { \left\{ Y _ { s } \right\} _ { s = 1 } ^ { S } \longrightarrow Y } } \mathbf { C } \quad ^ { X } \sum _ { \substack { \left\{ Y _ { s } \right\} _ { s = 1 } ^ { S } \longrightarrow Y } } Z } \end{array} } \end{array}
92
+ $$
93
+
94
+ Figure 2: A The standard generative model for supervised tasks, assuming no data curation. B Generative model of data curation, where the consensus and noconsensus images are known. C Generative model of data curation, where the noconsensus images are unknown. The underlying images, $X$ are no longer observed. Instead, we observe $Z$ , where $Z = X$ if consensus is reached $( Y _ { 1 } = Y _ { 2 } = \cdot \cdot \cdot = Y _ { S } ) $ ) and $Z =$ None otherwise.
95
+
96
+ and marginalise over unknown latents. To write down the generative model in the case of unknown noconsensus images (Fig. 2C), we need to take $X$ to be an unobserved latent variable, and take $Z$ to be an observed random variable,
97
+
98
+ $$
99
+ Z | X , \{ Y _ { s } \} _ { s = 1 } ^ { S } = { \left\{ \begin{array} { l l } { X } & { { \mathrm { i f ~ } } Y _ { 1 } = Y _ { 2 } = \cdots = Y _ { s } } \\ { { \mathrm { N o n e } } } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
100
+ $$
101
+
102
+ which is the underlying image, $X$ , if consensus is reached, and None otherwise. As $Z$ depends on $\theta$ (Fig. 2C), we cannot take the usual shortcut of using P $( Y | Z , \theta )$ ; we must instead use the full likelihood, P $( Y , Z | \theta )$ ,
103
+
104
+ $$
105
+ \begin{array} { l } { { \displaystyle { \mathrm { ~ P ~ } } ( Y , Z | \theta ) = \sum _ { \{ Y _ { s } \} _ { s = 1 } ^ { s } } \int d X { \mathrm { ~ P ~ } } ( X , Y , \{ Y _ { s } \} _ { s = 1 } ^ { S } , Z | \theta ) } \ ~ } \\ { { \displaystyle ~ = \sum _ { \{ Y _ { s } } \} _ { s = 1 } ^ { s } \int d X { \mathrm { ~ P ~ } } ( X ) \left[ \prod _ { s = 1 } ^ { s } { \mathrm { ~ P ~ } } ( Y _ { s } | X , \theta ) \right] { \mathrm { ~ P ~ } } \left( Y | \{ Y _ { s } \} _ { s = 1 } ^ { S } \right) { \mathrm { ~ P ~ } } \left( Z | X , \{ Y _ { s } \} _ { s = 1 } ^ { S } \right) . } } \end{array}
106
+ $$
107
+
108
+ for $y$ not None,
109
+
110
+ $$
111
+ \mathrm { P } \left( Y = y | \{ Y _ { s } \} _ { s = 1 } ^ { S } \right) = \{ 1 \quad \mathrm { i f } \ Y _ { s } = y \ \mathrm { f o r } \ a l l \ s \in \{ 1 , \ldots , S \} \nonumber
112
+ $$
113
+
114
+ and,
115
+
116
+ $$
117
+ \mathrm { P } \left( Z | X , \{ Y _ { s } \} _ { s = 1 } ^ { S } \right) = \left\{ { \begin{array} { l l } { \delta ( Z - X ) } & { { \mathrm { i f } } \ Y _ { 1 } = Y _ { 2 } = \cdots = Y _ { S } } \\ { \mathbb { I } _ { Z = \mathrm { N o n e } } } & { { \mathrm { o t h e r w i s e } } } \end{array} } \right.
118
+ $$
119
+
120
+ where $\delta$ is the Dirac-delta function, and where the indicator function, $\mathbb { I } _ { Z = \mathrm { N o n e } }$ is 1 if $Z = { \mathrm { N o n e } }$ and 0 otherwise. Substituting Eq. (13) and Eq. (14) into Eq. (12),
121
+
122
+ $$
123
+ \mathrm { P } \left( Y = y , Z | \theta \right) = \mathrm { P } \left( X \right) \prod _ { s = 1 } ^ { S } \mathrm { P } \left( Y _ { s } = y | X , \theta \right) \propto \mathrm { P } \left( Y _ { s } = y | X , \theta \right) ^ { S } ,
124
+ $$
125
+
126
+ where the proportionality arises because $\mathrm { ~ P ~ } ( X )$ does not depend on the parameters of interest, $\theta$ . Note that this is proportional to Eq. (6) above, and not Eq. (10), so this does not just represent a reparameterisation of the softmax.
127
+
128
+ Finally, this explanation for the cold posterior effect would suggest that we would see cold posteriors even in maximum a-posteriori (MAP) inference, as we confirm in Appendix A. This is expected as it is “common knowledge” (but we do not know of a good reference) that while weight-decay is closely related to MAP inference with Gaussian priors, the best performing value of the weight decay coefficient tend to be lower than those suggested by untempered MAP inference.
129
+
130
+ # 4 DIFFERENCES BETWEEN COLD POSTERIOR AND DATASET CURATION SETUPS
131
+
132
+ Our model of data curation provides a direct explanation for the effectiveness of cold posteriors, as Eq. (6) takes the underlying likelihoods, P $( Y _ { s } | X , \theta )$ to the power $S$ , which has exactly the same
133
+
134
+ ![](images/90aaf18bfe6e1ae2dba806df55b473bb9193a9825b061e6670d26ab17e703a08.jpg)
135
+ Figure 3: Illustrative example of artificial clustering induced in the dataset by rejection of ambiguous no-consensus points. The input points for “cat” and “dog” classes are generated from separate 2D Gaussian distributions, and the classifier (and decision boundary) comes from the ratio of the Gaussian probability density functions. For the consensus processes, we used $S = 7$ (we used a relatively large value to make the effects unambiguous).
136
+
137
+ effect as $1 / \lambda$ in tempered posteriors (Eq. 2). However, it is important to note two differences between the cold posterior setup and the ideal setup for our generative model. First, our generative model assumes that the noconsensus points are known, or if they are unknown, we can compute the integral,
138
+
139
+ $$
140
+ \mathrm { P } \left( Y = \mathrm { N o n e } , Z = \mathrm { N o n e } | \theta \right) = \int d X \mathrm { ~ P ~ } ( X ) \left( 1 - \sum _ { y \in \mathcal { Y } } \mathrm { P } \left( Y _ { s } = y | X , \theta \right) ^ { S } \right)
141
+ $$
142
+
143
+ which is obtained by evaluating Eq. (12) in the case where $Y { = } \mathrm { N o n e }$ , and substituting Eq. (7). Of course, in reality it is not possible to compute this integral because we do not know the underlying $\mathrm { ~ P ~ } ( X )$ (and usually, we do not even have samples from this distribution). In contrast, the standard cold-posterior setup entirely ignores these terms. Second, in the usual setting, the test data is also subject to the same consensus-formation process, in which case, we should use Eq. (10) for prediction. In contrast, in the standard cold-posterior setting, we use the single-labeller distribution, P $( Y _ { s } | X , \theta )$ . (Note that if the test-set was drawn “from the wild”, without dataset curation, and labelled by a single labeller, then we should use $\mathrm { P }$ $( Y _ { s } | X , \theta )$ for prediction). Overall then, while our model of data curation offers a potential explanation of the benefits of tempering, the differences in setup imply that we cannot expect $\lambda ^ { * } = \bar { 1 } / S$ , to hold exactly, where $\lambda ^ { * }$ is the optimal temperature, and this is confirmed in our results on toy data below.
144
+
145
+ # 5 RESULTS
146
+
147
+ # 5.1 DATA SAMPLED FROM A KNOWN GAUSSIAN PROCESS MODEL
148
+
149
+ In the introduction, we took it as given that if the prior is correct, the optimal approach is to use the true Bayesian posterior, avoiding either tempering or cold posteriors. To check that this is indeed the case, we tested the performance, measured as test-log-likelihood for tempered posteriors using data generated from a known Gaussian process model. We uniformly generated 50 input points on the 1D interval [-10, 10], and used a Gaussian process with squared exponential kernel with a standard deviation of 4, and kernel bandwidth of 1. For inference, we used reparameterised VI, with an approximate posterior given by multiplying the prior by a single Gaussian factor for each datapoint (Ober & Aitchison, 2020).
150
+
151
+ In particular, we used a Gaussian process prior for the function values, $\mathbf { u }$ , at the training inputs (Williams & Rasmussen, 2006),
152
+
153
+ $$
154
+ \mathrm { P } \left( \mathbf { f } | \mathbf { x } \right) = \mathcal { N } \left( \mathbf { f } ; \mathbf { 0 } , \mathbf { K } ( \mathbf { x } ) \right)
155
+ $$
156
+
157
+ and we use an approximate posterior (Hensman et al., 2015; Matthews et al., 2016; Ober & Aitchison, 2020) defined by multiplying the prior by a Gaussian with diagonal covariance, where we treat $\mathbf { v }$ and
158
+
159
+ ![](images/4c01ef1eb35b9ce4997f69c0fa9bc8c2ba98d8a89c788c684687ba54f1d4d212.jpg)
160
+ Figure 4: Tempering with data generated from a toy Gaussian process model. A Performance of tempered posteriors on GP regression. The green dashed line highlights $\lambda = 1$ . The black line represents the mean of 20 runs (translucent blue lines). B GP classification. C GP classification with our model of consensus formation. We train and test using our exact log-likelihood, and we include knowledge of the no-consensus input datapoints in the datasets. D Data generated from our model of consensus formation, with $S = 4$ . Training uses $\mathrm { ~ P ~ } ( Y _ { s } | X , \theta )$ log-likelihood (excluding noconsensus points), but testing uses the exact test-log-likelihood (Eq. 6 and 7). The red dashed line lies at $\lambda = 1 / S = 1 / 4$ . E Data generated from our model of consensus formation, with $S = 4$ . Training and testing follow the standard cold-posterior setup, excluding noconsensus points and using $\mathrm { ~ P ~ } ( Y _ { s } | \bar { X } , \theta )$ . The $\mathbf { X }$ -axis gives the number of labellers in the underlying generative process, and the y-axis gives the reciprocal of the optimal temperature. F Plots underlying $\mathbf { E }$ . The red dashed lines indicate $\lambda = 1 / S$ .
161
+
162
+ $\Lambda ^ { - 1 }$ as variational parameters.
163
+
164
+ $$
165
+ \mathrm ~ Q ( \mathbf { f } ) \propto \mathrm { P ( \mathbf { f } | x ) } \mathcal { N } ( \mathbf { v } ; \mathbf { f } , \mathbf { A } ^ { - 1 } ) = \mathcal { N } ( \mathbf { f } ; \Sigma \mathbf { A } \mathbf { v } , \Sigma ) \quad \mathrm { ~ w h e r e ~ } \quad \Sigma = ( \mathbf { K } ^ { - 1 } ( \mathbf { x } ) + \mathbf { A } ) ^ { - 1 }
166
+ $$
167
+
168
+ Note that this captures the true posterior in the case of regression (where $\mathbf { v }$ is set to $\mathbf { y }$ and $\Lambda ^ { - 1 }$ is the output noise covariance; Ober & Aitchison, 2020). We then optimize the tempered ELBO (e.g. Zhang et al., 2017),
169
+
170
+ $$
171
+ \mathcal { L } = \mathbb { E } _ { \mathrm { Q } ( \mathbf { f } ) } \left[ \log \mathrm { P } \left( \mathbf { y } | \mathbf { f } \right) + \lambda \left( \log \mathrm { P } \left( \mathbf { f } | \mathbf { x } \right) - \log \mathrm { Q } \left( \mathbf { f } \right) \right) \right] .
172
+ $$
173
+
174
+ And we used the standard GP approach for prediction at test points (Williams & Rasmussen, 2006).
175
+
176
+ Initially, we tried using standard regression and classification generative models, without including our model of consensus formation. Unsurprisingly, $\lambda = 1$ , corresponding to the Bayesian posterior, is optimal for GP regression (Fig. 4A) and classification (Fig. 4B). For GP regression, we use a Gaussian likelihood with standard deviation 1, and for classification, we use a standard sigmoid probability with a Bernoulli likelihood.
177
+
178
+ Next, we confirmed that even under our new, more complex generative model of dataset curation $\lambda = 1$ was still optimal (Fig. 4C), if we trained and tested using the correct form for the loglikelihood. In particular, we considered no-consensus inputs as known and used Eq. 7 to incorporate their likelihood. However, in standard benchmarks, only the consensus inputs are known. As such, next we generated curated data, trained using $\mathrm { ~ P ~ } ( Y _ { s } | X , \theta )$ and ignoring noconsensus points, but tested on the correct likelihood, including noconsensus points (Fig. 4D); the optimal temperature remains around 1. Finally, we considered the standard cold/tempered posterior setup, where we use P $( Y _ { s } | X , \theta )$ , excluding noconsensus points, for training and testing. The optimal $\lambda$ indeed fell with $S$ (Fig. 4EF), giving a potential explanation for the cold posterior effect. As expected, we have $S \approx 1 / \lambda ^ { * }$ , but the relation does not appear to hold exactly due to the mismatches discussed in Sec. 4. Finally, we show in Appendix B that the same patterns emerge in a Bayesian neural network, using Langevin sampling for inference.
179
+
180
+ ![](images/dc5a6a0021a5091a5bdb260de16a54e28ef714bd09aa6c37c0ae0f40134b5552.jpg)
181
+ Figure 5: A Test log-likelihood with tempering. B Change in test log-likelihoods from the baseline at $\lambda = 1$ . We see standard cold posterior effects at low noise levels, which reverse at higher noies levels. C, D As A, B but for test accuracy.
182
+
183
+ # 5.2 CURATED AND UNCURATED GALAXY ZOO DATASETS
184
+
185
+ The most direct test of our theory is to evaluate the cold-posterior effect on real-world curated and uncurated datasets. To this end, we used the Galazy Zoo 2 dataset (Willett et al., 2013), as the original dataset is not “curated” in our sense (the criteria for inclusion were e.g. brightness) and the dataset gives classifications from $\sim 5 0$ labellers. We used a reduced label set for simplicity (see Appendix C). For the uncurated dataset, we selected 12500 points at random from the full dataset, and for the curated dataset, we selected the 12500 most confident points (defined in terms of labeller agreement), such that the correct class-balance was maintained. These datasets were split at random into 2500 training points and 10000 test points. Note that using our generative model directly would lead to drastically different class-balance in the curated and uncurated datasets, due to different levels of certainty for different classes. To perform probabilistic inference, we used SGLD with code adapted from (Zhang et al., 2019). In particular, we used their standard settings of a ResNet18, momentum of 0.9, and a cyclic cosine learning rate schedule. Due to the smaller size of our training set, we used longer cycles (600 epochs rather than 50), and more cycles (8 rather than 4).
186
+
187
+ As expected, we found that performance on curated data was far better than that on uncurated data, both in terms of test log-likelihood and test accuracy (Fig. 5AC). We found some cold-posterior effects in uncurated data, which is not surprising because there may be other causes of cold-posteriors such as model-mismatch or biases in SGLD. Critically though, we found much stronger cold-posterior effects for curated data than for uncurated data (Fig. 5BD). Moreover, these plots tend to understate the differences between curated and uncurated data. In particular, the proportional changes to the test-log-likelihood (which has an upper bound of zero) and the test error is for curated data is very large, with both changing by a factor of $\sim 3$ as temperature falls. In contrast, proportional changes for test-log-likelihood and test-error are much smaller (only $\sim 2 0 \%$ ).
188
+
189
+ # 5.3 CIFAR-10H
190
+
191
+ One prediction made by our framework is that if we had access to the original underlying human labels on the full dataset, including images that were rejected because consensus was not reached, then tempering should not be necessary. Obviously, all this additional information is not available for standard datasets such as CIFAR-10. However, we are able to get close by considering the CIFAR-10H dataset (Peterson et al., 2019). The authors of this work asked around 50 human labellers to label the CIFAR-10 test-set. As we might expect given the careful curation that went in to creating the original CIFAR-10 dataset (Krizhevsky, 2009), for almost half of the datapoints, all $\sim 5 0$ labellers agreed, and more than three-quarters of images had 2 or fewer disagreements (corresponding to $4 \%$ ) of labellers (Fig. 6A). While it is not possible to estimate $S$ without having information about the unknown image distribution, the high level of agreement would indicate that the effective value of $S$ is large — potentially even larger than 10.
192
+
193
+ Next, we trained a neural network on the $\sim 5 0$ labels provided by the CIFAR-10H dataset. As these labels are provided for the test-set with 10,000 images, this required us to swap the identities of the test and training sets (so that our training set consisted of 10,000 points, each with around 50 labels, and the test set consists of 50,000 points, with the single label from the original CIFAR-10 dataset). We compared against training with the standard CIFAR-10 test set, containing the same images but only with a single label. To perform probabilistic inference, we used SGLD with code adapted from (Zhang et al., 2019). In particular, we used their standard settings of a ResNet18, momentum of 0.9, and a cyclic cosine learning rate schedule. Due to the smaller size of our training set, we used longer cycles (150 epochs rather than 50), and more cycles (8 rather than 4). Importantly, we kept all the parameters of the learning algorithm the same for CIFAR-10H and our CIFAR-10 comparison. The only complication was that to keep the same effective learning rate for CIFAR-10H we need to take into account the number of labellers per datapoint (if we have 50 labels for a datapoint, the loss and the gradients of the loss are 50 times larger, resulting in step-sizes that are also 50 times larger). As such, to keep the same step-sizes, we divided the actual learning rate by 50. An alternative way to look at this is that we use the average log-likelihood per labeller (rather than per-image). Importantly, this change in learning rate, leaves the stationary distribution was unchanged, as changing the learning rate is not equivalent to tempering. All other parameters were left at the values specified by Zhang et al. (2019).
194
+
195
+ ![](images/a247f79a5862d4e7294d66b46705ea930a69206a6e88296eaad6330751edcb2b.jpg)
196
+ Figure 6: A The number of errors (defined as labellers who disagree with the most popular category) out of around 50 labels. B The test log-likelihood for different values of $\lambda$ for training with the standard single-labels provided by CIFAR-10 and the 50 labels provided by CIFAR-10H. Note that here we have swapped the identities of the train and test set. C As in B, but for accuracy.
197
+
198
+ As expected, when training on the single-label from the original CIFAR-10 testset (blue lines Fig. 6BC), there are very large tempering effects. In contrast, when training on the $\sim 5 0$ labels provided CIFAR-10H (orange), the effects of tempering are far smaller. In a sense, this is not surprising — using 50 labellers in effect makes the likelihood 50 times stronger, which is very similar to applying tempering. But this simplicity is the point: in the Bayesian setting we need to condition on all data — in our case all the labels, and once we do that, the cold posterior effect disappears.
199
+
200
+ Note that while tempering-effects are dramatically reduced, they have not been eliminated entirely. This is expected in our setting, both because of the mismatch between this setup and the exact setup (Sec. 4), but also because the inference method, SGLD, becomes more accurate as the minibatch-size increases, but we can never use full-batch in practical settings due to the large size of datasets such as CIFAR-10 (Welling & Teh, 2011). In SGLD minibatch gradients are used as a proxy for the gradient for the full dataset, but these minibatch gradients contain additional noise, and there is a potential that reducing the temperature may partially compensate for this additional noise. This is particularly evident if we consider (Wenzel et al., 2020, Fig. 6), which showed that cold-posterior effects can be amplified by using very small minibatch sizes — smaller minibatches imply larger variance in gradient estimates, and hence more potential for lower temperatures to compensate for that additional noise. That said, these effects do not appear to be significant for CIFAR-10 (Wenzel et al., 2020, Fig. 5), so we are in agreement with Wenzel et al. (2020) that minibatch noise are unlikely to be the primary source of tempering effects.
201
+
202
+ # 5.4 CIFAR-10 WITH NOISY LABELS
203
+
204
+ Curated labels are almost certain to represent the true class, and this is one way to understand the statistical patterns induced by curation that are exploited by tempered posteriors. We therefore considered disrupting this property by adding noise to the labels. In the standard classification setting, this should have very little effect (except to shrink the logit outputs somewhat to give more uncertain outputs). However, and as expected under our theory, we find that adding noise destroys and eventually reverses the cold-posterior effect (Fig. 7). This confirms that cold-posteriors are exploiting specific properties of the labels that are destroyed by adding noise. As such, cold posteriors are not likely to arise e.g. from failing to capture the prior over neural network weights (in which case adding noise to the outputs should have little effect). We suspect that the small improvement in performance at the first value of $\lambda$ below 1 might be due to partial compensation for additional noise introduced by minibatch estimates of the gradient.
205
+
206
+ ![](images/cb9c9c8dd08f2d87cbbc615ab1b8cab21cab28fd2310adeb50952c7929fa99ad.jpg)
207
+ Figure 7: A Test log-likelihood with tempering for different probabilities of using a noisy label, $p$ . Noiser labels mean test-log-likelihoods are lower. B Change in test log-likelihoods from the baseline at $\lambda = 1$ . We see standard cold posterior effects at low noise levels, which reverse at higher noies levels. C, D As A, B but for test accuracy.
208
+
209
+ # 6 RELATED WORK
210
+
211
+ Wenzel et al. (2020) introduced the cold-posterior effect in the context of neural networks, and proposed and dismissed multiple potential explanations (although none like the one we propose here).
212
+
213
+ Other past work, though not in the neural network context, argues that tempering may be important in the context of model misspecification (Grünwald, 2012; Grünwald et al., 2017). Critically, we believe that there may be many causes of cold-posterior like effects, including but not limited to curation, model misspecification and artifacts from SGLD. Ultimately, the contribution of each of these factors in any given setting will depend on the exact dataset and inference method in question. Importantly, this also means we do not necessarily expect there to be no tempering in uncurated data, merely that we should see less tempering in the case of uncurated data.
214
+
215
+ Finally, the closest paper is concurrent work (Adlam et al., 2020) raising the possibility that BNNs overestimate aleatoric uncertainty, in part because of high-quality labels available in benchmark datasets. However, they concluded that while cold posteriors might help us to capture our priors, they do not correspond to an exact inference procedure. In contrast, here we give a generative model of dataset curation in which tempered likelihoods emerge naturally even under exact inference methods.
216
+
217
+ # 7 DISCUSSION AND CONCLUSIONS
218
+
219
+ We showed that modelling the process of data-curation can explain the improved performance of tempering or cold posteriors in Bayesian neural networks. While this work does provide a justification for future practitioners to use tempering in their Bayesian neural networks, we would urge caution. Importantly, and as we confirmed in Fig. 5, there may be other causes of the cold-posterior effect, e.g. because inference is inaccurate (compensating for additional noise added in SGLD), or may compensate for issues arising from model mispecification (Grünwald, 2012; Grünwald et al., 2017). As such, we urge practitioners to regard tempering with caution: if a very large amount of tempering is necessary to achieve good performance, it may indicate issues with either inference or the prior, and fixing these issues is of the utmost importance to obtaining accurate uncertainty estimation. More importantly, we hope that our work will prompt more careful dataset design, and further study of how data curation might impact downstream analyses in machine learning. Indeed, there are initial suggestions that semi-supervised learning methods are also exploiting the artificial clustering (Fig. 3) induced by data curation (Aitchison, 2020).
220
+
221
+ # ACKNOWLEDGEMENTS
222
+
223
+ I would like to thank Adrià Garriga-Alonso and Sebastian Ober for insightful discussions, Stoil Ganev for the GZ2 analyses which sadly came in only during the ICLR review period at which point author changes are banned (which is odd, given that revising the paper during the review period is allowed) and to Mike Walmsley and Sotiria Fotopoulou for getting us set up with GZ2. I would also like to thank Bristol’s Advanced Computing Research Centre (ACRC) for providing invaluable compute infrastructure that was used for all the experiments in this paper.
224
+
225
+ # REFERENCES
226
+
227
+ Ben Adlam, Jasper Snoek, and Samuel L Smith. Cold posteriors and aleatoric uncertainty. arXiv preprint arXiv:2008.00029, 2020.
228
+
229
+ Laurence Aitchison. A statistical theory of semi-supervised learning. arXiv preprint, 2020.
230
+
231
+ Arsenii Ashukha, Alexander Lyzhov, Dmitry Molchanov, and Dmitry Vetrov. Pitfalls of in-domain uncertainty estimation and ensembling in deep learning. arXiv preprint arXiv:2002.06470, 2020.
232
+
233
+ Juhan Bae, Guodong Zhang, and Roger Grosse. Eigenvalue corrected noisy natural gradient. arXiv preprint arXiv:1811.12565, 2018.
234
+
235
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
236
+
237
+ Peter Grünwald. The safe bayesian. In International Conference on Algorithmic Learning Theory, pp. 169–183. Springer, 2012.
238
+
239
+ Peter Grünwald, Thijs Van Ommen, et al. Inconsistency of bayesian inference for misspecified linear models, and a proposal for repairing it. Bayesian Analysis, 12(4):1069–1103, 2017.
240
+
241
+ James Hensman, Alexander Matthews, and Zoubin Ghahramani. Scalable variational gaussian process classification. JMLR, 2015.
242
+
243
+ Edwin T Jaynes. Probability theory: The logic of science. Cambridge university press, 2003.
244
+
245
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, Toronto, 2009.
246
+
247
+ Alexander G de G Matthews, James Hensman, Richard Turner, and Zoubin Ghahramani. On sparse variational methods and the kullback-leibler divergence between stochastic processes. Journal of Machine Learning Research, 51:231–239, 2016.
248
+
249
+ Sebastian W Ober and Laurence Aitchison. Global inducing point variational posteriors for bayesian neural networks and deep gaussian processes. arXiv preprint arXiv:2005.08140, 2020.
250
+
251
+ Kazuki Osawa, Siddharth Swaroop, Mohammad Emtiyaz E Khan, Anirudh Jain, Runa Eschenhagen, Richard E Turner, and Rio Yokota. Practical deep learning with bayesian principles. In Advances in Neural Information Processing Systems, pp. 4289–4301, 2019.
252
+
253
+ Joshua C Peterson, Ruairidh M Battleday, Thomas L Griffiths, and Olga Russakovsky. Human uncertainty makes classification more robust. In Proceedings of the IEEE International Conference on Computer Vision, pp. 9617–9626, 2019.
254
+
255
+ Twan Van Laarhoven. L2 regularization versus batch and weight normalization. arXiv preprint arXiv:1706.05350, 2017.
256
+
257
+ Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-11), pp. 681–688, 2011.
258
+
259
+ Florian Wenzel, Kevin Roth, Bastiaan S Veeling, Jakub Swi ˛atkowski, Linh Tran, Stephan Mandt, ´ Jasper Snoek, Tim Salimans, Rodolphe Jenatton, and Sebastian Nowozin. How good is the bayes posterior in deep neural networks really? arXiv preprint arXiv:2002.02405, 2020.
260
+
261
+ Kyle W Willett, Chris J Lintott, Steven P Bamford, Karen L Masters, Brooke D Simmons, Kevin RV Casteels, Edward M Edmondson, Lucy F Fortson, Sugata Kaviraj, William C Keel, et al. Galaxy zoo 2: detailed morphological classifications for 304 122 galaxies from the sloan digital sky survey. Monthly Notices of the Royal Astronomical Society, 435(4):2835–2860, 2013.
262
+
263
+ Christopher KI Williams and Carl Edward Rasmussen. Gaussian processes for machine learning. MIT press Cambridge, MA, 2006.
264
+
265
+ Guodong Zhang, Shengyang Sun, David Duvenaud, and Roger Grosse. Noisy natural gradient as variational inference. arXiv preprint arXiv:1712.02390, 2017.
266
+
267
+ Ruqi Zhang, Chunyuan Li, Jianyi Zhang, Changyou Chen, and Andrew Gordon Wilson. Cyclical stochastic gradient mcmc for bayesian deep learning. arXiv preprint arXiv:1902.03932, 2019.
268
+
269
+ ![](images/c774ab7dd60cd0fce279753f346c932ba5bee6659ce26622ed2d53e9f7a0aa4d.jpg)
270
+ Figure 8: SGD in a ResNet18 with batchnorm removed with a tempered maximum a-posteriori loss. A Test log-likelihood. B Accuracy.
271
+
272
+ # A COLD POSTERIORS IN MAXIMUM A-POSTERIORI INFERENCE
273
+
274
+ Our explanation for the cold posterior effect suggests that it is not just due to the stochasticity of the posterior, but should also arise in e.g. maximum a-posteriori (MAP) inference. However, MAP inference causes serious issues in networks with batchnorm. In particular, with batchnorm, the outputs become invariant to the scale of the weights, so the weights can continually decay towards zero (Van Laarhoven, 2017). Note that these considerations are not relevant when we are doing full approximate inference, as the product of the prior and likelihood is a static quantity with a well-defined scale that cannot e.g. decay towards zero. As such, we considered tempering in our usual ResNet18, but where we have deleted the batchnorm layers. We used a standard protocol for these types of network: SGD with momentum of 0.9 and an initial learning rate of 0.1, followed by decays to 0.01 and 0.001 at epochs 150 and 200. We read off performance at the final epoch (250) and used a batch size of 128. We use a standard prior over the weights, with variance 2/fan-in, to keep the scale of the inputs and outputs similar.
275
+
276
+ Remarkably, we found extremely strong cold-posterior effects (Fig. 8). These are perhaps expected as it is common-knowledge (but difficult to find a reference for) that while weight-decay is closely related to MAP inference with a Gaussian prior, good settings for the weight-decay coefficient are much smaller than those suggested by MAP inference with a sensible prior. Interestingly, these results suggest that the robustness of standard models to very low temperatures might arise due to batchnorm, and not be a fundamental property (e.g. having very large amounts of data).
277
+
278
+ ![](images/2039bfc1cc6ba9d8619015147301c7b8c8097c70923c43fdf69638cef95d190f.jpg)
279
+ Figure 9: Toy BNN model. A Test log-likelihood vs $\lambda$ for different settings of $S$ . B The optimal $\lambda$ , plotted against $S$ .
280
+
281
+ # B TOY BAYESIAN NEURAL NETWORK EXAMPLE
282
+
283
+ To confirm the results in the Gaussian processes toy example in the main text, we did the same exercise with a toy Bayesian neural network. In particular, we considered 100 training examples, drawn IID from standard Gaussians, each with 5 input dimensions and 2 class outputs. We generated the “true” or target outputs from a one hidden layer ReLU network, with 30 hidden units, drawn from the prior. We trained the same network, using Langevin dynamics (full batch, but no rejection step; initialized randomly from the prior). As in the GP example, we applied our generative model of dataset curation with different settings for $S$ in the generative model. For test and training, we used the standard single-labeller log-likelihood, which ignores rejected noconsensus inputs. We implemented a highly parallelised Langevin sampling algorithm, which allowed us to draw 500 different datasets, and run one chain for each dataset (and each setting of $\lambda$ in parallel). The large number of chains allowed us to obtain very accurate results, but did mean that it was not possible to plot lines for individual datasets. We used a learning rate of 0.01 and burn in of 4,000 steps; to compute performance, we averaged over 50 samples of neural-network parameters, which were taken from a chain that was 20,000 steps long in total.
284
+
285
+ In Fig. 9A, we plot the test-log-likelihood for different settings of $\lambda$ . There is a clear trend that as $S$ increases, the optimal temperature falls, and at the same time, the curves become flatter. Notably, these curves become flatter at the top for larger settings of $S$ , making it difficult to identify the optimal setting for $\lambda$ at higher values of $S$ . We then plotted the optimal setting of $\lambda$ against $S$ (Fig 9B). Initially, $S = 1$ is equivalent to the standard classification setup, as consensus is always reached, and as such, we find that the optimal temperature was 1. As in Fig. 4E, we found that $\lambda ^ { * } = 1 / S$ held only approximately. Nonetheless, these results suggest that we might need more tempering than suggested by $\lambda ^ { * } = 1 / S$ , which supports our proposed explanation of the cold posterior effect. Finally, it should be noted that these results depend sensitively on the accuracy of the inference algorithm, so it is difficult to say as yet the degree to which mismatch between $\lambda ^ { * }$ and $1 / S$ arises due to inaccuracy in inference or would emerge in the intractable true-posterior.
286
+
287
+ # C GALAXY ZOO 2 DETAILS
288
+
289
+ The Galaxy Zoo 2 data set (Willett et al., 2013) was constructed by presenting images of galaxies to volunteers, who were asked to answer a questionnaire about the morphological features of the presented galaxy. These questions are not independent from each other but are part of a decision tree. As such, the questions a volunteer gets asked depends on their answers to earlier questions. For each galaxy, answers from multiple volunteers were collect. The raw data is recorded as counts of how many times each answer was picked across all volunteers.
290
+
291
+ From this data we wanted to derive classes in such a way that the classification performed by each volunteer was equivalent to a vote towards one of our classes. The most straightforward approach is to consider each unique path in the decision tree to be a unique class. Given that a volunteer fills in the questionnaire only once, their classification is equivalent to a single vote towards a specific class. The problem with this approach is that there are 1265 possible paths in the original decision tree. The number of volunteers per galaxy is less than a hundred, which means that the majority of these paths would receive 0 votes.
292
+
293
+ In order to address this, we simplified the tree to one where there are only 9 possible paths. The simplifications was performed by manually pruning branches of the decision tree. This way each path in the original tree could be mapped to a path in the simplified one, while maintaining specific aspects of its meaning. The simplified tree can be seen in (modified_graph.png). The following pruning operations were performed in order to create this simplified tree. Here we refer to each question using its task number, as given in the original paper.
294
+
295
+ • Task 02, Answer ’no’: leads directly to Task 05, skipping Task 03, Task 04, Task 10 and Task 11
296
+ • Task 05, Answers ’dominant’ and ’obvious’: merged together becoming a combined category labelled ’obvious’
297
+ • Task 05, all answers: lead directly to the end of the graph, becoming exit points
298
+ • Task 07, all answers: lead directly to the end of the graph, becoming exit points Task 09, Answers ’rounded’ and ’boxy’: merged together becoming a combined category labelled ’with bulge’
299
+ • Task 09, all answers: lead directly to the end of the graph, becoming exit points
300
+ • As a consequence of the above pathing changes Task 03, Task 04, Task 06, Task 08, Task 10 and Task 11 are no longer reachable and thus removed from the graph
301
+
302
+ If we are to take each of the 9 paths in the simplified tree to form a class, then the resulting 9 classes would have the following meanings:
303
+
304
+ • smooth galaxy, completely round shape
305
+ • smooth galaxy, in-between round and cigar shaped
306
+ • smooth galaxy, cigar shaped
307
+ • edge-on disk galaxy, with central bulge
308
+ • edge-on disk galaxy, no central bulge
309
+ • face-on disk galaxy, obvious central bulge
310
+ • face-on disk galaxy, just noticeable central bulge
311
+ • face-on disk galaxy, no central bulge
312
+ • star or artifact
313
+
314
+ Using the simplified decision tree, we can decompose the data into votes for each path. The Galaxy Zoo data was recorded as counts for each specific answer, thus losing the information about which route a specific volunteer took in the tree. However, with the help of network flow algorithms it is possible to translate the data into counts of how many volunteers took a specific path. This way, by taking each path to be a class and the number of volunteers that followed a path to be the number of votes toward a class, we have a data set where each data point has received multiple classification over a fixed range of classes.
315
+
316
+ ![](images/aac45c108bc4027345e694733ac3b27a1d33e65f0d07458643bb9c016bffb85c.jpg)
317
+ Figure 10: Modified decision tree from Willett et al. (2013) showing how we truncated the decision tree. Images in the same box are viewed as the same class.
318
+
319
+ For each galaxy in the Galaxy ${ \bf Z } _ { 0 0 } \mathrm { ~ } 2$ data set we also have the image that was presented to the volunteers. As such, we can use our derived classes in an image classification task. In order to do this, we performed certain pre-processing. The original images have a resolution of $4 2 4 \mathrm { x } 4 2 4$ with the galaxy being at the center of the image. Thus, we performed a center crop of size $2 1 2 \mathbf { x } 2 1 2$ and then resized the images down to 32x32. For data augmentation, we used full 360 degree continuous rotations.
parse/train/Rd138pWXMvG/Rd138pWXMvG_content_list.json ADDED
@@ -0,0 +1,1533 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "A STATISTICAL THEORY OF COLD POSTERIORS IN DEEP NEURAL NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 101,
9
+ 821,
10
+ 145
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Laurence Aitchison \nDepartment of Computer Science, \nUniversity of Bristol, \nBristol, UK, F94W 9Q \nlaurence.aitchison@bristol.ac.uk ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 496,
21
+ 239
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 276,
32
+ 544,
33
+ 291
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "To get Bayesian neural networks to perform comparably to standard neural networks it is usually necessary to artificially reduce uncertainty using a “tempered” or “cold” posterior. This is extremely concerning: if the generative model is accurate, Bayesian inference/decision theory is optimal, and any artificial changes to the posterior should harm performance. While this suggests that the prior may be at fault, here we argue that in fact, BNNs for image classification use the wrong likelihood. In particular, standard image benchmark datasets such as CIFAR-10 are carefully curated. We develop a generative model describing curation which gives a principled Bayesian account of cold posteriors, because the likelihood under this new generative model closely matches the tempered likelihoods used in past work. ",
40
+ "bbox": [
41
+ 232,
42
+ 308,
43
+ 766,
44
+ 446
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 474,
55
+ 336,
56
+ 491
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Recent work has highlighted that Bayesian neural networks (BNNs) typically have better predictive performance when we “sharpen” the posterior (Wenzel et al., 2020). In stochastic gradient Langevin dynamics (SGLD) (Welling & Teh, 2011), this can be achieved by multiplying the log-posterior by $1 \\dot { / } T$ , where the “temperature”, $T$ is smaller than 1 (Wenzel et al., 2020). Broadly the same effect can be achieved in variational inference by “tempering”, i.e. downweighting the KL term. As noted in Wenzel et al. (2020), this approach has been used in many recent papers to obtain good performance, albeit without always emphasising the importance of this factor (Zhang et al., 2017; Bae et al., 2018; Osawa et al., 2019; Ashukha et al., 2020). ",
63
+ "bbox": [
64
+ 174,
65
+ 506,
66
+ 825,
67
+ 617
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "These results are puzzling if we take the usual Bayesian viewpoint, which says that the Bayesian posterior, used with the right prior, and in combination with Bayes decision theory should give optimal performance (Jaynes, 2003). Thus, these results may suggest we are using the wrong prior. While new priors have been suggested (e.g. Ober & Aitchison, 2020), they give only minor improvements in performance — certainly nothing like enough to close the gap to carefully trained non-Bayesian networks. In contrast, tempered posteriors directly give performance comparable to a carefully trained finite network. ",
74
+ "bbox": [
75
+ 174,
76
+ 625,
77
+ 825,
78
+ 722
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The failure to develop an effective prior suggests that we should consider alternative explanations for the effectiveness of tempering. Here, we consider the possibility that it is predominantly (but not entirely) the likelihood, and not the prior that is at fault. In particular, we note that standard image benchmark datasets such as ImageNet and CIFAR-10 are carefully curated, and that it is important to consider this curation as part of our generative model. We develop a simplified generative model describing dataset curation which assumes that a datapoint is included in the dataset only if there is unanimous agreement on the class amongst multiple labellers. This model naturally multiplies the effect of each datapoint, and hence gives posteriors that closely match tempered or cold posteriors. We show that toy data drawn from our generative model of curation can give rise to optimal temperatures being smaller than 1. Our model predicts that cold posteriors will not be helpful when the original underlying labels from all labellers are available. While these are not available for standard datasets such as CIFAR-10, we found a good proxy: the CIFAR-10H dataset (Peterson et al., 2019), in which $\\sim 5 0$ humans annotators labelled the CIFAR-10 test-set (we use these as our training set, and use the standard CIFAR-10 training set for test-data). As expected, we find strong cold-posterior effects when using the original single-label, which are almost entirely eliminated when using the 50 labels from CIFAR-10H. In addition, curation implies that each label is almost certain to be correct, which is one way to understand the statistical patterns exploited by cold posteriors. As such, if we destroy this pattern by adding noise to the labels, the cold posterior effect should disappear. We confirmed that with increasing label noise, the cold posterior effect disappears and eventually reverses (giving better performance at temperatures close to 1). ",
85
+ "bbox": [
86
+ 174,
87
+ 729,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 188
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "2 BACKGROUND: COLD AND TEMPERED POSTERIORS ",
107
+ "text_level": 1,
108
+ "bbox": [
109
+ 174,
110
+ 208,
111
+ 630,
112
+ 223
113
+ ],
114
+ "page_idx": 1
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "Tempered (e.g. Zhang et al., 2017) and cold (Wenzel et al., 2020) posteriors differ slightly in how they apply the temperature parameter. For cold posteriors, we scale the whole posterior, whereas tempering is a method typically applied in variational inference, and corresponds to scaling the likelihood but not the prior, ",
119
+ "bbox": [
120
+ 174,
121
+ 238,
122
+ 825,
123
+ 295
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "equation",
129
+ "img_path": "images/a403f6dc5c6376d36721c669136173efdbe5c62f609f7b1425b7f1d1f04afb9f.jpg",
130
+ "text": "$$\n{ \\begin{array} { r } { \\log \\operatorname { P } _ { \\mathrm { c o l d } } \\left( \\theta | X , Y \\right) = { \\frac { 1 } { T } } \\log \\operatorname { P } \\left( X , Y | \\theta \\right) + { \\frac { 1 } { T } } \\log \\operatorname { P } \\left( \\theta \\right) + { \\mathrm { c o n s t } } } \\\\ { \\log \\operatorname { P } _ { \\mathrm { t e m p e r e d } } \\left( \\theta | X , Y \\right) = { \\frac { 1 } { \\lambda } } \\log \\operatorname { P } \\left( X , Y | \\theta \\right) + \\ \\log \\operatorname { P } \\left( \\theta \\right) + { \\mathrm { c o n s t } } . } \\end{array} }\n$$",
131
+ "text_format": "latex",
132
+ "bbox": [
133
+ 277,
134
+ 297,
135
+ 718,
136
+ 340
137
+ ],
138
+ "page_idx": 1
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "While cold posteriors are typically used in SGLD, tempered posteriors are usually targeted by variational methods. In particular, variational methods apply temperature scaling to the KL-divergence between the approximate posterior, $\\mathrm { ~ Q ~ } ( \\theta )$ and prior, ",
143
+ "bbox": [
144
+ 174,
145
+ 343,
146
+ 825,
147
+ 386
148
+ ],
149
+ "page_idx": 1
150
+ },
151
+ {
152
+ "type": "equation",
153
+ "img_path": "images/faea55c23fc1ee81ad96579c3d222e436bac75a92a154f09074bda6cefee6343.jpg",
154
+ "text": "$$\n\\mathcal { L } = \\mathbb { E } _ { \\mathrm { Q } ( \\theta ) } \\left[ \\log \\mathrm { P } \\left( X , Y | \\theta \\right) \\right] - \\lambda \\operatorname { D } _ { \\mathrm { K L } } \\left( \\mathrm { Q } \\left( \\theta \\right) | | \\mathrm { P } \\left( \\theta \\right) \\right) .\n$$",
155
+ "text_format": "latex",
156
+ "bbox": [
157
+ 320,
158
+ 391,
159
+ 676,
160
+ 410
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Note that the only difference between cold and tempered posteriors is whether we scale the prior, and if we have Gaussian priors over the parameters (the usual case in Bayesian neural networks), this scaling can be absorbed into the prior variance, ",
167
+ "bbox": [
168
+ 174,
169
+ 414,
170
+ 828,
171
+ 455
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "equation",
177
+ "img_path": "images/27456e63537a8e42986eaf22c338d40ec08601e96b3e826f2793f60f55994983.jpg",
178
+ "text": "$$\n\\textstyle \\frac { 1 } { T } \\log \\mathrm { P } _ { \\mathrm { c o l d } } \\left( \\theta \\right) = - \\frac { 1 } { 2 T \\sigma _ { \\mathrm { c o l d } } ^ { 2 } } \\sum _ { i } \\theta _ { i } ^ { 2 } + \\mathrm { c o n s t } = - \\frac { 1 } { 2 \\sigma _ { \\mathrm { t e n p r e d } } ^ { 2 } } \\sum _ { i } \\theta _ { i } ^ { 2 } + \\mathrm { c o n s t } = \\log \\mathrm { P } _ { \\mathrm { c o l d } } \\left( \\theta \\right) .\n$$",
179
+ "text_format": "latex",
180
+ "bbox": [
181
+ 217,
182
+ 460,
183
+ 781,
184
+ 494
185
+ ],
186
+ "page_idx": 1
187
+ },
188
+ {
189
+ "type": "text",
190
+ "text": "in which case, $\\sigma _ { \\mathrm { c o l d } } ^ { 2 } = \\sigma _ { \\mathrm { t e m p e r e d } } ^ { 2 } / T$ , so the tempered posteriors we discuss are equivalent to cold posteriors with rescaled prior variances. ",
191
+ "bbox": [
192
+ 173,
193
+ 501,
194
+ 826,
195
+ 531
196
+ ],
197
+ "page_idx": 1
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "3 METHODS: A GENERATIVE MODEL FOR CURATED DATASETS ",
202
+ "text_level": 1,
203
+ "bbox": [
204
+ 174,
205
+ 551,
206
+ 704,
207
+ 568
208
+ ],
209
+ "page_idx": 1
210
+ },
211
+ {
212
+ "type": "text",
213
+ "text": "Standard image datasets such as CIFAR-10 and ImageNet are carefully curated to include only unambiguous examples of each class. For instance, in CIFAR-10, student labellers were paid per hour (rather than per image), were instructed that “It’s worse to include one that shouldn’t be included than to exclude one”, and then Krizhevsky (2009) “personally verified every label submitted by the labellers”. For ImageNet, Deng et al. (2009) required the consensus of a number of Amazon Mechanical Turk labellers before including an image in the dataset. ",
214
+ "bbox": [
215
+ 173,
216
+ 580,
217
+ 825,
218
+ 666
219
+ ],
220
+ "page_idx": 1
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "To understand the statistical patterns that might emerge in these curated datasets, we consider a highly simplified generative model of consensus-formation. In particular, we draw a random image $X$ from some underlying distribution over images, P $( X )$ , and ask $S$ humans to assign a label, $\\{ { \\check { Y _ { s } } } \\} _ { s = 1 } ^ { S }$ (e.g. using Mechanical Turk). We force every labeller to label every image and if the image is ambiguous they are instructed to give a random label. If all the labellers agree, $Y _ { 1 } = Y _ { 2 } = \\cdot \\cdot \\cdot = Y _ { S }$ , consensus is reached and we include the datapoint in the dataset. If any of the labellers disagree consensus is not reached, and we exclude the datapoint (Fig. 1), Formally, the observed random variable, $Y$ , is taken to be the usual label if consensus was reached and None if consensus was not reached (Fig. 2B), ",
225
+ "bbox": [
226
+ 173,
227
+ 671,
228
+ 825,
229
+ 785
230
+ ],
231
+ "page_idx": 1
232
+ },
233
+ {
234
+ "type": "equation",
235
+ "img_path": "images/1cd23c127cdb4880b6dcd0331906719c277a288543e8e4ebd8c2c7fadad3bbf0.jpg",
236
+ "text": "$$\nY | \\{ Y _ { s } \\} _ { s = 1 } ^ { S } = { \\left\\{ \\begin{array} { l l } { Y _ { 1 } } & { { \\mathrm { i f ~ } } Y _ { 1 } = Y _ { 2 } = \\cdots = Y _ { S } } \\\\ { { \\mathrm { N o n e } } } & { { \\mathrm { o t h e r w i s e } } } \\end{array} \\right. }\n$$",
237
+ "text_format": "latex",
238
+ "bbox": [
239
+ 344,
240
+ 790,
241
+ 650,
242
+ 825
243
+ ],
244
+ "page_idx": 1
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "Taking the human labels, $Y _ { s }$ , to come from the set $\\mathcal { V }$ , so $Y _ { s } \\in \\mathcal { V }$ , the consensus label, $Y$ , could be any of the underlying labels in $\\mathcal { V }$ , or None if no consensus is reached, so $Y \\in \\mathcal { Y } \\cup \\{ \\mathrm { N o n e } \\}$ . When consensus was reached, the likelihood is, ",
249
+ "bbox": [
250
+ 174,
251
+ 832,
252
+ 823,
253
+ 875
254
+ ],
255
+ "page_idx": 1
256
+ },
257
+ {
258
+ "type": "equation",
259
+ "img_path": "images/ba6a54d57d75d8a371a36897cb2c4e7fd21812d42509b44b6c725944fe9e775b.jpg",
260
+ "text": "$$\n\\mathrm { ~ P ~ } ( Y = y | X , \\theta ) = \\mathrm { P ~ } \\big ( \\{ Y _ { s } = y \\} _ { s = 1 } ^ { S } | X , \\theta \\big ) = \\prod _ { s = 1 } ^ { S } \\mathrm { ~ P ~ } ( Y _ { s } = y | X , \\theta ) = \\mathrm { P ~ } ( Y _ { s } = y | X , \\theta ) ^ { S }\n$$",
261
+ "text_format": "latex",
262
+ "bbox": [
263
+ 223,
264
+ 878,
265
+ 772,
266
+ 922
267
+ ],
268
+ "page_idx": 1
269
+ },
270
+ {
271
+ "type": "image",
272
+ "img_path": "images/1888db95f5903396d3888a0872a3828b8b9064931e4ade3cdc640bc00dcf7710.jpg",
273
+ "image_caption": [
274
+ "Figure 1: A simple example of our generative process describing dataset curation, with $S = 3$ . Labellers have the task of classifying images as cats or dogs. The first image is unambiguously a cat, so the three labellers agree, consensus is reached, and the image is included in the dataset. The second image is unambiguously a dog, the labellers agree, consensus is reached, and the image is included in the dataset. However, the third image is ambiguous: the labellers disagree, consensus is not reached, and the image may be excluded from the dataset. "
275
+ ],
276
+ "image_footnote": [],
277
+ "bbox": [
278
+ 196,
279
+ 99,
280
+ 800,
281
+ 250
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "where we have assumed labellers are IID. This would appear to directly give an account of tempering, as we have taken the single-labeller likelihood to the power $S$ , which is equivalent to setting $\\lambda = 1 / S$ . However, to see how the full generative model functions we need to go on to consider the case in which consensus was not reached, ",
288
+ "bbox": [
289
+ 173,
290
+ 375,
291
+ 826,
292
+ 431
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "equation",
298
+ "img_path": "images/1fc6e6fea7e387cff242b7806c9249f841271898e2ce421bb0970579379081a0.jpg",
299
+ "text": "$$\n\\mathrm { P } \\left( \\boldsymbol { Y } = \\mathrm { N o n e } | \\boldsymbol { X } , \\theta \\right) = 1 - \\sum _ { y \\in \\mathcal { Y } } \\mathrm { P } \\left( \\boldsymbol { Y } = y | \\boldsymbol { X } , \\theta \\right) = 1 - \\sum _ { y \\in \\mathcal { Y } } \\mathrm { P } \\left( Y _ { s } = y | \\boldsymbol { X } , \\theta \\right) ^ { \\boldsymbol { S } } .\n$$",
300
+ "text_format": "latex",
301
+ "bbox": [
302
+ 246,
303
+ 435,
304
+ 751,
305
+ 472
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "To understand the impact of our model of consensus formation, note that the probability of a particular class-label can be separated into two terms, a probability of consensus, and the probability of a particular class given that consensus was reached, ",
312
+ "bbox": [
313
+ 174,
314
+ 477,
315
+ 825,
316
+ 520
317
+ ],
318
+ "page_idx": 2
319
+ },
320
+ {
321
+ "type": "equation",
322
+ "img_path": "images/f8ea3119ec3642aec168105579aa1b889652e37b8590910fed24c442a906e962.jpg",
323
+ "text": "$$\n\\mathrm { P } \\left( Y = y | X , \\theta \\right) = \\mathrm { P } \\left( Y = y | Y \\neq \\mathrm { N o n e } , X , \\theta \\right) \\mathrm { P } \\left( Y \\neq \\mathrm { N o n e } | X , \\theta \\right) .\n$$",
324
+ "text_format": "latex",
325
+ "bbox": [
326
+ 282,
327
+ 526,
328
+ 714,
329
+ 545
330
+ ],
331
+ "page_idx": 2
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "Remarkably, knowing there was consensus gives us information about the weights, even in the absence of the class label, ",
336
+ "bbox": [
337
+ 174,
338
+ 550,
339
+ 823,
340
+ 579
341
+ ],
342
+ "page_idx": 2
343
+ },
344
+ {
345
+ "type": "equation",
346
+ "img_path": "images/21e2344317796e016e48e9636c1ba38535216d2c6457ff0c056a6700ac1f3181.jpg",
347
+ "text": "$$\n\\mathrm { P } \\left( \\boldsymbol { Y } \\neq \\mathrm { N o n e } | \\boldsymbol { X } , \\boldsymbol { \\theta } \\right) = \\sum _ { \\boldsymbol { y } \\in \\mathcal { V } } \\mathrm { P } \\left( Y _ { s } = \\boldsymbol { y } | \\boldsymbol { X } , \\boldsymbol { \\theta } \\right) ^ { S } ,\n$$",
348
+ "text_format": "latex",
349
+ "bbox": [
350
+ 349,
351
+ 584,
352
+ 647,
353
+ 619
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "in essence, telling us that the output probability was close to 1 for one of the class labels, without telling us which one. Schematically (Fig. 3), we see that the datapoints with a consensus class-label, “cat” or “dog”, lie far from the decision boundary where the class is unambiguous, and consensus is easily reached. In contrast, in regions close to the decision boundary the inputs are ambiguous, which tends to produce disagreement in the labellers, leading to noconsensus. Thus, the existence of one or more consensus points in a region implies that decision boundaries do not go through that region, giving us information about the decision boundary location, even if the label is not known. Concurrent work has shown that this likelihood can be used to explain classical semi-supervised likelihoods (Aitchison, 2020), so this term really does give information about the neural network parameters. Finally, the label probability, conditioned on consensus, ",
360
+ "bbox": [
361
+ 173,
362
+ 625,
363
+ 826,
364
+ 765
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/be298071e8b41da4155b32d12db23a5ec265c29a68657f46445f6a8aefd49c95.jpg",
371
+ "text": "$$\n\\mathrm { \\ P } \\left( \\boldsymbol { Y } = y | \\boldsymbol { Y } \\neq \\mathrm { \\ \" { N o n e } } , \\boldsymbol { X } , \\theta \\right) = \\frac { \\mathrm { \\ P } \\left( \\boldsymbol { Y } = y | \\boldsymbol { X } , \\theta \\right) } { \\mathrm { \\ P } \\left( \\boldsymbol { Y } \\neq \\mathrm { \\ \" { N o n e } } | \\boldsymbol { X } , \\theta \\right) } = \\frac { \\mathrm { \\ P } \\left( Y _ { s } = y | \\boldsymbol { X } , \\theta \\right) ^ { S } } { \\sum _ { y \\in \\mathcal { Y } } \\mathrm { \\ P } \\left( Y _ { s } = y | \\boldsymbol { X } , \\theta \\right) ^ { S } }\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 243,
375
+ 771,
376
+ 753,
377
+ 814
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "simply represents a “reparameterised” softmax. ",
384
+ "bbox": [
385
+ 173,
386
+ 819,
387
+ 485,
388
+ 833
389
+ ],
390
+ "page_idx": 2
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "In datasets where the noconsensus inputs are known it is clear we should use the full likelihood, (Eq. 6 and 7). The question is: in real-world datasets, where we only know the consensus inputs and the noconsensus inputs have been thrown away (Fig. 2C), can we use Eq. (10), a reparameterisation of the softmax-categorical probabilities, for the known consensus points? The answer is no because in Bayesian inference, we do not get to just pick a sensible-looking conditional probability distribution, such as Eq. 10, to use as the likelihood. Instead, we need to write down the full generative model, ",
395
+ "bbox": [
396
+ 173,
397
+ 839,
398
+ 826,
399
+ 924
400
+ ],
401
+ "page_idx": 2
402
+ },
403
+ {
404
+ "type": "equation",
405
+ "img_path": "images/9b74d8a33dbbf23187291130501050e2503cd7323e9ec0dcd2b96275a25dd042.jpg",
406
+ "text": "$$\n\\begin{array} { r } { \\begin{array} { l } { \\mathbf { A } \\quad ^ { X } \\sum _ { \\substack { Y } } \\qquad \\mathbf { B } \\quad ^ { X } \\sum _ { \\substack { \\left\\{ Y _ { s } \\right\\} _ { s = 1 } ^ { S } \\longrightarrow Y } } \\mathbf { C } \\quad ^ { X } \\sum _ { \\substack { \\left\\{ Y _ { s } \\right\\} _ { s = 1 } ^ { S } \\longrightarrow Y } } Z } \\end{array} } \\end{array}\n$$",
407
+ "text_format": "latex",
408
+ "bbox": [
409
+ 209,
410
+ 101,
411
+ 782,
412
+ 170
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "image",
418
+ "img_path": "",
419
+ "image_caption": [
420
+ "Figure 2: A The standard generative model for supervised tasks, assuming no data curation. B Generative model of data curation, where the consensus and noconsensus images are known. C Generative model of data curation, where the noconsensus images are unknown. The underlying images, $X$ are no longer observed. Instead, we observe $Z$ , where $Z = X$ if consensus is reached $( Y _ { 1 } = Y _ { 2 } = \\cdot \\cdot \\cdot = Y _ { S } ) $ ) and $Z =$ None otherwise. "
421
+ ],
422
+ "image_footnote": [],
423
+ "page_idx": 3
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "and marginalise over unknown latents. To write down the generative model in the case of unknown noconsensus images (Fig. 2C), we need to take $X$ to be an unobserved latent variable, and take $Z$ to be an observed random variable, ",
428
+ "bbox": [
429
+ 176,
430
+ 279,
431
+ 823,
432
+ 321
433
+ ],
434
+ "page_idx": 3
435
+ },
436
+ {
437
+ "type": "equation",
438
+ "img_path": "images/cf6e57dc42fbd4823e23286837eb94e790fa3354c5c2f724ca3e4c391f092af1.jpg",
439
+ "text": "$$\nZ | X , \\{ Y _ { s } \\} _ { s = 1 } ^ { S } = { \\left\\{ \\begin{array} { l l } { X } & { { \\mathrm { i f ~ } } Y _ { 1 } = Y _ { 2 } = \\cdots = Y _ { s } } \\\\ { { \\mathrm { N o n e } } } & { { \\mathrm { o t h e r w i s e } } } \\end{array} \\right. }\n$$",
440
+ "text_format": "latex",
441
+ "bbox": [
442
+ 336,
443
+ 327,
444
+ 658,
445
+ 362
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "which is the underlying image, $X$ , if consensus is reached, and None otherwise. As $Z$ depends on $\\theta$ (Fig. 2C), we cannot take the usual shortcut of using P $( Y | Z , \\theta )$ ; we must instead use the full likelihood, P $( Y , Z | \\theta )$ , ",
452
+ "bbox": [
453
+ 174,
454
+ 367,
455
+ 825,
456
+ 411
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "equation",
462
+ "img_path": "images/0958ba27657303d73ad953f4151be54db3ac0f48fbd18197955d13519b490579.jpg",
463
+ "text": "$$\n\\begin{array} { l } { { \\displaystyle { \\mathrm { ~ P ~ } } ( Y , Z | \\theta ) = \\sum _ { \\{ Y _ { s } \\} _ { s = 1 } ^ { s } } \\int d X { \\mathrm { ~ P ~ } } ( X , Y , \\{ Y _ { s } \\} _ { s = 1 } ^ { S } , Z | \\theta ) } \\ ~ } \\\\ { { \\displaystyle ~ = \\sum _ { \\{ Y _ { s } } \\} _ { s = 1 } ^ { s } \\int d X { \\mathrm { ~ P ~ } } ( X ) \\left[ \\prod _ { s = 1 } ^ { s } { \\mathrm { ~ P ~ } } ( Y _ { s } | X , \\theta ) \\right] { \\mathrm { ~ P ~ } } \\left( Y | \\{ Y _ { s } \\} _ { s = 1 } ^ { S } \\right) { \\mathrm { ~ P ~ } } \\left( Z | X , \\{ Y _ { s } \\} _ { s = 1 } ^ { S } \\right) . } } \\end{array}\n$$",
464
+ "text_format": "latex",
465
+ "bbox": [
466
+ 192,
467
+ 415,
468
+ 805,
469
+ 502
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "for $y$ not None, ",
476
+ "bbox": [
477
+ 173,
478
+ 520,
479
+ 281,
480
+ 534
481
+ ],
482
+ "page_idx": 3
483
+ },
484
+ {
485
+ "type": "equation",
486
+ "img_path": "images/14f774f84567dcbc888ce984c579615fa17bf62d4dfb4358361479f346285472.jpg",
487
+ "text": "$$\n\\mathrm { P } \\left( Y = y | \\{ Y _ { s } \\} _ { s = 1 } ^ { S } \\right) = \\{ 1 \\quad \\mathrm { i f } \\ Y _ { s } = y \\ \\mathrm { f o r } \\ a l l \\ s \\in \\{ 1 , \\ldots , S \\} \\nonumber\n$$",
488
+ "text_format": "latex",
489
+ "bbox": [
490
+ 295,
491
+ 541,
492
+ 700,
493
+ 575
494
+ ],
495
+ "page_idx": 3
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "and, ",
500
+ "bbox": [
501
+ 173,
502
+ 582,
503
+ 205,
504
+ 595
505
+ ],
506
+ "page_idx": 3
507
+ },
508
+ {
509
+ "type": "equation",
510
+ "img_path": "images/c09cb8dd7c287296f0ee4fa366799d6a8ff0758352986828a062a5b44a5ed840.jpg",
511
+ "text": "$$\n\\mathrm { P } \\left( Z | X , \\{ Y _ { s } \\} _ { s = 1 } ^ { S } \\right) = \\left\\{ { \\begin{array} { l l } { \\delta ( Z - X ) } & { { \\mathrm { i f } } \\ Y _ { 1 } = Y _ { 2 } = \\cdots = Y _ { S } } \\\\ { \\mathbb { I } _ { Z = \\mathrm { N o n e } } } & { { \\mathrm { o t h e r w i s e } } } \\end{array} } \\right.\n$$",
512
+ "text_format": "latex",
513
+ "bbox": [
514
+ 299,
515
+ 602,
516
+ 696,
517
+ 637
518
+ ],
519
+ "page_idx": 3
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "where $\\delta$ is the Dirac-delta function, and where the indicator function, $\\mathbb { I } _ { Z = \\mathrm { N o n e } }$ is 1 if $Z = { \\mathrm { N o n e } }$ and 0 otherwise. Substituting Eq. (13) and Eq. (14) into Eq. (12), ",
524
+ "bbox": [
525
+ 173,
526
+ 642,
527
+ 823,
528
+ 671
529
+ ],
530
+ "page_idx": 3
531
+ },
532
+ {
533
+ "type": "equation",
534
+ "img_path": "images/6eb729a1ac113e1ad928b42ae24c5772616ca6822b2629ca96c1e93616a63bec.jpg",
535
+ "text": "$$\n\\mathrm { P } \\left( Y = y , Z | \\theta \\right) = \\mathrm { P } \\left( X \\right) \\prod _ { s = 1 } ^ { S } \\mathrm { P } \\left( Y _ { s } = y | X , \\theta \\right) \\propto \\mathrm { P } \\left( Y _ { s } = y | X , \\theta \\right) ^ { S } ,\n$$",
536
+ "text_format": "latex",
537
+ "bbox": [
538
+ 272,
539
+ 676,
540
+ 723,
541
+ 719
542
+ ],
543
+ "page_idx": 3
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "where the proportionality arises because $\\mathrm { ~ P ~ } ( X )$ does not depend on the parameters of interest, $\\theta$ . Note that this is proportional to Eq. (6) above, and not Eq. (10), so this does not just represent a reparameterisation of the softmax. ",
548
+ "bbox": [
549
+ 174,
550
+ 724,
551
+ 828,
552
+ 767
553
+ ],
554
+ "page_idx": 3
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "Finally, this explanation for the cold posterior effect would suggest that we would see cold posteriors even in maximum a-posteriori (MAP) inference, as we confirm in Appendix A. This is expected as it is “common knowledge” (but we do not know of a good reference) that while weight-decay is closely related to MAP inference with Gaussian priors, the best performing value of the weight decay coefficient tend to be lower than those suggested by untempered MAP inference. ",
559
+ "bbox": [
560
+ 173,
561
+ 773,
562
+ 825,
563
+ 844
564
+ ],
565
+ "page_idx": 3
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "4 DIFFERENCES BETWEEN COLD POSTERIOR AND DATASET CURATION SETUPS ",
570
+ "text_level": 1,
571
+ "bbox": [
572
+ 173,
573
+ 864,
574
+ 823,
575
+ 881
576
+ ],
577
+ "page_idx": 3
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "Our model of data curation provides a direct explanation for the effectiveness of cold posteriors, as Eq. (6) takes the underlying likelihoods, P $( Y _ { s } | X , \\theta )$ to the power $S$ , which has exactly the same ",
582
+ "bbox": [
583
+ 174,
584
+ 895,
585
+ 823,
586
+ 924
587
+ ],
588
+ "page_idx": 3
589
+ },
590
+ {
591
+ "type": "image",
592
+ "img_path": "images/90aaf18bfe6e1ae2dba806df55b473bb9193a9825b061e6670d26ab17e703a08.jpg",
593
+ "image_caption": [
594
+ "Figure 3: Illustrative example of artificial clustering induced in the dataset by rejection of ambiguous no-consensus points. The input points for “cat” and “dog” classes are generated from separate 2D Gaussian distributions, and the classifier (and decision boundary) comes from the ratio of the Gaussian probability density functions. For the consensus processes, we used $S = 7$ (we used a relatively large value to make the effects unambiguous). "
595
+ ],
596
+ "image_footnote": [],
597
+ "bbox": [
598
+ 341,
599
+ 106,
600
+ 655,
601
+ 285
602
+ ],
603
+ "page_idx": 4
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "effect as $1 / \\lambda$ in tempered posteriors (Eq. 2). However, it is important to note two differences between the cold posterior setup and the ideal setup for our generative model. First, our generative model assumes that the noconsensus points are known, or if they are unknown, we can compute the integral, ",
608
+ "bbox": [
609
+ 176,
610
+ 397,
611
+ 825,
612
+ 440
613
+ ],
614
+ "page_idx": 4
615
+ },
616
+ {
617
+ "type": "equation",
618
+ "img_path": "images/2166a6c2348e3a39ec718c569057d9b7914ca1b462497fd6db554add697f23b1.jpg",
619
+ "text": "$$\n\\mathrm { P } \\left( Y = \\mathrm { N o n e } , Z = \\mathrm { N o n e } | \\theta \\right) = \\int d X \\mathrm { ~ P ~ } ( X ) \\left( 1 - \\sum _ { y \\in \\mathcal { Y } } \\mathrm { P } \\left( Y _ { s } = y | X , \\theta \\right) ^ { S } \\right)\n$$",
620
+ "text_format": "latex",
621
+ "bbox": [
622
+ 246,
623
+ 443,
624
+ 750,
625
+ 493
626
+ ],
627
+ "page_idx": 4
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "which is obtained by evaluating Eq. (12) in the case where $Y { = } \\mathrm { N o n e }$ , and substituting Eq. (7). Of course, in reality it is not possible to compute this integral because we do not know the underlying $\\mathrm { ~ P ~ } ( X )$ (and usually, we do not even have samples from this distribution). In contrast, the standard cold-posterior setup entirely ignores these terms. Second, in the usual setting, the test data is also subject to the same consensus-formation process, in which case, we should use Eq. (10) for prediction. In contrast, in the standard cold-posterior setting, we use the single-labeller distribution, P $( Y _ { s } | X , \\theta )$ . (Note that if the test-set was drawn “from the wild”, without dataset curation, and labelled by a single labeller, then we should use $\\mathrm { P }$ $( Y _ { s } | X , \\theta )$ for prediction). Overall then, while our model of data curation offers a potential explanation of the benefits of tempering, the differences in setup imply that we cannot expect $\\lambda ^ { * } = \\bar { 1 } / S$ , to hold exactly, where $\\lambda ^ { * }$ is the optimal temperature, and this is confirmed in our results on toy data below. ",
632
+ "bbox": [
633
+ 173,
634
+ 494,
635
+ 826,
636
+ 648
637
+ ],
638
+ "page_idx": 4
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "5 RESULTS ",
643
+ "text_level": 1,
644
+ "bbox": [
645
+ 174,
646
+ 667,
647
+ 281,
648
+ 684
649
+ ],
650
+ "page_idx": 4
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "5.1 DATA SAMPLED FROM A KNOWN GAUSSIAN PROCESS MODEL ",
655
+ "text_level": 1,
656
+ "bbox": [
657
+ 176,
658
+ 699,
659
+ 635,
660
+ 713
661
+ ],
662
+ "page_idx": 4
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "In the introduction, we took it as given that if the prior is correct, the optimal approach is to use the true Bayesian posterior, avoiding either tempering or cold posteriors. To check that this is indeed the case, we tested the performance, measured as test-log-likelihood for tempered posteriors using data generated from a known Gaussian process model. We uniformly generated 50 input points on the 1D interval [-10, 10], and used a Gaussian process with squared exponential kernel with a standard deviation of 4, and kernel bandwidth of 1. For inference, we used reparameterised VI, with an approximate posterior given by multiplying the prior by a single Gaussian factor for each datapoint (Ober & Aitchison, 2020). ",
667
+ "bbox": [
668
+ 173,
669
+ 724,
670
+ 825,
671
+ 837
672
+ ],
673
+ "page_idx": 4
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "In particular, we used a Gaussian process prior for the function values, $\\mathbf { u }$ , at the training inputs (Williams & Rasmussen, 2006), ",
678
+ "bbox": [
679
+ 171,
680
+ 843,
681
+ 823,
682
+ 872
683
+ ],
684
+ "page_idx": 4
685
+ },
686
+ {
687
+ "type": "equation",
688
+ "img_path": "images/93a838d3b28e52d52e6eb89b5cd842d46bac43d80da2983d10f4a4b1f47545ae.jpg",
689
+ "text": "$$\n\\mathrm { P } \\left( \\mathbf { f } | \\mathbf { x } \\right) = \\mathcal { N } \\left( \\mathbf { f } ; \\mathbf { 0 } , \\mathbf { K } ( \\mathbf { x } ) \\right)\n$$",
690
+ "text_format": "latex",
691
+ "bbox": [
692
+ 411,
693
+ 876,
694
+ 586,
695
+ 892
696
+ ],
697
+ "page_idx": 4
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "and we use an approximate posterior (Hensman et al., 2015; Matthews et al., 2016; Ober & Aitchison, 2020) defined by multiplying the prior by a Gaussian with diagonal covariance, where we treat $\\mathbf { v }$ and ",
702
+ "bbox": [
703
+ 173,
704
+ 895,
705
+ 826,
706
+ 924
707
+ ],
708
+ "page_idx": 4
709
+ },
710
+ {
711
+ "type": "image",
712
+ "img_path": "images/4c01ef1eb35b9ce4997f69c0fa9bc8c2ba98d8a89c788c684687ba54f1d4d212.jpg",
713
+ "image_caption": [
714
+ "Figure 4: Tempering with data generated from a toy Gaussian process model. A Performance of tempered posteriors on GP regression. The green dashed line highlights $\\lambda = 1$ . The black line represents the mean of 20 runs (translucent blue lines). B GP classification. C GP classification with our model of consensus formation. We train and test using our exact log-likelihood, and we include knowledge of the no-consensus input datapoints in the datasets. D Data generated from our model of consensus formation, with $S = 4$ . Training uses $\\mathrm { ~ P ~ } ( Y _ { s } | X , \\theta )$ log-likelihood (excluding noconsensus points), but testing uses the exact test-log-likelihood (Eq. 6 and 7). The red dashed line lies at $\\lambda = 1 / S = 1 / 4$ . E Data generated from our model of consensus formation, with $S = 4$ . Training and testing follow the standard cold-posterior setup, excluding noconsensus points and using $\\mathrm { ~ P ~ } ( Y _ { s } | \\bar { X } , \\theta )$ . The $\\mathbf { X }$ -axis gives the number of labellers in the underlying generative process, and the y-axis gives the reciprocal of the optimal temperature. F Plots underlying $\\mathbf { E }$ . The red dashed lines indicate $\\lambda = 1 / S$ . "
715
+ ],
716
+ "image_footnote": [],
717
+ "bbox": [
718
+ 171,
719
+ 99,
720
+ 823,
721
+ 313
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "$\\Lambda ^ { - 1 }$ as variational parameters. ",
728
+ "bbox": [
729
+ 174,
730
+ 522,
731
+ 375,
732
+ 537
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "equation",
738
+ "img_path": "images/6723c793742e3572330cd4ebb944568792385af20ea974952ac965e38dda8a67.jpg",
739
+ "text": "$$\n\\mathrm ~ Q ( \\mathbf { f } ) \\propto \\mathrm { P ( \\mathbf { f } | x ) } \\mathcal { N } ( \\mathbf { v } ; \\mathbf { f } , \\mathbf { A } ^ { - 1 } ) = \\mathcal { N } ( \\mathbf { f } ; \\Sigma \\mathbf { A } \\mathbf { v } , \\Sigma ) \\quad \\mathrm { ~ w h e r e ~ } \\quad \\Sigma = ( \\mathbf { K } ^ { - 1 } ( \\mathbf { x } ) + \\mathbf { A } ) ^ { - 1 }\n$$",
740
+ "text_format": "latex",
741
+ "bbox": [
742
+ 194,
743
+ 546,
744
+ 774,
745
+ 569
746
+ ],
747
+ "page_idx": 5
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "Note that this captures the true posterior in the case of regression (where $\\mathbf { v }$ is set to $\\mathbf { y }$ and $\\Lambda ^ { - 1 }$ is the output noise covariance; Ober & Aitchison, 2020). We then optimize the tempered ELBO (e.g. Zhang et al., 2017), ",
752
+ "bbox": [
753
+ 174,
754
+ 580,
755
+ 825,
756
+ 622
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "equation",
762
+ "img_path": "images/eea447d4057bc450620e03cebfaf9189b2b5a970b1f74e3e3f93d8264a201080.jpg",
763
+ "text": "$$\n\\mathcal { L } = \\mathbb { E } _ { \\mathrm { Q } ( \\mathbf { f } ) } \\left[ \\log \\mathrm { P } \\left( \\mathbf { y } | \\mathbf { f } \\right) + \\lambda \\left( \\log \\mathrm { P } \\left( \\mathbf { f } | \\mathbf { x } \\right) - \\log \\mathrm { Q } \\left( \\mathbf { f } \\right) \\right) \\right] .\n$$",
764
+ "text_format": "latex",
765
+ "bbox": [
766
+ 315,
767
+ 631,
768
+ 681,
769
+ 650
770
+ ],
771
+ "page_idx": 5
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "And we used the standard GP approach for prediction at test points (Williams & Rasmussen, 2006). ",
776
+ "bbox": [
777
+ 174,
778
+ 659,
779
+ 821,
780
+ 674
781
+ ],
782
+ "page_idx": 5
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "Initially, we tried using standard regression and classification generative models, without including our model of consensus formation. Unsurprisingly, $\\lambda = 1$ , corresponding to the Bayesian posterior, is optimal for GP regression (Fig. 4A) and classification (Fig. 4B). For GP regression, we use a Gaussian likelihood with standard deviation 1, and for classification, we use a standard sigmoid probability with a Bernoulli likelihood. ",
787
+ "bbox": [
788
+ 174,
789
+ 679,
790
+ 825,
791
+ 750
792
+ ],
793
+ "page_idx": 5
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "Next, we confirmed that even under our new, more complex generative model of dataset curation $\\lambda = 1$ was still optimal (Fig. 4C), if we trained and tested using the correct form for the loglikelihood. In particular, we considered no-consensus inputs as known and used Eq. 7 to incorporate their likelihood. However, in standard benchmarks, only the consensus inputs are known. As such, next we generated curated data, trained using $\\mathrm { ~ P ~ } ( Y _ { s } | X , \\theta )$ and ignoring noconsensus points, but tested on the correct likelihood, including noconsensus points (Fig. 4D); the optimal temperature remains around 1. Finally, we considered the standard cold/tempered posterior setup, where we use P $( Y _ { s } | X , \\theta )$ , excluding noconsensus points, for training and testing. The optimal $\\lambda$ indeed fell with $S$ (Fig. 4EF), giving a potential explanation for the cold posterior effect. As expected, we have $S \\approx 1 / \\lambda ^ { * }$ , but the relation does not appear to hold exactly due to the mismatches discussed in Sec. 4. Finally, we show in Appendix B that the same patterns emerge in a Bayesian neural network, using Langevin sampling for inference. ",
798
+ "bbox": [
799
+ 173,
800
+ 757,
801
+ 826,
802
+ 924
803
+ ],
804
+ "page_idx": 5
805
+ },
806
+ {
807
+ "type": "image",
808
+ "img_path": "images/dc5a6a0021a5091a5bdb260de16a54e28ef714bd09aa6c37c0ae0f40134b5552.jpg",
809
+ "image_caption": [
810
+ "Figure 5: A Test log-likelihood with tempering. B Change in test log-likelihoods from the baseline at $\\lambda = 1$ . We see standard cold posterior effects at low noise levels, which reverse at higher noies levels. C, D As A, B but for test accuracy. "
811
+ ],
812
+ "image_footnote": [],
813
+ "bbox": [
814
+ 173,
815
+ 102,
816
+ 825,
817
+ 222
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "5.2 CURATED AND UNCURATED GALAXY ZOO DATASETS ",
824
+ "text_level": 1,
825
+ "bbox": [
826
+ 174,
827
+ 306,
828
+ 583,
829
+ 320
830
+ ],
831
+ "page_idx": 6
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "The most direct test of our theory is to evaluate the cold-posterior effect on real-world curated and uncurated datasets. To this end, we used the Galazy Zoo 2 dataset (Willett et al., 2013), as the original dataset is not “curated” in our sense (the criteria for inclusion were e.g. brightness) and the dataset gives classifications from $\\sim 5 0$ labellers. We used a reduced label set for simplicity (see Appendix C). For the uncurated dataset, we selected 12500 points at random from the full dataset, and for the curated dataset, we selected the 12500 most confident points (defined in terms of labeller agreement), such that the correct class-balance was maintained. These datasets were split at random into 2500 training points and 10000 test points. Note that using our generative model directly would lead to drastically different class-balance in the curated and uncurated datasets, due to different levels of certainty for different classes. To perform probabilistic inference, we used SGLD with code adapted from (Zhang et al., 2019). In particular, we used their standard settings of a ResNet18, momentum of 0.9, and a cyclic cosine learning rate schedule. Due to the smaller size of our training set, we used longer cycles (600 epochs rather than 50), and more cycles (8 rather than 4). ",
836
+ "bbox": [
837
+ 174,
838
+ 334,
839
+ 825,
840
+ 515
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "As expected, we found that performance on curated data was far better than that on uncurated data, both in terms of test log-likelihood and test accuracy (Fig. 5AC). We found some cold-posterior effects in uncurated data, which is not surprising because there may be other causes of cold-posteriors such as model-mismatch or biases in SGLD. Critically though, we found much stronger cold-posterior effects for curated data than for uncurated data (Fig. 5BD). Moreover, these plots tend to understate the differences between curated and uncurated data. In particular, the proportional changes to the test-log-likelihood (which has an upper bound of zero) and the test error is for curated data is very large, with both changing by a factor of $\\sim 3$ as temperature falls. In contrast, proportional changes for test-log-likelihood and test-error are much smaller (only $\\sim 2 0 \\%$ ). ",
847
+ "bbox": [
848
+ 174,
849
+ 521,
850
+ 825,
851
+ 647
852
+ ],
853
+ "page_idx": 6
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "5.3 CIFAR-10H ",
858
+ "text_level": 1,
859
+ "bbox": [
860
+ 174,
861
+ 666,
862
+ 302,
863
+ 680
864
+ ],
865
+ "page_idx": 6
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "One prediction made by our framework is that if we had access to the original underlying human labels on the full dataset, including images that were rejected because consensus was not reached, then tempering should not be necessary. Obviously, all this additional information is not available for standard datasets such as CIFAR-10. However, we are able to get close by considering the CIFAR-10H dataset (Peterson et al., 2019). The authors of this work asked around 50 human labellers to label the CIFAR-10 test-set. As we might expect given the careful curation that went in to creating the original CIFAR-10 dataset (Krizhevsky, 2009), for almost half of the datapoints, all $\\sim 5 0$ labellers agreed, and more than three-quarters of images had 2 or fewer disagreements (corresponding to $4 \\%$ ) of labellers (Fig. 6A). While it is not possible to estimate $S$ without having information about the unknown image distribution, the high level of agreement would indicate that the effective value of $S$ is large — potentially even larger than 10. ",
870
+ "bbox": [
871
+ 174,
872
+ 694,
873
+ 825,
874
+ 847
875
+ ],
876
+ "page_idx": 6
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "Next, we trained a neural network on the $\\sim 5 0$ labels provided by the CIFAR-10H dataset. As these labels are provided for the test-set with 10,000 images, this required us to swap the identities of the test and training sets (so that our training set consisted of 10,000 points, each with around 50 labels, and the test set consists of 50,000 points, with the single label from the original CIFAR-10 dataset). We compared against training with the standard CIFAR-10 test set, containing the same images but only with a single label. To perform probabilistic inference, we used SGLD with code adapted from (Zhang et al., 2019). In particular, we used their standard settings of a ResNet18, momentum of 0.9, and a cyclic cosine learning rate schedule. Due to the smaller size of our training set, we used longer cycles (150 epochs rather than 50), and more cycles (8 rather than 4). Importantly, we kept all the parameters of the learning algorithm the same for CIFAR-10H and our CIFAR-10 comparison. The only complication was that to keep the same effective learning rate for CIFAR-10H we need to take into account the number of labellers per datapoint (if we have 50 labels for a datapoint, the loss and the gradients of the loss are 50 times larger, resulting in step-sizes that are also 50 times larger). As such, to keep the same step-sizes, we divided the actual learning rate by 50. An alternative way to look at this is that we use the average log-likelihood per labeller (rather than per-image). Importantly, this change in learning rate, leaves the stationary distribution was unchanged, as changing the learning rate is not equivalent to tempering. All other parameters were left at the values specified by Zhang et al. (2019). ",
881
+ "bbox": [
882
+ 174,
883
+ 854,
884
+ 825,
885
+ 924
886
+ ],
887
+ "page_idx": 6
888
+ },
889
+ {
890
+ "type": "image",
891
+ "img_path": "images/a247f79a5862d4e7294d66b46705ea930a69206a6e88296eaad6330751edcb2b.jpg",
892
+ "image_caption": [
893
+ "Figure 6: A The number of errors (defined as labellers who disagree with the most popular category) out of around 50 labels. B The test log-likelihood for different values of $\\lambda$ for training with the standard single-labels provided by CIFAR-10 and the 50 labels provided by CIFAR-10H. Note that here we have swapped the identities of the train and test set. C As in B, but for accuracy. "
894
+ ],
895
+ "image_footnote": [],
896
+ "bbox": [
897
+ 186,
898
+ 106,
899
+ 815,
900
+ 250
901
+ ],
902
+ "page_idx": 7
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "",
907
+ "bbox": [
908
+ 173,
909
+ 364,
910
+ 825,
911
+ 544
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "As expected, when training on the single-label from the original CIFAR-10 testset (blue lines Fig. 6BC), there are very large tempering effects. In contrast, when training on the $\\sim 5 0$ labels provided CIFAR-10H (orange), the effects of tempering are far smaller. In a sense, this is not surprising — using 50 labellers in effect makes the likelihood 50 times stronger, which is very similar to applying tempering. But this simplicity is the point: in the Bayesian setting we need to condition on all data — in our case all the labels, and once we do that, the cold posterior effect disappears. ",
918
+ "bbox": [
919
+ 174,
920
+ 551,
921
+ 825,
922
+ 636
923
+ ],
924
+ "page_idx": 7
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "Note that while tempering-effects are dramatically reduced, they have not been eliminated entirely. This is expected in our setting, both because of the mismatch between this setup and the exact setup (Sec. 4), but also because the inference method, SGLD, becomes more accurate as the minibatch-size increases, but we can never use full-batch in practical settings due to the large size of datasets such as CIFAR-10 (Welling & Teh, 2011). In SGLD minibatch gradients are used as a proxy for the gradient for the full dataset, but these minibatch gradients contain additional noise, and there is a potential that reducing the temperature may partially compensate for this additional noise. This is particularly evident if we consider (Wenzel et al., 2020, Fig. 6), which showed that cold-posterior effects can be amplified by using very small minibatch sizes — smaller minibatches imply larger variance in gradient estimates, and hence more potential for lower temperatures to compensate for that additional noise. That said, these effects do not appear to be significant for CIFAR-10 (Wenzel et al., 2020, Fig. 5), so we are in agreement with Wenzel et al. (2020) that minibatch noise are unlikely to be the primary source of tempering effects. ",
929
+ "bbox": [
930
+ 174,
931
+ 642,
932
+ 825,
933
+ 823
934
+ ],
935
+ "page_idx": 7
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "5.4 CIFAR-10 WITH NOISY LABELS ",
940
+ "text_level": 1,
941
+ "bbox": [
942
+ 176,
943
+ 842,
944
+ 436,
945
+ 856
946
+ ],
947
+ "page_idx": 7
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "Curated labels are almost certain to represent the true class, and this is one way to understand the statistical patterns induced by curation that are exploited by tempered posteriors. We therefore considered disrupting this property by adding noise to the labels. In the standard classification setting, this should have very little effect (except to shrink the logit outputs somewhat to give more uncertain outputs). However, and as expected under our theory, we find that adding noise destroys and eventually reverses the cold-posterior effect (Fig. 7). This confirms that cold-posteriors are exploiting specific properties of the labels that are destroyed by adding noise. As such, cold posteriors are not likely to arise e.g. from failing to capture the prior over neural network weights (in which case adding noise to the outputs should have little effect). We suspect that the small improvement in performance at the first value of $\\lambda$ below 1 might be due to partial compensation for additional noise introduced by minibatch estimates of the gradient. ",
952
+ "bbox": [
953
+ 174,
954
+ 868,
955
+ 823,
956
+ 924
957
+ ],
958
+ "page_idx": 7
959
+ },
960
+ {
961
+ "type": "image",
962
+ "img_path": "images/cb9c9c8dd08f2d87cbbc615ab1b8cab21cab28fd2310adeb50952c7929fa99ad.jpg",
963
+ "image_caption": [
964
+ "Figure 7: A Test log-likelihood with tempering for different probabilities of using a noisy label, $p$ . Noiser labels mean test-log-likelihoods are lower. B Change in test log-likelihoods from the baseline at $\\lambda = 1$ . We see standard cold posterior effects at low noise levels, which reverse at higher noies levels. C, D As A, B but for test accuracy. "
965
+ ],
966
+ "image_footnote": [],
967
+ "bbox": [
968
+ 173,
969
+ 102,
970
+ 825,
971
+ 222
972
+ ],
973
+ "page_idx": 8
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "",
978
+ "bbox": [
979
+ 174,
980
+ 318,
981
+ 825,
982
+ 415
983
+ ],
984
+ "page_idx": 8
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "6 RELATED WORK ",
989
+ "text_level": 1,
990
+ "bbox": [
991
+ 176,
992
+ 435,
993
+ 341,
994
+ 452
995
+ ],
996
+ "page_idx": 8
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "Wenzel et al. (2020) introduced the cold-posterior effect in the context of neural networks, and proposed and dismissed multiple potential explanations (although none like the one we propose here). ",
1001
+ "bbox": [
1002
+ 174,
1003
+ 468,
1004
+ 825,
1005
+ 496
1006
+ ],
1007
+ "page_idx": 8
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "Other past work, though not in the neural network context, argues that tempering may be important in the context of model misspecification (Grünwald, 2012; Grünwald et al., 2017). Critically, we believe that there may be many causes of cold-posterior like effects, including but not limited to curation, model misspecification and artifacts from SGLD. Ultimately, the contribution of each of these factors in any given setting will depend on the exact dataset and inference method in question. Importantly, this also means we do not necessarily expect there to be no tempering in uncurated data, merely that we should see less tempering in the case of uncurated data. ",
1012
+ "bbox": [
1013
+ 174,
1014
+ 502,
1015
+ 825,
1016
+ 601
1017
+ ],
1018
+ "page_idx": 8
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Finally, the closest paper is concurrent work (Adlam et al., 2020) raising the possibility that BNNs overestimate aleatoric uncertainty, in part because of high-quality labels available in benchmark datasets. However, they concluded that while cold posteriors might help us to capture our priors, they do not correspond to an exact inference procedure. In contrast, here we give a generative model of dataset curation in which tempered likelihoods emerge naturally even under exact inference methods. ",
1023
+ "bbox": [
1024
+ 174,
1025
+ 607,
1026
+ 825,
1027
+ 678
1028
+ ],
1029
+ "page_idx": 8
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "7 DISCUSSION AND CONCLUSIONS ",
1034
+ "text_level": 1,
1035
+ "bbox": [
1036
+ 176,
1037
+ 712,
1038
+ 475,
1039
+ 727
1040
+ ],
1041
+ "page_idx": 8
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "We showed that modelling the process of data-curation can explain the improved performance of tempering or cold posteriors in Bayesian neural networks. While this work does provide a justification for future practitioners to use tempering in their Bayesian neural networks, we would urge caution. Importantly, and as we confirmed in Fig. 5, there may be other causes of the cold-posterior effect, e.g. because inference is inaccurate (compensating for additional noise added in SGLD), or may compensate for issues arising from model mispecification (Grünwald, 2012; Grünwald et al., 2017). As such, we urge practitioners to regard tempering with caution: if a very large amount of tempering is necessary to achieve good performance, it may indicate issues with either inference or the prior, and fixing these issues is of the utmost importance to obtaining accurate uncertainty estimation. More importantly, we hope that our work will prompt more careful dataset design, and further study of how data curation might impact downstream analyses in machine learning. Indeed, there are initial suggestions that semi-supervised learning methods are also exploiting the artificial clustering (Fig. 3) induced by data curation (Aitchison, 2020). ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 743,
1049
+ 826,
1050
+ 922
1051
+ ],
1052
+ "page_idx": 8
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "ACKNOWLEDGEMENTS ",
1057
+ "text_level": 1,
1058
+ "bbox": [
1059
+ 176,
1060
+ 104,
1061
+ 334,
1062
+ 117
1063
+ ],
1064
+ "page_idx": 9
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "I would like to thank Adrià Garriga-Alonso and Sebastian Ober for insightful discussions, Stoil Ganev for the GZ2 analyses which sadly came in only during the ICLR review period at which point author changes are banned (which is odd, given that revising the paper during the review period is allowed) and to Mike Walmsley and Sotiria Fotopoulou for getting us set up with GZ2. I would also like to thank Bristol’s Advanced Computing Research Centre (ACRC) for providing invaluable compute infrastructure that was used for all the experiments in this paper. ",
1069
+ "bbox": [
1070
+ 174,
1071
+ 130,
1072
+ 825,
1073
+ 213
1074
+ ],
1075
+ "page_idx": 9
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "REFERENCES ",
1080
+ "text_level": 1,
1081
+ "bbox": [
1082
+ 174,
1083
+ 236,
1084
+ 285,
1085
+ 251
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Ben Adlam, Jasper Snoek, and Samuel L Smith. Cold posteriors and aleatoric uncertainty. arXiv preprint arXiv:2008.00029, 2020. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 258,
1095
+ 825,
1096
+ 287
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Laurence Aitchison. A statistical theory of semi-supervised learning. arXiv preprint, 2020. ",
1103
+ "bbox": [
1104
+ 169,
1105
+ 297,
1106
+ 771,
1107
+ 314
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Arsenii Ashukha, Alexander Lyzhov, Dmitry Molchanov, and Dmitry Vetrov. Pitfalls of in-domain uncertainty estimation and ensembling in deep learning. arXiv preprint arXiv:2002.06470, 2020. ",
1114
+ "bbox": [
1115
+ 173,
1116
+ 324,
1117
+ 826,
1118
+ 354
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Juhan Bae, Guodong Zhang, and Roger Grosse. Eigenvalue corrected noisy natural gradient. arXiv preprint arXiv:1811.12565, 2018. ",
1125
+ "bbox": [
1126
+ 169,
1127
+ 364,
1128
+ 825,
1129
+ 393
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009. ",
1136
+ "bbox": [
1137
+ 173,
1138
+ 404,
1139
+ 823,
1140
+ 446
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Peter Grünwald. The safe bayesian. In International Conference on Algorithmic Learning Theory, pp. 169–183. Springer, 2012. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 457,
1150
+ 823,
1151
+ 487
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Peter Grünwald, Thijs Van Ommen, et al. Inconsistency of bayesian inference for misspecified linear models, and a proposal for repairing it. Bayesian Analysis, 12(4):1069–1103, 2017. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 496,
1161
+ 823,
1162
+ 526
1163
+ ],
1164
+ "page_idx": 9
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "James Hensman, Alexander Matthews, and Zoubin Ghahramani. Scalable variational gaussian process classification. JMLR, 2015. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 536,
1172
+ 825,
1173
+ 565
1174
+ ],
1175
+ "page_idx": 9
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Edwin T Jaynes. Probability theory: The logic of science. Cambridge university press, 2003. ",
1180
+ "bbox": [
1181
+ 171,
1182
+ 575,
1183
+ 782,
1184
+ 592
1185
+ ],
1186
+ "page_idx": 9
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, Toronto, 2009. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 602,
1194
+ 826,
1195
+ 632
1196
+ ],
1197
+ "page_idx": 9
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Alexander G de G Matthews, James Hensman, Richard Turner, and Zoubin Ghahramani. On sparse variational methods and the kullback-leibler divergence between stochastic processes. Journal of Machine Learning Research, 51:231–239, 2016. ",
1202
+ "bbox": [
1203
+ 173,
1204
+ 641,
1205
+ 825,
1206
+ 684
1207
+ ],
1208
+ "page_idx": 9
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Sebastian W Ober and Laurence Aitchison. Global inducing point variational posteriors for bayesian neural networks and deep gaussian processes. arXiv preprint arXiv:2005.08140, 2020. ",
1213
+ "bbox": [
1214
+ 173,
1215
+ 694,
1216
+ 825,
1217
+ 724
1218
+ ],
1219
+ "page_idx": 9
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Kazuki Osawa, Siddharth Swaroop, Mohammad Emtiyaz E Khan, Anirudh Jain, Runa Eschenhagen, Richard E Turner, and Rio Yokota. Practical deep learning with bayesian principles. In Advances in Neural Information Processing Systems, pp. 4289–4301, 2019. ",
1224
+ "bbox": [
1225
+ 173,
1226
+ 734,
1227
+ 826,
1228
+ 779
1229
+ ],
1230
+ "page_idx": 9
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Joshua C Peterson, Ruairidh M Battleday, Thomas L Griffiths, and Olga Russakovsky. Human uncertainty makes classification more robust. In Proceedings of the IEEE International Conference on Computer Vision, pp. 9617–9626, 2019. ",
1235
+ "bbox": [
1236
+ 171,
1237
+ 787,
1238
+ 823,
1239
+ 830
1240
+ ],
1241
+ "page_idx": 9
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Twan Van Laarhoven. L2 regularization versus batch and weight normalization. arXiv preprint arXiv:1706.05350, 2017. ",
1246
+ "bbox": [
1247
+ 171,
1248
+ 842,
1249
+ 825,
1250
+ 871
1251
+ ],
1252
+ "page_idx": 9
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-11), pp. 681–688, 2011. ",
1257
+ "bbox": [
1258
+ 174,
1259
+ 881,
1260
+ 825,
1261
+ 922
1262
+ ],
1263
+ "page_idx": 9
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Florian Wenzel, Kevin Roth, Bastiaan S Veeling, Jakub Swi ˛atkowski, Linh Tran, Stephan Mandt, ´ Jasper Snoek, Tim Salimans, Rodolphe Jenatton, and Sebastian Nowozin. How good is the bayes posterior in deep neural networks really? arXiv preprint arXiv:2002.02405, 2020. ",
1268
+ "bbox": [
1269
+ 176,
1270
+ 102,
1271
+ 823,
1272
+ 146
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Kyle W Willett, Chris J Lintott, Steven P Bamford, Karen L Masters, Brooke D Simmons, Kevin RV Casteels, Edward M Edmondson, Lucy F Fortson, Sugata Kaviraj, William C Keel, et al. Galaxy zoo 2: detailed morphological classifications for 304 122 galaxies from the sloan digital sky survey. Monthly Notices of the Royal Astronomical Society, 435(4):2835–2860, 2013. ",
1279
+ "bbox": [
1280
+ 174,
1281
+ 155,
1282
+ 826,
1283
+ 210
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Christopher KI Williams and Carl Edward Rasmussen. Gaussian processes for machine learning. MIT press Cambridge, MA, 2006. ",
1290
+ "bbox": [
1291
+ 176,
1292
+ 219,
1293
+ 821,
1294
+ 250
1295
+ ],
1296
+ "page_idx": 10
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Guodong Zhang, Shengyang Sun, David Duvenaud, and Roger Grosse. Noisy natural gradient as variational inference. arXiv preprint arXiv:1712.02390, 2017. ",
1301
+ "bbox": [
1302
+ 176,
1303
+ 257,
1304
+ 823,
1305
+ 286
1306
+ ],
1307
+ "page_idx": 10
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Ruqi Zhang, Chunyuan Li, Jianyi Zhang, Changyou Chen, and Andrew Gordon Wilson. Cyclical stochastic gradient mcmc for bayesian deep learning. arXiv preprint arXiv:1902.03932, 2019. ",
1312
+ "bbox": [
1313
+ 174,
1314
+ 295,
1315
+ 821,
1316
+ 324
1317
+ ],
1318
+ "page_idx": 10
1319
+ },
1320
+ {
1321
+ "type": "image",
1322
+ "img_path": "images/c774ab7dd60cd0fce279753f346c932ba5bee6659ce26622ed2d53e9f7a0aa4d.jpg",
1323
+ "image_caption": [
1324
+ "Figure 8: SGD in a ResNet18 with batchnorm removed with a tempered maximum a-posteriori loss. A Test log-likelihood. B Accuracy. "
1325
+ ],
1326
+ "image_footnote": [],
1327
+ "bbox": [
1328
+ 279,
1329
+ 104,
1330
+ 718,
1331
+ 237
1332
+ ],
1333
+ "page_idx": 11
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "A COLD POSTERIORS IN MAXIMUM A-POSTERIORI INFERENCE ",
1338
+ "text_level": 1,
1339
+ "bbox": [
1340
+ 176,
1341
+ 308,
1342
+ 707,
1343
+ 321
1344
+ ],
1345
+ "page_idx": 11
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "Our explanation for the cold posterior effect suggests that it is not just due to the stochasticity of the posterior, but should also arise in e.g. maximum a-posteriori (MAP) inference. However, MAP inference causes serious issues in networks with batchnorm. In particular, with batchnorm, the outputs become invariant to the scale of the weights, so the weights can continually decay towards zero (Van Laarhoven, 2017). Note that these considerations are not relevant when we are doing full approximate inference, as the product of the prior and likelihood is a static quantity with a well-defined scale that cannot e.g. decay towards zero. As such, we considered tempering in our usual ResNet18, but where we have deleted the batchnorm layers. We used a standard protocol for these types of network: SGD with momentum of 0.9 and an initial learning rate of 0.1, followed by decays to 0.01 and 0.001 at epochs 150 and 200. We read off performance at the final epoch (250) and used a batch size of 128. We use a standard prior over the weights, with variance 2/fan-in, to keep the scale of the inputs and outputs similar. ",
1350
+ "bbox": [
1351
+ 174,
1352
+ 338,
1353
+ 825,
1354
+ 505
1355
+ ],
1356
+ "page_idx": 11
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "Remarkably, we found extremely strong cold-posterior effects (Fig. 8). These are perhaps expected as it is common-knowledge (but difficult to find a reference for) that while weight-decay is closely related to MAP inference with a Gaussian prior, good settings for the weight-decay coefficient are much smaller than those suggested by MAP inference with a sensible prior. Interestingly, these results suggest that the robustness of standard models to very low temperatures might arise due to batchnorm, and not be a fundamental property (e.g. having very large amounts of data). ",
1361
+ "bbox": [
1362
+ 174,
1363
+ 512,
1364
+ 825,
1365
+ 595
1366
+ ],
1367
+ "page_idx": 11
1368
+ },
1369
+ {
1370
+ "type": "image",
1371
+ "img_path": "images/2039bfc1cc6ba9d8619015147301c7b8c8097c70923c43fdf69638cef95d190f.jpg",
1372
+ "image_caption": [
1373
+ "Figure 9: Toy BNN model. A Test log-likelihood vs $\\lambda$ for different settings of $S$ . B The optimal $\\lambda$ , plotted against $S$ . "
1374
+ ],
1375
+ "image_footnote": [],
1376
+ "bbox": [
1377
+ 266,
1378
+ 103,
1379
+ 789,
1380
+ 238
1381
+ ],
1382
+ "page_idx": 12
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "B TOY BAYESIAN NEURAL NETWORK EXAMPLE ",
1387
+ "text_level": 1,
1388
+ "bbox": [
1389
+ 174,
1390
+ 308,
1391
+ 586,
1392
+ 321
1393
+ ],
1394
+ "page_idx": 12
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "To confirm the results in the Gaussian processes toy example in the main text, we did the same exercise with a toy Bayesian neural network. In particular, we considered 100 training examples, drawn IID from standard Gaussians, each with 5 input dimensions and 2 class outputs. We generated the “true” or target outputs from a one hidden layer ReLU network, with 30 hidden units, drawn from the prior. We trained the same network, using Langevin dynamics (full batch, but no rejection step; initialized randomly from the prior). As in the GP example, we applied our generative model of dataset curation with different settings for $S$ in the generative model. For test and training, we used the standard single-labeller log-likelihood, which ignores rejected noconsensus inputs. We implemented a highly parallelised Langevin sampling algorithm, which allowed us to draw 500 different datasets, and run one chain for each dataset (and each setting of $\\lambda$ in parallel). The large number of chains allowed us to obtain very accurate results, but did mean that it was not possible to plot lines for individual datasets. We used a learning rate of 0.01 and burn in of 4,000 steps; to compute performance, we averaged over 50 samples of neural-network parameters, which were taken from a chain that was 20,000 steps long in total. ",
1399
+ "bbox": [
1400
+ 174,
1401
+ 338,
1402
+ 825,
1403
+ 532
1404
+ ],
1405
+ "page_idx": 12
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "In Fig. 9A, we plot the test-log-likelihood for different settings of $\\lambda$ . There is a clear trend that as $S$ increases, the optimal temperature falls, and at the same time, the curves become flatter. Notably, these curves become flatter at the top for larger settings of $S$ , making it difficult to identify the optimal setting for $\\lambda$ at higher values of $S$ . We then plotted the optimal setting of $\\lambda$ against $S$ (Fig 9B). Initially, $S = 1$ is equivalent to the standard classification setup, as consensus is always reached, and as such, we find that the optimal temperature was 1. As in Fig. 4E, we found that $\\lambda ^ { * } = 1 / S$ held only approximately. Nonetheless, these results suggest that we might need more tempering than suggested by $\\lambda ^ { * } = 1 / S$ , which supports our proposed explanation of the cold posterior effect. Finally, it should be noted that these results depend sensitively on the accuracy of the inference algorithm, so it is difficult to say as yet the degree to which mismatch between $\\lambda ^ { * }$ and $1 / S$ arises due to inaccuracy in inference or would emerge in the intractable true-posterior. ",
1410
+ "bbox": [
1411
+ 174,
1412
+ 539,
1413
+ 825,
1414
+ 693
1415
+ ],
1416
+ "page_idx": 12
1417
+ },
1418
+ {
1419
+ "type": "text",
1420
+ "text": "C GALAXY ZOO 2 DETAILS ",
1421
+ "text_level": 1,
1422
+ "bbox": [
1423
+ 176,
1424
+ 102,
1425
+ 416,
1426
+ 118
1427
+ ],
1428
+ "page_idx": 13
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "The Galaxy Zoo 2 data set (Willett et al., 2013) was constructed by presenting images of galaxies to volunteers, who were asked to answer a questionnaire about the morphological features of the presented galaxy. These questions are not independent from each other but are part of a decision tree. As such, the questions a volunteer gets asked depends on their answers to earlier questions. For each galaxy, answers from multiple volunteers were collect. The raw data is recorded as counts of how many times each answer was picked across all volunteers. ",
1433
+ "bbox": [
1434
+ 174,
1435
+ 132,
1436
+ 825,
1437
+ 217
1438
+ ],
1439
+ "page_idx": 13
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "From this data we wanted to derive classes in such a way that the classification performed by each volunteer was equivalent to a vote towards one of our classes. The most straightforward approach is to consider each unique path in the decision tree to be a unique class. Given that a volunteer fills in the questionnaire only once, their classification is equivalent to a single vote towards a specific class. The problem with this approach is that there are 1265 possible paths in the original decision tree. The number of volunteers per galaxy is less than a hundred, which means that the majority of these paths would receive 0 votes. ",
1444
+ "bbox": [
1445
+ 173,
1446
+ 223,
1447
+ 825,
1448
+ 320
1449
+ ],
1450
+ "page_idx": 13
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "In order to address this, we simplified the tree to one where there are only 9 possible paths. The simplifications was performed by manually pruning branches of the decision tree. This way each path in the original tree could be mapped to a path in the simplified one, while maintaining specific aspects of its meaning. The simplified tree can be seen in (modified_graph.png). The following pruning operations were performed in order to create this simplified tree. Here we refer to each question using its task number, as given in the original paper. ",
1455
+ "bbox": [
1456
+ 174,
1457
+ 328,
1458
+ 825,
1459
+ 412
1460
+ ],
1461
+ "page_idx": 13
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "• Task 02, Answer ’no’: leads directly to Task 05, skipping Task 03, Task 04, Task 10 and Task 11 \n• Task 05, Answers ’dominant’ and ’obvious’: merged together becoming a combined category labelled ’obvious’ \n• Task 05, all answers: lead directly to the end of the graph, becoming exit points \n• Task 07, all answers: lead directly to the end of the graph, becoming exit points Task 09, Answers ’rounded’ and ’boxy’: merged together becoming a combined category labelled ’with bulge’ \n• Task 09, all answers: lead directly to the end of the graph, becoming exit points \n• As a consequence of the above pathing changes Task 03, Task 04, Task 06, Task 08, Task 10 and Task 11 are no longer reachable and thus removed from the graph ",
1466
+ "bbox": [
1467
+ 215,
1468
+ 422,
1469
+ 825,
1470
+ 603
1471
+ ],
1472
+ "page_idx": 13
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "If we are to take each of the 9 paths in the simplified tree to form a class, then the resulting 9 classes would have the following meanings: ",
1477
+ "bbox": [
1478
+ 173,
1479
+ 613,
1480
+ 823,
1481
+ 642
1482
+ ],
1483
+ "page_idx": 13
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "• smooth galaxy, completely round shape \n• smooth galaxy, in-between round and cigar shaped \n• smooth galaxy, cigar shaped \n• edge-on disk galaxy, with central bulge \n• edge-on disk galaxy, no central bulge \n• face-on disk galaxy, obvious central bulge \n• face-on disk galaxy, just noticeable central bulge \n• face-on disk galaxy, no central bulge \n• star or artifact ",
1488
+ "bbox": [
1489
+ 215,
1490
+ 654,
1491
+ 565,
1492
+ 815
1493
+ ],
1494
+ "page_idx": 13
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "Using the simplified decision tree, we can decompose the data into votes for each path. The Galaxy Zoo data was recorded as counts for each specific answer, thus losing the information about which route a specific volunteer took in the tree. However, with the help of network flow algorithms it is possible to translate the data into counts of how many volunteers took a specific path. This way, by taking each path to be a class and the number of volunteers that followed a path to be the number of votes toward a class, we have a data set where each data point has received multiple classification over a fixed range of classes. ",
1499
+ "bbox": [
1500
+ 173,
1501
+ 825,
1502
+ 825,
1503
+ 924
1504
+ ],
1505
+ "page_idx": 13
1506
+ },
1507
+ {
1508
+ "type": "image",
1509
+ "img_path": "images/aac45c108bc4027345e694733ac3b27a1d33e65f0d07458643bb9c016bffb85c.jpg",
1510
+ "image_caption": [
1511
+ "Figure 10: Modified decision tree from Willett et al. (2013) showing how we truncated the decision tree. Images in the same box are viewed as the same class. "
1512
+ ],
1513
+ "image_footnote": [],
1514
+ "bbox": [
1515
+ 184,
1516
+ 103,
1517
+ 812,
1518
+ 477
1519
+ ],
1520
+ "page_idx": 14
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "For each galaxy in the Galaxy ${ \\bf Z } _ { 0 0 } \\mathrm { ~ } 2$ data set we also have the image that was presented to the volunteers. As such, we can use our derived classes in an image classification task. In order to do this, we performed certain pre-processing. The original images have a resolution of $4 2 4 \\mathrm { x } 4 2 4$ with the galaxy being at the center of the image. Thus, we performed a center crop of size $2 1 2 \\mathbf { x } 2 1 2$ and then resized the images down to 32x32. For data augmentation, we used full 360 degree continuous rotations. ",
1525
+ "bbox": [
1526
+ 173,
1527
+ 545,
1528
+ 825,
1529
+ 628
1530
+ ],
1531
+ "page_idx": 14
1532
+ }
1533
+ ]
parse/train/S1HEBe_Jl/S1HEBe_Jl.md ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING TO PROTECT COMMUNICATIONS WITH ADVERSARIAL NEURAL CRYPTOGRAPHY
2
+
3
+ Mart´ın Abadi and David G. Andersen ∗ Google Brain
4
+
5
+ # ABSTRACT
6
+
7
+ We ask whether neural networks can learn to use secret keys to protect information from other neural networks. Specifically, we focus on ensuring confidentiality properties in a multiagent system, and we specify those properties in terms of an adversary. Thus, a system may consist of neural networks named Alice and Bob, and we aim to limit what a third neural network named Eve learns from eavesdropping on the communication between Alice and Bob. We do not prescribe specific cryptographic algorithms to these neural networks; instead, we train end-to-end, adversarially. We demonstrate that the neural networks can learn how to perform forms of encryption and decryption, and also how to apply these operations selectively in order to meet confidentiality goals.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ As neural networks are applied to increasingly complex tasks, they are often trained to meet endto-end objectives that go beyond simple functional specifications. These objectives include, for example, generating realistic images (e.g., (Goodfellow et al., 2014a)) and solving multiagent problems (e.g., (Foerster et al., 2016a;b; Sukhbaatar et al., 2016)). Advancing these lines of work, we show that neural networks can learn to protect their communications in order to satisfy a policy specified in terms of an adversary.
12
+
13
+ Cryptography is broadly concerned with algorithms and protocols that ensure the secrecy and integrity of information. Cryptographic mechanisms are typically described as programs or Turing machines. Attackers are also described in those terms, with bounds on their complexity (e.g., limited to polynomial time) and on their chances of success (e.g., limited to a negligible probability). A mechanism is deemed secure if it achieves its goal against all attackers. For instance, an encryption algorithm is said to be secure if no attacker can extract information about plaintexts from ciphertexts. Modern cryptography provides rigorous versions of such definitions (Goldwasser & Micali, 1984).
14
+
15
+ Adversaries also play important roles in the design and training of neural networks. They arise, in particular, in work on adversarial examples (Szegedy et al., 2013; Goodfellow et al., 2014b) and on generative adversarial networks (GANs) (Goodfellow et al., 2014a). In this latter context, the adversaries are neural networks (rather than Turing machines) that attempt to determine whether a sample value was generated by a model or drawn from a given data distribution. Furthermore, in contrast with definitions in cryptography, practical approaches to training GANs do not consider all possible adversaries in a class, but rather one or a small number of adversaries that are optimized by training. We build on these ideas in our work.
16
+
17
+ Neural networks are generally not meant to be great at cryptography. Famously, the simplest neural networks cannot even compute XOR, which is basic to many cryptographic algorithms. Nevertheless, as we demonstrate, neural networks can learn to protect the confidentiality of their data from other neural networks: they discover forms of encryption and decryption, without being taught specific algorithms for these purposes.
18
+
19
+ Knowing how to encrypt is seldom enough for security and privacy. Interestingly, neural networks can also learn what to encrypt in order to achieve a desired secrecy property while maximizing utility. Thus, when we wish to prevent an adversary from seeing a fragment of a plaintext, or from estimating a function of the plaintext, encryption can be selective, hiding the plaintext only partly.
20
+
21
+ The resulting cryptosystems are generated automatically. In this respect, our work resembles recent research on automatic synthesis of cryptosystems, with tools such as ZooCrypt (Barthe et al., 2013), and contrasts with most of the literature, where hand-crafted cryptosystems are the norm. ZooCrypt relies on symbolic theorem-proving, rather than neural networks.
22
+
23
+ Classical cryptography, and tools such as ZooCrypt, typically provide a higher level of transparency and assurance than we would expect by our methods. Our model of the adversary, which avoids quantification, results in much weaker guarantees. On the other hand, it is refreshingly simple, and it may sometimes be appropriate.
24
+
25
+ Consider, for example, a neural network with several components, and suppose that we wish to guarantee that one of the components does not rely on some aspect of the input data, perhaps because of concerns about privacy or discrimination. Neural networks are notoriously difficult to explain, so it may be hard to characterize how the component functions. A simple solution is to treat the component as an adversary, and to apply encryption so that it does not have access to the information that it should not use. In this respect, the present work follows the recent research on fair representations (Edwards & Storkey, 2015; Louizos et al., 2015), which can hide or remove sensitive information, but goes beyond that work by allowing for the possibility of decryption, which supports richer dataflow structures.
26
+
27
+ Classical cryptography may be able to support some applications along these lines. In particular, homomorphic encryption enables inference on encrypted data (Xie et al., 2014; Gilad-Bachrach et al., 2016). On the other hand, classical cryptographic functions are generally not differentiable, so they are at odds with training by stochastic gradient descent (SGD), the main optimization technique for deep neural networks. Therefore, we would have trouble learning what to encrypt, even if we know how to encrypt. Integrating classical cryptographic functions—and, more generally, integrating other known functions and relations (e.g., (Neelakantan et al., 2015))—into neural networks remains a fascinating problem.
28
+
29
+ Prior work at the intersection of machine learning and cryptography has focused on the generation and establishment of cryptographic keys (Ruttor, 2006; Kinzel & Kanter, 2002), and on corresponding attacks (Klimov et al., 2002). In contrast, our work takes these keys for granted, and focuses on their use; a crucial, new element in our work is the reliance on adversarial goals and training. More broadly, from the perspective of machine learning, our work relates to the application of neural networks to multiagent tasks, mentioned above, and to the vibrant research on generative models and on adversarial training (e.g., (Goodfellow et al., 2014a; Denton et al., 2015; Salimans et al., 2016; Nowozin et al., 2016; Chen et al., 2016; Ganin et al., 2015)). From the perspective of cryptography, it relates to big themes such as privacy and discrimination. While we embrace a playful, exploratory approach, we do so with the hope that it will provide insights useful for further work on these topics.
30
+
31
+ Section 2 presents our approach to learning symmetric encryption (that is, shared-key encryption, in which the same keys are used for encryption and for decryption) and our corresponding results. Appendix A explains how the same concepts apply to asymmetric encryption (that is, public-key encryption, in which different keys are used for encryption and for decryption). Section 3 considers selective protection. Section 4 concludes and suggests avenues for further research. Appendix B is a brief review of background on neural networks.
32
+
33
+ # 2 LEARNING SYMMETRIC ENCRYPTION
34
+
35
+ This section discusses how to protect the confidentiality of plaintexts using shared keys. It describes the organization of the system that we consider, and the objectives of the participants in this system. It also explains the training of these participants, defines their architecture, and presents experiments.
36
+
37
+ # 2.1 SYSTEM ORGANIZATION
38
+
39
+ A classic scenario in security involves three parties: Alice, Bob, and Eve. Typically, Alice and Bob wish to communicate securely, and Eve wishes to eavesdrop on their communications. Thus, the desired security property is secrecy (not integrity), and the adversary is a “passive attacker” that can intercept communications but that is otherwise quite limited: it cannot initiate sessions, inject messages, or modify messages in transit.
40
+
41
+ ![](images/a9ab23800cec3a710c3d5a1a9f20ac086445be9bf9db444a6228fd3deb1894d7.jpg)
42
+ Figure 1: Alice, Bob, and Eve, with a symmetric cryptosystem.
43
+
44
+ We start with a particularly simple instance of this scenario, depicted in Figure 1, in which Alice wishes to send a single confidential message $P$ to Bob. The message $P$ is an input to Alice. When Alice processes this input, it produces an output $C$ . (“ $\cdot { \cal { P } } ^ { \prime }$ ” stands for “plaintext” and “ $C ^ { \ast }$ stands for “ciphertext”.) Both Bob and Eve receive $C$ , process it, and attempt to recover $P$ . We represent what they compute by $P _ { \mathrm { B o b } }$ and $P _ { \mathrm { E v e } }$ , respectively. Alice and Bob have an advantage over Eve: they share a secret key $K$ . We treat $K$ as an additional input to Alice and Bob. We assume one fresh key $K$ per plaintext $P$ , but, at least at this abstract level, we do not impose that $K$ and $P$ have the same length.
45
+
46
+ For us, Alice, Bob, and Eve are all neural networks. We describe their structures in Sections 2.4 and 2.5. They each have parameters, which we write $\theta _ { A }$ , $\theta _ { B }$ , and $\theta _ { E }$ , respectively. Since $\theta _ { A }$ and $\theta _ { B }$ need not be equal, encryption and decryption need not be the same function even if Alice and Bob have the same structure. As is common for neural networks, Alice, Bob, and Eve work over tuples of floating-point numbers, rather than sequences of bits. In other words, $K , P , P _ { \mathrm { B o b } } , P _ { \mathrm { E v e } } ,$ and $C$ are all tuples of floating-point numbers. Note that, with this formulation, $C$ , $P _ { \mathrm { B o b } }$ , and $P _ { \mathrm { E v e } }$ may consist of arbitrary floating-point numbers even if $P$ and $K$ consist of 0s and 1s. In practice, our implementations constrain these values to the range $( - 1 , 1 )$ , but permit the intermediate values. We have explored alternatives (based on Williams’ REINFORCE algorithm (Williams, 1992) or on Foerster et al.’s discretization technique (Foerster et al., 2016b)), but omit them as they are not essential to our main points.
47
+
48
+ This set-up, although rudimentary, suffices for basic schemes, in particular allowing for the possibility that Alice and Bob decide to rely on $K$ as a one-time pad, performing encryption and decryption simply by XORing the key $K$ with the plaintext $P$ and the ciphertext $C$ , respectively. However, we do not require that Alice and Bob function in this way—and indeed, in our experiments in Section 2.5, they discover other schemes. For simplicity, we ignore the process of generating a key from a seed. We also omit the use of randomness for probabilistic encryption (Goldwasser & Micali, 1984). Such enhancements may be the subject of further work.
49
+
50
+ # 2.2 OBJECTIVES
51
+
52
+ Informally, the objectives of the participants are as follows. Eve’s goal is simple: to reconstruct $P$ accurately (in other words, to minimize the error between $P$ and $P _ { \mathrm { E v e . } }$ ). Alice and Bob want to communicate clearly (to minimize the error between $P$ and $P _ { \mathrm { B o b . } }$ ), but also to hide their communication from Eve. Note that, in line with modern cryptographic definitions (e.g., (Goldwasser & Micali, 1984)), we do not require that the ciphertext $C$ “look random” to Eve. A ciphertext may even contain obvious metadata that identifies it as such. Therefore, it is not a goal for Eve to distinguish $C$ from a random value drawn from some distribution. In this respect, Eve’s objectives contrast with common ones for the adversaries of GANs. On the other hand, one could try to reformulate Eve’s goal in terms of distinguishing the ciphertexts constructed from two different plaintexts.
53
+
54
+ Given these objectives, instead of training each of Alice and Bob separately to implement some known cryptosystem (Dourlens, 1996), we train Alice and Bob jointly to communicate successfully and to defeat Eve without a pre-specified notion of what cryptosystem they may discover for this purpose. Much as in the definitions of GANs, we would like Alice and Bob to defeat the best possible version of Eve, rather than a fixed Eve. Of course, Alice and Bob may not win for every plaintext and every key, since knowledge of some particular plaintexts and keys may be hardwired into Eve. (For instance, Eve could always output the same plaintext, and be right at least once.) Therefore, we assume a distribution on plaintexts and keys, and phrase our goals for Alice and Bob in terms of expected values.
55
+
56
+ We write $A ( \theta _ { A } , P , K )$ for Alice’s output on input $P , K$ , write $B ( \theta _ { B } , C , K )$ for Bob’s output on input $C , K$ , and write $E ( { \boldsymbol { \theta } } _ { E } , C )$ for Eve’s output on input $C$ . We introduce a distance function $d$ on plaintexts. Although the exact choice of this function is probably not crucial, for concreteness we take the L1 distance $d ( P , P ^ { \prime } ) = \Sigma _ { i = 1 , N } | P _ { i } - P _ { i } ^ { \prime } |$ where $N$ is the length of plaintexts. We define a per-example loss function for Eve:
57
+
58
+ $$
59
+ L _ { E } ( \theta _ { A } , \theta _ { E } , P , K ) = d ( P , E ( \theta _ { E } , A ( \theta _ { A } , P , K ) ) )
60
+ $$
61
+
62
+ Intuitively, $L _ { E } ( \theta _ { A } , \theta _ { E } , P , K )$ represents how much Eve is wrong when the plaintext is $P$ and the key is $K$ . We also define a loss function for Eve over the distribution on plaintexts and keys by taking an expected value:
63
+
64
+ $$
65
+ L _ { E } ( \theta _ { A } , \theta _ { E } ) = \mathbb { E } _ { P , K } ( d ( P , E ( \theta _ { E } , A ( \theta _ { A } , P , K ) ) ) )
66
+ $$
67
+
68
+ We obtain the “optimal Eve” by minimizing this loss:
69
+
70
+ $$
71
+ O _ { E } ( \theta _ { A } ) = \mathrm { a r g m i n } _ { \theta _ { E } } ( L _ { E } ( \theta _ { A } , \theta _ { E } ) )
72
+ $$
73
+
74
+ Similarly, we define a per-example reconstruction error for Bob, and extend it to the distribution on plaintexts and keys:
75
+
76
+ $$
77
+ \begin{array} { r l } & { L _ { B } ( \theta _ { A } , \theta _ { B } , P , K ) = d ( P , B ( \theta _ { B } , A ( \theta _ { A } , P , K ) , K ) ) } \\ & { L _ { B } ( \theta _ { A } , \theta _ { B } ) = \mathbb { E } _ { P , K } ( d ( P , B ( \theta _ { B } , A ( \theta _ { A } , P , K ) , K ) ) ) } \end{array}
78
+ $$
79
+
80
+ We define a loss function for Alice and Bob by combining $L _ { B }$ and the optimal value of $L _ { E }$
81
+
82
+ $$
83
+ L _ { A B } ( \theta _ { A } , \theta _ { B } ) = L _ { B } ( \theta _ { A } , \theta _ { B } ) - L _ { E } ( \theta _ { A } , O _ { E } ( \theta _ { A } ) )
84
+ $$
85
+
86
+ This combination reflects that Alice and Bob want to minimize Bob’s reconstruction error and to maximize the reconstruction error of the “optimal Eve”. The use of a simple subtraction is somewhat arbitrary; below we describe useful variants. We obtain the “optimal Alice and Bob” by minimizing $L _ { A B } ( \theta _ { A } , \theta _ { B } )$ :
87
+
88
+ $$
89
+ ( O _ { A } , O _ { B } ) = \mathrm { a r g m i n } _ { ( \theta _ { A } , \theta _ { B } ) } ( L _ { A B } ( \theta _ { A } , \theta _ { B } ) )
90
+ $$
91
+
92
+ We write “optimal” in quotes because there need be no single global minimum. In general, there are many equi-optimal solutions for Alice and Bob. As a simple example, assuming that the key is of the same size as the plaintext and the ciphertext, Alice and Bob may XOR the plaintext and the ciphertext, respectively, with any permutation of the key, and all permutations are equally good as long as Alice and Bob use the same one; moreover, with the way we architect our networks (see Section 2.4), all permutations are equally likely to arise.
93
+
94
+ Training begins with the Alice and Bob networks initialized randomly. The goal of training is to go from that state to $( O _ { A } , O _ { B } )$ , or close to $( O _ { A } , O _ { B } )$ . We explain the training process next.
95
+
96
+ # 2.3 TRAINING REFINEMENTS
97
+
98
+ Our training method is based upon SGD. In practice, much as in work on GANs, our training method cuts a few corners and incorporates a few improvements with respect to the high-level description of objectives of Section 2.2. We present these refinements next, and give further details in Section 2.5.
99
+
100
+ First, the training relies on estimated values calculated over “minibatches” of hundreds or thousands of examples, rather than on expected values over a distribution.
101
+
102
+ We do not compute the “optimal Eve” for a given value of $\theta _ { A }$ , but simply approximate it, alternating the training of Eve with that of Alice and Bob. Intuitively, the training may for example proceed roughly as follows. Alice may initially produce ciphertexts that neither Bob nor Eve understand at all. By training for a few steps, Alice and Bob may discover a way to communicate that allows Bob to decrypt Alice’s ciphertexts at least partly, but which is not understood by (the present version of) Eve. In particular, Alice and Bob may discover some trivial transformations, akin to rot13. After a bit of training, however, Eve may start to break this code. With some more training, Alice and Bob may discover refinements, in particular codes that exploit the key material better. Eve eventually finds it impossible to adjust to those codes. This kind of alternation is typical of games; the theory of continuous games includes results about convergence to equilibria (e.g., (Ratliff et al., 2013)) which it might be possible to apply in our setting.
103
+
104
+ Furthermore, in the training of Alice and Bob, we do not attempt to maximize Eve’s reconstruction error. If we did, and made Eve completely wrong, then Eve could be completely right in the next iteration by simply flipping all output bits! A more realistic and useful goal for Alice and Bob is, generally, to minimize the mutual information between Eve’s guess and the real plaintext. In the case of symmetric encryption, this goal equates to making Eve produce answers indistinguishable from a random guess. This approach is somewhat analogous to methods that aim to prevent overtraining GANs on the current adversary (Salimans et al., 2016, Section 3.1). Additionally, we can tweak the loss functions so that they do not give much importance to Eve being a little lucky or to Bob making small errors that standard error-correction could easily address.
105
+
106
+ Finally, once we stop training Alice and Bob, and they have picked their cryptosystem, we validate that they work as intended by training many instances of Eve that attempt to break the cryptosystem. Some of these instances may be derived from earlier phases in the training.
107
+
108
+ # 2.4 NEURAL NETWORK ARCHITECTURE
109
+
110
+ The Architecture of Alice, Bob, and Eve Because we wish to explore whether a general neural network can learn to communicate securely, rather than to engineer a particular method, we aimed to create a neural network architecture that was sufficient to learn mixing functions such as XOR, but that did not strongly encode the form of any particular algorithm.
111
+
112
+ To this end, we chose the following “mix & transform” architecture. It has a first fully-connected (FC) layer, where the number of outputs is equal to the number of inputs. The plaintext and key bits are fed into this FC layer. Because each output bit can be a linear combination of all of the input bits, this layer enables—but does not mandate—mixing between the key and the plaintext bits. In particular, this layer can permute the bits. The FC layer is followed by a sequence of convolutional layers, the last of which produces an output of a size suitable for a plaintext or ciphertext. These convolutional layers learn to apply some function to groups of the bits mixed by the previous layer, without an a priori specification of what that function should be. Notably, the opposite order (convolutional followed by FC) is much more common in image-processing applications. Neural networks developed for those applications frequently use convolutions to take advantage of spatial locality. For neural cryptography, we specifically wanted locality—i.e., which bits to combine—to be a learned property, instead of a pre-specified one. While it would certainly work to manually pair each input plaintext bit with a corresponding key bit, we felt that doing so would be uninteresting.
113
+
114
+ We refrain from imposing further constraints that would simplify the problem. For example, we do not tie the parameters $\theta _ { A }$ and $\theta _ { B }$ , as we would if we had in mind that Alice and Bob should both learn the same function, such as XOR.
115
+
116
+ # 2.5 EXPERIMENTS
117
+
118
+ As a proof-of-concept, we implemented Alice, Bob, and Eve networks that take $N$ -bit random plaintext and key values, and produce $N$ -entry floating-point ciphertexts, for $N = 1 6$ , 32, and 64. Both plaintext and key values are uniformly distributed. Keys are not deliberately reused, but may reoccur because of random selection. (The experiments in Section 3 consider more interesting distributions and also allow plaintext and key values to have different sizes.)
119
+
120
+ We implemented our experiments in TensorFlow (Abadi et al., 2016a;b). We ran them on a workstation with one GPU; the specific computation platform does not affect the outcome of the experiments. We plan to release the source code for the experiments.
121
+
122
+ Network Structure Our networks follow the “mix & transform” pattern described in Section 2.4. The Alice network concatenates two $N$ -bit inputs (the plaintext and the key) into a $2 N$ -entry vector, using $- 1$ and 1 to represent the bit values. This vector is processed through a $2 N \times 2 N$ FC layer, then sent through a succession of four 1-D convolutional layers. The convolutional layers are described in terms of their window size, input depth, and output depth. Each has a “stride”—the amount by which the window is shifted at each step. The concrete layers are [4, 1, 2], [2, 2, 4], [1, 4, 4], and [1, 4, 1], with strides of $1 , 2 , 1 , 1$ . Intuitively, the first layer slides a size-4 window across the $2 N$ output elements from the FC layer, outputting two numbers (output depth 2), with stride 1. We use a sigmoid nonlinear unit after each layer except the final one. After the final layer, where the output is reduced to $N$ elements, we use a tanh nonlinear unit. (Recall that tanh has an output domain between $[ - 1 , 1 ]$ , bringing the values back to a range that can map to binary values.) The Bob network is identical to the Alice network The Eve network takes only the ciphertext as input, and thus has a first $N \times 2 N$ FC layer.
123
+
124
+ Training To train the networks, we use a “minibatch” size ranging from 256 to 4096 entries. Unless otherwise specified, we present the results from the training runs with 4096 entries. We use TensorFlow’s Adam (Kingma & Ba, 2014) optimizer with a learning rate of 0.0008. We do not reduce the learning rate over time because we wish Alice, Bob, and Eve to be able to continue to respond strongly to changes in other components, until Alice and Bob—hopefully—achieve a solution that is robust to additional changes in Eve.
125
+
126
+ Training alternates between Alice/Bob and Eve, with Alice/Bob training for one minibatch, and then Eve training for two minibatches. We chose this ratio in order to give a slight computational edge to the adversary Eve without training it so much that it becomes excessively specific to the exact current parameters of Alice and Bob. Empirically, this value has worked well.
127
+
128
+ Loss Functions Eve’s loss function is exactly as described above: the L1 distance between Eve’s guess and the input plaintext. The loss function for Alice and Bob is more complex, as indicated in Sections 2.2 and 2.3. This function has two components, related to Bob’s reconstruction error and to the eavesdropper’s success. The first component is simply the L1 distance between Bob’s output and the input plaintext. The latter component, on the other hand, is $( N / 2 - \mathrm { E v e } \ L 1 \mathrm { e r r o r } ) ^ { 2 } / ( N / 2 ) ^ { 2 }$ . This definition expresses the goal, described in Section 2.3, that Eve should not do better than random guessing. Accordingly, this component is minimized when half of the message bits are wrong and half are right. We choose a quadratic formula in order to place more emphasis on making Eve have a large error, and to impose less of a penalty when Eve guesses a few bits correctly, as should happen occasionally even if Eve’s guesses are effectively random. Adopting this formulation allowed us to have a meaningful per-example loss function (instead of looking at larger batch statistics), and improved the robustness of training. Its cost is that our final, trained Alice and Bob typically allow Eve to reconstruct slightly more bits than purely random guessing would achieve. We have not obtained satisfactory results for loss functions that depend linearly (rather than quadratically) on Eve’s reconstruction error. The best formulation remains an open question.
129
+
130
+ Post-training Evaluation After successfully training the networks so that they cross an accuracy threshold (e.g., at most 0.05 bits of reconstruction error for Alice and Bob, with Eve achieving only 1-2 bits more than random guessing would predict), we reset the Eve network and train it from scratch 5 times, each for up to 250,000 steps, recording the best result achieved by any Eve. An Alice/Bob combination that fails to achieve the target thresholds within 150,000 steps is a training failure. If the retrained Eves obtain a substantial advantage, the solution is non-robust. Otherwise, we consider it a successful training outcome.
131
+
132
+ Results Figure 2 shows, for one successful run, the evolution of Bob’s reconstruction error and Eve’s reconstruction error vs. the number of training steps for $N = 1 6$ bit plaintext and key values, using a minibatch size of 4096. Each point in the graph is the mean error across 4096 examples. An ideal result would have Bob’s reconstruction error drop to zero and Eve’s reconstruction error reach 8 (half the bits wrong). In this example, both reconstruction errors start high. After a period of time, Alice and Bob start to communicate quite effectively, but in a way that allows Eve to improve its understanding as well, gradually. Then, around step 10,000, Alice and Bob counter Eve’s progress. By about step 15,000, the training goals are effectively achieved. The remaining steps merely increase Eve’s reconstruction error slightly.
133
+
134
+ ![](images/237079668eea8bc4408ed9388b7bc9f2b86593044078b3e6611c6ee4e1c7a816.jpg)
135
+ Figure 2: Evolution of Bob’s and Eve’s reconstruction errors during training. Lines represent the mean error across a minibatch size of 4096.
136
+
137
+ ![](images/a9a52de758fe08259490978291475b7dd128e71fa22e19d0683904b6c4dd6231.jpg)
138
+ Figure 3: Final reconstruction errors of Bob and of the most effective retrained Eve, for the fourteen initially successful runs, of twenty. An ideal result would be a dot in the upper-left corner, representing no Bob reconstruction error and 8 bits of Eve reconstruction error.
139
+
140
+ This training graph does not look like a typical result for neural networks, where monotonicity in the number of steps is generally expected. Instead, the dynamics of this adversarial training appear somewhat more reminiscent of evolutionary processes. These dynamics appear to depend on somewhat random-seeming change to cause the bits to mix slightly, but once there is some mixing, the gradient descent can rapidly drive it farther.
141
+
142
+ Supporting this interpretation is the observation that training is not always successful. With $N = 1 6$ , six of twenty initial runs were failures that never got Bob’s reconstruction error under the 0.05 threshold, or failed to drive Eve’s reconstruction error above 7.3 bits (of 16). In order to test the robustness of the other fourteen Alice/Bob combinations, we retrained Eve five times, and obtained reconstruction errors for Eve that ranged from 4.67 to 6.97 bits, with a mean of 6.1. Figure 3 shows the final reconstruction errors of Bob and of the most effective retrained Eve for those fourteen Alice/Bob combinations. If we somewhat arbitrarily define success as maintaining Bob’s reconstruction error at or under 0.05 bits, and requiring that Eve get at least 6 bits wrong, on average, then training succeeded half of the time (ten of twenty cases).
143
+
144
+ Although training with an adversary is often unstable (Salimans et al., 2016), we suspect that some additional engineering of the neural network and its training may be able to increase this overall success rate. With a minibatch size of only 512, for example, we achieved a success rate of only $1 / 3$ (vs. the $1 / 2$ that we achieved with a minibatch size of 4096). In the future, it may be worth studying the impact of minibatch sizes, and also that of other parameters such as the learning rate.
145
+
146
+ Analogous results hold in general for $N = 3 2$ and $N = 6 4$ -bit keys and plaintexts; training appears to be successful somewhat more often for $N = 6 4$ . Basically, the experiments for $N = 3 2$ and $N = 6 4$ indicate that there is nothing special about $N = 1 6$ which, to a cryptographer, may look suspiciously tiny. We focus our presentation on the case of $N = 1 6$ because, first, the experiments run more rapidly, and second, it is modestly easier to examine their behavior.
147
+
148
+ For one successful training run, we studied the changes in the ciphertext induced by various plaintext/key pairs. Although we did not perform an exhaustive analysis of the encryption method, we did make a few observations. First, it is key-dependent: changing the key and holding the plaintext constant results in different ciphertext output. It is also plaintext-dependent, as required for successful communication. However, it is not simply XOR. In particular, the output values are often floating-point values other than 0 and 1. Moreover, the effect of a change to either a key bit or a plaintext bit is spread across multiple elements in the ciphertext, not constrained to a single bit as it would be with XOR. A single-bit flip in the key typically induces significant changes in three to six of the 16 elements in the ciphertext, and smaller changes in other elements. Plaintext bits are similarly diffused across the ciphertext.
149
+
150
+ # 3 LEARNING WHAT TO PROTECT
151
+
152
+ Building on the results of Section 2, we study selective protection. In other words, we consider the question of whether neural networks can learn what information to protect, given confidentiality objectives described in terms of an adversary. In the simplest case, a plaintext may have several components; if we wish to keep the adversary from seeing one of the components, it may suffice to encrypt it. More generally, we may wish to publish some values correlated with the plaintext but prevent the adversary from calculating other values. In such scenarios, protecting information selectively while maximizing utility is both challenging and interesting.
153
+
154
+ # 3.1 THE PROBLEM
155
+
156
+ To test these ideas and to demonstrate the viability of selective protection, we focus on a concrete experiment. We construct an artificial dataset consisting of tuples of four values, $\langle \mathbf { A } , \mathbf { B } , \mathbf { C } , \mathbf { D } \rangle$ . We aim to build and train a system that outputs two predictions of D, given the first three values as inputs: a “true” prediction of D (that is, the most accurate possible estimate of D given $\langle \mathbf { A } , \mathbf { B } , \mathbf { C } \rangle ,$ ), and a “privacy-preserving” estimate of D, which we call D-public, defined as the best possible estimate of D that does not reveal any information about the value of C.
157
+
158
+ The system organization is essentially that of Figure 1, with Alice and Bob sharing a key, but here Alice receives $\langle \bar { \bf A } , \bf B , C \rangle$ and produces D-public in addition to a ciphertext; both Bob and Eve have access to Alice’s outputs; Bob uses them for producing an improved estimate of D, while Eve attempts to recover C. Thus, our goal is to demonstrate that the adversarial training permits approximating D without revealing C, and that this approximation can be combined with encrypted information and with a key in order to obtain a better approximation of D.
159
+
160
+ The distributions of A, B, C, and D are constructed so that there is substantial correlation between them. In particular, knowing D exactly would convey some information about the likely values of C. In our experiments, A, B, C, and $\mathbf { D }$ are normally distributed floating-point values with a correlation matrix imposed upon them. The specifics of how we generate A, B, C, and D are standard: we compute the Cholesky decomposition $L L ^ { * }$ of a $4 \times 4$ correlation matrix that specifies the pairwise correlations, we generate vectors of 4 normally distributed floating-point values, and then we multiply these vectors by $L$ in order to generate values of A, B, C, and D.
161
+
162
+ Although A, B, C, and D do not correspond to any real-world data, these experiments are loosely inspired by real-world tasks. For example, A, B, and C may represent attributes of a user, which may in general be correlated, and D may represent a decision about the user, a prediction of the user’s behavior, or a recommendation to the user.
163
+
164
+ # 3.2 NEURAL NETWORK ARCHITECTURE AND TRAINING GOALS
165
+
166
+ In the experiments that follow, we use an augmented version of the neural network architecture of Section 2.4. The inputs first go into a new FC layer (12 inputs—eight key bits and four values—and 12 outputs); the outputs of that first layer are fed into a network with the architecture of Section 2.4. Intuitively, we chose this augmented architecture because a single FC layer should be capable of predicting D from A, B, and C, as well as making a prediction decorrelated with C; and the architecture of Section 2.4 suffices to encrypt any of the output of the first layer under the key. We therefore believed this augmented architecture would be sufficient to accomplish its task, though it may be more than is necessary to do so.
167
+
168
+ We train Eve with the goal of minimizing the squared error of its estimate of C. We train Alice and Bob with the goal of minimizing a linear combination of three terms: the squared error of each of the two estimates of D, and the absolute value of the covariance of Eve’s estimate of C with respect to the actual value of C. We compute this covariance on a batch of training examples, and define the loss function for Alice and Bob batch-wise.
169
+
170
+ A human engineer would naturally try to design the system somewhat differently—likely first computing the desired quantities, and then encrypting the values to be hidden, relying on the encryption and decryption components developed in Section 2 as modules. We prefer instead an end-to-end approach, because our goal is to understand whether a neural network can learn to hide information selectively, given only a high-level specification (“do not leak information about C, but let people with the right key learn as much as possible about D”). In this end-to-end approach, the system does not have distinct, pre-assigned units for encryption and decryption, and all components are trained jointly. In particular, although we benefit from some of the insights from Section 2, we do not rely on the components developed there. End-to-end approaches are sometimes preferred in machine learning because they can more efficiently use resources and information. In our case, this feature may mean, in particular, that the cryptographic operations are optimized for the given distribution of inputs. Nevertheless, our choices have the primary goal of maximizing insight, not efficiency.
171
+
172
+ # 3.3 RESULTS
173
+
174
+ To understand whether the system is learning to hide information properly, we train a separate evaluator that we call “Blind Eve”, which is aware of the distribution of C. Blind Eve tries to guess C relying only upon this baseline information, whereas the real Eve also knows the intermediate output (D-public) and the ciphertext. If Eve’s reconstruction error becomes equal to that of Blind Eve, we know that Eve is not successfully extracting information from the public estimate and the ciphertext.
175
+
176
+ Figure 4 shows the results of adversarial training to learn to hide C. The red “public error” line shows the average error of D-public vs. D. The green “Bob error” line shows Bob’s average reconstruction error, which drops over time until Bob is making the best possible prediction of D given the input. The public error becomes low, but is slightly higher than Bob’s. The blue dots show Eve’s average error improvement over Blind Eve. After a few steps of training, Eve’s error is substantially lower than that of Blind Eve (by 0.1–0.2). As time proceeds, Eve’s relative advantage becomes zero. Eve is not able to reconstruct any more information about C than would be possible by simply knowing the distribution of values of C.
177
+
178
+ ![](images/6152a395a052eb8d183e6d0897408d86392381feb1495e99adca50a59d5208b9.jpg)
179
+ Figure 4: Training to estimate D while hiding C.
180
+
181
+ # 4 CONCLUSION
182
+
183
+ In this paper, we demonstrate that neural networks can learn to protect communications. The learning does not require prescribing a particular set of cryptographic algorithms, nor indicating ways of applying these algorithms: it is based only on a secrecy specification represented by the training objectives. In this setting, we model attackers by neural networks; alternative models may perhaps be enabled by reinforcement learning.
184
+
185
+ There is more to cryptography than encryption. In this spirit, further work may consider other tasks, for example steganography, pseudorandom-number generation, or integrity checks. Finally, neural networks may be useful not only for cryptographic protections but also for attacks. While it seems improbable that neural networks would become great at cryptanalysis, they may be quite effective in making sense of metadata and in traffic analysis.
186
+
187
+ # ACKNOWLEDGMENTS
188
+
189
+ We are grateful to Samy Bengio, Laura Downs, Ulfar Erlingsson, Jakob Foerster, Nando de Freitas, ´ Ian Goodfellow, Geoff Hinton, Chris Olah, Ananth Raghunathan, and Luke Vilnis for discussions on the matter of this paper.
190
+
191
+ # REFERENCES
192
+
193
+ Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz ´ Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viegas, Oriol Vinyals, ´ Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016a. URL http://arxiv.org/abs/1603.04467.
194
+
195
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek Gordon Murray, Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zhang. TensorFlow: A system for large-scale machine learning. CoRR, abs/1605.08695, 2016b. URL http://arxiv.org/ abs/1605.08695.
196
+
197
+ Boaz Barak, Oded Goldreich, Russell Impagliazzo, Steven Rudich, Amit Sahai, Salil Vadhan, and Ke Yang. On the (im)possibility of obfuscating programs. J. ACM, 59(2):6:1–6:48, May 2012. ISSN 0004-5411. doi: 10.1145/2160158.2160159. URL http://doi.acm.org/10.1145/ 2160158.2160159.
198
+
199
+ Gilles Barthe, Juan Manuel Crespo, Benjamin Gregoire, C ´ esar Kunz, Yassine Lakhnech, Benedikt ´ Schmidt, and Santiago Zanella-Beguelin. Fully automated analysis of padding-based encryption ´ in the computational model. In Proceedings of the 2013 ACM SIGSAC conference on Computer &#38; communications security, CCS ’13, pp. 1247–1260, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2477-9. doi: 10.1145/2508859.2516663. URL http://doi.acm.org/ 10.1145/2508859.2516663.
200
+
201
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. InfoGAN: Interpretable representation learning by information maximizing generative adversarial nets. CoRR, abs/1606.03657, 2016. URL https://arxiv.org/abs/1606.03657.
202
+
203
+ Emily L. Denton, Soumith Chintala, Arthur Szlam, and Robert Fergus. Deep generative image models using a Laplacian pyramid of adversarial networks. CoRR, abs/1506.05751, 2015. URL http://arxiv.org/abs/1506.05751.
204
+
205
+ Sebastien Dourlens. Applied neuro-cryptography. 1996. M ´ emoire, Universit ´ e Paris 8, D ´ epartement ´ Micro-Informatique Micro-Electronique.
206
+
207
+ Harrison Edwards and Amos J. Storkey. Censoring representations with an adversary. CoRR, abs/1511.05897, 2015. URL http://arxiv.org/abs/1511.05897.
208
+
209
+ Jakob N. Foerster, Yannis M. Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate to solve riddles with deep distributed recurrent Q-networks. CoRR, abs/1602.02672, 2016a. URL http://arxiv.org/abs/1602.02672.
210
+
211
+ Jakob N. Foerster, Yannis M. Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. CoRR, abs/1605.06676, 2016b. URL http://arxiv.org/abs/1605.06676.
212
+
213
+ Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor S. Lempitsky. Domain-adversarial training of neural networks. CoRR, abs/1505.07818, 2015. URL http://arxiv.org/abs/1505.07818.
214
+
215
+ Ran Gilad-Bachrach, Nathan Dowlin, Kim Laine, Kristin E. Lauter, Michael Naehrig, and John Wernsing. Cryptonets: Applying neural networks to encrypted data with high throughput and accuracy. In Maria-Florina Balcan and Kilian Q. Weinberger (eds.), Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, volume 48 of JMLR Workshop and Conference Proceedings, pp. 201–210. JMLR.org, 2016. URL http://jmlr.org/proceedings/papers/v48/gilad-bachrach16.html.
216
+
217
+ Shafi Goldwasser and Silvio Micali. Probabilistic encryption. J. Comput. Syst. Sci., 28(2):270– 299, 1984. doi: 10.1016/0022-0000(84)90070-9. URL http://dx.doi.org/10.1016/ 0022-0000(84)90070-9.
218
+
219
+ Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In Zoubin Ghahramani, Max Welling, Corinna Cortes, Neil D. Lawrence, and Kilian Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pp. 2672–2680, 2014a. URL http://papers.nips.cc/paper/5423-generative-adversarial-nets.
220
+
221
+ Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014b. URL http://arxiv.org/abs/1412.6572.
222
+
223
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
224
+
225
+ Wolfgang Kinzel and Ido Kanter. Neural cryptography. arXiv preprint cond-mat/0208453, 2002.
226
+
227
+ Alexander Klimov, Anton Mityagin, and Adi Shamir. Analysis of neural cryptography. In Yuliang Zheng (ed.), Advances in Cryptology - ASIACRYPT 2002, 8th International Conference on the Theory and Application of Cryptology and Information Security, Queenstown, New Zealand, December 1-5, 2002, Proceedings, volume 2501 of Lecture Notes in Computer Science, pp. 288–298. Springer, 2002. ISBN 3-540-00171-9. doi: 10.1007/3-540-36178-2 18. URL http://dx.doi.org/10.1007/3-540-36178-2_18.
228
+
229
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521:436–444, 2015.
230
+
231
+ Christos Louizos, Kevin Swersky, Yujia Li, Max Welling, and Richard S. Zemel. The variational fair autoencoder. CoRR, abs/1511.00830, 2015. URL http://arxiv.org/abs/1511.00830.
232
+
233
+ Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. CoRR, abs/1511.04834, 2015. URL http://arxiv.org/abs/ 1511.04834.
234
+
235
+ Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. CoRR, abs/1606.00709, 2016. URL https: //arxiv.org/abs/1606.00709.
236
+
237
+ Lillian J Ratliff, Samuel A Burden, and S Shankar Sastry. Characterization and computation of local nash equilibria in continuous games. In Communication, Control, and Computing (Allerton), 2013 51st Annual Allerton Conference on, pp. 917–924. IEEE, 2013.
238
+
239
+ Andreas Ruttor. Neural synchronization and cryptography. PhD thesis, Julius Maximilian University of Wurzburg, 2006. URL ¨ http://www.opus-bayern.de/uni-wuerzburg/ volltexte/2007/2361/.
240
+
241
+ Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. CoRR, abs/1606.03498, 2016. URL https://arxiv. org/abs/1606.03498.
242
+
243
+ Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. Learning multiagent communication with backpropagation. CoRR, abs/1605.07736, 2016. URL http://arxiv.org/abs/1605. 07736.
244
+
245
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. CoRR, abs/1312.6199, 2013. URL http://arxiv.org/abs/1312.6199.
246
+
247
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Machine Learning, pp. 229–256, 1992.
248
+
249
+ Pengtao Xie, Misha Bilenko, Tom Finley, Ran Gilad-Bachrach, Kristin E. Lauter, and Michael Naehrig. Crypto-nets: Neural networks over encrypted data. CoRR, abs/1412.6181, 2014. URL http://arxiv.org/abs/1412.6181.
250
+
251
+ ![](images/b2016dd2dd4819fa56ec7428663d6ad65700e349b3fdc00a3b0d65d2052e0795.jpg)
252
+ Figure 5: Alice, Bob, and Eve, with an asymmetric cryptosystem.
253
+
254
+ # APPENDIX
255
+
256
+ # A LEARNING ASYMMETRIC ENCRYPTION
257
+
258
+ Paralleling Section 2, this section examines asymmetric encryption (also known as public-key encryption). It presents definitions and experimental results, but omits a detailed discussion of the objectives of asymmetric encryption, of the corresponding loss functions, and of the practical refinements that we develop for training, which are analogous to those for symmetric encryption.
259
+
260
+ # A.1 DEFINITIONS
261
+
262
+ In asymmetric encryption, a secret is associated with each principal. The secret may be seen as a seed for generating cryptographic keys, or directly as a secret key; we adopt the latter view. A public key can be derived from the secret, in such a way that messages encrypted under the public key can be decrypted only with knowledge of the secret.
263
+
264
+ We specify asymmetric encryption using a twist on our specification for symmetric encryption, shown in Figure 5. Instead of directly supplying the secret encryption key to Alice, we supply the secret key to a public-key generator, the output of which is available to every node. Only Bob has access to the underlying secret key. Much as in Section 2, several variants are possible, for instance to support probabilistic encryption.
265
+
266
+ The public-key generator is itself a neural network, with its own parameters. The loss functions treats these parameters much like those of Alice and Bob. In training, these parameters are adjusted at the same time as those of Alice and Bob.
267
+
268
+ # A.2 EXPERIMENTS
269
+
270
+ In our experiments on asymmetric encryption, we rely on the same approach as in Section 2.5. In particular, we adopt the same network structure and the same approach to training.
271
+
272
+ The results of these experiments are intriguing, but much harder to interpret than those for symmetric encryption. In most training runs, the networks failed to achieve a robust outcome. Often, although it appeared that Alice and Bob had learned to communicate secretly, upon resetting and retraining Eve, the retrained adversary was able to decrypt messages nearly as well as Bob was.
273
+
274
+ However, Figure 6 shows the results of one training run, in which even after five reset/retrain cycles, Eve was unable to decrypt messages between Alice and Bob.
275
+
276
+ ![](images/20872348759a81d1815639e59f4b25aa926c3b5f14cdf17c461ac34dc5c3b90d.jpg)
277
+ Figure 6: Bob’s and Eve’s reconstruction errors with an asymmetric formulation.
278
+
279
+ Our chosen network structure is not sufficient to learn general implementations of many of the mathematical concepts underlying modern asymmetric cryptography, such as integer modular arithmetic. We therefore believe that the most likely explanation for this successful training run was that Alice and Bob accidentally obtained some “security by obscurity” (cf. the derivation of asymmetric schemes from symmetric schemes by obfuscation (Barak et al., 2012)). This belief is somewhat reinforced by the fact that the training result was fragile: upon further training of Alice and Bob, Eve was able to decrypt the messages. However, we cannot rule out that the networks trained into some set of hard-to-invert matrix operations resulting in “public-key-like” behavior. Our results suggest that this issue deserves more exploration.
280
+
281
+ Further work might attempt to strengthen these results, perhaps relying on new designs of neural networks or new training procedures. A modest next step may consist in trying to learn particular asymmetric algorithms, such as lattice-based ciphers, in order to identify the required neural network structure and capacity.
282
+
283
+ # B BACKGROUND ON NEURAL NETWORKS
284
+
285
+ Most of this paper assumes only a few basic notions in machine learning and neural networks, as provided by general introductions (e.g., LeCun et al. (2015)). The following is a brief review.
286
+
287
+ Neural networks are specifications of parameterized functions. They are typically constructed out of a sequence of somewhat modular building blocks. For example, the input to Alice is a vector of bits that represents the concatenation of the key and the plaintext. This vector $( x )$ is input into a “fully-connected” layer, which consists of a matrix multiply (by $A$ ) and a vector addition (with b): $A x + b$ . The result of that operation is then passed into a nonlinear function, sometimes termed an “activation function”, such as the sigmoid function, or the hyperbolic tangent function, tanh. In classical neural networks, the activation function represents a threshold that determines whether a neuron would “fire” or not, based upon its inputs. This threshold, and matrices and vectors such as $A$ and $b$ , are typical neural network “parameters”. “Training” a neural network is the process that finds values of its parameters that minimize the specified loss function over the training inputs.
288
+
289
+ Fully-connected layers are powerful but require substantial amounts of memory for a large network. An alternative to fully-connected layers are “convolutional” layers. Convolutional layers operate much like their counterparts in computer graphics, by sliding a parameterized convolution window across their input. The number of parameters in this window is much smaller than in an equivalent fully-connected layer. Convolutional layers are useful for applying the same function(s) at every point in an input.
290
+
291
+ A neural network architecture consists of a graph of these building blocks (often, but not always, a DAG), specifying what the individual layers are (e.g., fully-connected or convolutional), how they are parameterized (number of inputs, number of outputs, etc.), and how they are wired.
parse/train/S1HEBe_Jl/S1HEBe_Jl_content_list.json ADDED
@@ -0,0 +1,1632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING TO PROTECT COMMUNICATIONS WITH ADVERSARIAL NEURAL CRYPTOGRAPHY ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 741,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Mart´ın Abadi and David G. Andersen ∗ Google Brain ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 459,
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": "We ask whether neural networks can learn to use secret keys to protect information from other neural networks. Specifically, we focus on ensuring confidentiality properties in a multiagent system, and we specify those properties in terms of an adversary. Thus, a system may consist of neural networks named Alice and Bob, and we aim to limit what a third neural network named Eve learns from eavesdropping on the communication between Alice and Bob. We do not prescribe specific cryptographic algorithms to these neural networks; instead, we train end-to-end, adversarially. We demonstrate that the neural networks can learn how to perform forms of encryption and decryption, and also how to apply these operations selectively in order to meet confidentiality goals. ",
40
+ "bbox": [
41
+ 233,
42
+ 263,
43
+ 764,
44
+ 402
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 426,
55
+ 336,
56
+ 443
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "As neural networks are applied to increasingly complex tasks, they are often trained to meet endto-end objectives that go beyond simple functional specifications. These objectives include, for example, generating realistic images (e.g., (Goodfellow et al., 2014a)) and solving multiagent problems (e.g., (Foerster et al., 2016a;b; Sukhbaatar et al., 2016)). Advancing these lines of work, we show that neural networks can learn to protect their communications in order to satisfy a policy specified in terms of an adversary. ",
63
+ "bbox": [
64
+ 174,
65
+ 457,
66
+ 823,
67
+ 541
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Cryptography is broadly concerned with algorithms and protocols that ensure the secrecy and integrity of information. Cryptographic mechanisms are typically described as programs or Turing machines. Attackers are also described in those terms, with bounds on their complexity (e.g., limited to polynomial time) and on their chances of success (e.g., limited to a negligible probability). A mechanism is deemed secure if it achieves its goal against all attackers. For instance, an encryption algorithm is said to be secure if no attacker can extract information about plaintexts from ciphertexts. Modern cryptography provides rigorous versions of such definitions (Goldwasser & Micali, 1984). ",
74
+ "bbox": [
75
+ 174,
76
+ 547,
77
+ 825,
78
+ 645
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Adversaries also play important roles in the design and training of neural networks. They arise, in particular, in work on adversarial examples (Szegedy et al., 2013; Goodfellow et al., 2014b) and on generative adversarial networks (GANs) (Goodfellow et al., 2014a). In this latter context, the adversaries are neural networks (rather than Turing machines) that attempt to determine whether a sample value was generated by a model or drawn from a given data distribution. Furthermore, in contrast with definitions in cryptography, practical approaches to training GANs do not consider all possible adversaries in a class, but rather one or a small number of adversaries that are optimized by training. We build on these ideas in our work. ",
85
+ "bbox": [
86
+ 174,
87
+ 651,
88
+ 825,
89
+ 763
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Neural networks are generally not meant to be great at cryptography. Famously, the simplest neural networks cannot even compute XOR, which is basic to many cryptographic algorithms. Nevertheless, as we demonstrate, neural networks can learn to protect the confidentiality of their data from other neural networks: they discover forms of encryption and decryption, without being taught specific algorithms for these purposes. ",
96
+ "bbox": [
97
+ 174,
98
+ 771,
99
+ 823,
100
+ 840
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Knowing how to encrypt is seldom enough for security and privacy. Interestingly, neural networks can also learn what to encrypt in order to achieve a desired secrecy property while maximizing utility. Thus, when we wish to prevent an adversary from seeing a fragment of a plaintext, or from estimating a function of the plaintext, encryption can be selective, hiding the plaintext only partly. ",
107
+ "bbox": [
108
+ 174,
109
+ 847,
110
+ 823,
111
+ 904
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "The resulting cryptosystems are generated automatically. In this respect, our work resembles recent research on automatic synthesis of cryptosystems, with tools such as ZooCrypt (Barthe et al., 2013), and contrasts with most of the literature, where hand-crafted cryptosystems are the norm. ZooCrypt relies on symbolic theorem-proving, rather than neural networks. ",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 823,
122
+ 159
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Classical cryptography, and tools such as ZooCrypt, typically provide a higher level of transparency and assurance than we would expect by our methods. Our model of the adversary, which avoids quantification, results in much weaker guarantees. On the other hand, it is refreshingly simple, and it may sometimes be appropriate. ",
129
+ "bbox": [
130
+ 174,
131
+ 166,
132
+ 823,
133
+ 222
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Consider, for example, a neural network with several components, and suppose that we wish to guarantee that one of the components does not rely on some aspect of the input data, perhaps because of concerns about privacy or discrimination. Neural networks are notoriously difficult to explain, so it may be hard to characterize how the component functions. A simple solution is to treat the component as an adversary, and to apply encryption so that it does not have access to the information that it should not use. In this respect, the present work follows the recent research on fair representations (Edwards & Storkey, 2015; Louizos et al., 2015), which can hide or remove sensitive information, but goes beyond that work by allowing for the possibility of decryption, which supports richer dataflow structures. ",
140
+ "bbox": [
141
+ 174,
142
+ 229,
143
+ 825,
144
+ 354
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "Classical cryptography may be able to support some applications along these lines. In particular, homomorphic encryption enables inference on encrypted data (Xie et al., 2014; Gilad-Bachrach et al., 2016). On the other hand, classical cryptographic functions are generally not differentiable, so they are at odds with training by stochastic gradient descent (SGD), the main optimization technique for deep neural networks. Therefore, we would have trouble learning what to encrypt, even if we know how to encrypt. Integrating classical cryptographic functions—and, more generally, integrating other known functions and relations (e.g., (Neelakantan et al., 2015))—into neural networks remains a fascinating problem. ",
151
+ "bbox": [
152
+ 174,
153
+ 361,
154
+ 825,
155
+ 473
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "Prior work at the intersection of machine learning and cryptography has focused on the generation and establishment of cryptographic keys (Ruttor, 2006; Kinzel & Kanter, 2002), and on corresponding attacks (Klimov et al., 2002). In contrast, our work takes these keys for granted, and focuses on their use; a crucial, new element in our work is the reliance on adversarial goals and training. More broadly, from the perspective of machine learning, our work relates to the application of neural networks to multiagent tasks, mentioned above, and to the vibrant research on generative models and on adversarial training (e.g., (Goodfellow et al., 2014a; Denton et al., 2015; Salimans et al., 2016; Nowozin et al., 2016; Chen et al., 2016; Ganin et al., 2015)). From the perspective of cryptography, it relates to big themes such as privacy and discrimination. While we embrace a playful, exploratory approach, we do so with the hope that it will provide insights useful for further work on these topics. ",
162
+ "bbox": [
163
+ 174,
164
+ 479,
165
+ 825,
166
+ 618
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "Section 2 presents our approach to learning symmetric encryption (that is, shared-key encryption, in which the same keys are used for encryption and for decryption) and our corresponding results. Appendix A explains how the same concepts apply to asymmetric encryption (that is, public-key encryption, in which different keys are used for encryption and for decryption). Section 3 considers selective protection. Section 4 concludes and suggests avenues for further research. Appendix B is a brief review of background on neural networks. ",
173
+ "bbox": [
174
+ 174,
175
+ 626,
176
+ 823,
177
+ 709
178
+ ],
179
+ "page_idx": 1
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "2 LEARNING SYMMETRIC ENCRYPTION ",
184
+ "text_level": 1,
185
+ "bbox": [
186
+ 176,
187
+ 732,
188
+ 519,
189
+ 748
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "This section discusses how to protect the confidentiality of plaintexts using shared keys. It describes the organization of the system that we consider, and the objectives of the participants in this system. It also explains the training of these participants, defines their architecture, and presents experiments. ",
196
+ "bbox": [
197
+ 176,
198
+ 765,
199
+ 823,
200
+ 808
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "2.1 SYSTEM ORGANIZATION ",
207
+ "text_level": 1,
208
+ "bbox": [
209
+ 174,
210
+ 827,
211
+ 387,
212
+ 840
213
+ ],
214
+ "page_idx": 1
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "A classic scenario in security involves three parties: Alice, Bob, and Eve. Typically, Alice and Bob wish to communicate securely, and Eve wishes to eavesdrop on their communications. Thus, the desired security property is secrecy (not integrity), and the adversary is a “passive attacker” that can intercept communications but that is otherwise quite limited: it cannot initiate sessions, inject messages, or modify messages in transit. ",
219
+ "bbox": [
220
+ 176,
221
+ 853,
222
+ 823,
223
+ 922
224
+ ],
225
+ "page_idx": 1
226
+ },
227
+ {
228
+ "type": "image",
229
+ "img_path": "images/a9ab23800cec3a710c3d5a1a9f20ac086445be9bf9db444a6228fd3deb1894d7.jpg",
230
+ "image_caption": [
231
+ "Figure 1: Alice, Bob, and Eve, with a symmetric cryptosystem. "
232
+ ],
233
+ "image_footnote": [],
234
+ "bbox": [
235
+ 210,
236
+ 103,
237
+ 785,
238
+ 256
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "We start with a particularly simple instance of this scenario, depicted in Figure 1, in which Alice wishes to send a single confidential message $P$ to Bob. The message $P$ is an input to Alice. When Alice processes this input, it produces an output $C$ . (“ $\\cdot { \\cal { P } } ^ { \\prime }$ ” stands for “plaintext” and “ $C ^ { \\ast }$ stands for “ciphertext”.) Both Bob and Eve receive $C$ , process it, and attempt to recover $P$ . We represent what they compute by $P _ { \\mathrm { B o b } }$ and $P _ { \\mathrm { E v e } }$ , respectively. Alice and Bob have an advantage over Eve: they share a secret key $K$ . We treat $K$ as an additional input to Alice and Bob. We assume one fresh key $K$ per plaintext $P$ , but, at least at this abstract level, we do not impose that $K$ and $P$ have the same length. ",
245
+ "bbox": [
246
+ 174,
247
+ 338,
248
+ 825,
249
+ 435
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "For us, Alice, Bob, and Eve are all neural networks. We describe their structures in Sections 2.4 and 2.5. They each have parameters, which we write $\\theta _ { A }$ , $\\theta _ { B }$ , and $\\theta _ { E }$ , respectively. Since $\\theta _ { A }$ and $\\theta _ { B }$ need not be equal, encryption and decryption need not be the same function even if Alice and Bob have the same structure. As is common for neural networks, Alice, Bob, and Eve work over tuples of floating-point numbers, rather than sequences of bits. In other words, $K , P , P _ { \\mathrm { B o b } } , P _ { \\mathrm { E v e } } ,$ and $C$ are all tuples of floating-point numbers. Note that, with this formulation, $C$ , $P _ { \\mathrm { B o b } }$ , and $P _ { \\mathrm { E v e } }$ may consist of arbitrary floating-point numbers even if $P$ and $K$ consist of 0s and 1s. In practice, our implementations constrain these values to the range $( - 1 , 1 )$ , but permit the intermediate values. We have explored alternatives (based on Williams’ REINFORCE algorithm (Williams, 1992) or on Foerster et al.’s discretization technique (Foerster et al., 2016b)), but omit them as they are not essential to our main points. ",
256
+ "bbox": [
257
+ 174,
258
+ 441,
259
+ 825,
260
+ 594
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "This set-up, although rudimentary, suffices for basic schemes, in particular allowing for the possibility that Alice and Bob decide to rely on $K$ as a one-time pad, performing encryption and decryption simply by XORing the key $K$ with the plaintext $P$ and the ciphertext $C$ , respectively. However, we do not require that Alice and Bob function in this way—and indeed, in our experiments in Section 2.5, they discover other schemes. For simplicity, we ignore the process of generating a key from a seed. We also omit the use of randomness for probabilistic encryption (Goldwasser & Micali, 1984). Such enhancements may be the subject of further work. ",
267
+ "bbox": [
268
+ 174,
269
+ 602,
270
+ 825,
271
+ 699
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "2.2 OBJECTIVES ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 176,
281
+ 722,
282
+ 302,
283
+ 736
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Informally, the objectives of the participants are as follows. Eve’s goal is simple: to reconstruct $P$ accurately (in other words, to minimize the error between $P$ and $P _ { \\mathrm { E v e . } }$ ). Alice and Bob want to communicate clearly (to minimize the error between $P$ and $P _ { \\mathrm { B o b . } }$ ), but also to hide their communication from Eve. Note that, in line with modern cryptographic definitions (e.g., (Goldwasser & Micali, 1984)), we do not require that the ciphertext $C$ “look random” to Eve. A ciphertext may even contain obvious metadata that identifies it as such. Therefore, it is not a goal for Eve to distinguish $C$ from a random value drawn from some distribution. In this respect, Eve’s objectives contrast with common ones for the adversaries of GANs. On the other hand, one could try to reformulate Eve’s goal in terms of distinguishing the ciphertexts constructed from two different plaintexts. ",
290
+ "bbox": [
291
+ 174,
292
+ 750,
293
+ 825,
294
+ 875
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Given these objectives, instead of training each of Alice and Bob separately to implement some known cryptosystem (Dourlens, 1996), we train Alice and Bob jointly to communicate successfully and to defeat Eve without a pre-specified notion of what cryptosystem they may discover for this purpose. Much as in the definitions of GANs, we would like Alice and Bob to defeat the best possible version of Eve, rather than a fixed Eve. Of course, Alice and Bob may not win for every plaintext and every key, since knowledge of some particular plaintexts and keys may be hardwired into Eve. (For instance, Eve could always output the same plaintext, and be right at least once.) Therefore, we assume a distribution on plaintexts and keys, and phrase our goals for Alice and Bob in terms of expected values. ",
301
+ "bbox": [
302
+ 176,
303
+ 882,
304
+ 823,
305
+ 924
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "",
312
+ "bbox": [
313
+ 174,
314
+ 103,
315
+ 825,
316
+ 188
317
+ ],
318
+ "page_idx": 3
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "We write $A ( \\theta _ { A } , P , K )$ for Alice’s output on input $P , K$ , write $B ( \\theta _ { B } , C , K )$ for Bob’s output on input $C , K$ , and write $E ( { \\boldsymbol { \\theta } } _ { E } , C )$ for Eve’s output on input $C$ . We introduce a distance function $d$ on plaintexts. Although the exact choice of this function is probably not crucial, for concreteness we take the L1 distance $d ( P , P ^ { \\prime } ) = \\Sigma _ { i = 1 , N } | P _ { i } - P _ { i } ^ { \\prime } |$ where $N$ is the length of plaintexts. We define a per-example loss function for Eve: ",
323
+ "bbox": [
324
+ 173,
325
+ 193,
326
+ 825,
327
+ 263
328
+ ],
329
+ "page_idx": 3
330
+ },
331
+ {
332
+ "type": "equation",
333
+ "img_path": "images/2fb2db2890a63b11b8d680282c6c24b907b5b901d4e37fa7ef1602cdb2ce72e7.jpg",
334
+ "text": "$$\nL _ { E } ( \\theta _ { A } , \\theta _ { E } , P , K ) = d ( P , E ( \\theta _ { E } , A ( \\theta _ { A } , P , K ) ) )\n$$",
335
+ "text_format": "latex",
336
+ "bbox": [
337
+ 338,
338
+ 270,
339
+ 656,
340
+ 287
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "Intuitively, $L _ { E } ( \\theta _ { A } , \\theta _ { E } , P , K )$ represents how much Eve is wrong when the plaintext is $P$ and the key is $K$ . We also define a loss function for Eve over the distribution on plaintexts and keys by taking an expected value: ",
347
+ "bbox": [
348
+ 174,
349
+ 295,
350
+ 825,
351
+ 337
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "equation",
357
+ "img_path": "images/d398a9358355a8f0918c2490cc2312da51fccc65adeff9f0ec9e9ee511999445.jpg",
358
+ "text": "$$\nL _ { E } ( \\theta _ { A } , \\theta _ { E } ) = \\mathbb { E } _ { P , K } ( d ( P , E ( \\theta _ { E } , A ( \\theta _ { A } , P , K ) ) ) )\n$$",
359
+ "text_format": "latex",
360
+ "bbox": [
361
+ 334,
362
+ 343,
363
+ 661,
364
+ 361
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "We obtain the “optimal Eve” by minimizing this loss: ",
371
+ "bbox": [
372
+ 174,
373
+ 367,
374
+ 527,
375
+ 383
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "equation",
381
+ "img_path": "images/1db33e9eff7981d1aa848a1d9116cd3f61719b8d7e10694346535b80d2a5ee52.jpg",
382
+ "text": "$$\nO _ { E } ( \\theta _ { A } ) = \\mathrm { a r g m i n } _ { \\theta _ { E } } ( L _ { E } ( \\theta _ { A } , \\theta _ { E } ) )\n$$",
383
+ "text_format": "latex",
384
+ "bbox": [
385
+ 379,
386
+ 390,
387
+ 617,
388
+ 407
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Similarly, we define a per-example reconstruction error for Bob, and extend it to the distribution on plaintexts and keys: ",
395
+ "bbox": [
396
+ 173,
397
+ 412,
398
+ 823,
399
+ 441
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "equation",
405
+ "img_path": "images/971e40e4e9225f97ace7437610442c91f9938039b61d8845809744fc1d4261dd.jpg",
406
+ "text": "$$\n\\begin{array} { r l } & { L _ { B } ( \\theta _ { A } , \\theta _ { B } , P , K ) = d ( P , B ( \\theta _ { B } , A ( \\theta _ { A } , P , K ) , K ) ) } \\\\ & { L _ { B } ( \\theta _ { A } , \\theta _ { B } ) = \\mathbb { E } _ { P , K } ( d ( P , B ( \\theta _ { B } , A ( \\theta _ { A } , P , K ) , K ) ) ) } \\end{array}\n$$",
407
+ "text_format": "latex",
408
+ "bbox": [
409
+ 323,
410
+ 446,
411
+ 673,
412
+ 488
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "We define a loss function for Alice and Bob by combining $L _ { B }$ and the optimal value of $L _ { E }$ ",
419
+ "bbox": [
420
+ 174,
421
+ 492,
422
+ 776,
423
+ 507
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "equation",
429
+ "img_path": "images/bcf07e4c039acde488a3fa403eef4c6d82969820d24065b181832505ba5d8593.jpg",
430
+ "text": "$$\nL _ { A B } ( \\theta _ { A } , \\theta _ { B } ) = L _ { B } ( \\theta _ { A } , \\theta _ { B } ) - L _ { E } ( \\theta _ { A } , O _ { E } ( \\theta _ { A } ) )\n$$",
431
+ "text_format": "latex",
432
+ "bbox": [
433
+ 334,
434
+ 513,
435
+ 663,
436
+ 531
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "This combination reflects that Alice and Bob want to minimize Bob’s reconstruction error and to maximize the reconstruction error of the “optimal Eve”. The use of a simple subtraction is somewhat arbitrary; below we describe useful variants. We obtain the “optimal Alice and Bob” by minimizing $L _ { A B } ( \\theta _ { A } , \\theta _ { B } )$ : ",
443
+ "bbox": [
444
+ 173,
445
+ 537,
446
+ 825,
447
+ 593
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "equation",
453
+ "img_path": "images/8d49101e2bb6107b9a51fc67a505fc93b85030b1751bd9a411fc0d4adc563b79.jpg",
454
+ "text": "$$\n( O _ { A } , O _ { B } ) = \\mathrm { a r g m i n } _ { ( \\theta _ { A } , \\theta _ { B } ) } ( L _ { A B } ( \\theta _ { A } , \\theta _ { B } ) )\n$$",
455
+ "text_format": "latex",
456
+ "bbox": [
457
+ 354,
458
+ 592,
459
+ 643,
460
+ 612
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "We write “optimal” in quotes because there need be no single global minimum. In general, there are many equi-optimal solutions for Alice and Bob. As a simple example, assuming that the key is of the same size as the plaintext and the ciphertext, Alice and Bob may XOR the plaintext and the ciphertext, respectively, with any permutation of the key, and all permutations are equally good as long as Alice and Bob use the same one; moreover, with the way we architect our networks (see Section 2.4), all permutations are equally likely to arise. ",
467
+ "bbox": [
468
+ 173,
469
+ 621,
470
+ 825,
471
+ 705
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "Training begins with the Alice and Bob networks initialized randomly. The goal of training is to go from that state to $( O _ { A } , O _ { B } )$ , or close to $( O _ { A } , O _ { B } )$ . We explain the training process next. ",
478
+ "bbox": [
479
+ 173,
480
+ 712,
481
+ 825,
482
+ 741
483
+ ],
484
+ "page_idx": 3
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "2.3 TRAINING REFINEMENTS ",
489
+ "text_level": 1,
490
+ "bbox": [
491
+ 176,
492
+ 757,
493
+ 390,
494
+ 772
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "Our training method is based upon SGD. In practice, much as in work on GANs, our training method cuts a few corners and incorporates a few improvements with respect to the high-level description of objectives of Section 2.2. We present these refinements next, and give further details in Section 2.5. ",
501
+ "bbox": [
502
+ 174,
503
+ 784,
504
+ 825,
505
+ 825
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "First, the training relies on estimated values calculated over “minibatches” of hundreds or thousands of examples, rather than on expected values over a distribution. ",
512
+ "bbox": [
513
+ 174,
514
+ 832,
515
+ 821,
516
+ 861
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "We do not compute the “optimal Eve” for a given value of $\\theta _ { A }$ , but simply approximate it, alternating the training of Eve with that of Alice and Bob. Intuitively, the training may for example proceed roughly as follows. Alice may initially produce ciphertexts that neither Bob nor Eve understand at all. By training for a few steps, Alice and Bob may discover a way to communicate that allows Bob to decrypt Alice’s ciphertexts at least partly, but which is not understood by (the present version of) Eve. In particular, Alice and Bob may discover some trivial transformations, akin to rot13. After a bit of training, however, Eve may start to break this code. With some more training, Alice and Bob may discover refinements, in particular codes that exploit the key material better. Eve eventually finds it impossible to adjust to those codes. This kind of alternation is typical of games; the theory of continuous games includes results about convergence to equilibria (e.g., (Ratliff et al., 2013)) which it might be possible to apply in our setting. ",
523
+ "bbox": [
524
+ 174,
525
+ 867,
526
+ 825,
527
+ 924
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "",
534
+ "bbox": [
535
+ 174,
536
+ 103,
537
+ 825,
538
+ 202
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "Furthermore, in the training of Alice and Bob, we do not attempt to maximize Eve’s reconstruction error. If we did, and made Eve completely wrong, then Eve could be completely right in the next iteration by simply flipping all output bits! A more realistic and useful goal for Alice and Bob is, generally, to minimize the mutual information between Eve’s guess and the real plaintext. In the case of symmetric encryption, this goal equates to making Eve produce answers indistinguishable from a random guess. This approach is somewhat analogous to methods that aim to prevent overtraining GANs on the current adversary (Salimans et al., 2016, Section 3.1). Additionally, we can tweak the loss functions so that they do not give much importance to Eve being a little lucky or to Bob making small errors that standard error-correction could easily address. ",
545
+ "bbox": [
546
+ 174,
547
+ 208,
548
+ 825,
549
+ 333
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "Finally, once we stop training Alice and Bob, and they have picked their cryptosystem, we validate that they work as intended by training many instances of Eve that attempt to break the cryptosystem. Some of these instances may be derived from earlier phases in the training. ",
556
+ "bbox": [
557
+ 176,
558
+ 340,
559
+ 821,
560
+ 382
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "2.4 NEURAL NETWORK ARCHITECTURE ",
567
+ "text_level": 1,
568
+ "bbox": [
569
+ 178,
570
+ 400,
571
+ 467,
572
+ 412
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "The Architecture of Alice, Bob, and Eve Because we wish to explore whether a general neural network can learn to communicate securely, rather than to engineer a particular method, we aimed to create a neural network architecture that was sufficient to learn mixing functions such as XOR, but that did not strongly encode the form of any particular algorithm. ",
579
+ "bbox": [
580
+ 174,
581
+ 425,
582
+ 825,
583
+ 481
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "To this end, we chose the following “mix & transform” architecture. It has a first fully-connected (FC) layer, where the number of outputs is equal to the number of inputs. The plaintext and key bits are fed into this FC layer. Because each output bit can be a linear combination of all of the input bits, this layer enables—but does not mandate—mixing between the key and the plaintext bits. In particular, this layer can permute the bits. The FC layer is followed by a sequence of convolutional layers, the last of which produces an output of a size suitable for a plaintext or ciphertext. These convolutional layers learn to apply some function to groups of the bits mixed by the previous layer, without an a priori specification of what that function should be. Notably, the opposite order (convolutional followed by FC) is much more common in image-processing applications. Neural networks developed for those applications frequently use convolutions to take advantage of spatial locality. For neural cryptography, we specifically wanted locality—i.e., which bits to combine—to be a learned property, instead of a pre-specified one. While it would certainly work to manually pair each input plaintext bit with a corresponding key bit, we felt that doing so would be uninteresting. ",
590
+ "bbox": [
591
+ 174,
592
+ 488,
593
+ 825,
594
+ 669
595
+ ],
596
+ "page_idx": 4
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "We refrain from imposing further constraints that would simplify the problem. For example, we do not tie the parameters $\\theta _ { A }$ and $\\theta _ { B }$ , as we would if we had in mind that Alice and Bob should both learn the same function, such as XOR. ",
601
+ "bbox": [
602
+ 174,
603
+ 676,
604
+ 825,
605
+ 718
606
+ ],
607
+ "page_idx": 4
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "2.5 EXPERIMENTS ",
612
+ "text_level": 1,
613
+ "bbox": [
614
+ 176,
615
+ 734,
616
+ 315,
617
+ 750
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "As a proof-of-concept, we implemented Alice, Bob, and Eve networks that take $N$ -bit random plaintext and key values, and produce $N$ -entry floating-point ciphertexts, for $N = 1 6$ , 32, and 64. Both plaintext and key values are uniformly distributed. Keys are not deliberately reused, but may reoccur because of random selection. (The experiments in Section 3 consider more interesting distributions and also allow plaintext and key values to have different sizes.) ",
624
+ "bbox": [
625
+ 176,
626
+ 761,
627
+ 823,
628
+ 830
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "We implemented our experiments in TensorFlow (Abadi et al., 2016a;b). We ran them on a workstation with one GPU; the specific computation platform does not affect the outcome of the experiments. We plan to release the source code for the experiments. ",
635
+ "bbox": [
636
+ 176,
637
+ 838,
638
+ 823,
639
+ 880
640
+ ],
641
+ "page_idx": 4
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "Network Structure Our networks follow the “mix & transform” pattern described in Section 2.4. The Alice network concatenates two $N$ -bit inputs (the plaintext and the key) into a $2 N$ -entry vector, using $- 1$ and 1 to represent the bit values. This vector is processed through a $2 N \\times 2 N$ FC layer, then sent through a succession of four 1-D convolutional layers. The convolutional layers are described in terms of their window size, input depth, and output depth. Each has a “stride”—the amount by which the window is shifted at each step. The concrete layers are [4, 1, 2], [2, 2, 4], [1, 4, 4], and [1, 4, 1], with strides of $1 , 2 , 1 , 1$ . Intuitively, the first layer slides a size-4 window across the $2 N$ output elements from the FC layer, outputting two numbers (output depth 2), with stride 1. We use a sigmoid nonlinear unit after each layer except the final one. After the final layer, where the output is reduced to $N$ elements, we use a tanh nonlinear unit. (Recall that tanh has an output domain between $[ - 1 , 1 ]$ , bringing the values back to a range that can map to binary values.) The Bob network is identical to the Alice network The Eve network takes only the ciphertext as input, and thus has a first $N \\times 2 N$ FC layer. ",
646
+ "bbox": [
647
+ 174,
648
+ 895,
649
+ 821,
650
+ 924
651
+ ],
652
+ "page_idx": 4
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "",
657
+ "bbox": [
658
+ 174,
659
+ 103,
660
+ 825,
661
+ 256
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "Training To train the networks, we use a “minibatch” size ranging from 256 to 4096 entries. Unless otherwise specified, we present the results from the training runs with 4096 entries. We use TensorFlow’s Adam (Kingma & Ba, 2014) optimizer with a learning rate of 0.0008. We do not reduce the learning rate over time because we wish Alice, Bob, and Eve to be able to continue to respond strongly to changes in other components, until Alice and Bob—hopefully—achieve a solution that is robust to additional changes in Eve. ",
668
+ "bbox": [
669
+ 174,
670
+ 279,
671
+ 825,
672
+ 362
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "Training alternates between Alice/Bob and Eve, with Alice/Bob training for one minibatch, and then Eve training for two minibatches. We chose this ratio in order to give a slight computational edge to the adversary Eve without training it so much that it becomes excessively specific to the exact current parameters of Alice and Bob. Empirically, this value has worked well. ",
679
+ "bbox": [
680
+ 174,
681
+ 369,
682
+ 825,
683
+ 424
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "Loss Functions Eve’s loss function is exactly as described above: the L1 distance between Eve’s guess and the input plaintext. The loss function for Alice and Bob is more complex, as indicated in Sections 2.2 and 2.3. This function has two components, related to Bob’s reconstruction error and to the eavesdropper’s success. The first component is simply the L1 distance between Bob’s output and the input plaintext. The latter component, on the other hand, is $( N / 2 - \\mathrm { E v e } \\ L 1 \\mathrm { e r r o r } ) ^ { 2 } / ( N / 2 ) ^ { 2 }$ . This definition expresses the goal, described in Section 2.3, that Eve should not do better than random guessing. Accordingly, this component is minimized when half of the message bits are wrong and half are right. We choose a quadratic formula in order to place more emphasis on making Eve have a large error, and to impose less of a penalty when Eve guesses a few bits correctly, as should happen occasionally even if Eve’s guesses are effectively random. Adopting this formulation allowed us to have a meaningful per-example loss function (instead of looking at larger batch statistics), and improved the robustness of training. Its cost is that our final, trained Alice and Bob typically allow Eve to reconstruct slightly more bits than purely random guessing would achieve. We have not obtained satisfactory results for loss functions that depend linearly (rather than quadratically) on Eve’s reconstruction error. The best formulation remains an open question. ",
690
+ "bbox": [
691
+ 174,
692
+ 446,
693
+ 825,
694
+ 656
695
+ ],
696
+ "page_idx": 5
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "Post-training Evaluation After successfully training the networks so that they cross an accuracy threshold (e.g., at most 0.05 bits of reconstruction error for Alice and Bob, with Eve achieving only 1-2 bits more than random guessing would predict), we reset the Eve network and train it from scratch 5 times, each for up to 250,000 steps, recording the best result achieved by any Eve. An Alice/Bob combination that fails to achieve the target thresholds within 150,000 steps is a training failure. If the retrained Eves obtain a substantial advantage, the solution is non-robust. Otherwise, we consider it a successful training outcome. ",
701
+ "bbox": [
702
+ 174,
703
+ 679,
704
+ 825,
705
+ 776
706
+ ],
707
+ "page_idx": 5
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "Results Figure 2 shows, for one successful run, the evolution of Bob’s reconstruction error and Eve’s reconstruction error vs. the number of training steps for $N = 1 6$ bit plaintext and key values, using a minibatch size of 4096. Each point in the graph is the mean error across 4096 examples. An ideal result would have Bob’s reconstruction error drop to zero and Eve’s reconstruction error reach 8 (half the bits wrong). In this example, both reconstruction errors start high. After a period of time, Alice and Bob start to communicate quite effectively, but in a way that allows Eve to improve its understanding as well, gradually. Then, around step 10,000, Alice and Bob counter Eve’s progress. By about step 15,000, the training goals are effectively achieved. The remaining steps merely increase Eve’s reconstruction error slightly. ",
712
+ "bbox": [
713
+ 174,
714
+ 797,
715
+ 825,
716
+ 924
717
+ ],
718
+ "page_idx": 5
719
+ },
720
+ {
721
+ "type": "image",
722
+ "img_path": "images/237079668eea8bc4408ed9388b7bc9f2b86593044078b3e6611c6ee4e1c7a816.jpg",
723
+ "image_caption": [
724
+ "Figure 2: Evolution of Bob’s and Eve’s reconstruction errors during training. Lines represent the mean error across a minibatch size of 4096. "
725
+ ],
726
+ "image_footnote": [],
727
+ "bbox": [
728
+ 209,
729
+ 151,
730
+ 776,
731
+ 412
732
+ ],
733
+ "page_idx": 6
734
+ },
735
+ {
736
+ "type": "image",
737
+ "img_path": "images/a9a52de758fe08259490978291475b7dd128e71fa22e19d0683904b6c4dd6231.jpg",
738
+ "image_caption": [
739
+ "Figure 3: Final reconstruction errors of Bob and of the most effective retrained Eve, for the fourteen initially successful runs, of twenty. An ideal result would be a dot in the upper-left corner, representing no Bob reconstruction error and 8 bits of Eve reconstruction error. "
740
+ ],
741
+ "image_footnote": [],
742
+ "bbox": [
743
+ 207,
744
+ 554,
745
+ 789,
746
+ 819
747
+ ],
748
+ "page_idx": 6
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "This training graph does not look like a typical result for neural networks, where monotonicity in the number of steps is generally expected. Instead, the dynamics of this adversarial training appear somewhat more reminiscent of evolutionary processes. These dynamics appear to depend on somewhat random-seeming change to cause the bits to mix slightly, but once there is some mixing, the gradient descent can rapidly drive it farther. ",
753
+ "bbox": [
754
+ 174,
755
+ 103,
756
+ 823,
757
+ 172
758
+ ],
759
+ "page_idx": 7
760
+ },
761
+ {
762
+ "type": "text",
763
+ "text": "Supporting this interpretation is the observation that training is not always successful. With $N = 1 6$ , six of twenty initial runs were failures that never got Bob’s reconstruction error under the 0.05 threshold, or failed to drive Eve’s reconstruction error above 7.3 bits (of 16). In order to test the robustness of the other fourteen Alice/Bob combinations, we retrained Eve five times, and obtained reconstruction errors for Eve that ranged from 4.67 to 6.97 bits, with a mean of 6.1. Figure 3 shows the final reconstruction errors of Bob and of the most effective retrained Eve for those fourteen Alice/Bob combinations. If we somewhat arbitrarily define success as maintaining Bob’s reconstruction error at or under 0.05 bits, and requiring that Eve get at least 6 bits wrong, on average, then training succeeded half of the time (ten of twenty cases). ",
764
+ "bbox": [
765
+ 174,
766
+ 180,
767
+ 825,
768
+ 305
769
+ ],
770
+ "page_idx": 7
771
+ },
772
+ {
773
+ "type": "text",
774
+ "text": "Although training with an adversary is often unstable (Salimans et al., 2016), we suspect that some additional engineering of the neural network and its training may be able to increase this overall success rate. With a minibatch size of only 512, for example, we achieved a success rate of only $1 / 3$ (vs. the $1 / 2$ that we achieved with a minibatch size of 4096). In the future, it may be worth studying the impact of minibatch sizes, and also that of other parameters such as the learning rate. ",
775
+ "bbox": [
776
+ 174,
777
+ 313,
778
+ 823,
779
+ 382
780
+ ],
781
+ "page_idx": 7
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "Analogous results hold in general for $N = 3 2$ and $N = 6 4$ -bit keys and plaintexts; training appears to be successful somewhat more often for $N = 6 4$ . Basically, the experiments for $N = 3 2$ and $N = 6 4$ indicate that there is nothing special about $N = 1 6$ which, to a cryptographer, may look suspiciously tiny. We focus our presentation on the case of $N = 1 6$ because, first, the experiments run more rapidly, and second, it is modestly easier to examine their behavior. ",
786
+ "bbox": [
787
+ 174,
788
+ 388,
789
+ 823,
790
+ 458
791
+ ],
792
+ "page_idx": 7
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "For one successful training run, we studied the changes in the ciphertext induced by various plaintext/key pairs. Although we did not perform an exhaustive analysis of the encryption method, we did make a few observations. First, it is key-dependent: changing the key and holding the plaintext constant results in different ciphertext output. It is also plaintext-dependent, as required for successful communication. However, it is not simply XOR. In particular, the output values are often floating-point values other than 0 and 1. Moreover, the effect of a change to either a key bit or a plaintext bit is spread across multiple elements in the ciphertext, not constrained to a single bit as it would be with XOR. A single-bit flip in the key typically induces significant changes in three to six of the 16 elements in the ciphertext, and smaller changes in other elements. Plaintext bits are similarly diffused across the ciphertext. ",
797
+ "bbox": [
798
+ 174,
799
+ 465,
800
+ 825,
801
+ 604
802
+ ],
803
+ "page_idx": 7
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "3 LEARNING WHAT TO PROTECT ",
808
+ "text_level": 1,
809
+ "bbox": [
810
+ 176,
811
+ 627,
812
+ 462,
813
+ 643
814
+ ],
815
+ "page_idx": 7
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "Building on the results of Section 2, we study selective protection. In other words, we consider the question of whether neural networks can learn what information to protect, given confidentiality objectives described in terms of an adversary. In the simplest case, a plaintext may have several components; if we wish to keep the adversary from seeing one of the components, it may suffice to encrypt it. More generally, we may wish to publish some values correlated with the plaintext but prevent the adversary from calculating other values. In such scenarios, protecting information selectively while maximizing utility is both challenging and interesting. ",
820
+ "bbox": [
821
+ 174,
822
+ 660,
823
+ 825,
824
+ 758
825
+ ],
826
+ "page_idx": 7
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "3.1 THE PROBLEM ",
831
+ "text_level": 1,
832
+ "bbox": [
833
+ 174,
834
+ 777,
835
+ 316,
836
+ 791
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "To test these ideas and to demonstrate the viability of selective protection, we focus on a concrete experiment. We construct an artificial dataset consisting of tuples of four values, $\\langle \\mathbf { A } , \\mathbf { B } , \\mathbf { C } , \\mathbf { D } \\rangle$ . We aim to build and train a system that outputs two predictions of D, given the first three values as inputs: a “true” prediction of D (that is, the most accurate possible estimate of D given $\\langle \\mathbf { A } , \\mathbf { B } , \\mathbf { C } \\rangle ,$ ), and a “privacy-preserving” estimate of D, which we call D-public, defined as the best possible estimate of D that does not reveal any information about the value of C. ",
843
+ "bbox": [
844
+ 174,
845
+ 804,
846
+ 825,
847
+ 888
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "The system organization is essentially that of Figure 1, with Alice and Bob sharing a key, but here Alice receives $\\langle \\bar { \\bf A } , \\bf B , C \\rangle$ and produces D-public in addition to a ciphertext; both Bob and Eve have access to Alice’s outputs; Bob uses them for producing an improved estimate of D, while Eve attempts to recover C. Thus, our goal is to demonstrate that the adversarial training permits approximating D without revealing C, and that this approximation can be combined with encrypted information and with a key in order to obtain a better approximation of D. ",
854
+ "bbox": [
855
+ 173,
856
+ 895,
857
+ 820,
858
+ 924
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "",
865
+ "bbox": [
866
+ 174,
867
+ 103,
868
+ 823,
869
+ 159
870
+ ],
871
+ "page_idx": 8
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "The distributions of A, B, C, and D are constructed so that there is substantial correlation between them. In particular, knowing D exactly would convey some information about the likely values of C. In our experiments, A, B, C, and $\\mathbf { D }$ are normally distributed floating-point values with a correlation matrix imposed upon them. The specifics of how we generate A, B, C, and D are standard: we compute the Cholesky decomposition $L L ^ { * }$ of a $4 \\times 4$ correlation matrix that specifies the pairwise correlations, we generate vectors of 4 normally distributed floating-point values, and then we multiply these vectors by $L$ in order to generate values of A, B, C, and D. ",
876
+ "bbox": [
877
+ 174,
878
+ 166,
879
+ 825,
880
+ 263
881
+ ],
882
+ "page_idx": 8
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Although A, B, C, and D do not correspond to any real-world data, these experiments are loosely inspired by real-world tasks. For example, A, B, and C may represent attributes of a user, which may in general be correlated, and D may represent a decision about the user, a prediction of the user’s behavior, or a recommendation to the user. ",
887
+ "bbox": [
888
+ 174,
889
+ 271,
890
+ 823,
891
+ 327
892
+ ],
893
+ "page_idx": 8
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "3.2 NEURAL NETWORK ARCHITECTURE AND TRAINING GOALS",
898
+ "text_level": 1,
899
+ "bbox": [
900
+ 176,
901
+ 345,
902
+ 630,
903
+ 359
904
+ ],
905
+ "page_idx": 8
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "In the experiments that follow, we use an augmented version of the neural network architecture of Section 2.4. The inputs first go into a new FC layer (12 inputs—eight key bits and four values—and 12 outputs); the outputs of that first layer are fed into a network with the architecture of Section 2.4. Intuitively, we chose this augmented architecture because a single FC layer should be capable of predicting D from A, B, and C, as well as making a prediction decorrelated with C; and the architecture of Section 2.4 suffices to encrypt any of the output of the first layer under the key. We therefore believed this augmented architecture would be sufficient to accomplish its task, though it may be more than is necessary to do so. ",
910
+ "bbox": [
911
+ 174,
912
+ 371,
913
+ 825,
914
+ 482
915
+ ],
916
+ "page_idx": 8
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "We train Eve with the goal of minimizing the squared error of its estimate of C. We train Alice and Bob with the goal of minimizing a linear combination of three terms: the squared error of each of the two estimates of D, and the absolute value of the covariance of Eve’s estimate of C with respect to the actual value of C. We compute this covariance on a batch of training examples, and define the loss function for Alice and Bob batch-wise. ",
921
+ "bbox": [
922
+ 174,
923
+ 489,
924
+ 825,
925
+ 559
926
+ ],
927
+ "page_idx": 8
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "A human engineer would naturally try to design the system somewhat differently—likely first computing the desired quantities, and then encrypting the values to be hidden, relying on the encryption and decryption components developed in Section 2 as modules. We prefer instead an end-to-end approach, because our goal is to understand whether a neural network can learn to hide information selectively, given only a high-level specification (“do not leak information about C, but let people with the right key learn as much as possible about D”). In this end-to-end approach, the system does not have distinct, pre-assigned units for encryption and decryption, and all components are trained jointly. In particular, although we benefit from some of the insights from Section 2, we do not rely on the components developed there. End-to-end approaches are sometimes preferred in machine learning because they can more efficiently use resources and information. In our case, this feature may mean, in particular, that the cryptographic operations are optimized for the given distribution of inputs. Nevertheless, our choices have the primary goal of maximizing insight, not efficiency. ",
932
+ "bbox": [
933
+ 174,
934
+ 566,
935
+ 825,
936
+ 733
937
+ ],
938
+ "page_idx": 8
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "3.3 RESULTS ",
943
+ "text_level": 1,
944
+ "bbox": [
945
+ 176,
946
+ 751,
947
+ 277,
948
+ 765
949
+ ],
950
+ "page_idx": 8
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "To understand whether the system is learning to hide information properly, we train a separate evaluator that we call “Blind Eve”, which is aware of the distribution of C. Blind Eve tries to guess C relying only upon this baseline information, whereas the real Eve also knows the intermediate output (D-public) and the ciphertext. If Eve’s reconstruction error becomes equal to that of Blind Eve, we know that Eve is not successfully extracting information from the public estimate and the ciphertext. ",
955
+ "bbox": [
956
+ 174,
957
+ 777,
958
+ 823,
959
+ 847
960
+ ],
961
+ "page_idx": 8
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "Figure 4 shows the results of adversarial training to learn to hide C. The red “public error” line shows the average error of D-public vs. D. The green “Bob error” line shows Bob’s average reconstruction error, which drops over time until Bob is making the best possible prediction of D given the input. The public error becomes low, but is slightly higher than Bob’s. The blue dots show Eve’s average error improvement over Blind Eve. After a few steps of training, Eve’s error is substantially lower than that of Blind Eve (by 0.1–0.2). As time proceeds, Eve’s relative advantage becomes zero. Eve is not able to reconstruct any more information about C than would be possible by simply knowing the distribution of values of C. ",
966
+ "bbox": [
967
+ 174,
968
+ 853,
969
+ 823,
970
+ 924
971
+ ],
972
+ "page_idx": 8
973
+ },
974
+ {
975
+ "type": "image",
976
+ "img_path": "images/6152a395a052eb8d183e6d0897408d86392381feb1495e99adca50a59d5208b9.jpg",
977
+ "image_caption": [
978
+ "Figure 4: Training to estimate D while hiding C. "
979
+ ],
980
+ "image_footnote": [],
981
+ "bbox": [
982
+ 209,
983
+ 108,
984
+ 789,
985
+ 372
986
+ ],
987
+ "page_idx": 9
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "",
992
+ "bbox": [
993
+ 174,
994
+ 428,
995
+ 823,
996
+ 470
997
+ ],
998
+ "page_idx": 9
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "4 CONCLUSION ",
1003
+ "text_level": 1,
1004
+ "bbox": [
1005
+ 176,
1006
+ 492,
1007
+ 318,
1008
+ 507
1009
+ ],
1010
+ "page_idx": 9
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "In this paper, we demonstrate that neural networks can learn to protect communications. The learning does not require prescribing a particular set of cryptographic algorithms, nor indicating ways of applying these algorithms: it is based only on a secrecy specification represented by the training objectives. In this setting, we model attackers by neural networks; alternative models may perhaps be enabled by reinforcement learning. ",
1015
+ "bbox": [
1016
+ 174,
1017
+ 523,
1018
+ 823,
1019
+ 593
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "There is more to cryptography than encryption. In this spirit, further work may consider other tasks, for example steganography, pseudorandom-number generation, or integrity checks. Finally, neural networks may be useful not only for cryptographic protections but also for attacks. While it seems improbable that neural networks would become great at cryptanalysis, they may be quite effective in making sense of metadata and in traffic analysis. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 601,
1029
+ 825,
1030
+ 670
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "ACKNOWLEDGMENTS ",
1037
+ "text_level": 1,
1038
+ "bbox": [
1039
+ 176,
1040
+ 688,
1041
+ 326,
1042
+ 700
1043
+ ],
1044
+ "page_idx": 9
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "We are grateful to Samy Bengio, Laura Downs, Ulfar Erlingsson, Jakob Foerster, Nando de Freitas, ´ Ian Goodfellow, Geoff Hinton, Chris Olah, Ananth Raghunathan, and Luke Vilnis for discussions on the matter of this paper. ",
1049
+ "bbox": [
1050
+ 176,
1051
+ 710,
1052
+ 825,
1053
+ 753
1054
+ ],
1055
+ "page_idx": 9
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "REFERENCES ",
1060
+ "text_level": 1,
1061
+ "bbox": [
1062
+ 174,
1063
+ 775,
1064
+ 285,
1065
+ 790
1066
+ ],
1067
+ "page_idx": 9
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz ´ Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viegas, Oriol Vinyals, ´ Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016a. URL http://arxiv.org/abs/1603.04467. ",
1072
+ "bbox": [
1073
+ 176,
1074
+ 799,
1075
+ 825,
1076
+ 922
1077
+ ],
1078
+ "page_idx": 9
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek Gordon Murray, Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zhang. TensorFlow: A system for large-scale machine learning. CoRR, abs/1605.08695, 2016b. URL http://arxiv.org/ abs/1605.08695. ",
1083
+ "bbox": [
1084
+ 176,
1085
+ 103,
1086
+ 825,
1087
+ 188
1088
+ ],
1089
+ "page_idx": 10
1090
+ },
1091
+ {
1092
+ "type": "text",
1093
+ "text": "Boaz Barak, Oded Goldreich, Russell Impagliazzo, Steven Rudich, Amit Sahai, Salil Vadhan, and Ke Yang. On the (im)possibility of obfuscating programs. J. ACM, 59(2):6:1–6:48, May 2012. ISSN 0004-5411. doi: 10.1145/2160158.2160159. URL http://doi.acm.org/10.1145/ 2160158.2160159. ",
1094
+ "bbox": [
1095
+ 173,
1096
+ 196,
1097
+ 825,
1098
+ 253
1099
+ ],
1100
+ "page_idx": 10
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "Gilles Barthe, Juan Manuel Crespo, Benjamin Gregoire, C ´ esar Kunz, Yassine Lakhnech, Benedikt ´ Schmidt, and Santiago Zanella-Beguelin. Fully automated analysis of padding-based encryption ´ in the computational model. In Proceedings of the 2013 ACM SIGSAC conference on Computer &#38; communications security, CCS ’13, pp. 1247–1260, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2477-9. doi: 10.1145/2508859.2516663. URL http://doi.acm.org/ 10.1145/2508859.2516663. ",
1105
+ "bbox": [
1106
+ 173,
1107
+ 262,
1108
+ 825,
1109
+ 347
1110
+ ],
1111
+ "page_idx": 10
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. InfoGAN: Interpretable representation learning by information maximizing generative adversarial nets. CoRR, abs/1606.03657, 2016. URL https://arxiv.org/abs/1606.03657. ",
1116
+ "bbox": [
1117
+ 174,
1118
+ 356,
1119
+ 825,
1120
+ 400
1121
+ ],
1122
+ "page_idx": 10
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "Emily L. Denton, Soumith Chintala, Arthur Szlam, and Robert Fergus. Deep generative image models using a Laplacian pyramid of adversarial networks. CoRR, abs/1506.05751, 2015. URL http://arxiv.org/abs/1506.05751. ",
1127
+ "bbox": [
1128
+ 173,
1129
+ 409,
1130
+ 825,
1131
+ 452
1132
+ ],
1133
+ "page_idx": 10
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "Sebastien Dourlens. Applied neuro-cryptography. 1996. M ´ emoire, Universit ´ e Paris 8, D ´ epartement ´ Micro-Informatique Micro-Electronique. ",
1138
+ "bbox": [
1139
+ 173,
1140
+ 460,
1141
+ 823,
1142
+ 489
1143
+ ],
1144
+ "page_idx": 10
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "Harrison Edwards and Amos J. Storkey. Censoring representations with an adversary. CoRR, abs/1511.05897, 2015. URL http://arxiv.org/abs/1511.05897. ",
1149
+ "bbox": [
1150
+ 171,
1151
+ 500,
1152
+ 823,
1153
+ 529
1154
+ ],
1155
+ "page_idx": 10
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "Jakob N. Foerster, Yannis M. Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate to solve riddles with deep distributed recurrent Q-networks. CoRR, abs/1602.02672, 2016a. URL http://arxiv.org/abs/1602.02672. ",
1160
+ "bbox": [
1161
+ 173,
1162
+ 536,
1163
+ 825,
1164
+ 580
1165
+ ],
1166
+ "page_idx": 10
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "Jakob N. Foerster, Yannis M. Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. CoRR, abs/1605.06676, 2016b. URL http://arxiv.org/abs/1605.06676. ",
1171
+ "bbox": [
1172
+ 171,
1173
+ 589,
1174
+ 823,
1175
+ 632
1176
+ ],
1177
+ "page_idx": 10
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor S. Lempitsky. Domain-adversarial training of neural networks. CoRR, abs/1505.07818, 2015. URL http://arxiv.org/abs/1505.07818. ",
1182
+ "bbox": [
1183
+ 174,
1184
+ 642,
1185
+ 823,
1186
+ 685
1187
+ ],
1188
+ "page_idx": 10
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "Ran Gilad-Bachrach, Nathan Dowlin, Kim Laine, Kristin E. Lauter, Michael Naehrig, and John Wernsing. Cryptonets: Applying neural networks to encrypted data with high throughput and accuracy. In Maria-Florina Balcan and Kilian Q. Weinberger (eds.), Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, volume 48 of JMLR Workshop and Conference Proceedings, pp. 201–210. JMLR.org, 2016. URL http://jmlr.org/proceedings/papers/v48/gilad-bachrach16.html. ",
1193
+ "bbox": [
1194
+ 173,
1195
+ 693,
1196
+ 826,
1197
+ 779
1198
+ ],
1199
+ "page_idx": 10
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "Shafi Goldwasser and Silvio Micali. Probabilistic encryption. J. Comput. Syst. Sci., 28(2):270– 299, 1984. doi: 10.1016/0022-0000(84)90070-9. URL http://dx.doi.org/10.1016/ 0022-0000(84)90070-9. ",
1204
+ "bbox": [
1205
+ 174,
1206
+ 787,
1207
+ 825,
1208
+ 830
1209
+ ],
1210
+ "page_idx": 10
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In Zoubin Ghahramani, Max Welling, Corinna Cortes, Neil D. Lawrence, and Kilian Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pp. 2672–2680, 2014a. URL http://papers.nips.cc/paper/5423-generative-adversarial-nets. ",
1215
+ "bbox": [
1216
+ 174,
1217
+ 839,
1218
+ 825,
1219
+ 924
1220
+ ],
1221
+ "page_idx": 10
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014b. URL http://arxiv.org/abs/1412.6572. ",
1226
+ "bbox": [
1227
+ 171,
1228
+ 103,
1229
+ 825,
1230
+ 133
1231
+ ],
1232
+ "page_idx": 11
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. ",
1237
+ "bbox": [
1238
+ 174,
1239
+ 141,
1240
+ 821,
1241
+ 170
1242
+ ],
1243
+ "page_idx": 11
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "Wolfgang Kinzel and Ido Kanter. Neural cryptography. arXiv preprint cond-mat/0208453, 2002. ",
1248
+ "bbox": [
1249
+ 173,
1250
+ 178,
1251
+ 808,
1252
+ 194
1253
+ ],
1254
+ "page_idx": 11
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Alexander Klimov, Anton Mityagin, and Adi Shamir. Analysis of neural cryptography. In Yuliang Zheng (ed.), Advances in Cryptology - ASIACRYPT 2002, 8th International Conference on the Theory and Application of Cryptology and Information Security, Queenstown, New Zealand, December 1-5, 2002, Proceedings, volume 2501 of Lecture Notes in Computer Science, pp. 288–298. Springer, 2002. ISBN 3-540-00171-9. doi: 10.1007/3-540-36178-2 18. URL http://dx.doi.org/10.1007/3-540-36178-2_18. ",
1259
+ "bbox": [
1260
+ 174,
1261
+ 203,
1262
+ 825,
1263
+ 287
1264
+ ],
1265
+ "page_idx": 11
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521:436–444, 2015. ",
1270
+ "bbox": [
1271
+ 174,
1272
+ 295,
1273
+ 803,
1274
+ 311
1275
+ ],
1276
+ "page_idx": 11
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "Christos Louizos, Kevin Swersky, Yujia Li, Max Welling, and Richard S. Zemel. The variational fair autoencoder. CoRR, abs/1511.00830, 2015. URL http://arxiv.org/abs/1511.00830. ",
1281
+ "bbox": [
1282
+ 173,
1283
+ 319,
1284
+ 820,
1285
+ 349
1286
+ ],
1287
+ "page_idx": 11
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. CoRR, abs/1511.04834, 2015. URL http://arxiv.org/abs/ 1511.04834. ",
1292
+ "bbox": [
1293
+ 171,
1294
+ 357,
1295
+ 825,
1296
+ 400
1297
+ ],
1298
+ "page_idx": 11
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. CoRR, abs/1606.00709, 2016. URL https: //arxiv.org/abs/1606.00709. ",
1303
+ "bbox": [
1304
+ 173,
1305
+ 409,
1306
+ 825,
1307
+ 452
1308
+ ],
1309
+ "page_idx": 11
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "Lillian J Ratliff, Samuel A Burden, and S Shankar Sastry. Characterization and computation of local nash equilibria in continuous games. In Communication, Control, and Computing (Allerton), 2013 51st Annual Allerton Conference on, pp. 917–924. IEEE, 2013. ",
1314
+ "bbox": [
1315
+ 173,
1316
+ 460,
1317
+ 823,
1318
+ 503
1319
+ ],
1320
+ "page_idx": 11
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Andreas Ruttor. Neural synchronization and cryptography. PhD thesis, Julius Maximilian University of Wurzburg, 2006. URL ¨ http://www.opus-bayern.de/uni-wuerzburg/ volltexte/2007/2361/. ",
1325
+ "bbox": [
1326
+ 174,
1327
+ 512,
1328
+ 823,
1329
+ 554
1330
+ ],
1331
+ "page_idx": 11
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. CoRR, abs/1606.03498, 2016. URL https://arxiv. org/abs/1606.03498. ",
1336
+ "bbox": [
1337
+ 173,
1338
+ 564,
1339
+ 821,
1340
+ 606
1341
+ ],
1342
+ "page_idx": 11
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. Learning multiagent communication with backpropagation. CoRR, abs/1605.07736, 2016. URL http://arxiv.org/abs/1605. 07736. ",
1347
+ "bbox": [
1348
+ 173,
1349
+ 614,
1350
+ 825,
1351
+ 659
1352
+ ],
1353
+ "page_idx": 11
1354
+ },
1355
+ {
1356
+ "type": "text",
1357
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. CoRR, abs/1312.6199, 2013. URL http://arxiv.org/abs/1312.6199. ",
1358
+ "bbox": [
1359
+ 176,
1360
+ 666,
1361
+ 823,
1362
+ 710
1363
+ ],
1364
+ "page_idx": 11
1365
+ },
1366
+ {
1367
+ "type": "text",
1368
+ "text": "Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Machine Learning, pp. 229–256, 1992. ",
1369
+ "bbox": [
1370
+ 168,
1371
+ 718,
1372
+ 825,
1373
+ 748
1374
+ ],
1375
+ "page_idx": 11
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "Pengtao Xie, Misha Bilenko, Tom Finley, Ran Gilad-Bachrach, Kristin E. Lauter, and Michael Naehrig. Crypto-nets: Neural networks over encrypted data. CoRR, abs/1412.6181, 2014. URL http://arxiv.org/abs/1412.6181. ",
1380
+ "bbox": [
1381
+ 174,
1382
+ 756,
1383
+ 825,
1384
+ 799
1385
+ ],
1386
+ "page_idx": 11
1387
+ },
1388
+ {
1389
+ "type": "image",
1390
+ "img_path": "images/b2016dd2dd4819fa56ec7428663d6ad65700e349b3fdc00a3b0d65d2052e0795.jpg",
1391
+ "image_caption": [
1392
+ "Figure 5: Alice, Bob, and Eve, with an asymmetric cryptosystem. "
1393
+ ],
1394
+ "image_footnote": [],
1395
+ "bbox": [
1396
+ 215,
1397
+ 108,
1398
+ 789,
1399
+ 320
1400
+ ],
1401
+ "page_idx": 12
1402
+ },
1403
+ {
1404
+ "type": "text",
1405
+ "text": "APPENDIX ",
1406
+ "text_level": 1,
1407
+ "bbox": [
1408
+ 176,
1409
+ 383,
1410
+ 263,
1411
+ 400
1412
+ ],
1413
+ "page_idx": 12
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "A LEARNING ASYMMETRIC ENCRYPTION ",
1418
+ "text_level": 1,
1419
+ "bbox": [
1420
+ 176,
1421
+ 421,
1422
+ 537,
1423
+ 438
1424
+ ],
1425
+ "page_idx": 12
1426
+ },
1427
+ {
1428
+ "type": "text",
1429
+ "text": "Paralleling Section 2, this section examines asymmetric encryption (also known as public-key encryption). It presents definitions and experimental results, but omits a detailed discussion of the objectives of asymmetric encryption, of the corresponding loss functions, and of the practical refinements that we develop for training, which are analogous to those for symmetric encryption. ",
1430
+ "bbox": [
1431
+ 174,
1432
+ 457,
1433
+ 825,
1434
+ 512
1435
+ ],
1436
+ "page_idx": 12
1437
+ },
1438
+ {
1439
+ "type": "text",
1440
+ "text": "A.1 DEFINITIONS ",
1441
+ "text_level": 1,
1442
+ "bbox": [
1443
+ 176,
1444
+ 535,
1445
+ 310,
1446
+ 549
1447
+ ],
1448
+ "page_idx": 12
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "In asymmetric encryption, a secret is associated with each principal. The secret may be seen as a seed for generating cryptographic keys, or directly as a secret key; we adopt the latter view. A public key can be derived from the secret, in such a way that messages encrypted under the public key can be decrypted only with knowledge of the secret. ",
1453
+ "bbox": [
1454
+ 174,
1455
+ 564,
1456
+ 825,
1457
+ 619
1458
+ ],
1459
+ "page_idx": 12
1460
+ },
1461
+ {
1462
+ "type": "text",
1463
+ "text": "We specify asymmetric encryption using a twist on our specification for symmetric encryption, shown in Figure 5. Instead of directly supplying the secret encryption key to Alice, we supply the secret key to a public-key generator, the output of which is available to every node. Only Bob has access to the underlying secret key. Much as in Section 2, several variants are possible, for instance to support probabilistic encryption. ",
1464
+ "bbox": [
1465
+ 174,
1466
+ 627,
1467
+ 825,
1468
+ 696
1469
+ ],
1470
+ "page_idx": 12
1471
+ },
1472
+ {
1473
+ "type": "text",
1474
+ "text": "The public-key generator is itself a neural network, with its own parameters. The loss functions treats these parameters much like those of Alice and Bob. In training, these parameters are adjusted at the same time as those of Alice and Bob. ",
1475
+ "bbox": [
1476
+ 176,
1477
+ 704,
1478
+ 823,
1479
+ 746
1480
+ ],
1481
+ "page_idx": 12
1482
+ },
1483
+ {
1484
+ "type": "text",
1485
+ "text": "A.2 EXPERIMENTS ",
1486
+ "text_level": 1,
1487
+ "bbox": [
1488
+ 176,
1489
+ 768,
1490
+ 318,
1491
+ 784
1492
+ ],
1493
+ "page_idx": 12
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "In our experiments on asymmetric encryption, we rely on the same approach as in Section 2.5. In particular, we adopt the same network structure and the same approach to training. ",
1498
+ "bbox": [
1499
+ 174,
1500
+ 796,
1501
+ 823,
1502
+ 825
1503
+ ],
1504
+ "page_idx": 12
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "The results of these experiments are intriguing, but much harder to interpret than those for symmetric encryption. In most training runs, the networks failed to achieve a robust outcome. Often, although it appeared that Alice and Bob had learned to communicate secretly, upon resetting and retraining Eve, the retrained adversary was able to decrypt messages nearly as well as Bob was. ",
1509
+ "bbox": [
1510
+ 176,
1511
+ 832,
1512
+ 825,
1513
+ 888
1514
+ ],
1515
+ "page_idx": 12
1516
+ },
1517
+ {
1518
+ "type": "text",
1519
+ "text": "However, Figure 6 shows the results of one training run, in which even after five reset/retrain cycles, Eve was unable to decrypt messages between Alice and Bob. ",
1520
+ "bbox": [
1521
+ 174,
1522
+ 895,
1523
+ 821,
1524
+ 924
1525
+ ],
1526
+ "page_idx": 12
1527
+ },
1528
+ {
1529
+ "type": "image",
1530
+ "img_path": "images/20872348759a81d1815639e59f4b25aa926c3b5f14cdf17c461ac34dc5c3b90d.jpg",
1531
+ "image_caption": [
1532
+ "Figure 6: Bob’s and Eve’s reconstruction errors with an asymmetric formulation. "
1533
+ ],
1534
+ "image_footnote": [],
1535
+ "bbox": [
1536
+ 210,
1537
+ 108,
1538
+ 781,
1539
+ 372
1540
+ ],
1541
+ "page_idx": 13
1542
+ },
1543
+ {
1544
+ "type": "text",
1545
+ "text": "Our chosen network structure is not sufficient to learn general implementations of many of the mathematical concepts underlying modern asymmetric cryptography, such as integer modular arithmetic. We therefore believe that the most likely explanation for this successful training run was that Alice and Bob accidentally obtained some “security by obscurity” (cf. the derivation of asymmetric schemes from symmetric schemes by obfuscation (Barak et al., 2012)). This belief is somewhat reinforced by the fact that the training result was fragile: upon further training of Alice and Bob, Eve was able to decrypt the messages. However, we cannot rule out that the networks trained into some set of hard-to-invert matrix operations resulting in “public-key-like” behavior. Our results suggest that this issue deserves more exploration. ",
1546
+ "bbox": [
1547
+ 174,
1548
+ 434,
1549
+ 825,
1550
+ 560
1551
+ ],
1552
+ "page_idx": 13
1553
+ },
1554
+ {
1555
+ "type": "text",
1556
+ "text": "Further work might attempt to strengthen these results, perhaps relying on new designs of neural networks or new training procedures. A modest next step may consist in trying to learn particular asymmetric algorithms, such as lattice-based ciphers, in order to identify the required neural network structure and capacity. ",
1557
+ "bbox": [
1558
+ 174,
1559
+ 568,
1560
+ 825,
1561
+ 623
1562
+ ],
1563
+ "page_idx": 13
1564
+ },
1565
+ {
1566
+ "type": "text",
1567
+ "text": "B BACKGROUND ON NEURAL NETWORKS ",
1568
+ "text_level": 1,
1569
+ "bbox": [
1570
+ 174,
1571
+ 651,
1572
+ 539,
1573
+ 666
1574
+ ],
1575
+ "page_idx": 13
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "Most of this paper assumes only a few basic notions in machine learning and neural networks, as provided by general introductions (e.g., LeCun et al. (2015)). The following is a brief review. ",
1580
+ "bbox": [
1581
+ 176,
1582
+ 686,
1583
+ 823,
1584
+ 715
1585
+ ],
1586
+ "page_idx": 13
1587
+ },
1588
+ {
1589
+ "type": "text",
1590
+ "text": "Neural networks are specifications of parameterized functions. They are typically constructed out of a sequence of somewhat modular building blocks. For example, the input to Alice is a vector of bits that represents the concatenation of the key and the plaintext. This vector $( x )$ is input into a “fully-connected” layer, which consists of a matrix multiply (by $A$ ) and a vector addition (with b): $A x + b$ . The result of that operation is then passed into a nonlinear function, sometimes termed an “activation function”, such as the sigmoid function, or the hyperbolic tangent function, tanh. In classical neural networks, the activation function represents a threshold that determines whether a neuron would “fire” or not, based upon its inputs. This threshold, and matrices and vectors such as $A$ and $b$ , are typical neural network “parameters”. “Training” a neural network is the process that finds values of its parameters that minimize the specified loss function over the training inputs. ",
1591
+ "bbox": [
1592
+ 174,
1593
+ 722,
1594
+ 825,
1595
+ 861
1596
+ ],
1597
+ "page_idx": 13
1598
+ },
1599
+ {
1600
+ "type": "text",
1601
+ "text": "Fully-connected layers are powerful but require substantial amounts of memory for a large network. An alternative to fully-connected layers are “convolutional” layers. Convolutional layers operate much like their counterparts in computer graphics, by sliding a parameterized convolution window across their input. The number of parameters in this window is much smaller than in an equivalent fully-connected layer. Convolutional layers are useful for applying the same function(s) at every point in an input. ",
1602
+ "bbox": [
1603
+ 176,
1604
+ 868,
1605
+ 823,
1606
+ 924
1607
+ ],
1608
+ "page_idx": 13
1609
+ },
1610
+ {
1611
+ "type": "text",
1612
+ "text": "",
1613
+ "bbox": [
1614
+ 173,
1615
+ 103,
1616
+ 823,
1617
+ 132
1618
+ ],
1619
+ "page_idx": 14
1620
+ },
1621
+ {
1622
+ "type": "text",
1623
+ "text": "A neural network architecture consists of a graph of these building blocks (often, but not always, a DAG), specifying what the individual layers are (e.g., fully-connected or convolutional), how they are parameterized (number of inputs, number of outputs, etc.), and how they are wired. ",
1624
+ "bbox": [
1625
+ 173,
1626
+ 138,
1627
+ 823,
1628
+ 181
1629
+ ],
1630
+ "page_idx": 14
1631
+ }
1632
+ ]
parse/train/S1HEBe_Jl/S1HEBe_Jl_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1HEBe_Jl/S1HEBe_Jl_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1XolQbRW/S1XolQbRW.md ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MODEL COMPRESSION VIA DISTILLATION AND QUANTIZATION
2
+
3
+ Antonio Polino
4
+ ETH Zurich¨
5
+ antonio.polino1@gmail.com
6
+ Dan Alistarh
7
+ IST Austria
8
+ dan.alistarh@ist.ac.at
9
+
10
+ # ABSTRACT
11
+
12
+ Deep neural networks (DNNs) continue to make significant advances, solving tasks from image classification to translation or reinforcement learning. One aspect of the field receiving considerable attention is efficiently executing deep models in resource-constrained environments, such as mobile or embedded devices. This paper focuses on this problem, and proposes two new compression methods, which jointly leverage weight quantization and distillation of larger networks, called “teachers,” into compressed “student” networks. The first method we propose is called quantized distillation and leverages distillation during the training process, by incorporating distillation loss, expressed with respect to the teacher network, into the training of a smaller student network whose weights are quantized to a limited set of levels. The second method, differentiable quantization, optimizes the location of quantization points through stochastic gradient descent, to better fit the behavior of the teacher model. We validate both methods through experiments on convolutional and recurrent architectures. We show that quantized shallow students can reach similar accuracy levels to state-of-the-art full-precision teacher models, while providing up to order of magnitude compression, and inference speedup that is almost linear in the depth reduction. In sum, our results enable DNNs for resource-constrained environments to leverage architecture and accuracy advances developed on more powerful devices.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Background. Neural networks are extremely effective for solving several real world problems, like image classification (Krizhevsky et al., 2012; He et al., 2016a), translation (Vaswani et al., 2017), voice synthesis (Oord et al., 2016) or reinforcement learning (Mnih et al., 2013; Silver et al., 2016). At the same time, modern neural network architectures are often compute, space and power hungry, typically requiring powerful GPUs to train and evaluate. The debate is still ongoing on whether large models are necessary for good accuracy. It is known that individual network weights can be redundant, and may not carry significant information, e.g. Han et al. (2015). At the same time, large models often have the ability to completely memorize datasets (Zhang et al., 2016), yet they do not, but instead appear to learn generic task solutions. A standing hypothesis for why overcomplete representations are necessary is that they make learning possible by transforming local minima into saddle points (Dauphin et al., 2014) or to discover robust solutions, which do not rely on precise weight values (Hochreiter & Schmidhuber, 1997; Keskar et al., 2016).
17
+
18
+ If large models are only needed for robustness during training, then significant compression of these models should be achievable, without impacting accuracy. This intuition is strengthened by two related, but slightly different research directions. The first direction is the work on training quantized neural networks, e.g. Courbariaux et al. (2015); Rastegari et al. (2016); Hubara et al. (2016); Wu et al. (2016a); Mellempudi et al. (2017); Ott et al. (2016); Zhu et al. (2016), which showed that neural networks can converge to good task solutions even when weights are constrained to having values from a set of integer levels. The second direction aims to compress already-trained models, while preserving their accuracy. To this end, various elegant compression techniques have been proposed, e.g. Han et al. (2015); Iandola et al. (2016); Wen et al. (2016); Gysel et al. (2016); Mishra et al. (2017), which combine quantization, weight sharing, and careful coding of network weights, to reduce the size of state-of-the-art deep models by orders of magnitude, while at the same time speeding up inference.
19
+
20
+ Both these research directions are extremely active, and have been shown to yield significant compression and accuracy improvements, which can be crucial when making such models available on embedded devices or phones. However, the literature on compressing deep networks focuses almost exclusively on finding good compression schemes for a given model, without significantly altering the structure of the model. On the other hand, recent parallel work (Ba & Caruana, 2013; Hinton et al., 2015) introduces the process of distillation, which can be used for transferring the behaviour of a given model to any other structure. This can be used for compression, e.g. to obtain compact representations of ensembles (Hinton et al., 2015). However the size of the student model needs to be large enough for allowing learning to succeed. A model that is too shallow, too narrow, or which misses necessary units, can result in considerable loss of accuracy (Urban et al., 2016).
21
+
22
+ In this work, we examine whether distillation and quantization can be jointly leveraged for better compression. We start from the intuition that 1) the existence of highly-accurate, full-precision teacher models should be leveraged to improve the performance of quantized models, while 2) quantizing a model can provide better compression than a distillation process attempting the same space gains by purely decreasing the number of layers or layer width. While our approach is very natural, interesting research questions arise when these two ideas are combined.
23
+
24
+ Contribution. We present two methods which allow the user to compound compression in terms of depth, by distilling a shallower student network with similar accuracy to a deeper teacher network, with compression in terms of width, by quantizing the weights of the student to a limited set of integer levels, and using less weights per layer. The basic idea is that quantized models can leverage distillation loss (Hinton et al., 2015), the weighted average between the correct targets (represented by the labels) and soft targets (represented by the teacher’s outputs).
25
+
26
+ We implement this intuition via two different methods. The first, called quantized distillation, aims to leverage distillation loss during the training process, by incorporating it into the training of a student network whose weights are constrained to a limited set of levels. The second method, which we call differentiable quantization, takes a different approach, by attempting to converge to the optimal location of quantization points through stochastic gradient descent. We validate both methods empirically through a range of experiments on convolutional and recurrent network architectures. We show that quantized shallow students can reach similar accuracy levels to full-precision and deeper teacher models on datasets such as CIFAR and ImageNet (for image classification) and OpenNMT and WMT (for machine translation), while providing up to order of magnitude compression, and inference speedup that is linear in the depth. 1
27
+
28
+ Related Work. Our work is a special case of knowledge distillation (Ba & Caruana, 2013; Hinton et al., 2015), in which we focus on techniques to obtain high-accuracy students that are both quantized and shallower. More generally, it can be seen as a special instance of learning with privileged information, e.g. Vapnik & Izmailov (2015); Xu et al. (2016), in which the student is provided additional information in the form of outputs from a larger, pre-trained model. The idea of optimizing the locations of quantization points during the learning process, which we use in differentiable quantization, has been used previously in Lan et al. (2014); Koren & Sill (2011); Zhang et al. (2017), although in the different context of matrix completion and recommender systems.
29
+
30
+ Using distillation for size reduction is mentioned in Hinton et al. (2015), for distilling ensembles. To our knowledge, the only other work using distillation in the context of quantization is $\mathbf { W } \mathbf { u }$ et al. (2016b), which uses it to improve the accuracy of binary neural networks on ImageNet. We significantly refine this idea, as we match or even improve the accuracy of the original full-precision model: for example, our 4-bit quantized version of ResNet18 has higher accuracy than full-precision ResNet18 (matching the accuracy of the ResNet34 teacher): it has higher top-1 accuracy (by $> 1 5 \%$ ) and top-5 accuracy (by $> 7 \%$ ) compared to the most accurate model in Wu et al. (2016b).
31
+
32
+ # 2 PRELIMINARIES
33
+
34
+ # 2.1 THE QUANTIZATION PROCESS
35
+
36
+ We start by defining a scaling function $s c : \mathcal { R } ^ { n } \to [ 0 , 1 ] .$ , which normalizes vectors whose values come from an arbitrary range, to vectors whose values are in $[ 0 , 1 ]$ . Given such a function, the general structure of the quantization functions is as follows:
37
+
38
+ $$
39
+ Q ( v ) = s c ^ { - 1 } \left( \hat { Q } \left( s c ( v ) \right) \right) ,
40
+ $$
41
+
42
+ where $s c ^ { - 1 }$ is the inverse of the scaling function, and $\hat { Q }$ is the actual quantization function that only accepts values in $[ 0 , 1 ]$ . We always assume $v$ to be a vector; in practice, of course, the weight vectors can be multi-dimensional, but we can reshape them to one dimensional vectors and restore the original dimensions after the quantization.
43
+
44
+ Scaling. There are various specifications for the scaling function; in this paper, we will use linear scaling, e.g. He et al. (2016b), that is $\begin{array} { r } { s c ( v ) = \frac { v - \beta } { \alpha } } \end{array}$ , with $\alpha = \operatorname* { m a x } _ { i } v _ { i } - \operatorname* { m i n } _ { i } v _ { i }$ and $\beta = \operatorname* { m i n } _ { i } v _ { i }$ which results in the target values being in $[ 0 , 1 ]$ , and the quantization function
45
+
46
+ $$
47
+ Q ( v ) = \alpha \hat { Q } \left( \frac { v - \beta } { \alpha } \right) + \beta .
48
+ $$
49
+
50
+ Bucketing. One problem with this formulation is that an identical scaling factor is used for the whole vector, whose dimension might be huge. Magnitude imbalance can result in a significant loss of precision, where most of the elements of the scaled vector are pushed to zero. To avoid this, we will use bucketing, e.g. Alistarh et al. (2016), that is, we will apply the scaling function separately to buckets of consecutive values of a certain fixed size. The trade-off here is that we obtain better quantization accuracy for each bucket, but will have to store two floating-point scaling factors for each bucket. We characterize the compression comparison in Section 5. The function $\hat { Q }$ can also be defined in several ways. We will consider both uniform and non-uniform placement of quantization points.
51
+
52
+ Uniform Quantization. We fix a parameter $s \geq 1$ , describing the number of quantization levels employed. Intuitively, uniform quantization considers $s + 1$ equally spaced points between 0 and 1 (including these endpoints). The deterministic version will assign each (scaled) vector coordinate $v _ { i }$ to the closest quantization point, while in the stochastic version we perform rounding probabilistically, such that the resulting value is an unbiased estimator of $v _ { i }$ , of minimal variance.
53
+
54
+ Formally, the uniform quantization function with $s + 1$ levels is defined as
55
+
56
+ $$
57
+ \hat { Q } ( v , s ) _ { i } = \frac { \lfloor v _ { i } s \rfloor } { s } + \frac { \xi _ { i } } { s } ,
58
+ $$
59
+
60
+ where $\xi _ { i }$ is the rounding function. For the deterministic version, we define $k _ { i } = s v _ { i } - \lfloor v _ { i } s \rfloor$ and set
61
+
62
+ $$
63
+ \xi _ { i } = \left\{ { \begin{array} { l l } { 1 , } & { { \mathrm { i f ~ } } k _ { i } > { \frac { 1 } { 2 } } } \\ { 0 , } & { { \mathrm { o t h e r w i s e } } , } \end{array} } \right.
64
+ $$
65
+
66
+ while for the stochastic version we will set $\xi _ { i } \sim B e r n o u l l i ( k _ { i } )$ . Note that $k _ { i }$ is the normalized distance between the original point $v _ { i }$ and the closest quantization point that is smaller than $v _ { i }$ and that the vector components are quantized independently.
67
+
68
+ Non-Uniform Quantization. Non-uniform quantization takes as input a set of $s$ quantization points $\{ p _ { 1 } , \ldots , p _ { s } \}$ and quantizes each element $v _ { i }$ to the closest of these points. For simplicity, we only define the deterministic version of this function.
69
+
70
+ # 2.2 STOCHASTIC QUANTIZATION IS EQUIVALENT TO ADDING GAUSSIAN NOISE
71
+
72
+ In this section we list some interesting mathematical properties of the uniform quantization function.
73
+ Clearly, stochastic uniform quantization is an unbiased estimator of its input, i.e. $E [ Q ( v ) ] = v$ .
74
+
75
+ What interests us is applying this function to neural networks; as the scalar product is the most common operation performed by neural networks, we would like to study the properties of $Q ( v ) ^ { T } x$ where $v$ is the weight vector of a certain layer in the network and $x$ are the inputs. We are able to show that
76
+
77
+ $$
78
+ Q ( v ) ^ { T } x = v ^ { T } x + \varepsilon
79
+ $$
80
+
81
+ where $\varepsilon$ is a random variable that is asymptotically normally distributed, i.e. $\begin{array} { r } { { \frac { 1 } { \sigma _ { n } } } \varepsilon \ { \overset { \mathcal { D } } { \longrightarrow } } \ N ( 0 , 1 ) } \end{array}$ . Convergence occurs with the dimension $n$ . For a formal statement and proof, see Section B.1 in the Appendix.
82
+
83
+ This means that quantizing the weights is equivalent to adding to the output of each layer (before the activation function) a zero-mean error term that is asymptotically normally distributed. The variance of this error term depends on $s$ . This connects quantization to work advocating adding noise to intermediary activations of neural networks as a regularizer (Gulcehre et al., 2016) and to Arora et al. (2018), which investigates the connection between adding noise to a network weights and the network generalization properties. We plan to investigate this connection in more detail in future work.
84
+
85
+ # 3 QUANTIZED DISTILLATION
86
+
87
+ The context is the following: given a task, we consider a trained state-of-the-art deep model solving it–the teacher, and a compressed student model. The student is compressed in the sense that 1) it is shallower than the teacher; and 2) it is quantized, in the sense that its weights are expressed at limited bit width. The strategy, as for standard distillation (Ba & Caruana, 2013; Hinton et al., 2015) is for the student to leverage the converged teacher model to reach similar accuracy. We note that distillation has been used previously to obtain compact high-accuracy encodings of ensembles (Hinton et al., 2015); however, we believe this is the first time it is used for model compression via quantization.
88
+
89
+ Given this setup, there are two questions we need to address. The first is how to transfer knowledge from the teacher to the student. For this, the student will use the distillation loss, as defined by Hinton et al. (2015), as the weighted average between two objective functions: cross entropy with soft targets, controlled by the temperature parameter $T$ , and the cross entropy with the correct labels. We refer the reader to Hinton et al. (2015) for the precise definition of distillation loss.
90
+
91
+ The second question is how to employ distillation loss in the context of a quantized neural network. An intuitive approach is to rely on projected gradient descent, where a gradient step is taken as in full-precision training, and then the new parameters are projected to the set of valid solutions. Critically, we accumulate the error at each projection step into the gradient for the next step. One can think of this process as if collecting evidence for whether each weight needs to move to the next quantization point or not. Crucially, the error accumulation prevents the algorithm from getting stuck in the current solution if gradients are small, which would occur in a naive projected gradient approach. This is similar to the approach taken by BinaryConnect technique, with some differences. Li et al. (2017) also examines these dynamics in detail. Compared to BinnaryConnect, we use distillation rather than learning from scratch, hence learning more efficiently. We also do not restrict ourselves to binary representation, but rather use variable bit-width quantization functions and bucketing, as defined in Section 2.
92
+
93
+ An alternative view of this process, illustrated in Figure 1, is that we perform the SGD step on the full-precision model, but computing the gradient on the quantized model, expressed with respect to the distillation loss. See Algorithm 1 for details.
94
+
95
+ # 4 DIFFERENTIABLE QUANTIZATION
96
+
97
+ # 4.1 GENERAL DESCRIPTION
98
+
99
+ We introduce differentiable quantization as a general method of improving the accuracy of a quantized neural network, by exploiting non-uniform quantization point placement. In particular, we are going to use the non-uniform quantization function defined in Section 2.1. Experimentally, we have
100
+
101
+ # Algorithm 1 Quantized Distillation
102
+
103
+ 1: procedure QUANTIZED DISTILLATION
104
+ 2: Let w be the network weights
105
+ 3: loop
106
+ 4: $w ^ { q } \gets$ quant function $( w , s )$
107
+ 5: Run forward pass and compute distillation loss $l ( w ^ { q } )$
108
+ 6: Run backward pass and compute $\frac { \partial l ( w ^ { q } ) } { \partial w ^ { q } }$
109
+ 7: Update original weights using SGD in full precision w = w − ν · ∂l(wq)∂wq
110
+ 8: Finally quantize the weights before returning: $w ^ { q } \gets$ quant function $( w , s )$
111
+ 9: return $w ^ { q }$
112
+
113
+ ![](images/06939a77d76d96f184ea8f4606de8a98e4dada1c06b8b103e7bdc5807c9c57c6.jpg)
114
+ Figure 1: Depiction of the steps of quantized distillation. Note the accumulation over multiple steps of gradients in the unquantized model leads to a switch in quantization (e.g. top layer left most square).
115
+
116
+ found little difference between stochastic and deterministic quantization in this case, and therefore will focus on the simpler deterministic quantization function here.
117
+
118
+ Let $p = ( p _ { 1 } , \ldots , p _ { s } )$ be the vector of quantization points, and let $Q ( v , p )$ be our quantization function, as defined previously. Ideally, we would like to find a set of quantization points $p$ which minimizes the accuracy loss when quantizing the model using $Q ( v , p )$ . The key observation is that to find this set $p$ , we can just use stochastic gradient descent, because we are able to compute the gradient of $Q$ with respect to $p$ .
119
+
120
+ A major problem in quantizing neural networks is the fact that the decision of which $p _ { i }$ should replace a given weight is discrete, hence the gradient is zero: ∂Q(v, p) = 0, almost everywhere. This implies that we cannot backpropagate the gradients through the quantization function. To solve this problem, typically a variant of the straight-through estimator is used, see e.g. Bengio et al. (2013); Hubara et al. (2016). On the other hand, the model as a function of the chosen $p _ { i }$ is continuous and can be differentiated; the gradient of $Q ( v , p ) _ { i }$ with respect to $p _ { j }$ is well defined almost everywhere, and it is simply
121
+
122
+ $$
123
+ \frac { \partial Q ( v , p ) _ { i } } { \partial p _ { j } } = \left\{ { \begin{array} { l l } { \alpha _ { i } , } & { \mathrm { i f ~ } v _ { i } \mathrm { ~ h a s ~ b e e n ~ q u a n t i z e d ~ t o ~ } p _ { j } } \\ { 0 , } & { \mathrm { o t h e r w i s e } , } \end{array} } \right.
124
+ $$
125
+
126
+ where $\alpha _ { i }$ is $i$ -th element of the scaling factor, assuming we are using a bucketing scheme. If no bucketing is used, then $\alpha _ { i } = \alpha$ for every $i$ . Otherwise it changes depending on which bucket the weight $v _ { i }$ belongs to.
127
+
128
+ Therefore, we can use the same loss function we used when training the original model, and with Equation (6) and the usual backpropagation algorithm we are able to compute its gradient with respect to the quantization points $p$ . Then we can minimize the loss function with respect to $p$ with the standard SGD algorithm. See Algorithm 2 for details.
129
+
130
+ Note on Efficiency. Optimizing the points $p$ can be slower than training the original network, since we have to perform the normal forward and backward pass, and in addition we need to quantize the weights of the model and perform the backward pass to get to the gradients w.r.t. $p$ . However, in our experience differential quantization requires an order of magnitude less iterations to converge to a good solution, and can be implemented efficiently.
131
+
132
+ # Algorithm 2 Differentiable Quantization
133
+
134
+ 1: procedure DIFFERENTIABLE QUANTIZATION
135
+ 2: Let w be the networks weights and $p$ the initial quantization points
136
+ 3: loop
137
+ 4: $w ^ { q } \gets$ quant function $( w , p )$
138
+ 5: Run forward pass and compute loss $l ( w ^ { q } )$
139
+ 6: Run backward pass and compute $\frac { \partial l ( w ^ { q } ) } { \partial w ^ { q } }$
140
+ 7: Use equation 6 to compute $\frac { \partial l ( w ^ { q } ) } { \partial p }$
141
+ 8: Update quantization points using SGD or similar: $\begin{array} { r } { p = p - \nu \cdot \frac { \partial l ( w ^ { q } ) } { \partial p } } \end{array}$
142
+ 9: return p
143
+
144
+ Weight Sharing. Upon close inspection, this method can be related to weight sharing Han et al. (2015). Weight sharing uses a $k$ -mean clustering algorithm to find good clusters for the weights, adopting the centroids as quantization points for a cluster. The network is trained modifying the values of the centroids, aggregating the gradient in a similar fashion. The difference is in the initial assignment of points to centroids, but also, more importantly, in the fact that the assignment of weights to centroids never changes. By contrast, at every iteration we re-assign weights to the closest quantization point, and use a different initialization.
145
+
146
+ # 4.2 DISCUSSION AND ADDITIONAL HEURISTICS
147
+
148
+ While the loss is continuous w.r.t. $p$ , there are indirect effects when changing the way each weight gets quantized. This can have drastic effect on the learning process. As an extreme example, we could have degeneracies, where all weights get represented by the same quantization point, making learning impossible. Or diversity of $p _ { i }$ gets reduced, resulting in very few weights being represented at a really high precision while the rest are forced to be represented in a much lower resolution.
149
+
150
+ To avoid such issues, we rely on the following set of heuristics. Future work will look at adding a reinforcement learning loss for how the $p _ { i }$ are assigned to weights.
151
+
152
+ Choose good starting points. One way to initialize the starting quantization points is to make them uniformly spaced, which would correspond to use as a starting point the uniform quantization function. The differentiable quantization algorithm needs to be able to use a quantization point in order to update it; therefore, to make sure every quantization point is used we initialize the points to be the quantiles of the weight values. This ensures that every quantization point is associated with the same number of values and we are able to update it.
153
+
154
+ Redistribute bits where it matters. Not all layers in the network need the same accuracy. A measure of how important each weight is to the final prediction is the norm of the gradient of each weight vector. So in an initial phase we run the forward and backward pass a certain number of times to estimate the gradient of the weight vectors in each layer, we compute the average gradient across multiple minibatches and compute the norm; we then allocate the number of points associated with each weight according to a simple linear proportion. In short we estimate
155
+
156
+ $$
157
+ \left. \mathbb { E } \left[ { \frac { \partial l } { \partial v } } \right] \right. _ { 2 }
158
+ $$
159
+
160
+ where $l$ is the loss function, $v$ is the vector of weights in a particular layer and $\begin{array} { r } { \left( \frac { \partial l } { \partial v } \right) _ { i } = \frac { \partial l } { \partial v _ { i } } } \end{array}$ and we use this value to determine which layers are most sensitive to quantization.
161
+
162
+ When using this process, we will use more than the indicated number of bits in some layers, and less in others. We can reduce the impact of this effect with the use of Huffman encoding, see Section 5; in any case, note that while the total number of points stays constant, allocating more points to a layer will increase bit complexity overall if the layer has a larger proportion of the weights.
163
+
164
+ Use the distillation loss. In the algorithm delineated above, the loss refers to the loss we used to train the original model with. Another possible specification is to treat the unquantized model as the teacher model, the quantized model as the student, and to use as loss the distillation loss between the outputs of the unquantized and quantized model. In this case, then, we are optimizing our quantized model not to perform best with respect to the original loss, but to mimic the results of the unquantized model, which should be easier to learn for the model and provide better results.
165
+
166
+ Hyperparameter optimization. The algorithm above is an optimization problem very similar to the original one. As usual, to obtain the best results one should experiment with hyperparameters optimization, and different variants of gradient descent.
167
+
168
+ # 5 COMPRESSION
169
+
170
+ We now analyze the space savings when using $b$ bits and bucket size of $k$ . Let $f$ be the size of full precision weights (32 bit) and let $N$ be the size of the “vector” we are quantizing. Full precision requires $f N$ bits, while the quantized vector requires $b { N } + \frac { 2 f N } { k }$ . (We use $b$ bits per weight, plus the scaling factors $\alpha$ and $\beta$ for every bucket). The size gain is therefore $\begin{array} { r } { g ( b , k ; f ) = \frac { k f } { k b + 2 f } } \end{array}$ .
171
+
172
+ For differentiable quantization, we also have to store the values of the quantization points. Since this number does not depend on $N$ , the amount of space required is negligible and we ignore it for simplicity. As an example, at 256 bucket size, using 2 bits per component yields $1 4 . 2 \times$ space savings w.r.t. full precision, while 4 bits yields $7 . 5 2 \times$ space savings. At 512 bucket size, the 2 bit savings are $1 5 . 0 5 \times$ , while 4 bits yields $7 . 7 5 \times$ compression.
173
+
174
+ Huffman encoding. To save additional space, we can use Huffman encoding to represent the quantized values. In fact, each quantized value can be thought as the pointer to a full precision value; in the case of non uniform quantization is $p _ { k }$ , in the case of uniform quantization is $k / s$ . We can then compute the frequency for every index across all the weights of the model and compute the optimal Huffman encoding. The mean bit length of the optimal encoding is the amount of bits we actually use to encode the values. This explains the presence of fractional bits in some of our size gain tables from the Appendix.
175
+
176
+ We emphasize that we only use these compression numbers as a ballpark figure, since additional implementation costs might mean that these savings are not always easy to translate to practice (Han et al., 2015).
177
+
178
+ # 6 EXPERIMENTAL RESULTS
179
+
180
+ # 6.1 SMALL DATASETS
181
+
182
+ Methods. We will begin with a set of experiments on smaller datasets, which allow us to more carefully cover the parameter space. We compare the performance of the methods described in the following way: we consider as baseline the teacher model, the distilled model and a smaller model: the distilled and smaller models have the same architecture, but the distilled model is trained using distillation loss on the teacher, while the smaller model is trained directly on targets. Further, we compare the performance of Quantized Distillation and Differentiable Quantization. In addition, we will also use PM (“post-mortem”) quantization, which uniformly quantizes the weights after training without any additional operation, with and without bucketing. All the results are obtained with a bucket size of 256, which we found to empirically provide a good compression-accuracy trade-off. We refer the reader to Appendix A for details of the datasets and models.
183
+
184
+ CIFAR-10 Experiments. For image classification on CIFAR-10, we tested the impact of different training techniques on the accuracy of the distilled model, while varying the parameters of a CNN architecture, such as quantization levels and model size. Table 1 contains the results for full-precision training, PM quantization with and without bucketing, as well as our methods. The percentages on the left below the student models definition are the accuracy of the normal and the distilled model respectively (trained with full precision). More details are reported in table 11 in the appendix. We also tried an additional model where the student is deeper than the teacher, where we obtained that the student quantized to 4 bits is able to achieve significantly better accuracy than the teacher, with a compression factor of more than $7 \times$ .
185
+
186
+ We performed additional experiments for differentiable quantization using a wide residual network (Zagoruyko & Komodakis, 2016) that gets to higher accuracies; see table 3.
187
+
188
+ Overall, quantized distillation appears to be the method with best accuracy across the whole range of bit widths and architectures. It outperforms PM significantly for 2bit and 4bit quantization, achieves accuracy within $0 . 2 \%$ of the teacher at 8 bits on the larger student model, and relatively minor accuracy loss at 4bit quantization. Differentiable quantization is a close second on all experiments,
189
+
190
+ Table 1: CIFAR10 accuracy. Teacher model: $5 . 3 \mathbf { M }$ param, $2 1 \ \mathrm { M B }$ , accuracy $8 9 . 7 1 \ \%$ .Details about the resulting size of the models are reported in table 11 in the appendix.
191
+
192
+ <table><tr><td>Student model 1 1M param - 4 MB 84.5% - 88.8%</td><td>PM Quant.(No bucket) PM Quant. (with bucket) Quantized Distill. Differentiable Quant.</td><td>2 bits 9.30 % 10.53 % 82.4 % 80.43%</td><td>4bits 67.99 % 87.18 % 88.00 % 88.31 %</td><td>8 bits 88.91 % 88.80 % 88.82 %</td></tr><tr><td>Student model 2 0.3M param - 1.27 MB 80.3% - 84.3%</td><td>PM Quant. (No bucket) PM Quant. (with bucket) Quantized Distill. Differentiable Quant.</td><td>10.15 % 11.89 % 74.22 % 72.79 %</td><td>68.05 % 81.96 % 83.92 % 83.49 %</td><td>84.38 % 84.38 % 84.22 %</td></tr><tr><td>Student model 3 0.1M param - 0.45 MB 71.6% - 78.2%</td><td>PM Quant. (No bucket) PM Quant. (with bucket) Quantized Distill. Differentiable Quant.</td><td>10.15 % 10.38 % 67.02 % 57.84 %</td><td>61.30 % 72.44 % 77.75 % 77.36 %</td><td>78.04 % 78.10 % 77.92 %</td></tr></table>
193
+
194
+ Table 2: CIFAR10 accuracy. Teacher model: $5 . 3 \mathbf { M }$ param, 21 MB, accuracy $8 9 . 7 1 \%$ . Details about the resulting size of the models are reported in table 14 in the appendix.
195
+
196
+ <table><tr><td>Deeper student</td><td>PM Quant.(No bucket)</td><td>2 bits 4 bits 12.60 %</td></tr><tr><td>5.8M param - 23.2 MB</td><td></td><td>91.11 %</td></tr><tr><td></td><td>PM(with bucketing)</td><td>45.82 % 92.30 %</td></tr><tr><td>93.22% -92.6%</td><td>Quantized Distilled</td><td>89.33 % 92.17 %</td></tr></table>
197
+
198
+ Table 3: CIFAR10 accuracy (Wide Residual Network). Teacher model: 145M param, ${ 5 8 0 } ~ \mathrm { M B }$ , accuracy $9 5 . 7 ~ \%$ . Details about the resulting size of the models are reported in table 17 in the appendix.
199
+
200
+ Student model 2 bits 4 bits 82.7M param - 330 MB PM Quant. (with bucket) $1 5 . 3 5 \%$ $8 1 . 1 \%$ $9 5 . \bar { 3 } \% - 9 4 . 1 9 \%$ Quantized Distill. $9 4 . 2 3 \%$ $9 4 . 7 3 \%$ but it has much faster convergence. Further, we highlight the good accuracy of the much simpler PM quantization method with bucketing at higher bit width (4 and 8 bits).
201
+
202
+ CIFAR-100 Experiments. Next, we perform image classification with the full 100 classes. Here, we focus on 2bit and 4bit quantization, and on a single student architecture. The baseline architecture is a wide residual network with 28 layers, and $3 6 . 5 \mathrm { M }$ parameters, which is state-of-the-art for its depth on this dataset. The student has depth and width reduced by $2 0 \%$ , and half the parameters. It is chosen so that reaches the same accuracy as the teacher model when distilled at full precision. Accuracy results are given in Table 4. More details are reported in Table 20, in the appendix.
203
+
204
+ Table 4: CIFAR100 accuracy and model size. Teacher: 36.5M param, 146 MB, acc. $7 7 . 2 1 \ \%$ .
205
+
206
+ <table><tr><td></td><td></td><td>2 bits</td><td>4 bits</td></tr><tr><td>Student model</td><td>PM Quant. (No bucket)</td><td>1.38% - 3.18 MB</td><td>1.29 % - 5.77 MB</td></tr><tr><td>17.2M param - 68.8 MB</td><td>PM Quant. (with bucket)</td><td>1.00% -3.9 MB</td><td>73.5%-8.2MB</td></tr><tr><td>77.08% - 77.24%</td><td>Quantized Distill.</td><td>27.84 %-4.3MB</td><td>76.31% -8.2 MB</td></tr><tr><td></td><td>Differentiable Quant.</td><td>49.32 % - 7.9 MB</td><td>77.07 % - 12.4 MB</td></tr></table>
207
+
208
+ The results confirm the trend from the previous dataset, with distilled and differential quantization preserving accuracy within less than $1 \%$ at 4bit precision. However, we note that accuracy loss is catastrophic at 2bit precision, probably because of reduced model capacity. We note that differentiable quantization is able to best recover accuracy for this harder task.
209
+
210
+ OpenNMT Experiments. The OpenNMT integration test dataset (Ope) consists of 200K train sentences and 10K test sentences for a German-English translation task. To train and test models we use the OpenNMT PyTorch codebase (Klein et al., 2017). We modified the code, in particular by adding the quantization algorithms and the distillation loss. As measure of fit we will use perplexity and the BLEU score, the latter computed using the multi-bleu.perl code from the moses project (mos).
211
+
212
+ Our target models consist of an embedding layer, an encoder consisting of $n$ layers of LSTM, a decoder consisting of $n$ layers of LSTM, and a linear layer. The decoder also uses the global attention mechanism described in Luong et al. (2015). For the teacher network we set $n = 2$ , for a total of 4 LSTM layers with LSTM size 500. For the student networks we choose $n = 1$ , for a total of 2 LSTM layers. We vary the LSTM size of the student networks and for each one, we compute the distilled model and the quantized versions for varying bit width. Results are summarized in Table 5. The BLEU scores below the student model refer to the BLEU scores of the normal and distilled model respectively (trained with full precision). Details about the resulting size of the models are reported in table 23 in the appendix.
213
+
214
+ Table 5: OpenNMT dataset BLEU score and perplexity (ppl). Teacher model: 84.8M param, 340 MB, 26.1 ppl, 15.88 BLEU. Details about the resulting size of the models are reported in table 23 in the appendix.
215
+
216
+ <table><tr><td>Student model 1 81.6M param - 326 MB 14.97 - 16.13BLEU</td><td>PM Quant.(No bucket) PM Quant. (with bucket) Quantized Distill. Differentiable Quant.</td><td>2 bits 0.00 - 2 :1017 ppl 4.12 - 125.1 ppl 0.00 - 6645 ppl 0.7 - 249 ppl</td><td>4 bits 0.24 - 2 · 10 ppl 16.29 - 26.2 ppl 15.73 - 25.43 ppl</td></tr><tr><td>Student model 2 64.8M param - 249 MB 14.22 - 15.48 BLEU</td><td>PM Quant. (No bucket) PM Quant. (with bucket) Quantized Distill. Differentiable Quant.</td><td>0.00 -5·10ppl 1.72 - 286.98 ppl 0.00 - 4035 ppl 0.28 - 306 ppl</td><td>15.01 - 28.8 ppl 6.65 - 71.78 ppl 15.19 - 28.95 ppl 15.26 - 29.1 ppl 13.86 - 31.33 ppl</td></tr><tr><td>Student model 3 57.2M param - 228 MB 12.45-13.8 BLEU</td><td>PM Quant. (No bucket) PM Quant. (with bucket) Quantized Distill. Differentiable Quant.</td><td>0.00 -3·10ppl 0.24 - 1984 ppl 0.14 - 731 ppl 0.26 - 306 ppl</td><td>5.47 - 106.5 ppl 12.64 - 36.56 ppl 12 - 37 ppl 12.06 - 38.44 ppl</td></tr></table>
217
+
218
+ A reasonable intuition would be that recurrent neural networks should be harder to quantize than convolutional neural networks, as quantization errors do not average out when executing repeatedly through the same cell, but accumulate. Results contradict this intuition. In particular, medium and large-sized students are able to essentially recover the same scores as the teacher model on this dataset. Perhaps surprisingly, bucketing PM and quantized distillation perform equally well for 4bit quantization. As expected, cell size is an important indicator for accuracy, although halving both cell size and the number of layers can be done without significant loss.
219
+
220
+ # 6.2 LARGER DATASETS
221
+
222
+ WMT13 Experiments. We run a similar LSTM architecture as above for the WMT13 dataset (Koehn, 2005) (1.7M sentences train, 190K sentences test) and we provide additional experiments for quantized distillation technique, see Table 6. We note that, on this large dataset, PM quantization does not perform well, even with bucketing. On the other hand, quantized distillation with 4bits of precision has higher BLEU score than the teacher, and similar perplexity.
223
+
224
+ Table 6: WMT13 dataset BLEU score and perplexity (ppl). Teacher model: 84.8M param, 340 MB, 5.8 ppl, 34.7 BLEU. Details about model size are reported in Table 26.
225
+
226
+ <table><tr><td>StudentModel</td><td>PM Quant. (No bucket)</td><td>4 bits</td></tr><tr><td>81.6M param - 326 MB</td><td>PM Quant. (with bucket)</td><td>21.38 BLEU - 12.61 ppl</td></tr><tr><td>30.22-30.21BLEU</td><td>Quantized Distill.</td><td>27.73 BLEU - 7.4 ppl</td></tr><tr><td></td><td></td><td>35.32 BLEU - 6.48 ppl</td></tr></table>
227
+
228
+ The ImageNet Dataset. We also experiment with ImageNet using the ResNet architecture (He et al., 2016a). In the first experiment, we use a ResNet34 teacher, and a student ResNet18 student model. Experiments quantizing the standard version of this student resulted in an accuracy loss of around
229
+
230
+ $4 \%$ , and hence we experiment with a wider model, which doubles the number of filters for each convolutional layer. We call this 2xResNet18. This is in line with previous work on wide ResNet architectures (Zagoruyko & Komodakis, 2016), wide students for distillation (Ba & Caruana, 2013), and wider quantized networks (Mishra et al., 2017). We also note that, in line with previous work on this dataset (Zhu et al., 2016; Mishra et al., 2017), we do not quantize the first and last layers of the models, as this can hurt accuracy.
231
+
232
+ After 62 epochs of training, the quantized distilled 2xResNet18 with 4 bits reaches a validation accuracy of $7 3 . 3 1 \%$ . Surprisingly, this is higher than the unquantized ResNet18 model $( 6 9 . 7 5 \% )$ , and has virtually the same accuracy as the ResNet34 teacher. In terms of size, this model is more than $2 \times$ smaller than ResNet18 (but has higher accuracy), and is $4 \times$ smaller than ResNet34, and about $1 . 5 \times$ faster on inference, as it has fewer layers. This is state-of-the-art for 4bit models with 18 layers; to our knowledge, no such model has been able to surpass the accuracy of ResNet18.
233
+
234
+ We re-iterated this experiment using a 4-bit quantized 2xResNet34 student transferring from a ResNet50 full-precision teacher. We obtain a 4-bit quantized student of almost the same accuracy, which is $5 0 \%$ shallower and has a $2 . 5 \times$ smaller size.
235
+
236
+ Table 7: Imagenet accuracy and model size. Bucket size $= 2 5 6$ .
237
+
238
+ <table><tr><td>Model name</td><td>Top-1 Accuracy</td><td>Top-5 Accuracy</td><td># of parameters</td><td>Size (MB)</td></tr><tr><td>Teachermodel:ResNet34</td><td>73.31 %</td><td>91.42 %</td><td>21.79 millions</td><td>87.16 MB</td></tr><tr><td>ResNet18 normal 2xResNet18 QD 4 bits</td><td>69.75 %</td><td>89.07 %</td><td>11.69 millions</td><td>46.76MB</td></tr><tr><td></td><td>73.10 %</td><td>91.17 %</td><td>45.69 millions</td><td>21.98 MB</td></tr><tr><td>Teachermodel:ResNet50</td><td>76.13 %</td><td>92.86 %</td><td>25.55 millions</td><td>102.2MB</td></tr><tr><td>2xResNet34 QD 4 bits</td><td>76.07 %</td><td>92.71 %</td><td>86.11 millions</td><td>41.53MB</td></tr></table>
239
+
240
+ # 6.3 ADDITIONAL EXPERIMENTS
241
+
242
+ Distillation Loss versus Normal Loss. One key question we are interested in is whether distillation loss is a consistently better metric when quantizing, compared to standard loss. We tested this for CIFAR-10, comparing the performance of quantized training with respect to each loss. At 2bit precision, the student converges to $6 7 . 2 2 \%$ accuracy with normal loss, and to $8 2 . 4 0 \%$ with distillation loss. At 4bit precision, the student converges to $8 6 . 0 1 \%$ accuracy with normal loss, and to $8 8 . 0 0 \%$ with distillation loss. On OpenNMT, we observe a similar gap: the 4bit quantized student converges to 32.67 perplexity and 15.03 BLEU when trained with normal loss, and to 25.43 perplexity (better than the teacher) and 15.73 BLEU when trained with distillation loss. This strongly suggests that distillation loss is superior when quantizing. For details, see Section A.4.1 in the Appendix.
243
+
244
+ Impact of Heuristics on Differentiable Quantization. We also performed an in-depth study of how the various heuristics impact accuracy. We found that, for differentiable quantization, redistributing bits according to the gradient norm of the layers is absolutely essential for good accuracy; quantiles and distillation loss also seem to provide an improvement, albeit smaller. Due to space constraints, we defer the results and their discussion to Section A.4.2 of the Appendix.
245
+
246
+ Inference Speed. In general, shallower students lead to an almost-linear decrease in inference cost, w.r.t. the depth reduction. For instance, in the CIFAR-10 experiments with the wide ResNet models, the teacher forward pass takes 67.4 seconds, while the student takes 43.7 seconds; roughly a $1 . 5 \mathrm { x }$ speedup, for $1 . 7 5 \mathrm { x }$ reduction in depth. On the ImageNet test set using 4 GPUs (data-parallel), a forward pass takes 263 seconds for ResNet34, 169 seconds for ResNet18, and 169 seconds for our 2xResNet18. (So, while having more parameters than ResNet18, it has the same speed because it has the same number of layers, and is not wide enough to saturate the GPU. We note that we did not exploit 4bit weights, due to the lack of hardware support.) Inference on our model is 1.5 times faster, while being 1.8 times shallower, so here the speedup is again almost linear.
247
+
248
+ # 7 DISCUSSION
249
+
250
+ We have examined the impact of combining distillation and quantization when compressing deep neural networks. Our main finding is that, when quantizing, one can (and should) leverage large, accurate models via distillation loss, if such models are available. We have given two methods to do just that, namely quantized distillation, and differentiable quantization. The former acts directly on the training process of the student model, while the latter provides a way of optimizing the quantization of the student so as to best fit the teacher model.
251
+
252
+ Our experimental results suggest that these methods can compress existing models by up to an order of magnitude in terms of size, on small image classification and NMT tasks, while preserving accuracy. At the same time, we note that distillation also provides an automatic improvement in inference speed, since it generates shallower models. One of our more surprising findings is that naive uniform quantization with bucketing appears to perform well in a wide range of scenarios. Our analysis in Section 2.2 suggests that this may be because bucketing provides a way to parametrize the Gaussian-like noise induced by quantization. Given its simplicity, it could be used consistently as a baseline method.
253
+
254
+ In our experimental results, we performed manual architecture search for the depth and bit width of the student model, which is time-consuming and error-prone. In future work, we plan to examine the potential of reinforcement learning or evolution strategies to discover the structure of the student for best performance given a set of space and latency constraints. The second, and more immediate direction, is to examine the practical speedup potential of these methods, and use them together and in conjunction with existing compression methods such as weight sharing Han et al. (2015) and with existing low-precision computation frameworks, such as NVIDIA TensorRT, or FPGA platforms.
255
+
256
+ # ACKNOWLEDGEMENTS
257
+
258
+ We would like to thank Ce Zhang (ETH Zurich), Hantian Zhang (ETH Z ´ urich) and Martin Jaggi ´ (EPFL) for their support with experiments and valuable feedback.
259
+
260
+ # REFERENCES
261
+
262
+ Opennmt integration testing. https://github.com/OpenNMT/OpenNMT-py. Accessed: 2017-10-25.
263
+
264
+ Moses baseline. http://www.statmt.org/moses/?n ${ } = { }$ moses.baseline. Accessed: 2017-10-25.
265
+
266
+ Dan Alistarh, Jerry Li, Ryota Tomioka, and Milan Vojnovic. Qsgd: Randomized quantization for communication-optimal stochastic gradient descent. arXiv preprint arXiv:1610.02132, 2016.
267
+
268
+ S. Arora, R. Ge, B. Neyshabur, and Y. Zhang. Stronger generalization bounds for deep nets via a compression approach. ArXiv e-prints, February 2018.
269
+
270
+ Lei Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? CoRR, abs/1312.6184, 2013. URL http://arxiv.org/abs/1312.6184.
271
+
272
+ Yoshua Bengio, Nicholas Leonard, and Aaron C. Courville. Estimating or propagating gradients ´ through stochastic neurons for conditional computation. CoRR, abs/1308.3432, 2013. URL http://arxiv.org/abs/1308.3432.
273
+
274
+ Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. CoRR, abs/1511.00363, 2015. URL http: //arxiv.org/abs/1511.00363.
275
+
276
+ Yann Dauphin, Razvan Pascanu, C¸ aglar Gulc¸ehre, Kyunghyun Cho, Surya Ganguli, and Yoshua ¨ Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. CoRR, abs/1406.2572, 2014. URL http://arxiv.org/abs/1406.2572.
277
+
278
+ Caglar Gulcehre, Marcin Moczulski, Misha Denil, and Yoshua Bengio. Noisy activation functions. In International Conference on Machine Learning, pp. 3059–3068, 2016.
279
+
280
+ Philipp Gysel, Mohammad Motamedi, and Soheil Ghiasi. Hardware-oriented approximation of convolutional neural networks. arXiv preprint arXiv:1604.03168, 2016.
281
+
282
+ Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. CoRR, abs/1510.00149, 2015. URL http://arxiv.org/abs/1510.00149.
283
+
284
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
285
+
286
+ Qinyao He, He Wen, Shuchang Zhou, Yuxin Wu, Cong Yao, Xinyu Zhou, and Yuheng Zou. Effective quantization methods for recurrent neural networks. CoRR, abs/1611.10176, 2016b. URL http: //arxiv.org/abs/1611.10176.
287
+
288
+ G. Hinton, O. Vinyals, and J. Dean. Distilling the Knowledge in a Neural Network. ArXiv e-prints, March 2015.
289
+
290
+ Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997.
291
+
292
+ Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. CoRR, abs/1609.07061, 2016. URL http://arxiv.org/abs/1609.07061.
293
+
294
+ Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and¡ $0 . 5 \mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016.
295
+
296
+ Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016.
297
+
298
+ G. Klein, Y. Kim, Y. Deng, J. Senellart, and A. M. Rush. OpenNMT: Open-Source Toolkit for Neural Machine Translation. ArXiv e-prints, 2017.
299
+
300
+ Philipp Koehn. Europarl: A Parallel Corpus for Statistical Machine Translation. In Conference Proceedings: the tenth Machine Translation Summit, pp. 79–86, Phuket, Thailand, 2005. AAMT, AAMT. URL http://www.statmt.org/europarl/.
301
+
302
+ Yehuda Koren and Joe Sill. Ordrec: an ordinal model for predicting personalized item rating distributions. In Proceedings of the fifth ACM conference on Recommender systems, pp. 117–124. ACM, 2011.
303
+
304
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
305
+
306
+ Andrew S Lan, Christoph Studer, and Richard G Baraniuk. Matrix recovery from quantized and corrupted measurements. In Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on, pp. 4973–4977. IEEE, 2014.
307
+
308
+ Hao Li, Soham De, Zheng Xu, Christoph Studer, Hanan Samet, and Tom Goldstein. Training quantized nets: A deeper understanding. CoRR, abs/1706.02379, 2017. URL http://arxiv. org/abs/1706.02379.
309
+
310
+ Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. CoRR, abs/1508.04025, 2015. URL http://arxiv.org/ abs/1508.04025.
311
+
312
+ Naveen Mellempudi, Abhisek Kundu, Dheevatsa Mudigere, Dipankar Das, Bharat Kaul, and Pradeep Dubey. Ternary neural networks with fine-grained quantization. arXiv preprint arXiv:1705.01462, 2017.
313
+
314
+ Asit K. Mishra, Eriko Nurvitadhi, Jeffrey J. Cook, and Debbie Marr. WRPN: wide reduced-precision networks. CoRR, abs/1709.01134, 2017. URL http://arxiv.org/abs/1709.01134.
315
+
316
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
317
+
318
+ 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, 2016.
319
+
320
+ Joachim Ott, Zhouhan Lin, Ying Zhang, Shih-Chii Liu, and Yoshua Bengio. Recurrent neural networks with limited numerical precision. arXiv preprint arXiv:1608.06902, 2016.
321
+
322
+ Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. CoRR, abs/1603.05279, 2016. URL http://arxiv.org/abs/1603.05279.
323
+
324
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
325
+
326
+ G. Urban, K. J. Geras, S. Ebrahimi Kahou, O. Aslan, S. Wang, R. Caruana, A. Mohamed, M. Philipose, and M. Richardson. Do Deep Convolutional Nets Really Need to be Deep and Convolutional? ArXiv e-prints, March 2016.
327
+
328
+ Vladimir Vapnik and Rauf Izmailov. Learning using privileged information: similarity control and knowledge transfer. Journal of machine learning research, 16(20232049):55, 2015.
329
+
330
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
331
+
332
+ Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In Advances in Neural Information Processing Systems, pp. 2074–2082, 2016.
333
+
334
+ Jiaxiang Wu, Cong Leng, Yuhang Wang, Qinghao Hu, and Jian Cheng. Quantized convolutional neural networks for mobile devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4820–4828, 2016a.
335
+
336
+ Xundong Wu, Yong Wu, and Yong Zhao. High performance binarized neural networks trained on the imagenet classification task. CoRR, abs/1604.03058, 2016b. URL http://arxiv.org/ abs/1604.03058.
337
+
338
+ Xinxing Xu, Joey Tianyi Zhou, IvorW Tsang, Zheng Qin, Rick Siow Mong Goh, and Yong Liu. Simple and efficient learning using privileged information. arXiv preprint arXiv:1604.01518, 2016.
339
+
340
+ S. Zagoruyko and N. Komodakis. Wide Residual Networks. ArXiv e-prints, May 2016.
341
+
342
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
343
+
344
+ Hantian Zhang, Jerry Li, Kaan Kara, Dan Alistarh, Ji Liu, and Ce Zhang. Zipml: Training linear models with end-to-end low precision, and a little bit of deep learning. In International Conference on Machine Learning, pp. 4035–4043, 2017.
345
+
346
+ Chenzhuo Zhu, Song Han, Huizi Mao, and William J. Dally. Trained ternary quantization. CoRR, abs/1612.01064, 2016. URL http://arxiv.org/abs/1612.01064.
347
+
348
+ # A FULL EXPERIMENTAL RESULTS
349
+
350
+ # A.1 CIFAR10
351
+
352
+ The model used to train CIFAR10 is the one described in Urban et al. (2016) with some minor modifications. We use standard data augmentation techniques, including random cropping and random flipping. The learning rate schedule follows the one detailed in the paper. The structure of the models we experiment with consists of some convolutional layers, mixed with dropout layers and max pooling layers, followed by one or more linear layers.
353
+
354
+ The model used are defined in Table 8. The $c$ indicates a convolutional layer, mp a max pooling layer, dp a dropout layer, fc a linear (fully connected) layer. The exponent indicates how many consecutive layers of the same type are there, while the number in front of the letter determines the size of the layer. In the case of convolutional layers is the number of filters. All convolutional layers of the teacher are 3x3, while the convolutional layers in the smaller models are 5x5.
355
+
356
+ Teacher model Smaller model 1 Smaller model 2 Smaller model 3
357
+
358
+ $7 6 c ^ { 2 }$ -mp-dp- $\cdot 1 2 6 c ^ { 2 }$ -mp-dp- $\cdot 1 4 8 c ^ { 4 }$ -mp-dp-1200fc-dp-1200fc$7 5 c$ -mp-dp- $5 0 c ^ { 2 }$ -mp-dp- $2 5 c$ -mp-dp-500fc-dp$\mathrm { 5 0 c { - } m p { - } d p { - } 2 5 c ^ { 2 } }$ -mp-dp- $. 1 0 c$ -mp-dp-400fc-dp$2 5 c$ -mp-dp- $1 0 c ^ { 2 }$ -mp-dp- $. 5 c$ -mp-dp-300fc-dp
359
+
360
+ Following the authors of the paper, we don’t use dropout layers when training the models using distillation loss. Distillation loss is computed with a temperature of $T = 5$ .
361
+
362
+ Table 9 reports the accuracy of the models trained (in full precision) and their size. Table 10 reports the accuracy achieved with each method, and table 11 reports the optimal mean bit length using Huffman encoding and resulting model size.
363
+
364
+ Table 8: CIFAR10: model specifications
365
+ Table 9: CIFAR10: Teacher and distilled model accuracy, full precision
366
+
367
+ <table><tr><td>Model name Teacher model</td><td>Test accuracy 89.7 %</td><td># of parameters 5.3 millions</td><td>Size (MB) 21.3 MB</td></tr><tr><td>Smaller model 1</td><td>84.5 %</td><td>1.0 millions</td><td>4.00 MB</td></tr><tr><td>Distilled model 1</td><td>88.8 %</td><td>1.0 millions</td><td>4.00 MB</td></tr><tr><td>Smaller model 2</td><td>80.3 %</td><td>0.3 millions</td><td>1.27MB</td></tr><tr><td>Distilled model 2</td><td>84.3 %</td><td>0.3 millions</td><td>1.27 MB</td></tr><tr><td>Smaller model 3</td><td>71.6 %</td><td>0.1 millions</td><td>0.45MB</td></tr><tr><td>Distilled model 3</td><td>78.2 %</td><td>0.1 millions</td><td>0.45MB</td></tr></table>
368
+
369
+ Table 10: CIFAR10: Test accuracy for quantized models. Results computed with bucket size $= 2 5 6$
370
+
371
+ <table><tr><td>PM Quant. 1 (No bucket) PM Quant.1 (with bucket) Quantized Distill. 1 Differentiable Quant.1 PM Quant. 2 (No bucket)</td><td>2 bits 9.30 % 10.53 % 82.4 % 80.43% 10.15 %</td><td>4 bits 67.99 % 87.18 % 88.00 % 88.31 %</td><td>8 bits 88.91 % 88.80 % 88.82 %</td></tr><tr><td>PM Quant.2 (with bucket) Quantized Distill. 2 Differentiable Quant. 2 PM Quant. 3 (No bucket)</td><td>11.89 % 74.22 % 72.79 % 10.15 %</td><td>68.05 % 81.96 % 83.92 % 83.49 % 61.30 %</td><td>84.38 % 84.38 % 84.22 % 78.04 %</td></tr><tr><td>PM Quant. 3 (with bucket) Quantized Distill. 3 Differentiable Quant. 3</td><td>10.38 % 67.02 % 57.84 %</td><td>72.44 % 77.75 % 77.36 %</td><td>78.10 % 77.92 %</td></tr></table>
372
+
373
+ We also performed an experiment with a deeper student model. The architecture is $7 6 c ^ { 3 }$ -mp-dp$1 2 6 c ^ { 3 }$ -mp-dp- $\boldsymbol { 1 4 8 c ^ { 5 } }$ -mp-dp-1000fc-dp-1000fc-dp-1000fc (following the same notation as in table 8). We use the same teacher as in the previous experiments. Results are in table 13.
374
+
375
+ # A.1.1 CIFAR10 - WIDERESNET ARCHITECTURE
376
+
377
+ For our second set of experiments on CIFAR10 with the WideResNet architecture, see table 15. Note that we increase the number of filters but reduce the depth of the model. The implementation of WideResNet used can be found on GitHub 2. Results of quantized methods are in table 16 while the size of the resulting models is detailed in table 17.
378
+
379
+ Table 11: CIFAR10: Optimal length Huffman encoding and resulting model size. Bucket size $= 2 5 6$
380
+
381
+ <table><tr><td>PM Quant.1 (No bucket)</td><td>2 bits 1.34 bits - 0.17 MB</td><td>4 bits 2.43 bits - 0.3 MB 3.52 - 0.47 MB</td><td>8 bits 6.48 bits - 0.81 MB</td></tr><tr><td>PM Quant. 1 (with bucket) Quantized Distill. 1 Differentiable Quant.1</td><td>1.58 bits - 0.22 MB 1.7 bits - 0.24 MB 3.18 bits - 0.43 MB</td><td>3.64 bits - 0.48 MB 5.34 bits - 0.7 MB</td><td>7.58 bits - 0.98 MB 7.70 bits - 1 MB</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>PM Quant. 2 (No bucket)</td><td>1.43 bits - 0.05 MB</td><td>2.6 bits - 0.1 MB</td><td>6.65 bits - 0.26 MB</td></tr><tr><td>PM Quant.2 (with bucket)</td><td>1.6 bits - 0.07 MB</td><td>3.58 bits - 0.15 MB</td><td>7.64 bits - 0.31 MB</td></tr><tr><td>Quantized Distill. 2</td><td>1.7 bits - 0.08 MB</td><td>3.55 bits - 0.15 MB</td><td>7.64 bits - 0.31 MB</td></tr><tr><td>Differentiable Quant. 2</td><td>3.16 bits - 0.13 MB</td><td>5.34 bits - 0.22 MB</td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>PM Quant. 3 (No bucket)</td><td>1.46 bits - 0.02 MB</td><td>2.62 bits - 0.03 MB</td><td>6.66 bits - 0.09 MB</td></tr><tr><td>PM Quant.3 (with bucket)</td><td>1.58 bits - 0.026 MB</td><td>3.51 bits - 0.053 MB</td><td>7.56 bits - 0.1 MB</td></tr><tr><td>Quantized Distill. 3</td><td>1.64 bits - 0.027 MB</td><td>3.53 bits - 0.053 MB</td><td>7.59 bits - 0.11 MB</td></tr><tr><td>Differentiable Quant. 3</td><td>3.12 bits - 0.04 MB</td><td>5.41 bits - 0.08 MB</td><td></td></tr></table>
382
+
383
+ Table 12: CIFAR10: Teacher and distilled model accuracy, full precision
384
+
385
+ <table><tr><td>Model name Teacher model</td><td>Test accuracy 89.7 %</td><td># of parameters 5.3 millions</td><td>Size (MB) 21.3 MB</td></tr><tr><td>Deeper normal model 1</td><td>93.22 %</td><td>5.8 millions</td><td>23.40MB</td></tr><tr><td>Deeper distilled model 1</td><td>92.60 %</td><td>5.8 millions</td><td>23.40 MB</td></tr></table>
386
+
387
+ Table 13: CIFAR10: Test accuracy for quantized deeper student model. Results computed with bucket size $= 2 5 6$
388
+ Table 14: CIFAR10: Optimal length Huffman encoding and resulting model size for deeper student model. Bucket size $= 2 5 6$
389
+
390
+ <table><tr><td>PM Quant. (No bucket) PM Quant. (with bucket) Quantized Distill.</td><td>2 bits 12.60 % 45.82 % 89.33 %</td><td>4bits 91.11 % 92.30 %</td></tr></table>
391
+
392
+ 2 bits 4 bits PM Quant. (No bucket) 1.50 bits - 1.13 MB 3.21 bits - 2.38 MB PM Quant. (with bucket) 1.82 bits - 1.55 MB 3.92 bits - 3.07 MB Quantized Distill. 1.84 bits - 1.56 MB 3.92 bits - 3.08 MB
393
+
394
+ Table 15: CIFAR10: Teacher and distilled model accuracy, full precision, wide resnet
395
+
396
+ <table><tr><td>Model name</td><td>Structure</td><td>Test accuracy</td><td># of parameters</td><td>Size (MB)</td></tr><tr><td>Teacher model</td><td>depth = 28,wide_factor= 20</td><td>95.74 %</td><td>145 millions</td><td>580MB</td></tr><tr><td>Smaller model</td><td>depth = 22, wide_factor = 16</td><td>95.19 %</td><td>82.7 millions</td><td>330 MB</td></tr><tr><td>Distilled model</td><td>depth =22,wide_factor = 16</td><td>94.19 %</td><td>82.7 millions</td><td>330 MB</td></tr></table>
397
+
398
+ # A.2 CIFAR100
399
+
400
+ For our CIFAR100 experiments, we use the same implementation of wide residual networks as in our CIFAR10 experiments. The wide factor is a multiplicative factor controlling the amount of filters in each layer; for more details please refer to the original paper Zagoruyko & Komodakis (2016). We train for 200 epochs with an initial learning rate of 0.1.
401
+
402
+ Table 16: CIFAR10: Test accuracy for quantized models. Results computed with bucket size $= 2 5 6$
403
+
404
+ 2 bits 4 bits PM Quant. (with bucket) $1 5 . 3 5 \%$ $8 1 . 0 9 \%$ Quantized Distill. $9 4 . 2 3 \%$ $9 4 . 7 3 \%$
405
+
406
+ Table 17: CIFAR10: Optimal length Huffman encoding and resulting model size. Bucket size $= 2 5 6$
407
+
408
+ 2 bits 4 bits PM Quant. (with bucket) 1.44 bits - 17.56 MB 2.62 bits - 29.75 MB Quantized Distill. 1.54 bits - 17.81 MB 3.48 bits - 38.65 MB
409
+
410
+ For the CIFAR100 experiments we focused on one student model. Distillation loss is computed with a temperature of $T = 5$ .
411
+
412
+ Model name Structure Test accuracy # of parameters Size (MB) Teacher model depth $= 2 8$ , wide factor $= 1 0$ $7 7 . 2 1 \%$ 36.5 millions 146 MB Smaller model depth $= 2 2$ , wide factor $= 8$ $7 7 . 0 8 \%$ 17.2 millions 68.8 MB Distilled model depth $= 2 2$ , wide factor $= 8$ $7 7 . 2 4 \%$ 17.2 millions 68.8 MB
413
+
414
+ Table 19: CIFAR100: Test accuracy for quantized models. Results computed with bucket size $= 2 5 6$
415
+
416
+ 2 bits 4 bits PM Quant. (No bucket) $1 . 3 8 \%$ $1 . 2 9 \%$ PM Quant. (with bucket) $1 . 0 0 \%$ $7 3 . 4 7 \%$ Quantized Distill. $2 7 . 8 4 \%$ 76.31% Differentiable Quant. $4 9 . 3 2 \%$ $7 7 . 0 7 \%$
417
+
418
+ Table 20: CIFAR100: Optimal length Huffman encoding and resulting model size. Bucket size $=$ 256
419
+
420
+ 2 bits 4 bits
421
+ PM Quant. (No bucket) 1.47 bits - 3.18 MB 2.68 bits - 5.77 MB
422
+ PM Quant. (with bucket) 1.56 bits - 3.90 MB 3.55 bits - 8.18 MB Quantized Distill. 1.73 bits - 4.27 MB 3.54 bits - 8.16 MB Differentiable Quant. 3.23 bits - 7.84 MB 5.53 bits - 12.44 MB
423
+
424
+ # A.3 OPENTNMT INTEGRATION TEST DATASET
425
+
426
+ As mentioned in the main text, we use the openNMT-py codebase. We slightly modify it to add distillation loss and the quantization methods proposed. We mostly use standard options to train the model; in particular, the learning rate starts at 1 and is halved every epoch starting from the first epoch where perplexity doesn’t drop on the test set. We train every model for 15 epochs. Distillation loss is computed with a temperature of $T = 1$ .
427
+
428
+ # A.4 WMT13 DATASET
429
+
430
+ For the WMT13 datasets, we run a similar architecture. We ran all models for 15 epochs; the smaller model overfit with 15 epochs, so we ran it for 5 epochs instead.
431
+
432
+ Table 21: openNMT integ: Teacher and distilled models perplexity and BLEU, full precision
433
+
434
+ <table><tr><td>Model name Teacher model</td><td>Structure 4 LSTM layer, 500 cell size</td><td>Perplexity 26.21</td><td>BLEU 15.88</td><td># of parameters 84.8 millions</td><td>Size (MB) 339.28MB</td></tr><tr><td>Smaller model 1</td><td>2 LSTM layer, 512 cell size 2 LSTMlayer, 512 cell size</td><td>33.03 25.55</td><td>14.97 16.13</td><td>81.6 millions 81.6 millions</td><td>326.57 MB 326.57 MB</td></tr><tr><td>Distilled model1 Smaller model 2</td><td></td><td>34.5</td><td>14.22</td><td>64.8 millions</td><td></td></tr><tr><td>Distilled model 2</td><td>2 LSTM layer,256 cell size 2 LSTM layer,256 cell size</td><td>27.7</td><td>15.48</td><td>64.8 millions</td><td>249.56 MB 249.56 MB</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Smaller model 3</td><td>2LSTMlayer,128 cell size</td><td>39.5</td><td>12.45</td><td>57.2 millions</td><td>228.85 MB</td></tr><tr><td>Distilled model 3</td><td>2 LSTMlayer,128 cell size</td><td>33.78</td><td>13.8</td><td>57.2 millions</td><td>228.85MB</td></tr></table>
435
+
436
+ Table 22: openNMT integ: Test accuracy for quantized models. Results computed with bucket size $= 2 5 6$
437
+
438
+ <table><tr><td>PM Quant. 1 (No bucket) PM Quant.1 (with bucket) Quantized Distill. 1 Differentiable Quant.1</td><td>2 bits 2 ·1017 ppl - 0.00 BLEU 125.1 ppl - 4.12 BLEU 6645 ppl - 0.00 BLEU</td><td>4 bits 2.7 · 10 ppl - 0.24 BLEU 26.21 ppl - 16.29 BLEU</td></tr><tr><td>PM Quant. 2 (No bucket)</td><td>249 ppl - 0.7 BLEU 5·108 ppl - 0.00 BLEU</td><td>25.43 ppl - 15.73 BLEU 28.8 ppl - 15.01 BLEU 71.78 ppl - 6.65 BLEU</td></tr><tr><td>PM Quant.2 (with bucket) Quantized Distill. 2 Differentiable Quant.2</td><td>286.98 ppl - 1.72 BLEU 4035 ppl - 0.00 BLEU</td><td>28.95 ppl - 15.19 BLEU 29.1 ppl - 15.26 BLEU</td></tr><tr><td></td><td>306 ppl - 0.28 BLEU</td><td>31.33 ppl - 13.86 BLEU</td></tr><tr><td>PM Quant. 3 (No bucket)</td><td></td><td></td></tr><tr><td></td><td>3 ·108 ppl - 0.00 BLEU</td><td></td></tr><tr><td>PM Quant. 3 (with bucket)</td><td>1984 ppl - 0.24 BLEU</td><td>106.5 ppl - 5.47 BLEU</td></tr><tr><td></td><td></td><td>36.56 ppl - 12.64 BLEU</td></tr><tr><td>Quantized Distill. 3</td><td>731 ppl - 0.14 BLEU</td><td>37 ppl- 12 BLEU</td></tr><tr><td>Differentiable Quant. 3</td><td>306 ppl- 0.26 BLEU</td><td></td></tr><tr><td></td><td></td><td>38.4 ppl - 12.06 BLEU</td></tr></table>
439
+
440
+ Table 23: openNMT integ: Optimal length Huffman encoding and resulting model size. Bucket size $= 2 5 6$
441
+
442
+ <table><tr><td>PM Quant.1 (No bucket) PM Quant.1 (with bucket)</td><td>2 bits 1.36 bits - 13.93 MB 1.65 bits - 19.47 MB</td><td>4 bits 1.77 bits -18.10 MB 3.69 bits - 40.26 MB</td></tr><tr><td>Quantized Distill. 1 Differentiable Quant.1 PM Quant. 2 (No bucket)</td><td>1.75bits- 20.4 MB 1.72 bits - 20.1 MB 1.34 bits-10.89 MB</td><td>3.66 bits - 39.97 MB 4.38 bits - 47.32 MB 1.86 bits -15.09 MB</td></tr><tr><td>PM Quant. 2 (with bucket) Quantized Distill. 2 Differentiable Quant. 2</td><td>1.65 bits - 15.4 MB 1.85 bits - 17.05 MB 1.93bits-17.67MB</td><td>3.68bits-31.91MB 3.68 bits - 31.91 MB 4.17 bits -35.83 MB</td></tr><tr><td>PM Quant. 3 (No bucket)</td><td>1.47 bits - 10.54 MB</td><td></td></tr><tr><td>PM Quant.3 (with bucket)</td><td></td><td>2.13 bits -15.24 MB</td></tr><tr><td></td><td>1.65 bits -13.6 MB</td><td></td></tr><tr><td></td><td></td><td>3.68 bits - 28.14 MB</td></tr><tr><td>Quantized Distill. 3</td><td>1.86 bits -15.13 MB</td><td></td></tr><tr><td>Differentiable Quant. 3</td><td></td><td>3.68 bits -28.18 MB</td></tr><tr><td></td><td>1.99 bits - 16.04 MB</td><td>4.25bits -31.18 MB</td></tr></table>
443
+
444
+ # A.4.1 DISTILLATION VERSUS STANDARD LOSS FOR QUANTIZATION
445
+
446
+ In this section we highlight the positive effects of using distillation loss during quantization. We take models with the same architecture and we train them with the same number of bits; one of the models is trained with normal loss, the other with the distillation loss with equal weighting between soft cross entropy and normal cross entropy (that is, it is the quantized distilled model).
447
+
448
+ Table 24: WMT13: Teacher and distilled models perplexity and BLEU, full precision
449
+
450
+ <table><tr><td>Model name</td><td>Structure</td><td>Perplexity</td><td>BLEU</td><td># of parameters</td><td>Size (MB)</td></tr><tr><td>Teacher model</td><td>4 LSTMlayer, 50O cell size</td><td>5.83</td><td>34.77</td><td>84.8 millions</td><td>339.28 MB</td></tr><tr><td>Smaller model 1</td><td>2 LSTMlayer, 500 size</td><td>7.98</td><td>30.22</td><td>80.8 millions</td><td>323.25 MB</td></tr><tr><td>Distilled model 1</td><td>2 LSTMlayer, 550 cell size</td><td>7.18</td><td>30.21</td><td>84.3 millions</td><td>337.21 MB</td></tr></table>
451
+
452
+ Table 25: WMT13: Test accuracy for quantized models. Results computed with bucket size $= 2 5 6$
453
+
454
+ <table><tr><td>PM Quant. (No bucket) PM Quant. (with bucket) Quantized Distill.</td><td>4 bits 12.17 ppl - 22.79 BLEU 7.34 ppl - 26.18 BLEU 6.48 ppl - 35.32 BLEU</td></tr></table>
455
+
456
+ Table 26: WMT13: Optimal length Huffman encoding and resulting model size. Bucket size $= 2 5 6$
457
+
458
+ 4 bits
459
+ PM Quant. 1 (No bucket) 1.98 bits - 20.92 MB
460
+ PM Quant. 1 (with bucket) 3.63 bits - 41.02 MB Quantized Distill. 1 3.65 bits - 41.16 MB
461
+
462
+ Table 27 shows the results on the CIFAR10 dataset; the models we train have the same structure as the Smaller model 1, see Section A.1.
463
+
464
+ Table 28 shows the results on the openNMT integration test dataset; the models trained have the same structure of Smaller model 1, see Section A.3. Notice that distillation loss can significantly improve the accuracy of the quantized models.
465
+
466
+ Table 27: CIFAR10: Distillation loss vs normal loss when quantizing
467
+
468
+ <table><tr><td></td><td>2 bits</td><td>4 bits</td></tr><tr><td>Normal loss</td><td>67.22 %</td><td>86.01 %</td></tr><tr><td>Distillation loss</td><td>82.40 %</td><td>88.00 %</td></tr></table>
469
+
470
+ Table 28: openNMT integ: Distillation loss vs normal loss when quantizing
471
+
472
+ <table><tr><td></td><td colspan="2">4bits</td></tr><tr><td>Normal loss</td><td>32.67 ppl</td><td>15.03BLEU</td></tr><tr><td>Distillation loss</td><td>25.43 ppl</td><td>15.73BLEU</td></tr></table>
473
+
474
+ These results suggest that quantization works better when combined with distillation, and that we should try to take advantage of this whenever we are quantizing a neural network.
475
+
476
+ # A.4.2 DIFFERENT HEURISTICS FOR DIFFERENTIABLE QUANTIZATION
477
+
478
+ To test the different heuristics presented in Section 4.2, we train with differentiable quantization the Smaller model 1 architecture specified in Section A.1 on the cifar10 dataset. The same model is trained with different heuristics to provide a sense of how important they are; the experiments is performed with 2 and 4 bits.
479
+
480
+ Results suggests that when using 4 bits, the method is robust and works regardless. When using 2 bits, redistributing bits according to the gradient norm of the layers is absolutely essential for this method to work ; quantiles starting point also seem to provide an small improvement, while using distillation loss in this case does not seem to be crucial.
481
+
482
+ Table 29: Results with automatically redistributed bits
483
+
484
+ <table><tr><td>2 bits</td><td>Distillation loss Normal loss</td><td>Quantiles 82.94 % 83.67 %</td><td>Uniform 78.76 % 76.60 %</td></tr><tr><td>4 bits</td><td>Distillation loss Normal loss</td><td>88.93 % 88.80 %</td><td>88.50 % 88.74 %</td></tr></table>
485
+
486
+ Table 30: Results without automatically redistributed bits
487
+
488
+ <table><tr><td>2 bits</td><td>Distillation loss Normal loss</td><td>Quantiles 19.69 % 25.28 %</td><td>Uniform 22.81 % 22.11 %</td></tr><tr><td>4 bits</td><td>Distillation loss Normal loss</td><td>88.39 % 88.43 %</td><td>88.67 % 88.44 %</td></tr></table>
489
+
490
+ # B QUANTIZATION IS EQUIVALENT TO ASYMPTOTICALLY NORMALLY DISTRIBUTED NOISE
491
+
492
+ In this section we will prove some results about the uniform quantization function, including the fact that is asymptotically normally distributed, see subsection B.1 below. Clearly, we refer to the stochastic version, see Section 2.1.
493
+
494
+ # Unbiasedness
495
+
496
+ We first start proving the unbiasedness of $\hat { Q }$ ;
497
+
498
+ $$
499
+ E [ \hat { Q } ( \hat { v } ) _ { i } ] = \frac { \left\lfloor \hat { v } _ { i } s \right\rfloor } { s } + \frac { 1 } { s } E [ \xi _ { i } ] = \frac { \left\lfloor \hat { v } _ { i } s \right\rfloor } { s } + \frac { 1 } { s } ( s \hat { v } _ { i } - \lfloor \hat { v } _ { i } s \rfloor ) = \hat { v } _ { i }
500
+ $$
501
+
502
+ Then it is immediate that
503
+
504
+ $$
505
+ E [ Q ( v ) ] = \alpha E \left[ \hat { Q } \left( \frac { v - \beta } { \alpha } \right) \right] + \beta = \alpha \frac { v - \beta } { \alpha } + \beta = v
506
+ $$
507
+
508
+ # Bounds on second and third moment
509
+
510
+ We will write out bounds on $\hat { Q }$ ; the analogous bounds on $Q$ are then straightforward. For convenience, let us call $\hat { l } _ { i } = \lfloor \hat { v } _ { i } s \rfloor$
511
+
512
+ $$
513
+ \begin{array} { l } { { \displaystyle E [ \hat { Q } ( \hat { v } ) _ { i } ^ { 2 } ] = \frac { \hat { l } _ { i } ^ { 2 } } { s ^ { 2 } } + \frac { 1 } { s ^ { 2 } } E [ \xi _ { i } ^ { 2 } ] + 2 \frac { \hat { l } _ { i } } { s ^ { 2 } } E [ \xi _ { i } ] = } } \\ { { \displaystyle ~ = \frac { \hat { l } _ { i } ^ { 2 } } { s ^ { 2 } } + \frac { 1 } { s ^ { 2 } } ( s \hat { v } _ { i } - \hat { l } _ { i } ) + 2 \frac { \hat { l } _ { i } } { s ^ { 2 } } ( s \hat { v } _ { i } - \hat { l } _ { i } ) = } } \\ { { \displaystyle ~ = \frac { 1 } { s ^ { 2 } } \left[ \hat { v } _ { i } s ( 1 + 2 \hat { l } _ { i } ) - \hat { l } _ { i } ( \hat { l } _ { i } + 1 ) \right] } } \end{array}
514
+ $$
515
+
516
+ And given that $\hat { l } _ { i } \le \hat { v } _ { i } s \le \hat { l } _ { i } + 1$ , we readily find
517
+
518
+ $$
519
+ \frac { \hat { l } _ { i } ^ { 2 } } { s ^ { 2 } } \leq E [ \hat { Q } ( \hat { v } ) _ { i } ^ { 2 } ] \leq \frac { ( \hat { l } _ { i } + 1 ) ^ { 2 } } { s ^ { 2 } }
520
+ $$
521
+
522
+ For the third moment, we have
523
+
524
+ $$
525
+ \begin{array} { c } { { E [ \hat { Q } ( \hat { v } ) _ { i } ^ { 3 } ] = \displaystyle \frac { \hat { l } _ { i } ^ { 3 } } { s ^ { 3 } } + \frac { 1 } { s ^ { 3 } } E [ \xi _ { i } ^ { 3 } ] + 3 \frac { \hat { l } _ { i } } { s ^ { 3 } } E [ \xi _ { i } ^ { 2 } ] + 3 \frac { \hat { l } _ { i } ^ { 2 } } { s ^ { 3 } } E [ \xi _ { i } ] = } } \\ { { = \displaystyle \frac { \hat { l } _ { i } ^ { 3 } } { s ^ { 3 } } + \frac { 1 } { s ^ { 3 } } ( s \hat { v } _ { i } - \hat { l } _ { i } ) + 3 \frac { \hat { l } _ { i } } { s ^ { 3 } } ( s \hat { v } _ { i } - \hat { l } _ { i } ) + 3 \frac { \hat { l } _ { i } ^ { 2 } } { s ^ { 3 } } ( s \hat { v } _ { i } - \hat { l } _ { i } ) = } } \\ { { = \displaystyle \frac { 1 } { s ^ { 3 } } \left[ \hat { v } _ { i } s ( 3 \hat { l } _ { i } ^ { 2 } + 3 \hat { l } _ { i } + 1 ) - \hat { l } _ { i } ( 2 \hat { l } _ { i } ^ { 2 } + 3 \hat { l } _ { i } + 1 ) \right] } } \end{array}
526
+ $$
527
+
528
+ And as before, the bounds are
529
+
530
+ $$
531
+ \frac { \hat { l } _ { i } ^ { 3 } } { s ^ { 3 } } \leq E [ \hat { Q } ( \hat { v } ) _ { i } ^ { 3 } ] \leq \frac { ( \hat { l } _ { i } + 1 ) ^ { 3 } } { s ^ { 3 } }
532
+ $$
533
+
534
+ # B.1 ASYMPTOTIC NORMALITY
535
+
536
+ Most of neural networks operations are scalar product computation. Therefore, the scalar product of the quantized weights and the inputs is an important quantity:
537
+
538
+ $$
539
+ Q ( v ) ^ { T } x = \sum _ { i = 1 } ^ { n } Q ( v _ { i } ) x _ { i }
540
+ $$
541
+
542
+ We already know from section B that the quantization function is unbiased; hence we know that
543
+
544
+ $$
545
+ \sum _ { i = 1 } ^ { n } Q ( v _ { i } ) x _ { i } = \sum _ { i = 1 } ^ { n } v _ { i } x _ { i } + \varepsilon _ { n }
546
+ $$
547
+
548
+ with $\varepsilon _ { n }$ is a zero-mean random variable. We will show that $\varepsilon _ { n }$ tends in distribution to a normal random variable. To prove asymptotic normality, we will use a generalized version of the central limit theorem due to Lyapunov:
549
+
550
+ Theorem B.1 (Lyapunov Central Limit Theorem). Let $\{ X _ { 1 } , X _ { 2 } , \ldots \}$ be a sequence of independent random variables, each with finite expected value $\mu _ { i }$ and variance $\sigma _ { i } ^ { 2 }$ . Define $\begin{array} { r } { s _ { n } ^ { 2 } = \sum _ { i = 1 } ^ { n } \sigma _ { i } ^ { 2 } } \end{array}$ . If, for some $\delta > 0$ , the Lyapunov condition
551
+
552
+ $$
553
+ \operatorname* { l i m } _ { n \to \infty } { \frac { 1 } { s _ { n } ^ { 2 + \delta } } } \sum _ { i = 1 } ^ { n } \operatorname { E } \left[ | X _ { i } - \mu _ { i } | ^ { 2 + \delta } \right] = 0
554
+ $$
555
+
556
+ is satisfied, then
557
+
558
+ $$
559
+ { \frac { 1 } { s _ { n } } } \sum _ { i = 1 } ^ { n } \left( X _ { i } - \mu _ { i } \right) { \overset { D } { \longrightarrow } } \ N ( 0 , 1 )
560
+ $$
561
+
562
+ We can now state the theorem:
563
+
564
+ Theorem B.2. Let $v , x$ be two vectors with n elements. Let $Q$ be the uniform quantization function with s levels defined in 2.1 and define $\begin{array} { r } { s _ { n } ^ { 2 } = \sum _ { i = 1 } ^ { n } V a r [ \dot { Q } ( v _ { i } ) x _ { i } ] } \end{array}$ . If the elements of $v , x$ are uniformly bounded by $M ^ { 3 }$ and $\quad \operatorname* { l i m } _ { n \to \infty } s _ { n } = \infty$ , then
565
+
566
+ $$
567
+ \sum _ { i = 1 } ^ { n } Q ( v _ { i } ) x _ { i } = \sum _ { i = 1 } ^ { n } v _ { i } x _ { i } + \varepsilon _ { n }
568
+ $$
569
+
570
+ with $E [ \varepsilon _ { n } ] = 0$ and
571
+
572
+ $$
573
+ \operatorname* { l i m } _ { n \to \infty } \frac { 1 } { s _ { n } } \varepsilon _ { n } \xrightarrow { D } { \cal N } ( 0 , 1 )
574
+ $$
575
+
576
+ 3i.e. there exists a constant $M$ such that for all $n$ , $| v _ { i } | \leq M$ , $| x _ { i } | \le M$ for all $i \in \{ 1 , \ldots , n \}$
577
+
578
+ Proof. Using the same notation as theorem B.1, let $X _ { i } = Q ( v _ { i } ) x _ { i }$ , $\mu _ { i } = E [ X _ { i } ] = v _ { i } x _ { i }$ . We already mentioned in 2.1 that these are independent random variables. We will show that the Lyapunov condition holds with $\delta = 1$ .
579
+
580
+ We know that
581
+
582
+ $$
583
+ \operatorname { E } \left[ | X _ { i } - \mu _ { i } | ^ { 3 } \right] = \operatorname { E } \left[ ( X _ { i } - \mu _ { i } ) ^ { 2 } | X _ { i } - \mu _ { i } | \right] \leq { \frac { M ^ { 2 } } { s } } \operatorname { E } \left[ ( X _ { i } - \mu _ { i } ) ^ { 2 } \right]
584
+ $$
585
+
586
+ In fact,
587
+
588
+ $$
589
+ \begin{array} { l } { \displaystyle | X _ { i } - \mu _ { i } | = | x _ { i } | | Q ( v _ { i } ) - v _ { i } | = | x _ { i } | \left| \alpha _ { i } \hat { Q } \left( \frac { v _ { i } - \beta _ { i } } { \alpha _ { i } } \right) + \beta _ { i } - v _ { i } \right| \leq } \\ { \leq | x _ { i } | \left| \alpha _ { i } \left( \frac { v _ { i } - \beta _ { i } } { \alpha _ { i } } + \frac { 1 } { s } \right) + \beta _ { i } - v _ { i } \right| \leq } \\ { \leq | x _ { i } | \frac { M } { s } \leq \frac { M ^ { 2 } } { s } } \end{array}
590
+ $$
591
+
592
+ since during quantization we have bins of size $\textstyle { \frac { 1 } { s } }$ , so that is the largest error we can make. Also, by hypothesis $\bar { M } \geq \alpha _ { i } , x _ { i }$ for every $i$ .
593
+
594
+ Hence
595
+
596
+ $$
597
+ 0 \leq { \frac { 1 } { s _ { n } ^ { 3 } } } \sum _ { i = 1 } ^ { n } \operatorname { E } \left[ | X _ { i } - \mu _ { i } | ^ { 3 } \right] \leq { \frac { 1 } { s _ { n } ^ { 3 } } } { \frac { M ^ { 2 } } { s } } \sum _ { i = 1 } ^ { n } \operatorname { E } \left[ ( X _ { i } - \mu _ { i } ) ^ { 2 } ) \right] = { \frac { M ^ { 2 } } { s } } \cdot { \frac { 1 } { s _ { n } } }
598
+ $$
599
+
600
+ and since $\quad \operatorname* { l i m } _ { n \to \infty } s _ { n } = \infty$ , we have that the Lyapunov condition is satisfied. Hence
601
+
602
+ $$
603
+ { \frac { 1 } { s _ { n } } } \sum _ { i = 1 } ^ { n } \left( X _ { i } - \mu _ { i } \right) = { \frac { 1 } { s _ { n } } } \sum _ { i = 1 } ^ { n } \left( Q ( v _ { i } ) x _ { i } - v _ { i } x _ { i } \right) = { \frac { 1 } { s _ { n } } } \varepsilon _ { n } \ { \stackrel { D } { \longrightarrow } } \ N ( 0 , 1 )
604
+ $$
605
+
606
+ Note about the hypothesis The two hypothesis that were used to prove the theorem are reasonable
607
+ and should be satisfied by any practical dataset. Typically we know or we can estimate the range
608
+ of the values of inpuis satisfied. The assu and weights, so the assumption that they don’tption on the variance is also reasonable; in fact, $n$ $\begin{array} { r } { \mathbf { \bar { \Sigma } } ^ { 2 } = \sum _ { i = 1 } ^ { n } \mathbf { \bar { V } } a r [ Q ( v _ { i } ) x _ { i } ] } \end{array}$ $n$ $v _ { i }$
609
+ form $k / s$ , for example, then $s _ { n } ^ { 2 } \ = \ 0 .$ ) it is unlikely that a real world dataset would present this
610
+ characteristic. In fact, it suffices that there exist $\gamma > 0$ and $0 < \delta \leq 1$ such that at least $\bar { \delta }$ -percent of $\sigma _ { i } ^ { 2 } \geq \gamma$ . This implies $s _ { n } ^ { 2 } \geq \delta \gamma n \to \infty$ .
611
+
612
+ Asymptitc normality when quantizing inputs Theorem B.2 can be easily extended to the case when also $x _ { i }$ are quantized. The proof is almost identical; we simply have to set $X _ { i } = Q ( v _ { i } ) Q ( x _ { i } )$ , use the independence of $Q ( x _ { i } )$ and the fact that $Q ( v _ { i } )$ and $| Q ( v _ { i } ) Q ( x _ { i } ) - x _ { i } v _ { i } | \leq M ^ { 2 }$ . For completeness, we report the statement of the theorem :
613
+
614
+ Theorem B.3. Let with s levels define $v , x$ e two vectors .1 and define $Q$ niform quantization. If the elements of tionare $\begin{array} { r } { s _ { n } ^ { 2 } = \sum _ { i = 1 } ^ { n } V a r [ Q ( \dot { v } _ { i } ) Q ( x _ { i } ) ] } \end{array}$ $v , x$ uniformly bounded by $M$ $\quad \operatorname* { l i m } _ { n \to \infty } s _ { n } = \infty$ , then
615
+
616
+ $$
617
+ \sum _ { i = 1 } ^ { n } Q ( v _ { i } ) Q ( x _ { i } ) = \sum _ { i = 1 } ^ { n } v _ { i } x _ { i } + \varepsilon _ { n }
618
+ $$
619
+
620
+ with $E [ \varepsilon _ { n } ] = 0$ and
621
+
622
+ $$
623
+ \operatorname* { l i m } _ { n \to \infty } \frac { 1 } { s _ { n } } \varepsilon _ { n } \xrightarrow { D } { \cal N } ( 0 , 1 )
624
+ $$
parse/train/S1XolQbRW/S1XolQbRW_content_list.json ADDED
The diff for this file is too large to render. See raw diff